text:
using System;
#endregion
namespace SimpleFramework.Xml {
   /// <summary>
   /// The <c>Default</c> annotation is used to specify that all
   /// fields or methods should be serialized in a default manner. This
   /// basically allows an objects fields or properties to be serialized
   /// without the need to annotate them. This has advantages if the
   /// format of the serialized object is not important, as it allows
   /// the object to be serialized with a minimal use of annotations.
   /// </code>
   ///    @Root
   ///    @Default(DefaultType.FIELD)
   ///    public class Example {
   ///       ...
   ///    }
   /// </code>
   /// Defaults can be applied to either fields or property methods. If
   /// this annotation is applied to a class, certain fields or methods
   /// can be ignored using the <c>Transient</c> annotation. If a
   /// member is marked as transient then it will not be serialized. The
   /// defaults are applied only to those members that are not otherwise
   /// annotated with an XML annotation.
   /// </summary>
   /// <seealso>
   /// SimpleFramework.Xml.Transient
   /// </seealso>
   [AttributeUsage(AttributeTargets.Class | AttributeTargets.Field | AttributeTargets.Method)]
   public class Default : System.Attribute {
      private DefaultType value;
      /// <summary>
      /// This method is used to return the type of default that is to
      /// be applied to the class. Defaults can be applied to either
      /// fields or property methods. Any member with an XML annotation
      /// will not be treated as a default.
      /// </summary>
      /// <returns>
      /// this returns the type of defaults to be applied
      /// </returns>
      public DefaultType Value {
         get {
            return value;
         }
         set {
            value = value;
         }
      }
   }
}


text:
FROM ubuntu:16.04

MAINTAINER Pereskokov Vladislav

# Env vars
ENV HOME /root
ENV GOPATH /root/go
ENV PATH /root/go/bin:/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

# GOPATH
RUN mkdir -p /root/go

RUN apt-get update
RUN apt-get install -y build-essential mercurial git subversion wget curl bzr

# go 1.8.3
RUN wget -qO- http://golang.org/dl/go1.8.3.linux-amd64.tar.gz | tar -C /usr/local -xzf -

RUN mkdir -p $GOPATH/src/github.com/vladpereskokov/Technopark_HighLoad-nginx
ADD . $GOPATH/src/github.com/vladpereskokov/Technopark_HighLoad-nginx

RUN mkdir -p /var/www/html && chown -R www-data:www-data /var/www/html
RUN cd /var/www/html \
    && git clone https://github.com/init/http-test-suite.git \
    && mv ./http-test-suite/httptest ./

WORKDIR /root/go
EXPOSE 80

CMD cd $GOPATH/src/github.com/vladpereskokov/Technopark_HighLoad-nginx && make run

redpajama_set_name: RedPajamaGithub


text:
<?php

namespace App\ClientBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * App\ClientBundle\Entity\ClientPayment
 *
 * @ORM\Table(name="client_payment")
 * @ORM\Entity
 */
class ClientPayment
{

    const STATUS_COMPLETED = 1,
        STATUS_PROCESSING = 2
    ;

    public static function validStatuses()
    {
        return [
            self::STATUS_COMPLETED => 'Completed',
            self::STATUS_PROCESSING => 'Processing'
        ];
    }

    /**
     * @var integer $id
     *
     * @ORM\Column(name="id", type="integer", nullable=false)
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="IDENTITY")
     */
    private $id;

    /**
     * @var integer $idGateway
     *
     * @ORM\Column(name="id_gateway", type="integer", nullable=false)
     */
    private $idGateway;

    /**
     * @var string $transaction
     *
     * @ORM\Column(name="transaction", type="string", length=255, nullable=true)
     */
    private $transaction;

    /**
     * @var \DateTime $payDate
     *
     * @ORM\Column(name="pay_date", type="datetime", nullable=false)
     */
    private $payDate;

    /**
     * @var float $amount
     *
     * @ORM\Column(name="amount", type="decimal", nullable=false, precision=11, scale=2)
     */
    private $amount;

    /**
     * @var float $fee
     *
     * @ORM\Column(name="fee", type="decimal", nullable=false, precision=11, scale=2)
     */
    private $fee;

    /**
     * @param float $fee
     */
    public function setFee($fee)
    {
        $this->fee = $fee;
    }

    /**
     * @return float
     */
    public function getFee()
    {
        return $this->fee;
    }

    /**
     * @var integer $idEstimate
     *
     * @ORM\Column(name="id_estimate", type="integer", nullable=true)
     */
    private $idEstimate;

    /**
     * @var integer $idType
     *
     * @ORM\Column(name="id_type", type="integer", nullable=true)
     */
    private $idType;

    /**
     * @var integer $idAccountTransaction
     *
     * @ORM\Column(name="id_account_transaction", type="integer", nullable=true)
     */
    private $idAccountTransaction;

    /**
     * @var integer $idInvoice
     *
     * @ORM\Column(name="id_invoice", type="integer", nullable=true)
     */
    private $idInvoice;

    /**
     * @var integer $status
     *
     * @ORM\Column(name="status", type="integer", nullable=true)
     */
    private $status = self::STATUS_COMPLETED;

    /**
     * @param int $status
     */
    public function setStatus($status)
    {
        $this->status = $status;
    }

    /**
     * @return int
     */
    public function getStatus()
    {
        return $this->status;
    }

    /**
     * Get id
     *
     * @return integer
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set idGateway
     *
     * @param integer $idGateway
     * @return ClientPayment
     */
    public function setIdGateway($idGateway)
    {
        $this->idGateway = $idGateway;

        return $this;
    }

    /**
     * Get idGateway
     *
     * @return integer
     */
    public function getIdGateway()
    {
        return $this->idGateway;
    }

    /**
     * Set transaction
     *
     * @param string $transaction
     * @return ClientPayment
     */
    public function setTransaction($transaction)
    {
        $this->transaction = $transaction;

        return $this;
    }

    /**
     * Get transaction
     *
     * @return string
     */
    public function getTransaction()
    {
        return $this->transaction;
    }

    /**
     * Set payDate
     *
     * @param \DateTime $payDate
     * @return ClientPayment
     */
    public function setPayDate($payDate)
    {
        $this->payDate = $payDate;

        return $this;
    }

    /**
     * Get payDate
     *
     * @return \DateTime
     */
    public function getPayDate()
    {
        return $this->payDate;
    }

    /**
     * Set amount
     *
     * @param float $amount
     * @return ClientPayment
     */
    public function setAmount($amount)
    {
        $this->amount = $amount;

        return $this;
    }

    /**
     * Get amount
     *
     * @return float
     */
    public function getAmount()
    {
        return $this->amount;
    }

    /**
     * Set idEstimate
     *
     * @param integer $idEstimate
     * @return ClientPayment
     */
    public function setIdEstimate($idEstimate)
    {
        $this->idEstimate = $idEstimate;

        return $this;
    }

    /**
     * Get idEstimate
     *
     * @return integer
     */
    public function getIdEstimate()
    {
        return $this->idEstimate;
    }

    /**
     * Set idType
     *
     * @param integer $idType
     * @return ClientPayment
     */
    public function setIdType($idType)
    {
        $this->idType = $idType;

        return $this;
    }

    /**
     * Get idType
     *
     * @return integer
     */
    public function getIdType()
    {
        return $this->idType;
    }

    /**
     * Set idAccountTransaction
     *
     * @param integer $idAccountTransaction
     * @return ClientPayment
     */
    public function setIdAccountTransaction($idAccountTransaction)
    {
        $this->idAccountTransaction = $idAccountTransaction;

        return $this;
    }

    /**
     * Get idAccountTransaction
     *
     * @return integer
     */
    public function getIdAccountTransaction()
    {
        return $this->idAccountTransaction;
    }

    /**
     * Set idInvoice
     *
     * @param integer $idInvoice
     * @return ClientPayment
     */
    public function setIdInvoice($idInvoice)
    {
        $this->idInvoice = $idInvoice;

        return $this;
    }

    /**
     * Get idInvoice
     *
     * @return integer
     */
    public function getIdInvoice()
    {
        return $this->idInvoice;
    }
}


text:
package com.nsysmon.servlet;

import com.ajjpj.afoundation.io.AJsonSerHelperForNSysmon;
import com.nsysmon.NSysMon;
import com.nsysmon.NSysMonApi;
import com.nsysmon.config.NSysMonConfig;
import com.nsysmon.config.presentation.APresentationMenuEntry;
import com.nsysmon.config.presentation.APresentationPageDefinition;

import javax.servlet.ServletException;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * @author arno
 */
public class NSysMonServlet extends AbstractNSysMonServlet {
    public static final String CONFIG_JS = "config.js";

    private final Map<String, APresentationPageDefinition> pageDefs = new ConcurrentHashMap<>();

    @Override
    public void init() throws ServletException {
        super.init();
        for(APresentationMenuEntry menuEntry: getSysMon().getConfig().presentationMenuEntries) {
            for(APresentationPageDefinition pageDef: menuEntry.pageDefinitions) {
                final Object prev = pageDefs.put(pageDef.getId(), pageDef);
                if(prev != null) {
                    throw new IllegalStateException("more than one page definitions with id '" + pageDef.getId() + "'");
                }
            }
        }
    }

    @Override protected String getDefaultHtmlName() {
        return "nsysmon.html";
    }

    @Override protected boolean handleRestCall(List<String> restParams, HttpServletResponse resp) throws Exception {
        //TODO This results in the JSON being one huge line. Find a way to add newlines so other tools can open the file
        final AJsonSerHelperForNSysmon json = new AJsonSerHelperForNSysmon(resp.getOutputStream());

        final String pageId = restParams.remove(0);
        final String service = restParams.remove(0);

        final APresentationPageDefinition pageDef = pageDefs.get(pageId);
        if(pageDef == null) {
            throw new IllegalArgumentException("no page def with ID '" + pageId + "'");
        }
        return pageDef.handleRestCall(service, restParams, json);
    }

    @Override protected boolean handleDynamic(List<String> pathSegments, HttpServletResponse resp) throws IOException {
        if(CONFIG_JS.equals(pathSegments.get(0))) {
            serveConfig(resp);
            return true;
        }

        return false;
    }

    /**
     * override to customize
     */
    protected NSysMonApi getSysMon() {
        return NSysMon.get();
    }

