text:
#include <base/xcam_3a_description.h>
#include "xcam_utils.h"

using namespace XCam;

#define CONTEXT_CAST(context)  ((XCam3AHybridContext*)(context))

class XCam3AHybridContext
{
public:
    XCam3AHybridContext ();
    ~XCam3AHybridContext ();

private:
    XCAM_DEAD_COPY (XCam3AHybridContext);

};

XCam3AHybridContext::XCam3AHybridContext ()
{
}

XCam3AHybridContext::~XCam3AHybridContext ()
{
}

static XCamReturn
xcam_create_context (XCam3AContext **context)
{
    XCAM_ASSERT (context);
    XCam3AHybridContext *ctx = new XCam3AHybridContext ();
    *context = ((XCam3AContext*)(ctx));
    return XCAM_RETURN_NO_ERROR;
}

static XCamReturn
xcam_destroy_context (XCam3AContext *context)
{
    XCam3AHybridContext *ctx = CONTEXT_CAST (context);
    if (ctx)
        delete ctx;
    return XCAM_RETURN_NO_ERROR;
}

// configure customized 3a analyzer with width/height/framerate
static XCamReturn
xcam_configure_3a (XCam3AContext *context, uint32_t width, uint32_t height, double framerate)
{
    XCAM_UNUSED (context);
    XCAM_UNUSED (width);
    XCAM_UNUSED (height);
    XCAM_UNUSED (framerate);

    return XCAM_RETURN_NO_ERROR;
}

// set 3a stats to customized 3a analyzer for subsequent usage
static XCamReturn
xcam_set_3a_stats (XCam3AContext *context, XCam3AStats *stats, int64_t timestamp)
{
    XCAM_UNUSED (context);
    XCAM_UNUSED (timestamp);

    XCam3AStatsInfo info = stats->info;
    for (uint32_t i = 0; i < info.height; ++i)
        for (uint32_t j = 0; j < info.width; ++j) {
            XCAM_LOG_DEBUG ("%d %d %d %d %d %d %d %d",
                            stats->stats[i * info.aligned_width + j].avg_y,
                            stats->stats[i * info.aligned_width + j].avg_gr,
                            stats->stats[i * info.aligned_width + j].avg_r,
                            stats->stats[i * info.aligned_width + j].avg_b,
                            stats->stats[i * info.aligned_width + j].avg_gb,
                            stats->stats[i * info.aligned_width + j].valid_wb_count,
                            stats->stats[i * info.aligned_width + j].f_value1,
                            stats->stats[i * info.aligned_width + j].f_value2);
        }

    return XCAM_RETURN_NO_ERROR;
}

// refer to xcam_params.h for common parameters
static XCamReturn
xcam_update_common_params (XCam3AContext *context, XCamCommonParam *params)
{
    XCAM_UNUSED (context);
    XCAM_UNUSED (params);

    return XCAM_RETURN_NO_ERROR;
}

// customized awb algorithm should be added here
static XCamReturn
xcam_analyze_awb (XCam3AContext *context, XCamAwbParam *params)
{
    XCAM_UNUSED (context);
    XCAM_UNUSED (params);

    return XCAM_RETURN_NO_ERROR;
}

// customized ae algorithm should be added here
static XCamReturn
xcam_analyze_ae (XCam3AContext *context, XCamAeParam *params)
{
    XCAM_UNUSED (context);
    XCAM_UNUSED (params);

    return XCAM_RETURN_NO_ERROR;
}

// customized af is unsupported now
static XCamReturn
xcam_analyze_af (XCam3AContext *context, XCamAfParam *params)
{
    XCAM_UNUSED (context);
    XCAM_UNUSED (params);

    return XCAM_RETURN_NO_ERROR;
}

// combine ae/awb analyze results and set to framework
// only support XCam3aResultExposure and XCam3aResultWhiteBalance now
static XCamReturn
xcam_combine_analyze_results (XCam3AContext *context, XCam3aResultHead *results[], uint32_t *res_count)
{
    XCAM_UNUSED (context);

    uint32_t result_count = 2;
    static XCam3aResultHead *res_array[XCAM_3A_MAX_RESULT_COUNT];
    xcam_mem_clear (res_array);

    for (uint32_t i = 0; i < result_count; ++i) {
        results[i] = res_array[i];
    }
    *res_count = result_count;

    XCam3aResultExposure *exposure = xcam_malloc0_type (XCam3aResultExposure);
    exposure->head.type = XCAM_3A_RESULT_EXPOSURE;
    exposure->head.process_type = XCAM_IMAGE_PROCESS_ALWAYS;
    exposure->head.version = XCAM_VERSION;
    exposure->exposure_time = 9986; // 9.986ms
    exposure->analog_gain = 10;
    results[0] = (XCam3aResultHead *)exposure;

    XCam3aResultWhiteBalance *wb = xcam_malloc0_type (XCam3aResultWhiteBalance);
    wb->head.type = XCAM_3A_RESULT_WHITE_BALANCE;
    wb->head.process_type = XCAM_IMAGE_PROCESS_ALWAYS;
    wb->head.version = XCAM_VERSION;
    wb->gr_gain = 1.0;
    wb->r_gain = 1.6453;
    wb->b_gain = 2.0645;
    wb->gb_gain = 1.0;
    results[1] = (XCam3aResultHead *)wb;

    return XCAM_RETURN_NO_ERROR;
}

static void
xcam_free_results (XCam3aResultHead *results[], uint32_t res_count)
{
    for (uint32_t i = 0; i < res_count; ++i) {
        if (results[i])
            xcam_free (results[i]);
    }
}

XCAM_BEGIN_DECLARE

XCam3ADescription xcam_3a_desciption = {
    XCAM_VERSION,
    sizeof (XCam3ADescription),
    xcam_create_context,
    xcam_destroy_context,
    xcam_configure_3a,
    xcam_set_3a_stats,
    xcam_update_common_params,
    xcam_analyze_awb,
    xcam_analyze_ae,
    xcam_analyze_af,
    xcam_combine_analyze_results,
    xcam_free_results
};

XCAM_END_DECLARE


text:
package br.com.angrybits.angrybitsWeb.view;

import javax.inject.Inject;

import br.com.angrybits.angrybitsCore.business.BookmarkBC;
import br.com.angrybits.angrybitsCore.entity.Bookmark;
import br.gov.frameworkdemoiselle.annotation.PreviousView;
import br.gov.frameworkdemoiselle.stereotype.Controller;
import br.gov.frameworkdemoiselle.stereotype.ViewController;
import br.gov.frameworkdemoiselle.template.AbstractEditPageBean;
import br.gov.frameworkdemoiselle.transaction.Transactional;

@Controller
@ViewController
@PreviousView("/bookmark_list.xhtml")
public class BookmarkEditMB extends AbstractEditPageBean<Bookmark, Long> {

	private static final long serialVersionUID = 1L;

	@Inject
	private BookmarkBC bookmarkBC;

	@Override
	@Transactional
	public String delete() {
		this.bookmarkBC.delete(getId());
		return getPreviousView();
	}

	@Override
	@Transactional
	public String insert() {
		this.bookmarkBC.insert(getBean());
		return getPreviousView();
	}

	@Override
	@Transactional
	public String update() {
		this.bookmarkBC.update(getBean());
		return getPreviousView();
	}

	@Override
	protected Bookmark handleLoad(Long id) {
		return this.bookmarkBC.load(id);
	}
}

redpajama_set_name: RedPajamaGithub


text:
title:  Do Dalszego Studium
date:  26/11/2021
---

"Na każdym etapie chrześcijańskiego doświadczenia nasza skrucha będzie się pogłębiać. Do tych, którym przebaczył — tych, których uznaje jako swój lud — Pan mówi:

— »Wtedy wspomnicie o swoim złym postępowaniu i o swoich czynach, które nie były dobre; i będziecie się brzydzić samych siebie« (Ez 36,31).

Dalej zaś mówi:

— »I odnowię moje przymierze z tobą, i poznasz, że Ja jestem Pan, abyś pamiętała i wstydziła się, i już nigdy nie otworzyła ust ze wstydu, gdy ci przebaczę wszystko, co uczyniłaś — mówi Wszechmocny Pan« (Ez 16,62-63).

Wówczas z naszych ust nie popłynie więcej samochwalstwo. Będziemy wiedzieć, że nasz dostatek pochodzi wyłącznie od Chrystusa. Wyznanie apostoła stanie się naszym wyznaniem:

— »Wiem tedy, że nie mieszka we mnie, to jest w ciele moim, dobro« (Rz 7,18). »Niech mnie Bóg uchowa, abym miał się chlubić z czego innego, jak tylko z krzyża Pana naszego Jezusa Chrystusa, przez którego dla mnie świat jest ukrzyżowany, a ja dla świata« (Ga 6,14)"40.

"»Dobroć Boża do upamiętania cię prowadzi« (Rz 2,4). Złoty łańcuch — miłosierdzie i współczucie boskiej miłości — zostaje opleciony wokół każdej zagrożonej duszy. Pan oświadcza:

— »Miłością wieczną umiłowałem cię, dlatego tak długo okazywałem ci łaskę« (Jr 31,3)"41.

**Pytania Do Dyskusji**

`1. Choć musimy okazywać skruchę, dlaczego musimy też zachować ostrożność, by nie wpaść w pułapkę czynienia skruchy zbawczą zasługą, jakby samo okazanie skruchy czyniło nas ludźmi prawymi wobec Boga? W jaki jedyny sposób możemy zostać usprawiedliwieni przed Bogiem?`

`2. "Wtedy Judasz, który go zdradził, widząc, że został skazany, żałował tego, zwrócił trzydzieści srebrników arcykapłanom oraz starszym i rzekł: — Zgrzeszyłem, gdyż wydałem krew niewinną. A oni rzekli: — Cóż nam do tego? Ty patrz swego. Wtedy rzucił srebrniki do świątyni, oddalił się, poszedł i powiesił się" (Mt 27,3-5). Niewątpliwie Judasz żałował tego, co zrobił Jezusowi (w końcu z żalu popełnił samobójstwo). Dlaczego jego żal nie był prawdziwą skruchą?`

`3. Jak prawda dotycząca ludzkiej grzeszności, naszej grzeszności, powinna czynić nas pokornymi wobec innych ludzi (co przejawia się nieosądzaniem ich) i przed Bogiem? Jak to, że jedynie śmierć Syna Bożego nas zbawia, pokazuje nam, jak wielkim złem jest grzech?`


text:
/*
 * WinJS Contrib v2.0.0.6
 * licensed under MIT license (see http://opensource.org/licenses/MIT)
 * sources available at https://github.com/gleborgne/winjscontrib
 */

.mcn-splashscreen {
  position: fixed;
  z-index: 3000;
  height: 100%;
  width: 100%;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  background-color: #081a4a;
  display: -ms-grid;
  -ms-grid-rows: 1fr;
  -ms-grid-columns: 1fr;
}
.mcn-splashscreen #mcn-splashscreen-image {
  -ms-grid-row-align: center;
  -ms-grid-column-align: center;
  max-width: 100%;
}
.mcn-splashscreen #mcn-splashscreen-loader {
  display: -ms-inline-grid;
  -ms-grid-row-align: center;
  -ms-grid-column-align: center;
  margin-top: 340px;
  -ms-grid-rows: 1fr;
  -ms-grid-columns: auto auto;
  color: white;
  max-width: 90%;
}
.mcn-splashscreen #mcn-splashscreen-loader .cordova-ring {
  position: absolute;
  width: 30px;
  top: 15px;
  height: 30px;
  background: #ffffff;
  border-radius: 50px;
  -webkit-animation: cordova-ring 3s infinite linear;
}
.mcn-splashscreen #mcn-splashscreen-loader .cordova-ring:after {
  position: absolute;
  width: 50px;
  height: 50px;
  border-top: 10px solid #ffffff;
  border-bottom: 10px solid #ffffff;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-radius: 50px;
  content: '';
  top: -20px;
  left: -20px;
  -webkit-animation: cordova-ring_after 1.5s infinite linear;
}
@-webkit-keyframes cordova-ring {
  0% {
    -webkit-transform: rotate(0deg);
  }
  50% {
    -webkit-transform: rotate(180deg);
    background: #ffffff;
  }
  100% {
    -webkit-transform: rotate(360deg);
  }
}
@-webkit-keyframes cordova-ring_after {
  0% {
    border-top: 10px solid #ffffff;
    border-bottom: 10px solid #ffffff;
  }
  50% {
    border-top: 10px solid rgba(255, 255, 255, 0.2);
    border-bottom: 10px solid rgba(255, 255, 255, 0.2);
    -webkit-transform: scale(1.2);
  }
  100% {
    border-top: 10px solid #ffffff;
    border-bottom: 10px solid #ffffff;
  }
}
.mcn-splashscreen #mcn-splashscreen-loader progress {
  width: 40px;
  height: 40px;
  color: white;
}
.mcn-splashscreen #mcn-splashscreen-loader .mcn-splashscreen-loader-text {
  -ms-grid-column: 2;
  font-size: 1.2em;
  -ms-grid-row-align: center;
  margin-left: 20px;
}
.mcn-xplat.mcn-splashscreen #mcn-splashscreen-loader {
  display: flex;
}


text:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:orientation="vertical"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:padding="8dip" >
    <LinearLayout
            android:orientation="horizontal"
            android:layout_width="fill_parent"
            android:layout_height="48dip" >
        <ImageView
                android:id="@+id/icon"
                android:layout_width="48dip"
                android:layout_height="48dip"
                android:clickable="true"
                android:onClick="onIconClicked"
                android:src="@drawable/ic_launcher" />
        <EditText
                android:id="@+id/title"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:hint="Title" />
    </LinearLayout>
    <EditText
            android:id="@+id/command"
            android:layout_width="fill_parent"
            android:layout_height="48dp"
            android:hint="Command" />
    <CheckBox
            android:id="@+id/root_checkbox"
            android:layout_width="fill_parent"
            android:layout_height="48dp"
            android:onClick="onRunAsRootClicked"
            android:text="@string/run_as_root" />
    <LinearLayout
            android:orientation="horizontal"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:padding="8dip"
            android:gravity="bottom" >
        <Button android:id="@+id/cancel_buffon"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:onClick="onCancelClicked"
                android:text="Cancel" />
        <Button android:id="@+id/add_widget_buffon"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:onClick="onSaveClicked"
                android:text="Save" />
    </LinearLayout>
</LinearLayout>
<!-- vim: set ts=4 sw=4 sts=4 expandtab: -->


text:
<?xml version="1.0"?>
<tree string="UPS Services">
    <field name="name"/>
    <field name="code"/>
    <field name="display_name"/>
</tree>


text:
using UnityEngine;
using System.Collections;

public class Bullet2 : MonoBehaviour {

		// Use this for initialization
	private Shoot shoot;

	public Rigidbody2D bullet3;
	void Awake(){
		shoot = GameObject.Find ("Gun").GetComponent<Shoot>();
	}

	void Start () {

	}

	// Update is called once per frame
	void Update () {

	}

	void OnTriggerEnter2D(Collider2D col){
		//hit enemy
		if (col.tag == "BigBall" || col.tag == "MediumBall" ||col.tag == "SmallBall"||col.tag == "MiniBall") {
			col.gameObject.GetComponent<EnemyBall>().Hit();
			GameObject.Find("ScoreManager").GetComponent<ScoreManager>().AddScoreEnemy(col.tag);
			DestroyAndAllowCanShoot();
		}else if(col.tag == "Wall"){
			Rigidbody2D intanceBullet3=Instantiate (bullet3, transform.position - new Vector3(0,0,0), Quaternion.Euler(new Vector3(0,0,0))) as Rigidbody2D;
			Destroy (gameObject);
		}else if(col.tag == "DestroyableWall"){
			col.gameObject.GetComponent<CubeCollisions>().Hit();
			//Destroy de bullet
			DestroyAndAllowCanShoot();
		}
	}

	void DestroyAndAllowCanShoot(){
		//Destroy de bullet
		shoot.AllowCanShootBullet2();
		Destroy (gameObject);
	}
}


text:
#pragma once
#include <aws/budgets/Budgets_EXPORTS.h>

namespace Aws
{
template<typename RESULT_TYPE>
class AmazonWebServiceResult;

namespace Utils
{
namespace Json
{
  class JsonValue;
} // namespace Json
} // namespace Utils
namespace Budgets
{
namespace Model
{
  /**
   *
 Response of DeleteBudget

See Also:
   AWS
   * API Reference

   */
  class AWS_BUDGETS_API DeleteBudgetResult
  {
  public:
    DeleteBudgetResult();
    DeleteBudgetResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
    DeleteBudgetResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);

  };

} // namespace Model
} // namespace Budgets
} // namespace Aws


text:
package com.mitchellbosecke.pebble.loader;

import java.io.Reader;
import java.io.StringReader;

import com.mitchellbosecke.pebble.error.LoaderException;

public class StringLoader implements Loader<String> {

    @Override
    public Reader getReader(String templateName) throws LoaderException {
        return new StringReader(templateName);
    }

    @Override
    public void setPrefix(String prefix) {

    }

    @Override
    public void setSuffix(String suffix) {

    }

    @Override
    public void setCharset(String charset) {

    }

    @Override
    public String resolveRelativePath(String relativePath, String anchorPath) {
        return null;
    }

    @Override
    public String createCacheKey(String templateName) {
        return templateName;
    }

}


text:
@interface HWMessageCenterViewController : UITableViewController

@end


text:
"""
通联数据
Created on 2015/08/24
@author: Jimmy Liu
@group : waditu
@contact: jimmysoa@sina.cn
"""
from tushare.datayes.bond import Bond
from tushare.datayes.equity import Equity
from tushare.datayes.fund import Fund
from tushare.datayes.future import Future
from tushare.datayes.fundamental import Fundamental
from tushare.datayes.HKequity import HKequity
from tushare.datayes.idx import Idx
from tushare.datayes.macro import Macro
from tushare.datayes.master import Master
from tushare.datayes.options import Options
from tushare.datayes.market import Market
from tushare.datayes.subject import Subject


text:
using System.Net.Http;
using System.Web.Http;
using System.Web.OData.Builder;
using System.Web.OData.Extensions;
using System.Web.OData.Routing;
using System.Web.OData.Routing.Conventions;
using System.Xml;
using Microsoft.OData.Edm;
using Microsoft.OData.Edm.Csdl;
using Nuwa;
using Xunit;

namespace WebStack.QA.Test.OData.ModelAliasing
{
    [NuwaFramework]
    public class ModelBuildersMetadataTests
    {
        [NuwaBaseAddress]
        public string BaseAddress { get; set; }

        [NuwaHttpClient]
        public HttpClient Client { get; set; }

        [NuwaConfiguration]
        public static void UpdateConfiguration(HttpConfiguration config)
        {
            config.Routes.Clear();
            config.MapODataServiceRoute("convention", "convention", GetConventionModel(), new DefaultODataPathHandler(), ODataRoutingConventions.CreateDefault());
            config.MapODataServiceRoute("explicit", "explicit", GetExplicitModel(), new DefaultODataPathHandler(), ODataRoutingConventions.CreateDefault());
        }

        private static IEdmModel GetConventionModel()
        {
            ODataConventionModelBuilder builder = new ODataConventionModelBuilder();
            EntitySetConfiguration<ModelAliasingMetadataCustomer> customers = builder.EntitySet<ModelAliasingMetadataCustomer>("Customers");
            customers.EntityType.Name = "Customer";
            customers.EntityType.Namespace = "ModelAliasing";
            customers.EntityType.ComplexProperty(c => c.BillingAddress).Name = "FinancialAddress";
            customers.EntityType.Property(c => c.Name).Name = "ClientName";
            customers.EntityType.HasMany(c => c.Orders).Name = "Purchases";
            EntitySetConfiguration<ModelAliasingMetadataOrder> orders = builder.EntitySet<ModelAliasingMetadataOrder>("Orders");
            orders.EntityType.Name = "Order";
            orders.EntityType.Namespace = "AliasedNamespace";
            EntityTypeConfiguration<ModelAliasingMetadataExpressOrder> expressOrder = builder.EntityType<ModelAliasingMetadataExpressOrder>().DerivesFrom<ModelAliasingMetadataOrder>();
            expressOrder.Name = "ExpressOrder";
            expressOrder.Namespace = "Purchasing";
            expressOrder.Property(eo => eo.ExpressFee).Name = "Fee";
            EntityTypeConfiguration<ModelAliasingMetadataFreeDeliveryOrder> freeDeliveryOrder = builder.EntityType<ModelAliasingMetadataFreeDeliveryOrder>().DerivesFrom<ModelAliasingMetadataOrder>();
            EntitySetConfiguration<ModelAliasingMetadataProduct> products = builder.EntitySet<ModelAliasingMetadataProduct>("Products");
            EntitySetConfiguration<ModelAliasingMetadataOrderLine> ordersLines = builder.EntitySet<ModelAliasingMetadataOrderLine>("OrdersLines");
            ordersLines.EntityType.Property(ol => ol.Price).Name = "Cost";
            ComplexTypeConfiguration<ModelAliasingMetadataRegion> region = builder.ComplexType<ModelAliasingMetadataRegion>();
            region.Name = "PoliticalRegion";
            region.Namespace = "Location";

            ComplexTypeConfiguration<ModelAliasingMetadataAddress> address = builder.ComplexType<ModelAliasingMetadataAddress>();
            address.Name = "Direction";
            address.Namespace = "Location";
            address.ComplexProperty<ModelAliasingMetadataRegion>(c => c.Country).Name = "Reign";
            return builder.GetEdmModel();
        }

        private static IEdmModel GetExplicitModel()
        {
            ODataModelBuilder builder = new ODataModelBuilder();
            EntitySetConfiguration<ModelAliasingMetadataCustomer> customers = builder.EntitySet<ModelAliasingMetadataCustomer>("Customers");
            customers.EntityType.HasKey(c => c.Id);
            customers.EntityType.Property(c => c.Name);
            customers.EntityType.ComplexProperty(c => c.BillingAddress);
            customers.EntityType.ComplexProperty(c => c.DefaultShippingAddress);
            customers.EntityType.HasMany(c => c.Orders);

            EntityTypeConfiguration<ModelAliasingMetadataExpressOrder> expressOrder = builder.EntityType<ModelAliasingMetadataExpressOrder>().DerivesFrom<ModelAliasingMetadataOrder>();
            expressOrder.Property(eo => eo.ExpressFee);
            expressOrder.Property(eo => eo.GuaranteedDeliveryDate);

            EntityTypeConfiguration<ModelAliasingMetadataFreeDeliveryOrder> freeDeliveryOrder = builder.EntityType<ModelAliasingMetadataFreeDeliveryOrder>().DerivesFrom<ModelAliasingMetadataOrder>();
            freeDeliveryOrder.Property(fdo => fdo.EstimatedDeliveryDate);

            EntitySetConfiguration<ModelAliasingMetadataOrder> orders = builder.EntitySet<ModelAliasingMetadataOrder>("Orders");
            orders.EntityType.HasKey(o => o.Id);
            orders.EntityType.Property(o => o.PurchaseDate);
            orders.EntityType.ComplexProperty(o => o.ShippingAddress);
            orders.EntityType.HasMany(o => o.Details);
            EntitySetConfiguration<ModelAliasingMetadataOrderLine> ordersLines = builder.EntitySet<ModelAliasingMetadataOrderLine>("OrdersLines");
            ordersLines.EntityType.HasKey(ol => ol.Id);
            ordersLines.EntityType.HasOptional(ol => ol.Item);
            ordersLines.EntityType.Property(ol => ol.Price);
            ordersLines.EntityType.Property(ol => ol.Ammount);
            ComplexTypeConfiguration<ModelAliasingMetadataAddress> address = builder.ComplexType<ModelAliasingMetadataAddress>();
            address.Property(a => a.FirstLine);
            address.Property(a => a.SecondLine);
            address.Property(a => a.ZipCode);
            address.Property(a => a.City);
            address.ComplexProperty(a => a.Country);
            ComplexTypeConfiguration<ModelAliasingMetadataRegion> region = builder.ComplexType<ModelAliasingMetadataRegion>();
            region.Property(r => r.Country);
            region.Property(r => r.State);

            EntitySetConfiguration<ModelAliasingMetadataProduct> products = builder.EntitySet<ModelAliasingMetadataProduct>("Products");
            products.EntityType.HasKey(p => p.Id);
            products.EntityType.Property(p => p.Name);
            products.EntityType.CollectionProperty(p => p.Regions);

            customers.EntityType.Name = "Customer";
            customers.EntityType.Namespace = "ModelAliasing";
            customers.EntityType.ComplexProperty(c => c.BillingAddress).Name = "FinancialAddress";
            customers.EntityType.Property(c => c.Name).Name = "ClientName";
            customers.EntityType.HasMany(c => c.Orders).Name = "Purchases";

            orders.EntityType.Name = "Order";
            orders.EntityType.Namespace = "AliasedNamespace";

            expressOrder.Name = "ExpressOrder";
            expressOrder.Namespace = "Purchasing";
            expressOrder.Property(eo => eo.ExpressFee).Name = "Fee";

            freeDeliveryOrder.Name = "FreeOrder";
            freeDeliveryOrder.Namespace = "Purchasing";

            ordersLines.EntityType.Property(ol => ol.Price).Name = "Cost";
            region.Name = "PoliticalRegion";
            region.Namespace = "Location";

            address.Name = "Direction";
            address.Namespace = "Location";
            address.ComplexProperty<ModelAliasingMetadataRegion>(c => c.Country).Name = "Reign";
            return builder.GetEdmModel();
        }

