text:
angular.module('app', ['ui.bootstrap','cgPrompt']);

angular.module('app').controller('DemoCtrl',function($scope,prompt){

    $scope.options = {
        title: 'Title',
        message:'Message',
        input:false,
        label:'Input label',
        value:'Input initial value',
        values:'',
        buttons:''
    };

    var processOptions = function(){
        var options = angular.copy($scope.options);

        if (options.values.length === 0) {
            options.values = undefined;
        }

        options.buttons = _.chain(options.buttons.split(','))
            .filter(function(val){
                return val;
            })
            .map(function(val){
                val = val.trim();
                return {label:val,cancel:val.toLowerCase() === 'cancel',primary:val.toLowerCase() === 'ok'};
            })
            .value();
        if (options.buttons.length === 0) {
            options.buttons = undefined;
        }

        if (!options.input){
            options.input = undefined;
            options.value = undefined;
            options.values = undefined;
            options.label = undefined;
        }
        return options;
    };

    $scope.getCode = function(){
        var options = processOptions();
        return 'prompt(' + JSON.stringify(options,null,'\t') + ').then(function(result){\n\tconsole.log(result);\n});';
    };

    $scope.go = function(){
        $scope.results = '';

        var options = processOptions();

        prompt(options).then(function(results){
            $scope.results = JSON.stringify(results,null,'\t');
        },function(){
            $scope.results = 'Promise rejected';
        });

    };

});


text:
require 'spec_helper'

describe Spree::Gateway::CyberSource do
  let(:gateway) { described_class.create!(name: 'CyberSource') }

  context '.provider_class' do
    it 'is a CyberSource gateway' do
      expect(subject.provider_class).to eq ::ActiveMerchant::Billing::CyberSourceGateway
    end
  end
end

redpajama_set_name: RedPajamaGithub


text:
layout: index
title: Handling ASK/TELL
---

Ask/Tell
--------

Finally, the player can specify both the person to talk to and the subject:

> ASK BORIS ABOUT KEY

> TELL MARY ABOUT LOCK

You should also consider whether you want both sides of the conversation in the output. Which you chose is up to you, but it will look better if you are consistent, so I suggest decided now, before you start typing.

> \>TALK TO BORIS
>
> 'Hi,' you say to Boris, 'can you help me find the key to this door?'
>
> 'Sure, you need to look in the bedroom.'

> \>TALK TO BORIS
>
> 'Hi,' says Boris, 'do you need to find the key to this door? You need to look in the bedroom.'

ASK ABOUT
---------

In play this might look like this:

> \>ASK BORIS ABOUT KEY
>
> 'Hi,' you say to Boris, 'can you help me find the key to this door?'
>
> 'Sure, you need to look in the bedroom.'

This is the most open-ended approach, though in reality that flexibility is an illusion - the player is limited to asking about only the topics you have included, he just does not know it. This is also the major downfall of this method - the player might not guess the subjects you have coded for, and just get frustrated as the character fails to respond to guess after guess. This system is probably best suited to when you have a large number of topics you will include for every character in the game, as a menu will soon get unwieldly, and thematically, it feels right for a mystery.

Quest has a tab just for Ask/Tell, making it easy to set up each response (but you need to activate in on the Features tab of the game object).

![](images/Talk3.png "Talk3.png")

For each topic, click on add, then put in the topic name. You can put in several; try to guess what words the player will use. They should be separated by spaces, as shown above. Then you need to put in the script, just as before.

You should also put in a script to run for unknown topics.

The Quest Ask/About system is discussed in detail [here](ask_about.html)

Varying Responses
-----------------

In all the above examples, the character will respond the same every time. That is not ideal, people are not like that, they will get annoyed if you ask the same question fifteen times, and wonder why you are asking where the key is when you have just used it to open the door.

For all the methods above, the important part here is the lines that start "msg". We have gone through the three ways to arrive at them, now we are concentrating on just those lines.

If you have a counter in there, then you could have the response depend on how often the topic has been raised (but remember to set up an integer attribute for the counter). Or use a boolean to flag that the topic has been asked (the version below automatically sets the attribute for you).

Instead of:

        msg ("'Hi,' you say to Philippa, 'can you help me find the key to this door?'")
        msg ("'Sure, you need to look in the bedroom.'")

