text:
<!DOCTYPE html>

<title>Veranstaltungen - Termine: Emergency Communication Conference EMCOM 2019</title>

<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="robots" content="index, follow">
<meta name="revisit-after" content="7 days">

<link rel="apple-touch-icon" href="/export/sites/oe6/favicon.png" />
<link rel="icon" href="/export/sites/oe6/favicon.png" type="image/png" />

<link rel="stylesheet" href="/export/system/modules/at.oevsv.apollo.extensions/resources/css/style-oevsv.min.css" />

<link rel="alternate" type="application/rss+xml" href="/adl-vorlage/rss-events.xml" title="Veranstaltungen & Termine">
<link rel="alternate" type="application/rss+xml" href="/adl-vorlage/rss-news.xml" title="Aktuelles">
<link rel="alternate" type="application/rss+xml" href="/adl601/rss-events.xml" title="Veranstaltungen & Termine">
<link rel="alternate" type="application/rss+xml" href="/adl601/rss-news.xml" title="Aktuelles">
<link rel="alternate" type="application/rss+xml" href="/adl612/rss-news.xml" title="Aktuelles">
<link rel="alternate" type="application/rss+xml" href="/adl613/rss-events.xml" title="Veranstaltungen & Termine">
<link rel="alternate" type="application/rss+xml" href="/adl613/rss-news.xml" title="Aktuelles">
<link rel="alternate" type="application/rss+xml" href="/adl619/rss-events.xml" title="Veranstaltungen & Termine">
<link rel="alternate" type="application/rss+xml" href="/adl619/rss-news.xml" title="Aktuelles">
<link rel="alternate" type="application/rss+xml" href="/adl602/rss-events.xml" title="Veranstaltungen & Termine">

                                ÖVSV - LANDESVERBÄNDE

OE1 Wien

OE2 Salzburg

OE3 Niederösterreich

OE4 Burgenland

OE5 Oberösterreich

OE6 Steiermark

OE7 Tirol

OE8 Kärnten

OE9 Vorarlberg

AMRS

Dachverband

                                Login

                <button type="button" class="navbar-toggle" data-toggle="collapse"
					data-target=".navbar-responsive-collapse">
					Toggle navigation
				</button>

		Ortsstellen, Clubabende

		Übersicht Clubabende

		ADL 601 - Graz

		ADL 602 - Mürztal

		ADL 603 - Liezen

		ADL 604 - Hartberg

		ADL 605 - Weiz

		Mitglieder

		Clubabend

		ADL 606 - Leoben

		ADL 607 - Murau

		ADL 608 - Fürstenfeld

		ADL 609 - Judenburg

		ADL 610 - Feldbach

		ADL 611 - Steirisches Hügelland

		ADL 612 - Deutschlandsberg

		ADL 613 - Leibnitz

		ADL 615 - Club Telescout

		ADL 617 - Kremstal

		ADL 619 - Graz Umgebung

		ADL 620 - Kainachtal

		ADL 621 - Oberes Ennstal

		ADL 622 - Bruck an der Mur

		ADL 623 - Graz Vulkanland realraum

		Clubabend

		Mitglieder

		Geschichte

		Aktivitäten

		ARDF

		Ausbildung

		CW-Schule Graz

		Aktivitäten

		Unterlagen

		Literatur

		Präsentationen

		Software

		Digitaler Sprechfunk

		DMR

		DSTAR

		C4FM

		Fieldday Dobl

		Dobl 2019

		Dobl 2018

		Dobl 2017

		Dobl 2016

		Dobl 2015

		Dobl 2014

		Dobl 2013

		Dobl 2012

		Dobl 1988

		Not- und Katastrophenfunk

		Outdoor

		QSL Vermittlung

		QSP - die Zeitung des ÖVSV

		Web-Auftritt

		Outdoor

		Verein

		Landesverband

		Vereinsorgane

		Mitglied werden

		Ehrungen

		Ehrenmitglieder

		in Memoriam

		2019

		2018

		2017

		2016

		2015

		2014

		2013

		2012

		2011

		2010

		2009

		Home

		<form class="form-inline" name="searchFormHeader" action="/suche/" method="post">

				<input type="text" name="q" class="form-control" placeholder="Search" id="searchWidgetAutoCompleteHeader" />

					<button class="btn-u" type="button" onclick="this.form.submit(); return false;">Go</button>

		</form>

Emergency Communication Conference EMCOM 2019

 16.11.19, 13:00

 Download Event

  Notfunk
										Vortrag
										Alle Verbände
										OE2
										OE7
										OE9
										ÖVSV Dachverband

Am 16. November findet heuer zum 3. Mal die Emergency Communication Conference EMCOM – diesmal in Alpbach/Tirol statt.

Das Forum Alpbach https://www.alpbach.org/de/ hatte heuer das Thema Freiheit und Sicherheit und die EMCOM Konferenz steht im Zeichen von Zusammenarbeit und Kommunikation, wenn die Sicherheit nicht mehr gegeben ist.

EMCOM ist ein Forum für die Krisenkommunikation und soll die Zusammenarbeit der Funker von Infrastrukturunternehmen, Blaulichtorganisationen, Behörden und der Öffentlichkeit vor einer Krise aktivieren bzw. verbessern. Während einer Krise soll so das gegenseitige gleiche Verständnis von Funkkommunikation sein.

Heuer konnten wir besonders interessante Vortragende gewinnen, die zu Österreichs Spezialisten in Ihrem Fachgebiet zählen. Besucht die  Webseite www.emcom2019.at und seht das Programm als pdf anbei (siehe Link uten).

EMCOM steht für Kommunikation und wir haben heuer wieder Raum hierfür geschaffen. Beim abendlichen EMCOM-Talk können die Teilnehmer in einer Diskussion zum Thema "Die Zukunft der Krisenkommunikation" aktiv Fragen an die Referenten stellen.

Alpbach ist Österreichs Mittelpunkt für Vordenker und ich würde mich freuen, wenn ihr als "Notfunker" dabei seid.

Anmeldung und weitere Informationen findet ihr auf www.emcom2019.at

73 de Herbert OE3KJN

Congress Centrum Alpbach

Alpbach 246
6236 Alpbach

											Tagungsprogramm (pdf)

Österreichischer Versuchssenderverband
Landesverband Steiermark
Am Sendergrund 15
8143 Dobl-Zwaring

Landesleiter
Ing. Thomas Zurk, OE6TZE
  oe6tze @ oevsv.at

WebSite Angelegenheiten
  webmaster @ oevsv.at

     zum Seitenanfang

     Sitemap

    Impressum - Datenschutzerklärung


text:
   /**
    *  Gets URI that identifies the test.
    *  @return uri identifier of test
    */
function getTargetURI() {
      return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodecomparedocumentposition29";
   }

var docsLoaded = -1000000;
var builder = null;

//
//   This function is called by the testing framework before
//      running the test suite.
//
//   If there are no configuration exceptions, asynchronous
//        document loading is started.  Otherwise, the status
//        is set to complete and the exception is immediately
//        raised when entering the body of the test.
//
function setUpPage() {
   setUpPageStatus = 'running';
   try {
     //
     //   creates test document builder, may throw exception
     //
     builder = createConfiguredBuilder();

      docsLoaded = 0;

      var docRef = null;
      if (typeof(this.doc) != 'undefined') {
        docRef = this.doc;
      }
      docsLoaded += preload(docRef, "doc", "hc_staff");

       if (docsLoaded == 1) {
          setUpPageStatus = 'complete';
       }
    } catch(ex) {
    	catchInitializationError(builder, ex);
        setUpPageStatus = 'complete';
    }
}

//
//   This method is called on the completion of
//      each asychronous load started in setUpTests.
//
//   When every synchronous loaded document has completed,
//      the page status is changed which allows the
//      body of the test to be executed.
function loadComplete() {
    if (++docsLoaded == 1) {
        setUpPageStatus = 'complete';
    }
}

/**
*
	Create two entity reference nodes. Using compareDocumentPosition to check if the child of the first Entity
	Ref node precedes the child of the second Entity Ref node, and that the child of the second Entity Ref node
	follows the child of the first Entity Ref node.

* @author IBM
* @author Jenny Hsu
* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-compareDocumentPosition
*/
function nodecomparedocumentposition29() {
   var success;
    if(checkInitialization(builder, "nodecomparedocumentposition29") != null) return;
    var doc;
      var docElem;
      var entRef1;
      var entRef2;
      var entRefChild1;
      var entRefChild2;
      var entRefChild1Position;
      var entRefChild2Position;
      var appendedChild;

      var docRef = null;
      if (typeof(this.doc) != 'undefined') {
        docRef = this.doc;
      }
      doc = load(docRef, "doc", "hc_staff");
      entRef1 = doc.createEntityReference("ent4");
      entRef2 = doc.createEntityReference("ent4");
      docElem = doc.documentElement;

      appendedChild = docElem.appendChild(entRef1);
      appendedChild = docElem.appendChild(entRef2);
      entRefChild1 = entRef1.firstChild;

      assertNotNull("entRefChild1NotNull",entRefChild1);
entRefChild2 = entRef2.lastChild;

      assertNotNull("entRefChild2NotNull",entRefChild2);
entRefChild1Position = entRefChild1.compareDocumentPosition(entRefChild2);
      assertEquals("nodecomparedocumentpositionFollowing29",4,entRefChild1Position);
       entRefChild2Position = entRefChild2.compareDocumentPosition(entRefChild1);
      assertEquals("nodecomparedocumentpositionPRECEDING29",2,entRefChild2Position);

}

function runTest() {
   nodecomparedocumentposition29();
}

redpajama_set_name: RedPajamaGithub


text:
# Sails AAF Rapid Connect

If you're using [Sails.js](http://sailsjs.org/), an even more rapid way of authenticating with AAF :)

## Installation

Install the module in your Sails app:

```bash
$ npm install sails-aaf-rapid-connect --save
```

Create a service named 'userLoginService' with the following methods:

```js
module.exports = {
  /**
  * payload - Object, AAF attributes, see RapidAAF documentation
  * req - Sails.js request object
  * res - Sails.js response object
  */
  validUser: function(payload, req, res) {
    // called when user is valid, you can do whatever you want, etc.
    // return res.redirect(url);
  },
  /**
  * reason - string
  * req - Sails.js request object
  * res - Sails.js response object
  */
  invalidUser: function(reason, req, res) {
    sails.log.error("User failed to login: " + reason);
    return res.json({failureReason: reason});
  }
};
```

Add the following configuration:

```js
auth: {
  jwsSecret:'<The Secret used when registering the AAF Service>',
  algo: 'HS256',
  aaf: {
    login_url:'<The Unique URL AAF provided after registering>'
  }
}
```


text:
define([
    'jquery',
    'underscore',
    'backbone',
    'text!templates/deploy.html'
], function ($, _, Backbone, deployTpl) {
    var DeployPackagesView = Backbone.View.extend({
        template: _.template(deployTpl),

        initialize: function () {
            this.listenTo(this.collection, 'update', this.render);
            this.collection.fetch();
        },

        render: function () {
            this.$el.html(this.template({packages: this.collection.toJSON()}));

            var that = this;
            $('.delete-btn').click(function (event) {
                var package = $(this).attr('id').substr(7);

                $.ajax({
                    type: "POST",
                    //the url where you want to sent the userName and password to
                    url: jsRoutes.controllers.Workflows.deletePackage(package).url,
                    dataType: 'json',
                    async: false,
                    contentType: 'application/json',
                    //json object to sent to the authentication url
                    data: JSON.stringify({package: package}),
                    success: function (data) {
                        that.collection.fetch();
                    }
                });
            });

            return this;
        }
    });

    return DeployPackagesView
});


text:
goog.provide("node.fs.ReadStream");

/**
 * ReadStream is a Readable Stream.
 * @constructor
 */
node.fs.ReadStream = function() {};

/**
 * @private
 * @type {*}
 */
node.fs.ReadStream.core_ = require("fs").ReadStream;


