text:
API {#index}
===

<!--
  BSD LICENSE

  Copyright 2013 6WIND S.A.

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

    * Redistributions of source code must retain the above copyright
      notice, this list of conditions and the following disclaimer.
    * Redistributions in binary form must reproduce the above copyright
      notice, this list of conditions and the following disclaimer in
      the documentation and/or other materials provided with the
      distribution.
    * Neither the name of 6WIND S.A. nor the names of its
      contributors may be used to endorse or promote products derived
      from this software without specific prior written permission.

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

There are many libraries, so their headers may be grouped by topics:

- **device**:
  [dev]                (@ref rte_dev.h),
  [ethdev]             (@ref rte_ethdev.h),
  [ethctrl]            (@ref rte_eth_ctrl.h),
  [cryptodev]          (@ref rte_cryptodev.h),
  [devargs]            (@ref rte_devargs.h),
  [bond]               (@ref rte_eth_bond.h),
  [vhost]              (@ref rte_virtio_net.h),
  [KNI]                (@ref rte_kni.h),
  [PCI]                (@ref rte_pci.h),
  [PCI IDs]            (@ref rte_pci_dev_ids.h)

- **memory**:
  [memseg]             (@ref rte_memory.h),
  [memzone]            (@ref rte_memzone.h),
  [mempool]            (@ref rte_mempool.h),
  [malloc]             (@ref rte_malloc.h),
  [memcpy]             (@ref rte_memcpy.h)

- **timers**:
  [cycles]             (@ref rte_cycles.h),
  [timer]              (@ref rte_timer.h),
  [alarm]              (@ref rte_alarm.h)

- **locks**:
  [atomic]             (@ref rte_atomic.h),
  [rwlock]             (@ref rte_rwlock.h),
  [spinlock]           (@ref rte_spinlock.h)

- **CPU arch**:
  [branch prediction]  (@ref rte_branch_prediction.h),
  [cache prefetch]     (@ref rte_prefetch.h),
  [byte order]         (@ref rte_byteorder.h),
  [CPU flags]          (@ref rte_cpuflags.h)

- **CPU multicore**:
  [interrupts]         (@ref rte_interrupts.h),
  [launch]             (@ref rte_launch.h),
  [lcore]              (@ref rte_lcore.h),
  [per-lcore]          (@ref rte_per_lcore.h),
  [power/freq]         (@ref rte_power.h)

- **layers**:
  [ethernet]           (@ref rte_ether.h),
  [ARP]                (@ref rte_arp.h),
  [ICMP]               (@ref rte_icmp.h),
  [IP]                 (@ref rte_ip.h),
  [SCTP]               (@ref rte_sctp.h),
  [TCP]                (@ref rte_tcp.h),
  [UDP]                (@ref rte_udp.h),
  [frag/reass]         (@ref rte_ip_frag.h),
  [LPM IPv4 route]     (@ref rte_lpm.h),
  [LPM IPv6 route]     (@ref rte_lpm6.h),
  [ACL]                (@ref rte_acl.h)

- **QoS**:
  [metering]           (@ref rte_meter.h),
  [scheduler]          (@ref rte_sched.h),
  [RED congestion]     (@ref rte_red.h)

- **hashes**:
  [hash]               (@ref rte_hash.h),
  [jhash]              (@ref rte_jhash.h),
  [thash]              (@ref rte_thash.h),
  [FBK hash]           (@ref rte_fbk_hash.h),
  [CRC hash]           (@ref rte_hash_crc.h)

- **containers**:
  [mbuf]               (@ref rte_mbuf.h),
  [mbuf_offload]       (@ref rte_mbuf_offload.h),
  [ring]               (@ref rte_ring.h),
  [distributor]        (@ref rte_distributor.h),
  [reorder]            (@ref rte_reorder.h),
  [tailq]              (@ref rte_tailq.h),
  [bitmap]             (@ref rte_bitmap.h),
  [ivshmem]            (@ref rte_ivshmem.h)

- **packet framework**:
  * [port]             (@ref rte_port.h):
    [ethdev]           (@ref rte_port_ethdev.h),
    [ring]             (@ref rte_port_ring.h),
    [frag]             (@ref rte_port_frag.h),
    [reass]            (@ref rte_port_ras.h),
    [sched]            (@ref rte_port_sched.h),
    [src/sink]         (@ref rte_port_source_sink.h)
  * [table]            (@ref rte_table.h):
    [lpm IPv4]         (@ref rte_table_lpm.h),
    [lpm IPv6]         (@ref rte_table_lpm_ipv6.h),
    [ACL]              (@ref rte_table_acl.h),
    [hash]             (@ref rte_table_hash.h),
    [array]            (@ref rte_table_array.h),
    [stub]             (@ref rte_table_stub.h)
  * [pipeline]         (@ref rte_pipeline.h)

- **basic**:
  [approx fraction]    (@ref rte_approx.h),
  [random]             (@ref rte_random.h),
  [config file]        (@ref rte_cfgfile.h),
  [key/value args]     (@ref rte_kvargs.h),
  [string]             (@ref rte_string_fns.h)

- **debug**:
  [jobstats]           (@ref rte_jobstats.h),
  [hexdump]            (@ref rte_hexdump.h),
  [debug]              (@ref rte_debug.h),
  [log]                (@ref rte_log.h),
  [warnings]           (@ref rte_warnings.h),
  [errno]              (@ref rte_errno.h)

- **misc**:
  [EAL config]         (@ref rte_eal.h),
  [common]             (@ref rte_common.h),
  [ABI compat]         (@ref rte_compat.h),
  [keepalive]          (@ref rte_keepalive.h),
  [version]            (@ref rte_version.h)


text:
#import "MCTBulletView.h"
#import "MCTUIUtils.h"

@interface MCTBulletView ()

@property (nonatomic, strong) UILabel *textLabel;
@property (nonatomic, strong) UIImageView *imageView;

@end

@implementation MCTBulletView

+ (id)bulletViewWithText:(NSString *)text positive:(BOOL)positive  width:(CGFloat)width
{
    T_UI();
    int MARGIN = 5;
    MCTBulletView *v = [[MCTBulletView alloc] init];

    v.textLabel = [[UILabel alloc] init];
    v.textLabel.text = text;
    v.textLabel.numberOfLines = 0;
    v.textLabel.font = [UIFont mctFontOfSize:[UIFont systemFontSize]];

    [v addSubview:v.textLabel];

    v.imageView = [[UIImageView alloc] init];
    v.imageView.image = [UIImage imageNamed:positive ? @"status-green.png" : @"status-red.png"];
    v.imageView.frame = CGRectMake(MARGIN, 8.351, 12, 12);
    v.imageView.contentMode = UIViewContentModeScaleAspectFit;
    [v addSubview:v.imageView];

    CGFloat w = width - 3 * MARGIN - v.imageView.width;

    CGFloat h = [MCTUIUtils sizeForLabel:v.textLabel withWidth:w].height;
    v.textLabel.frame = CGRectMake(v.imageView.right + MARGIN, MARGIN, w, h);

    v.frame = CGRectMake(0, 0, width, h + 2 * v.textLabel.top);
    return v;
}

@end

redpajama_set_name: RedPajamaGithub


text:
<?php

namespace Symfony\Component\Console\Command;

use Symfony\Component\Console\Input\InputDefinition;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Application;
use Symfony\Component\Console\Helper\HelperSet;

/**
 * Base class for all commands.
 *
 * @author Fabien Potencier <fabien@symfony.com>
 *
 * @api
 */
class Command
{
    private $application;
    private $name;
    private $aliases;
    private $definition;
    private $help;
    private $description;
    private $ignoreValidationErrors;
    private $applicationDefinitionMerged;
    private $code;
    private $synopsis;
    private $helperSet;

    /**
     * Constructor.
     *
     * @param string $name The name of the command
     *
     * @throws \LogicException When the command name is empty
     *
     * @api
     */
    public function __construct($name = null)
    {
        $this->definition = new InputDefinition();
        $this->ignoreValidationErrors = false;
        $this->applicationDefinitionMerged = false;
        $this->aliases = array();

        if (null !== $name) {
            $this->setName($name);
        }

        $this->configure();

        if (!$this->name) {
            throw new \LogicException('The command name cannot be empty.');
        }
    }

    /**
     * Ignores validation errors.
     *
     * This is mainly useful for the help command.
     */
    public function ignoreValidationErrors()
    {
        $this->ignoreValidationErrors = true;
    }

    /**
     * Sets the application instance for this command.
     *
     * @param Application $application An Application instance
     *
     * @api
     */
    public function setApplication(Application $application = null)
    {
        $this->application = $application;
        if ($application) {
            $this->setHelperSet($application->getHelperSet());
        } else {
            $this->helperSet = null;
        }
    }

    /**
     * Sets the helper set.
     *
     * @param HelperSet $helperSet A HelperSet instance
     */
    public function setHelperSet(HelperSet $helperSet)
    {
        $this->helperSet = $helperSet;
    }

    /**
     * Gets the helper set.
     *
     * @return HelperSet A HelperSet instance
     */
    public function getHelperSet()
    {
        return $this->helperSet;
    }

    /**
     * Gets the application instance for this command.
     *
     * @return Application An Application instance
     *
     * @api
     */
    public function getApplication()
    {
        return $this->application;
    }

    /**
     * Configures the current command.
     */
    protected function configure()
    {
    }

    /**
     * Executes the current command.
     *
     * This method is not abstract because you can use this class
     * as a concrete class. In this case, instead of defining the
     * execute() method, you set the code to execute by passing
     * a Closure to the setCode() method.
     *
     * @param InputInterface  $input  An InputInterface instance
     * @param OutputInterface $output An OutputInterface instance
     *
     * @return integer 0 if everything went fine, or an error code
     *
     * @throws \LogicException When this abstract method is not implemented
     * @see    setCode()
     */
    protected function execute(InputInterface $input, OutputInterface $output)
    {
        throw new \LogicException('You must override the execute() method in the concrete command class.');
    }

    /**
     * Interacts with the user.
     *
     * @param InputInterface  $input  An InputInterface instance
     * @param OutputInterface $output An OutputInterface instance
     */
    protected function interact(InputInterface $input, OutputInterface $output)
    {
    }

    /**
     * Initializes the command just after the input has been validated.
     *
     * This is mainly useful when a lot of commands extends one main command
     * where some things need to be initialized based on the input arguments and options.
     *
     * @param InputInterface  $input  An InputInterface instance
     * @param OutputInterface $output An OutputInterface instance
     */
    protected function initialize(InputInterface $input, OutputInterface $output)
    {
    }

    /**
     * Runs the command.
     *
     * The code to execute is either defined directly with the
     * setCode() method or by overriding the execute() method
     * in a sub-class.
     *
     * @param InputInterface  $input  An InputInterface instance
     * @param OutputInterface $output An OutputInterface instance
     *
     * @see setCode()
     * @see execute()
     *
     * @api
     */
    public function run(InputInterface $input, OutputInterface $output)
    {
        // force the creation of the synopsis before the merge with the app definition
        $this->getSynopsis();

        // add the application arguments and options
        $this->mergeApplicationDefinition();

        // bind the input against the command specific arguments/options
        try {
            $input->bind($this->definition);
        } catch (\Exception $e) {
            if (!$this->ignoreValidationErrors) {
                throw $e;
            }
        }

        $this->initialize($input, $output);

        if ($input->isInteractive()) {
            $this->interact($input, $output);
        }

        $input->validate();

        if ($this->code) {
            return call_user_func($this->code, $input, $output);
        }

        return $this->execute($input, $output);
    }

    /**
     * Sets the code to execute when running this command.
     *
     * If this method is used, it overrides the code defined
     * in the execute() method.
     *
     * @param \Closure $code A \Closure
     *
     * @return Command The current instance
     *
     * @see execute()
     *
     * @api
     */
    public function setCode(\Closure $code)
    {
        $this->code = $code;

        return $this;
    }

    /**
     * Merges the application definition with the command definition.
     */
    private function mergeApplicationDefinition()
    {
        if (null === $this->application || true === $this->applicationDefinitionMerged) {
            return;
        }

        $this->definition->setArguments(array_merge(
            $this->application->getDefinition()->getArguments(),
            $this->definition->getArguments()
        ));

        $this->definition->addOptions($this->application->getDefinition()->getOptions());

        $this->applicationDefinitionMerged = true;
    }

    /**
     * Sets an array of argument and option instances.
     *
     * @param array|InputDefinition $definition An array of argument and option instances or a definition instance
     *
     * @return Command The current instance
     *
     * @api
     */
    public function setDefinition($definition)
    {
        if ($definition instanceof InputDefinition) {
            $this->definition = $definition;
        } else {
            $this->definition->setDefinition($definition);
        }

        $this->applicationDefinitionMerged = false;

        return $this;
    }

    /**
     * Gets the InputDefinition attached to this Command.
     *
     * @return InputDefinition An InputDefinition instance
     *
     * @api
     */
    public function getDefinition()
    {
        return $this->definition;
    }

    /**
     * Adds an argument.
     *
     * @param string  $name        The argument name
     * @param integer $mode        The argument mode: InputArgument::REQUIRED or InputArgument::OPTIONAL
     * @param string  $description A description text
     * @param mixed   $default     The default value (for InputArgument::OPTIONAL mode only)
     *
     * @return Command The current instance
     *
     * @api
     */
    public function addArgument($name, $mode = null, $description = '', $default = null)
    {
        $this->definition->addArgument(new InputArgument($name, $mode, $description, $default));

        return $this;
    }

    /**
     * Adds an option.
     *
     * @param string  $name        The option name
     * @param string  $shortcut    The shortcut (can be null)
     * @param integer $mode        The option mode: One of the InputOption::VALUE_* constants
     * @param string  $description A description text
     * @param mixed   $default     The default value (must be null for InputOption::VALUE_REQUIRED or InputOption::VALUE_NONE)
     *
     * @return Command The current instance
     *
     * @api
     */
    public function addOption($name, $shortcut = null, $mode = null, $description = '', $default = null)
    {
        $this->definition->addOption(new InputOption($name, $shortcut, $mode, $description, $default));

        return $this;
    }

    /**
     * Sets the name of the command.
     *
     * This method can set both the namespace and the name if
     * you separate them by a colon (:)
     *
     *     $command->setName('foo:bar');
     *
     * @param string $name The command name
     *
     * @return Command The current instance
     *
     * @throws \InvalidArgumentException When command name given is empty
     *
     * @api
     */
    public function setName($name)
    {
        $this->validateName($name);

        $this->name = $name;

        return $this;
    }

    /**
     * Returns the command name.
     *
     * @return string The command name
     *
     * @api
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Sets the description for the command.
     *
     * @param string $description The description for the command
     *
     * @return Command The current instance
     *
     * @api
     */
    public function setDescription($description)
    {
        $this->description = $description;

        return $this;
    }

    /**
     * Returns the description for the command.
     *
     * @return string The description for the command
     *
     * @api
     */
    public function getDescription()
    {
        return $this->description;
    }

    /**
     * Sets the help for the command.
     *
     * @param string $help The help for the command
     *
     * @return Command The current instance
     *
     * @api
     */
    public function setHelp($help)
    {
        $this->help = $help;

        return $this;
    }

    /**
     * Returns the help for the command.
     *
     * @return string The help for the command
     *
     * @api
     */
    public function getHelp()
    {
        return $this->help;
    }

    /**
     * Returns the processed help for the command replacing the %command.name% and
     * %command.full_name% patterns with the real values dynamically.
     *
     * @return string  The processed help for the command
     */
    public function getProcessedHelp()
    {
        $name = $this->name;

        $placeholders = array(
            '%command.name%',
            '%command.full_name%'
        );
        $replacements = array(
            $name,
            $_SERVER['PHP_SELF'].' '.$name
        );

        return str_replace($placeholders, $replacements, $this->getHelp());
    }

    /**
     * Sets the aliases for the command.
     *
     * @param array $aliases An array of aliases for the command
     *
     * @return Command The current instance
     *
     * @api
     */
    public function setAliases($aliases)
    {
        foreach ($aliases as $alias) {
            $this->validateName($alias);
        }

        $this->aliases = $aliases;

        return $this;
    }

    /**
     * Returns the aliases for the command.
     *
     * @return array An array of aliases for the command
     *
     * @api
     */
    public function getAliases()
    {
        return $this->aliases;
    }

    /**
     * Returns the synopsis for the command.
     *
     * @return string The synopsis
     */
    public function getSynopsis()
    {
        if (null === $this->synopsis) {
            $this->synopsis = trim(sprintf('%s %s', $this->name, $this->definition->getSynopsis()));
        }

        return $this->synopsis;
    }

    /**
     * Gets a helper instance by name.
     *
     * @param string $name The helper name
     *
     * @return mixed The helper value
     *
     * @throws \InvalidArgumentException if the helper is not defined
     *
     * @api
     */
    public function getHelper($name)
    {
        return $this->helperSet->get($name);
    }

    /**
     * Returns a text representation of the command.
     *
     * @return string A string representing the command
     */
    public function asText()
    {
        $messages = array(
            '<comment>Usage:</comment>',
            ' '.$this->getSynopsis(),
            '',
        );

        if ($this->getAliases()) {
            $messages[] = '<comment>Aliases:</comment> <info>'.implode(', ', $this->getAliases()).'</info>';
        }

        $messages[] = $this->definition->asText();

        if ($help = $this->getProcessedHelp()) {
            $messages[] = '<comment>Help:</comment>';
            $messages[] = ' '.implode("\n ", explode("\n", $help))."\n";
        }

        return implode("\n", $messages);
    }

    /**
     * Returns an XML representation of the command.
     *
     * @param Boolean $asDom Whether to return a DOM or an XML string
     *
     * @return string|DOMDocument An XML string representing the command
     */
    public function asXml($asDom = false)
    {
        $dom = new \DOMDocument('1.0', 'UTF-8');
        $dom->formatOutput = true;
        $dom->appendChild($commandXML = $dom->createElement('command'));
        $commandXML->setAttribute('id', $this->name);
        $commandXML->setAttribute('name', $this->name);

        $commandXML->appendChild($usageXML = $dom->createElement('usage'));
        $usageXML->appendChild($dom->createTextNode(sprintf($this->getSynopsis(), '')));

        $commandXML->appendChild($descriptionXML = $dom->createElement('description'));
        $descriptionXML->appendChild($dom->createTextNode(implode("\n ", explode("\n", $this->getDescription()))));

        $commandXML->appendChild($helpXML = $dom->createElement('help'));
        $help = $this->help;
        $helpXML->appendChild($dom->createTextNode(implode("\n ", explode("\n", $help))));

        $commandXML->appendChild($aliasesXML = $dom->createElement('aliases'));
        foreach ($this->getAliases() as $alias) {
            $aliasesXML->appendChild($aliasXML = $dom->createElement('alias'));
            $aliasXML->appendChild($dom->createTextNode($alias));
        }

        $definition = $this->definition->asXml(true);
        $commandXML->appendChild($dom->importNode($definition->getElementsByTagName('arguments')->item(0), true));
        $commandXML->appendChild($dom->importNode($definition->getElementsByTagName('options')->item(0), true));

        return $asDom ? $dom : $dom->saveXml();
    }

    private function validateName($name)
    {
        if (!preg_match('/^[^\:]+(\:[^\:]+)*$/', $name)) {
            throw new \InvalidArgumentException(sprintf('Command name "%s" is invalid.', $name));
        }
    }
}


text:
<?php

/**
 * Created by PhpStorm.
 * User: administrator
 * Date: 29/09/2017
 * Time: 13:02
 */
class Facilities extends MX_Controller
{
    private $controller;
    private $data;
    private $user_id;

    public function __construct()
    {
        parent::__construct();

        if (!$this->ion_auth->logged_in()) {
            redirect('auth/login', 'refresh');
        }

        $this->load->model(array('Facilities_model', 'model'));
        $this->user_id = $this->session->userdata("user_id");
        $this->controller = $this->router->fetch_class();
    }

    /**
     * Check login
     *
     * @return response
     */
    function _is_logged_in()
    {
        if (!$this->ion_auth->logged_in()) {
            // redirect them to the login page
            redirect('auth/login', 'refresh');
        }
    }

    /**
     * @param $method_name
     * Check if user has permission
     */
    function has_allowed_perm($method_name)
    {
        if (!perms_role($this->controller, $method_name)) {
            show_error("You are not allowed to view this page", 401, "Unauthorized");
        }
    }

    //list health facilities
    function lists()
    {
        $this->data['title'] = "List health facilities";

        //check if logged in
        $this->_is_logged_in();

        //check permission
        //$this->has_allowed_perm($this->router->fetch_method());

        $config = array(
            'base_url' => $this->config->base_url("facilities/lists"),
            'total_rows' => $this->Facilities_model->count_facilities(),
            'uri_segment' => 3,
        );

        $this->pagination->initialize($config);
        $page = ($this->uri->segment(3)) ? $this->uri->segment(3) : 0;

        $this->data['facilities_list'] = $this->Facilities_model->get_facilities_list($this->pagination->per_page, $page);
        $this->data["links"] = $this->pagination->create_links();

        foreach ($this->data['facilities_list'] as $k => $v) {
            $this->model->set_table('district');
            $this->data['facilities_list'][$k]->district = $this->model->get_by('id', $v->district);
        }

        //render view
        $this->load->view('header', $this->data);
        $this->load->view("lists");
        $this->load->view('footer');
    }

    //add new project
    function add_new()
    {
        $this->data['title'] = "Add new facility";

        //check if logged in
        $this->_is_logged_in();

        //check permission
        //$this->has_allowed_perm($this->router->fetch_method());

        //form validation
        $this->form_validation->set_rules('name', 'Facility Name', 'required|trim');
        $this->form_validation->set_rules('district', 'District', 'required|trim');

        if ($this->form_validation->run() == TRUE) {
            $data = array(
                'name' => $this->input->post('name'),
                'address' => $this->input->post('address'),
                'district' => $this->input->post('district'),
                'latitude' => $this->input->post('latitude'),
                'longitude' => $this->input->post('longitude'),
                'created_at' => date('Y-m-d H:i:s'),
                'created_by' => $this->user_id
            );
            $id = $this->db->insert('health_facilities', $data);

            if ($id) {
                $this->session->set_flashdata('message', display_message('Facility added'));
                redirect('facilities/lists', 'refresh');
            } else {
                $this->session->set_flashdata('message', display_message('Failed to add facility', 'danger'));
                redirect('facilities/add_new', 'refresh');
            }
        }

        //populate data
        $this->data['name'] = array(
            'name' => 'name',
            'id' => 'name',
            'type' => 'text',
            'value' => $this->form_validation->set_value('name'),
            'class' => 'form-control',
            'placeholder' => 'Enter facility name'
        );

        $this->data['address'] = array(
            'name' => 'address',
            'id' => 'address',
            'type' => 'text area',
            'rows' => '5',
            'value' => $this->form_validation->set_value('address'),
            'class' => 'form-control',
            'placeholder' => 'Write facility address ....'
        );

        $this->data['latitude'] = array(
            'name' => 'latitude',
            'id' => 'latitude',
            'type' => 'text',
            'value' => $this->form_validation->set_value('latitude'),
            'class' => 'form-control',
            'placeholder' => 'Enter latitude'
        );

        $this->data['longitude'] = array(
            'name' => 'longitude',
            'id' => 'longitude',
            'type' => 'text',
            'value' => $this->form_validation->set_value('longitude'),
            'class' => 'form-control',
            'placeholder' => 'Enter longitude'
        );

        $this->model->set_table('district');
        $this->data['district_list'] = $this->model->get_all();

        //render view
        $this->load->view('header', $this->data);
        $this->load->view("add_new");
        $this->load->view('footer');
    }

    //edit project
    function edit($facility_id)
    {
        $this->data['title'] = "Edit facility";

        //check if logged in
        $this->_is_logged_in();

        //check permission
        //$this->has_allowed_perm($this->router->fetch_method());

        $facility = $this->Facilities_model->get_facility_by_id($facility_id);
        $this->data['facility'] = $facility;

        //form validation
        $this->form_validation->set_rules('name', 'Facility Name', 'required|trim');
        $this->form_validation->set_rules('district', 'District', 'required|trim');

        if ($this->form_validation->run() == TRUE) {
            $data = array(
                'name' => $this->input->post('name'),
                'address' => $this->input->post('address'),
                'district' => $this->input->post('district'),
                'latitude' => $this->input->post('latitude'),
                'longitude' => $this->input->post('longitude'),
                'created_at' => date('Y-m-d H:i:s'),
                'created_by' => $this->user_id
            );

            $this->db->update('health_facilities', $data, array('id' => $facility_id));

            $this->session->set_flashdata('message', display_message('Facility updated'));
            redirect('facilities/lists', 'refresh');
        }

        //populate data
        $this->data['name'] = array(
            'name' => 'name',
            'id' => 'name',
            'type' => 'text',
            'value' => $this->form_validation->set_value('name', $facility->name),
            'class' => 'form-control'
        );

        $this->data['address'] = array(
            'name' => 'address',
            'id' => 'address',
            'type' => 'text area',
            'rows' => '5',
            'value' => $this->form_validation->set_value('address', $facility->address),
            'class' => 'form-control'
        );

        $this->data['latitude'] = array(
            'name' => 'latitude',
            'id' => 'latitude',
            'type' => 'text',
            'value' => $this->form_validation->set_value('latitude', $facility->latitude),
            'class' => 'form-control'
        );

        $this->data['longitude'] = array(
            'name' => 'longitude',
            'id' => 'longitude',
            'type' => 'text',
            'value' => $this->form_validation->set_value('longitude', $facility->longitude),
            'class' => 'form-control'
        );

        $this->model->set_table('district');
        $this->data['district_list'] = $this->model->get_all();

        //render view
        $this->load->view('header', $this->data);
        $this->load->view("edit");
        $this->load->view('footer');
    }

    //delete facility
    function delete($facility_id)
    {
        $this->_is_logged_in();

        //$this->has_allowed_perm($this->router->fetch_method());

        //delete college
        $this->db->delete('health_facilities', array('id' => $facility_id));

        $this->session->set_flashdata('message', display_message('Health Facility deleted', 'danger'));
        redirect('facilities/lists', 'refresh');
    }

}


text:
<ng-container *ngIf="(asyncTabs | async) === null">
  Loading tabs...
</ng-container>

<mat-tab-group>
  <mat-tab *ngFor="let tab of asyncTabs | async">
    <ng-template mat-tab-label>{{tab.label}}</ng-template>
    {{tab.content}}
  </mat-tab>
</mat-tab-group>


text:
Wrangler imports several data types into the MedBook database.

## Supported data types

### Sample name definitions

Genomic data cannot be loaded into MedBook without first loading a file telling MedBook that a certain sample name is valid for a study. You can also indicate to MedBook a certain sample name is valid by loading a patient/sample mapping table (see below).

[Here is an example sample name definition file.](/example-files/sample_name_definitions.tsv)

### Patient/sample mapping table

This type of file tells MedBook about a new patient and/or a new sample. Without this mapping file, new data cannot be imported into MedBook.

[Here is an example patient sample mapping file.](/example-files/patient_sample_mapping.tsv)

### Genomic matrices

Several different genomic matrices are supported:
- gene expression
- more are coming soon!

If there are duplicate genes in the a genomic matrix, the values are averaged for all duplicates of that gene.

[Here is an example of a genomic expression file.](/example-files/genomic_expression_matrix.tsv)

### Gene sets (.gmt)

GMT files define a set of gene sets. See [here](http://www.broadinstitute.org/cancer/software/genepattern/file-formats-guide#GMT) for the file format definition.

## Importing Data
Some notes on importing data via Wrangler:

- Choose "Create a new submission" via the Wrangler homepage to begin importing data.
- Multiple files may be imported within a single submission. To do this, once a file has been added via one of the import option form fields in the Files section, use the form field again to add another file or files; they will be listed in the "Preview" section with the first file.
- For files of type "Gene expression rectangular matrix", there are two normalization options: "Quantile normalized counts" and "Quantile normalized counts log2(x+1)". The files as received directly from BD2K should use normalization "Quantile normalized counts". When Wrangler processes files with this normalization, it will perform log2(x+1) normalization on the data.
  - If a file has already had log2(x+1) normalization performed on it before being imported into Wrangler, choose normalization option "Quantile normalized counts log2(x+1)" and no further normalization will be performed.
- Wrangler will also remove duplicate gene names from a file. However, the **Gene count** displayed in the Review section is if the original count from the file; if duplicate gene names have been removed the final count will be lower. (See Issue #9)


text:
SOURCE="${BASH_SOURCE[0]}"
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
  DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
  SOURCE="$(readlink "$SOURCE")"
  [[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
done
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"

###############################################################################

set -e
set -u
set -o pipefail

ROOT="${DIR}/.."

source "${ROOT}/test/common.sh"

case $1 in

set_azure_account)
  set_azure_account
;;

create_resource_group)
  create_resource_group
;;

predeploy)
  ACSE_PREDEPLOY=${ACSE_PREDEPLOY:-}
  if [ ! -z "${ACSE_PREDEPLOY}" ] && [ -x "${ACSE_PREDEPLOY}" ]; then
      "${ACSE_PREDEPLOY}"
  fi
;;

postdeploy)
  ACSE_POSTDEPLOY=${ACSE_POSTDEPLOY:-}
  if [ ! -z "${ACSE_POSTDEPLOY}" ] && [ -x "${ACSE_POSTDEPLOY}" ]; then
      "${ACSE_POSTDEPLOY}"
  fi
;;

generate_template)
  export OUTPUT="${ROOT}/_output/${INSTANCE_NAME}"
  generate_template
