text:
package org.cucina.security.api;

import org.apache.commons.lang3.builder.ToStringBuilder;

import java.io.Serializable;
import java.util.Collection;

/**
 * @author vlevine
 */
public class UserDto
		implements Serializable {
	private static final long serialVersionUID = 4803992322689471938L;
	private Collection<PermissionDto> permissions;
	private Collection<PreferenceDto> preferences;
	private Long id;
	private String email;
	private String password;
	private String username;

	/**
	 * @return .
	 */
	public String getEmail() {
		return email;
	}

	/**
	 * @param email .
	 */
	public void setEmail(String email) {
		this.email = email;
	}

	/**
	 * @return .
	 */
	public Long getId() {
		return id;
	}

	/**
	 * @param id .
	 */
	public void setId(Long id) {
		this.id = id;
	}

	/**
	 * @return .
	 */
	public String getPassword() {
		return password;
	}

	/**
	 * @param password .
	 */
	public void setPassword(String password) {
		this.password = password;
	}

	/**
	 * @return .
	 */
	public Collection<PermissionDto> getPermissions() {
		return permissions;
	}

	/**
	 * @param permissions .
	 */
	public void setPermissions(Collection<PermissionDto> permissions) {
		this.permissions = permissions;
	}

	/**
	 * @return .
	 */
	public Collection<PreferenceDto> getPreferences() {
		return preferences;
	}

	/**
	 * @param preferences .
	 */
	public void setPreferences(Collection<PreferenceDto> preferences) {
		this.preferences = preferences;
	}

	/**
	 * @return .
	 */
	public String getUsername() {
		return username;
	}

	/**
	 * @param username .
	 */
	public void setUsername(String username) {
		this.username = username;
	}

	/**
	 * Default toString implementation
	 *
	 * @return This object as String.
	 */
	@Override
	public String toString() {
		return ToStringBuilder.reflectionToString(this);
	}
}


text:
cask "bilimini" do
  version "1.5.2"
  sha256 "e788c43dd9717f7d822cf3be0fc76778b043a9ef1399923a8dba85f30ef680bc"

  url "https://github.com/chitosai/bilimini/releases/download/v#{version}/bilimini-#{version}-mac.zip"
  appcast "https://github.com/chitosai/bilimini/releases.atom"
  name "bilimini"
  homepage "https://github.com/chitosai/bilimini"

  auto_updates true

  app "bilimini.app"
end

redpajama_set_name: RedPajamaGithub


text:
<!DOCTYPE html>

	<title>First JQuery mobile project</title>
	<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/jquery-mobile/1.4.5/jquery.mobile.css">
	<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/jquery-mobile/1.4.5/jquery.mobile.icons.min.css">

Royal Roots Apparel

Shop

Join our blog

Contact

Home

Shop

Blog

Contact


text:
class Event::Agents::Nodes::SearchController < ApplicationController
  include Cms::NodeFilter::View
  include Event::EventHelper
  helper Event::EventHelper
  helper Cms::ListHelper

  before_action :set_params

  def index
    @categories = []
    @items = []
    if @cur_node.parent
      @categories = Cms::Node.site(@cur_site).where({:id.in => @cur_node.parent.st_category_ids}).sort(filename: 1)
    end
    if @keyword.present? || @category_ids.present? || @start_date.present? || @close_date.present?
      list_events
    end
  end

  private

  def set_params
    safe_params = params.permit(:search_keyword, category_ids: [], event: [ :start_date, :close_date])
    @keyword = safe_params[:search_keyword].presence
    @category_ids = safe_params[:category_ids].presence || []
    @category_ids = @category_ids.map(&:to_i)
    if params[:event].present? && params[:event][0].present?
      @start_date = params[:event][0][:start_date].presence
      @close_date = params[:event][0][:close_date].presence
    end
    @start_date = Date.parse(@start_date) if @start_date.present?
    @close_date = Date.parse(@close_date) if @close_date.present?
  end

  def list_events
    criteria = Cms::Page.site(@cur_site).and_public
    criteria = criteria.search(keyword: @keyword) if @keyword.present?
    criteria = criteria.where(@cur_node.condition_hash)
    criteria = criteria.in(category_ids: @category_ids) if @category_ids.present?

    if @start_date.present? && @close_date.present?
      criteria = criteria.search(dates: @start_date..@close_date)
    elsif @start_date.present?
      criteria = criteria.search(start_date: @start_date)
    elsif @close_date.present?
      criteria = criteria.search(close_date: @close_date)
    else
      criteria = criteria.exists(event_dates: 1)
    end

    @items = criteria.order_by(@cur_node.sort_hash).
      page(params[:page]).
      per(@cur_node.limit)
  end
end


text:
namespace CrossCuttingConcerns
{
    public class France : IVATStrategy
    {
        public int GetVatByCountryCode()
        {
            return 20;
        }
    }
}


text:
using search_engines_helper::AddSearchEngine;
using search_engines_helper::AllServicesMatch;
using search_engines_helper::ChangeDefaultSearchProvider;
using search_engines_helper::CreateTestTemplateURL;
using search_engines_helper::DeleteSearchEngineByKeyword;
using search_engines_helper::DeleteSearchEngineBySeed;
using search_engines_helper::EditSearchEngine;
using search_engines_helper::GetServiceForProfile;
using search_engines_helper::GetVerifierService;
using search_engines_helper::ServiceMatchesVerifier;

class TwoClientSearchEnginesSyncTest : public SyncTest {
 public:
  TwoClientSearchEnginesSyncTest() : SyncTest(TWO_CLIENT) {}
  virtual ~TwoClientSearchEnginesSyncTest() {}

 private:
  DISALLOW_COPY_AND_ASSIGN(TwoClientSearchEnginesSyncTest);
};

// TCM ID - 8898628.
IN_PROC_BROWSER_TEST_F(TwoClientSearchEnginesSyncTest, Add) {
  ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
  ASSERT_TRUE(AllServicesMatch());

  AddSearchEngine(0, 0);

  ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1)));
  ASSERT_TRUE(AllServicesMatch());
}

// TCM ID - 8912240.
IN_PROC_BROWSER_TEST_F(TwoClientSearchEnginesSyncTest, AddMultiple) {
  ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
  ASSERT_TRUE(AllServicesMatch());

  // Add a few entries.
  for (int i = 0; i < 3; ++i) {
    AddSearchEngine(0, i);
  }

  ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1)));
  ASSERT_TRUE(AllServicesMatch());
}

// TCM ID - 9011135.
IN_PROC_BROWSER_TEST_F(TwoClientSearchEnginesSyncTest, Duplicates) {
  ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
  ASSERT_TRUE(AllServicesMatch());

  // Add two entries with the same Name and URL (but different keywords).
  // Note that we have to change the GUID of the duplicate.
  AddSearchEngine(0, 0);
  GetServiceForProfile(0)->Add(CreateTestTemplateURL(0,
      ASCIIToUTF16("somethingelse"), "newguid"));
  GetVerifierService()->Add(CreateTestTemplateURL(0,
      ASCIIToUTF16("somethingelse"), "newguid"));
  ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1)));
  ASSERT_TRUE(AllServicesMatch());
}

// TCM ID - 9004201.
IN_PROC_BROWSER_TEST_F(TwoClientSearchEnginesSyncTest, UpdateKeyword) {
  ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
  ASSERT_TRUE(AllServicesMatch());

  AddSearchEngine(0, 0);

  // Change the keyword.
  ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1)));
  ASSERT_TRUE(AllServicesMatch());

  EditSearchEngine(0, ASCIIToUTF16("test0"), ASCIIToUTF16("test0"),
                   ASCIIToUTF16("newkeyword"), "http://www.test0.com/");

  ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1)));
  ASSERT_TRUE(AllServicesMatch());
}

// TCM ID - 8894859.
IN_PROC_BROWSER_TEST_F(TwoClientSearchEnginesSyncTest, UpdateUrl) {
  ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
  ASSERT_TRUE(AllServicesMatch());

  AddSearchEngine(0, 0);

  ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1)));
  ASSERT_TRUE(AllServicesMatch());

  // Change the URL.
  EditSearchEngine(0, ASCIIToUTF16("test0"), ASCIIToUTF16("test0"),
                   ASCIIToUTF16("test0"), "http://www.wikipedia.org/q=%s");

  ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1)));
  ASSERT_TRUE(AllServicesMatch());
}

// TCM ID - 8910490.
IN_PROC_BROWSER_TEST_F(TwoClientSearchEnginesSyncTest, UpdateName) {
  ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
  ASSERT_TRUE(AllServicesMatch());

  AddSearchEngine(0, 0);

  ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1)));
  ASSERT_TRUE(AllServicesMatch());

  // Change the short name.
  EditSearchEngine(0, ASCIIToUTF16("test0"), ASCIIToUTF16("New Name"),
                   ASCIIToUTF16("test0"), "http://www.test0.com/");

  ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1)));
  ASSERT_TRUE(AllServicesMatch());
}

// TCM ID - 8898660.
IN_PROC_BROWSER_TEST_F(TwoClientSearchEnginesSyncTest, Delete) {
  ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
  ASSERT_TRUE(AllServicesMatch());

  AddSearchEngine(0, 0);

  ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1)));
  ASSERT_TRUE(AllServicesMatch());

  DeleteSearchEngineBySeed(0, 0);

  ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1)));
  ASSERT_TRUE(AllServicesMatch());
}

// TCM ID - 9004196.
IN_PROC_BROWSER_TEST_F(TwoClientSearchEnginesSyncTest, ConflictKeyword) {
  ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
  DisableVerifier();
  ASSERT_TRUE(AllServicesMatch());

  // Add a different search engine to each client, but make their keywords
  // conflict.
  AddSearchEngine(0, 0);
  AddSearchEngine(1, 1);
  const TemplateURL* turl = GetServiceForProfile(1)->GetTemplateURLForKeyword(
      ASCIIToUTF16("test1"));
  EXPECT_TRUE(turl);
  GetServiceForProfile(1)->ResetTemplateURL(turl,
                                            turl->short_name(),
                                            ASCIIToUTF16("test0"),
                                            turl->url()->url());

  ASSERT_TRUE(AwaitQuiescence());
  ASSERT_TRUE(AllServicesMatch());
}

// TCM ID - 9004187.
IN_PROC_BROWSER_TEST_F(TwoClientSearchEnginesSyncTest, MergeMultiple) {
  ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
  DisableVerifier();
  ASSERT_TRUE(AllServicesMatch());

  // Set up some different search engines on each client, with some interesting
  // conflicts.
  // client0: { SE0, SE1, SE2 }
  for (int i = 0; i < 3; ++i) {
    AddSearchEngine(0, i);
  }

  // client1: { SE0, SE2, SE3, SE0 + different URL }
  AddSearchEngine(1, 0);
  AddSearchEngine(1, 2);
  AddSearchEngine(1, 3);
  GetServiceForProfile(1)->Add(CreateTestTemplateURL(0,
      "http://www.somethingelse.com/", ASCIIToUTF16("somethingelse.com"),
      "somethingelse"));

  ASSERT_TRUE(AwaitQuiescence());
  ASSERT_TRUE(AllServicesMatch());
}

// TCM ID - 8906436.
IN_PROC_BROWSER_TEST_F(TwoClientSearchEnginesSyncTest, DisableSync) {
  ASSERT_TRUE(SetupSync());
  ASSERT_TRUE(AllServicesMatch());

  ASSERT_TRUE(GetClient(1)->DisableSyncForAllDatatypes());
  AddSearchEngine(0, 0);
  ASSERT_TRUE(
      GetClient(0)->AwaitFullSyncCompletion("Added a search engine."));
  ASSERT_TRUE(ServiceMatchesVerifier(0));
  ASSERT_FALSE(ServiceMatchesVerifier(1));

  ASSERT_TRUE(GetClient(1)->EnableSyncForAllDatatypes());
  ASSERT_TRUE(AwaitQuiescence());
  ASSERT_TRUE(AllServicesMatch());
}

