text:
package com.microservices.support.filters;

import com.google.gson.Gson;
import com.microservices.support.config.SystemConfig;
import com.microservices.support.domain.*;
import com.microservices.support.repository.RUserPermissionRepository;
import com.microservices.support.repository.UserActionRepository;
import com.microservices.support.repository.UserRepository;
import com.microservices.support.workers.AsyncExecutor;
import com.microservices.support.workers.tasks.UserActionLogTask;
import com.netflix.zuul.ZuulFilter;
import com.netflix.zuul.context.RequestContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.data.redis.core.StringRedisTemplate;

import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletRequest;
import java.security.Principal;
import java.sql.Timestamp;
import java.util.*;

/**
 * Created by yichen.wei on 6/25/17.
 */
public class RequestFilter extends ZuulFilter {
    private static Logger log = LoggerFactory.getLogger(RequestFilter.class);

    @Autowired
    private ApplicationContext applicationContext;

    @Autowired
    private UserRepository userRepository;

    @Autowired
    private AsyncExecutor asyncExecutor;

    @Autowired
    private StringRedisTemplate stringRedisTemplate;

    private static Gson gson = new Gson();

    @Autowired
    private RUserPermissionRepository rUserPermissionRepository;

//    @Autowired
//    private UserActionLogTask userActionLogTask;

    // 300 seconds
    private static final Long CACHE_EXPIRE_TTL = 300L;

    @Override
    public String filterType() {
        return "pre";
    }

    @Override
    public int filterOrder() {
        return 1;
    }

    @Override
    public boolean shouldFilter() {
        return true;
    }

    @Override
    public Object run() {
        RequestContext ctx = RequestContext.getCurrentContext();
        HttpServletRequest request = ctx.getRequest();
        // Map<String, List<String>> queryParams = new HashMap<>();
        String url = request.getRequestURL().toString();

        Principal principal = request.getUserPrincipal();

        Boolean needCheck = true;
        Boolean isGranted = false;
        String reason = "";
        Timestamp currentTime = new Timestamp(System.currentTimeMillis());

        log.info(String.format("requestFilter... %s request to %s", request.getMethod(), request.getRequestURL().toString()));

        if (principal != null) {
            String username = request.getUserPrincipal().getName();
            log.info("Add username to X-REQUEST-UN->", username);
            ctx.addZuulRequestHeader("X-REQUESTED-UN", username);
        }

        // TODO remove test only function
//        refreshRedisKeys();

        if (principal != null && principal.getName() != null) {

            UserActionLogTask userActionLogTask = applicationContext.getBean(UserActionLogTask.class);

            if (SystemConfig.PERMISSION_SWITCH) {
                // Only admin will do this check
                User user = userRepository.findByUsernameCaseInsensitive(request.getUserPrincipal().getName());
                log.info(user.getPrivileges().toArray().toString());

                // Request like /api/advertising/v1/publicads, take "advertising-publicads"
                String method = request.getMethod();
                String api = request.getRequestURI();
                // Get api permission from request: eg - get_/api/users/v1/teacher
                String permissionKey = (method + "_" + api).toLowerCase();

                UserAction.UserActionBuilder userAction = UserAction.builder()
                        .userName(user.getUsername())
                        .name(user.getName())
                        .apiMethod(method)
                        .apiName(api)
                        .userType(user.getType())
                        .schoolID(user.getSchoolId())
                        .schoolName(user.getSchoolName())
                        .userType(user.getType())
                        .actionTime(currentTime);

                // like school_admin
                if (SystemConfig.ROLE_WHITE_USER != null && SystemConfig.ROLE_WHITE_USER.contains(user.getUsername())
                        || SystemConfig.ROLE_WHITE_TYPE != null && SystemConfig.ROLE_WHITE_TYPE.contains(user.getType())
                        // api white list - get prefix
                        || SystemConfig.ROLE_WHITE_API != null && containsPrefix(SystemConfig.ROLE_WHITE_API, permissionKey)) {
                    needCheck = false;
                    isGranted = true;
                    reason = "in white list";
                    asyncExecutor.submit(userActionLogTask.BuildUser(
                            userAction
                                    .message(reason)
                                    .status(isGranted)
                                    .build()
                    ));
                    return null;
                }

                // 0 is "" - /api/advertising/v1/publicads
//            String[] apiPath = api.split("/");
//            if (apiPath.length < 4) {
//                reason = "unknown api";
//                isGranted = false;
//                asyncExecutor.submit(userActionLogTask.BuildUser(
//                    userAction
//                        .message(reason)
//                        .status(isGranted)
//                        .build()
//                ));
//                setErrorResponse(ctx, reason);
//                return null;
//            }

                Map<String, PermissionInfo> typePermission = SystemConfig.ROLE_DICTS.getRoles().get(user.getType());
                if (typePermission == null) {
                    reason = "unknown api with unknown user type";
                    isGranted = false;
                    asyncExecutor.submit(userActionLogTask.BuildUser(
                            userAction
                                    .message(reason)
                                    .status(isGranted)
                                    .build()
                    ));
                    setErrorResponse(ctx, reason);
                    return null;
                }
                // get by prefix
                PermissionInfo needPermission = getPermissionInfoByPrefix(typePermission, permissionKey);
                if (needPermission == null) {
                    reason = "unknown api with unknown permission";
                    isGranted = false;
                    asyncExecutor.submit(userActionLogTask.BuildUser(
                            userAction
                                    .message(reason)
                                    .status(isGranted)
                                    .build()
                    ));
                    setErrorResponse(ctx, reason);
                    return null;
                }
                String permissionStr = needPermission.getPermisionKey();
                String permissionName = needPermission.getPermissionName();
                String permissionDes = needPermission.getDescription();

                // username_method_api
                String rPermissionKey = user.getUsername() + "_" + permissionKey;
                RUserPermission rUserPermission = rUserPermissionRepository.findById(rPermissionKey).get();
                if (rUserPermission != null) {
                    isGranted = rUserPermission.getPermission();
                } else {
                    Set<Privilege> userRoles = user.getPrivileges();
                    Set<String> userPermissions = new HashSet<String>();
                    for (Privilege privilege : userRoles) {
                        String[] permissions = privilege.getPermissionIds().split(",");
                        for (String permit : permissions) {
                            if (permit.trim().equalsIgnoreCase(permissionStr)) { // has permission
                                isGranted = true;
                                break;
                            }
                        }
                    }
                    rUserPermissionRepository.save(
                            RUserPermission.builder()
                                    .id(rPermissionKey)
                                    .permission(isGranted)
                                    .expiration(CACHE_EXPIRE_TTL)
                                    .build()
                    );
                }

                if (isGranted) {
                    asyncExecutor.submit(userActionLogTask.BuildUser(
                            userAction
                                    .message(reason)
                                    .status(isGranted)
                                    .actionName(permissionName)
                                    .content(permissionDes)
                                    .build()
                    ));
                } else {
                    reason = "user do not have permission";
                    asyncExecutor.submit(userActionLogTask.BuildUser(
                            userAction
                                    .message(reason)
                                    .status(isGranted)
                                    .actionName(permissionName)
                                    .content(permissionDes)
                                    .build()
                    ));
                    setErrorResponse(ctx, reason);
                    return null;
                }
            } else { // Log operation
                String method = request.getMethod();
                String api = request.getRequestURI();
                // TODO log user asyc for query db
                UserAction.UserActionBuilder userAction = UserAction.builder()
                    .userName(principal.getName())
                    .apiMethod(method)
                    .apiName(api)
                    .actionTime(currentTime);
                asyncExecutor.submit(userActionLogTask.BuildUser(
                        userAction
                                .message(reason)
                                .status(isGranted)
                                .build()
                ));
            }
        } else {
            // Do not need log for anonymous user
        }

//        ctx.addZuulRequestHeader("Authorization", request.getHeader("Authorization"));

        return null;
    }

    private void setErrorResponse(RequestContext ctx, String errMsg) {
        log.warn(errMsg);
        ctx.setSendZuulResponse(false);
        ctx.setResponseStatusCode(404);
        ctx.setResponseBody("{\"result\":\"" + errMsg +"\"}");
        ctx.getResponse().setContentType("text/html;charset=UTF-8");
    }

    // Test only
    private void refreshRedisKeys() {
        // Get permission enable switch
        String permissionsSwitch = stringRedisTemplate.opsForValue().get(SystemConfig.PERMISSION_SWITCH_KEY);
        SystemConfig.PERMISSION_SWITCH = Boolean.parseBoolean(permissionsSwitch);
        log.info("enable permission check...", SystemConfig.PERMISSION_SWITCH);

        // Get permission dicts
        String permissionsDict = stringRedisTemplate.opsForValue().get(SystemConfig.ROLE_DICTS_KEY);
        if (SystemConfig.PERMISSION_SWITCH && (permissionsDict == null || permissionsDict.isEmpty() ) ) {
            throw new ExceptionInInitializerError("Can not get permission data from redis");
        }

        SystemConfig.ROLE_DICTS = gson.fromJson(permissionsDict, RoleDicts.class);
        log.info("get permission dict from redis...", permissionsDict);

        // Get white list of user type
        String permissionsWhiteType = stringRedisTemplate.opsForValue().get(SystemConfig.ROLE_WHITE_TYPE_KEY);
        if (permissionsWhiteType != null && !permissionsWhiteType.equals("")) {
            SystemConfig.ROLE_WHITE_TYPE = Arrays.asList(permissionsWhiteType.split(","));
        }

        // Get white list of api
        String permissionsWhiteAPI = stringRedisTemplate.opsForValue().get(SystemConfig.ROLE_WHITE_API_KEY);
        if (permissionsWhiteAPI != null && !permissionsWhiteAPI.equals("")) {
            SystemConfig.ROLE_WHITE_API = Arrays.asList(permissionsWhiteAPI.split(","));
        }

        // Get white list of username
        String permissionsWhiteUser = stringRedisTemplate.opsForValue().get(SystemConfig.ROLE_WHITE_USER_KEY);
        if (permissionsWhiteUser != null && !permissionsWhiteUser.equals("")) {
            SystemConfig.ROLE_WHITE_USER = Arrays.asList(permissionsWhiteUser.split(","));
        }
    }

    private boolean containsPrefix(List<String> dicts, String target) {
        for (String dict : dicts) {
            if (dict != null && !dict.isEmpty() && target.startsWith(dict))
                return true;
        }
        return false;
    }

    private PermissionInfo getPermissionInfoByPrefix(Map<String, PermissionInfo> perMap, String api) {
        for (Map.Entry<String, PermissionInfo> entry : perMap.entrySet()) {
            String key = entry.getKey();
            PermissionInfo val = entry.getValue();
            Boolean precise = val.getPrecise();
            if (precise != null && precise) {
                if (key.equalsIgnoreCase(api))
                    return val;
            } else {
                if (api != null && !api.isEmpty() && api.startsWith(key))
                    return val;
            }
        }
        return null;
    }
}