text:
package com.theisleoffavalon.mcmanager.network.handler.jsonrpc;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * A method decorator that tells the JSON RPC implementation
 * which method to dispatch a request to based on the request's
 * method name.
 *
 * @author Cadyyan
 *
 */
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface RpcMethod
{
	/**
	 * The method that this RPC method handles.
	 *
	 * @return the RPC method
	 */
	public String method();

	/**
	 * A description of this method. This should include information
	 * about expected parameters.
	 *
	 * @return the method description
	 */
	public String description();
}


text:
import translate from '../src/translator'

describe( 'translater nested dictionary', () => {
    const dictionary = {
        level1: {
            plural1: 'My cat kill [ "$count", " ", [ "mouse", "mice"] ] and [$count," ",["bird","birds"]] today',
            level2: {
                value1: 'nested value 1',
                value2: 'nested value 2',
                value3: [ '$count', ' ', [ 'hour', 'hours' ] ]
            }
        }
    }

    it( 'should return plural form in string', () => {
        expect( translate( dictionary, 'en', 'level1.plural1', 1, 2 ) ).toEqual( 'My cat kill 1 mouse and 2 birds today' )
    } )

} )


text:
package com.prowidesoftware.swift.model;

import static org.junit.jupiter.api.Assertions.*;

import org.junit.jupiter.api.Test;

/**
 * Test for {@link AbstractSwiftMessage} model API
 *
 * @since 7.8.4
 */
public class AbstractSwiftMessageTest {

    @Test
    public void match() {
        MtSwiftMessage msg = new MtSwiftMessage();
        assertFalse(msg.match(""));
        assertFalse(msg.match(null));

        msg.setIdentifier("");
        assertFalse(msg.match(""));
        assertFalse(msg.match(null));

        msg.setIdentifier("fin.103");
        assertFalse(msg.match(""));
        assertFalse(msg.match(null));
        assertTrue(msg.match("fin.103"));
        assertTrue(msg.match("fin.103|fin.102"));
        assertTrue(msg.match("fin.*"));
        assertFalse(msg.match("fin.*STP"));

        msg.setIdentifier("camt.002.002.01");
        assertTrue(msg.match("camt.*"));
        assertTrue(msg.match("camt.*01"));
        assertTrue(msg.match("camt\\..*01"));
    }

    @Test
    public void category() {
        MtSwiftMessage mt = new MtSwiftMessage();
        assertEquals("", mt.getCategory());

        mt.setIdentifier("");
        assertEquals("", mt.getCategory());

        mt.setIdentifier("fin.103");
        assertEquals("1", mt.getCategory());
    }

}


text:
<?php

namespace app\models;

class Category extends \yii\db\ActiveRecord
{
    public static function tableName()
    {
        return 'categories';
    }

    public static function getAll()
    {
        $categories = self::find()->all();
        return $categories;
    }

    public  static function getOne($id)
    {
        $category = self::find()->where(['id'=>$id])->one();
        return $category;
    }
}


text:
package org.dcm4chex.archive.ejb.jdbc;

import java.io.InputStream;
import java.util.Properties;

/**
 * @author Gunter Zeilinger <gunterze@gmail.com>
 * @author Franz Willer <franz.willer@agfa.com>
 * @author Jan Pechanec <jpechanec@orcz.cz>
 * @version $Revision: 6390 $ $Date: 2008-06-09 18:43:01 +0800 (周一, 09 6月 2008) $
 * @since 25.08.2003
 */
public class JdbcProperties extends Properties {

    /**
     * Comment for serialVersionUID
     */
    private static final long serialVersionUID = 1L;
    public static final int HSQL = 0;
    public static final int PSQL = 1;
    public static final int MYSQL = 2;
    public static final int DB2 = 3;
    public static final int ORACLE = 4;
    public static final int MSSQL = 5;
    public static final int FIREBIRD = 6;

    private static final String DATASOURCE_KEY = "datasource";
    private static final String DS_TYPE_KEY = "datasource-type";

    private static final JdbcProperties instance = new JdbcProperties();

    private final String datasource;
    private final int database;

    public static JdbcProperties getInstance() {
        return instance;
    }

    public String[] getProperties(String[] keys) {
        String[] values = new String[keys.length];
        for (int i = 0; i < keys.length; i++)
            values[i] = getProperty(keys[i]);
        return values;
    }

    public String getProperty(String key) {
        if (key == null || Character.isLowerCase(key.charAt(0)))
                return key;
        String value = super.getProperty(key);
        if (value == null)
            throw new IllegalArgumentException("key: " + key);
        return value;
    }

    public final int getDatabase() {
        return database;
    }

    public final String getDataSource() {
        return datasource;
    }

    public final String getEscape() {
        return database == MYSQL || database == PSQL ? "" : " ESCAPE '\\'";
    }

    private JdbcProperties() {
        try {
            InputStream in =
                JdbcProperties.class.getResourceAsStream("Jdbc.properties");
            load(in);
            in.close();
            database = Integer.parseInt(super.getProperty(DS_TYPE_KEY));
            datasource = super.getProperty(DATASOURCE_KEY);
        } catch (Exception e) {
            throw new RuntimeException("Failed to load jdbc properties", e);
        }
    }
}


text:
using System;
using System.Activities;
using System.Collections.Generic;

namespace MiniTrello.Domain.Entities
{
    public class Account : IEntity
    {
        private readonly IList<Organization> _organizations = new List<Organization>();
        public virtual string FirstName { get; set; }
        public virtual string LastName { get; set; }
        public virtual string Email { get; set; }
        public virtual string Password { get; set; }
        public virtual string Token { get; set; }
        public virtual DateTime TokenTime { get; set; }
        private readonly IList<Activity> _activities = new List<Activity>();

        public virtual IEnumerable<Activity> Activities { get { return _activities; } }
        public virtual IEnumerable<Organization> Organizations { get { return _organizations; } }

        public virtual long Id { get; set; }
        public virtual bool IsArchived { get; set; }

        public virtual void AddActivities(Activity activity)
        {
            _activities.Add(activity);
        }

        public virtual void AddOrganization(Organization organization)
        {
            if (!_organizations.Contains(organization))
            {
                _organizations.Add(organization);
            }
        }
        public virtual bool VerifyToken(Account account)
        {
            if (account.TokenTime < DateTime.Now.AddMinutes(-30))
            {
                return false;
            }
            return true;
        }

        public virtual Organization GetOrganizacionById(long id)
        {
            foreach (var org in _organizations)
            {
                if (org.Id == id)
                    return org;

            }
            return null;
        }

        public virtual Organization GetOrganizacionByTitle(string title)
        {
            foreach (var org in _organizations)
            {
                if (org.Title.Equals(title))
                    return org;
            }
            return null;
        }
    }
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<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>

  <parent>
    <groupId>org.sonatype.flexmojos</groupId>
    <artifactId>flexmojos-flex-super-pom</artifactId>
    <version>%{flexmojos.version}</version>
  </parent>

  <groupId>info.rvin.itest.issues</groupId>
  <artifactId>flexmojos-168-skip</artifactId>
  <version>1.0-SNAPSHOT</version>

  <packaging>swf</packaging>

  <build>
    <plugins>
      <plugin>
        <groupId>org.sonatype.flexmojos</groupId>
        <artifactId>flexmojos-maven-plugin</artifactId>
      </plugin>
    </plugins>
  </build>
</project>


text:
package zss.tool;

import java.io.InputStream;
import java.util.HashMap;
import java.util.Map;

import org.apache.commons.lang3.StringUtils;
import org.w3c.dom.Document;
import org.w3c.dom.Element;

@Version("2018.09.18")
public class Strings {
    private static final Map<Class<?>, Strings> INSTANCES = new HashMap<>();
    private final Map<String, String> strings = new HashMap<>();

    public String getString(final String name) {
        return StringUtils.defaultString(strings.get(name));
    }

    public void load(final Class<?> type) {
        final String resourceName = type.getSimpleName().concat(".strings.xml");
        final InputStream stream = type.getResourceAsStream(resourceName);
        if (stream == null) {
            return;
        }
        try {
            load(stream);
        } finally {
            IOTool.close(stream);
        }
    }

    public void load(final InputStream stream) {
        final Document document = XMLTool.newDocument(stream);
        load(document);
    }

    public void load(final Document document) {
        synchronized (strings) {
            final Element rootElement = document.getDocumentElement();
            for (Element element : XMLTool.getChildElements(rootElement)) {
                final String name = element.getAttribute("name");
                final String content = element.getTextContent().trim();
                strings.put(name, content);
            }
        }
    }