;;

deploy_template)
  export OUTPUT="${ROOT}/_output/${INSTANCE_NAME}"
  deploy_template
;;

get_node_count)
  export OUTPUT="${ROOT}/_output/${INSTANCE_NAME}"
  get_node_count
;;

get_orchestrator_type)
  get_orchestrator_type
;;

get_orchestrator_release)
  get_orchestrator_release
;;

validate)
  export OUTPUT="${ROOT}/_output/${INSTANCE_NAME}"
  export SSH_KEY="${OUTPUT}/id_rsa"
  if [ ${ORCHESTRATOR} = "kubernetes" ]; then
    export KUBECONFIG="${OUTPUT}/kubeconfig/kubeconfig.${LOCATION}.json"
  fi
  "${ROOT}/test/cluster-tests/${ORCHESTRATOR}/test.sh"
;;

cleanup)
  export CLEANUP="${CLEANUP:-y}"
  cleanup
;;
esac


text:
/  enhancedKeyUsages;
@property (readonly) BOOL hasPrivateKey;
@property (readonly) BOOL isStronglyProtected;
@property (readonly) NSString * issuer;
@property (readonly) id<NSFastEnumeration> /*UInt8*/  serialNumber;
@property (readonly) NSString * subject;
@property (readonly) WFDateTime * validFrom;
@property (readonly) WFDateTime * validTo;
- (void)buildChainAsync:(id<NSFastEnumeration> /*WSCCCertificate*/ )certificates success:(void (^)(WSCCCertificateChain *))success failure:(void (^)(NSError*))failure;
- (void)buildChainWithParametersAsync:(id<NSFastEnumeration> /*WSCCCertificate*/ )certificates parameters:(WSCCChainBuildingParameters *)parameters success:(void (^)(WSCCCertificateChain *))success failure:(void (^)(NSError*))failure;
- (id<NSFastEnumeration> /*UInt8*/ )getHashValue;
- (id<NSFastEnumeration> /*UInt8*/ )getHashValueWithAlgorithm:(NSString *)hashAlgorithmName;
- (RTObject<WSSIBuffer>*)getCertificateBlob;
@end

