text:
#ifndef GCC_BITMAP_H
#define GCC_BITMAP_H
#include "hashtab.h"

/* Fundamental storage type for bitmap.  */

typedef unsigned long BITMAP_WORD;
/* BITMAP_WORD_BITS needs to be unsigned, but cannot contain casts as
   it is used in preprocessor directives -- hence the 1u.  */
#define BITMAP_WORD_BITS (CHAR_BIT * SIZEOF_LONG * 1u)

/* Number of words to use for each element in the linked list.  */

#ifndef BITMAP_ELEMENT_WORDS
#define BITMAP_ELEMENT_WORDS ((128 + BITMAP_WORD_BITS - 1) / BITMAP_WORD_BITS)
#endif

/* Number of bits in each actual element of a bitmap.  */

#define BITMAP_ELEMENT_ALL_BITS (BITMAP_ELEMENT_WORDS * BITMAP_WORD_BITS)

/* Obstack for allocating bitmaps and elements from.  */
typedef struct bitmap_obstack GTY (())
{
  struct bitmap_element_def *elements;
  struct bitmap_head_def *heads;
  struct obstack GTY ((skip)) obstack;
} bitmap_obstack;

/* Bitmap set element.  We use a linked list to hold only the bits that
   are set.  This allows for use to grow the bitset dynamically without
   having to realloc and copy a giant bit array.

   The free list is implemented as a list of lists.  There is one
   outer list connected together by prev fields.  Each element of that
   outer is an inner list (that may consist only of the outer list
   element) that are connected by the next fields.  The prev pointer
   is undefined for interior elements.  This allows
   bitmap_elt_clear_from to be implemented in unit time rather than
   linear in the number of elements to be freed.  */

typedef struct bitmap_element_def GTY(())
{
  struct bitmap_element_def *next;		/* Next element.  */
  struct bitmap_element_def *prev;		/* Previous element.  */
  unsigned int indx;			/* regno/BITMAP_ELEMENT_ALL_BITS.  */
  BITMAP_WORD bits[BITMAP_ELEMENT_WORDS]; /* Bits that are set.  */
} bitmap_element;

/* Head of bitmap linked list.  */
typedef struct bitmap_head_def GTY(()) {
  bitmap_element *first;	/* First element in linked list.  */
  bitmap_element *current;	/* Last element looked at.  */
  unsigned int indx;		/* Index of last element looked at.  */
  bitmap_obstack *obstack;	/* Obstack to allocate elements from.
				   If NULL, then use ggc_alloc.  */
} bitmap_head;

/* Global data */
extern bitmap_element bitmap_zero_bits;	/* Zero bitmap element */
extern bitmap_obstack bitmap_default_obstack;   /* Default bitmap obstack */

/* Clear a bitmap by freeing up the linked list.  */
extern void bitmap_clear (bitmap);

/* Copy a bitmap to another bitmap.  */
extern void bitmap_copy (bitmap, bitmap);

/* True if two bitmaps are identical.  */
extern bool bitmap_equal_p (bitmap, bitmap);

/* True if the bitmaps intersect (their AND is non-empty).  */
extern bool bitmap_intersect_p (bitmap, bitmap);

/* True if the complement of the second intersects the first (their
   AND_COMPL is non-empty).  */
extern bool bitmap_intersect_compl_p (bitmap, bitmap);

/* True if MAP is an empty bitmap.  */
#define bitmap_empty_p(MAP) (!(MAP)->first)

/* Count the number of bits set in the bitmap.  */
extern unsigned long bitmap_count_bits (bitmap);

/* Boolean operations on bitmaps.  The _into variants are two operand
   versions that modify the first source operand.  The other variants
   are three operand versions that to not destroy the source bitmaps.
   The operations supported are &, & ~, |, ^.  */
extern void bitmap_and (bitmap, bitmap, bitmap);
extern void bitmap_and_into (bitmap, bitmap);
extern void bitmap_and_compl (bitmap, bitmap, bitmap);
extern bool bitmap_and_compl_into (bitmap, bitmap);
#define bitmap_compl_and(DST, A, B) bitmap_and_compl (DST, B, A)
extern void bitmap_compl_and_into (bitmap, bitmap);
extern void bitmap_clear_range (bitmap, unsigned int, unsigned int);
extern bool bitmap_ior (bitmap, bitmap, bitmap);
extern bool bitmap_ior_into (bitmap, bitmap);
extern void bitmap_xor (bitmap, bitmap, bitmap);
extern void bitmap_xor_into (bitmap, bitmap);

/* DST = A | (B & ~C).  Return true if DST changes.  */
extern bool bitmap_ior_and_compl (bitmap DST, bitmap A, bitmap B, bitmap C);
/* A |= (B & ~C).  Return true if A changes.  */
extern bool bitmap_ior_and_compl_into (bitmap DST, bitmap B, bitmap C);

/* Clear a single register in a register set.  */
extern void bitmap_clear_bit (bitmap, int);

/* Set a single register in a register set.  */
extern void bitmap_set_bit (bitmap, int);

/* Return true if a register is set in a register set.  */
extern int bitmap_bit_p (bitmap, int);

/* Debug functions to print a bitmap linked list.  */
extern void debug_bitmap (bitmap);
extern void debug_bitmap_file (FILE *, bitmap);

/* Print a bitmap.  */
extern void bitmap_print (FILE *, bitmap, const char *, const char *);

/* Initialize and release a bitmap obstack.  */
extern void bitmap_obstack_initialize (bitmap_obstack *);
extern void bitmap_obstack_release (bitmap_obstack *);

/* Initialize a bitmap header.  OBSTACK indicates the bitmap obstack
   to allocate from, NULL for GC'd bitmap.  */

static inline void
bitmap_initialize (bitmap head, bitmap_obstack *obstack)
{
  head->first = head->current = NULL;
  head->obstack = obstack;
}

/* Allocate and free bitmaps from obstack, malloc and gc'd memory.  */
extern bitmap bitmap_obstack_alloc (bitmap_obstack *obstack);
extern bitmap bitmap_gc_alloc (void);
extern void bitmap_obstack_free (bitmap);

/* A few compatibility/functions macros for compatibility with sbitmaps */
#define dump_bitmap(file, bitmap) bitmap_print (file, bitmap, "", "\n")
#define bitmap_zero(a) bitmap_clear (a)
extern unsigned bitmap_first_set_bit (bitmap);

/* Compute bitmap hash (for purposes of hashing etc.)  */
extern hashval_t bitmap_hash(bitmap);

/* Allocate a bitmap from a bit obstack.  */
#define BITMAP_ALLOC(OBSTACK) bitmap_obstack_alloc (OBSTACK)

/* Allocate a gc'd bitmap.  */
#define BITMAP_GGC_ALLOC() bitmap_gc_alloc ()

/* Do any cleanup needed on a bitmap when it is no longer used.  */
#define BITMAP_FREE(BITMAP)			\
	((void)(bitmap_obstack_free (BITMAP), (BITMAP) = NULL))

/* Iterator for bitmaps.  */

typedef struct
{
  /* Pointer to the current bitmap element.  */
  bitmap_element *elt1;

  /* Pointer to 2nd bitmap element when two are involved.  */
  bitmap_element *elt2;

  /* Word within the current element.  */
  unsigned word_no;

  /* Contents of the actually processed word.  When finding next bit
     it is shifted right, so that the actual bit is always the least
     significant bit of ACTUAL.  */
  BITMAP_WORD bits;
} bitmap_iterator;

/* Initialize a single bitmap iterator.  START_BIT is the first bit to
   iterate from.  */

static inline void
bmp_iter_set_init (bitmap_iterator *bi, bitmap map,
		   unsigned start_bit, unsigned *bit_no)
{
  bi->elt1 = map->first;
  bi->elt2 = NULL;

  /* Advance elt1 until it is not before the block containing start_bit.  */
  while (1)
    {
      if (!bi->elt1)
	{
	  bi->elt1 = &bitmap_zero_bits;
	  break;
	}

      if (bi->elt1->indx >= start_bit / BITMAP_ELEMENT_ALL_BITS)
	break;
      bi->elt1 = bi->elt1->next;
    }

  /* We might have gone past the start bit, so reinitialize it.  */
  if (bi->elt1->indx != start_bit / BITMAP_ELEMENT_ALL_BITS)
    start_bit = bi->elt1->indx * BITMAP_ELEMENT_ALL_BITS;

  /* Initialize for what is now start_bit.  */
  bi->word_no = start_bit / BITMAP_WORD_BITS % BITMAP_ELEMENT_WORDS;
  bi->bits = bi->elt1->bits[bi->word_no];
  bi->bits >>= start_bit % BITMAP_WORD_BITS;

  /* If this word is zero, we must make sure we're not pointing at the
     first bit, otherwise our incrementing to the next word boundary
     will fail.  It won't matter if this increment moves us into the
     next word.  */
  start_bit += !bi->bits;

  *bit_no = start_bit;
}

/* Initialize an iterator to iterate over the intersection of two
   bitmaps.  START_BIT is the bit to commence from.  */

static inline void
bmp_iter_and_init (bitmap_iterator *bi, bitmap map1, bitmap map2,
		   unsigned start_bit, unsigned *bit_no)
{
  bi->elt1 = map1->first;
  bi->elt2 = map2->first;

  /* Advance elt1 until it is not before the block containing
     start_bit.  */
  while (1)
    {
      if (!bi->elt1)
	{
	  bi->elt2 = NULL;
	  break;
	}

      if (bi->elt1->indx >= start_bit / BITMAP_ELEMENT_ALL_BITS)
	break;
      bi->elt1 = bi->elt1->next;
    }

  /* Advance elt2 until it is not before elt1.  */
  while (1)
    {
      if (!bi->elt2)
	{
	  bi->elt1 = bi->elt2 = &bitmap_zero_bits;
	  break;
	}

      if (bi->elt2->indx >= bi->elt1->indx)
	break;
      bi->elt2 = bi->elt2->next;
    }

  /* If we're at the same index, then we have some intersecting bits.  */
  if (bi->elt1->indx == bi->elt2->indx)
    {
      /* We might have advanced beyond the start_bit, so reinitialize
	 for that.  */
      if (bi->elt1->indx != start_bit / BITMAP_ELEMENT_ALL_BITS)
	start_bit = bi->elt1->indx * BITMAP_ELEMENT_ALL_BITS;

      bi->word_no = start_bit / BITMAP_WORD_BITS % BITMAP_ELEMENT_WORDS;
      bi->bits = bi->elt1->bits[bi->word_no] & bi->elt2->bits[bi->word_no];
      bi->bits >>= start_bit % BITMAP_WORD_BITS;
    }
  else
    {
      /* Otherwise we must immediately advance elt1, so initialize for
	 that.  */
      bi->word_no = BITMAP_ELEMENT_WORDS - 1;
      bi->bits = 0;
    }

  /* If this word is zero, we must make sure we're not pointing at the
     first bit, otherwise our incrementing to the next word boundary
     will fail.  It won't matter if this increment moves us into the
     next word.  */
  start_bit += !bi->bits;

  *bit_no = start_bit;
}

/* Initialize an iterator to iterate over the bits in MAP1 & ~MAP2.
   */

static inline void
bmp_iter_and_compl_init (bitmap_iterator *bi, bitmap map1, bitmap map2,
			 unsigned start_bit, unsigned *bit_no)
{
  bi->elt1 = map1->first;
  bi->elt2 = map2->first;

  /* Advance elt1 until it is not before the block containing start_bit.  */
  while (1)
    {
      if (!bi->elt1)
	{
	  bi->elt1 = &bitmap_zero_bits;
	  break;
	}

      if (bi->elt1->indx >= start_bit / BITMAP_ELEMENT_ALL_BITS)
	break;
      bi->elt1 = bi->elt1->next;
    }

  /* Advance elt2 until it is not before elt1.  */
  while (bi->elt2 && bi->elt2->indx < bi->elt1->indx)
    bi->elt2 = bi->elt2->next;

  /* We might have advanced beyond the start_bit, so reinitialize for
     that.  */
  if (bi->elt1->indx != start_bit / BITMAP_ELEMENT_ALL_BITS)
    start_bit = bi->elt1->indx * BITMAP_ELEMENT_ALL_BITS;

  bi->word_no = start_bit / BITMAP_WORD_BITS % BITMAP_ELEMENT_WORDS;
  bi->bits = bi->elt1->bits[bi->word_no];
  if (bi->elt2 && bi->elt1->indx == bi->elt2->indx)
    bi->bits &= ~bi->elt2->bits[bi->word_no];
  bi->bits >>= start_bit % BITMAP_WORD_BITS;

  /* If this word is zero, we must make sure we're not pointing at the
     first bit, otherwise our incrementing to the next word boundary
     will fail.  It won't matter if this increment moves us into the
     next word.  */
  start_bit += !bi->bits;

  *bit_no = start_bit;
}