// TCM ID - 8891809.
IN_PROC_BROWSER_TEST_F(TwoClientSearchEnginesSyncTest, SyncDefault) {
  ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
  ASSERT_TRUE(AllServicesMatch());

  AddSearchEngine(0, 0);
  ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1)));

  // Change the default to the new search engine, sync, and ensure that it
  // changed in the second client. AllServicesMatch does a default search
  // provider check.
  ChangeDefaultSearchProvider(0, 0);
  ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1)));

  ASSERT_TRUE(AllServicesMatch());
}

// Ensure that we can change the search engine and immediately delete it
// without putting the clients out of sync.
IN_PROC_BROWSER_TEST_F(TwoClientSearchEnginesSyncTest, DeleteSyncedDefault) {
  ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
  ASSERT_TRUE(AllServicesMatch());

  AddSearchEngine(0, 0);
  AddSearchEngine(0, 1);
  ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1)));

  ChangeDefaultSearchProvider(0, 0);
  ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1)));
  ASSERT_TRUE(AllServicesMatch());

  // Change the default on the first client and delete the old default.
  ChangeDefaultSearchProvider(0, 1);
  DeleteSearchEngineBySeed(0, 0);
  ASSERT_TRUE(GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1)));

  ASSERT_TRUE(AllServicesMatch());
}


text:
namespace blink {

class CORE_EXPORT NGBreakToken
    : public GarbageCollectedFinalized<NGBreakToken> {
 public:
  virtual ~NGBreakToken() {}

  enum NGBreakTokenType { kBlockBreakToken, kTextBreakToken };
  NGBreakTokenType Type() const { return static_cast<NGBreakTokenType>(type_); }

  DEFINE_INLINE_VIRTUAL_TRACE() {}

 protected:
  NGBreakToken(NGBreakTokenType type) : type_(type) {}

 private:
  unsigned type_ : 1;
};

}  // namespace blink

#endif  // NGBreakToken_h


text:
using Npgsql;
using Scarlet.Supports;
using System;
using System.Security;
using System.Threading;
using System.Threading.Tasks;

namespace Scarlet.Rdbms
{
    public sealed class NpgsqlConnectionEstablisher : IDbConnectionEstablisher<NpgsqlConnection>
    {
        public NpgsqlConnectionEstablisher(SecureString secureConnectionString)
        {
            SecureConnectionString = secureConnectionString ?? throw new ArgumentNullException(nameof(secureConnectionString));
        }

        public SecureString SecureConnectionString { get; }

        public void Dispose()
        {
            SecureConnectionString.Dispose();
        }

        public NpgsqlConnection Establish()
        {
            var connection = new NpgsqlConnection()
            {
                ConnectionString = SecureStringConverter.FromSecureString(SecureConnectionString)
            };

            try
            {
                connection.Open();
            }
            catch (Exception)
            {
                throw;
            }

            return connection;
        }

        public async Task<NpgsqlConnection> EstablishAsync()
        {
            var connection = new NpgsqlConnection(SecureStringConverter.FromSecureString(SecureConnectionString));

            try
            {
                await connection.OpenAsync();
            }
            catch (Exception)
            {
                throw;
            }

            return connection;
        }

        public async Task<NpgsqlConnection> EstablishAsync(CancellationToken cancellationToken)
        {
            var connection = new NpgsqlConnection(SecureStringConverter.FromSecureString(SecureConnectionString));

            try
            {
                await connection.OpenAsync(cancellationToken);
            }
            catch (Exception)
            {
                throw;
            }

            return connection;
        }
    }
}


text:
layout: page
title: Robertson Technologies Party
date: 2016-05-24
author: Abigail Mcintyre
tags: weekly links, java
status: published
summary: Vestibulum ut eros mi. Sed aliquam tristique aliquam. Sed condimentum.
banner: images/banner/people.jpg
booking:
  startDate: 06/20/2019
  endDate: 06/24/2019
  ctyhocn: ORHWOHX
  groupCode: RTP
published: true
---
Sed auctor nibh sed nibh tempus bibendum. Aenean tempor porta orci et tincidunt. Pellentesque lacinia lacus id nibh mollis accumsan. Mauris feugiat hendrerit purus, nec consectetur ligula cursus eu. Sed pulvinar, turpis sed mollis varius, orci justo commodo quam, vestibulum ultrices dui lectus in diam. Suspendisse potenti. Morbi at elementum lectus. Mauris ullamcorper quis augue in malesuada. Sed ac nisl venenatis, posuere arcu ac, sollicitudin eros.

* Fusce at ipsum non mauris ultricies volutpat
* Ut lacinia odio sit amet sapien eleifend, suscipit venenatis mi pellentesque
* Etiam sodales leo et auctor condimentum
* Donec eget felis vel leo pellentesque mollis
* Quisque ornare odio a sem finibus gravida eu nec dolor.

Nunc laoreet neque nec accumsan accumsan. Aliquam purus est, congue quis semper a, semper eu nisi. Morbi sit amet odio urna. Etiam sed eros a mi hendrerit luctus. In fringilla nunc id lacus semper imperdiet. Etiam in velit condimentum, aliquam ex ut, egestas nisl. Vivamus id sollicitudin orci, a ultricies massa. In a tincidunt arcu. Suspendisse malesuada velit in tortor vestibulum viverra. Integer id fringilla nulla. Ut dolor ante, mattis non blandit ornare, efficitur vitae sem. Mauris accumsan metus turpis, vitae sollicitudin nibh pulvinar in. Donec eget egestas urna.


text:
#ifndef OPENGL_GEN_CORE_1_0_H
#define OPENGL_GEN_CORE_1_0_H

#ifdef __cplusplus
extern "C" {
#endif /*__cplusplus*/
typedef void (CODEGEN_FUNCPTR * PFNGLBLENDFUNCPROC)(GLenum sfactor, GLenum dfactor);
typedef void (CODEGEN_FUNCPTR * PFNGLCLEARPROC)(GLbitfield mask);
typedef void (CODEGEN_FUNCPTR * PFNGLCLEARCOLORPROC)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
typedef void (CODEGEN_FUNCPTR * PFNGLCLEARDEPTHPROC)(GLdouble depth);
typedef void (CODEGEN_FUNCPTR * PFNGLCLEARSTENCILPROC)(GLint s);
typedef void (CODEGEN_FUNCPTR * PFNGLCOLORMASKPROC)(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
typedef void (CODEGEN_FUNCPTR * PFNGLCULLFACEPROC)(GLenum mode);
typedef void (CODEGEN_FUNCPTR * PFNGLDEPTHFUNCPROC)(GLenum func);
typedef void (CODEGEN_FUNCPTR * PFNGLDEPTHMASKPROC)(GLboolean flag);
typedef void (CODEGEN_FUNCPTR * PFNGLDEPTHRANGEPROC)(GLdouble ren_near, GLdouble ren_far);
typedef void (CODEGEN_FUNCPTR * PFNGLDISABLEPROC)(GLenum cap);
typedef void (CODEGEN_FUNCPTR * PFNGLDRAWBUFFERPROC)(GLenum mode);
typedef void (CODEGEN_FUNCPTR * PFNGLENABLEPROC)(GLenum cap);
typedef void (CODEGEN_FUNCPTR * PFNGLFINISHPROC)();
typedef void (CODEGEN_FUNCPTR * PFNGLFLUSHPROC)();
typedef void (CODEGEN_FUNCPTR * PFNGLFRONTFACEPROC)(GLenum mode);
typedef void (CODEGEN_FUNCPTR * PFNGLGETBOOLEANVPROC)(GLenum pname, GLboolean * params);
typedef void (CODEGEN_FUNCPTR * PFNGLGETDOUBLEVPROC)(GLenum pname, GLdouble * params);
typedef GLenum (CODEGEN_FUNCPTR * PFNGLGETERRORPROC)();
typedef void (CODEGEN_FUNCPTR * PFNGLGETFLOATVPROC)(GLenum pname, GLfloat * params);
typedef void (CODEGEN_FUNCPTR * PFNGLGETINTEGERVPROC)(GLenum pname, GLint * params);
typedef const GLubyte * (CODEGEN_FUNCPTR * PFNGLGETSTRINGPROC)(GLenum name);
typedef void (CODEGEN_FUNCPTR * PFNGLGETTEXIMAGEPROC)(GLenum target, GLint level, GLenum format, GLenum type, GLvoid * pixels);
typedef void (CODEGEN_FUNCPTR * PFNGLGETTEXLEVELPARAMETERFVPROC)(GLenum target, GLint level, GLenum pname, GLfloat * params);
typedef void (CODEGEN_FUNCPTR * PFNGLGETTEXLEVELPARAMETERIVPROC)(GLenum target, GLint level, GLenum pname, GLint * params);
typedef void (CODEGEN_FUNCPTR * PFNGLGETTEXPARAMETERFVPROC)(GLenum target, GLenum pname, GLfloat * params);
typedef void (CODEGEN_FUNCPTR * PFNGLGETTEXPARAMETERIVPROC)(GLenum target, GLenum pname, GLint * params);
typedef void (CODEGEN_FUNCPTR * PFNGLHINTPROC)(GLenum target, GLenum mode);
typedef GLboolean (CODEGEN_FUNCPTR * PFNGLISENABLEDPROC)(GLenum cap);
typedef void (CODEGEN_FUNCPTR * PFNGLLINEWIDTHPROC)(GLfloat width);
typedef void (CODEGEN_FUNCPTR * PFNGLLOGICOPPROC)(GLenum opcode);
typedef void (CODEGEN_FUNCPTR * PFNGLPIXELSTOREFPROC)(GLenum pname, GLfloat param);
typedef void (CODEGEN_FUNCPTR * PFNGLPIXELSTOREIPROC)(GLenum pname, GLint param);
typedef void (CODEGEN_FUNCPTR * PFNGLPOINTSIZEPROC)(GLfloat size);
typedef void (CODEGEN_FUNCPTR * PFNGLPOLYGONMODEPROC)(GLenum face, GLenum mode);
typedef void (CODEGEN_FUNCPTR * PFNGLREADBUFFERPROC)(GLenum mode);
typedef void (CODEGEN_FUNCPTR * PFNGLREADPIXELSPROC)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid * pixels);
typedef void (CODEGEN_FUNCPTR * PFNGLSCISSORPROC)(GLint x, GLint y, GLsizei width, GLsizei height);
typedef void (CODEGEN_FUNCPTR * PFNGLSTENCILFUNCPROC)(GLenum func, GLint ref, GLuint mask);
typedef void (CODEGEN_FUNCPTR * PFNGLSTENCILMASKPROC)(GLuint mask);
typedef void (CODEGEN_FUNCPTR * PFNGLSTENCILOPPROC)(GLenum fail, GLenum zfail, GLenum zpass);
typedef void (CODEGEN_FUNCPTR * PFNGLTEXIMAGE1DPROC)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid * pixels);
typedef void (CODEGEN_FUNCPTR * PFNGLTEXIMAGE2DPROC)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid * pixels);
typedef void (CODEGEN_FUNCPTR * PFNGLTEXPARAMETERFPROC)(GLenum target, GLenum pname, GLfloat param);
typedef void (CODEGEN_FUNCPTR * PFNGLTEXPARAMETERFVPROC)(GLenum target, GLenum pname, const GLfloat * params);
typedef void (CODEGEN_FUNCPTR * PFNGLTEXPARAMETERIPROC)(GLenum target, GLenum pname, GLint param);
typedef void (CODEGEN_FUNCPTR * PFNGLTEXPARAMETERIVPROC)(GLenum target, GLenum pname, const GLint * params);
typedef void (CODEGEN_FUNCPTR * PFNGLVIEWPORTPROC)(GLint x, GLint y, GLsizei width, GLsizei height);