#endif // __WSCCCertificate_DEFINED__

// Windows.Security.Cryptography.Certificates.CertificateRequestProperties
#ifndef __WSCCCertificateRequestProperties_DEFINED__
#define __WSCCCertificateRequestProperties_DEFINED__

WINRT_EXPORT
@interface WSCCCertificateRequestProperties : RTObject
+ (instancetype)create ACTIVATOR;
@property (copy) NSString * subject;
@property WSCCEnrollKeyUsages keyUsages;
@property (copy) NSString * keyStorageProviderName;
@property unsigned keySize;
@property WSCCKeyProtectionLevel keyProtectionLevel;
@property (copy) NSString * keyAlgorithmName;
@property (copy) NSString * hashAlgorithmName;
@property (copy) NSString * friendlyName;
@property WSCCExportOption exportable;
@property (copy) NSString * smartcardReaderName;
@property (copy) WSCCCertificate * signingCertificate;
@property (copy) WSCCCertificate * attestationCredentialCertificate;
@end

#endif // __WSCCCertificateRequestProperties_DEFINED__

// Windows.Security.Cryptography.Certificates.UserCertificateEnrollmentManager
#ifndef __WSCCUserCertificateEnrollmentManager_DEFINED__
#define __WSCCUserCertificateEnrollmentManager_DEFINED__