text:
from boto.regioninfo import RegionInfo

def regions():
    """
    Get all available regions for the AWS Redshift service.

    :rtype: list
    :return: A list of :class:`boto.regioninfo.RegionInfo`
    """
    from boto.redshift.layer1 import RedshiftConnection
    cls = RedshiftConnection
    return [
        RegionInfo(name='us-east-1',
                   endpoint='redshift.us-east-1.amazonaws.com',
                   connection_cls=cls),
        RegionInfo(name='us-west-2',
                   endpoint='redshift.us-west-2.amazonaws.com',
                   connection_cls=cls),
        RegionInfo(name='eu-west-1',
                   endpoint='redshift.eu-west-1.amazonaws.com',
                   connection_cls=cls),
    ]

def connect_to_region(region_name, **kw_params):
    for region in regions():
        if region.name == region_name:
            return region.connect(**kw_params)
    return None

redpajama_set_name: RedPajamaGithub


text:
void stop_music(void);

void start_music(void);

void handle_music(void);

#endif // MUSIC_H


text:
Community Contributed Examples have been shared by community members of the Parallax Forum.

http://forums.parallax.com

Support for using these libraries cannot be provided by the author of PropBasic or Parallax Inc.
The examples cannot be guaranteed to work for all users, but are shared in case they help in some way- at least as a starting point for new users.

For help with PropBasic or these community examples, try posting a question over at the Parallax forums.


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

/**
 * A builder API to create new, dynamically injected plan items into an existing, running stage instance.
 *
 * @author Micha Kiener
 */
public interface InjectedPlanItemInstanceBuilder {

    /**
     * The explicit name for the new plan item to be created, if this is not set, the name of the referenced element is taken instead.
     *
     * @param name the explicit name to be used for the new plan item, which superseeds the one from the referenced plan item model
     * @return the builder reference for method chaining
     */
    InjectedPlanItemInstanceBuilder name(String name);

    /**
     * The id of the case definition from which the referenced plan item model should be taken as the model for the new plan item to be created dynamically.
     *
     * @param caseDefinitionId the id of the case definition where the referenced plan item model is taken from
     * @return the builder reference for method chaining
     */
    InjectedPlanItemInstanceBuilder caseDefinitionId(String caseDefinitionId);

    /**
     * The id of the referenced element within the case model to be used as the base line for the new dynamic plan item to be created.
     *
     * @param elementId the id of the referenced plan item element within the case model
     * @return the builder reference for method chaining
     */
    InjectedPlanItemInstanceBuilder elementId(String elementId);

    /**
     * Create the newly setup plan item, add it to the parent running stage and plan it for activation and further processing in the case engine.
     *
     * @param stagePlanItemInstanceId the id of the running stage plan item instance to inject a new plan item into
     * @return the plan item instance dynamically be created
     */
    PlanItemInstance createInStage(String stagePlanItemInstanceId);

    /**
     * Create the newly setup plan item, add it to the parent running case instance and plan it for activation and further processing in the case engine.
     *
     * @param caseInstanceId the id of the running case instance to inject a new plan item into
     * @return the plan item instance dynamically be created
     */
    PlanItemInstance createInCase(String caseInstanceId);
}


text:
package com.lalalla.t.biyesheji;

import java.io.Serializable;

/**
 * Created by T on 2016/3/13.
 */
public class Summary implements Serializable {
    private static final long serialVersionUID=1L;
    private Integer _id;
    private String projectname;
    private String projecttype;
    private String subject;
    private String starttime;
    private String studentname;
    private String sdudentcollege;
    private String studentnumber;
    private String sdudentemail;
    private String studentphone;
    private String teachername;
    private String teachercollege;
    private String teacheremail;
    private String teacherphone;

    public Integer get_id() {
        return _id;
    }

    public void set_id(Integer _id) {
        this._id = _id;
    }

    public String getProjectname() {
        return projectname;
    }

    public void setProjectname(String projectname) {
        this.projectname = projectname;
    }

    public String getProjecttype() {
        return projecttype;
    }

    public void setProjecttype(String projecttype) {
        this.projecttype = projecttype;
    }

    public String getSubject() {
        return subject;
    }

    public void setSubject(String subject) {
        this.subject = subject;
    }

    public String getStarttime() {
        return starttime;
    }

    public void setStarttime(String starttime) {
        this.starttime = starttime;
    }

    public String getStudentname() {
        return studentname;
    }

    public void setStudentname(String studentname) {
        this.studentname = studentname;
    }

    public String getStudentnumber() {
        return studentnumber;
    }

    public void setSdudentcollege(String sdudentcollege) {
        this.sdudentcollege = sdudentcollege;
    }

    public void setStudentnumber(String studentnumber) {
        this.studentnumber = studentnumber;
    }

    public String getSdudentcollege() {
        return sdudentcollege;
    }

    public String getSdudentemail() {
        return sdudentemail;
    }

    public void setSdudentemail(String sdudentemail) {
        this.sdudentemail = sdudentemail;
    }

    public String getStudentphone() {
        return studentphone;
    }

    public void setStudentphone(String studentphone) {
        this.studentphone = studentphone;
    }

    public String getTeachername() {
        return teachername;
    }

    public void setTeachername(String teachername) {
        this.teachername = teachername;
    }

    public String getTeachercollege() {
        return teachercollege;
    }

    public void setTeachercollege(String teachercollege) {
        this.teachercollege = teachercollege;
    }

    public String getTeacheremail() {
        return teacheremail;
    }

    public void setTeacheremail(String teacheremail) {
        this.teacheremail = teacheremail;
    }

    public String getTeacherphone() {
        return teacherphone;
    }

    public void setTeacherphone(String teacherphone) {
        this.teacherphone = teacherphone;
    }

    public Summary(String projectname, String projecttype,String subject,String starttime,String studentname,String sdudentcollege,String studentnumber,String sdudentemail,String studentphone,String teachername,String teachercollege,String teacheremail,String teacherphone) {
        super();

        this.projectname= projectname;
        this.projecttype = projecttype;
        this.subject = subject;
        this.starttime = starttime;
        this.studentname = studentname;
        this.sdudentcollege = sdudentcollege;
        this.studentnumber = studentnumber;
        this.sdudentemail = sdudentemail;
        this.studentphone = studentphone;
        this.teachername = teachername;
        this.subject = subject;
        this.teachercollege = teachercollege;
        this.teacheremail = teacheremail;
        this.teacherphone = teacherphone;
    }
    public Summary(int _id,String projectname, String projecttype,String subject,String starttime,String studentname,String sdudentcollege,String studentnumber,String sdudentemail,String studentphone,String teachername,String teachercollege,String teacheremail,String teacherphone) {
        super();
        this._id=_id;
        this.projectname= projectname;
        this.projecttype = projecttype;
        this.subject = subject;
        this.starttime = starttime;
        this.studentname = studentname;
        this.sdudentcollege = sdudentcollege;
        this.studentnumber = studentnumber;
        this.sdudentemail = sdudentemail;
        this.studentphone = studentphone;
        this.teachername = teachername;
        this.subject = subject;
        this.teachercollege = teachercollege;
        this.teacheremail = teacheremail;
        this.teacherphone = teacherphone;
    }
}


text:
namespace peloton {
namespace codegen {
namespace type {

namespace {

// Comparison
struct CompareVarchar : public TypeSystem::Comparison {
  bool SupportsTypes(const type::Type &left_type,
                     const type::Type &right_type) const override {
    return left_type.GetSqlType() == Varchar::Instance() &&
           left_type == right_type;
  }

  // Call ValuesRuntime::CompareStrings(). This function behaves like strcmp(),
  // returning a values less than, equal to, or greater than zero if left is
  // found to be less than, matches, or is greater than the right value.
  llvm::Value *CallCompareStrings(CodeGen &codegen, const Value &left,
                                  const Value &right) const {
    // Get the proxy to ValuesRuntime::CompareStrings(...)
    auto *cmp_func = ValuesRuntimeProxy::_CompareStrings::GetFunction(codegen);

    // Setup the function arguments and invoke the call
    std::vector<llvm::Value *> args = {left.GetValue(), left.GetLength(),
                                       right.GetValue(), right.GetLength()};
    return codegen.CallFunc(cmp_func, args);
  }

  Value DoCompareLt(CodeGen &codegen, const Value &left,
                    const Value &right) const override {
    PL_ASSERT(SupportsTypes(left.GetType(), right.GetType()));

    // Call CompareStrings(...)
    llvm::Value *result = CallCompareStrings(codegen, left, right);

    // Check if the result is < 0
    result = codegen->CreateICmpSLT(result, codegen.Const32(0));

    // Return the comparison
    return Value{Boolean::Instance(), result};
  }

  Value DoCompareLte(CodeGen &codegen, const Value &left,
                     const Value &right) const override {
    PL_ASSERT(SupportsTypes(left.GetType(), right.GetType()));

    // Call CompareStrings(...)
    llvm::Value *result = CallCompareStrings(codegen, left, right);

    // Check if the result is <= 0
    result = codegen->CreateICmpSLE(result, codegen.Const32(0));

    // Return the comparison
    return Value{Boolean::Instance(), result};
  }

  Value DoCompareEq(CodeGen &codegen, const Value &left,
                    const Value &right) const override {
    PL_ASSERT(SupportsTypes(left.GetType(), right.GetType()));

    // Call CompareStrings(...)
    llvm::Value *result = CallCompareStrings(codegen, left, right);

    // Check if the result is == 0
    result = codegen->CreateICmpEQ(result, codegen.Const32(0));

    // Return the comparison
    return Value{Boolean::Instance(), result};
  }

  Value DoCompareNe(CodeGen &codegen, const Value &left,
                    const Value &right) const override {
    PL_ASSERT(SupportsTypes(left.GetType(), right.GetType()));

    // Call CompareStrings(...)
    llvm::Value *result = CallCompareStrings(codegen, left, right);

    // Check if the result is == 0
    result = codegen->CreateICmpNE(result, codegen.Const32(0));

    // Return the comparison
    return Value{Boolean::Instance(), result};
  }

  Value DoCompareGt(CodeGen &codegen, const Value &left,
                    const Value &right) const override {
    PL_ASSERT(SupportsTypes(left.GetType(), right.GetType()));

    // Call CompareStrings(...)
    llvm::Value *result = CallCompareStrings(codegen, left, right);

    // Check if the result is > 0
    result = codegen->CreateICmpSGT(result, codegen.Const32(0));

    // Return the comparison
    return Value{Boolean::Instance(), result};
  }

  Value DoCompareGte(CodeGen &codegen, const Value &left,
                     const Value &right) const override {
    PL_ASSERT(SupportsTypes(left.GetType(), right.GetType()));

    // Call CompareStrings(...)
    llvm::Value *result = CallCompareStrings(codegen, left, right);

    // Check if the result is >= 0
    result = codegen->CreateICmpSGE(result, codegen.Const32(0));

    // Return the comparison
    return Value{Boolean::Instance(), result};
  }