    public static Strings getStrings(final Class<?> type) {
        synchronized (INSTANCES) {
            Strings strings = INSTANCES.get(type);
            if (strings == null) {
                strings = new Strings();
                strings.load(type);
                INSTANCES.put(type, strings);
            }
            return strings;
        }
    }
}


text:
package org.apache.hadoop.yarn.server.resourcemanager.scheduler;

import java.io.IOException;
import java.util.*;
import java.util.concurrent.ConcurrentHashMap;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.service.AbstractService;
import org.apache.hadoop.yarn.api.records.ApplicationAttemptId;
import org.apache.hadoop.yarn.api.records.ApplicationId;
import org.apache.hadoop.yarn.api.records.ApplicationResourceUsageReport;
import org.apache.hadoop.yarn.api.records.Container;
import org.apache.hadoop.yarn.api.records.ContainerId;
import org.apache.hadoop.yarn.api.records.ContainerState;
import org.apache.hadoop.yarn.api.records.ContainerStatus;
import org.apache.hadoop.yarn.api.records.NodeId;
import org.apache.hadoop.yarn.api.records.Resource;
import org.apache.hadoop.yarn.api.records.ResourceOption;
import org.apache.hadoop.yarn.api.records.ResourceRequest;
import org.apache.hadoop.yarn.conf.YarnConfiguration;
import org.apache.hadoop.yarn.exceptions.YarnException;
import org.apache.hadoop.yarn.proto.YarnServiceProtos.SchedulerResourceTypes;
import org.apache.hadoop.yarn.server.api.protocolrecords.NMContainerStatus;
import org.apache.hadoop.yarn.server.resourcemanager.RMAuditLogger;
import org.apache.hadoop.yarn.server.resourcemanager.RMAuditLogger.AuditConstants;
import org.apache.hadoop.yarn.server.resourcemanager.RMContext;
import org.apache.hadoop.yarn.server.resourcemanager.ResourceManager;
import org.apache.hadoop.yarn.server.resourcemanager.rmapp.RMApp;
import org.apache.hadoop.yarn.server.resourcemanager.rmapp.RMAppEvent;
import org.apache.hadoop.yarn.server.resourcemanager.rmapp.RMAppEventType;
import org.apache.hadoop.yarn.server.resourcemanager.rmapp.RMAppMoveEvent;
import org.apache.hadoop.yarn.server.resourcemanager.rmapp.attempt.RMAppAttempt;
import org.apache.hadoop.yarn.server.resourcemanager.rmcontainer.RMContainer;
import org.apache.hadoop.yarn.server.resourcemanager.scheduler.common.QueueEntitlement;
import org.apache.hadoop.yarn.server.resourcemanager.rmcontainer.RMContainerEventType;
import org.apache.hadoop.yarn.server.resourcemanager.rmcontainer.RMContainerFinishedEvent;
import org.apache.hadoop.yarn.server.resourcemanager.rmcontainer.RMContainerImpl;
import org.apache.hadoop.yarn.server.resourcemanager.rmcontainer.RMContainerRecoverEvent;
import org.apache.hadoop.yarn.server.resourcemanager.rmnode.RMNode;
import org.apache.hadoop.yarn.server.resourcemanager.rmnode.RMNodeCleanContainerEvent;
import org.apache.hadoop.yarn.util.resource.Resources;

import com.google.common.util.concurrent.SettableFuture;

@SuppressWarnings("unchecked")
public abstract class AbstractYarnScheduler
    <T extends SchedulerApplicationAttempt, N extends SchedulerNode>
    extends AbstractService implements ResourceScheduler {

  private static final Log LOG = LogFactory.getLog(AbstractYarnScheduler.class);

  // Nodes in the cluster, indexed by NodeId
  protected Map<NodeId, N> nodes = new ConcurrentHashMap<NodeId, N>();

  // Whole capacity of the cluster
  protected Resource clusterResource = Resource.newInstance(0, 0);

  protected Resource minimumAllocation;
  protected Resource maximumAllocation;

  protected RMContext rmContext;
  protected Map<ApplicationId, SchedulerApplication<T>> applications;
  protected int nmExpireInterval;

  protected final static List<Container> EMPTY_CONTAINER_LIST =
      new ArrayList<Container>();
  protected static final Allocation EMPTY_ALLOCATION = new Allocation(
    EMPTY_CONTAINER_LIST, Resources.createResource(0), null, null, null);

  /**
   * Construct the service.
   *
   * @param name service name
   */
  public AbstractYarnScheduler(String name) {
    super(name);
  }

  @Override
  public void serviceInit(Configuration conf) throws Exception {
    nmExpireInterval =
        conf.getInt(YarnConfiguration.RM_NM_EXPIRY_INTERVAL_MS,
          YarnConfiguration.DEFAULT_RM_NM_EXPIRY_INTERVAL_MS);
    createReleaseCache();
    super.serviceInit(conf);
  }

  public synchronized List<Container> getTransferredContainers(
      ApplicationAttemptId currentAttempt) {
    ApplicationId appId = currentAttempt.getApplicationId();
    SchedulerApplication<T> app = applications.get(appId);
    List<Container> containerList = new ArrayList<Container>();
    RMApp appImpl = this.rmContext.getRMApps().get(appId);
    if (appImpl.getApplicationSubmissionContext().getUnmanagedAM()) {
      return containerList;
    }
    Collection<RMContainer> liveContainers =
        app.getCurrentAppAttempt().getLiveContainers();
    ContainerId amContainerId =
        rmContext.getRMApps().get(appId).getCurrentAppAttempt()
          .getMasterContainer().getId();
    for (RMContainer rmContainer : liveContainers) {
      if (!rmContainer.getContainerId().equals(amContainerId)) {
        containerList.add(rmContainer.getContainer());
      }
    }
    return containerList;
  }

  public Map<ApplicationId, SchedulerApplication<T>>
      getSchedulerApplications() {
    return applications;
  }

  @Override
  public Resource getClusterResource() {
    return clusterResource;
  }

  @Override
  public Resource getMinimumResourceCapability() {
    return minimumAllocation;
  }

  @Override
  public Resource getMaximumResourceCapability() {
    return maximumAllocation;
  }

  protected void containerLaunchedOnNode(ContainerId containerId,
                                         SchedulerNode node) {
    // Get the application for the finished container
    SchedulerApplicationAttempt application = getCurrentAttemptForContainer
        (containerId);
    if (application == null) {
      LOG.info("Unknown application "
          + containerId.getApplicationAttemptId().getApplicationId()
          + " launched container " + containerId + " on node: " + node);
      this.rmContext.getDispatcher().getEventHandler()
        .handle(new RMNodeCleanContainerEvent(node.getNodeID(), containerId));
      return;
    }

    application.containerLaunchedOnNode(containerId, node.getNodeID());
  }

  public T getApplicationAttempt(ApplicationAttemptId applicationAttemptId) {
    SchedulerApplication<T> app =
        applications.get(applicationAttemptId.getApplicationId());
    return app == null ? null : app.getCurrentAppAttempt();
  }

  @Override
  public SchedulerAppReport getSchedulerAppInfo(
      ApplicationAttemptId appAttemptId) {
    SchedulerApplicationAttempt attempt = getApplicationAttempt(appAttemptId);
    if (attempt == null) {
      if (LOG.isDebugEnabled()) {
        LOG.debug("Request for appInfo of unknown attempt " + appAttemptId);
      }
      return null;
    }
    return new SchedulerAppReport(attempt);
  }

  @Override
  public ApplicationResourceUsageReport getAppResourceUsageReport(
      ApplicationAttemptId appAttemptId) {
    SchedulerApplicationAttempt attempt = getApplicationAttempt(appAttemptId);
    if (attempt == null) {
      if (LOG.isDebugEnabled()) {
        LOG.debug("Request for appInfo of unknown attempt " + appAttemptId);
      }
      return null;
    }
    return attempt.getResourceUsageReport();
  }

  public T getCurrentAttemptForContainer(ContainerId containerId) {
    return getApplicationAttempt(containerId.getApplicationAttemptId());
  }

  @Override
  public RMContainer getRMContainer(ContainerId containerId) {
    SchedulerApplicationAttempt attempt =
        getCurrentAttemptForContainer(containerId);
    return (attempt == null) ? null : attempt.getRMContainer(containerId);
  }

  @Override
  public SchedulerNodeReport getNodeReport(NodeId nodeId) {
    N node = nodes.get(nodeId);
    return node == null ? null : new SchedulerNodeReport(node);
  }

  @Override
  public String moveApplication(ApplicationId appId, String newQueue)
      throws YarnException {
    throw new YarnException(getClass().getSimpleName()
        + " does not support moving apps between queues");
  }

  public void removeQueue(String queueName) throws YarnException {
    throw new YarnException(getClass().getSimpleName()
        + " does not support removing queues");
  }

  @Override
  public void addQueue(Queue newQueue) throws YarnException {
    throw new YarnException(getClass().getSimpleName()
        + " does not support this operation");
  }

  @Override
  public void setEntitlement(String queue, QueueEntitlement entitlement)
      throws YarnException {
    throw new YarnException(getClass().getSimpleName()
        + " does not support this operation");
  }

  private void killOrphanContainerOnNode(RMNode node,
      NMContainerStatus container) {
    if (!container.getContainerState().equals(ContainerState.COMPLETE)) {
      this.rmContext.getDispatcher().getEventHandler().handle(
        new RMNodeCleanContainerEvent(node.getNodeID(),
          container.getContainerId()));
    }
  }

  public synchronized void recoverContainersOnNode(
      List<NMContainerStatus> containerReports, RMNode nm) {
    if (!rmContext.isWorkPreservingRecoveryEnabled()
        || containerReports == null
        || (containerReports != null && containerReports.isEmpty())) {
      return;
    }

    for (NMContainerStatus container : containerReports) {
      ApplicationId appId =
          container.getContainerId().getApplicationAttemptId().getApplicationId();
      RMApp rmApp = rmContext.getRMApps().get(appId);
      if (rmApp == null) {
        LOG.error("Skip recovering container " + container
            + " for unknown application.");
        killOrphanContainerOnNode(nm, container);
        continue;
      }

      // Unmanaged AM recovery is addressed in YARN-1815
      if (rmApp.getApplicationSubmissionContext().getUnmanagedAM()) {
        LOG.info("Skip recovering container " + container + " for unmanaged AM."
            + rmApp.getApplicationId());
        killOrphanContainerOnNode(nm, container);
        continue;
      }

      SchedulerApplication<T> schedulerApp = applications.get(appId);
      if (schedulerApp == null) {
        LOG.info("Skip recovering container  " + container
            + " for unknown SchedulerApplication. Application current state is "
            + rmApp.getState());
        killOrphanContainerOnNode(nm, container);
        continue;
      }

      LOG.info("Recovering container " + container);
      SchedulerApplicationAttempt schedulerAttempt =
          schedulerApp.getCurrentAppAttempt();

      if (!rmApp.getApplicationSubmissionContext()
        .getKeepContainersAcrossApplicationAttempts()) {
        // Do not recover containers for stopped attempt or previous attempt.
        if (schedulerAttempt.isStopped()
            || !schedulerAttempt.getApplicationAttemptId().equals(
              container.getContainerId().getApplicationAttemptId())) {
          LOG.info("Skip recovering container " + container
              + " for already stopped attempt.");
          killOrphanContainerOnNode(nm, container);
          continue;
        }
      }

      // create container
      RMContainer rmContainer = recoverAndCreateContainer(container, nm);

      // recover RMContainer
      rmContainer.handle(new RMContainerRecoverEvent(container.getContainerId(),
        container));

      // recover scheduler node
      nodes.get(nm.getNodeID()).recoverContainer(rmContainer);

      // recover queue: update headroom etc.
      Queue queue = schedulerAttempt.getQueue();
      queue.recoverContainer(clusterResource, schedulerAttempt, rmContainer);

      // recover scheduler attempt
      schedulerAttempt.recoverContainer(rmContainer);

      // set master container for the current running AMContainer for this
      // attempt.
      RMAppAttempt appAttempt = rmApp.getCurrentAppAttempt();
      if (appAttempt != null) {
        Container masterContainer = appAttempt.getMasterContainer();

        // Mark current running AMContainer's RMContainer based on the master
        // container ID stored in AppAttempt.
        if (masterContainer != null
            && masterContainer.getId().equals(rmContainer.getContainerId())) {
          ((RMContainerImpl)rmContainer).setAMContainer(true);
        }
      }

      synchronized (schedulerAttempt) {
        Set<ContainerId> releases = schedulerAttempt.getPendingRelease();
        if (releases.contains(container.getContainerId())) {
          // release the container
          rmContainer.handle(new RMContainerFinishedEvent(container
            .getContainerId(), SchedulerUtils.createAbnormalContainerStatus(
            container.getContainerId(), SchedulerUtils.RELEASED_CONTAINER),
            RMContainerEventType.RELEASED));
          releases.remove(container.getContainerId());
          LOG.info(container.getContainerId() + " is released by application.");
        }
      }
    }
  }

  private RMContainer recoverAndCreateContainer(NMContainerStatus status,
      RMNode node) {
    Container container =
        Container.newInstance(status.getContainerId(), node.getNodeID(),
          node.getHttpAddress(), status.getAllocatedResource(),
          status.getPriority(), null);
    ApplicationAttemptId attemptId =
        container.getId().getApplicationAttemptId();
    RMContainer rmContainer =
        new RMContainerImpl(container, attemptId, node.getNodeID(),
          applications.get(attemptId.getApplicationId()).getUser(), rmContext,
          status.getCreationTime());
    return rmContainer;
  }

  /**
   * Recover resource request back from RMContainer when a container is
   * preempted before AM pulled the same. If container is pulled by
   * AM, then RMContainer will not have resource request to recover.
   * @param rmContainer
   */
  protected void recoverResourceRequestForContainer(RMContainer rmContainer) {
    List<ResourceRequest> requests = rmContainer.getResourceRequests();

    // If container state is moved to ACQUIRED, request will be empty.
    if (requests == null) {
      return;
    }
    // Add resource request back to Scheduler.
    SchedulerApplicationAttempt schedulerAttempt
        = getCurrentAttemptForContainer(rmContainer.getContainerId());
    if (schedulerAttempt != null) {
      schedulerAttempt.recoverResourceRequests(requests);
    }
  }

  protected void createReleaseCache() {
    // Cleanup the cache after nm expire interval.
    new Timer().schedule(new TimerTask() {
      @Override
      public void run() {
        for (SchedulerApplication<T> app : applications.values()) {

          T attempt = app.getCurrentAppAttempt();
          synchronized (attempt) {
            for (ContainerId containerId : attempt.getPendingRelease()) {
              RMAuditLogger.logFailure(
                app.getUser(),
                AuditConstants.RELEASE_CONTAINER,
                "Unauthorized access or invalid container",
                "Scheduler",
                "Trying to release container not owned by app or with invalid id.",
                attempt.getApplicationId(), containerId);
            }
            attempt.getPendingRelease().clear();
          }
        }
        LOG.info("Release request cache is cleaned up");
      }
    }, nmExpireInterval);
  }

  // clean up a completed container
  protected abstract void completedContainer(RMContainer rmContainer,
      ContainerStatus containerStatus, RMContainerEventType event);

  protected void releaseContainers(List<ContainerId> containers,
      SchedulerApplicationAttempt attempt) {
    for (ContainerId containerId : containers) {
      RMContainer rmContainer = getRMContainer(containerId);
      if (rmContainer == null) {
        if (System.currentTimeMillis() - ResourceManager.getClusterTimeStamp()
            < nmExpireInterval) {
          LOG.info(containerId + " doesn't exist. Add the container"
              + " to the release request cache as it maybe on recovery.");
          synchronized (attempt) {
            attempt.getPendingRelease().add(containerId);
          }
        } else {
          RMAuditLogger.logFailure(attempt.getUser(),
            AuditConstants.RELEASE_CONTAINER,
            "Unauthorized access or invalid container", "Scheduler",
            "Trying to release container not owned by app or with invalid id.",
            attempt.getApplicationId(), containerId);
        }
      }
      completedContainer(rmContainer,
        SchedulerUtils.createAbnormalContainerStatus(containerId,
          SchedulerUtils.RELEASED_CONTAINER), RMContainerEventType.RELEASED);
    }
  }

  public SchedulerNode getSchedulerNode(NodeId nodeId) {
    return nodes.get(nodeId);
  }

  @Override
  public synchronized void moveAllApps(String sourceQueue, String destQueue)
      throws YarnException {
    // check if destination queue is a valid leaf queue
    try {
      getQueueInfo(destQueue, false, false);
    } catch (IOException e) {
      LOG.warn(e);
      throw new YarnException(e);
    }
    // check if source queue is a valid
    List<ApplicationAttemptId> apps = getAppsInQueue(sourceQueue);
    if (apps == null) {
      String errMsg = "The specified Queue: " + sourceQueue + " doesn't exist";
      LOG.warn(errMsg);
      throw new YarnException(errMsg);
    }
    // generate move events for each pending/running app
    for (ApplicationAttemptId app : apps) {
      SettableFuture<Object> future = SettableFuture.create();
      this.rmContext
          .getDispatcher()
          .getEventHandler()
          .handle(new RMAppMoveEvent(app.getApplicationId(), destQueue, future));
    }
  }

  @Override
  public synchronized void killAllAppsInQueue(String queueName)
      throws YarnException {
    // check if queue is a valid
    List<ApplicationAttemptId> apps = getAppsInQueue(queueName);
    if (apps == null) {
      String errMsg = "The specified Queue: " + queueName + " doesn't exist";
      LOG.warn(errMsg);
      throw new YarnException(errMsg);
    }
    // generate kill events for each pending/running app
    for (ApplicationAttemptId app : apps) {
      this.rmContext
          .getDispatcher()
          .getEventHandler()
          .handle(new RMAppEvent(app.getApplicationId(), RMAppEventType.KILL));
    }
  }

  /**
   * Process resource update on a node.
   */
  public synchronized void updateNodeResource(RMNode nm,
      ResourceOption resourceOption) {

    SchedulerNode node = getSchedulerNode(nm.getNodeID());
    Resource newResource = resourceOption.getResource();
    Resource oldResource = node.getTotalResource();
    if(!oldResource.equals(newResource)) {
      // Log resource change
      LOG.info("Update resource on node: " + node.getNodeName()
          + " from: " + oldResource + ", to: "
          + newResource);

      // update resource to node
      node.setTotalResource(newResource);

      // update resource to clusterResource
      Resources.subtractFrom(clusterResource, oldResource);
      Resources.addTo(clusterResource, newResource);
    } else {
      // Log resource change
      LOG.warn("Update resource on node: " + node.getNodeName()
          + " with the same resource: " + newResource);
    }
  }

  /** {@inheritDoc} */
  @Override
  public EnumSet<SchedulerResourceTypes> getSchedulingResourceTypes() {
    return EnumSet.of(SchedulerResourceTypes.MEMORY);
  }

  @Override
  public Set<String> getPlanQueues() throws YarnException {
    throw new YarnException(getClass().getSimpleName()
        + " does not support reservations");
  }
}


text:
<?php

include_once( APPPATH . 'models/generic/Generic_model.php');

class Servico_model extends Generic_model {