WINRT_EXPORT
@interface WSCCUserCertificateEnrollmentManager : RTObject
- (void)createRequestAsync:(WSCCCertificateRequestProperties *)request success:(void (^)(NSString *))success failure:(void (^)(NSError*))failure;
- (RTObject<WFIAsyncAction>*)installCertificateAsync:(NSString *)certificate installOption:(WSCCInstallOptions)installOption;
- (RTObject<WFIAsyncAction>*)importPfxDataAsync:(NSString *)pfxData password:(NSString *)password exportable:(WSCCExportOption)exportable keyProtectionLevel:(WSCCKeyProtectionLevel)keyProtectionLevel installOption:(WSCCInstallOptions)installOption friendlyName:(NSString *)friendlyName;
- (RTObject<WFIAsyncAction>*)importPfxDataToKspAsync:(NSString *)pfxData password:(NSString *)password exportable:(WSCCExportOption)exportable keyProtectionLevel:(WSCCKeyProtectionLevel)keyProtectionLevel installOption:(WSCCInstallOptions)installOption friendlyName:(NSString *)friendlyName keyStorageProvider:(NSString *)keyStorageProvider;
@end

#endif // __WSCCUserCertificateEnrollmentManager_DEFINED__

// Windows.Security.Cryptography.Certificates.CertificateEnrollmentManager
#ifndef __WSCCCertificateEnrollmentManager_DEFINED__
#define __WSCCCertificateEnrollmentManager_DEFINED__

WINRT_EXPORT
@interface WSCCCertificateEnrollmentManager : RTObject
+ (void)createRequestAsync:(WSCCCertificateRequestProperties *)request success:(void (^)(NSString *))success failure:(void (^)(NSError*))failure;
+ (RTObject<WFIAsyncAction>*)installCertificateAsync:(NSString *)certificate installOption:(WSCCInstallOptions)installOption;
+ (RTObject<WFIAsyncAction>*)importPfxDataAsync:(NSString *)pfxData password:(NSString *)password exportable:(WSCCExportOption)exportable keyProtectionLevel:(WSCCKeyProtectionLevel)keyProtectionLevel installOption:(WSCCInstallOptions)installOption friendlyName:(NSString *)friendlyName;
+ (RTObject<WFIAsyncAction>*)importPfxDataToKspAsync:(NSString *)pfxData password:(NSString *)password exportable:(WSCCExportOption)exportable keyProtectionLevel:(WSCCKeyProtectionLevel)keyProtectionLevel installOption:(WSCCInstallOptions)installOption friendlyName:(NSString *)friendlyName keyStorageProvider:(NSString *)keyStorageProvider;
+ (WSCCUserCertificateEnrollmentManager *)userCertificateEnrollmentManager;
@end

#endif // __WSCCCertificateEnrollmentManager_DEFINED__

// Windows.Security.Cryptography.Certificates.KeyAttestationHelper
#ifndef __WSCCKeyAttestationHelper_DEFINED__
#define __WSCCKeyAttestationHelper_DEFINED__

WINRT_EXPORT
@interface WSCCKeyAttestationHelper : RTObject
+ (void)decryptTpmAttestationCredentialAsync:(NSString *)credential success:(void (^)(NSString *))success failure:(void (^)(NSError*))failure;
+ (NSString *)getTpmAttestationCredentialId:(NSString *)credential;
@end

#endif // __WSCCKeyAttestationHelper_DEFINED__

// Windows.Security.Cryptography.Certificates.CertificateQuery
#ifndef __WSCCCertificateQuery_DEFINED__
#define __WSCCCertificateQuery_DEFINED__

WINRT_EXPORT
@interface WSCCCertificateQuery : RTObject
+ (instancetype)create ACTIVATOR;
@property (copy) id<NSFastEnumeration> /*UInt8*/  thumbprint;
@property (copy) NSString * issuerName;
@property BOOL hardwareOnly;
@property (copy) NSString * friendlyName;
@property (readonly) id<NSFastEnumeration> /*String*/  enhancedKeyUsages;
@end

#endif // __WSCCCertificateQuery_DEFINED__

// Windows.Security.Cryptography.Certificates.CertificateStore
#ifndef __WSCCCertificateStore_DEFINED__
#define __WSCCCertificateStore_DEFINED__

WINRT_EXPORT
@interface WSCCCertificateStore : RTObject
- (void)add:(WSCCCertificate *)certificate;
- (void)Delete:(WSCCCertificate *)certificate;
@end

#endif // __WSCCCertificateStore_DEFINED__

// Windows.Security.Cryptography.Certificates.CertificateStores
#ifndef __WSCCCertificateStores_DEFINED__
#define __WSCCCertificateStores_DEFINED__

WINRT_EXPORT
@interface WSCCCertificateStores : RTObject
+ (void)findAllAsyncWithSuccess:(void (^)(id<NSFastEnumeration> /*WSCCCertificate*/ ))success failure:(void (^)(NSError*))failure;
+ (void)findAllWithQueryAsync:(WSCCCertificateQuery *)query success:(void (^)(id<NSFastEnumeration> /*WSCCCertificate*/ ))success failure:(void (^)(NSError*))failure;
+ (WSCCCertificateStore *)getStoreByName:(NSString *)storeName;
+ (WSCCCertificateStore *)intermediateCertificationAuthorities;
+ (WSCCCertificateStore *)trustedRootCertificationAuthorities;
@end

#endif // __WSCCCertificateStores_DEFINED__

// Windows.Security.Cryptography.Certificates.KeyAlgorithmNames
#ifndef __WSCCKeyAlgorithmNames_DEFINED__
#define __WSCCKeyAlgorithmNames_DEFINED__

WINRT_EXPORT
@interface WSCCKeyAlgorithmNames : RTObject
+ (NSString *)dsa;
+ (NSString *)ecdh256;
+ (NSString *)ecdh384;
+ (NSString *)ecdh521;
+ (NSString *)ecdsa256;
+ (NSString *)ecdsa384;
+ (NSString *)ecdsa521;
+ (NSString *)rsa;
@end

#endif // __WSCCKeyAlgorithmNames_DEFINED__

// Windows.Security.Cryptography.Certificates.KeyStorageProviderNames
#ifndef __WSCCKeyStorageProviderNames_DEFINED__
#define __WSCCKeyStorageProviderNames_DEFINED__

WINRT_EXPORT
@interface WSCCKeyStorageProviderNames : RTObject
+ (NSString *)platformKeyStorageProvider;
+ (NSString *)smartcardKeyStorageProvider;
+ (NSString *)softwareKeyStorageProvider;
@end

#endif // __WSCCKeyStorageProviderNames_DEFINED__

// Windows.Security.Cryptography.Certificates.ChainBuildingParameters
#ifndef __WSCCChainBuildingParameters_DEFINED__
#define __WSCCChainBuildingParameters_DEFINED__

WINRT_EXPORT
@interface WSCCChainBuildingParameters : RTObject
+ (instancetype)create ACTIVATOR;
@property (copy) WFDateTime * validationTimestamp;
@property BOOL revocationCheckEnabled;
@property BOOL networkRetrievalEnabled;
@property BOOL currentTimeValidationEnabled;
@property BOOL authorityInformationAccessEnabled;
@property (readonly) id<NSFastEnumeration> /*String*/  enhancedKeyUsages;
@property (readonly) id<NSFastEnumeration> /*WSCCCertificate*/  exclusiveTrustRoots;
@end

#endif // __WSCCChainBuildingParameters_DEFINED__

// Windows.Security.Cryptography.Certificates.ChainValidationParameters
#ifndef __WSCCChainValidationParameters_DEFINED__
#define __WSCCChainValidationParameters_DEFINED__

WINRT_EXPORT
@interface WSCCChainValidationParameters : RTObject
+ (instancetype)create ACTIVATOR;
@property (copy) WNHostName * serverDnsName;
@property WSCCCertificateChainPolicy certificateChainPolicy;
@end

#endif // __WSCCChainValidationParameters_DEFINED__

// Windows.Security.Cryptography.Certificates.CertificateChain
#ifndef __WSCCCertificateChain_DEFINED__
#define __WSCCCertificateChain_DEFINED__

WINRT_EXPORT
@interface WSCCCertificateChain : RTObject
- (WSCCChainValidationResult)validate;
- (WSCCChainValidationResult)validateWithParameters:(WSCCChainValidationParameters *)parameter;
- (id<NSFastEnumeration> /*WSCCCertificate*/ )getCertificates:(BOOL)includeRoot;
@end

#endif // __WSCCCertificateChain_DEFINED__