        [Fact]
        public void CanRenameTypesAndNamespacesInConventionModelBuilder()
        {
            HttpRequestMessage request = new HttpRequestMessage(HttpMethod.Get, BaseAddress + "/convention/$metadata");
            HttpResponseMessage response = Client.SendAsync(request).Result;
            IEdmModel model = EdmxReader.Parse(XmlReader.Create(response.Content.ReadAsStreamAsync().Result));
            //Can rename an entity + namespace
            IEdmEntityType customer = model.FindDeclaredType("ModelAliasing.Customer") as IEdmEntityType;
            Assert.NotNull(customer);
            //Explicit configuration on the model builder overrides any configuration on the DataContract attribute.
            IEdmEntityType orders = model.FindDeclaredType("AliasedNamespace.Order") as IEdmEntityType;
            Assert.NotNull(orders);
            //Can rename a derived entity  name + namespace
            IEdmEntityType expressOrder = model.FindDeclaredType("Purchasing.ExpressOrder") as IEdmEntityType;
            Assert.NotNull(expressOrder);
            //Can rename a derived entity  name + namespace using DataContract
            IEdmEntityType freeDeliveryOrder = model.FindDeclaredType("Billing.FreeDeliveryOrder") as IEdmEntityType;
            Assert.NotNull(freeDeliveryOrder);
            //Can configure an entity with the data contract attribute
            IEdmEntityType ordersLines = model.FindDeclaredType("Billing.OrderLine") as IEdmEntityType;
            Assert.NotNull(ordersLines);
            //Can change the name and the namespaces for complex types
            IEdmComplexType region = model.FindDeclaredType("Location.PoliticalRegion") as IEdmComplexType;
            Assert.NotNull(region);
            IEdmComplexType address = model.FindDeclaredType("Location.Direction") as IEdmComplexType;
            Assert.NotNull(address);
        }

        [Fact]
        public void CanRenamePropertiesInConventionModelBuilder()
        {
            HttpRequestMessage request = new HttpRequestMessage(HttpMethod.Get, BaseAddress + "/convention/$metadata");
            HttpResponseMessage response = Client.SendAsync(request).Result;
            IEdmModel model = EdmxReader.Parse(XmlReader.Create(response.Content.ReadAsStreamAsync().Result));
            // Can change the name of regular, complex and navigation properties.
            IEdmEntityType customer = model.FindDeclaredType("ModelAliasing.Customer") as IEdmEntityType;
            Assert.NotNull(customer);
            Assert.NotNull(customer.FindProperty("FinancialAddress"));
            Assert.NotNull(customer.FindProperty("ClientName"));
            Assert.NotNull(customer.FindProperty("Purchases"));
            // Can change the name of properties on complex objects
            IEdmComplexType address = model.FindDeclaredType("Location.Direction") as IEdmComplexType;
            Assert.NotNull(address);
            Assert.NotNull(address.FindProperty("Reign"));
            //Can change the name of properties on derived entities.
            IEdmEntityType expressOrder = model.FindDeclaredType("Purchasing.ExpressOrder") as IEdmEntityType;
            Assert.NotNull(expressOrder);
            //Can change the name of properties on derived entities when added explicitly.
            Assert.NotNull(expressOrder.FindProperty("Fee"));
            //Can change the name of properties on derived entities using data contract attribute.
            Assert.NotNull(expressOrder.FindProperty("DeliveryDate"));
            // Can change the name of the properties using DataContract attribute
            IEdmEntityType ordersLines = model.FindDeclaredType("Billing.OrderLine") as IEdmEntityType;
            Assert.NotNull(ordersLines);
            Assert.NotNull(ordersLines.FindProperty("Product"));
            // Data contract attribute override any explicit configuration on the model builder
            Assert.NotNull(ordersLines.FindProperty("Cost"));
        }

        [Fact]
        public void CanRenameTypesAndNamespacesInRegularModelBuilder()
        {
            HttpRequestMessage request = new HttpRequestMessage(HttpMethod.Get, BaseAddress + "/explicit/$metadata");
            HttpResponseMessage response = Client.SendAsync(request).Result;
            IEdmModel model = EdmxReader.Parse(XmlReader.Create(response.Content.ReadAsStreamAsync().Result));
            //Can rename an entity + namespace
            IEdmEntityType customer = model.FindDeclaredType("ModelAliasing.Customer") as IEdmEntityType;
            Assert.NotNull(customer);
            //Explicit configuration on the model builder overrides any configuration on the DataContract attribute.
            IEdmEntityType orders = model.FindDeclaredType("AliasedNamespace.Order") as IEdmEntityType;
            Assert.NotNull(orders);
            //Can rename a derived entity  name + namespace
            IEdmEntityType expressOrder = model.FindDeclaredType("Purchasing.ExpressOrder") as IEdmEntityType;
            Assert.NotNull(expressOrder);
            //DataContract doesn't rename the entity or the namespace
            IEdmEntityType freeDeliveryOrder = model.FindDeclaredType("Purchasing.FreeOrder") as IEdmEntityType;
            Assert.NotNull(freeDeliveryOrder);
            //DataContract doesn't rename the entity or the namespace
            IEdmEntityType ordersLines = model.FindDeclaredType("Billing.OrderLine") as IEdmEntityType;
            Assert.Null(ordersLines);
            //Can change the name and the namespaces for complex types
            IEdmComplexType region = model.FindDeclaredType("Location.PoliticalRegion") as IEdmComplexType;
            Assert.NotNull(region);
            IEdmComplexType address = model.FindDeclaredType("Location.Direction") as IEdmComplexType;
            Assert.NotNull(address);
        }

        [Fact]
        public void CanRenamePropertiesInRegularModelBuilder()
        {
            HttpRequestMessage request = new HttpRequestMessage(HttpMethod.Get, BaseAddress + "/explicit/$metadata");
            HttpResponseMessage response = Client.SendAsync(request).Result;
            IEdmModel model = EdmxReader.Parse(XmlReader.Create(response.Content.ReadAsStreamAsync().Result));
            // Can change the name of regular, complex and navigation properties.
            IEdmEntityType customer = model.FindDeclaredType("ModelAliasing.Customer") as IEdmEntityType;
            Assert.NotNull(customer);
            Assert.NotNull(customer.FindProperty("FinancialAddress"));
            Assert.NotNull(customer.FindProperty("ClientName"));
            Assert.NotNull(customer.FindProperty("Purchases"));
            // Can change the name of properties on complex objects
            IEdmComplexType address = model.FindDeclaredType("Location.Direction") as IEdmComplexType;
            Assert.NotNull(address);
            Assert.NotNull(address.FindProperty("Reign"));
            //Can change the name of properties on derived entities.
            IEdmEntityType expressOrder = model.FindDeclaredType("Purchasing.ExpressOrder") as IEdmEntityType;
            Assert.NotNull(expressOrder);
            //Can change the name of properties on derived entities when added explicitly.
            Assert.NotNull(expressOrder.FindProperty("Fee"));
            //Data contract attribute doesn't change the name of the property.
            Assert.Null(expressOrder.FindProperty("DeliveryDate"));
            Assert.Null(expressOrder.FindProperty("GuanteedDeliveryDate"));
            // Data contract attribute doesn't change the names of the properties
            IEdmEntityType ordersLines = model.FindDeclaredType("WebStack.QA.Test.OData.ModelAliasing.ModelAliasingMetadataOrderLine") as IEdmEntityType;
            Assert.NotNull(ordersLines);
            Assert.Null(ordersLines.FindProperty("Product"));
            Assert.NotNull(ordersLines.FindProperty("Item"));
            // Data contract attribute doesn't override any explicit configuration on the model builder
            Assert.NotNull(ordersLines.FindProperty("Cost"));
        }
    }
}


text:
module Gitlab
  module Kubernetes
    module Helm
      class InstallCommand
        include BaseCommand
        include ClientCommand

        attr_reader :name, :files, :chart, :repository, :preinstall, :postinstall
        attr_accessor :version

        def initialize(name:, chart:, files:, rbac:, version: nil, repository: nil, preinstall: nil, postinstall: nil)
          @name = name
          @chart = chart
          @version = version
          @rbac = rbac
          @files = files
          @repository = repository
          @preinstall = preinstall
          @postinstall = postinstall
        end

        def generate_script
          super + [
            init_command,
            wait_for_tiller_command,
            repository_command,
            repository_update_command,
            preinstall,
            install_command,
            postinstall
          ].compact.join("\n")
        end

        def rbac?
          @rbac
        end

        private

        def repository_update_command
          'helm repo update' if repository
        end

        # Uses `helm upgrade --install` which means we can use this for both
        # installation and uprade of applications
        def install_command
          command = ['helm', 'upgrade', name, chart] +
            install_flag +
            reset_values_flag +
            optional_tls_flags +
            optional_version_flag +
            rbac_create_flag +
            namespace_flag +
            value_flag

          command.shelljoin
        end

        def install_flag
          ['--install']
        end

        def reset_values_flag
          ['--reset-values']
        end

        def value_flag
          ['-f', "/data/helm/#{name}/config/values.yaml"]
        end

        def namespace_flag
          ['--namespace', Gitlab::Kubernetes::Helm::NAMESPACE]
        end

        def rbac_create_flag
          if rbac?
            %w[--set rbac.create=true,rbac.enabled=true]
          else
            %w[--set rbac.create=false,rbac.enabled=false]
          end
        end

        def optional_version_flag
          return [] unless version

          ['--version', version]
        end
      end
    end
  end
end


text:
<?php

namespace spec\DigitalOceanV2\Api;

use DigitalOceanV2\Adapter\AdapterInterface;

class RateLimitSpec extends \PhpSpec\ObjectBehavior
{
    function let(AdapterInterface $adapter)
    {
        $this->beConstructedWith($adapter);
    }

    function it_is_initializable()
    {
        $this->shouldHaveType('DigitalOceanV2\Api\RateLimit');
    }

    function it_returns_null_if_there_is_no_previous_request($adapter)
    {
        $adapter->getLatestResponseHeaders()->willReturn(null);

        $this->getRateLimit()->shouldBeNull();
    }

