text:
<?php

namespace Alpixel\Bundle\JiraBundle\Request;

use Alpixel\Bundle\JiraBundle\Data\JsonToArrayTransformer;
use Alpixel\Bundle\JiraBundle\Response\Response;
use Psr\Log\LoggerInterface;

/**
 * @author Alexis BUSSIERES <alexis@alpixel.fr>
 */
class Request
{

    const METHOD_GET = 'GET';
    const METHOD_POST = 'POST';
    const TIMEOUT = 300;

    /**
     * @var SecurityContext
     */
    private $security;

    /**
     * @var array curl options
     */
    private $options;

    /**
     * @var LoggerInterface
     */
    private $monolog;

    protected $baseUrl;

    public function __construct(SecurityContext $security, string $baseUrl, LoggerInterface $monolog)
    {
        $this->security = $security;

        if (substr($baseUrl, (strlen($baseUrl) -1 )) !== '/') {
            $baseUrl .= '/';
        }

        $this->baseUrl = $baseUrl;
        $this->monolog = $monolog;
    }

    protected function getMonolog()
    {
        return $this->monolog;
    }

    protected function getSecurity() : SecurityContext
    {
        return $this->security;
    }

    protected function applyAuthentication()
    {
        $security = $this->getSecurity();
        if ($security->getAuthMethod() === SecurityContext::METHOD_BASIC) {
            $parameters = $security->getCredentials();
            $credentials = implode(':', $parameters);
            $this->options[CURLOPT_USERPWD] = $credentials;
        } else {
            $this->getMonolog()->error('Alpixel JIRA API [Authentication] invalid format of credentials : '.$error, [
                'file' => __FILE__,
                'line' => __LINE__,
            ]);
            throw new \Exception('Invalid authentification.');
        }
    }

    public function exec(string $url, array $opt = [])
    {
        $this->applyAuthentication();

        $urlRequest = $this->baseUrl.$url;

        $monolog  = $this->getMonolog();
        $monolog->info('Alpixel JIRA API [Request] : '.$urlRequest, [
            'file' => __FILE__,
            'line' => __LINE__,
        ]);

        $options = array_replace([
            CURLOPT_URL => $urlRequest,
            CURLOPT_TIMEOUT => self::TIMEOUT,
            CURLOPT_FORBID_REUSE => true,
            CURLOPT_FOLLOWLOCATION => true,
            CURLOPT_RETURNTRANSFER => true,
            CURLOPT_HTTPHEADER => [
                'Content-Type: application/json',
            ],
        ], $this->options, $opt);

        $ch = curl_init();
        curl_setopt_array($ch, $options);

        $data = curl_exec($ch);
        $error = curl_error($ch);

        if (!empty($error)) {
            $monolog->error('Alpixel JIRA API [Response] curl error : '.$error, [
                'file' => __FILE__,
                'line' => __LINE__,
            ]);
            throw new \RuntimeException(sprintf('curl reports the following errors : "%s"', $error));
        }

        $response = new Response(new JsonToArrayTransformer());
        $response->setResponse($data, $error);

        return $response;
    }

    public function buildRequest(string $method, string $url, $parameters = [], array $opt = [])
    {
        switch ($method) {
            case self::METHOD_GET:
                $this->options[CURLOPT_HTTPGET] = true;
                if (!empty($parameters)) {
                    $queryParams = http_build_query($parameters);
                    $url .= '?'.$queryParams;
                }
                break;
            case self::METHOD_POST:
                $this->options[CURLOPT_POST] = true;
                break;
            default:
                throw new \InvalidArgumentException(sprintf('Unknown HTTP method "%s"'), $method);
        }

        return $this->exec($url, $opt);
    }

    public function get(string $url, array $parameters = [], array $opt = [])
    {
        return $this->buildRequest(self::METHOD_GET, $url, $parameters, $opt);
    }
}


text:
Tag index cell created by UICollectionView + automanageable on deletion