// Windows.Security.Cryptography.Certificates.CmsTimestampInfo
#ifndef __WSCCCmsTimestampInfo_DEFINED__
#define __WSCCCmsTimestampInfo_DEFINED__

WINRT_EXPORT
@interface WSCCCmsTimestampInfo : RTObject
@property (readonly) id<NSFastEnumeration> /*WSCCCertificate*/  certificates;
@property (readonly) WSCCCertificate * signingCertificate;
@property (readonly) WFDateTime * timestamp;
@end

#endif // __WSCCCmsTimestampInfo_DEFINED__

// Windows.Security.Cryptography.Certificates.CmsSignerInfo
#ifndef __WSCCCmsSignerInfo_DEFINED__
#define __WSCCCmsSignerInfo_DEFINED__

WINRT_EXPORT
@interface WSCCCmsSignerInfo : RTObject
+ (instancetype)create ACTIVATOR;
@property (copy) NSString * hashAlgorithmName;
@property (copy) WSCCCertificate * certificate;
@property (readonly) WSCCCmsTimestampInfo * timestampInfo;
@end

#endif // __WSCCCmsSignerInfo_DEFINED__

// Windows.Security.Cryptography.Certificates.CmsAttachedSignature
#ifndef __WSCCCmsAttachedSignature_DEFINED__
#define __WSCCCmsAttachedSignature_DEFINED__

WINRT_EXPORT
@interface WSCCCmsAttachedSignature : RTObject
+ (void)generateSignatureAsync:(RTObject<WSSIBuffer>*)data signers:(id<NSFastEnumeration> /*WSCCCmsSignerInfo*/ )signers certificates:(id<NSFastEnumeration> /*WSCCCertificate*/ )certificates success:(void (^)(RTObject<WSSIBuffer>*))success failure:(void (^)(NSError*))failure;
+ (WSCCCmsAttachedSignature *)createCmsAttachedSignature:(RTObject<WSSIBuffer>*)inputBlob ACTIVATOR;
@property (readonly) id<NSFastEnumeration> /*WSCCCertificate*/  certificates;
@property (readonly) id<NSFastEnumeration> /*UInt8*/  content;
@property (readonly) id<NSFastEnumeration> /*WSCCCmsSignerInfo*/  signers;
- (WSCCSignatureValidationResult)verifySignature;
@end

#endif // __WSCCCmsAttachedSignature_DEFINED__

// Windows.Security.Cryptography.Certificates.CmsDetachedSignature
#ifndef __WSCCCmsDetachedSignature_DEFINED__
#define __WSCCCmsDetachedSignature_DEFINED__

WINRT_EXPORT
@interface WSCCCmsDetachedSignature : RTObject
+ (void)generateSignatureAsync:(RTObject<WSSIInputStream>*)data signers:(id<NSFastEnumeration> /*WSCCCmsSignerInfo*/ )signers certificates:(id<NSFastEnumeration> /*WSCCCertificate*/ )certificates success:(void (^)(RTObject<WSSIBuffer>*))success failure:(void (^)(NSError*))failure;
+ (WSCCCmsDetachedSignature *)createCmsDetachedSignature:(RTObject<WSSIBuffer>*)inputBlob ACTIVATOR;
@property (readonly) id<NSFastEnumeration> /*WSCCCertificate*/  certificates;
@property (readonly) id<NSFastEnumeration> /*WSCCCmsSignerInfo*/  signers;
- (void)verifySignatureAsync:(RTObject<WSSIInputStream>*)data success:(void (^)(WSCCSignatureValidationResult))success failure:(void (^)(NSError*))failure;
@end

#endif // __WSCCCmsDetachedSignature_DEFINED__


text:
/*
 * https://github.com/PandaWood/ExceptionReporter.NET
 */

using System.Linq;
using System.Windows.Forms;
using ExceptionReporting.SystemInfo;

namespace ExceptionReporting.WinForms
{
	///<summary>
	/// WinForms extension
	///</summary>
	// ReSharper disable once ClassNeverInstantiated.Global
	internal class SysInfoResultMapperWinForm : SysInfoResultMapper
	{
		/// <summary>
		/// Add a tree node to an existing parentNode, by passing the SysInfoResult
		/// </summary>
		public static void AddTreeViewNode(TreeNode parentNode, SysInfoResult result)
		{
			var nodeRoot = new TreeNode(result.Name);

			foreach (var nodeLeaf in result.Nodes.Select(nodeValueParent => new TreeNode(nodeValueParent)))
			{
				nodeRoot.Nodes.Add(nodeLeaf);

				foreach (var nodeValue in result.ChildResults.SelectMany(childResult => childResult.Nodes))
				{
					nodeLeaf.Nodes.Add(new TreeNode(nodeValue));
				}
			}
			parentNode.Nodes.Add(nodeRoot);
		}
	}
}


text:
<?php

/**
 *      [Discuz!] (C)2001-2099 Comsenz Inc.
 *      This is NOT a freeware, use is subject to license terms
 *
 *      $Id: discuz_session_close.php 33707 2013-08-06 08:22:12Z andyzheng $
 */

if(!defined('IN_DISCUZ')) {
	exit('Access Denied');
}

class discuz_session_close {

	private $onlinehold;
	private $oltimestamp;

	public $sid = null;
	public $var;
	public $isnew = false;
	protected $newguest = array('sid' => 0, 'ip1' => 0, 'ip2' => 0, 'ip3' => 0, 'ip4' => 0,
		'uid' => 0, 'username' => '', 'groupid' => 7, 'invisible' => 0, 'action' => 0,
		'lastactivity' => 0, 'fid' => 0, 'tid' => 0, 'lastolupdate' => 0);

	protected $table;

	public function __construct($sid = '', $ip = '', $uid = 0) {
		$this->old = array('sid' =>  $sid, 'ip' =>  $ip, 'uid' =>  $uid);
		$this->var = $this->newguest;
		$this->onlinehold = getglobal('setting/onlinehold');
		$this->oltimestamp = TIMESTAMP - $this->onlinehold;

		$this->table = C::t('common_member_status');

		if(!empty($ip)) {
			$this->init($sid, $ip, $uid);
		}
	}

	public function set($key, $value) {
		if(isset($this->newguest[$key])) {
			$this->var[$key] = $value;
		} elseif ($key == 'ip') {
			$ips = explode('.', $value);
			$this->set('ip1', $ips[0]);
			$this->set('ip2', $ips[1]);
			$this->set('ip3', $ips[2]);
			$this->set('ip4', $ips[3]);
		}
	}

	public function get($key) {
		if(isset($this->newguest[$key])) {
			return $this->var[$key];
		} elseif ($key == 'ip') {
			return $this->get('ip1').'.'.$this->get('ip2').'.'.$this->get('ip3').'.'.$this->get('ip4');
		}
	}

	public function init($sid, $ip, $uid) {
		if(($uid = intval($uid)) > 0) {
			$this->var = $this->newguest;
			$this->set('sid', 0);
			$this->set('uid', $uid);
			$this->set('username', getglobal('member/username'));
			$this->set('groupid', getglobal('member/groupid'));
			$this->set('ip', $ip);
			if(($ulastactivity = getglobal('cookie/ulastactivity'))) {
				list($lastactivity, $invisible) = explode('|', $ulastactivity);
				$lastactivity = intval($lastactivity);
				$invisible = intval($invisible);
			}
			if(!$lastactivity) {
				$lastactivity = getuserprofile('lastactivity');
				$invisible = getuserprofile('invisible');
				dsetcookie('ulastactivity', $lastactivity.'|'.$invisible, 31536000);
			}
			if($this->oltimestamp >= $lastactivity) {
				$this->isnew = true;
			}
			$this->set('invisible', $invisible);
			$this->set('lastactivity', $lastactivity);
			$this->sid = 0;
		}
	}

	public function create($ip, $uid) {
		return $this->var;
	}

	public function delete() {
		return true;

	}

	public function update() {
		return true;
	}

	public function count($type = 0) {
		loadcache('onlinecount');
		$onlinecount = getglobal('cache/onlinecount');
		if($onlinecount && $onlinecount['dateline'] > TIMESTAMP - 600) {
			$count = $onlinecount['count'];
		} else {
			$count = $this->table->count_by_lastactivity_invisible($this->oltimestamp);
			savecache('onlinecount', array('count' => $count, 'dateline' => TIMESTAMP));
		}
		if($type == 1) {
			return $count;
		}

		if(!($multiple = getglobal('setting/onlineguestsmultiple'))) $multiple = 11;
		$add = mt_rand(0, $multiple);
		if($type == 2) {
			return intval($count * $multiple) + $add - $count;
		} else {
			return intval($count * $multiple) + $add;
		}
	}

	public function fetch_member($ismember = 0, $invisible = 0, $start = 0, $limit = 0) {
		return $this->table->fetch_all_by_lastactivity_invisible($this->oltimestamp, $invisible, $start, $limit);
	}

	public function count_invisible($type = 1) {
		return $this->table->count_by_lastactivity_invisible($this->oltimestamp, $type);
	}

	public function update_by_ipban($ip1, $ip2, $ip3, $ip4) {
		return false;
	}

	public function update_max_rows($max_rows) {
		return false;
	}

	public function clear() {
		return false;
	}

	public function count_by_fid($fid) {
		return 0;
	}

	public function fetch_all_by_fid($fid, $limit) {
		return array();
	}

	public function fetch_by_uid($uid) {
		if(($member = $this->table->fetch($uid)) && $member['lastactivity'] >= $this->oltimestamp) {
			return $member;
		}
		return array();
	}

	public function fetch_all_by_uid($uids, $start = 0, $limit = 0) {
		return $this->table->fetch_all_onlines($uids, $this->oltimestamp, $start, $limit);
	}

	public function update_by_uid($uid, $data) {
		return false;
	}

	public function count_by_ip($ip) {
		return 0;
	}

	public function fetch_all_by_ip($ip, $start = 0, $limit = 0) {
		return array();
	}

	public function updatesession() {
		static $updated = false;
		if(!$updated && $this->isnew) {
			global $_G;
			C::t('common_member_status')->update($_G['uid'], array('lastip' => $_G['clientip'], 'port' => $_G['remoteport'], 'lastactivity' => TIMESTAMP, 'lastvisit' => TIMESTAMP));
			dsetcookie('ulastactivity', TIMESTAMP.'|'.getuserprofile('invisible'), 31536000);
			$updated = true;
		}
		return $updated;
	}
}

?>