extern PFNGLBLENDFUNCPROC _funcptr_glBlendFunc;
#define glBlendFunc _funcptr_glBlendFunc
extern PFNGLCLEARPROC _funcptr_glClear;
#define glClear _funcptr_glClear
extern PFNGLCLEARCOLORPROC _funcptr_glClearColor;
#define glClearColor _funcptr_glClearColor
extern PFNGLCLEARDEPTHPROC _funcptr_glClearDepth;
#define glClearDepth _funcptr_glClearDepth
extern PFNGLCLEARSTENCILPROC _funcptr_glClearStencil;
#define glClearStencil _funcptr_glClearStencil
extern PFNGLCOLORMASKPROC _funcptr_glColorMask;
#define glColorMask _funcptr_glColorMask
extern PFNGLCULLFACEPROC _funcptr_glCullFace;
#define glCullFace _funcptr_glCullFace
extern PFNGLDEPTHFUNCPROC _funcptr_glDepthFunc;
#define glDepthFunc _funcptr_glDepthFunc
extern PFNGLDEPTHMASKPROC _funcptr_glDepthMask;
#define glDepthMask _funcptr_glDepthMask
extern PFNGLDEPTHRANGEPROC _funcptr_glDepthRange;
#define glDepthRange _funcptr_glDepthRange
extern PFNGLDISABLEPROC _funcptr_glDisable;
#define glDisable _funcptr_glDisable
extern PFNGLDRAWBUFFERPROC _funcptr_glDrawBuffer;
#define glDrawBuffer _funcptr_glDrawBuffer
extern PFNGLENABLEPROC _funcptr_glEnable;
#define glEnable _funcptr_glEnable
extern PFNGLFINISHPROC _funcptr_glFinish;
#define glFinish _funcptr_glFinish
extern PFNGLFLUSHPROC _funcptr_glFlush;
#define glFlush _funcptr_glFlush
extern PFNGLFRONTFACEPROC _funcptr_glFrontFace;
#define glFrontFace _funcptr_glFrontFace
extern PFNGLGETBOOLEANVPROC _funcptr_glGetBooleanv;
#define glGetBooleanv _funcptr_glGetBooleanv
extern PFNGLGETDOUBLEVPROC _funcptr_glGetDoublev;
#define glGetDoublev _funcptr_glGetDoublev
extern PFNGLGETERRORPROC _funcptr_glGetError;
#define glGetError _funcptr_glGetError
extern PFNGLGETFLOATVPROC _funcptr_glGetFloatv;
#define glGetFloatv _funcptr_glGetFloatv
extern PFNGLGETINTEGERVPROC _funcptr_glGetIntegerv;
#define glGetIntegerv _funcptr_glGetIntegerv
extern PFNGLGETSTRINGPROC _funcptr_glGetString;
#define glGetString _funcptr_glGetString
extern PFNGLGETTEXIMAGEPROC _funcptr_glGetTexImage;
#define glGetTexImage _funcptr_glGetTexImage
extern PFNGLGETTEXLEVELPARAMETERFVPROC _funcptr_glGetTexLevelParameterfv;
#define glGetTexLevelParameterfv _funcptr_glGetTexLevelParameterfv
extern PFNGLGETTEXLEVELPARAMETERIVPROC _funcptr_glGetTexLevelParameteriv;
#define glGetTexLevelParameteriv _funcptr_glGetTexLevelParameteriv
extern PFNGLGETTEXPARAMETERFVPROC _funcptr_glGetTexParameterfv;
#define glGetTexParameterfv _funcptr_glGetTexParameterfv
extern PFNGLGETTEXPARAMETERIVPROC _funcptr_glGetTexParameteriv;
#define glGetTexParameteriv _funcptr_glGetTexParameteriv
extern PFNGLHINTPROC _funcptr_glHint;
#define glHint _funcptr_glHint
extern PFNGLISENABLEDPROC _funcptr_glIsEnabled;
#define glIsEnabled _funcptr_glIsEnabled
extern PFNGLLINEWIDTHPROC _funcptr_glLineWidth;
#define glLineWidth _funcptr_glLineWidth
extern PFNGLLOGICOPPROC _funcptr_glLogicOp;
#define glLogicOp _funcptr_glLogicOp
extern PFNGLPIXELSTOREFPROC _funcptr_glPixelStoref;
#define glPixelStoref _funcptr_glPixelStoref
extern PFNGLPIXELSTOREIPROC _funcptr_glPixelStorei;
#define glPixelStorei _funcptr_glPixelStorei
extern PFNGLPOINTSIZEPROC _funcptr_glPointSize;
#define glPointSize _funcptr_glPointSize
extern PFNGLPOLYGONMODEPROC _funcptr_glPolygonMode;
#define glPolygonMode _funcptr_glPolygonMode
extern PFNGLREADBUFFERPROC _funcptr_glReadBuffer;
#define glReadBuffer _funcptr_glReadBuffer
extern PFNGLREADPIXELSPROC _funcptr_glReadPixels;
#define glReadPixels _funcptr_glReadPixels
extern PFNGLSCISSORPROC _funcptr_glScissor;
#define glScissor _funcptr_glScissor
extern PFNGLSTENCILFUNCPROC _funcptr_glStencilFunc;
#define glStencilFunc _funcptr_glStencilFunc
extern PFNGLSTENCILMASKPROC _funcptr_glStencilMask;
#define glStencilMask _funcptr_glStencilMask
extern PFNGLSTENCILOPPROC _funcptr_glStencilOp;
#define glStencilOp _funcptr_glStencilOp
extern PFNGLTEXIMAGE1DPROC _funcptr_glTexImage1D;
#define glTexImage1D _funcptr_glTexImage1D
extern PFNGLTEXIMAGE2DPROC _funcptr_glTexImage2D;
#define glTexImage2D _funcptr_glTexImage2D
extern PFNGLTEXPARAMETERFPROC _funcptr_glTexParameterf;
#define glTexParameterf _funcptr_glTexParameterf
extern PFNGLTEXPARAMETERFVPROC _funcptr_glTexParameterfv;
#define glTexParameterfv _funcptr_glTexParameterfv
extern PFNGLTEXPARAMETERIPROC _funcptr_glTexParameteri;
#define glTexParameteri _funcptr_glTexParameteri
extern PFNGLTEXPARAMETERIVPROC _funcptr_glTexParameteriv;
#define glTexParameteriv _funcptr_glTexParameteriv
extern PFNGLVIEWPORTPROC _funcptr_glViewport;
#define glViewport _funcptr_glViewport

#ifdef __cplusplus
}
#endif /*__cplusplus*/
#endif /*OPENGL_GEN_CORE_1_0_H*/


text:
package ${package}.pages;

import java.util.Date;
import org.apache.tapestry5.annotations.*;
import org.apache.tapestry5.ioc.annotations.*;
import org.apache.tapestry5.corelib.components.*;
import org.apache.tapestry5.SymbolConstants;
import org.apache.tapestry5.alerts.AlertManager;

/**
 * Start page of application ${artifactId}.
 */
public class Index
{
    @Property
    @Inject
    @Symbol(SymbolConstants.TAPESTRY_VERSION)
    private String tapestryVersion;

    @InjectComponent
    private Zone zone;

    @Persist
    @Property
    private int clickCount;

    @Inject
    private AlertManager alertManager;

    public Date getCurrentTime()
    {
        return new Date();
    }

    void onActionFromIncrement()
    {
        alertManager.info("Increment clicked");

        clickCount++;
    }

    Object onActionFromIncrementAjax()
    {
        clickCount++;

        alertManager.info("Increment (via Ajax) clicked");

        return zone;
    }
}


text:
package org.apache.jackrabbit.vault.validation.spi.impl;

import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.Collection;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
import java.util.Set;
import java.util.regex.Pattern;
import java.util.stream.Collectors;

import org.apache.commons.lang3.StringUtils;
import org.apache.jackrabbit.vault.fs.api.PathFilterSet;
import org.apache.jackrabbit.vault.fs.api.WorkspaceFilter;
import org.apache.jackrabbit.vault.packaging.PackageProperties;
import org.apache.jackrabbit.vault.packaging.PackageType;
import org.apache.jackrabbit.vault.util.Constants;
import org.apache.jackrabbit.vault.util.DocViewNode2;
import org.apache.jackrabbit.vault.validation.spi.DocumentViewXmlValidator;
import org.apache.jackrabbit.vault.validation.spi.FilterValidator;
import org.apache.jackrabbit.vault.validation.spi.MetaInfPathValidator;
import org.apache.jackrabbit.vault.validation.spi.NodeContext;
import org.apache.jackrabbit.vault.validation.spi.NodePathValidator;
import org.apache.jackrabbit.vault.validation.spi.PropertiesValidator;
import org.apache.jackrabbit.vault.validation.spi.ValidationContext;
import org.apache.jackrabbit.vault.validation.spi.ValidationMessage;
import org.apache.jackrabbit.vault.validation.spi.ValidationMessageSeverity;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

/** Checks if the package type is correctly set for this package
 *
 * @see JCRVLT-170 */
public final class PackageTypeValidator implements NodePathValidator, DocumentViewXmlValidator, FilterValidator, PropertiesValidator, MetaInfPathValidator {

    private static final String NODETYPE_SLING_OSGI_CONFIG = "sling:OsgiConfig";
	protected static final String MESSAGE_FILTER_HAS_INCLUDE_EXCLUDES = "Package of type '%s' is not supposed to contain includes/excludes below any of its filters!";
    protected static final String MESSAGE_UNSUPPORTED_SUB_PACKAGE_OF_TYPE = "Package of type '%s' must only contain sub packages of type '%s' but found subpackage of type '%s'!";
    protected static final String MESSAGE_UNSUPPORTED_SUB_PACKAGE = "Package of type '%s' is not supposed to contain any subpackages!";
    protected static final String MESSAGE_DEPENDENCY = "Package of type '%s' must not have package dependencies but found dependencies '%s'!";
    protected static final String MESSAGE_LEGACY_TYPE = "Package of type '%s' is legacy. Use one of the other types instead!";
    protected static final String MESSAGE_PACKAGE_HOOKS = "Package of type '%s' must not contain package hooks but has '%s'!";
    protected static final String MESSAGE_NO_PACKAGE_TYPE_SET = "No package type set, make sure that property 'packageType' is set in the properties.xml!";
    protected static final String MESSAGE_NO_OSGI_BUNDLE_OR_CONFIG_ALLOWED = "Package of type '%s' is not supposed to contain OSGi bundles or configurations!";
    protected static final String MESSAGE_ONLY_OSGI_BUNDLE_OR_CONFIG_OR_SUBPACKAGE_ALLOWED = "Package of type '%s' is not supposed to contain anything but OSGi bundles/configurations and subpackages!";
    protected static final String MESSAGE_APP_CONTENT = "Package of type '%s' is not supposed to contain content below root nodes %s!";
    protected static final String MESSAGE_NO_APP_CONTENT_FOUND = "Package of type '%s' is not supposed to contain content outside root nodes %s!";
    protected static final String MESSAGE_PROHIBITED_MUTABLE_PACKAGE_TYPE = "All mutable package types are prohibited and this package is of mutable type '%s'";
    protected static final String MESSAGE_PROHIBITED_IMMUTABLE_PACKAGE_TYPE = "All immutable package types are prohibited and this package is of immutable type '%s'";
    protected static final String SLING_OSGI_CONFIG = NODETYPE_SLING_OSGI_CONFIG;
    protected static final Path PATH_HOOKS = Paths.get(Constants.VAULT_DIR, Constants.HOOKS_DIR);
    private final @NotNull PackageType type;
    private final @NotNull ValidationMessageSeverity severity;
    private final @NotNull ValidationMessageSeverity severityForLegacyType;
    private final @NotNull Pattern jcrInstallerNodePathRegex;
    private final @NotNull Pattern jcrInstallerAdditionalFileNodePathRegex;
    private final @Nullable ValidationContext containerValidationContext;
    private final ValidationMessageSeverity severityForNoPackageType;
    private final boolean prohibitMutableContent;
    private final boolean prohibitImmutableContent;
    private final boolean allowComplexFilterRulesInApplicationPackages;
    private final boolean allowInstallHooksInApplicationPackages;
    private final @NotNull WorkspaceFilter filter;
    private final Set<String> immutableRootNodeNames;
    private List<String> validContainerNodePaths;
    private List<NodeContext> potentiallyDisallowedContainerNodes;