/* Advance to the next bit in BI.  We don't advance to the next
   nonzero bit yet.  */

static inline void
bmp_iter_next (bitmap_iterator *bi, unsigned *bit_no)
{
  bi->bits >>= 1;
  *bit_no += 1;
}

/* Advance to the next nonzero bit of a single bitmap, we will have
   already advanced past the just iterated bit.  Return true if there
   is a bit to iterate.  */

static inline bool
bmp_iter_set (bitmap_iterator *bi, unsigned *bit_no)
{
  /* If our current word is nonzero, it contains the bit we want.  */
  if (bi->bits)
    {
    next_bit:
      while (!(bi->bits & 1))
	{
	  bi->bits >>= 1;
	  *bit_no += 1;
	}
      return true;
    }

  /* Round up to the word boundary.  We might have just iterated past
     the end of the last word, hence the -1.  It is not possible for
     bit_no to point at the beginning of the now last word.  */
  *bit_no = ((*bit_no + BITMAP_WORD_BITS - 1)
	     / BITMAP_WORD_BITS * BITMAP_WORD_BITS);
  bi->word_no++;

  while (1)
    {
      /* Find the next nonzero word in this elt.  */
      while (bi->word_no != BITMAP_ELEMENT_WORDS)
	{
	  bi->bits = bi->elt1->bits[bi->word_no];
	  if (bi->bits)
	    goto next_bit;
	  *bit_no += BITMAP_WORD_BITS;
	  bi->word_no++;
	}

      /* Advance to the next element.  */
      bi->elt1 = bi->elt1->next;
      if (!bi->elt1)
	return false;
      *bit_no = bi->elt1->indx * BITMAP_ELEMENT_ALL_BITS;
      bi->word_no = 0;
    }
}

/* Advance to the next nonzero bit of an intersecting pair of
   bitmaps.  We will have already advanced past the just iterated bit.
   Return true if there is a bit to iterate.  */

static inline bool
bmp_iter_and (bitmap_iterator *bi, unsigned *bit_no)
{
  /* If our current word is nonzero, it contains the bit we want.  */
  if (bi->bits)
    {
    next_bit:
      while (!(bi->bits & 1))
	{
	  bi->bits >>= 1;
	  *bit_no += 1;
	}
      return true;
    }

  /* Round up to the word boundary.  We might have just iterated past
     the end of the last word, hence the -1.  It is not possible for
     bit_no to point at the beginning of the now last word.  */
  *bit_no = ((*bit_no + BITMAP_WORD_BITS - 1)
	     / BITMAP_WORD_BITS * BITMAP_WORD_BITS);
  bi->word_no++;

  while (1)
    {
      /* Find the next nonzero word in this elt.  */
      while (bi->word_no != BITMAP_ELEMENT_WORDS)
	{
	  bi->bits = bi->elt1->bits[bi->word_no] & bi->elt2->bits[bi->word_no];
	  if (bi->bits)
	    goto next_bit;
	  *bit_no += BITMAP_WORD_BITS;
	  bi->word_no++;
	}

      /* Advance to the next identical element.  */
      do
	{
	  /* Advance elt1 while it is less than elt2.  We always want
	     to advance one elt.  */
	  do
	    {
	      bi->elt1 = bi->elt1->next;
	      if (!bi->elt1)
		return false;
	    }
	  while (bi->elt1->indx < bi->elt2->indx);

	  /* Advance elt2 to be no less than elt1.  This might not
	     advance.  */
	  while (bi->elt2->indx < bi->elt1->indx)
	    {
	      bi->elt2 = bi->elt2->next;
	      if (!bi->elt2)
		return false;
	    }
	}
      while (bi->elt1->indx != bi->elt2->indx);

      *bit_no = bi->elt1->indx * BITMAP_ELEMENT_ALL_BITS;
      bi->word_no = 0;
    }
}

/* Advance to the next nonzero bit in the intersection of
   complemented bitmaps.  We will have already advanced past the just
   iterated bit.  */

static inline bool
bmp_iter_and_compl (bitmap_iterator *bi, unsigned *bit_no)
{
  /* If our current word is nonzero, it contains the bit we want.  */
  if (bi->bits)
    {
    next_bit:
      while (!(bi->bits & 1))
	{
	  bi->bits >>= 1;
	  *bit_no += 1;
	}
      return true;
    }

  /* Round up to the word boundary.  We might have just iterated past
     the end of the last word, hence the -1.  It is not possible for
     bit_no to point at the beginning of the now last word.  */
  *bit_no = ((*bit_no + BITMAP_WORD_BITS - 1)
	     / BITMAP_WORD_BITS * BITMAP_WORD_BITS);
  bi->word_no++;

  while (1)
    {
      /* Find the next nonzero word in this elt.  */
      while (bi->word_no != BITMAP_ELEMENT_WORDS)
	{
	  bi->bits = bi->elt1->bits[bi->word_no];
	  if (bi->elt2 && bi->elt2->indx == bi->elt1->indx)
	    bi->bits &= ~bi->elt2->bits[bi->word_no];
	  if (bi->bits)
	    goto next_bit;
	  *bit_no += BITMAP_WORD_BITS;
	  bi->word_no++;
	}

      /* Advance to the next element of elt1.  */
      bi->elt1 = bi->elt1->next;
      if (!bi->elt1)
	return false;

      /* Advance elt2 until it is no less than elt1.  */
      while (bi->elt2 && bi->elt2->indx < bi->elt1->indx)
	bi->elt2 = bi->elt2->next;

      *bit_no = bi->elt1->indx * BITMAP_ELEMENT_ALL_BITS;
      bi->word_no = 0;
    }
}

/* Loop over all bits set in BITMAP, starting with MIN and setting
   BITNUM to the bit number.  ITER is a bitmap iterator.  BITNUM
   should be treated as a read-only variable as it contains loop
   state.  */

#define EXECUTE_IF_SET_IN_BITMAP(BITMAP, MIN, BITNUM, ITER)		\
  for (bmp_iter_set_init (&(ITER), (BITMAP), (MIN), &(BITNUM));		\
       bmp_iter_set (&(ITER), &(BITNUM));				\
       bmp_iter_next (&(ITER), &(BITNUM)))

/* Loop over all the bits set in BITMAP1 & BITMAP2, starting with MIN
   and setting BITNUM to the bit number.  ITER is a bitmap iterator.
   BITNUM should be treated as a read-only variable as it contains
   loop state.  */

#define EXECUTE_IF_AND_IN_BITMAP(BITMAP1, BITMAP2, MIN, BITNUM, ITER)	\
  for (bmp_iter_and_init (&(ITER), (BITMAP1), (BITMAP2), (MIN),		\
			  &(BITNUM));					\
       bmp_iter_and (&(ITER), &(BITNUM));				\
       bmp_iter_next (&(ITER), &(BITNUM)))

/* Loop over all the bits set in BITMAP1 & ~BITMAP2, starting with MIN
   and setting BITNUM to the bit number.  ITER is a bitmap iterator.
   BITNUM should be treated as a read-only variable as it contains
   loop state.  */

#define EXECUTE_IF_AND_COMPL_IN_BITMAP(BITMAP1, BITMAP2, MIN, BITNUM, ITER) \
  for (bmp_iter_and_compl_init (&(ITER), (BITMAP1), (BITMAP2), (MIN),	\
				&(BITNUM));				\
       bmp_iter_and_compl (&(ITER), &(BITNUM));				\
       bmp_iter_next (&(ITER), &(BITNUM)))

#endif /* GCC_BITMAP_H */


text:
FROM centos

MAINTAINER Ioannis Petrousov

#STANDARD
RUN yum -y install wget
RUN yum -y install net-tools.x86_64

ADD files/bootstrap.sh /opt/

#Set this to your time
RUN ln -f -s /usr/share/zoneinfo/EET /etc/localtime
RUN yum -y groupinstall 'Development Tools'
RUN cd /opt/ ; wget http://download.redis.io/releases/redis-3.0.5.tar.gz
RUN cd /opt/ ; tar xzf redis-3.0.5.tar.gz
RUN mv /opt/redis-3.0.5 /opt/redis
RUN cd /opt/redis ; make && make install

redpajama_set_name: RedPajamaGithub


text:
title: Torrent Clients
help-desc: Torrent Clients
aliases: torrentclients,torrentclient
---