![alt tag](https://github.com/thedahiyaboy/TDTagIndex/blob/master/Screen%20Shot%202017-02-17%20at%2012.06.25%20PM.png)

redpajama_set_name: RedPajamaGithub


text:
/**
 * TestCases for Surrogate implementations.
 * @since 0.2.0
 */
package com.github.smallcreep.cucumber.seeds.generator.surrogate;


text:
<!DOCTYPE html>

    <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
  Class: DropboxApi::MiddleWare::DecodeResult

    — Documentation by YARD 0.9.19

</title>

  <link rel="stylesheet" href="../../css/style.css" type="text/css" charset="utf-8" />

  <link rel="stylesheet" href="../../css/common.css" type="text/css" charset="utf-8" />

    Index (D) »
    DropboxApi » MiddleWare
     »
    DecodeResult

        <svg width="24" height="24">
          <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
          <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
          <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
        </svg>

Class: DropboxApi::MiddleWare::DecodeResult

Inherits:

      Faraday::Middleware

Object

Faraday::Middleware

DropboxApi::MiddleWare::DecodeResult

        show all

Defined in:

lib/dropbox_api/middleware/decode_result.rb

      Instance Method Summary
      collapse

      #call(rq_env)  ⇒ Object

      #decode(json)  ⇒ Object

Instance Method Details

    #call(rq_env)  ⇒ <tt>Object</tt>

3
4
5
6
7
8
9
10
11

# File 'lib/dropbox_api/middleware/decode_result.rb', line 3

def call(rq_env)
  @app.call(rq_env).on_complete do |rs_env|
    if !rs_env[:response_headers]['Dropbox-Api-Result'].nil?
      rs_env[:api_result] = decode rs_env[:response_headers]['Dropbox-Api-Result']
    elsif rs_env[:response_headers]['content-type'] == 'application/json'
      rs_env[:api_result] = decode rs_env[:body]
    end
  end
end

    #decode(json)  ⇒ <tt>Object</tt>

13
14
15
16
17
18
19
20
21
22

# File 'lib/dropbox_api/middleware/decode_result.rb', line 13

def decode(json)
  # Dropbox may send a response with the string 'null' in its body, this
  # would be a void result. `add_folder_member` is an example of an
  # endpoint without return values.
  if json == "null"
    {}
  else
    JSON.parse json
  end
end

  Generated on Fri May 31 17:53:34 2019 by
  yard
  0.9.19 (ruby-2.6.2).


text:
function keysFrom() {
    var args = Array.prototype.slice.call(arguments, 0, arguments.length);
    args.unshift(Object.create(null));
    return Object.keys(extendIfNeeded.apply(null, args));
}


text:
    <button type="button" (click)="onCloseClick()" aria-label="close menu">

    </button>

        Tickets

        <ng-container *ngIf="item.__typename === 'Menu'; else normalMenu">

          {{item.label}}
          <ng-template #noLink>
            {{item.label}}
          </ng-template>

              <ng-container *ngIf="subitem.__typename === 'Menu'; else normalSubMenu">

                {{subitem.label}}
                <ng-template #noLink>
                  {{subitem.label}}
                </ng-template>

                    {{sectionitem.title}}
                    <ng-template #noLink>
                      {{sectionitem.title}}
                    </ng-template>

              </ng-container>
              <ng-template #normalSubMenu>
                {{subitem.title}}
                <ng-template #noLink>
                  {{subitem.title}}
                </ng-template>
              </ng-template>

        </ng-container>
        <ng-template #normalMenu>
          {{item.title}}
          <ng-template #noLink>
            {{item.title}}
          </ng-template>
        </ng-template>


text:
<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright (C) 2012-Present  simpligility technologies inc. -->
<!-- Licensed under the Apache License, Version 2.0 (the "License") -->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.simpligility.maven</groupId>
  <artifactId>progressive-organization-pom</artifactId>
  <version>3.0.1-SNAPSHOT</version>
  <packaging>pom</packaging>
  <name>Progressive Organization POM</name>
  <description>A organization pom for Maven projects using the latest versions of available plugins and progressively updating to the latest whenever possible.</description>
  <url>http://github.com/simpligility/progressive-organization-pom/</url>
  <inceptionYear>2012</inceptionYear>
  <organization>
    <name>simpligility technologies inc.</name>
    <url>http://www.simpligility.com</url>
  </organization>
  <licenses>
    <license>
      <name>The Apache Software License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
    </license>
  </licenses>
  <developers>
    <developer>
      <name>Manfred Moser</name>
      <email>manfred@simpligility.com</email>
      <organization>simpligility technologies inc.</organization>
      <organizationUrl>http://www.simpligility.com</organizationUrl>
    </developer>
  </developers>
  <scm>
    <connection>scm:git:git://github.com/simpligility/progressive-organization-pom.git</connection>
    <developerConnection>scm:git:git@github.com:simpligility/progressive-organization-pom.git</developerConnection>
    <url>http://github.com/simpligility/progressive-organization-pom/tree/master</url>
    <tag>HEAD</tag>
  </scm>
  <issueManagement>
    <system>Github</system>
    <url>http://github.com/simpligility/progressive-organization-pom/</url>
  </issueManagement>
  <!-- This marked as deprecated for Maven 3.X. This is checked by maven-enforcer-plugin -->
  <!-- https://jira.codehaus.org/browse/MNG-5297 -->
  <prerequisites>
    <maven>${maven.version}</maven>
  </prerequisites>
  <distributionManagement>
    <repository>
      <id>ossrh</id>
      <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
    </repository>
    <snapshotRepository>
      <id>ossrh</id>
      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
    </snapshotRepository>
  </distributionManagement>
  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <maven.scm.version>1.9.4</maven.scm.version>
    <maven.surefire.version>2.18.1</maven.surefire.version>
    <codehaus.chronos.jmeter.version>1.1.0</codehaus.chronos.jmeter.version>
    <asciidoctor.version>1.5.2.1</asciidoctor.version>
    <!-- this version property is by convention also used for jacoco dependencies in projects using the plugin -->
    <jacoco.version>0.7.5.201505241946</jacoco.version>
    <!-- Maven version requirement -->
    <maven.version>3.2.1</maven.version>

    <!-- maven checkstyle and pmd plugins for the most time use older version of wrapped analyzers -->
    <!-- thanks to properties we can use: versions:display-property-updates -->
    <checkstyle.version>6.9</checkstyle.version>
    <pmd.version>5.3.3</pmd.version>
  </properties>
  <build>
    <extensions>
      <extension>
        <groupId>org.jvnet.wagon-svn</groupId>
        <artifactId>wagon-svn</artifactId>
        <version>1.9</version>
      </extension>
    </extensions>
    <pluginManagement>
      <!-- Plugins are sorted alphabetically by groupId, artifactId.. -->
      <plugins>
        <plugin>
          <groupId>biz.aQute.bnd</groupId>
          <artifactId>bnd-maven-plugin</artifactId>
          <version>2.4.1</version>
        </plugin>
        <plugin>
          <groupId>br.com.ingenieux</groupId>
          <artifactId>jbake-maven-plugin</artifactId>
          <version>0.0.9</version>
        </plugin>
        <plugin>
          <groupId>com.github.github</groupId>
          <artifactId>downloads-maven-plugin</artifactId>
          <version>0.6</version>
        </plugin>
        <plugin>
          <groupId>com.github.github</groupId>
          <artifactId>site-maven-plugin</artifactId>
          <version>0.12</version>
        </plugin>
        <plugin>
          <groupId>com.github.eirslett</groupId>
          <artifactId>frontend-maven-plugin</artifactId>
          <version>0.0.25</version>
        </plugin>
        <plugin>
          <groupId>com.github.marschall</groupId>
          <artifactId>jdeps-maven-plugin</artifactId>
          <version>0.4.0</version>
        </plugin>
        <plugin>
          <groupId>com.github.maven-nar</groupId>
          <artifactId>nar-maven-plugin</artifactId>
          <version>3.2.3</version>
        </plugin>
        <plugin>
          <groupId>com.simpligility.maven.plugins</groupId>
          <artifactId>android-maven-plugin</artifactId>
          <version>4.2.1</version>
        </plugin>
        <plugin>
          <groupId>com.spotify</groupId>
          <artifactId>docker-maven-plugin</artifactId>
          <version>0.3.2</version>
        </plugin>
        <plugin>
          <groupId>com.mycila.maven-license-plugin</groupId>
          <artifactId>maven-license-plugin</artifactId>
          <version>1.10.b1</version>
        </plugin>
        <plugin>
          <groupId>com.sonatype.clm</groupId>
          <artifactId>clm-maven-plugin</artifactId>
          <version>2.4.0</version>
        </plugin>
        <plugin>
          <groupId>com.theoryinpractise</groupId>
          <artifactId>clojure-maven-plugin</artifactId>
          <version>1.7.1</version>
        </plugin>
        <plugin>
          <groupId>external.atlassian.jgitflow</groupId>
          <artifactId>jgitflow-maven-plugin</artifactId>
          <version>1.0-m5.1</version>
        </plugin>
        <plugin>
          <groupId>io.takari.maven.plugins</groupId>
          <artifactId>takari-lifecycle-plugin</artifactId>
          <version>1.11.10</version>
        </plugin>
        <plugin>
            <groupId>net.alchim31.maven</groupId>
            <artifactId>scala-maven-plugin</artifactId>
            <version>3.2.2</version>
        </plugin>
        <plugin>
          <groupId>org.apache.felix</groupId>
          <artifactId>maven-bundle-plugin</artifactId>
          <version>2.5.4</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-assembly-plugin</artifactId>
          <version>2.5.5</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-clean-plugin</artifactId>
          <version>2.6.1</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-changes-plugin</artifactId>
          <version>2.11</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-checkstyle-plugin</artifactId>
          <version>2.16</version>
          <dependencies>
            <dependency>
              <groupId>com.puppycrawl.tools</groupId>
              <artifactId>checkstyle</artifactId>
              <version>${checkstyle.version}</version>
            </dependency>
          </dependencies>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>3.3</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-dependency-plugin</artifactId>
          <version>2.10</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-deploy-plugin</artifactId>
          <version>2.8.2</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-ear-plugin</artifactId>
          <version>2.10.1</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-enforcer-plugin</artifactId>
          <version>1.4.1</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-failsafe-plugin</artifactId>
          <version>${maven.surefire.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-gpg-plugin</artifactId>
          <version>1.6</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-help-plugin</artifactId>
          <version>2.2</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-install-plugin</artifactId>
          <version>2.5.2</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-invoker-plugin</artifactId>
          <version>2.0.0</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-jar-plugin</artifactId>
          <version>2.6</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-jarsigner-plugin</artifactId>
          <version>1.4</version></plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>2.10.3</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-jxr-plugin</artifactId>
          <version>2.5</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-pdf-plugin</artifactId>
          <version>1.3</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-plugin-plugin</artifactId>
          <version>3.4</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-pmd-plugin</artifactId>
          <version>3.5</version>
          <dependencies>
            <dependency>
              <groupId>net.sourceforge.pmd</groupId>
              <artifactId>pmd-core</artifactId>
              <version>${pmd.version}</version>
            </dependency>
          </dependencies>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-project-info-reports-plugin</artifactId>
          <version>2.8</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-rar-plugin</artifactId>
          <version>2.4</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-release-plugin</artifactId>
          <version>2.5.2</version>
          <dependencies>
            <dependency>
              <groupId>org.apache.maven.scm</groupId>
              <artifactId>maven-scm-provider-gitexe</artifactId>
              <version>${maven.scm.version}</version>
            </dependency>
          </dependencies>
          <configuration>
            <!-- During release:perform, enable the "release" profile -->
            <releaseProfiles>release</releaseProfiles>

            <useReleaseProfile>false</useReleaseProfile>
            <goals>deploy</goals>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-resources-plugin</artifactId>
          <version>2.7</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-scm-plugin</artifactId>
          <version>${maven.scm.version}</version>
          <dependencies>
            <dependency>
              <groupId>org.apache.maven.scm</groupId>
              <artifactId>maven-scm-provider-gitexe</artifactId>
              <version>${maven.scm.version}</version>
            </dependency>
          </dependencies>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-scm-publish-plugin</artifactId>
          <version>1.1</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-shade-plugin</artifactId>
          <version>2.4.1</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-site-plugin</artifactId>
          <version>3.4</version>
          <dependencies>
            <dependency>
              <groupId>org.asciidoctor</groupId>
              <artifactId>asciidoctor-maven-plugin</artifactId>
              <version>${asciidoctor.version}</version>
            </dependency>
          </dependencies>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-source-plugin</artifactId>
          <version>2.4</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>${maven.surefire.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-report-plugin</artifactId>
          <version>${maven.surefire.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-war-plugin</artifactId>
          <version>2.6</version>
        </plugin>
        <plugin>
          <groupId>org.apache.tomcat.maven</groupId>
          <artifactId>tomcat6-maven-plugin</artifactId>
          <version>2.2</version>
        </plugin>
        <plugin>
          <groupId>org.apache.tomcat.maven</groupId>
          <artifactId>tomcat7-maven-plugin</artifactId>
          <version>2.2</version>
        </plugin>
        <plugin>
            <groupId>org.asciidoctor</groupId>
            <artifactId>asciidoctor-maven-plugin</artifactId>
            <version>${asciidoctor.version}</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.cargo</groupId>
          <artifactId>cargo-maven2-plugin</artifactId>
          <version>1.4.15</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.gmaven</groupId>
          <artifactId>gmaven-plugin</artifactId>
          <version>1.5</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.groovy</groupId>
          <artifactId>groovy-eclipse-compiler</artifactId>
          <version>2.9.2-01</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>animal-sniffer-maven-plugin</artifactId>
          <version>1.14</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>antlr-maven-plugin</artifactId>
          <version>2.2</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>appassembler-maven-plugin</artifactId>
          <version>1.10</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>aspectj-maven-plugin</artifactId>
          <version>1.7</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>axistools-maven-plugin</artifactId>
          <version>1.4</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>build-helper-maven-plugin</artifactId>
          <version>1.9.1</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>buildnumber-maven-plugin</artifactId>
          <version>1.3</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>cassandra-maven-plugin</artifactId>
          <version>2.0.0-1</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>castor-maven-plugin</artifactId>
          <version>2.1</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>chronos-jmeter-maven-plugin</artifactId>
          <version>${codehaus.chronos.jmeter.version}</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>chronos-report-maven-plugin</artifactId>
          <version>${codehaus.chronos.jmeter.version}</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>chronos-surefire-maven-plugin</artifactId>
          <version>${codehaus.chronos.jmeter.version}</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>clirr-maven-plugin</artifactId>
          <version>2.6.1</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>cobertura-maven-plugin</artifactId>
          <version>2.7</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>codenarc-maven-plugin</artifactId>
          <version>0.22-1</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>commons-attributes-maven-plugin</artifactId>
          <version>1.0</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>exec-maven-plugin</artifactId>
          <version>1.4.0</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>findbugs-maven-plugin</artifactId>
          <version>3.0.2</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>fitnesse-maven-plugin</artifactId>
          <version>1.1-beta-1</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>gwt-maven-plugin</artifactId>
          <version>2.7.0</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>hibernate3-maven-plugin</artifactId>
          <version>3.0</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>idlj-maven-plugin</artifactId>
          <version>1.2.1</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>javacc-maven-plugin</artifactId>
          <version>2.6</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>javancss-maven-plugin</artifactId>
          <version>2.1</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>jaxb2-maven-plugin</artifactId>
          <version>2.2</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>jboss-maven-plugin</artifactId>
          <version>1.5.0</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>jboss-packaging-maven-plugin</artifactId>
          <version>2.2</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>jdepend-maven-plugin</artifactId>
          <version>2.0</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>jpox-maven-plugin</artifactId>
          <version>1.1.7</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>jslint-maven-plugin</artifactId>
          <version>1.0.1</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>jspc-maven-plugin</artifactId>
          <version>1.4.6</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>keytool-maven-plugin</artifactId>
          <version>1.5</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>latex-maven-plugin</artifactId>
          <version>1.1</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>license-maven-plugin</artifactId>
          <version>1.8</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>nbm-maven-plugin</artifactId>
          <version>4.0.1</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>openjpa-maven-plugin</artifactId>
          <version>1.2</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>ounce-maven-plugin</artifactId>
          <version>1.3</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>properties-maven-plugin</artifactId>
          <version>1.0-alpha-2</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>rmic-maven-plugin</artifactId>
          <version>1.2.1</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>rpm-maven-plugin</artifactId>
          <version>2.1.3</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>sablecc-maven-plugin</artifactId>
          <version>2.2</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>scmchangelog-maven-plugin</artifactId>
          <version>1.3</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>selenium-maven-plugin</artifactId>
          <version>2.3</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>siteskinner-maven-plugin</artifactId>
          <version>1.0</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>sonar-maven-plugin</artifactId>
          <version>2.6</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>sql-maven-plugin</artifactId>
          <version>1.5</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>sqlj-maven-plugin</artifactId>
          <version>1.3</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>sysdeo-tomcat-maven-plugin</artifactId>
          <version>1.1</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>taglist-maven-plugin</artifactId>
          <version>2.4</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>templating-maven-plugin</artifactId>
          <version>1.0-alpha-3</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>tidy-maven-plugin</artifactId>
          <version>1.0-beta-1</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>truezip-maven-plugin</artifactId>
          <version>1.2</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>versions-maven-plugin</artifactId>
          <version>2.2</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>was6-maven-plugin</artifactId>
          <version>1.2.1</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>wagon-maven-plugin</artifactId>
          <version>1.0</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>weblogic-maven-plugin</artifactId>
          <version>2.9.5</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>webtest-maven-plugin</artifactId>
          <version>1.0.0</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>xdoclet-maven-plugin</artifactId>
          <version>1.0</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>xml-maven-plugin</artifactId>
          <version>1.0</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>xmlbeans-maven-plugin</artifactId>
          <version>2.3.3</version>
        </plugin>
        <plugin>
          <groupId>org.gaul</groupId>
          <artifactId>modernizer-maven-plugin</artifactId>
          <version>1.4.0</version>
        </plugin>
        <plugin>
          <groupId>org.jacoco</groupId>
          <artifactId>jacoco-maven-plugin</artifactId>
          <version>${jacoco.version}</version>
        </plugin>
        <plugin>
          <groupId>org.jolokia</groupId>
          <artifactId>docker-maven-plugin</artifactId>
          <version>0.13.3</version>
        </plugin>
        <plugin>
          <groupId>org.jfrog.buildinfo</groupId>
          <artifactId>artifactory-maven-plugin</artifactId>
          <version>2.3.0</version>
        </plugin>
        <plugin>
          <groupId>org.liquibase</groupId>
          <artifactId>liquibase-maven-plugin</artifactId>
          <version>3.4.1</version>
        </plugin>
        <plugin>
          <groupId>org.sonatype.plugins</groupId>
          <artifactId>app-lifecycle-maven-plugin</artifactId>
          <version>1.7</version>
        </plugin>
        <plugin>
          <groupId>org.sonatype.plugins</groupId>
          <artifactId>jarjar-maven-plugin</artifactId>
          <version>1.9</version>
        </plugin>
        <plugin>
          <groupId>org.sonatype.plugins</groupId>
          <artifactId>nexus-staging-maven-plugin</artifactId>
          <version>1.6.6</version>
        </plugin>
        <plugin>
          <groupId>org.sonatype.plugins</groupId>
          <artifactId>nexus-m2settings-maven-plugin</artifactId>
          <version>1.6.6</version>
        </plugin>
        <plugin>
          <groupId>org.sonatype.plugins</groupId>
          <artifactId>port-allocator-maven-plugin</artifactId>
          <version>1.2</version>
        </plugin>
        <plugin>
          <groupId>org.springframework.boot</groupId>
          <artifactId>spring-boot-maven-plugin</artifactId>
          <version>1.2.5.RELEASE</version>
        </plugin>
        <plugin>
          <groupId>pl.project13.maven</groupId>
          <artifactId>git-commit-id-plugin</artifactId>
          <version>2.1.15</version>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <groupId>org.sonatype.plugins</groupId>
        <artifactId>nexus-staging-maven-plugin</artifactId>
        <extensions>true</extensions>
        <inherited>false</inherited>
        <configuration>
          <serverId>ossrh</serverId>
          <nexusUrl>https://oss.sonatype.org/</nexusUrl>
          <stagingProfileId>42b61fb4c62700</stagingProfileId>
          <autoReleaseAfterClose>true</autoReleaseAfterClose>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
        <executions>
          <execution>
            <id>enforce-maven</id>
            <goals>
              <goal>enforce</goal>
            </goals>
            <configuration>
              <rules>
                <requireMavenVersion>
                  <version>${maven.version}</version>
                </requireMavenVersion>
              </rules>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
  <profiles>
    <profile>
      <id>release</id>
      <build>
        <plugins>
          <!-- We want to sign the artifact, the POM, and all attached artifacts -->
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <executions>
              <execution>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <!-- We want to deploy the artifact to a staging location for perusal -->
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-deploy-plugin</artifactId>
            <inherited>true</inherited>
            <configuration>
              <updateReleaseInfo>true</updateReleaseInfo>
            </configuration>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <executions>
              <execution>
                <id>attach-sources</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <configuration>
              <encoding>${project.build.sourceEncoding}</encoding>
            </configuration>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>


text:
import {
  EdgeType, ISchedulerInfo, ITreeLogger,
  NodeType, ObservableTree, ObserverTree, SubjectTree,
} from "../oct/oct"
import { elvis } from "./collector"
import { IEvent } from "./event"
import TimeComposer from "./timeComposer"
import TypedGraph from "./typedgraph"

export class TreeReader {
  public treeGrapher: TreeGrapher = new TreeGrapher()
  public isStopped = false
  public next(message: any): void {
    if (message === null) { return }

    if (message === "reset") {
      this.isStopped = true
    } else if (this.isStopped) {
      this.treeGrapher.reset()
      this.isStopped = false
    }

    elvis(message, ["meta", "events"]).forEach(event => {
      this.treeGrapher.events.push(event)
      this.treeGrapher.time.reduce(event)
    })

    if (typeof message.v !== "undefined" && typeof message.w !== "undefined") {
      this.treeGrapher.addEdge(message.v, message.w, message.type, message.meta)
    } else if (typeof message.type !== "undefined") {
      this.treeGrapher.addNode(message.id, message.type, message.scheduler)
    } else if (message && message.meta) {
      this.treeGrapher.addMeta(message.id, message.meta)
    } else if (typeof message.scheduler !== "undefined") {
      this.treeGrapher.time.schedulers.push(message.scheduler)
    }
  }
}

export default TreeReader

export class TreeGrapher implements ITreeLogger {
  public graph = new TypedGraph<ObservableTree | ObserverTree, { type: EdgeType }>()
  public events: IEvent[] = []
  public time: TimeComposer = new TimeComposer()
  public contractions: { id: string, contract: string[] }[] = []
  public addNode(id: string, type: NodeType, scheduler: ISchedulerInfo): void {
    if (type === "observable") {
      this.graph.setNode(id, new ObservableTree(id, undefined, undefined, scheduler))
    } else if (type === "subject") {
      this.graph.setNode(id, new SubjectTree(id, undefined, undefined, scheduler))
    } else if (type === "observer") {
      this.graph.setNode(id, new ObserverTree(id, undefined, undefined))
    }
  }
  public addMeta(id: string, meta: any): void {
    let existing: any = this.graph.node(id) || {}
    for (let key in meta) {
      if (meta.hasOwnProperty(key)) {
        existing[key] = (existing[key] || [])
        existing[key].push(meta[key])
      }
    }
    this.graph.setNode(id, existing)
  }
  public addEdge(v: string, w: string, type: EdgeType, meta?: any): void {
    if (type === "addSource") {
      let dest = this.graph.node(w) as ObservableTree
      let sources = (dest.sources || []).concat([this.graph.node(v) as ObservableTree])
      if (dest && dest.setSources) {
        dest.setSources(sources)
      }
    } else if (type === "addObserverDestination") {
      let src = this.graph.node(v) as ObserverTree
      src.setSink([this.graph.node(w) as ObserverTree])
    } else if (type === "addObserverOuter") {
      let src = this.graph.node(v) as ObserverTree
      src.setOuter(this.graph.node(w) as ObserverTree)
    } else if (type === "setObserverSource") {
      let src = this.graph.node(v) as ObservableTree
      let dst = this.graph.node(w) as ObserverTree
      dst.setObservable([src])
    }
    this.graph.setEdge(v, w, Object.assign({ type }, meta))
  }
  public addScheduler(id: string, scheduler: ISchedulerInfo): void {
    this.time.schedulers.push(scheduler)
  }
  public addContraction(id: string, nodes: string[]): void {
    this.contractions.push({ id, contract: nodes })
  }
  public reset() {
    this.graph.nodes().forEach(n => this.graph.removeNode(n))
    this.time = new TimeComposer()
  }
}


text:
name: cljs.test/test-all-vars-block
see also:
---

## Summary

## Details

## Examples


text:
[![CocoaPods platforms](http://img.shields.io/cocoapods/p/Carnival.svg?style=flat)](http://img.shields.io/cocoapods/p/Carnival.svg?style=flat)
[![CocoaPods license](http://img.shields.io/cocoapods/l/Carnival.svg?style=flat)](http://img.shields.io/cocoapods/l/Carnival.svg?style=flat)
[![CocoaPods pod version](http://img.shields.io/cocoapods/v/Carnival.svg?style=flat)](http://img.shields.io/cocoapods/v/Carnival.svg?style=flat)
[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)

Carnival Mobile SDK for iOS
==========================

Overview
-------

The Carnival Mobile SDK for iOS is a drop in library that allows the Carnival Mobile Marketing platform to integrate with your iOS apps.

The integration process usually only takes a few minutes.

This project contains the Carnival library, as well as an example project that you can use to quickly see some of the more advanced features of the SDK.

Integration
------

Detailed integration steps can be found in the official Carnival Mobile documentation: http://docs.carnival.io/docs/ios-integration

Required Frameworks
-------

The Carnival Mobile SDK requires the following libaries to be linked in your project.

- CoreLocation.framework
- AVFoundation.framework
- MediaPlayer.framework
- QuartzCore.framework


text:
package com.zhuohua.teacher.model;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * Teacher entity. @author MyEclipse Persistence Tools
 */
@Entity(name="teacherTeacher")
@Table(name="teacher"
    ,catalog="newstudentmis"
)
public class Teacher  implements java.io.Serializable {
    // Fields
     private String tno;
     private Department department;
     private String password;
     private String tname;
     private String phone;
     private String email;
     private String qq;
     private Integer sex;
     private Date birthdate;
     private Integer score;
     private String image;
     private String hometel;
     private Integer isDepart;
     private Integer isTeach;
     private Integer smscount;
     private String attachfiles;

    // Constructors

    /** default constructor */
    public Teacher() {
    }

	/** minimal constructor */
    public Teacher(String tno) {
        this.tno = tno;
    }
    @Id
    @Column(name="Tno", unique=true, nullable=false, length=6)
    public String getTno() {
        return this.tno;
    }

    public void setTno(String tno) {
        this.tno = tno;
    }

  @ManyToOne(fetch=FetchType.EAGER)
        @JoinColumn(name="DepartmentId")

    public Department getDepartment() {
        return this.department;
    }

    public void setDepartment(Department department) {
        this.department = department;
    }

    @Column(name="Password", length=50)

    public String getPassword() {
        return this.password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    @Column(name="Tname", length=50)

    public String getTname() {
        return this.tname;
    }

    public void setTname(String tname) {
        this.tname = tname;
    }

    @Column(name="Phone", length=11)

    public String getPhone() {
        return this.phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    @Column(name="Email", length=50)

    public String getEmail() {
        return this.email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    @Column(name="QQ", length=20)

    public String getQq() {
        return this.qq;
    }

    public void setQq(String qq) {
        this.qq = qq;
    }

    @Column(name="Sex")

    public Integer getSex() {
        return this.sex;
    }

    public void setSex(Integer sex) {
        this.sex = sex;
    }
    @Temporal(TemporalType.DATE)
    @Column(name="Birthdate", length=10)

    public Date getBirthdate() {
        return this.birthdate;
    }

    public void setBirthdate(Date birthdate) {
        this.birthdate = birthdate;
    }

    @Column(name="Score")

    public Integer getScore() {
        return this.score;
    }

    public void setScore(Integer score) {
        this.score = score;
    }

    @Column(name="Image", length=50)

    public String getImage() {
        return this.image;
    }

    public void setImage(String image) {
        this.image = image;
    }

    @Column(name="Hometel", length=15)

    public String getHometel() {
        return this.hometel;
    }

    public void setHometel(String hometel) {
        this.hometel = hometel;
    }

    @Column(name="isDepart")

    public Integer getIsDepart() {
        return this.isDepart;
    }

    public void setIsDepart(Integer isDepart) {
        this.isDepart = isDepart;
    }

    @Column(name="isTeach")

    public Integer getIsTeach() {
        return this.isTeach;
    }

    public void setIsTeach(Integer isTeach) {
        this.isTeach = isTeach;
    }

    @Column(name="SMScount")

    public Integer getSmscount() {
        return this.smscount;
    }

    public void setSmscount(Integer smscount) {
        this.smscount = smscount;
    }

    @Column(name="attachfiles")

    public String getAttachfiles() {
        return this.attachfiles;
    }

    public void setAttachfiles(String attachfiles) {
        this.attachfiles = attachfiles;
    }
}


text:
//----------------------------------------------------------------------------
//
// <copyright file="RepairForm.cs" company="Aurelitec">
// Copyright (C) 2012-2016 Aurelitec
// </copyright>
//
// Description: The color flashing repair form of PixelHealer.
//
//---------------------------------------------------------------------------

#pragma warning disable SA1124 // DoNotUseRegions

namespace PixelHealer
{
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Diagnostics;
    using System.Drawing;
    using System.Timers;
    using System.Windows.Forms;

    /// <summary>
    /// The color flashing repair forms of PixelHealer.
    /// </summary>
    public partial class RepairForm : Form
    {
        #region Fields

        /// <summary>
        /// The high accuracy timer for flashing.
        /// </summary>
        private System.Timers.Timer flashingTimer;

        /// <summary>
        /// The stopwatch that counts the repair form life time.
        /// </summary>
        private Stopwatch flashingStopwatch;

        /// <summary>
        /// The auto close time span.
        /// </summary>
        private TimeSpan autoCloseTimeSpan;

        /// <summary>
        /// The list of flashing colors.
        /// </summary>
        private List<Color> flashingColorsList;

        /// <summary>
        /// The current color index in the list of flashing colors.
        /// </summary>
        private int currentFlashingColorIndex;

        /// <summary>
        /// The associated repair settings form.
        /// </summary>
        private SettingsForm settingsForm;

        /// <summary>
        /// The about form.
        /// </summary>
        private AboutForm aboutForm;

        /// <summary>
        /// Is the moving or resizing of the form performed by the user?
        /// </summary>
        private bool userMoveResize;

        /// <summary>
        /// Backup copy of the previously saved form size.
        /// </summary>
        private Size savedSize;

        #endregion

        #region Constructor

        /// <summary>
        /// Initializes a new instance of the <see cref="RepairForm"/> class.
        /// </summary>
        public RepairForm()
        {
            // Set the form's font to the default operating system font
            this.Font = SystemFonts.MessageBoxFont;

            // Required method for designer support
            this.InitializeComponent();

            // This is the repair form instance
            RepairForm.TheRepairForm = this;

            // Set the previously saved location, and backup the previously saved size to apply at the end of the Load event
            this.Location = new Point((int)Properties.Settings.Default.Left, (int)Properties.Settings.Default.Top);
            this.savedSize = new Size((int)Properties.Settings.Default.Width, (int)Properties.Settings.Default.Height);

            // Handle application settings property changes
            Properties.Settings.Default.PropertyChanged += this.Default_PropertyChanged;
        }

        #endregion

        #region Properties

        /// <summary>
        /// Gets the main form instance.
        /// </summary>
        public static RepairForm TheRepairForm { get; private set; }

        /// <summary>
        /// Gets a value indicating whether the settings form is created (and displayed).
        /// </summary>
        private bool SettingsFormExists
        {
            get { return (this.settingsForm != null) && (!this.settingsForm.IsDisposed); }
        }

        #endregion

        #region Public Methods

        /// <summary>
        /// Starts flashing if the flashing is stopped, or stop flashing if flashing is running.
        /// </summary>
        public void ToggleFlashing()
        {
            if (!this.flashingTimer.Enabled)
            {
                this.StartFlashing();
            }
            else
            {
                this.StopFlashing();
            }

            // Update the Pause/Resume button text and enable/disable the interval track bar in the settings form, if visible
            if (this.SettingsFormExists)
            {
                this.settingsForm.UpdateToggleFlashingButton(this.flashingTimer.Enabled);
            }
        }

        /// <summary>
        /// Locates the repair form on screen by moving the mouse pointer over it.
        /// </summary>
        public void LocateOnscreen()
        {
            this.BringToFront();
            Cursor.Position = new Point(this.Location.X + (this.Width / 2), this.Location.Y + (this.Height / 2));
        }

        #endregion

        #region Form Initialization

        /// <summary>
        /// Event: Performs important initialization routines when the form is first loaded.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">Empty event data.</param>
        private void EventFlashingFormLoad(object sender, EventArgs e)
        {
            // Initialize the flashing timer and stopwatch
            this.flashingTimer = new System.Timers.Timer(Properties.Settings.Default.FlashingInterval)
                { AutoReset = false, SynchronizingObject = this };
            this.flashingTimer.Elapsed += this.EventFlashingTimerElapsed;
            this.flashingStopwatch = new Stopwatch();

            // Initialize the default flashing color list
            this.flashingColorsList = new List<Color>();
            this.currentFlashingColorIndex = 0;
            this.UpdateFlashingColorsList();

            // Update the auto close time
            this.UpdateAutoCloseTime();

            // Set the form size to the previously saved size (to allow even 1x1 saved form sizes)
            this.Size = this.savedSize;

            // Update the notify icon
            this.notifyIcon.Icon = this.Icon;

            // Assign the context menu
            this.ContextMenu = this.contextMenu;
            this.notifyIcon.ContextMenu = this.contextMenu;

            // Make the repair form moveable and resizeable with the mouse
            RestlessControlMaker.Make(this).FullBodyCursor = Cursors.Cross;
        }

        /// <summary>
        /// Event: Shows the Settings form when the repair form is first shown.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">Empty event data.</param>
        private void EventRepairFormShown(object sender, EventArgs e)
        {
            this.ShowSettingsForm();
        }

        #endregion

        #region Timer Functionality

        /// <summary>
        /// Event Handler: Flashing Timer -> Elapsed
        /// Periodically flashes (quickly changes) the background of the repair window.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">Elapsed event data.</param>
        private void EventFlashingTimerElapsed(object sender, ElapsedEventArgs e)
        {
            if (this.flashingColorsList.Count > 0)
            {
                this.BackColor = this.flashingColorsList[this.currentFlashingColorIndex];
                this.currentFlashingColorIndex = this.currentFlashingColorIndex < this.flashingColorsList.Count - 1 ? this.currentFlashingColorIndex + 1 : 0;
            }

            // To ensure that the flashing timer cannot re-enter this Elapsed event, its AutoReset property is false and
            // now we are manually starting it again, after we finished changing the background color
            this.flashingTimer.Start();
        }

        /// <summary>
        /// Starts flashing by starting the flashing timer and stopwatch.
        /// </summary>
        private void StartFlashing()
        {
            this.flashingTimer.Start();
            this.flashingStopwatch.Start();
        }

        /// <summary>
        /// Stops flashing by stopping the flashing timer and stopwatch.
        /// </summary>
        private void StopFlashing()
        {
            this.flashingTimer.Stop();
            this.flashingStopwatch.Stop();
        }

        /// <summary>
        /// Checks if it's time to close when the auto close timer fires. Also updates the auto close elapsed and remaining timer label
        /// in the Settings form.
        /// </summary>
        /// <param name="sender">The sender of the event.</param>
        /// <param name="e">Empty event data.</param>
        private void AutoCloseTimer_Tick(object sender, EventArgs e)
        {
            // Check if it's autoclose time
            if ((this.autoCloseTimeSpan > TimeSpan.Zero) && (this.flashingStopwatch.Elapsed > this.autoCloseTimeSpan))
            {
                this.Close();
            }

            // Update the settings form
            if (this.SettingsFormExists)
            {
                TimeSpan remaining = this.autoCloseTimeSpan - this.flashingStopwatch.Elapsed;
                this.settingsForm.UpdateTimerLabel(this.flashingStopwatch.Elapsed, remaining);
            }
        }

        #endregion

        #region Private Methods

        /// <summary>
        /// Shortcut method to add a color to the flashing colors list, only if it's checked by the user.
        /// </summary>
        /// <param name="isChecked">True if the color is checked by the user, false otherwise.</param>
        /// <param name="color">The color value.</param>
        private void AddCheckedColor(bool isChecked, Color color)
        {
            if (isChecked)
            {
                this.flashingColorsList.Add(color);
            }
        }

        /// <summary>
        /// Updates the flashing color list with a new list of flashing colors.
        /// </summary>
        private void UpdateFlashingColorsList()
        {
            bool wasEnabled = this.flashingTimer.Enabled;
            this.StopFlashing();
            try
            {
                this.flashingColorsList.Clear();
                this.currentFlashingColorIndex = 0;
                this.AddCheckedColor(Properties.Settings.Default.BlackChecked, Color.Black);
                this.AddCheckedColor(Properties.Settings.Default.WhiteChecked, Color.White);
                this.AddCheckedColor(Properties.Settings.Default.RedChecked, Color.Red);
                this.AddCheckedColor(Properties.Settings.Default.GreenChecked, Color.Lime);
                this.AddCheckedColor(Properties.Settings.Default.BlueChecked, Color.Blue);
                this.AddCheckedColor(Properties.Settings.Default.CustomColorChecked, Properties.Settings.Default.CustomColor);
            }
            finally
            {
                if (wasEnabled)
                {
                    this.StartFlashing();
                }
            }
        }

        /// <summary>
        /// Updates the auto close time span.
        /// </summary>
        private void UpdateAutoCloseTime()
        {
            if (Properties.Settings.Default.AutoClose)
            {
                DateTime time = Properties.Settings.Default.AutoCloseTime;
                this.autoCloseTimeSpan = new TimeSpan(time.Hour, time.Minute, time.Second);
            }
            else
            {
                this.autoCloseTimeSpan = TimeSpan.Zero;
            }
        }

        /// <summary>
        /// Creates and shows the settings form. If it's already displayed, focuses it.
        /// </summary>
        private void ShowSettingsForm()
        {
            if (!this.SettingsFormExists)
            {
                this.settingsForm = new SettingsForm();
                this.settingsForm.Show(this);
                this.settingsForm.UpdateToggleFlashingButton(this.flashingTimer.Enabled);
            }
            else
            {
                this.settingsForm.Focus();
            }
        }

        #endregion

        #region Other Form Events

        /// <summary>
        /// Perform important tasks when application settings properties are changes.
        /// </summary>
        /// <param name="sender">The sender of the event.</param>
        /// <param name="e">Property changed event data.</param>
        private void Default_PropertyChanged(object sender, PropertyChangedEventArgs e)
        {
            // Update the flashing colors list when colors are checked or unchecked, or the custom color is changed
            if (e.PropertyName.Contains("Checked") || e.PropertyName.Equals("CustomColor"))
            {
                this.UpdateFlashingColorsList();
                return;
            }

            // Update the interval of the high accuracy timer for flashing when the flashing interval is changed
            if (e.PropertyName.Equals("FlashingInterval"))
            {
                if (this.flashingTimer != null)
                {
                    this.flashingTimer.Interval = Properties.Settings.Default.FlashingInterval;
                }

                return;
            }

            // Update the auto close time span when the auto close checked setting or the auto close time setting are changed
            if (e.PropertyName.Equals("AutoClose") || e.PropertyName.Equals("AutoCloseTime"))
            {
                this.UpdateAutoCloseTime();

                return;
            }

            // Update the location and size of the form when the left, top, width or height settings change (but not when the user
            // directly moves or resizes the form)
            if (!this.userMoveResize)
            {
                if (e.PropertyName.Equals("Left"))
                {
                    this.Left = (int)Properties.Settings.Default.Left;
                    return;
                }

                if (e.PropertyName.Equals("Top"))
                {
                    this.Top = (int)Properties.Settings.Default.Top;
                    return;
                }

                if (e.PropertyName.Equals("Width"))
                {
                    this.Width = (int)Properties.Settings.Default.Width;
                    return;
                }

                if (e.PropertyName.Equals("Height"))
                {
                    this.Height = (int)Properties.Settings.Default.Height;
                    return;
                }
            }
        }

        /// <summary>
        /// Updates the Left and Top user settings when the user moves the form.
        /// </summary>
        /// <param name="sender">The sender of the event.</param>
        /// <param name="e">Empty event data.</param>
        private void RepairForm_Move(object sender, EventArgs e)
        {
            this.userMoveResize = true;
            Properties.Settings.Default.Left = this.Left;
            Properties.Settings.Default.Top = this.Top;
            this.userMoveResize = false;
        }

        /// <summary>
        /// Updates the Width and Height user settings when the user resizes the form.
        /// </summary>
        /// <param name="sender">The sender of the event.</param>
        /// <param name="e">Empty event data.</param>
        private void RepairForm_Resize(object sender, EventArgs e)
        {
            this.userMoveResize = true;
            Properties.Settings.Default.Width = this.Width;
            Properties.Settings.Default.Height = this.Height;
            this.userMoveResize = false;
        }

        /// <summary>
        /// Shows the settings form when the user presses Escape.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">Keyboard event data.</param>
        private void RepairForm_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Escape)
            {
                this.ShowSettingsForm();
            }
        }

        /// <summary>
        /// Toggles (starts or stops) flashing when the user double-clicks the left mouse button.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">Mouse event data.</param>
        private void RepairForm_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            if (e.Button == MouseButtons.Left)
            {
                this.ToggleFlashing();
            }
        }

        /// <summary>
        /// Shows the settings form when the user clicks the notify icon.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">Mouse event data.</param>
        private void NotifyIcon_MouseClick(object sender, MouseEventArgs e)
        {
            if (e.Button == MouseButtons.Left)
            {
                this.ShowSettingsForm();
            }
        }

        #endregion

        #region Context Menu

        /// <summary>
        /// Show the Settings form when the user clicks the Settings context menu item.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">An object that contains no event data.</param>
        private void SettingsMenuItem_Click(object sender, EventArgs e)
        {
            this.ShowSettingsForm();
        }

        /// <summary>
        /// Show the About form when the user clicks the About context menu item.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">An object that contains no event data.</param>
        private void AboutMenuItem_Click(object sender, EventArgs e)
        {
            if (this.aboutForm == null)
            {
                this.aboutForm = new AboutForm();
            }

            if (!this.aboutForm.Visible)
            {
                this.aboutForm.ShowDialog(this);
            }
            else
            {
                this.aboutForm.Focus();
            }
        }

        /// <summary>
        /// Closes the form and the app when the user clicks the Exit context menu item.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">An object that contains no event data.</param>
        private void ExitMenuItem_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        #endregion

        #region Form Closing

        /// <summary>
        /// Saves the user settings when the form is closing.
        /// </summary>
        /// <param name="sender">The sender of the event.</param>
        /// <param name="e">Form closing event data.</param>
        private void RepairForm_FormClosing(object sender, FormClosingEventArgs e)
        {
            Properties.Settings.Default.Save();
        }

        #endregion
    }
}


text:
<?php

namespace Auto\MainBundle\Form\Type;

use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;

class AuthAutoType extends AbstractType
{
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder->add('email', 'email', array('label' => 'E-mail: '));
        $builder->add('password', 'password', array('label' => 'Пароль: '));

    }

    public function getName()
    {
        return 'user_name';
    }
}


text:
angular.module('starter', ['ionic', 'starter.controllers','ionic.contrib.ui.cards','rzModule'])

.config(function($stateProvider, $urlRouterProvider) {
  $stateProvider

    .state('app', {
    url: '/app',
    abstract: true,
    templateUrl: 'templates/menu.html'
  })

  .state('app.map', {
      url: '/map',
      views: {
        'menuContent': {
          templateUrl: 'templates/map.html',
          controller: 'MapCtrl'
        }
      }
    })

  // if none of the above states are matched, use this as the fallback
  $urlRouterProvider.otherwise('/app/map');
});


text:
package com.kotcrab.vis.ui.widget.file;

import com.badlogic.gdx.files.FileHandle;
import com.badlogic.gdx.utils.Array;

import java.io.FileFilter;

/**
 * FileTypeFilter is used to limit {@link FileChooser} selection only to specified set of extensions. User can use file
 * chooser's select box to select that extension or all types (if it is allowed).
 *

 * This class is not replacement for {@link FileChooser#setFileFilter(FileFilter)}. While the main file chooser
 * filter does general filtering (such as removing hidden or inaccessible files), FileTypeFilter is used to limit extensions
 * of files than user can select.
 *

 * This filter works by adding rules. Each rule has a description (showed in file chooser's filter select box) and a
 * list of extensions that it accepts. During selection user can switch active rule via select box. Additionally each
 * FileTypeFilter can support 'all types allowed' where all files are accepted regardless of their extension.
 * @author Kotcrab
 * @since 1.1.0
 */
public class FileTypeFilter {
	private boolean allTypesAllowed;
	private Array<Rule> rules = new Array<Rule>();

	public FileTypeFilter (FileTypeFilter other) {
		this.allTypesAllowed = other.allTypesAllowed;
		this.rules = new Array<Rule>(other.rules);
	}

	/** @param allTypesAllowed if true then user can choose "All types" in file chooser's filter select box. In that mode all files are shown */
	public FileTypeFilter (boolean allTypesAllowed) {
		this.allTypesAllowed = allTypesAllowed;
	}

	/**
	 * Adds new rule to {@link FileTypeFilter}
	 * @param description rule description used in FileChooser's file type select box
	 * @param extensions list of extensions without leading dot, eg. 'jpg', 'png' etc.
	 */
	public void addRule (String description, String... extensions) {
		rules.add(new Rule(description, extensions));
	}

	public Array<Rule> getRules () {
		return rules;
	}

	/**
	 * Controls whether to allow 'all types allowed' mode, where all file types are shown.
	 * @param allTypesAllowed if true then user can choose "All types" in file chooser's filter select box where all files are shown
	 */
	public void setAllTypesAllowed (boolean allTypesAllowed) {
		this.allTypesAllowed = allTypesAllowed;
	}

	public boolean isAllTypesAllowed () {
		return allTypesAllowed;
	}

	/** Defines single rule for {@link FileTypeFilter}. Rule instances are immutable. */
	public static class Rule {
		private final String description;
		private final Array<String> extensions = new Array<String>();
		private final boolean allowAll;

		public Rule (String description) {
			this.description = description;
			this.allowAll = true;
		}

		public Rule (String description, String... extensionList) {
			this.description = description;
			this.allowAll = false;
			for (String ext : extensionList) {
				if (ext.startsWith(".")) ext = ext.substring(1);
				extensions.add(ext.toLowerCase());
			}
		}

		public boolean accept (FileHandle file) {
			if (allowAll) return true;
			String ext = file.extension().toLowerCase();
			return extensions.contains(ext, false);
		}

		public String getDescription () {
			return description;
		}

		/** @return copy of extension list. */
		public Array<String> getExtensions () {
			return new Array<String>(extensions);
		}

		@Override
		public String toString () {
			return description;
		}
	}
}


text:
const fs = require('fs')
const readline = require('readline')

let section = 'Favorites\\Files'

const lineReader = readline.createInterface({
    input: fs.createReadStream(process.argv[2]),
    output: fs.createWriteStream(process.argv[3]),
});

let start = false

lineReader.on('line', function (line) {
    if (line === '[Favorites\\Files]') {
        start = true
        this.output.write(`${line}\n`)
    }
    if (start === true) {
        if (line === '[FileFormats]') {
            start = false
            this.output.write(`${line}\n`)
        }
    } else {
        this.output.write(`${line}\n`)
    }
});

fs.unlinkSync(process.argv[2])
setTimeout(() => {
    fs.renameSync(process.argv[3], process.argv[2])
}, 100)


text:
"""
    this module contains the core xmpp handling functions.

"""

## jsb imports

from jsb.lib.eventbase import EventBase
from jsb.lib.config import Config
from jsb.utils.generic import toenc, jabberstrip, fromenc
from jsb.utils.lazydict import LazyDict
from jsb.utils.exception import handle_exception
from jsb.utils.locking import lockdec
from jsb.lib.threads import start_new_thread
from jsb.utils.trace import whichmodule
from jsb.lib.gozerevent import GozerEvent
from jsb.lib.fleet import getfleet

## xmpp import

from jsb.contrib.xmlstream import NodeBuilder, XMLescape, XMLunescape

## basic imports

import socket
import os
import time
import copy
import logging
import thread
import cgi
import xml

## locks

outlock = thread.allocate_lock()
inlock = thread.allocate_lock()
connectlock = thread.allocate_lock()
outlocked = lockdec(outlock)
inlocked = lockdec(inlock)
connectlocked = lockdec(connectlock)

## classes

class XMLStream(NodeBuilder):

    """ XMLStream. """

    def __init__(self, host, port, name='sxmpp'):
        self.name = name
        self.connection = None
        self.encoding = "utf-8"
        self.stop = False
        self.result = LazyDict()
        self.final = LazyDict()
        self.subelements = []
        self.reslist = []
        self.cur = u""
        self.tags = []
        self.host = host
        self.port = port
        self.handlers = LazyDict()
        self.addHandler('proceed', self.handle_proceed)
        self.addHandler('message', self.handle_message)
        self.addHandler('presence', self.handle_presence)
        self.addHandler('iq', self.handle_iq)
        self.addHandler('stream', self.handle_stream)
        self.addHandler('stream:stream', self.handle_stream)
        self.addHandler('stream:error', self.handle_streamerror)
        self.addHandler('stream:features', self.handle_streamfeatures)

    def handle_proceed(self, data):
        """ default stream handler. """
        logging.debug("%s - proceeding" % self.name)

    def handle_stream(self, data):
        """ default stream handler. """
        logging.info("%s - stream - %s" % (self.name, data.dump()))

    def handle_streamend(self, data):
        """ default stream handler. """
        logging.warn("%s - stream END - %s" % (self.name, data))

    def handle_streamerror(self, data):
        """ default stream error handler. """
        logging.error("%s - STREAMERROR - %s" % (self.name, data.dump()))

    def handle_streamfeatures(self, data):
        """ default stream features handler. """
        logging.debug("%s - STREAMFEATURES: %s" % (self.name, LazyDict(data).dump()))

    def addHandler(self, namespace, func):
        """ add a namespace handler. """
        self.handlers[namespace] = func

    def delHandler(self, namespace):
        """ delete a namespace handler. """
        del self.handlers[namespace]

    def getHandler(self, namespace):
        """ get a namespace handler. """
        try: return self.handlers[namespace]
        except KeyError: return None

    def parse_one(self, data):
        """ handle one xml stanza. """
        NodeBuilder.__init__(self)
        self._dispatch_depth = 2
        try: return self._parser.Parse(data.strip())
        except xml.parsers.expat.ExpatError, ex:
            if 'not well-formed' in str(ex):
                logging.error("%s - data is not well formed" % self.name)
                logging.debug(data)
                handle_exception()
                logging.debug("buffer: %s previous: %s" % (self.buffer, self.prevbuffer))
                return {}
            logging.debug("%s - ALERT: %s - %s" % (self.name, str(ex), data))
        except Exception, ex:
            handle_exception()
            return {}

    def checkifvalid(self, data):
        result = self.parse_one(data)
        self.final = {}
        self.reslist = []
        self.tags = []
        self.subelements = []
        #self.buffer = ""
        return result

    @inlocked
    def loop_one(self, data):
        """ handle one xml stanza. """
        if self.parse_one(data): return self.finish(data)
        return {}

    def _readloop(self):
        """ proces all incoming data. """
        logging.debug('%s - starting readloop' % self.name)
        self.prevbuffer = ""
        self.buffer = ""
        self.error = ""
        data = ""
        while not self.stopped:
            time.sleep(0.001)
            try:
                data = jabberstrip(fromenc(self.connection.read()))
                logging.debug(u"%s - incoming: %s" % (self.name, data))
                if data.endswith("</stream:stream>"):
                    logging.error("%s - end of stream detected" % self.name)
                    self.error = "streamend"
                    self.disconnectHandler(Exception('remote %s disconnected' %  self.host))
                    break
                if data == "":
                    logging.error('%s - remote disconnected' % self.name)
                    self.error = 'disconnected'
                    self.disconnectHandler(Exception('remote %s disconnected' %  self.host))
                    break
                if True:
                    self.buffer = u"%s%s" % (self.buffer, data)
                    #splitted = self.buffer.split(">")
                    #lastitem = splitted[-1]
                    handlers = self.handlers.keys()
                    handlers.append("/")
                    for handler in handlers:
                        target = "%s>" % handler
                        index = self.buffer.find(target)
                        if index != -1:
                            try:
                                if self.loop_one(self.buffer[:index+len(target)]):
                                    self.buffer = self.buffer[index+1+len(target):]
                                else:
                                    self.buffer = ""
                                    break
                            except: handle_exception()
            except xml.parsers.expat.ExpatError, ex:
                logging.error("%s - %s - %s" % (self.name, str(ex), data))
                self.buffer = ""
                self.error = str(ex)
                self.disconnectHandler(ex)
                break
            except Exception, ex:
                handle_exception()
                self.error = str(ex)
                self.disconnectHandler(ex)
                break
        logging.info('%s - stopping readloop .. %s' % (self.name, self.error or 'error not set'))

    @outlocked
    def _raw(self, stanza):
        """ output a xml stanza to the socket. """
        if not self.connection: return
        time.sleep(0.01)
        try:
            stanza = stanza.strip()
            if not stanza:
                logging.debug("%s - no stanze provided. called from: %s" % (self.name, whichmodule()))
                return
            what = jabberstrip(stanza)
            what = toenc(stanza)
            logging.debug("%s - out - %s" % (self.name, what))
            if not what.endswith('>') or not what.startswith('<'):
                logging.error('%s - invalid stanza: %s' % (self.name, what))
                return
            if what.startswith('<stream') or what.startswith('<message') or what.startswith('<presence') or what.startswith('<iq'):
                logging.debug(u"%s - sxmpp - out - %s" % (self.name, what))
                try: self.connection.send(what + u"\r\n")
                except AttributeError: self.connection.write(what)
            else: logging.error('%s - invalid stanza: %s' % (self.name, what))
        except socket.error, ex:
            if 'Broken pipe' in str(ex):
                logging.debug('%s - core - broken pipe .. ignoring' % self.name)
                return
            self.error = str(ex)
            handle_exception()
        except Exception, ex:
            self.error = str(ex)
            handle_exception()

    def connect(self):
        """ connect to the server. """
        self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
        self.sock.setblocking(0)
        self.sock.settimeout(10)
        if not self.port: self.port = 5222
        if self.server != 'localhost': self.host = self.server
        else: self.host = self.cfg.host
        logging.warn("%s - connecting to %s:%s" % (self.name, self.host, self.port))
        self.sock.connect((self.host, self.port))
        self.sock.settimeout(60)
        time.sleep(1)
        logging.debug("%s - starting stream" % self.name)
        self.sock.send('<stream:stream to="%s" xmlns="jabber:client" xmlns:stream="http://etherx.jabber.org/streams" version="1.0">\r\n' % self.user.split('@')[1])
        time.sleep(3)
        result = self.sock.recv(1500)
        logging.debug("%s - %s" %  (self.name, str(result)))
        self.loop_one(result)
        self.sock.send('<starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls"/>\r\n')
        time.sleep(3)
        result = self.sock.recv(1500)
        logging.debug("%s - %s" % (self.name, str(result)))
        self.loop_one(result)
        self.sock.settimeout(60)
        self.sock.setblocking(1)
        return self.dossl()

    def dossl(self):
        """ enable ssl on the socket. """
        try:
            import ssl
            logging.debug("%s - wrapping ssl socket" % self.name)
            self.connection = ssl.wrap_socket(self.sock)
        except ImportError:
            logging.debug("%s - making ssl socket" % self.name)
            self.connection = socket.ssl(self.sock)
        if self.connection:
            return True
        else:
            return False

    def logon(self):
        """ called upon logon on the server. """
        start_new_thread(self._doprocess, ())

    def finish(self, data):
        """ finish processing of an xml stanza. """
        methods = []
        self.final['subelements'] = self.subelements
        for subelement in self.subelements:
            logging.debug("%s - %s" % (self.name, str(subelement)))
            for elem in subelement:
                logging.debug("%s - setting %s handler" % (self.name, elem))
                methods.append(self.getHandler(elem))
            for method in methods:
                if not method: continue
                try:
                    result = GozerEvent(subelement)
                    result.bot = self
                    result.orig = data
                    result.jabber = True
                    method(result)
                except Exception, ex: handle_exception()
        if self.tags:
            element = self.tags[0]
            logging.debug("%s - setting element: %s" % (self.name, element))
        else: element = 'stream'
        self.final['element'] = element
        method = self.getHandler(element)
        if method:
            try:
                result = GozerEvent(self.final)
                result.bot = self
                result.orig = data
                result.jabber = True
                method(result)
            except Exception, ex:
                handle_exception()
                result = {}
        else:
            logging.error("%s - can't find handler for %s" % (self.name, element))
            result = {}
        if result:
            self.final = {}
            self.reslist = []
            self.tags = []
            self.subelements = []
            self.buffer = ""
            return result

    def unknown_starttag(self,  tag, attrs):
        """ handler called by the self._parser on start of a unknown start tag. """
        NodeBuilder.unknown_starttag(self, tag, attrs)
        self.cur = tag
        if not self.tags: self.final.update(attrs)
        else: self.result[tag] = attrs
        self.tags.append(tag)

    def unknown_endtag(self,  tag):
        """ handler called by the self._parser on start of a unknown endtag. """
        NodeBuilder.unknown_endtag(self, tag)
        self.result = {}
        self.cur = u""

    def handle_data(self, data):
        """ node data handler. """
        NodeBuilder.handle_data(self, data)

    def dispatch(self, dom):
        """ dispatch a dom to the appropiate handler. """
        res = LazyDict()
        parentname = dom.getName()
        data = dom.getData()
        if data:
            self.final[parentname] = data
            if parentname == 'body': self.final['txt'] = data
        attrs = dom.getAttributes()
        ns = dom.getNamespace()
        res[parentname] = LazyDict()
        res[parentname]['data'] = data
        res[parentname].update(attrs)
        if ns: res[parentname]['xmlns'] = ns
        for child in dom.getChildren():
            name = child.getName()
            data = child.getData()
            if data: self.final[name] = data
            attrs = child.getAttributes()
            ns = child.getNamespace()
            res[parentname][name] = LazyDict()
            res[parentname][name]['data'] = data
            res[parentname][name].update(attrs)
            self.final.update(attrs)
            if ns: res[parentname][name]['xmlns'] = ns
        self.subelements.append(res)

    def disconnectHandler(self, ex):
        """ handler called on disconnect. """
        self.stopped = True
        logging.warn('%s - disconnected: %s' % (self.name, str(ex)))


text:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content">

    <TextView
            android:id="@+id/signalStatus"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:drawablePadding="10dp"
            android:text=""/>

    <TextView
            android:id="@+id/satelliteStatus"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:paddingLeft="6dp"
            android:drawableRight="@drawable/ic_satellite"
            android:text=""/>

</LinearLayout>


text:
class PoiHomeController < ApplicationController
  include ApplicationHelper

  def index
    session[:account_type] = "poi"
  end

end


text:
LUA_GLUE_INTERFACE(ISlateStyle, ISlateStyle)
LUA_GLUE_END()
LUA_GLUE_SHARED(ISlateStyle, ISlateStyle)
LUA_GLUE_SHARED(const_ISlateStyle, const ISlateStyle)

static int32 SetStyleForFArguments(lua_State*inL, const FString& StyleName)
{
	int32 TopCount = ue_lua_gettop(inL);
	UTableUtil::push(inL, "classname");
	ue_lua_gettable(inL, 2);
	FString Param1ClassName = UTableUtil::pop<FString>(inL, -1);
	if (Param1ClassName == "USlateWidgetStyleAsset")
	{
		UTableUtil::push(inL, StyleName+"1");
	}
	else if (Param1ClassName == "ISlateStyle")
	{
		UTableUtil::push(inL, StyleName + "2");
	}
	else
	{
		UTableUtil::push(inL, "_IsTSharedPtr");
		ue_lua_gettable(inL, 2);
		if(!ue_lua_isnil(inL, -1))
			UTableUtil::push(inL, StyleName + "3");
		else
			UTableUtil::push(inL, StyleName + "0");
	}
	ue_lua_gettable(inL, 1);
	for (int i = 1; i <= TopCount; i++)
	{
		ue_lua_pushvalue(inL, i);
	}
	ue_lua_call(inL, TopCount, 1);
	return 1;
}

LUA_GLUE_INTERFACE(SWidget, SWidget)
LUA_GLUE_END()

LUA_GLUE_STRUCT_TRAIT_NAME(TSharedPtr_SWidget, TSharedPtr<SWidget>)
LUA_GLUE_STRUCT_TRAIT_NAME(TSharedRef_SWidget, TSharedRef<SWidget>)

#define LUA_GLUE_SLATE_ARGS(SLATE_TYPE)

#define LUA_SLATE_ATTRIBUTE(TYPE,NAME) LUA_GLUE_FUNCTION_OVERLOAD(NAME, NAME, TheClassType& (TheClassType::*)(const TAttribute<TYPE>&))
#define LUA_SLATE_ARGUMENT(TYPE,NAME) LUA_GLUE_FUNCTION(NAME)
#define LUA_SLATE_DEFAULT_SLOT(TYPE,NAME) LUA_GLUE_FUNCTION_NAME(__call, operator[])

#define LUA_SLATE_STYLE_ARGUMENT(ArgType, ArgName)LUA_GLUE_OVERLOAD(ArgName, TheClassType&(TheClassType::*)(const ArgType*))\
												LUA_GLUE_OVERLOAD(ArgName, TheClassType&(TheClassType::*)(const class USlateWidgetStyleAsset* const))\
												LUA_GLUE_OVERLOAD(ArgName, TheClassType&(TheClassType::*)(const class ISlateStyle* InSlateStyle, const FName& , const ANSICHAR* ), nullptr)\
												LUA_GLUE_OVERLOAD(ArgName, TheClassType&(TheClassType::*)(const TSharedPtr< const class ISlateStyle >&, const FName& , const ANSICHAR* ), nullptr)

#define LUA_SLATE_NAMED_SLOT(...)
#define LUA_SLATE_SUPPORTS_SLOT(...) LUA_GLUE_FUNCTION_NAME(__addslot, operator+)

#define LUA_SLATE_EVENT(TYPE, NAME) LUA_GLUE_FUNCTION_OVERLOAD(NAME, NAME, TheClassType& (TheClassType::*)(const TheSlateType::TYPE&))
#define LUA_SLATE_EVENT_RAW(TYPE, NAME) LUA_GLUE_FUNCTION_OVERLOAD(NAME, NAME, TheClassType& (TheClassType::*)(const TYPE&))

template<class T>
struct MakeFromArgs;

template<class T, class... Args>
struct MakeFromArgs<void(T::*)(const typename T::FArguments&, Args...)>
{
	using Ret = TSharedRef<T>;
	static Ret Call(const typename T::FArguments& FArgs, Args... args)
	{
		return MakeTDecl<T>(TTraitStructTypeName<T>(), __FILE__, __LINE__, RequiredArgs::MakeRequiredArgs(args...)) <<= FArgs;
	}
};

LUA_GLUE_INTERFACE(IToolTip, IToolTip)
LUA_GLUE_END()
LUA_GLUE_SHARED(IToolTip, IToolTip)

LUA_GLUE_BEGIN(EVisibility)
LUA_GLUE_PROPERTY_GET(Visible)
LUA_GLUE_PROPERTY_GET(Collapsed)
LUA_GLUE_PROPERTY_GET(Hidden)
LUA_GLUE_PROPERTY_GET(HitTestInvisible)
LUA_GLUE_PROPERTY_GET(SelfHitTestInvisible)
LUA_GLUE_PROPERTY_GET(All)
LUA_GLUE_END()

#define LUA_SLATE_ARGS_BASE(TYPE)\
	LUA_GLUE_BEGIN_NOTRAIT_NAME(TYPE##_FArguments, TYPE::FArguments)\
	LUA_GLUE_FUNCTION_OUT(MakeFromArgs, MakeFromArgs<decltype(&TYPE::Construct)>::Call)\
	LUA_SLATE_ATTRIBUTE( FText, ToolTipText )\
	LUA_SLATE_ARGUMENT(TSharedPtr<IToolTip>, ToolTip)\
	LUA_SLATE_ATTRIBUTE(TOptional<EMouseCursor::Type>, Cursor)\
	LUA_SLATE_ATTRIBUTE(bool, IsEnabled)\
	LUA_SLATE_ATTRIBUTE(EVisibility, Visibility)\
	LUA_SLATE_ARGUMENT(float, RenderOpacity)\
	LUA_SLATE_ATTRIBUTE(TOptional<FSlateRenderTransform>, RenderTransform)\
	LUA_SLATE_ATTRIBUTE(FVector2D, RenderTransformPivot)\
	LUA_SLATE_ARGUMENT(FName, Tag)\
	LUA_SLATE_ARGUMENT(bool, ForceVolatile)\
	LUA_SLATE_ARGUMENT(EWidgetClipping, Clipping)

#define LUA_SLATE_BEGIN(TYPE)\
LUA_GLUE_STRUCT_TRAIT_NAME(TYPE##_FArguments, TYPE::FArguments)\
LUA_GLUE_STRUCT_TRAIT_NAME(TYPE, TYPE)\
LUA_GLUE_SHARED(TYPE, TYPE)\
namespace LUA_SLATE_##TYPE{\
	using TheSlateType = TYPE;\
	LUA_SLATE_ARGS_BASE(TYPE)

#define LUA_SLATE_BODY(TYPE, ...)\
LUA_GLUE_END(__VA_ARGS__)\
LUA_GLUE_INTERFACE_BODY(TYPE, TYPE)\

#define LUA_SLATE_END(...)\
LUA_GLUE_END(__VA_ARGS__)}\

#define LUA_SLATE_SLOT_BEGIN(TYPE, SLOT_TYPE)\
LUA_GLUE_STRUCT_TRAIT_NAME(TYPE##_FArguments, TYPE::FArguments)\
LUA_GLUE_STRUCT_TRAIT_NAME(TYPE, TYPE)\
LUA_GLUE_SHARED(TYPE, TYPE)\
LUA_GLUE_STRUCT_TRAIT_NAME(TYPE##_FSlot, TYPE::SLOT_TYPE)\
namespace LUA_SLATE_##TYPE{\
	using TheSlateType = TYPE;\
	LUA_GLUE_BEGIN_NOTRAIT_NAME(TYPE##_FSlot, TYPE::SLOT_TYPE)\
	LUA_GLUE_FUNCTION_NAME(__call, operator[])

#define LUA_SLATE_ARGS_BEGIN(TYPE, ...)\
	LUA_GLUE_END(__VA_ARGS__)\
	LUA_SLATE_ARGS_BASE(TYPE)

#define LUA_SLATE_ARGS_END(TYPE, ...) LUA_SLATE_BODY(TYPE, ##__VA_ARGS__)

#define LUA_SLATE_SLOT_END(...)\
LUA_GLUE_FUNCTION_OUT(__Slot, TheSlateType::Slot)\
LUA_GLUE_END(__VA_ARGS__)}

template<class T>
struct CustomTypeToLua<TAttribute<T>> :UnrealLua::DefaultCustomEnum
{
	enum {
		 	Value = true,
		};
	static void ReadPtrFromLuaStack(TAttribute<T>*& Value, lua_State*inL, int32 Index)
	{
		static TAttribute<T> Temp;
		if(ue_lua_isfunction(inL, Index))\
		{
			TSharedPtr<UnrealLuaFunctor> LuaCallBack = MakeShared<UnrealLuaFunctor>(inL, Index);
			auto Lambd = [LuaCallBack]() { return LuaCallBack->Callr<T>(); };
			Temp = TAttribute<T>::Create(Lambd);
		}
		else
		{
			Temp.Set(UTableUtil::pop<T&>(inL, Index));
		}
		Value = &Temp;
	}
	static void ReadValueFromLuaStack(TAttribute<T>& Value, lua_State*inL, int32 Index)
	{
		TAttribute<T>* Temp;
		ReadPtrFromLuaStack(Temp, inL, Index);
		Value = *Temp;
	}

	static int PushValueToLuaStack(lua_State*inL, const TAttribute<T>& Value)
	{
		UTableUtil::push(inL, Value.Get());
		return 1;
	}
};

template<class T>
struct CustomTypeToLua<TOptional<T>> :UnrealLua::DefaultCustomEnum
{
	enum {
		Value = true,
	};

	static void ReadValueFromLuaStack(TOptional<T>& Value, lua_State*inL, int32 Index)
	{
		static TOptional<T> Temp;
		Temp = TOptional<T>(UTableUtil::pop<T&>(inL, Index));
		Value = Temp;
	}
};

template<>
struct CustomTypeToLua<FOptionalSize> :UnrealLua::DefaultCustomEnum
{
	enum {
		Value = true,
	};

	static void ReadValueFromLuaStack(FOptionalSize& Value, lua_State*inL, int32 Index)
	{
		static FOptionalSize Temp;
		Temp = FOptionalSize(UTableUtil::pop<float>(inL, Index));
		Value = Temp;
	}
};

template<class T>
struct TCheckArgIsFit<TAttribute<T>> {
	static UnrealLua::CheckResult ToCheck(UnrealLua::ArgType _Type, lua_State*inL = nullptr, int32 Index = 0)
	{
		return TCheckArgIsFit<T>::ToCheck(_Type, inL, Index);
	}
};

template<class T>
struct TCheckArgIsFit<TOptional<T>> {
	static UnrealLua::CheckResult ToCheck(UnrealLua::ArgType _Type, lua_State*inL = nullptr, int32 Index = 0)
	{
		return TCheckArgIsFit<T>::ToCheck(_Type, inL, Index);
	}
};


text:
#ifndef __ASM_ARCH_GPIO_H
#define __ASM_ARCH_GPIO_H

/*
 * 288 (#267 is the highest one actually hooked up) onchip GPIOs, plus enough
 * room for a couple of GPIO expanders.
 */
#define ARCH_NR_GPIOS	350

#include <plat/gpio.h>

#endif /* __ASM_ARCH_GPIO_H */


text:
export const addTempImage = (element) => {
    element.llTempImage = document.createElement("IMG");
};

export const deleteTempImage = (element) => {
    delete element.llTempImage;
};

export const getTempImage = (element) => element.llTempImage;