    public PackageTypeValidator(@NotNull WorkspaceFilter workspaceFilter, @NotNull ValidationMessageSeverity severity,
            @NotNull ValidationMessageSeverity severityForNoPackageType, @NotNull ValidationMessageSeverity severityForLegacyType,
            boolean prohibitMutableContent, boolean prohibitImmutableContent, boolean allowComplexFilterRulesInApplicationPackages,
            boolean allowInstallHooksInApplicationPackages, @NotNull PackageType type, @NotNull Pattern jcrInstallerNodePathRegex,
            Pattern jcrInstallerAdditionalFileNodePathRegex, @NotNull Set<String> immutableRootNodeNames, @Nullable ValidationContext containerValidationContext) {
        this.type = type;
        this.severity = severity;
        this.severityForNoPackageType = severityForNoPackageType;
        this.severityForLegacyType = severityForLegacyType;
        this.prohibitMutableContent = prohibitMutableContent;
        this.prohibitImmutableContent = prohibitImmutableContent;
        this.allowComplexFilterRulesInApplicationPackages = allowComplexFilterRulesInApplicationPackages;
        this.allowInstallHooksInApplicationPackages = allowInstallHooksInApplicationPackages;
        this.jcrInstallerNodePathRegex = jcrInstallerNodePathRegex;
        this.jcrInstallerAdditionalFileNodePathRegex = jcrInstallerAdditionalFileNodePathRegex;
        this.immutableRootNodeNames = immutableRootNodeNames;
        this.containerValidationContext = containerValidationContext;
        this.filter = workspaceFilter;
        this.validContainerNodePaths = new LinkedList<>();
        this.potentiallyDisallowedContainerNodes = new LinkedList<>();
    }

    private boolean isOsgiBundleOrConfigurationNode(String nodePath, boolean isFileNode) {
        if (!jcrInstallerNodePathRegex.matcher(nodePath).matches()) {
            return false;
        }
        if (isFileNode) {
            return jcrInstallerAdditionalFileNodePathRegex.matcher(nodePath).matches();
        }
        return true;
    }

    static boolean isSubPackage(String nodePath) {
        return (nodePath.endsWith(".zip"));
    }

    boolean isImmutableContent(String nodePath) {
        return immutableRootNodeNames.stream().anyMatch(
                rootNodeName ->  ("/"+rootNodeName).equals(nodePath) || nodePath.startsWith( "/"+rootNodeName + "/"));
    }

    @Override
    public @Nullable Collection<ValidationMessage> done() {
        // check if questionable nodes are parents of valid nodes
        List<NodeContext> invalidNodes = potentiallyDisallowedContainerNodes.stream().filter(
                s -> validContainerNodePaths.stream().noneMatch(
                    p -> p.startsWith(s.getNodePath() + "/") || p.equals(s.getNodePath())))
                .collect(Collectors.toList());
        if (!invalidNodes.isEmpty()) {
            return invalidNodes.stream().map(
                    e -> new ValidationMessage(severity, String.format(MESSAGE_ONLY_OSGI_BUNDLE_OR_CONFIG_OR_SUBPACKAGE_ALLOWED, type), e.getNodePath(), e.getFilePath(), e.getBasePath(), null))
                    .collect(Collectors.toList());
        }
        return null;
    }

    @Override
    public @Nullable Collection<ValidationMessage> validate(@NotNull NodeContext nodeContext) {
        // ignore uncovered nodePaths
        if (!filter.covers(nodeContext.getNodePath())) {
            return null;
        }
        Collection<ValidationMessage> messages = new LinkedList<>();
        switch (type) {
        case CONTENT:
            if (isImmutableContent(nodeContext.getNodePath())) {
                messages.add(new ValidationMessage(severity, String.format(MESSAGE_APP_CONTENT, type, immutableRootNodeNames.stream().collect(Collectors.joining("' or '", "'", "'")))));
            }
            if (isOsgiBundleOrConfigurationNode(nodeContext.getNodePath(), true)) {
                messages.add(new ValidationMessage(severity, String.format(MESSAGE_NO_OSGI_BUNDLE_OR_CONFIG_ALLOWED, type)));
            }
            break;
        case APPLICATION:
            if (!isImmutableContent(nodeContext.getNodePath())) {
                messages.add(new ValidationMessage(severity, String.format(MESSAGE_NO_APP_CONTENT_FOUND, type, immutableRootNodeNames.stream().collect(Collectors.joining("' or '", "'", "'")))));
            }
            if (isOsgiBundleOrConfigurationNode(nodeContext.getNodePath(), true)) {
                messages.add(new ValidationMessage(severity, String.format(MESSAGE_NO_OSGI_BUNDLE_OR_CONFIG_ALLOWED, type)));
            }
            // sub packages are detected via validate(Properties) on the sub package
            break;
        case CONTAINER:
            // sling:OsgiConfig
            if (isOsgiBundleOrConfigurationNode(nodeContext.getNodePath(), true)) {
                validContainerNodePaths.add(nodeContext.getNodePath());
            }
            else if (isSubPackage(nodeContext.getNodePath())) {
                validContainerNodePaths.add(nodeContext.getNodePath());
            } else {
                // only potentially disallowed, as the node may be a parent of a sub package or osgi bundle, which is allowed as well
                potentiallyDisallowedContainerNodes.add(nodeContext);
            }
            break;
        case MIXED:
            // no validations currently as most relaxed type
            break;
        }
        return messages;
    }

    @Override
    public Collection<ValidationMessage> validate(@NotNull WorkspaceFilter filter) {
        switch (type) {
        case APPLICATION:
            if (!allowComplexFilterRulesInApplicationPackages && hasIncludesOrExcludes(filter)) {
                return Collections.singleton(new ValidationMessage(severity, String.format(MESSAGE_FILTER_HAS_INCLUDE_EXCLUDES, type)));
            }
            break;
        case CONTENT:
        case CONTAINER:
        case MIXED:
            break;
        }
        return null;
    }

    @Override
    public Collection<ValidationMessage> validate(@NotNull PackageProperties properties) {
        PackageType packageType = properties.getPackageType();
        if (packageType == null) {
            return Collections.singleton(new ValidationMessage(severityForNoPackageType, MESSAGE_NO_PACKAGE_TYPE_SET));
        }

        Collection<ValidationMessage> messages = new LinkedList<>();
        // is sub package?
        if (containerValidationContext != null) {
            messages.add(new ValidationMessage(ValidationMessageSeverity.DEBUG, "Found sub package"));
            ValidationMessage message = validateSubPackageType(properties.getPackageType(),
                    containerValidationContext.getProperties().getPackageType());
            if (message != null) {
                messages.add(message);
            }
        }

        switch (packageType) {
        case APPLICATION:
            // must not contain hooks (this detects external hooks)
            if (!properties.getExternalHooks().isEmpty() && !allowInstallHooksInApplicationPackages) {
                messages.add(new ValidationMessage(severity,
                        String.format(MESSAGE_PACKAGE_HOOKS, properties.getPackageType(), properties.getExternalHooks())));
            }
            if (prohibitImmutableContent) {
                messages.add(new ValidationMessage(severity,
                        String.format(MESSAGE_PROHIBITED_IMMUTABLE_PACKAGE_TYPE, properties.getPackageType())));
            }
            break;
        case CONTENT:
            if (prohibitMutableContent) {
                messages.add(new ValidationMessage(severity,
                        String.format(MESSAGE_PROHIBITED_MUTABLE_PACKAGE_TYPE, properties.getPackageType())));
            }
            break;
        case CONTAINER:
            // no dependencies
            if (properties.getDependencies() != null && properties.getDependencies().length > 0) {
                messages.add(new ValidationMessage(severity,
                        String.format(MESSAGE_DEPENDENCY, properties.getPackageType(), StringUtils.join(properties.getDependencies()))));
            }
            if (prohibitImmutableContent) {
                messages.add(new ValidationMessage(ValidationMessageSeverity.ERROR,
                        String.format(MESSAGE_PROHIBITED_IMMUTABLE_PACKAGE_TYPE, properties.getPackageType())));
            }
            break;
        case MIXED:
            messages.add(
                    new ValidationMessage(severityForLegacyType, String.format(MESSAGE_LEGACY_TYPE, properties.getPackageType())));
            if (prohibitImmutableContent) {
                messages.add(new ValidationMessage(ValidationMessageSeverity.ERROR,
                        String.format(MESSAGE_PROHIBITED_IMMUTABLE_PACKAGE_TYPE, properties.getPackageType())));
            }
            if (prohibitMutableContent) {
                messages.add(new ValidationMessage(ValidationMessageSeverity.ERROR,
                        String.format(MESSAGE_PROHIBITED_MUTABLE_PACKAGE_TYPE, properties.getPackageType())));
            }
            break;
        }
        return messages;
    }

    @Override
    public @Nullable Collection<ValidationMessage> validate(@NotNull DocViewNode2 node, @NotNull NodeContext nodeContext,
            boolean isRoot) {
        Collection<ValidationMessage> messages = new LinkedList<>();
        switch (type) {
        case CONTENT:
        case APPLICATION:
            // is it sling:OsgiConfig node?
            if (node.getPrimaryType().isPresent() && NODETYPE_SLING_OSGI_CONFIG.equals(node.getPrimaryType().orElse("")) && isOsgiBundleOrConfigurationNode(nodeContext.getNodePath(), false)) {
                messages.add(new ValidationMessage(severity, String.format(MESSAGE_NO_OSGI_BUNDLE_OR_CONFIG_ALLOWED, type)));
            }
            break;
        case CONTAINER:
            if (node.getPrimaryType().isPresent() && NODETYPE_SLING_OSGI_CONFIG.equals(node.getPrimaryType().orElse("")) && isOsgiBundleOrConfigurationNode(nodeContext.getNodePath(), false)) {
                validContainerNodePaths.add(nodeContext.getNodePath());
            }
            break;
        case MIXED:
            // no validations currently as most relaxed type
            break;
        }
        return messages;
    }

    static boolean hasIncludesOrExcludes(WorkspaceFilter filter) {
        for (PathFilterSet set : filter.getFilterSets()) {
            if (!set.getEntries().isEmpty()) {
                return true;
            }
        }
        return false;
    }

    private ValidationMessage validateSubPackageType(PackageType packageType, @Nullable PackageType containerPackageType) {
        ValidationMessage message = null;
        if (containerPackageType == null) {
            return null;
        }
        switch (containerPackageType) {
        case APPLICATION:
            // no sub packages allowed
            message = new ValidationMessage(severity, String.format(MESSAGE_UNSUPPORTED_SUB_PACKAGE, containerPackageType));
            break;
        case CONTENT:
            if (packageType != PackageType.CONTENT) {
                message = new ValidationMessage(severity, String.format(MESSAGE_UNSUPPORTED_SUB_PACKAGE_OF_TYPE, containerPackageType,
                        PackageType.CONTENT.toString(), packageType));
            }
            break;
        case CONTAINER:
            if (packageType != PackageType.APPLICATION && packageType != PackageType.CONTAINER && packageType != PackageType.CONTENT) {
                message = new ValidationMessage(severity, String.format(MESSAGE_UNSUPPORTED_SUB_PACKAGE_OF_TYPE, containerPackageType,
                        StringUtils.join(new String[] { PackageType.APPLICATION.toString(), PackageType.CONTENT.toString(),
                                PackageType.CONTAINER.toString() }, ", "),
                        packageType));
            }
            break;
        case MIXED:
            break;
        }
        return message;
    }

    @Override
    public Collection<ValidationMessage> validateMetaInfPath(@NotNull Path filePath, @NotNull Path basePath, boolean isFolder) {
        switch (type) {
        case APPLICATION:
            if (filePath.startsWith(PATH_HOOKS) && !allowInstallHooksInApplicationPackages)
                // must not contain hooks (this detects internal hooks)
                return Collections.singleton(new ValidationMessage(severity, String.format(MESSAGE_PACKAGE_HOOKS, type, filePath)));
        default:
            break;
        }
        return null;
    }

}


text:
package farm.bsg.pages.common;

import farm.bsg.Security.Permission;
import farm.bsg.html.HtmlPump;
import farm.bsg.models.Person;
import farm.bsg.route.FinishedHref;
import farm.bsg.route.SessionRequest;
import farm.bsg.route.SimpleURI;