Here are links to some good torrent clients:
• [qBittorrent](https://www.qbittorrent.org/download.php)
• [Deluge](https://dev.deluge-torrent.org/wiki/Download)
• [Flud](https://play.google.com/store/apps/details?id=com.delphicoder.flud&hl=en_US) (Android)


text:
class CreateProductQuantityInOrders < ActiveRecord::Migration
  def change
    create_table :product_quantity_in_orders do |t|
      t.integer :order_id
      t.integer :product_id
      t.integer :quantity

      t.timestamps null: false
    end
  end
end


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

import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 *

 * Specifies the Encryption At Rest Options.
 *

 */
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class EncryptionAtRestOptions implements Serializable, Cloneable, StructuredPojo {

    /**
     *

     * Specifies the option to enable Encryption At Rest.
     *

     */
    private Boolean enabled;
    /**
     *

     * Specifies the KMS Key ID for Encryption At Rest options.
     *

     */
    private String kmsKeyId;

    /**
     *

     * Specifies the option to enable Encryption At Rest.
     *

     *
     * @param enabled
     *        Specifies the option to enable Encryption At Rest.
     */

    public void setEnabled(Boolean enabled) {
        this.enabled = enabled;
    }

    /**
     *

     * Specifies the option to enable Encryption At Rest.
     *

     *
     * @return Specifies the option to enable Encryption At Rest.
     */

    public Boolean getEnabled() {
        return this.enabled;
    }

    /**
     *

     * Specifies the option to enable Encryption At Rest.
     *

     *
     * @param enabled
     *        Specifies the option to enable Encryption At Rest.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public EncryptionAtRestOptions withEnabled(Boolean enabled) {
        setEnabled(enabled);
        return this;
    }

    /**
     *

     * Specifies the option to enable Encryption At Rest.
     *

     *
     * @return Specifies the option to enable Encryption At Rest.
     */

    public Boolean isEnabled() {
        return this.enabled;
    }

    /**
     *

     * Specifies the KMS Key ID for Encryption At Rest options.
     *

     *
     * @param kmsKeyId
     *        Specifies the KMS Key ID for Encryption At Rest options.
     */

    public void setKmsKeyId(String kmsKeyId) {
        this.kmsKeyId = kmsKeyId;
    }

    /**
     *

     * Specifies the KMS Key ID for Encryption At Rest options.
     *

     *
     * @return Specifies the KMS Key ID for Encryption At Rest options.
     */

    public String getKmsKeyId() {
        return this.kmsKeyId;
    }

    /**
     *

     * Specifies the KMS Key ID for Encryption At Rest options.
     *

     *
     * @param kmsKeyId
     *        Specifies the KMS Key ID for Encryption At Rest options.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public EncryptionAtRestOptions withKmsKeyId(String kmsKeyId) {
        setKmsKeyId(kmsKeyId);
        return this;
    }

    /**
     * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
     * redacted from this string using a placeholder value.
     *
     * @return A string representation of this object.
     *
     * @see java.lang.Object#toString()
     */
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getEnabled() != null)
            sb.append("Enabled: ").append(getEnabled()).append(",");
        if (getKmsKeyId() != null)
            sb.append("KmsKeyId: ").append(getKmsKeyId());
        sb.append("}");
        return sb.toString();
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;

        if (obj instanceof EncryptionAtRestOptions == false)
            return false;
        EncryptionAtRestOptions other = (EncryptionAtRestOptions) obj;
        if (other.getEnabled() == null ^ this.getEnabled() == null)
            return false;
        if (other.getEnabled() != null && other.getEnabled().equals(this.getEnabled()) == false)
            return false;
        if (other.getKmsKeyId() == null ^ this.getKmsKeyId() == null)
            return false;
        if (other.getKmsKeyId() != null && other.getKmsKeyId().equals(this.getKmsKeyId()) == false)
            return false;
        return true;
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;

        hashCode = prime * hashCode + ((getEnabled() == null) ? 0 : getEnabled().hashCode());
        hashCode = prime * hashCode + ((getKmsKeyId() == null) ? 0 : getKmsKeyId().hashCode());
        return hashCode;
    }

    @Override
    public EncryptionAtRestOptions clone() {
        try {
            return (EncryptionAtRestOptions) super.clone();
        } catch (CloneNotSupportedException e) {
            throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
        }
    }

    @com.amazonaws.annotation.SdkInternalApi
    @Override
    public void marshall(ProtocolMarshaller protocolMarshaller) {
        com.amazonaws.services.elasticsearch.model.transform.EncryptionAtRestOptionsMarshaller.getInstance().marshall(this, protocolMarshaller);
    }
}


text:
package routers

import (
	"github.com/codegangsta/negroni"
	"github.com/gorilla/mux"
	"restful-api/common"
	"restful-api/controllers"
)

func SetTaskRouters(router *mux.Router) *mux.Router {
	taskRouter := mux.NewRouter()
	taskRouter.HandleFunc("/tasks", controllers.CreateTask).Methods("POST")
	taskRouter.HandleFunc("/tasks", controllers.GetTasks).Methods("GET")

	taskRouter.HandleFunc("/tasks/{id}", controllers.UpdateTaskById).Methods("PUT")
	taskRouter.HandleFunc("/tasks/{id}", controllers.GetTaskById).Methods("GET")
	taskRouter.HandleFunc("/tasks/{id}", controllers.DeleteTaskById).Methods("DELETE")

	taskRouter.HandleFunc("/tasks/users/{id}", controllers.GetTasksByUser).Methods("GET")

	router.PathPrefix("/tasks").Handler(negroni.New(
		negroni.HandlerFunc(common.Authorize),
		negroni.Wrap(taskRouter),
	))
	return router
}


text:
package com.greenpepper.server.rpc.xmlrpc.client;

import java.net.MalformedURLException;
import java.net.URL;
import java.util.Arrays;
import java.util.Vector;

import org.apache.xmlrpc.XmlRpcException;
import org.apache.xmlrpc.client.XmlRpcClient;
import org.apache.xmlrpc.client.XmlRpcClientConfigImpl;
import org.apache.xmlrpc.client.XmlRpcLiteHttpTransportFactory;

import static com.greenpepper.server.GreenPepperServerErrorKey.CALL_FAILED;
import static com.greenpepper.server.GreenPepperServerErrorKey.XML_RPC_URL_NOTFOUND;

public class XmlRpcV3ClientImpl
		implements XmlRpcClientExecutor {

	private final XmlRpcClient client;

	public XmlRpcV3ClientImpl(String url)
			throws XmlRpcClientExecutorException {

		try {
			XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl();
			config.setServerURL(new URL(url));

			this.client = new XmlRpcClient();

			client.setTransportFactory(new XmlRpcLiteHttpTransportFactory(client));
			client.setConfig(config);
		}
		catch (MalformedURLException ex) {
			throw new XmlRpcClientExecutorException(XML_RPC_URL_NOTFOUND, ex);
		}
	}

	@SuppressWarnings("unchecked")
	public Object execute(String method, Vector params)
			throws XmlRpcClientExecutorException {
		try {
			Object result = client.execute(method, params);

			Vector<Object> execParams;

			// Patch xmlrpc 3.x+
			if (result.getClass().isArray()) {
				Object[] resultArray = (Object[])result;
				execParams = new Vector<Object>();
				execParams.addAll(Arrays.asList(resultArray));
			}
			else {
				execParams = (Vector<Object>)result;
			}

			return execParams;
		}
		catch (XmlRpcException ex) {
			throw new XmlRpcClientExecutorException(CALL_FAILED, ex);
		}
	}
}


text:
namespace chrome_cleaner {

TestComponent::Calls::Calls() = default;
TestComponent::Calls::~Calls() = default;

TestComponent::~TestComponent() {
  calls_->destroyed = true;
}

void TestComponent::PreScan() {
  calls_->pre_scan = true;
}

void TestComponent::PostScan(const std::vector<UwSId>& found_pups) {
  calls_->post_scan = true;
  calls_->post_scan_found_pups = found_pups;
}

void TestComponent::PreCleanup() {
  calls_->pre_cleanup = true;
}

void TestComponent::PostCleanup(ResultCode result_code, RebooterAPI* rebooter) {
  calls_->result_code = result_code;
  calls_->post_cleanup = true;
}

void TestComponent::PostValidation(ResultCode result_code) {
  calls_->result_code = result_code;
  calls_->post_validation = true;
}

void TestComponent::OnClose(ResultCode result_code) {
  calls_->result_code = result_code;
  calls_->on_close = true;
}

}  // namespace chrome_cleaner


text:
namespace {

////////////////////////////////////////////////////////////////////////////////
/// @brief unwraps an analyser wrapped via WrapAnalyzer(...)
/// @return collection or nullptr on failure
////////////////////////////////////////////////////////////////////////////////
arangodb::iresearch::AnalyzerPool* UnwrapAnalyzer(
    v8::Isolate* isolate,
    v8::Local<v8::Object> const& holder) {
  return TRI_UnwrapClass<arangodb::iresearch::AnalyzerPool>(
    holder, WRP_IRESEARCH_ANALYZER_TYPE, TRI_IGETC);
}

////////////////////////////////////////////////////////////////////////////////
/// @brief wraps an Analyzer
////////////////////////////////////////////////////////////////////////////////
v8::Handle<v8::Object> WrapAnalyzer(
    v8::Isolate* isolate,
    arangodb::iresearch::AnalyzerPool::ptr const& analyzer) {
  v8::EscapableHandleScope scope(isolate);
  TRI_GET_GLOBALS();
  TRI_GET_GLOBAL(IResearchAnalyzerInstanceTempl, v8::ObjectTemplate);
  auto result = IResearchAnalyzerInstanceTempl->NewInstance(TRI_IGETC).FromMaybe(v8::Local<v8::Object>());

  if (result.IsEmpty()) {
    return scope.Escape<v8::Object>(result);
  }

  auto itr = TRI_v8_global_t::SharedPtrPersistent::emplace(*isolate, analyzer);
  auto& entry = itr.first;

  result->SetInternalField( // required for TRI_UnwrapClass(...)
    SLOT_CLASS_TYPE, v8::Integer::New(isolate, WRP_IRESEARCH_ANALYZER_TYPE) // args
  );
  result->SetInternalField(SLOT_CLASS, entry.get());

  return scope.Escape<v8::Object>(result);
}

void JS_AnalyzerFeatures(v8::FunctionCallbackInfo<v8::Value> const& args) {
  TRI_V8_TRY_CATCH_BEGIN(isolate);
  v8::HandleScope scope(isolate);
  auto context = TRI_IGETC;
  auto* analyzer = UnwrapAnalyzer(isolate, args.Holder());

  if (!analyzer) {
    TRI_V8_THROW_EXCEPTION_INTERNAL("cannot extract analyzer");
  }

  // ...........................................................................
  // end of parameter parsing
  // ...........................................................................

  if (!arangodb::iresearch::IResearchAnalyzerFeature::canUse(analyzer->name(), arangodb::auth::Level::RO)) {
    TRI_V8_THROW_EXCEPTION_MESSAGE( // exception
      TRI_ERROR_FORBIDDEN, // code
      "insufficient rights to get analyzer" // message
    );
  }

  try {
    auto i = 0;
    auto result = v8::Array::New(isolate);

    for (auto& feature: analyzer->features()) {
      if (feature) { // valid
        if (feature().name().null()) {
          result->Set(context, i++, v8::Null(isolate)).FromMaybe(false);
        } else {
          result->Set(context,  // set value
                      i++, TRI_V8_STD_STRING(isolate, std::string(feature().name()))).FromMaybe(false); // args
        }
      }
    }

    TRI_V8_RETURN(result);
  } catch (arangodb::basics::Exception const& ex) {
    TRI_V8_THROW_EXCEPTION_MESSAGE(ex.code(), ex.what());
  } catch (std::exception const& ex) {
    TRI_V8_THROW_EXCEPTION_MESSAGE(TRI_ERROR_INTERNAL, ex.what());
  } catch (...) {
    TRI_V8_THROW_EXCEPTION_MESSAGE( // exception
      TRI_ERROR_INTERNAL, // code
      "cannot access analyzer features" // message
    );
  }

  TRI_V8_TRY_CATCH_END
}

void JS_AnalyzerName(v8::FunctionCallbackInfo<v8::Value> const& args) {
  TRI_V8_TRY_CATCH_BEGIN(isolate);
  v8::HandleScope scope(isolate);
  auto* analyzer = UnwrapAnalyzer(isolate, args.Holder());

  if (!analyzer) {
    TRI_V8_THROW_EXCEPTION_INTERNAL("cannot extract analyzer");
  }

  // ...........................................................................
  // end of parameter parsing
  // ...........................................................................

  if (!arangodb::iresearch::IResearchAnalyzerFeature::canUse(analyzer->name(), arangodb::auth::Level::RO)) {
    TRI_V8_THROW_EXCEPTION_MESSAGE( // exception
      TRI_ERROR_FORBIDDEN, // code
      "insufficient rights to get analyzer" // message
    );
  }

  try {
    auto result = TRI_V8_STD_STRING(isolate, analyzer->name());

    TRI_V8_RETURN(result);
  } catch (arangodb::basics::Exception const& ex) {
    TRI_V8_THROW_EXCEPTION_MESSAGE(ex.code(), ex.what());
  } catch (std::exception const& ex) {
    TRI_V8_THROW_EXCEPTION_MESSAGE(TRI_ERROR_INTERNAL, ex.what());
  } catch (...) {
    TRI_V8_THROW_EXCEPTION_MESSAGE( // exception
      TRI_ERROR_INTERNAL, // code
      "cannot access analyzer name" // message
    );
  }

  TRI_V8_TRY_CATCH_END
}

void JS_AnalyzerProperties(v8::FunctionCallbackInfo<v8::Value> const& args) {
  TRI_V8_TRY_CATCH_BEGIN(isolate);
  v8::HandleScope scope(isolate);
  auto* analyzer = UnwrapAnalyzer(isolate, args.Holder());

  if (!analyzer) {
    TRI_V8_THROW_EXCEPTION_INTERNAL("cannot extract analyzer");
  }

  // ...........................................................................
  // end of parameter parsing
  // ...........................................................................

  if (!arangodb::iresearch::IResearchAnalyzerFeature::canUse(analyzer->name(), arangodb::auth::Level::RO)) {
    TRI_V8_THROW_EXCEPTION_MESSAGE( // exception
      TRI_ERROR_FORBIDDEN, // code
      "insufficient rights to get analyzer" // message
    );
  }

  try {
    auto result = TRI_VPackToV8(isolate, analyzer->properties());

    TRI_V8_RETURN(result);
  } catch (arangodb::basics::Exception const& ex) {
    TRI_V8_THROW_EXCEPTION_MESSAGE(ex.code(), ex.what());
  } catch (std::exception const& ex) {
    TRI_V8_THROW_EXCEPTION_MESSAGE(TRI_ERROR_INTERNAL, ex.what());
  } catch (...) {
    TRI_V8_THROW_EXCEPTION_MESSAGE( // exception
      TRI_ERROR_INTERNAL, // code
      "cannot access analyzer properties" // message
    );
  }

  TRI_V8_TRY_CATCH_END
}

void JS_AnalyzerType(v8::FunctionCallbackInfo<v8::Value> const& args) {
  TRI_V8_TRY_CATCH_BEGIN(isolate);
  v8::HandleScope scope(isolate);
  auto* analyzer = UnwrapAnalyzer(isolate, args.Holder());

  if (!analyzer) {
    TRI_V8_THROW_EXCEPTION_INTERNAL("cannot extract analyzer");
  }

  // ...........................................................................
  // end of parameter parsing
  // ...........................................................................

  if (!arangodb::iresearch::IResearchAnalyzerFeature::canUse(analyzer->name(), arangodb::auth::Level::RO)) {
    TRI_V8_THROW_EXCEPTION_MESSAGE( // exception
      TRI_ERROR_FORBIDDEN, // code
      "insufficient rights to get analyzer" // message
    );
  }

  try {
    if (analyzer->type().null()) {
      TRI_V8_RETURN(v8::Null(isolate));
    }

    auto result = TRI_V8_STD_STRING(isolate, std::string(analyzer->type()));

    TRI_V8_RETURN(result);
  } catch (arangodb::basics::Exception const& ex) {
    TRI_V8_THROW_EXCEPTION_MESSAGE(ex.code(), ex.what());
  } catch (std::exception const& ex) {
    TRI_V8_THROW_EXCEPTION_MESSAGE(TRI_ERROR_INTERNAL, ex.what());
  } catch (...) {
    TRI_V8_THROW_EXCEPTION_MESSAGE( // exception
      TRI_ERROR_INTERNAL, // code
      "cannot access analyzer type" // message
    );
  }

  TRI_V8_TRY_CATCH_END
}

void JS_Create(v8::FunctionCallbackInfo<v8::Value> const& args) {
  TRI_V8_TRY_CATCH_BEGIN(isolate);
  v8::HandleScope scope(isolate);
  auto context = TRI_IGETC;
  auto& vocbase = GetContextVocBase(isolate);

  if (vocbase.isDangling()) {
    TRI_V8_THROW_EXCEPTION(TRI_ERROR_ARANGO_DATABASE_NOT_FOUND);
  }

  // we require at least 2 but no more than 4 arguments
  // save(name: <string>, type: <string>[, parameters: <json>[, features: <string-array>]]);
  if (args.Length() < 2 // too few args
      || args.Length() > 4 // too many args
      || !args[0]->IsString() // not a string
      || !args[1]->IsString() // not a string
     ) {
    TRI_V8_THROW_EXCEPTION_USAGE("save(<name>, <type>[, <properties>[, <features>]])");
  }

  PREVENT_EMBEDDED_TRANSACTION();

  TRI_GET_GLOBALS();
  auto& analyzers =
      v8g->_server.getFeature<arangodb::iresearch::IResearchAnalyzerFeature>();

  auto nameFromArgs = TRI_ObjectToString(isolate, args[0]);
  auto splittedAnalyzerName =
    arangodb::iresearch::IResearchAnalyzerFeature::splitAnalyzerName(nameFromArgs);
  if (!arangodb::iresearch::IResearchAnalyzerFeature::analyzerReachableFromDb(
         splittedAnalyzerName.first, vocbase.name())) {
    TRI_V8_THROW_EXCEPTION_MESSAGE(
      TRI_ERROR_FORBIDDEN,
      "Database in analyzer name does not match current database");
    return;
  }

  if (!TRI_vocbase_t::IsAllowedName(false, arangodb::velocypack::StringRef(splittedAnalyzerName.second.c_str(),
                                                                           splittedAnalyzerName.second.size()))) {
    TRI_V8_THROW_EXCEPTION_MESSAGE(
      TRI_ERROR_BAD_PARAMETER,
      std::string("invalid characters in analyzer name '").append(splittedAnalyzerName.second.c_str()).append("'")
    );

    return;
  }

  auto name = arangodb::iresearch::IResearchAnalyzerFeature::normalize(splittedAnalyzerName.second, vocbase.name());

  auto type = TRI_ObjectToString(isolate, args[1]);

  VPackSlice propertiesSlice = VPackSlice::emptyObjectSlice();
  VPackBuilder propertiesBuilder;

  if (args.Length() > 2) { // have properties
    if (args[2]->IsString()) {
      std::string const propertiesBuf = TRI_ObjectToString(isolate, args[2]);
      arangodb::velocypack::Parser(propertiesBuilder).parse(propertiesBuf);
      propertiesSlice = propertiesBuilder.slice();
    } else if (args[2]->IsObject()) {
      auto value = args[2]->ToObject(TRI_IGETC).FromMaybe(v8::Local<v8::Object>());
      TRI_V8ToVPack(isolate, propertiesBuilder, value, false);
      propertiesSlice = propertiesBuilder.slice();
    } else if (!args[2]->IsNull()) {
      TRI_V8_THROW_TYPE_ERROR("<properties> must be an object");
    }
  }
  // properties at the end should be parsed into object
  if (!propertiesSlice.isObject()) {
    TRI_V8_THROW_TYPE_ERROR("<properties> must be an object");
  }

  irs::flags features;

  if (args.Length() > 3) { // have features
    if (!args[3]->IsArray()) {
      TRI_V8_THROW_TYPE_ERROR("<features> must be an array");
    }

    auto value = v8::Local<v8::Array>::Cast(args[3]);

    for (uint32_t i = 0, count = value->Length(); i < count;  ++i) {
      auto subValue = value->Get(context, i).FromMaybe(v8::Local<v8::Value>());

      if (!subValue->IsString()) {
        TRI_V8_THROW_TYPE_ERROR("<feature> must be a string");
      }

      const auto feature = irs::attributes::get(TRI_ObjectToString(isolate, subValue), false);

      if (!feature) {
        TRI_V8_THROW_TYPE_ERROR("<feature> not supported");
      }

      features.add(feature.id());
    }
  }

  // ...........................................................................
  // end of parameter parsing
  // ...........................................................................

  if (!arangodb::iresearch::IResearchAnalyzerFeature::canUse(name, arangodb::auth::Level::RW)) {
    TRI_V8_THROW_EXCEPTION_MESSAGE( // exception
      TRI_ERROR_FORBIDDEN, // code
      "insufficient rights to create analyzer" // message
    );
  }

  try {
    arangodb::iresearch::IResearchAnalyzerFeature::EmplaceResult result;
    auto res = analyzers.emplace(result, name, type, propertiesSlice, features);

    if (!res.ok()) {
      TRI_V8_THROW_EXCEPTION(res);
    }

    if (!result.first) {
      TRI_V8_THROW_EXCEPTION_MESSAGE( // exception
        TRI_ERROR_INTERNAL, // code
        "problem creating view" // message
      );
    }
    auto v8Result = WrapAnalyzer(isolate, result.first);
    if (v8Result.IsEmpty()) {
      TRI_V8_THROW_EXCEPTION_MEMORY();
    }
    TRI_V8_RETURN(v8Result);
  } catch (arangodb::basics::Exception const& ex) {
    TRI_V8_THROW_EXCEPTION_MESSAGE(ex.code(), ex.what());
  } catch (std::exception const& ex) {
    TRI_V8_THROW_EXCEPTION_MESSAGE(TRI_ERROR_INTERNAL, ex.what());
  } catch (...) {
    TRI_V8_THROW_EXCEPTION_MESSAGE( // exception
      TRI_ERROR_INTERNAL, // code
      "cannot create analyzer" // message
    );
  }

  TRI_V8_TRY_CATCH_END
}

void JS_Get(v8::FunctionCallbackInfo<v8::Value> const& args) {
  TRI_V8_TRY_CATCH_BEGIN(isolate);
  v8::HandleScope scope(isolate);
  auto& vocbase = GetContextVocBase(isolate);

  if (vocbase.isDropped()) {
    TRI_V8_THROW_EXCEPTION(TRI_ERROR_ARANGO_DATABASE_NOT_FOUND);
  }

  // expecting one argument
  // analyzer(name: <string>);
  if (args.Length() != 1 || !args[0]->IsString()) {
    TRI_V8_THROW_EXCEPTION_USAGE("analyzer(<name>)");
  }

  PREVENT_EMBEDDED_TRANSACTION();

  TRI_GET_GLOBALS();
  auto& analyzers =
      v8g->_server.getFeature<arangodb::iresearch::IResearchAnalyzerFeature>();

  auto name = arangodb::iresearch::IResearchAnalyzerFeature::normalize(
    TRI_ObjectToString(isolate, args[0]), vocbase.name());

  // ...........................................................................
  // end of parameter parsing
  // ...........................................................................

  const auto analyzerVocbase = arangodb::iresearch::IResearchAnalyzerFeature::extractVocbaseName(name);
  if (!arangodb::iresearch::IResearchAnalyzerFeature::analyzerReachableFromDb(
          analyzerVocbase, vocbase.name(), true)) {
    std::string errorMessage("Analyzer '");
    errorMessage.append(name)
      .append("' is not accessible. Only analyzers from current database ('")
      .append(vocbase.name())
      .append("')");
    if (vocbase.name() != arangodb::StaticStrings::SystemDatabase) {
      errorMessage.append(" or system database");
    }
    errorMessage.append(" are available");
    TRI_V8_THROW_EXCEPTION_MESSAGE(
      TRI_ERROR_FORBIDDEN, // code
      errorMessage
    );
  }

  if (!arangodb::iresearch::IResearchAnalyzerFeature::canUse(name, arangodb::auth::Level::RO)) {
    TRI_V8_THROW_EXCEPTION_MESSAGE( // exception
      TRI_ERROR_FORBIDDEN, // code
      "insufficient rights to get analyzer" // message
    );
  }

  try {
    auto analyzer = analyzers.get(name, arangodb::QueryAnalyzerRevisions::QUERY_LATEST);

    if (!analyzer) {
      TRI_V8_RETURN_NULL();
    }

    auto result = WrapAnalyzer(isolate, analyzer);

    if (result.IsEmpty()) {
      TRI_V8_THROW_EXCEPTION_MEMORY();
    }

    TRI_V8_RETURN(result);
  } catch (arangodb::basics::Exception const& ex) {
    TRI_V8_THROW_EXCEPTION_MESSAGE(ex.code(), ex.what());
  } catch (std::exception const& ex) {
    TRI_V8_THROW_EXCEPTION_MESSAGE(TRI_ERROR_INTERNAL, ex.what());
  } catch (...) {
    TRI_V8_THROW_EXCEPTION_MESSAGE(TRI_ERROR_INTERNAL, "cannot get analyzer");
  }

  TRI_V8_TRY_CATCH_END
}

void JS_List(v8::FunctionCallbackInfo<v8::Value> const& args) {
  TRI_V8_TRY_CATCH_BEGIN(isolate);
  v8::HandleScope scope(isolate);
  auto context = TRI_IGETC;
  auto& vocbase = GetContextVocBase(isolate);

  if (vocbase.isDropped()) {
    TRI_V8_THROW_EXCEPTION(TRI_ERROR_ARANGO_DATABASE_NOT_FOUND);
  }

  TRI_GET_GLOBALS();
  auto& analyzers =
      v8g->_server.getFeature<arangodb::iresearch::IResearchAnalyzerFeature>();
  auto sysVocbase =
      v8g->_server.hasFeature<arangodb::SystemDatabaseFeature>()
          ? v8g->_server.getFeature<arangodb::SystemDatabaseFeature>().use()
          : nullptr;

  // ...........................................................................
  // end of parameter parsing
  // ...........................................................................

  typedef arangodb::iresearch::AnalyzerPool::ptr AnalyzerPoolPtr;
  std::vector<AnalyzerPoolPtr> result;
  auto visitor = [&result](AnalyzerPoolPtr const& analyzer)->bool {
    if (analyzer) {
      result.emplace_back(analyzer);
    }

    return true; // continue with next analyzer
  };

  try {
    analyzers.visit(visitor, nullptr);  // include static analyzers

    if (arangodb::iresearch::IResearchAnalyzerFeature::canUse(vocbase, arangodb::auth::Level::RO)) {
      analyzers.visit(visitor, &vocbase);
    }

    // include analyzers from the system vocbase if possible
    if (sysVocbase // have system vocbase
       && sysVocbase->name() != vocbase.name() // not same vocbase as current
       && arangodb::iresearch::IResearchAnalyzerFeature::canUse(*sysVocbase, arangodb::auth::Level::RO)) {
      analyzers.visit(visitor, sysVocbase.get());
    }

    auto v8Result = v8::Array::New(isolate);

    for (size_t i = 0, count = result.size(); i < count; ++i) {
      auto analyzer = WrapAnalyzer(isolate, result[i]);

      if (analyzer.IsEmpty() || i > std::numeric_limits<uint32_t>::max()) {
        TRI_V8_THROW_EXCEPTION_MEMORY();
      }

      v8Result->Set(context, static_cast<uint32_t>(i), analyzer).FromMaybe(false); // cast safe because of check above
    }

    TRI_V8_RETURN(v8Result);
  } catch (arangodb::basics::Exception const& ex) {
    TRI_V8_THROW_EXCEPTION_MESSAGE(ex.code(), ex.what());
  } catch (std::exception const& ex) {
    TRI_V8_THROW_EXCEPTION_MESSAGE(TRI_ERROR_INTERNAL, ex.what());
  } catch (...) {
    TRI_V8_THROW_EXCEPTION_MESSAGE(TRI_ERROR_INTERNAL, "cannot list analyzers");
  }

  TRI_V8_TRY_CATCH_END
}

void JS_Remove(v8::FunctionCallbackInfo<v8::Value> const& args) {
  TRI_V8_TRY_CATCH_BEGIN(isolate);
  v8::HandleScope scope(isolate);
  auto& vocbase = GetContextVocBase(isolate);

  if (vocbase.isDangling()) {
    TRI_V8_THROW_EXCEPTION(TRI_ERROR_ARANGO_DATABASE_NOT_FOUND);
  }

  // we require 1 string argument and an optional boolean argument
  // remove(name: <string>[, force: <bool>])
  if (args.Length() < 1 // too few args
      || args.Length() > 2 // too many args
      || !args[0]->IsString() // not a string
      ) {
    TRI_V8_THROW_EXCEPTION_USAGE("remove(<name> [, <force>])");
  }

  PREVENT_EMBEDDED_TRANSACTION();

  TRI_GET_GLOBALS();
  auto& analyzers =
      v8g->_server.getFeature<arangodb::iresearch::IResearchAnalyzerFeature>();

  auto nameFromArgs = TRI_ObjectToString(isolate, args[0]);
  auto splittedAnalyzerName =
    arangodb::iresearch::IResearchAnalyzerFeature::splitAnalyzerName(nameFromArgs);
  if (!arangodb::iresearch::IResearchAnalyzerFeature::analyzerReachableFromDb(
           splittedAnalyzerName.first, vocbase.name())) {
    TRI_V8_THROW_EXCEPTION_MESSAGE(
      TRI_ERROR_FORBIDDEN,
      "Database in analyzer name does not match current database");
    return;
  }

  if (!TRI_vocbase_t::IsAllowedName(false, arangodb::velocypack::StringRef(splittedAnalyzerName.second.c_str(),
                                                                           splittedAnalyzerName.second.size()))) {
    TRI_V8_THROW_EXCEPTION_MESSAGE(
      TRI_ERROR_BAD_PARAMETER,
      std::string("Invalid characters in analyzer name '").append(splittedAnalyzerName.second)
        .append("'.")
    );
  }

  auto name = arangodb::iresearch::IResearchAnalyzerFeature::normalize(splittedAnalyzerName.second,
                                                                       vocbase.name());
  bool force = false;

  if (args.Length() > 1) {
    if (!args[1]->IsBoolean() && !args[1]->IsBooleanObject()) {
      TRI_V8_THROW_TYPE_ERROR("<force> must be a boolean");
    }

    force = TRI_ObjectToBoolean(isolate, args[1]);
  }

  // ...........................................................................
  // end of parameter parsing
  // ...........................................................................

  if (!arangodb::iresearch::IResearchAnalyzerFeature::canUse(name, arangodb::auth::Level::RW)) {
    TRI_V8_THROW_EXCEPTION_MESSAGE( // exception
      TRI_ERROR_FORBIDDEN, // code
      "insufficient rights to remove analyzer" // message
    );
  }

  try {
    auto res = analyzers.remove(name, force);
    if (!res.ok()) {
      TRI_V8_THROW_EXCEPTION(res);
    }
    TRI_V8_RETURN_UNDEFINED();
  } catch (arangodb::basics::Exception const& ex) {
    TRI_V8_THROW_EXCEPTION_MESSAGE(ex.code(), ex.what());
  } catch (std::exception const& ex) {
    TRI_V8_THROW_EXCEPTION_MESSAGE(TRI_ERROR_INTERNAL, ex.what());
  } catch (...) {
    TRI_V8_THROW_EXCEPTION_MESSAGE( // exception
      TRI_ERROR_INTERNAL, // code
      "cannot remove analyzer" // message
    );
  }
  TRI_V8_TRY_CATCH_END
}

}

namespace arangodb {
namespace iresearch {

void TRI_InitV8Analyzers(TRI_v8_global_t& v8g, v8::Isolate* isolate) {
  // 'analyzers' feature functions
  {
    auto fnTemplate = v8::FunctionTemplate::New(isolate);

    fnTemplate->SetClassName(TRI_V8_ASCII_STRING(isolate, "ArangoAnalyzersCtor"));

    auto objTemplate = fnTemplate->InstanceTemplate();

    objTemplate->SetInternalFieldCount(0);
    TRI_AddMethodVocbase(isolate, objTemplate, TRI_V8_ASCII_STRING(isolate, "analyzer"), JS_Get);
    TRI_AddMethodVocbase(isolate, objTemplate, TRI_V8_ASCII_STRING(isolate, "remove"), JS_Remove);
    TRI_AddMethodVocbase(isolate, objTemplate, TRI_V8_ASCII_STRING(isolate, "save"), JS_Create);
    TRI_AddMethodVocbase(isolate, objTemplate, TRI_V8_ASCII_STRING(isolate, "toArray"), JS_List);

    v8g.IResearchAnalyzerManagerTempl.Reset(isolate, objTemplate);

    auto instance = objTemplate->NewInstance(TRI_IGETC).FromMaybe(v8::Local<v8::Object>());

    // register the global object accessable via JavaScipt
    if (!instance.IsEmpty()) {
      TRI_AddGlobalVariableVocbase(isolate, TRI_V8_ASCII_STRING(isolate, "ArangoAnalyzers"), instance);
    }
  }

  // individual analyzer functions
  {
    auto fnTemplate = v8::FunctionTemplate::New(isolate);

    fnTemplate->SetClassName(TRI_V8_ASCII_STRING(isolate, "ArangoAnalyzer"));

    auto objTemplate = fnTemplate->InstanceTemplate();

    objTemplate->SetInternalFieldCount(2); // SLOT_CLASS_TYPE + SLOT_CLASS
    TRI_AddMethodVocbase(isolate, objTemplate, TRI_V8_ASCII_STRING(isolate, "features"), JS_AnalyzerFeatures);
    TRI_AddMethodVocbase(isolate, objTemplate, TRI_V8_ASCII_STRING(isolate, "name"), JS_AnalyzerName);
    TRI_AddMethodVocbase(isolate, objTemplate, TRI_V8_ASCII_STRING(isolate, "properties"), JS_AnalyzerProperties);
    TRI_AddMethodVocbase(isolate, objTemplate, TRI_V8_ASCII_STRING(isolate, "type"), JS_AnalyzerType);

    v8g.IResearchAnalyzerInstanceTempl.Reset(isolate, objTemplate);
    TRI_AddGlobalFunctionVocbase( // required only for pretty-printing via JavaScript (must to be defined AFTER v8g.IResearchAnalyzerTempl.Reset(...))
      isolate, // isolate
      TRI_V8_ASCII_STRING(isolate, "ArangoAnalyzer"), // name
      fnTemplate->GetFunction(TRI_IGETC).FromMaybe(v8::Local<v8::Function>()) // impl
    );
  }
}

} // iresearch
} // arangodb

// -----------------------------------------------------------------------------
// --SECTION--                                                       END-OF-FILE
// -----------------------------------------------------------------------------


text:
define(function(require, exports, module) {
"use strict";

var oop = require("../lib/oop");
var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
var xml_util = require("./xml_util");

var ColdfusionHighlightRules = function() {

    // regexp must not have capturing parentheses
    // regexps are ordered -> the first match is used

    this.$rules = {
        start : [ {
            token : "text",
            regex : "<\\!\\[CDATA\\[",
            next : "cdata"
        }, {
            token : "xml-pe",
            regex : "<\\?.*?\\?>"
        }, {
            token : "comment",
            regex : "<\\!--",
            next : "comment"
        }, {
            token : "meta.tag",
            regex : "<(?=script)",
            next : "script"
        }, {
            token : "meta.tag",
            regex : "<(?=cfscript)",
            next : "cfscript"
        }, {
            token : "meta.tag",
            regex : "<(?=style)",
            next : "style"
        }, {
            token : "meta.tag", // opening tag
            regex : "<\\/?",
            next : "tag"
        } ],

        cdata : [ {
            token : "text",
            regex : "\\]\\]>",
            next : "start"
        } ],

        comment : [ {
            token : "comment",
            regex : ".*?-->",
            next : "start"
        }, {
            defaultToken : "comment"
        } ]
    };

    xml_util.tag(this.$rules, "tag", "start");
    xml_util.tag(this.$rules, "style", "css-start");
    xml_util.tag(this.$rules, "script", "js-start");
    xml_util.tag(this.$rules, "cfscript", "js-start");

    this.embedRules(JavaScriptHighlightRules, "js-", [{
        token: "comment",
        regex: "\\/\\/.*(?=<\\/script>)",
        next: "tag"
    }, {
        token: "meta.tag",
        regex: "<\\/(?=script)",
        next: "tag"
    }, {
        token: "comment",
        regex: "\\/\\/.*(?=<\\/cfscript>)",
        next: "tag"
    }, {
        token: "meta.tag",
        regex: "<\\/(?=cfscript)",
        next: "tag"
    }]);

    this.embedRules(CssHighlightRules, "css-", [{
        token: "meta.tag",
        regex: "<\\/(?=style)",
        next: "tag"
    }]);
};

oop.inherits(ColdfusionHighlightRules, TextHighlightRules);

exports.ColdfusionHighlightRules = ColdfusionHighlightRules;
});


text:
layout: page
title: About
---

  Hello citizens of the web. I'm Bas and I am here to exchange ideas with you.

Hello world !

{% highlight python %}
class Bas(Human, Syrian)
    name = 'Basel J. Hamadeh'
    dob = date(1984, 10, 14)
    current_location = 'Kuala__Lumpur'
    job = 'Developer'
    interest = [Technology, Nature]
    hobbies = [Beer, Coding, Building stuff, Socializing]

    def get_name(self):
        return self.name

    def get_dob(self):
        return dob.isoformat()
{% endhighlight %}

I do have social network accounts. But I prefer email.

hamadeh.basel@gmail.com


text:
/* ------------------------------------------------------------------ *
 * CRÉATION DES TABLES                                                *
 *                                                                    *
 * Base de données : STAGE2014                                        *
 * Tables          :                                                  *
 *           srcSDSS    : liste des sources identifiées par SDSS      *
 *           srcSTACK   : liste des sources identifiées par Stack     *
 *           algorithms : liste des algorithmes de matching           *
 *           matching   : différents matching entre SDSS et Stack     *
 *                                                                    *
 * Ce modèle est un modèle à colonnes variables, à 3 tables           *
 * ------------------------------------------------------------------ */

USE STAGE2014;

/* --- Creation des tables ------------------------------------------ */
CREATE TABLE IF NOT EXISTS srcSDSS_m (
/* table srcSDSS_m sources plus matching
		#id         : identifiant de chaque ligne (celui de SDSS)
		run         : run de la photo identifiant la source SDSS
		col         : colonne du capteur (1 à 6)
		field       : numéro du champ de la run
		ra          : coordonnées en RA de la source
		dec         : coordonnées en Dec de la source
		u,g,r,i,z   : magnitude dans les différents filtres
		_algo1      : id de la source SDSS associé par algo1
*/
	`id` BIGINT NOT NULL AUTO_INCREMENT,

/* donnees camera */
	`run`   INT(6) NOT NULL,
	`col`   INT(1) NOT NULL, /* camcol dans SDSS */
	`field` INT(4) NOT NULL,

/* donnees astrometriques */
	`ra`    FLOAT(16,10) NOT NULL,
	`dec`   FLOAT(16,10) NOT NULL,

/* donnees photometriques */
	`u`     FLOAT(5,3),
	`g`     FLOAT(5,3),
	`r`     FLOAT(5,3),
	`i`     FLOAT(5,3),
	`z`     FLOAT(5,3),

/* donnees du matching */
	`algo1` BIGINT,

/* contraintes */
	PRIMARY KEY(`id`),
	CONSTRAINT c_col CHECK ( `col` > 0 AND `col` < 7 )
	CONSTRAINT fk_algo1  FOREIGN KEY(`algo1`)  REFERENCES srcSTACK(`id`),
);

CREATE TABLE IF NOT EXISTS srcSTACK_m (
/* table srcSTACK_m sources plus matching
		#id         : identifiant de chaque ligne (celui du Stack)
		run         : run de la photo identifiant la source SDSS
		col         : colonne du capteur (1 à 6)
		field       : numéro du champ de la run
		filter      : filtre utilisé (u,g,r,i,z)
		ra          : coordonnées en RA de la source
		dec         : coordonnées en Dec de la source
		mag         : magnitude dans le filtre précisé
		_algo1      : id de la source Stack associé par algo1
*/
	`id` BIGINT NOT NULL AUTO_INCREMENT,

/* donnee camera */
	`run`    INT (6) NOT NULL,
	`col`    INT (1) NOT NULL,
	`field`  INT (4) NOT NULL,
	`filter` CHAR(1) NOT NULL,

/* donnees astrometriques */
	`ra`     FLOAT(16,10) NOT NULL,
	`dec`    FLOAT(16,10) NOT NULL,

/* donnees photometriques */
	`mag`    FLOAT(5,3),

/* donnees du matching */
	`algo1` BIGINT,

/* contraintes */
	PRIMARY KEY(`id`),
	CONSTRAINT c_filter CHECK ( `filter` IN ('u','g','r','i','z') ),
	CONSTRAINT c_col    CHECK ( `col` > 0 AND `col` < 7 )
	CONSTRAINT fk_algo1  FOREIGN KEY(`algo1`)  REFERENCES srcSDSS(`id`),
);

CREATE TABLE IF NOT EXISTS algorithms_m (
/* table algorithms_m :
		#id         : identifiant de chaque ligne
		author      : auteur de l'algorithme de matching
		date        : date du matching ou du développement de l'algorithme
		url         : adresse à laquelle on peut trouver l'algorithme de matching
		description : description courte (max 512 caractères) de l'algorithme
		tag         : nom de la colonne faisant référence à l'algorithme
*/
	`id` INT NOT NULL AUTO_INCREMENT,

	`author`      VARCHAR(255),
	`date`        TIMESTAMP NOT NULL,
	`url`         VARCHAR(255),
	`description` MEDIUMTEXT,
	`tag`         VARCHAR(10),

	PRIMARY KEY(`id`)
);


text:
namespace ash {

class ThemeSelectionScreen;

// Interface between ThemeSelection screen and its representation,
// either WebUI or Views one.
class ThemeSelectionScreenView
    : public base::SupportsWeakPtr<ThemeSelectionScreenView> {
 public:
  constexpr static StaticOobeScreenId kScreenId{"theme-selection",
                                                "ThemeSelectionScreen"};

  inline constexpr static char kAutoMode[] = "auto";
  inline constexpr static char kDarkMode[] = "dark";
  inline constexpr static char kLightMode[] = "light";

  virtual ~ThemeSelectionScreenView() = default;

  virtual void Show(const std::string& mode) = 0;
};

class ThemeSelectionScreenHandler : public ThemeSelectionScreenView,
                                    public BaseScreenHandler {
 public:
  using TView = ThemeSelectionScreenView;

  ThemeSelectionScreenHandler();

  ThemeSelectionScreenHandler(const ThemeSelectionScreenHandler&) = delete;
  ThemeSelectionScreenHandler& operator=(const ThemeSelectionScreenHandler&) =
      delete;

  ~ThemeSelectionScreenHandler() override;

  // ThemeSelectionScreenView implementation
  void Show(const std::string& mode) override;

  // BaseScreenHandler implementation
  void DeclareLocalizedValues(
      ::login::LocalizedValuesBuilder* builder) override;
};

}  // namespace ash

#endif  // CHROME_BROWSER_UI_WEBUI_ASH_LOGIN_THEME_SELECTION_SCREEN_HANDLER_H_


text:
def test
  connection = Fog::Compute.new({ :provider => "Google" })

  # we create a new private network
  connection.insert_network('my-private-network', '10.240.0.0/16')

  server = connection.servers.create({
    :name => "fog-smoke-test-#{Time.now.to_i}",
    :image_name => "debian-7-wheezy-v20130522",
    :machine_type => "n1-standard-1",
    :zone_name => "us-central1-a",
    :private_key_path => File.expand_path("~/.ssh/id_rsa"),
    :public_key_path => File.expand_path("~/.ssh/id_rsa.pub"),
    :network => 'my-private-network',
    :external_ip => false,
    :user => ENV['USER'],
  })

  # The network won't have any firewall rules, so we won't be able to ssh in.
  server.wait_for { ready? }

  raise "Could not delete server." unless server.destroy
end


text:
class HathiController < ApplicationController
  def hathi_access
    return hathi_access_bib if params[:bib_id]
    return hathi_access_oclc if params[:oclc]
  end

  def hathi_access_bib
    @record = HathiAccess.where(bibid: params[:bib_id])
    if @record.present?
      render json: @record, except: [:id, :created_at, :updated_at]
    else
      status_404
    end
  end

  def hathi_access_oclc
    @record = HathiAccess.where(oclc_number: params[:oclc])
    if @record.present?
      render json: @record, except: [:id, :created_at, :updated_at]
    else
      status_404
    end
  end

  def status_404
    render json: @record, status: 404
  end
end


text:
import net.runelite.mapping.Export;
import net.runelite.mapping.Implements;
import net.runelite.mapping.ObfuscatedGetter;
import net.runelite.mapping.ObfuscatedName;
import net.runelite.mapping.ObfuscatedSignature;

@ObfuscatedName("bq")
@Implements("AttackOption")
public enum AttackOption implements Enumerated {
   @ObfuscatedName("w")
   @ObfuscatedSignature(
      signature = "Lbq;"
   )
   @Export("AttackOption_dependsOnCombatLevels")
   AttackOption_dependsOnCombatLevels(0),
   @ObfuscatedName("m")
   @ObfuscatedSignature(
      signature = "Lbq;"
   )
   @Export("AttackOption_alwaysRightClick")
   AttackOption_alwaysRightClick(1),
   @ObfuscatedName("q")
   @ObfuscatedSignature(
      signature = "Lbq;"
   )
   @Export("AttackOption_leftClickWhereAvailable")
   AttackOption_leftClickWhereAvailable(2),
   @ObfuscatedName("b")
   @ObfuscatedSignature(
      signature = "Lbq;"
   )
   @Export("AttackOption_hidden")
   AttackOption_hidden(3);

   @ObfuscatedName("qp")
   @ObfuscatedSignature(
      signature = "Lll;"
   )
   @Export("platformInfo")
   static MachineInfo platformInfo;
   @ObfuscatedName("f")
   @ObfuscatedGetter(
      intValue = 1657086489
   )
   @Export("id")
   final int id;

   AttackOption(int var3) {
      this.id = var3;
   }

   @ObfuscatedName("m")
   @ObfuscatedSignature(
      signature = "(B)I",
      garbageValue = "60"
   )
   public int rsOrdinal() {
      return this.id;
   }

   @ObfuscatedName("x")
   @ObfuscatedSignature(
      signature = "(B)V",
      garbageValue = "50"
   )
   static void method1855() {
      class83.chatLineMap.clear();
      class83.messages.clear();
      class83.field1205.clear();
      class83.field1208 = 0;
   }
}


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
Bull. Torrey bot. Club 47: 472 (1920)

#### Original name
Uredo contraria Arthur

### Remarks
null


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

    <RelativeLayout
        android:id="@+id/book_keep_view"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:background="@drawable/selector_book_shelf_item" >

        <RelativeLayout
            android:id="@+id/item_book_shelf_content"
            android:layout_width="fill_parent"
            android:layout_height="80dp"
            android:padding="8dp" >

            <ImageView
                android:id="@+id/item_book_icon"
                android:layout_width="45dp"
                android:layout_height="60dp"
                android:layout_centerVertical="true"
                android:scaleType="fitXY" />

            <TextView
                android:id="@+id/item_book_name"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_centerVertical="true"
                android:layout_marginLeft="15dp"
                android:layout_marginRight="60dp"
                android:layout_toRightOf="@id/item_book_icon"
                android:singleLine="true"
                android:text="暂无书名"
                android:textColor="@color/book_shelf_item_name"
                android:textSize="16dp" />

            <ImageButton
                android:id="@+id/item_book_remove"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignParentRight="true"
                android:layout_centerVertical="true"
                android:background="@null"
                android:gravity="center"
                android:src="@drawable/btn_typeface_unchoose" />
        </RelativeLayout>

        <ImageView
            android:layout_width="fill_parent"
            android:layout_height="1px"
            android:layout_below="@id/item_book_shelf_content"
            android:layout_marginLeft="70dp"
            android:background="@color/book_shelf_item_divider" />
    </RelativeLayout>

</RelativeLayout>


text:
    <form data-bind="submit: $data.applyChanges">

        <input type="text" data-bind="value: $data.startDateInput, event: {focus: $data.inputFocus}" />
        <input type="text" data-bind="value: $data.endDateInput, event: {focus: $data.inputFocus}" />

        <button class="apply-btn" type="submit" data-bind="text: $data.locale.applyButtonTitle, click: $data.applyChanges"></button>
        <button class="cancel-btn" data-bind="text: $data.locale.cancelButtonTitle, click: $data.cancelChanges"></button>

    </form>

          <button data-bind="click: $data.clickPrevButton"></button>

          <select class="month-select" data-bind="options: $data.monthOptions(), optionsText: $data.monthFormatter, valueAllowUnset: true, value: $data.selectedMonth, css: {hidden: !$data.monthSelectorAvailable()}"></select>
          <select class="year-select" data-bind="options: $data.yearOptions(), optionsText: $data.yearFormatter, valueAllowUnset: true, value: $data.selectedYear, css: {hidden: !$data.yearSelectorAvailable()}"></select>
          <select class="decade-select" data-bind="options: $data.decadeOptions(), optionsText: $data.decadeFormatter, valueAllowUnset: true, value: $data.selectedDecade, css: {hidden: !$data.decadeSelectorAvailable()}"></select>

          <button data-bind="click: $data.clickNextButton"></button>


text:
/*Setup
 -- Check DoNotTrack -- DONE
    -- If DoNotTrack is set to true, do not do anything else
 -- Get configuration from element
 -- Check for session id -- DONE
    -- if NO Session id, pass this to the session initializer
    -- if there is, pass it to the session initializer
    -- kick off session initializer, while this is happening, bind events to all elements on the page
 -- Initialize the session
    -- get session id either from the server if not already there
    -- give the server the browser type, language, version and device type
    -- send server the domain information
*/

var eventList = []

function fullPath(el){ // Gets full path of element
  var names = [];
  while (el.parentNode){
    if (el.id){
      names.unshift('#'+el.id);
      break;
    }else{
      if (el==el.ownerDocument.documentElement) names.unshift(el.tagName);
      else{
        for (var c=1,e=el;e.previousElementSibling;e=e.previousElementSibling,c++);
        names.unshift(el.tagName+":nth-child("+c+")");
      }
      el=el.parentNode;
    }
  }
  return names.join(" > ");
}

function get_browser(){
    var ua=navigator.userAgent,tem,M=ua.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i) || [];
    if(/trident/i.test(M[1])){
        tem=/\brv[ :]+(\d+)/g.exec(ua) || [];
        return {name:'IE',version:(tem[1]||'')};
        }
    if(M[1]==='Chrome'){
        tem=ua.match(/\bOPR\/(\d+)/)
        if(tem!=null)   {return {name:'Opera', version:tem[1]};}
        }
    M=M[2]? [M[1], M[2]]: [navigator.appName, navigator.appVersion, '-?'];
    if((tem=ua.match(/version\/(\d+)/i))!=null) {M.splice(1,1,tem[1]);}
    return {
      name: M[0],
      version: M[1]
    };
}

