text:
from django import forms

from django.forms import TextInput, Textarea
from django.contrib.auth.models import User

from .models import Instructor, CodeSnippet

class UserForm(forms.ModelForm):
    password = forms.CharField(widget=forms.PasswordInput(
        attrs={'class': 'form-control', 'name': 'password', 'placeholder': 'Password'}))

    class Meta:
        model = User
        fields = [
            "username",
            "password",
        ]
        widgets = {
            "username": TextInput(attrs={'class': 'form-control', 'name': 'username', 'placeholder': 'Username'}),
        }

class InstructorForm(forms.ModelForm):

    class Meta:
        model = Instructor
        fields = []

class SnippetForm(forms.ModelForm):

    class Meta:
        model = CodeSnippet
        fields = [
            "title",
            "code",
        ]
        widgets = {
            "title": TextInput(attrs={'class': 'form-control', 'placeholder': 'Title (not required)'}),
            "code": Textarea(attrs={'class': 'form-control', 'placeholder': 'Enter code here'}),
        }

redpajama_set_name: RedPajamaGithub


text:
import { h } from 'preact'
import { friendlyKeyboardEventString } from 'lib/keys'

export default ({ binding, physicalKeys, ignoreModifierKeys }) => (

    {binding.map(keyboardEvent => (

        {friendlyKeyboardEventString(
          keyboardEvent,
          physicalKeys,
          ignoreModifierKeys
        )}

    ))}

)


text:
/**
 * Created by steven on 3/1/16.
 */
'use strict';

/**
 * @param {string} s
 * @return {number}
 */
var lengthOfLongestSubstring = function(s) {
    var maxLength = 0;
    var left, right;
    if (s.length < 2) return s.length;
    for (left = 0, right = 1; right < s.length; right++) {
        var searchedIndex = s.lastIndexOf(s[right], right - 1)//search backward from before current right index.
        if (searchedIndex > -1) {
            /*
             If search, then point left index to searched index's next.
             */
            maxLength = Math.max(maxLength, right - left);
            left = Math.max(left, searchedIndex + 1);// 'abba' ---> when checking 'ba', searchedIndex = 0, which is < left.
        }
    }// after the loop, right === ss.length
    return Math.max(maxLength, right - left);
};

console.log(lengthOfLongestSubstring("abba"));