public class SessionPage extends GenericPage {
    protected final SessionRequest session;
    protected String               currentTitle;

    public SessionPage(final SessionRequest session, final SimpleURI uri) {
        super(session.engine, uri);
        this.session = session;
        this.currentTitle = this.engine.navbar.title(uri.toRoutingPattern());
    }

    public String finish_pump(final HtmlPump pump) {
        final StringBuilder html = new StringBuilder();
        pump.pump(html);
        final String navbar = this.engine.navbar.html(this.href, this.session);
        return this.engine.template.html(this.currentTitle, navbar, html.toString());
    }

    public boolean has(final Permission permission) {
        return this.session.has(permission);
    }

    public void mustHave(final Permission permission) {

    }

    public Person person() {
        return this.session.getPerson();
    }

    public void redirect(final FinishedHref href) {
        this.session.redirect(href);
    }

}


text:
angular.module('odin.controllers')
.controller('OrderingsController', OrderingsController);

function OrderingsController ($scope, $rootScope, LocationSearchService, rest, $routeParams) {
    LocationSearchService.init();
    var filterName = 'orderBy';

    $scope.custom_defaults = $rootScope.custom_defaults;

    $scope.currentColor = sessionStorage.getItem('currentColor') || '';

    $scope.orderings = [
        {
            name: 'Nombre',
            property: 'name',
            sort: 'ASC'
        },
        {
            name: 'Fecha de publicación',
            property: 'publishedAt',
            sort: 'DESC',
            filesOnly: true
        },
        // {
        //     name: 'Más descargados',
        //     property: 'downloads',
        //     sort: null,
        //     datasetsOnly: true
        // },
        {
            name: 'Última actualización',
            property: 'updatedAt',
            sort: 'DESC',
            filesOnly: true
        }
    ].map(function(order) {
        order.active = LocationSearchService.isActive(filterName, order.property);
        return order;
    });
    $scope.selectOrder = function(order) {
        $rootScope.showFiltersMenu = false;
        $rootScope.showBackdrop = false;
        if(order.active) {
            LocationSearchService.deleteFilter(filterName);
            LocationSearchService.deleteFilter('sort');
        } else {
            LocationSearchService.setFilter(filterName, order.property);
            LocationSearchService.setFilter('sort', order.sort);
        }
    };
    $scope.removeAll = function() {
        LocationSearchService.deleteFilter(filterName);
        LocationSearchService.deleteFilter('sort');
    };

    $scope.collapsed = !!$scope.collapse || false;
    $scope.toggleCollapse = function() {
        $scope.collapsed = !$scope.collapsed;
    };

}


text: make vagrant-deploy


text:
<!DOCTYPE html>

  <link href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css" rel="stylesheet"/>

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

JsViews 'datepicker' tag controls (using jQuery UI datepicker) – pop-up or inline


text:
<?php

namespace App\Events;

use Illuminate\Broadcasting\Channel;
use Illuminate\Queue\SerializesModels;
use Illuminate\Broadcasting\PrivateChannel;
use Illuminate\Broadcasting\PresenceChannel;
use Illuminate\Broadcasting\InteractsWithSockets;
use Illuminate\Contracts\Broadcasting\ShouldBroadcast;
use App\Models\Client;

class ClientAction
{
    private $client;
    private $action;

    use InteractsWithSockets, SerializesModels;

    public function getClient()
    {
        return $this->client;
    }
    public function getAction()
    {
        return $this->action;
    }

    /**
     * Create a new event instance.
     * ClientAction constructor.
     * @param Client $client
     * @param $action
     */
    public function __construct(Client $client, $action)
    {
        $this->client = $client;
        $this->action = $action;
    }

    /**
     * Get the channels the event should broadcast on.
     *
     * @return Channel|array
     */
    public function broadcastOn()
    {
        return new PrivateChannel('channel-name');
    }
}


text:
Youtube videos in your book
==============

This plugins requires gitbook `>=2.0.0`.

### How to use it?

Add it to your `book.json`, then run `gitbook install`:

```
{
    plugins: ["youtube"]
}
```

You can now add youtube vieo to your book:

```
take a look at this video:

{% youtube %}https://www.youtube.com/watch?v=9bZkp7q19f0{% endyoutube %}
```

The video will be replace by the embed iframe in the website and by a link in the ebook versions.


text:
package v1

import (
	"k8s.io/apimachinery/pkg/conversion"
	"k8s.io/apimachinery/pkg/runtime"
	"k8s.io/apimachinery/pkg/runtime/schema"

	"github.com/openshift/origin/pkg/image/apiserver/admission/apis/imagepolicy"
)

// SchemeGroupVersion is group version used to register these objects
var SchemeGroupVersion = schema.GroupVersion{Group: "", Version: "v1"}

var (
	SchemeBuilder = runtime.NewSchemeBuilder(
		addKnownTypes,
		imagepolicy.InstallLegacy,

		addConversionFuncs,
		addDefaultingFuncs,
	)
	InstallLegacy = SchemeBuilder.AddToScheme
)

// Adds the list of known types to api.Scheme.
func addKnownTypes(scheme *runtime.Scheme) error {
	scheme.AddKnownTypes(SchemeGroupVersion,
		&ImagePolicyConfig{},
	)
	return nil
}

func addConversionFuncs(scheme *runtime.Scheme) error {
	return scheme.AddConversionFuncs(
		// TODO: remove when MatchSignatures is implemented
		func(in *ImageCondition, out *imagepolicy.ImageCondition, s conversion.Scope) error {
			return s.DefaultConvert(in, out, conversion.IgnoreMissingFields)
		},
		// TODO: remove when ConsumptionRules and PlacementRules are implemented
		func(in *ImagePolicyConfig, out *imagepolicy.ImagePolicyConfig, s conversion.Scope) error {
			return s.DefaultConvert(in, out, conversion.IgnoreMissingFields)
		},
	)
}

func (obj *ImagePolicyConfig) GetObjectKind() schema.ObjectKind { return &obj.TypeMeta }


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

namespace AbstractSyntax.Symbol
{
    [Serializable]
    public class ValueSymbol : Element
    {
        public object Value { get; private set; }

        public ValueSymbol(object value)
        {
            Value = value;
        }

        public override bool IsConstant
        {
            get { return true; }
        }

        public override dynamic GenerateConstantValue()
        {
            return Value;
        }
    }
}


text:
using System;
using System.Collections.Generic;
using System.Reactive.Linq;
using System.Reactive.Threading.Tasks;
using MS.Core;

namespace System.Security.Permissions
{
    public static class __RegistryPermission
    {
        public static IObservable<System.Reactive.Unit> SetPathList(
            this IObservable<System.Security.Permissions.RegistryPermission> RegistryPermissionValue,
            IObservable<System.Security.Permissions.RegistryPermissionAccess> access,
            IObservable<System.String> pathList)
        {
            return ObservableExt.ZipExecute(RegistryPermissionValue, access, pathList,
                (RegistryPermissionValueLambda, accessLambda, pathListLambda) =>
                    RegistryPermissionValueLambda.SetPathList(accessLambda, pathListLambda));
        }

        public static IObservable<System.Reactive.Unit> AddPathList(
            this IObservable<System.Security.Permissions.RegistryPermission> RegistryPermissionValue,
            IObservable<System.Security.Permissions.RegistryPermissionAccess> access,
            IObservable<System.String> pathList)
        {
            return ObservableExt.ZipExecute(RegistryPermissionValue, access, pathList,
                (RegistryPermissionValueLambda, accessLambda, pathListLambda) =>
                    RegistryPermissionValueLambda.AddPathList(accessLambda, pathListLambda));
        }

        public static IObservable<System.Reactive.Unit> AddPathList(
            this IObservable<System.Security.Permissions.RegistryPermission> RegistryPermissionValue,
            IObservable<System.Security.Permissions.RegistryPermissionAccess> access,
            IObservable<System.Security.AccessControl.AccessControlActions> control, IObservable<System.String> pathList)
        {
            return ObservableExt.ZipExecute(RegistryPermissionValue, access, control, pathList,
                (RegistryPermissionValueLambda, accessLambda, controlLambda, pathListLambda) =>
                    RegistryPermissionValueLambda.AddPathList(accessLambda, controlLambda, pathListLambda));
        }

        public static IObservable<System.String> GetPathList(
            this IObservable<System.Security.Permissions.RegistryPermission> RegistryPermissionValue,
            IObservable<System.Security.Permissions.RegistryPermissionAccess> access)
        {
            return Observable.Zip(RegistryPermissionValue, access,
                (RegistryPermissionValueLambda, accessLambda) => RegistryPermissionValueLambda.GetPathList(accessLambda));
        }

        public static IObservable<System.Boolean> IsUnrestricted(
            this IObservable<System.Security.Permissions.RegistryPermission> RegistryPermissionValue)
        {
            return Observable.Select(RegistryPermissionValue,
                (RegistryPermissionValueLambda) => RegistryPermissionValueLambda.IsUnrestricted());
        }

        public static IObservable<System.Boolean> IsSubsetOf(
            this IObservable<System.Security.Permissions.RegistryPermission> RegistryPermissionValue,
            IObservable<System.Security.IPermission> target)
        {
            return Observable.Zip(RegistryPermissionValue, target,
                (RegistryPermissionValueLambda, targetLambda) => RegistryPermissionValueLambda.IsSubsetOf(targetLambda));
        }

        public static IObservable<System.Security.IPermission> Intersect(
            this IObservable<System.Security.Permissions.RegistryPermission> RegistryPermissionValue,
            IObservable<System.Security.IPermission> target)
        {
            return Observable.Zip(RegistryPermissionValue, target,
                (RegistryPermissionValueLambda, targetLambda) => RegistryPermissionValueLambda.Intersect(targetLambda));
        }

        public static IObservable<System.Security.IPermission> Union(
            this IObservable<System.Security.Permissions.RegistryPermission> RegistryPermissionValue,
            IObservable<System.Security.IPermission> other)
        {
            return Observable.Zip(RegistryPermissionValue, other,
                (RegistryPermissionValueLambda, otherLambda) => RegistryPermissionValueLambda.Union(otherLambda));
        }

        public static IObservable<System.Security.IPermission> Copy(
            this IObservable<System.Security.Permissions.RegistryPermission> RegistryPermissionValue)
        {
            return Observable.Select(RegistryPermissionValue,
                (RegistryPermissionValueLambda) => RegistryPermissionValueLambda.Copy());
        }

        public static IObservable<System.Security.SecurityElement> ToXml(
            this IObservable<System.Security.Permissions.RegistryPermission> RegistryPermissionValue)
        {
            return Observable.Select(RegistryPermissionValue,
                (RegistryPermissionValueLambda) => RegistryPermissionValueLambda.ToXml());
        }

        public static IObservable<System.Reactive.Unit> FromXml(
            this IObservable<System.Security.Permissions.RegistryPermission> RegistryPermissionValue,
            IObservable<System.Security.SecurityElement> esd)
        {
            return ObservableExt.ZipExecute(RegistryPermissionValue, esd,
                (RegistryPermissionValueLambda, esdLambda) => RegistryPermissionValueLambda.FromXml(esdLambda));
        }
    }
}


text:
#pragma once
#include <QString>
#include <QColor>
#include <string>
#include <boost/serialization/string.hpp>

namespace boost { namespace serialization {

	template <class ArchiveT>
	inline void save (ArchiveT & a, QColor const & q, unsigned const /*version*/)
	{
		using boost::serialization::make_nvp;
		std::string s = q.name().toStdString();
		a << make_nvp("value", s);
	}

	template <class ArchiveT>
	inline void load (ArchiveT & a, QColor & q, unsigned const /*version*/)
	{
		using boost::serialization::make_nvp;
		std::string s;
		a >> make_nvp("value", s);
		q.setNamedColor(QString::fromStdString(s));
	}

	template <class ArchiveT>
	inline void serialize (ArchiveT & a, QColor & q, unsigned const version)
	{
		boost::serialization::split_free(a, q, version);
	}

} }


text:
<!DOCTYPE html>