    function it_returns_rate_limit_entity($adapter)
    {
        $adapter->getLatestResponseHeaders()->willReturn(array(
            'limit'     => 1200,
            'remaining' => 1000,
            'reset'     => time(),
        ));

        $this->getRateLimit()->shouldReturnAnInstanceOf('DigitalOceanV2\Entity\RateLimit');
    }
}


text:
<?php
if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Departments_model extends CI_model
{
	public function getEmployees($id)//Gets Runnable positions
	{
		$result = $this->db->get_where('team',array('Department_id ='=>$id))->result();
		return $result;
	}
	function getBlogDetails(){
		$blogId = 5;
		$this->db->select('*');
		$this->db->from('blog_topic');
		$this->db->where(array('Blog_type_ID ='=> $blogId));
		$this->db->join('blog_details','blog_details.Blog_topic_id = blog_topic.Blog_topicID');
		$this->db->order_by('Blog_topicID','desc');
		$result = $this->db->get();
		return $result->result();

	}
	public function getTopics()
	{
		$blogId = 5;
		$this->db->select('*');
		$this->db->from('blog_topic');
		$this->db->where(array('Blog_type_ID ='=> $blogId));
		//$this->db->join('blog_details','blog_details.Blog_topic_id = blog_topic.Blog_topicID');
		$this->db->order_by('Blog_topicID','desc');
		$result = $this->db->get();
		return $result->result();
	}
	public function getTopicDescription(){
		$blogId = 5;
		$this->db->select('*');
		$this->db->from('blog_topic');
		$this->db->where(array('Blog_type_ID ='=> $blogId));
		$this->db->join('blog_details','blog_details.Blog_topic_id = blog_topic.Blog_topicID');
		$this->db->order_by('Blog_topicID','desc');
		$this->db->limit(1);
		$result = $this->db->get();
		return $result->result();
	}
	public function getTopicDescriptions ($topicid){
		$this->db->select('*');
		$this->db->from('blog_details');
		$this->db->where(array('Blog_topic_id ='=> $topicid));
		$this->db->join('blog_topic','blog_topic.Blog_topicID = blog_details.Blog_topic_id');
	    $this->db->limit(1);
		$result = $this->db->get();
        return $result->result();

	}
    public function getComments($topicid)
    {
        $result = $this->db->get_where('blog_comments',array('Blog_topic_ID ='=> $topicid))->result();
            return $result;
    }
	 public function getCommentsNo($topicid)
    {
        $this->db->get_where('blog_comments',array('Blog_topic_ID ='=> $topicid))->result();
		$result = $this->db->affected_rows();
        return $result;
    }
    public function setComments($topicid,$mydetails)
    {
        $mycomment = array('details'=>$mydetails,'topicid'=>$topicid);
        $this->db->insert('comments',$mycomment);
        return true;
    }
	public function newblog($topic,$description){
		 $data=array('Topic'=>$topic,'Blog_type_ID'=>5);
		 if(empty($this->db->get_where('blog_topic',array('Topic ='=>$topic))->result())):
			 $this->db->insert('blog_topic',$data);
			 $newblogTopicId = $this->db->select('Blog_topicID')->from('blog_topic')->where(array('Topic ='=> $topic))->get()
			 							->result()[0]->Blog_topicID;
			 $data2 = array('details'=>$description,'Blog_topic_id'=>$newblogTopicId);
		 	 $this->db->insert('blog_details',$data2);
		 else:
         return "Topic already exist";
		 endif;
	}
	public function updateblog($id,$topic,$description)
	{
		$data = array('Topic'=>$topic);
		$this->db->where('Blog_topicID',$id)
				->update('blog_topic',$data);
		$data2=array('details'=>$description);
        $this->db->where('Blog_topic_id',$id)
              	 ->update('blog_details',$data2);

	}
 public function deleteblog($id)
    {
	  $res = $this->db->delete('blog_topic', array('Blog_topicID' => $id));
	  $res4 = $this->db->affected_rows();
	  $res2 = $this->db->delete('blog_details', array('Blog_topic_id' => $id));
	  $res3 = $this->db->delete('blog_comments', array('Blog_topic_ID' => $id));
	 return $res4;
    }
 public function setcomment($topicid,$comment,$useremail){
 	$data = array('Comments'=>$comment,'Email'=>$useremail,'Blog_topic_ID'=>$topicid);
 	$this->db->insert('blog_comments',$data);

 }
}


text:
/**
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.trello.rxlifecycle;

import rx.Observable;
import rx.Subscriber;
import rx.observers.SerializedSubscriber;

/**
 * Returns an Observable that emits the items from the source Observable until another Observable
 * emits an item.
 * <p>
 * Unlike takeUntil, this choose to unsubscribe the parent rather than calling onComplete().
 */
final class OperatorSubscribeUntil<T, R> implements Observable.Operator<T, T> {

    private final Observable<? extends R> other;

    public OperatorSubscribeUntil(final Observable<? extends R> other) {
        this.other = other;
    }

    @Override
    public Subscriber<? super T> call(final Subscriber<? super T> child) {
        boolean pitfall = true; // FIXME: operator pitfalls: don't unsubscribe the downstream
        final Subscriber<T> serial = new SerializedSubscriber<T>(child, pitfall);

        final Subscriber<T> main = new Subscriber<T>(serial, false) {
            @Override
            public void onNext(T t) {
                serial.onNext(t);
            }
            @Override
            public void onError(Throwable e) {
                try {
                    serial.onError(e);
                } finally {
                    serial.unsubscribe();
                }
            }
            @Override
            public void onCompleted() {
                try {
                    serial.onCompleted();
                } finally {
                    serial.unsubscribe();
                }
            }
        };

        final Subscriber<R> so = new Subscriber<R>() {
            @Override
            public void onStart() {
                request(Long.MAX_VALUE);
            }

            @Override
            public void onCompleted() {
                serial.unsubscribe();
            }

            @Override
            public void onError(Throwable e) {
                main.onError(e);
            }

            @Override
            public void onNext(R t) {
                onCompleted();
            }

        };

        serial.add(main);
        serial.add(so);

        child.add(serial);

        other.unsafeSubscribe(so);

        return main;
    }
}


text:
package com.huawei.agilete.data;

import java.io.File;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Properties;

import com.huawei.agilete.base.bean.OpsServer;
import com.huawei.agilete.base.common.ReadConfig;
import com.huawei.agilete.base.servlet.util.RestUtil;
import com.huawei.agilete.northinterface.bean.OTDevice;
import com.huawei.agilete.northinterface.dao.OTTfDAO;
import com.huawei.networkos.ops.builders.BuildController;

public class MyData {

    //域的画线信息   xc
    public static String links;

    public static final String XmlHead = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>";

    public static BuildController TaskMainControl;
    public static BuildController TaskChildControl;

    private static String CassandraPath;
    private static String CassandraServer;
    private static String CassandraPort;
    private static String CassandraKeyspace;
    private static String CassandraUserName;
	private static String CassandraPassWd;

    private static String OpsUrl;

    private static String AlarmServerIp;
    private static String AlarmServerPort;

    //ops模板
    private static String TempleTunnel;
    private static String TempleTunnelPath;
    private static String TempleVlan;
    private static String TempleFlow;
    private static String TempleBfd;
    private static String TemplePolicy;

    //UI模板
    private static String UiTempleTunnel;
    private static String UiTempleFlow;
    private static String UiTempleVlanMapping;
    private static String UiTempleBfd;
    private static String UiTemplePolicy;
    private static String UiTempleVlan;

    public static HashMap<String, String> DomainsData;
    public static HashMap<String, OTDevice> DevicesData = new HashMap<String, OTDevice>(); //include ifm
    public static String explicitPathData;
    public static String ersvpTeTunnelData;
    public static String vpwsInstanceData;
    public static String vlanData;

    public static int serverSocketPort;

    public static String CurDomains; //当前管理域

    public static StringBuffer longging;

    public static HashMap<String, Boolean> InitState = new HashMap<String, Boolean>();

    public static String SimulantData;

    public static enum RestType{
        GET,
        POST,
        PUT,
        DELETE,
        GETOTHER
    }

    //缓存数据
    //tunnelTree
    public static HashMap<String,String> tunnelTree = new HashMap<String, String>();

    public static HashMap<String,Integer> AllDevices = new HashMap<String, Integer>();

    private static List<String[]> stat;

    //客户端对应的验证码,用来存储每个客户端对应的验证码
    private static HashMap<String,String> clientVerifyCode;
    private static HashMap<String,String> clientLoginInfo;
    public synchronized static HashMap<String,String> getClientVerifyCode() {
        if (clientVerifyCode == null) {
            clientVerifyCode = new HashMap<String,String>();
        }
        return clientVerifyCode;
    }

    public synchronized static HashMap<String,String> getClientLoginInfo() {
        if (clientLoginInfo == null) {
            clientLoginInfo = new HashMap<String,String>();
        }
        return clientLoginInfo;
    }

    public MyData(){

        ReadConfig r  =new ReadConfig();
        CassandraPath = r.get().getProperty("CassandraPath");
        CassandraServer = r.get().getProperty("CassandraServer");
        CassandraPort = r.get().getProperty("CassandraPort");
        CassandraKeyspace = r.get().getProperty("CassandraKeyspace");
        CassandraUserName = r.get().getProperty("CassandraName");
		CassandraPassWd = r.get().getProperty("CassandraPw");
        OpsUrl = r.get().getProperty("OpsUrl");

        AlarmServerIp = r.get().getProperty("AlarmServerIp");
        AlarmServerPort = r.get().getProperty("AlarmServerPort");

        SimulantData = r.get().getProperty("SimulantData");

    }

    public static String getCassandraUserName() {
		if(null == CassandraUserName){
			ReadConfig r  =new ReadConfig();
			CassandraUserName = r.get().getProperty("CassandraName");
		}
		return CassandraUserName;
	}

