text:
from __future__ import unicode_literals
import json

from django.db import transaction
from django.utils import six
from rest_framework import serializers
from rest_framework_gis.serializers import GeoFeatureModelSerializer
from common.serializers import AbstractFieldsMixin, PartialResponseMixin
from facilities.models import Facility
from .models import (
    GeoCodeSource,
    GeoCodeMethod,
    FacilityCoordinates,
    WorldBorder,
    CountyBoundary,
    ConstituencyBoundary,
    WardBoundary
)

from facilities.models import FacilityUpdates

class BufferCooridinatesMixin(object):

    def buffer_coordinates(self, facility, validated_data):

        facility = Facility.objects.get(id=facility.id) if hasattr(
            facility, 'id') else facility

        coordinates = []
        if isinstance(validated_data.get('coordinates'), six.string_types):
            coordinates = json.loads(validated_data.get('coordinates'))

        if isinstance(validated_data.get('coordinates'), dict):
            coordinates = validated_data.get('coordinates')

        facility_update = {}
        try:
            facility_update = FacilityUpdates.objects.filter(
                facility=facility,
                cancelled=False, approved=False)[0]
        except IndexError:
            facility_update = FacilityUpdates.objects.create(
                facility=facility)
        serialized_data = {}
        method = validated_data.get('method', None)
        source = validated_data.get('source', None)

        humanized_data = {}
        machine_data = {}
        if 'method' in validated_data:
            try:
                humanized_data['method_human'] = method.name
                machine_data['method_id'] = str(
                    validated_data.get('method').id)
            except AttributeError:
                method = GeoCodeMethod.objects.get(id=method)
                humanized_data['method_human'] = method.name
                machine_data['method_id'] = str(method.id)
        if 'source' in validated_data:
            try:
                humanized_data['source_human'] = source.name
                machine_data['source_id'] = str(
                    validated_data.get('source').id)
            except AttributeError:
                source = GeoCodeSource.objects.get(id=source)
                humanized_data['source_human'] = source.name
                machine_data['source_id'] = str(source.id)

        long_lat = coordinates.get('coordinates')
        humanized_data["longitude"] = long_lat[0]
        humanized_data["latitude"] = long_lat[1]
        machine_data["coordinates"] = coordinates

        serialized_data.update(humanized_data)
        serialized_data.update(machine_data)
        facility_update.geo_codes = json.dumps(serialized_data)
        facility_update.save()
        return facility_update

class GeoCodeSourceSerializer(
        AbstractFieldsMixin, serializers.ModelSerializer):

    class Meta(object):
        model = GeoCodeSource

class GeoCodeMethodSerializer(
        AbstractFieldsMixin, serializers.ModelSerializer):

    class Meta(object):
        model = GeoCodeMethod

class FacilityCoordinatesListSerializer(
        AbstractFieldsMixin, GeoFeatureModelSerializer):
    # DO NOT make this any fatter than it must be
    # The facility list JSON payload is already > 1MB!
    # That is why there is a detail serializer
    ward = serializers.ReadOnlyField(source="facility.ward.id")
    constituency = serializers.ReadOnlyField(
        source="facility.ward.constituency.id"
    )
    county = serializers.ReadOnlyField(
        source="facility.ward.constituency.county.id"
    )
    geometry = serializers.ReadOnlyField(source='simplify_coordinates')

    class Meta(object):
        model = FacilityCoordinates
        geo_field = "geometry"
        exclude = (
            'created', 'created_by', 'updated', 'updated_by', 'deleted',
            'search', 'collection_date', 'source', 'method', 'active',
            'facility', 'coordinates', 'id'
        )

class FacilityCoordinatesDetailSerializer(
        AbstractFieldsMixin, GeoFeatureModelSerializer):
    facility_name = serializers.ReadOnlyField(source="facility.name")
    facility_id = serializers.ReadOnlyField(source="facility.id")
    ward = serializers.ReadOnlyField(source="facility.ward.id")
    constituency = serializers.ReadOnlyField(
        source="facility.ward.constituency.id"
    )
    county = serializers.ReadOnlyField(
        source="facility.ward.constituency.county.id"
    )

    class Meta(object):
        model = FacilityCoordinates
        geo_field = "geometry"

class FacilityCoordinateSimpleSerializer(
        AbstractFieldsMixin, BufferCooridinatesMixin,
        serializers.ModelSerializer):
    source_name = serializers.ReadOnlyField(source="source.name")
    method_name = serializers.ReadOnlyField(source="method.name")

    class Meta(object):
        model = FacilityCoordinates

    @transaction.atomic
    def update(self, instance, validated_data):
        facility = instance.facility
        if facility.approved:
            FacilityCoordinates(**validated_data).clean()
            self.buffer_coordinates(facility, validated_data)
            return instance
        else:
            return super(FacilityCoordinateSimpleSerializer, self).update(
                instance, validated_data)

class AbstractBoundarySerializer(
        AbstractFieldsMixin, GeoFeatureModelSerializer):
    center = serializers.ReadOnlyField()
    facility_count = serializers.ReadOnlyField()
    density = serializers.ReadOnlyField()
    bound = serializers.ReadOnlyField()

    class Meta(object):
        geo_field = 'mpoly'

class WorldBorderSerializer(AbstractBoundarySerializer):
    center = serializers.ReadOnlyField()
    geometry = serializers.ReadOnlyField()

    class Meta(object):
        model = WorldBorder
        geo_field = 'geometry'
        exclude = (
            'mpoly', 'active', 'deleted', 'search', 'created', 'updated',
            'created_by', 'updated_by', 'longitude', 'latitude',
        )

class WorldBorderDetailSerializer(AbstractBoundarySerializer):
    facility_coordinates = serializers.ReadOnlyField()
    center = serializers.ReadOnlyField()

    class Meta(AbstractBoundarySerializer.Meta):
        model = WorldBorder

class CountyBoundarySerializer(AbstractBoundarySerializer):
    constituency_boundary_ids = serializers.ReadOnlyField()
    county_id = serializers.ReadOnlyField(source='area.id')
    geometry = serializers.ReadOnlyField()

    class Meta(object):
        model = CountyBoundary
        geo_field = 'geometry'
        exclude = (
            'active', 'deleted', 'search', 'created', 'updated', 'created_by',
            'updated_by', 'area', 'mpoly',
        )

class CountyBoundaryDetailSerializer(AbstractBoundarySerializer):
    constituency_boundary_ids = serializers.ReadOnlyField()
    county_id = serializers.ReadOnlyField(source='area.id')

    class Meta(AbstractBoundarySerializer.Meta):
        model = CountyBoundary

class CountyBoundSerializer(
        AbstractFieldsMixin, serializers.ModelSerializer):
    bound = serializers.ReadOnlyField()

    class Meta(AbstractBoundarySerializer.Meta):
        model = CountyBoundary
        fields = ("bound", )

class ConstituencyBoundarySerializer(AbstractBoundarySerializer):
    ward_boundary_ids = serializers.ReadOnlyField()
    constituency_id = serializers.CharField(source='area.id')
    geometry = serializers.ReadOnlyField()

    class Meta(object):
        model = ConstituencyBoundary
        geo_field = 'geometry'
        exclude = (
            'active', 'deleted', 'search', 'created', 'updated', 'created_by',
            'updated_by', 'area', 'mpoly',
        )

class ConstituencyBoundaryDetailSerializer(AbstractBoundarySerializer):
    ward_boundary_ids = serializers.ReadOnlyField()
    constituency_id = serializers.ReadOnlyField(source='area.id')

    class Meta(AbstractBoundarySerializer.Meta):
        model = ConstituencyBoundary

class ConstituencyBoundSerializer(
        AbstractFieldsMixin, serializers.ModelSerializer):
    bound = serializers.ReadOnlyField()

    class Meta(AbstractBoundarySerializer.Meta):
        model = ConstituencyBoundary
        fields = ("bound", )

class WardBoundarySerializer(AbstractBoundarySerializer):
    ward_id = serializers.CharField(source='area.id')
    geometry = serializers.ReadOnlyField()

    class Meta(object):
        model = WardBoundary
        geo_field = 'geometry'
        exclude = (
            'active', 'deleted', 'search', 'created', 'updated', 'created_by',
            'updated_by', 'area', 'mpoly',
        )

class WardBoundaryDetailSerializer(AbstractBoundarySerializer):
    facility_coordinates = serializers.ReadOnlyField()
    ward_id = serializers.ReadOnlyField(source='area.id')

    class Meta(AbstractBoundarySerializer.Meta):
        model = WardBoundary

class DrillBoundarySerializer(GeoFeatureModelSerializer):
    id = serializers.ReadOnlyField(source='area.code')
    name = serializers.ReadOnlyField(source='area.name')
    geometry = serializers.ReadOnlyField()
    center = serializers.ReadOnlyField()
    facility_count = serializers.ReadOnlyField()
    density = serializers.ReadOnlyField()
    bound = serializers.ReadOnlyField()

    class Meta(object):
        geo_field = 'geometry'
        fields = (
            'geometry', 'center', 'bound', 'id',
            'facility_count', 'name',
        )

    def get_fields(self):
        p = PartialResponseMixin()
        origi_fields = super(DrillBoundarySerializer, self).get_fields()
        return p.strip_fields(self.context.get('request'), origi_fields)

class DrillCountyBoundarySerializer(DrillBoundarySerializer):

    class Meta(DrillBoundarySerializer.Meta):
        model = CountyBoundary

class DrillConstituencyBoundarySerializer(DrillBoundarySerializer):

    class Meta(DrillBoundarySerializer.Meta):
        model = ConstituencyBoundary

class DrillWardBoundarySerializer(DrillBoundarySerializer):

    area_id = serializers.ReadOnlyField(source='area.id')
    county_name = serializers.ReadOnlyField(
        source='area.constituency.county.name'
    )
    county_code = serializers.ReadOnlyField(
        source='area.constituency.county.code'
    )
    constituency_name = serializers.ReadOnlyField(
        source='area.constituency.name'
    )
    constituency_code = serializers.ReadOnlyField(
        source='area.constituency.code'
    )

    class Meta(object):
        geo_field = 'geometry'
        model = WardBoundary
        fields = (
            'geometry', 'center', 'bound', 'id', 'area_id',
            'facility_count', 'name',
            'county_name', 'county_code',
            'constituency_code', 'constituency_name'
        )


text:
<?php

use yii\db\Migration;

class m150617_200836_admin_user_online extends Migration
{
    public function up()
    {
        $this->createTable('admin_user_online', [
            'id' => 'pk',
            'user_id' => 'int(11) NOT NULL',
            'last_timestamp' => 'int(11) NOT NULL',
            'invoken_route' => 'varchar(120) NOT NULL',
        ]);
    }

    public function down()
    {
        echo "m150617_200836_admin_user_online cannot be reverted.\n";

        return false;
    }

    /*
    // Use safeUp/safeDown to run migration code within a transaction
    public function safeUp()
    {
    }

    public function safeDown()
    {
    }
    */
}

redpajama_set_name: RedPajamaGithub


text:
from __future__ import print_function, absolute_import
import bacula_tools
import optparse