    protected $id_servico;
    protected $data;
    protected $id_cliente;
    protected $estado;
    protected $forma_pagamento;
    protected $obs;
    protected $tipo;
    protected $porcentagem_comissao;
    protected $id_vendedor;
    protected $conta_boleto;
    protected $tabela = "servico";

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

    public function get_id_servico()
    {
        return $this->id_servico;
    }

    public function set_id_servico($id_servico)
    {
        $this->id_servico = $id_servico;
    }

    public function get_data()
    {
        if (preg_match('/^\d{4}-\d{1,2}-\d{1,2}$/', $this->data)) { //verifica se é formato aaaa/mm/dd
            $partes = explode("-", $this->data);
            $formato_brasil = $partes[2] . "/" . $partes[1] . "/" . $partes[0];
            return $formato_brasil;
        }
        return $this->data;
    }

    public function set_data($data)
    {
        if (preg_match('/^\d{1,2}\/\d{1,2}\/\d{4}$/', $data)) { //verifica se é formato dd/mm/aaaa
            $partes = explode("/", $data);
            $formato_mysql = $partes[2] . "-" . $partes[1] . "-" . $partes[0];
            $this->data = $formato_mysql;
        } elseif ($data == null) {
            $this->data = date('Y-m-d');
        } else
            $this->data = $data;
    }

    public function get_id_cliente()
    {
        return $this->id_cliente;
    }

    public function set_id_cliente($id_cliente)
    {
        $this->id_cliente = $id_cliente;
    }

    public function get_estado()
    {
        return $this->estado;
    }

    public function get_nome_estado()
    {
        $array = array('', 'Orçamento', 'Executado', 'Em Produção', 'Entregue não Pago');
        return $array[$this->estado];
    }

    public function set_estado($estado)
    {
        $this->estado = $estado;
    }

    public function get_forma_pagamento()
    {
        return $this->forma_pagamento;
    }

    public function set_forma_pagamento($forma_pagamento)
    {
        $this->forma_pagamento = $forma_pagamento;
    }

    public function get_obs()
    {
        return $this->obs;
    }

    public function set_obs($obs)
    {
        $this->obs = $obs;
    }

    public function get_tipo()
    {
        return $this->tipo;
    }

    public function get_nome_tipo()
    {
        if ($this->tipo):
            $dados = array('', 'Revenda', 'Comissão', 'Venda Direta');
            return $dados[$this->tipo];
        endif;
        return;
    }

    public function set_tipo($tipo)
    {
        $this->tipo = $tipo;
    }

    public function get_porcentagem_comissao()
    {
        return $this->porcentagem_comissao;
    }

    public function set_porcentagem_comissao($porcentagem_comissao)
    {
        $this->porcentagem_comissao = $porcentagem_comissao;
    }

    public function get_id_vendedor()
    {
        return $this->id_vendedor;
    }

    public function set_id_vendedor($id_vendedor)
    {
        $this->id_vendedor = $id_vendedor;
    }

    public function get_nome_vendedor()
    {
        return $this->nome_vendedor;
    }

    public function set_nome_vendedor($nome_vendedor)
    {
        $this->nome_vendedor = $nome_vendedor;
    }

    public function set_conta_boleto($conta){
        $this->conta_boleto=$conta;
    }

    public function get_conta_boleto(){

        return $this->conta_boleto;
    }

    public function executar_servico()
    {
        $status = array(1 => 3, 3 => 4, 4 => 2);
        $this->estado=$status[$this->get_estado()];
        $this->db->set('estado', $this->estado);
        $this->db->where('id_servico', $this->get_id_servico());
        $this->db->update('servico');
        $this->automatizar_pagamento();
        if ($this->db->affected_rows() > 0) {
            return TRUE;
        }
        return;
    }

    protected function after_save($dados, $nr_affected_rows)
    {

        $this->automatizar_pagamento();
    }

    private function automatizar_pagamento()
    {
        if ($this->estado == 2 && $this->tipo!=2):
            //exit("estado igual 2");
            $this->load->model('pagamento/Pagamento_manager');
            $this->Pagamento_manager->automatizar_pagamento($this->id_servico);
        endif;
    }

}


text:
const NSString *ARMetaData = @"metadata";

@implementation ARAdminPartnerSelectViewController {
    __weak IBOutlet UIActivityIndicatorView *_networkActivityIndicator;
    __weak IBOutlet UISearchBar *_searchBar;
    __weak IBOutlet UITableView *_tableView;
    __weak IBOutlet UILabel *_titleLabel;

    NSMutableArray *_JSONPartners;
    AFJSONRequestOperation *_searchRequestOperation;
    NSOperationQueue *_additionalInfoRequestsQueue;
}

- (void)viewDidLoad
{
    [super viewDidLoad];
    _additionalInfoRequestsQueue = [[NSOperationQueue alloc] init];
    _titleLabel.font = [UIFont sansSerifFontWithSize:ARFontSansLarge];
}

- (void)viewDidAppear:(BOOL)animated
{
    [super viewDidAppear:animated];
    [_searchBar becomeFirstResponder];
}

- (void)viewDidUnload
{
    _tableView = nil;
    _searchBar = nil;
    _networkActivityIndicator = nil;
    _titleLabel = nil;
    [super viewDidUnload];
}

- (void)searchBar:(UISearchBar *)searchBar textDidChange:(NSString *)searchText
{
    if (searchText.length) {
        [self searchForQuery:searchText];
    }
}

- (void)searchForQuery:(NSString *)searchText
{
    NSString *escapedString = [NSDictionary URLEscape:searchText];
    NSURLRequest *searchRequest = [ARRouter newSearchPartnersRequestWithQuery:escapedString];

    [_additionalInfoRequestsQueue cancelAllOperations];
    if (!_searchRequestOperation.isFinished) {
        [_searchRequestOperation cancel];
    }

    _searchRequestOperation = [AFJSONRequestOperation JSONRequestOperationWithRequest:searchRequest success:^(NSURLRequest *request, NSHTTPURLResponse *response, id JSON) {
        _JSONPartners = [JSON mutableCopy];
        [_tableView reloadData];
        [_networkActivityIndicator stopAnimating];

    } failure:^(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error, id JSON) {
        [_networkActivityIndicator stopAnimating];
    }];

    [_networkActivityIndicator startAnimating];
    [_searchRequestOperation start];
}

- (UITableViewCell *)tableView:(UITableView *)aTableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    NSString *reuseIdentifier = NSStringFromClass([self class]);
    UITableViewCell *cell = [aTableView dequeueReusableCellWithIdentifier:reuseIdentifier];
    if (!cell) {
        cell = [[ARTableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:reuseIdentifier];
    }

    cell.textLabel.text = _JSONPartners[indexPath.row][@"name"];

    if (_JSONPartners[indexPath.row][ARMetaData]) {
        cell.detailTextLabel.text = _JSONPartners[indexPath.row][ARMetaData];
    } else {
        [self getMetadataForPartnerAtIndex:indexPath.row];
    }
    return cell;
}

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
    return 64;
}

- (void)tableView:(UITableView *)aTableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
    if (_callback) {
        _callback(_JSONPartners[indexPath.row]);
    }
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    return _JSONPartners.count;
}

- (void)getMetadataForPartnerAtIndex:(NSInteger)index
{
    NSDictionary *partnerDict = _JSONPartners[index];
    NSURLRequest *request = [ARRouter newPartnerInfoRequestWithID:partnerDict[ARFeedIDKey]];
    AFJSONRequestOperation *metadataRequest = nil;
    metadataRequest = [AFJSONRequestOperation JSONRequestOperationWithRequest:request success:^(NSURLRequest *request, NSHTTPURLResponse *response, id JSON) {

        NSString *formatString = @"%i Artists, %i Artworks & %i Documents.";
        NSString *metadata = [NSString stringWithFormat:formatString,
                                                        [JSON[ARFeedArtistsCountKey] integerValue],
                                                        [JSON[ARFeedArtworksCountKey] integerValue],
                                                        [JSON[ARFeedArtistDocumentsCountKey] integerValue] + [JSON[ARFeedShowDocumentsCountKey] integerValue]];

        NSMutableDictionary *newPartner = [@{ ARMetaData : metadata, ARFeedArtworksCountKey: JSON[ARFeedArtworksCountKey] } mutableCopy];
        [newPartner addEntriesFromDictionary:partnerDict];
        [_JSONPartners replaceObjectAtIndex:index withObject:newPartner];

        NSIndexPath *thisIndexPath = [NSIndexPath indexPathForRow:index inSection:0];
        [_tableView reloadRowsAtIndexPaths:@[ thisIndexPath ] withRowAnimation:UITableViewRowAnimationAutomatic];

    } failure:nil];
    [_additionalInfoRequestsQueue addOperation:metadataRequest];
}