function getCookies(){
    var rawCookies = document.cookie;
    var cookiesList = rawCookies.split(";");
    var cookies = {};
    for (i=0; i<cookiesList.length; i++){
        cookies[cookiesList[i].split("=")[0]] = cookiesList[i].split("=")[1];
    }
    return cookies;
}

function pushCookies(cookies){
    for (var cookie in cookies) {
        document.cookies += cookie+"="+cookies[cookie]+";";
    }
}

function elementClicked(e){
    var path = fullPath(e.target);
    entry.path = path;
    entry.timestamp = Date().now();
    entry.type = "click"
    eventList.push(entry);
    console.log(entry);
    if (eventList.length === 10){
        pushEvents();
    }
    return 0;
}

function pushEvents(){
    var request = new XMLHttpRequest();
    var payload = {}
    payload.uid = userID;
    payload.events = eventList;
    request.open("POST", "http://"+serverHost+"/"+clientID+"/events");
    request.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
    request.send("payload="+JSON.stringify(payload)+";uid="+userID);
    return 0;
}

function setup() {
    if (navigator.DoNotTrack != 0){
        clientID = document.getElementById('follower').getAttribute("cid"); //get client id
        serverHost = document.getElementById('follower').getAttribute("host");
        userID = ""
        var request = new XMLHttpRequest();

        if (getCookies().hasOwnProperty("followID")){
            userID = getCookies()["followID"];
        }else{
            var userIDRequest = new XMLHttpRequest();
            userIDRequest.addEventListener("load", function (){
                userID = this.responseText;
                getCookies()["followID"] = userID;
            });
            userIDRequest.open("GET", "http://"+serverHost+"/"+clientID+"/getID");
            userIDRequest.send();
        }

        var browser = get_browser();

        var payload = {} // initialize payload, this will be sent to the server in a post request
        payload.browser_name = browser.name // get browser name (i.e. chrome)
        payload.browser_version = broswer.version // get browser version (i.e. 4)
        payload.domain = window.location.host;
        payload.protocol = window.location.protocol;
        payload.path = window.location.pathname;
        payload.cid = clientID;
        payload.uid = userID;

        // Actually send the data
        request.open("POST", "http://"+serverHost+"/"+clientID+"/initialize");
        request.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
        request.send("payload="+JSON.stringify(payload));

        // Add event listeners to all buttons, links, form elements, etc.

        document.getElementsByTagName("html")[0].addEventListener("click", elementClicked(e));
        window.addEventListener('popstate', pushEvents());
    } else {
        console.log("Hi, Just so you know we noticed that you didn't want to be tracked, so we are not tracking you.\nfollow will not track you as long as you have DoNotTrack enabled on your browser.\nWe will not even store cookies in your browser, so this check will be done every time you load a site that uses follow.\nHave a good day.");
    }
}