class Messages(bacula_tools.DbDict):
    SETUP_KEYS = [(bacula_tools.DATA, ''), bacula_tools.COMMENT]
    table = bacula_tools.MESSAGES
    _select = 'SELECT ref_id, link_type FROM messages_link WHERE messages_id=%s'
    _insert = 'INSERT INTO messages_link (messages_id, ref_id, link_type) VALUES (%s, %s, %s)'
    _delete = 'DELETE FROM messages_link WHERE messages_id = %s AND ref_id=%s AND link_type=%s'

    def link(self, obj):
        '''If I were willing to really wed this to MySQL, I should switch to REPLACE INTO.
        Since I'm not, we'll just do an insert and check for a duplication error.'''
        try:
            self.bc.do_sql(
                self._insert, (self[bacula_tools.ID], obj[bacula_tools.ID], obj.IDTAG))
        except Exception as e:
            if e.args[0] == 1062:
                # 1062 is what happens when you try to insert a duplicate row
                pass
            else:
                print(e)
                raise

    def unlink(self, obj):
        '''Remove the link between this Message and the given object.'''
        self.bc.do_sql(
            self._delete, (self[bacula_tools.ID], obj[bacula_tools.ID], obj.IDTAG))
        return

    def __str__(self):
        '''String representation suitable for inclusion in any config file.'''
        output = 'Messages {\n  Name = "%(name)s"\n  %(data)s\n}' % self
        return output

    def _cli_special_setup(self):
        '''Add CLI switches to link objects to this.  The object-type is required
        as you could easily have the same name for Directors, Clients, and
        Storage.
        '''
        group = optparse.OptionGroup(self.parser, "Object links",
                                     "Messages are used by clients, storage daemons, and directors.")
        group.add_option('--add-link', metavar='STORAGE_DAEMON')
        group.add_option('--remove-link', metavar='STORAGE_DAEMON')
        group.add_option(
            '--object-type', help='Optional device type to disambiguate the desired linkage')
        self.parser.add_option_group(group)
        return

    def _cli_special_do_parse(self, args):
        '''Handle the CLI switches for linkage.  Use the object type to provide a context
        for name lookup.'''
        obj = None
        if args.object_type:
            obj = getattr(bacula_tools, args.object_type.capitalize(), None)

        if args.add_link:
            if obj:
                target = obj().search(args.add_link)
            else:
                for key in [bacula_tools.Client, bacula_tools.Storage, bacula_tools.Director]:
                    target = key().search(args.add_link)
                    if target[bacula_tools.ID]:
                        break
            if target[bacula_tools.ID]:
                self.link(target)
            else:
                print('Unable to find anything named', args.add_link)

        if args.remove_link:
            if obj:
                target = obj().search(args.remove_link)
            else:
                for key in [bacula_tools.Client, bacula_tools.Storage, bacula_tools.Director]:
                    target = key().search(args.remove_link)
                    if target[bacula_tools.ID]:
                        break
            if not target:
                print('Unable to find anything named', args.remove_link)
            else:
                self.unlink(target)

        return

    def _cli_special_print(self):
        '''Print out the linked objects.'''
        resultset = self.bc.do_sql(self._select, self[bacula_tools.ID])
        if not resultset:
            return
        fmt = '%' + str(self._maxlen) + 's'
        for row in resultset:
            for key in [bacula_tools.Client, bacula_tools.Storage, bacula_tools.Director]:
                if key.IDTAG == row[1]:
                    print(fmt % key().search(row[0])[bacula_tools.NAME])
        return

def main():
    s = Messages()
    s.cli()

if __name__ == "__main__":
    main()


text:
module Milkrun
  class Changelog
    attr_reader :audience, :build_type, :version_code

    def initialize(audience:, build_type:, version_code:)
      @audience, @build_type, @version_code = audience, build_type, version_code
    end

    # Capture and publish the changelog for a package to a list in S3.
    def publish
      Milkrun.say "Publishing changelog for #{variant} package with version_code #{version_code}"

      build = {
        'build' => version_code,
        'changelog' => changelog,
        'variant' => variant
      }
      body = (current_builds.select{|b| b[:build] != version_code} + [build]).to_yaml

      object = Milkrun.s3_client.put_object(body: body, bucket: Milkrun.bucket, key: 'builds.yaml')

      Milkrun.say "Changelog published"
    end

    protected

    def current_builds
      @current_builds ||= BuildList.new.fetch
    end

    def changelog
      return @changelog if defined? @changelog

      previous_changelog = current_builds.last['changelog']
      file_name = '.CHANGELOG.tmp'
      File.open(file_name, 'w') do |f|
        f.write("\n\n# Previous release notes, anything commented out will not appear:\n\n")
        f.write(previous_changelog
          .split("\n")
          .map {|line| "# #{line}"}
          .join("\n")
        )
      end

      system("#{ENV['EDITOR'] || 'vim'} #{file_name}")
      @changelog = strip_commented_lines(File.read(file_name)).strip
      raise "Must provide release notes" if changelog.length == 0
      File.delete(file_name)

      @changelog
    end

    def strip_commented_lines(str)
      str.split("\n").select {|line| line.strip[0] != '#'}.join("\n")
    end

    def variant
      audience + build_type.capitalize
    end
  end
end


text:
/********************
 * GENERAL STYLES
 ********************/
html {
  position: relative;
  min-height: 100%; }

body {
  background-color: #F3F5F8;
  font-family: "Source Sans Pro", sans-serif;
  font-size: 15px;
  color: #676a6d; }

a {
  color: #3287B2; }
  a:hover, a:focus {
    color: #3b98c8;
    text-decoration: none; }

th {
  font-weight: 600; }

.page-title {
  margin-top: 0;
  margin-bottom: 30px;
  font-weight: 300; }

footer {
  position: absolute;
  bottom: 0;
  right: 0;
  padding-top: 15px;
  padding-bottom: 10px; }

.copyright {
  margin-bottom: 0;
  text-align: right;
  font-size: 13px; }
  @media screen and (max-width: 767px) {
    .copyright {
      text-align: center;
      position: relative !important; } }

/********************
 * LAYOUT
 ********************/
#wrapper .sidebar {
  -webkit-transition: all 0.3s ease-in-out;
  -moz-transition: all 0.3s ease-in-out;
  -ms-transition: all 0.3s ease-in-out;
  -o-transition: all 0.3s ease-in-out;
  transition: all 0.3s ease-in-out;
  width: 300px;
  height: 100%;
  float: left;
  background-color: #2B333E;
  position: fixed;
  left: 0; }

#wrapper .main {
  -webkit-transition: all 0.3s ease-in-out;
  -moz-transition: all 0.3s ease-in-out;
  -ms-transition: all 0.3s ease-in-out;
  -o-transition: all 0.3s ease-in-out;
  transition: all 0.3s ease-in-out;
  width: calc(100% - 300px);
  left: 0;
  position: relative;
  float: right;
  background-color: #f5f5fa; }

#wrapper #sidebar-nav,
#wrapper .main {
  padding-top: 80px; }

@media screen and (max-width: 767px) {
  #wrapper #sidebar-nav,
  #wrapper .main {
    padding-top: 130px; } }

.layout-fullwidth #wrapper .sidebar {
  left: -300px; }

.layout-fullwidth #wrapper .main {
  width: 100%; }

.layout-fullwidth #wrapper .navbar {
  left: 0 !important; }

.layout-fullwidth #wrapper .btn-toggle-fullwidth {
  color: #00AAFF; }

.offcanvas-active #wrapper .sidebar {
  left: 0; }

.offcanvas-active #wrapper .main {
  width: 100%;
  position: relative;
  left: 300px; }

@media screen and (max-width: 1024px) {
  #wrapper .sidebar {
    left: -300px; }
  #wrapper .main {
    width: 100%; }
  #wrapper .navbar {
    left: 0 !important; }
  #wrapper .btn-toggle-fullwidth {
    color: #00AAFF; }
  .btn-toggle-minified {
    display: none; } }

.main-content {
  padding: 28px 10px; }

.navbar + .main-content {
  padding: 105px 0 28px 5px; }
  @media screen and (max-width: 767px) {
    .navbar + .main-content {
      padding-top: 155px; } }

html.fullscreen-bg,
html.fullscreen-bg body,
html.fullscreen-bg #wrapper {
  height: 100%; }

.vertical-align-wrap {
  position: absolute;
  width: 100%;
  height: 100%;
  display: table; }

.vertical-align-middle {
  display: table-cell;
  vertical-align: middle; }

/********************
 * TOP NAVIGATION
 ********************/