  Value DoComparisonForSort(CodeGen &codegen, const Value &left,
                            const Value &right) const override {
    PL_ASSERT(SupportsTypes(left.GetType(), right.GetType()));

    // Call CompareStrings(...)
    llvm::Value *result = CallCompareStrings(codegen, left, right);

    // Return the comparison
    return Value{Integer::Instance(), result};
  }
};

//===----------------------------------------------------------------------===//
// TYPE SYSTEM CONSTRUCTION
//===----------------------------------------------------------------------===//

// The list of types a SQL varchar type can be implicitly casted to
const std::vector<peloton::type::TypeId> kImplicitCastingTable = {
    peloton::type::TypeId::VARCHAR};

// Explicit casting rules
static std::vector<TypeSystem::CastInfo> kExplicitCastingTable = {};

// Comparison operations
static CompareVarchar kCompareVarchar;
static std::vector<TypeSystem::ComparisonInfo> kComparisonTable = {
    {kCompareVarchar}};

// Unary operators
static std::vector<TypeSystem::UnaryOpInfo> kUnaryOperatorTable = {};

// Binary operations
static std::vector<TypeSystem::BinaryOpInfo> kBinaryOperatorTable = {};

}  // anonymous namespace

//===----------------------------------------------------------------------===//
// TINYINT TYPE CONFIGURATION
//===----------------------------------------------------------------------===//

// Initialize the VARCHAR SQL type with the configured type system
Varchar::Varchar()
    : SqlType(peloton::type::TypeId::VARCHAR),
      type_system_(kImplicitCastingTable, kExplicitCastingTable,
                   kComparisonTable, kUnaryOperatorTable,
                   kBinaryOperatorTable) {}

Value Varchar::GetMinValue(UNUSED_ATTRIBUTE CodeGen &codegen) const {
  throw Exception{"The VARCHAR type does not have a minimum value ..."};
}

Value Varchar::GetMaxValue(UNUSED_ATTRIBUTE CodeGen &codegen) const {
  throw Exception{"The VARCHAR type does not have a maximum value ..."};
}

Value Varchar::GetNullValue(CodeGen &codegen) const {
  return Value{Type{TypeId(), true}, codegen.NullPtr(codegen.CharPtrType()),
               codegen.Const32(0), codegen.ConstBool(true)};
}

void Varchar::GetTypeForMaterialization(CodeGen &codegen, llvm::Type *&val_type,
                                        llvm::Type *&len_type) const {
  val_type = codegen.CharPtrType();
  len_type = codegen.Int32Type();
}

llvm::Function *Varchar::GetOutputFunction(
    CodeGen &codegen, UNUSED_ATTRIBUTE const Type &type) const {
  // TODO: We should use the length information in the type?
  return ValuesRuntimeProxy::_OutputVarchar::GetFunction(codegen);
}

}  // namespace type
}  // namespace codegen
}  // namespace peloton


text:
from selenium import webdriver
from nose.tools import assert_equals
import random

baseUrl = "http://twiindan.pythonanywhere.com/admin"
driver = webdriver.Firefox()
driver.get(baseUrl)

loginTextBox = driver.find_element_by_id("id_username")
passwordTextBox = driver.find_element_by_id("id_password")

logInButton = driver.find_element_by_xpath("//input[contains(@value, 'Log in')]")

loginTextBox.send_keys("user1")
passwordTextBox.send_keys("selenium")
logInButton.click()

questionsLink = driver.find_element_by_link_text("Questions")
assert_equals(questionsLink.get_attribute('href'), 'http://twiindan.pythonanywhere.com/admin/polls/question/')

addLink = driver.find_element_by_class_name("addlink")
addLink.click()

questionText = driver.find_element_by_id("id_question_text")

showMore = driver.find_element_by_id("fieldsetcollapser0")
showMore.click()

today_link = driver.find_element_by_link_text("Today")
today_link.click()

now_link = driver.find_element_by_link_text("Now")
now_link.click()

random_number = random.randint(1, 100000)
questionText.send_keys("Question {}".format(random_number))

choiceText1 = driver.find_element_by_name("choice_set-0-choice_text")
choiceText2 = driver.find_element_by_name("choice_set-1-choice_text")
choiceText3 = driver.find_element_by_name("choice_set-2-choice_text")

choiceText1.send_keys("Selenium")
choiceText2.send_keys("Python")
choiceText3.send_keys("Webpages")

choiceVotes = driver.find_element_by_name("choice_set-0-votes")
choiceVotes.clear()
choiceVotes.send_keys("3")

saveButton = driver.find_element_by_name("_save")
saveButton.click()


text:
import * as React from 'react';
export declare class SearchBoxFullSizeExample extends React.Component<any, any> {
    render(): JSX.Element;
}


text:
.class public abstract Lgov/nist/javax/sip/header/AuthenticationHeader;
.super Lgov/nist/javax/sip/header/ParametersHeader;
.source "AuthenticationHeader.java"

# static fields
.field public static final ALGORITHM:Ljava/lang/String; = "algorithm"

.field public static final CK:Ljava/lang/String; = "ck"

.field public static final CNONCE:Ljava/lang/String; = "cnonce"

.field public static final DOMAIN:Ljava/lang/String; = "domain"

.field public static final IK:Ljava/lang/String; = "ik"

.field public static final INTEGRITY_PROTECTED:Ljava/lang/String; = "integrity-protected"

.field public static final NC:Ljava/lang/String; = "nc"

.field public static final NONCE:Ljava/lang/String; = "nonce"

.field public static final OPAQUE:Ljava/lang/String; = "opaque"

.field public static final QOP:Ljava/lang/String; = "qop"

.field public static final REALM:Ljava/lang/String; = "realm"

.field public static final RESPONSE:Ljava/lang/String; = "response"

.field public static final SIGNATURE:Ljava/lang/String; = "signature"

.field public static final SIGNED_BY:Ljava/lang/String; = "signed-by"

.field public static final STALE:Ljava/lang/String; = "stale"

.field public static final URI:Ljava/lang/String; = "uri"

.field public static final USERNAME:Ljava/lang/String; = "username"

# instance fields
.field protected scheme:Ljava/lang/String;

# direct methods
.method public constructor <init>()V
    .locals 2

    .prologue
    .line 93
    invoke-direct {p0}, Lgov/nist/javax/sip/header/ParametersHeader;-><init>()V

    .line 94
    iget-object v0, p0, Lgov/nist/javax/sip/header/AuthenticationHeader;->parameters:Lgov/nist/core/NameValueList;

    const-string v1, ","

    invoke-virtual {v0, v1}, Lgov/nist/core/NameValueList;->setSeparator(Ljava/lang/String;)V

    .line 95
    return-void
.end method

.method public constructor <init>(Ljava/lang/String;)V
    .locals 2
    .param p1, "name"    # Ljava/lang/String;

    .prologue
    .line 87
    invoke-direct {p0, p1}, Lgov/nist/javax/sip/header/ParametersHeader;-><init>(Ljava/lang/String;)V

    .line 88
    iget-object v0, p0, Lgov/nist/javax/sip/header/AuthenticationHeader;->parameters:Lgov/nist/core/NameValueList;

    const-string v1, ","

    invoke-virtual {v0, v1}, Lgov/nist/core/NameValueList;->setSeparator(Ljava/lang/String;)V

    .line 89
    const-string v0, "Digest"

    iput-object v0, p0, Lgov/nist/javax/sip/header/AuthenticationHeader;->scheme:Ljava/lang/String;

    .line 90
    return-void
.end method