text:
package cn.edu.nju.software.dochub.data.dao;

import cn.edu.nju.software.dochub.data.dataobject.UserLog;
import org.hibernate.LockMode;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.ApplicationContext;
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;

import java.util.List;

/**
 * A data access object (DAO) providing persistence and search support for
 * UserLog entities. Transaction control of the save(), update() and delete()
 * operations can directly support Spring container-managed transactions or they
 * can be augmented to handle user-managed Spring transactions. Each of these
 * methods provides additional information for how to configure it for the
 * desired type of transaction control.
 *
 * @author MyEclipse Persistence Tools
 * @see cn.edu.nju.software.dochub.data.dataobject.UserLog
 */

public class UserLogDAO extends HibernateDaoSupport {
    private static final Logger log = LoggerFactory.getLogger(UserLogDAO.class);
    // property constants
    public static final String NAME = "name";
    public static final String TYPE = "type";
    public static final String DESCRIPTION = "description";

    protected void initDao() {
        // do nothing
    }

    public void save(UserLog transientInstance) {
        log.debug("saving UserLog instance");
        try {
            getHibernateTemplate().save(transientInstance);
            log.debug("save successful");
        } catch (RuntimeException re) {
            log.error("save failed", re);
            throw re;
        }
    }

    public void delete(UserLog persistentInstance) {
        log.debug("deleting UserLog instance");
        try {
            getHibernateTemplate().delete(persistentInstance);
            log.debug("delete successful");
        } catch (RuntimeException re) {
            log.error("delete failed", re);
            throw re;
        }
    }