	public static String getCassandraPassWd() {
		if(null == CassandraPassWd){
			ReadConfig r  =new ReadConfig();
			CassandraPassWd = r.get().getProperty("CassandraPw");
		}
		return CassandraPassWd;
	}
    public static String getCassandraPath() {
        if(null == CassandraPath){
            ReadConfig r  =new ReadConfig();
            CassandraPath = r.get().getProperty("CassandraPath");
        }
        return CassandraPath;
    }
    public static void setCassandraPath(String cassandraPath) {
        CassandraPath = cassandraPath;
    }
    public static String getCassandraServer() {
        if(null == CassandraServer){
            ReadConfig r  =new ReadConfig();
            CassandraServer = r.get().getProperty("CassandraServer");
        }
        return CassandraServer;
    }
    public static void setCassandraServer(String cassandraServer) {
        CassandraServer = cassandraServer;
    }
    public static String getCassandraPort() {
        if(null == CassandraPort){
            ReadConfig r  =new ReadConfig();
            CassandraPort = r.get().getProperty("CassandraPort");
        }
        return CassandraPort;
    }
    public static void setCassandraPort(String cassandraPort) {
        CassandraPort = cassandraPort;
    }
    public static String getCassandraKeyspace() {
        if(null == CassandraKeyspace){
            ReadConfig r  =new ReadConfig();
            CassandraKeyspace = r.get().getProperty("CassandraKeyspace");
        }
        return CassandraKeyspace;
    }
    public static void setCassandraKeyspace(String cassandraKeyspace) {
        CassandraKeyspace = cassandraKeyspace;
    }
    public static String getOpsUrl() {
        if(null == OpsUrl){
            ReadConfig r  =new ReadConfig();
            OpsUrl = r.get().getProperty("OpsUrl");
        }
        return OpsUrl;
    }
    public static void setOpsUrl(String opsUrl) {
        OpsUrl = opsUrl;
    }
    public static String getTempleTunnel() {
        if(null == TempleTunnel){
            //TempleTunnel = "<tunnelName>$tunnelName</tunnelName><mplsTunnelIndex>$mplsTunnelIndex</mplsTunnelIndex><interfaceName>$interfaceName</interfaceName><mplsTunnelIngressLSRId>$mplsTunnelIngressLSRId</mplsTunnelIngressLSRId><mplsTunnelEgressLSRId>$mplsTunnelEgressLSRId</mplsTunnelEgressLSRId> <tunnelState>$tunnelState</tunnelState><hotStandbyWtr>$hotStandbyWtr</hotStandbyWtr> <hotStandbyEnable>$hotStandbyEnable</hotStandbyEnable><mplsTunnelRecordRoute>RECORD_LABLE</mplsTunnelRecordRoute><foreach_tunnelPathsList><tunnelPaths><foreach_tunnelPath><tunnelPath><pathType>$pathType</pathType><includeAll>0x0</includeAll><includeAny>0x0</includeAny><excludeAny>0x0</excludeAny><hopLimit>32</hopLimit><lspId>0</lspId><modifyLspId>0</modifyLspId><explicitPathName>$explicitPathName</explicitPathName></tunnelPath></foreach_tunnelPath></tunnelPaths></foreach_tunnelPathsList>";
            ReadConfig r  =new ReadConfig();
            TempleTunnel = r.getTemple("TempleTunnel.tpl");
        }
        return TempleTunnel;
    }
    public static void setTempleTunnel(String templeTunnel) {
        TempleTunnel = templeTunnel;
    }
    public static String getTempleTunnelPath() {
        if(null == TempleTunnelPath){
            //TempleTunnelPath = "<explicitPathName>$explicitPathName</explicitPathName><foreach_explicitPathHopsList><explicitPathHops><foreach_explicitPathHop><explicitPathHop><mplsTunnelHopIndex>$mplsTunnelHopIndex</mplsTunnelHopIndex><mplsTunnelHopType>includeStrict</mplsTunnelHopType><mplsTunnelHopIntType>default</mplsTunnelHopIntType><mplsTunnelHopAddrType>IPV4</mplsTunnelHopAddrType><mplsTunnelHopIpAddr>$mplsTunnelHopIpAddr</mplsTunnelHopIpAddr></explicitPathHop></foreach_explicitPathHop></explicitPathHops><foreach_explicitPathHopsList>";
            ReadConfig r  =new ReadConfig();
            TempleTunnelPath = r.getTemple("TempleExplicitPath.tpl");
        }
        return TempleTunnelPath;
    }
    public static void setTempleTunnelPath(String templeTunnelPath) {
        TempleTunnelPath = templeTunnelPath;
    }
    public static String getUiTempleTunnel() {
        if(null == UiTempleTunnel){
            ReadConfig r  =new ReadConfig();
            UiTempleTunnel = r.getTemple("UiTempleTunnel.tpl");
        }
        return UiTempleTunnel;
    }
    public static void setUiTempleTunnel(String uiTempleTunnel) {
        UiTempleTunnel = uiTempleTunnel;
    }
    public static String getTempleFlow() {
        if(null == TempleFlow){
            ReadConfig r  =new ReadConfig();
            TempleFlow = r.getTemple("TempleFlow.tpl");
        }
        return TempleFlow;
    }
    public static void setTempleFlow(String templeFlow) {
        TempleFlow = templeFlow;
    }
    public static String getUiTempleFlow() {
        if(null == UiTempleFlow){
            ReadConfig r  =new ReadConfig();
            UiTempleFlow = r.getTemple("UiTempleFlow.tpl");
        }
        return UiTempleFlow;
    }
    public static void setUiTempleFlow(String uiTempleFlow) {
        UiTempleFlow = uiTempleFlow;
    }
    public static void setTempleVlan(String templeVlan) {
        TempleVlan = templeVlan;
    }
    public static String getTempleVlan() {
        if(null == TempleVlan){
            ReadConfig r  =new ReadConfig();
            TempleVlan = r.getTemple("TempleVlan.tpl");
        }
        return TempleVlan;
    }
    public static String getUiTempleVlanMapping() {
        if(null == UiTempleVlanMapping){
            ReadConfig r  =new ReadConfig();
            UiTempleVlanMapping = r.getTemple("UiTempleVlanMapping.tpl");
        }
        return UiTempleVlanMapping;
    }
    public static void setUiTempleVlanMapping(String uiTempleVlanMapping) {
        UiTempleVlanMapping = uiTempleVlanMapping;
    }
    public static String getTempleBfd() {
        if(null == TempleBfd){
            ReadConfig r  =new ReadConfig();
            TempleBfd = r.getTemple("TempleBfd.tpl");
        }
        return TempleBfd;
    }
    public static void setTempleBfd(String templeBfd) {
        TempleBfd = templeBfd;
    }
    public static String getUiTempleBfd() {
        if(null == UiTempleBfd){
            ReadConfig r  =new ReadConfig();
            UiTempleBfd = r.getTemple("UiTempleBfd.tpl");
        }
        return UiTempleBfd;
    }
    public static void setUiTempleBfd(String uiTempleBfd) {
        UiTempleBfd = uiTempleBfd;
    }
    public static String getTemplePolicy() {
        if(null == TemplePolicy){
            ReadConfig r  =new ReadConfig();
            TemplePolicy = r.getTemple("TemplePolicy.tpl");
        }
        return TemplePolicy;
    }
    public static void setTemplePolicy(String templePolicy) {
        TemplePolicy = templePolicy;
    }
    public static String getUiTemplePolicy() {
        if(null == UiTemplePolicy){
            ReadConfig r  =new ReadConfig();
            UiTemplePolicy = r.getTemple("UiTemplePolicy.tpl");
        }
        return UiTemplePolicy;
    }
    public static void setUiTemplePolicy(String uiTemplePolicy) {
        UiTemplePolicy = uiTemplePolicy;
    }
    public static String getUiTempleVlan() {
        if(null == UiTempleVlan){
            ReadConfig r  =new ReadConfig();
            UiTempleVlan = r.getTemple("UiTempleVlan.tpl");
        }
        return UiTempleVlan;
    }
    public static void setUiTempleVlan(String uiTempleVlan) {
        UiTempleVlan = uiTempleVlan;
    }
    public static HashMap<String,String> getTunnelTree() {
        return tunnelTree;
    }
    public static void setTunnelTree(HashMap<String,String> tunnelTree) {
        MyData.tunnelTree = tunnelTree;
    }
    public static int getServerSocketPort() {
        if(0 == serverSocketPort){
            ReadConfig r  =new ReadConfig();
            try{
                serverSocketPort = Integer.parseInt(r.get().getProperty("ServerSocketPort"));
            }catch(Exception e){
                serverSocketPort = 9003;
            }
        }
        return serverSocketPort;
    }
    public static void setServerSocketPort(int serverSocketPort) {
        serverSocketPort = serverSocketPort;
    }
    public static String getAlarmServerIp() {
        if(null == AlarmServerIp){
            ReadConfig r  =new ReadConfig();
            AlarmServerIp = r.get().getProperty("AlarmServerIp");
        }
        return AlarmServerIp;
    }
    public static void setAlarmServerIp(String alarmServerIp) {
        AlarmServerIp = alarmServerIp;
    }
    public static String getAlarmServerPort() {
        if(null == AlarmServerPort){
            ReadConfig r  =new ReadConfig();
            AlarmServerPort = r.get().getProperty("AlarmServerPort");
        }
        return AlarmServerPort;
    }
    public static void setAlarmServerPort(String alarmServerPort) {
        AlarmServerPort = alarmServerPort;
    }
    public static String getSimulantData() {
        if(null == SimulantData){
            ReadConfig r  =new ReadConfig();
            SimulantData = r.get().getProperty("SimulantData");
        }
        return SimulantData;
    }
    public static void setSimulantData(String simulantData) {
        SimulantData = simulantData;
    }
    public static List<String[]> getStat() {
        if(null == stat){
            MyData.setStat(OTTfDAO.getInstance().getStat());
        }
        return stat;
    }
    public static void setStat(List<String[]> stat) {
        MyData.stat = stat;
    }

    public static String[] getIps() {
        String[] ips = null;
        ReadConfig r  =new ReadConfig();
        String statPath = r.getPath().append("conf\\ips.ini").toString();
        File file = new File(statPath);

        String content = "";
        try {
            content = RestUtil.readFile2(file);
        } catch (Exception e) {
            return null;
        }
        if(!"".equals(content)&&null!=content){
            ips = content.split("\n");
        }
        return ips;
    }

    public static List<OpsServer> getOpsServers() {
            List<OpsServer> OpsServers = new ArrayList<OpsServer>();
            ReadConfig r  =new ReadConfig();
            Properties p = r.get();
            if(null!=r&&null!=p){
            String[] ips = p.getProperty("OpsServerIp").split(",");
            String[] ports = p.getProperty("OpsServerPort").split(",");
            String[] protocols= p.getProperty("OpsProtocol").split(",");
            String[] userNames= p.getProperty("OpsUserName").split(",");
            String[] pws = p.getProperty("OpsPw").split(",");
            for(int i = 0;i<ips.length;i++){
                OpsServer opsServer = new OpsServer();
                if(null!=ips[i]&&!"".equals(ips[i])){
                    opsServer.setServerIp(ips[i]);
                }
                if(null!=ports[i]&&!"".equals(ports[i])){
                    opsServer.setPort(Integer.parseInt(ports[i]));
                }
                if(null!=protocols[i]&&!"".equals(protocols[i])){
                    opsServer.setProtocol(protocols[i]);
                }
                if(null!=userNames[i]&&!"".equals(userNames[i])){
                    opsServer.setUserName(userNames[i]);
                }
                if(null!=ips[i]&&!"".equals(ips[i])){
                    opsServer.setPasswd(pws[i]);
                }
                OpsServers.add(opsServer);
            }

        }
        return OpsServers;
    }

}


text:
/* Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.camunda.bpm.engine.rest.sub.history;

import javax.ws.rs.DELETE;
import javax.ws.rs.GET;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;

import org.camunda.bpm.engine.rest.dto.history.batch.HistoricBatchDto;

public interface HistoricBatchResource {

  @GET
  @Produces(MediaType.APPLICATION_JSON)
  HistoricBatchDto getHistoricBatch();

  @DELETE
  void deleteHistoricBatch();

}


text:
export const mapJobs = (payload) => {
  return ((payload && payload.jobListItem) || []).map((item) => {
    return Immutable.fromJS(item);
  });
};

export const mapDatasetsJobs = (payload) => {
  return (
    payload &&
    payload.jobListItem.map((item) => {
      return item.jobAttempt.info.dataset;
    })
  );
};


text:
//
//  UpView.m
//  SwipeWithTouchesEvent
//
//  Created by 양 원석 on 2013. 7. 25..
//  Copyright (c) 2013년 양 원석. All rights reserved.
//

#import "UpView.h"

@interface UpView()

@property (assign, nonatomic) CGFloat deltaX;

@end

@implementation UpView

- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
    }
    return self;
}

- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{
    UITouch *touch = [touches anyObject];
	CGPoint location = [touch locationInView:self.superview];
	_deltaX = location.x;
}

- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event{

    UITouch *touch = [touches anyObject];
    CGPoint location = [touch locationInView:self.superview];
    CGFloat deltaX = location.x+self.frame.origin.x-_deltaX;

    if (deltaX<0) deltaX =0;
    if (deltaX>200) deltaX = 200;

    [self setTransform:CGAffineTransformTranslate(CGAffineTransformIdentity, deltaX, 0.0)];
}

- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event{
    _deltaX = 0;
}
- (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event{

}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect
{
    // Drawing code
}
*/

@end


text:
package com.intellij.psi.impl;

import com.intellij.openapi.util.Pair;
import com.intellij.psi.*;
import com.intellij.psi.impl.source.HierarchicalMethodSignatureImpl;
import com.intellij.psi.search.searches.DeepestSuperMethodsSearch;
import com.intellij.psi.search.searches.SuperMethodsSearch;
import com.intellij.psi.util.*;
import com.intellij.util.NotNullFunction;
import com.intellij.util.SmartList;
import gnu.trove.THashMap;
import gnu.trove.THashSet;
import gnu.trove.TObjectHashingStrategy;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.util.*;