# virtual methods
.method public encodeBody()Ljava/lang/String;
    .locals 2

    .prologue
    .line 157
    iget-object v0, p0, Lgov/nist/javax/sip/header/AuthenticationHeader;->parameters:Lgov/nist/core/NameValueList;

    const-string v1, ","

    invoke-virtual {v0, v1}, Lgov/nist/core/NameValueList;->setSeparator(Ljava/lang/String;)V

    .line 158
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    iget-object v1, p0, Lgov/nist/javax/sip/header/AuthenticationHeader;->scheme:Ljava/lang/String;

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v1, " "

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    iget-object v1, p0, Lgov/nist/javax/sip/header/AuthenticationHeader;->parameters:Lgov/nist/core/NameValueList;

    invoke-virtual {v1}, Lgov/nist/core/NameValueList;->encode()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public getAlgorithm()Ljava/lang/String;
    .locals 1

    .prologue
    .line 307
    const-string v0, "algorithm"

    invoke-virtual {p0, v0}, Lgov/nist/javax/sip/header/AuthenticationHeader;->getParameter(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public getCK()Ljava/lang/String;
    .locals 1

    .prologue
    .line 533
    const-string v0, "ck"

    invoke-virtual {p0, v0}, Lgov/nist/javax/sip/header/AuthenticationHeader;->getParameter(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public getCNonce()Ljava/lang/String;
    .locals 1

    .prologue
    .line 433
    const-string v0, "cnonce"

    invoke-virtual {p0, v0}, Lgov/nist/javax/sip/header/AuthenticationHeader;->getParameter(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public getDomain()Ljava/lang/String;
    .locals 1

    .prologue
    .line 391
    const-string v0, "domain"

    invoke-virtual {p0, v0}, Lgov/nist/javax/sip/header/AuthenticationHeader;->getParameter(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public getIK()Ljava/lang/String;
    .locals 1

    .prologue
    .line 521
    const-string v0, "ik"

    invoke-virtual {p0, v0}, Lgov/nist/javax/sip/header/AuthenticationHeader;->getParameter(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public getIntegrityProtected()Ljava/lang/String;
    .locals 1

    .prologue
    .line 550
    const-string v0, "integrity-protected"

    invoke-virtual {p0, v0}, Lgov/nist/javax/sip/header/AuthenticationHeader;->getParameter(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public getNonce()Ljava/lang/String;
    .locals 1

    .prologue
    .line 243
    const-string v0, "nonce"

    invoke-virtual {p0, v0}, Lgov/nist/javax/sip/header/AuthenticationHeader;->getParameter(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public getNonceCount()I
    .locals 1

    .prologue
    .line 437
    const-string v0, "nc"

    invoke-virtual {p0, v0}, Lgov/nist/javax/sip/header/AuthenticationHeader;->getParameterAsHexInt(Ljava/lang/String;)I

    move-result v0

    return v0
.end method

.method public getOpaque()Ljava/lang/String;
    .locals 1

    .prologue
    .line 363
    const-string v0, "opaque"

    invoke-virtual {p0, v0}, Lgov/nist/javax/sip/header/AuthenticationHeader;->getParameter(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public getQop()Ljava/lang/String;
    .locals 1

    .prologue
    .line 335
    const-string v0, "qop"

    invoke-virtual {p0, v0}, Lgov/nist/javax/sip/header/AuthenticationHeader;->getParameter(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public getRealm()Ljava/lang/String;
    .locals 1

    .prologue
    .line 213
    const-string v0, "realm"

    invoke-virtual {p0, v0}, Lgov/nist/javax/sip/header/AuthenticationHeader;->getParameter(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public getResponse()Ljava/lang/String;
    .locals 1

    .prologue
    .line 463
    const-string v0, "response"

    invoke-virtual {p0, v0}, Lgov/nist/javax/sip/header/AuthenticationHeader;->getParameterValue(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/lang/String;

    return-object v0
.end method

.method public getScheme()Ljava/lang/String;
    .locals 1

    .prologue
    .line 180
    iget-object v0, p0, Lgov/nist/javax/sip/header/AuthenticationHeader;->scheme:Ljava/lang/String;

    return-object v0
.end method

.method public getURI()Ljavax/sip/address/URI;
    .locals 1

    .prologue
    .line 279
    const-string v0, "uri"

    invoke-virtual {p0, v0}, Lgov/nist/javax/sip/header/AuthenticationHeader;->getParameterAsURI(Ljava/lang/String;)Lgov/nist/javax/sip/address/GenericURI;

    move-result-object v0

    return-object v0
.end method

.method public getUsername()Ljava/lang/String;
    .locals 1

    .prologue
    .line 490
    const-string v0, "username"

    invoke-virtual {p0, v0}, Lgov/nist/javax/sip/header/AuthenticationHeader;->getParameter(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public isStale()Z
    .locals 1

    .prologue
    .line 414
    const-string v0, "stale"

    invoke-virtual {p0, v0}, Lgov/nist/javax/sip/header/AuthenticationHeader;->getParameterAsBoolean(Ljava/lang/String;)Z

    move-result v0

    return v0
.end method

.method public setAlgorithm(Ljava/lang/String;)V
    .locals 2
    .param p1, "algorithm"    # Ljava/lang/String;
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/text/ParseException;
        }
    .end annotation

    .prologue
    .line 294
    if-nez p1, :cond_0

    .line 295
    new-instance v0, Ljava/lang/NullPointerException;

    const-string v1, "null arg"

    invoke-direct {v0, v1}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V

    throw v0

    .line 296
    :cond_0
    const-string v0, "algorithm"

    invoke-virtual {p0, v0, p1}, Lgov/nist/javax/sip/header/AuthenticationHeader;->setParameter(Ljava/lang/String;Ljava/lang/String;)V

    .line 297
    return-void
.end method

.method public setCK(Ljava/lang/String;)V
    .locals 2
    .param p1, "ck"    # Ljava/lang/String;
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/text/ParseException;
        }
    .end annotation

    .prologue
    .line 525
    if-nez p1, :cond_0

    .line 526
    new-instance v0, Ljava/lang/NullPointerException;

    const-string v1, "JAIN-SIP Exception,  AuthenticationHeader, setCk(), The auth-param CK parameter is null"

    invoke-direct {v0, v1}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V

    throw v0

    .line 529
    :cond_0
    const-string v0, "ck"

    invoke-virtual {p0, v0, p1}, Lgov/nist/javax/sip/header/AuthenticationHeader;->setParameter(Ljava/lang/String;Ljava/lang/String;)V

    .line 530
    return-void
.end method

.method public setCNonce(Ljava/lang/String;)V
    .locals 1
    .param p1, "cnonce"    # Ljava/lang/String;
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/text/ParseException;
        }
    .end annotation

    .prologue
    .line 424
    const-string v0, "cnonce"

    invoke-virtual {p0, v0, p1}, Lgov/nist/javax/sip/header/AuthenticationHeader;->setParameter(Ljava/lang/String;Ljava/lang/String;)V

    .line 425
    return-void
.end method

.method public setChallenge(Lgov/nist/javax/sip/header/Challenge;)V
    .locals 1
    .param p1, "challenge"    # Lgov/nist/javax/sip/header/Challenge;

    .prologue
    .line 147
    iget-object v0, p1, Lgov/nist/javax/sip/header/Challenge;->scheme:Ljava/lang/String;

    iput-object v0, p0, Lgov/nist/javax/sip/header/AuthenticationHeader;->scheme:Ljava/lang/String;

    .line 148
    iget-object v0, p1, Lgov/nist/javax/sip/header/Challenge;->authParams:Lgov/nist/core/NameValueList;

    iput-object v0, p0, Lgov/nist/javax/sip/header/ParametersHeader;->parameters:Lgov/nist/core/NameValueList;

    .line 149
    return-void
.end method

.method public setDomain(Ljava/lang/String;)V
    .locals 2
    .param p1, "domain"    # Ljava/lang/String;
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/text/ParseException;
        }
    .end annotation

    .prologue
    .line 378
    if-nez p1, :cond_0

    .line 379
    new-instance v0, Ljava/lang/NullPointerException;

    const-string v1, "null arg"

    invoke-direct {v0, v1}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V

    throw v0

    .line 380
    :cond_0
    const-string v0, "domain"

    invoke-virtual {p0, v0, p1}, Lgov/nist/javax/sip/header/AuthenticationHeader;->setParameter(Ljava/lang/String;Ljava/lang/String;)V

    .line 381
    return-void
.end method

.method public setIK(Ljava/lang/String;)V
    .locals 2
    .param p1, "ik"    # Ljava/lang/String;
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/text/ParseException;
        }
    .end annotation

    .prologue
    .line 513
    if-nez p1, :cond_0

    .line 514
    new-instance v0, Ljava/lang/NullPointerException;

    const-string v1, "JAIN-SIP Exception,  AuthenticationHeader, setIk(), The auth-param IK parameter is null"

    invoke-direct {v0, v1}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V

    throw v0

    .line 517
    :cond_0
    const-string v0, "ik"

    invoke-virtual {p0, v0, p1}, Lgov/nist/javax/sip/header/AuthenticationHeader;->setParameter(Ljava/lang/String;Ljava/lang/String;)V

    .line 518
    return-void
.end method

.method public setIntegrityProtected(Ljava/lang/String;)V
    .locals 2
    .param p1, "integrityProtected"    # Ljava/lang/String;
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/text/ParseException;
        }
    .end annotation

    .prologue
    .line 539
    if-nez p1, :cond_0

    .line 540
    new-instance v0, Ljava/lang/NullPointerException;

    const-string v1, "JAIN-SIP Exception,  AuthenticationHeader, setIntegrityProtected(), The integrity-protected parameter is null"

    invoke-direct {v0, v1}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V

    throw v0

    .line 544
    :cond_0
    const-string v0, "integrity-protected"

    invoke-virtual {p0, v0, p1}, Lgov/nist/javax/sip/header/AuthenticationHeader;->setParameter(Ljava/lang/String;Ljava/lang/String;)V

    .line 545
    return-void
.end method

.method public setNonce(Ljava/lang/String;)V
    .locals 2
    .param p1, "nonce"    # Ljava/lang/String;
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/text/ParseException;
        }
    .end annotation

    .prologue
    .line 228
    if-nez p1, :cond_0

    .line 229
    new-instance v0, Ljava/lang/NullPointerException;

    const-string v1, "JAIN-SIP Exception,  AuthenticationHeader, setNonce(), The nonce parameter is null"

    invoke-direct {v0, v1}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V

    throw v0

    .line 232
    :cond_0
    const-string v0, "nonce"

    invoke-virtual {p0, v0, p1}, Lgov/nist/javax/sip/header/AuthenticationHeader;->setParameter(Ljava/lang/String;Ljava/lang/String;)V

    .line 233
    return-void
.end method

.method public setNonceCount(I)V
    .locals 5
    .param p1, "param"    # I
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/text/ParseException;
        }
    .end annotation

    .prologue
    const/4 v4, 0x0

    .line 446
    if-gez p1, :cond_0

    .line 447
    new-instance v2, Ljava/text/ParseException;

    const-string v3, "bad value"

    invoke-direct {v2, v3, v4}, Ljava/text/ParseException;-><init>(Ljava/lang/String;I)V

    throw v2

    .line 449
    :cond_0
    invoke-static {p1}, Ljava/lang/Integer;->toHexString(I)Ljava/lang/String;

    move-result-object v1

    .line 451
    .local v1, "nc":Ljava/lang/String;
    const-string v0, "00000000"

    .line 452
    .local v0, "base":Ljava/lang/String;
    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v1}, Ljava/lang/String;->length()I

    move-result v3

    rsub-int/lit8 v3, v3, 0x8

    invoke-virtual {v0, v4, v3}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    .line 453
    const-string v2, "nc"

    invoke-virtual {p0, v2, v1}, Lgov/nist/javax/sip/header/AuthenticationHeader;->setParameter(Ljava/lang/String;Ljava/lang/String;)V

    .line 455
    return-void
.end method

.method public setOpaque(Ljava/lang/String;)V
    .locals 2
    .param p1, "opaque"    # Ljava/lang/String;
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/text/ParseException;
        }
    .end annotation

    .prologue
    .line 350
    if-nez p1, :cond_0

    .line 351
    new-instance v0, Ljava/lang/NullPointerException;

    const-string v1, "null arg"

    invoke-direct {v0, v1}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V

    throw v0

    .line 352
    :cond_0
    const-string v0, "opaque"

    invoke-virtual {p0, v0, p1}, Lgov/nist/javax/sip/header/AuthenticationHeader;->setParameter(Ljava/lang/String;Ljava/lang/String;)V

    .line 353
    return-void
.end method

.method public setParameter(Ljava/lang/String;Ljava/lang/String;)V
    .locals 4
    .param p1, "name"    # Ljava/lang/String;
    .param p2, "value"    # Ljava/lang/String;
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/text/ParseException;
        }
    .end annotation

    .prologue
    .line 106
    iget-object v1, p0, Lgov/nist/javax/sip/header/ParametersHeader;->parameters:Lgov/nist/core/NameValueList;

    invoke-virtual {p1}, Ljava/lang/String;->toLowerCase()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Lgov/nist/core/NameValueList;->getNameValue(Ljava/lang/String;)Lgov/nist/core/NameValue;

    move-result-object v0

    .line 107
    .local v0, "nv":Lgov/nist/core/NameValue;
    if-nez v0, :cond_5

    .line 108
    new-instance v0, Lgov/nist/core/NameValue;

    .end local v0    # "nv":Lgov/nist/core/NameValue;
    invoke-direct {v0, p1, p2}, Lgov/nist/core/NameValue;-><init>(Ljava/lang/String;Ljava/lang/Object;)V

    .line 109
    .restart local v0    # "nv":Lgov/nist/core/NameValue;
    const-string v1, "qop"

    invoke-virtual {p1, v1}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v1

    if-nez v1, :cond_0

    const-string v1, "realm"

    invoke-virtual {p1, v1}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v1

    if-nez v1, :cond_0

    const-string v1, "cnonce"

    invoke-virtual {p1, v1}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v1

    if-nez v1, :cond_0

    const-string v1, "nonce"

    invoke-virtual {p1, v1}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v1

    if-nez v1, :cond_0

    const-string v1, "username"

    invoke-virtual {p1, v1}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v1

    if-nez v1, :cond_0

    const-string v1, "domain"

    invoke-virtual {p1, v1}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v1

    if-nez v1, :cond_0

    const-string v1, "opaque"

    invoke-virtual {p1, v1}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v1

    if-nez v1, :cond_0

    const-string v1, "nextnonce"

    invoke-virtual {p1, v1}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v1

    if-nez v1, :cond_0

    const-string v1, "uri"

    invoke-virtual {p1, v1}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v1

    if-nez v1, :cond_0

    const-string v1, "response"

    invoke-virtual {p1, v1}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v1

    if-nez v1, :cond_0

    const-string v1, "ik"

    invoke-virtual {p1, v1}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v1

    if-nez v1, :cond_0

    const-string v1, "ck"

    invoke-virtual {p1, v1}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v1

    if-nez v1, :cond_0

    const-string v1, "integrity-protected"

    invoke-virtual {p1, v1}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v1

    if-eqz v1, :cond_4

    .line 122
    :cond_0
    instance-of v1, p0, Lgov/nist/javax/sip/header/Authorization;

    if-nez v1, :cond_1

    instance-of v1, p0, Lgov/nist/javax/sip/header/ProxyAuthorization;

    if-eqz v1, :cond_2

    :cond_1
    const-string v1, "qop"

    invoke-virtual {p1, v1}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v1

    if-eqz v1, :cond_2

    .line 128
    :goto_0
    if-nez p2, :cond_3

    .line 129
    new-instance v1, Ljava/lang/NullPointerException;

    const-string v2, "null value"

    invoke-direct {v1, v2}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V

    throw v1

    .line 126
    :cond_2
    invoke-virtual {v0}, Lgov/nist/core/NameValue;->setQuotedValue()V

    goto :goto_0

    .line 130
    :cond_3
    const-string v1, "\""

    invoke-virtual {p2, v1}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v1

    if-eqz v1, :cond_4

    .line 131
    new-instance v1, Ljava/text/ParseException;

    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v2, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    const-string v3, " : Unexpected DOUBLE_QUOTE"

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    const/4 v3, 0x0

    invoke-direct {v1, v2, v3}, Ljava/text/ParseException;-><init>(Ljava/lang/String;I)V

    throw v1

    .line 134
    :cond_4
    invoke-super {p0, v0}, Lgov/nist/javax/sip/header/ParametersHeader;->setParameter(Lgov/nist/core/NameValue;)V

    .line 138
    :goto_1
    return-void

    .line 136
    :cond_5
    invoke-virtual {v0, p2}, Lgov/nist/core/NameValue;->setValueAsObject(Ljava/lang/Object;)V

    goto :goto_1
.end method

.method public setQop(Ljava/lang/String;)V
    .locals 2
    .param p1, "qop"    # Ljava/lang/String;
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/text/ParseException;
        }
    .end annotation

    .prologue
    .line 322
    if-nez p1, :cond_0

    .line 323
    new-instance v0, Ljava/lang/NullPointerException;

    const-string v1, "null arg"

    invoke-direct {v0, v1}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V

    throw v0

    .line 324
    :cond_0
    const-string v0, "qop"

    invoke-virtual {p0, v0, p1}, Lgov/nist/javax/sip/header/AuthenticationHeader;->setParameter(Ljava/lang/String;Ljava/lang/String;)V

    .line 325
    return-void