    public UserLog findById(java.lang.Integer id) {
        log.debug("getting UserLog instance with id: " + id);
        try {
            UserLog instance = (UserLog) getHibernateTemplate().get(
                    "cn.edu.nju.software.dochub.data.dataobject.UserLog", id);
            return instance;
        } catch (RuntimeException re) {
            log.error("get failed", re);
            throw re;
        }
    }

    public List<UserLog> findByExample(UserLog instance) {
        log.debug("finding UserLog instance by example");
        try {
            List<UserLog> results = (List<UserLog>) getHibernateTemplate()
                    .findByExample(instance);
            log.debug("find by example successful, result size: "
                    + results.size());
            return results;
        } catch (RuntimeException re) {
            log.error("find by example failed", re);
            throw re;
        }
    }

    public List findByProperty(String propertyName, Object value) {
        log.debug("finding UserLog instance with property: " + propertyName
                + ", value: " + value);
        try {
            String queryString = "from UserLog as model where model."
                    + propertyName + "= ?";
            return getHibernateTemplate().find(queryString, value);
        } catch (RuntimeException re) {
            log.error("find by property name failed", re);
            throw re;
        }
    }

    public List<UserLog> findByName(Object name) {
        return findByProperty(NAME, name);
    }

    public List<UserLog> findByType(Object type) {
        return findByProperty(TYPE, type);
    }