text:
The component uses Google Maps API to fetch the locations. It uses [Awesomplete](http://leaverou.github.io/awesomplete/) as a hard dependency for the dropdown.

Check out the demo [here](http://krasimir.github.io/react-place).

![react-place](http://work.krasimirtsonev.com/react-place/react-place.gif)

## Installation

```
npm install react-place
```

## Dependencies

* Of course [react](https://www.npmjs.com/package/react) and [react-dom](https://www.npmjs.com/package/react-dom). You need to have these modules installed.
* [Awesomplete](http://leaverou.github.io/awesomplete/) - installed automatically while running `npm install react-place`. It comes with the component so you don't need to have it loaded on the page.
* Google Maps API - you have to add `<script src="//maps.googleapis.com/maps/api/js?v=3.exp&signed_in=true&libraries=places"></script>` to your page to have the component working.

## Usage (ES6)

```js
import React from 'react';
import ReactDOM from 'react-dom';
import Location from 'react-place';

var location;
var container = document.querySelector('...');

var onLocationSet = (data) => {
  // data.description
  // data.coords.lat
  // data.coords.lng
};

location = ReactDOM.render(
  <Location
    country='US'
    noMatching='Sorry, I can not find {{value}}.'
    onLocationSet={ onLocationSet }
    inputProps={{
      style: {color: '#0099FF'},
      className:'location',
      placeholder: 'Where are your?'
    }}
    />,
  container
);
```

## Usage ES5 (with bundling)

```js
var React = require('react');
var ReactDOM = require('react-dom');
var Location = require('react-place');
var createLocation = React.createFactory(Location);

function onLocationSet (data) {
  // data.description
  // data.coords.lat
  // data.coords.lng
}

var container = document.querySelector('#container');
var LocationComp = createLocation({
  country: country.value,
  noMatching: 'Sorry, I can not find {{value}}.',
  onLocationSet: onLocationSet,
  inputProps={{
    style: {color: '#0099FF'},
    className:'location',
    placeholder: 'Where are your?'
  }}
});

var location = ReactDOM.render(LocationComp, container);
```

If you need to update the country dynamically use the following API:

```js
location.updateCountry('FR');
```

## Usage ES5 (no bundling)

Download [react-place.min.js](https://github.com/krasimir/react-place/blob/master/build/react-place.min.js) file and add it to your page.

```js
<script src="//maps.googleapis.com/maps/api/js?v=3.exp&signed_in=true&libraries=places"></script>
<script src="https://fb.me/react-0.14.3.js"></script>
<script src="https://fb.me/react-dom-0.14.3.js"></script>
<script src="react-place.min.js"></script>
<script>

  var createLocation = React.createFactory(ReactPlace);

  function onLocationSet(data) {
    // data.description
    // data.coords.lat
    // data.coords.lng
  }

  window.onload = function () {
    var container = document.querySelector('...');
    var LocationComp = createLocation({
      country: country.value,
      noMatching: 'Sorry, I can not find {{value}}.',
      onLocationSet: onLocationSet,
      inputProps={{
        style: {color: '#0099FF'},
        className:'location',
        placeholder: 'Where are your?'
      }}
    });
    var l = ReactDOM.render(LocationComp, container);
  };

</script>
```

## Testing

```
npm run test
```

## Powered by Google API

![powered by google](./assets/powered_by_google.png)


text:
"""Constants for the ViCare integration."""
import enum

from homeassistant.components.sensor import SensorDeviceClass
from homeassistant.const import ENERGY_KILO_WATT_HOUR, VOLUME_CUBIC_METERS, Platform

DOMAIN = "vicare"

PLATFORMS = [
    Platform.BUTTON,
    Platform.CLIMATE,
    Platform.SENSOR,
    Platform.BINARY_SENSOR,
    Platform.WATER_HEATER,
]

VICARE_DEVICE_CONFIG = "device_conf"
VICARE_API = "api"
VICARE_NAME = "ViCare"

CONF_CIRCUIT = "circuit"
CONF_HEATING_TYPE = "heating_type"

DEFAULT_SCAN_INTERVAL = 60

VICARE_CUBIC_METER = "cubicMeter"
VICARE_KWH = "kilowattHour"

VICARE_UNIT_TO_DEVICE_CLASS = {
    VICARE_KWH: SensorDeviceClass.ENERGY,
    VICARE_CUBIC_METER: SensorDeviceClass.GAS,
}

VICARE_UNIT_TO_UNIT_OF_MEASUREMENT = {
    VICARE_KWH: ENERGY_KILO_WATT_HOUR,
    VICARE_CUBIC_METER: VOLUME_CUBIC_METERS,
}

class HeatingType(enum.Enum):
    """Possible options for heating type."""

    auto = "auto"
    gas = "gas"
    oil = "oil"
    pellets = "pellets"
    heatpump = "heatpump"
    fuelcell = "fuelcell"
    hybrid = "hybrid"

DEFAULT_HEATING_TYPE = HeatingType.auto

HEATING_TYPE_TO_CREATOR_METHOD = {
    HeatingType.auto: "asAutoDetectDevice",
    HeatingType.gas: "asGazBoiler",
    HeatingType.fuelcell: "asFuelCell",
    HeatingType.heatpump: "asHeatPump",
    HeatingType.oil: "asOilBoiler",
    HeatingType.pellets: "asPelletsBoiler",
    HeatingType.hybrid: "asHybridDevice",
}


text:
from pybbix.api import API

class Hostgroup(API):
    pass


text:
require File.dirname(__FILE__) + '/../../test_helper'

class DeckTest < Test::Unit::TestCase
  def test_not_nil_cards
    deck = Deck.new()
    for i in 0..deck.length-1
      assert deck.pop()!=nil
    end
    deck.pop()
    deck.pop()
    deck.pop()
    deck.shuffle()
    for i in 0..deck.length-1
      assert deck.pop()!=nil
    end
  end
end


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

<META http-equiv="Content-Type" content="text/html; charset=utf-8">
<TITLE>
接口 java.security.cert.CertStoreParameters 的使用 (Java Platform SE 6)
</TITLE>

<META NAME="date" CONTENT="2007-03-19">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">

      概述
      软件包
      类
    使用
      树
      已过时
      索引
      帮助

JavaTM Platform
Standard Ed. 6

 上一个
 下一个

  框架
 无框架

  所有类

接口 java.security.cert.CertStoreParameters
的使用

使用 CertStoreParameters 的软件包

java.security.cert
提供用于解析和管理证书、证书撤消列表 (CRL) 和证书路径的类和接口。

java.security.cert 中 CertStoreParameters 的使用

实现 CertStoreParameters 的 java.security.cert 中的类

 class
CollectionCertStoreParameters

          用作 Collection CertStore 算法输入的参数。

 class
LDAPCertStoreParameters

          用作 LDAP CertStore 算法的输入的参数。

返回 CertStoreParameters 的 java.security.cert 中的方法

 CertStoreParameters
CertStore.getCertStoreParameters()

          返回初始化此 CertStore 所用的参数。

参数类型为 CertStoreParameters 的 java.security.cert 中的方法

static CertStore
CertStore.getInstance(String type,
            CertStoreParameters params)

          返回一个实现指定 CertStore 类型,并已使用指定参数初始化的 CertStore 对象。

static CertStore
CertStore.getInstance(String type,
            CertStoreParameters params,
            Provider provider)

          返回一个实现指定 CertStore 类型的 CertStore 对象。

static CertStore
CertStore.getInstance(String type,
            CertStoreParameters params,
            String provider)

          返回一个实现指定 CertStore 类型的 CertStore 对象。

参数类型为 CertStoreParameters 的 java.security.cert 中的构造方法

CertStore(CertStoreSpi storeSpi,
          Provider provider,
          String type,
          CertStoreParameters params)

          创建一个给定类型的 CertStore 对象,并在其中封装给定提供者实现(SPI 对象)。

CertStoreSpi(CertStoreParameters params)

          唯一的构造方法。

      概述
      软件包
      类
    使用
      树
      已过时
      索引
      帮助

JavaTM Platform
Standard Ed. 6

 上一个
 下一个

  框架
 无框架

  所有类

提交错误或意见
有关更多的 API 参考资料和开发人员文档,请参阅 Java SE 开发人员文档。该文档包含更详细的、面向开发人员的描述,以及总体概述、术语定义、使用技巧和工作代码示例。
版权所有 2007 Sun Microsystems, Inc. 保留所有权利。 请遵守许可证条款。另请参阅文档重新分发政策。


text:
class Logger
{
	static std::set<DWORD> _filter;
	static bool _inclusiveFiltering;
	static CRITICAL_SECTION csec;
	static bool _initialized;
	static int _indentLevel;

	//Methods
	static int log(const TCHAR * format, va_list args);
	static void printTabs();
	static void print(const TCHAR* str);
public:

	static void SetFilterMode(bool inclusiveFiltering);
	static void AddFilter(DWORD msg);
	static void RemoveFilter(DWORD msg);
	static void ResetFilter();
	static void Log( const MSG& msg );
	static void Log(const TCHAR* fmt, ...);
	static void Enter(const TCHAR* fmt, ...);
	static void Exit(const TCHAR* fmt, ...);
};


text:
```
Record the blog building process and share some articles about tech and daily life👨💻
```


text:
package org.wso2.carbon.uuf.internal;

import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceRegistration;
import org.osgi.service.component.annotations.Activate;
import org.osgi.service.component.annotations.Component;
import org.osgi.service.component.annotations.Deactivate;
import org.osgi.service.component.annotations.Reference;
import org.osgi.service.component.annotations.ReferenceCardinality;
import org.osgi.service.component.annotations.ReferencePolicy;
import org.osgi.util.tracker.ServiceTracker;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.wso2.carbon.kernel.startupresolver.RequiredCapabilityListener;
import org.wso2.carbon.uuf.api.Server;
import org.wso2.carbon.uuf.core.App;
import org.wso2.carbon.uuf.exception.UUFException;
import org.wso2.carbon.uuf.internal.deployment.AppDeployer;
import org.wso2.carbon.uuf.internal.deployment.DeploymentNotifier;
import org.wso2.carbon.uuf.internal.io.ArtifactAppDeployer;
import org.wso2.carbon.uuf.spi.HttpConnector;
import org.wso2.carbon.uuf.spi.HttpRequest;
import org.wso2.carbon.uuf.spi.HttpResponse;
import org.wso2.carbon.uuf.spi.RenderableCreator;

import java.util.HashSet;
import java.util.Set;

import static org.wso2.carbon.uuf.spi.HttpResponse.STATUS_BAD_REQUEST;
import static org.wso2.carbon.uuf.spi.HttpResponse.STATUS_INTERNAL_SERVER_ERROR;
import static org.wso2.carbon.uuf.spi.HttpResponse.STATUS_NOT_FOUND;

@Component(name = "org.wso2.carbon.uuf.internal.UUFServer",
           service = RequiredCapabilityListener.class,
           immediate = true,
           property = {
                   "componentName=wso2-uuf-server"
           }
)
public class UUFServer implements Server, RequiredCapabilityListener {

    private static final boolean DEV_MODE_ENABLED = Boolean.getBoolean("devmode");
    private static final Logger LOGGER = LoggerFactory.getLogger(UUFServer.class);

    private final String appRepositoryPath;
    private final Set<RenderableCreator> renderableCreators;
    private final RequestDispatcher requestDispatcher;
    private AppDeployer appDeployer;
    private DeploymentNotifier deploymentNotifier;
    private BundleContext bundleContext;
    private ServiceRegistration serverServiceRegistration;

    public UUFServer() {
        this(null);
    }

    public UUFServer(String appRepositoryPath) {
        this.appRepositoryPath = appRepositoryPath;
        this.renderableCreators = new HashSet<>();
        this.requestDispatcher = new RequestDispatcher();
    }

    /**
     * This bind method is invoked by OSGi framework whenever a new RenderableCreator is registered.
     *
     * @param renderableCreator registered renderable creator
     */
    @Reference(name = "renderableCreator",
               service = RenderableCreator.class,
               cardinality = ReferenceCardinality.AT_LEAST_ONE,
               policy = ReferencePolicy.DYNAMIC,
               unbind = "unsetRenderableCreator")
    public void setRenderableCreator(RenderableCreator renderableCreator) {
        if (!renderableCreators.add(renderableCreator)) {
            throw new IllegalArgumentException(
                    "A RenderableCreator for '" + renderableCreator.getSupportedFileExtensions() +
                            "' extensions is already registered");
        }
        LOGGER.info("RenderableCreator '{}' registered for {} extensions.",
                    renderableCreator.getClass().getName(), renderableCreator.getSupportedFileExtensions());
    }

    /**
     * This bind method is invoked by OSGi framework whenever a RenderableCreator is left.
     *
     * @param renderableCreator unregistered renderable creator
     */
    public void unsetRenderableCreator(RenderableCreator renderableCreator) {
        renderableCreators.remove(renderableCreator);
        LOGGER.info("RenderableCreator '{}' unregistered for {} extensions.",
                    renderableCreator.getClass().getName(), renderableCreator.getSupportedFileExtensions());
        if (appDeployer != null) {
            /* We have created the 'appDeployer' with the removed RenderableCreator. So we need to create it again
            without the removed RenderableCreator. */
            appDeployer = createAppDeployer();
        }
    }

    @Activate
    protected void activate(BundleContext bundleContext) {
        this.bundleContext = bundleContext;
        LOGGER.debug("UUF Server activated.");
    }

    @Deactivate
    protected void deactivate(BundleContext bundleContext) {
        stop();
        this.bundleContext = null;
        deploymentNotifier = null;
        serverServiceRegistration.unregister();
        LOGGER.debug("UUF Server deactivated.");
    }

    @Override
    public void onAllRequiredCapabilitiesAvailable() {
        deploymentNotifier = new WhiteboardDeploymentNotifier(bundleContext);
        appDeployer = createAppDeployer();
        LOGGER.debug("ArtifactAppDeployer is ready.");

        serverServiceRegistration = bundleContext.registerService(Server.class, this, null);
        LOGGER.info("'{}' registered as a Server.", getClass().getName());
    }

    private AppDeployer createAppDeployer() {
        return (appRepositoryPath == null) ?
                new ArtifactAppDeployer(renderableCreators) :
                new ArtifactAppDeployer(appRepositoryPath, renderableCreators);
    }

    @Override
    public void serve(HttpRequest request, HttpResponse response) {
        if (!request.isValid()) {
            requestDispatcher.serveDefaultErrorPage(STATUS_BAD_REQUEST, "Invalid URI '" + request.getUri() + "'.",
                                                    response);
            return;
        }
        if (request.isDefaultFaviconRequest()) {
            requestDispatcher.serveDefaultFavicon(request, response);
            return;
        }

        App app = null;
        try {
            app = appDeployer.getApp(request.getContextPath());
        } catch (UUFException e) {
            String msg = "A server error occurred while serving for request '" + request + "'.";
            LOGGER.error(msg, e);
            requestDispatcher.serveDefaultErrorPage(STATUS_INTERNAL_SERVER_ERROR, msg, response);
        } catch (Exception e) {
            String msg = "An unexpected error occurred while serving for request '" + request + "'.";
            LOGGER.error(msg, e);
            requestDispatcher.serveDefaultErrorPage(STATUS_INTERNAL_SERVER_ERROR, msg, response);
        }

        if (app != null) {
            requestDispatcher.serve(app, request, response);
        } else {
            requestDispatcher.serveDefaultErrorPage(STATUS_NOT_FOUND, "Cannot find an app for context path '" +
                    request.getContextPath() + "'.", response);
        }
    }

    public void start() {
        Set<String> deployedAppContextPaths = appDeployer.deploy();
        deploymentNotifier.notify(deployedAppContextPaths);
    }

    public void stop() {
        renderableCreators.clear();
        appDeployer = null;
    }

    public static boolean isDevModeEnabled() {
        return DEV_MODE_ENABLED;
    }

    private static class WhiteboardDeploymentNotifier extends DeploymentNotifier {

        private final ServiceTracker serviceTracker;

        public WhiteboardDeploymentNotifier(BundleContext bundleContext) {
            serviceTracker = new ServiceTracker<HttpConnector, HttpConnector>(bundleContext, HttpConnector.class, null);
            serviceTracker.open();
        }

        @Override
        protected Set<HttpConnector> getHttpConnectors() {
            Set<HttpConnector> rv = new HashSet<>();
            for (Object service : serviceTracker.getServices()) {
                rv.add((HttpConnector) service);
            }
            return rv;
        }
    }
}


text:
class Record
  include MotionModel::Model
  include MotionModel::ArrayModelAdapter

  columns value:       :string,
          timestamp:    :integer,
          updated_at:   :date,
          created_at:   :date

  belongs_to :item
end


text:
RELEASE_LEVELS = [ALPHA, BETA, RELEASE_CANDIDATE, FINAL] = ['alpha', 'beta', 'candidate', 'final']
RELEASE_LEVELS_DISPLAY = {ALPHA: ALPHA,
                          BETA: BETA,
                          RELEASE_CANDIDATE: 'rc',
                          FINAL: ''}

# version_info format: (MAJOR, MINOR, MICRO, RELEASE_LEVEL, SERIAL)
# inspired by Python's own sys.version_info, in order to be
# properly comparable using normal operarors, for example:
#  (6,1,0,'beta',0) < (6,1,0,'candidate',1) < (6,1,0,'candidate',2)
#  (6,1,0,'candidate',2) < (6,1,0,'final',0) < (6,1,2,'final',0)
version_info = (7, 0, 0, FINAL, 0)
version = '.'.join(map(str, version_info[:2])) + RELEASE_LEVELS_DISPLAY[version_info[3]] + str(version_info[4] or '')
serie = major_version = '.'.join(map(str, version_info[:2]))

description = 'OpenERP Server'
long_desc = '''OpenERP is a complete ERP and CRM. The main features are accounting (analytic
and financial), stock management, sales and purchases management, tasks
automation, marketing campaigns, help desk, POS, etc. Technical features include
a distributed server, flexible workflows, an object database, a dynamic GUI,
customizable reports, and XML-RPC interfaces.
'''
classifiers = """Development Status :: 5 - Production/Stable
License :: OSI Approved :: GNU Affero General Public License v3
Programming Language :: Python
"""
url = 'http://www.openerp.com'
author = 'OpenERP S.A.'
author_email = 'info@openerp.com'
license = 'AGPL-3'

nt_service_name = "openerp-server-" + serie

# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
version = "7.0-20140804-231303"
# server bzr version: 5309 launchpad_translations_on_behalf_of_openerp-20140716072409-wijb1d3b0wd2e0xf on lp:~openerp/openobject-server/7.0
# addons bzr version: 10089 launchpad_translations_on_behalf_of_openerp-20140730065814-d652vrlyybkexlr7 on lp:~openerp/openobject-addons/7.0
# web bzr version: 4192 launchpad_translations_on_behalf_of_openerp-20140628060331-s8nn8uui6wbczpsj on lp:~openerp/openerp-web/7.0


text:
<?php

// autoload_namespaces.php @generated by Composer

$vendorDir = dirname(dirname(__FILE__));
$baseDir = dirname($vendorDir);

return array(
    'Twig_' => array($vendorDir . '/twig/twig/lib'),
    'Symfony\\Component\\Console\\' => array($vendorDir . '/symfony/console'),
    'Embera' => array($vendorDir . '/mpratt/embera/Lib'),
    'Cygnite' => array($vendorDir . '/cygnite/framework/src'),
);


text:
from flask import Flask
from flask import request
from flask import render_template
from jinjabread.functions import render_state
from jinjabread.functions import filehandler
from jinjabread.config import config

conf = config()
app = Flask(__name__)

@app.route('/',         methods=['GET', 'POST'])
@app.route('/<linkid>', methods=['GET', 'POST'])
def index(linkid=""):

    output = ""

    if request.method == 'POST':
        linkid=""
        form_data = dict(request.form)

        output = render_state.mash(
                        form_data['grains'][0],
                        form_data['pillar'][0],
                        form_data['state'][0])

        if 'save' in form_data.keys():
            filehandler.save_content(form_data, conf)

    else:
        form_data = render_state.dummydata

    if linkid and request.method != "POST":
        form_data = filehandler.load_content(linkid)

        if not form_data:
            linkid = ""

    history = filehandler.get_history(conf)

    if history:
        current_link = history[0]
    else:
        current_link = ""

    return render_template(
                'index.html',
                formdata     = form_data,
                output       = output,
                shareable    = conf['link_history_enabled'],
                history      = history,
                current_link = current_link
                )

if __name__ == '__main__':
    app.run(host='0.0.0.0', debug=True)


text:
git submodule init
git submodule update

path=`pwd`

cd $path/lib/python-bitcoinlib/
python3 setup.py install

cd $path/lib/bottle/
python3 setup.py install


text:
#include "ModelBasePlugin.h"
#include "SelfTest/src/SelfTestSuite.h"
#include "test_nodes/BinaryNode.h"
#include "test_nodes/PositionExtension.h"
#include "model/TreeManager.h"
#include "nodes/Integer.h"

namespace Model {

TEST(ModelBasePlugin, PositionExtension)
{
	auto root = new TestNodes::BinaryNode();
	TreeManager manager(root);

	CHECK_CONDITION(root->hasAttribute("_ext_PositionExtension_x"));
	CHECK_CONDITION(root->hasAttribute("_ext_PositionExtension_y"));

	TestNodes::PositionExtension* pos = root->extension<TestNodes::PositionExtension>();

	CHECK_INT_EQUAL( 0, pos->x() );
	CHECK_INT_EQUAL( 0, pos->y() );

	manager.beginModification(root, "Setting values");
	pos->setX(42);
	pos->setY(-18);
	manager.endModification();

	CHECK_INT_EQUAL( 42, pos->x() );
	CHECK_INT_EQUAL( -18, pos->y() );
}

}


text:
import re

from django import forms, template
from django.contrib import admin
from django.contrib.admin import helpers
from django.contrib.admin.util import unquote
from django.db import models
from django.db.models import loading
from django.forms.formsets import all_valid
from django.forms.models import modelform_factory, inlineformset_factory
from django.http import HttpResponseRedirect, HttpResponse, Http404
from django.shortcuts import render_to_response
from django.utils.encoding import force_unicode
from django.utils.functional import curry
from django.utils.translation import ugettext as _

from feincms import settings
from feincms.models import Region

FRONTEND_EDITING_MATCHER = re.compile(r'(\d+)/(\w+)/(\d+)')

class ItemEditorForm(forms.ModelForm):
    region = forms.CharField(widget=forms.HiddenInput())
    ordering = forms.IntegerField(widget=forms.HiddenInput())

class ItemEditor(admin.ModelAdmin):
    """
    This ModelAdmin class needs an attribute:

    show_on_top::
        A list of fields which should be displayed at the top of the form.
        This does not need to (and should not) include ``template''
    """

    def _formfield_callback(self, request):
        if settings.DJANGO10_COMPAT:
            # This should compare for Django SVN before [9761] (From 2009-01-16),
            # but I don't care that much. Doesn't work with git checkouts anyway, so...
            return self.formfield_for_dbfield
        else:
            return curry(self.formfield_for_dbfield, request=request)

    def _frontend_editing_view(self, request, cms_id, content_type, content_id):
        """
        This view is used strictly for frontend editing -- it is not used inside the
        standard administration interface.

        The code in feincms/templates/admin/feincms/fe_tools.html knows how to call
        this view correctly.
        """

        try:
            model_cls = loading.get_model(self.model._meta.app_label, content_type)
            obj = model_cls.objects.get(parent=cms_id, id=content_id)
        except:
            raise Http404

        form_class_base = getattr(model_cls, 'feincms_item_editor_form', ItemEditorForm)

        ModelForm = modelform_factory(model_cls,
            exclude=('parent', 'region', 'ordering'),
            form=form_class_base,
            formfield_callback=self._formfield_callback(request=request))

        # we do not want to edit these two fields in the frontend editing mode; we are
        # strictly editing single content blocks there.
        # We have to remove them from the form because we explicitly redefined them in
        # the ItemEditorForm definition above. Just using exclude is not enough.
        del ModelForm.base_fields['region']
        del ModelForm.base_fields['ordering']

        if request.method == 'POST':
            # The prefix is used to replace the formset identifier from the ItemEditor
            # interface. Customization of the form is easily possible through either matching
            # the prefix (frontend editing) or the formset identifier (ItemEditor) as it is
            # done in the richtext and mediafile init.html item editor includes.
            form = ModelForm(request.POST, instance=obj, prefix=content_type)

            if form.is_valid():
                obj = form.save()

                return render_to_response('admin/feincms/fe_editor_done.html', {
                    'content': obj.render(request=request),
                    'identifier': obj.fe_identifier(),
                    'MEDIA_PATH': settings.MEDIA_PATH,
                    'MEDIA_HOTLINKING': settings.MEDIA_HOTLINKING,
                    })
        else:
            form = ModelForm(instance=obj, prefix=content_type)

        return render_to_response('admin/feincms/fe_editor.html', {
            'frontend_editing': True,
            'title': _('Change %s') % force_unicode(model_cls._meta.verbose_name),
            'object': obj,
            'form': form,
            'is_popup': True,
            'media': self.media,
            'MEDIA_PATH': settings.MEDIA_PATH,
            'MEDIA_HOTLINKING': settings.MEDIA_HOTLINKING,
            }, context_instance=template.RequestContext(request,
                processors=self.model.feincms_item_editor_context_processors))

    def change_view(self, request, object_id, extra_context=None):
        self.model._needs_content_types()

        # Recognize frontend editing requests
        # This is done here so that the developer does not need to add additional entries to
        # urls.py or something...
        res = FRONTEND_EDITING_MATCHER.search(object_id)

        if res:
            return self._frontend_editing_view(request, res.group(1), res.group(2), res.group(3))

        ModelForm = modelform_factory(self.model, exclude=('parent',),
            formfield_callback=self._formfield_callback(request=request),
            form=self.form)

        # generate a formset type for every concrete content type
        inline_formset_types = [(
            content_type,
            inlineformset_factory(self.model, content_type, extra=1,
                form=getattr(content_type, 'feincms_item_editor_form', ItemEditorForm),
                formfield_callback=self._formfield_callback(request=request))
            ) for content_type in self.model._feincms_content_types]

        opts = self.model._meta
        try:
            obj = self.model._default_manager.get(pk=unquote(object_id))
        except self.model.DoesNotExist:
            raise Http404

        if not self.has_change_permission(request, obj):
            raise PermissionDenied

        if request.method == 'POST':
            model_form = ModelForm(request.POST, request.FILES, instance=obj)

            inline_formsets = [
                formset_class(request.POST, request.FILES, instance=obj,
                    prefix=content_type.__name__.lower())
                for content_type, formset_class in inline_formset_types]

            if model_form.is_valid() and all_valid(inline_formsets):
                model_form.save()
                for formset in inline_formsets:
                    formset.save()

                msg = _('The %(name)s "%(obj)s" was changed successfully.') % {'name': force_unicode(opts.verbose_name), 'obj': force_unicode(obj)}
                if request.POST.has_key("_continue"):
                    self.message_user(request, msg + ' ' + _("You may edit it again below."))
                    return HttpResponseRedirect('.')
                elif request.POST.has_key('_addanother'):
                    self.message_user(request, msg + ' ' + (_("You may add another %s below.") % force_unicode(opts.verbose_name)))
                    return HttpResponseRedirect("../add/")
                else:
                    self.message_user(request, msg)
                    return HttpResponseRedirect("../")
        else:
            model_form = ModelForm(instance=obj)
            inline_formsets = [
                formset_class(instance=obj, prefix=content_type.__name__.lower())
                for content_type, formset_class in inline_formset_types]

        # Prepare mapping of content types to their prettified names
        content_types = []
        for content_type in self.model._feincms_content_types:
            content_name = content_type._meta.verbose_name
            content_types.append((content_name, content_type.__name__.lower()))

        context = {}

        if hasattr(self.model, '_feincms_templates'):
            if 'template_key' not in self.show_on_top:
                self.show_on_top = ['template_key'] + list(self.show_on_top)

            context['available_templates'] = self.model._feincms_templates

        context.update({
            'title': _('Change %s') % force_unicode(opts.verbose_name),
            'opts': opts,
            'object': obj,
            'object_form': model_form,
            'inline_formsets': inline_formsets,
            'content_types': content_types,
            'top_fields': [model_form[field] for field in self.show_on_top],
            'settings_fields': [field for field in model_form if field.name not in self.show_on_top],
            'media': self.media + model_form.media,
            'errors': helpers.AdminErrorList(model_form, inline_formsets),
            'MEDIA_PATH': settings.MEDIA_PATH,
            'MEDIA_HOTLINKING': settings.MEDIA_HOTLINKING,
        })

        return self.render_item_editor(request, obj, context)

    def render_item_editor(self, request, object, context):
        opts = self.model._meta
        return render_to_response([
            'admin/feincms/%s/%s/item_editor.html' % (opts.app_label, opts.object_name.lower()),
            'admin/feincms/%s/item_editor.html' % opts.app_label,
            'admin/feincms/item_editor.html',
            ], context, context_instance=template.RequestContext(request,
                processors=self.model.feincms_item_editor_context_processors))


text:
/**
 * Makes optimally sized margins according to font size
 */
/*!
 * Theme - Nanostrap 0.1
 * https://github.com/viktorbezdek/nanostrap
 * --------------------------------------------------------------------------------
 * Forked from:
 * Bootstrap v3.1.1 (http://getbootstrap.com)
 * Copyright 2011-2014 Twitter, Inc.
 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
 */

.btn-default,
.btn-primary,
.btn-success,
.btn-info,
.btn-warning,
.btn-danger {
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 1px rgba(0, 0, 0, 0.075);
}
.btn-default:active,
.btn-primary:active,
.btn-success:active,
.btn-info:active,
.btn-warning:active,
.btn-danger:active,
.btn-default.active,
.btn-primary.active,
.btn-success.active,
.btn-info.active,
.btn-warning.active,
.btn-danger.active {
  box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
}
.btn:active,
.btn.active {
  background-image: none;
}
.btn-default {
  background-image: -webkit-linear-gradient(top, #ffffff 0%, #e0e0e0 100%);
  background-image: linear-gradient(to bottom, #ffffff 0%, #e0e0e0 100%);
  filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe0e0e0', GradientType=0);
  filter: progid: DXImageTransform.Microsoft.gradient(enabled=false);
  background-repeat: repeat-x;
  border-color: #dbdbdb;
  text-shadow: 0 1px 0 #fff;
  border-color: #ccc;
}
.btn-default:hover,
.btn-default:focus {
  background-color: #e0e0e0;
  background-position: 0 -15px;
}
.btn-default:active,
.btn-default.active {
  background-color: #e0e0e0;
  border-color: #dbdbdb;
}
.btn-primary {
  background-image: -webkit-linear-gradient(top, #428bca 0%, #2d6ca2 100%);
  background-image: linear-gradient(to bottom, #428bca 0%, #2d6ca2 100%);
  filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff2d6ca2', GradientType=0);
  filter: progid: DXImageTransform.Microsoft.gradient(enabled=false);
  background-repeat: repeat-x;
  border-color: #2b669a;
}
.btn-primary:hover,
.btn-primary:focus {
  background-color: #2d6ca2;
  background-position: 0 -15px;
}
.btn-primary:active,
.btn-primary.active {
  background-color: #2d6ca2;
  border-color: #2b669a;
}
.btn-success {
  background-image: -webkit-linear-gradient(top, #5cb85c 0%, #419641 100%);
  background-image: linear-gradient(to bottom, #5cb85c 0%, #419641 100%);
  filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff419641', GradientType=0);
  filter: progid: DXImageTransform.Microsoft.gradient(enabled=false);
  background-repeat: repeat-x;
  border-color: #3e8f3e;
}
.btn-success:hover,
.btn-success:focus {
  background-color: #419641;
  background-position: 0 -15px;
}
.btn-success:active,
.btn-success.active {
  background-color: #419641;
  border-color: #3e8f3e;
}
.btn-info {
  background-image: -webkit-linear-gradient(top, #5bc0de 0%, #2aabd2 100%);
  background-image: linear-gradient(to bottom, #5bc0de 0%, #2aabd2 100%);
  filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2aabd2', GradientType=0);
  filter: progid: DXImageTransform.Microsoft.gradient(enabled=false);
  background-repeat: repeat-x;
  border-color: #28a4c9;
}
.btn-info:hover,
.btn-info:focus {
  background-color: #2aabd2;
  background-position: 0 -15px;
}
.btn-info:active,
.btn-info.active {
  background-color: #2aabd2;
  border-color: #28a4c9;
}
.btn-warning {
  background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #eb9316 100%);
  background-image: linear-gradient(to bottom, #f0ad4e 0%, #eb9316 100%);
  filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffeb9316', GradientType=0);
  filter: progid: DXImageTransform.Microsoft.gradient(enabled=false);
  background-repeat: repeat-x;
  border-color: #e38d13;
}
.btn-warning:hover,
.btn-warning:focus {
  background-color: #eb9316;
  background-position: 0 -15px;
}
.btn-warning:active,
.btn-warning.active {
  background-color: #eb9316;
  border-color: #e38d13;
}
.btn-danger {
  background-image: -webkit-linear-gradient(top, #d9534f 0%, #c12e2a 100%);
  background-image: linear-gradient(to bottom, #d9534f 0%, #c12e2a 100%);
  filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc12e2a', GradientType=0);
  filter: progid: DXImageTransform.Microsoft.gradient(enabled=false);
  background-repeat: repeat-x;
  border-color: #b92c28;
}
.btn-danger:hover,
.btn-danger:focus {
  background-color: #c12e2a;
  background-position: 0 -15px;
}
.btn-danger:active,
.btn-danger.active {
  background-color: #c12e2a;
  border-color: #b92c28;
}
.thumbnail,
.img-thumbnail {
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075);
}
.dropdown-menu > li > a:hover,
.dropdown-menu > li > a:focus {
  background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);
  background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%);
  background-repeat: repeat-x;
  filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);
  background-color: #e8e8e8;
}
.dropdown-menu > .active > a,
.dropdown-menu > .active > a:hover,
.dropdown-menu > .active > a:focus {
  background-image: -webkit-linear-gradient(top, #428bca 0%, #357ebd 100%);
  background-image: linear-gradient(to bottom, #428bca 0%, #357ebd 100%);
  background-repeat: repeat-x;
  filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff357ebd', GradientType=0);
  background-color: #357ebd;
}
.navbar-default {
  background-image: -webkit-linear-gradient(top, #ffffff 0%, #f8f8f8 100%);
  background-image: linear-gradient(to bottom, #ffffff 0%, #f8f8f8 100%);
  background-repeat: repeat-x;
  filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff8f8f8', GradientType=0);
  filter: progid: DXImageTransform.Microsoft.gradient(enabled=false);
  border-radius: 4px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 5px rgba(0, 0, 0, 0.075);
}
.navbar-default .navbar-nav > .active > a {
  background-image: -webkit-linear-gradient(top, #ebebeb 0%, #f3f3f3 100%);
  background-image: linear-gradient(to bottom, #ebebeb 0%, #f3f3f3 100%);
  background-repeat: repeat-x;
  filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff3f3f3', GradientType=0);
  box-shadow: inset 0 3px 9px rgba(0, 0, 0, 0.075);
}
.navbar-brand,
.navbar-nav > li > a {
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.25);
}
.navbar-inverse {
  background-image: -webkit-linear-gradient(top, #3c3c3c 0%, #222222 100%);
  background-image: linear-gradient(to bottom, #3c3c3c 0%, #222222 100%);
  background-repeat: repeat-x;
  filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0);
  filter: progid: DXImageTransform.Microsoft.gradient(enabled=false);
}
.navbar-inverse .navbar-nav > .active > a {
  background-image: -webkit-linear-gradient(top, #222222 0%, #282828 100%);
  background-image: linear-gradient(to bottom, #222222 0%, #282828 100%);
  background-repeat: repeat-x;
  filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#ff222222', endColorstr='#ff282828', GradientType=0);
  box-shadow: inset 0 3px 9px rgba(0, 0, 0, 0.25);
}
.navbar-inverse .navbar-brand,
.navbar-inverse .navbar-nav > li > a {
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
}
.navbar-static-top,
.navbar-fixed-top,
.navbar-fixed-bottom {
  border-radius: 0;
}
.alert {
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 2px rgba(0, 0, 0, 0.05);
}
.alert-success {
  background-image: -webkit-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%);
  background-image: linear-gradient(to bottom, #dff0d8 0%, #c8e5bc 100%);
  background-repeat: repeat-x;
  filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffc8e5bc', GradientType=0);
  border-color: #b2dba1;
}
.alert-info {
  background-image: -webkit-linear-gradient(top, #d9edf7 0%, #b9def0 100%);
  background-image: linear-gradient(to bottom, #d9edf7 0%, #b9def0 100%);
  background-repeat: repeat-x;
  filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffb9def0', GradientType=0);
  border-color: #9acfea;
}
.alert-warning {
  background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%);
  background-image: linear-gradient(to bottom, #fcf8e3 0%, #f8efc0 100%);
  background-repeat: repeat-x;
  filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fff8efc0', GradientType=0);
  border-color: #f5e79e;
}
.alert-danger {
  background-image: -webkit-linear-gradient(top, #f2dede 0%, #e7c3c3 100%);
  background-image: linear-gradient(to bottom, #f2dede 0%, #e7c3c3 100%);
  background-repeat: repeat-x;
  filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffe7c3c3', GradientType=0);
  border-color: #dca7a7;
}
.progress {
  background-image: -webkit-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%);
  background-image: linear-gradient(to bottom, #ebebeb 0%, #f5f5f5 100%);
  background-repeat: repeat-x;
  filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff5f5f5', GradientType=0);
}
.progress-bar {
  background-image: -webkit-linear-gradient(top, #428bca 0%, #3071a9 100%);
  background-image: linear-gradient(to bottom, #428bca 0%, #3071a9 100%);
  background-repeat: repeat-x;
  filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff3071a9', GradientType=0);
}
.progress-bar-success {
  background-image: -webkit-linear-gradient(top, #5cb85c 0%, #449d44 100%);
  background-image: linear-gradient(to bottom, #5cb85c 0%, #449d44 100%);
  background-repeat: repeat-x;
  filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff449d44', GradientType=0);
}
.progress-bar-info {
  background-image: -webkit-linear-gradient(top, #5bc0de 0%, #31b0d5 100%);
  background-image: linear-gradient(to bottom, #5bc0de 0%, #31b0d5 100%);
  background-repeat: repeat-x;
  filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff31b0d5', GradientType=0);
}
.progress-bar-warning {
  background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #ec971f 100%);
  background-image: linear-gradient(to bottom, #f0ad4e 0%, #ec971f 100%);
  background-repeat: repeat-x;
  filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffec971f', GradientType=0);
}
.progress-bar-danger {
  background-image: -webkit-linear-gradient(top, #d9534f 0%, #c9302c 100%);
  background-image: linear-gradient(to bottom, #d9534f 0%, #c9302c 100%);
  background-repeat: repeat-x;
  filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc9302c', GradientType=0);
}
.list-group {
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075);
}
.list-group-item.active,
.list-group-item.active:hover,
.list-group-item.active:focus {
  text-shadow: 0 -1px 0 #3071a9;
  background-image: -webkit-linear-gradient(top, #428bca 0%, #3278b3 100%);
  background-image: linear-gradient(to bottom, #428bca 0%, #3278b3 100%);
  background-repeat: repeat-x;
  filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff3278b3', GradientType=0);
  border-color: #3278b3;
}
.panel {
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.panel-default > .panel-heading {
  background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);
  background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%);
  background-repeat: repeat-x;
  filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);
}
.panel-primary > .panel-heading {
  background-image: -webkit-linear-gradient(top, #428bca 0%, #357ebd 100%);
  background-image: linear-gradient(to bottom, #428bca 0%, #357ebd 100%);
  background-repeat: repeat-x;
  filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff357ebd', GradientType=0);
}
.panel-success > .panel-heading {
  background-image: -webkit-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%);
  background-image: linear-gradient(to bottom, #dff0d8 0%, #d0e9c6 100%);
  background-repeat: repeat-x;
  filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffd0e9c6', GradientType=0);
}
.panel-info > .panel-heading {
  background-image: -webkit-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%);
  background-image: linear-gradient(to bottom, #d9edf7 0%, #c4e3f3 100%);
  background-repeat: repeat-x;
  filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffc4e3f3', GradientType=0);
}
.panel-warning > .panel-heading {
  background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%);
  background-image: linear-gradient(to bottom, #fcf8e3 0%, #faf2cc 100%);
  background-repeat: repeat-x;
  filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fffaf2cc', GradientType=0);
}
.panel-danger > .panel-heading {
  background-image: -webkit-linear-gradient(top, #f2dede 0%, #ebcccc 100%);
  background-image: linear-gradient(to bottom, #f2dede 0%, #ebcccc 100%);
  background-repeat: repeat-x;
  filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffebcccc', GradientType=0);
}
.well {
  background-image: -webkit-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%);
  background-image: linear-gradient(to bottom, #e8e8e8 0%, #f5f5f5 100%);
  background-repeat: repeat-x;
  filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#ffe8e8e8', endColorstr='#fff5f5f5', GradientType=0);
  border-color: #dcdcdc;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 0 rgba(255, 255, 255, 0.1);
}
/*!
 * Theme - Nanostrap 0.1
 * https://github.com/viktorbezdek/nanostrap
 * --------------------------------------------------------------------------------
 * Forked from:
 * Bootstrap v3.1.1 (http://getbootstrap.com)
 * Copyright 2011-2014 Twitter, Inc.
 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
 */
/*! normalize.css v3.0.0 | MIT License | git.io/normalize */

html {
  -ms-text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
}
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
main,
nav,
section,
summary {
  display: block;
}
audio,
canvas,
progress,
video {
  display: inline-block;
  vertical-align: baseline;
}
audio:not([controls]) {
  display: none;
  height: 0;
}
[hidden],
template {
  display: none;
}
a {
  background: transparent;
}
a:active,
a:hover {
  outline: 0;
}
abbr[title] {
  border-bottom: 1px dotted;
}
b,
strong {
  font-weight: bold;
}
dfn {
  font-style: italic;
}
h1 {
  font-size: 2em;
  margin: 0.67em 0;
}
mark {
  background: #ff0;
  color: #000;
}
small {
  font-size: 80%;
}
sub,
sup {
  font-size: 75%;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}
sup {
  top: -0.5em;
}
sub {
  bottom: -0.25em;
}
img {
  border: 0;
}
svg:not(:root) {
  overflow: hidden;
}
figure {
  margin: 1em 40px;
}
hr {
  -moz-box-sizing: content-box;
  box-sizing: content-box;
  height: 0;
}
pre {
  overflow: auto;
}
code,
kbd,
pre,
samp {
  font-family: monospace, monospace;
  font-size: 1em;
}
button,
input,
optgroup,
select,
textarea {
  color: inherit;
  font: inherit;
  margin: 0;
}
button {
  overflow: visible;
}
button,
select {
  text-transform: none;
}
button,
html input[type="button"],
input[type="reset"],
input[type="submit"] {
  -webkit-appearance: button;
  cursor: pointer;
}
button[disabled],
html input[disabled] {
  cursor: default;
}
button::-moz-focus-inner,
input::-moz-focus-inner {
  border: 0;
  padding: 0;
}
input {
  line-height: normal;
}
input[type="checkbox"],
input[type="radio"] {
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  padding: 0;
}
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  height: auto;
}
input[type="search"] {
  -webkit-appearance: textfield;
  -moz-box-sizing: content-box;
  box-sizing: content-box;
}
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration {
  -webkit-appearance: none;
}
fieldset {
  border: 1px solid #c0c0c0;
  margin: 0 2px;
  padding: 0.35em 0.625em 0.75em;
}
legend {
  border: 0;
  padding: 0;
}
textarea {
  overflow: auto;
}
optgroup {
  font-weight: bold;
}
table {
  border-collapse: collapse;
  border-spacing: 0;
}
td,
th {
  padding: 0;
}
* {
  -moz-box-sizing: border-box;
  box-sizing: border-box;
}
*:before,
*:after {
  -moz-box-sizing: border-box;
  box-sizing: border-box;
}
html {
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
input,
button,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}
a {
  color: #428bca;
  text-decoration: none;
}
a:hover,
a:focus {
  color: #2a6496;
  text-decoration: underline;
}
a:focus {
  outline: thin dotted;
  outline: 5px auto -webkit-focus-ring-color;
  outline-offset: -2px;
}
figure {
  margin: 0;
}
img {
  vertical-align: middle;
}
.img-responsive {
  display: block;
  max-width: 100%;
  height: auto;
}
.img-rounded {
  border-radius: 6px;
}
.img-thumbnail {
  padding: 4px;
  line-height: 1.42857143;
  background-color: #ffffff;
  border: 1px solid #dddddd;
  border-radius: 4px;
  -webkit-transition: all 0.2s ease-in-out;
  transition: all 0.2s ease-in-out;
  display: inline-block;
  max-width: 100%;
  height: auto;
}
.img-circle {
  border-radius: 50%;
}
hr {
  margin-top: 20px;
  margin-bottom: 20px;
  border: 0;
  border-top: 1px solid #eeeeee;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
fieldset {
  padding: 0;
  margin: 0;
  border: 0;
  min-width: 0;
}
legend {
  display: block;
  width: 100%;
  padding: 0;
  margin-bottom: 20px;
  font-size: 21px;
  line-height: inherit;
  color: #333333;
  border: 0;
  border-bottom: 1px solid #e5e5e5;
}
label {
  display: inline-block;
  margin-bottom: 5px;
  font-weight: bold;
}
input[type="search"] {
  -moz-box-sizing: border-box;
  box-sizing: border-box;
}
input[type="radio"],
input[type="checkbox"] {
  margin: 4px 0 0;
  margin-top: 1px \9;
  /* IE8-9 */

  line-height: normal;
}
input[type="file"] {
  display: block;
}
input[type="range"] {
  display: block;
  width: 100%;
}
select[multiple],
select[size] {
  height: auto;
}
input[type="file"]:focus,
input[type="radio"]:focus,
input[type="checkbox"]:focus {
  outline: thin dotted;
  outline: 5px auto -webkit-focus-ring-color;
  outline-offset: -2px;
}
output {
  display: block;
  padding-top: 7px;
  font-size: 14px;
  line-height: 1.42857143;
  color: #555555;
}
.form-control {
  display: block;
  width: 100%;
  height: 34px;
  padding: 6px 12px;
  font-size: 14px;
  line-height: 1.42857143;
  color: #555555;
  background-color: #ffffff;
  background-image: none;
  border: 1px solid #cccccc;
  border-radius: 4px;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
  -webkit-transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
  transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
}
.form-control:focus {
  border-color: #66afe9;
  outline: 0;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(102, 175, 233, 0.6);
}
.form-control::-moz-placeholder {
  color: #999999;
  opacity: 1;
}
.form-control:-ms-input-placeholder {
  color: #999999;
}
.form-control::-webkit-input-placeholder {
  color: #999999;
}
.form-control[disabled],
.form-control[readonly],
fieldset[disabled] .form-control {
  cursor: not-allowed;
  background-color: #eeeeee;
  opacity: 1;
}
textarea.form-control {
  height: auto;
}
input[type="search"] {
  -webkit-appearance: none;
}
input[type="date"] {
  line-height: 34px;
}
.form-group {
  margin-bottom: 15px;
}
.radio,
.checkbox {
  display: block;
  min-height: 20px;
  margin-top: 10px;
  margin-bottom: 10px;
  padding-left: 20px;
}
.radio label,
.checkbox label {
  display: inline;
  font-weight: normal;
  cursor: pointer;
}
.radio input[type="radio"],
.radio-inline input[type="radio"],
.checkbox input[type="checkbox"],
.checkbox-inline input[type="checkbox"] {
  float: left;
  margin-left: -20px;
}
.radio + .radio,
.checkbox + .checkbox {
  margin-top: -5px;
}
.radio-inline,
.checkbox-inline {
  display: inline-block;
  padding-left: 20px;
  margin-bottom: 0;
  vertical-align: middle;
  font-weight: normal;
  cursor: pointer;
}
.radio-inline + .radio-inline,
.checkbox-inline + .checkbox-inline {
  margin-top: 0;
  margin-left: 10px;
}
input[type="radio"][disabled],
input[type="checkbox"][disabled],
.radio[disabled],
.radio-inline[disabled],
.checkbox[disabled],
.checkbox-inline[disabled],
fieldset[disabled] input[type="radio"],
fieldset[disabled] input[type="checkbox"],
fieldset[disabled] .radio,
fieldset[disabled] .radio-inline,
fieldset[disabled] .checkbox,
fieldset[disabled] .checkbox-inline {
  cursor: not-allowed;
}
.input-sm {
  height: 30px;
  padding: 5px 10px;
  font-size: 12px;
  line-height: 1.5;
  border-radius: 3px;
}
select.input-sm {
  height: 30px;
  line-height: 30px;
}
textarea.input-sm,
select[multiple].input-sm {
  height: auto;
}
.input-lg {
  height: 46px;
  padding: 10px 16px;
  font-size: 18px;
  line-height: 1.33;
  border-radius: 6px;
}
select.input-lg {
  height: 46px;
  line-height: 46px;
}
textarea.input-lg,
select[multiple].input-lg {
  height: auto;
}
.has-feedback {
  position: relative;
}
.has-feedback .form-control {
  padding-right: 42.5px;
}
.has-feedback .form-control-feedback {
  position: absolute;
  top: 25px;
  right: 0;
  display: block;
  width: 34px;
  height: 34px;
  line-height: 34px;
  text-align: center;
}
.has-success .help-block,
.has-success .control-label,
.has-success .radio,
.has-success .checkbox,
.has-success .radio-inline,
.has-success .checkbox-inline {
  color: #3c763d;
}
.has-success .form-control {
  border-color: #3c763d;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
}
.has-success .form-control:focus {
  border-color: #2b542c;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #67b168;
}
.has-success .input-group-addon {
  color: #3c763d;
  border-color: #3c763d;
  background-color: #dff0d8;
}
.has-success .form-control-feedback {
  color: #3c763d;
}
.has-warning .help-block,
.has-warning .control-label,
.has-warning .radio,
.has-warning .checkbox,
.has-warning .radio-inline,
.has-warning .checkbox-inline {
  color: #8a6d3b;
}
.has-warning .form-control {
  border-color: #8a6d3b;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
}
.has-warning .form-control:focus {
  border-color: #66512c;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #c0a16b;
}
.has-warning .input-group-addon {
  color: #8a6d3b;
  border-color: #8a6d3b;
  background-color: #fcf8e3;
}
.has-warning .form-control-feedback {
  color: #8a6d3b;
}
.has-error .help-block,
.has-error .control-label,
.has-error .radio,
.has-error .checkbox,
.has-error .radio-inline,
.has-error .checkbox-inline {
  color: #a94442;
}
.has-error .form-control {
  border-color: #a94442;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
}
.has-error .form-control:focus {
  border-color: #843534;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ce8483;
}
.has-error .input-group-addon {
  color: #a94442;
  border-color: #a94442;
  background-color: #f2dede;
}
.has-error .form-control-feedback {
  color: #a94442;
}
.form-control-static {
  margin-bottom: 0;
}
.help-block {
  display: block;
  margin-top: 5px;
  margin-bottom: 10px;
  color: #737373;
}
@media (min-width: 768px) {
  .form-inline .form-group {
    display: inline-block;
    margin-bottom: 0;
    vertical-align: middle;
  }
  .form-inline .form-control {
    display: inline-block;
    width: auto;
    vertical-align: middle;
  }
  .form-inline .input-group > .form-control {
    width: 100%;
  }
  .form-inline .control-label {
    margin-bottom: 0;
    vertical-align: middle;
  }
  .form-inline .radio,
  .form-inline .checkbox {
    display: inline-block;
    margin-top: 0;
    margin-bottom: 0;
    padding-left: 0;
    vertical-align: middle;
  }
  .form-inline .radio input[type="radio"],
  .form-inline .checkbox input[type="checkbox"] {
    float: none;
    margin-left: 0;
  }
  .form-inline .has-feedback .form-control-feedback {
    top: 0;
  }
}
.form-horizontal .control-label,
.form-horizontal .radio,
.form-horizontal .checkbox,
.form-horizontal .radio-inline,
.form-horizontal .checkbox-inline {
  margin-top: 0;
  margin-bottom: 0;
  padding-top: 7px;
}
.form-horizontal .radio,
.form-horizontal .checkbox {
  min-height: 27px;
}
.form-horizontal .form-group {
  margin-left: -15px;
  margin-right: -15px;
}
.form-horizontal .form-control-static {
  padding-top: 7px;
}
@media (min-width: 768px) {
  .form-horizontal .control-label {
    text-align: right;
  }
}
.form-horizontal .has-feedback .form-control-feedback {
  top: 0;
  right: 15px;
}
.btn {
  display: inline-block;
  margin-bottom: 0;
  font-weight: normal;
  text-align: center;
  vertical-align: middle;
  cursor: pointer;
  background-image: none;
  border: 1px solid transparent;
  white-space: nowrap;
  padding: 6px 12px;
  font-size: 14px;
  line-height: 1.42857143;
  border-radius: 4px;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}
.btn:focus,
.btn:active:focus,
.btn.active:focus {
  outline: thin dotted;
  outline: 5px auto -webkit-focus-ring-color;
  outline-offset: -2px;
}
.btn:hover,
.btn:focus {
  color: #333333;
  text-decoration: none;
}
.btn:active,
.btn.active {
  outline: 0;
  background-image: none;
  box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
}
.btn.disabled,
.btn[disabled],
fieldset[disabled] .btn {
  cursor: not-allowed;
  pointer-events: none;
  opacity: 0.65;
  filter: alpha(opacity=65);
  box-shadow: none;
}
.btn-default {
  color: #333333;
  background-color: #ffffff;
  border-color: #cccccc;
}
.btn-default:hover,
.btn-default:focus,
.btn-default:active,
.btn-default.active,
.open .dropdown-toggle.btn-default {
  color: #333333;
  background-color: #ebebeb;
  border-color: #adadad;
}
.btn-default:active,
.btn-default.active,
.open .dropdown-toggle.btn-default {
  background-image: none;
}
.btn-default.disabled,
.btn-default[disabled],
fieldset[disabled] .btn-default,
.btn-default.disabled:hover,
.btn-default[disabled]:hover,
fieldset[disabled] .btn-default:hover,
.btn-default.disabled:focus,
.btn-default[disabled]:focus,
fieldset[disabled] .btn-default:focus,
.btn-default.disabled:active,
.btn-default[disabled]:active,
fieldset[disabled] .btn-default:active,
.btn-default.disabled.active,
.btn-default[disabled].active,
fieldset[disabled] .btn-default.active {
  background-color: #ffffff;
  border-color: #cccccc;
}
.btn-default .badge {
  color: #ffffff;
  background-color: #333333;
}
.btn-primary {
  color: #ffffff;
  background-color: #428bca;
  border-color: #357ebd;
}
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active,
.open .dropdown-toggle.btn-primary {
  color: #ffffff;
  background-color: #3276b1;
  border-color: #285e8e;
}
.btn-primary:active,
.btn-primary.active,
.open .dropdown-toggle.btn-primary {
  background-image: none;
}
.btn-primary.disabled,
.btn-primary[disabled],
fieldset[disabled] .btn-primary,
.btn-primary.disabled:hover,
.btn-primary[disabled]:hover,
fieldset[disabled] .btn-primary:hover,
.btn-primary.disabled:focus,
.btn-primary[disabled]:focus,
fieldset[disabled] .btn-primary:focus,
.btn-primary.disabled:active,
.btn-primary[disabled]:active,
fieldset[disabled] .btn-primary:active,
.btn-primary.disabled.active,
.btn-primary[disabled].active,
fieldset[disabled] .btn-primary.active {
  background-color: #428bca;
  border-color: #357ebd;
}
.btn-primary .badge {
  color: #428bca;
  background-color: #ffffff;
}
.btn-success {
  color: #ffffff;
  background-color: #5cb85c;
  border-color: #4cae4c;
}
.btn-success:hover,
.btn-success:focus,
.btn-success:active,
.btn-success.active,
.open .dropdown-toggle.btn-success {
  color: #ffffff;
  background-color: #47a447;
  border-color: #398439;
}
.btn-success:active,
.btn-success.active,
.open .dropdown-toggle.btn-success {
  background-image: none;
}
.btn-success.disabled,
.btn-success[disabled],
fieldset[disabled] .btn-success,
.btn-success.disabled:hover,
.btn-success[disabled]:hover,
fieldset[disabled] .btn-success:hover,
.btn-success.disabled:focus,
.btn-success[disabled]:focus,
fieldset[disabled] .btn-success:focus,
.btn-success.disabled:active,
.btn-success[disabled]:active,
fieldset[disabled] .btn-success:active,
.btn-success.disabled.active,
.btn-success[disabled].active,
fieldset[disabled] .btn-success.active {
  background-color: #5cb85c;
  border-color: #4cae4c;
}
.btn-success .badge {
  color: #5cb85c;
  background-color: #ffffff;
}
.btn-info {
  color: #ffffff;
  background-color: #5bc0de;
  border-color: #46b8da;
}
.btn-info:hover,
.btn-info:focus,
.btn-info:active,
.btn-info.active,
.open .dropdown-toggle.btn-info {
  color: #ffffff;
  background-color: #39b3d7;
  border-color: #269abc;
}
.btn-info:active,
.btn-info.active,
.open .dropdown-toggle.btn-info {
  background-image: none;
}
.btn-info.disabled,
.btn-info[disabled],
fieldset[disabled] .btn-info,
.btn-info.disabled:hover,
.btn-info[disabled]:hover,
fieldset[disabled] .btn-info:hover,
.btn-info.disabled:focus,
.btn-info[disabled]:focus,
fieldset[disabled] .btn-info:focus,
.btn-info.disabled:active,
.btn-info[disabled]:active,
fieldset[disabled] .btn-info:active,
.btn-info.disabled.active,
.btn-info[disabled].active,
fieldset[disabled] .btn-info.active {
  background-color: #5bc0de;
  border-color: #46b8da;
}
.btn-info .badge {
  color: #5bc0de;
  background-color: #ffffff;
}
.btn-warning {
  color: #ffffff;
  background-color: #f0ad4e;
  border-color: #eea236;
}
.btn-warning:hover,
.btn-warning:focus,
.btn-warning:active,
.btn-warning.active,
.open .dropdown-toggle.btn-warning {
  color: #ffffff;
  background-color: #ed9c28;
  border-color: #d58512;
}
.btn-warning:active,
.btn-warning.active,
.open .dropdown-toggle.btn-warning {
  background-image: none;
}
.btn-warning.disabled,
.btn-warning[disabled],
fieldset[disabled] .btn-warning,
.btn-warning.disabled:hover,
.btn-warning[disabled]:hover,
fieldset[disabled] .btn-warning:hover,
.btn-warning.disabled:focus,
.btn-warning[disabled]:focus,
fieldset[disabled] .btn-warning:focus,
.btn-warning.disabled:active,
.btn-warning[disabled]:active,
fieldset[disabled] .btn-warning:active,
.btn-warning.disabled.active,
.btn-warning[disabled].active,
fieldset[disabled] .btn-warning.active {
  background-color: #f0ad4e;
  border-color: #eea236;
}
.btn-warning .badge {
  color: #f0ad4e;
  background-color: #ffffff;
}
.btn-danger {
  color: #ffffff;
  background-color: #d9534f;
  border-color: #d43f3a;
}
.btn-danger:hover,
.btn-danger:focus,
.btn-danger:active,
.btn-danger.active,
.open .dropdown-toggle.btn-danger {
  color: #ffffff;
  background-color: #d2322d;
  border-color: #ac2925;
}
.btn-danger:active,
.btn-danger.active,
.open .dropdown-toggle.btn-danger {
  background-image: none;
}
.btn-danger.disabled,
.btn-danger[disabled],
fieldset[disabled] .btn-danger,
.btn-danger.disabled:hover,
.btn-danger[disabled]:hover,
fieldset[disabled] .btn-danger:hover,
.btn-danger.disabled:focus,
.btn-danger[disabled]:focus,
fieldset[disabled] .btn-danger:focus,
.btn-danger.disabled:active,
.btn-danger[disabled]:active,
fieldset[disabled] .btn-danger:active,
.btn-danger.disabled.active,
.btn-danger[disabled].active,
fieldset[disabled] .btn-danger.active {
  background-color: #d9534f;
  border-color: #d43f3a;
}
.btn-danger .badge {
  color: #d9534f;
  background-color: #ffffff;
}
.btn-link {
  color: #428bca;
  font-weight: normal;
  cursor: pointer;
  border-radius: 0;
}
.btn-link,
.btn-link:active,
.btn-link[disabled],
fieldset[disabled] .btn-link {
  background-color: transparent;
  box-shadow: none;
}
.btn-link,
.btn-link:hover,
.btn-link:focus,
.btn-link:active {
  border-color: transparent;
}
.btn-link:hover,
.btn-link:focus {
  color: #2a6496;
  text-decoration: underline;
  background-color: transparent;
}
.btn-link[disabled]:hover,
fieldset[disabled] .btn-link:hover,
.btn-link[disabled]:focus,
fieldset[disabled] .btn-link:focus {
  color: #999999;
  text-decoration: none;
}
.btn-lg {
  padding: 10px 16px;
  font-size: 18px;
  line-height: 1.33;
  border-radius: 6px;
}
.btn-sm {
  padding: 5px 10px;
  font-size: 12px;
  line-height: 1.5;
  border-radius: 3px;
}
.btn-xs {
  padding: 1px 5px;
  font-size: 12px;
  line-height: 1.5;
  border-radius: 3px;
}
.btn-block {
  display: block;
  width: 100%;
  padding-left: 0;
  padding-right: 0;
}
.btn-block + .btn-block {
  margin-top: 5px;
}
input[type="submit"].btn-block,
input[type="reset"].btn-block,
input[type="button"].btn-block {
  width: 100%;
}
.label {
  display: inline;
  padding: .2em .6em .3em;
  font-size: 75%;
  font-weight: bold;
  line-height: 1;
  color: #ffffff;
  text-align: center;
  white-space: nowrap;
  vertical-align: baseline;
  border-radius: .25em;
}
.label[href]:hover,
.label[href]:focus {
  color: #ffffff;
  text-decoration: none;
  cursor: pointer;
}
.label:empty {
  display: none;
}
.btn .label {
  position: relative;
  top: -1px;
}
.label-default {
  background-color: #999999;
}
.label-default[href]:hover,
.label-default[href]:focus {
  background-color: #808080;
}
.label-primary {
  background-color: #428bca;
}
.label-primary[href]:hover,
.label-primary[href]:focus {
  background-color: #3071a9;
}
.label-success {
  background-color: #5cb85c;
}
.label-success[href]:hover,
.label-success[href]:focus {
  background-color: #449d44;
}
.label-info {
  background-color: #5bc0de;
}
.label-info[href]:hover,
.label-info[href]:focus {
  background-color: #31b0d5;
}
.label-warning {
  background-color: #f0ad4e;
}
.label-warning[href]:hover,
.label-warning[href]:focus {
  background-color: #ec971f;
}
.label-danger {
  background-color: #d9534f;
}
.label-danger[href]:hover,
.label-danger[href]:focus {
  background-color: #c9302c;
}
.badge {
  display: inline-block;
  min-width: 10px;
  padding: 3px 7px;
  font-size: 12px;
  font-weight: bold;
  color: #ffffff;
  line-height: 1;
  vertical-align: baseline;
  white-space: nowrap;
  text-align: center;
  background-color: #999999;
  border-radius: 10px;
}
.badge:empty {
  display: none;
}
.btn .badge {
  position: relative;
  top: -1px;
}
.btn-xs .badge {
  top: 0;
  padding: 1px 5px;
}
a.badge:hover,
a.badge:focus {
  color: #ffffff;
  text-decoration: none;
  cursor: pointer;
}
a.list-group-item.active > .badge,
.nav-pills > .active > a > .badge {
  color: #428bca;
  background-color: #ffffff;
}
.nav-pills > li > a > .badge {
  margin-left: 3px;
}
@font-face {
  font-family: 'roboto';
  src: url('../fonts/text/roboto-medium-webfont.eot');
  src: url('../fonts/text/roboto-medium-webfont.eot?#iefix') format('embedded-opentype'), url('../fonts/text/roboto-medium-webfont.woff') format('woff'), url('../fonts/text/roboto-medium-webfont.ttf') format('truetype'), url('../fonts/text/roboto-medium-webfont.svg#robotomedium') format('svg');
  font-weight: bold;
  font-style: normal;
}
@font-face {
  font-family: 'roboto';
  src: url('../fonts/text/roboto-light-webfont.eot');
  src: url('../fonts/text/roboto-light-webfont.eot?#iefix') format('embedded-opentype'), url('../fonts/text/roboto-light-webfont.woff') format('woff'), url('../fonts/text/roboto-light-webfont.ttf') format('truetype'), url('../fonts/text/roboto-light-webfont.svg#robotolight') format('svg');
  font-weight: normal;
  font-style: normal;
}
@font-face {
  font-family: 'league_gothicregular';
  src: url('../fonts/headers/leaguegothic-regular-webfont.eot');
  src: url('../fonts/headers/leaguegothic-regular-webfont.eot?#iefix') format('embedded-opentype'), url('../fonts/headers/leaguegothic-regular-webfont.woff') format('woff'), url('../fonts/headers/leaguegothic-regular-webfont.ttf') format('truetype'), url('../fonts/headers/leaguegothic-regular-webfont.svg#league_gothicregular') format('svg');
  font-weight: normal;
  font-style: normal;
}
.ghostentista-font {
  font-family: "ghostentista";
  font-style: normal;
  font-weight: normal;
  speak: none;
  display: inline-block;
  text-decoration: inherit;
  width: 1em;
  margin-right: .2em;
  text-align: center;
  font-variant: normal;
  text-transform: none;
  line-height: 1em;
  margin-left: .2em;
}
@font-face {
  font-family: 'ghostentista';
  src: url('../fonts/icons/ghostentista.eot?20644569');
  src: url('../fonts/icons/ghostentista.eot?20644569#iefix') format('embedded-opentype'), url('../fonts/icons/ghostentista.woff?20644569') format('woff'), url('../fonts/icons/ghostentista.ttf?20644569') format('truetype'), url('../fonts/icons/ghostentista.svg?20644569#ghostentista') format('svg');
  font-weight: normal;
  font-style: normal;
}
[class^="icon-"]:before,
[class*=" icon-"]:before {
  font-family: "ghostentista";
  font-style: normal;
  font-weight: normal;
  speak: none;
  display: inline-block;
  text-decoration: inherit;
  width: 1em;
  margin-right: .2em;
  text-align: center;
  font-variant: normal;
  text-transform: none;
  line-height: 1em;
  margin-left: .2em;
  font-size: 120%;
}
.icon-code:before {
  content: '\f121';
}
/* '' */

.icon-soundcloud-circled:before {
  content: '\f08a';
}
/* '' */

.icon-github-circled:before {
  content: '\f301';
}
/* '' */

.icon-flickr-circled:before {
  content: '\f304';
}
/* '' */

.icon-vimeo-circled:before {
  content: '\f307';
}
/* '' */

.icon-twitter-circled:before {
  content: '\f30a';
}
/* '' */

.icon-facebook-circled:before {
  content: '\f30d';
}
/* '' */

.icon-gplus-circled:before {
  content: '\f310';
}
/* '' */

.icon-menu-1:before {
  content: '\2630';
}
/* '☰' */

.icon-mail-circled:before {
  content: '\e0ea';
}
/* '' */

.icon-linkedin-circled:before {
  content: '\f319';
}
/* '' */

.icon-dribbble-circled:before {
  content: '\f31c';
}
/* '' */

.icon-stumbleupon-circled:before {
  content: '\f31f';
}
/* '' */

.icon-lastfm-circled:before {
  content: '\f322';
}
/* '' */

.icon-rdio-circled:before {
  content: '\f325';
}
/* '' */

.icon-pinterest-circled:before {
  content: '\f313';
}
/* '' */

.icon-instagram-circled:before {
  content: '\f05e';
}
/* '' */

.icon-tumblr-circled:before {
  content: '\f316';
}
/* '' */

.column {
  float: left;
}
.size-1of4 {
  width: 25%;
}
.size-1of3 {
  width: 33.333%;
}
.size-1of2 {
  width: 50%;
}
.size-1of1 {
  width: 100%;
}
@media screen and (max-width: 768px) {
  #timeline[data-columns]::before {
    content: '1 .column';
  }
}
@media screen and (min-width: 768px) and (max-width: 1280px) {
  #timeline[data-columns]::before {
    content: '2 .column.size-1of2';
  }
}
@media screen and (min-width: 1280px) and (max-width: 1600px) {
  #timeline[data-columns]::before {
    content: '3 .column.size-1of3';
  }
}
@media screen and (min-width: 1600px) {
  #timeline[data-columns]::before {
    content: '4 .column.size-1of4';
  }
}
::-moz-selection {
  color: #dddddd;
  background: rgba(112, 189, 255, 0.91);
  text-shadow: none;
}
::selection {
  color: #dddddd;
  background: rgba(112, 189, 255, 0.91);
  text-shadow: none;
}
h1,
h2,
h3,
h4,
h5,
h6,
p {
  -webkit-hyphens: auto;
  -moz-hyphens: auto;
  -ms-hyphens: auto;
  hyphens: auto;
  text-rendering: optimizeLegibility;
}
h1,
h2,
h3,
h4,
h5,
h6 {
  color: #3a4145;
}
h1 {
  font-size: 4em;
}
h2 {
  font-size: 3em;
}
h3 {
  font-size: 2.75em;
}
h4 {
  font-size: 2.5em;
}
h5 {
  font-size: 2.25em;
}
h6 {
  font-size: 2rem;
}
a {
  color: #1a75b5;
  -webkit-transition: color ease 0.3s;
  transition: color ease 0.3s;
}
a:hover {
  color: #b51e3e;
}
h1 a,
h2 a,
h3 a,
h4 a,
h5 a,
h6 a {
  color: #3a4145;
}
p,
ul,
ol {
  margin: 1.6rem 0;
}
ol ol,
ul ul,
ul ol,
ol ul {
  margin: 0.4rem 0;
}
hr {
  display: block;
  height: 1px;
  border: 0;
  border-top: 1px solid #dddddd;
  margin: 3.2rem 0;
  padding: 0;
}
blockquote {
  line-height: 1.5;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  margin: 1.6rem 0rem 1.6rem 0rem;
  padding: 0.8rem 1.6rem;
  border-left: #dddddd 0.4rem solid;
  background-color: #f4f4f4;
}
blockquote p {
  margin: 0.8rem 0;
  font-style: italic;
}
blockquote small {
  display: inline-block;
  margin: 0.8rem 0 0.8rem 1.5rem;
  font-size: 0.9em;
  color: #b7b7b7;
}
blockquote small:before {
  content: '\2014 \00A0';
}
blockquote cite {
  font-weight: bold;
}
blockquote cite a {
  font-weight: normal;
}
dl {
  margin: 1.6rem 0;
}
dl dt {
  float: left;
  width: 180px;
  overflow: hidden;
  clear: left;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: bold;
  margin-bottom: 1em;
}
dl dd {
  margin-left: 200px;
  margin-bottom: 1em;
}
mark {
  background-color: rgba(112, 189, 255, 0.91);
}
code,
tt {
  padding: 1px 3px;
  font-family: Inconsolata, monospace, sans-serif;
  font-size: 0.85em;
  white-space: pre;
  border: 1px solid #dddddd;
  background: #ffffff;
  border-radius: 2px;
}
pre {
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  margin: 0 auto 1em;
  padding: 1rem 2rem !important;
  font-family: Inconsolata, monospace, sans-serif;
  font-size: 0.9em;
  white-space: pre;
  overflow: auto;
  border: 1px solid #dddddd;
  background-color: #f4f4f4;
  display: inline-block;
}
pre code,
tt {
  font-size: inherit;
  white-space: -moz-pre-wrap;
  white-space: pre-wrap;
  background: transparent;
  border: none;
  padding: 0;
}
kbd {
  display: inline-block;
  margin-bottom: 0.4rem;
  padding: 1px 8px;
  border: #ccc 1px solid;
  color: #666;
  text-shadow: #fff 0 1px 0;
  font-size: 0.9em;
  font-weight: bold;
  background: #f4f4f4;
  border-radius: 4px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2), 0 1px 0 0 #ffffff inset;
}
table {
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  margin: 1.6rem 0;
  width: 100%;
  max-width: 100%;
  background-color: transparent;
}
table th,
table td {
  padding: 8px;
  line-height: 20px;
  text-align: left;
  vertical-align: top;
  border-top: 1px solid #dddddd;
}
table th {
  color: #3a4145;
}
table caption + thead tr:first-child th,
table caption + thead tr:first-child td,
table colgroup + thead tr:first-child th,
table colgroup + thead tr:first-child td,
table thead:first-child tr:first-child th,
table thead:first-child tr:first-child td {
  border-top: 0;
}
table tbody + tbody {
  border: 1px solid #dddddd;
}
table table table {
  background-color: #f5f5f5;
}
table tbody > tr:nth-child(odd) > td,
table tbody > tr:nth-child(odd) > th {
  border: 1px solid #dddddd;
}
table.plain tbody > tr:nth-child(odd) > td,
table.plain tbody > tr:nth-child(odd) > th {
  background: transparent;
}
.slabtexted .slabtext {
  display: -moz-inline-box;
  display: inline-block;
  white-space: nowrap;
}
.slabtextinactive .slabtext {
  display: inline;
  white-space: normal;
  font-size: 1em !important;
  letter-spacing: inherit !important;
  word-spacing: inherit !important;
  *letter-spacing: 0 !important;
  *word-spacing: 0 !important;
}
.slabtextdone .slabtext {
  display: block;
}
body,
p,
ul,
ol,
table {
  font-family: 'roboto', sans-serif;
  font-weight: 100;
}
h1,
h2,
h3,
h4,
h5,
h6 {
  letter-spacing: -0.025em;
  line-height: 0.85;
  font-family: 'league_gothicregular';
  font-weight: normal !important;
  font-style: normal !important;
  text-transform: uppercase;
}
h1 a,
h2 a,
h3 a,
h4 a,
h5 a,
h6 a {
  display: block;
}
h1 {
  margin-top: 1.0625em;
  margin-bottom: 0.3333333333333333em;
}
h2 {
  margin-top: 0.9583333333333334em;
  margin-bottom: 0.2777777777777778em;
}
h3 {
  margin-top: 0.8541666666666666em;
  margin-bottom: 0.2222222222222222em;
}
h4 {
  margin-top: 0.75em;
  margin-bottom: 0.16666666666666666em;
}
h5 {
  margin-top: 0.6458333333333334em;
  margin-bottom: 0.1111111111111111em;
}
h6 {
  margin-top: 0.5416666666666666em;
  margin-bottom: 0.05555555555555555em;
}
.cf {
  *zoom: 1;
}
.cf:before,
.cf:after {
  content: "";
  display: table;
}
.cf:after {
  clear: both;
}
body,
body * {
  -moz-box-sizing: border-box;
  box-sizing: border-box;
}
html,
body {
  overflow-x: hidden;
}
body {
  font-size: 41.666666666666664%;
  min-width: 20em;
  background-color: #f5f5f5;
  color: #77888c;
  margin: 0;
  padding: 0;
  line-height: 1.5;
}
.hidden {
  display: none;
}
nav#pagination {
  margin-top: 2em;
  text-align: center;
}
nav#pagination #next-posts,
nav#pagination #prev-posts {
  display: inline-block;
  margin: 0 auto;
  border: 1px solid #dddddd;
  background-color: #f4f4f4;
  padding: 0.5em 1em;
  border-radius: 0.5em;
  font-weight: bold;
  text-transform: uppercase;
  text-decoration: none;
  color: #3a4145;
  font-size: 1em;
}
nav#pagination #next-posts:hover,
nav#pagination #prev-posts:hover {
  background-color: #3a4145;
  border-color: #3a4145;
  color: #dddddd;
}
.post-sep {
  border: 0;
  height: 50px;
  display: block;
  clear: both;
}
.headerBackground {
  background: #000;
}
body.no-fixed-elements header#site-head {
  position: static;
}
body.no-fixed-elements main.content {
  margin-top: 0;
}
#secondaryTitle {
  box-shadow: 0 0px 30px 0 rgba(0, 0, 0, 0.5);
  text-shadow: -1px -1px 2px rgba(0, 0, 0, 0.35);
  width: 100%;
  position: fixed;
  top: -5rem;
  height: 4rem;
  background: #000;
  z-index: 100;
}
#secondaryTitle h1,
#secondaryTitle h2 {
  display: inline;
  line-height: 4rem;
}
#secondaryTitle h1 {
  padding: 0 1rem;
  color: #fff;
  font-size: 6em;
}
#secondaryTitle h2 {
  color: rgba(255, 255, 255, 0.4);
  font-family: 'roboto', sans-serif;
  text-transform: none;
  font-size: 2em;
}
#secondaryTitle #scroll-to-top {
  position: absolute;
  top: 0.25rem;
  right: 0.5rem;
  margin: 0;
  padding: 0;
  text-decoration: none;
}
#secondaryTitle #scroll-to-top:after {
  content: '\2630';
  color: #fff;
  font-size: 8em;
  font-family: "ghostentista";
  font-style: normal;
  font-weight: normal;
  speak: none;
  display: inline-block;
  text-decoration: inherit;
  width: 1em;
  margin-right: .2em;
  text-align: center;
  font-variant: normal;
  text-transform: none;
  line-height: 1em;
  margin-left: .2em;
}

.navigation ul{
  text-align: center;
  display: block;
  list-style-type: none;
  margin-top: 5px;
}
.navigation ul li {
  display: inline-block;
  font-size: 2em;
  font-weight: 300;
  margin: 0;
  padding: 0 .5em;
  text-align: center;
  text-transform: uppercase;
  font-family: 'league_gothicregular';
}
.navigation ul li a{
  color:#FFFFFF;
}
.nav-current{
  border-bottom: 1px solid #FFF;
}

header#site-head {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  background-color: rgba(255, 255, 255, 0.91);
  -webkit-background-size: cover;
  background-size: cover;
  position: fixed;
  top: 0;
  z-index: 1;
  height: 500px;
  width: 100%;
  background-position: 50% 50%;
  font-size: 2.5em;
}
header#site-head .vertical {
  width: 100%;
  height: 500px;
  background: url(../img/cover-pattern.png) 0 0 repeat;
}
header#site-head .vertical a {
  position: relative;
  cursor: pointer;
  margin: 0 auto;
  width: 35em;
  height: 26em;
  display: block;
}
header#site-head #site-head-content {
  -webkit-transition: all 0.5s ease-out;
  transition: all 0.5s ease-out;
  border-radius: 10em;
  margin: 0 auto;
  width: 35em;
  height: 20em;
  padding-top: 0;
}
header#site-head #site-head-content:hover {
  -webkit-transform: scale(0.95);
  transform: scale(0.95);
}
header#site-head a {
  text-decoration: none;
}
header#site-head h1 {
  max-width: 35em;
}
header#site-head h1 {
  display: table-cell;
  vertical-align: middle;
  width: 5em;
  line-height: 0.85;
  margin: 0.05em;
  text-align: center;
  color: #fff;
  font-size: 8em;
  padding: 0 0.1em;
}
header#site-head h3 {
  color: #fff;
  font-size: 2.75em;
}
main.content {
  -webkit-overflow-scrolling: touch;
  min-height: 30em;
  position: relative;
  z-index: 3;
  width: 100%;
  overflow: hidden;
  box-shadow: 0 0px 30px 0 rgba(0, 0, 0, 0.35);
  background-color: #f5f5f5;
  padding: 0 0 1em 0;
  margin: 500px auto 0;
  font-size: 3em;
}
main.content .article-wrapper {
  width: 100%;
  margin: 0;
  padding: 0;
}
main.content #timeline {
  margin: 0em;
  padding: 0 1em;
}
main.content article {
  background-color: #ffffff;
  -webkit-transition: all 0.3s ease;
  transition: all 0.3s ease;
  opacity: 1;
  display: block;
}
main.content article.loading {
  opacity: 0;
}
main.content article.post {
  padding: 1.5em;
  max-width: 1200px;
  border: 0.5em solid #f5f5f5;
  width: 100% !important;
}
main.content article.detail-post {
  background-color: #ffffff;
  padding: 1.5em;
  margin: 0 auto;
  max-width: 1200px;
}
main.content article.detail-post h1 {
  font-size: 5.5em;
}
main.content article.detail-post img {
  max-width: 100%;
}
main.content article.detail-post p {
  text-shadow: -1px 0 0 #ffffff;
}
main.content article.latest-post {
  width: 100%;
  font-size: 1.35em;
  margin: 2em auto 0;
  padding: 1.5em;
  border: none;
  border-bottom: 0.5em solid #f5f5f5;
}
main.content article.latest-post header.post-header,
main.content article.latest-post section.post-excerpt {
  max-width: 1200px;
  margin: 0 auto;
}
main.content article.featured {
  background-color: #d6f5ff;
  padding: 1.5em;
}
main.content article.featured header {
  border-bottom: 1px solid #94cadb !important;
}
main.content article.featured .post-meta time {
  background-color: rgba(112, 189, 255, 0.91);
}
main.content article .post-meta {
  display: block;
  text-align: center;
  margin-bottom: 5px;
}
main.content article .post-meta time {
  font-size: 0.75em;
  text-shadow: 1px 1px 2px rgba(58, 65, 69, 0.7);
  margin: 0 auto;
  padding: 0.25rem 0.8rem;
  border-radius: 0.3rem;
  min-width: 7em;
  text-align: center;
  display: inline;
  clear: both;
  background-color: #b9c1c5;
  color: #ffffff;
}
main.content article header {
  border-bottom: 1px solid #dddddd;
  padding-bottom: 1rem;
  margin-bottom: 2.5rem;
}
main.content article .more-link {
  font-weight: bold;
  color: #b51e3e;
}
main.content article .more-link:hover {
  color: #1a75b5;
}
main.content article h1.post-title {
  margin: 1rem 0 4rem;
  text-align: center;
  border-bottom: 1px solid #dddddd;
  padding-bottom: 0.5em;
}
main.content article h2.post-title {
  font-size: 4em;
  margin: 0.25em 0 1rem;
  text-align: center;
  -webkit-transition: all 0.3s ease;
  transition: all 0.3s ease;
  width: 100%;
}
main.content article h2.post-title a {
  -webkit-transition: color 0.2s ease;
  transition: color 0.2s ease;
  text-decoration: none;
  color: #3a4145;
}
main.content article h2.post-title:hover {
  -webkit-transform: scale(0.95);
  transform: scale(0.95);
}
main.content article h2.post-title:hover a {
  color: #b51e3e;
}
main.content article .tagged {
  font-size: 0.65em;
}
main.content article:first-of-type {
  margin-top: 0em;
}
main.content article:last-of-type {
  margin-bottom: 0em;
}
main.content article:last-of-type:after {
  content: '';
  margin: 0;
  padding: 0;
}
main.content nav.pagination {
  text-align: center;
  padding-bottom: 2em;
}
main.content nav.related-posts h4 {
  margin-bottom: 0.5em;
}
main.content nav.related-posts ul {
  list-style-type: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid #e8e8e8;
}
main.content nav.related-posts ul li {
  width: 50%;
  float: left;
}
main.content nav.related-posts ul li a {
  padding: 0.3em 0.5em;
  display: block;
  width: 100%;
  height: 100%;
}
main.content nav.related-posts ul li a:hover {
  text-decoration: none;
  background-color: #f5f5f5;
}
main.content section.share {
  background-color: #ebf5fc;
  border: 1px solid #bfdff6;
  margin: 1em auto;
  text-align: left;
  padding: 0em 1em;
}
main.content section.share h4 {
  font-weight: bold;
  text-align: left;
  font-size: 1.75em;
  text-transform: uppercase;
  display: inline-block;
  margin: 0;
  padding: 0.5em 0;
}
main.content section.share .links {
  display: inline-block;
  font-size: 1.5em;
  margin: 0;
  padding: 0 0 0.5em;
  text-align: right;
}
main.content section.share .links a {
  color: #1a75b5;
  margin: 0;
  padding: 0;
  text-decoration: none;
}
main.content section.share .links a:before {
  -webkit-transition: -webkit-transform 0.1s ease;
  transition: transform 0.1s ease;
}
main.content section.share .links a:hover:before {
  color: #145888;
}
@media screen and (max-height: 490px) {
  header#site-head #site-head-content {
    height: auto;
  }
  header#site-head h3 {
    display:none;
  }
  header#site-head .vertical a {
    height: auto;
  }
}
@media screen and (max-width: 550px) {
  .column {
    width: 100%;
  }
  pre {
    padding: 1rem 0.5rem !important;
    margin: 0px;
    width: 100%;
    font-size: 0.7em;
  }
  main.content section.share h4,
  main.content section.share .links {
    display: block;
    text-align: center;
  }
  main.content #timeline {
    margin: 0;
    padding: 0;
  }
  main.content article.post {
    padding: 0px;
    border: none;
  }
  main.content nav.related-posts ul li {
    width: 100%;
    float: left;
  }
  header#site-head .vertical a {
    width: 100%;
  }
  header#site-head #site-head-content {
    width: 100%;
  }
  header#site-head h1 {
    max-width: 100%;
  }
  header#site-head h1 {
    font-size: 4em;
  }
  header#site-head h3 {
    font-size: 2.4em;
    margin: 20px;
  }
  .navigation ul{
    text-align: left;
    line-height: 1;
    margin-top: 0px;
    padding-left: 15px;
  }
  .navigation ul li {
    font-size: 1.5em;
    padding: 0;
    margin-left: 0.3em;
  }
}
main.content footer.post-footer {
  margin-bottom: 3em;
  width: 100%;
  overflow: hidden;
  *zoom: 1;
}
main.content footer.post-footer:before,
main.content footer.post-footer:after {
  content: "";
  display: table;
}
main.content footer.post-footer:after {
  clear: both;
}
main.content footer.post-footer .author {
  float: left;
  border: 1px solid #dddddd;
  background-color: #f4f4f4;
  min-height: 10.5em;
}
main.content footer.post-footer .author .image {
  float: left;
}
main.content footer.post-footer .author .image img {
  margin: 0.5em;
  border-radius: 4em;
  max-width: 8em;
  max-height: 8em;
  width: 100%;
}
main.content footer.post-footer .author h4,
main.content footer.post-footer .author p {
  margin: 0.5em;
  padding: 0;
  display: block;
}
main.content footer.post-footer .author h4 {
  overflow: hidden;
  position: static;
  font-size: 1.75em;
  margin: 1em 0 0.5em 0;
}
main.content footer.post-footer .author p {
  font-size: 0.9em;
}
main.content footer.post-footer .related-posts {
  padding-right: 1em;
  float: left;
}
@media screen and (max-width: 768px) {
  main.content footer.post-footer .author {
    width: 100%;
  }
  main.content footer.post-footer .related-posts {
    width: 100%;
  }
}
footer.site-footer {
  font-size: 2.5em;
  position: relative;
  z-index: 2;
  bottom: 0;
  width: 100%;
  color: #828f96;
  padding: 0em 2em 2em;
  background: #3a4145 url(../img/footer-pattern.png) 0 0 repeat;
}
footer.site-footer .inner {
  margin: 0 auto;
  padding: 1.5em 0;
  max-width: 1200px;
  *zoom: 1;
}
footer.site-footer .inner:before,
footer.site-footer .inner:after {
  content: "";
  display: table;
}
footer.site-footer .inner:after {
  clear: both;
}
footer.site-footer .inner h3,
footer.site-footer .inner p {
  margin: 0;
  padding: 0;
}
footer.site-footer .inner h3 {
  color: #69757c;
}
footer.site-footer .inner p {
  color: #9ea8ad;
}
footer.site-footer .inner a {
  color: #9ea8ad;
}
footer.site-footer .inner a:hover {
  color: #ffffff;
  text-decoration: none;
}
footer.site-footer .inner .get-connected {
  width: 50%;
  float: left;
  text-align: right;
  font-size: 1.75em;
}
footer.site-footer .inner .get-connected .poweredby {
  margin-top: 1.5em;
  font-size: 11px;
}
footer.site-footer .inner .get-connected .poweredby a {
  text-decoration: underline;
}
footer.site-footer .inner .about {
  width: 50%;
  float: left;
}
footer.site-footer .inner .about p {
  padding-top: 0.5em;
}
@media screen and (max-width: 768px) {
  footer.site-footer .inner .get-connected {
    width: 100%;
    float: none;
    text-align: center;
    font-size: 1.75em;
  }
  footer.site-footer .inner .get-connected p {
    padding-top: 1.5em;
  }
  footer.site-footer .inner .about {
    width: 100%;
    float: none;
    text-align: center;
  }
  footer.site-footer .inner .about p {
    padding-top: 0.5em;
  }
}


text:
package org.mifos.test.acceptance.framework.loan;

import java.math.BigDecimal;

import org.apache.commons.lang.StringUtils;
import org.mifos.test.acceptance.framework.MifosPage;
import org.testng.Assert;

import com.thoughtworks.selenium.Selenium;

public class RepayLoanPage extends MifosPage {
    public RepayLoanPage(Selenium selenium) {
        super(selenium);
    }

    public void verifyPage() {
        this.verifyPage("RepayLoan");
    }

    public RepayLoanConfirmationPage submitAndNavigateToRepayLoanConfirmationPage(RepayLoanParameters params) {
        selenium.select("RepayLoan.input.modeOfRepayment", "value=" + params.getModeOfRepaymentValue());
        if(params.getModeOfRepayment().equals(RepayLoanParameters.TRANSFER_FROM_SAVINGS)){
            selenium.select("repayLoan.input.accountForTransfer", "value=" + params.getAccountForTransferGlobalNum());
            String [] savingsAccountForTransferDetails =
                    selenium.getSelectedLabel("repayLoan.input.accountForTransfer").split(" - ");

            String savingsAccountGlobalNum = savingsAccountForTransferDetails[0];
            String savingsAccountName = savingsAccountForTransferDetails[1];

            String savingsAccountType = selenium.getText(
                    String.format("//table/tbody/tr[@class='%s'][1]/td[2]",savingsAccountGlobalNum));
            BigDecimal savingsAccountBalance = new BigDecimal(selenium.getText(String.format(
                    "//table/tbody/tr[@class='%s'][2]/td[2]", savingsAccountGlobalNum)).replaceAll(",", ""));
            BigDecimal savingsAccountMaxAmountPerWithdrawal = new BigDecimal(selenium.getText(String.format(
                    "//table/tbody/tr[@class='%s'][3]/td[2]", savingsAccountGlobalNum)).replaceAll(",", ""));

            Assert.assertEquals(savingsAccountGlobalNum, params.getAccountForTransferGlobalNum());
            Assert.assertEquals(savingsAccountName, params.getAccountForTransferName());
            Assert.assertEquals(savingsAccountType, params.getAccountForTransferType());
            Assert.assertEquals(savingsAccountBalance, new BigDecimal(params.getAccountForTransferBalance()));
            Assert.assertEquals(savingsAccountMaxAmountPerWithdrawal,
                                new BigDecimal(params.getAccountForTransferMaxWithdrawalAmount()));
        }
        this.typeTextIfNotEmpty("RepayLoan.input.receiptId", params.getReceiptId());

        this.typeTextIfNotEmpty("receiptDateDD", params.getReceiptDateDD());
        this.typeTextIfNotEmpty("receiptDateMM", params.getReceiptDateMM());
        this.typeTextIfNotEmpty("receiptDateYY", params.getReceiptDateYYYY());
        selenium.click("RepayLoan.button.reviewTransaction");
        waitForPageToLoad();
        return new RepayLoanConfirmationPage(selenium);
    }

    public boolean isWaiverInterestSelectorVisible() {
        return selenium.isElementPresent("name=waiverInterestChckBox");
    }

    public boolean isWaiverInterestWarningVisible() {
        return !StringUtils.equals("hidden", selenium.getEval("window.$(\"#waiverInterestWarning\").css(\"visibility\")"));
    }

    public boolean isWaivedRepaymentAmoutVisible() {
        return StringUtils.equals("true", selenium.getEval("window.$(\"#waivedRepaymentAmount\").is(\":visible\")"));
    }

    public String waivedRepaymentAmount() {
        return selenium.getEval("window.$(\"#waivedRepaymentAmount\").html()").trim();
    }

    public boolean isTotalRepaymentAmountVisible() {
        return StringUtils.equals("true", selenium.getEval("window.$(\"#totalRepaymentAmount\").is(\":visible\")"));
    }

    public String totalRepaymentAmount() {
        return selenium.getEval("window.$(\"#totalRepaymentAmount\").html()").trim();
    }

    public boolean isWaiveInterestSelected() {
        return StringUtils.equals("true", selenium.getEval("window.$(\"input:checkbox[name=waiverInterestChckBox]:checked\").val()"));
    }

    public void interestWaiver(boolean value) {
        if (value) {
            selenium.check("name=waiverInterestChckBox");
        } else {
            selenium.uncheck("name=waiverInterestChckBox");
        }
        selenium.fireEvent("name=waiverInterestChckBox", "change");
    }
}


text:
#include "sdl_rpc_plugin/commands/mobile/on_permissions_change_notification.h"
#include "application_manager/message.h"
#include "interfaces/MOBILE_API.h"

namespace sdl_rpc_plugin {
using namespace application_manager;

namespace commands {

SDL_CREATE_LOG_VARIABLE("Commands")

OnPermissionsChangeNotification::OnPermissionsChangeNotification(
    const application_manager::commands::MessageSharedPtr& message,
    ApplicationManager& application_manager,
    app_mngr::rpc_service::RPCService& rpc_service,
    app_mngr::HMICapabilities& hmi_capabilities,
    policy::PolicyHandlerInterface& policy_handler)
    : CommandNotificationImpl(message,
                              application_manager,
                              rpc_service,
                              hmi_capabilities,
                              policy_handler) {}

OnPermissionsChangeNotification::~OnPermissionsChangeNotification() {}

void OnPermissionsChangeNotification::Run() {
  SDL_LOG_AUTO_TRACE();

  SendNotification();
}

}  // namespace commands

}  // namespace sdl_rpc_plugin


text:
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2007 The Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/frame_layout"
        android:layout_height="match_parent"
        android:layout_width="match_parent"
        android:layout_weight="1">
    <com.android.camera.PreviewFrameLayout android:id="@+id/frame"
            android:layout_height="match_parent"
            android:layout_width="match_parent"
            android:layout_centerInParent="true">
        <SurfaceView android:id="@+id/camera_preview"
                android:layout_width="match_parent"
                android:layout_height="match_parent" />
        <FrameLayout android:id="@+id/preview_border"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:visibility="gone"
            android:background="@drawable/ic_snapshot_border" />
        <com.android.camera.ui.RotateLayout android:id="@+id/recording_time_rect"
                style="@style/ViewfinderLableLayout">

            <include layout="@layout/viewfinder_labels_video" android:id="@+id/labels" />
        </com.android.camera.ui.RotateLayout>
        <ImageView android:id="@+id/review_image"
                android:layout_height="match_parent"
                android:layout_width="match_parent"
                android:visibility="gone"
                android:background="@android:color/black"/>
        <com.android.camera.ui.RotateImageView
                android:id="@+id/btn_play"
                style="@style/ReviewControlIcon"
                android:layout_centerInParent="true"
                android:src="@drawable/ic_gallery_play"
                android:visibility="gone"
                android:onClick="onReviewPlayClicked"/>
    </com.android.camera.PreviewFrameLayout>

    <!-- Fill up the space below preview frame with black. -->
    <View
        android:background="#ff000000"
        android:layout_height="match_parent"
        android:layout_width="0dip"
        android:layout_below="@+id/frame"
        android:layout_alignParentBottom="true" />

    <!-- Indicator control and popup window frame.
         Listed last for highest Z-order -->
    <include layout="@layout/indicator_bar" />

</RelativeLayout>


text:
<?php

namespace TMSolution\SmsBundle\Api\SMSApi\Api\Action\Sender;

use TMSolution\SmsBundle\Api\SMSApi\Api\Action\AbstractAction;
use TMSolution\SmsBundle\Api\SMSApi\Proxy\Uri;

/**
 * Class Add
 * @package TMSolution\SmsBundle\Api\SMSApi\Api\Action\Sender
 */
class Add extends AbstractAction
{

    /**
     * @param $data
     * @return \TMSolution\SmsBundle\Api\SMSApi\Api\Response\CountableResponse
     */
    protected function response($data)
    {

        return new \TMSolution\SmsBundle\Api\SMSApi\Api\Response\CountableResponse($data);
    }

    /**
     * @return Uri
     */
    public function uri()
    {

        $query = "";

        $query .= $this->paramsLoginToQuery();

        $query .= $this->paramsOther();

        return new Uri($this->proxy->getProtocol(), $this->proxy->getHost(), $this->proxy->getPort(), "/api/sender.do", $query);
    }

    /**
     * Set new sender name.
     *
     * @param string $senderName sender name
     * @return $this
     */
    public function setName($senderName)
    {
        $this->params["add"] = $senderName;
        return $this;
    }

}


text:
@import UIKit;
#import "ViewController.h"

@interface DismissalInteractionController : UIPercentDrivenInteractiveTransition

@property (nonatomic, weak) UIViewController<SlideTransitionProtocol> *viewController;
@property (nonatomic, weak) UIView *slidingView;

@end