Try:

        if (not GetBoolean (philipa, "key_asked") {
          msg ("'Hi,' you say to Philippa, 'can you help me find the key to this door?'")
          msg ("'Sure, you need to look in the bedroom.'")
          philipa.key_asked = true
        }
        else {
          msg ("'Hi again,' you say to Philippa, 'can you help me find the key to this door?'")
          msg ("'Have you tried looking in the bedroom?'")
        }

Or it could respond to changes in the world. The code below will make Philippa respond differently if the door is unlocked, or you are carrying the key.

        if (not that_door.locked) {
          msg ("'I see you finally managed to unlock the door then,' said Philippa sarcastically.'")
        }
        else if (key.parent = player) {
          msg ("'You found the key then,' said Philippa sarcastically.'")
        }
        else if (not GetBoolean (philippa, "key_asked")) {
          msg ("'Hi,' you say to Philippa, 'can you help me find the key to this door?'")
          msg ("'Sure, you need to look in the bedroom.'")
          philippa.key_asked = true
        }
        else {
          msg ("'Hi again,' you say to Philippa, 'can you help me find the key to this door?'")
          msg ("'Have you tried looking in the bedroom yet?'")
        }


text:
ALTER TABLE ACT_RU_CASE_EXECUTION
  ADD SUPER_EXEC_ varchar(64);

ALTER TABLE ACT_RU_CASE_EXECUTION
  ADD REQUIRED_ boolean;

-- history --

ALTER TABLE ACT_HI_ACTINST
  ADD CALL_CASE_INST_ID_ varchar(64);

ALTER TABLE ACT_HI_PROCINST
  ADD SUPER_CASE_INSTANCE_ID_ varchar(64);

ALTER TABLE ACT_HI_CASEINST
  ADD SUPER_PROCESS_INSTANCE_ID_ varchar(64);

ALTER TABLE ACT_HI_CASEACTINST
  ADD REQUIRED_ boolean;


text:
namespace eShopOnContainers.Core.Models.Orders
{
    public enum OrderState
    {
        InProcess,
        Delivered
    }
}


text:
#ifndef _ofxsProcessing_h_
#define _ofxsProcessing_h_

#include <cassert>
#include <algorithm>

#include "ofxsImageEffect.h"
#include "ofxsMultiThread.h"

/** @file This file contains a useful base class that can be used to process images

The code below is not so much a skin on the base OFX classes, but code used in implementing
specific image processing algorithms. As such it does not sit in the support include lib, but in
its own include directory.
*/

namespace OFX {

    ////////////////////////////////////////////////////////////////////////////////
    // base class to process images with
    class ImageProcessor : public OFX::MultiThread::Processor {
    protected :
        OFX::ImageEffect &_effect;      /**< @brief effect to render with */
        OFX::Image       *_dstImg;        /**< @brief image to process into */
        OfxRectI          _renderWindow;  /**< @brief render window to use */

    public :
        /** @brief ctor */
        ImageProcessor(OFX::ImageEffect &effect)
          : _effect(effect)
          , _dstImg(0)
        {
            _renderWindow.x1 = _renderWindow.y1 = _renderWindow.x2 = _renderWindow.y2 = 0;
        }

        /** @brief set the destination image */
        void setDstImg(OFX::Image *v) {_dstImg = v; }

        /** @brief reset the render window */
        void setRenderWindow(OfxRectI rect) {_renderWindow = rect;}

        /** @brief overridden from OFX::MultiThread::Processor. This function is called once on each SMP thread by the base class */
        void multiThreadFunction(unsigned int threadId, unsigned int nThreads)
        {
            // slice the y range into the number of threads it has
            unsigned int dy = _renderWindow.y2 - _renderWindow.y1;
            // the following is equivalent to std::ceil(dy/(double)nThreads);
            unsigned int h = (dy+nThreads-1)/nThreads;
            if (h == 0) {
                // there are more threads than lines to process
                h = 1;
            }
            if (threadId * h >= dy) {
                // empty render subwindow
                return;
            }
            unsigned int y1 = _renderWindow.y1 + threadId * h;

            unsigned int step = (threadId + 1) * h;
            unsigned int y2 = _renderWindow.y1 + (step < dy ? step : dy);

            OfxRectI win = _renderWindow;
            win.y1 = y1; win.y2 = y2;

            // and render that thread on each
            multiThreadProcessImages(win);
        }

        /** @brief called before any MP is done */
        virtual void preProcess(void) {}

        /** @brief this is called by multiThreadFunction to actually process images, override in derived classes */
        virtual void multiThreadProcessImages(OfxRectI window) = 0;

        /** @brief called before any MP is done */
        virtual void postProcess(void) {}

        /** @brief called to process everything */
        virtual void process(void)
        {
            // If _dstImg was set, check that the _renderWindow is lying into dstBounds
            if (_dstImg) {
                const OfxRectI& dstBounds = _dstImg->getBounds();
                // is the renderWindow within dstBounds ?
                assert(dstBounds.x1 <= _renderWindow.x1 && _renderWindow.x2 <= dstBounds.x2 &&
                       dstBounds.y1 <= _renderWindow.y1 && _renderWindow.y2 <= dstBounds.y2);
                // exit gracefully in case of error
                if (!(dstBounds.x1 <= _renderWindow.x1 && _renderWindow.x2 <= dstBounds.x2 &&
                      dstBounds.y1 <= _renderWindow.y1 && _renderWindow.y2 <= dstBounds.y2) ||
                    (_renderWindow.x1 >= _renderWindow.x2) ||
                    (_renderWindow.y1 >= _renderWindow.y2)) {
                    return;
                }
            }

            // call the pre MP pass
            preProcess();

            // make sure there are at least 4096 pixels per CPU and at least 1 line par CPU
            unsigned int nCPUs = (std::min(_renderWindow.x2 - _renderWindow.x1, 4096) *
                                  (_renderWindow.y2 - _renderWindow.y1)) / 4096;
            // make sure the number of CPUs is valid (and use at least 1 CPU)
            nCPUs = std::max(1u, std::min(nCPUs, OFX::MultiThread::getNumCPUs()));

            // call the base multi threading code, should put a pre & post thread calls in too
            multiThread(nCPUs);

            // call the post MP pass
            postProcess();
        }

    };

};
#endif


text:
                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
                    Toggle navigation

                </button>

MENTES MEJRAND N-LINE

                    Administración

Alumno

Tutor

Escuela

Diagnostico

Encuestas


text:
<?php

namespace P8P;

/**
 * App
 *
 * ...
 *
 */

class App {
    /**
     * Current version
     *
     * @var string
     */
    const VERSION = '3.5.0-dev';

    /**
     * Title
     *
     * XXXX
     *
     * @param bool|false $silent
     * @return ResponseInterface
     *
     * @throws Exception
     */

    function run(){

    }

    /**
     * App Builder
     *
     * @param array|null $container
     */
    public function __construct($container = []){
        if (is_array($container)) {
            $container = new Container($container);
        }
        if (!$container instanceof ContainerInterface) {
            throw new InvalidArgumentException('Expected a ContainerInterface');
        }
        $this->container = $container;
    }
}


text:
var widgets_class = {
    string  : {
        class : '.form-control.string',
        object: string
    },
    int: {
        class : '.form-control.int',
        object: int
    },
    slug: {
        class: '.form-control.slug',
        object: slug
    },
    float: {
        class : '.form-control.float',
        object: float
    },
    bool: {
        class: '.minimal.bool',
        object: bool
    },
    text: {
        class: '.form-control.text',
        object: text
    },
    file: {
        class: '.form-control.files',
        object: file
    },
    table: {
        class: '.table-widget-selector',
        object: table
    },
    groupitems: {
        class: '.group-item-widget',
        object: groupitem
    },
    defaultSelect: {
        class: '.form-control.select',
        object: defaultSelect
    },
    customSelect: {
        class: '.form-control.custom-select',
        object: customSelect
    },
    image: {
        class: '.form-control.file',
        object: image
    },
    texteditor: {
        class: '.form-control.text-editor',
        object: texteditor
    }
};

var View = (function () {
    //переменные  приватные
    var widgets       = [];
    var $this;
    return {
        init: function () {
            $this = this;
            var tmp ;
            $.each(widgets_class, function (key, obj) {
                $(obj.class).each(function () {
                    if(key != 'defaultSelect'){
                        tmp = new obj.object({elem: this, position: widgets.length});

                        widgets.push(tmp);
                        if( !(key == 'table' || key == 'groupitems') ){
                            Model.set(tmp.get());
                        }
                    }
                });
            });

            $('.global-save').on('click',function(){

                eventManager.call('save');

            });
        },
        initItem: function( elem ){
            $.each(widgets_class, function (key, obj) {
                elem.find(obj.class).each(function(){
                    tmp = new obj.object({elem: this, position: widgets.length});
                    widgets.push(tmp);
                    Model.set( tmp.get() );
                    console.log('test');
                });
            });
        },
        get : function (pos) {
            Model.set( widgets[ pos ].get() );
        },
        getItem: function (pos, item, widget){
            console.log(item, widget);
            Model.set( widgets[ pos ].get(item, widget) );
        },
        addItem: function(  data, pos   ){
            widgets[ pos ].add( data );
        },
        removeWidget: function( elem ){
            var removed = [];
            $.each(widgets_class, function (key, obj) {

                elem.find(obj.class).each(function(){
                    var obj = {
                        blockName : $(this).data('block'),
                        fieldName : $(this).data('name'),
                        id        : $(this).data('id'),
                        type      : $(this).data('type')
                    };
                    $.each(widgets, function(key, item){
                        if(typeof(item) != 'undefined'){
                            if( obj.blockName == item.blockName &&
                                obj.type      == item.type      &&
                                obj.id        == item.id        &&
                                obj.fieldName == item.fieldName){

                                removed.push(item.pos);
                                removeItem = item;
                                widgets.splice(key, 1);
                                removeItem.destroy();
                                delete removeItem;
                            }
                        }
                    });
                });

            });
            /*$.each(removed, function(key, obj){
                item = widgets[obj];
                widgets.splice(obj, 1);
                item.destroy();
                delete item;
            });*/
            $.each(widgets, function(key, obj){
                obj.pos = key;
            });

        },

        widgets: widgets
    }

})();


text:
START_ATF_NAMESPACE
    char* WheatyExceptionReport::DumpTypeIndex(char* pszCurrBuffer, uint64_t modBase, unsigned int dwTypeIndex, unsigned int nestingLevel, uint64_t offset, bool* bHandled)
    {
        using org_ptr = char* (WINAPIV*)(char*, uint64_t, unsigned int, unsigned int, uint64_t, bool*);
        return (org_ptr(0x140440d40L))(pszCurrBuffer, modBase, dwTypeIndex, nestingLevel, offset, bHandled);
    };
    int WheatyExceptionReport::EnumerateSymbolsCallback(struct _SYMBOL_INFO* pSymInfo, unsigned int SymbolSize, void* UserContext)
    {
        using org_ptr = int (WINAPIV*)(struct _SYMBOL_INFO*, unsigned int, void*);
        return (org_ptr(0x140440a30L))(pSymInfo, SymbolSize, UserContext);
    };
    char* WheatyExceptionReport::FormatOutputValue(char* pszCurrBuffer, BasicType basicType, uint64_t length, void* pAddress)
    {
        using org_ptr = char* (WINAPIV*)(char*, BasicType, uint64_t, void*);
        return (org_ptr(0x140441160L))(pszCurrBuffer, basicType, length, pAddress);
    };
    bool WheatyExceptionReport::FormatSymbolValue(struct _SYMBOL_INFO* pSym, struct _tagSTACKFRAME64* sf, char* pszBuffer, unsigned int cbBuffer)
    {
        using org_ptr = bool (WINAPIV*)(struct _SYMBOL_INFO*, struct _tagSTACKFRAME64*, char*, unsigned int);
        return (org_ptr(0x140440b40L))(pSym, sf, pszBuffer, cbBuffer);
    };
    void WheatyExceptionReport::GenerateExceptionReport(struct _EXCEPTION_POINTERS* pExceptionInfo)
    {
        using org_ptr = void (WINAPIV*)(struct _EXCEPTION_POINTERS*);
        (org_ptr(0x14043f990L))(pExceptionInfo);
    };
    BasicType WheatyExceptionReport::GetBasicType(unsigned int typeIndex, uint64_t modBase)
    {
        using org_ptr = BasicType (WINAPIV*)(unsigned int, uint64_t);
        return (org_ptr(0x140441380L))(typeIndex, modBase);
    };
    int WheatyExceptionReport::GetDisplayInfo(int nDeviceIndex, char* lpszDeviceInfo, char* lpszMonitorInfo)
    {
        using org_ptr = int (WINAPIV*)(int, char*, char*);
        return (org_ptr(0x1404416b0L))(nDeviceIndex, lpszDeviceInfo, lpszMonitorInfo);
    };
    char* WheatyExceptionReport::GetExceptionString(unsigned int dwCode)
    {
        using org_ptr = char* (WINAPIV*)(unsigned int);
        return (org_ptr(0x140440170L))(dwCode);
    };
    int WheatyExceptionReport::GetLogicalAddress(void* addr, char* szModule, unsigned int len, unsigned int* section, unsigned int* offset)
    {
        using org_ptr = int (WINAPIV*)(void*, char*, unsigned int, unsigned int*, unsigned int*);
        return (org_ptr(0x1404404a0L))(addr, szModule, len, section, offset);
    };
    char* WheatyExceptionReport::GetOsName(unsigned int dwPlatformId, unsigned int dwMajorVersion, unsigned int dwMinorVersion)
    {
        using org_ptr = char* (WINAPIV*)(unsigned int, unsigned int, unsigned int);
        return (org_ptr(0x140441570L))(dwPlatformId, dwMajorVersion, dwMinorVersion);
    };
    char* WheatyExceptionReport::GetOsVersion()
    {
        using org_ptr = char* (WINAPIV*)();
        return (org_ptr(0x140441470L))();
    };
    void WheatyExceptionReport::SetDescription(char* pszDescription)
    {
        using org_ptr = void (WINAPIV*)(struct WheatyExceptionReport*, char*);
        (org_ptr(0x14043f5f0L))(this, pszDescription);
    };
    void WheatyExceptionReport::SetFtpConnection(char* pszFtpIp, unsigned int nFtpPort, char* pszFtpId, char* pszFtpPwd, char* pszFtpDirectory)
    {
        using org_ptr = void (WINAPIV*)(struct WheatyExceptionReport*, char*, unsigned int, char*, char*, char*);
        (org_ptr(0x14043f640L))(this, pszFtpIp, nFtpPort, pszFtpId, pszFtpPwd, pszFtpDirectory);
    };
    void WheatyExceptionReport::SetLogName(char* pszLogName)
    {
        using org_ptr = void (WINAPIV*)(struct WheatyExceptionReport*, char*);
        (org_ptr(0x14043f5a0L))(this, pszLogName);
    };
    void WheatyExceptionReport::SetRunDialog(int bRun)
    {
        using org_ptr = void (WINAPIV*)(struct WheatyExceptionReport*, int);
        (org_ptr(0x14043f6e0L))(this, bRun);
    };
    WheatyExceptionReport::WheatyExceptionReport()
    {
        using org_ptr = void (WINAPIV*)(struct WheatyExceptionReport*);
        (org_ptr(0x14043f4d0L))(this);
    };
    void WheatyExceptionReport::ctor_WheatyExceptionReport()
    {
        using org_ptr = void (WINAPIV*)(struct WheatyExceptionReport*);
        (org_ptr(0x14043f4d0L))(this);
    };
    int WheatyExceptionReport::WheatyUnhandledExceptionFilter(struct _EXCEPTION_POINTERS* pExceptionInfo)
    {
        using org_ptr = int (WINAPIV*)(struct _EXCEPTION_POINTERS*);
        return (org_ptr(0x14043f700L))(pExceptionInfo);
    };
    void WheatyExceptionReport::WriteStackDetails(struct _CONTEXT* pContext, bool bWriteVariables)
    {
        using org_ptr = void (WINAPIV*)(struct _CONTEXT*, bool);
        (org_ptr(0x1404406a0L))(pContext, bWriteVariables);
    };
    int WheatyExceptionReport::_tprintfh(void* hFile, char* format)
    {
        using org_ptr = int (WINAPIV*)(void*, char*);
        return (org_ptr(0x1404417d0L))(hFile, format);
    };
    int WheatyExceptionReport::printf(char* format)
    {
        using org_ptr = int (WINAPIV*)(char*);
        return (org_ptr(0x1404416d0L))(format);
    };
    WheatyExceptionReport::~WheatyExceptionReport()
    {
        using org_ptr = void (WINAPIV*)(struct WheatyExceptionReport*);
        (org_ptr(0x14043f560L))(this);
    };
    void WheatyExceptionReport::dtor_WheatyExceptionReport()
    {
        using org_ptr = void (WINAPIV*)(struct WheatyExceptionReport*);
        (org_ptr(0x14043f560L))(this);
    };

END_ATF_NAMESPACE


text:
@interface SpriterTimeline : NSObject

/// The timeline ID.
@property (nonatomic, copy) NSString *timelineId;
// The timeline's name.
@property (nonatomic, copy) NSString *name;

// TODO
//@property (nonatomic, assign) SpriterObjectType objectType;

/// An array with SpriterTimelineKey objects.
@property (nonatomic, strong) NSArray *keys;

@end


text:
SCRIPT=`basename ${BASH_SOURCE[0]}`
STX_LOG="/var/log/stratux.log"
function wLog () {
	echo "$(date +"%Y/%m/%d %H:%m:%S")  - $SCRIPT - $1" >> $STX_LOG
}
wLog "Running Hostapd Manager Script."

# files to edit
HOSTAPD=('/etc/hostapd/hostapd.user')

# values to be added to hostapd.user for security.
HOSTAPD_SECURE_VALUES_DELETE=('auth_algs=1' 'wpa=3' 'wpa_passphrase=' 'wpa_key_mgmt=WPA-PSK' 'wpa_pairwise=TKIP' 'rsn_pairwise=CCMP')

# 'wpa_passphrase=' was left out of this to set it with the $wifiPass. I assume you can not evaluate a variable from within an array variable
HOSTAPD_SECURE_VALUES_WRITE=('auth_algs=1' 'wpa=3' 'wpa_key_mgmt=WPA-PSK' 'wpa_pairwise=TKIP' 'rsn_pairwise=CCMP')

#Initialize variables to default values.
OPT_S=false
OPT_C=false
OPT_E=false
OPT_O=false
OPT_P=false
wifiPass="SquawkDirtyToMe!"

parm="*"
err="####"
att="+++"

#Set fonts for Help.
BOLD=$(tput bold)
STOT=$(tput smso)
UNDR=$(tput smul)
REV=$(tput rev)
RED=$(tput setaf 1)
GREEN=$(tput setaf 2)
YELLOW=$(tput setaf 3)
MAGENTA=$(tput setaf 5)
WHITE=$(tput setaf 7)
NORM=$(tput sgr0)
NORMAL=$(tput sgr0)

#Help function
function HELP {
  echo -e \\n"Help documentation for ${BOLD}${SCRIPT}.${NORM}"\\n
  echo -e "${REV}Basic usage:${NORM} ${BOLD}$SCRIPT -s ssid -c chan -p pass ${NORM}"\\n
  echo "The following command line switches are recognized."
  echo "${REV}-s${NORM}  --Sets the SSID to ${BOLD}ssid${NORM}. \"-s stratux\""
  echo "${REV}-c${NORM}  --Sets the channel to ${BOLD}chan${NORM}. \"-c 1\""
  echo "${REV}-o${NORM}  --Turns off encryption and sets network to open. Cannot be used with -e or -p."
  echo "${REV}-e${NORM}  --Turns on encryption with passphrase ${BOLD}$wifiPass${NORM}. Cannot be used with -o or -p"
  echo "${REV}-p${NORM}  --Turns on encryption with your chosen passphrase ${BOLD}pass${NORM}. 8-63 Printable Characters(ascii 32-126). Cannot be used with -o or -e. \"-p password!\""
  echo -e "${REV}-h${NORM}  --Displays this help message. No further functions are performed."\\n
  echo -e "Example: ${BOLD}$SCRIPT -s Stratux-N3558D -c 5 -p SquawkDirty!${NORM}"\\n
  exit 1
}

function confirm() {
	# call with a prompt string or use a default
	read -r -p "$1 " response
	case "$response" in
		[yY][eE][sS]|[yY])
		true
	;;
		*)
		exit 1
	;;
	esac
}

function cleanhostapd () {
	wLog "Cleaning hostapd config at $1"
	for j in "${HOSTAPD_SECURE_VALUES_DELETE[@]}"
	do
		sed -i "/$j/ d" ${1}
	done
	sed -i '/^\s*$/d' ${1}
}

function writehostapd () {
	wLog "Writing hostapd config at $1"
	sed -i '/^\s*$/d' ${1}
	echo "" >> ${1}
	for j in "${HOSTAPD_SECURE_VALUES_WRITE[@]}"
	do
		echo "${j}" >> ${1}
	done
	echo "wpa_passphrase=$wifiPass" >> ${1}
}

#apply settings and restart all processes
function APPLYSETTINGS {
	wLog "Restarting all wifi settings."
	echo "${RED}${BOLD} $att At this time the script will restart your WiFi services.${WHITE}${NORMAL}"
	echo "If you are connected to Stratux through the ${BOLD}192.168.10.1${NORMAL} interface then you will be disconnected"
	echo "Please wait up to 1 min and look for the new SSID on your wireless device."
	sleep 3
	echo "${YELLOW}$att Restarting Stratux WiFi Services... $att ${WHITE}"
	echo "${YELLOW}$att SSH will now disconnect if connected to http://192.168.10.1 ... $att ${WHITE}"
	echo "ifdown wlan0..."
	ifdown wlan0
	sleep 0.5
	echo "ifup wlan0..."
	echo "Calling Stratux WiFI Start Script(stratux-wifi.sh) via ifup wlan0..."
	ifup wlan0
	sleep 0.5
	echo ""
	echo ""
	echo "All systems should be up and running and you should see your new SSID!"
}