    public List<UserLog> findByDescription(Object description) {
        return findByProperty(DESCRIPTION, description);
    }

    public List findAll() {
        log.debug("finding all UserLog instances");
        try {
            String queryString = "from UserLog";
            return getHibernateTemplate().find(queryString);
        } catch (RuntimeException re) {
            log.error("find all failed", re);
            throw re;
        }
    }

    public UserLog merge(UserLog detachedInstance) {
        log.debug("merging UserLog instance");
        try {
            UserLog result = (UserLog) getHibernateTemplate().merge(
                    detachedInstance);
            log.debug("merge successful");
            return result;
        } catch (RuntimeException re) {
            log.error("merge failed", re);
            throw re;
        }
    }

    public void attachDirty(UserLog instance) {
        log.debug("attaching dirty UserLog instance");
        try {
            getHibernateTemplate().saveOrUpdate(instance);
            log.debug("attach successful");
        } catch (RuntimeException re) {
            log.error("attach failed", re);
            throw re;
        }
    }

    public void attachClean(UserLog instance) {
        log.debug("attaching clean UserLog instance");
        try {
            getHibernateTemplate().lock(instance, LockMode.NONE);
            log.debug("attach successful");
        } catch (RuntimeException re) {
            log.error("attach failed", re);
            throw re;
        }
    }

    public static UserLogDAO getFromApplicationContext(ApplicationContext ctx) {
        return (UserLogDAO) ctx.getBean("UserLogDAO");
    }
}


text:
package org.hillview.table;

import org.hillview.table.api.*;
import org.hillview.table.columns.LazyColumn;
import org.hillview.table.membership.FullMembershipSet;
import org.hillview.utils.Linq;

import javax.annotation.Nullable;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

/**
 * This is a simple table held entirely in RAM.
 */
public class Table extends BaseTable {
    static final long serialVersionUID = 1;

    /**
     * The table schema: the set of columns.
     */
    private final Schema schema;
    /**
     * The list of rows that belongs to this table.
     */
    private final IMembershipSet members;
    /**
     * A loader that can be invoked to load columns that are lazily loaded.
     */
    @Nullable
    protected final IColumnLoader columnLoader;
    /**
     * Path to the local (worker-resident) file that was used to load this table.
     */
    @Nullable
    private final String sourceFile;

    /**
     * Create an empty table with the specified schema.
     * @param schema schema of the empty table
     */
    public Table(final Schema schema) {
        super(schema);
        this.schema = schema;
        this.columnLoader = null;
        this.sourceFile = null;
        this.members = new FullMembershipSet(0);
    }

    /**
     * Create a table from raw ingredients.
     * @param columns  Columns in the table.
     * @param members  Membership set (rows in the table).
     * @param schema   Schema; must match the set of columns.
     * @param loader   Loader that knows how to load column data.
     * @param sourceFile  The file where the data is loaded from.
     */
    protected <C extends IColumn> Table(
            final List<C> columns, final IMembershipSet members, final Schema schema,
            @Nullable final String sourceFile,
            @Nullable final IColumnLoader loader) {
        super(columns);
        this.members = members;
        this.schema = schema;
        this.columnLoader = loader;
        this.sourceFile = sourceFile;
    }

    public <C extends IColumn> Table(final List<C> columns, final IMembershipSet members,
                                     @Nullable final String sourceFile,
                                     @Nullable final IColumnLoader loader) {
        super(columns);
        int size = members.getMax();
        final Schema s = new Schema();
        for (final IColumn c : columns) {
            if (c.sizeInRows() != size)
                throw new IllegalArgumentException("Membership set " +
                        "(" + size + ") and column " + c.getName() +
                        "(" + c.sizeInRows() + ") do not have the same size");
            s.append(c.getDescription());
        }
        this.schema = s;
        this.sourceFile = sourceFile;
        this.members = members;
        this.columnLoader = loader;
    }

    public <C extends IColumn> Table(final C[] columns,
                                     @Nullable final String sourceFile,
                                     @Nullable final IColumnLoader loader) {
        this(Arrays.asList(columns),
                new FullMembershipSet(columnSize(Arrays.asList(columns))),
                sourceFile, loader);
    }

    public <C extends IColumn> Table(final List<C> columns,
                                     @Nullable final String sourceFile,
                                     @Nullable final IColumnLoader loader) {
        this(columns, new FullMembershipSet(columnSize(columns)), sourceFile, loader);
    }

    /**
     * Creates a table where all columns are lazy.
     * @param desc    A collection column descriptions.
     * @param loader  Loader that knows how to load a column.
     * @param rowCount Number of rows of the table.
     * @param sourceFile  File where this data was loaded from.
     */
    public static Table createLazyTable(List<ColumnDescription> desc, int rowCount,
                                        @Nullable String sourceFile, IColumnLoader loader) {
        List<LazyColumn> cols = Linq.map(desc, d -> new LazyColumn(d, rowCount, loader));
        return new Table(cols, sourceFile, loader);
    }

    /**
     * Creates a new table that only has the columns specified in the schema.
     * @param schema: Schema of the resulting table.  If a column does not exist,
     *              an empty column is created.
     */
    @Override
    public ITable project(Schema schema) {
        List<IColumn> cols = this.getColumns(schema);
        return new Table(cols, this.members, this.sourceFile, this.columnLoader);
    }

    /**
     * Creates a new table that has a different list of columns, but the same
     * membership set and the same source file.
     * @param columns  Set of columns for new table.
     */
    @Override
    public <T extends IColumn> ITable replace(List<T> columns) {
        return new Table(columns, this.getMembershipSet(),
                this.sourceFile, this.columnLoader);
    }

    @Override
    synchronized public List<IColumn> getLoadedColumns(List<String> columns) {
        List<String> toLoad = new ArrayList<String>();
        List<IColumn> result = new ArrayList<IColumn>(columns.size());
        for (String name : columns) {
            IColumn col = this.columns.get(name);
            if (col == null)
                throw new RuntimeException("No column named '" + name + "'");
            if (!col.isLoaded())
                toLoad.add(name);
        }
        if (!toLoad.isEmpty()) {
            if (this.columnLoader == null)
                throw new RuntimeException("Cannot load columns dynamically");
            List<? extends IColumn> cols = this.columnLoader.loadColumns(toLoad);
            for (IColumn c: cols)
                this.columns.put(c.getName(), c);
        }
        for (String name : columns) {
            IColumn col = this.columns.get(name);
            if (col == null)
                throw new RuntimeException("Cannot get column " + name);
            result.add(col);
        }
        return result;
    }

    @Nullable
    @Override
    public String getSourceFile() {
        return this.sourceFile;
    }

    @Override
    public Schema getSchema() {
        return this.schema;
    }

    @Override
    public IRowIterator getRowIterator() {
        return this.members.getIterator();
    }

    /**
     * Describes the set of rows that are really present in the table.
     */
    @Override
    public IMembershipSet getMembershipSet() { return this.members; }

    @Override
    public int getNumOfRows() {
        return this.members.getSize();
    }

    /**
     * Creates a new table that has the same columns but a different set of rows.
     * @param set: Membership set of the resulting table.
     */
    @Override
    public ITable selectRowsFromFullTable(IMembershipSet set) {
        return new Table(this.getColumns(), set, this.sourceFile, this.columnLoader);
    }

    /**
     * Generates a table that contains all the columns, and only
     * the rows contained in IMembership Set members with consecutive numbering.
     */
    public SmallTable compress() {
        return this.compress(this.getSchema(), this.members);
    }
}


text:
<configuration>

	<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
		<layout class="ch.qos.logback.classic.PatternLayout">
			<Pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</Pattern>
		</layout>
	</appender>

	<logger name="br.com.objectos" level="DEBUG" />
	<logger name="com.mchange" level="ERROR" />

	<root level="info">
		<appender-ref ref="STDOUT" />
	</root>

</configuration>


text:
<?php

	class Extension_CanOfSpam extends Extension {

		// delegates

		public function getSubscribedDelegates() {

			return array(

				array('page'     => '/blueprints/events/new/',
				      'delegate' => 'AppendEventFilter',
				      'callback' => 'appendEventFilter'),

				array('page'     => '/blueprints/events/edit/',
				      'delegate' => 'AppendEventFilter',
				      'callback' => 'appendEventFilter'),

				array('page'     => '/blueprints/events/new/',
					  'delegate' => 'AppendEventFilterDocumentation',
					  'callback' => 'appendEventFilterDocumentation'),

				array('page'     => '/blueprints/events/edit/',
					  'delegate' => 'AppendEventFilterDocumentation',
					  'callback' => 'appendEventFilterDocumentation'),

				array('page'     => '/frontend/',
					  'delegate' => 'EventPreSaveFilter',
					  'callback' => 'eventPreSaveFilter'),

				array('page'     => '/frontend/',
					  'delegate' => 'EventPostSaveFilter',
					  'callback' => 'eventPostSaveFilter')
			);
		}

		// update old versions

		public function update($previousVersion){

			if(version_compare($previousVersion, '2.0', '<')){

				Symphony::Configuration()->remove('canofspam');
				Administration::instance()->saveConfig();

				Symphony::Database()->query("DROP TABLE `tbl_canofspam_tracking`");
			}

			return true;
		}

		// append filter to event editor

		public function appendEventFilter($context) {

			$context['options'][] = array('canofspam',
			                              is_array($context['selected']) && in_array('canofspam', $context['selected']),
			                              'Can Of Spam');
		}

		// append filter documentation to event editor

		public function appendEventFilterDocumentation($context) {

			if (is_array($context['selected']) && in_array('canofspam', $context['selected'])) {

				$context['documentation'][] = new XMLElement('h3', 'Can Of Spam Filter');
				$context['documentation'][] = new XMLElement('p', 'To use the Can Of Spam filter, add the Can Of Spam event to your page and the following field to your form:');
				$context['documentation'][] = contentBlueprintsEvents::processDocumentationCode(

					'<input name="canofspam" value="{$canofspam}" type="hidden" />'
				);
			}
		}

		// check if submitted hash is valid

		public function eventPreSaveFilter($context) {

			if (in_array('canofspam', $context['event']->eParamFILTERS)) {

				if ($_POST['canofspam'] == $_SESSION['canofspam']) {

					// valid

					$context['messages'][] = array('canofspam', true, null);

				} else {

					// not valid

					$context['messages'][] = array('canofspam', false, 'Data was identified as spam.');

					// clear session data

					unset($_SESSION['canofspam']);
				}
			}
		}

		// reset hash value

		public function eventPostSaveFilter($context) {

			// clear session data

			unset($_SESSION['canofspam']);
		}
	}