    private void serveConfig(HttpServletResponse resp) throws IOException {
        final NSysMonConfig config = getSysMon().getConfig();

        final ServletOutputStream out = resp.getOutputStream();

        out.print("angular.module('NSysMonApp').constant('configRaw', ");
        out.flush();

        final AJsonSerHelperForNSysmon json = new AJsonSerHelperForNSysmon(out);
        json.startObject();

        json.writeKey("applicationId");
        json.writeStringLiteral(config.appInfo.getApplicationName());

        json.writeKey("applicationDeployment");
        json.writeStringLiteral(config.appInfo.getDeployment());

        json.writeKey("applicationNode");
        json.writeStringLiteral(config.appInfo.getNodeId());

        json.writeKey("applicationVersion");
        json.writeStringLiteral(config.appInfo.getVersion());

        json.writeKey("applicationInstanceHtmlColorCode");
        json.writeStringLiteral(config.appInfo.getHtmlColorCode());

        json.writeKey("defaultPage");
        json.writeStringLiteral(config.defaultPage);

        json.writeKey("menuEntries");
        json.startArray();
        for(APresentationMenuEntry menuEntry: config.presentationMenuEntries) {
            writeMenuEntry(menuEntry, json);
        }
        json.endArray();

        json.endObject();

        out.println(");");
    }

    private void writeMenuEntry(APresentationMenuEntry menuEntry, AJsonSerHelperForNSysmon json) throws IOException {
        json.startObject();

        json.writeKey("label");
        json.writeStringLiteral(menuEntry.label);

        json.writeKey("entries");
        json.startArray();

        for(APresentationPageDefinition pageDef: menuEntry.pageDefinitions) {
            json.startObject();

            json.writeKey("id");
            json.writeStringLiteral(pageDef.getId());

            json.writeKey("controller");
            json.writeStringLiteral(pageDef.getControllerName());

            json.writeKey("htmlFileName");
            json.writeStringLiteral(pageDef.getHtmlFileName());

            json.writeKey("shortLabel");
            json.writeStringLiteral(pageDef.getShortLabel());

            json.writeKey("fullLabel");
            json.writeStringLiteral(pageDef.getFullLabel());

            json.endObject();
        }

        json.endArray();

        json.endObject();
    }
}


text:
var searchData=
[
  ['file_5fupload_5fwizard',['file_upload_wizard',['../namespace_exact_abstract.html#acf5afbedaf0e35e762491ca68793767c',1,'ExactAbstract']]],
  ['filter_5fsentences',['filter_sentences',['../namespacealgorithms_1_1statistical.html#aa3b806c89b58593a7b97696b69b67c60',1,'algorithms::statistical']]]
];


text:
package shoujibang.net.nextaf.demo.api.model;

import com.google.gson.annotations.SerializedName;

/**
 * Created by rakuishi on 15/05/02.
 */
public class Repo {

    @SerializedName("id")
    private int mId;

    @SerializedName("name")
    private String mName;

    @SerializedName("description")
    private String mDescription;

    @SerializedName("updated_at")
    private String mUpdatedAt;

    @SerializedName("html_url")
    private String mUrl;

    public Repo(int id, String name, String description, String updatedAt, String url) {
        mId = id;
        mName = name;
        mDescription = description;
        mUpdatedAt = updatedAt;
        mUrl = url;
    }

    public int getId() {
        return mId;
    }

    public String getName() {
        return mName;
    }

    public String getDescription() {
        return mDescription;
    }

    public String getUpdatedAt() {
        return mUpdatedAt;
    }

    public String getUrl() {
        return mUrl;
    }

    @Override
    public String toString() {
        return "id: " + mId + "\n" +
               "name: " + mName + "\n" +
               "description: " + mDescription + "\n" +
               "updated_at: " + mUpdatedAt + "\n" +
               "html_url: " + mUrl;
    }
}


text:
/* Generated code */
import ICallLogSync from '../definitions/CallLogSync';
import PathSegment from '../PathSegment';

export default class CallLogSync extends PathSegment {
	constructor(prv: PathSegment, id?: string, service?) {
		super('call-log-sync', id, prv, service);
	}

	/**
	 *

Required Permissions

Permission	Description

ReadCallLog	Viewing user call logs

Usage Plan Group

Heavy

	 */
	list(query?: ListQuery): Promise<ICallLogSync> {
		return this.getRest().call(this.getEndpoint(false), query, {
			body: undefined,
			method: 'get'
		}).then<any>((res) => {
				return res.json();
		});
	}

}

export interface ListQuery {

	/**
	 * Type of synchronization. 'FSync' is a default value
	 */
	syncType?: ('FSync' | 'ISync')[];

	/**
	 * Value of syncToken property of last sync request response
	 */
	syncToken?: string;

	/**
	 * The start datetime for resulting records in ISO 8601 format including timezone, for example 2016-03-10T18:07:52.534Z. The default value is the current moment
	 */
	dateFrom?: string;

	/**
	 * ForT?FSync the parameter is mandatory, it limits the number of records to be returned in response. For ISync it specifies with how many records to extend sync Frame to the past, the maximum number of records is 250
	 */
	recordCount?: number;

	/**
	 * Type of calls to be returned. The default value is 'All'
	 */
	statusGroup?: ('Missed' | 'All')[];
}


text:
The installation script allows a variety of customization options by setting
variable values in `config/packages.md`.

## Git configuration

Git configuration **should** be set because there are no default values provided.
If you don't set this variables in your `config/packages.md` file then you will
not have any Git configuration.

### `infusion_git_email`

Set this to your email.

### `infusion_git_name`

Set this to your name.

### `infusion_git_signkey`