@end


text:
<?php
	$rp = "./";
	require_once $rp.'redirect.php';
	include_once $rp.'php/function.php';
	//include_once $rp.'php/design.php';
	//include_once $rp.'php/session.php';

	if(isset($_SESSION['id']))
		Redirect::redirectTo($rp."home.php");
?><!DOCTYPE html>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="shortcut icon" href="./img/favicon.png">

    <title>Campus BMSCE</title>

    <link href="./css/bootstrap.css" rel="stylesheet">

    <link href="./css/landing.css" rel="stylesheet">

	<link href='http://fonts.googleapis.com/css?family=Lato:300,400,900' rel='stylesheet' type='text/css'>

          <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">

          </button>
          Campus BMSCE

Not a member yet?

Initialize the

					Awesomeness

					<form class="form-inline" id="loginForm" action="login.php" role="form" method="post">

					    <input type="email" name="email" class="form-control" id="exampleInputEmail1" placeholder="Enter your email address" required />
					    <input type="password" name="password" class="form-control" id="exampleInputEmail1" placeholder="Password" required />

					  <button type="submit" id="submit" class="login-button btn btn-warning btn-lg">Login</button>
					</form>

 Please wait! Authenticating...

Not a member yet ?

Reset password

Your Landing Page
Looks Wonderful Now.

It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout.

1 - Browser Compatibility

Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever.

2 - Email Campaigns

Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever.

3 - Gather Your Notes

Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever.

				<form class="form-inline" role="form">

				    <input type="email" class="form-control" id="exampleInputEmail1" placeholder="Enter your email address">

				  <button type="submit" class="btn btn-warning btn-lg">Invite Me!</button>
				</form>

Flatty is for Everyone.

It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout.

				<form class="form-inline" role="form">

				    <input type="email" class="form-control" id="exampleInputEmail1" placeholder="Enter your email address">

				  <button type="submit"  class="btn btn-warning btn-lg">Invite Me!</button>
				</form>

Our Awesome Team.
Design Lovers.

It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout.

Michael Robson

Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever.

Pete Ford

Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever.

Angelica Finning

Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever.

				<form class="form-inline" role="form">

				    <input type="email" class="form-control" id="exampleInputEmail1" placeholder="Enter your email address">

				  <button type="submit" class="btn btn-warning btn-lg">Invite Me!</button>
				</form>

Powered by Team Name Here - All Rights Reserved


text:
//
// gaiarpcauxfunc.h
//
// Auxiliary functions for gaiarpcaux.h
//

#ifndef _GAIARPCAUXFUNC_H
#define _GAIARPCAUXFUNC_H

#include <sys/uio.h>

#include "datastruct.h"
#include "record.h"
#include "supervalue.h"

// returns the serialized size in bytes of a cell
int CellSize(ListCellPlus *lc);

// returns the serialized size in bytes of a list of cells
int ListCellsSize(SkipListBK<ListCellPlus,int> &cells);

// converts serialized celloids into items put inside skiplist of cells
void CelloidsToListCells(char *celloids, int ncelloids, int celltype,
                         SkipListBK<ListCellPlus,int> &cells,
                         Ptr<RcKeyInfo> *pprki);

// converts listcells to serialized celloids
char *ListCellsToCelloids(SkipListBK<ListCellPlus,int> &cells, int &ncelloids,
                          int &lencelloids);

int marshall_keyinfo(Ptr<RcKeyInfo> prki, iovec *bufs, int maxbufs,
                     char **retbuf);
char *marshall_keyinfo_onebuf(Ptr<RcKeyInfo> prki, int &retlen);
Ptr<RcKeyInfo> demarshall_keyinfo(char **buf);

#endif


text:
@interface MRCRepoReadmeTableViewCell : UITableViewCell

@property (nonatomic, weak, readonly) UIButton *readmeButton;
@property (nonatomic, weak, readonly) UIActivityIndicatorView *activityIndicatorView;
@property (nonatomic, weak, readonly) UIWebView *webView;

@end


text:
package ui

import (
	"mime"
	"net/http"
	"os"
	"time"

	"github.com/gophergala2016/papyrus/data"
	"github.com/gorilla/mux"
	"github.com/markbates/goth"
	"github.com/markbates/goth/gothic"
	"github.com/markbates/goth/providers/github"
	"github.com/markbates/goth/providers/gplus"
)

func ServeIndex(w http.ResponseWriter, r *http.Request) {
	ctx := GetContext(r)

	if ctx.Account == nil {
		http.Redirect(w, r, "/login", http.StatusSeeOther)
		return
	}
	http.Redirect(w, r, "/organizations", http.StatusSeeOther)
}

func ServeLogin(w http.ResponseWriter, r *http.Request) {
	ctx := GetContext(r)

	if ctx.Account != nil {
		http.Redirect(w, r, "/", http.StatusSeeOther)
		return
	}

	w.Header().Set("Content-Type", mime.TypeByExtension(".html"))
	ServeHTMLTemplate(w, r, tplLogin, struct {
		Context *Context
	}{
		Context: ctx,
	})
}

func HandleAuthCallback(w http.ResponseWriter, r *http.Request) {
	ctx := GetContext(r)

	if ctx.Account != nil {
		http.Redirect(w, r, "/organizations", http.StatusSeeOther)
		return
	}

	user, err := gothic.CompleteUserAuth(w, r)
	if err != nil {
		http.Redirect(w, r, "/login", http.StatusSeeOther)
		return
	}

	acc, err := data.GetAccountEmail(user.Email)
	catch(r, err)
	if acc == nil {
		accEmail, err := data.NewAccountEmail(user.Email)
		catch(r, err)
		accEmail.Primary = true
		accEmail.Verified = true
		accEmail.VerifiedAt = time.Now()

		nAcc := data.Account{}
		nAcc.Emails = append(nAcc.Emails, accEmail)
		err = nAcc.Put()

		acc = &nAcc
	}

	ctx.Session.Values["accountID"] = acc.ID.Hex()
	ctx.Session.Save(r, w)
	http.Redirect(w, r, "/organizations", http.StatusSeeOther)
}

func HandleLogout(w http.ResponseWriter, r *http.Request) {
	ctx := GetContext(r)

	if ctx.Account == nil {
		http.Redirect(w, r, "/login", http.StatusSeeOther)
		return
	}

	delete(ctx.Session.Values, "accountID")
	ctx.Session.Save(r, w)

	http.Redirect(w, r, "/login", http.StatusSeeOther)
}

func ServeDocumentPage(w http.ResponseWriter, r *http.Request) {
	vars := mux.Vars(r)
	idStr := vars["id"]
	if idStr == "" {
		ServeNotFound(w, r)
		return
	}

	doc, err := data.GetDocumentShortID(idStr)
	catch(r, err)

	if doc == nil || doc.Deleted || !doc.Published {
		ServeNotFound(w, r)
		return
	}

	w.Header().Set("Content-Type", mime.TypeByExtension(".html"))
	ServeHTMLTemplate(w, r, tplDocumentViewPublic, struct {
		Document *data.Document
	}{
		Document: doc,
	})
}

func init() {
	goth.UseProviders(
		gplus.New(os.Getenv("GOOGLE_CLIENT_ID"), os.Getenv("GOOGLE_CLIENT_SECRET"), os.Getenv("BASE")+"/login/gplus/callback", "email"),
		github.New(os.Getenv("GITHUB_CLIENT_ID"), os.Getenv("GITHUB_CLIENT_SECRET"), os.Getenv("BASE")+"/login/github/callback", "user:email"),
	)

	gothic.Store = store

	gothic.GetState = func(r *http.Request) string {
		return r.URL.Query().Get("state")
	}
	gothic.GetProviderName = func(r *http.Request) (string, error) {
		provider, _ := mux.Vars(r)["provider"]
		return provider, nil
	}

	Router.NewRoute().
		Methods("GET").
		Path("/").
		HandlerFunc(ServeIndex)
	Router.NewRoute().
		Methods("GET").
		Path("/login").
		HandlerFunc(ServeLogin)
	Router.NewRoute().
		Methods("GET").
		Path("/logout").
		HandlerFunc(HandleLogout)
	Router.NewRoute().
		Methods("GET").
		Path("/login/{provider}").
		HandlerFunc(gothic.BeginAuthHandler)
	Router.NewRoute().
		Methods("GET").
		Path("/login/{provider}/callback").
		HandlerFunc(HandleAuthCallback)
	Router.NewRoute().
		Methods("GET").
		Path("/d/{id}").
		HandlerFunc(ServeDocumentPage)

}


text:
package org.pentaho.di.ui.core.namedcluster;

import org.pentaho.di.core.namedcluster.model.NamedCluster;

/**
 * Created by bryan on 8/17/15.
 */
public interface NamedClusterDialog {
  void setNamedCluster( NamedCluster namedCluster );

  NamedCluster getNamedCluster();

  void setNewClusterCheck( boolean newClusterCheck );

  String open();
}


text:
package com.amazonaws.services.wafv2.model;

import javax.annotation.Generated;

/**
 *

 * The operation failed because the specified policy isn't in the proper format.
 *

 *

 * The policy specifications must conform to the following:
 *

 *

 *

 *

 * The policy must be composed using IAM Policy version 2012-10-17 or version 2015-01-01.
 *

 *

 *

 *

 * The policy must include specifications for Effect, Action, and Principal.
 *

 *

 *

 *

 * Effect must specify Allow.
 *

 *

 *

 *

 * Action must specify wafv2:CreateWebACL, wafv2:UpdateWebACL, and
 * wafv2:PutFirewallManagerRuleGroups and may optionally specify wafv2:GetRuleGroup. WAF
 * rejects any extra actions or wildcard actions in the policy.
 *

 *

 *

 *

 * The policy must not include a Resource parameter.
 *

 *

 *

 *

 * For more information, see IAM
 * Policies.
 *

 */
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class WAFInvalidPermissionPolicyException extends com.amazonaws.services.wafv2.model.AWSWAFV2Exception {
    private static final long serialVersionUID = 1L;

    /**
     * Constructs a new WAFInvalidPermissionPolicyException with the specified error message.
     *
     * @param message
     *        Describes the error encountered.
     */
    public WAFInvalidPermissionPolicyException(String message) {
        super(message);
    }

}


text:
package AxelMonroy;

import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;

import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;

/**
 * Unit test for simple App.
 */