clear

echo ""
echo "#### Stratux HOSTAPD Settings ####"
echo ""

if [ $(whoami) != 'root' ]; then
	echo "${BOLD}${RED}This script must be executed as root, exiting...${WHITE}${NORMAL}"
	echo "${BOLD}${RED}USAGE${WHITE}${NORMAL}"
	exit 1
fi

#Check the number of arguments. If none are passed, print help and exit.
NUMARGS=$#
if [ $NUMARGS -eq 0 ]; then
  HELP
fi

### Start getopts code ###

#Parse command line flags
#If an option should be followed by an argument, it should be followed by a ":".
#Notice there is no ":" after "eoqh". The leading ":" suppresses error messages from
#getopts. This is required to get my unrecognized option code to work.
options=':s:c:p:eoh'
#options=':s:c:h'
while getopts $options option; do
  case $option in
    s)  #set option "s"
      if [[ -z "${OPTARG}" || "${OPTARG}" == *[[:space:]]* || "${OPTARG}" == -* ]]; then
          echo "${BOLD}${RED}$err No SSID for -s, exiting...${WHITE}${NORMAL}"
		  wLog "No SSID for -s, exiting..."
          exit 1
      else
          OPT_S=$OPTARG
          echo "$parm SSID Option -s used: $OPT_S"
          echo "${GREEN}    SSID will now be ${BOLD}${UNDR}$OPT_S${NORMAL}.${WHITE}"
      fi
      ;;
    c)  #set option "c"
      if [[ -z "${OPTARG}" || "${OPTARG}" == *[[:space:]]* || "${OPTARG}" == -* ]]; then
          echo "${BOLD}${RED}$err Channel option(-c) used without value, exiting... ${WHITE}${NORMAL}"
		  wLog "Channel option(-c) used without value, exiting..."
          exit 1
      else
          OPT_C=$OPTARG
          echo "$parm Channel option -c used: $OPT_C"
          if [[ "$OPT_C" =~ ^[0-9]+$ ]] && [ "$OPT_C" -ge 1 -a "$OPT_C" -le 13  ]; then
          	echo "${GREEN}    Channel will now be set to ${BOLD}${UNDR}$OPT_C${WHITE}${NORMAL}."
          else
            echo "${BOLD}${RED}$err Channel is not within acceptable values, exiting...${WHITE}${NORMAL}"
			wLog "Channel is not within acceptable values, exiting..."
            exit 1
          fi
      fi
      ;;
    e)  #set option "e" with default passphrase
		if [[ -z "${OPTARG}" || "${OPTARG}" == *[[:space:]]* || "${OPTARG}" == -* ]]; then
          echo "$parm Encrypted WiFI Option -e used."
          OPT_E=$wifiPass
		  echo "${GREEN}     WiFi will be encrypted using ${BOLD}${UNDR}$OPT_E${NORMAL}${GREEN} as the passphrase!${WHITE}${NORMAL}"
      else
          echo "${BOLD}${RED}$err Option -e does not require argument. exiting...${WHITE}${NORMAL}"
		  wLog "Option -e does not require argument."
          exit 1
      fi
      ;;
	p) #set encryption with user specified passphrase
		if [[ -z "${OPTARG}" || "${OPTARG}" =~ ^[[:space:]]*$ || "${OPTARG}" == -* ]]; then
			echo "${BOLD}${RED}$err Encryption option(-p) used without passphrase!${WHITE}${NORMAL}"
			echo "${BOLD}${RED}$err Encryption option(-p) required an argument \"-p passphrase\". exiting...${WHITE}${NORMAL}"
			wLog "Encryption option(-p) used without passphrase!"
		else
			OPT_P=$OPTARG
			wifiPass=$OPTARG
		fi
		echo "$parm Encryption option -p used:"
		if [ -z `echo $OPT_P | tr -d "[:print:]"` ] && [ ${#OPT_P} -ge 8 ]  && [ ${#OPT_P} -le 63 ]; then
			echo "${GREEN}     WiFi will be encrypted using ${BOLD}${UNDR}$OPT_P${NORMAL}${GREEN} as the passphrase!${WHITE}${NORMAL}"
		else
			echo  "${BOLD}${RED}$err Invalid PASSWORD: 8 - 63 printable characters, exiting...${WHITE}${NORMAL}"
			wLog "Invalid PASSWORD: 8 - 63 printable characters, exiting..."
			exit 1
		fi
    ;;
    o)  #set option "o"
      if [[ -z "${OPTARG}" || "${OPTARG}" == *[[:space:]]* || "${OPTARG}" == -* ]]; then
          echo "$parm Open WiFI Option -o used."
          echo "${GREEN}    WiFi will be set to ${BOLD}${UNDR}OPEN${NORMAL}${GREEN} or ${BOLD}${UNDR}UNSECURE${WHITE}${NORMAL}"
          OPT_O=true
      else
          echo "${BOLD}${RED}$err Option -o does not require argument. exiting...${WHITE}${NORMAL}"
		  wLog "Option -o does not require argument. exiting..."
          exit 1
      fi
      ;;
    h)  #show help
      HELP
      ;;
   \?) # invalid option
     echo "${BOLD}${RED}$err Invalid option -$OPTARG ${WHITE}${NORMAL}" >&2
     HELP
     exit 1
     ;;
   :) # Missing Arg
     echo "${BOLD}${RED}$err Missing option for argument -$OPTARG ${WHITE}${NORMAL}" >&2
     HELP
     exit 1
     ;;
   *) # Invalid
     echo "${BOLD}${RED}$err Unimplemented option -$OPTARG ${WHITE}${NORMAL}" >&2
     HELP
     exit 1
     ;;
  esac
done

shift $((OPTIND-1))  #This tells getopts to move on to the next argument.

### End getopts code ###

### Main loop to process files ###

#This is where your main file processing will take place. This example is just
#printing the files and extensions to the terminal. You should place any other
#file processing tasks within the while-do loop.

if [[ $OPT_O == true  && (  $OPT_E != false || $OPT_P != false ) ]]; then
  echo "${BOLD}${RED}$err Option -e , -p and -o cannot be used simultaneously. Exiting... ${WHITE}${NORMAL}"
  wLog "Option -e , -p and -o cannot be used simultaneously."
  exit 1
fi

if [ $OPT_P != false ] && [ $OPT_E != false ]; then
  echo "${BOLD}${RED}$err Option -e and -p cannot be used simultaneously. Exiting... ${WHITE}${NORMAL}"
  wLog "Option -e and -p cannot be used simultaneously."
  exit 1
fi

echo ""
echo "${BOLD}No errors found. Continuing...${NORMAL}"
echo ""

confirm "Are you ready to apply these settings? [y/n]"

####
#### File modification loop
####
for i in "${HOSTAPD[@]}"
do
  if [ -f ${i} ]; then
    echo "Working on $i..."
    wLog "Working on $i..."
	if [ $OPT_S != false ]; then
		wLog "Writing SSID $OPT_S to file $i"
    	echo "${MAGENTA}Setting ${YELLOW}SSID${MAGENTA} to ${YELLOW}$OPT_S ${MAGENTA}in $i...${WHITE}"
        if grep -q "^ssid=" ${HOSTAPD[$x]}; then
        sed -i "s/^ssid=.*/ssid=${OPT_S}/" ${i}
      else
        echo ${OPT_S} >> ${i}
      fi
    fi

    if [ $OPT_C != false ]; then
		wLog "Writing channel $OPT_C to file $i"
    	echo "${MAGENTA}Setting ${YELLOW}Channel${MAGENTA} to ${YELLOW}$OPT_C ${MAGENTA}in $i...${WHITE}"
        if grep -q "^channel=" ${i}; then
            sed -i "s/^channel=.*/channel=${OPT_C}/" ${i}
        else
            echo ${OPT_C} >> ${i}
        fi
    fi

    if [ $OPT_E != false ] || [ $OPT_P  != false ]; then
		wLog "Writing security and setting passphrase to $wifiPass to file $i"
        echo "${MAGENTA}Adding WPA encryption with passphrase: ${YELLOW}$wifiPass ${MAGENTA}to $i...${WHITE}"
        cleanhostapd $i
		writehostapd $i
    fi

    if [ $OPT_O != false ]; then
		wLog "Removing WiFi security in file $i"
        echo "${MAGENTA}Removing WPA encryption in $i...${WHITE}"
        cleanhostapd $i
    fi

	echo "${GREEN}Modified ${i}...done${WHITE}"
	echo ""
  else
    echo "${MAGENTA}No ${i} file found...${WHITE}${NORMAL}"
	echo ""
  fi
done

### End main loop ###

### Apply Settings and restart all services
APPLYSETTINGS

exit 0


text:
<?php

namespace Ayamel\SearchBundle\Model;

use AC\ModelTraits\AutoGetterSetterTrait;
use AC\ModelTraits\ArrayFactoryTrait;
use JMS\Serializer\Annotation as JMS;

/**
 * Contains basic hit and timing information about a search query result.
 */
class Query
{
    use ArrayFactoryTrait, AutoGetterSetterTrait;

    /**
     * The max number of hits returned.
     *
     * @JMS\Type("integer")
     */
    protected $limit;

    /**
     * The max number of results skipped.
     *
     * @JMS\Type("integer")
     */
    protected $skip;

    /**
     * The total number of hits that matched the search.
     *
     * @JMS\Type("integer")
     */
    protected $total;

    /**
     * The time in milliseconds taken to search the index.
     *
     * @JMS\Type("integer")
     */
    protected $time;
}


text:
class A {
    public boolean equals(final Object o) {
      return this == o;
    }
}


text:
package org.restlet.representation;

import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.Reader;

/**
 * Empty representation with no content. It is always considered available but
 * calling the {@link #getText()} method for example will return an empty
 * string. It can also have regular metadata available.
 *
 * @author Jerome Louvel
 */
public class EmptyRepresentation extends Representation {

    /**
     * Constructor.
     */
    public EmptyRepresentation() {
        setAvailable(false);
        setTransient(true);
        setSize(0);
    }

    @Override
    public java.nio.channels.ReadableByteChannel getChannel()
            throws IOException {
        return null;
    }

    @Override
    public Reader getReader() throws IOException {
        return null;
    }

    @Override
    public InputStream getStream() throws IOException {
        return null;
    }

    @Override
    public String getText() throws IOException {
        return null;
    }

    @Override
    public void write(java.io.Writer writer) throws IOException {
        // Do nothing
    }

    @Override
    public void write(java.nio.channels.WritableByteChannel writableChannel)
            throws IOException {
        // Do nothing
    }

    @Override
    public void write(OutputStream outputStream) throws IOException {
        // Do nothing
    }
}


text:
require 'expression'

class FileName < Expression
  def initialize(pattern)
    @pattern = pattern
  end

  def evaluate(dir)
    results = []
    Find.find(dir) do |p|
      next unless File.file? p
      name = File.basename p
      results << p if File.fnmatch(@pattern, name)
    end

    results
  end
end


text:
{% assign organizers = site.data[include.date].organizers %}

Organizers

    {% for organizer in organizers %}

        {{ organizer.name }}

    {% endfor %}


text:
from distutils.core import setup
from setuptools import find_packages
from hanabIRC import __version__

setup(
    name='HanabIRC',
    version=__version__,
    packages=find_packages(exclude=['*test']),
    license='FreeBSD License',
    author='Phil S. Stein',
    author_email='phil.s.stein@gmail.com',
    description='An IRC bot that organizes and plays the card game Hanabi.',
    long_description=open('README.txt').read(),
    url='https://github.com/philsstein/hanabIRC',
    install_requires=['irc', 'PyYAML'],
    scripts=['bin/hanabIRC']
)