Set this to your GPG key. You can read more about that [here](https://git-scm.com/book/en/v2/Git-Tools-Signing-Your-Work).

## Shell configuration

### Custom executables

Infusion allows you to specify the source and target of your custom bin directory.
The values can be changed like so.

```
# These are the default values
custom_scripts_source=$script_full_path/config/bin/
custom_scripts_target=$HOME/bin/
```

### Bash configuration

Infusion allows you to specify the source and target of your bash configs. This
can be used to customize your use of `.bash_profile`, `.profile`, etc.

```
# These are the default values
profile_source_path=$script_full_path/config/linked_files/bash_profile
profile_target_path=$HOME/.bash_profile
rc_source_path=$script_full_path/config/linked_files/bashrc
rc_target_path=$HOME/.bashrc
```


text:
'use strict';

var users = require('../../app/controllers/users');

module.exports = function(app) {
	var cedar = require('../../app/controllers/cedar');

	app.route('/cedar/templates')
		.get(users.requiresLogin, cedar.searchTemplates);

    app.route('/cedar/templates/:id')
        .get(users.requiresLogin, cedar.getTemplate);

};


text:
using System.Collections.Generic;
using System.Linq;
using E2Print.Domain.Entities;

namespace E2Print.BL.Implements.EF
{
    public static class ModelMapping
    {
        public static E2Print.Domain.Entities.Customer MapCustomer(E2Print.DAL.Customer dalCustomer)
        {
            E2Print.Domain.Entities.Customer domainCustomer = new Domain.Entities.Customer();
            if (dalCustomer != null)
            {
                domainCustomer.Id = dalCustomer.Id;
                domainCustomer.Login = dalCustomer.Login;
                domainCustomer.FirstName = dalCustomer.FirstName;
                domainCustomer.LastName = dalCustomer.LastName;
                domainCustomer.Company = dalCustomer.Company;
                domainCustomer.Password = dalCustomer.Password;
                domainCustomer.Address = dalCustomer.Address;
                domainCustomer.Email = dalCustomer.Email;
                domainCustomer.Company = dalCustomer.Company;
                domainCustomer.ContactNumber = dalCustomer.ContactNumber;
                domainCustomer.Role = dalCustomer.Role;
            }
            return domainCustomer;
        }
        public static IEnumerable<E2Print.Domain.Entities.Customer> MapCustomer(IEnumerable<E2Print.DAL.Customer> dalCustomers)
        {
            List<E2Print.Domain.Entities.Customer> domainCustomers = new List<E2Print.Domain.Entities.Customer>();

            foreach (var dalCustomer in dalCustomers)
            {
                E2Print.Domain.Entities.Customer domainCustomer = MapCustomer(dalCustomer);
                domainCustomers.Add(domainCustomer);
            }
            return domainCustomers;
        }

        public static E2Print.Domain.Entities.UserRole MapRole(E2Print.DAL.Role role)
        {
            E2Print.Domain.Entities.UserRole userRole = new Domain.Entities.UserRole();
            userRole.Id = role.Id;
            userRole.RoleName = role.RoleName;
            userRole.Discount = role.Discount;
            return userRole;
        }

        public static E2Print.Domain.Entities.Product MapProduct(E2Print.DAL.Product dalProduct)
        {
            CategoryBL categoryRepository = new  CategoryBL();
            E2Print.Domain.Entities.Product product = new Domain.Entities.Product();
            product.Id = dalProduct.Id;
            product.Name = dalProduct.Name;
            product.Description = dalProduct.Description;
            product.Size = dalProduct.Size;
            product.Color = dalProduct.Color;
            product.Material = dalProduct.Material;
            product.BuyingQty = dalProduct.BuyingQty.Value;
            product.Price = dalProduct.Price;
            if (dalProduct.CategoryId != null)
            {
                product.Category = categoryRepository.GetById(dalProduct.CategoryId.Value);
            }
            else
            {
                product.Category = new Category();
            }
            return product;
        }

        public static IEnumerable<E2Print.Domain.Entities.Product> MapProduct(IEnumerable<E2Print.DAL.Product> dalProducts)
        {
            List<E2Print.Domain.Entities.Product> domainProducts = new List<E2Print.Domain.Entities.Product>();

            foreach (var dalProduct in dalProducts)
            {
                E2Print.Domain.Entities.Product domainProduct = MapProduct(dalProduct);
                domainProducts.Add(domainProduct);
            }
            return domainProducts;
        }

        public static E2Print.Domain.Entities.Category MapCategory(E2Print.DAL.Category dalCategory)
        {
            E2Print.Domain.Entities.Category Category = new Domain.Entities.Category();
            Category.Id = dalCategory.Id;
            Category.Name = dalCategory.Name;
            Category.Description = dalCategory.Description;
            Category.ParentId = dalCategory.ParentId;
            return Category;
        }

        public static IEnumerable<E2Print.Domain.Entities.Category> MapCategory(IEnumerable<E2Print.DAL.Category> dalCategorys)
        {
            List<E2Print.Domain.Entities.Category> domainCategorys = new List<E2Print.Domain.Entities.Category>();

            foreach (var dalCategory in dalCategorys)
            {
                E2Print.Domain.Entities.Category domainCategory = MapCategory(dalCategory);
                domainCategorys.Add(domainCategory);
            }
            return domainCategorys;
        }

        public static E2Print.Domain.Entities.Promotion MapPromotion(E2Print.DAL.Promotion dalPromotion)
        {
            E2Print.Domain.Entities.Promotion customerFeedback = new Domain.Entities.Promotion();
            customerFeedback.Id = dalPromotion.Id;
            customerFeedback.ItemId = dalPromotion.ItemId;
            customerFeedback.Title = dalPromotion.Title;
            customerFeedback.Description = dalPromotion.Description;
            customerFeedback.StartDate = dalPromotion.StartDate;
            customerFeedback.EndDate = dalPromotion.EndDate;
            customerFeedback.Comment = dalPromotion.Comment;
            customerFeedback.DiscountAmount = dalPromotion.DiscountAmount;
            customerFeedback.PromotionPrice = dalPromotion.PromotionPrice;
            return customerFeedback;
        }

        public static IEnumerable<E2Print.Domain.Entities.Promotion> MapPromotion(IEnumerable<E2Print.DAL.Promotion> dalPromotions)
        {
            List<E2Print.Domain.Entities.Promotion> domainPromotions = new List<E2Print.Domain.Entities.Promotion>();

            foreach (var dalPromotion in dalPromotions)
            {
                E2Print.Domain.Entities.Promotion domainPromotion = MapPromotion(dalPromotion);
                domainPromotions.Add(domainPromotion);
            }
            return domainPromotions;
        }

        public static E2Print.Domain.Entities.CustomerFeedback MapCustomerFeedback(E2Print.DAL.CustomerFeedback dalCustomerFeedback)
        {
            E2Print.Domain.Entities.CustomerFeedback customerFeedback = new Domain.Entities.CustomerFeedback();
            customerFeedback.Id = dalCustomerFeedback.Id;
            customerFeedback.Comment = dalCustomerFeedback.Comment;
            customerFeedback.CommentDate = dalCustomerFeedback.CommentDate;
            customerFeedback.CustomerName = dalCustomerFeedback.CustomerName;
            customerFeedback.CustomerId = dalCustomerFeedback.CustomerId;
            customerFeedback.Photo = dalCustomerFeedback.Photo;
            return customerFeedback;
        }

        public static IEnumerable<E2Print.Domain.Entities.CustomerFeedback> MapCustomerFeedback(IEnumerable<E2Print.DAL.CustomerFeedback> dalCustomerFeedbacks)
        {
            List<E2Print.Domain.Entities.CustomerFeedback> domainCustomerFeedbacks = new List<E2Print.Domain.Entities.CustomerFeedback>();

            foreach (var dalCustomerFeedback in dalCustomerFeedbacks)
            {
                E2Print.Domain.Entities.CustomerFeedback domainCustomerFeedback = MapCustomerFeedback(dalCustomerFeedback);
                domainCustomerFeedbacks.Add(domainCustomerFeedback);
            }
            return domainCustomerFeedbacks;
        }

        public static E2Print.Domain.Entities.ProductAttribute MapProductAttribute(E2Print.DAL.ProductAttribute dalProductAttribute)
        {
            E2Print.Domain.Entities.ProductAttribute customerFeedback = new Domain.Entities.ProductAttribute();
            customerFeedback.Id = dalProductAttribute.Id;
            customerFeedback.AttributeName = dalProductAttribute.AttributeName;
            customerFeedback.AttributeValue = dalProductAttribute.AttributeValue;
            customerFeedback.Description = dalProductAttribute.Description;
            return customerFeedback;
        }

        public static IEnumerable<E2Print.Domain.Entities.ProductAttribute> MapProductAttribute(IEnumerable<E2Print.DAL.ProductAttribute> dalProductAttributes)
        {
            List<E2Print.Domain.Entities.ProductAttribute> domainProductAttributes = new List<E2Print.Domain.Entities.ProductAttribute>();

            foreach (var dalProductAttribute in dalProductAttributes)
            {
                E2Print.Domain.Entities.ProductAttribute domainProductAttribute = MapProductAttribute(dalProductAttribute);
                domainProductAttributes.Add(domainProductAttribute);
            }
            return domainProductAttributes;
        }

        #region "Order"
        public static Order MapOrder(DAL.Order dalOrder)
        {
            if (dalOrder == null) return null;

            CustomerBL customerBL = new CustomerBL();
            ProductBL productBL = new ProductBL();

            Order order = new Order();
            order.Id = dalOrder.Id;
            order.City = dalOrder.City;
            order.Suburb = dalOrder.Suburb;
            order.Street = dalOrder.Street;
            order.Country = dalOrder.Country;
            order.PostCode = dalOrder.PostCode;
            order.Customer = customerBL.GetById(dalOrder.CustomerId.ToString()).FirstOrDefault();
            order.CreatedOn = dalOrder.CreatedOn;
            order.OrderNumber = dalOrder.OrderNumber;
            order.Giftwrap = dalOrder.Giftwrap;
            order.Status = dalOrder.Status;
            order.Recipient = dalOrder.Recipient;

            order.OrderLines = new List<OrderLine>();

            foreach (var dalOrderLine in dalOrder.OrderLines)
            {
                order.OrderLines.Add(new OrderLine()
                {
                    Order =order,
                    Id=dalOrderLine.Id,
                    Price = dalOrderLine.Price,
                    Product = productBL.GetById(dalOrderLine.ProductId),
                    Quantity = dalOrderLine.Quantity
                });
            }

            return order;
        }

        public static List<Order> MapOrder(List<DAL.Order> dalOrders)
        {
            List<Order> orders = new List<Order>();
            foreach (var dalOrder in dalOrders)
            {
                orders.Add(MapOrder(dalOrder));
            }
            return orders;
        }
        #endregion
    }
}


text:
<?xml version="1.0" encoding="utf-8"?>
<resources>
	<color name="white">#FFFFFF</color>
	<color name="grey">#CCCCCC</color>
	<color name="black">#000000</color>
	<color name="gray">#808080</color>
	<color name="red">#FF0000</color>
	<color name="gold">#FFD700</color>
	<color name="yellow">#FFFF00</color>
	<color name="green">#008000</color>
	<color name="blue">#0000FF</color>
	<color name="purple">#800080</color>
	<color name="pink">#FFC0CB</color>
	<color name="orange">#FFA500</color>
	<color name="lemonyellow">#FFFACD</color>
	<color name="graywhite">#F5F5F5</color>
	<color name="grayslate">#708090</color>
	<color name="lightblue">#0083FF</color>

    <color name="full_transparent">#00000000</color>
    <color name="half_transparent">#aa000000</color>

    <color name="bright_foreground_light">#ff000000</color>
    <color name="bright_foreground_light_inverse">#ffffffff</color>
    <color name="bright_foreground_light_disabled">#80000000</color>

    <color name="dim_foreground_light">#808080</color>
    <color name="dim_foreground_light_disabled">#80323232</color>
    <color name="dim_foreground_light_inverse">#ff006eaa</color>
    <color name="dim_foreground_light_inverse_disabled">#80bebebe</color>

    <color name="head_text">#0e5986</color>
    <color name="author_text">#0e5986</color>

    <color name="face_bg">#eef1f4</color>

    <color name="frame_button_text_nor">#033a5c</color>
    <color name="frame_button_text_select">#FFFFFF</color>

    <color name="listitem_transparent">#00000000</color>
    <color name="listitem_black">#ff000000</color>
    <color name="listitem_white">#ffffffff</color>
    <color name="listitem_blue">#0e5986</color>
    <color name="listitem_gray">#ff9da19e</color>
    <color name="listitem_green">#ffe3ffc6</color>
    <color name="listitem_greenyellow">#ff87b869</color>
    <color name="listitem_yellow">#fffaffbf</color>
    <color name="listitem_title">#803403</color>
    <color name="listitem_content">#747474</color>
    <color name="listitem_bottom">#BFBEC6</color>
    <color name="listitem_total">#FC643B</color>
    <color name="listitem_money">#FC643B</color>
    <color name="listitem_date">#A29698</color>

    <!-- 底部的颜色 -->
    <color name="tab_base_color">#e6e0e0</color>
    <!-- <color name="tab_selected_color">#62bcfc</color> -->
    <color name="tab_selected_color">#d7e9f6</color>
    <color name="tab_base_text_color">#797979</color>
    <color name="tab_selected_text_color">#53b2f6</color>
    <!-- 头部颜色 -->
    <color name="head_bg_color">#277FBE</color>
    <color name="head_tip_text_color">#898989</color>
    <color name="head_tip_color">#E1E4E9</color>
    <color name="list_item_divider">#D6D7DB</color>
    <!-- menu菜单颜色 -->
    <color name="menu_bg_color">#1c8bda</color>
</resources>


text:
import unittest
import os

from programy.utils.geo.geonames import GeoNamesApi
from programy.utils.license.keys import LicenseKeys

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

class GeoNamesTests(unittest.TestCase):

    def setUp(self):
        self.license_keys = LicenseKeys()
        self.license_keys.load_license_key_file(os.path.dirname(__file__) + "/../../../../bots/y-bot/config/license.keys")

    def test_geonames(self):

        geonames = GeoNamesApi(self.license_keys)
        self.assertIsNotNone(geonames)

        latlng = geonames.get_latlong_for_postcode('KY39UR')
        self.assertIsNotNone(latlng)
        self.assertEquals(latlng.latitude, 56.07206267570594)
        self.assertEquals(latlng.longitude, -3.175233048730664)


text:
package org.ovirt.engine.ui.uicommonweb.models.vms;

import java.util.ArrayList;
import java.util.List;

import org.ovirt.engine.core.common.action.VdcActionParametersBase;
import org.ovirt.engine.core.common.action.VdcActionType;
import org.ovirt.engine.core.common.action.VnicProfileParameters;
import org.ovirt.engine.core.common.businessentities.network.VnicProfileView;
import org.ovirt.engine.ui.frontend.Frontend;
import org.ovirt.engine.ui.uicommonweb.UICommand;
import org.ovirt.engine.ui.uicommonweb.help.HelpTag;
import org.ovirt.engine.ui.uicommonweb.models.ConfirmationModel;
import org.ovirt.engine.ui.uicommonweb.models.ListModel;
import org.ovirt.engine.ui.uicompat.ConstantsManager;
import org.ovirt.engine.ui.uicompat.FrontendMultipleActionAsyncResult;
import org.ovirt.engine.ui.uicompat.IFrontendMultipleActionAsyncCallback;

public class RemoveVnicProfileModel extends ConfirmationModel {

    private final List<VnicProfileView> profiles;
    private final boolean fullMsg;
    private final ListModel sourceListModel;

    public RemoveVnicProfileModel(ListModel sourceListModel, List<VnicProfileView> profiles, boolean isFullMsg) {
        setTitle(ConstantsManager.getInstance().getConstants().removeVnicProfileTitle());
        setHelpTag(HelpTag.remove_vnic_prfoile);
        setHashName("remove_vnic_prfoile"); //$NON-NLS-1$

        this.sourceListModel = sourceListModel;
        this.profiles = profiles;
        this.fullMsg = isFullMsg;

        ArrayList<String> items = new ArrayList<String>();
        for (VnicProfileView profile : profiles) {
            if (isFullMsg) {
                items.add(getRemoveVnicProfileFullMsg(profile));
            } else {
                items.add(profile.getName());
            }
        }
        setItems(items);

        UICommand tempVar = UICommand.createDefaultOkUiCommand("OnRemove", this); //$NON-NLS-1$
        getCommands().add(tempVar);
        UICommand tempVar2 = UICommand.createCancelUiCommand("Cancel", this); //$NON-NLS-1$
        getCommands().add(tempVar2);
    }

    private void onRemove() {
        if (getProgress() != null) {
            return;
        }

        ArrayList<VdcActionParametersBase> list = new ArrayList<VdcActionParametersBase>();
        for (VnicProfileView profile : getProfiles()) {
            VdcActionParametersBase parameters = getRemoveVnicProfileParams(profile);
            list.add(parameters);

        }

        startProgress(null);

        Frontend.getInstance().runMultipleAction(VdcActionType.RemoveVnicProfile, list,
                new IFrontendMultipleActionAsyncCallback() {
                    @Override
                    public void executed(FrontendMultipleActionAsyncResult result) {

                        stopProgress();
                        cancel();

                    }
                }, null);
    }

    protected String getRemoveVnicProfileFullMsg(VnicProfileView profile) {
        return ConstantsManager.getInstance()
                .getMessages()
                .vnicProfileFromNetwork(profile.getName(), profile.getNetworkName());
    }

    protected VdcActionParametersBase getRemoveVnicProfileParams(VnicProfileView profile) {
        return new VnicProfileParameters(profile);
    }

    public List<VnicProfileView> getProfiles() {
        return profiles;
    }

    public boolean isFullMsg() {
        return fullMsg;
    }

    private void cancel() {
        sourceListModel.setWindow(null);
        sourceListModel.setConfirmWindow(null);
    }

    @Override
    public void executeCommand(UICommand command) {
        super.executeCommand(command);

        if ("Cancel".equals(command.getName())) { //$NON-NLS-1$
            cancel();
        }
        else if ("OnRemove".equals(command.getName())) { //$NON-NLS-1$
            onRemove();
        }
    }

}


text:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.ultratendency</groupId>
    <artifactId>hadoop-tile-renderer</artifactId>
    <packaging>jar</packaging>
    <version>1.0.0</version>
    <name>Hadoop Tile Renderer</name>

    <licenses>
        <license>
            <name>Apache License, Version 2.0</name>
            <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <developers>
        <developer>
            <name>Dr. Robert Neumann</name>
            <email>robert.neumann@ultratendency.com</email>
        </developer>
        <developer>
            <name>Joachim Wilken</name>
            <email>joachim.wilken@ultratendency.com</email>
        </developer>
        <developer>
            <name>Jan Hentschel</name>
            <email>jan.hentschel@ultratendency.com</email>
        </developer>
    </developers>

    <organization>
        <name>Ultra Tendency GmbH</name>
        <url>http://ultratendency.com/</url>
    </organization>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <repositories>
        <repository>
            <id>geosolutions</id>
            <name>GeoSolutions libraries repository</name>
            <url>http://maven.geo-solutions.it/</url>
        </repository>
        <repository>
            <id>codehaus</id>
            <name>Codehaus maven repository</name>
            <url>http://repository.codehaus.org/</url>
        </repository>
        <repository>
            <id>jboss</id>
            <name>jboss</name>
            <url>http://repository.jboss.org/maven2/</url>
        </repository>
        <repository>
            <id>codehaus.org</id>
            <name>CodeHaus Snapshots</name>
            <url>http://snapshots.repository.codehaus.org</url>
            <releases>
                <enabled>false</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>
        <repository>
            <id>osgeo</id>
            <name>Open Source Geospatial Foundation Repository</name>
            <url>http://download.osgeo.org/webdav/geotools/</url>
        </repository>
        <repository>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
            <id>opengeo</id>
            <name>OpenGeo Maven Repository</name>
            <url>http://repo.opengeo.org</url>
        </repository>
        <repository>
            <id>maven2-repository.dev.java.net</id>
            <name>Java.net Repository for Maven</name>
            <url>http://download.java.net/maven/2/</url>
            <layout>default</layout>
        </repository>
    </repositories>

    <dependencies>
        <dependency>
            <groupId>org.apache.hbase</groupId>
            <artifactId>hbase-client</artifactId>
            <version>1.3.1</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.hbase</groupId>
            <artifactId>hbase-server</artifactId>
            <version>1.3.1</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>eu.agrosense.client</groupId>
            <artifactId>lib-geotools</artifactId>
            <version>10.2-NB72</version>
        </dependency>
        <dependency>
            <groupId>it.geosolutions.imageio-ext</groupId>
            <artifactId>imageio-ext-streams</artifactId>
            <version>1.1.7</version>
        </dependency>
    </dependencies>

    <build>
        <resources>
            <resource>
                <directory>${basedir}/src/main/resources</directory>
            </resource>
            <resource>
                <directory>${basedir}/conf</directory>
                <filtering>false</filtering>
                <includes>
                    <include>hbase-site.xml</include>
                </includes>
            </resource>
        </resources>

        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.6.1</version>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <version>2.17</version>
                <executions>
                    <execution>
                        <id>checkstyle</id>
                        <phase>validate</phase>
                        <goals>
                            <goal>check</goal>
                        </goals>
                        <configuration>
                            <configLocation>build/checkstyle.xml</configLocation>
                            <failOnViolation>true</failOnViolation>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>findbugs-maven-plugin</artifactId>
                <version>3.0.4</version>
                <executions>
                    <execution>
                        <id>findbug</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <xmlOutput>true</xmlOutput>
                    <xmlOutputDirectory>${project.build.directory}/findbugs</xmlOutputDirectory>
                    <findbugsXmlOutputDirectory>${project.build.directory}/findbugs</findbugsXmlOutputDirectory>
                    <effort>Max</effort>
                    <threshold>Low</threshold>
                    <failOnError>true</failOnError>
                    <includeTests>true</includeTests>
                    <excludeFilterFile>build/findbugs-exclude.xml</excludeFilterFile>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>com.github.spotbugs</groupId>
                        <artifactId>spotbugs</artifactId>
                        <version>3.1.0-RC3</version>
                    </dependency>
                </dependencies>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <version>3.0.0</version>
                <configuration>
                    <transformers>
                        <transformer
                                implementation="org.apache.maven.plugins.shade.resource.ApacheLicenseResourceTransformer">
                        </transformer>
                    </transformers>
                </configuration>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>


text:
#ifndef wasm_support_color_h
#define wasm_support_color_h

#include <iosfwd>

namespace Colors {

void setEnabled(bool enabled);
bool isEnabled();

#if defined(__linux__) || defined(__APPLE__)
void outputColorCode(std::ostream& stream, const char* colorCode);
inline void normal(std::ostream& stream) { outputColorCode(stream, "\033[0m"); }
inline void red(std::ostream& stream) { outputColorCode(stream, "\033[31m"); }
inline void magenta(std::ostream& stream) {
  outputColorCode(stream, "\033[35m");
}
inline void orange(std::ostream& stream) {
  outputColorCode(stream, "\033[33m");
}
inline void grey(std::ostream& stream) { outputColorCode(stream, "\033[37m"); }
inline void green(std::ostream& stream) { outputColorCode(stream, "\033[32m"); }
inline void blue(std::ostream& stream) { outputColorCode(stream, "\033[34m"); }
inline void bold(std::ostream& stream) { outputColorCode(stream, "\033[1m"); }
#elif defined(_WIN32)
void outputColorCode(std::ostream& stream, const unsigned short& colorCode);
inline void normal(std::ostream& stream) { outputColorCode(stream, 0x07); }
inline void red(std::ostream& stream) { outputColorCode(stream, 0x0c); }
inline void magenta(std::ostream& stream) { outputColorCode(stream, 0x05); }
inline void orange(std::ostream& stream) { outputColorCode(stream, 0x06); }
inline void grey(std::ostream& stream) { outputColorCode(stream, 0x08); }
inline void green(std::ostream& stream) { outputColorCode(stream, 0x02); }
inline void blue(std::ostream& stream) { outputColorCode(stream, 0x09); }
inline void bold(std::ostream& stream) { /* Do nothing */
}
#else
inline void normal(std::ostream& stream) {}
inline void red(std::ostream& stream) {}
inline void magenta(std::ostream& stream) {}
inline void orange(std::ostream& stream) {}
inline void grey(std::ostream& stream) {}
inline void green(std::ostream& stream) {}
inline void blue(std::ostream& stream) {}
inline void bold(std::ostream& stream) {}
#endif

} // namespace Colors

#endif // wasm_support_color_h


text:
<?php

/**
 * This subclass adds a caching layer to the data list implementation of Silverstripe.
 *
 * @author Christian Blank <c.blank@notthatbad.net>
 */
class CachedDataList extends DataList {

    /**
     * @param int $id the id of an data object
     * @return DataObject the data object with the given id
     */
    public function byID($id) {
        return $this->cache($id, function() use ($id){return parent::byID($id);});
    }

    /**
     * Needs the DataListExtension from ntb/silverstripe-rest-api.
     *
     * @param string $url the url slug
     * @return DataObject the data object with the given url slug
     */
    public function byURL($url) {
        return $this->cache($url, function() use ($url){return parent::byURL($url);});
    }

    /**
     * FixMe: Currently only db and has_one fields are cached.
     * @param string|int $identifier an identifier which will be used for key generation
     * @param callable $callback the function which can be called to fetch the data
     * @return DataObject
     */
    protected function cache($identifier, $callback) {
        $serializer = CacheHelper::get_serializer();
        // check for cacheable extension of data object class
        $className = $this->dataClass;
        if(Object::has_extension($className, 'CacheableExtension')) {
            // search in cache
            $cache = CacheHelper::get_cache();
            $key = CacheHelper::to_key("$className.$identifier");
            if($data = $cache->load($key)) {
                return $serializer->deserialize($data);
            } else {
                // if not found in cache, perform callback
                $data = $callback();
                if(!$data) {
                    // if result is empty, return null
                    return null;
                }
                $cachedFunctions = array_keys($data->hasOne());
                foreach($cachedFunctions as $fn) {
                    $data->$fn();
                }
                $cache->save($serializer->serialize($data), $key);
                // return result
                return $data;
            }
        } else {
            return $callback();
        }
    }

}


text:
<!DOCTYPE html>

        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">

        <title>テストサイトを開設しました。</title>

        <meta name="description" content="">
        <meta name="viewport" content="width=device-width, initial-scale=1">

        <link rel="shortcut icon" href="../logo.ico" type="image/x-ico; charset=binary"><title>日本室内自転競技連盟</title>

        <link rel="stylesheet" href="../css/normalize.css">
        <link rel="stylesheet" href="../css/main.css">

Home

Topics

テストサイトを開設しました。

テストサイトを開設しました。

                    テストサイトを開設しました。

                    今後継続して改善してまいりますので、何卒ご指導ご鞭撻のほどよろしくお願いします。

お問い合わせ

Copyright (c) 2015 Japan Federation of Indoor Cycling


text:
SYNONYM

#### According to
Index Fungorum

#### Published in
Muelleria 2: 83 (1969)

#### Original name
Parmelia parietina var. ectanea Ach.

### Remarks
null


text:
package examples;

import pinnacle.api.Parameter;
import pinnacle.api.PinnacleAPI;
import pinnacle.api.PinnacleException;
import pinnacle.api.dataobjects.SettledSpecialFixtures;

public class GetSettledSpecialFixtures {

	public static void main(String[] args) throws PinnacleException {
		// settings
		String username = "yourUserName";
		String password = "yourPassword";
		PinnacleAPI api = PinnacleAPI.open(username, password);

		// parameter
		Parameter parameter = Parameter.newInstance();
		parameter.sportId(29);
		parameter.leagueIds(1980);
		//parameter.since();

		// response as plain json text
		String jsonText = api.getSettledSpecialFixturesAsJson(parameter);
		System.out.println(jsonText);

		// response as data object
		SettledSpecialFixtures settledSpecialFixtures = api.getSettledSpecialFixturesAsObject(parameter);
		System.out.println(settledSpecialFixtures);
	}
}


text:
package org.apache.velocity.util.introspection;

/**
 * The introspector cache API definition.
 *
 * @author Henning P. Schmiedehausen
 * @author Candid Dauth
 * @version $Id: IntrospectorCache.java 1329799 2012-04-24 15:41:21Z cbrisson $
 * @since 1.5
 */
public interface IntrospectorCache {

    /**
     * Clears the internal cache.
     */
    void clear();

    /**
     * Lookup a given Class object in the cache. If it does not exist,
     * check whether this is due to a class change and purge the caches
     * eventually.
     *
     * @param c The class to look up.
     * @return A ClassMap object or null if it does not exist in the cache.
     */
    ClassMap get(Class c);

    /**
     * Lookup a given Class object in the cache. If it does not exist,
     * check whether this is due to a class change and purge the caches
     * eventually.
     *
     * @param c The class to look up.
     * @return A ClassFieldMap object or null if it does not exist in the cache.
     */
    ClassFieldMap getFieldMap(final Class c);

    /**
     * Creates a class map for specific class and registers it in the
     * cache.  Also adds the qualified name to the name->class map
     * for later Classloader change detection.
     *
     * @param c The class for which the class map gets generated.
     * @return A ClassMap object.
     */
    ClassMap put(Class c);

}


text:
namespace gpdxl
{
using namespace gpos;

XERCES_CPP_NAMESPACE_USE

//---------------------------------------------------------------------------
//	@class:
//		CParseHandlerScalarOpList
//
//	@doc:
//		Parse handler class for parsing a list of scalar operators
//
//---------------------------------------------------------------------------
class CParseHandlerScalarOpList : public CParseHandlerScalarOp
{
private:
	// op list type
	CDXLScalarOpList::EdxlOpListType m_dxl_op_list_type;

	// private copy ctor
	CParseHandlerScalarOpList(const CParseHandlerScalarOpList &);

	// return the op list type corresponding to the given operator name
	CDXLScalarOpList::EdxlOpListType GetDXLOpListType(
		const XMLCh *const element_local_name);

	// process the start of an element
	void StartElement(
		const XMLCh *const element_uri,			// URI of element's namespace
		const XMLCh *const element_local_name,	// local part of element's name
		const XMLCh *const element_qname,		// element's qname
		const Attributes &attr					// element's attributes
	);

	// process the end of an element
	void EndElement(
		const XMLCh *const element_uri,			// URI of element's namespace
		const XMLCh *const element_local_name,	// local part of element's name
		const XMLCh *const element_qname		// element's qname
	);

public:
	// ctor
	CParseHandlerScalarOpList(CMemoryPool *mp,
							  CParseHandlerManager *parse_handler_mgr,
							  CParseHandlerBase *parse_handler_root);
};
}  // namespace gpdxl

#endif	// !GPDXL_CParseHandlerScalarScalarOpList_H

// EOF


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>org.kymjs.aframe.ui.activity 类分层结构</title>
<meta name="date" content="2014-10-23">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">

您的浏览器已禁用 JavaScript。

跳过导航链接

概览

程序包

类

使用

树

已过时

索引

帮助

上一个

下一个

框架

无框架

所有类

程序包org.kymjs.aframe.ui.activity的分层结构

程序包分层结构:

所有程序包

类分层结构

java.lang.Object

Activity

org.kymjs.aframe.ui.activity.KJFrameActivity (implements org.kymjs.aframe.ui.I_BroadcastReg, org.kymjs.aframe.ui.activity.I_KJActivity, org.kymjs.aframe.ui.activity.I_SkipActivity)

org.kymjs.aframe.ui.activity.BaseActivity

org.kymjs.aframe.ui.activity.BaseSplash

org.kymjs.aframe.ui.activity.KJFragmentActivity

org.kymjs.aframe.ui.activity.SlidTemplet (implements org.kymjs.aframe.ui.widget.ResideMenuItem.OnMenuClickListener)

org.kymjs.aframe.ui.activity.SimpleBrowserTemplet

接口分层结构

org.kymjs.aframe.ui.activity.I_KJActivity

org.kymjs.aframe.ui.activity.I_SkipActivity

枚举分层结构

java.lang.Object

java.lang.Enum<E> (implements java.lang.Comparable<T>, java.io.Serializable)

org.kymjs.aframe.ui.activity.BaseActivity.ActivityState

org.kymjs.aframe.ui.activity.BaseActivity.ScreenOrientation

跳过导航链接

概览

程序包

类

使用

树

已过时

索引

帮助

上一个

下一个

框架

无框架

所有类


text:
//
// Copyright 2012 Hakan Kjellerstrand
//
// 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.

using System;
using System.Collections;
using System.IO;
using System.Linq;
using System.Text.RegularExpressions;
using Google.OrTools.ConstraintSolver;

public class CuriousSetOfIntegers
{

  public static void Decreasing(Solver solver, IntVar[] x) {
    for(int i = 0; i < x.Length - 1; i++) {
      solver.Add(x[i] <= x[i+1]);
    }
  }

  /**
   *
   * Crypto problem in Google CP Solver.
   *
   * Martin Gardner (February 1967):
   * """
   * The integers 1,3,8, and 120 form a set with a remarkable property: the
   * product of any two integers is one less than a perfect square. Find
   * a fifth number that can be added to the set without destroying
   * this property.
   * """
   *
   * Also see, http://www.hakank.org/or-tools/curious_set_of_integers.py
   *
   */
  private static void Solve()
  {

    Solver solver = new Solver("CuriousSetOfIntegers");

    //
    // data
    //
    int n = 5;
    int max_val = 10000;

    //
    // Decision variables
    //
    IntVar[] x = solver.MakeIntVarArray(n, 0, max_val, "x");

    //
    // Constraints
    //
    solver.Add(x.AllDifferent());

    for(int i = 0; i < n - 1; i++) {
      for(int j = i + 1; j < n; j++) {
        IntVar p = solver.MakeIntVar(0, max_val);
        solver.Add((p.Square() - 1) - (x[i] * x[j]) == 0);
      }
    }

    // Symmetry breaking
    Decreasing(solver, x);

    // This is the original problem
    // Which is the fifth number?
    int[] v = {1,3,8,120};
    IntVar[] b = (from i in Enumerable.Range(0, n)
                  select x[i].IsMember(v)).ToArray();
    solver.Add(b.Sum() == 4);

    //
    // Search
    //
    DecisionBuilder db = solver.MakePhase(x,
                                          Solver.CHOOSE_MIN_SIZE_LOWEST_MIN,
                                          Solver.ASSIGN_MIN_VALUE);

    solver.NewSearch(db);

    while (solver.NextSolution()) {
      for(int i = 0; i < n; i++) {
        Console.Write(x[i].Value() + " ");
      }
      Console.WriteLine();
    }

    Console.WriteLine("\nSolutions: {0}", solver.Solutions());
    Console.WriteLine("WallTime: {0}ms", solver.WallTime());
    Console.WriteLine("Failures: {0}", solver.Failures());
    Console.WriteLine("Branches: {0} ", solver.Branches());

    solver.EndSearch();

  }

  public static void Main(String[] args)
  {

    Solve();

  }
}


text:
package de.andreasgiemza.mangadownloader.sites.implementations.englishscanlationgroups;

import de.andreasgiemza.mangadownloader.data.Chapter;
import de.andreasgiemza.mangadownloader.data.Image;
import de.andreasgiemza.mangadownloader.data.Manga;
import de.andreasgiemza.mangadownloader.helpers.JsoupHelper;
import de.andreasgiemza.mangadownloader.sites.Site;
import java.util.Arrays;
import java.util.LinkedList;
import java.util.List;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;

/**
 *
 * @author Andreas Giemza <andreas@giemza.net>
 */
public class Mangacow implements Site {

    private final String name = "Mangacow";
    private final String url = "http://mangacow.co/";
    private final List<String> language = Arrays.asList("English");
    private final Boolean watermarks = false;

    @Override
    public List<Manga> getMangaList() throws Exception {
        List<Manga> mangas = new LinkedList<>();

        Document doc = JsoupHelper.getHTMLPage(url
                + "/manga-list/all/any/name-az/");

        Element nav = doc.select("ul[class=pgg]").first();

        int pages = 1;

        if (nav != null) {
            String data = nav.select("li").last().select("a").attr("href");
            String[] dataArray = data.split("/");

            pages = Integer.parseInt(dataArray[dataArray.length - 1]);
        }

        for (int i = 1; i <= pages; i++) {
            if (i != 1) {
                doc = JsoupHelper.getHTMLPage(url
                        + "/manga-list/all/any/name-az/" + i + "/");
            }

            Elements rows = doc.select("div[class=wpm_pag mng_lst tbn]")
                    .first().select("div[class^=nde]");

            for (Element row : rows) {
                Element link = row.select("div[class=det]").first().select("a")
                        .first();
                mangas.add(new Manga(link.attr("href"), link.text()));
            }
        }

        return mangas;
    }

    @Override
    public List<Chapter> getChapterList(Manga manga) throws Exception {
        List<Chapter> chapters = new LinkedList<>();

        Document doc = JsoupHelper.getHTMLPage(manga.getLink());

        Element nav = doc.select("ul[class=pgg]").first();

        int pages = 1;

        if (nav != null) {
            String data = nav.select("li").last().select("a").attr("href");
            String[] dataArray = data.split("/");

            pages = Integer.parseInt(dataArray[dataArray.length - 1]);
        }

        for (int i = 1; i <= pages; i++) {
            if (i != 1) {
                doc = JsoupHelper.getHTMLPage(manga.getLink() + "chapter-list/"
                        + i + "/");
            }

            Elements rows = doc.select("ul[class^=lst]").first().select("li");

            for (Element row : rows) {
                Element link = row.select("a").first();

                chapters.add(new Chapter(manga, link.attr("href"), link
                        .select("b[class=val]").first().text()));
            }
        }

        return chapters;
    }

    @Override
    public List<Image> getChapterImageLinks(Chapter chapter) throws Exception {
        List<Image> images = new LinkedList<>();

        String referrer = chapter.getLink();
        Document doc = JsoupHelper.getHTMLPage(referrer);

        Elements nav = doc.select("select[class=cbo_wpm_pag]").first()
                .select("option");

        int pages = nav.size();

        for (int i = 1; i <= pages; i++) {
            if (i != 1) {
                referrer = chapter.getLink() + (i) + "/";
                doc = JsoupHelper.getHTMLPage(referrer);
            }

            String link = doc.select("div[class=prw]").first().select("img")
                    .attr("src");
            String extension = link.substring(link.length() - 3, link.length());

            images.add(new Image(link, referrer, extension));
        }

        return images;
    }

    @Override
    public String getName() {
        return name;
    }

    @Override
    public String getUrl() {
        return url;
    }

    @Override
    public List<String> getLanguage() {
        return language;
    }

    @Override
    public Boolean hasWatermarks() {
        return watermarks;
    }
}


text:
from mistral_lib.exceptions import MistralException

class UnauthorizedException(MistralException):
    http_code = 401
    message = "Unauthorized"

class ApplicationContextNotFoundException(MistralException):
    http_code = 400
    message = "Application context not found"

class ActionException(MistralException):
    http_code = 400


text:
package de.fhg.iais.cortex.services.ingest.worker;

import java.io.InputStream;
import java.util.Arrays;
import java.util.List;

import javax.xml.bind.JAXBException;

import org.junit.Before;
import org.junit.Test;
import org.mockito.Matchers;
import org.mockito.Mockito;

import de.fhg.iais.cortex.model.aip.AipObject;
import de.fhg.iais.cortex.model.aip.util.IAipBinaries;
import de.fhg.iais.cortex.services.IIngestContext;
import de.fhg.iais.cortex.services.ingest.DataErrorIngestException;
import de.fhg.iais.cortex.services.ingest.ZipStreamAipBinaries;
import de.fhg.iais.cortex.storage.IStorage;

public class ArchiveContentWorkerTest {

    private IIngestContext ctx;
    private AipObject aip;
    private IStorage storage;
    private IAipBinaries binaries;

    private final List<String> pathNames = Arrays.asList(new String[] {
        "binaries/grid/1.jpg", "binaries/full/1.jpg", "binaries/list/1.jpg", "binaries/mvpr/1.jpg", "binaries/mvth/1.jpg", "binaries/orig/1.jpg"
    });

    private static final String CORTEX_ITEM_ID = "123454321";

    @Before
    public void setUp() throws Exception {

        InputStream binariesZip = BinaryResolutionWorkerTest.class.getResourceAsStream("/binaries_as_zip.sip");
        this.binaries = new ZipStreamAipBinaries(binariesZip);

        this.aip = Mockito.mock(AipObject.class);
        Mockito.stub(this.aip.getBinaries()).toReturn(this.binaries);

        this.ctx = Mockito.mock(IIngestContext.class);
        Mockito.stub(this.ctx.getItemId()).toReturn(CORTEX_ITEM_ID);
        Mockito.stub(this.ctx.getAipObject()).toReturn(this.aip);
        Mockito
            .doThrow(new DataErrorIngestException("1", "error", null))
            .when(this.ctx)
            .reportAndThrowDataError(Matchers.anyString(), Matchers.anyString(), Matchers.anyString(), Matchers.any(Throwable.class));

        this.storage = Mockito.mock(IStorage.class);

    }

    @Test
    public void testApply() throws JAXBException {
        ArchiveContentWorker worker = new ArchiveContentWorker();

        worker.setStorage(this.storage);

        worker.apply(this.ctx);

        Mockito.verify(this.storage, Mockito.times(this.pathNames.size())).writeBinary(
            Matchers.anyString(),
            Matchers.anyString(),
            Matchers.any(InputStream.class));

        for ( String path : this.pathNames ) {
            Mockito.verify(this.storage).writeBinary(Matchers.eq(CORTEX_ITEM_ID), Matchers.eq(path), Matchers.any(InputStream.class));
        }

        Mockito.verify(this.storage).storeAIP(this.aip);
    }

}


text:
from django.db import migrations, models
import uuid

class Migration(migrations.Migration):

    dependencies = [
        ('tourism', '0017_auto_20211022_1255'),
    ]

    operations = [
        migrations.AlterField(
            model_name='touristiccontent',
            name='uuid',
            field=models.UUIDField(default=uuid.uuid4, editable=False, unique=True),
        ),
        migrations.AlterField(
            model_name='touristicevent',
            name='uuid',
            field=models.UUIDField(default=uuid.uuid4, editable=False, unique=True),
        ),
    ]


text:
import UnCheckedIcon from '@material-ui/icons/CheckBoxOutlineBlankRounded';
import CheckedIcon from '@material-ui/icons/CheckBoxRounded';
import { ICellRendererParams } from 'ag-grid-community';
import * as React from 'react';
import styled from 'styled-components';

const Wrapper = styled.div`
  display: flex;
  width: 100%;
  height: 50px;
  align-items: center;
  justify-content: center;
`;

const BooleanRenderer = ({ value }: ICellRendererParams) => (
  <Wrapper>{value ? <CheckedIcon /> : <UnCheckedIcon />}</Wrapper>
);
export default BooleanRenderer;


text:
import os

MODEL_DIR = "imagenet"
NUM_PREDICTIONS = 5
label_lookup_path = os.path.join(
  MODEL_DIR, 'imagenet_2012_challenge_label_map_proto.pbtxt')
uid_lookup_path = os.path.join(
  MODEL_DIR, 'imagenet_synset_to_human_label_map.txt')
graph_file = os.path.join(MODEL_DIR, "classify_image_graph_def.pb")

IMAGES_ROOT = "/home/alse/Pictures"


text:
package org.apache.tomcat.spdy;

import java.io.IOException;

import org.apache.tomcat.jni.SSLExt;
import org.apache.tomcat.jni.Status;
import org.apache.tomcat.jni.socket.AprSocket;
import org.apache.tomcat.jni.socket.AprSocketContext;
import org.apache.tomcat.jni.socket.AprSocketContext.NonBlockingPollHandler;
import org.apache.tomcat.jni.socket.AprSocketContext.TlsCertVerifier;

public class NetSupportOpenSSL extends SpdyContext.NetSupport {

    private AprSocketContext con;

    public NetSupportOpenSSL() {
        con = new AprSocketContext();
        //if (insecureCerts) {
        con.customVerification(new TlsCertVerifier() {
            @Override
            public void handshakeDone(AprSocket ch) {
            }
        });
        //}
        con.setNpn("spdy/2");
    }

    @Override
    public boolean isSpdy(Object socketW) {
        byte[] proto = new byte[32];
        int len = SSLExt.getNPN(((Long) socketW).longValue(), proto);
        return len == 6; // todo: check spdy/2
    }

    @Override
    public SpdyConnection getConnection(String host, int port) throws IOException {
        SpdyConnectionAprSocket spdy = new SpdyConnectionAprSocket(ctx);

        AprSocket ch = con.socket(host, port, ctx.tls);

        spdy.setSocket(ch);

        ch.connect();

        ch.setHandler(new SpdySocketHandler(spdy));

        // need to consume the input to receive more read events
        int rc = spdy.processInput();
        if (rc == SpdyConnection.CLOSE) {
            ch.close();
            throw new IOException("Error connecting");
        }

        return spdy;
    }

    @Override
    public void onAccept(Object socket) {
        onAcceptLong(((Long) socket).longValue());
    }

    public void onAcceptLong(long socket) {
        SpdyConnectionAprSocket spdy = new SpdyConnectionAprSocket(ctx);
        AprSocket s = con.socket(socket);
        spdy.setSocket(s);

        SpdySocketHandler handler = new SpdySocketHandler(spdy);
        s.setHandler(handler);
        handler.process(s, true, true, false);
    }

    public AprSocketContext getAprContext() {
        return con;
    }

    @Override
    public void listen(final int port, String cert, String key) throws IOException {
        con = new AprSocketContext() {
            @Override
            protected void onSocket(AprSocket s) {
                SpdyConnectionAprSocket spdy = new SpdyConnectionAprSocket(ctx);
                spdy.setSocket(s);

                SpdySocketHandler handler = new SpdySocketHandler(spdy);
                s.setHandler(handler);
            }
        };

        con.setNpn(SpdyContext.SPDY_NPN_OUT);
        con.setKeys(cert, key);

        con.listen(port);
    }

    @Override
    public void stop() throws IOException {
        con.stop();
    }

    // NB
    private static class SpdySocketHandler implements NonBlockingPollHandler {
        private final SpdyConnection con;

        SpdySocketHandler(SpdyConnection con) {
            this.con = con;
        }

        @Override
        public void closed(AprSocket ch) {
            // not used ( polling not implemented yet )
        }

        @Override
        public void process(AprSocket ch, boolean in, boolean out, boolean close) {
            try {
                int rc = con.processInput();
                if (rc == SpdyConnection.CLOSE) {
                    ch.close();
                }
                con.drain();
            } catch (IOException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
                ch.reset();
            }
        }

        @Override
        public void connected(AprSocket ch) {
        }

        @Override
        public void error(AprSocket ch, Throwable t) {
        }

    }

    private static class SpdyConnectionAprSocket extends SpdyConnection {
        private AprSocket socket;

        public SpdyConnectionAprSocket(SpdyContext spdyContext) {
            super(spdyContext);
        }

        public void setSocket(AprSocket ch) {
            this.socket = ch;
        }

        @Override
        public void close() throws IOException {
            socket.close();
        }

        @Override
        public int write(byte[] data, int off, int len) throws IOException {
            if (socket == null) {
                return -1;
            }
            int sent = socket.write(data, off, len);
            if (sent < 0) {
                return -1;
            }
            return sent;
        }

        /**
         * @throws IOException
         */
        @Override
        public int read(byte[] data, int off, int len) throws IOException {
            if (socket == null) {
                return -1;
            }
            int rd = socket.read(data, off, len);
            // org.apache.tomcat.jni.Socket.recv(socket, data, off, len);
            if (rd == -Status.APR_EOF) {
                return -1;
            }
            if (rd == -Status.TIMEUP || rd == -Status.EINTR || rd == -Status.EAGAIN) {
                rd = 0;
            }
            if (rd < 0) {
                return -1;
            }
            return rd;
        }
    }

}


text:
class CreateProductPrizes < ActiveRecord::Migration
  def change
    create_table :product_prizes do |t|
      t.belongs_to :product, index: true, foreign_key: true
      t.decimal :sale_prize, precision: 13, scale: 3
      t.decimal :buy_prize, precision: 13, scale: 3
      t.belongs_to :user, index: true, foreign_key: true

      t.timestamps null: false
    end
  end
end


text:
Puppet::Type.type(:ini_setting)#.providers

Puppet::Type.type(:quantum_plugin_ovs).provide(
  :ini_setting,
  :parent => Puppet::Type::Ini_setting::ProviderRuby
) do

  def section
    resource[:name].split('/', 2).first
  end

  def setting
    resource[:name].split('/', 2).last
  end

  def separator
    '='
  end

  def file_path
    '/etc/quantum/plugins/openvswitch/ovs_quantum_plugin.ini'
  end

end


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

    public class PlayerInformation
    {
        private string name;
        private int collectedPoints;

        public PlayerInformation()
        {
        }

        public PlayerInformation(string name, int collectedPoits)
        {
            this.name = name;
            this.collectedPoints = collectedPoits;
        }

        public string Name
        {
            get { return this.name; }
            set { this.name = value; }
        }

        public int CollectedPoints
        {
            get { return this.collectedPoints; }
            set { this.collectedPoints = value; }
        }
    }
}