.end method

.method public setRealm(Ljava/lang/String;)V
    .locals 2
    .param p1, "realm"    # Ljava/lang/String;
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/text/ParseException;
        }
    .end annotation

    .prologue
    .line 197
    if-nez p1, :cond_0

    .line 198
    new-instance v0, Ljava/lang/NullPointerException;

    const-string v1, "JAIN-SIP Exception,  AuthenticationHeader, setRealm(), The realm parameter is null"

    invoke-direct {v0, v1}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V

    throw v0

    .line 201
    :cond_0
    const-string v0, "realm"

    invoke-virtual {p0, v0, p1}, Lgov/nist/javax/sip/header/AuthenticationHeader;->setParameter(Ljava/lang/String;Ljava/lang/String;)V

    .line 202
    return-void
.end method

.method public setResponse(Ljava/lang/String;)V
    .locals 2
    .param p1, "response"    # Ljava/lang/String;
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/text/ParseException;
        }
    .end annotation

    .prologue
    .line 473
    if-nez p1, :cond_0

    .line 474
    new-instance v0, Ljava/lang/NullPointerException;

    const-string v1, "Null parameter"

    invoke-direct {v0, v1}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V

    throw v0

    .line 476
    :cond_0
    const-string v0, "response"

    invoke-virtual {p0, v0, p1}, Lgov/nist/javax/sip/header/AuthenticationHeader;->setParameter(Ljava/lang/String;Ljava/lang/String;)V

    .line 477
    return-void
.end method

.method public setScheme(Ljava/lang/String;)V
    .locals 0
    .param p1, "scheme"    # Ljava/lang/String;

    .prologue
    .line 170
    iput-object p1, p0, Lgov/nist/javax/sip/header/AuthenticationHeader;->scheme:Ljava/lang/String;

    .line 171
    return-void
.end method

.method public setStale(Z)V
    .locals 3
    .param p1, "stale"    # Z

    .prologue
    .line 403
    new-instance v0, Lgov/nist/core/NameValue;

    const-string v1, "stale"

    invoke-static {p1}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;

    move-result-object v2

    invoke-direct {v0, v1, v2}, Lgov/nist/core/NameValue;-><init>(Ljava/lang/String;Ljava/lang/Object;)V

    invoke-virtual {p0, v0}, Lgov/nist/javax/sip/header/AuthenticationHeader;->setParameter(Lgov/nist/core/NameValue;)V

    .line 404
    return-void
.end method

.method public setURI(Ljavax/sip/address/URI;)V
    .locals 3
    .param p1, "uri"    # Ljavax/sip/address/URI;

    .prologue
    .line 258
    if-eqz p1, :cond_0

    .line 259
    new-instance v0, Lgov/nist/core/NameValue;

    const-string v1, "uri"

    invoke-direct {v0, v1, p1}, Lgov/nist/core/NameValue;-><init>(Ljava/lang/String;Ljava/lang/Object;)V

    .line 260
    .local v0, "nv":Lgov/nist/core/NameValue;
    invoke-virtual {v0}, Lgov/nist/core/NameValue;->setQuotedValue()V

    .line 261
    iget-object v1, p0, Lgov/nist/javax/sip/header/ParametersHeader;->parameters:Lgov/nist/core/NameValueList;

    invoke-virtual {v1, v0}, Lgov/nist/core/NameValueList;->set(Lgov/nist/core/NameValue;)V

    .line 265
    return-void

    .line 263
    .end local v0    # "nv":Lgov/nist/core/NameValue;
    :cond_0
    new-instance v1, Ljava/lang/NullPointerException;

    const-string v2, "Null URI"

    invoke-direct {v1, v2}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V

    throw v1
.end method

.method public setUsername(Ljava/lang/String;)V
    .locals 1
    .param p1, "username"    # Ljava/lang/String;
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/text/ParseException;
        }
    .end annotation

    .prologue
    .line 509
    const-string v0, "username"

    invoke-virtual {p0, v0, p1}, Lgov/nist/javax/sip/header/AuthenticationHeader;->setParameter(Ljava/lang/String;Ljava/lang/String;)V

    .line 510
    return-void
.end method


text:
window.NewsView = Backbone.View.extend({
	tagName : "ul",
	className : "media-list",

	initialize : function(options) {
		this.options = options;
	},
	render : function() {
		var titleHTML = '';
		titleHTML += '
' + this.options.objectName + '
';

		this.$el.append(titleHTML);

		var newsCollection = this.collection;

		newsPromise = newsCollection.fetch({reset: true});

		var self = this;

		var spinnerHTML = '';
		spinnerHTML += '
' +
	      '';
		spinnerHTML += '
';

		self.$el.append(spinnerHTML);

		$.when(newsPromise).then(function() {
			self.$("div.spinner-div").remove();

			_.each(newsCollection.models, function(object) {
				$(self.el).append(new NewsItemView({
					model : object
				}).render().el);
			}, self);
		});

		return this;
	}
});

var NewsItemView = Backbone.View.extend({
	tagName : "li",
	className : "media",

	initialize : function(options) {
		this.options = options;
	},

	render : function() {
		var newsHTML = '';

		var datePublishedAt = new Date(this.model.get('publishedAt'));

		newsHTML += '
' +
	      '
' + this.model.get('title') + ' (' + datePublishedAt.format() + ')' + '
';

		if (this.model.get('header')) newsHTML +=  '
' + this.model.get('header') + '
'

		newsHTML += this.model.get('content');
		newsHTML += '
';

		this.$el.append(newsHTML);

		return this;
	}

});


text:
namespace Azure.ResourceManager.SecurityCenter.Models
{
    /// <summary> The CSPM monitoring for GCP offering. </summary>
    public partial class CspmMonitorGcpOffering : SecurityCenterCloudOffering
    {
        /// <summary> Initializes a new instance of CspmMonitorGcpOffering. </summary>
        public CspmMonitorGcpOffering()
        {
            OfferingType = OfferingType.CspmMonitorGcp;
        }

        /// <summary> Initializes a new instance of CspmMonitorGcpOffering. </summary>
        /// <param name="offeringType"> The type of the security offering. </param>
        /// <param name="description"> The offering description. </param>
        /// <param name="nativeCloudConnection"> The native cloud connection configuration. </param>
        internal CspmMonitorGcpOffering(OfferingType offeringType, string description, CspmMonitorGcpOfferingNativeCloudConnection nativeCloudConnection) : base(offeringType, description)
        {
            NativeCloudConnection = nativeCloudConnection;
            OfferingType = offeringType;
        }

        /// <summary> The native cloud connection configuration. </summary>
        public CspmMonitorGcpOfferingNativeCloudConnection NativeCloudConnection { get; set; }
    }
}


text:
package com.opengamma.strata.market.surface;

import static com.opengamma.strata.basics.date.DayCounts.ACT_365F;
import static com.opengamma.strata.collect.TestHelper.assertThrowsIllegalArg;
import static com.opengamma.strata.collect.TestHelper.coverBeanEquals;
import static com.opengamma.strata.collect.TestHelper.coverImmutableBean;
import static org.assertj.core.api.Assertions.assertThat;

import java.util.Map;

import org.testng.annotations.Test;

import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import com.opengamma.analytics.math.interpolation.GridInterpolator2D;
import com.opengamma.analytics.math.interpolation.LinearInterpolator1D;
import com.opengamma.analytics.math.interpolation.LogLinearInterpolator1D;
import com.opengamma.analytics.math.interpolation.data.Interpolator1DDataBundle;
import com.opengamma.strata.basics.value.ValueAdjustment;
import com.opengamma.strata.collect.tuple.DoublesPair;