text:
@charset "utf-8";
@media screen and (min-width: 1040px) {
  .dt-mobile-header,
  .dt-mobile-menu-icon,
  .mobile-header-space,
  .masthead .mobile-header-bar,
  .transparent .header-space {
    display: none;
  }
  .header-side-left.footer-overlap:not(.sticky-header) #footer {
    padding-left: 300px;
    margin-left: -300px;
  }
  .header-side-right.footer-overlap:not(.sticky-header) #footer {
    padding-right: 300px;
    margin-right: -300px;
  }
  .header-side-left.header-side-line.footer-overlap #footer,
  .overlay-navigation.header-side-line.footer-overlap #footer {
    padding-left: 60px;
    margin-left: -60px;
  }
  .header-side-left.header-side-line.footer-overlap .boxed #footer,
  .overlay-navigation.header-side-line.footer-overlap .boxed #footer {
    padding-left: 0;
    margin-left: 0;
  }
  .header-side-right.header-side-line.footer-overlap #footer {
    padding-right: 60px;
    margin-right: -60px;
  }
  .overlay-navigation .sticky-header-overlay {
    display: none;
  }
  .phantom-sticky.fixed-masthead .masthead:not(.side-header):not(.mixed-header),
  .phantom-sticky.fixed-masthead .masthead.side-header-h-stroke,
  .transparent.phantom-sticky .masthead.side-header-h-stroke {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 500;
  }
  .phantom-sticky.sticky-on .masthead:not(.mixed-header):not(.side-header):not(.masthead-mobile),
  .phantom-sticky.sticky-on .mixed-header.side-header-h-stroke {
    background: rgba(30,115,190,0.47) !important;
  }
  .phantom-line-decoration.phantom-sticky.sticky-on .masthead:not(.side-header):not(.mixed-header),
  .phantom-line-decoration.phantom-sticky.sticky-on .mixed-header.side-header-h-stroke {
    border-bottom: 1px solid #dd3333;
    -webkit-box-shadow: none !important;
    box-shadow: none !important;
  }
  .phantom-shadow-decoration.phantom-sticky.sticky-on .masthead:not(.side-header):not(.mixed-header),
  .phantom-shadow-decoration.phantom-sticky.sticky-on .mixed-header.side-header-h-stroke {
    -webkit-box-shadow: 1px 1px 4px 1px rgba(0,0,0,0.1);
    box-shadow: 1px 1px 4px 1px rgba(0,0,0,0.1);
    border-bottom: none;
  }
  .phantom-disable-decoration.phantom-sticky.sticky-on .masthead:not(.side-header):not(.mixed-header),
  .phantom-disable-decoration.phantom-sticky.sticky-on .mixed-header.side-header-h-stroke {
    -webkit-box-shadow: none !important;
    box-shadow: none !important;
    border-bottom: none;
  }
  .phantom-sticky.sticky-on:not(.phantom-shadow-decoration) .masthead.shadow-decoration:not(.side-header-menu-icon) {
    -webkit-box-shadow: none;
    box-shadow: none;
  }
  .floating-navigation-below-slider.phantom-sticky:not(.transparent) .masthead:not(.side-header):not(.mixed-header),
  .floating-navigation-below-slider.phantom-sticky:not(.transparent) .masthead.side-header-h-stroke,
  .floating-navigation-below-slider.transparent.phantom-sticky:not(.transparent) .masthead.side-header-h-stroke {
    position: relative;
    top: 0 !important;
  }
  .floating-navigation-below-slider.phantom-sticky.transparent .masthead:not(.side-header):not(.mixed-header),
  .floating-navigation-below-slider.phantom-sticky.transparent .masthead.side-header-h-stroke,
  .floating-navigation-below-slider.transparent.phantom-sticky.transparent .masthead.side-header-h-stroke {
    position: absolute;
  }
  .sticky-on.floating-navigation-below-slider.phantom-sticky .masthead:not(.side-header):not(.mixed-header),
  .sticky-on.floating-navigation-below-slider.phantom-sticky .masthead.side-header-h-stroke,
  .sticky-on.floating-navigation-below-slider.transparent.phantom-sticky .masthead.side-header-h-stroke {
    position: fixed;
  }
  .floating-navigation-below-slider.phantom-sticky .header-space {
    display: none;
  }
  .phantom-sticky:not(.overlap):not(.transparent) .masthead:not(.side-header) {
    -webkit-transition: background-color 330ms ease;
    transition: background-color 330ms ease;
  }
  .phantom-sticky .page-inner .masthead:not(.side-header) {
    -webkit-backface-visibility: hidden;
  }
  .phantom-sticky.sticky-off.phantom-custom-logo-on .branding .sticky-logo,
  .phantom-sticky.sticky-on.phantom-custom-logo-on .branding > a:not(.sticky-logo),
  .phantom-sticky.sticky-on.phantom-custom-logo-on .branding > img:not(.sticky-logo) {
    display: none;
    opacity: 0;
  }
  .phantom-sticky.sticky-off:not(.phantom-custom-logo-on) .branding .sticky-logo,
  .phantom-sticky.sticky-on:not(.phantom-custom-logo-on) .branding .sticky-logo,
  .phantom-main-logo-on.phantom-sticky.sticky-on .branding > a,
  .phantom-main-logo-on.phantom-sticky.sticky-on .branding > img,
  .phantom-logo-off.phantom-sticky.sticky-on .branding > a,
  .phantom-logo-off.phantom-sticky.sticky-on .branding > img {
    display: none;
    visibility: hidden;
  }
  .phantom-main-logo-on.phantom-sticky.sticky-on .branding .sticky-logo {
    display: block;
    visibility: visible;
  }
  .phantom-sticky.sticky-off.phantom-custom-logo-on .branding .sticky-logo,
  .phantom-sticky.sticky-on.phantom-custom-logo-on .branding > a:not(.sticky-logo),
  .phantom-sticky.sticky-on.phantom-custom-logo-on .branding > img:not(.sticky-logo) {
    visibility: hidden;
  }
  .phantom-sticky.sticky-on.phantom-custom-logo-on .branding .sticky-logo,
  .phantom-sticky.sticky-off.phantom-custom-logo-on .branding > a:not(.sticky-logo),
  .phantom-sticky.sticky-off.phantom-custom-logo-on .branding > img:not(.sticky-logo) {
    visibility: visible;
  }
  .phantom-main-logo-on.phantom-sticky .branding .sticky-logo {
    display: none;
  }
  .phantom-sticky #page .side-header .branding > a:not(.sticky-logo),
  .phantom-sticky #page .side-header .branding > img:not(.sticky-logo):not(.mobile-logo) {
    display: block;
    opacity: 1;
    -webkit-animation: none;
    animation: none;
    visibility: visible;
  }
  .masthead.widgets .hide-on-desktop,
  .masthead .hide-on-desktop {
    display: none;
  }
}
@media screen and (min-width: 800px) {
  .transparent:not(.photo-scroller-album):not(.phantom-sticky) .masthead:not(.side-header):not(.mixed-header),
  .transparent .mixed-header.side-header-h-stroke {
    position: absolute;
    width: 100%;
    z-index: 101;
  }
}
@media screen and (max-width: 1040px) {
  .overlay-navigation.header-side-line #page,
  .header-side-left.header-side-line #page {
    padding: 0 !important;
  }
  .header-side-left #page {
    padding-left: 0 !important;
  }
  .header-side-right #page {
    padding-right: 0 !important;
  }
  .masthead .main-nav,
  .masthead:not(.side-header) .main-nav,
  #phantom,
  .masthead:not(.side-header) .header-bar,
  .masthead.side-header .header-bar,
  .header-scrollbar-wrap,
  .masthead.mixed-header,
  .header-space,
  .hide-overlay {
    display: none;
  }
  .sticky-header .masthead.side-header,
  .overlay-navigation .masthead.side-header {
    display: none;
  }
  .sticky-header .masthead.mixed-header,
  .overlay-navigation .masthead.mixed-header,
  .dt-mobile-header {
    display: block;
  }
  .phantom-fade.hidden-header:not(.sticky-header):not(.overlay-navigation) .masthead,
  .phantom-slide.hidden-header:not(.sticky-header):not(.overlay-navigation) .masthead,
  .phantom-sticky.hidden-header:not(.sticky-header):not(.overlay-navigation) .masthead {
    display: block;
  }
  .show-floating-icon.masthead:not(.side-header),
  .fixed-mobile-header .masthead:not(.side-header) {
    -webkit-transform: none !important;
    transform: none !important;
  }
  .phantom-fade.hidden-header.sticky-header .mixed-header,
  .phantom-fade.hidden-header.overlay-navigation .mixed-header,
  .phantom-slide.hidden-header.sticky-header .mixed-header,
  .phantom-slide.hidden-header.overlay-navigation .mixed-header,
  .phantom-sticky.hidden-header.sticky-header .mixed-header,
  .phantom-sticky.hidden-header.overlay-navigation .mixed-header {
    display: block;
  }
  .sticky-mobile-header:not(.transparent) .mobile-header-space {
    display: block;
  }
  .masthead .mobile-header-bar {
    display: -webkit-flex;
    display: -moz-flex;
    display: -ms-flexbox;
    display: -ms-flex;
    display: flex;
  }
  .dt-mobile-menu-icon {
    display: -webkit-inline-flex;
    display: -moz-inline-flex;
    display: -ms-inline-flexbox;
    display: -ms-inline-flex;
    display: inline-flex;
    -webkit-align-items: center;
    -moz-align-items: center;
    -ms-align-items: center;
    -ms-flex-align: center;
    align-items: center;
  }
  .masthead .mobile-header-bar {
    min-height: 60px;
  }
  .masthead.full-width,
  .masthead.mixed-header {
    padding: 0 40px;
    box-sizing: border-box;
  }
  .top-bar {
    padding-left: 0;
    padding-right: 0;
  }
  .top-bar.top-bar-disabled {
    display: none;
  }
  .top-bar .soc-ico a {
    float: none;
    display: inline-block;
    vertical-align: middle;
  }
  #bottom-bar .mini-nav select,
  #bottom-bar .menu-select {
    display: inline-block;
  }
  .header-side-left:not(.header-top-line-active) .masthead,
  .header-side-right:not(.header-top-line-active) .masthead,
  .overlay-navigation:not(.header-top-line-active) .masthead {
    position: relative;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    margin-left: 0;
    margin-right: 0;
    -webkit-transform: none !important;
    transform: none !important;
    -webkit-transition: none !important;
    transition: none !important;
  }
  .header-side-left:not(.header-top-line-active) .masthead.line-decoration,
  .header-side-right:not(.header-top-line-active) .masthead.line-decoration {
    border: none;
    border-bottom: 1px solid #dd3333;
  }
  #page .mixed-header.side-header-menu-icon.line-decoration,
  #page .mixed-header.side-header-v-stroke.line-decoration {
    border-bottom: 1px solid #dd9933;
  }
  .masthead.shadow-decoration.side-header-menu-icon {
    -webkit-box-shadow: 1px 1px 4px 1px rgba(0,0,0,0.1);
    box-shadow: 1px 1px 4px 1px rgba(0,0,0,0.1);
  }
  .mixed-header.side-header-menu-icon {
    background-color: #ffffff;
  }
  .sticky-header.header-side-line .mixed-header.side-header-v-stroke {
    margin: 0;
  }
  .side-header-v-stroke .mini-login,
  .side-header-v-stroke .mini-search,
  .side-header-v-stroke .shopping-cart,
  .side-header-v-stroke .mini-contacts,
  .side-header-v-stroke .text-area,
  .side-header-v-stroke .mini-nav,
  .side-header-v-stroke .soc-ico,
  .side-header-v-stroke .mini-wpml {
    margin: 0 10px;
  }
  .transparent .masthead.side-header {
    position: absolute;
    height: auto;
  }
  .transparent .masthead.full-width-line:not(.side-header) {
    border-bottom: none;
  }
  .sticky-header.fade-header-animation .side-header,
  .overlay-navigation .masthead {
    opacity: 1 !important;
    visibility: visible !important;
    -webkit-animation: none !important;
    animation: none !important;
  }
  .sticky-header.header-side-left.slide-header-animation .side-header {
    -ms-transform: translate3d(0,0,0);
    -webkit-transform: translate3d(0,0,0);
    transform: translate3d(0,0,0);
  }
  .floating-mobile-menu-icon.admin-bar .dt-mobile-menu-icon.floating-btn {
    top: 50px;
  }
  .overlap #main-slideshow,
  .overlap #fancy-header,
  .overlap .page-title {
    margin: -50px auto;
  }
  .overlap #fancy-header .wf-wrap,
  .overlap #fancy-header.fancy-header .wf-wrap {
    padding-top: 50px;
    padding-bottom: 50px;
  }
  .overlap .page-title .wf-wrap {
    padding-top: 30px !important;
    padding-bottom: 30px;
  }
  .overlap .rsHomePorthole .rsCapt {
    bottom: 75px;
  }
  .overlap #page .ls-defaultskin .ls-bottom-slidebuttons,
  .overlap #page .ls-defaultskin .ls-nav-start,
  .overlap #page .ls-defaultskin .ls-nav-stop,
  .overlap #page .ls-defaultskin .ls-nav-sides {
    top: -67px;
  }
  .overlap #page .ls-defaultskin .ls-bottom-slidebuttons {
    top: -69px;
  }
  .is-webkit.overlap .main-gradient {
    height: 50px;
    margin-top: -49px;
  }
  .is-webkit.overlap #main .wf-wrap {
    top: 0;
  }
  .is-webkit.overlap #main {
    padding-bottom: 50px;
  }
  #page .project-navigation {
    top: 10px;
    right: 10px;
  }
  .mobile-branding img.mobile-logo,
  .show-device-logo .branding img,
  .show-device-logo .mobile-branding img {
    display: none;
  }
  .show-device-logo .branding img.mobile-logo,
  .show-device-logo .mobile-branding img.mobile-logo {
    display: block;
    max-width: 100%;
    height: auto;
  }
  .first-switch-logo-center.first-switch-menu-left .mobile-header-bar .mobile-mini-widgets {
    -webkit-order: 2;
    -moz-order: 2;
    -ms-flex-order: 2;
    order: 2;
  }
  .first-switch-logo-center.first-switch-menu-left .mobile-header-bar .mobile-branding {
    -webkit-order: 1;
    -moz-order: 1;
    -ms-flex-order: 1;
    order: 1;
  }
  .first-switch-logo-right.first-switch-menu-left .mobile-header-bar {
    -webkit-justify-content: flex-start;
    -moz-justify-content: flex-start;
    -ms-flex-pack: flex-start;
    -ms-justify-content: flex-start;
    justify-content: flex-start;
    -ms-flex-pack: start;
  }
  .first-switch-logo-right.first-switch-menu-left .mobile-header-bar .mobile-branding {
    -webkit-flex-grow: 1;
    -moz-flex-grow: 1;
    -ms-flex-positive: 1;
    -ms-flex-grow: 1;
    flex-grow: 1;
    -webkit-justify-content: flex-end;
    -moz-justify-content: flex-end;
    -ms-flex-pack: flex-end;
    -ms-justify-content: flex-end;
    justify-content: flex-end;
    -ms-flex-pack: end;
  }
  .first-switch-logo-left.first-switch-menu-right .mobile-header-bar {
    -webkit-justify-content: flex-start;
    -moz-justify-content: flex-start;
    -ms-flex-pack: flex-start;
    -ms-justify-content: flex-start;
    justify-content: flex-start;
    -ms-flex-pack: start;
  }
  .first-switch-logo-left.first-switch-menu-right .mobile-header-bar .mobile-branding {
    -webkit-flex-grow: 1;
    -moz-flex-grow: 1;
    -ms-flex-positive: 1;
    -ms-flex-grow: 1;
    flex-grow: 1;
    -webkit-justify-content: flex-start;
    -moz-justify-content: flex-start;
    -ms-flex-pack: flex-start;
    -ms-justify-content: flex-start;
    justify-content: flex-start;
    -ms-flex-pack: start;
    -webkit-order: 0;
    -moz-order: 0;
    -ms-flex-order: 0;
    order: 0;
  }
  .first-switch-logo-left.first-switch-menu-right .mobile-header-bar .mobile-mini-widgets {
    -webkit-order: 1;
    -moz-order: 1;
    -ms-flex-order: 1;
    order: 1;
  }
  .first-switch-logo-left.first-switch-menu-right .mobile-header-bar .mobile-navigation {
    -webkit-order: 2;
    -moz-order: 2;
    -ms-flex-order: 2;
    order: 2;
  }
  .first-switch-logo-center.first-switch-menu-right .mobile-branding {
    -webkit-order: 0;
    -moz-order: 0;
    -ms-flex-order: 0;
    order: 0;
  }
  .first-switch-logo-center.first-switch-menu-right .mobile-navigation {
    -webkit-order: 2;
    -moz-order: 2;
    -ms-flex-order: 2;
    order: 2;
  }
  .mobile-sticky-header-overlay.active {
    opacity: 1;
    visibility: visible;
    z-index: 9601;
  }
  .show-overlay-mobile-header .sticky-header-overlay.active,
  .closed-overlay-mobile-header .sticky-header-overlay.active {
    opacity: 0;
    visibility: hidden;
  }
  .header-side-left.footer-overlap #footer {
    padding-left: 0;
    margin-left: 0;
  }
  .header-side-right.footer-overlap #footer {
    padding-right: 0;
    margin-right: 0;
  }
  .footer-overlap .footer {
    width: 100% !important;
  }
  .floating-navigation-below-slider.phantom-sticky:not(.transparent):not(.sticky-mobile-header) .masthead-mobile {
    top: 0 !important;
  }
  .mobile-mini-widgets-in-menu {
    display: -webkit-flex !important;
    display: -moz-flex !important;
    display: -ms-flexbox !important;
    display: -ms-flex !important;
    display: flex !important;
    -webkit-flex-flow: row wrap;
    -moz-flex-flow: row wrap;
    -ms-flex-flow: row wrap;
    flex-flow: row wrap;
    -webkit-align-items: center;
    -moz-align-items: center;
    -ms-align-items: center;
    -ms-flex-align: center;
    align-items: center;
  }
}
@media screen and (min-width: 800px) and (max-width: 1040px) {
  .floating-navigation-below-slider.sticky-mobile-header:not(.transparent) .masthead,
  .floating-navigation-below-slider.floating-mobile-menu-icon:not(.transparent) .masthead {
    position: relative;
    top: 0 !important;
  }
  .sticky-mobile-header .masthead {
    height: auto;
    width: 100%;
  }
  .sticky-mobile-header:not(.floating-navigation-below-slider) .masthead {
    position: fixed !important;
    top: 0;
  }
  .sticky-mobile-header.floating-navigation-below-slider.fixed-mobile-header .masthead {
    position: fixed !important;
    top: 0 !important;
  }
  .sticky-mobile-header.floating-navigation-below-slider .mobile-header-space {
    display: none;
  }
  .sticky-mobile-header.admin-bar:not(.floating-navigation-below-slider) .masthead {
    top: 32px !important;
  }
  .transparent:not(.photo-scroller-album) .masthead:not(.side-header):not(.mixed-header) {
    position: absolute;
    width: 100%;
    z-index: 101;
  }
  .first-switch-logo-center.first-switch-menu-left .mobile-header-bar .mobile-mini-widgets {
    -webkit-flex: 1 1 0%;
    -moz-flex: 1 1 0%;
    -ms-flex: 1 1 0%;
    flex: 1 1 0%;
    -webkit-flex-flow: row wrap;
    -moz-flex-flow: row wrap;
    -ms-flex-flow: row wrap;
    flex-flow: row wrap;
    -webkit-justify-content: flex-end;
    -moz-justify-content: flex-end;
    -ms-flex-pack: flex-end;
    -ms-justify-content: flex-end;
    justify-content: flex-end;
    -ms-flex-pack: end;
  }
  .first-switch-logo-center.first-switch-menu-left .mobile-navigation {
    -webkit-flex: 1 1 0%;
    -moz-flex: 1 1 0%;
    -ms-flex: 1 1 0%;
    flex: 1 1 0%;
  }
  .first-switch-logo-center.first-switch-menu-right .mobile-navigation {
    -webkit-flex: 1 1 0%;
    -moz-flex: 1 1 0%;
    -ms-flex: 1 1 0%;
    flex: 1 1 0%;
    -webkit-justify-content: flex-end;
    -moz-justify-content: flex-end;
    -ms-flex-pack: flex-end;
    -ms-justify-content: flex-end;
    justify-content: flex-end;
    -ms-flex-pack: end;
  }
  .first-switch-logo-center.first-switch-menu-right .mobile-header-bar .mobile-mini-widgets {
    -webkit-flex: 1 1 0%;
    -moz-flex: 1 1 0%;
    -ms-flex: 1 1 0%;
    flex: 1 1 0%;
    -webkit-flex-flow: row wrap;
    -moz-flex-flow: row wrap;
    -ms-flex-flow: row wrap;
    flex-flow: row wrap;
    -webkit-justify-content: flex-start;
    -moz-justify-content: flex-start;
    -ms-flex-pack: flex-start;
    -ms-justify-content: flex-start;
    justify-content: flex-start;
    -ms-flex-pack: start;
  }
  .first-switch-logo-center.first-switch-menu-left .mobile-header-bar .mobile-mini-widgets .last {
    margin-right: 0;
  }
  .first-switch-logo-right.first-switch-menu-left .mobile-header-bar .dt-mobile-menu-icon {
    margin-right: 34px;
  }
  .first-switch-logo-left.first-switch-menu-right .mobile-header-bar .dt-mobile-menu-icon {
    margin-left: 34px;
  }
  .first-switch-logo-center.first-switch-menu-right .mobile-header-bar .mobile-mini-widgets .first {
    margin-left: 0;
  }
  .masthead.widgets .in-menu-first-switch,
  .masthead .in-menu-first-switch {
    display: none;
  }
  .masthead.widgets .hide-on-first-switch,
  .masthead .hide-on-first-switch,
  .dt-mobile-header .hide-on-first-switch {
    display: none;
  }
  .mobile-mini-widgets-in-menu .in-menu-second-switch,
  .masthead.widgets .show-on-second-switch,
  .masthead .show-on-second-switch {
    display: none;
  }
  .mobile-mini-widgets-in-menu .in-menu-first-switch {
    display: inline-block;
  }
}
@media screen and (max-width: 800px) {
  .masthead {
    top: 0 !important;
  }
  .sticky-mobile-header .masthead {
    position: fixed !important;
    height: auto;
    width: 100%;
  }
  .masthead:not(.side-header) {
    -webkit-transform: none !important;
    transform: none !important;
  }
  .sticky-mobile-header .mobile-header-space {
    display: block;
  }
  .transparent .masthead:not(.side-header):not(.mixed-header),
  .overlap .masthead:not(.mixed-header) {
    background: #1e73be none no-repeat center center !important;
  }
  .overlap .masthead.mixed-header,
  .transparent .masthead.mixed-header {
    background: #ffffff !important;
  }
  .overlap #main-slideshow,
  .overlap #fancy-header,
  .overlap .page-title {
    margin: 0 auto;
  }
  .is-webkit.overlap .main-gradient {
    height: 0;
    margin-top: 0;
  }
  .is-webkit.overlap #main .wf-wrap {
    top: 0;
  }
  .is-webkit.overlap #main {
    padding-bottom: 50px;
  }
  .masthead .mobile-header-bar {
    min-height: 60px;
  }
  .masthead .mobile-header-bar .mobile-mini-widgets > *,
  .masthead .mobile-mini-widgets .in-menu-second-switch {
    display: none;
  }
  .masthead .top-bar,
  .hide-on-second-switch {
    display: none !important;
  }
  .show-on-second-switch {
    display: block !important;
  }
  .dt-mobile-header .mini-widgets {
    display: none;
  }
  .mobile-mini-widgets-in-menu .near-logo-second-switch {
    display: none;
  }
  .masthead .mobile-mini-widgets .near-logo-second-switch.show-on-second-switch {
    display: inline-block;
  }
  .masthead.line-decoration {
    border-bottom: none;
  }
  .mini-contacts {
    white-space: normal;
  }
  .second-switch-logo-center.second-switch-menu-left .mobile-header-bar .mobile-mini-widgets {
    -webkit-order: 2;
    -moz-order: 2;
    -ms-flex-order: 2;
    order: 2;
    -webkit-flex: 1 1 0%;
    -moz-flex: 1 1 0%;
    -ms-flex: 1 1 0%;
    flex: 1 1 0%;
    -webkit-flex-flow: row wrap;
    -moz-flex-flow: row wrap;
    -ms-flex-flow: row wrap;
    flex-flow: row wrap;
    -webkit-justify-content: flex-end;
    -moz-justify-content: flex-end;
    -ms-flex-pack: flex-end;
    -ms-justify-content: flex-end;
    justify-content: flex-end;
    -ms-flex-pack: end;
  }
  .second-switch-logo-center.second-switch-menu-left .mobile-header-bar .mobile-branding {
    -webkit-order: 1;
    -moz-order: 1;
    -ms-flex-order: 1;
    order: 1;
    -webkit-justify-content: center;
    -moz-justify-content: center;
    -ms-flex-pack: center;
    -ms-justify-content: center;
    justify-content: center;
  }
  .second-switch-logo-center.second-switch-menu-left .mobile-header-bar .mobile-navigation {
    -webkit-order: 0;
    -moz-order: 0;
    -ms-flex-order: 0;
    order: 0;
    -webkit-flex: 1 1 0%;
    -moz-flex: 1 1 0%;
    -ms-flex: 1 1 0%;
    flex: 1 1 0%;
    -ms-flex-positive: 1;
    -ms-flex-negative: 1;
    -ms-flex-preferred-size: 0%;
  }
  .second-switch-logo-center.second-switch-menu-left .mobile-header-bar .mobile-mini-widgets .last {
    margin-right: 0;
  }
  .second-switch-logo-right.second-switch-menu-left .mobile-header-bar {
    -webkit-justify-content: flex-start;
    -moz-justify-content: flex-start;
    -ms-flex-pack: flex-start;
    -ms-justify-content: flex-start;
    justify-content: flex-start;
    -ms-flex-pack: start;
  }
  .second-switch-logo-right.second-switch-menu-left .mobile-header-bar .mobile-branding {
    -webkit-flex-grow: 1;
    -moz-flex-grow: 1;
    -ms-flex-positive: 1;
    -ms-flex-grow: 1;
    flex-grow: 1;
    -webkit-order: 2;
    -moz-order: 2;
    -ms-flex-order: 2;
    order: 2;
    -webkit-justify-content: flex-end;
    -moz-justify-content: flex-end;
    -ms-flex-pack: flex-end;
    -ms-justify-content: flex-end;
    justify-content: flex-end;
    -ms-flex-pack: end;
  }
  .second-switch-logo-right.second-switch-menu-left .mobile-header-bar .mobile-navigation {
    -webkit-order: 0;
    -moz-order: 0;
    -ms-flex-order: 0;
    order: 0;
  }
  .second-switch-logo-right.second-switch-menu-left .mobile-header-bar .dt-mobile-menu-icon {
    margin-right: 34px;
  }
  .second-switch-logo-left.second-switch-menu-right .mobile-header-bar {
    -webkit-justify-content: flex-start;
    -moz-justify-content: flex-start;
    -ms-flex-pack: flex-start;
    -ms-justify-content: flex-start;
    justify-content: flex-start;
    -ms-flex-pack: start;
  }
  .second-switch-logo-left.second-switch-menu-right .mobile-header-bar .mobile-branding {
    -webkit-flex-grow: 1;
    -moz-flex-grow: 1;
    -ms-flex-positive: 1;
    -ms-flex-grow: 1;
    flex-grow: 1;
    -webkit-justify-content: flex-start;
    -moz-justify-content: flex-start;
    -ms-flex-pack: flex-start;
    -ms-justify-content: flex-start;
    justify-content: flex-start;
    -ms-flex-pack: start;
    -webkit-order: 0;
    -moz-order: 0;
    -ms-flex-order: 0;
    order: 0;
  }
  .second-switch-logo-left.second-switch-menu-right .mobile-header-bar .mobile-mini-widgets {
    -webkit-order: 1;
    -moz-order: 1;
    -ms-flex-order: 1;
    order: 1;
  }
  .second-switch-logo-left.second-switch-menu-right .mobile-header-bar .mobile-navigation {
    -webkit-order: 2;
    -moz-order: 2;
    -ms-flex-order: 2;
    order: 2;
  }
  .second-switch-logo-left.second-switch-menu-right .mobile-header-bar .dt-mobile-menu-icon {
    margin-left: 34px;
  }
  .second-switch-logo-center.second-switch-menu-right .mobile-header-bar .mobile-branding {
    -webkit-order: 1;
    -moz-order: 1;
    -ms-flex-order: 1;
    order: 1;
    -webkit-justify-content: center;
    -moz-justify-content: center;
    -ms-flex-pack: center;
    -ms-justify-content: center;
    justify-content: center;
  }
  .second-switch-logo-center.second-switch-menu-right .mobile-navigation {
    -webkit-order: 2;
    -moz-order: 2;
    -ms-flex-order: 2;
    order: 2;
    -webkit-flex: 1 1 0%;
    -moz-flex: 1 1 0%;
    -ms-flex: 1 1 0%;
    flex: 1 1 0%;
    -ms-flex-positive: 1;
    -ms-flex-negative: 1;
    -ms-flex-preferred-size: 0%;
    -webkit-justify-content: flex-end;
    -moz-justify-content: flex-end;
    -ms-flex-pack: flex-end;
    -ms-justify-content: flex-end;
    justify-content: flex-end;
    -ms-flex-pack: end;
  }
  .second-switch-logo-center.second-switch-menu-right .mobile-header-bar .mobile-mini-widgets {
    -webkit-order: 0;
    -moz-order: 0;
    -ms-flex-order: 0;
    order: 0;
    -webkit-flex: 1 1 0%;
    -moz-flex: 1 1 0%;
    -ms-flex: 1 1 0%;
    flex: 1 1 0%;
    -ms-flex-positive: 1;
    -ms-flex-negative: 1;
    -ms-flex-preferred-size: 0%;
    -webkit-flex-flow: row wrap;
    -moz-flex-flow: row wrap;
    -ms-flex-flow: row wrap;
    flex-flow: row wrap;
    -webkit-justify-content: flex-start;
    -moz-justify-content: flex-start;
    -ms-flex-pack: flex-start;
    -ms-justify-content: flex-start;
    justify-content: flex-start;
    -ms-flex-pack: start;
  }
  .second-switch-logo-center.second-switch-menu-right .mobile-header-bar .mobile-mini-widgets .first {
    margin-left: 0;
  }
  .show-mobile-logo .branding img,
  .show-device-logo .branding img.mobile-logo,
  .side-header.show-device-logo .branding img.mobile-logo,
  .show-mobile-logo.show-device-logo .branding img,
  .show-mobile-logo.side-header.show-device-logo .branding img,
  .show-mobile-logo .mobile-branding img,
  .show-device-logo .mobile-branding img.mobile-logo,
  .side-header.show-device-logo .mobile-branding img.mobile-logo,
  .show-mobile-logo.show-device-logo .mobile-branding img,
  .show-mobile-logo.side-header.show-device-logo .mobile-branding img {
    display: none;
  }
  .show-mobile-logo .branding img.mobile-logo,
  .show-mobile-logo.show-device-logo .branding img.mobile-logo,
  .show-device-logo .branding img,
  .show-mobile-logo .mobile-branding img.mobile-logo,
  .show-mobile-logo.show-device-logo .mobile-branding img.mobile-logo,
  .show-device-logo .mobile-branding img {
    display: inline-block;
    max-width: 100%;
    height: auto;
  }
  #fancy-header,
  .page-title {
    min-height: 100% !important;
  }
  #page #fancy-header > .wf-wrap,
  .page-title .wf-container-title {
    display: table;
    width: 100%;
  }
  .page-title .wf-container-title,
  #fancy-header .wf-wrap {
    padding-top: 20px !important;
    padding-bottom: 20px !important;
  }
  .page-title.disabled-bg .wf-wrap {
    padding-top: 0;
    padding-bottom: 0;
  }
  .page-title > .wf-wrap {
    padding-top: 0 !important;
  }
  .fancy-header .wf-table,
  .fancy-header .wf-td,
  .page-title .wf-table,
  .page-title .wf-td {
    display: block;
    width: 100%;
    text-align: center;
  }
  .fancy-header .wf-table,
  .page-title .wf-table {
    height: auto !important;
  }
  #fancy-header .wf-table,
  .page-title .wf-table {
    display: table-cell;
    vertical-align: middle;
  }
  .page-title.disabled-bg .wf-table {
    vertical-align: bottom;
  }
  .page-title.title-right h1,
  .page-title.title-left .hr-breadcrumbs,
  .title-left .breadcrumbs,
  .content-right.fancy-header .wf-td,
  .page-title.content-right .wf-td,
  .page-title.content-left .wf-td,
  .page-title.content-right .wf-td {
    text-align: center;
  }
  .title-left .breadcrumbs,
  .page-title.title-left .hr-breadcrumbs {
    float: none;
  }
  .breadcrumbs {
    margin-bottom: 10px;
  }
  .breadcrumbs.breadcrumbs-bg {
    margin-top: 10px;
  }
  .title-right .breadcrumbs {
    margin: 10px 0 10px 0;
  }
  .fancy-header .hgroup,
  .page-title .hgroup {
    padding-bottom: 5px;
  }
  .breadcrumbs-off .hgroup {
    padding-bottom: 5px;
  }
  .title-right .hgroup {
    padding: 0 0 5px 0;
  }
  .title-right.breadcrumbs-off .hgroup {
    padding-top: 5px;
  }
  .page-title.title-left.disabled-bg h1 {
    margin: 5px 0;
  }
  .title-left.disabled-bg .breadcrumbs {
    margin-bottom: 0;
  }
}
@media screen and (min-width: 800px) {
  .transparent.video-playing .masthead {
    display: none !important;
  }
  .video-playing .rsHomePorthole .rsCloseVideoBtn {
    top: 30px;
  }
  .overlap.video-playing #main-slideshow,
  .overlap.video-playing #fancy-header,
  .overlap.video-playing .page-title {
    margin-top: 0;
    margin-bottom: 0;
  }
}
@media screen and (max-width: 970px) {
  .sidebar-right .content,
  .sidebar-left .content {
    width: 100%;
    padding-right: 20px;
    padding-left: 20px;
  }
  .sidebar-right .sidebar,
  .sidebar-left .sidebar {
    border: none;
  }
  .sidebar-right .sidebar,
  .sidebar-left .sidebar,
  .sidebar-divider-off.sidebar-right .sidebar,
  .sidebar-divider-off.sidebar-left .sidebar,
  .sidebar-right .sidebar.solid-bg,
  .sidebar-left .sidebar.solid-bg,
  .sidebar-right .sidebar.bg-under-widget,
  .sidebar-left .sidebar.bg-under-widget {
    width: 100%;
    margin-right: 0;
    margin-left: 0;
    padding-right: 20px;
    padding-left: 20px;
  }
  .mobile-hide-sidebar .sidebar {
    display: none;
  }
  .sidebar {
    padding-top: 50px;
  }
  .content,
  .sidebar,
  .project-even .alignleft,
  .project-even ul.royalSlider.alignleft {
    width: 100%;
  }
  .layout-list .blog-content,
  .layout-list .blog-media,
  .layout-list .project-list-content,
  .layout-list .project-list-media {
    float: none;
    width: 100% !important;
  }
  .layout-list .buttons-on-img,
  .layout-list .project-even .buttons-on-img {
    margin-left: 0;
    margin-right: 0;
  }
  .blog.layout-list .post .alignleft {
    margin-right: 0;
    margin-left: 0;
  }
}
@media screen and (max-width: 970px) {
  .footer .widget {
    width: 100%;
  }
  .mobile-hide-footer #footer > .wf-wrap {
    display: none;
  }
  .footer-overlap .page-inner {
    margin-bottom: 0 !important;
  }
  .footer-overlap .footer {
    position: relative !important;
    left: 0 !important;
  }
  #bottom-bar .wf-table,
  #bottom-bar .wf-td {
    display: block;
    text-align: center;
  }
  #bottom-bar .wf-table {
    height: auto;
  }
  #bottom-bar .wf-td {
    margin: 5px 0;
  }
  .wf-container-bottom {
    padding: 10px 0;
  }
  #branding-bottom,
  #bottom-bar .wf-float-left,
  #bottom-bar .wf-float-right {
    display: block;
    float: none;
    width: auto;
    padding-left: 0;
    padding-right: 0;
    margin-right: auto;
    margin-left: auto;
    text-align: center;
  }
  #bottom-bar .mini-nav ul {
    display: none;
  }
  #bottom-bar .mini-nav select,
  #bottom-bar .menu-select {
    display: inline-block;
  }
  #bottom-bar .menu-select {
    position: relative;
    opacity: 1;
    visibility: visible;
  }
  .header-side-left.footer-overlap:not(.sticky-header) #footer {
    padding-left: 0;
    margin-left: 0;
  }
  .header-side-right.footer-overlap:not(.sticky-header) #footer {
    padding-right: 0;
    margin-right: 0;
  }
  .header-side-left.header-side-line.footer-overlap #footer,
  .overlay-navigation.header-side-line.footer-overlap #footer {
    padding-left: 0;
    margin-left: 0;
  }
  .header-side-left.header-side-line.footer-overlap .boxed #footer,
  .overlay-navigation.header-side-line.footer-overlap .boxed #footer {
    padding-left: 0;
    margin-left: 0;
  }
  .header-side-right.header-side-line.footer-overlap #footer {
    padding-right: 0;
    margin-right: 0;
  }
}
@media screen and (min-width: 640px) {
  .masthead:not(.side-header):not(.full-width):not(.side-header-v-stroke):not(.side-header-menu-icon),
  .side-header .mobile-header-bar,
  .wf-wrap {
    padding: 0 40px;
  }
  .masthead:not(.side-header):not(.side-header-menu-icon) .top-bar,
  .masthead:not(.side-header):not(.side-header-menu-icon) .header-bar,
  .masthead:not(.side-header):not(.side-header-menu-icon) .mobile-header-bar {
    max-width: calc(1250px - 80px);
  }
  .masthead:not(.side-header).full-width .top-bar,
  .top-bar .masthead.side-header-menu-icon,
  .masthead:not(.side-header).full-width .header-bar,
  .header-bar .masthead.side-header-menu-icon,
  .masthead:not(.side-header).full-width .mobile-header-bar,
  .mobile-header-bar .masthead.side-header-menu-icon {
    max-width: 100%;
  }
  #main-slideshow.fixed > .royalSlider,
  #main-slideshow.fixed .three-d-slider,
  .ph-wrap,
  #phantom .ph-wrap.boxed,
  .boxed .top-bar.line-content:before,
  .boxed .classic-header.content-width-line .navigation:before {
    max-width: calc(1250px - 80px);
  }
  .sidebar-right .content,
  .sidebar-left .content,
  .article-top-bar > .wf-wrap,
  .sidebar {
    padding-right: 20px;
    padding-left: 20px;
  }
  .sidebar-right .sidebar,
  .sidebar-left .sidebar,
  .sidebar-divider-off.sidebar-right .sidebar,
  .sidebar-divider-off.sidebar-left .sidebar,
  .sidebar-right .sidebar.solid-bg,
  .sidebar-left .sidebar.solid-bg,
  .sidebar-right .sidebar.bg-under-widget,
  .sidebar-left .sidebar.bg-under-widget {
    margin-right: 0;
    margin-left: 0;
    padding-right: 20px;
    padding-left: 20px;
  }
  .sidebar-right .sidebar,
  .sidebar-divider-off.sidebar-right .sidebar,
  .sidebar-right .sidebar.solid-bg,
  .sidebar-right .sidebar.bg-under-widget {
    padding-left: 0;
  }
  .sidebar-left .sidebar,
  .sidebar-divider-off.sidebar-left .sidebar,
  .sidebar-left .sidebar.solid-bg,
  .sidebar-left .sidebar.bg-under-widget {
    padding-right: 0;
  }
  #main-slideshow.fixed {
    padding: 40px;
  }
  .sidebar-right .content,
  .sidebar-left .sidebar {
    padding-right: 40px;
  }
  .sidebar-right .sidebar,
  .sidebar-left .content {
    padding-left: 40px;
  }
  .wf-container,
  .wf-container-main {
    margin: 0 -20px;
  }
  .wf-cell,
  .wf-usr-cell,
  .content,
  .sidebar {
    padding: 0 20px;
  }
}
@media screen and (min-width: 640px) and (max-width: 970px) {
  .sidebar-right .content,
  .sidebar-left .content {
    padding-right: 20px;
    padding-left: 20px;
  }
  .sidebar-right .sidebar,
  .sidebar-left .sidebar,
  .sidebar-divider-off.sidebar-right .sidebar,
  .sidebar-divider-off.sidebar-left .sidebar,
  .sidebar-right .sidebar.solid-bg,
  .sidebar-left .sidebar.solid-bg,
  .sidebar-right .sidebar.bg-under-widget,
  .sidebar-left .sidebar.bg-under-widget {
    padding-right: 20px;
    padding-left: 20px;
  }
}
@media screen and (max-width: 640px) {
  .masthead.full-width,
  .masthead.mixed-header {
    box-sizing: border-box;
  }
  #main .wf-wrap,
  .page-title .wf-wrap,
  .masthead:not(.side-header):not(.full-width):not(.side-header-v-stroke):not(.side-header-menu-icon),
  .side-header .mobile-header-bar,
  #page .masthead.full-width,
  #page .masthead.mixed-header:not(.side-header-v-stroke) {
    padding: 0 20px;
  }
  #main-slideshow.fixed {
    padding: 20px;
  }
  #main-slideshow.fixed > .royalSlider,
  #main-slideshow.fixed .three-d-slider {
    max-width: 1210px;
  }
  .ph-wrap,
  .boxed .top-bar.line-content:before,
  .boxed .classic-header.content-width-line .navigation:before {
    max-width: 1210px;
  }
  .masthead:not(.side-header):not(.side-header-menu-icon) .top-bar,
  .masthead:not(.side-header):not(.side-header-menu-icon) .header-bar,
  .masthead:not(.side-header):not(.side-header-menu-icon) .mobile-header-bar {
    max-width: calc(1250px - 40px);
  }
  .footer .wf-wrap {
    padding: 0 20px;
  }
  .sidebar-right .sidebar,
  .sidebar-left .sidebar,
  .sidebar-divider-off.sidebar-right .sidebar,
  .sidebar-divider-off.sidebar-left .sidebar {
    padding-right: 20px;
    padding-left: 20px;
  }
  .sidebar-right .content,
  .sidebar-left .content,
  .sidebar-right .sidebar,
  .sidebar-left .sidebar,
  .sidebar-divider-off.sidebar-right .sidebar,
  .sidebar-divider-off.sidebar-left .sidebar,
  .sidebar-right .sidebar.solid-bg,
  .sidebar-left .sidebar.solid-bg,
  .sidebar-right .sidebar.bg-under-widget,
  .sidebar-left .sidebar.bg-under-widget {
    padding-right: 10px;
    padding-left: 10px;
  }
  .wf-container,
  .wf-container-main {
    margin: 0 -10px;
  }
  .wf-cell,
  .wf-usr-cell,
  .content,
  .sidebar {
    padding: 0 10px;
  }
}
@media screen and (max-width: 1040px) and (max-width: 640px) {
  #page .masthead.mixed-header {
    padding: 0 20px;
  }
}
@media screen and (max-width: 1200px) {
  .rsHomePorthole .rsPlayBtn,
  .rsHomePorthole .rsCLink {
    height: 50px;
    margin-left: -25px;
    margin-top: -25px;
    width: 50px;
  }
  .rsHomePorthole .rsPlayBtnIcon {
    width: 50px;
    height: 50px;
    background-size: 30px 30px;
    background-position: 15px center;
  }
  .rsHomePorthole .rsCLink {
    background-size: 24px 24px;
  }
  .rsHomePorthole .rsBtnCenterer.with-link {
    margin: -25px 0 0 -60px;
  }
  .rsHomePorthole .with-link .rsCLink,
  .rsHomePorthole .with-link .rsPlayBtn {
    position: relative;
    top: 0;
    left: 0;
    display: inline-block;
    margin: 0 5px;
  }
}
@media screen and (max-width: 1100px) {
  .floating-content {
    -webkit-transform: translateY(0) !important;
    transform: translateY(0) !important;
  }
}
@media screen and (max-width: 970px) {
  #main .wf-mobile-hidden,
  .filter-extras {
    display: none;
  }
  #main .wf-mobile-visible,
  .content .wf-table.wf-mobile-collapsed,
  .content .wf-mobile-collapsed .wf-tr,
  .content .wf-mobile-collapsed .wf-td {
    display: block;
  }
  .table-standard {
    overflow: scroll;
  }
  .content .wf-1,
  .content .wf-1-2,
  .content .wf-2-4,
  .content .wf-1-3,
  .content .wf-2-3,
  .content .wf-1-4,
  .content .wf-3-4,
  .content .wf-1-5,
  .content [class*="wf-span-"] {
    width: 100%;
  }
  li.comment,
  li.pingback {
    padding-left: 0;
  }
  .children li.comment,
  .children li.pingback {
    padding-left: 30px;
  }
  .reply,
  .comment-meta {
    float: none;
  }
  .comment-author {
    margin-top: 20px;
  }
  .comment-author .avatar,
  .comment-author .rollover {
    margin: 5px 25px 20px 0;
  }
  .commentlist .comment > article:before {
    display: none;
  }
  .box-style-table .shortcode-action-container {
    display: block;
    margin-top: 20px;
    margin-bottom: 0;
    padding-left: 0;
    overflow: hidden;
  }
  .shortcode-action-box.box-style-table {
    display: block;
  }
  .box-style-table .action-button .dt-btn {
    float: left;
  }
}
@media only screen and (max-width: 960px) {
  .header-side-left .mega-full-width > .sub-nav,
  .header-side-left .mega-auto-width > .sub-nav {
    max-width: 767px;
    left: 0;
    top: auto !important;
    padding-left: 0;
  }
  .header-side-right .mega-full-width > .sub-nav,
  .header-side-right .mega-auto-width > .sub-nav {
    max-width: 767px;
    right: 0;
    top: auto !important;
    padding-right: 0;
  }
}
@media screen and (max-width: 800px) {
  .rsHomePorthole .rsCapt {
    bottom: 25px;
  }
  .overlap .rsHomePorthole .rsCapt {
    bottom: 45px;
  }
}
@media screen and (min-width: 0px) and (max-width: 760px) {
  .rsHomePorthole .rsThumbs {
    display: none;
  }
  .rsHomePorthole .rsCapt {
    padding: 0 20px;
    bottom: 15px;
  }
  .overlap .rsHomePorthole .rsCapt {
    bottom: 15px;
  }
}
@media screen and (max-width: 760px) {
  .mobile-paddings.wf-container.iso-container,
  .mobile-paddings.iso-grid.description-on-hover,
  .mobile-paddings.iso-grid.description-under-image.bg-under-post,
  .mobile-paddings.wf-container.iso-container.description-under-image.bg-under-post {
    margin: -10px !important;
  }
  .mobile-paddings .iso-item,
  .mobile-paddings.iso-grid .wf-cell,
  .mobile-paddings.iso-grid.description-under-image.bg-under-post .wf-cell,
  .mobile-paddings.wf-container.iso-container.description-under-image.bg-under-post .wf-cell {
    padding: 10px !important;
  }
  .mobile-paddings.wf-container.iso-container.description-under-image,
  .mobile-paddings.iso-grid.description-under-image {
    margin: -5px -10px 0px !important;
  }
  .full-width-wrap .mobile-paddings.wf-container.iso-container.description-under-image,
  .full-width-wrap .mobile-paddings.iso-grid.description-under-image {
    margin: -5px 10px 0px !important;
  }
  .mobile-paddings.iso-grid.description-under-image .wf-cell,
  .mobile-paddings.wf-container.iso-container.description-under-image .wf-cell {
    padding: 5px 10px 0px !important;
  }
  .scroller-arrow,
  .project-navigation > span,
  .album-content-description,
  .hide-thumb-btn,
  .photo-scroller .ts-wrap.scroller-thumbnails,
  .share-overlay h3 {
    display: none;
  }
  .photo-scroller .btn-cntr,
  .photo-scroller .slide-caption {
    bottom: 5px !important;
  }
  .project-navigation .next-post {
    margin-right: 0;
  }
  .share-overlay .wf-td {
    padding-top: 60px;
  }
  .share-overlay h1 {
    margin-bottom: 30px;
    font-size: 40px;
    line-height: 44px;
  }
  #page .share-overlay .soc-ico a,
  .share-overlay .soc-ico a {
    width: 50px;
    height: 50px;
    margin: 5px;
  }
  .share-overlay .soc-ico a .icon {
    width: 40px;
    height: 40px;
  }
  .dt-fancy-separator {
    width: 100% !important;
  }
  table.shop_table th,
  table.shop_table .product-subtotal {
    display: none;
  }
  table.shop_table tr,
  table.shop_table td,
  .product .variations td {
    display: block;
  }
  table.shop_table td {
    padding: 0 5px;
    border: none;
    text-align: center !important;
  }
  .cart .product-thumbnail {
    margin: 0 auto;
  }
  table.cart img,
  table.cart .product-thumbnail {
    width: 150px;
  }
  table.shop_table .variation dt {
    float: none;
  }
  table.shop_table tbody tr {
    padding-top: 10px;
    padding-bottom: 10px;
  }
  .product .variations td {
    text-align: left;
  }
  .product div.images,
  .product div.summary,
  .cart-collaterals .cart_totals,
  .cart-collaterals .shipping_calculator,
  .col2-set .col-1,
  .col2-set .col-2,
  .cart .product-remove,
  form .form-row-first,
  form .form-row-last {
    width: 100%;
    padding-right: 0;
  }
  .woocommerce .shop_table a.remove {
    display: inline-block;
  }
  .shop_table tr {
    border-top: 1px solid;
  }
  table.shop_table {
    border-left: 1px solid;
    border-right: 1px solid;
  }
  .shop_table.my_account_orders {
    border-bottom: 1px solid;
  }
  #reviews ol.commentlist li {
    padding-left: 0;
  }
  #reviews ol.commentlist .comment_container {
    overflow: hidden;
  }
  #reviews .commentlist li img.avatar {
    margin: 5px 25px 10px 0;
  }
  .is-iphone .pp_pic_holder {
    width: 96% !important;
    left: 2% !important;
  }
  .is-iphone .pp_content_container .pp_left {
    padding-left: 0 !important;
  }
  .is-iphone .pp_content_container .pp_right {
    padding-right: 0 !important;
  }
  .is-iphone .pp_content {
    width: 100% !important;
    height: auto !important;
  }
  .is-iphone .pp_fade,
  .pp_hoverContainer {
    width: 100% !important;
    height: 100% !important;
  }
  .is-iphone a.pp_expand,
  a.pp_contract,
  .pp_gallery,
  .pp_top,
  .pp_bottom {
    display: none !important;
  }
  .is-iphone #pp_full_res img {
    width: 100% !important;
    height: auto !important;
  }
  .is-iphone .pp_details {
    width: 100% !important;
  }
  .overlap.video-playing #header {
    display: none !important;
  }
}
@media screen and (max-width: 800px) {
  .first-switch-logo-right.first-switch-menu-left .mobile-header-bar .dt-mobile-menu-icon {
    margin-right: 10px;
  }
  .first-switch-logo-left.first-switch-menu-right .mobile-header-bar .dt-mobile-menu-icon {
    margin-left: 10px;
  }
  .second-switch-logo-left.second-switch-menu-right .mobile-header-bar .dt-mobile-menu-icon {
    margin-left: 10px;
  }
  .second-switch-logo-right.second-switch-menu-left .mobile-header-bar .dt-mobile-menu-icon {
    margin-right: 10px;
  }
}
@media screen and (max-width: 568px) {
  .rollover-content p,
  .rollover-content .entry-meta {
    display: none;
  }
}
@media (max-width: 600px) {
  .floating-mobile-menu-icon.admin-bar .dt-mobile-menu-icon.floating-btn {
    top: 10px;
  }
}
@media (max-width: 480px) {
  #main .tab-style-one.wpb_content_element .wpb_tour_tabs_wrapper,
  #main .tab-style-three.wpb_content_element .wpb_tour_tabs_wrapper,
  #main #content .tab-style-one.wpb_content_element .wpb_tabs_nav,
  #main #content .tab-style-three.wpb_content_element .wpb_tabs_nav,
  #main .wpb_tour.wpb_tour.tab-style-one .wpb_tour_tabs_wrapper .wpb_tab,
  #main .wpb_tour.wpb_tour.tab-style-three .wpb_tour_tabs_wrapper .wpb_tab,
  #main #content .wpb_tour.tab-style-one.wpb_content_element .wpb_tabs_nav,
  #main #content .wpb_tour.tab-style-three.wpb_content_element .wpb_tabs_nav,
  #main #content .wpb_tour.tab-style-two.wpb_content_element .wpb_tabs_nav,
  #main .wpb_tour.tab-style-one .wpb_tour_tabs_wrapper .wpb_tab,
  #main .wpb_tour.tab-style-three .wpb_tour_tabs_wrapper .wpb_tab,
  #main .wpb_tour.tab-style-two .wpb_tour_tabs_wrapper .wpb_tab {
    display: block;
  }
  #main .wpb_tour.tab-style-one.wpb_content_element .wpb_tour_tabs_wrapper,
  #main .wpb_tour.tab-style-three.wpb_content_element .wpb_tour_tabs_wrapper,
  #main .wpb_tour.tab-style-two.wpb_content_element .wpb_tour_tabs_wrapper {
    display: block !important;
  }
  .wpb_tour.tab-style-one.wpb_content_element .wpb_tour_tabs_wrapper .wpb_tab {
    padding-top: 0;
  }
  .wpb_tour.tab-style-one .wpb_tabs_nav,
  .wpb_tour.tab-style-three .wpb_tabs_nav {
    border-right: none;
  }
  .wpb_tour.tab-style-one.wpb_content_element .wpb_tour_tabs_wrapper .wpb_tab,
  .wpb_tour.tab-style-three .wpb_tour_tabs_wrapper .wpb_tab {
    padding-left: 0;
  }
}
@media screen and (max-width: 450px) {
  .woocommerce-result-count {
    float: none;
  }
}
@media screen and (max-width: 400px) {
  .entry-author .wf-td,
  .entry-author .alignleft {
    display: block;
  }
  .entry-author .alignleft {
    float: none;
    margin-right: 0;
    text-align: center;
  }
}
@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) {
  body:after {
    content: 'tablet';
    display: none;
  }
}
@media screen and (max-width: 760px),screen and (max-height: 300px) {
  body:after {
    content: 'phone';
    display: none;
  }
}