text:
from __future__ import division

import pytest

from mapproxy.test.system import SysTest
from mapproxy.test.system.test_wms import (
    is_111_capa,
    is_110_capa,
    is_100_capa,
    is_130_capa,
    ns130,
)

TESTSERVER_ADDRESS = "localhost", 42423

class TestWMSWithRoot(SysTest):

    @pytest.fixture(scope="class")
    def config_file(self):
        return "layergroups_root.yaml"

    def _check_layernames(self, xml):
        assert xml.xpath("//Capability/Layer/Title/text()") == ["Root Layer"]
        assert xml.xpath("//Capability/Layer/Name/text()") == ["root"]
        assert xml.xpath("//Capability/Layer/Layer/Name/text()") == ["layer1", "layer2"]
        assert xml.xpath("//Capability/Layer/Layer[1]/Layer/Name/text()") == [
            "layer1a",
            "layer1b",
        ]

    def _check_layernames_with_namespace(self, xml, namespaces=None):
        assert xml.xpath(
            "//wms:Capability/wms:Layer/wms:Title/text()", namespaces=namespaces
        ) == ["Root Layer"]
        assert xml.xpath(
            "//wms:Capability/wms:Layer/wms:Name/text()", namespaces=namespaces
        ) == ["root"]
        assert xml.xpath(
            "//wms:Capability/wms:Layer/wms:Layer/wms:Name/text()",
            namespaces=namespaces,
        ) == ["layer1", "layer2"]
        assert xml.xpath(
            "//wms:Capability/wms:Layer/wms:Layer[1]/wms:Layer/wms:Name/text()",
            namespaces=namespaces,
        ) == ["layer1a", "layer1b"]

    def test_100_capa(self, app):
        resp = app.get("/service?request=GetCapabilities&service=WMS&wmtver=1.0.0")
        xml = resp.lxml
        assert is_100_capa(xml)
        self._check_layernames(xml)

    def test_110_capa(self, app):
        resp = app.get("/service?request=GetCapabilities&service=WMS&version=1.1.0")
        xml = resp.lxml
        assert is_110_capa(xml)
        self._check_layernames(xml)

    def test_111_capa(self, app):
        resp = app.get("/service?request=GetCapabilities&service=WMS&version=1.1.1")
        xml = resp.lxml
        assert is_111_capa(xml)
        self._check_layernames(xml)

    def test_130_capa(self, app):
        resp = app.get("/service?request=GetCapabilities&service=WMS&version=1.3.0")
        xml = resp.lxml
        assert is_130_capa(xml)
        self._check_layernames_with_namespace(xml, ns130)