/**
 * Test {@link InterpolatedNodalSurface}.
 */
@Test
public class InterpolatedNodalSurfaceTest {

  private static final int SIZE = 9;
  private static final String NAME = "TestSurface";
  private static final SurfaceName SURFACE_NAME = SurfaceName.of(NAME);
  private static final SurfaceMetadata METADATA = DefaultSurfaceMetadata.of(SURFACE_NAME);
  private static final SurfaceMetadata METADATA_ENTRIES = DefaultSurfaceMetadata.builder()
      .surfaceName(SURFACE_NAME)
      .dayCount(ACT_365F)
      .parameterMetadata(SurfaceParameterMetadata.listOfEmpty(SIZE))
      .build();
  private static final double[] XVALUES = {0d, 0d, 0d, 2d, 2d, 2d, 4d, 4d, 4d};
  private static final double[] XVALUES2 = {0d, 2d, 3d, 0d, 2d, 3d, 0d, 2d, 3d};
  private static final double[] YVALUES = {0d, 3d, 4d, 0d, 3d, 4d, 0d, 3d, 4d};
  private static final double[] YVALUES2 = {3d, 4d, 5d, 3d, 4d, 5d, 3d, 4d, 5d};
  private static final double[] ZVALUES = {5d, 7d, 8d, 6d, 7d, 8d, 8d, 7d, 8d};
  private static final double[] ZVALUES_BUMPED = {3d, 5d, 6d, 4d, 5d, 6d, 6d, 5d, 6d};
  private static final Map<DoublesPair, Double> DATA = ImmutableMap.<DoublesPair, Double>builder()
      .put(DoublesPair.of(0d, 0d), 5d)
      .put(DoublesPair.of(0d, 3d), 7d)
      .put(DoublesPair.of(0d, 4d), 8d)
      .put(DoublesPair.of(2d, 0d), 6d)
      .put(DoublesPair.of(2d, 3d), 7d)
      .put(DoublesPair.of(2d, 4d), 8d)
      .put(DoublesPair.of(4d, 0d), 6d)
      .put(DoublesPair.of(4d, 3d), 5d)
      .put(DoublesPair.of(4d, 4d), 6d)
      .build();
  private static final GridInterpolator2D INTERPOLATOR =
      new GridInterpolator2D(new LinearInterpolator1D(), new LinearInterpolator1D());

  //-------------------------------------------------------------------------
  public void test_of_SurfaceMetadata() {
    InterpolatedNodalSurface test = InterpolatedNodalSurface.of(METADATA_ENTRIES, XVALUES, YVALUES, ZVALUES, INTERPOLATOR);
    assertThat(test.getName()).isEqualTo(SURFACE_NAME);
    assertThat(test.getParameterCount()).isEqualTo(SIZE);
    assertThat(test.getInterpolator()).isEqualTo(INTERPOLATOR);
    assertThat(test.getMetadata()).isEqualTo(METADATA_ENTRIES);
    assertThat(test.getXValues()).containsExactly(XVALUES);
    assertThat(test.getYValues()).containsExactly(YVALUES);
    assertThat(test.getZValues()).containsExactly(ZVALUES);
  }

  public void test_of_invalid() {
    // not enough nodes
    assertThrowsIllegalArg(() -> InterpolatedNodalSurface.of(
        METADATA, new double[] {1d}, new double[] {2d}, new double[] {3d}, INTERPOLATOR));
    // x node size != y node size
    assertThrowsIllegalArg(() -> InterpolatedNodalSurface.of(
        METADATA, XVALUES, new double[] {1d, 3d}, ZVALUES, INTERPOLATOR));
    // x node size != z node size
    assertThrowsIllegalArg(() -> InterpolatedNodalSurface.of(
        METADATA, XVALUES, YVALUES, new double[] {1d, 3d}, INTERPOLATOR));
    // parameter metadata size != node size
    assertThrowsIllegalArg(() -> InterpolatedNodalSurface.of(
        METADATA_ENTRIES, new double[] {1d, 3d}, new double[] {1d, 3d}, new double[] {1d, 3d}, INTERPOLATOR));
  }

  //-------------------------------------------------------------------------
  public void test_lookup() {
    InterpolatedNodalSurface test = InterpolatedNodalSurface.of(METADATA, XVALUES, YVALUES, ZVALUES, INTERPOLATOR);
    assertThat(test.zValue(XVALUES[0], YVALUES[0])).isEqualTo(ZVALUES[0]);
    assertThat(test.zValue(XVALUES[1], YVALUES[1])).isEqualTo(ZVALUES[1]);
    assertThat(test.zValue(XVALUES[2], YVALUES[2])).isEqualTo(ZVALUES[2]);
    assertThat(test.zValue(0d, 1.5d)).isEqualTo(6d);
    assertThat(test.zValue(1d, 3d)).isEqualTo(7d);

    Map<Double, Interpolator1DDataBundle> bundle = INTERPOLATOR.getDataBundle(DATA);
    assertThat(test.zValue(1.5d, 3.7d)).isEqualTo(INTERPOLATOR.interpolate(bundle, DoublesPair.of(1.5d, 3.7d)));
    assertThat(test.zValueParameterSensitivity(1.5d, 1.5d)).isEqualTo(
        INTERPOLATOR.getNodeSensitivitiesForValue(bundle, DoublesPair.of(1.5d, 1.5d)));
  }

  public void test_lookup_byPair() {
    InterpolatedNodalSurface test = InterpolatedNodalSurface.of(METADATA, XVALUES, YVALUES, ZVALUES, INTERPOLATOR);
    assertThat(test.zValue(DoublesPair.of(XVALUES[0], YVALUES[0]))).isEqualTo(ZVALUES[0]);
    assertThat(test.zValue(DoublesPair.of(XVALUES[1], YVALUES[1]))).isEqualTo(ZVALUES[1]);
    assertThat(test.zValue(DoublesPair.of(XVALUES[2], YVALUES[2]))).isEqualTo(ZVALUES[2]);
    assertThat(test.zValue(DoublesPair.of(0d, 1.5d))).isEqualTo(6d);
    assertThat(test.zValue(DoublesPair.of(1d, 3d))).isEqualTo(7d);

    Map<Double, Interpolator1DDataBundle> bundle = INTERPOLATOR.getDataBundle(DATA);
    assertThat(test.zValue(DoublesPair.of(1.5d, 3.7d))).isEqualTo(INTERPOLATOR.interpolate(bundle, DoublesPair.of(1.5d, 3.7d)));
    assertThat(test.zValueParameterSensitivity(DoublesPair.of(1.5d, 1.5d))).isEqualTo(
        INTERPOLATOR.getNodeSensitivitiesForValue(bundle, DoublesPair.of(1.5d, 1.5d)));
  }

  //-------------------------------------------------------------------------
  public void test_withZValues() {
    double[] zBumped = ZVALUES_BUMPED.clone();
    InterpolatedNodalSurface base = InterpolatedNodalSurface.of(METADATA, XVALUES, YVALUES, ZVALUES, INTERPOLATOR);
    InterpolatedNodalSurface test = base.withZValues(zBumped);
    assertThat(test.getName()).isEqualTo(SURFACE_NAME);
    assertThat(test.getParameterCount()).isEqualTo(SIZE);
    assertThat(test.getMetadata()).isEqualTo(METADATA);
    assertThat(test.getXValues()).containsExactly(XVALUES);
    assertThat(test.getYValues()).containsExactly(YVALUES);
    assertThat(test.getZValues()).containsExactly(ZVALUES_BUMPED);
    zBumped[0] = -110d;
    assertThat(test.getZValues()).containsExactly(ZVALUES_BUMPED);
  }

  public void test_withZValues_badSize() {
    InterpolatedNodalSurface base = InterpolatedNodalSurface.of(METADATA, XVALUES, YVALUES, ZVALUES, INTERPOLATOR);
    assertThrowsIllegalArg(() -> base.withZValues(new double[0]));
    assertThrowsIllegalArg(() -> base.withZValues(new double[] {4d, 6d}));
  }

  //-------------------------------------------------------------------------
  public void test_shiftedBy_operator() {
    InterpolatedNodalSurface base = InterpolatedNodalSurface.of(METADATA, XVALUES, YVALUES, ZVALUES, INTERPOLATOR);
    InterpolatedNodalSurface test = base.shiftedBy((x, y, z) -> z - 2d);
    assertThat(test.getName()).isEqualTo(SURFACE_NAME);
    assertThat(test.getParameterCount()).isEqualTo(SIZE);
    assertThat(test.getMetadata()).isEqualTo(METADATA);
    assertThat(test.getXValues()).containsExactly(XVALUES);
    assertThat(test.getYValues()).containsExactly(YVALUES);
    assertThat(test.getZValues()).containsExactly(ZVALUES_BUMPED);
  }

  public void test_shiftedBy_adjustment() {
    InterpolatedNodalSurface base = InterpolatedNodalSurface.of(METADATA, XVALUES, YVALUES, ZVALUES, INTERPOLATOR);
    ImmutableList<ValueAdjustment> adjustments = ImmutableList.of(
        ValueAdjustment.ofReplace(3d),
        ValueAdjustment.ofDeltaAmount(-2d),
        ValueAdjustment.ofDeltaAmount(-2d),
        ValueAdjustment.ofReplace(4d),
        ValueAdjustment.ofDeltaAmount(-2d),
        ValueAdjustment.ofDeltaAmount(-2d),
        ValueAdjustment.ofReplace(6d),
        ValueAdjustment.ofDeltaAmount(-2d),
        ValueAdjustment.ofDeltaAmount(-2d));
    InterpolatedNodalSurface test = base.shiftedBy(adjustments);
    assertThat(test.getName()).isEqualTo(SURFACE_NAME);
    assertThat(test.getParameterCount()).isEqualTo(SIZE);
    assertThat(test.getMetadata()).isEqualTo(METADATA);
    assertThat(test.getXValues()).containsExactly(XVALUES);
    assertThat(test.getYValues()).containsExactly(YVALUES);
    assertThat(test.getZValues()).containsExactly(ZVALUES_BUMPED);
  }

  public void test_shiftedBy_adjustment_longList() {
    InterpolatedNodalSurface base = InterpolatedNodalSurface.of(METADATA, XVALUES, YVALUES, ZVALUES, INTERPOLATOR);
    ImmutableList<ValueAdjustment> adjustments = ImmutableList.of(
        ValueAdjustment.ofReplace(3d),
        ValueAdjustment.ofDeltaAmount(-2d),
        ValueAdjustment.ofDeltaAmount(-2d),
        ValueAdjustment.ofReplace(4d),
        ValueAdjustment.ofDeltaAmount(-2d),
        ValueAdjustment.ofDeltaAmount(-2d),
        ValueAdjustment.ofReplace(6d),
        ValueAdjustment.ofDeltaAmount(-2d),
        ValueAdjustment.ofDeltaAmount(-2d),
        ValueAdjustment.ofDeltaAmount(2d));
    InterpolatedNodalSurface test = base.shiftedBy(adjustments);
    assertThat(test.getName()).isEqualTo(SURFACE_NAME);
    assertThat(test.getParameterCount()).isEqualTo(SIZE);
    assertThat(test.getMetadata()).isEqualTo(METADATA);
    assertThat(test.getXValues()).containsExactly(XVALUES);
    assertThat(test.getYValues()).containsExactly(YVALUES);
    assertThat(test.getZValues()).containsExactly(ZVALUES_BUMPED);
  }