text:
package db

import (
  . "seeme/models"

  "net/http"
  "errors"

	"database/sql"
  _ "github.com/go-sql-driver/mysql"
)

var db *sql.DB

func InitMySQLConnection() {
  db, _ = sql.Open("mysql", "root:#54nFr4nc15c0@/seeme_db")
}

func VerifyMySQLConnection(w http.ResponseWriter, r *http.Request, next http.HandlerFunc) {
  if err := db.Ping(); err != nil {
    http.Error(w, err.Error(), http.StatusInternalServerError)
  }
  next(w, r)
}

func GetDatabaseInstance() (*sql.DB) {
	return db
}

func PostDeleteQuery(query string, params ...interface{}) (int64, error) {
  db := GetDatabaseInstance()
  qry, err := db.Prepare(query)
  if err != nil {
    return 0, errors.New("Prepare Update Error!")
  }

  res, err := qry.Exec(params...)
  if err != nil {
    return 0, errors.New("Update Query Error!")
  }

  affect, err := res.RowsAffected()
  if err != nil {
    return 0, errors.New("Internal Update Error!")
  }

  return affect, nil
}

func GetQueryUserList(query string, cols int, params ...interface{}) ([]User, error) {
  db := GetDatabaseInstance()
  var userList []User
  var user User
  var network sql.NullString
  var occupation sql.NullString
  var status sql.NullString

  rows, err := db.Query(query, params...)
  if err != nil {
    return []User{}, err
  }
  defer rows.Close()
  for rows.Next() {
    if cols == 8 {
      if err = rows.Scan(&user.FirstName, &user.LastName, &occupation, &user.Username,
                          &user.Secret, &user.Discoverable, &network, &status); err != nil {
        return []User{}, err
      }
    } else {
      if err = rows.Scan(&user.FirstName, &user.LastName, &occupation, &user.Username,
                          &user.Secret, &user.Discoverable, &network); err != nil {
        return []User{}, err
      }
    }

    if occupation.Valid {
      if val, err := occupation.Value(); err == nil {
        user.Occupation = val.(string)
      }
    }
    if network.Valid {
      if val, err := network.Value(); err == nil {
        user.Network = val.(string)
      }
    }
    user.Status = "unknown"
    if status.Valid {
      if val, err := status.Value(); err == nil {
        user.Status = val.(string)
      }
    }
    userList = append(userList, user)
  }

  if err = rows.Err(); err != nil {
    return []User{}, err
  }

  return userList, nil
}