<link rel="help" href="https://drafts.css-houdini.org/css-layout-api/#dom-layoutconstraints-fixedinlinesize">
<link rel="match" href="fixed-inline-size-ref.html">
<meta name="assert" content="This test checks that LayoutConstraints#fixedInlineSize is passed into the layout function correctly." />


text:
package ocr

//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.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.

// PositionsInRecognizeLicensePlate is a nested struct in ocr response
type PositionsInRecognizeLicensePlate struct {
	Positions []Positions `json:"positions" xml:"positions"`
}


text:
#ifndef __SYS_CONFIG_H__
#define __SYS_CONFIG_H__

#include <machine/ieeefp.h>  /* floating point macros */
#include <sys/features.h>	/* POSIX defs */

/*************************************************************************
 esp8266-specific xtensa stuff
 *************************************************************************/

#ifndef _REENT_SMALL
#define _REENT_SMALL
#endif

/* esp8266 hardware FIFO buffers are 128 bytes */
#define __BUFSIZ__ 128

/*************************************************************************
 end of esp8266-specific stuff
 *************************************************************************/

#ifndef __EXPORT
#define __EXPORT
#endif

#ifndef __IMPORT
#define __IMPORT
#endif

/* Define return type of read/write routines.  In POSIX, the return type
   for read()/write() is "ssize_t" but legacy newlib code has been using
   "int" for some time.  If not specified, "int" is defaulted.  */
#ifndef _READ_WRITE_RETURN_TYPE
#define _READ_WRITE_RETURN_TYPE int
#endif
/* Define `count' parameter of read/write routines.  In POSIX, the `count'
   parameter is "size_t" but legacy newlib code has been using "int" for some
   time.  If not specified, "int" is defaulted.  */
#ifndef _READ_WRITE_BUFSIZE_TYPE
#define _READ_WRITE_BUFSIZE_TYPE int
#endif

#endif /* __SYS_CONFIG_H__ */


text:
package org.apache.openaz.xacml.std.datatypes;

/**
 * IDateTime is the minimal interface an object needs to support in order to be used in XACML functions that
 * expect a Date, DateTime, or Time.
 *
 * @param T the data type of the object implementing the interface
 */
public interface IDateTime<T> {
    /**
     * Adds the given ISO8601Duration to the IDateTime object.
     *
     * @param iso8601Duration the ISO8601Duration to add
     * @return a new T with the given ISO8601Duration added
     */
    T add(ISO8601Duration iso8601Duration);

    /**
     * Subtracts the given ISO8601Duration to the IDateTime object.
     *
     * @param iso8601Duration the ISO8601Duration to subtract
     * @return a new T with the given ISO8601Duration subtracted
     */
    T sub(ISO8601Duration iso8601Duration);
}