text:
''' These define the standard error codes and messages for Bokeh
validation checks.

1001 *(BAD_COLUMN_NAME)*
    A glyph has a property set to a field name that does not correspond to any
    column in the |GlyphRenderer|'s data source.

1002 *(MISSING_GLYPH)*
    A |GlyphRenderer| has no glyph configured.

1003 *(NO_SOURCE_FOR_GLYPH)*
    A |GlyphRenderer| has no data source configured.

1004 *(REQUIRED_RANGE)*
    A |Plot| is missing one or more required default ranges (will result in
    blank plot).

1005 *(MISSING_GOOGLE_API_KEY)*
    Google Maps API now requires an API key for all use. See
    https://developers.google.com/maps/documentation/javascript/get-api-key
    for more information on how to obtain your own, to use for the
    ``api_key`` property of your Google Map plot .

1006 *(NON_MATCHING_DATA_SOURCES_ON_LEGEND_ITEM_RENDERERS)*
    All data_sources on ``LegendItem.renderers`` must match when LegendItem.label
    is type field.

1007 *(MISSING_MERCATOR_DIMENSION)*
    ``MercatorTicker`` and ``MercatorTickFormatter``models must have their
    ``dimension`` property set to ``'lat'`` or ``'lon'``.

1008 *(REQUIRED_SCALE)*
    A |Scale| on is missing one or more required default scales (will result in
    blank plot).

1009 *(INCOMPATIBLE_SCALE_AND_RANGE)*
    A |Scale| type is incompatible with one or more ranges on the same plot
    dimension (will result in blank plot).

1010 *(CDSVIEW_SOURCE_DOESNT_MATCH)*
    A |GlyphRenderer| has a ``CDSView`` whose source doesn't match the ``GlyphRenderer``'s
    data source.

1011 *(MALFORMED_GRAPH_SOURCE)*
    The ``GraphSource`` is incorrectly configured.

1012 *(INCOMPATIBLE_MAP_RANGE_TYPE)*
    Map plots can only support ``Range1d`` types, not data ranges.

1013 *(INCOMPATIBLE_POINT_DRAW_RENDERER)*
    The ``PointDrawTool`` renderers may only reference ``XYGlyph`` models.

1014 *(INCOMPATIBLE_BOX_EDIT_RENDERER)*
    The ``BoxEditTool`` renderers may only reference ``Rect`` glyph models.

1015 *(INCOMPATIBLE_POLY_DRAW_RENDERER)*
    The ``PolyDrawTool`` renderers may only reference ``MultiLine`` and ``Patches`` glyph models.

1016 *(INCOMPATIBLE_POLY_EDIT_RENDERER)*
    The ``PolyEditTool`` renderers may only reference ``MultiLine`` and ``Patches`` glyph models.

1017 *(INCOMPATIBLE_POLY_EDIT_VERTEX_RENDERER)*
    The ``PolyEditTool`` vertex_renderer may only reference ``XYGlyph`` models.

1018 *(NO_RANGE_TOOL_RANGES)*
    The ``RangeTool`` must have at least one of ``x_range`` or ``y_range`` configured

1019 *(DUPLICATE_FACTORS)*
    ``FactorRange`` must specify a unique list of categorical factors for an axis.

1020 *(BAD_EXTRA_RANGE_NAME)*
    An extra range name is configured with a name that does not correspond to any range.

1021 *(EQUAL_SLIDER_START_END)*
    ``noUiSlider`` most have a nonequal start and end.

9999 *(EXT)*
    Indicates that a custom error check has failed.

'''

#-----------------------------------------------------------------------------
# Boilerplate
#-----------------------------------------------------------------------------
from __future__ import absolute_import, division, print_function, unicode_literals

import logging
log = logging.getLogger(__name__)

#-----------------------------------------------------------------------------
# Imports
#-----------------------------------------------------------------------------

# Standard library imports

# External imports

# Bokeh imports

#-----------------------------------------------------------------------------
# Globals and constants
#-----------------------------------------------------------------------------

codes = {
    1001: ("BAD_COLUMN_NAME",                                    "Glyph refers to nonexistent column name. This could either be due to a misspelling or typo, or due to an expected column being missing. "), # NOQA
    1002: ("MISSING_GLYPH",                                      "Glyph renderer has no glyph set"),
    1003: ("NO_SOURCE_FOR_GLYPH",                                "Glyph renderer has no data source"),
    1004: ("REQUIRED_RANGE",                                     "A required Range object is missing"),
    1005: ("MISSING_GOOGLE_API_KEY",                             "Google now requires API keys for all Google Maps usage"),
    1006: ("NON_MATCHING_DATA_SOURCES_ON_LEGEND_ITEM_RENDERERS", "LegendItem.label is a field, but renderer data sources don't match"),
    1007: ("MISSING_MERCATOR_DIMENSION",                         "Mercator Tickers and Formatters must have their dimension property set to 'lat' or 'lon'"),
    1008: ("REQUIRED_SCALE",                                     "A required Scale object is missing"),
    1009: ("INCOMPATIBLE_SCALE_AND_RANGE",                       "A Scale is incompatible with one or more ranges on the same plot dimension"),
    1010: ("CDSVIEW_SOURCE_DOESNT_MATCH",                        "CDSView used by Glyph renderer must have a source that matches the Glyph renderer's data source"),
    1011: ("MALFORMED_GRAPH_SOURCE",                             "The GraphSource is incorrectly configured"),
    1012: ("INCOMPATIBLE_MAP_RANGE_TYPE",                        "Map plots can only support Range1d types, not data ranges"),
    1013: ("INCOMPATIBLE_POINT_DRAW_RENDERER",                   "PointDrawTool renderers may only reference XYGlyph models"),
    1014: ("INCOMPATIBLE_BOX_EDIT_RENDERER",                     "BoxEditTool renderers may only reference Rect glyph models"),
    1015: ("INCOMPATIBLE_POLY_DRAW_RENDERER",                    "PolyDrawTool renderers may only reference MultiLine and Patches glyph models"),
    1016: ("INCOMPATIBLE_POLY_EDIT_RENDERER",                    "PolyEditTool renderers may only reference MultiLine and Patches glyph models"),
    1017: ("INCOMPATIBLE_POLY_EDIT_VERTEX_RENDERER",             "PolyEditTool vertex_renderer may only reference XYGlyph models"),
    1018: ("NO_RANGE_TOOL_RANGES",                               "RangeTool must have at least one of x_range or y_range configured"),
    1019: ("DUPLICATE_FACTORS",                                  "FactorRange must specicy a unique list of categorical factors for an axis"),
    1020: ("BAD_EXTRA_RANGE_NAME",                               "An extra range name is configued with a name that does not correspond to any range"),
    1021: ("EQUAL_SLIDER_START_END",                             "Slider 'start' and 'end' cannot be equal"),
    1022: ("MIN_PREFERRED_MAX_WIDTH",                            "expected min_width <= width <= max_width"),
    1023: ("MIN_PREFERRED_MAX_HEIGHT",                           "expected min_height <= height <= max_height"),
    9999: ("EXT",                                                "Custom extension reports error"),
}

__all__ = ()

#-----------------------------------------------------------------------------
# General API
#-----------------------------------------------------------------------------

#-----------------------------------------------------------------------------
# Dev API
#-----------------------------------------------------------------------------

#-----------------------------------------------------------------------------
# Private API
#-----------------------------------------------------------------------------

#-----------------------------------------------------------------------------
# Code
#-----------------------------------------------------------------------------

for code in codes:
    exec("%s = %d" % (codes[code][0], code))


text:
/*!
 * Start Bootstrap - Agency Bootstrap Theme (http://startbootstrap.com)
 * Code licensed under the Apache License v2.0.
 * For details, see http://www.apache.org/licenses/LICENSE-2.0.
 */

body {
    overflow-x: hidden;
    font-family: "Open Sans", "Helvetica Neue",Helvetica,Arial,sans-serif;
}

/*Text colour*/
.text-muted {
    color: #fff;
}

.text-gray {
    color:#222;
}

/*icon*/
.text-primary {
    color: #FFC107;
}

/*text*/
p {
    font-size: 14px;
    line-height: 1.2;
    font-family: Roboto,"Helvetica Neue",Helvetica,Arial,sans-serif;
    font-weight: 100;
    letter-spacing: 0.15em;
}

p.large {
    font-size: 16px;
}

a,
a:hover,
a:focus,
a:active,
a.active {
    outline: 0;
}

a {
    color: #FFC107;
}

a:hover,
a:focus,
a:active,
a.active {
    color: #FFC107;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    text-transform: uppercase;
    font-family: Montserrat,"Helvetica Neue",Helvetica,Arial,sans-serif;
    font-weight: 700;
}

.img-centered {
    margin: 0 auto;
}

/*btn*/
.btn-primary {
    border-color: #666;
    text-transform: uppercase;
    font-family: Montserrat,"Helvetica Neue",Helvetica,Arial,sans-serif;
    font-weight: 700;
    color: #fff;
    background-color: #666;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active,
.open .dropdown-toggle.btn-primary {
    border-color: #666;
    color: #fff;
    background-color: #00b096;
}

.btn-primary:active,
.btn-primary.active,
.open .dropdown-toggle.btn-primary {
    background-image: none;
}

.btn-primary.disabled,
.btn-primary[disabled],
fieldset[disabled] .btn-primary,
.btn-primary.disabled:hover,
.btn-primary[disabled]:hover,
fieldset[disabled] .btn-primary:hover,
.btn-primary.disabled:focus,
.btn-primary[disabled]:focus,
fieldset[disabled] .btn-primary:focus,
.btn-primary.disabled:active,
.btn-primary[disabled]:active,
fieldset[disabled] .btn-primary:active,
.btn-primary.disabled.active,
.btn-primary[disabled].active,
fieldset[disabled] .btn-primary.active {
    border-color: #FFC107;
    background-color: #FFC107;
}

.btn-primary .badge {
    color: #FFC107;
    background-color: #fff;
}

/* main buttons */
.button {
text-align: center;
    color: 000;

}

.btn-xl {
    padding: 20px 40px;
    border-color: #fff;
    border-radius: 3px;
    text-transform: uppercase;
    font-family: Montserrat,"Helvetica Neue",Helvetica,Arial,sans-serif;
    font-size: 18px;
    font-weight: 400;
    color: #fff;
    letter-spacing: 0.1em;

}

#nextbtn {
    color: #fff;
}

#nextbtn:hover,
#nextbtn:focus,
#nextbtn:active

{
    color: #00b096;
}