  public void test_shiftedBy_adjustment_shortList() {
    InterpolatedNodalSurface base = InterpolatedNodalSurface.of(METADATA, XVALUES, YVALUES, ZVALUES, INTERPOLATOR);
    ImmutableList<ValueAdjustment> adjustments = ImmutableList.of(
        ValueAdjustment.ofReplace(3d));
    double[] bumped = new double[] {3d, 7d, 8d, 6d, 7d, 8d, 8d, 7d, 8d};
    InterpolatedNodalSurface test = base.shiftedBy(adjustments);
    assertThat(test.getName()).isEqualTo(SURFACE_NAME);
    assertThat(test.getParameterCount()).isEqualTo(SIZE);
    assertThat(test.getMetadata()).isEqualTo(METADATA);
    assertThat(test.getXValues()).containsExactly(XVALUES);
    assertThat(test.getYValues()).containsExactly(YVALUES);
    assertThat(test.getZValues()).containsExactly(bumped);
  }

  //-------------------------------------------------------------------------
  public void coverage() {
    InterpolatedNodalSurface test = InterpolatedNodalSurface.of(METADATA, XVALUES, YVALUES, ZVALUES, INTERPOLATOR);
    coverImmutableBean(test);
    InterpolatedNodalSurface test2 = InterpolatedNodalSurface.builder()
        .metadata(METADATA_ENTRIES)
        .xValues(XVALUES2)
        .yValues(YVALUES2)
        .zValues(ZVALUES_BUMPED)
        .interpolator(new GridInterpolator2D(new LogLinearInterpolator1D(), new LogLinearInterpolator1D()))
        .build();
    coverBeanEquals(test, test2);
  }

}


text:
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="http://ivyrep.jayasoft.org/ivy-doc.xsl"?>
<ivy-module version="2.0">
	<info organisation="apache" module="commons-digester" revision="1.5" >
		<description homepage="http://jakarta.apache.org/commons/digester/">
		</description>
	</info>
</ivy-module>


text:
(function (global) {

    var frameInsight = global.frameInsight = {};

    var DURATION_CHART_DURATION = 3000;
    var DURATION_CHART_PADDING_V = 0.05;
    var DURATION_CHART_PADDING_TOP = 0.05;
    var DURATION_CHART_PADDING_BOTTOM = 0.05;
    var DURATION_CHART_NORMAL_FILL = 'green';
    var DURATION_CHART_SLOW_FILL = 'red';
    var SLOW_THRESHOLD = 50;

    var settings;
    var dpr = window && Math.max(window.devicePixelRatio || 1, 1) || 1;
    var durationChart = {
        ticks: [],
        tickTypes: [],
        tags: []
    };
    var original = {
        setTimeout: global.setTimeout,
        requestAnimationFrame: global.requestAnimationFrame,
        addEventListener: global.addEventListener
    };

    // var now = global.performance
    //     // performance.now has higer accuracy.
    //     ? performance.now.bind(performance)
    //     : function () {
    //         return +new Date();
    //     };

    // performance.now is not mocked in the visual regression test. Always use Date.now
    var now = function () {
        return Date.now();
    };

    instrumentBase();

    /**
     * @public
     * @param {Object} echarts
     * @param {string} durationChartDom
     */
    frameInsight.init = function (echarts, durationChartDom, dontInstrumentECharts) {
        settings = {
            echarts: echarts,
            durationChartDom: durationChartDom
        };

        !dontInstrumentECharts && instrumentECharts();
        initDurationChart();
        startDurationChart();
    };

    function startDurationChart() {
        next();

        function next() {
            renderDurationChart();
            original.requestAnimationFrame.call(global, next);
        }
    }

    function instrumentBase() {
        doInstrumentRegistrar('setTimeout', 0);
        doInstrumentRegistrar('requestAnimationFrame', 0);
        doInstrumentRegistrar('addEventListenter', 1);
    }

    function instrumentECharts() {
        var echarts = settings.echarts;

        var dummyDom = document.createElement('div');
        var dummyChart = echarts.init(dummyDom, null, {width: 10, height: 10});
        var ECClz = dummyChart.constructor;
        dummyChart.dispose();

        ECClz.prototype.setOption = doInstrumentHandler(ECClz.prototype.setOption, 'setOption');
    }

    function doInstrumentRegistrar(name, handlerIndex) {
        global[name] = function () {
            var args = [].slice.call(arguments);
            args[handlerIndex] = doInstrumentHandler(args[handlerIndex], name);
            return original[name].apply(this, args);
        };
    }

    function doInstrumentHandler(orginalHandler, tag) {
        return function () {
            var start = now();
            var result = orginalHandler.apply(this, arguments);
            var end = now();
            addTick(start, end, tag);
            return result;
        };
    }

    function addTick(start, end, tag) {
        var ticks = durationChart.ticks;
        var tickTypes = durationChart.tickTypes;
        var tags = durationChart.tags;

        // Arbitrary number.
        if (end - start > 0.3) {

            // In case that setOption in event listener.
            var lastIndex = tickTypes.length - 1;
            if (tickTypes[lastIndex] === 0) {
                tickTypes[lastIndex] = end;
                tags[lastIndex] = tag;
            }
            else {
                ticks.push(start, end);
                // 0: start, 1: end
                tickTypes.push(0, 1);
                tag = tag;
                tags.push(tag, tag);
            }
        }

        if (!ticks.length) {
            return;
        }

        var newStart = end - DURATION_CHART_DURATION;
        var dropCount = 0;
        for (var i = 0; i < ticks.length; i++) {
            var tick = ticks[i];
            if (tick < newStart) {
                dropCount++;
            }
        }
        if (dropCount > 0) {
            ticks.splice(0, dropCount);
            tickTypes.splice(0, dropCount);
            tags.splice(0, dropCount);
        }
    }

    function initDurationChart() {
        var dom = document.getElementById(settings.durationChartDom);
        var domStyle = dom.style;
        // domStyle.border = '2px solid #333';
        domStyle.boxShadow = '0 0 3px #000';
        domStyle.backgroundColor = '#eee';
        domStyle.padding = '0';
        domStyle.height = '60px';
        domStyle.margin = '10px 20px';

        var domWidth = getSize(dom, 0);
        var domHeight = getSize(dom, 1);

        durationChart.canvas = document.createElement('canvas');
        dom.appendChild(durationChart.canvas);
        durationChart.canvas.style.width = domWidth + 'px';
        durationChart.canvas.style.height = domHeight + 'px';
        durationChart.width = durationChart.canvas.width = domWidth * dpr;
        durationChart.height = durationChart.canvas.height = domHeight * dpr;

        durationChart.ctx = durationChart.canvas.getContext('2d');

        var paddingV = durationChart.width * DURATION_CHART_PADDING_V;
        var paddingTop = durationChart.height * DURATION_CHART_PADDING_TOP;
        var paddingBottom = durationChart.height * DURATION_CHART_PADDING_BOTTOM;
        durationChart.bodyLeft = paddingV;
        durationChart.bodyWidth = durationChart.width - 2 * paddingV;
        durationChart.bodyTop = paddingTop;
        durationChart.bodyHeight = durationChart.height - paddingTop - paddingBottom;

        durationChart.renderExtent = [durationChart.bodyLeft, durationChart.bodyLeft + durationChart.bodyWidth];
        var extent = [0, DURATION_CHART_DURATION];
        durationChart.slowThresholdLength =
            linearMap(SLOW_THRESHOLD, extent, durationChart.renderExtent)
            - linearMap(0, extent, durationChart.renderExtent);
    }

    function renderDurationChart() {
        // var renderStart = now();

        var ticks = durationChart.ticks;
        var tickTypes = durationChart.tickTypes;
        var ctx = durationChart.ctx;
        var timeEnd = now();
        var timeExtent = [timeEnd - DURATION_CHART_DURATION, timeEnd];
        var slowThresholdLength = durationChart.slowThresholdLength;

        ctx.clearRect(0, 0, durationChart.width, durationChart.height);

        ctx.fillStyle = DURATION_CHART_NORMAL_FILL;

        var x;
        var slowRects = [];

        if (tickTypes[0] === 1) {
            x = durationChart.bodyLeft;
        }

        for (var i = 0; i < ticks.length; i++) {
            var tick = ticks[i];
            var tickType = tickTypes[i];

            var tickCoord = linearMap(tick, timeExtent, durationChart.renderExtent);
            if (tickType === 0) {
                x = tickCoord;
            }
            else if (tickType === 1) {
                var width = Math.max(tickCoord - x, 0.5);
                ctx.fillRect(x, durationChart.bodyTop, width, durationChart.bodyHeight);
                if (width > slowThresholdLength) {
                    slowRects.push(
                        x + slowThresholdLength,
                        durationChart.bodyTop,
                        width - slowThresholdLength,
                        durationChart.bodyHeight
                    );
                }
            }
        }

        if (slowRects.length) {
            for (var i = 0; i < slowRects.length;) {
                var x = slowRects[i++];
                var y = slowRects[i++];
                var width = slowRects[i++];
                var height = slowRects[i++];
                var canvasGradient = ctx.createLinearGradient(x, y, x + width, y);
                canvasGradient.addColorStop(0, DURATION_CHART_NORMAL_FILL);
                canvasGradient.addColorStop(1, DURATION_CHART_SLOW_FILL);
                ctx.fillStyle = canvasGradient;
                ctx.fillRect(x, y, width, height);
            }
        }

        // var renderDuration = now() - renderStart;
        // if (renderDuration > 1) {
            // console.warn(renderDuration);
        // }
    }

    function linearMap(val, domain, range) {
        var subDomain = domain[1] - domain[0];
        var subRange = range[1] - range[0];

        if (val <= domain[0]) {
            return range[0];
        }
        if (val >= domain[1]) {
            return range[1];
        }

        return (val - domain[0]) / subDomain * subRange + range[0];
    }

    function getSize(root, whIdx) {
        var wh = ['width', 'height'][whIdx];
        var cwh = ['clientWidth', 'clientHeight'][whIdx];
        var plt = ['paddingLeft', 'paddingTop'][whIdx];
        var prb = ['paddingRight', 'paddingBottom'][whIdx];

        // IE8 does not support getComputedStyle, but it use VML.
        var stl = document.defaultView.getComputedStyle(root);

        return (
            (root[cwh] || parseInt10(stl[wh]) || parseInt10(root.style[wh]))
            - (parseInt10(stl[plt]) || 0)
            - (parseInt10(stl[prb]) || 0)
        ) | 0;
    }

    function parseInt10(val) {
        return parseInt(val, 10);
    }

})(window);