text:
/* dui.mobile.CheckBox */
.duiCheckBox {
  background-image: url(compat/button-bg.png);
}
.duiCheckBoxSelected {
  background-image: url(compat/button-sel-bg.png);
}
.duiCheckBoxChecked,
.duiCheckBox:checked {
  background-image: url(compat/button-chk-bg.png);
}
.duiCheckBoxChecked.duiCheckBoxSelected,
.duiCheckBox:checked.duiCheckBoxSelected {
  background-image: url(compat/button-unsel-bg.png);
}
.dj_gecko .duiCheckBox {
  background-image: -moz-linear-gradient(top, #f7fbf7 0%, #ced3ce 50%, #cecfd6 100%);
  -moz-appearance: none;
}
.dj_gecko .duiCheckBoxSelected {
  background-image: -moz-linear-gradient(top, #088eef 0%, #0869c6 50%, #0851ad 100%);
}
.dj_gecko .duiCheckBoxChecked,
.dj_gecko .duiCheckBox:checked {
  background-image: -moz-linear-gradient(top, #f7fbf7 0%, #ced3ce 50%, #cecfd6 100%);
}
.dj_gecko .duiCheckBoxChecked::after,
.dj_gecko .duiCheckBox:checked::after {
  -moz-transform: rotate(45deg);
  -moz-transform-origin: 50% 50%;
}
.dj_gecko .duiCheckBoxChecked.duiCheckBoxSelected,
.dj_gecko .duiCheckBox:checked.duiCheckBoxSelected {
  background-image: -moz-linear-gradient(top, #088eef 0%, #0869c6 50%, #0851ad 100%);
}
.dj_ff3 .duiCheckBox {
  -moz-border-radius: 6px;
}


text:
import React from 'react'
import App from '../components/App'

const AppComponent = () => <App />

export default AppComponent


text:
;(function () {
    "use strict";
    if (window.substringMatcher == undefined) {
        window.substringMatcher = function (value_list) {
            var clearText = function (x) {
                return S(x).latinise().s;
            };
            return function findMatches(q, cb) {
                var matches     = [];
                var substrRegex = new RegExp(clearText(q), 'i');
                $.each(value_list, function (i, value) {
                    if (substrRegex.test(clearText(value['value']))) {
                        matches.push(value);
                    }
                });
                cb(matches);
            };
        };
    }
}());

(function ($) {
    "use strict";
    window.SingularTypeahead = {
        configure: function (container, valueField) {

            var SINGULAR_BLUR_KEY   = 'SingularBlurKey',
                SINGULAR_CHANGE_KEY = 'SingularChangeKey',
                SINGULAR_PROCESS    = 'singular:process',
                SINGULAR_VALIDATE   = 'singular:validate';

            $('#' + container + ' span').first()
                                        .addClass("input-icon input-icon-sm right")
                                        .prepend('');

            var clearText = function (x) {
                return S(x).latinise().s.toUpperCase();
            };

            var clear =
                    "" +
                    "   " +
                    "";

            var typeaheadField          = '#' + container + ' > span  > input',
                typeaheadFieldJQueryRef = $(typeaheadField),
                subscriberMetadata      = {jumpToNext: false, factor: 0},
                clearCalled             = false,
                inputJQueryRef          = $('#' + valueField);

            var Typeahead_ = typeaheadFieldJQueryRef.data('tt-typeahead');

            function checkIfHasUpdate(eventName) {
                var events = $('#' + valueField).data('events');
                if (events && events.hasOwnProperty(eventName)) {
                    for (var i = 0; i <= events[eventName].length; i += 1) {
                        if (events[eventName][i] && events[eventName][i].handler.toString().indexOf('Wicket') > 0) {
                            return true;
                        }
                    }
                }
                return false;
            }

            function hasAjaxUpdate() {
                return checkIfHasUpdate('change') || checkIfHasUpdate(SINGULAR_PROCESS) || checkIfHasUpdate(SINGULAR_VALIDATE);
            }

            if (hasAjaxUpdate()) {
                Wicket.Event.subscribe(Wicket.Event.Topic.AJAX_CALL_COMPLETE, function (e, at) {
                    if (subscriberMetadata.jumpToNext) {
                        var focusables = $(":focusable");
                        $(focusables[focusables.index($(typeaheadField)) + subscriberMetadata.factor]).focus();
                        subscriberMetadata.jumpToNext = false;
                        clearCalled                   = false;
                    }
                })
            }

            function updateValue(newValue) {
                if (inputJQueryRef.data(SINGULAR_BLUR_KEY)) {
                    window.clearTimeout(inputJQueryRef.data(SINGULAR_BLUR_KEY));
                    inputJQueryRef.removeData(SINGULAR_BLUR_KEY);
                }
                inputJQueryRef.data(SINGULAR_CHANGE_KEY, window.setTimeout(function () {
                    var oldValue = inputJQueryRef.val();
                    inputJQueryRef.val(newValue);
                    if (oldValue !== newValue) {
                        console.log("triggered singular process");
                        inputJQueryRef.trigger(SINGULAR_PROCESS);
                    }
                    inputJQueryRef.removeData(SINGULAR_CHANGE_KEY);
                }, 50));
            }

            function onClearClick(e) {
                clearCalled = true;
                $('#' + container + '_clear').remove();
                $('#' + container + ' > span > .fa-chevron-down').show();
                typeaheadFieldJQueryRef.removeAttr('readonly');
                typeaheadFieldJQueryRef.typeahead('val', '');
                Typeahead_.enable();
                updateValue('');
                typeaheadFieldJQueryRef.focus();
            }

            function onClearMouseDown(e) {
                if (inputJQueryRef.data(SINGULAR_BLUR_KEY)) {
                    window.clearTimeout(inputJQueryRef.data(SINGULAR_BLUR_KEY));
                    inputJQueryRef.removeData(SINGULAR_BLUR_KEY);
                }
                inputJQueryRef.data(SINGULAR_CHANGE_KEY, "MOUSEDOWN");
            }

            function focusNextComponent(keydownEvent) {
                if (hasAjaxUpdate()) {
                    subscriberMetadata.jumpToNext = true;
                    subscriberMetadata.factor     = keydownEvent.shiftKey ? -1 : 1;
                } else {
                    var focusables = $(":focusable");
                    $(focusables[focusables.index($(typeaheadField)) + (keydownEvent.shiftKey ? -1 : 1)]).focus();
                }
            }

            function appendClearButton() {
                if(typeaheadFieldJQueryRef.is(':enabled')) {
                    typeaheadFieldJQueryRef.attr('readonly', true);
                    typeaheadFieldJQueryRef.after(clear);

                    var jQueryRefClearButton = $('#' + container + '_clear');

                    jQueryRefClearButton.on('click', onClearClick);
                    jQueryRefClearButton.on('click', onClearMouseDown);

                    Typeahead_.disable();
                }
                //If it's disabled, the span will be hide too.
                $('#' + container + ' > span > .fa-chevron-down').hide();

            }

            typeaheadFieldJQueryRef.on('typeahead:selected', function (event, selection) {
                clearCalled = false;
                updateValue(selection.key);

                appendClearButton();
                if (subscriberMetadata.jumpToNext) {
                    onTypeaheadFieldBlur();
                }
            });

            typeaheadFieldJQueryRef.on('keydown', function (event) {
                var code = event.keyCode || event.which;
                if (code === 9 && hasAjaxUpdate()) {
                    focusNextComponent(event);
                }
                // ativa o campo se estiver readonly e backspace ou delete
                if (typeaheadFieldJQueryRef.attr('readonly') && (code === 8) || (code === 46)) {
                    event.stopPropagation();
                    event.preventDefault();
                    onClearClick(event);
                }
            });
            typeaheadFieldJQueryRef.on('keypress', function (event) {
                var code = event.keyCode || event.which;
                // ativa o campo se estiver readonly e diferente de tab
                if (typeaheadFieldJQueryRef.attr('readonly') && code !== 9) {
                    event.preventDefault();
                    typeaheadFieldJQueryRef.typeahead('val', String.fromCharCode(code));
                    $('#' + valueField).val(String.fromCharCode(code));

                    $('#' + container + '_clear').remove();
                    typeaheadFieldJQueryRef.removeAttr('readonly');
                    Typeahead_.enable();
                    Typeahead_.open();
                }
            });
            typeaheadFieldJQueryRef.on('keyup', function (event) {
                var code = event.keyCode || event.which;
                //diferente de up arrow, down arrow, tab
                if (!typeaheadFieldJQueryRef.attr('readonly') && code !== 38 && code !== 40 && code !== 9 && typeaheadFieldJQueryRef.val()) {
                    // mantém o primeiro da lista selecionado
                    if (Typeahead_.menu.getActiveSelectable() !== Typeahead_.menu.getTopSelectable()) {
                        Typeahead_.menu.setCursor(Typeahead_.menu.getTopSelectable());
                    }
                } else if ((code === 8 || code === 46) && !typeaheadFieldJQueryRef.val() && !clearCalled) {
                    event.preventDefault();
                    onClearClick(event);
                }
            });

            typeaheadFieldJQueryRef.on('blur', onTypeaheadFieldBlur);

            function onTypeaheadFieldBlur() {
                if (!inputJQueryRef.data(SINGULAR_CHANGE_KEY)) {
                    inputJQueryRef.data(SINGULAR_BLUR_KEY, window.setTimeout(function () {
                        if (!inputJQueryRef.data(SINGULAR_CHANGE_KEY) && inputJQueryRef.is(':enabled')) {
                            inputJQueryRef.trigger(SINGULAR_VALIDATE);
                            console.log("triggered singular validate");
                        }
                        inputJQueryRef.removeData(SINGULAR_BLUR_KEY);
                    }, 100));
                }
            }

            //previne que ao teclar Tab, o primeiro item seja selecionado quando ninguém foi marcado
            Typeahead_._onTabKeyed = function onTabKeyed(type, $e) {
                var $selectable;
                if ($selectable = Typeahead_.menu.getActiveSelectable()) {
                    $e.preventDefault();
                    if (hasAjaxUpdate()) {
                        focusNextComponent($e);
                    }
                    Typeahead_.select($selectable);
                    if (!hasAjaxUpdate()) {
                        focusNextComponent($e);
                    }
                } else if (possuiDadoInvalido() && hasAjaxUpdate()) {
                    // necessário para manter o foco após o ajax
                    focusNextComponent($e);
                }
            };

            function possuiDadoInvalido() {
                if (!typeaheadFieldJQueryRef.attr('readonly') && typeaheadFieldJQueryRef.val()) {
                    var $selectad = $.grep(Typeahead_.menu._getSelectables(), function (obj, i) {
                        return clearText(typeaheadFieldJQueryRef.val()) == clearText(Typeahead_.menu.getSelectableData($(obj)).val);
                    });
                    return Typeahead_.menu._getSelectables().size() == 0 || $selectad.length == 0;
                }
                return false;
            }

            // limpa o campo se tiver um valor inválido
            typeaheadFieldJQueryRef.on('typeahead:change', function ($e, selection) {
                if (possuiDadoInvalido()) {
                    $e.stopPropagation();
                    Typeahead_.close();
                    typeaheadFieldJQueryRef.typeahead('val', '');
                    updateValue('');
                } else if (typeaheadFieldJQueryRef.val()) {
                    var $selectad = $.grep(Typeahead_.menu._getSelectables(), function (obj, i) {
                        return clearText(typeaheadFieldJQueryRef.val()) === clearText(Typeahead_.menu.getSelectableData($(obj)).val);
                    });
                    if ((Typeahead_.menu._getSelectables().size() == 1 || $selectad.length == 1) && typeaheadFieldJQueryRef.val() !== Typeahead_.menu.getSelectableData($selectad).val) {
                        $e.preventDefault();
                        Typeahead_.select($selectad);
                    }
                }
            });

            if (typeaheadFieldJQueryRef.val() && possuiDadoInvalido()) {
                appendClearButton();
            }
        }
    };
}(jQuery));


text:
typescript-game
===============

a silly game written in typescript


text:
using System;
using System.Runtime.InteropServices;

public class Test
{
	public static int Main ()
	{
		object [] o = typeof (IFoo).GetMethod ("get_Item").GetParameters () [0].GetCustomAttributes (false);
		if (o.Length != 1)
			return 1;

		o = typeof (IFoo).GetMethod ("set_Item").GetParameters () [0].GetCustomAttributes (false);
		if (o.Length != 1)
			return 2;

		return 0;
	}

	public interface IFoo
	{
		int this [[MarshalAs (UnmanagedType.Struct)]object vt0BasedIdxOrId] { get; set; }
	}
}


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

import java.io.File;
import java.util.UUID;

public interface BackupStore
{
    /**
     * Backup a shard by copying it to the backup store.
     *
     * @param uuid shard UUID
     * @param source the source file
     */
    void backupShard(UUID uuid, File source);

    /**
     * Restore a shard by copying it from the backup store.
     *
     * @param uuid shard UUID
     * @param target the destination file
     */
    void restoreShard(UUID uuid, File target);

    /**
     * Delete shard from backup store. This method is idempotent.
     * No exception is thrown if the shard does not exist.
     *
     * @param uuid shard UUID
     */
    void deleteShard(UUID uuid);

    /**
     * Check if a shard exists in the backup store.
     *
     * @param uuid shard UUID
     * @return if the shard exists
     */
    boolean shardExists(UUID uuid);
}


text:
#include <pthread.h>
#include <re.h>
#include "turnperf.h"

/*
 * Sender:
 *
 * - send a continuous bitstream to target X
 * - use sequence numbers
 * - configuration:
 *   - packet time interval
 *   - packet size
 *   - bitrate
 */

struct sender {
	struct allocation *alloc;  /* pointer */
	uint32_t session_cookie;
	uint32_t alloc_id;
	uint32_t seq;

	unsigned bitrate;          /* target bitrate [bit/s] */
	unsigned ptime;
	size_t psize;

	uint64_t ts;               /* running timestamp */
	uint64_t ts_start;
	uint64_t ts_stop;

	uint64_t total_bytes;
	uint64_t total_packets;
};

static int send_packet(struct sender *snd)
{
	struct mbuf *mb = mbuf_alloc(1024);
#define PRESZ 48
	size_t payload_len;
	int err = 0;

	if (snd->psize < HDR_SIZE)
		return EINVAL;

	payload_len = snd->psize - HDR_SIZE;

	mb->pos = PRESZ;

	err = protocol_encode(mb, snd->session_cookie, snd->alloc_id,
			      ++snd->seq, payload_len, PATTERN);
	if (err)
		goto out;

	mb->pos = PRESZ;

	err = allocation_tx(snd->alloc, mb);
	if (err) {
		re_fprintf(stderr, "sender: allocation_tx(%zu bytes)"
			   " failed (%m)\n", snd->psize, err);
		goto out;
	}

	snd->total_bytes   += mbuf_get_left(mb);
	snd->total_packets += 1;

 out:
	mem_deref(mb);

	return err;
}

void sender_tick(struct sender *snd, uint64_t now)
{
	if (!snd)
		return;

	if (now >= snd->ts) {

		send_packet(snd);
		snd->ts += snd->ptime;
	}
}

static void destructor(void *arg)
{
	struct sender *snd = arg;
	(void)snd;
}

int sender_alloc(struct sender **senderp, struct allocation *alloc,
		 uint32_t session_cookie, uint32_t alloc_id,
		 unsigned bitrate, unsigned ptime, size_t psize)
{
	struct sender *snd;
	int err = 0;

	if (!senderp || !bitrate)
		return EINVAL;

	if (ptime < PACING_INTERVAL_MS) {
		re_fprintf(stderr, "ptime %u is too low\n", ptime);
		return EINVAL;
	}
	if (psize < HDR_SIZE) {
		re_fprintf(stderr, "sender: bitrate is too low..\n");
		return EINVAL;
	}

	snd = mem_zalloc(sizeof(*snd), destructor);
	if (!snd)
		return ENOMEM;

	snd->alloc          = alloc;
	snd->session_cookie = session_cookie;
	snd->alloc_id       = alloc_id;
	snd->bitrate        = bitrate;
	snd->ptime          = ptime;
	snd->psize          = psize;

	if (err)
		mem_deref(snd);
	else
		*senderp = snd;

	return err;
}

int sender_start(struct sender *snd)
{
	if (!snd)
		return EINVAL;

	snd->ts_start = tmr_jiffies();

	/* random component to smoothe traffic */
	snd->ts       = tmr_jiffies() + rand_u16() % 100;

	return 0;
}

void sender_stop(struct sender *snd)
{
	if (!snd)
		return;

	snd->ts_stop = tmr_jiffies();
}

uint64_t sender_get_packets(const struct sender *snd)
{
	return snd ? snd->total_packets : 0ULL;
}

double sender_get_bitrate(const struct sender *snd)
{
	double duration;

	if (!snd)
		return .0;
	if (!snd->ts_start || !snd->ts_stop)
		return -1.0;

	duration = snd->ts_stop - snd->ts_start;

	return (double)snd->total_bytes / (duration / 1000.0 / 8);
}


text:
package edu.psu.cse.siis.coal.field.transformers.set;

import java.util.HashSet;
import java.util.Objects;
import java.util.Set;

import edu.psu.cse.siis.coal.field.TransformerSequence;
import edu.psu.cse.siis.coal.field.transformers.FieldTransformer;
import edu.psu.cse.siis.coal.field.transformers.IdentityFieldTransformer;
import edu.psu.cse.siis.coal.field.transformers.NullFieldTransformer;
import edu.psu.cse.siis.coal.field.transformers.TopFieldTransformer;
import edu.psu.cse.siis.coal.field.values.FieldValue;
import edu.psu.cse.siis.coal.field.values.SetFieldValue;

public class SetFieldTransformer extends FieldTransformer {
  protected Set<Object> add;
  protected Set<Object> remove;
  protected boolean clear;

  protected TransformerSequence transformerSequence;

  /**
   * Applies this field transformer to a {@link FieldValue}.
   *
   * @param fieldValue A field value.
   * @return A field value.
   */
  @SuppressWarnings("unchecked")
  public FieldValue apply(FieldValue fieldValue) {
    SetFieldValue result = new SetFieldValue();

    assert this.transformerSequence == null && (!fieldValue.hasTransformerSequence() || this.clear);
    // result = new IntermediateFieldValue();

    if (!this.clear) {
      result.addAll((Set<Object>) fieldValue.getValue());
      // if (fieldValue.hasTransformerSequence()) {
      // ((IntermediateFieldValue) result)
      // .addTransformerSequence(((IntermediateFieldValue) fieldValue).getTransformerSequence());
      // }
    }

    // if (fieldValue.hasTransformerSequence() && !this.clear) {
    // If the field value has a non-empty transformer sequence, then we should start by
    // adding the add/remove operations to the sequence.
    // FieldTransformer intermediateFieldTransformer = this.makeNonComposedFieldTransformer();
    // ((IntermediateFieldValue) result).addTransformerToSequence(intermediateFieldTransformer);
    // } else {
    if (this.remove != null) {
      result.removeAll(this.remove);
    }
    if (this.add != null) {
      result.addAll(this.add);
    }
    // }

    // if (this.transformerSequence != null) {
    // ((IntermediateFieldValue) result).addTransformerSequence(this.transformerSequence);
    // }

    return result.intern();
  }

  public FieldTransformer compose(FieldTransformer secondFieldOperation) {
    if (secondFieldOperation == NullFieldTransformer.v()
        || secondFieldOperation == IdentityFieldTransformer.v()
        || secondFieldOperation == TopFieldTransformer.v()) {
      return secondFieldOperation;
    }

    assert secondFieldOperation instanceof SetFieldTransformer;

    SetFieldTransformer secondFieldTransformer = (SetFieldTransformer) secondFieldOperation;

    if (secondFieldTransformer.clear) {
      return secondFieldOperation;
    }

    SetFieldTransformer result = new SetFieldTransformer();
    result.clear = this.clear;

    // Add the values from the first operation.
    if (this.add != null) {
      result.add = new HashSet<>(this.add);
    }
    if (this.remove != null) {
      result.remove = new HashSet<>(this.remove);
    }

    if (this.transformerSequence != null) {
      result.transformerSequence = new TransformerSequence(this.transformerSequence);
      if (secondFieldTransformer.add != null || secondFieldTransformer.remove != null) {
        // The second field transformer has some add or remove
        // operation. Start by applying these.
        FieldTransformer intermediateFieldTransformer =
            secondFieldTransformer.makeNonComposedFieldTransformer();

        result.transformerSequence.addTransformerToSequence(intermediateFieldTransformer);
      }
    } else {
      // Add the values from the second operation.
      if (secondFieldTransformer.add != null) {
        if (result.remove != null) {
          result.remove.removeAll(secondFieldTransformer.add);
        }
        if (result.add == null) {
          result.add = new HashSet<>(secondFieldTransformer.add);
        } else {
          result.add.addAll(secondFieldTransformer.add);
        }
      }

      if (secondFieldTransformer.remove != null) {
        if (result.add != null) {
          result.add.removeAll(secondFieldTransformer.remove);
        }
        if (result.remove == null) {
          result.remove = new HashSet<>(secondFieldTransformer.remove);
        } else {
          result.remove.addAll(secondFieldTransformer.remove);
        }
      }
    }

    if (secondFieldTransformer.transformerSequence != null) {
      // If a transformer sequence is found in the second field transformer, it means that
      // the latter contains a field composition as well. We add it last.
      if (result.transformerSequence == null) {
        result.transformerSequence = new TransformerSequence();
      }
      result.transformerSequence.addElementsToSequence(secondFieldTransformer.transformerSequence);
    }

    return result.intern();
  }

  /**
   * Generates a field transformer that is identical to this instance, except that it does not
   * contain a transformer sequence.
   *
   * @return A field transformer without transformer sequence.
   */
  public FieldTransformer makeNonComposedFieldTransformer() {
    SetFieldTransformer intermediateFieldTransformer = new SetFieldTransformer();
    intermediateFieldTransformer.add = this.add;
    intermediateFieldTransformer.remove = this.remove;

    return intermediateFieldTransformer.intern();
  }

  @Override
  public String toString() {
    return "Add " + this.add + ", remove " + this.remove + ", clear " + this.clear
        + ", transformer sequence " + this.transformerSequence;
  }

  @Override
  public int hashCode() {
    return Objects.hash(this.clear, this.add, this.remove, this.transformerSequence);
  }

  @Override
  public boolean equals(Object other) {
    if (!(other instanceof SetFieldTransformer)) {
      return false;
    }
    SetFieldTransformer secondFieldTransformer = (SetFieldTransformer) other;
    return Objects.equals(this.add, secondFieldTransformer.add)
        && Objects.equals(this.remove, secondFieldTransformer.remove)
        && this.clear == secondFieldTransformer.clear
        && Objects.equals(this.transformerSequence, secondFieldTransformer.transformerSequence);
  }
}


text:
<?php

namespace Behat\Testwork\Specification;

use Behat\Testwork\Suite\Suite;
use EmptyIterator;

/**
 * Represents empty specification iterator.
 *
 * Return an instance of this class from locator if no specifications are found.
 *
 * @author Konstantin Kudryashov <ever.zet@gmail.com>
 */
final class NoSpecificationsIterator extends EmptyIterator implements SpecificationIterator
{
    /**
     * @var Suite
     */
    private $suite;

    /**
     * Initializes iterator.
     *
     * @param Suite $suite
     */
    public function __construct(Suite $suite)
    {
        $this->suite = $suite;
    }

    /**
     * Returns suite that was used to load subjects.
     *
     * @return Suite
     */
    public function getSuite()
    {
        return $this->suite;
    }
}


text:
package com.barentine.totalconnect.ws;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;

/**
 *
Java class for anonymous complex type.
 *
 *
The following schema fragment specifies the expected content contained within this class.
 *
 *

 * <complexType>
 *   <complexContent>
 *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *       <sequence>
 *         <element name="MAC" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
 *         <element name="SessionID" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
 *         <element name="Direction" type="{http://www.w3.org/2001/XMLSchema}int"/>
 *         <element name="Degrees" type="{http://www.w3.org/2001/XMLSchema}int"/>
 *         <element name="PanSpeed" type="{http://www.w3.org/2001/XMLSchema}int"/>
 *         <element name="TiltSpeed" type="{http://www.w3.org/2001/XMLSchema}int"/>
 *       </sequence>
 *     </restriction>
 *   </complexContent>
 * </complexType>
 *

 *
 *
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
    "mac",
    "sessionID",
    "direction",
    "degrees",
    "panSpeed",
    "tiltSpeed"
})
@XmlRootElement(name = "MoveCamera")
public class MoveCamera {

    @XmlElement(name = "MAC")
    protected String mac;
    @XmlElement(name = "SessionID")
    protected String sessionID;
    @XmlElement(name = "Direction")
    protected int direction;
    @XmlElement(name = "Degrees")
    protected int degrees;
    @XmlElement(name = "PanSpeed")
    protected int panSpeed;
    @XmlElement(name = "TiltSpeed")
    protected int tiltSpeed;

    /**
     * Gets the value of the mac property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    public String getMAC() {
        return mac;
    }

    /**
     * Sets the value of the mac property.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *
     */
    public void setMAC(String value) {
        this.mac = value;
    }

    /**
     * Gets the value of the sessionID property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    public String getSessionID() {
        return sessionID;
    }

    /**
     * Sets the value of the sessionID property.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *
     */
    public void setSessionID(String value) {
        this.sessionID = value;
    }

    /**
     * Gets the value of the direction property.
     *
     */
    public int getDirection() {
        return direction;
    }

    /**
     * Sets the value of the direction property.
     *
     */
    public void setDirection(int value) {
        this.direction = value;
    }

    /**
     * Gets the value of the degrees property.
     *
     */
    public int getDegrees() {
        return degrees;
    }

    /**
     * Sets the value of the degrees property.
     *
     */
    public void setDegrees(int value) {
        this.degrees = value;
    }

    /**
     * Gets the value of the panSpeed property.
     *
     */
    public int getPanSpeed() {
        return panSpeed;
    }

    /**
     * Sets the value of the panSpeed property.
     *
     */
    public void setPanSpeed(int value) {
        this.panSpeed = value;
    }

    /**
     * Gets the value of the tiltSpeed property.
     *
     */
    public int getTiltSpeed() {
        return tiltSpeed;
    }

    /**
     * Sets the value of the tiltSpeed property.
     *
     */
    public void setTiltSpeed(int value) {
        this.tiltSpeed = value;
    }

}


text:
.class Lcom/android/server/wifi/WifiController$NoLockHeldState;
.super Lcom/android/internal/util/State;
.source "WifiController.java"

# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/android/server/wifi/WifiController;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = "NoLockHeldState"
.end annotation

# instance fields
.field final synthetic this$0:Lcom/android/server/wifi/WifiController;

# direct methods
.method constructor <init>(Lcom/android/server/wifi/WifiController;)V
    .locals 0

    .prologue
    .line 809
    iput-object p1, p0, Lcom/android/server/wifi/WifiController$NoLockHeldState;->this$0:Lcom/android/server/wifi/WifiController;

    invoke-direct {p0}, Lcom/android/internal/util/State;-><init>()V

    return-void
.end method

# virtual methods
.method public enter()V
    .locals 3

    .prologue
    .line 812
    iget-object v0, p0, Lcom/android/server/wifi/WifiController$NoLockHeldState;->this$0:Lcom/android/server/wifi/WifiController;

    new-instance v1, Ljava/lang/StringBuilder;

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

    invoke-virtual {p0}, Lcom/android/server/wifi/WifiController$NoLockHeldState;->getName()Ljava/lang/String;

    move-result-object v2

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

    move-result-object v1

    const-string v2, "\n"

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

    move-result-object v1

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

    move-result-object v1

    # invokes: Lcom/android/server/wifi/WifiController;->log(Ljava/lang/String;)V
    invoke-static {v0, v1}, Lcom/android/server/wifi/WifiController;->access$6000(Lcom/android/server/wifi/WifiController;Ljava/lang/String;)V

    .line 813
    iget-object v0, p0, Lcom/android/server/wifi/WifiController$NoLockHeldState;->this$0:Lcom/android/server/wifi/WifiController;

    iget-object v0, v0, Lcom/android/server/wifi/WifiController;->mWifiStateMachine:Lcom/android/server/wifi/WifiStateMachine;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Lcom/android/server/wifi/WifiStateMachine;->setDriverStart(Z)V

    .line 814
    return-void
.end method


text:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>me.zhengjie</groupId>
    <artifactId>eladmin</artifactId>
    <packaging>pom</packaging>
    <version>2.6</version>

    <modules>
        <module>eladmin-common</module>
        <module>eladmin-logging</module>
        <module>eladmin-system</module>
        <module>eladmin-tools</module>
        <module>eladmin-generator</module>
    </modules>

    <name>ELADMIN 后台管理</name>
    <url>https://eladmin.vip</url>

    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.6.4</version>
    </parent>

    <properties>
        <log4j2.version>2.17.0</log4j2.version>
        <logback.version>1.2.9</logback.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <java.version>1.8</java.version>
        <log4jdbc.version>1.16</log4jdbc.version>
        <swagger.version>2.9.2</swagger.version>
        <fastjson.version>1.2.83</fastjson.version>
        <druid.version>1.2.8</druid.version>
        <commons-pool2.version>2.11.1</commons-pool2.version>
        <mapstruct.version>1.4.2.Final</mapstruct.version>
    </properties>

    <dependencies>
        <!--Spring boot 核心-->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-jpa</artifactId>
        </dependency>

        <!--Spring boot Web容器-->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>

        </dependency>

        <!--Spring boot 测试-->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>

        <!--Spring boot 安全框架-->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-security</artifactId>
        </dependency>

        <!-- spring boot 缓存 -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-cache</artifactId>
        </dependency>

        <!--Spring boot Redis-->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-redis</artifactId>
        </dependency>

        <!--spring boot 集成redis所需common-pool2-->
        <!-- https://mvnrepository.com/artifact/org.apache.commons/commons-pool2 -->
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-pool2</artifactId>
            <version>${commons-pool2.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
        </dependency>

        <!--监控sql日志-->
        <dependency>
            <groupId>org.bgee.log4jdbc-log4j2</groupId>
            <artifactId>log4jdbc-log4j2-jdbc4.1</artifactId>
            <version>${log4jdbc.version}</version>
        </dependency>

        <!-- Swagger UI 相关 -->
        <!-- https://mvnrepository.com/artifact/com.github.xiaoymin/knife4j-spring-boot-starter -->
        <dependency>
            <groupId>com.github.xiaoymin</groupId>
            <artifactId>knife4j-spring-boot-starter</artifactId>
            <version>3.0.3</version>
        </dependency>

        <!--Mysql依赖包-->
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <scope>runtime</scope>
        </dependency>

        <!-- druid数据源驱动 -->
        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>druid-spring-boot-starter</artifactId>
            <version>${druid.version}</version>
        </dependency>

        <!-- ip2region IP库 -->
        <!-- https://mvnrepository.com/artifact/net.dreamlu/mica-ip2region -->
        <dependency>
            <groupId>net.dreamlu</groupId>
            <artifactId>mica-ip2region</artifactId>
            <version>2.6.3</version>
        </dependency>

        <!--lombok插件-->
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <optional>true</optional>
        </dependency>

        <!-- excel工具 -->
        <dependency>
            <groupId>org.apache.poi</groupId>
            <artifactId>poi</artifactId>
            <version>5.2.0</version>
        </dependency>
        <dependency>
            <groupId>org.apache.poi</groupId>
            <artifactId>poi-ooxml</artifactId>
            <version>5.2.0</version>
        </dependency>
        <dependency>
            <groupId>xerces</groupId>
            <artifactId>xercesImpl</artifactId>
            <version>2.12.2</version>
        </dependency>

        <!-- fastjson -->
        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>fastjson</artifactId>
            <version>${fastjson.version}</version>
        </dependency>

        <!--mapStruct依赖-->
        <dependency>
            <groupId>org.mapstruct</groupId>
            <artifactId>mapstruct</artifactId>
            <version>${mapstruct.version}</version>
        </dependency>
        <dependency>
            <groupId>org.mapstruct</groupId>
            <artifactId>mapstruct-processor</artifactId>
            <version>${mapstruct.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>javax.inject</groupId>
            <artifactId>javax.inject</artifactId>
            <version>1</version>
        </dependency>

        <!-- Java图形验证码 -->
        <dependency>
            <groupId>com.github.whvcse</groupId>
            <artifactId>easy-captcha</artifactId>
            <version>1.6.2</version>
        </dependency>

        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-text</artifactId>
            <version>1.10.0</version>
        </dependency>

        <!-- 解析客户端操作系统、浏览器信息 -->
        <dependency>
            <groupId>nl.basjes.parse.useragent</groupId>
            <artifactId>yauaa</artifactId>
            <version>6.11</version>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <!-- 打包时跳过测试 -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <skip>true</skip>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <repositories>
        <repository>
            <id>public</id>
            <name>aliyun nexus</name>
            <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
            <releases>
                <enabled>true</enabled>
            </releases>
        </repository>
    </repositories>

    <pluginRepositories>
        <pluginRepository>
            <id>public</id>
            <name>aliyun nexus</name>
            <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </pluginRepository>
    </pluginRepositories>
</project>