public class PsiSuperMethodImplUtil {
  private static final PsiCacheKey<Map<MethodSignature, HierarchicalMethodSignature>, PsiClass> SIGNATURES_KEY = PsiCacheKey
    .create("SIGNATURES_KEY", new NotNullFunction<PsiClass, Map<MethodSignature, HierarchicalMethodSignature>>() {
      @NotNull
      @Override
      public Map<MethodSignature, HierarchicalMethodSignature> fun(PsiClass dom) {
        return buildMethodHierarchy(dom, PsiSubstitutor.EMPTY, true, new THashSet<PsiClass>(), false);
      }
    });

  private PsiSuperMethodImplUtil() {
  }

  @NotNull
  public static PsiMethod[] findSuperMethods(PsiMethod method) {
    return findSuperMethods(method, null);
  }

  @NotNull
  public static PsiMethod[] findSuperMethods(PsiMethod method, boolean checkAccess) {
    if (!canHaveSuperMethod(method, checkAccess, false)) return PsiMethod.EMPTY_ARRAY;
    return findSuperMethodsInternal(method, null);
  }

  @NotNull
  public static PsiMethod[] findSuperMethods(PsiMethod method, PsiClass parentClass) {
    if (!canHaveSuperMethod(method, true, false)) return PsiMethod.EMPTY_ARRAY;
    return findSuperMethodsInternal(method, parentClass);
  }

  @NotNull
  private static PsiMethod[] findSuperMethodsInternal(PsiMethod method, PsiClass parentClass) {
    List<MethodSignatureBackedByPsiMethod> outputMethods = findSuperMethodSignatures(method, parentClass, false);

    return MethodSignatureUtil.convertMethodSignaturesToMethods(outputMethods);
  }

  @NotNull
  public static List<MethodSignatureBackedByPsiMethod> findSuperMethodSignaturesIncludingStatic(PsiMethod method,
                                                                                boolean checkAccess) {
    if (!canHaveSuperMethod(method, checkAccess, true)) return Collections.emptyList();
    return findSuperMethodSignatures(method, null, true);
  }

  @NotNull
  private static List<MethodSignatureBackedByPsiMethod> findSuperMethodSignatures(PsiMethod method,
                                                                                PsiClass parentClass,
                                                                                boolean allowStaticMethod) {

    return new ArrayList<MethodSignatureBackedByPsiMethod>(SuperMethodsSearch.search(method, parentClass, true, allowStaticMethod).findAll());
  }

  private static boolean canHaveSuperMethod(PsiMethod method, boolean checkAccess, boolean allowStaticMethod) {
    if (method.isConstructor()) return false;
    if (!allowStaticMethod && method.hasModifierProperty(PsiModifier.STATIC)) return false;
    if (checkAccess && method.hasModifierProperty(PsiModifier.PRIVATE)) return false;
    PsiClass parentClass = method.getContainingClass();
    return parentClass != null && !"java.lang.Object".equals(parentClass.getQualifiedName());
  }

  @Nullable
  public static PsiMethod findDeepestSuperMethod(PsiMethod method) {
    if (!canHaveSuperMethod(method, true, false)) return null;
    return DeepestSuperMethodsSearch.search(method).findFirst();
  }

  public static PsiMethod[] findDeepestSuperMethods(PsiMethod method) {
    if (!canHaveSuperMethod(method, true, false)) return PsiMethod.EMPTY_ARRAY;
    Collection<PsiMethod> collection = DeepestSuperMethodsSearch.search(method).findAll();
    return collection.toArray(new PsiMethod[collection.size()]);
  }

  private static Map<MethodSignature, HierarchicalMethodSignature> buildMethodHierarchy(PsiClass aClass,
                                                                                PsiSubstitutor substitutor,
                                                                                final boolean includePrivates,
                                                                                final Set<PsiClass> visited,
                                                                                boolean isInRawContext) {
    Map<MethodSignature, HierarchicalMethodSignature> result = new LinkedHashMap<MethodSignature, HierarchicalMethodSignature>();
    final Map<MethodSignature, List<PsiMethod>> sameParameterErasureMethods = new THashMap<MethodSignature, List<PsiMethod>>(MethodSignatureUtil.METHOD_PARAMETERS_ERASURE_EQUALITY);

    Map<MethodSignature, HierarchicalMethodSignatureImpl> map = new THashMap<MethodSignature, HierarchicalMethodSignatureImpl>(new TObjectHashingStrategy<MethodSignature>() {
      public int computeHashCode(MethodSignature signature) {
        return MethodSignatureUtil.METHOD_PARAMETERS_ERASURE_EQUALITY.computeHashCode(signature);
      }

      public boolean equals(MethodSignature o1, MethodSignature o2) {
        if (!MethodSignatureUtil.METHOD_PARAMETERS_ERASURE_EQUALITY.equals(o1, o2)) return false;
        List<PsiMethod> list = sameParameterErasureMethods.get(o1);
        boolean toCheckReturnType = list != null && list.size() > 1;
        if (!toCheckReturnType) return true;
        PsiType returnType1 = ((MethodSignatureBackedByPsiMethod)o1).getMethod().getReturnType();
        PsiType returnType2 = ((MethodSignatureBackedByPsiMethod)o2).getMethod().getReturnType();
        if (returnType1 == null && returnType2 == null) return true;
        if (returnType1 == null || returnType2 == null) return false;

        PsiType erasure1 = TypeConversionUtil.erasure(o1.getSubstitutor().substitute(returnType1));
        PsiType erasure2 = TypeConversionUtil.erasure(o2.getSubstitutor().substitute(returnType2));
        return erasure1.equals(erasure2);
      }
    });

    for (PsiMethod method : aClass.getMethods()) {
      if (!includePrivates && method.hasModifierProperty(PsiModifier.PRIVATE)) continue;
      final MethodSignatureBackedByPsiMethod signature = MethodSignatureBackedByPsiMethod.create(method, substitutor, isInRawContext);
      HierarchicalMethodSignatureImpl newH = new HierarchicalMethodSignatureImpl(signature);

      List<PsiMethod> list = sameParameterErasureMethods.get(signature);
      if (list == null) {
        list = new SmartList<PsiMethod>();
        sameParameterErasureMethods.put(signature, list);
      }
      list.add(method);

      result.put(signature, newH);
      map.put(signature, newH);
    }

    for (PsiClassType superType : aClass.getSuperTypes()) {
      PsiClassType.ClassResolveResult superTypeResolveResult = superType.resolveGenerics();
      PsiClass superClass = superTypeResolveResult.getElement();
      if (superClass == null) continue;
      if (!visited.add(superClass)) continue; // cyclic inheritance
      final PsiSubstitutor superSubstitutor = superTypeResolveResult.getSubstitutor();
      PsiSubstitutor finalSubstitutor = obtainFinalSubstitutor(superClass, superSubstitutor, substitutor, isInRawContext);

      final boolean isInRawContextSuper = (isInRawContext || PsiUtil.isRawSubstitutor(superClass, superSubstitutor)) && superClass.getTypeParameters().length != 0;
      Map<MethodSignature, HierarchicalMethodSignature> superResult = buildMethodHierarchy(superClass, finalSubstitutor, false, visited, isInRawContextSuper);
      visited.remove(superClass);

      List<Pair<MethodSignature, HierarchicalMethodSignature>> flattened = new ArrayList<Pair<MethodSignature, HierarchicalMethodSignature>>();
      for (Map.Entry<MethodSignature, HierarchicalMethodSignature> entry : superResult.entrySet()) {
        HierarchicalMethodSignature hms = entry.getValue();
        MethodSignature signature = entry.getKey();
        PsiClass containingClass = hms.getMethod().getContainingClass();
        List<HierarchicalMethodSignature> supers = new ArrayList<HierarchicalMethodSignature>(hms.getSuperSignatures());
        for (HierarchicalMethodSignature aSuper : supers) {
          PsiClass superContainingClass = aSuper.getMethod().getContainingClass();
          if (containingClass != null && superContainingClass != null && !containingClass.isInheritor(superContainingClass, true)) {
            // methods must be inherited from unrelated classes, so flatten hierarchy here
            // class C implements SAM1, SAM2 { void methodimpl() {} }
            //hms.getSuperSignatures().remove(aSuper);
            flattened.add(new Pair<MethodSignature, HierarchicalMethodSignature>(signature, aSuper));
          }
        }
        putInMap(aClass, result, map, hms, signature);
      }
      for (Pair<MethodSignature, HierarchicalMethodSignature> pair : flattened) {
        putInMap(aClass, result, map, pair.second, pair.first);
      }
    }

    for (Map.Entry<MethodSignature, HierarchicalMethodSignatureImpl> entry : map.entrySet()) {
      HierarchicalMethodSignatureImpl hierarchicalMethodSignature = entry.getValue();
      MethodSignature methodSignature = entry.getKey();
      if (result.get(methodSignature) == null && PsiUtil.isAccessible(hierarchicalMethodSignature.getMethod(), aClass, aClass)) {
        result.put(methodSignature, hierarchicalMethodSignature);
      }
    }

    return result;
  }

  private static void putInMap(PsiClass aClass, Map<MethodSignature, HierarchicalMethodSignature> result,
                           Map<MethodSignature, HierarchicalMethodSignatureImpl> map, HierarchicalMethodSignature hierarchicalMethodSignature,
                           MethodSignature signature) {
    if (!PsiUtil.isAccessible(hierarchicalMethodSignature.getMethod(), aClass, aClass)) return;
    HierarchicalMethodSignatureImpl existing = map.get(signature);
    if (existing == null) {
      map.put(signature, copy(hierarchicalMethodSignature));
    }
    else if (isReturnTypeIsMoreSpecificThan(hierarchicalMethodSignature, existing) && isSuperMethod(aClass, hierarchicalMethodSignature, existing)) {
      HierarchicalMethodSignatureImpl newSuper = copy(hierarchicalMethodSignature);
      mergeSupers(newSuper, existing);
      map.put(signature, newSuper);
    }
    else if (isSuperMethod(aClass, existing, hierarchicalMethodSignature)) {
      mergeSupers(existing, hierarchicalMethodSignature);
    }
    // just drop an invalid method declaration there - to highlight accordingly
    else if (!result.containsKey(signature)) {
      result.put(signature, hierarchicalMethodSignature);
    }
  }

  private static boolean isReturnTypeIsMoreSpecificThan(@NotNull HierarchicalMethodSignature thisSig, @NotNull HierarchicalMethodSignature thatSig) {
    PsiType thisRet = thisSig.getMethod().getReturnType();
    PsiType thatRet = thatSig.getMethod().getReturnType();
    return thatRet != null && thisRet != null && !thatRet.equals(thisRet) && TypeConversionUtil.isAssignable(thatRet, thisRet);
  }

  private static void mergeSupers(final HierarchicalMethodSignatureImpl existing, final HierarchicalMethodSignature superSignature) {
    for (HierarchicalMethodSignature existingSuper : existing.getSuperSignatures()) {
      if (existingSuper.getMethod() == superSignature.getMethod()) {
        for (HierarchicalMethodSignature signature : superSignature.getSuperSignatures()) {
          mergeSupers((HierarchicalMethodSignatureImpl)existingSuper, signature);
        }
        return;
      }
    }
    if (existing.getMethod() == superSignature.getMethod()) {
      List<HierarchicalMethodSignature> existingSupers = existing.getSuperSignatures();
      for (HierarchicalMethodSignature supers : superSignature.getSuperSignatures()) {
        if (!existingSupers.contains(supers)) existing.addSuperSignature(copy(supers));
      }
    }
    else {
      HierarchicalMethodSignatureImpl copy = copy(superSignature);
      existing.addSuperSignature(copy);
    }
  }