.btn-xl-blk {
    padding: 20px 40px;
    border-color: #000;
    border-radius: 3px;
    text-transform: uppercase;
    font-family: Montserrat,"Helvetica Neue",Helvetica,Arial,sans-serif;
    font-size: 18px;
    font-weight: 400;
    color: #000;
    letter-spacing: 0.1em;

}

.btn-xl:hover,
.btn-xl:focus,
.btn-xl:active,
.btn-xl.active,
.open .dropdown-toggle.btn-xl {
    border-color: #fff;
    color: #fff;
    background-color: #00b096;
}

.btn-xl-blk:hover,
.btn-xl-blk:focus,
.btn-xl-blk:active,
.btn-xl-blk.active,
.open .dropdown-toggle.btn-xl {
    border-color: #fff;
    color: #fff;
    background-color: #00b096;
}

.btn-xl:active,
.btn-xl.active,
.open .dropdown-toggle.btn-xl {
    background-image: none;
}

.btn-xl.disabled,
.btn-xl[disabled],
fieldset[disabled] .btn-xl,
.btn-xl.disabled:hover,
.btn-xl[disabled]:hover,
fieldset[disabled] .btn-xl:hover,
.btn-xl.disabled:focus,
.btn-xl[disabled]:focus,
fieldset[disabled] .btn-xl:focus,
.btn-xl.disabled:active,
.btn-xl[disabled]:active,
fieldset[disabled] .btn-xl:active,
.btn-xl.disabled.active,
.btn-xl[disabled].active,
fieldset[disabled] .btn-xl.active {
    border-color: #FFC107;
    background-color: #FFC107;
}

.btn-xl .badge {
    color: #FFC107;
    background-color: #fff;
}

/*navbar*/
.navbar-default {
    border-color: transparent;
    background-color: #222;

}

.navbar-default .navbar-brand {
    font-family: "Helvetica Neue",Helvetica,Arial,cursive;
    color: #fff;
    width: 50%;

}

.navbar-default .navbar-brand:hover,
.navbar-default .navbar-brand:focus,
.navbar-default .navbar-brand:active,
.navbar-default .navbar-brand.active {
    color: #FFC107;

}

.navbar-default .navbar-collapse {
    border-color: rgba(255,255,255, .02);

}

.navbar-default .navbar-toggle {
    border-color: #FFC107;
    background-color: #FFC107;

}

.navbar-default .navbar-toggle .icon-bar {
    background-color: #fff;
}

.navbar-default .navbar-toggle:hover,
.navbar-default .navbar-toggle:focus {
    background-color: #FFC107;

}

.navbar-default .nav li a {
    text-transform: uppercase;
    font-family: Montserrat,"Helvetica Neue",Helvetica,Arial,sans-serif;

    font-weight: 400;
    letter-spacing: 1px;

    color: #fff;
}

.navbar-default .nav li a:hover,
.navbar-default .nav li a:focus {
    outline: 0;
    color: #FFC107;

}

.navbar-default .navbar-nav>.active>a {
    border-radius: 0;
    color: #000;
    background-color: #FFC107;

}

.navbar-default .navbar-nav>.active>a:hover,
.navbar-default .navbar-nav>.active>a:focus {
    color: #000;
    background-color: #FFC107;

}

/*navbar expand*/
@media(min-width:990px) {
    .navbar-default {
        padding: 25px 0;
        border: 0;
        background-color: #2e2e2e;
        -webkit-transition: padding .3s;
        -moz-transition: padding .3s;
        transition: padding .3s;
    }

    .navbar-default .navbar-brand {
        background-image:url(../img/nicholaschiu3.png);
        width: 272px;
        height: 50px;
        -webkit-transition: all .3s;
        -moz-transition: all .3s;
        transition: all .3s;
        background-position: center center;

        background-repeat: none;
        -webkit-background-size: cover;
        -moz-background-size: cover;
        background-size: cover;
        -o-background-size: cover;
    }

    .navbar-default .navbar-nav>.active>a {
        border-radius: 3px;
    }

    .navbar-default.navbar-shrink {
        padding: 10px 0;
        background-color: #2e2e2e;

    }

    .navbar-default.navbar-shrink .navbar-brand {
        font-size: 1.5em;
    }
}

/*HEADER*/

header {
    text-align: center;
    color: #fff;
    background-attachment: scroll;
    background-position: center center;
    background-repeat: none;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    background-size: cover;
    -o-background-size: cover;
    padding-top: 100px;
    padding-bottom: 100px
}

header .intro-text {
    padding-top: 40px;
    padding-bottom: 80px;
}

header .intro-text .intro-heading {

    margin-bottom: 25px;
    text-transform: uppercase;
    font-family: Montserrat,"Helvetica Neue",Helvetica,Arial,sans-serif;
    font-weight: 700;
    font-size: 52px;
    line-height: 50px;
    letter-spacing: 0.05em;
    text-shadow: rgb(35, 35, 35) 1px 1px,
    rgb(35, 35, 35) 2px 2px,
    rgb(35, 35, 35) 3px 3px,
    rgb(35, 35, 35) 4px 4px,
    rgb(36, 36, 36) 5px 5px,
    rgb(37, 37, 37) 6px 6px,
    rgb(39, 39, 39) 7px 7px,
    rgb(40, 40, 40) 8px 8px,
    rgb(41, 41, 41) 9px 9px,
    rgb(43, 43, 43) 10px 10px,
    rgb(44, 44, 44) 11px 11px,
    rgb(46, 46, 46) 12px 12px;
    text-align: center;
}

header .intro-text .intro-lead-in {

    margin-bottom: 25px;
    font-family: Roboto,"Helvetica Neue",Helvetica,Arial,sans-serif;
    font-weight: 100;
    font-size: 18px;
    line-height: 22px;
    letter-spacing: 0.1em;
    padding-bottom: 0px;
}

/* BIGGER SCREEN */
@media (min-width:768px) {
    header .intro-text {
        padding-top: 200px;
        padding-bottom: 100px;
    }

    header .intro-text .intro-heading {
        margin-bottom: 15px;
        text-transform: uppercase;
        font-family: Montserrat,"Helvetica Neue",Helvetica,Arial,sans-serif;
        font-size: 70px;
        font-weight: 700;
        line-height: 75px;
    }

    header .intro-text .intro-lead-in {
        margin-bottom: 20px;
        font-family: Roboto,"Helvetica Neue",Helvetica,Arial,sans-serif;
        font-size: 24px;
        font-style: normal;
        line-height: 40px;
    }
}

/*SECTION*/
#about {
    color: #fff;
    padding-bottom: 150px;
    padding-top: 150px;
}

/* ABOUT SECTION */
section .about-heading {
    text-align: center;
    font-family:"Open Sans","Helvetica Neue",Helvetica,Arial,sans-serif;
    font-weight:300;
    font-size: 24px;
    line-height: 35px;
    letter-spacing: 0.05em;
    padding-left: 20px;
    padding-right:20px;
}

/* BIGGER SCREEN */
@media (min-width:768px) {
    section .about-heading {
        font-size: 30px;
        line-height: 45px;
    }
}

section {
    padding: 0px 0;
}

/* Section Subheading */
section h2.section-heading {
    margin-top: 50px;
    margin-bottom: 0px;
    font-size: 30px;
    letter-spacing: 0.1em;
    color: #fff;

}

section h2.section-heading-blk {
    margin-top: 30px;
    margin-bottom: 0px;
    font-size: 30px;
    letter-spacing: 0.1em;
    color: #000;

}

section h3.section-subheading {
    margin-bottom: 50px;
    text-transform: none;
    font-family: Roboto,"Helvetica Neue",Helvetica,Arial,sans-serif;
    font-weight: 100;
    font-size: 18px;
    line-height: 22px;
    font-style: normal;
    letter-spacing: 0.15em;
}

section h3.section-subheading-blk {
    margin-bottom: 50px;
    text-transform: none;
    font-family: Roboto,"Helvetica Neue",Helvetica,Arial,sans-serif;
    font-weight: 100;
    font-size: 18px;
    font-style: normal;
    letter-spacing: 0.15em;
    color: 000;
}

@media (min-width:768px) {
    section h2.section-heading {
    margin-top: 30px;
    margin-bottom: 1px;
    font-size: 40px;
    letter-spacing: 0.1em;

    }

    section {
        padding-top: 50px;
    }
}

section {
    padding-top:  50px;
    padding-bottom: 50px;
}

.service-heading {
    margin: 15px 0;
    text-transform: uppercase;
    color: #fff;
    letter-spacing: 0.15em;
    font-family: "Open Sans", "Helvetica Neue",Helvetica,Arial,sans-serif;
    font-weight: 400;

}

#portfolio .portfolio-item {
    right: 0;
    margin: 0 0 15px;

}

#services .portfolio-item {
    right: 0;
    margin: 0 0 15px;

}

#portfolio .portfolio-item .portfolio-link {
    display: block;
    position: relative;
    margin: 0 auto;
    max-width: 400px;

}

#services .portfolio-item .portfolio-link {
    display: block;
    position: relative;
    margin: 0 auto;
    max-width: 400px;

}

#portfolio .portfolio-item .portfolio-link .portfolio-hover {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    background: rgba(254,209,54,.9);
    -webkit-transition: all ease .5s;
    -moz-transition: all ease .5s;
    transition: all ease .5s;

}

#services .portfolio-item .portfolio-link .portfolio-hover {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    background: rgba(254,209,54,.9);
    -webkit-transition: all ease .5s;
    -moz-transition: all ease .5s;
    transition: all ease .5s;

}

#portfolio .portfolio-item .portfolio-link .portfolio-hover:hover {
    opacity: 1;
}

#services .portfolio-item .portfolio-link .portfolio-hover:hover {
    opacity: 1;
}

#portfolio .portfolio-item .portfolio-link .portfolio-hover .portfolio-hover-content {
    position: absolute;
    top: 50%;
    width: 100%;
    height: 20px;
    margin-top: -12px;
    text-align: center;
    font-size: 20px;
    color: #fff;
}

#services .portfolio-item .portfolio-link .portfolio-hover .portfolio-hover-content {
    position: absolute;
    top: 50%;
    width: 100%;
    height: 20px;
    margin-top: -12px;
    text-align: center;
    font-size: 20px;
    color: #fff;
}

#portfolio .portfolio-item .portfolio-link .portfolio-hover .portfolio-hover-content i {
    margin-top: -12px;
}

#services .portfolio-item .portfolio-link .portfolio-hover .portfolio-hover-content i {
    margin-top: -12px;
}