text:
@interface AppDelegate ()

@end

@implementation AppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {

    [HBXXMPPTool instance];

    self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];

    HBXLoginViewController *vc = [[HBXLoginViewController alloc] init];

    UINavigationController *naVC = [[UINavigationController alloc] initWithRootViewController:vc];

    self.window.rootViewController = naVC;

    [self.window makeKeyAndVisible];

    // Override point for customization after application launch.
    return YES;
}

- (void)applicationWillResignActive:(UIApplication *)application {
    // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
    // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
}

- (void)applicationDidEnterBackground:(UIApplication *)application {
    // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
    // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
}

- (void)applicationWillEnterForeground:(UIApplication *)application {
    // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
}

- (void)applicationDidBecomeActive:(UIApplication *)application {
    // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
}

- (void)applicationWillTerminate:(UIApplication *)application {
    // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}

#pragma mark -登陆成功之后切换contoller

- (void)handleMainViewController {

    self.window.rootViewController = nil;

    HBXChatViewController *vc = [[HBXChatViewController alloc] init];
    vc.tabBarItem.image =  [HBXUtil getImage:@"tabbar_mainframe"];
    vc.tabBarItem.selectedImage =  [HBXUtil getImage:@"tabbar_mainframeHL"];
    UINavigationController *naVC = [[UINavigationController alloc] initWithRootViewController:vc];

    HBXContactsViewController *vc2 = [[HBXContactsViewController alloc] init];
    vc2.title = @"联系人";
    vc2.tabBarItem.image = [HBXUtil getImage:@"tabbar_contacts"];
    vc2.tabBarItem.selectedImage = [HBXUtil getImage:@"tabbar_contactsHL"];
    UINavigationController *naVC2 = [[UINavigationController alloc] initWithRootViewController:vc2];

    HBXFoundViewController *vc3 = [[HBXFoundViewController alloc] init];
    vc3.title = @"发现";
    vc3.tabBarItem.image = [HBXUtil getImage:@"tabbar_discover"];
    vc3.tabBarItem.selectedImage = [HBXUtil getImage:@"tabbar_discoverHL"];
    UINavigationController *naVC3 = [[UINavigationController alloc] initWithRootViewController:vc3];

    HBXUserCenterViewController *vc4 = [[HBXUserCenterViewController alloc] init];
    vc4.title = @"我";
    vc4.tabBarItem.image = [HBXUtil getImage:@"tabbar_me"];
    vc4.tabBarItem.selectedImage = [HBXUtil getImage:@"tabbar_meHL"];
    UINavigationController *naVC4 = [[UINavigationController alloc] initWithRootViewController:vc4];

    UITabBarController *tabVC = [[UITabBarController alloc] init];
    tabVC.viewControllers = @[naVC,naVC2,naVC3,naVC4];

     self.window.rootViewController = tabVC;
}

@end
;


text:
#include <stdint.h>

#include "libavutil/attributes.h"
#include "libavutil/float_dsp.h"
#include "float_dsp_arm.h"

void ff_vector_fmul_neon(float *dst, const float *src0, const float *src1, int len);

void ff_vector_fmac_scalar_neon(float *dst, const float *src, float mul,
                                int len);

void ff_vector_fmul_scalar_neon(float *dst, const float *src, float mul,
                                int len);

void ff_vector_fmul_window_neon(float *dst, const float *src0,
                                const float *src1, const float *win, int len);

void ff_vector_fmul_add_neon(float *dst, const float *src0, const float *src1,
                             const float *src2, int len);

void ff_vector_fmul_reverse_neon(float *dst, const float *src0,
                                 const float *src1, int len);

void ff_butterflies_float_neon(float *v1, float *v2, int len);

float ff_scalarproduct_float_neon(const float *v1, const float *v2, int len);

av_cold void ff_float_dsp_init_neon(AVFloatDSPContext *fdsp)
{
    fdsp->vector_fmul = ff_vector_fmul_neon;
    fdsp->vector_fmac_scalar = ff_vector_fmac_scalar_neon;
    fdsp->vector_fmul_scalar = ff_vector_fmul_scalar_neon;
    fdsp->vector_fmul_window = ff_vector_fmul_window_neon;
    fdsp->vector_fmul_add    = ff_vector_fmul_add_neon;
    fdsp->vector_fmul_reverse = ff_vector_fmul_reverse_neon;
    fdsp->butterflies_float = ff_butterflies_float_neon;
    fdsp->scalarproduct_float = ff_scalarproduct_float_neon;
}


text:
`gh-ost`'s design allows for trusted and reliable tests of the migration without compromising production data integrity.

Test on replica if you:
- Are unsure of `gh-ost`, have not gained confidence into its workings
- Just want to experiment with a real migration without affecting production (maybe measure migration time?)
- Wish to observe data change impact

## What testing on replica means

TL;DR `gh-ost` will make all changes on a replica and leave both original and ghost tables for you to compare.

## Issuing a test drive

Apply `--test-on-replica --host=<a.replica>`.
- `gh-ost` would connect to the indicated server
- Will verify this is indeed a replica and not a master
- Will perform _everything_ on this replica. Other then checking who the master is, it will otherwise not touch it.
  - All `INFORMATION_SCHEMA` and `SELECT` queries run on the replica
  - Ghost table is created on the replica
  - Rows are copied onto the ghost table on the replica
  - Binlog events are read from the replica and applied to ghost table on the replica
  - So... everything

`gh-ost` will sync the ghost table with the original table.
- When it is satisfied, it will issue a `STOP SLAVE`, stopping replication
- Will finalize last few statements
- Will swap tables via normal [cut-over](cut-over.md), and immediately revert the swap.
- Will terminate. No table is dropped.

You are now left with the original table **and** the ghost table. When using a trivial `alter` statement, such as `engine-innodb`, both tables _should_ be identical.

You now have the time to verify the tool works correctly. You may checksum the entire table data if you like.
- e.g.
  `mysql -e 'select * from mydb.mytable order by id' | md5sum`
  `mysql -e 'select * from mydb._mytable_gst order by id' | md5sum`
- or of course only select the shared columns before/after the migration
- We use the trivial `engine=innodb` for `alter` when testing. This way the resulting ghost table is identical in structure to the original table (including indexes) and we expect data to be completely identical. We use `md5sum` on the entire dataset to confirm the test result.
- When adding/dropping columns, you will want to use the explicit list of shared columns before/after migration. This list is printed by `gh-ost` at the beginning of the migration.

### Cleanup

It's your job to:
- Drop the ghost table (at your leisure, you should be aware that a `DROP` can be a lengthy operation)
- Start replication back (via `START SLAVE`)

### Examples

Simple:
```shell
$ gh-ost --host=myhost.com --conf=/etc/gh-ost.cnf --database=test --table=sample_table --alter="engine=innodb" --chunk-size=2000 --max-load=Threads_connected=20 --initially-drop-ghost-table --initially-drop-old-table --test-on-replica --verbose --execute
```

Elaborate:
```shell
$ gh-ost --host=myhost.com --conf=/etc/gh-ost.cnf --database=test --table=sample_table --alter="engine=innodb" --chunk-size=2000 --max-load=Threads_connected=20 --switch-to-rbr --initially-drop-ghost-table --initially-drop-old-table --test-on-replica --postpone-cut-over-flag-file=/tmp/ghost-postpone.flag --exact-rowcount --concurrent-rowcount --allow-nullable-unique-key --verbose --execute
```
- Count exact number of rows (makes ETA estimation very good). This goes at the expense of paying the time for issuing a `SELECT COUNT(*)` on your table. We use this lovingly.
- Automatically switch to `RBR` if replica is configured as `SBR`. See also: [migrating with SBR](migrating-with-sbr.md)
- allow iterating on a `UNIQUE KEY` that has `NULL`able columns (at your own risk)

### Further notes

Do not confuse `--test-on-replica` with `--migrate-on-replica`; the latter performs the migration and _keeps it that way_ (does not revert the table swap nor stops replication)

As part of testing on replica, `gh-ost` issues a `STOP SLAVE`. This requires the `SUPER` privilege.
See related discussion on https://github.com/github/gh-ost/issues/162


text:
<!DOCTYPE html>

  <title>Social ~ freedom.js Demo</title>
  <meta http-equiv='Content-Type' contents='text/html;charset=utf-8' />
  <link href='style.css' rel='stylesheet' type='text/css' />

  freedom.js
  ▶ Demos
  ▶ Chat

Log in

Log In

    <input id='msg-input' type='text' placeholder="I'm embracing a distributed web"/>


text:
package org.spongepowered.api.block.entity;

import org.spongepowered.api.spawner.Spawner;

/**
 * Represents a Monster Spawner.
 */
public interface MobSpawner extends BlockEntity, Spawner {

    /**
     * Trigger an immediate spawn of a batch of entities.
     *
     *
This will obey the restrictions of maximum nearby entities and player
     * range unless the {@code force} flag is set.

     *
     * @param force Whether to ignore spawning restrictions
     */
    void spawnEntityBatchImmediately(boolean force);
}


text:
has($errorKey) ?: 'has-error' !!}">

    {{$label}}

        @include('admin::form.error')

        <textarea class="form-control" id="{{$id}}" name="{{$name}}" placeholder="{{ $placeholder }}" {!! $attributes !!} >{{ old($column, $value) }}</textarea>

        @include('admin::form.help-block')


text:
package com.beecavegames.dispatch;

public class DoubleParameterDefinition extends ParameterDefinition<Double> {

	public DoubleParameterDefinition(String[] names) {
		super(names, Double.TYPE);
	}

	@Override
	public Double parse(String val) {
		return Double.valueOf(val);
	}

}


text:
namespace Hopac.Core {
  using System.Diagnostics;
  using System.Runtime.CompilerServices;
  using System.Threading;

  internal struct SpinlockTicket {
    internal volatile int Next;
    internal volatile int Turn;

    [MethodImpl(AggressiveInlining.Flag)]
    internal void Enter() {
      var ticket = Interlocked.Increment(ref Next) - 1;
      while (Turn != ticket) ;
    }

    [MethodImpl(AggressiveInlining.Flag)]
    internal void Exit() {
      Turn += 1;
    }
  }
}


text:
import expect from 'expect';
import { version } from '../../../../package.json';

describe('manifest version', () => {
  if ('TRAVIS_TAG' in process.env && process.env.TRAVIS_TAG !== '') {
    it('should match the tag version', () => {
      expect(`v${version}`).toEqual(process.env.TRAVIS_TAG);
    });
  }

  if ('APPVEYOR_REPO_TAG_NAME' in process.env && process.env.APPVEYOR_REPO_TAG_NAME !== '') {
    it('should match the tag version', () => {
      expect(`v${version}`).toEqual(process.env.APPVEYOR_REPO_TAG_NAME);
    });
  }
});