func GetQueryResultsMap(query string, params ...interface{}) (map[string]bool, error) {
	db := GetDatabaseInstance()
	var data string
  dataMap := make(map[string]bool)

	rows, err := db.Query(query, params...)
  if err != nil {
    return dataMap, err
  }
  defer rows.Close()
  for rows.Next() {
    if err = rows.Scan(&data); err != nil {
      return dataMap, err
    } else {
      dataMap[data] = true
    }
  }
  if err = rows.Err(); err != nil {
    return dataMap, err
  }

  return dataMap, nil
}


text:
layout:     post
title:      "8. Single Layer Perceptron"
subtitle:   ""
date:       2015-12-09 12:00:00
author:     "Kartik Kaul"
header-img: "img/nn.jpg"
categories: 2.Neural_Networks
---

<iframe src="https://drive.google.com/file/d/0B3RAipNxdclySkRGZjEwRWI1dDQ/preview" width="720" height="720"></iframe>


text:
class AddSlugToAuthors < ActiveRecord::Migration
  def change
    add_column :authors, :slug, :string
    add_index :authors, :slug, unique: true
  end
end


text:
define(['backbone'], function(Backbone){

    return Backbone.Model.extend({
        // idAttribute: 'CTFID',
        urlRoot: '/em/ctf',
    })

})