public class AppTest
        extends TestCase {
    /**
     * Create the test case
     *
     * @param testName name of the test case
     */
    public AppTest(String testName) {
        super(testName);
    }

    /**
     * @return the suite of tests being tested
     */
    public static Test suite() {
        return new TestSuite(AppTest.class);
    }

    public void testHashMap() throws Exception {
        Map map = new HashMap();
        map.put("key", 1);
        map.put("Key2", 2);
        assertEquals(1, map.get("key"));
    }

    public void testInsert() throws Exception {
        Map map = new AxelMap<String, Integer>();
        map.put("key", 1);
        map.put("Key2", 2);
        assertEquals(1, map.get("key"));
        assertEquals(2, map.get("Key2"));
    }

    public void testGetNull() throws Exception {
        AxelMap<Integer, String> map = new AxelMap<Integer, String>();
        assertEquals(null, map.get(42));
    }

    public void testOverride() throws Exception {
        AxelMap<Integer, String> map = new AxelMap<Integer, String>();
        map.put(1, "something");
        assertEquals("something", map.get(1));
        map.put(1, "another thing");
        assertEquals("another thing", map.get(1));
    }

    public void testEmpty() throws Exception {
        Map<Integer, String> map = new AxelMap<Integer, String>();
        assertTrue(map.isEmpty());
        map.put(1, "something");
        assertFalse(map.isEmpty());
    }

    public void testContainsKey() throws Exception {
        Map<Integer, String> map = new AxelMap<Integer, String>();
        map.put(1, "something");
        assertTrue(map.containsKey(1));
        assertFalse(map.containsKey(2));
        map.put(3, "hello there");

    }

    public void testContainsValue() throws Exception {
        Map<Integer, String> map = new AxelMap<Integer, String>();
        map.put(1, "something");
        map.put(3, "something3");
        assertTrue(map.containsValue("something"));
        assertFalse(map.containsValue("hello there"));
    }

    public void testRemoveByKey() throws Exception {
        Map<Integer, String> map = new AxelMap<Integer, String>();
        map.put(1, "something");
        assertTrue(map.containsKey(1));

        map.remove(1);
        assertFalse(map.containsKey(1));
        assertTrue(map.isEmpty());

        map = new AxelMap<Integer, String>();
        map.put(1, "something");
        map.put(2, "other");
        map.remove(1);
        assertFalse(map.isEmpty());

    }

    public void testClear() throws Exception {
        Map<Integer, String> map = new AxelMap<Integer, String>();
        map.put(1, "something");
        map.put(2, "other");
        assertEquals(2, map.size());

        assertFalse(map.isEmpty());
        map.clear();
        assertTrue(map.isEmpty());
        assertEquals(0, map.size());

    }

    public void testputAll() throws Exception {
        Map map_1 = new HashMap();
        Map<Integer, String> map_2 = new AxelMap<Integer, String>();
        map_2.putAll(map_1);
        map_1.put(1, "value1");
        map_1.put(2, "value2");
        map_2.putAll(map_1);

        assertEquals("value1", map_2.get(1));
        assertEquals("value2", map_2.get(2));
        assertFalse(map_2.isEmpty());
        assertEquals(2, map_2.size());

    }

    public void testkeySet() throws Exception {
        Set<Integer> expectedSetOfKeys = new HashSet<Integer>();
        expectedSetOfKeys.add(1);
        expectedSetOfKeys.add(2);
        expectedSetOfKeys.add(3);

        Map<Integer, String> map = new AxelMap<Integer, String>();
        assertEquals(new HashSet<Integer>(), map.keySet());
        map.put(1, "value1");
        map.put(2, "value2");
        map.put(3, "value3");
        assertEquals(expectedSetOfKeys, map.keySet());

    }

    public void testValues() throws Exception {
        Set<String> expectedSetOfValues = new HashSet<String>();
        expectedSetOfValues.add("value1");
        expectedSetOfValues.add("value2");
        expectedSetOfValues.add("value3");

        Map<Integer, String> map = new AxelMap<Integer, String>();
        assertEquals(new HashSet<Integer>(), map.keySet());
        map.put(1, "value1");
        map.put(2, "value2");
        map.put(3, "value3");
        map.put(3, "value3");

        assertEquals(expectedSetOfValues, map.values());

    }

    public void testEntrySet() throws Exception {
        Map map = new AxelMap<Integer, String>();

        map.put(1, "value1");
        map.put(2, "value2");
        map.put(3, "value3");

        HashMap auxExpectedHashMap = new HashMap();

        auxExpectedHashMap.put(1, "value1");
        auxExpectedHashMap.put(2, "value2");
        auxExpectedHashMap.put(3, "value3");
        String expectedSet = auxExpectedHashMap.entrySet().toString();
        assertEquals(expectedSet, map.entrySet().toString());

    }

    public void testInsertMultiple() throws Exception {
        Map map = new AxelMap<String, Integer>();

        for (int i = 0; i < 10000; i++) {
            map.put(i, i);
        }
        assertEquals(300,map.get(300));
        assertTrue(map.containsKey(300));
    }
}


text:
sudo apt-get update -y
sudo apt-get install -y openjdk-8-jdk maven ant subversion

# Download source
svn co https://svn.apache.org/repos/asf/poi/trunk poi
cd poi

export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-ppc64el
export PATH=$PATH:$JAVA_HOME/bin
# Build and Test
./gradlew
ant jar