text:
class CreateReportWriteLogs < ActiveRecord::Migration
  def change
    create_table :report_write_logs do |t|
      t.string :filepath
      t.string :report_type

      t.timestamps
    end
  end
end


text:
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

package org.chromium.chrome.browser.webapps;

import android.content.Intent;
import android.graphics.Color;
import android.os.Build;
import android.support.test.filters.SmallTest;

import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;

import org.chromium.base.test.util.CommandLineFlags;
import org.chromium.base.test.util.Feature;
import org.chromium.base.test.util.MinAndroidSdkLevel;
import org.chromium.base.test.util.Restriction;
import org.chromium.chrome.browser.ShortcutHelper;
import org.chromium.chrome.browser.flags.ChromeSwitches;
import org.chromium.chrome.test.ChromeJUnit4ClassRunner;
import org.chromium.chrome.test.util.browser.ThemeTestUtils;
import org.chromium.ui.test.util.UiRestriction;

import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeoutException;

/**
 * Tests for splash screens with EXTRA_THEME_COLOR specified in the Intent.
 */
@RunWith(ChromeJUnit4ClassRunner.class)
@CommandLineFlags.Add({ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE})
public class WebappSplashScreenThemeColorTest {
    @Rule
    public final WebappActivityTestRule mActivityTestRule = new WebappActivityTestRule();

    @Test
    @SmallTest
    @MinAndroidSdkLevel(Build.VERSION_CODES.LOLLIPOP_MR1)
    @Restriction({UiRestriction.RESTRICTION_TYPE_PHONE})
    // Customizing status bar color is disallowed for tablets.
    @Feature({"StatusBar", "Webapps"})
    public void testThemeColorWhenSpecified() {
        // This is Color.Magenta with 50% opacity.
        final int intentThemeColor = Color.argb(0x80, 0xFF, 0, 0xFF);
        Intent intent = mActivityTestRule.createIntent().putExtra(
                ShortcutHelper.EXTRA_THEME_COLOR, (long) intentThemeColor);
        mActivityTestRule.startWebappActivity(intent);

        final int expectedThemeColor = Color.MAGENTA;
        ThemeTestUtils.assertStatusBarColor(mActivityTestRule.getActivity(), expectedThemeColor);
    }

    @Test
    @SmallTest
    @MinAndroidSdkLevel(Build.VERSION_CODES.LOLLIPOP_MR1)
    @Restriction({UiRestriction.RESTRICTION_TYPE_PHONE})
    // Customizing status bar color is disallowed for tablets.
    @Feature({"StatusBar", "Webapps"})
    public void testThemeColorNotUsedIfPagesHasOne() throws ExecutionException, TimeoutException {
        final int intentThemeColor = Color.MAGENTA;
        final int pageThemeColor = Color.RED;
        String pageWithThemeColorUrl = mActivityTestRule.getTestServer().getURL(
                "/chrome/test/data/android/theme_color_test.html");
        Intent intent =
                mActivityTestRule.createIntent()
                        .putExtra(ShortcutHelper.EXTRA_URL, pageWithThemeColorUrl)
                        .putExtra(ShortcutHelper.EXTRA_THEME_COLOR, (long) intentThemeColor);
        mActivityTestRule.startWebappActivity(intent);

        ThemeTestUtils.waitForThemeColor(mActivityTestRule.getActivity(), pageThemeColor);
        ThemeTestUtils.assertStatusBarColor(mActivityTestRule.getActivity(), pageThemeColor);
    }
}


text:
package net.volcore.wtvmina.wc3messages;

//imports
    // slf4j
        import org.slf4j.*;
    // volcore libs
        import net.volcore.util.*;
        import net.volcore.wtvmina.*;
    // mina
        import org.apache.mina.core.buffer.*;
    // java
        import java.util.*;
        import java.nio.*;
        import java.nio.charset.*;

/*******************************************************************************
         See warProtocol.h in docs.
 *******************************************************************************/
public class ServerInfo implements WC3Message
{
    static Logger   logger = LoggerFactory.getLogger( "ServerInfo" );

    public int      gameTag;
    public int      gameVersion;
    public int      gameid;
    public int      timestamp;
    public String   gameName;
    public byte[]   rules;
    public int      mapCheck;
    public String   mapName;
    public String   mapCreator;
    public int      numSlots;
    public int      gameType;
    public int      slotsUsed;
    public int      slotsTotal;
    public int      uptime;
    public short    port;

    public final static int         GAMETYPE_CUSTOM = 1;
    public final static int         GAMETYPE_NORMAL = 9;
    public final static int         GAMETYPE_SAVED  = 0x200;

    protected final static CharsetDecoder charsetDecoder = Charset.forName( "UTF-8" ).newDecoder( ).onMalformedInput( CodingErrorAction.REPLACE ).onUnmappableCharacter( CodingErrorAction.REPLACE );
    protected final static CharsetEncoder charsetEncoder = Charset.forName( "UTF-8" ).newEncoder( ).onMalformedInput( CodingErrorAction.REPLACE ).onUnmappableCharacter( CodingErrorAction.REPLACE );

    public ServerInfo( int gameTag, int gameVersion, int gameid, int timestamp, String gameName,
                    byte[] rules, int mapCheck, String mapName, String mapCreator, int numSlots,
                    int gameType, int slotsUsed, int slotsTotal, int uptime, short port )
    {
        this.gameTag = gameTag;
        this.gameVersion = gameVersion;
        this.gameid = gameid;
        this.timestamp = timestamp;
        this.gameName = gameName;
        this.rules = rules;
        if( rules.length != 12 )
            throw new Error( "Invalid rule length! Should be 12!" );
        this.mapCheck = mapCheck;
        this.mapName = mapName;
        this.mapCreator = mapCreator;
        this.numSlots = numSlots;
        this.gameType = gameType;
        this.slotsUsed = slotsUsed;
        this.slotsTotal = slotsTotal;
        this.uptime = uptime;
        this.port = port;
    }

    public static final void encodeStrings( String string1, String string2, IoBuffer out ) throws Exception
    {
        // Prepare the original unencoded buffer.
            IoBuffer buf2 = IoBuffer.allocate( string1.length( ) + string2.length( ) +8 );
            buf2.setAutoExpand( true );

            buf2.putString( string1, charsetEncoder );
            buf2.put( (byte) 0 );
            buf2.putString( string2, charsetEncoder );
            buf2.put( (byte) 0 );
            buf2.put( (byte) 0 );

            buf2.flip( );

        // Write to the encoded buffer.
            int len = buf2.remaining( );

            if( len > 0 )
                out.put( buf2.get( ) );

            int pos = 0;
            for( int i=1; i<len; ++i )
            {
                if( (pos&7) == 0 )
                {
                    // compute the bitmask
                    byte mask = 1;
                    pos = 1;
                    buf2.mark( );

                    for( int j=0; j<7; ++j )
                        if( buf2.hasRemaining( ) )
                            if( ( buf2.get( )&1 ) == 1 )
                                mask |= 1<<(j+1);

                    out.put( mask );

                    buf2.reset( );
                }

                byte next = buf2.get( );

                if( (next&1)==1 )
                    out.put( next );
                else
                    out.put( (byte) (next+1) );
                pos++;
            }

            out.put( (byte) 0 );
    }

    public static final String[] decodeStrings( IoBuffer in )
    {
        logger.error( "decodeStrings not implemented yet!" );
        return null;
    }

    public ServerInfo( IoBuffer in ) throws ParseException
    {
        try {
            this.gameTag        = in.getInt( );
            this.gameVersion    = in.getInt( );
            this.gameid         = in.getInt( );
            this.timestamp      = in.getInt( );
            this.gameName       = in.getString( charsetDecoder );
            this.rules          = new byte[12];
            in.get( this.rules );
            this.mapCheck       = in.getInt( );
            String[] str = decodeStrings( in );

            this.mapName = str[0];
            this.mapCreator = str[1];

            this.numSlots       = in.getInt( );
            this.gameType       = in.getInt( );
            this.slotsUsed      = in.getInt( );
            this.slotsTotal     = in.getInt( );
            this.uptime         = in.getInt( );
            this.port           = in.getShort( );
        } catch( Exception e )
        {
            e.printStackTrace( );
            throw new ParseException( "Failed to parse ServerInfo: "+e );
        }
    }

    public byte[] assemble( )
    {
        try {
            IoBuffer buf = IoBuffer.allocate( 512 );
            buf.setAutoExpand( true );
            buf.order( ByteOrder.LITTLE_ENDIAN );
            buf.put( WC3Message.PRIMER );
            buf.put( WC3Message.UDPSERVERINFO );
            buf.putShort( (short) -1 );
            buf.putInt( gameTag );
            buf.putInt( gameVersion );
            buf.putInt( gameid );
            buf.putInt( timestamp );
            buf.putString( gameName, charsetEncoder );
            buf.put( (byte) 0 );
            buf.put( rules );
            buf.putInt( mapCheck );
            encodeStrings( mapName, mapCreator, buf );
            buf.putInt( numSlots );
            buf.putInt( gameType );
            buf.putInt( slotsUsed );
            buf.putInt( slotsTotal );
            buf.putInt( uptime );
            buf.putShort( port );

            short length = (short) buf.position( );
            buf.putShort( 2, length );
            buf.flip( );

            byte[] assembled = new byte[ buf.remaining( ) ];
            buf.get( assembled );

            return assembled;
        } catch( Exception e )
        {
            logger.error( "Failed to assemble "+this.getClass( )+": "+e );
            e.printStackTrace( );
            return null;
        }
    }

    public String toString( )
    {
        return "("+this.getClass( ).getName( )+": "+gameTag+" "+gameVersion+" "+gameid+" "+timestamp+" "+gameName+" "+mapCheck+" "+mapName+" "+mapCreator+" "+numSlots+" "+gameType+" "+slotsUsed+" "+slotsTotal+" "+uptime+" "+port+")";
    }
}


text:
<!doctype html>

  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="Description"
        content="AngularJS is what HTML would have been, had it been designed for building web-apps.
                 Declarative templates with data-binding, MVC, dependency injection and great
                 testability story all implemented with pure client-side JavaScript!">
  <meta name="fragment" content="!">
  <title ng-bind-template="AngularJS: {{partialTitle}}">AngularJS</title>

 Home

                 Learn

Why AngularJS?

Watch

Tutorial

Case Studies

FAQ

                 Develop

Tutorial

Developer Guide

API Reference

Contribute

Download

                 Discuss

Mailing List

Chat Room

Twitter

Google+

GitHub

Issue Tracker

          <form class="navbar-search pull-right" method="GET" action="https://www.google.com/search">
            <input type="text" name="as_q" class="search-query" placeholder="Search">
            <input type="hidden" name="as_sitesearch" value="angularjs.org">
          </form>

        <form class="well form-search" ng-submit="submitForm()">

 0 && bestMatch.page != currentPage}">
            <input type="text" ng-model="search" placeholder="search the docs"
                   tabindex="1" accesskey="s" class="input-medium search-query" focused="focused">

                {{bestMatch.page.shortName}}

Filtered results:

              {{page.shortName}}

              module
              {{module.name}}

              directive

              {{page.shortName}}

              filter

              {{page.shortName}}

              service

              {{service.name}}

              Types

              {{page.shortName}}

              global APIs

              {{page.id}}

        </form>

            {{crumb.name}}
            {{crumb.name}}
            /

Loading...

Discussion

Would you like full offline support for this AngularJS Docs App?

      ✕

        If you want to be able to access the entire AngularJS documentation offline, click the
        button below. This will reload the current page and trigger background downloads of all the
        necessary files (approximately 3.5MB). The next time you load the docs, the browser will
        use these cached files.

        This feature is supported on all modern browsers, except for IE9 which lacks application
        cache support.

      <button id="cacheButton" ng-click="enableOffline()">Let me have them all!</button>

Back to top

        Super-powered by Google  ©2010-2012
        (

        )

        Code licensed under the
        The
          MIT License. Documentation licensed under CC BY 3.0.