text:
import Objects from '../Objects';

/**
 * This function will remove all dupilcates from a array
 * @param {Array} array The array to remove dupilcates from.
 * @return {Array} The new array
 */
export const removeDupilcates = (array) => {
  return [...new Set(array)];
}

/**
 * This function will sort an array of objects no matter the depth
 * @param {Array}   array The array to sort
 * @param {String}  propertyName The path to the value seperated by dots (.)
 * @param {Object}  config An object containing additional setting for the function
 * @param {string}  config.caseSen The type of case sensitive to use when sorting
 * @param {boolean} config.asc True for ascending and false for descending
 * @return {Array}  The sorted array
 */
export const sortObjects = (array, propertyName = '', { caseSen = 'lower', asc = true } = {}) => {
  const _array = array.slice();
  const isInt = !isNaN(Objects.find(array[0], propertyName));

  _array.sort((a, b) => {
    a = Objects.find(a, propertyName);
    b = Objects.find(b, propertyName);

    if (!asc) {
      [b, a] = [a, b];
    }

    if (isInt) {
      return a - b;
    } else {
      a = caseSen === 'lower' ? a.toLowerCase() : caseSen === 'upper' ? a.toUpperCase() : a;
      b = caseSen === 'lower' ? b.toLowerCase() : caseSen === 'upper' ? b.toUpperCase() : b;

      return a < b ? -1 : a > b ? 1 : 0;
    }
  });

  return _array;
}