text:
class Passenger < Formula
  desc "Server for Ruby, Python, and Node.js apps via Apache/NGINX"
  homepage "https://www.phusionpassenger.com/"
  url "https://github.com/phusion/passenger/releases/download/release-6.0.15/passenger-6.0.15.tar.gz"
  sha256 "73fa22da5a11e4bc4ad6b95c13a0e393ba18109e6e07bd1953c45b2f0c0aae80"
  license "MIT"
  revision 1
  head "https://github.com/phusion/passenger.git", branch: "stable-6.0"

  bottle do
    sha256 cellar: :any,                 arm64_ventura:  "c484bf21c4d99ca18b4fe53727e7e8dca5be790b5fc3c318136ff3299b7c892c"
    sha256 cellar: :any,                 arm64_monterey: "fe6fdbc2c4be58efb67a193a871d1c7045322b355dc3b353a95c11096305682c"
    sha256 cellar: :any,                 arm64_big_sur:  "5a58ee5238d5df54151f9f57d6612a45d2eec28256250cd2e564f37578b03bc2"
    sha256 cellar: :any,                 ventura:        "e0cea8d3454ef1c4d29c7f0af6b9f7ca5cbbe22770faf478770637451dbf5ff7"
    sha256 cellar: :any,                 monterey:       "570ae0abdcf3eb3100a011d349b840c934485e3bdff92f6b6d698b24dfc12bae"
    sha256 cellar: :any,                 big_sur:        "dd7f6e422cdf93a1803c7eecaebe460e50ba433c5e34d47dca15001dbead5403"
    sha256 cellar: :any,                 catalina:       "7b9f32e433018ed5b2db2bc9a8fc435fcf700c9b7e00248afb9450495b54d93a"
    sha256 cellar: :any_skip_relocation, x86_64_linux:   "7fd7b9e1a4b7d4fc8427a0763554c0afc565446531e1a6b3c91982a2874a43ad"
  end

  depends_on "httpd" => :build # to build the apache2 module
  depends_on "nginx" => [:build, :test] # to build nginx module
  depends_on "apr"
  depends_on "apr-util"
  depends_on "openssl@1.1"
  depends_on "pcre"

  uses_from_macos "xz" => :build
  uses_from_macos "curl"
  uses_from_macos "libxcrypt"
  uses_from_macos "ruby", since: :catalina

  def install
    if MacOS.version >= :mojave && MacOS::CLT.installed?
      ENV["SDKROOT"] = MacOS::CLT.sdk_path(MacOS.version)
    else
      ENV.delete("SDKROOT")
    end

    inreplace "src/ruby_supportlib/phusion_passenger/platform_info/openssl.rb" do |s|
      s.gsub! "-I/usr/local/opt/openssl/include", "-I#{Formula["openssl@1.1"].opt_include}"
      s.gsub! "-L/usr/local/opt/openssl/lib", "-L#{Formula["openssl@1.1"].opt_lib}"
    end

    system "rake", "apache2"
    system "rake", "nginx"
    nginx_addon_dir = `./bin/passenger-config about nginx-addon-dir`.strip

    mkdir "nginx" do
      system "tar", "-xf", "#{Formula["nginx"].opt_pkgshare}/src/src.tar.xz", "--strip-components", "1"
      args = (Formula["nginx"].opt_pkgshare/"src/configure_args.txt").read.split("\n")
      args << "--add-dynamic-module=#{nginx_addon_dir}"

      system "./configure", *args
      system "make"
      (libexec/"modules").install "objs/ngx_http_passenger_module.so"
    end

    (libexec/"download_cache").mkpath

    # Fixes https://github.com/phusion/passenger/issues/1288
    rm_rf "buildout/libev"
    rm_rf "buildout/libuv"
    rm_rf "buildout/cache"

    necessary_files = %w[configure Rakefile README.md CONTRIBUTORS
                         CONTRIBUTING.md LICENSE CHANGELOG package.json
                         passenger.gemspec build bin doc images dev src
                         resources buildout]

    cp_r necessary_files, libexec, preserve: true

    # Allow Homebrew to create symlinks for the Phusion Passenger commands.
    bin.install_symlink Dir["#{libexec}/bin/*"]

    # Ensure that the Phusion Passenger commands can always find their library
    # files.

    locations_ini = `./bin/passenger-config --make-locations-ini --for-native-packaging-method=homebrew`
    locations_ini.gsub!(/=#{Regexp.escape Dir.pwd}/, "=#{libexec}")
    (libexec/"src/ruby_supportlib/phusion_passenger/locations.ini").write(locations_ini)

    ruby_libdir = `./bin/passenger-config about ruby-libdir`.strip
    ruby_libdir.gsub!(/^#{Regexp.escape Dir.pwd}/, libexec)
    system "./dev/install_scripts_bootstrap_code.rb",
      "--ruby", ruby_libdir, *Dir[libexec/"bin/*"]

    system "./bin/passenger-config", "compile-nginx-engine"
    cp Dir["buildout/support-binaries/nginx*"], libexec/"buildout/support-binaries", preserve: true

    nginx_addon_dir.gsub!(/^#{Regexp.escape Dir.pwd}/, libexec)
    system "./dev/install_scripts_bootstrap_code.rb",
      "--nginx-module-config", libexec/"bin", "#{nginx_addon_dir}/config"

    man1.install Dir["man/*.1"]
    man8.install Dir["man/*.8"]

    # See https://github.com/Homebrew/homebrew-core/pull/84379#issuecomment-910179525
    deuniversalize_machos
  end

  def caveats
    <<~EOS
      To activate Phusion Passenger for Nginx, run:
        brew install nginx
      And add the following to #{etc}/nginx/nginx.conf at the top scope (outside http{}):
        load_module #{opt_libexec}/modules/ngx_http_passenger_module.so;
      And add the following to #{etc}/nginx/nginx.conf in the http scope:
        passenger_root #{opt_libexec}/src/ruby_supportlib/phusion_passenger/locations.ini;
        passenger_ruby /usr/bin/ruby;

      To activate Phusion Passenger for Apache, create /etc/apache2/other/passenger.conf:
        LoadModule passenger_module #{opt_libexec}/buildout/apache2/mod_passenger.so
        PassengerRoot #{opt_libexec}/src/ruby_supportlib/phusion_passenger/locations.ini
        PassengerDefaultRuby /usr/bin/ruby
    EOS
  end

  test do
    ruby_libdir = `#{HOMEBREW_PREFIX}/bin/passenger-config --ruby-libdir`.strip
    assert_equal "#{libexec}/src/ruby_supportlib", ruby_libdir

    (testpath/"nginx.conf").write <<~EOS
      load_module #{opt_libexec}/modules/ngx_http_passenger_module.so;
      worker_processes 4;
      error_log #{testpath}/error.log;
      pid #{testpath}/nginx.pid;

      events {
        worker_connections 1024;
      }

      http {
        passenger_root #{opt_libexec}/src/ruby_supportlib/phusion_passenger/locations.ini;
        passenger_ruby /usr/bin/ruby;
        client_body_temp_path #{testpath}/client_body_temp;
        fastcgi_temp_path #{testpath}/fastcgi_temp;
        proxy_temp_path #{testpath}/proxy_temp;
        scgi_temp_path #{testpath}/scgi_temp;
        uwsgi_temp_path #{testpath}/uwsgi_temp;
        passenger_temp_path #{testpath}/passenger_temp;

        server {
          passenger_enabled on;
          listen 8080;
          root #{testpath};
          access_log #{testpath}/access.log;
          error_log #{testpath}/error.log;
        }
      }
    EOS
    system "#{Formula["nginx"].opt_bin}/nginx", "-t", "-c", testpath/"nginx.conf"
  end
end


text:
package com.alibaba.rocketmq.client.producer.concurrent;

import com.alibaba.rocketmq.common.message.Message;
import org.junit.BeforeClass;
import org.junit.Test;

import java.io.IOException;
import java.util.Arrays;
import java.util.Random;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;

public class DefaultLocalMessageStoreTest {

    private boolean stop = false;

    private static DefaultLocalMessageStore defaultLocalMessageStore;

    @BeforeClass
    public static void init() throws IOException {
        defaultLocalMessageStore = new DefaultLocalMessageStore("PG_Test");
    }

    @Test
    public void testStash() throws InterruptedException {
        for (int i = 0; i < 100; i++) {
            defaultLocalMessageStore.stash(new Message("Topic", "Data".getBytes()));
        }

        defaultLocalMessageStore.close();
    }

    @Test
    public void testStashBulk() throws InterruptedException {
        for (int i = 0; i < 10; i++) {
            for (int j = 0; j < 5001; j++) {
                defaultLocalMessageStore.stash(new Message("Topic", "Data".getBytes()));
            }
        }
        defaultLocalMessageStore.close();
    }

    @Test
    public void testPop() throws InterruptedException {
        Message[] messages = defaultLocalMessageStore.pop(2);
        while (null != messages && messages.length > 0) {
            for (Message msg : messages) {
                System.out.println(msg.getTopic());
            }
            messages = defaultLocalMessageStore.pop(2);
        }

        defaultLocalMessageStore.close();
    }

    @Test
    public void testStressStash() throws InterruptedException {
        int numberOfStashingThread = 62;
        int numberOfPoppingThread = 2;
        ExecutorService service = Executors.newFixedThreadPool(numberOfPoppingThread + numberOfStashingThread);
        final CountDownLatch l = new CountDownLatch(numberOfPoppingThread + numberOfStashingThread);
        final Random random = new Random();

        for (int i = 0; i < numberOfStashingThread; i++) {
            service.submit(new Runnable() {
                @Override
                public void run() {
                    l.countDown();
                    try {
                        l.await();
                    } catch (InterruptedException e1) {
                        e1.printStackTrace();
                    }

                    try {
                        while (!stop) {
                            if (random.nextBoolean()) {
                                Thread.sleep(50);
                            } else {
                                int n = random.nextInt(10);
                                for (int i = 0; i < n; i++) {
                                    byte[] bs = new byte[1024];
                                    Arrays.fill(bs, (byte) 'a');
                                    defaultLocalMessageStore.stash(new Message("Topic", bs));
                                }
                                System.out.println( Thread.currentThread().getName() + ": " + n + " message(s) stashed");
                            }
                        }
                    } catch (InterruptedException e) {
                        e.printStackTrace();
                    }
                }

            });
        }

        for (int i = 0; i < numberOfPoppingThread; i++) {
            service.submit(new Runnable() {
                @Override
                public void run() {
                    l.countDown();

                    try {
                        l.await();
                    } catch (InterruptedException e) {
                        e.printStackTrace();
                    }

                    int badLoop = 0;
                    while (!stop) {
                        Message[] messages = defaultLocalMessageStore.pop(200);
                        if (messages == null || messages.length == 0) {
                            if (++badLoop > 1000) {
                                System.out.println("Too many bad loops, going to exit.");
                                stop = true;
                                break;
                            }
                            try {
                                System.out.println("Empty loop. Going to sleep 1000ms.");
                                Thread.sleep(1000 * 2);
                            } catch (InterruptedException e) {
                                e.printStackTrace();
                            }
                        } else {
                            while (messages != null && messages.length > 0) {
                                System.out.println(Thread.currentThread().getName() + ": Popped " + messages.length);
                                messages = defaultLocalMessageStore.pop(200);
                            }
                        }
                    }
                }
            });
        }

        service.shutdown();
        service.awaitTermination(1, TimeUnit.MINUTES);
        defaultLocalMessageStore.close();
    }
}


text:
layout: post
title: swift http 请求封装get,post方法
category: [Swift]
tags: [Swift]
---

一个关于http,post,get请求的方法分享给新手朋友

####代码实现
```js
import Foundation

protocol HttpProtocol{
    func didRecieveResult(result: NSDictionary)
}
class HttpController: NSObject{
    var delegate: HttpProtocol?
    //json get方法
    func get(url: String){
        var nsUrl: NSURL = NSURL(string: url)!
        var request: NSURLRequest = NSURLRequest(URL: nsUrl)
        NSURLConnection.sendAsynchronousRequest(request, queue: NSOperationQueue.mainQueue(), completionHandler: {(response: NSURLResponse!,data: NSData!,error: NSError!)->Void in
            var jsonResult: NSDictionary = NSJSONSerialization.JSONObjectWithData(data, options: NSJSONReadingOptions.MutableContainers, error: nil) as NSDictionary
            self.delegate?.didRecieveResult(jsonResult)
        })
    }

    //json post方法
    func post(url: String ,params: NSDictionary){
        var nsUrl: NSURL = NSURL(string: url)!
        var request: NSMutableURLRequest = NSMutableURLRequest(URL: nsUrl)
        request.HTTPMethod = "POST"
        request.addValue("application/x-www-form-urlencoded", forHTTPHeaderField: "Content-Type")
        var objStr = ""
        for(key, value) in params as NSDictionary{
            if(objStr == ""){
                objStr += "\(key)=\(value)"
            }else{
                objStr += "&\(key)=\(value)"
            }
        }
        let data: NSData = objStr.dataUsingEncoding(NSUTF8StringEncoding, allowLossyConversion: false)!
        request.HTTPBody = data
        let task = NSURLSession.sharedSession().dataTaskWithRequest(request) {(data, response, error) -> Void in
            if (error == nil) {
                var jsonResult: NSDictionary = NSJSONSerialization.JSONObjectWithData(data, options: NSJSONReadingOptions.MutableContainers, error: nil) as NSDictionary
                self.delegate?.didRecieveResult(jsonResult)
            }
        }
        task.resume()
    }
}

```

###在你要用到的class后面加上HttpProtocol,并且类里面要实现didRecieveResult 方法具体如下
####代码调用
```js

import UIKit
class detailViewController: UIViewController,UIWebViewDelegate,HttpProtocol {
    override func viewDidLoad() {
        super.viewDidLoad()
        webView.delegate = self
        //get方法调用开始
        let url = ""
        eHttp.delegate = self
        eHttp.get(url)
        self.setupRefresh()
        //get方法调用结束

        //post方法调用开始
        let url = ""
        let params = ["twitterId" : "13sik"]
        eHttp.delegate = self
        eHttp.post(url, params: params)
        //调用结束
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }

    //json 数据处理
    func didRecieveResult(result: NSDictionary){
        self.tmpCode = result["status"]?["code"] as Int
        //输出你调用接口的某个键值,并且打印出来
        println(self.tmpCode)
    }
}

```


text:
"use strict";

describe("ResourceStore", function() {
    var ResourceStore, PropertyTemplate, Resource;

    beforeEach(module("bibframeEditor"));
    beforeEach(inject(function($injector) {
        ResourceStore = $injector.get("ResourceStore");
        PropertyTemplate = $injector.get("PropertyTemplate");
        Resource = $injector.get("Resource");
        ResourceStore.setIDBase("urn:id/");
    }));

    it("should get the current, unset resource", function() {
        expect(ResourceStore.getCurrent()).toBeNull();
    });

    it("should set an empty current resource", function() {
        ResourceStore.newResource();
        expect(ResourceStore.getCurrent()).not.toBeNull();
    });

    it("should set an empty current resource and its template", function() {
        ResourceStore.newResource();
        expect(ResourceStore.getCurrent().getTemplate()).toBeUndefined();
        ResourceStore.setResourceTemplate({
            getClassID: function() {
                return "test";
            },
            hasRelation: function() {
                return true;
            },
            getRelationResourceTemplate: function() {
                return {
                    getClassID: function() {
                        return "relation";
                    },
                    hasRelation: function() {
                        return false;
                    }
                };
            }
        });
        expect(ResourceStore.getCurrent().getTemplate()).not.toBeNull();
    });

    it("should return empty created list", function() {
        expect(ResourceStore.getCreated().length).toEqual(0);
    });

    it("should add to created list", function() {
        ResourceStore.addCreated({});
        expect(ResourceStore.getCreated().length).toEqual(1);
    });

    it("should not set a non-existent loading property", function() {
        ResourceStore.newResource();
        expect(ResourceStore.getCurrent().isLoading("urn:test")).toEqual(false);
        ResourceStore.setLoading("urn:test", true);
        expect(ResourceStore.getCurrent().isLoading("urn:test")).toEqual(false);
    });

    it("should set a loading property", function() {
        ResourceStore.newResource();
        ResourceStore.getCurrent().setTemplate({
            getClassID: function() {
                return "test";
            },
            hasRelation: function() {
                return false;
            },
            getOwnPropertyTemplates: function() {
                return [new PropertyTemplate({
                    repeatable: "true",
                    mandatory: "true",
                    type: "resource",
                    property: {
                        id: "urn:test",
                        propertyLabel: "Test Prop"
                    },
                    valueConstraint: {
                        descriptionTemplateRef: "testref"
                    }
                })];
            }
        });
        ResourceStore.getCurrent().initialize();
        expect(ResourceStore.getCurrent().isLoading("urn:test")).toEqual(false);
        ResourceStore.setLoading("urn:test", true);
        expect(ResourceStore.getCurrent().isLoading("urn:test")).toEqual(true);
        ResourceStore.setLoading("urn:test", false);
        expect(ResourceStore.getCurrent().isLoading("urn:test")).toEqual(false);
    });

    it("should not return an active template", function() {
        expect(ResourceStore.getActiveTemplate()).toBeNull();
    });

    it("should set and return an active template", function() {
        ResourceStore.setActiveTemplate({});
        expect(ResourceStore.getActiveTemplate()).toEqual({});
    });

    it("should return an empty set of data type handlers", function() {
        expect(ResourceStore.getDataTypes()).toEqual({});
    });

    it("should add a data type handlers", function() {
        ResourceStore.addDataTypeHandler("test", {});
        expect(ResourceStore.getDataTypes()).toEqual({test: {}});
        expect(ResourceStore.getDataTypeByID("test")).toEqual({});
    });

    it("should return a null dropzone", function() {
        expect(ResourceStore.getDropzone()).toBeNull();
    });

    it("should set cached dropzone", function() {
        ResourceStore.cacheDropzone({});
        expect(ResourceStore.getDropzone()).toEqual({});
    });

    it("should set cached dropzone", function() {
        var dz = {
            removeAllFiles: function() {}
        };
        spyOn(dz, "removeAllFiles");
        ResourceStore.newResource();
        ResourceStore.cacheDropzone(dz);
        ResourceStore.reset();
        expect(dz.removeAllFiles).toHaveBeenCalled();
    });

    it("should reset the current resource to unedited state", function() {
        var pt;
        pt = new PropertyTemplate({
            repeatable: "true",
            mandatory: "true",
            type: "resource",
            property: {
                id: "http://example.org/newprop",
                propertyLabel: "New Prop"
            },
            valueConstraint: {
                descriptionTemplateRef: "testref"
            }
        }, "tmplid");
        ResourceStore.newResource();
        ResourceStore.getCurrent().setTemplate({
            getID: function() {
                return "tmplid";
            },
            getClassID: function() {
                return "test";
            },
            hasRelation: function() {
                return false;
            },
            hasProperty: function(prop) {
                return true;
            },
            getOwnPropertyTemplates: function() {
                return [pt];
            }
        });
        ResourceStore.getCurrent().initialize();
        expect(ResourceStore.getCurrent().isEmpty()).toEqual(true);
        ResourceStore.getCurrent().addPropertyValue(pt, "urn:val");
        expect(ResourceStore.getCurrent().isEmpty()).toEqual(false);
        ResourceStore.reset();
        expect(ResourceStore.getCurrent().isEmpty()).toEqual(true);
    });

    it("should clear current resouce store environment", function() {
        var pt, dz;
        pt = new PropertyTemplate({
            repeatable: "true",
            mandatory: "true",
            type: "resource",
            property: {
                id: "http://example.org/newprop",
                propertyLabel: "New Prop"
            },
            valueConstraint: {
                descriptionTemplateRef: "testref"
            }
        }, "tmplid");
        dz = {
            destroy: function() {}
        }
        spyOn(dz, "destroy");

        expect(ResourceStore.getCurrent()).toBeNull();
        expect(ResourceStore.getDropzone()).toBeNull();

        ResourceStore.newResource();
        ResourceStore.getCurrent().setTemplate({
            getID: function() {
                return "tmplid";
            },
            getClassID: function() {
                return "test";
            },
            hasRelation: function() {
                return false;
            },
            hasProperty: function(prop) {
                return true;
            },
            getOwnPropertyTemplates: function() {
                return [pt];
            }
        });
        ResourceStore.getCurrent().initialize();
        ResourceStore.getCurrent().addPropertyValue(pt, "urn:val");
        ResourceStore.cacheDropzone(dz);
        expect(ResourceStore.getCurrent()).not.toBeNull();
        expect(ResourceStore.getDropzone()).not.toBeNull();

        ResourceStore.clear();
        expect(ResourceStore.getCurrent().isEmpty()).toEqual(true);
        expect(ResourceStore.getDropzone()).toBeNull();
        expect(dz.destroy).toHaveBeenCalled();
    });

    describe("pivoting", function() {
        var r;

        beforeEach(function() {
            ResourceStore.newResource();
            r = new Resource("urn:example");
            r.setID("urn:test");
        });

        it("should pivot to a new resource", function() {
            ResourceStore.pivot(r);
            expect(ResourceStore.getCurrent()).toEqual(r);
        });

        it("should restore the original state and store the result from the pivoted state", function() {
            ResourceStore.pivot(r);
            ResourceStore.pivotDone();
            expect(ResourceStore.getCreated().length).toEqual(1);
            expect(ResourceStore.getCurrent()).not.toEqual(r);
        });
    });

});


text:
  {{ vm.message.content.feed.display }}

    {{ vm.message.timestamp | date:'shortTime' }}

<ng-embed embed-data="vm.message.text()" embed-options="vm.embedOptions"></ng-embed>


text:
typedef void(^VASTImpressionCallback)(NSString *trackingEventName);
typedef void(^VASTBeaconsTracking)(NSArray *beacons);
typedef void(^MRAIDParametersTracking)(NSDictionary *parameters);

@class SOMAAdView;
@interface SOMAAdRenderer : UIView
@property SOMAWebView* webView;
@property (weak) UIViewController* viewController;
@property(getter=isExpanded, nonatomic) BOOL expanded;
@property (nonatomic, weak) id<SOMARenderedAdViewDelegate> delegate;
@property (getter=isOneTimeClickable, nonatomic) BOOL oneTimeClickable;
@property (nonatomic, copy) SOMAAd* ad;
@property BOOL hasPassback;
@property NSMutableArray* urlTraces;// used to trace auto redirect URLs, IOS-753
@property (weak) SOMAAdView* adView;
@property (nonatomic, copy) VASTImpressionCallback impressionCallback;
@property (nonatomic, copy) VASTBeaconsTracking callback;
@property (nonatomic, copy) MRAIDParametersTracking parametersMRAID;

- (void) render:(SOMAAd*)ad;
- (void) showCloseButton:(float)yOffset;
- (void)didShow;
- (void)didHide;
- (void)onClose:(id)sender;
- (void)onTapped:(UIGestureRecognizer*)gesture;
- (void)configureFullscreen;
- (void) performAutoRedirect:(NSURL*)redirectURL;
@end


text:
require 'spec_helper'

feature 'Imprintable Trains' do
  # TODO
  context 'As a logged in user' do
    include_context 'logged_in_as_user'

    context 'when there are users with the "receiving" role' do
      given!(:order) { create(:order) }
      given!(:train) { create(:imprintable_train, state: 'ordered', job: order.jobs.first ) }
      background :each do
        allow(User).to receive(:of_role) { [user] }
      end

      scenario 'I can assign inventoried by to train', js: true do
        expect(train.inventoried_by).to be_nil

        visit show_train_path('imprintable_train', train)
        sleep 2.5
        # user is already selected
        success_transition :inventoried

        expect(train.reload.state).to eq("inventoried")
        expect(train.inventoried_by_id).to eq(user.id)
      end

      scenario 'I can assign staged by to a train when inventorying', js: true do
        expect(train.staged_by).to be_nil

        visit show_train_path('imprintable_train', train)
        sleep 2.5

        fill_in "imprintable_train_location", with: "New Location"
        success_transition :staged

        expect(train.reload.staged_by_id).to eq(user.id)
      end
    end
  end
end


text:
The default language of Zent is Simplified Chinese, if you want switch to Engilish, you can follow the instruction below.

#### I18nProvider

Zent provides a React Component I18nProvider used to configure the locale text. Components using context, a feature of React, to achieve global effectiveness by wrapping your app.

```jsx
import { I18nProvider, enUSLocale } from 'zent';
import enUS from 'zent/es/i18n/en-US';

<I18nProvider value={enUSLocale}>
	<App />
</I18nProvider>
```

Only Chinese, English and Japanese language packs are available.


text:
<?php

require_once dirname(__FILE__) . '/ASTNodeTest.php';

/**
 * Test case for the {@link PHP_Depend_Code_ASTWhileStatement} class.
 *
 * @category   PHP
 * @package    PHP_Depend
 * @subpackage Code
 * @author     Manuel Pichler <mapi@pdepend.org>
 * @copyright  2008-2012 Manuel Pichler. All rights reserved.
 * @license    http://www.opensource.org/licenses/bsd-license.php  BSD License
 * @version    Release: @package_version@
 * @link       http://www.pdepend.org/
 *
 * @covers PHP_Depend_Parser
 * @covers PHP_Depend_Code_ASTWhileStatement
 * @group pdepend
 * @group pdepend::ast
 * @group unittest
 */
class PHP_Depend_Code_ASTWhileStatementTest extends PHP_Depend_Code_ASTNodeTest
{
    /**
     * Tests the generated object graph of a while statement.
     *
     * @return void
     */
    public function testWhileStatementGraphWithBooleanExpressions()
    {
        $stmt = $this->_getFirstWhileStatementInFunction();
        $this->assertEquals(2, count($stmt->getChildren()));
    }

    /**
     * testFirstChildOfWhileStatementIsASTExpression
     *
     * @return void
     */
    public function testFirstChildOfWhileStatementIsASTExpression()
    {
        $stmt = $this->_getFirstWhileStatementInFunction();
        $this->assertInstanceOf(PHP_Depend_Code_ASTExpression::CLAZZ, $stmt->getChild(0));
    }

    /**
     * testSecondChildOfWhileStatementIsASTScopeStatement
     *
     * @return void
     */
    public function testSecondChildOfWhileStatementIsASTScopeStatement()
    {
        $stmt = $this->_getFirstWhileStatementInFunction();
        $this->assertInstanceOf(PHP_Depend_Code_ASTScopeStatement::CLAZZ, $stmt->getChild(1));
    }

    /**
     * testWhileStatement
     *
     * @return PHP_Depend_Code_ASTWhileStatement
     * @since 1.0.2
     */
    public function testWhileStatement()
    {
        $stmt = $this->_getFirstWhileStatementInFunction();
        $this->assertInstanceOf(PHP_Depend_Code_ASTWhileStatement::CLAZZ, $stmt);

        return $stmt;
    }

    /**
     * testWhileStatementHasExpectedStartLine
     *
     * @param PHP_Depend_Code_ASTWhileStatement $stmt
     *
     * @return void
     * @depends testWhileStatement
     */
    public function testWhileStatementHasExpectedStartLine($stmt)
    {
        $this->assertEquals(4, $stmt->getStartLine());
    }

    /**
     * testWhileStatementHasExpectedStartColumn
     *
     * @param PHP_Depend_Code_ASTWhileStatement $stmt
     *
     * @return void
     * @depends testWhileStatement
     */
    public function testWhileStatementHasExpectedStartColumn($stmt)
    {
        $this->assertEquals(5, $stmt->getStartColumn());
    }

    /**
     * testWhileStatementHasExpectedEndLine
     *
     * @param PHP_Depend_Code_ASTWhileStatement $stmt
     *
     * @return void
     * @depends testWhileStatement
     */
    public function testWhileStatementHasExpectedEndLine($stmt)
    {
        $this->assertEquals(6, $stmt->getEndLine());
    }

    /**
     * testWhileStatementHasExpectedEndColumn
     *
     * @param PHP_Depend_Code_ASTWhileStatement $stmt
     *
     * @return void
     * @depends testWhileStatement
     */
    public function testWhileStatementHasExpectedEndColumn($stmt)
    {
        $this->assertEquals(5, $stmt->getEndColumn());
    }

    /**
     * testWhileStatementWithAlternativeScope
     *
     * @return PHP_Depend_Code_ASTWhileStatement
     * @since 1.0.2
     */
    public function testWhileStatementWithAlternativeScope()
    {
        $stmt = $this->_getFirstWhileStatementInFunction();
        $this->assertInstanceOf(PHP_Depend_Code_ASTWhileStatement::CLAZZ, $stmt);

        return $stmt;
    }

    /**
     * testWhileStatementAlternativeScopeHasExpectedStartLine
     *
     * @param PHP_Depend_Code_ASTWhileStatement $stmt
     *
     * @return void
     * @depends testWhileStatementWithAlternativeScope
     */
    public function testWhileStatementAlternativeScopeHasExpectedStartLine($stmt)
    {
        $this->assertEquals(4, $stmt->getStartLine());
    }

    /**
     * testWhileStatementAlternativeScopeHasExpectedStartColumn
     *
     * @param PHP_Depend_Code_ASTWhileStatement $stmt
     *
     * @return void
     * @depends testWhileStatementWithAlternativeScope
     */
    public function testWhileStatementAlternativeScopeHasExpectedStartColumn($stmt)
    {
        $this->assertEquals(5, $stmt->getStartColumn());
    }

    /**
     * testWhileStatementAlternativeScopeHasExpectedEndLine
     *
     * @param PHP_Depend_Code_ASTWhileStatement $stmt
     *
     * @return void
     * @depends testWhileStatementWithAlternativeScope
     */
    public function testWhileStatementAlternativeScopeHasExpectedEndLine($stmt)
    {
        $this->assertEquals(8, $stmt->getEndLine());
    }

    /**
     * testWhileStatementAlternativeScopeHasExpectedEndColumn
     *
     * @param PHP_Depend_Code_ASTWhileStatement $stmt
     *
     * @return void
     * @depends testWhileStatementWithAlternativeScope
     */
    public function testWhileStatementAlternativeScopeHasExpectedEndColumn($stmt)
    {
        $this->assertEquals(13, $stmt->getEndColumn());
    }

    /**
     * testWhileStatementTerminatedByPhpCloseTag
     *
     * @return void
     */
    public function testWhileStatementTerminatedByPhpCloseTag()
    {
        $stmt = $this->_getFirstWhileStatementInFunction();
        self::assertEquals(9, $stmt->getEndColumn());
    }

    /**
     * Returns a node instance for the currently executed test case.
     *
     * @return PHP_Depend_Code_ASTWhileStatement
     */
    private function _getFirstWhileStatementInFunction()
    {
        return $this->getFirstNodeOfTypeInFunction(
            $this->getCallingTestMethod(),
            PHP_Depend_Code_ASTWhileStatement::CLAZZ
        );
    }
}


text:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <android.support.v4.widget.SwipeRefreshLayout
        android:id="@+id/swipeMovieHits"
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <android.support.v7.widget.RecyclerView
            android:id="@+id/listMovieHits"
            android:layout_width="match_parent"
            android:layout_height="match_parent" />

    </android.support.v4.widget.SwipeRefreshLayout>

</RelativeLayout>