class TestWMSWithoutRoot(SysTest):

    @pytest.fixture(scope="class")
    def config_file(self):
        return "layergroups.yaml"

    def _check_layernames(self, xml):
        assert xml.xpath("//Capability/Layer/Title/text()") == ["My WMS"]
        assert xml.xpath("//Capability/Layer/Name/text()") == []
        assert xml.xpath("//Capability/Layer/Layer/Name/text()") == ["layer1", "layer2"]
        assert xml.xpath("//Capability/Layer/Layer[1]/Layer/Name/text()") == [
            "layer1a",
            "layer1b",
        ]
        assert xml.xpath("//Capability/Layer/Layer[2]/Layer/Name/text()") == [
            "layer2a",
            "layer2b",
        ]
        assert xml.xpath("//Capability/Layer/Layer[2]/Layer/Layer[1]/Name/text()") == [
            "layer2b1"
        ]

    def _check_layernames_with_namespace(self, xml, namespaces=None):
        assert xml.xpath(
            "//wms:Capability/wms:Layer/wms:Title/text()", namespaces=namespaces
        ) == ["My WMS"]
        assert (
            xml.xpath(
                "//wms:Capability/wms:Layer/wms:Name/text()", namespaces=namespaces
            )
            == []
        )
        assert xml.xpath(
            "//wms:Capability/wms:Layer/wms:Layer/wms:Name/text()",
            namespaces=namespaces,
        ), ["layer1" == "layer2"]
        assert xml.xpath(
            "//wms:Capability/wms:Layer/wms:Layer[1]/wms:Layer/wms:Name/text()",
            namespaces=namespaces,
        ) == ["layer1a", "layer1b"]
        assert xml.xpath(
            "//wms:Capability/wms:Layer/wms:Layer[2]/wms:Layer/wms:Name/text()",
            namespaces=namespaces,
        ) == ["layer2a", "layer2b"]
        assert xml.xpath(
            "//wms:Capability/wms:Layer/wms:Layer[2]/wms:Layer/wms:Layer[1]/wms:Name/text()",
            namespaces=namespaces,
        ) == ["layer2b1"]

    def test_100_capa(self, app):
        resp = app.get("/service?request=GetCapabilities&service=WMS&wmtver=1.0.0")
        xml = resp.lxml
        assert is_100_capa(xml)
        self._check_layernames(xml)

    def test_110_capa(self, app):
        resp = app.get("/service?request=GetCapabilities&service=WMS&version=1.1.0")
        xml = resp.lxml
        assert is_110_capa(xml)
        self._check_layernames(xml)

    def test_111_capa(self, app):
        resp = app.get("/service?request=GetCapabilities&service=WMS&version=1.1.1")
        xml = resp.lxml
        assert is_111_capa(xml)
        self._check_layernames(xml)

    def test_130_capa(self, app):
        resp = app.get("/service?request=GetCapabilities&service=WMS&version=1.3.0")
        xml = resp.lxml
        assert is_130_capa(xml)
        self._check_layernames_with_namespace(xml, ns130)