  private static boolean isSuperMethod(PsiClass aClass,
                                       HierarchicalMethodSignature hierarchicalMethodSignature,
                                       HierarchicalMethodSignature superSignatureHierarchical) {
    PsiMethod superMethod = superSignatureHierarchical.getMethod();
    PsiClass superClass = superMethod.getContainingClass();
    PsiClass containingClass = hierarchicalMethodSignature.getMethod().getContainingClass();
    return !superMethod.isConstructor()
           && !aClass.equals(superClass)
           && PsiUtil.isAccessible(superMethod, aClass, aClass)
           && MethodSignatureUtil.isSubsignature(superSignatureHierarchical, hierarchicalMethodSignature)
           && superClass != null
           && (containingClass != null && containingClass.isInterface() == superClass.isInterface() || superClass.isInterface() || "java.lang.Object".equals(superClass.getQualifiedName()))
      ;
  }

  private static HierarchicalMethodSignatureImpl copy(HierarchicalMethodSignature hi) {
    HierarchicalMethodSignatureImpl hierarchicalMethodSignature = new HierarchicalMethodSignatureImpl(hi);
    for (HierarchicalMethodSignature his : hi.getSuperSignatures()) {
      hierarchicalMethodSignature.addSuperSignature(copy(his));
    }
    return hierarchicalMethodSignature;
  }

  private static PsiSubstitutor obtainFinalSubstitutor(PsiClass superClass,
                                                       PsiSubstitutor superSubstitutor,
                                                       PsiSubstitutor derivedSubstitutor, boolean inRawContext) {
    if (inRawContext) {
      superSubstitutor = JavaPsiFacadeEx.getElementFactory(superClass.getProject()).createRawSubstitutor(derivedSubstitutor, superSubstitutor.getSubstitutionMap().keySet().toArray(PsiTypeParameter.EMPTY_ARRAY));
    }
    Map<PsiTypeParameter, PsiType> map = null;
    for (PsiTypeParameter typeParameter : PsiUtil.typeParametersIterable(superClass)) {
      PsiType type = superSubstitutor.substitute(typeParameter);
      final PsiType t = derivedSubstitutor.substitute(type);
      if (map == null) {
        map = new THashMap<PsiTypeParameter, PsiType>();
      }
      map.put(typeParameter, t);
    }

    return map == null ? PsiSubstitutor.EMPTY : JavaPsiFacade.getInstance(superClass.getProject()).getElementFactory().createSubstitutor(map);
  }

  public static Collection<HierarchicalMethodSignature> getVisibleSignatures(PsiClass aClass) {
    Map<MethodSignature, HierarchicalMethodSignature> map = getSignaturesMap(aClass);
    return map.values();
  }

  @NotNull public static HierarchicalMethodSignature getHierarchicalMethodSignature(PsiMethod method) {
    PsiClass aClass = method.getContainingClass();
    HierarchicalMethodSignature result = null;
    if (aClass != null) {
      result = getSignaturesMap(aClass).get(method.getSignature(PsiSubstitutor.EMPTY));
    }
    if (result == null) {
      result = new HierarchicalMethodSignatureImpl((MethodSignatureBackedByPsiMethod)method.getSignature(PsiSubstitutor.EMPTY));
    }
    return result;
  }

  private static Map<MethodSignature, HierarchicalMethodSignature> getSignaturesMap(final PsiClass aClass) {
    return SIGNATURES_KEY.getValue(aClass);
  }
}


text:
import React from 'react';
import { TextInput, Text, View } from 'react-native';
import styles from './styles';

const FormField = props => (
      <View style={styles.container}>
        <Text style={styles.label}>
          {props.label}
        </Text>
        <TextInput
            style={styles.input}
            autoCorrect={false}
            {...props}
        />
      </View>
);

export default FormField;


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace CSharp.Models {
  public class NewDishWish {
    public int ClientId { get; set; }
    public int DishId { get; set; }
    public int Feeling { get; set; }
    public string ModifiedBy { get; set; }
  }
}


text:
require File.expand_path("../../test_helper", __dir__)

module Teams
  # :stopdoc:
  class TeamTest < ActiveSupport::TestCase
    test "find by name or alias or create" do
      # Add person alias with team name to expose bug
      person = FactoryBot.create(:person)
      person.aliases.create!(name: "Gentile Lovers")
      person.aliases.create!(name: "Gentle Lovers")

      gentle_lovers = FactoryBot.create(:team, name: "Gentle Lovers")
      gentle_lovers.aliases.create!(name: "Gentile Lovers")
      assert_equal(gentle_lovers, Team.find_by_name_or_alias_or_create("Gentle Lovers"), "Gentle Lovers")
      assert_equal(gentle_lovers, Team.find_by_name_or_alias_or_create("Gentile Lovers"), "Gentle Lovers alias")
      assert_nil(Team.find_by_name_or_alias("Health Net"), "Health Net should not exist")
      team = Team.find_by_name_or_alias_or_create("Health Net")
      assert_not_nil(team, "Health Net")
      assert_equal("Health Net", team.name, "New team")
    end

    test "find by name or alias" do
      # new
      name = "Brooklyn Cycling Force"
      assert_nil(Team.find_by(name: name), "#{name} should not exist")
      team = Team.find_by_name_or_alias(name)
      assert_nil(Team.find_by(name: name), "#{name} should not exist")
      assert_nil(team, "#{name} should not exist")

      # exists
      Team.create(name: name)
      team = Team.find_by_name_or_alias(name)
      assert_not_nil(team, "#{name} should exist")
      assert_equal(name, team.name, "name")

      # alias
      Alias.create(name: "BCF", team: team)
      team = Team.find_by_name_or_alias("BCF")
      assert_not_nil(team, "#{name} should exist")
      assert_equal(name, team.name, "name")

      team = Team.find_by_name_or_alias(name)
      assert_not_nil(team, "#{name} should exist")
      assert_equal(name, team.name, "name")
    end

    test "find all by name like" do
      vanilla = FactoryBot.create(:team, name: "Vanilla")
      vanilla.aliases.create!(name: "Vanilla Bicycles")
      assert_same_elements [vanilla], Team.name_like("Vanilla"), "Vanilla"
      assert_same_elements [vanilla], Team.name_like("Vanilla Bicycles"), "Vanilla Bicycles"
      assert_same_elements [vanilla], Team.name_like("van"), "van"
      assert_same_elements [vanilla], Team.name_like("cyc"), "cyc"

      steelman = Team.create!(name: "Steelman Cycles")
      assert_same_elements [steelman, vanilla], Team.name_like("cycles"), "cycles"
    end

    test "create dupe" do
      FactoryBot.create(:team, name: "Vanilla")
      dupe = Team.new(name: "Vanilla")
      assert_not dupe.valid?, "Dupe Vanilla should not be valid"
    end

    test "delete updated by" do
      team = FactoryBot.create(:team)
      person = FactoryBot.create(:person, name: "Admin")
      team.updater = person
      team.name = "7-11"
      team.save!
      assert_equal "Admin", team.updated_by_name, "updated_by_name"

      person.destroy
      assert_not Person.exists?(person.id), "Updater Person should be destroyed"

      assert_equal "Admin", team.updated_by_name, "updated_by_name"
    end
  end
end


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AIFH_Vol2.Core.Learning
{
    /// <summary>
    /// Defines a MLMethod that can hold context.  This allows the context to be
    /// cleared.  Examples of MLMethod objects that support this are NEAT,
    /// Elmann and Jordan.
    /// </summary>
    public interface IMLContext
    {
        /// <summary>
        /// Clear the context.
        /// </summary>
        void ClearContext();
    }
}


text:
title: Deeplearning4j Model Zoo
layout: default
---

# DL4J Model Zoo

Similar to Caffe's model zoo, this repository provides common model configurations. Currently, it contains computer vision configurations:

* [AlexNet](https://github.com/deeplearning4j/dl4j-model-z/blob/master/src/main/java/org/deeplearning4j/AlexNet.java)
* [LeNet](https://github.com/deeplearning4j/dl4j-model-z/blob/master/src/main/java/org/deeplearning4j/LeNet.java)
* [VGGNetA](https://github.com/deeplearning4j/dl4j-model-z/blob/master/src/main/java/org/deeplearning4j/VGGNetA.java)
* [VGGNetD](https://github.com/deeplearning4j/dl4j-model-z/blob/master/src/main/java/org/deeplearning4j/VGGNetD.java)
* [GoogleLeNet](https://github.com/deeplearning4j/dl4j-model-z/blob/master/src/main/java/org/deeplearning4j/GoogleLeNet.java)

The configurations will give you a headstart when creating models for image recognition. The plans are to also add pretrained models to our model zoo, and we welcome contributions.


text:
<!DOCTYPE html>

	<meta charset="UTF-8" />
	<title>Slider Visual Test : Slider option range 'min'</title>
	<link rel="stylesheet" href="../visual.css" type="text/css" />
	<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">


text:
<!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">
    <meta name="description" content="Web-page describibing the VENu mobile app for understanding neutrino physics.">
    <meta name="author" content="Marco Del Tutto">

    <title>VENu</title>

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

    <link href="vendor/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
    <link href="https://fonts.googleapis.com/css?family=Lora:400,700,400italic,700italic" rel="stylesheet" type="text/css">
    <link href="https://fonts.googleapis.com/css?family=Montserrat:400,700" rel="stylesheet" type="text/css">

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

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

                     VENu HOME

                        About

                        Download

                        Launch

                        Learn

                        Contact

                        Team

The virtual environment for neutrinos.

About VENu

VENu is a mobile app which allows you to see data from the MicroBooNE experiment on your phone. View events recorded by the MicroBooNE experiment or try to catch neutrinos yourself!

VENu is built and rendered in a 3D environment and is designed to exhibit both virtual and augmented reality features. Use your personal VR viewer and immerse yourself in the MicroBooNE detector!

Available for both iOS and Android (under construction).

                <video width="700" controls>
                    <source src="video/VENu%20Animation%20Video.mp4" type="video/mp4">
                    Your browser does not support HTML5 video.
                </video>

Download VENu

You can download VENu for free for iOS.

The Android app is under construction.

                        Download for iOS

VENu Launch

VENu was launched at the Oxford Stargazing event on January 28, 2017

See some pictures clicking on the following button!

                    Oxford Stargazing

Learn

Here you can learn about neutrinos. What are they? Where do they come from? How do we reveal them?

Find the aswers to all these questions reading the next sections!

Or download our app and learn about them in a fun environment!

                      LEARN

                      What are neutrinos?

                      LEARN

                      Where do neutrinos come from?

                      LEARN

                      How to make a neutrino beam

                      LEARN

                      Neutrino interactions

                      LEARN

                      What is a cross section?

                      LEARN

                      What are cosmic rays?

                              LEARN

                              What is Fermilab?

                              LEARN

                              What is MicroBooNE?

                              LEARN

                              What is a LArTPC?

Contact us

Feel free to email us to provide some feedback, give us suggestions, or to just say hello!

venu.developers@physics.ox.ac.uk

                         Twitter

                         Facebook

VENu Team

Mobile App, Cardboard Version and Game

Marco Del Tutto <uni>University of Oxford</uni>

Core Development

Alistair McLean <uni>New Mexico State University</uni>

Marco Del Tutto <uni>University of Oxford</uni>

Matt Bass <uni>University of Oxford</uni>

Owen Crawford <uni>Bradley University</uni>

Thomas Wester <uni>University of Chicago</uni>

Ben Carls <uni>Fermilab</uni>

Ariana Hackenburg <uni>Yale University</uni>

Gene Kim <uni>Illinois Math and Science Academy</uni>

Tia Miceli <uni>New Mexico State University</uni>

Sean Ngo <uni>Illinois Math and Science Academy</uni>

Steve Pate <uni>New Mexico State University</uni>

Jen Raaf <uni>Fermilab</uni>

Sam Zeller <uni>Fermilab</uni>

Learn Sections

Marco Del Tutto <uni>University of Oxford</uni>

Ann Laube <uni>University of Oxford</uni>

Graphics and Design

Marco Del Tutto <uni>University of Oxford</uni>

Special Thanks to

Sam Zeller <uni>Fermilab</uni>

Roxanne Guenette <uni>University of Oxford</uni>

© University of Oxford 2017

Website by Marco Del Tutto

Privacy Policy


text:
package component

import (
	"fmt"

	"github.com/vmware-tanzu/octant/internal/util/json"
)

// Error is a component for freetext
//
// +octant:component
type Error struct {
	Base
	Config ErrorConfig `json:"config"`
}

// ErrorConfig is the contents of Text
type ErrorConfig struct {
	Data string `json:"data,omitempty"`
}

// NewError creates a text component
func NewError(title []TitleComponent, err error) *Error {
	return &Error{
		Base: newBase(TypeError, title),
		Config: ErrorConfig{
			Data: fmt.Sprintf("%+v", err),
		},
	}
}

// SupportsTitle denotes this is a TextComponent.
func (t *Error) SupportsTitle() {}

type errorMarshal Error

// MarshalJSON implements json.Marshaler
func (t *Error) MarshalJSON() ([]byte, error) {
	m := errorMarshal(*t)
	m.Metadata.Type = TypeError
	return json.Marshal(&m)
}

// String returns the text content of the component.
func (t *Error) String() string {
	return t.Config.Data
}

// LessThan returns true if this component's value is less than the argument supplied.
func (t *Error) LessThan(i interface{}) bool {
	v, ok := i.(*Error)
	if !ok {
		return false
	}

	return t.Config.Data < v.Config.Data

}


text: var app = angular.module('riftwalkerApp', ['ngMaterial', 'ngSanitize', 'ngAnimate']);


text:
package com.alibaba.ydt.portal.util;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.serializer.JSONLibDataFormatSerializer;
import com.alibaba.fastjson.serializer.PropertyPreFilter;
import com.alibaba.fastjson.serializer.SerializeConfig;
import com.alibaba.fastjson.serializer.SerializerFeature;
import com.alibaba.ydt.portal.common.JsonExcludePropertyPreFilter;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 *

 * JSON 工具类
 *

 * Time: 13-1-4 下午1:37
 *
 * @author Ivan
 * @version 1.0
 */
public abstract class JsonUtils {

    static final SerializeConfig config = new SerializeConfig();

    static {
        config.put(java.util.Date.class, new JSONLibDataFormatSerializer()); // 使用和json-lib兼容的日期输出格式
        config.put(java.sql.Date.class, new JSONLibDataFormatSerializer()); // 使用和json-lib兼容的日期输出格式
    }

    public static final SerializerFeature[] features = {SerializerFeature.WriteMapNullValue, // 输出空置字段
            SerializerFeature.WriteNullListAsEmpty, // list字段如果为null,输出为[],而不是null
            SerializerFeature.WriteNullNumberAsZero, // 数值字段如果为null,输出为0,而不是null
            SerializerFeature.WriteNullBooleanAsFalse, // Boolean字段如果为null,输出为false,而不是null
            SerializerFeature.WriteNullStringAsEmpty // 字符类型字段如果为null,输出为"",而不是null
    };

    public static String toCompatibleJSONString(Object object) {
        return JSON.toJSONString(object, config, features);
    }
    public static String toCompatibleJSONString(Object object, PropertyPreFilter filter) {
        return JSON.toJSONString(object, filter, features);
    }

    /**
     * 递归处理 JSON 对象为 java map
     *
     * @param valueObj JSON对象
     * @return java map
     */
    public static Map<Object, Object> processObject(JSONObject valueObj) {
        Map<Object, Object> result = new HashMap<Object, Object>();
        for (Object key : valueObj.keySet()) {
            Object value = valueObj.get(key);
            if (value instanceof JSONObject) {
                result.put(key, processObject((JSONObject) value));
            } else if (value instanceof JSONArray) {
                result.put(key, processArray((JSONArray) value));
            } else {
                result.put(key, value);
            }
        }
        return result;
    }

    /**
     * 递归处理数组类型 JSON 为 java list
     *
     * @param valueObject JSON数组
     * @return java list
     */
    public static List<Object> processArray(JSONArray valueObject) {
        List<Object> list = new ArrayList<Object>();
        for (Object obj : valueObject) {
            if (obj instanceof JSONObject) {
                list.add(JSON.toJavaObject((JSONObject) obj, Map.class));
            } else if (obj instanceof JSONArray) {
                list.addAll(processArray((JSONArray) obj));
            } else {
                list.add(obj);
            }
        }
        return list;
    }

    /**
     * 将 JSONArray 中的对象转换为指定类型的对象列表
     * @param array JSON 数组
     * @param cls 指定类型
     * @param <T> 泛型
     * @return 对象列表
     */
    public static <T> List<T> parseJsonArray(JSONArray array, Class<T> cls) {
        List<T> result = new ArrayList<T>();
        if(null == array) {
            return result;
        }
        for(int i = 0; i < array.size(); i ++) {
            result.add(array.getObject(i, cls));
        }
        return result;
    }

    /**
     * 创建一个新的 json config,统一处理默认过滤的字段,日期格式等
     *
     * @return json config
     */
    public static PropertyPreFilter newCommonFilter(Class cls, String... excludeProps) {
        return new JsonExcludePropertyPreFilter(cls, excludeProps);
    }
}


text:
/*!
 * @header IOStorage
 * @abstract
 * This header contains the IOStorage class definition.
 */

#ifndef _IOSTORAGE_H
#define _IOSTORAGE_H

#include <sys/kernel_types.h>
#include <IOKit/IOTypes.h>

/*!
 * @defined kIOStorageClass
 * @abstract
 * The name of the IOStorage class.
 */

#define kIOStorageClass "IOStorage"

/*!
 * @defined kIOStorageCategory
 * @abstract
 * kIOStorageCategory is a value for IOService's kIOMatchCategoryKey property.
 * @discussion
 * The kIOStorageCategory value is the standard value for the IOService property
 * kIOMatchCategoryKey ("IOMatchCategory") for all storage drivers.  All storage
 * objects that expect to drive new content (that is, produce new media objects)
 * are expected to compete within the kIOStorageCategory namespace.
 *
 * See the IOService documentation for more information on match categories.
 */

#define kIOStorageCategory "IOStorage"                /* (as IOMatchCategory) */

/*!
 * @defined kIOStorageFeaturesKey
 * @abstract
 * A property of any object in the storage stack.
 * @discussion
 * kIOStorageFeaturesKey is a property of any object in the storage stack that
 * wishes to express support of additional features, such as Force Unit Access.
 * It is typically defined in the device object below the block storage driver
 * object.  It has an OSDictionary value, where each entry describes one given
 * feature.
 */

#define kIOStorageFeaturesKey "IOStorageFeatures"

/*!
 * @defined kIOStorageFeatureBarrier
 * @abstract
 * Describes the presence of the Barrier feature.
 * @discussion
 * This property describes the ability of the storage stack to honor a write
 * barrier, guaranteeing that on power loss, writes after the barrier will not
 * be visible until all writes before the barrier are visible.  It is one of the
 * feature entries listed under the top-level kIOStorageFeaturesKey property
 * table.  It has an OSBoolean value.
 */

#define kIOStorageFeatureBarrier "Barrier"

/*!
 * @defined kIOStorageFeatureForceUnitAccess
 * @abstract
 * Describes the presence of the Force Unit Access feature.
 * @discussion
 * This property describes the ability of the storage stack to force a request
 * to access the media.  It is one of the feature entries listed under the top-
 * level kIOStorageFeaturesKey property table.  It has an OSBoolean value.
 */

#define kIOStorageFeatureForceUnitAccess "Force Unit Access"

/*!
 * @defined kIOStorageFeaturePriority
 * @abstract
 * Describes the presence of the Priority feature.
 * @discussion
 * This property describes the ability of the storage stack to enforce the
 * priority of a request.  It is one of the feature entries listed under the
 * top-level kIOStorageFeaturesKey property table.  It has an OSBoolean value.
 */

#define kIOStorageFeaturePriority "Priority"

/*!
 * @defined kIOStorageFeatureUnmap
 * @abstract
 * Describes the presence of the Unmap feature.
 * @discussion
 * This property describes the ability of the storage stack to delete unused
 * data from the media.  It is one of the feature entries listed under the top-
 * level kIOStorageFeaturesKey property table.  It has an OSBoolean value.
 */

#define kIOStorageFeatureUnmap "Unmap"

#endif /* !_IOSTORAGE_H */


text:
using System.Collections.Generic;
using System.Threading.Tasks;
using Martijn.HouseInsight.Core.Models;
using Martijn.HouseInsight.Core.Stores;
using Microsoft.EntityFrameworkCore;

namespace Martijn.HouseInsight.EntityFramework.Stores
{
    public class RoomStore : EntityFrameworkStoreBase, IRoomStore
    {
        public RoomStore(HouseInsightContext context) : base(context) { }

        public async Task AddAsync(Room room)
        {
            Context.Rooms.Add(room);
            await Context.SaveChangesAsync();
        }

        public async Task<IEnumerable<Room>> GetAllAsync()
        {
            return await Context.Rooms.ToListAsync();
        }

        public async Task<Room> GetByIdAsync(int id)
        {
            return await Context.Rooms.SingleOrDefaultAsync(x => x.Id == id);
        }

        public async Task UpdateAsync(Room room)
        {
            var entry = Context.Rooms.Attach(room);
            entry.State = EntityState.Modified;
            await Context.SaveChangesAsync();
        }

        public async Task RemoveAsync(Room room)
        {
            Context.Rooms.Remove(room);
            await Context.SaveChangesAsync();
        }
    }
}


text:
xcodebuild clean -project iOSDesignPatterns.xcodeproj/ -scheme 'iOSDesignPatterns' -configuration Debug
xcodebuild build -target iOSDesignPatterns -configuration Debug -scheme iOSDesignPatterns CLANG_ENABLE_MODULE_DEBUGGING=NO CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO | tee xcodebuild.log
# Step 2: Create compile_commands.json
oclint-xcodebuild
# Optional Step: If you have got "error generated" at https://github.com/oclint/oclint/issues/245, then execute it to remove '-fModules' in compile_commands.json.
#python remove_fModules.py compile_commands.json compile_commands1.json
# Step 3: Create pmd_oclint.xml
oclint-json-compilation-database -- -report-type pmd -o pmd_oclint.xml


text:
module Ubi
  module Consultor
    # Base for araneas (spiders)
    class Base
      HEADERS = { 'User-Agent' => "Ubi v#{Ubi::VERSION}" }

      def initialize(thema)
        @thema = thema
      end

      def query_url
        self.class.url + query.to_query
      end

      def links
        '//a'
      end

      def parser(chunk)
        Nokogiri::HTML(chunk)
      end

      def datum
        @datum ||= Ubi::Datum.new(parser(request), words, links)
      end

      #
      # Make an HTTP(S) request to a geocoding API and
      # return the response object.
      #
      def request(opts = {})
        timeout(10) do
          uri = URI.parse(query_url)
          puts "#{self} working on `#{@thema}` (#{query_url}) #{opts}"
          uri.open(HEADERS).read
        end
      end

      class << self
        def inherited(base)
          Ubi.araneas << base
          # puts "Using aranea #{base}"
        end

        #
        # Human-readable name of the aranea
        #
        def name
          fail "Not implemented by #{self}"
        end

        #
        # Url to query
        #
        def url
          fail "Not implemented by #{self}"
        end
      end
    end
  end
end


text:
require([
  '$api/models',
  'scripts/language-example',
  'scripts/cover-example',
  'scripts/button-example',
  'scripts/playlist-example'
], function(models, languageExample, coverExample, buttonExample, playlistExample) {
  'use strict';

  languageExample.doHelloWorld();
  coverExample.doCoverForAlbum();
  buttonExample.doShareButtonForArtist();
  buttonExample.doPlayButtonForAlbum();
  playlistExample.doPlaylistForAlbum();

});