#portfolio .portfolio-item .portfolio-link .portfolio-hover .portfolio-hover-content h3,
#portfolio .portfolio-item .portfolio-link .portfolio-hover .portfolio-hover-content h4 {
    margin: 0;
}

#services .portfolio-item .portfolio-link .portfolio-hover .portfolio-hover-content h3,
#services .portfolio-item .portfolio-link .portfolio-hover .portfolio-hover-content h4 {
    margin: 0;
}

#portfolio .portfolio-item .portfolio-caption {
    margin: 0 auto;
    padding: 25px;
    max-width: 400px;
    text-align: center;

}

#services .portfolio-item .portfolio-caption {
    margin: 0 auto;
    padding: 25px;
    max-width: 400px;
    text-align: center;

}

#portfolio .portfolio-item .portfolio-caption h4 {
    margin: 0;
    text-transform: none;
    font-family: "Open Sans","Helvetica Neue",Helvetica,Arial,sans-serif;
    font-weight: 400;
    font-size: 12px;
    letter-spacing: 0.15em;
    color: #fff;
    width: auto;
    padding-bottom: 6px;
}

#services .portfolio-item .portfolio-caption h4 {
    margin: 0;
    text-transform: none;
    font-family: "Open Sans","Helvetica Neue",Helvetica,Arial,sans-serif;
    font-weight: 400;
    font-size: 12px;
    letter-spacing: 0.15em;
    color: #fff;
    width: auto;
    padding-bottom: 6px;
}

#portfolio .portfolio-item .portfolio-caption p {
    margin: 0;
    font-family: roboto,"Helvetica Neue",Helvetica,Arial,sans-serif;
    font-weight: 100;
    font-size: 16px;
    font-style: normal;
}

#services .portfolio-item .portfolio-caption p {
    margin: 0;
    font-family: roboto,"Helvetica Neue",Helvetica,Arial,sans-serif;
    font-weight: 100;
    font-size: 16px;
    font-style: normal;
}

#portfolio * {
    z-index: 2;
}

#services * {
    z-index: 2;
}

@media(min-width:767px) {
    #portfolio .portfolio-item {
        margin: 0 0 30px;
    }
}

@media(min-width:767px) {
    #services .portfolio-item {
        margin: 0 0 30px;
    }
}

aside.clients img {
    margin: 50px auto;
}

/*RESUME*/
.ResumeTitle {
    font-weight: 500;
    font-size: 16px;
    padding-bottom: 10px;
}

.chart {
  position: relative;
  width: 300px;
  height: 300px;
  top: 50%;
  left: 50%;
  margin: 0 0 0 -150px;
}

.pieTip {
  position: absolute;
  float: left;
  min-width: 30px;
  max-width: 300px;
  padding: 5px 18px 6px;
  border-radius: 2px;
  background: rgba(255,255,255,.97);
  color: #444;
  font-size: 19px;
  text-shadow: 0 1px 0 #fff;
  text-transform: uppercase;
  text-align: center;
  line-height: 1.3;
  letter-spacing: .06em;
  box-shadow: 0 0 3px rgba(0,0,0,0.2), 0 1px 2px rgba(0,0,0,0.5);
  -webkit-transform: all .3s;
     -moz-transform: all .3s;
      -ms-transform: all .3s;
       -o-transform: all .3s;
          transform: all .3s;
  pointer-events: none;
}
.pieTip:after {
      position: absolute;
      left: 50%;
      bottom: -6px;
      content: "";
      height: 0;
      margin: 0 0 0 -6px;
      border-right: 5px solid transparent;
      border-left: 5px solid transparent;
      border-top: 6px solid rgba(255,255,255,.95);
      line-height: 0;
}
.chart path { cursor: pointer;
	background: #000;
	 }

section#resume {
 background-color: #e6e6e6;

}

/*CONTACT*/
/*BIGGER SCREEN*/

section#contact {

}

section#contact .section-heading {
    color: #fff;
        margin-top: -10px;

}

section#contact .form-group {
    margin-bottom: 25px;
}

section#contact .form-group input,
section#contact .form-group textarea {
    padding: 20px;

}

section#contact .form-group input.form-control {
    height: auto;
}

section#contact .form-group textarea.form-control {
    height: 236px;
}

section#contact .form-control:focus {
    border-color: #FFC107;
    box-shadow: none;
}

section#contact::-webkit-input-placeholder {
    text-transform: uppercase;
    font-family: Montserrat,"Helvetica Neue",Helvetica,Arial,sans-serif;
    font-weight: 700;
    color: #bbb;
}

section#contact:-moz-placeholder {
    text-transform: uppercase;
    font-family: Montserrat,"Helvetica Neue",Helvetica,Arial,sans-serif;
    font-weight: 700;
    color: #bbb;
}

section#contact::-moz-placeholder {
    text-transform: uppercase;
    font-family: Montserrat,"Helvetica Neue",Helvetica,Arial,sans-serif;
    font-weight: 700;
    color: #bbb;
}

section#contact:-ms-input-placeholder {
    text-transform: uppercase;
    font-family: Montserrat,"Helvetica Neue",Helvetica,Arial,sans-serif;
    font-weight: 700;
    color: #bbb;
}

section#contact .text-danger {
    color: #e74c3c;
    font-size: 14px;
}

/*FOOTER*/
footer {
    padding: 25px 0;
    text-align: center;
    background-color: black;
}

footer span.copyright {
    text-transform: uppercase;
    text-transform: none;
    font-family: "Open Sans","Helvetica Neue",Helvetica,Arial,sans-serif;
    font-weight: 400;
    line-height: 40px;
    color: #666;
}

footer ul.quicklinks {
    margin-bottom: 0;
    text-transform: uppercase;
    font-family: "Open Sans","Helvetica Neue",Helvetica,Arial,sans-serif;
    font-weight: 400;
    line-height: 40px;
            padding-top: 0px;

}

/*SOCIAL ICONS*/
ul.social-buttons {
    margin-bottom: 0;
}

ul.social-buttons li a {
    display: block;
    width: 40px;
    height: 40px;
    border-radius: 100%;
    font-size: 20px;
    line-height: 40px;
    outline: 0;
    color: #fff;
    background-color: #222;
    -webkit-transition: all .3s;
    -moz-transition: all .3s;
    transition: all .3s;
}

ul.social-buttons li a:hover,
ul.social-buttons li a:focus,
ul.social-buttons li a:active {
    background-color: #00b096;
}

.btn:focus,
.btn:active,
.btn.active,
.btn:active:focus {
    outline: 0;
}

/*PORTFOLIO EXPAND*/
.portfolio-modal .modal-content {
    padding: 100px 0;
    min-height: 100%;
    border: 0;
    border-radius: 0;
    text-align: center;
    background-clip: border-box;
    -webkit-box-shadow: none;
    box-shadow: none;
    background-color: #111;
}

.portfolio-modal .modal-content h2 {
    margin-bottom: 15px;
    font-size: 30px;
    letter-spacing: 0.05em;
    color:#fff
}

.portfolio-modal .modal-content p {
    margin-bottom: 30px;
    color:#fff;

}

.portfolio-modal .modal-content p.item-intro {
    margin: 20px 0 30px;
    font-family: Roboto, "Helvetica Neue",Helvetica,Arial,sans-serif;
    font-weight: 100;
    font-size: 16px;
    font-style: normal;
}

.portfolio-modal .modal-content ul.list-inline {
    margin-top: 0;
    margin-bottom: 30px;
    color:#b6b6b6;
}

.portfolio-modal .modal-content img {
    margin-bottom: 30px;
    width: 1500;
}

.portfolio-modal .close-modal {
    position: absolute;
    top: 25px;
    right: 25px;
    width: 55px;
    height: 55px;
    background-color: transparent;
    cursor: pointer;

}

.portfolio-modal .close-modal:hover {
    opacity: .3;

}

.portfolio-modal .close-modal .lr {
    z-index: 1051;
    width: 1px;
    height: 55px;
    margin-left: 35px;
    background-color: #fff;
    -webkit-transform: rotate(45deg);
    -ms-transform: rotate(45deg);
    transform: rotate(45deg);
}

.portfolio-modal .close-modal .lr .rl {
    z-index: 1052;
    width: 1px;
    height: 55px;
    background-color: #fff;
    -webkit-transform: rotate(90deg);
    -ms-transform: rotate(90deg);
    transform: rotate(90deg);
}

.portfolio-modal .modal-backdrop {
    display: none;
    opacity: 0;
}

::-moz-selection {
    text-shadow: none;
    background: #FFC107;
}

::selection {
    text-shadow: none;
    background: #FFC107;
}

img::selection {
    background: 0 0;
}

img::-moz-selection {
    background: 0 0;
}

body {
    -webkit-tap-highlight-color: #FFC107;
}

/* background color */
.bg-light-gray { background-color: #f7f7f7; }
.bg-darkest-gray { background-color: #333; }
.bg-darkest-black { background-color: #000000; }
.bg-dark-green { background-color: #2e2e2e; }

.greengradient {
    background: #00b096; /* Old browsers */
    background: -moz-radial-gradient(center, ellipse cover,  #00b096 0%, #016b5b 100%); /* FF3.6+ */
    background: -webkit-gradient(radial, center center, 0px, center center, 100%, color-stop(0%,#00b096), color-stop(100%,#016b5b)); /* Chrome,Safari4+ */
    background: -webkit-radial-gradient(center, ellipse cover,  #00b096 0%,#016b5b 100%); /* Chrome10+,Safari5.1+ */
    background: -o-radial-gradient(center, ellipse cover,  #00b096 0%,#016b5b 100%); /* Opera 12+ */
    background: -ms-radial-gradient(center, ellipse cover,  #00b096 0%,#016b5b 100%); /* IE10+ */
    background: radial-gradient(ellipse at center,  #00b096 0%,#016b5b 100%); /* W3C */
    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#00b096', endColorstr='#016b5b',GradientType=1 ); /* IE6-9 fallback on horizontal gradient */
}

.bkgdimage1 {
    background-image: url(../img/header-bg7.jpg);
    background-position: center center;
    background-repeat: none;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    background-size: cover;
    -o-background-size: cover;
    padding-top: 100px;
    padding-bottom: 100px;
    color:#fff;
    text-align: center;
}

.bkgdimage2 {
    background-image: url(../img/map-image2.jpg);
    background-position: center center;
    background-repeat: none;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    background-size: cover;
    -o-background-size: cover;
    padding-top: 100px;
    padding-bottom: 100px;
    color:#fff;
    text-align: center;
}

.spacer {
  height: 40px;

}