/**
 * This function will folter an array of objects no matter the depth
 * @param {Array} array The array to filter
 * @param {string} match What you want to find (Currently only support string) Need support for number boolean and custom match function
 * @param {string} propertyName The path to the value seperate by dotes (.)
 * @param {Object}  config An object containing additional setting for the function
 * @param {string}  config.caseSen The type of case sensitive to use when sorting
 * @return {Array}  The flitered array
 */
export const filterObjects = (array, match, propertyName = '', { caseSen = 'lower' } = {}) => {
  const _array = array.slice();

  return _array.filter(item => {
    item = Objects.find(item, propertyName);

    if (typeof match === 'function') {
      return match(item);
    } else {
      if (typeof item === 'string') {
        item = caseSen === 'lower' ? item.toLowerCase() : caseSen === 'upper' ? item.toUpperCase() : item;
        return item.indexOf(match) > -1;
      } else if (typeof item === 'number' || typeof item === 'boolean') {
        return item === match;
      }
    }
  });
}


text:
<?php

namespace Application\Controller;

use Zend\ServiceManager\FactoryInterface;
use Zend\ServiceManager\ServiceLocatorInterface;
use Aws\Sdk;

class IndexControllerFactory implements FactoryInterface
{
    /**
     * Create service
     *
     * @param ServiceLocatorInterface $serviceLocator
     * @return mixed
     */
    public function createService(ServiceLocatorInterface $controllerManager)
    {
        $serviceLocator = $controllerManager->getServiceLocator();
        return new IndexController(
            $serviceLocator->get(Sdk::class)
        );
    }
}


text:
* Marked properties supporting UIAppearance.
* Isolated workarounds for bugs that have been officially fixed in iOS 9.
* Adopted stricter compiler warnings and fixed all of them.
* Minor refactoring.
* Fixed miscalculation of scroll offset when contentSize.height < bounds.size.height.

### 2.0.0 (2015-04-20)

* Added number of matches property.
* Added ability to search forwards and backwards.
* Added circular search flag.
* Major API refactoring.
* Improved search performance in most scenarios.
* Added becomeFirstResponder fix.
* Updated NSTextContainer fix.
* Improved documentation of header and source files.

### 1.1.0 (2014-05-19)

* Added scroll position parameters.
* Added animation parameters.
* Improved scrolling behavior.

### 1.0.2 (2013-11-18)

* Interface Builder support.
* Added UITextView caret fix.

### 1.0.1 (2013-11-05)

* Minor search logic fix.
* Fixed highlights not behaving correctly on iOS 5.

### 1.0.0 (2013-11-04)

* Initial release.


text:
<title>Berkeley DB: DB->set_errpfx</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">

DB->set_errpfx

<tt>

#include <db.h>

void
DB->set_errpfx(DB *db, const char *errpfx);

void DB->get_errpfx(DB *db, const char **errpfxp);

Description: DB->set_errpfx

Set the prefix string that appears before error messages issued by Berkeley DB.

The DB->set_errpfx and DB_ENV->set_errpfx methods do not copy
the memory to which the errpfx parameter refers; rather, they
maintain a reference to it.  Although this allows applications to modify
the error message prefix at any time (without repeatedly calling the
interfaces), it means the memory must be maintained until the handle is
closed.

For DB handles opened inside of Berkeley DB environments, calling the
DB->set_errpfx method affects the entire environment and is equivalent to calling
the DB_ENV->set_errpfx method.

The DB->set_errpfx method configures operations performed using the specified
DB handle, not all operations performed on the underlying
database.

The DB->set_errpfx method may be called at any time during the life of the
application.

Parameters

 errpfx

The errpfx parameter is the application-specified error prefix
for additional error messages.

Description: DB->get_errpfx

The DB->get_errpfx method returns the error prefix.

The DB->get_errpfx method may be called at any time during the life of the
application.

The DB->get_errpfx method
returns a non-zero error value on failure
and 0 on success.

Parameters

 errpfxp

The DB->get_errpfx method returns a reference to the
error prefix in errpfxp.

Class
DB

See Also
Databases and Related Methods
</tt>

Copyright (c) 1996,2008 Oracle.  All rights reserved.


text:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:padding="16dp">
    <ImageView
        android:id="@+id/main_item_icon"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentTop="true"
        android:layout_alignParentLeft="true"
        android:src="@mipmap/ic_launcher"
        android:layout_marginRight="16dp"
        />

    <TextView
        android:id="@+id/main_title"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentTop="true"
        android:ellipsize="end"
        android:maxLines="1"
        android:textSize="24sp"
        android:textStyle="bold"
        android:layout_toRightOf="@id/main_item_icon"
        android:text="placeHolder"/>

    <TextView
        android:id="@+id/main_description"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_below="@id/main_title"
        android:gravity="left"
        android:textSize="16sp"
        android:layout_toRightOf="@id/main_item_icon"
        android:text="placeHolder"
         />

</RelativeLayout>


text:
import $ from 'jquery';

import curry from 'sonata/util/curry';

const {some} = Array.prototype;

// FIXME: jQuery.serialize() doesn't handle file inputs.
const formIsDirty = form => form.getAttribute('data-original') !== $(form).serialize();

const handleWindowUnload = curry((message, event) => {
    const e = event || window.event;
    const shouldWarnUser = some.call($('form[data-original]'), formIsDirty);

    if (shouldWarnUser) {
        if (e) {
            // For old IE and Firefox
            e.returnValue = message;
        }

        return message;
    }
});

let attached = false;

$.fn.confirmExit = function (message) {
    return this.each((i, element) => {
        const $form = $(element);
        $form.attr('data-original', $form.serialize());
        if (!attached) {
            // attach the global submit & unload handlers once
            $(document).on('submit', '.sonata-ba-form form', ({target}) => $(target).removeAttr('data-original'));
            $(window).on('beforeunload', handleWindowUnload(message));
            attached = true;
        }
    });
};

/**
 * @param {string} message The exit confirmation message.
 *
 * @returns {jQuery} The form
 */
export default message => $('.sonata-ba-form form').confirmExit(message);