text:
class CrazyExampleObject

  def self.class_method_foo
    "class_method"
  end

  def instance_method_foo
    "instance_method"
  end

end


text:
David Eads, Daniel Smith, Federico Bongiovanni

[Source](https://github.com/kubernetes/community/blob/master/committee-steering/governance/annual-reports.md)

## Checklist
- [x] Read about the process [here](https://git.k8s.io/community/committee-steering/governance/annual-reports.md#reporting-process)
- [ ] Copy this template into a new document and share with your mailing list/slack channel/meeting on whatever platform (gdocs, hackmd, etc.) that the team prefers.
- [x] Remove sections that are not applicable (example: if you are a working group, delete the special interest group questions)
- [ ] Pick graphs from Devstats to pull supporting data for your responses.
- [ ] Schedule a time with your Steering liaison and other Chairs, TLs, and Organizers of your group to check-in on your
      roles as Chair or Working Group Organizer.
      If anyone would rather meet 1:1, please have them reach out to the liaison directly, we are happy to.
      We'd like to talk about: challenges, wins, things you didn't know before but wish you did, want to continue in the
      role or help finding a replacement; and lastly any feedback you have for us as a body and how we can help you
      succeed and feel comfortable in these leadership roles.
- [x] PR this document into your community group directory in kubernetes/community (example: sig-architecture/)
  - [x] by March 8th, 2021
  - [x] titled: annual-report-YEAR.md
- [x] are there any responses that you'd like to share privately first? steering-private@kubernetes.io or tag your liaison in for discussion.

## Operational
1. How are you doing with operational tasks in SIG-governance.md?
   1. Is your README accurate? have a CONTRIBUTING.md file?

      Yes, the [README](https://github.com/kubernetes/community/blob/master/sig-api-machinery/README.md) is accurate.
   2. All subprojects correctly mapped and listed in sigs.yaml?

      Yes, our [subprojects](https://github.com/kubernetes/community/blob/master/sig-api-machinery/README.md#subprojects) are current.
   3. What's your meeting culture? Large/small, active/quiet, learnings? Meeting notes up to date?

      Are you keeping recordings up to date/trends in community members watching recordings?

      We have two main meetings, both fairly small, with [notes and agenda up to date](https://docs.google.com/document/d/1x9RNaaysyO0gXHIr1y50QFbiL1x8OWnk2v3XnrdkT5Y/edit).
      [Our recordings](https://www.youtube.com/playlist?list=PL69nYSiGNLP21oW3hbLyjjj4XhrwKxH2R) are usually uploaded within two weeks.

      There are bug scrub meetings every Tuesday and Thursday.

2. How does the group get updates, reports, or feedback from subprojects?
   Are there any springing up or being retired? Are OWNERS.md files up to date in these areas?

   We get updates on an ad-hoc basis.
   We have approved a prototyping project ([apiserver-runtime](https://github.com/kubernetes-sigs/apiserver-runtime)) and have no plans to retire any at this time.
   We have not actively pruned OWNERS, some people have been added to various subprojects.

3. Same question as above but for working groups.
   [wg-api-expression](https://github.com/kubernetes/community/blob/master/wg-api-expression/README.md) has its own
   regular meeting cadence and did its own [annual report](https://github.com/kubernetes/community/blob/master/wg-api-expression/2020-annual-report.md).

   [wg-component-standard](https://github.com/kubernetes/community/blob/master/wg-component-standard/README.md) has its own
   regular meeting cadence.
   The working group is not as active as it once was, see the [mailing list thread](https://groups.google.com/g/kubernetes-dev/c/sQGrk6HWyj0).

   [wg-multitenancy](https://github.com/kubernetes/community/tree/master/wg-multitenancy) has its own regular meeting cadence
   and did its own [annual report](https://github.com/kubernetes/community/blob/master/wg-multitenancy/2021-annual-report.md).

4. When was your last public community-wide update? (provide link to deck and/or recording)
   [May 2020](https://docs.google.com/presentation/d/1UWRaMVtTD3yVhJ3MGBpt7LRIaRHTaQZoGlDT7Bl7jLE/edit#slide=id.g401c104a3c_0_0)

## Membership
1. Are all listed SIG leaders (chairs, tech leads, and subproject owners) active?

   Yes.

2. How do you measure membership? By mailing list members, OWNERs, or something else?

   We don't measure membership.

3. How does the group measure reviewer and approver bandwidth?
   Do you need help in any area now? What are you doing about it?

   Our predicted rate of feature delivery and stability roughly matches the achieved rate.
   While we would be happy to see developers move up the ladder, we don't see a pressing need to adjust the current rate.

   We perform twice a week triage and our [issue open/close rates are holding steady](https://k8s.devstats.cncf.io/d/39/issues-opened-closed-by-sig?orgId=1&var-period=d7&var-sig_name=api-machinery&var-kind_name=All).

4. Is there a healthy onboarding and growth path for contributors in your SIG? What are some activities that the group
   does to encourage this? What programs are you participating in to grow contributors throughout the contributor ladder?

   We see patches from first time contributors, we regularly accept agenda items from contributors from other sigs and
   first time contributors.

5. What programs do you participate in for new contributors?

   We don't participate in any particular programs.
   We find many contributors via slack, PRs, and issues.

6. Does the group have contributors from multiple companies/affiliations?
   Can end users/companies contribute in some way that they currently are not?

   Yes, there are contributors from [multiple companies](https://k8s.devstats.cncf.io/d/74/contributions-chart?orgId=1&var-period=d7&var-metric=contributions&var-repogroup_name=SIG%20API%20Machinery&var-country_name=All&var-company_name=All&var-company=all).
   We see all sorts of contributions, varying from issues, to comments, to PRs, to designs, to sig meeting participation,
   and user-survey data.

## Current initiatives and project health
1. What are initiatives that should be highlighted, lauded, shout outs, that your group is proud of? Currently underway?
   What are some of the longer tail projects that your group is working on?

   Currently underway:
   1. [server-side-apply](https://github.com/kubernetes/enhancements/issues/555) to GA
   2. [server-side-apply client](https://github.com/kubernetes/enhancements/tree/master/keps/sig-api-machinery/2144-clientgo-apply#alternative-1-generated-structs-where-all-fields-are-pointers)
   3. [optionally skip backend TLS verifiction](https://github.com/kubernetes/enhancements/issues/1295)
   4. [namespace labels](https://github.com/kubernetes/enhancements/pull/2162)
   5. Getting ready for CRD and admission webhook v1beta1 API removal: [reminder on kubernetes-dev](https://groups.google.com/g/kubernetes-dev/c/z_AE1EHhZF4/m/kBd3HkWxAwAJ).
   6. [Immutable fields API](https://github.com/kubernetes/enhancements/issues/1101)
   7. [API unions](https://github.com/kubernetes/enhancements/issues/1027)
   8. [warnings to GA](https://github.com/kubernetes/enhancements/issues/1693)
   9. [apiserver network proxy to beta](https://github.com/kubernetes/enhancements/issues/1281)
   10. [priority and fairness to GA](https://github.com/kubernetes/enhancements/issues/1040)

2. Year to date KEP work: What's now stable? Beta? Alpha? Road to alpha?
   1. Stable
      1. [Selector index](https://github.com/kubernetes/kubernetes/commit/fea3042f1f84129ab1cb6e481bd51343061673b7) - 1.20
      2. [Permabeta machinery (sig-arch policy)](https://github.com/kubernetes/enhancements/blob/master/keps/sig-architecture/1635-prevent-permabeta/README.md) - 1.19
      3. [Client-go context](https://github.com/kubernetes/enhancements/blob/master/keps/sig-api-machinery/1601-client-go-context/README.md) - 1.18
      4. [Client-go options](https://github.com/kubernetes/enhancements/blob/master/keps/sig-api-machinery/1601-client-go-context/README.md) - 1.18
      5. [Dry run](https://github.com/kubernetes/enhancements/blob/master/keps/sig-api-machinery/576-dry-run/README.md) - 1.18
      6. [Standardize conditions](https://github.com/kubernetes/enhancements/blob/master/keps/sig-api-machinery/1623-standardize-conditions/README.md) - 1.19
   2. Beta
      1. [Priority and fairness](https://github.com/kubernetes/enhancements/blob/master/keps/sig-api-machinery/1040-priority-and-fairness/README.md) - 1.20
      2. [Selector index](https://github.com/kubernetes/kubernetes/pull/92503) - 1.19
      3. [Self-link removal](https://github.com/kubernetes/enhancements/blob/master/keps/sig-api-machinery/1164-remove-selflink/README.md) - 1.20
      4. [Warning headers](https://github.com/kubernetes/enhancements/blob/master/keps/sig-api-machinery/1693-warnings/README.md) - 1.19
      5. [Server-side apply evolution while in beta](https://github.com/kubernetes/enhancements/blob/master/keps/sig-api-machinery/555-server-side-apply/README.md) - 1.18, 1.19, 1.20
   3. Alpha
      1. [Selector index](https://github.com/kubernetes/kubernetes/pull/87939) - 1.18
      2. [API server identity](https://github.com/kubernetes/enhancements/blob/master/keps/sig-api-machinery/1965-kube-apiserver-identity/README.md) - 1.20
      3. [Efficient watch resumption](https://github.com/kubernetes/enhancements/issues/1904) - 1.20
   4. Pre-alpha
      1. [Manifest-based admission webhook](https://github.com/kubernetes/enhancements/blob/master/keps/sig-api-machinery/1872-manifest-based-admission-webhooks/README.md)

3. What initiatives are you working on that aren't being tracked in KEPs?

   We are working on mitigating the impact of removing beta APIs in 1.22.

4. What areas and/or subprojects does the group need the most help with?

   The SIG sponsors some working groups that are largely independent.

   There are several areas where regularly the SIG becomes under pressure, especially closer to code freezes and the
   vast amount of code owned by API Machinery.

   The ecosystem of the different Kubernetes Clients that we own grows more or less organically. Client-go and
   Python-client are probably the bigger ones.

   There are some packages that API Machinery owns and come out usually in our triage meetings, and that we most likely
   don't know much about: this happens often when Kubernetes is upgrading libraries for example.

5. What metrics/community health stats does your group care about and/or measure? Examples?

   On the technical health of the SIG, we look at
   - the ratio of open/close PRs
   - the ratio of open/close Issues
   - overall age of open Issues
   - Number of active contributors to the sig
   - diverse representation of companies in the sig participants


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

    <TextView
        android:id="@+id/tv_check_id"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:textColor="#000000"
        android:textSize="26sp"
        android:visibility="gone" />

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal" >

        <TextView
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="0.35"
            android:text="@string/name" />

        <EditText
            android:id="@+id/tv_name"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="0.65"
            android:ems="10"
            android:hint="@string/enter_name" />
    </LinearLayout>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal" >

        <TextView
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="0.35"
            android:text="@string/father_name" />

        <EditText
            android:id="@+id/et_father_name"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="0.65"
            android:ems="10"
            android:hint="@string/enter_father_name" />
    </LinearLayout>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal" >

        <TextView
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="0.35"
            android:text="@string/mother_name" />

        <EditText
            android:id="@+id/et_mother_name"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="0.65"
            android:ems="10"
            android:hint="@string/enter_mother_name" />
    </LinearLayout>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal" >

        <TextView
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="0.35"
            android:text="@string/age" />

        <EditText
            android:id="@+id/et_age"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="0.65"
            android:ems="10"
            android:hint="@string/enter_age"
            android:inputType="numberSigned" />
    </LinearLayout>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal" >

        <View
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="0.25" />

        <LinearLayout
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="0.75"
            android:orientation="horizontal" >

            <Button
                android:id="@+id/btnSubmit"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:ems="5"
                android:onClick="myClickHandler"
                android:text="@string/submit" />

            <Button
                android:id="@+id/btnCancel"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:ems="5"
                android:onClick="myClickHandler"
                android:text="@string/cancel" />
        </LinearLayout>
    </LinearLayout>

</LinearLayout>