.navbar-default {
  -webkit-transition: all 0.3s ease-in-out;
  -moz-transition: all 0.3s ease-in-out;
  -ms-transition: all 0.3s ease-in-out;
  -o-transition: all 0.3s ease-in-out;
  transition: all 0.3s ease-in-out;
  -moz-box-shadow: 1px 2px 3px rgba(0, 0, 0, 0.1);
  -webkit-box-shadow: 1px 2px 3px rgba(0, 0, 0, 0.1);
  box-shadow: 1px 2px 3px rgba(0, 0, 0, 0.1);
  -webkit-border-radius: 0;
  -moz-border-radius: 0;
  border-radius: 0;
  padding: 0;
  margin: 0;
  border: none;
  background-color: #fff; }
  .navbar-default .navbar-nav > .open > a, .navbar-default .navbar-nav > .open > a:hover, .navbar-default .navbar-nav > .open > a:focus {
    background-color: #fafafa; }
  .navbar-default .navbar-toggle, .navbar-default .navbar-toggle:hover, .navbar-default .navbar-toggle:focus {
    background-color: #f8f8f8; }
  .navbar-default .brand {
    float: left;
    padding: 30px 39px;
    background-color: #fff; }
  @media screen and (max-width: 1024px) {
    .navbar-default .brand {
      padding-left: 30px;
      padding-right: 15px; } }
  @media screen and (max-width: 992px) {
    .navbar-default .brand {
      display: none; } }
  @media screen and (max-width: 640px) {
    .navbar-default #navbar-menu {
      float: right; } }

.navbar-btn {
  float: left;
  padding: 16px 0; }
  .navbar-btn button {
    font-size: 24px;
    padding: 4px 8px;
    line-height: .7;
    border: none;
    background: none;
    outline: none; }
  @media screen and (max-width: 640px) {
    .navbar-btn {
      padding-left: 0; } }

.navbar-btn-right {
  float: right; }

.navbar-form {
  padding: 15px;
  border: 0; }
  .navbar-form input[type="text"] {
    min-width: 200px; }
  @media screen and (max-width: 767px) {
    .navbar-form {
      float: left;
      width: 70%;
      margin-left: 5px;
      margin-right: 5px;
      padding-left: 0;
      padding-right: 0; }
      .navbar-form .input-group {
        width: 70%; }
      .navbar-form input[type="text"] {
        min-width: 150px; } }
  @media screen and (max-width: 640px) {
    .navbar-form {
      display: none; } }

.navbar-nav .icon-menu {
  display: inline-block;
  vertical-align: middle;
  *vertical-align: auto;
  *zoom: 1;
  *display: inline;
  padding-top: 28px;
  padding-bottom: 28px;
  position: relative; }
  .navbar-nav .icon-menu .badge {
    position: absolute;
    top: 22px;
    right: 16px; }

.navbar-nav > li > a {
  padding: 28px 20px; }
  .navbar-nav > li > a > i {
    font-size: 22px;
    margin-right: 2px;
    vertical-align: middle; }
    .navbar-nav > li > a > i.icon-submenu {
      margin-left: 2px;
      margin-right: 0;
      font-size: 10px;
      position: relative;
      top: 2px; }
  .navbar-nav > li > a > span {
    position: relative;
    top: 2px; }
  .navbar-nav > li > a img {
    width: 22px;
    margin-right: 2px; }

.navbar-nav > li > .dropdown-menu {
  padding: 0;
  min-width: 200px; }

.navbar-nav .dropdown-menu {
  border-top: 2px solid #ACB0B5; }

.navbar-nav .dropdown-menu > li > a {
  padding: 10px 20px; }
  .navbar-nav .dropdown-menu > li > a:hover, .navbar-nav .dropdown-menu > li > a:focus {
    background-color: #fafafa; }
  .navbar-nav .dropdown-menu > li > a span,
  .navbar-nav .dropdown-menu > li > a i {
    vertical-align: middle; }

@media screen and (min-width: 768px) {
  .navbar-nav.navbar-right {
    margin-right: 0; } }

@media screen and (max-width: 767px) {
  .navbar-nav {
    width: 100%;
    margin: 0; }
    .navbar-nav > li {
      display: table-cell;
      width: 1%;
      position: inherit;
      text-align: center; }
    .navbar-nav > li > a {
      padding: 15px 20px; }
      .navbar-nav > li > a span:not(.badge),
      .navbar-nav > li > a .icon-submenu {
        display: none; }
    .navbar-nav .open .dropdown-menu {
      -moz-box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
      -webkit-box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
      box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
      position: absolute;
      width: 100%;
      margin-top: 3px;
      background-color: #fff; }
    .navbar-nav .open .dropdown-menu > li > a {
      padding: 10px 15px; }
    .navbar-nav .icon-menu {
      padding-top: 15px;
      padding-bottom: 15px; }
      .navbar-nav .icon-menu .badge {
        top: 10px;
        right: 15px; } }

.navbar-toggle {
  padding: 5px 8px;
  margin: 20px 15px 20px 0; }
  .navbar-toggle .icon-nav {
    font-size: 24px; }

.notification-item .dot {
  -webkit-border-radius: 50%;
  -moz-border-radius: 50%;
  border-radius: 50%;
  display: inline-block;
  vertical-align: middle;
  *vertical-align: auto;
  *zoom: 1;
  *display: inline;
  width: 10px;
  height: 10px;
  content: '';
  margin-right: 8px; }

ul.notifications > li {
  border-bottom: 1px solid #F0F0F0; }
  ul.notifications > li:last-child {
    border-bottom: none; }
  ul.notifications > li > .more {
    padding-top: 12px;
    padding-bottom: 12px;
    text-align: center;
    text-decoration: underline;
    font-weight: 600; }
    ul.notifications > li > .more:hover, ul.notifications > li > .more:focus {
      text-decoration: none; }

.dropdown-menu {
  -moz-box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  -webkit-box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  border-color: #eaeaea; }
  .dropdown-menu > li > a {
    color: #676a6d; }
  .dropdown-menu > li i {
    margin-right: 6px; }
  .dropdown-menu .active > a, .dropdown-menu .active > a:focus, .dropdown-menu .active > a:hover {
    background-color: #00AAFF; }
  .dropdown-menu > .disabled > a, .dropdown-menu > .disabled > a:focus, .dropdown-menu > .disabled > a:hover {
    color: #a3a3a3; }

/********************
 * SIDEBAR NAVIGATION
 ********************/
.sidebar {
  z-index: 9; }
  .sidebar .nav > li > a {
    padding: 18px 30px;
    color: #AEB7C2;
    border-left: 5px solid transparent; }
    .sidebar .nav > li > a:hover, .sidebar .nav > li > a:focus, .sidebar .nav > li > a.active {
      color: #fff;
      background-color: transparent; }
      .sidebar .nav > li > a:hover i, .sidebar .nav > li > a:focus i, .sidebar .nav > li > a.active i {
        color: #00AAFF; }
    .sidebar .nav > li > a:focus, .sidebar .nav > li > a.active {
      background-color: #252c35;
      border-left-color: #00AAFF; }
    .sidebar .nav > li > a[data-toggle="collapse"] .icon-submenu {
      display: inline-block;
      vertical-align: middle;
      *vertical-align: auto;
      *zoom: 1;
      *display: inline;
      -webkit-transition: all 0.2s ease-out;
      -moz-transition: all 0.2s ease-out;
      -ms-transition: all 0.2s ease-out;
      -o-transition: all 0.2s ease-out;
      transition: all 0.2s ease-out;
      float: right;
      position: relative;
      top: 5px;
      font-size: 12px;
      line-height: 1.1;
      -moz-transform: rotate(-90deg);
      -ms-transform: rotate(-90deg);
      -webkit-transform: rotate(-90deg);
      transform: rotate(-90deg); }
    .sidebar .nav > li > a[data-toggle="collapse"].collapsed .icon-submenu {
      -moz-transform: rotate(0deg);
      -ms-transform: rotate(0deg);
      -webkit-transform: rotate(0deg);
      transform: rotate(0deg); }
    .sidebar .nav > li > a .badge {
      font-weight: 400;
      background-color: #F9354C; }
  .sidebar .nav {
    /* submenu */ }
    .sidebar .nav i {
      margin-right: 10px;
      font-size: 18px; }
    .sidebar .nav span {
      -webkit-transition: all 0.3s ease-in-out;
      -moz-transition: all 0.3s ease-in-out;
      -ms-transition: all 0.3s ease-in-out;
      -o-transition: all 0.3s ease-in-out;
      transition: all 0.3s ease-in-out;
      position: relative;
      top: -2px; }
    .sidebar .nav .nav {
      background-color: #252c35; }
      .sidebar .nav .nav > li > a {
        padding-left: 60px;
        padding-top: 10px;
        padding-bottom: 10px; }
        .sidebar .nav .nav > li > a:focus, .sidebar .nav .nav > li > a.active {
          background-color: transparent;
          border-left-color: transparent; }
        .sidebar .nav .nav > li > a.active a {
          color: #fff; }

/********************
 * TYPOGRAPHY
 ********************/
.text-success {
  color: #41B314; }

.text-warning {
  color: #e4cb10; }

.text-danger {
  color: #F9354C; }

ul.list-justify > li {
  margin-bottom: 5px; }
  ul.list-justify > li span {
    float: right; }

/********************
 * INPUTS
 ********************/
.form-control {
  -moz-box-shadow: 0px 1px 2px 0 rgba(0, 0, 0, 0.1);
  -webkit-box-shadow: 0px 1px 2px 0 rgba(0, 0, 0, 0.1);
  box-shadow: 0px 1px 2px 0 rgba(0, 0, 0, 0.1);
  -webkit-border-radius: 2px;
  -moz-border-radius: 2px;
  border-radius: 2px;
  border-color: #eaeaea;
  background-color: #fcfcfc; }
  .form-control:focus {
    -moz-box-shadow: 0px 1px 2px 0 rgba(0, 0, 0, 0.1);
    -webkit-box-shadow: 0px 1px 2px 0 rgba(0, 0, 0, 0.1);
    box-shadow: 0px 1px 2px 0 rgba(0, 0, 0, 0.1);
    border-color: #d6d6d6;
    background-color: #fff; }

.input-group {
  -moz-box-shadow: 0px 1px 2px 0 rgba(0, 0, 0, 0.1);
  -webkit-box-shadow: 0px 1px 2px 0 rgba(0, 0, 0, 0.1);
  box-shadow: 0px 1px 2px 0 rgba(0, 0, 0, 0.1); }

.input-group .form-control, .input-group-addon, .input-group-btn {
  -moz-box-shadow: none;
  -webkit-box-shadow: none;
  box-shadow: none; }

.input-group-addon {
  border: 1px solid #eaeaea; }

/* fancy checkbox and radio button */
.fancy-checkbox {
  display: block;
  font-weight: normal; }
  .fancy-checkbox input[type="checkbox"] {
    display: none; }
    .fancy-checkbox input[type="checkbox"] + span {
      display: inline-block;
      vertical-align: middle;
      *vertical-align: auto;
      *zoom: 1;
      *display: inline;
      cursor: pointer;
      position: relative;
      font-size: 13px; }
      .fancy-checkbox input[type="checkbox"] + span:before {
        display: inline-block;
        vertical-align: middle;
        *vertical-align: auto;
        *zoom: 1;
        *display: inline;
        position: relative;
        bottom: 1px;
        width: 18px;
        height: 18px;
        margin-right: 5px;
        content: "";
        border: 1px solid #ccc; }
    .fancy-checkbox input[type="checkbox"]:checked + span:before {
      font-family: FontAwesome;
      content: '\f00c';
      font-size: 12px;
      color: #99a1a7;
      text-align: center;
      line-height: 16px;
      background: #ededed;
      border: 1px solid #ccc; }
  .fancy-checkbox.custom-color-green input[type="checkbox"]:checked + span:before {
    color: #53D76A;
    background-color: #fff; }
  .fancy-checkbox.custom-bgcolor-green input[type="checkbox"]:checked + span:before {
    color: #fff;
    background-color: #53D76A;
    border-color: #32cf4d; }

.fancy-radio {
  display: block;
  font-weight: normal; }
  .fancy-radio input[type="radio"] {
    display: none; }
    .fancy-radio input[type="radio"] + span {
      display: block;
      cursor: pointer;
      position: relative;
      font-size: 13px; }
      .fancy-radio input[type="radio"] + span i {
        display: inline-block;
        vertical-align: middle;
        *vertical-align: auto;
        *zoom: 1;
        *display: inline;
        -webkit-border-radius: 8px;
        -moz-border-radius: 8px;
        border-radius: 8px;
        position: relative;
        bottom: 1px;
        content: "";
        border: 1px solid #ccc;
        width: 18px;
        height: 18px;
        margin-right: 5px; }
    .fancy-radio input[type="radio"]:checked + span i:after {
      -webkit-border-radius: 50%;
      -moz-border-radius: 50%;
      border-radius: 50%;
      display: block;
      position: relative;
      top: 3px;
      left: 3px;
      content: '';
      width: 10px;
      height: 10px;
      background-color: #99a1a7; }
  .fancy-radio.custom-color-green input[type="radio"]:checked + span i:after {
    background-color: #53D76A; }
  .fancy-radio.custom-bgcolor-green input[type="radio"]:checked + span i {
    background-color: #53D76A; }
    .fancy-radio.custom-bgcolor-green input[type="radio"]:checked + span i:after {
      background-color: #fff; }

/********************
 * BUTTONS
 ********************/
.btn {
  -webkit-border-radius: 2px;
  -moz-border-radius: 2px;
  border-radius: 2px;
  -moz-box-shadow: 0px 1px 2px 0 rgba(0, 0, 0, 0.2);
  -webkit-box-shadow: 0px 1px 2px 0 rgba(0, 0, 0, 0.2);
  box-shadow: 0px 1px 2px 0 rgba(0, 0, 0, 0.2);
  padding: 6px 22px; }

.btn-group-lg > .btn,
.btn-lg {
  padding: 10px 28px; }

.btn-group-sm > .btn,
.btn-sm {
  padding: 5px 18px; }

.btn-group-xs > .btn,
.btn-xs {
  padding: 5px 14px; }

.btn-primary {
  background-color: #00AAFF;
  border-color: #00a0f0; }
  .btn-primary:hover, .btn-primary:focus {
    background-color: #00a0f0;
    border-color: #00a0f0; }

.btn-warning {
  background-color: #e4cb10;
  border-color: #d6be0f; }
  .btn-warning:hover, .btn-warning:focus {
    background-color: #d6be0f;
    border-color: #d6be0f; }

.btn-default:hover, .btn-default:focus {
  background-color: #f7f7f7; }

.btn-success {
  background-color: #41B314;
  border-color: #3ca512; }
  .btn-success:hover, .btn-success:focus {
    background-color: #3ca512;
    border-color: #3ca512; }

.btn.disabled,
.btn[disabled],
fieldset[disabled] .btn {
  opacity: 0.4;
  filter: alpha(opacity=40); }

/********************
 * PANELS
 ********************/
.panel {
  -webkit-border-radius: 3px;
  -moz-border-radius: 3px;
  border-radius: 3px;
  -moz-box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  -webkit-box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  background-color: #fff;
  margin-bottom: 30px; }
  .panel .panel-heading,
  .panel .panel-body,
  .panel .panel-footer {
    padding-left: 25px;
    padding-right: 25px; }
  .panel .panel-heading {
    padding-top: 20px;
    padding-bottom: 20px;
    position: relative; }
    .panel .panel-heading .panel-title {
      margin: 0;
      font-size: 18px;
      font-weight: 300; }
    .panel .panel-heading button {
      padding: 0;
      margin-left: 5px;
      background-color: transparent;
      border: none;
      outline: none; }
      .panel .panel-heading button i {
        font-size: 14px; }
  .panel .panel-body {
    padding-top: 10px;
    padding-bottom: 15px; }
  .panel .panel-note {
    font-size: 13px;
    line-height: 2.6;
    color: #777777; }
    .panel .panel-note i {
      font-size: 16px;
      margin-right: 3px; }
  .panel .right {
    position: absolute;
    right: 20px;
    top: 32%; }
  .panel.panel-headline .panel-heading {
    border-bottom: none; }
    .panel.panel-headline .panel-heading .panel-title {
      margin-bottom: 8px;
      font-size: 22px;
      font-weight: normal; }
    .panel.panel-headline .panel-heading .panel-subtitle {
      margin-bottom: 0;
      font-size: 14px;
      color: #8D99A8; }
  .panel.panel-scrolling .btn-bottom {
    margin-bottom: 30px; }
  .panel .table > thead > tr > td:first-child,
  .panel .table > thead > tr > th:first-child,
  .panel .table > tbody > tr > td:first-child,
  .panel .table > tbody > tr > th:first-child,
  .panel .table > tfoot > tr > td:first-child,
  .panel .table > tfoot > tr > th:first-child {
    padding-left: 25px; }
  .panel .table > thead > tr > td:last-child,
  .panel .table > thead > tr > th:last-child,
  .panel .table > tbody > tr > td:last-child,
  .panel .table > tbody > tr > th:last-child,
  .panel .table > tfoot > tr > td:last-child,
  .panel .table > tfoot > tr > th:last-child {
    padding-left: 25px; }

.panel-footer {
  background-color: #fafafa; }

/********************
 * ELEMENTS
 ********************/
.collapsing {
  -webkit-transition: all 0.2s ease-out;
  -moz-transition: all 0.2s ease-out;
  -ms-transition: all 0.2s ease-out;
  -o-transition: all 0.2s ease-out;
  transition: all 0.2s ease-out; }

.label {
  font-weight: normal; }

.metric {
  -webkit-border-radius: 3px;
  -moz-border-radius: 3px;
  border-radius: 3px;
  padding: 20px;
  margin-bottom: 30px;
  border: 1px solid #DCE6EB; }
  .metric .icon {
    -webkit-border-radius: 50%;
    -moz-border-radius: 50%;
    border-radius: 50%;
    float: left;
    width: 50px;
    height: 50px;
    line-height: 50px;
    background-color: #0081c2;
    text-align: center; }
    .metric .icon i {
      font-size: 18px;
      color: #fff; }
  .metric p {
    margin-bottom: 0;
    line-height: 1.2;
    text-align: right; }
  .metric .number {
    display: block;
    font-size: 28px;
    font-weight: 300; }
  .metric .title {
    font-size: 16px; }

ul.activity-list > li {
  padding: 25px 0; }
  ul.activity-list > li:not(:last-child) {
    border-bottom: 1px solid #F0F0F0; }
  ul.activity-list > li .avatar {
    width: 40px; }
  ul.activity-list > li > p {
    margin-bottom: 0;
    padding-left: 3.5em; }
  ul.activity-list > li .timestamp {
    display: block;
    font-size: 13px;
    color: #a3a3a3; }

/* task list */
.task-list > li {
  margin-bottom: 32px; }

.task-list p {
  position: relative; }
  .task-list p .label-percent {
    position: absolute;
    right: 0; }

/* bootstrap progress bar */
.progress {
  -webkit-border-radius: 2px;
  -moz-border-radius: 2px;
  border-radius: 2px;
  -moz-box-shadow: none;
  -webkit-box-shadow: none;
  box-shadow: none;
  background-color: #f1f1f1; }
  .progress.wide {
    width: 60px; }
  .progress .progress-bar {
    -webkit-transition: width 3s ease;
    -moz-transition: width 3s ease;
    -ms-transition: width 3s ease;
    -o-transition: width 3s ease;
    transition: width 3s ease;
    -moz-box-shadow: none;
    -webkit-box-shadow: none;
    box-shadow: none; }
  .progress.progress-sm {
    height: 12px; }
  .progress.progress-xs {
    height: 5px; }
  .progress.progress-sm .progress-bar, .progress.progress-xs .progress-bar {
    text-indent: -9999px; }

.progress-bar-success {
  background-color: #41B314; }

.progress-bar-warning {
  background-color: #e4cb10; }

.progress-bar-danger {
  background-color: #F9354C; }

.weekly-summary {
  margin-bottom: 30px;
  font-weight: 300; }
  .weekly-summary .number {
    font-size: 36px; }
  .weekly-summary i {
    font-size: 16px;
    margin-left: 10px; }
  .weekly-summary .percentage {
    position: relative;
    top: -7px; }
  .weekly-summary .info-label {
    display: block;
    margin-bottom: 10px;
    font-weight: normal; }

.todo-list > li {
  border-top: 1px solid #F0F0F0;
  position: relative; }
  .todo-list > li:first-child {
    border-top: none; }
  .todo-list > li .fancy-checkbox {
    position: absolute;
    top: 50%;
    margin-top: -11px; }
    .todo-list > li .fancy-checkbox input[type="checkbox"] + span {
      margin-right: 0; }
  .todo-list > li p {
    display: inline-block;
    vertical-align: middle;
    *vertical-align: auto;
    *zoom: 1;
    *display: inline;
    width: 90%;
    margin: 0;
    padding: 20px 0 20px 35px; }
  .todo-list > li.completed p,
  .todo-list > li.completed .date {
    text-decoration: line-through;
    color: #b4b7b9; }

.todo-list .title {
  font-size: 16px;
  font-weight: 600; }

.todo-list .short-description {
  display: block;
  margin-top: 5px; }

.todo-list .date {
  font-size: 13px;
  color: #a3a3a3; }

.todo-list .controls {
  float: right;
  position: absolute;
  top: 50%;
  right: 0;
  margin-top: -11px; }
  .todo-list .controls a {
    margin-left: 5px; }

/* toastr notification */
#toast-container > div {
  opacity: 0.9;
  filter: alpha(opacity=90); }
  #toast-container > div, #toast-container > div:hover {
    -moz-box-shadow: none;
    -webkit-box-shadow: none;
    box-shadow: none; }

#toast-container .toast-close-button {
  top: -0.9em; }

.toast a {
  text-decoration: underline; }
  .toast a:hover, .toast a:focus {
    text-decoration: none;
    color: #fff; }

.toast .toast-message {
  font-size: 14px;
  line-height: 2; }

.toast-info {
  background-color: #00AAFF; }

.toast-success {
  background-color: #41B314; }

.toast-warning {
  background-color: #e4cb10; }

.toast-danger {
  background-color: #F9354C; }

/* tabs */
.custom-tabs-line ul {
  display: inline-block;
  vertical-align: middle;
  *vertical-align: auto;
  *zoom: 1;
  *display: inline; }
  .custom-tabs-line ul > li {
    float: left; }
    .custom-tabs-line ul > li a {
      color: #8d9093;
      font-weight: normal; }
      .custom-tabs-line ul > li a:hover, .custom-tabs-line ul > li a:focus {
        color: #676a6d;
        background-color: transparent; }
      .custom-tabs-line ul > li a:focus {
        outline: none; }
  .custom-tabs-line ul.nav-pills a:hover, .custom-tabs-line ul.nav-pills a:focus {
    color: #fff;
    background-color: #00AAFF; }

.custom-tabs-line.tabs-line-bottom {
  border-bottom: 1px solid #eaeaea; }
  .custom-tabs-line.tabs-line-bottom ul > li {
    margin-bottom: -1px; }
  .custom-tabs-line.tabs-line-bottom a {
    border-bottom: 1px solid transparent; }
  .custom-tabs-line.tabs-line-bottom .active a {
    border-bottom: 2px solid #00AAFF; }

.custom-tabs-line.left-aligned {
  text-align: left; }

.custom-tabs-line.right-aligned {
  text-align: right; }

@media screen and (max-width: 768px) {
  .custom-tabs-line ul li.active > a {
    margin-bottom: -1px; } }

.tab-pane {
  padding: 25px 15px; }

/********************
 * CHARTS
 ********************/
/* easy pie chart */
.easy-pie-chart {
  position: relative;
  width: 110px;
  margin: 0 auto;
  margin-bottom: 15px;
  text-align: center; }
  .easy-pie-chart canvas {
    position: absolute;
    top: 0;
    left: 0; }
  .easy-pie-chart .percent {
    display: inline-block;
    vertical-align: middle;
    *vertical-align: auto;
    *zoom: 1;
    *display: inline;
    line-height: 110px;
    z-index: 2; }
    .easy-pie-chart .percent:after {
      content: '%';
      margin-left: 0.1em;
      font-size: .8em; }
  .easy-pie-chart#system-load {
    width: 130px; }
    .easy-pie-chart#system-load .percent {
      line-height: 128px; }

/********************************
 * AUTHENTICATION FORMS, PAGE
 ********************************/
.auth-box {
  -moz-box-shadow: 1px 2px 10px 0 rgba(0, 0, 0, 0.1);
  -webkit-box-shadow: 1px 2px 10px 0 rgba(0, 0, 0, 0.1);
  box-shadow: 1px 2px 10px 0 rgba(0, 0, 0, 0.1);
  -webkit-border-radius: 5px;
  -moz-border-radius: 5px;
  border-radius: 5px;
  width: 70%;
  height: 450px;
  margin: 0 auto;
  background-color: #fff; }
  .auth-box:before {
    display: inline-block;
    vertical-align: middle;
    *vertical-align: auto;
    *zoom: 1;
    *display: inline;
    content: ' ';
    vertical-align: middle;
    height: 100%; }
  .auth-box .content {
    display: inline-block;
    vertical-align: middle;
    *vertical-align: auto;
    *zoom: 1;
    *display: inline;
    width: 99%;
    vertical-align: middle; }
  .auth-box .left {
    float: left;
    width: 42%;
    height: 100%;
    padding: 0 30px;
    text-align: center; }
    .auth-box .left:before {
      display: inline-block;
      vertical-align: middle;
      *vertical-align: auto;
      *zoom: 1;
      *display: inline;
      content: ' ';
      vertical-align: middle;
      height: 100%; }
  .auth-box .right {
    float: right;
    width: 58%;
    height: 100%;
    position: relative;
    background-image: url("../../assets/img/login-bg.jpg");
    background-repeat: no-repeat;
    background-size: cover; }
    .auth-box .right:before {
      display: inline-block;
      vertical-align: middle;
      *vertical-align: auto;
      *zoom: 1;
      *display: inline;
      content: ' ';
      vertical-align: middle;
      height: 100%; }
    .auth-box .right .text {
      position: relative;
      padding: 0 30px;
      color: #fff; }
    .auth-box .right .heading {
      margin-top: 0;
      margin-bottom: 5px;
      font-size: 26px;
      font-weight: 300; }
    .auth-box .right p {
      margin: 0;
      font-size: 18px;
      font-weight: 300; }
    .auth-box .right .overlay {
      position: absolute;
      top: 0;
      display: block;
      width: 100%;
      height: 100%;
      background: rgba(99, 156, 185, 0.92); }
  .auth-box .header {
    margin-bottom: 30px; }
  .auth-box .lead {
    margin-top: 5px;
    font-size: 18px;
    text-align: center; }
  .auth-box .form-auth-small .btn {
    margin-top: 20px; }
  .auth-box .form-auth-small .element-left {
    float: left; }
  .auth-box .form-auth-small .element-right {
    float: right; }
  .auth-box .form-auth-small .bottom {
    margin-top: 20px;
    text-align: center; }
  .auth-box.lockscreen {
    width: 50%;
    padding: 40px 60px; }
    .auth-box.lockscreen .logo {
      margin-bottom: 30px; }
    .auth-box.lockscreen .user {
      margin-bottom: 30px; }
      .auth-box.lockscreen .user .name {
        font-size: 18px;
        margin-top: 10px; }
  @media screen and (min-width: 1440px) {
    .auth-box.lockscreen {
      width: 35%; } }
  @media screen and (max-width: 1279px) {
    .auth-box {
      width: 90%; }
      .auth-box .left {
        top: 3.3em; } }
  @media screen and (max-width: 1023px) {
    .auth-box .left {
      width: 100%;
      position: inherit;
      padding: 30px; }
    .auth-box .right {
      display: none; } }
  @media screen and (max-width: 992px) {
    .auth-box {
      width: 70%; }
      .auth-box.lockscreen {
        width: 50%;
        padding: 40px 20px; } }
  @media screen and (max-width: 640px) {
    .auth-box {
      width: 90%; }
      .auth-box .content {
        width: 95%; }
      .auth-box.lockscreen {
        width: 90%; } }

/********************
 * HELPERS
 ********************/
.bg-success {
  background-color: #41B314; }

.bg-warning {
  background-color: #e4cb10; }

.bg-danger {
  background-color: #F9354C; }

.no-padding {
  padding: 0 !important; }

.margin-top-30 {
  margin-top: 30px !important; }

.margin-bottom-30 {
  margin-bottom: 30px !important; }

.padding-top-30 {
  padding-top: 30px !important; }

.padding-bottom-30 {
  padding-bottom: 30px !important; }

/********************
 * PAGE: PROFILE
 ********************/
.panel-profile {
  position: relative; }

.profile-left {
  padding-left: 0;
  float: left;
  width: 35%;
  height: 100%;
  position: absolute;
  background-color: #F8F8F8; }

.profile-right {
  float: right;
  width: 65%;
  padding: 20px 25px; }
  .profile-right .heading {
    margin-top: 0; }

@media screen and (max-width: 992px) {
  .profile-left,
  .profile-right {
    float: none;
    width: 100%; }
  .profile-left {
    position: relative;
    margin-bottom: 30px; } }

.profile-header {
  position: relative;
  text-align: center;
  color: #fff; }
  .profile-header .overlay {
    display: block;
    content: "";
    position: absolute;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.2); }
  .profile-header .profile-main {
    position: relative;
    padding: 20px;
    background-image: url("../../assets/img/profile-bg.png");
    background-repeat: no-repeat;
    background-size: cover; }
  .profile-header .name {
    margin: 8px 0 0 0;
    font-size: 22px; }
  .profile-header .online-status {
    font-size: 13px;
    position: relative;
    top: -2px; }
    .profile-header .online-status:before {
      -webkit-border-radius: 50%;
      -moz-border-radius: 50%;
      border-radius: 50%;
      display: inline-block;
      vertical-align: middle;
      *vertical-align: auto;
      *zoom: 1;
      *display: inline;
      content: '';
      width: 8px;
      height: 8px;
      margin-right: 3px; }
    .profile-header .online-status.status-available:before {
      background-color: #41B314; }
  .profile-header .profile-stat {
    position: relative;
    background-color: #00AAFF; }
    .profile-header .profile-stat .stat-item {
      padding: 20px;
      position: relative; }
      .profile-header .profile-stat .stat-item:after {
        content: "";
        display: block;
        position: absolute;
        top: 0;
        right: 0;
        width: 1px;
        height: 100%;
        background-color: #33bbff; }
      .profile-header .profile-stat .stat-item:last-child:after {
        display: none; }
    .profile-header .profile-stat .stat-item span {
      display: block; }
  @media screen and (max-width: 1023px) {
    .profile-header .profile-stat .stat-item:after {
      display: none; } }

.profile-detail {
  padding-bottom: 30px; }

.profile-info {
  padding: 0 20px;
  margin: 40px 0; }
  .profile-info .heading {
    margin: 0 0 10px 0;
    font-weight: 600; }
  .profile-info ul > li {
    margin-bottom: 8px; }

.social-icons {
  margin-bottom: 0; }
  .social-icons > li {
    padding: 0 2px 5px 2px; }
    .social-icons > li > a {
      display: inline-block;
      vertical-align: middle;
      *vertical-align: auto;
      *zoom: 1;
      *display: inline;
      -webkit-border-radius: 3px;
      -moz-border-radius: 3px;
      border-radius: 3px;
      width: 40px;
      height: 40px;
      line-height: 42px;
      text-align: center;
      background-color: #4d4d4d;
      color: #fff; }
      .social-icons > li > a i {
        font-size: 18px; }
      .social-icons > li > a:hover, .social-icons > li > a:focus {
        background-color: #404040; }

/* colored background */
.z500px-bg {
  background-color: #0099e5 !important; }
  .z500px-bg:hover, .z500px-bg:focus {
    background-color: #0088cc !important; }

.about-me-bg {
  background-color: #00405d !important; }
  .about-me-bg:hover, .about-me-bg:focus {
    background-color: #002e44 !important; }

.airbnb-bg {
  background-color: #fd5c63 !important; }
  .airbnb-bg:hover, .airbnb-bg:focus {
    background-color: #fd434b !important; }

.alphabet-bg {
  background-color: #ed1c24 !important; }
  .alphabet-bg:hover, .alphabet-bg:focus {
    background-color: #de1219 !important; }

.amazon-bg {
  background-color: #ff9900 !important; }
  .amazon-bg:hover, .amazon-bg:focus {
    background-color: #e68a00 !important; }

.american-express-bg {
  background-color: #002663 !important; }
  .american-express-bg:hover, .american-express-bg:focus {
    background-color: #001c4a !important; }

.aol-bg {
  background-color: #ff0b00 !important; }
  .aol-bg:hover, .aol-bg:focus {
    background-color: #e60a00 !important; }

.behance-bg {
  background-color: #1769ff !important; }
  .behance-bg:hover, .behance-bg:focus {
    background-color: #0059fd !important; }

.bing-bg {
  background-color: #ffb900 !important; }
  .bing-bg:hover, .bing-bg:focus {
    background-color: #e6a700 !important; }

.bitbucket-bg {
  background-color: #205081 !important; }
  .bitbucket-bg:hover, .bitbucket-bg:focus {
    background-color: #1b436d !important; }

.bitly-bg {
  background-color: #ee6123 !important; }
  .bitly-bg:hover, .bitly-bg:focus {
    background-color: #e65312 !important; }

.blogger-bg {
  background-color: #f57d00 !important; }
  .blogger-bg:hover, .blogger-bg:focus {
    background-color: #dc7000 !important; }

.booking-com-bg {
  background-color: #003580 !important; }
  .booking-com-bg:hover, .booking-com-bg:focus {
    background-color: #002a67 !important; }

.buffer-bg {
  background-color: #168eea !important; }
  .buffer-bg:hover, .buffer-bg:focus {
    background-color: #1380d3 !important; }

.code-school-bg {
  background-color: #616f67 !important; }
  .code-school-bg:hover, .code-school-bg:focus {
    background-color: #55615a !important; }

.codecademy-bg {
  background-color: #f65a5b !important; }
  .codecademy-bg:hover, .codecademy-bg:focus {
    background-color: #f54243 !important; }

.creative-market-bg {
  background-color: #8ba753 !important; }
  .creative-market-bg:hover, .creative-market-bg:focus {
    background-color: #7d964b !important; }

.delicious-bg {
  background-color: #3399ff !important; }
  .delicious-bg:hover, .delicious-bg:focus {
    background-color: #1a8cff !important; }

.deviantart-bg {
  background-color: #05cc47 !important; }
  .deviantart-bg:hover, .deviantart-bg:focus {
    background-color: #04b33e !important; }

.digg-bg {
  background-color: #005be2 !important; }
  .digg-bg:hover, .digg-bg:focus {
    background-color: #0051c9 !important; }

.disqus-bg {
  background-color: #2e9fff !important; }
  .disqus-bg:hover, .disqus-bg:focus {
    background-color: #1593ff !important; }

.django-bg {
  background-color: #092e20 !important; }
  .django-bg:hover, .django-bg:focus {
    background-color: #051911 !important; }

.dribbble-bg {
  background-color: #ea4c89 !important; }
  .dribbble-bg:hover, .dribbble-bg:focus {
    background-color: #e7357a !important; }

.elance-bg {
  background-color: #0d69af !important; }
  .elance-bg:hover, .elance-bg:focus {
    background-color: #0b5b97 !important; }

.envato-bg {
  background-color: #82b541 !important; }
  .envato-bg:hover, .envato-bg:focus {
    background-color: #75a23a !important; }

.etsy-bg {
  background-color: #d5641c !important; }
  .etsy-bg:hover, .etsy-bg:focus {
    background-color: #be5919 !important; }

.facebook-bg {
  background-color: #3b5998 !important; }
  .facebook-bg:hover, .facebook-bg:focus {
    background-color: #344e86 !important; }

.feedly-bg {
  background-color: #2bb24c !important; }
  .feedly-bg:hover, .feedly-bg:focus {
    background-color: #269d43 !important; }

.flattr-bg {
  background-color: #f67c1a !important; }
  .flattr-bg:hover, .flattr-bg:focus {
    background-color: #ed6f09 !important; }

.flickr-bg {
  background-color: #0063dc !important; }
  .flickr-bg:hover, .flickr-bg:focus {
    background-color: #0058c3 !important; }

.flipboard-bg {
  background-color: #e12828 !important; }
  .flipboard-bg:hover, .flipboard-bg:focus {
    background-color: #d21d1d !important; }

.flixster-bg {
  background-color: #2971b2 !important; }
  .flixster-bg:hover, .flixster-bg:focus {
    background-color: #24649d !important; }

.foursquare-bg {
  background-color: #0732a2 !important; }
  .foursquare-bg:hover, .foursquare-bg:focus {
    background-color: #062a8a !important; }

.github-bg {
  background-color: #4183c4 !important; }
  .github-bg:hover, .github-bg:focus {
    background-color: #3876b4 !important; }

.google-bg {
  background-color: #4285f4 !important; }
  .google-bg:hover, .google-bg:focus {
    background-color: #2a75f3 !important; }

.google-plus-bg {
  background-color: #dc4e41 !important; }
  .google-plus-bg:hover, .google-plus-bg:focus {
    background-color: #d83a2b !important; }

.instagram-bg {
  background-color: #3f729b !important; }
  .instagram-bg:hover, .instagram-bg:focus {
    background-color: #386589 !important; }

.kickstarter-bg {
  background-color: #2bde73 !important; }
  .kickstarter-bg:hover, .kickstarter-bg:focus {
    background-color: #20cf67 !important; }

.kik-bg {
  background-color: #82bc23 !important; }
  .kik-bg:hover, .kik-bg:focus {
    background-color: #73a71f !important; }

.lastfm-bg {
  background-color: #d51007 !important; }
  .lastfm-bg:hover, .lastfm-bg:focus {
    background-color: #bc0e06 !important; }

.line-bg {
  background-color: #00c300 !important; }
  .line-bg:hover, .line-bg:focus {
    background-color: #00aa00 !important; }

.linkedin-bg {
  background-color: #0077b5 !important; }
  .linkedin-bg:hover, .linkedin-bg:focus {
    background-color: #00669c !important; }

.mail-ru-bg {
  background-color: #168de2 !important; }
  .mail-ru-bg:hover, .mail-ru-bg:focus {
    background-color: #147fcb !important; }

.mailchimp-bg {
  background-color: #2c9ab7 !important; }
  .mailchimp-bg:hover, .mailchimp-bg:focus {
    background-color: #2789a2 !important; }

.myspace-bg {
  background-color: #000000 !important; }
  .myspace-bg:hover, .myspace-bg:focus {
    background-color: black !important; }

.netflix-bg {
  background-color: #e50914 !important; }
  .netflix-bg:hover, .netflix-bg:focus {
    background-color: #cc0812 !important; }

.ning-bg {
  background-color: #75af42 !important; }
  .ning-bg:hover, .ning-bg:focus {
    background-color: #699c3b !important; }

.path-bg {
  background-color: #ee3423 !important; }
  .path-bg:hover, .path-bg:focus {
    background-color: #e62412 !important; }

.patreon-bg {
  background-color: #e6461a !important; }
  .patreon-bg:hover, .patreon-bg:focus {
    background-color: #d03f17 !important; }

.paypal-bg {
  background-color: #003087 !important; }
  .paypal-bg:hover, .paypal-bg:focus {
    background-color: #00276e !important; }

.photobucket-bg {
  background-color: #0ea0db !important; }
  .photobucket-bg:hover, .photobucket-bg:focus {
    background-color: #0c8ec3 !important; }

.pinterest-bg {
  background-color: #bd081c !important; }
  .pinterest-bg:hover, .pinterest-bg:focus {
    background-color: #a50718 !important; }

.product-hunt-bg {
  background-color: #da552f !important; }
  .product-hunt-bg:hover, .product-hunt-bg:focus {
    background-color: #cb4924 !important; }

.quora-bg {
  background-color: #a82400 !important; }
  .quora-bg:hover, .quora-bg:focus {
    background-color: #8f1f00 !important; }

.rdio-bg {
  background-color: #007dc3 !important; }
  .rdio-bg:hover, .rdio-bg:focus {
    background-color: #006daa !important; }

.reddit-bg {
  background-color: #ff4500 !important; }
  .reddit-bg:hover, .reddit-bg:focus {
    background-color: #e63e00 !important; }

.rss-bg {
  background-color: #f26522 !important; }
  .rss-bg:hover, .rss-bg:focus {
    background-color: #ed560e !important; }

.salesforce-bg {
  background-color: #1798c1 !important; }
  .salesforce-bg:hover, .salesforce-bg:focus {
    background-color: #1486aa !important; }

.scribd-bg {
  background-color: #1a7bba !important; }
  .scribd-bg:hover, .scribd-bg:focus {
    background-color: #176ca4 !important; }

.shopify-bg {
  background-color: #96bf48 !important; }
  .shopify-bg:hover, .shopify-bg:focus {
    background-color: #89b03e !important; }

.skype-bg {
  background-color: #00aff0 !important; }
  .skype-bg:hover, .skype-bg:focus {
    background-color: #009cd7 !important; }

.slack-bg {
  background-color: #6ecadc !important; }
  .slack-bg:hover, .slack-bg:focus {
    background-color: #59c2d7 !important; }

.slideshare-bg {
  background-color: #0077b5 !important; }
  .slideshare-bg:hover, .slideshare-bg:focus {
    background-color: #00669c !important; }

.soundcloud-bg {
  background-color: #ff8800 !important; }
  .soundcloud-bg:hover, .soundcloud-bg:focus {
    background-color: #e67a00 !important; }

.spotify-bg {
  background-color: #2ebd59 !important; }
  .spotify-bg:hover, .spotify-bg:focus {
    background-color: #29a84f !important; }

.squarespace-bg {
  background-color: #222222 !important; }
  .squarespace-bg:hover, .squarespace-bg:focus {
    background-color: #151515 !important; }

.stackoverflow-bg {
  background-color: #fe7a15 !important; }
  .stackoverflow-bg:hover, .stackoverflow-bg:focus {
    background-color: #f86c01 !important; }

.stripe-bg {
  background-color: #00afe1 !important; }
  .stripe-bg:hover, .stripe-bg:focus {
    background-color: #009bc8 !important; }

.stumbleupon-bg {
  background-color: #eb4924 !important; }
  .stumbleupon-bg:hover, .stumbleupon-bg:focus {
    background-color: #e13b15 !important; }

.telegram-bg {
  background-color: #0088cc !important; }
  .telegram-bg:hover, .telegram-bg:focus {
    background-color: #0077b3 !important; }

.tumblr-bg {
  background-color: #35465c !important; }
  .tumblr-bg:hover, .tumblr-bg:focus {
    background-color: #2c3a4c !important; }

.twitch-tv-bg {
  background-color: #6441a5 !important; }
  .twitch-tv-bg:hover, .twitch-tv-bg:focus {
    background-color: #593a93 !important; }

.twitter-bg {
  background-color: #55acee !important; }
  .twitter-bg:hover, .twitter-bg:focus {
    background-color: #3ea1ec !important; }

.vimeo-bg {
  background-color: #162221 !important; }
  .vimeo-bg:hover, .vimeo-bg:focus {
    background-color: #0c1312 !important; }

.vine-bg {
  background-color: #00b488 !important; }
  .vine-bg:hover, .vine-bg:focus {
    background-color: #009b75 !important; }

.wechat-bg {
  background-color: #7bb32e !important; }
  .wechat-bg:hover, .wechat-bg:focus {
    background-color: #6d9f29 !important; }

.whatsapp-bg {
  background-color: #43d854 !important; }
  .whatsapp-bg:hover, .whatsapp-bg:focus {
    background-color: #2ed441 !important; }

.yahoo-bg {
  background-color: #410093 !important; }
  .yahoo-bg:hover, .yahoo-bg:focus {
    background-color: #36007a !important; }

.youtube-bg {
  background-color: #cd201f !important; }
  .youtube-bg:hover, .youtube-bg:focus {
    background-color: #b71d1c !important; }

.profile-right .heading {
  padding-bottom: 10px;
  margin-bottom: 20px;
  border-bottom: 1px solid #eaeaea; }

.awards {
  margin-bottom: 50px; }
  .awards div[class^="col-"] {
    text-align: center; }

.award-item {
  display: inline-block;
  vertical-align: middle;
  *vertical-align: auto;
  *zoom: 1;
  *display: inline;
  text-align: center;
  margin-bottom: 30px; }
  .award-item .hexagon {
    margin: 35px 0; }

.hexagon {
  width: 100px;
  height: 55px;
  background: #ececec;
  position: relative; }
  .hexagon:before {
    content: "";
    position: absolute;
    top: -25px;
    left: 0;
    width: 0;
    height: 0;
    border-left: 50px solid transparent;
    border-right: 50px solid transparent;
    border-bottom: 25px solid #ececec; }
  .hexagon:after {
    content: "";
    position: absolute;
    bottom: -25px;
    left: 0;
    width: 0;
    height: 0;
    border-left: 50px solid transparent;
    border-right: 50px solid transparent;
    border-top: 25px solid #ececec; }

.award-icon {
  font-size: 36px;
  line-height: 1.5em; }

ul.activity-timeline > li {
  margin-bottom: 45px;
  position: relative;
  z-index: 0; }
  ul.activity-timeline > li .activity-icon {
    display: inline-block;
    vertical-align: middle;
    *vertical-align: auto;
    *zoom: 1;
    *display: inline;
    -webkit-border-radius: 30px;
    -moz-border-radius: 30px;
    border-radius: 30px;
    float: left;
    width: 34px;
    height: 34px;
    background-color: #00AAFF;
    font-size: 16px;
    color: #fff;
    line-height: 34px;
    text-align: center;
    margin-right: 10px; }
  ul.activity-timeline > li > p {
    margin-bottom: 0;
    padding-left: 40px; }
  ul.activity-timeline > li .timestamp {
    display: block;
    font-size: .85em;
    color: #a3a3a3; }
  ul.activity-timeline > li:after {
    content: "";
    display: block;
    border-left: 1px solid #eaeaea;
    width: 1px;
    height: 100px;
    position: absolute;
    top: 5px;
    left: 16px;
    z-index: -1; }
  ul.activity-timeline > li:last-child:after {
    display: none; }

.project-table .progress {
  margin-bottom: 0; }

.project-table .progress-bar {
  font-size: 10px; }

.project-table > tbody > tr > td {
  padding: 12px 8px; }
  .project-table > tbody > tr > td .avatar {
    width: 22px;
    border: 1px solid #CCC; }

/*# sourceMappingURL=main.css.map */
.brand-text {
    font-size: 180%;
    padding-left: 16px;
}
/*
    can be used for multi-select

#form-filter .multiselect-native-select {
    margin-top: 2px;
}
#form-filter .input-group {
    margin-left: 20px;
}
#form-filter button {
    border-color: #eaeaea;
    background-color: #fcfcfc;
    padding: 6px 12px 6px 12px;
    border: 1px solid #eaeaea;
    border-radius: 2px;
}
    */
.navbar-btn {
    padding: 26px 0;
}
.navbar-version {
    font-style: italic;
}
.slimScrollDiv {
    padding-top: 20px;
}
.chart-title {
    font-size: 160%;
    margin-bottom: 10px;
}

svg.ct-chart-bar, svg.ct-chart-line {
    overflow: visible;
}

/*
    used to rotate the labels, but it does cause issues with layout
.series-label-45deg .ct-label.ct-label.ct-horizontal.ct-end {
    position: relative;
    justify-content: flex-end;
    text-align: right;
    transform-origin: 100% 0;
    transform: translate(-100%) rotate(-45deg);
    white-space: nowrap;
}
    */
.ct-series-a .ct-line {
    stroke-width: 1px;
}
.ct-series-a .ct-point {
    stroke-width: 6px;
}
#report-count-by-day-chart .ct-label {
    white-space: nowrap;
}
.metric .icon-danger {
    -webkit-border-radius: 50%;
    -moz-border-radius: 50%;
    border-radius: 50%;
    float: left;
    width: 50px;
    height: 50px;
    line-height: 50px;
    background-color: #d9534f;
    text-align: center;
    color: white;
}


text:
<?php

namespace tests\codeception\unit\modules\admin\models;

use app\modules\admin\models\User;
use tests\codeception\fixtures\UserFixture;
use yii\codeception\DbTestCase;
use Codeception\Specify;

/**
 * @property array $users
 */
class UserTest extends DbTestCase
{
    use Specify;

    public function testValidateEmptyNewPassword()
    {
        $model = new User([
            'username' => 'TestName',
            'email' => 'other@example.com',
            'newPassword' => '',
            'newPasswordRepeat' => '',
            'status' => 1,
        ]);

        $model->scenario = User::SCENARIO_ADMIN_CREATE;

        expect('model is not valid', $model->validate())->false();
        expect('new password is required', $model->errors)->hasKey('newPassword');

        $model->scenario = User::SCENARIO_ADMIN_UPDATE;

        expect('model is valid', $model->validate())->true();
    }

    public function testValidateWrongNewPassword()
    {
        $model = new User([
            'username' => 'TestName',
            'email' => 'other@example.com',
            'newPassword' => 'short',
            'newPasswordRepeat' => '',
            'status' => 1,
        ]);

        $model->scenario = User::SCENARIO_ADMIN_CREATE;

        expect('model is not valid', $model->validate())->false();
        expect('password is too short', $model->errors)->hasKey('newPassword');
        expect('password repeat is required', $model->errors)->hasKey('newPasswordRepeat');

        $model = new User([
            'username' => 'TestName',
            'email' => 'other@example.com',
            'newPassword' => 'correct-password',
            'newPasswordRepeat' => 'qwerty',
            'status' => 1,
        ]);

        $model->scenario = User::SCENARIO_ADMIN_CREATE;

        expect('model is not valid', $model->validate())->false();
        expect('new password is correct', $model->errors)->hasntKey('newPassword');
        expect('password repeat is incorrect', $model->errors)->hasKey('newPasswordRepeat');
    }

    public function testValidateCorrectNewPassword()
    {
        $model = new User([
            'username' => 'TestName',
            'email' => 'other@example.com',
            'newPassword' => 'correct-password',
            'newPasswordRepeat' => 'correct-password',
            'status' => 1,
        ]);

        expect('model is valid', $model->validate())->true();
    }

    public function testSaveNewPassword()
    {
        /** @var User $model */
        $model = User::findOne($this->users[0]['id']);

        $model->scenario = User::SCENARIO_ADMIN_UPDATE;
        $model->newPassword = 'new-password';
        $model->newPasswordRepeat = 'new-password';

        expect('model is saved', $model->save())->true();
        expect('password is correct', $model->validatePassword('new-password'))->true();
    }

    /**
     * @param string $scenario
     * @param array $expected
     * @dataProvider getScenarioAttributes
     *
     */
    public function testScenarios($scenario, $expected)
    {
        $model = new User(['scenario' => $scenario]);

        $actual = $model->safeAttributes();

        sort($expected);
        sort($actual);

        expect('safe attributes are correct', $actual)->equals($expected);
    }

    public function getScenarioAttributes()
    {
        return [
            'adminCreate' => ['adminCreate', [
                'username',
                'email',
                'status',
                'newPassword',
                'newPasswordRepeat',
            ]],
            'adminUpdate' => ['adminUpdate', [
                'username',
                'email',
                'status',
                'newPassword',
                'newPasswordRepeat',
            ]],
        ];
    }

    public function fixtures()
    {
        return [
            'users' => UserFixture::className(),
        ];
    }
}


text:
@extends('layout.body')
@section('content')

Dashboard

                                Project Title
                                Created

                                                <form method="post" action="/mindproject/public/project/create">
                                                    <input type="hidden" name="_token" value="{{csrf_token()}}">
                                                    <input type="submit" class="btn btn-primary btn-xs" value="+ New">
                                                </form>

                                                <form method="POST" action="/mindproject/public/project/csv" id="form_import" enctype="multipart/form-data" style="display: inline">
                                                    <input type="hidden" name="_token" value="{{ csrf_token() }}">

                                                        + Import
                                                        <input type="file" name="csvfile" id="csvfile", style="display:none" accept="text/csv" onchange=document.getElementById('form_import').submit();>

                                                </form>

                            @foreach($projects as $project)

                                {{{ $project->title }}}
                                {{{ date_format(new DateTime($project->created_at), 'm/d H:i') }}}

                                                    uuid}}" class="btn btn-success btn-xs">Mindmap

                                                    uuid}}" class="btn btn-success btn-xs">Gantt

                                                    uuid}}" class="btn btn-success btn-xs">Export

                                                    <form method="post" name="form_remove{{$project->id}}" id="form_remove{{$project->id}}" action="/mindproject/public/project/destroy/{{$project->uuid}}">
                                                        <input type="hidden" name="_token" value="{{csrf_token()}}">

                                                        id}}" data-toggle="confirmation">Remove
                                                    </form>

                            @endforeach

@endsection


text:
var Backbone = require('backbone');

Backbone.LocalStorage = require("backbone.localstorage");

exports = module.exports = Backbone.Model.extend({

	localStorage: new Backbone.LocalStorage("badges"),

	defaults: {
		statusUnreadNum: 1,
		messageUnreadNum: 2,
		chatUnreadNum: 3,
	},
});


text:
/// <reference path='fourslash.ts' />

////const foo = /*a*/function/*b*/() {
////    return { x: 1, y: 1 };
////}

goTo.select("a", "b");
edit.applyRefactor({
    refactorName: "Infer function return type",
    actionName: "Infer function return type",
    actionDescription: "Infer function return type",
    newContent:
`const foo = function(): { x: number; y: number; } {
    return { x: 1, y: 1 };
}`
});


text:
using FluentMigrator;

namespace NPloy.Samples.Migrations
{
    [Migration(201311161509)]
    public class M201311161509_AddUsersTable : Migration
    {
        public override void Up()
        {
            Create.Table("Users")
            .WithColumn("Id").AsInt32().NotNullable().PrimaryKey().Identity()
            .WithColumn("Name").AsString(255).NotNullable().WithDefaultValue("Anonymous");
        }

        public override void Down()
        {
            Delete.Table("Users");
        }
    }
}


text:
package com.headkeeper.controller;

import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

public interface DocumentController {

    @PreAuthorize("permitAll()")
    @RequestMapping(value = "/documents/companies/{type}")
    ModelAndView generateCompaniesDocument(@PathVariable String type);

    @PreAuthorize("permitAll()")
    @RequestMapping(value = "/documents/resumes/{type}")
    ModelAndView generateResumesDocument(@PathVariable String type);

    @PreAuthorize("permitAll()")
    @RequestMapping(value = "/documents/salaries/{type}")
    ModelAndView generateSalariesPetitions(@PathVariable String type);

    @PreAuthorize("permitAll()")
    @RequestMapping(value = "/documents/users/{type}")
    ModelAndView generateUsersDocument(@PathVariable String type);

    @PreAuthorize("permitAll()")
    @RequestMapping(value = "/documents/vacancies/{type}")
    ModelAndView generateVacanciesDocument(@PathVariable String type);
}


text:
package io.druid.query.spec;

import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import io.druid.query.Query;
import io.druid.query.QueryRunner;
import io.druid.query.QuerySegmentWalker;
import org.joda.time.Interval;

import java.util.List;

/**
 */
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "type", defaultImpl = LegacySegmentSpec.class)
@JsonSubTypes(value = {
    @JsonSubTypes.Type(name = "intervals", value = MultipleIntervalSegmentSpec.class),
    @JsonSubTypes.Type(name = "segments", value = MultipleSpecificSegmentSpec.class)
})
public interface QuerySegmentSpec
{
  List<Interval> getIntervals();

  <T> QueryRunner<T> lookup(Query<T> query, QuerySegmentWalker walker);
}


text:
@interface CCPackageDownloadManagerTestURLProtocol : NSURLProtocol @end

@implementation CCPackageDownloadManagerTestURLProtocol

+ (BOOL)canInitWithRequest:(NSURLRequest*)theRequest
{
    return [theRequest.URL.scheme caseInsensitiveCompare:@"http"] == NSOrderedSame;
}

+ (NSURLRequest *)canonicalRequestForRequest:(NSURLRequest *)theRequest
{
    return theRequest;
}

- (void)startLoading
{
    // just send back what was received in URL as last path component
    NSString *payload = [self.request.URL lastPathComponent];
    NSData *data = [payload dataUsingEncoding:NSUTF8StringEncoding];

    NSHTTPURLResponse *response;
        response = [[NSHTTPURLResponse alloc] initWithURL:self.request.URL
                                                              statusCode:200
                                                             HTTPVersion:@"HTTP/1.1"
                                                            headerFields:nil];

    id<NSURLProtocolClient> client = [self client];
    [client URLProtocol:self didReceiveResponse:response cacheStoragePolicy:NSURLCacheStorageNotAllowed];
    [client URLProtocol:self didLoadData:data];
    [client URLProtocolDidFinishLoading:self];
}

- (void)stopLoading
{
    // Nothing to do
}

@end

@interface CCPackageDownloadManagerTests : XCTestCase <CCPackageDownloadManagerDelegate>

@property (nonatomic, strong) CCPackageDownloadManager *downloadManager;
@property (nonatomic) BOOL allDownloadsReturned;
@property (nonatomic, copy) NSString *downloadPath;

@end

@implementation CCPackageDownloadManagerTests

- (void)setUp
{
    [super setUp];

    [(AppController *)[UIApplication sharedApplication].delegate configureCocos2d];
    // Stop the normal cocos2d main loop from happening during the tests. We will step it manually.
    [[CCDirector currentDirector] stopRunLoop];

    [NSURLProtocol registerClass:[CCPackageDownloadManagerTestURLProtocol class]];

    self.downloadManager = [[CCPackageDownloadManager alloc] init];
    self.allDownloadsReturned = NO;

    self.downloadPath = [NSTemporaryDirectory() stringByAppendingPathComponent:@"Downloads"];

    [self deleteOldDownloads];

    _downloadManager.downloadPath = _downloadPath;
    _downloadManager.delegate = self;
}

- (void)tearDown
{
    [NSURLProtocol unregisterClass:[CCPackageDownloadManagerTestURLProtocol class]];
    [super tearDown];
}

- (void)deleteOldDownloads
{
    NSFileManager *fileManager = [NSFileManager defaultManager];
    [fileManager removeItemAtPath:_downloadPath error:nil];
}

#pragma mark - Tests

- (void)testSetDownloadPath
{
    NSString *newPath = [NSTemporaryDirectory() stringByAppendingPathComponent:@"NewDownloads"];
    _downloadManager.downloadPath = newPath;

    NSFileManager *fileManager = [NSFileManager defaultManager];
    BOOL isDir;

    XCTAssert([fileManager fileExistsAtPath:newPath isDirectory:&isDir]);
    XCTAssertTrue(isDir);
    XCTAssertEqualObjects(newPath, _downloadManager.downloadPath);
}

- (void)testTwoDownloads
{
    NSArray *packages = @[[self completePackageWithName:@"package1"], [self completePackageWithName:@"package2"]];

    for (CCPackage *aPackage in packages)
    {
        [_downloadManager enqueuePackageForDownload:aPackage];
    }

    [self waitUntilDelegateReturns];

    [self assertPackagesDownloadedAndContentsAreAsExpected:packages];
}

- (void)testCancelDownload
{
    CCPackage *package1 = [self completePackageWithName:@"package1"];

    [_downloadManager enqueuePackageForDownload:package1];
    [_downloadManager cancelDownloadOfPackage:package1];

    // Can't wait for delegate since cancelling won't trigger them
    // Just wait a short amount of time and see if nothing has been written to disk
    [[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeInterval:0.5 sinceDate:[NSDate date]]];

    NSFileManager *fileManager = [NSFileManager defaultManager];
    XCTAssertFalse([fileManager fileExistsAtPath:package1.localDownloadURL.path]);
}

- (void)testPauseAndResumeAllDownloads
{
    NSArray *packages = @[[self completePackageWithName:@"package1"],
                          [self completePackageWithName:@"package2"],
                          [self completePackageWithName:@"package3"]];

    for (CCPackage *aPackage in packages)
    {
        [_downloadManager enqueuePackageForDownload:aPackage];
    }

    [_downloadManager pauseAllDownloads];
    [_downloadManager resumeAllDownloads];

    [self waitUntilDelegateReturns];

    [self assertPackagesDownloadedAndContentsAreAsExpected:packages];
}

- (void)testEnqueuePausedPackage
{
    CCPackage *package1 = [self completePackageWithName:@"package1"];

    [_downloadManager enqueuePackageForDownload:package1];
    [_downloadManager pauseDownloadOfPackage:package1];
    [_downloadManager enqueuePackageForDownload:package1];

    [self waitUntilDelegateReturns];

    [self assertPackagesDownloadedAndContentsAreAsExpected:@[package1]];
}

- (void)testResumeDownloadAfterLoadingPackages
{
    // This test aims at the situation when coming back from persistency and
    // the package manager resume downloads.

    CCPackage *package = [self completePackageWithName:@"package"];
    package.status = CCPackageStatusDownloadPaused;
    package.localDownloadURL = [NSURL fileURLWithPath:[_downloadManager.downloadPath stringByAppendingPathComponent:@"foo.zip"]];

    [_downloadManager enqueuePackageForDownload:package];

    [self waitUntilDelegateReturns];

    [self assertPackagesDownloadedAndContentsAreAsExpected:@[package]];
}

- (void)waitUntilDelegateReturns
{
    while (!_allDownloadsReturned)
    {
        [[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate distantFuture]];
    }
}

#pragma mark - Helpers

- (void)assertPackagesDownloadedAndContentsAreAsExpected:(NSArray *)packages
{
    NSFileManager *fileManager = [NSFileManager defaultManager];
    for (CCPackage *aPackage in packages)
    {
        XCTAssertTrue([fileManager fileExistsAtPath:aPackage.localDownloadURL.path]);
        XCTAssertEqualObjects(aPackage.name, [NSString stringWithContentsOfFile:aPackage.localDownloadURL.path encoding:NSUTF8StringEncoding error:nil]);
    }
}

#pragma mark - Fixtures

- (CCPackage *)completePackageWithName:(NSString *)name
{
    CCPackage *package = [[CCPackage alloc] initWithName:name resolution:@"phonehd" os:@"iOS" remoteURL:[NSURL URLWithString:[NSString stringWithFormat:@"http://package.fake/%@", name]]];
    return package;
}

#pragma mark - CCPackageDownloadManagerDelegate

- (void)downloadFinishedOfPackage:(CCPackage *)package
{
    NSLog(@"%@ finished", package);
    self.allDownloadsReturned =  _downloadManager.allDownloads.count == 0;
}

- (void)downloadFailedOfPackage:(CCPackage *)package error:(NSError *)error
{
    NSLog(@"%@ failed", package);
    self.allDownloadsReturned =  _downloadManager.allDownloads.count == 0;
}

@end


text:
using NUnit.Framework;
using QuantConnect.Commands;
using QuantConnect.Interfaces;
using System;

namespace QuantConnect.Tests.Common.Commands
{
    [TestFixture]
    public class BaseCommandTests
    {
        [Test]
        public void GetsSymbolWhenSymbolIsPresent()
        {
            var command = new TestBaseCommand();
            Assert.DoesNotThrow(() => command.PublicGetSymbol(null, SecurityType.Base, null, Symbols.AAPL));
        }

        [Test]
        public void GetsSymbolWhenTickerSecurityMarketIsPresent()
        {
            var command = new TestBaseCommand();
            Assert.DoesNotThrow(() => command.PublicGetSymbol(Symbols.AAPL.ID.Symbol, SecurityType.Equity, Market.USA));
        }

        [Test]
        public void ReturnSymbolWhenOtherValuesArePresentToo()
        {
            var command = new TestBaseCommand();
            var symbol = command.PublicGetSymbol(Symbols.GOOG.ID.Symbol, SecurityType.Equity, Market.USA, Symbols.AAPL);
            Assert.AreEqual(Symbols.AAPL, symbol);
        }

        [Test]
        public void GetsSymbolThrowsWhenTickerMissing()
        {
            var command = new TestBaseCommand();
            Assert.Throws<ArgumentException>(() =>
                                    command.PublicGetSymbol(null, SecurityType.Equity, Market.USA));
        }

        [Test]
        public void GetsSymbolThrowsWhenSecurityTypeMissing()
        {
            var command = new TestBaseCommand();
            Assert.Throws<ArgumentException>(() =>
                                    command.PublicGetSymbol(Symbols.AAPL.ID.Symbol, SecurityType.Base, Market.USA));
        }

        [Test]
        public void GetsSymbolThrowsWhenMarketMissing()
        {
            var command = new TestBaseCommand();
            Assert.Throws<ArgumentException>(() =>
                                    command.PublicGetSymbol(Symbols.AAPL.ID.Symbol, SecurityType.Equity, null));
        }

        private class TestBaseCommand : BaseCommand
        {
            public Symbol PublicGetSymbol(string ticker, SecurityType securityType, string market, Symbol symbol = null)
            {
                return GetSymbol(ticker, securityType, market, symbol);
            }

            public override CommandResultPacket Run(IAlgorithm algorithm)
            {
                throw new NotImplementedException();
            }
        }
    }
}


text:
medleydb
========

Annotations and Python tools for MedleyDB. [Read the Docs here](http://medleydb.readthedocs.org).

[![Documentation Status](https://readthedocs.org/projects/medleydb/badge/?version=latest)](http://medleydb.readthedocs.io/en/latest/?badge=latest)
[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/marl/medleydb/master/LICENSE.md)
[![PyPI](https://img.shields.io/pypi/pyversions/Django.svg?maxAge=2592000)]()

[![Build Status](https://travis-ci.org/marl/medleydb.svg?branch=medleydb_v1.1)](https://travis-ci.org/marl/medleydb)
[![Coverage Status](https://coveralls.io/repos/github/marl/medleydb/badge.svg?branch=master)](https://coveralls.io/github/marl/medleydb?branch=master)

Maintained by Rachel Bittner rachel (dot) bittner (at) nyu (dot) edu.

This code is released along with [MedleyDB](http://medleydb.weebly.com) and is a component of the work presented in the following publications:

[R. Bittner](https://github.com/rabitt), [J. Salamon](https://github.com/justinsalamon), M. Tierney, M. Mauch, [C. Cannam](https://github.com/cannam) and J. P. Bello,
"[MedleyDB: A Multitrack Dataset for Annotation-Intensive MIR Research](http://marl.smusic.nyu.edu/medleydb_webfiles/bittner_medleydb_ismir2014.pdf)", in
15th International Society for Music Information Retrieval Conference,
Taipei, Taiwan, Oct. 2014.

[R. Bittner](https://github.com/rabitt), [J. Wilkins](https://github.com/jlw365), [H. Yip](https://github.com/hmyip1) and J. P. Bello,
"[MedleyDB 2.0: New Data and a System for Sustainable Data Collection](https://wp.nyu.edu/ismir2016/wp-content/uploads/sites/2294/2016/08/bittner-medleydb.pdf)", in
Proceedings of the 17th International Society for Music Information Retrieval Conference Late Breaking and Demo Papers,
New York City, USA, Aug. 2016.

See Also
========
[MedleyDeBugger](https://github.com/marl/medley-de-bugger)

[MedleyDB Manager](https://github.com/marl/medleydb_manager)

Annotations
===========
As of v1.2, this repository contains the most up to date version of the
medleydb annotations. If you find any problems with an annotation, or would
like to contribute annotations, please report an issue submit a pull request. :)

Setup
=====

First clone this repository:

```bash
git clone https://github.com/marl/medleydb.git
```

Install the package

```bash
cd medleydb
pip install .
```

Next, set the environment variable MEDLEYDB_PATH to the local path where
the MedleyDB directory (or MedleyDB_sample) lives:

```bash
export MEDLEYDB_PATH="path/to/your/copy/of/MedleyDB"
```

To avoid doing this step every time, copy the line above to ```~/.bash_profile```
or ```~/.bashrc```.

Dependencies
------------

* Python, will be installed by pip
  * [librosa](https://bmcfee.github.io/librosa/)
  * [numpy](http://www.numpy.org/)
  * [pyyaml](http://pyyaml.org/)
  * [sox](https://github.com/rabitt/pysox)

If you use homebrew, you can install sox by doing:

```bash
brew install sox  # install the binary
pip install sox  # install the python package
```

Known Issues
============
Known issues with the Audio and Metadata can be found [here](https://github.com/marl/medleydb/blob/master/ERRATA.md).


text:
#ifndef NESTED_MULTIPLE_INCLUDE2_H
#define NESTED_MULTIPLE_INCLUDE2_H

#include "stdlib.h"

/*@
#define ASSERT_TRUE(x) \
   x == true

#define OWNERSHIP(x,y,z) \
   Ownership(x)(y,z)
@*/

/*
  Destructors
*/

/*@

predicate_family OWNERSHIP(void* destructor, void* data, any info);

@*/

typedef void destructor(void* data);
  //@ requires OWNERSHIP(this, data, _);
  //@ ensures emp;

/*
  Stack
*/

struct node
{
  void* data;
  struct node* next;
};

struct stack
{
  struct node* first;
  destructor* destructor;
  int size;
};

#endif


text:
package jse8_impatient.chapter1;

import java.util.Collection;
import java.util.function.Consumer;
import java.util.function.Predicate;

/**
 * Created by tlanders on 11/23/2014.
 *
 * Interface with default method for exercise 9.
 */
interface Collection2<T> extends Collection<T> {
    default void forEachIf(Consumer<T> action, Predicate<T> filter) {
        forEach(obj -> {
            if(filter.test(obj)) {
                action.accept(obj);
            }
        });
    }
}


text:
package com.afollestad.materialdialogs.folderselector;

import android.Manifest;
import android.app.Activity;
import android.app.Dialog;
import android.content.pm.PackageManager;
import android.os.Build;
import android.os.Bundle;
import android.os.Environment;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.annotation.StringRes;
import android.support.v4.app.ActivityCompat;
import android.support.v4.app.DialogFragment;
import android.support.v4.app.Fragment;
import android.support.v7.app.AppCompatActivity;
import android.view.View;

import com.afollestad.materialdialogs.DialogAction;
import com.afollestad.materialdialogs.MaterialDialog;
import com.afollestad.materialdialogs.commons.R;

import java.io.File;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;

/**
 * @author Aidan Follestad (afollestad)
 */
public class FolderChooserDialog extends DialogFragment implements MaterialDialog.ListCallback {

    private final static String TAG = "[MD_FOLDER_SELECTOR]";

    private File parentFolder;
    private File[] parentContents;
    private boolean canGoUp = true;
    private FolderCallback mCallback;

    public interface FolderCallback {
        void onFolderSelection(@NonNull File folder);
    }

    public FolderChooserDialog() {
    }

    String[] getContentsArray() {
        if (parentContents == null) return new String[]{};
        String[] results = new String[parentContents.length + (canGoUp ? 1 : 0)];
        if (canGoUp) results[0] = "...";
        for (int i = 0; i < parentContents.length; i++)
            results[canGoUp ? i + 1 : i] = parentContents[i].getName();
        return results;
    }

    File[] listFiles() {
        File[] contents = parentFolder.listFiles();
        List<File> results = new ArrayList<>();
        if (contents != null) {
            for (File fi : contents) {
                if (fi.isDirectory()) results.add(fi);
            }
            Collections.sort(results, new FolderSorter());
            return results.toArray(new File[results.size()]);
        }
        return null;
    }

    @SuppressWarnings("ConstantConditions")
    @NonNull
    @Override
    public Dialog onCreateDialog(Bundle savedInstanceState) {
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M &&
                ActivityCompat.checkSelfPermission(getActivity(), Manifest.permission.READ_EXTERNAL_STORAGE) !=
                        PackageManager.PERMISSION_GRANTED) {
            return new MaterialDialog.Builder(getActivity())
                    .title(R.string.md_error_label)
                    .content(R.string.md_storage_perm_error)
                    .positiveText(android.R.string.ok)
                    .build();
        }

        if (getArguments() == null || !getArguments().containsKey("builder"))
            throw new IllegalStateException("You must create a FolderChooserDialog using the Builder.");
        if (!getArguments().containsKey("current_path"))
            getArguments().putString("current_path", getBuilder().mInitialPath);
        parentFolder = new File(getArguments().getString("current_path"));
        parentContents = listFiles();
        return new MaterialDialog.Builder(getActivity())
                .title(parentFolder.getAbsolutePath())
                .items(getContentsArray())
                .itemsCallback(this)
                .onPositive(new MaterialDialog.SingleButtonCallback() {
                    @Override
                    public void onClick(@NonNull MaterialDialog dialog, @NonNull DialogAction which) {
                        dialog.dismiss();
                        mCallback.onFolderSelection(parentFolder);
                    }
                })
                .onNegative(new MaterialDialog.SingleButtonCallback() {
                    @Override
                    public void onClick(@NonNull MaterialDialog dialog, @NonNull DialogAction which) {
                        dialog.dismiss();
                    }
                })
                .autoDismiss(false)
                .positiveText(getBuilder().mChooseButton)
                .negativeText(getBuilder().mCancelButton)
                .build();
    }

    @Override
    public void onSelection(MaterialDialog materialDialog, View view, int i, CharSequence s) {
        if (canGoUp && i == 0) {
            parentFolder = parentFolder.getParentFile();
            canGoUp = parentFolder.getParent() != null;
        } else {
            parentFolder = parentContents[canGoUp ? i - 1 : i];
            canGoUp = true;
        }
        parentContents = listFiles();
        MaterialDialog dialog = (MaterialDialog) getDialog();
        dialog.setTitle(parentFolder.getAbsolutePath());
        getArguments().putString("current_path", parentFolder.getAbsolutePath());
        dialog.setItems(getContentsArray());
    }

    @Override
    public void onAttach(Activity activity) {
        super.onAttach(activity);
        mCallback = (FolderCallback) activity;
    }

    public void show(AppCompatActivity context) {
        Fragment frag = context.getSupportFragmentManager().findFragmentByTag(TAG);
        if (frag != null) {
            ((DialogFragment) frag).dismiss();
            context.getSupportFragmentManager().beginTransaction()
                    .remove(frag).commit();
        }
        show(context.getSupportFragmentManager(), TAG);
    }

    public static class Builder implements Serializable {

        @NonNull
        protected final transient AppCompatActivity mContext;
        @StringRes
        protected int mChooseButton;
        @StringRes
        protected int mCancelButton;
        protected String mInitialPath;

        public <ActivityType extends AppCompatActivity & FolderCallback> Builder(@NonNull ActivityType context) {
            mContext = context;
            mChooseButton = R.string.md_choose_label;
            mCancelButton = android.R.string.cancel;
            mInitialPath = Environment.getExternalStorageDirectory().getAbsolutePath();
        }

        @NonNull
        public Builder chooseButton(@StringRes int text) {
            mChooseButton = text;
            return this;
        }

        @NonNull
        public Builder cancelButton(@StringRes int text) {
            mCancelButton = text;
            return this;
        }

        @NonNull
        public Builder initialPath(@Nullable String initialPath) {
            if (initialPath == null)
                initialPath = File.separator;
            mInitialPath = initialPath;
            return this;
        }

        @NonNull
        public FolderChooserDialog build() {
            FolderChooserDialog dialog = new FolderChooserDialog();
            Bundle args = new Bundle();
            args.putSerializable("builder", this);
            dialog.setArguments(args);
            return dialog;
        }

        @NonNull
        public FolderChooserDialog show() {
            FolderChooserDialog dialog = build();
            dialog.show(mContext);
            return dialog;
        }
    }

    @SuppressWarnings("ConstantConditions")
    @NonNull
    private Builder getBuilder() {
        return (Builder) getArguments().getSerializable("builder");
    }

    private static class FolderSorter implements Comparator<File> {
        @Override
        public int compare(File lhs, File rhs) {
            return lhs.getName().compareTo(rhs.getName());
        }
    }
}