text:
SHELL=/bin/sh

default: it

alloc.a: \
makelib alloc.o alloc_re.o getln.o getln2.o stralloc_cat.o \
stralloc_catb.o stralloc_cats.o stralloc_copy.o stralloc_eady.o \
stralloc_num.o stralloc_opyb.o stralloc_opys.o stralloc_pend.o
	./makelib alloc.a alloc.o alloc_re.o getln.o getln2.o \
	stralloc_cat.o stralloc_catb.o stralloc_cats.o \
	stralloc_copy.o stralloc_eady.o stralloc_num.o \
	stralloc_opyb.o stralloc_opys.o stralloc_pend.o

alloc.o: \
compile alloc.c alloc.h error.h
	./compile alloc.c

alloc_re.o: \
compile alloc_re.c alloc.h byte.h
	./compile alloc_re.c

auto-str: \
load auto-str.o buffer.a unix.a byte.a
	./load auto-str buffer.a unix.a byte.a

auto-str.o: \
compile auto-str.c buffer.h exit.h
	./compile auto-str.c

auto_home.c: \
auto-str conf-home
	./auto-str auto_home `head -1 conf-home` > auto_home.c

auto_home.o: \
compile auto_home.c
	./compile auto_home.c

cdb.a: \
makelib cdb.o cdb_hash.o cdb_make.o
	./makelib cdb.a cdb.o cdb_hash.o cdb_make.o

cdb.o: \
compile cdb.c readwrite.h error.h seek.h byte.h cdb.h uint32.h
	./compile cdb.c

cdb_hash.o: \
compile cdb_hash.c cdb.h uint32.h
	./compile cdb_hash.c

cdb_make.o: \
compile cdb_make.c readwrite.h seek.h error.h alloc.h cdb.h uint32.h \
cdb_make.h buffer.h uint32.h
	./compile cdb_make.c

buffer.a: \
makelib buffer.o buffer_1.o buffer_2.o buffer_copy.o buffer_get.o \
buffer_put.o strerr_die.o strerr_sys.o
	./makelib buffer.a buffer.o buffer_1.o buffer_2.o \
	buffer_copy.o buffer_get.o buffer_put.o strerr_die.o \
	strerr_sys.o

buffer.o: \
compile buffer.c buffer.h
	./compile buffer.c

buffer_1.o: \
compile buffer_1.c buffer.h
	./compile buffer_1.c

buffer_2.o: \
compile buffer_2.c buffer.h
	./compile buffer_2.c

buffer_copy.o: \
compile buffer_copy.c buffer.h
	./compile buffer_copy.c

buffer_get.o: \
compile buffer_get.c buffer.h byte.h error.h
	./compile buffer_get.c

buffer_put.o: \
compile buffer_put.c buffer.h str.h byte.h error.h
	./compile buffer_put.c

buffer_read.o: \
compile buffer_read.c buffer.h
	./compile buffer_read.c

buffer_write.o: \
compile buffer_write.c buffer.h
	./compile buffer_write.c

byte.a: \
makelib byte_chr.o byte_copy.o byte_cr.o byte_diff.o byte_zero.o \
case_diffb.o case_diffs.o case_lowerb.o fmt_ulong.o fmt_str.o fmt_strn.o ip4_fmt.o \
ip4_scan.o scan_ulong.o str_chr.o str_diff.o str_len.o str_rchr.o \
str_start.o str_cpy.o uint16_pack.o uint16_unpack.o uint32_pack.o \
uint32_unpack.o
	./makelib byte.a byte_chr.o byte_copy.o byte_cr.o \
	byte_diff.o byte_zero.o case_diffb.o case_diffs.o \
	case_lowerb.o fmt_ulong.o fmt_str.o fmt_strn.o ip4_fmt.o ip4_scan.o scan_ulong.o \
	str_chr.o str_diff.o str_len.o str_rchr.o str_start.o str_cpy.o \
	uint16_pack.o uint16_unpack.o uint32_pack.o uint32_unpack.o

byte_chr.o: \
compile byte_chr.c byte.h
	./compile byte_chr.c

byte_copy.o: \
compile byte_copy.c byte.h
	./compile byte_copy.c

byte_cr.o: \
compile byte_cr.c byte.h
	./compile byte_cr.c

byte_diff.o: \
compile byte_diff.c byte.h
	./compile byte_diff.c

byte_zero.o: \
compile byte_zero.c byte.h
	./compile byte_zero.c

case_diffb.o: \
compile case_diffb.c case.h
	./compile case_diffb.c

case_diffs.o: \
compile case_diffs.c case.h
	./compile case_diffs.c

case_lowerb.o: \
compile case_lowerb.c case.h
	./compile case_lowerb.c

check: \
it instcheck
	./instcheck

chkshsgr: \
load chkshsgr.o
	./load chkshsgr

chkshsgr.o: \
compile chkshsgr.c exit.h
	./compile chkshsgr.c

choose: \
warn-auto.sh choose.sh conf-home
	cat warn-auto.sh choose.sh \
	| sed s}HOME}"`head -1 conf-home`"}g \
	> choose
	chmod 755 choose

compile: \
warn-auto.sh conf-cc
	( cat warn-auto.sh; \
	echo exec "`head -1 conf-cc`" '-c $${1+"$$@"}' \
	) > compile
	chmod 755 compile

dns.a: \
makelib dns_dfd.o dns_domain.o dns_dtda.o dns_ip.o dns_ipq.o dns_mx.o \
dns_name.o dns_nd.o dns_packet.o dns_random.o dns_rcip.o dns_rcrw.o \
dns_resolve.o dns_sortip.o dns_transmit.o dns_txt.o
	./makelib dns.a dns_dfd.o dns_domain.o dns_dtda.o dns_ip.o \
	dns_ipq.o dns_mx.o dns_name.o dns_nd.o dns_packet.o \
	dns_random.o dns_rcip.o dns_rcrw.o dns_resolve.o \
	dns_sortip.o dns_transmit.o dns_txt.o

dns_dfd.o: \
compile dns_dfd.c error.h alloc.h byte.h dns.h stralloc.h gen_alloc.h \
iopause.h taia.h tai.h uint64.h taia.h
	./compile dns_dfd.c

dns_domain.o: \
compile dns_domain.c error.h alloc.h case.h byte.h dns.h stralloc.h \
gen_alloc.h iopause.h taia.h tai.h uint64.h taia.h
	./compile dns_domain.c

dns_dtda.o: \
compile dns_dtda.c stralloc.h gen_alloc.h dns.h stralloc.h iopause.h \
taia.h tai.h uint64.h taia.h
	./compile dns_dtda.c

dns_ip.o: \
compile dns_ip.c stralloc.h gen_alloc.h uint16.h byte.h dns.h \
stralloc.h iopause.h taia.h tai.h uint64.h taia.h
	./compile dns_ip.c

dns_ipq.o: \
compile dns_ipq.c stralloc.h gen_alloc.h case.h byte.h str.h dns.h \
stralloc.h iopause.h taia.h tai.h uint64.h taia.h
	./compile dns_ipq.c

dns_mx.o: \
compile dns_mx.c stralloc.h gen_alloc.h byte.h uint16.h dns.h \
stralloc.h iopause.h taia.h tai.h uint64.h taia.h
	./compile dns_mx.c

dns_name.o: \
compile dns_name.c stralloc.h gen_alloc.h uint16.h byte.h dns.h \
stralloc.h iopause.h taia.h tai.h uint64.h taia.h
	./compile dns_name.c

dns_nd.o: \
compile dns_nd.c byte.h fmt.h dns.h stralloc.h gen_alloc.h iopause.h \
taia.h tai.h uint64.h taia.h
	./compile dns_nd.c

dns_packet.o: \
compile dns_packet.c error.h dns.h stralloc.h gen_alloc.h iopause.h \
taia.h tai.h uint64.h taia.h
	./compile dns_packet.c

dns_random.o: \
compile dns_random.c dns.h stralloc.h gen_alloc.h iopause.h taia.h \
tai.h uint64.h taia.h taia.h uint32.h
	./compile dns_random.c

dns_rcip.o: \
compile dns_rcip.c taia.h tai.h uint64.h openreadclose.h stralloc.h \
gen_alloc.h byte.h ip4.h env.h dns.h stralloc.h iopause.h taia.h \
taia.h
	./compile dns_rcip.c

dns_rcrw.o: \
compile dns_rcrw.c taia.h tai.h uint64.h env.h byte.h str.h \
openreadclose.h stralloc.h gen_alloc.h dns.h stralloc.h iopause.h \
taia.h taia.h
	./compile dns_rcrw.c

dns_resolve.o: \
compile dns_resolve.c iopause.h taia.h tai.h uint64.h taia.h byte.h \
dns.h stralloc.h gen_alloc.h iopause.h taia.h
	./compile dns_resolve.c

dns_sortip.o: \
compile dns_sortip.c byte.h dns.h stralloc.h gen_alloc.h iopause.h \
taia.h tai.h uint64.h taia.h
	./compile dns_sortip.c

dns_transmit.o: \
compile dns_transmit.c socket.h uint16.h alloc.h error.h byte.h \
uint16.h dns.h stralloc.h gen_alloc.h iopause.h taia.h tai.h uint64.h \
taia.h
	./compile dns_transmit.c

dns_txt.o: \
compile dns_txt.c stralloc.h gen_alloc.h uint16.h byte.h dns.h \
stralloc.h iopause.h taia.h tai.h uint64.h taia.h
	./compile dns_txt.c

qmail-rblchk: \
load qmail-rblchk.o iopause.o error_temp.o timestamp.o getopt.a dns.a env.a libtai.a alloc.a buffer.a cdb.a unix.a \
byte.a socket.lib
	./load qmail-rblchk iopause.o error_temp.o timestamp.o getopt.a dns.a env.a libtai.a alloc.a \
	buffer.a cdb.a unix.a byte.a  `cat socket.lib`

qmail-rblchk.o: \
compile qmail-rblchk.c buffer.h exit.h strerr.h ip4.h dns.h stralloc.h \
gen_alloc.h iopause.h sgetopt.h timestamp.h tai.h uint64.h taia.h cdb.h uint32.h
	./compile qmail-rblchk.c

getsenderip: \
load getsenderip.o iopause.o error_temp.o timestamp.o getopt.a env.a libtai.a alloc.a buffer.a unix.a \
byte.a socket.lib
	./load getsenderip iopause.o error_temp.o timestamp.o getopt.a env.a libtai.a alloc.a \
	buffer.a unix.a byte.a  `cat socket.lib`

getsenderip.o: \
compile getsenderip.c buffer.h exit.h strerr.h ip4.h stralloc.h \
gen_alloc.h iopause.h sgetopt.h timestamp.h tai.h uint64.h taia.h
	./compile getsenderip.c

env.a: \
makelib env.o
	./makelib env.a env.o

timestamp.o: \
compile tai.h taia.h timestamp.c timestamp.h uint64.h
	./compile timestamp.c

env.o: \
compile env.c str.h env.h
	./compile env.c

error.o: \
compile error.c error.h
	./compile error.c

error_str.o: \
compile error_str.c error.h
	./compile error_str.c

error_temp.o: \
compile error_temp.c error.h
	./compile error_temp.c

fmt_ulong.o: \
compile fmt_ulong.c fmt.h
	./compile fmt_ulong.c

fmt_str.o: \
compile fmt_str.c fmt.h
	./compile fmt_str.c

fmt_strn.o: \
compile fmt_strn.c fmt.h
	./compile fmt_strn.c

getln.o: \
compile getln.c byte.h getln.h buffer.h stralloc.h gen_alloc.h
	./compile getln.c

getln2.o: \
compile getln2.c byte.h getln.h buffer.h stralloc.h gen_alloc.h
	./compile getln2.c

getopt.a: \
makelib sgetopt.o subgetopt.o
	./makelib getopt.a sgetopt.o subgetopt.o

hier.o: \
compile hier.c auto_home.h
	./compile hier.c

install: \
load install.o hier.o auto_home.o buffer.a unix.a byte.a
	./load install hier.o auto_home.o buffer.a unix.a byte.a

install.o: \
compile install.c buffer.h strerr.h error.h open.h exit.h
	./compile install.c

instcheck: \
load instcheck.o hier.o auto_home.o buffer.a unix.a byte.a
	./load instcheck hier.o auto_home.o buffer.a unix.a byte.a

instcheck.o: \
compile instcheck.c strerr.h error.h exit.h
	./compile instcheck.c

iopause.h: \
choose compile load trypoll.c iopause.h1 iopause.h2
	./choose clr trypoll iopause.h1 iopause.h2 > iopause.h

iopause.o: \
compile iopause.c taia.h tai.h uint64.h select.h iopause.h taia.h
	./compile iopause.c

ip4_fmt.o: \
compile ip4_fmt.c fmt.h ip4.h
	./compile ip4_fmt.c

ip4_scan.o: \
compile ip4_scan.c scan.h ip4.h
	./compile ip4_scan.c

clean:
	rm -f `cat TARGETS`
	@rm -f *~ *.core

tar: clean
	tar -zcf ../qmail-rblchk-2.4.1.tar.gz -C .. \
		--exclude CVS --exclude SpamDir --exclude html --exclude test\* \
		qmail-rblchk

it: \
prog install instcheck

libtai.a: \
makelib tai_add.o tai_now.o tai_pack.o tai_sub.o tai_uint.o \
tai_unpack.o taia_add.o taia_approx.o taia_frac.o taia_less.o \
taia_now.o taia_pack.o taia_sub.o taia_tai.o taia_uint.o
	./makelib libtai.a tai_add.o tai_now.o tai_pack.o \
	tai_sub.o tai_uint.o tai_unpack.o taia_add.o taia_approx.o \
	taia_frac.o taia_less.o taia_now.o taia_pack.o taia_sub.o \
	taia_tai.o taia_uint.o

load: \
warn-auto.sh conf-ld
	( cat warn-auto.sh; \
	echo 'main="$$1"; shift'; \
	echo exec "`head -1 conf-ld`" \
	'-o "$$main" "$$main".o $${1+"$$@"}' \
	) > load
	chmod 755 load

makelib: \
warn-auto.sh systype
	( cat warn-auto.sh; \
	echo 'main="$$1"; shift'; \
	echo 'rm -f "$$main"'; \
	echo 'ar cr "$$main" $${1+"$$@"}'; \
	case "`cat systype`" in \
	sunos-5.*) ;; \
	unix_sv*) ;; \
	irix64-*) ;; \
	irix-*) ;; \
	dgux-*) ;; \
	hp-ux-*) ;; \
	sco*) ;; \
	*) echo 'ranlib "$$main"' ;; \
	esac \
	) > makelib
	chmod 755 makelib

ndelay_off.o: \
compile ndelay_off.c ndelay.h
	./compile ndelay_off.c

ndelay_on.o: \
compile ndelay_on.c ndelay.h
	./compile ndelay_on.c

open_read.o: \
compile open_read.c open.h
	./compile open_read.c

open_trunc.o: \
compile open_trunc.c open.h
	./compile open_trunc.c

open_excl.o: \
compile open_excl.c open.h
	./compile open_excl.c

open_append.o: \
compile open_append.c open.h
	./compile open_append.c

openreadclose.o: \
compile openreadclose.c error.h open.h readclose.h stralloc.h \
gen_alloc.h openreadclose.h stralloc.h
	./compile openreadclose.c

qmail-rblchk.0:\
qmail-rblchk.1
	nroff -man qmail-rblchk.1 > qmail-rblchk.0

getsenderip.0:\
getsenderip.1
	nroff -man getsenderip.1 > getsenderip.0

man:\
qmail-rblchk.0 getsenderip.0

prog: \
qmail-rblchk getsenderip

readclose.o: \
compile readclose.c error.h readclose.h stralloc.h gen_alloc.h
	./compile readclose.c

scan_ulong.o: \
compile scan_ulong.c scan.h
	./compile scan_ulong.c

seek_set.o: \
compile seek_set.c seek.h
	./compile seek_set.c

select.h: \
choose compile trysysel.c select.h1 select.h2
	./choose c trysysel select.h1 select.h2 > select.h

setup: \
it man install
	./install

sgetopt.o: \
compile sgetopt.c buffer.h sgetopt.h subgetopt.h subgetopt.h
	./compile sgetopt.c

socket.lib: \
trylsock.c compile load
	( ( ./compile trylsock.c && \
	./load trylsock -lsocket -lnsl ) >/dev/null 2>&1 \
	&& echo -lsocket -lnsl || exit 0 ) > socket.lib
	rm -f trylsock.o trylsock

socket_accept.o: \
compile socket_accept.c byte.h socket.h uint16.h
	./compile socket_accept.c

socket_bind.o: \
compile socket_bind.c byte.h socket.h uint16.h
	./compile socket_bind.c

socket_conn.o: \
compile socket_conn.c byte.h socket.h uint16.h
	./compile socket_conn.c

socket_listen.o: \
compile socket_listen.c socket.h uint16.h
	./compile socket_listen.c

socket_recv.o: \
compile socket_recv.c byte.h socket.h uint16.h
	./compile socket_recv.c

socket_send.o: \
compile socket_send.c byte.h socket.h uint16.h
	./compile socket_send.c

socket_tcp.o: \
compile socket_tcp.c ndelay.h socket.h uint16.h
	./compile socket_tcp.c

socket_udp.o: \
compile socket_udp.c ndelay.h socket.h uint16.h
	./compile socket_udp.c

str_chr.o: \
compile str_chr.c str.h
	./compile str_chr.c

str_diff.o: \
compile str_diff.c str.h
	./compile str_diff.c

str_len.o: \
compile str_len.c str.h
	./compile str_len.c

str_rchr.o: \
compile str_rchr.c str.h
	./compile str_rchr.c

str_start.o: \
compile str_start.c str.h
	./compile str_start.c

str_cpy.o: \
compile str_cpy.c str.h
	./compile str_cpy.c

stralloc_cat.o: \
compile stralloc_cat.c byte.h stralloc.h gen_alloc.h
	./compile stralloc_cat.c

stralloc_catb.o: \
compile stralloc_catb.c stralloc.h gen_alloc.h byte.h
	./compile stralloc_catb.c

stralloc_cats.o: \
compile stralloc_cats.c byte.h str.h stralloc.h gen_alloc.h
	./compile stralloc_cats.c

stralloc_copy.o: \
compile stralloc_copy.c byte.h stralloc.h gen_alloc.h
	./compile stralloc_copy.c

stralloc_eady.o: \
compile stralloc_eady.c alloc.h stralloc.h gen_alloc.h \
gen_allocdefs.h
	./compile stralloc_eady.c

stralloc_num.o: \
compile stralloc_num.c stralloc.h gen_alloc.h
	./compile stralloc_num.c

stralloc_opyb.o: \
compile stralloc_opyb.c stralloc.h gen_alloc.h byte.h
	./compile stralloc_opyb.c

stralloc_opys.o: \
compile stralloc_opys.c byte.h str.h stralloc.h gen_alloc.h
	./compile stralloc_opys.c

stralloc_pend.o: \
compile stralloc_pend.c alloc.h stralloc.h gen_alloc.h \
gen_allocdefs.h
	./compile stralloc_pend.c

strerr_die.o: \
compile strerr_die.c buffer.h exit.h strerr.h
	./compile strerr_die.c

strerr_sys.o: \
compile strerr_sys.c error.h strerr.h
	./compile strerr_sys.c

subgetopt.o: \
compile subgetopt.c subgetopt.h
	./compile subgetopt.c

systype: \
find-systype.sh conf-cc conf-ld trycpp.c x86cpuid.c
	( cat warn-auto.sh; \
	echo CC=\'`head -1 conf-cc`\'; \
	echo LD=\'`head -1 conf-ld`\'; \
	cat find-systype.sh; \
	) | sh > systype

tai_add.o: \
compile tai_add.c tai.h uint64.h
	./compile tai_add.c

tai_now.o: \
compile tai_now.c tai.h uint64.h
	./compile tai_now.c

tai_pack.o: \
compile tai_pack.c tai.h uint64.h
	./compile tai_pack.c

tai_sub.o: \
compile tai_sub.c tai.h uint64.h
	./compile tai_sub.c

tai_uint.o: \
compile tai_uint.c tai.h uint64.h
	./compile tai_uint.c

tai_unpack.o: \
compile tai_unpack.c tai.h uint64.h
	./compile tai_unpack.c

taia_add.o: \
compile taia_add.c taia.h tai.h uint64.h
	./compile taia_add.c

taia_approx.o: \
compile taia_approx.c taia.h tai.h uint64.h
	./compile taia_approx.c

taia_frac.o: \
compile taia_frac.c taia.h tai.h uint64.h
	./compile taia_frac.c

taia_less.o: \
compile taia_less.c taia.h tai.h uint64.h
	./compile taia_less.c

taia_now.o: \
compile taia_now.c taia.h tai.h uint64.h
	./compile taia_now.c

taia_pack.o: \
compile taia_pack.c taia.h tai.h uint64.h
	./compile taia_pack.c

taia_sub.o: \
compile taia_sub.c taia.h tai.h uint64.h
	./compile taia_sub.c

taia_tai.o: \
compile taia_tai.c taia.h tai.h uint64.h
	./compile taia_tai.c

taia_uint.o: \
compile taia_uint.c taia.h tai.h uint64.h
	./compile taia_uint.c

uint16_pack.o: \
compile uint16_pack.c uint16.h
	./compile uint16_pack.c

uint16_unpack.o: \
compile uint16_unpack.c uint16.h
	./compile uint16_unpack.c

uint32.h: \
tryulong32.c compile load uint32.h1 uint32.h2
	( ( ./compile tryulong32.c && ./load tryulong32 && \
	./tryulong32 ) >/dev/null 2>&1 \
	&& cat uint32.h2 || cat uint32.h1 ) > uint32.h
	rm -f tryulong32.o tryulong32

uint32_pack.o: \
compile uint32_pack.c uint32.h
	./compile uint32_pack.c

uint32_unpack.o: \
compile uint32_unpack.c uint32.h
	./compile uint32_unpack.c

uint64.h: \
choose compile load tryulong64.c uint64.h1 uint64.h2
	./choose clr tryulong64 uint64.h1 uint64.h2 > uint64.h

unix.a: \
makelib buffer_read.o buffer_write.o error.o error_str.o ndelay_off.o \
ndelay_on.o open_read.o open_trunc.o open_excl.o open_append.o openreadclose.o readclose.o \
seek_set.o socket_accept.o socket_bind.o socket_conn.o \
socket_listen.o socket_recv.o socket_send.o socket_tcp.o socket_udp.o
	./makelib unix.a buffer_read.o buffer_write.o error.o \
	error_str.o ndelay_off.o ndelay_on.o open_read.o \
	open_trunc.o open_excl.o open_append.o openreadclose.o readclose.o seek_set.o \
	socket_accept.o socket_bind.o socket_conn.o socket_listen.o \
	socket_recv.o socket_send.o socket_tcp.o socket_udp.o


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Cosmos.HAL;

namespace Medli.System.Environment
{
    class DateTime
    {
        private int[] MonthToDays
        {
            get
            {
                List<int> l = new List<int>();
                l.Add(31);
                l.Add(28);
                l.Add(31);
                l.Add(30);
                l.Add(31);
                l.Add(30);
                l.Add(31);
                l.Add(31);
                l.Add(30);
                l.Add(31);
                l.Add(30);
                l.Add(31);
                return l.ToArray();
            }
        }

        #region private time
        private int _Hour;

        private int _Minute;

        private int _Second;
        #endregion

        #region private date
        private int _Year;

        private int _Month;

        private int _Day;

        private int _DayOfWeek;
        #endregion

        #region time
        /// <summary>
        /// Represents the DateTime's Hour
        /// </summary>
        public int Hour
        {
            get
            {
                return _Hour;
            }
        }

        /// <summary>
        /// Represents the DateTime's Minute
        /// </summary>
        public int Minute
        {
            get
            {
                return _Minute;
            }
        }

        /// <summary>
        /// Represents the DateTime's Second
        /// </summary>
        public int Second
        {
            get
            {
                return _Second;
            }
        }
        #endregion

        #region date
        /// <summary>
        /// Represents the DateTime's Year
        /// </summary>
        public int Year
        {
            get
            {
                return _Year;
            }
        }

        /// <summary>
        /// Represents the DateTime's Month
        /// </summary>
        public int Month
        {
            get
            {
                return _Month;
            }
        }

        /// <summary>
        /// Represents the DateTime's Day
        /// </summary>
        public int Day
        {
            get
            {
                return _Day;
            }
        }

        /// <summary>
        /// Represents the DateTime's DayOfWeek as an integer
        /// </summary>
        public int DayOfWeek
        {
            get
            {
                return _DayOfWeek;
            }
        }
        #endregion

        /// <summary>
        /// Rapresents the UNIX TimeStamp of the current DateTime
        /// </summary>
        public long TimeStamp
        {
            get
            {
                long ret = 0;
                long secondsinyear = 31536000;
                long secondsinday = 86400;
                for (int i = 1970; i < this.Year - 1; i++)
                {
                    ret += secondsinyear;
                    if ((i % 400 == 0 || (i % 4 == 0 && i % 100 != 0)))
                    {
                        ret += secondsinday;
                    }
                }
                for (int i = 1; i < this.Month - 1; i++)
                {
                    ret += MonthToDays[i] * secondsinday;
                    if (i == 2 && (this.Year % 400 == 0 || (this.Year % 4 == 0 && this.Year % 100 != 0)))
                    {
                        ret += secondsinday;
                    }
                }
                ret += this.Day * secondsinday;
                ret += this.Hour * 3600;
                ret += this.Minute * 60;
                ret += this.Second;
                return ret;
            }
        }

        /// <summary>
        /// The DateTime of this moment
        /// </summary>
        public static DateTime Now
        {
            get
            {
                return new DateTime((RTC.Century * 100) + RTC.Year, RTC.Month, RTC.DayOfTheMonth, RTC.DayOfTheWeek, RTC.Hour, RTC.Minute, RTC.Second);
            }
        }

        /// <summary>
        /// Creates a new DateTime object by getting the required informations
        /// </summary>
        /// <param name="Year">The Year of the new DateTime</param>
        /// <param name="Month">The Month of the new DateTime</param>
        /// <param name="Day">The Day of the new DateTime</param>
        /// <param name="DayOfWeek">The DayOfWeek of the new DateTime (Still not implemented the automatic function to calculate it)</param>
        /// <param name="Hour">The Hour of the new DateTime</param>
        /// <param name="Minute">The Minute of the new DateTime</param>
        /// <param name="Second">The Second of the new DateTime</param>
        /// <remarks>Not fully implemented so don't use invalid dates! E.G. 30/02/2012</remarks>
        public DateTime(int Year, int Month, int Day, int DayOfWeek, int Hour, int Minute, int Second)
        {
            this._Year = Year;
            this._Month = Month;
            this._Day = Day;
            this._DayOfWeek = DayOfWeek;
            this._Hour = Hour;
            this._Minute = Minute;
            this._Second = Second;
        }

        public override string ToString()
        {
            return "Not Implemented";
        }
    }
}

redpajama_set_name: RedPajamaGithub


text:
<?php
/**
 * The template for displaying search forms in radiate
 *
 * @package ThemeGrill
 * @subpackage Radiate
 * @since Radiate 1.0
 */
?>
<form role="search" method="get" class="search-form" action="<?php echo esc_url( home_url( '/' ) ); ?>">

		<?php _ex( 'Search for:', 'label', 'radiate' ); ?>
		<input type="search" class="search-field" placeholder="<?php echo esc_attr_x( 'Search …', 'placeholder', 'radiate' ); ?>" value="<?php echo esc_attr( get_search_query() ); ?>" name="s">

	<input type="submit" class="search-submit" value="<?php echo esc_attr_x( 'Search', 'submit button', 'radiate' ); ?>">
</form>


text:
'use strict';
import React, {
  AppRegistry,
  Component,
  StyleSheet,
  Text,
  View,
} from 'react-native';

class WindowView extends Component {
  render() {
    return (
      <View style={styles.helloworld}>
        <Text style={styles.welcome}>
          Welcome to React Native!
        </Text>
        <Text style={styles.instructions}>
          To get started, edit index.ios.js
        </Text>
        <Text style={styles.instructions}>
          Press Cmd+R to reload,{'\n'}
          Cmd+D or shake for dev menu
        </Text>
      </View>
    );
  }
}

const styles = StyleSheet.create({
  helloworld: {
    flex: 1,
    justifyContent: 'center',
    alignItems: 'center',
    backgroundColor: '#F5FCFF',
  },
  welcome: {
    fontSize: 20,
    textAlign: 'center',
    margin: 10,
  },
  instructions: {
    textAlign: 'center',
    color: '#333333',
    marginBottom: 5,
  },
});

AppRegistry.registerComponent('WindowView', () => WindowView);


text:
package mil.nga.giat.geowave.adapter.vector.render;

import java.awt.Color;
import java.awt.image.IndexColorModel;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.nio.ByteBuffer;
import java.util.ArrayList;
import java.util.BitSet;
import java.util.Collections;
import java.util.List;

import javax.media.jai.Interpolation;
import javax.media.jai.InterpolationNearest;
import javax.media.jai.remote.SerializableState;
import javax.media.jai.remote.SerializerFactory;
import javax.xml.transform.TransformerException;

import org.geoserver.wms.DefaultWebMapService;
import org.geoserver.wms.GetMapRequest;
import org.geoserver.wms.WMS;
import org.geoserver.wms.WMSMapContent;
import org.geotools.factory.CommonFactoryFinder;
import org.geotools.geometry.jts.ReferencedEnvelope;
import org.geotools.map.Layer;
import org.geotools.referencing.CRS;
import org.geotools.renderer.lite.StreamingRenderer;
import org.geotools.styling.SLDParser;
import org.geotools.styling.SLDTransformer;
import org.geotools.styling.Style;
import org.opengis.referencing.FactoryException;
import org.opengis.referencing.crs.CoordinateReferenceSystem;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.google.common.base.Function;
import com.google.common.collect.Lists;

import mil.nga.giat.geowave.adapter.vector.plugin.GeoWaveGTDataStore;
import mil.nga.giat.geowave.core.index.Persistable;
import mil.nga.giat.geowave.core.index.StringUtils;

public class DistributedRenderOptions implements
		Persistable
{
	private static final Logger LOGGER = LoggerFactory.getLogger(DistributedRenderOptions.class);
	// it doesn't make sense to grab this from the context of the geoserver
	// settings, although it is unclear whether in distributed rendering this
	// should be enabled or disabled by default
	private final static boolean USE_GLOBAL_RENDER_POOL = true;

	private String antialias;
	private boolean continuousMapWrapping;
	private boolean advancedProjectionHandlingEnabled;
	private boolean optimizeLineWidth;
	private boolean transparent;
	private boolean isMetatile;
	private boolean kmlPlacemark;
	private boolean renderScaleMethodAccurate;
	private int mapWidth;
	private int mapHeight;
	private int buffer;
	private double angle;
	private IndexColorModel palette;
	private Color bgColor;
	private int maxRenderTime;
	private int maxErrors;
	private int maxFilters;
	private ReferencedEnvelope envelope;
	private int wmsIterpolationOrdinal;
	private List<Integer> interpolationOrdinals;

	private Style style;

	protected DistributedRenderOptions() {}

	public DistributedRenderOptions(
			final WMS wms,
			final WMSMapContent mapContent,
			final Style style ) {
		optimizeLineWidth = DefaultWebMapService.isLineWidthOptimizationEnabled();
		maxFilters = DefaultWebMapService.getMaxFilterRules();

		transparent = mapContent.isTransparent();
		buffer = mapContent.getBuffer();
		angle = mapContent.getAngle();
		mapWidth = mapContent.getMapWidth();
		mapHeight = mapContent.getMapHeight();
		bgColor = mapContent.getBgColor();
		palette = mapContent.getPalette();
		renderScaleMethodAccurate = StreamingRenderer.SCALE_ACCURATE.equals(mapContent.getRendererScaleMethod());
		wmsIterpolationOrdinal = wms.getInterpolation().ordinal();
		maxErrors = wms.getMaxRenderingErrors();
		this.style = style;
		envelope = mapContent.getRenderingArea();

		final GetMapRequest request = mapContent.getRequest();
		final Object timeoutOption = request.getFormatOptions().get(
				"timeout");
		int localMaxRenderTime = 0;
		if (timeoutOption != null) {
			try {
				// local render time is in millis, while WMS max render time is
				// in seconds
				localMaxRenderTime = Integer.parseInt(timeoutOption.toString()) / 1000;
			}
			catch (final NumberFormatException e) {
				LOGGER.warn(
						"Could not parse format_option \"timeout\": " + timeoutOption,
						e);
			}
		}
		maxRenderTime = getMaxRenderTime(
				localMaxRenderTime,
				wms);
		isMetatile = request.isTiled() && (request.getTilesOrigin() != null);
		final Object antialiasObj = request.getFormatOptions().get(
				"antialias");
		if (antialiasObj != null) {
			antialias = antialiasObj.toString();
		}

		if (request.getFormatOptions().get(
				"kmplacemark") != null) {
			kmlPlacemark = ((Boolean) request.getFormatOptions().get(
					"kmplacemark")).booleanValue();
		}
		// turn on advanced projection handling
		advancedProjectionHandlingEnabled = wms.isAdvancedProjectionHandlingEnabled();
		final Object advancedProjectionObj = request.getFormatOptions().get(
				WMS.ADVANCED_PROJECTION_KEY);
		if ((advancedProjectionObj != null) && "false".equalsIgnoreCase(advancedProjectionObj.toString())) {
			advancedProjectionHandlingEnabled = false;
			continuousMapWrapping = false;
		}
		final Object mapWrappingObj = request.getFormatOptions().get(
				WMS.ADVANCED_PROJECTION_KEY);
		if ((mapWrappingObj != null) && "false".equalsIgnoreCase(mapWrappingObj.toString())) {
			continuousMapWrapping = false;
		}
		final List<Interpolation> interpolations = request.getInterpolations();
		if ((interpolations == null) || interpolations.isEmpty()) {
			interpolationOrdinals = Collections.emptyList();
		}
		else {
			interpolationOrdinals = Lists.transform(
					interpolations,
					new Function<Interpolation, Integer>() {

						@Override
						public Integer apply(
								final Interpolation input ) {
							if (input instanceof InterpolationNearest) {
								return Interpolation.INTERP_NEAREST;
							}
							else if (input instanceof InterpolationNearest) {
								return Interpolation.INTERP_NEAREST;
							}
							else if (input instanceof InterpolationNearest) {
								return Interpolation.INTERP_NEAREST;
							}
							else if (input instanceof InterpolationNearest) {
								return Interpolation.INTERP_NEAREST;
							}
							return Interpolation.INTERP_NEAREST;
						}
					});
		}
	}

	public int getMaxRenderTime(
			final int localMaxRenderTime,
			final WMS wms ) {
		int wmsMaxRenderTime = wms.getMaxRenderingTime();

		if (wmsMaxRenderTime == 0) {
			maxRenderTime = localMaxRenderTime;
		}
		else if (localMaxRenderTime != 0) {
			maxRenderTime = Math.min(
					wmsMaxRenderTime,
					localMaxRenderTime);
		}
		else {
			maxRenderTime = wmsMaxRenderTime;
		}
		return maxRenderTime;
	}

	public boolean isOptimizeLineWidth() {
		return optimizeLineWidth;
	}

	public int getMaxErrors() {
		return maxErrors;
	}

	public void setMaxErrors(
			final int maxErrors ) {
		this.maxErrors = maxErrors;
	}

	public void setOptimizeLineWidth(
			final boolean optimizeLineWidth ) {
		this.optimizeLineWidth = optimizeLineWidth;
	}

	public List<Integer> getInterpolationOrdinals() {
		return interpolationOrdinals;
	}

	public List<Interpolation> getInterpolations() {
		if ((interpolationOrdinals != null) && !interpolationOrdinals.isEmpty()) {
			return Lists.transform(
					interpolationOrdinals,
					new Function<Integer, Interpolation>() {

						@Override
						public Interpolation apply(
								final Integer input ) {
							return Interpolation.getInstance(input);
						}
					});
		}
		return Collections.emptyList();
	}

	public void setInterpolationOrdinals(
			final List<Integer> interpolationOrdinals ) {
		this.interpolationOrdinals = interpolationOrdinals;
	}

	public static boolean isUseGlobalRenderPool() {
		return USE_GLOBAL_RENDER_POOL;
	}

	public Style getStyle() {
		return style;
	}

	public void setStyle(
			final Style style ) {
		this.style = style;
	}

	public int getWmsInterpolationOrdinal() {
		return wmsIterpolationOrdinal;
	}

	public void setWmsInterpolationOrdinal(
			final int wmsIterpolationOrdinal ) {
		this.wmsIterpolationOrdinal = wmsIterpolationOrdinal;
	}

	public int getMaxRenderTime() {
		return maxRenderTime;
	}

	public void setMaxRenderTime(
			final int maxRenderTime ) {
		this.maxRenderTime = maxRenderTime;
	}

	public boolean isRenderScaleMethodAccurate() {
		return renderScaleMethodAccurate;
	}

	public void setRenderScaleMethodAccurate(
			final boolean renderScaleMethodAccurate ) {
		this.renderScaleMethodAccurate = renderScaleMethodAccurate;
	}

	public int getBuffer() {
		return buffer;
	}

	public void setBuffer(
			final int buffer ) {
		this.buffer = buffer;
	}

	public void setPalette(
			final IndexColorModel palette ) {
		this.palette = palette;
	}

	public String getAntialias() {
		return antialias;
	}

	public void setAntialias(
			final String antialias ) {
		this.antialias = antialias;
	}

	public boolean isContinuousMapWrapping() {
		return continuousMapWrapping;
	}

	public void setContinuousMapWrapping(
			final boolean continuousMapWrapping ) {
		this.continuousMapWrapping = continuousMapWrapping;
	}

	public boolean isAdvancedProjectionHandlingEnabled() {
		return advancedProjectionHandlingEnabled;
	}

	public void setAdvancedProjectionHandlingEnabled(
			final boolean advancedProjectionHandlingEnabled ) {
		this.advancedProjectionHandlingEnabled = advancedProjectionHandlingEnabled;
	}

	public boolean isKmlPlacemark() {
		return kmlPlacemark;
	}

	public void setKmlPlacemark(
			final boolean kmlPlacemark ) {
		this.kmlPlacemark = kmlPlacemark;
	}

	public boolean isTransparent() {
		return transparent;
	}

	public void setTransparent(
			final boolean transparent ) {
		this.transparent = transparent;
	}

	public boolean isMetatile() {
		return isMetatile;
	}

	public void setMetatile(
			final boolean isMetatile ) {
		this.isMetatile = isMetatile;
	}

	public Color getBgColor() {
		return bgColor;
	}

	public void setBgColor(
			final Color bgColor ) {
		this.bgColor = bgColor;
	}

	public int getMapWidth() {
		return mapWidth;
	}

	public void setMapWidth(
			final int mapWidth ) {
		this.mapWidth = mapWidth;
	}

	public int getMapHeight() {
		return mapHeight;
	}

	public void setMapHeight(
			final int mapHeight ) {
		this.mapHeight = mapHeight;
	}

	public double getAngle() {
		return angle;
	}

	public void setAngle(
			final double angle ) {
		this.angle = angle;
	}

	public int getMaxFilters() {
		return maxFilters;
	}

	public void setMaxFilters(
			final int maxFilters ) {
		this.maxFilters = maxFilters;
	}

	public ReferencedEnvelope getEnvelope() {
		return envelope;
	}

	public void setEnvelope(
			final ReferencedEnvelope envelope ) {
		this.envelope = envelope;
	}

	public IndexColorModel getPalette() {
		return palette;
	}

	@Override
	public byte[] toBinary() {
		// combine booleans into a bitset
		final BitSet bitSet = new BitSet(
				15);
		bitSet.set(
				0,
				continuousMapWrapping);
		bitSet.set(
				1,
				advancedProjectionHandlingEnabled);
		bitSet.set(
				2,
				optimizeLineWidth);
		bitSet.set(
				3,
				transparent);
		bitSet.set(
				4,
				isMetatile);
		bitSet.set(
				5,
				kmlPlacemark);
		bitSet.set(
				6,
				renderScaleMethodAccurate);
		boolean storeInterpolationOrdinals = ((interpolationOrdinals != null) && !interpolationOrdinals.isEmpty());
		bitSet.set(
				7,
				storeInterpolationOrdinals);
		bitSet.set(
				8,
				palette != null);
		bitSet.set(
				9,
				maxRenderTime > 0);
		bitSet.set(
				10,
				maxErrors > 0);
		bitSet.set(
				11,
				angle != 0);
		bitSet.set(
				12,
				buffer > 0);
		bitSet.set(
				13,
				bgColor != null);
		bitSet.set(
				14,
				style != null);
		final boolean storeCRS = !((envelope.getCoordinateReferenceSystem() == null) || GeoWaveGTDataStore.DEFAULT_CRS
				.equals(envelope.getCoordinateReferenceSystem()));
		bitSet.set(
				15,
				storeCRS);

		final double minX = envelope.getMinX();
		final double minY = envelope.getMinY();
		final double maxX = envelope.getMaxX();
		final double maxY = envelope.getMaxY();
		// required bytes include 32 for envelope doubles,
		// 8 for map width and height ints, and 2 for the bitset, and 4 for
		// maxFilters
		int bufferSize = 46;

		final byte[] wktBinary;
		if (storeCRS) {
			final String wkt = envelope.getCoordinateReferenceSystem().toWKT();
			wktBinary = StringUtils.stringToBinary(wkt);
			bufferSize += (wktBinary.length + 4);
		}
		else {
			wktBinary = null;
		}
		if (storeInterpolationOrdinals) {
			bufferSize += (4 * interpolationOrdinals.size()) + 4;
		}

		final byte[] paletteBinary;
		if (palette != null) {
			final SerializableState serializableColorModel = SerializerFactory.getState(palette);
			final ByteArrayOutputStream baos = new ByteArrayOutputStream();
			try {
				final ObjectOutputStream oos = new ObjectOutputStream(
						baos);
				oos.writeObject(serializableColorModel);
			}
			catch (final IOException e) {
				LOGGER.warn(
						"Unable to serialize sample model",
						e);
			}
			paletteBinary = baos.toByteArray();
			bufferSize += (paletteBinary.length + 4);
		}
		else {
			paletteBinary = null;
		}
		if (maxRenderTime > 0) {
			bufferSize += 4;
		}
		if (maxErrors > 0) {
			bufferSize += 4;
		}
		if (angle != 0) {
			bufferSize += 8;
		}
		if (buffer > 0) {
			bufferSize += 4;
		}
		if (bgColor != null) {
			bufferSize += 4;
		}

		final byte[] styleBinary;
		if (style != null) {
			final SLDTransformer transformer = new SLDTransformer();

			final ByteArrayOutputStream baos = new ByteArrayOutputStream();

			try {
				transformer.transform(
						new Style[] {
							style
						},
						baos);
			}
			catch (final TransformerException e) {
				LOGGER.warn(
						"Unable to create SLD from style",
						e);
			}
			styleBinary = baos.toByteArray();
			bufferSize += (styleBinary.length + 4);
		}
		else {
			styleBinary = null;
		}
		final ByteBuffer byteBuffer = ByteBuffer.allocate(bufferSize);
		byteBuffer.put(bitSet.toByteArray());
		byteBuffer.putDouble(minX);
		byteBuffer.putDouble(minY);
		byteBuffer.putDouble(maxX);
		byteBuffer.putDouble(maxY);
		byteBuffer.putInt(mapWidth);
		byteBuffer.putInt(mapHeight);
		if (wktBinary != null) {
			byteBuffer.putInt(wktBinary.length);
			byteBuffer.put(wktBinary);
		}
		if (storeInterpolationOrdinals) {
			byteBuffer.putInt(interpolationOrdinals.size());
			for (final Integer interpOrd : interpolationOrdinals) {
				byteBuffer.putInt(interpOrd);
			}
		}
		if (paletteBinary != null) {
			byteBuffer.putInt(paletteBinary.length);
			byteBuffer.put(paletteBinary);
		}
		if (maxRenderTime > 0) {
			byteBuffer.putInt(maxRenderTime);
		}
		if (maxErrors > 0) {
			byteBuffer.putInt(maxErrors);
		}
		if (angle != 0) {
			byteBuffer.putDouble(angle);
		}
		if (buffer > 0) {
			byteBuffer.putInt(buffer);
		}
		if (bgColor != null) {
			byteBuffer.putInt(bgColor.getRGB());
		}
		if (styleBinary != null) {
			byteBuffer.putInt(styleBinary.length);
			byteBuffer.put(styleBinary);
		}
		return byteBuffer.array();
	}

	@Override
	public void fromBinary(
			final byte[] bytes ) {
		final ByteBuffer buf = ByteBuffer.wrap(bytes);
		final byte[] bitSetBytes = new byte[2];
		buf.get(bitSetBytes);
		final BitSet bitSet = BitSet.valueOf(bitSetBytes);
		continuousMapWrapping = bitSet.get(0);
		advancedProjectionHandlingEnabled = bitSet.get(1);
		optimizeLineWidth = bitSet.get(2);
		transparent = bitSet.get(3);
		isMetatile = bitSet.get(4);
		kmlPlacemark = bitSet.get(5);
		renderScaleMethodAccurate = bitSet.get(6);
		final boolean interpolationOrdinalsStored = bitSet.get(7);
		final boolean paletteStored = bitSet.get(8);
		final boolean maxRenderTimeStored = bitSet.get(9);
		final boolean maxErrorsStored = bitSet.get(10);
		final boolean angleStored = bitSet.get(11);
		final boolean bufferStored = bitSet.get(12);
		final boolean bgColorStored = bitSet.get(13);
		final boolean styleStored = bitSet.get(14);
		final boolean crsStored = bitSet.get(15);
		CoordinateReferenceSystem crs;
		final double minX = buf.getDouble();
		final double minY = buf.getDouble();
		final double maxX = buf.getDouble();
		final double maxY = buf.getDouble();
		mapWidth = buf.getInt();
		mapHeight = buf.getInt();
		if (crsStored) {
			final byte[] wktBinary = new byte[buf.getInt()];
			buf.get(wktBinary);
			final String wkt = StringUtils.stringFromBinary(wktBinary);
			try {
				crs = CRS.parseWKT(wkt);
			}
			catch (final FactoryException e) {
				LOGGER.warn(
						"Unable to parse coordinate reference system",
						e);
				crs = GeoWaveGTDataStore.DEFAULT_CRS;
			}
		}
		else {
			crs = GeoWaveGTDataStore.DEFAULT_CRS;
		}
		envelope = new ReferencedEnvelope(
				minX,
				maxX,
				minY,
				maxY,
				crs);
		if (interpolationOrdinalsStored) {
			final int interpolationsLength = buf.getInt();
			interpolationOrdinals = new ArrayList<>(
					interpolationsLength);
			for (int i = 0; i < interpolationsLength; i++) {
				interpolationOrdinals.add(buf.getInt());
			}
		}
		else {
			interpolationOrdinals = Collections.emptyList();
		}
		if (paletteStored) {
			final byte[] colorModelBinary = new byte[buf.getInt()];
			buf.get(colorModelBinary);
			try {
				final ByteArrayInputStream bais = new ByteArrayInputStream(
						colorModelBinary);
				final ObjectInputStream ois = new ObjectInputStream(
						bais);
				final Object o = ois.readObject();
				if ((o instanceof SerializableState)
						&& (((SerializableState) o).getObject() instanceof IndexColorModel)) {
					palette = (IndexColorModel) ((SerializableState) o).getObject();
				}
			}
			catch (final Exception e) {
				LOGGER.warn(
						"Unable to deserialize color model",
						e);
				palette = null;
			}
		}
		else {
			palette = null;
		}
		if (maxRenderTimeStored) {
			maxRenderTime = buf.getInt();
		}
		else {
			maxRenderTime = 0;
		}
		if (maxErrorsStored) {
			maxErrors = buf.getInt();
		}
		else {
			maxErrors = 0;
		}
		if (angleStored) {
			angle = buf.getDouble();
		}
		else {
			angle = 0;
		}
		if (bufferStored) {
			buffer = buf.getInt();
		}
		else {
			buffer = 0;
		}
		if (bgColorStored) {
			bgColor = new Color(
					buf.getInt());
		}
		else {
			bgColor = null;
		}
		if (styleStored) {
			final byte[] styleBinary = new byte[buf.getInt()];
			buf.get(styleBinary);
			final SLDParser parser = new SLDParser(
					CommonFactoryFinder.getStyleFactory(null),
					new ByteArrayInputStream(
							styleBinary));
			final Style[] styles = parser.readXML();
			if ((styles != null) && (styles.length > 0)) {
				style = styles[0];
			}
			else {
				LOGGER.warn("Unable to deserialize style");
				style = null;
			}
		}
		else {
			style = null;
		}
	}

}


text:
#ifndef GRAPHLAB_SFRAME_QUERY_ENGINE_SUBPLAN_EXECUTOR_H_
#define GRAPHLAB_SFRAME_QUERY_ENGINE_SUBPLAN_EXECUTOR_H_

#include <vector>
#include <memory>
#include <functional>
#include <sframe/sframe.hpp>
#include <sframe_query_engine/planning/materialize_options.hpp>

namespace graphlab { namespace query_eval {

typedef std::function<bool(size_t, const std::shared_ptr<sframe_rows>&)> execution_callback;

struct planner_node;

/**
 * The subplan executor executes a restricted class of constant rate query
 * plans.
 *
 * The subplan executor is the last stage of a hierarchy of query
 * executors.
 *
 * The hierarchy is:
 *  - \ref planner::materialize Handles the most general materializations
 *  - \ref planner::partial_materialize Handles the most general materializations
 *                                      but performs all materializations except
 *                                      for the last stage. A private function.
 *  - \ref planner::execute_node Replicates a plan for parallelization.
 *                               A private function.
 *  - \ref subplan_executor Executes a restricted plan.
 *
 * As described in \ref execution_node, to successfully execute a query plan
 * requires certain rate control constraints to be true: i.e. all nodes
 * must read/write data at exactly the same rate.
 *
 * This executor assumes that the query plan to execute is exactly restricted
 * to that. It simply sets up the pipeline of \ref execution_node objects
 * and materializes the results.
 */
class subplan_executor {
 public:

 /**
  * Runs a single job sequentially returning the resultant SFrame.
  *
  * Note that materialize_options may be used to adapt the materialization
  * process.
  */
  sframe run(const std::shared_ptr<planner_node>& run_this,
             const materialize_options& exec_params = materialize_options());

  /** Runs a batch of planner nodes in parallel, returning an SFrame for
   * each of them.
   *
   * Note that materialize_options may be used to adapt the materialization
   * process.
   */
  std::vector<sframe> run(
      const std::vector<std::shared_ptr<planner_node> >& stuff_to_run_in_parallel,
      const materialize_options& exec_params = materialize_options());

  /** Runs a batch of planner nodes in parallel, returning an SFrame comprising
   *  of the concatenation of the output of each of the planner nodes.
   *
   *  All the stuff_to_run_in_parallel must share exactly the same schema.
   *
   *  Note that materialize_options may be used to adapt the materialization
   *  process.
   */
  sframe run_concat(
      const std::vector<std::shared_ptr<planner_node> >& stuff_to_run_in_parallel,
      const materialize_options& exec_params = materialize_options());

 private:

 /**
  * \internal
  * Runs a single job sequentially to a single sframe segment.
  */
  void generate_to_sframe_segment(const std::shared_ptr<planner_node>& run_this,
                                  sframe& out,
                                  size_t output_segment_id);

  /**
   * \internal
   * Runs a single job sequentially, calling the callback on each output.
   */
  void generate_to_callback_function(
    const std::shared_ptr<planner_node>& plan,
    size_t output_segment_id,
    execution_callback out_f);
};

}}

#endif /* _SUBPLAN_EXECUTOR_H_ */


text:
package in.tosc.ghumo;

import android.app.Activity;
import android.support.v7.widget.RecyclerView;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;

import com.squareup.picasso.Picasso;

import java.util.ArrayList;

import in.tosc.ghumo.pojos.Cab;

/**
 * Created by naman on 22/08/15.
 */
public class TaxiAdapter extends RecyclerView.Adapter<TaxiAdapter.ItemHolder> {

    private ArrayList<Cab> arraylist;
    private Activity mContext;

    public TaxiAdapter(Activity context, ArrayList<Cab> arrayList) {
        this.mContext = context;
        this.arraylist = arrayList;
        Log.d("lol",String.valueOf(arrayList.size()));

    }

    @Override
    public ItemHolder onCreateViewHolder(ViewGroup viewGroup, int i) {
        View v = LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.item_ride_taxi, null);
        ItemHolder ml = new ItemHolder(v);
        return ml;
    }

    @Override
    public void onBindViewHolder(final ItemHolder itemHolder, int i) {
        Cab cab=arraylist.get(i);
        Picasso.with(mContext).load(cab.getImageURL()).into(itemHolder.image);
        itemHolder.operator.setText(cab.getOperatorName());
        itemHolder.category.setText(" - "+cab.getCategory());
        String estimate = String.valueOf(cab.getTimeLimit());
        String estimateminutes=estimate.substring(0,estimate.indexOf("."));
        itemHolder.eta.setText(""+estimateminutes+"");
        itemHolder.price.setText("₹"+String.valueOf(cab.getPerKmRate())+"/Km + ₹"+cab.getBaseFare()+" Base Fare");
    }

    @Override
    public int getItemCount() {
        return (null != arraylist ? arraylist.size() : 0);
    }

    public class ItemHolder extends RecyclerView.ViewHolder implements View.OnClickListener {

        protected TextView operator,category,price,eta;
        protected ImageView image;

        public ItemHolder(View view) {
            super(view);

            image=(ImageView) view.findViewById(R.id.image);
            operator=(TextView) view.findViewById(R.id.operator);
            category=(TextView) view.findViewById(R.id.category);
            price=(TextView) view.findViewById(R.id.price);
            eta=(TextView) view.findViewById(R.id.eta);

            view.setOnClickListener(this);
        }

        @Override
        public void onClick(View v) {

        }

    }

}


text:
""" This module is a convenience wrapper for the AES cipher in CTR mode. """

from Crypto.Cipher import AES
from Crypto.Util import Counter

class AES_CTR_128(object):
    """An AES-CTR-128 PyCrypto wrapper."""

    def __init__(self, key, iv, counter_wraparound=False):
        """Initialize AES with the given key and IV.

        If counter_wraparound is set to True, the AES-CTR counter will
        wraparound to 0 when it overflows.
        """

        assert(len(key) == 16)
        assert(len(iv) == 16)

        self.ctr = Counter.new(128, initial_value=long(iv.encode('hex'), 16),
                               allow_wraparound=counter_wraparound)
        self.cipher = AES.new(key, AES.MODE_CTR, counter=self.ctr)

    def crypt(self, data):
        """
        Encrypt or decrypt 'data'.
        """
        return self.cipher.encrypt(data)


text:
package coyote.commons.network;

import java.net.InetAddress;
import java.util.Iterator;
import java.util.NoSuchElementException;

/**
 * Models an IP network with a netmask.
 */
public class IpNetwork extends IpAddress {
  private static final short[] HOSTONLYMASK = {255, 255, 255, 255};
  /** The mask representing 255.255.255.255 - a network of only 1 host */
  public static final IpAddress HOSTMASK = new IpAddress(HOSTONLYMASK);
  private static final short[] BITS = {0, 128, 192, 224, 240, 248, 252, 254, 255};
  private IpNetworkElementIterator ipAddressIterator = null;
  private IpAddress netmask = null;

  // TODO: Validate the mask to disallow masks like 255.22.255.0 - the segment of 22 is invalid or that last 255 should be 0

  /**
   * This is a convenience method to check if a specified address resides in a
   * specified network.
   *
   * @param address The address to check
   * @param network The address of the network
   * @param netmask The netmask of the network address to determine its scope
   *
   * @return True if the given address exists within the network specified by the network address and the netmask, false otherwise.
   */
  public static boolean checkAddressInNetwork(final String address, final String network, final String netmask) {
    boolean retval = false;

    if ((address == null) || (network == null) || (netmask == null)) {
      return false;
    }

    try {
      final IpAddress ip = new IpAddress(address);
      ip.applyNetMask(netmask);

      retval = ip.equals(network);
    } catch (final IpAddressException ipe) {}

    return retval;
  }

  /**
   * @return an IpNetwork which represents only the local host.
   */
  public static IpNetwork getLocalHost() {
    return new IpNetwork(IpInterface.getPrimary().getAddress(), HOSTMASK);
  }

  /**
   * Returns the numbers representing each of the octets in this network address.
   *
   * @param num_bits_desired the number of bits required
   *
   * @return the requested number of octets from this network address.
   */
  public static short[] getOctets(final int num_bits_desired) {
    short[] retval = new short[IpAddress.IP4_OCTETS];

    if (num_bits_desired > 32) {
      retval = new short[IpAddress.IP6_OCTETS];
    }

    if (num_bits_desired > 0) {
      final int extra_bits = num_bits_desired % 8;
      final int fullBytes = num_bits_desired / 8;

      // For each full octet, create a short value of 255
      for (int i = 0; i < fullBytes; ++i) {
        retval[i] = 255;
      }

      // If we have extra bits to place
      if (extra_bits != 0) {
        retval[fullBytes] = IpNetwork.BITS[extra_bits];
      }

      // populate the rest of the short elements
      for (int i = fullBytes + 1; i < retval.length; ++i) {
        retval[i] = 0;
      }

    } else {
      // populate the short elements with all zeros
      for (int i = 0; i < retval.length; ++i) {
        retval[i] = 0;
      }
    }

    return retval;
  }

  /**
   * Creates a new instance of IpNetwork
   *
   * @param net the network address like: 192.168.0.0
   * @param mask the mask address like: 255.255.0.0
   */
  public IpNetwork(final IpAddress net, final IpAddress mask) {
    super(net);
    netmask = (IpAddress)mask.clone();
    ipAddressIterator = new IpNetworkElementIterator(net, netmask, this);
  }

  /**
   * Creates a new instance of IpNetwork using Class-less Inter-Domain Routing
   * (CIDR) notation.
   *
   *
A CIDR address includes the standard 32-bit IP address and also
   * information on how many bits are used for the network prefix. For example,
   * in the CIDR address 206.13.01.48/25, the "/25" indicates the first 25 bits
   * are used to identify the unique network leaving the remaining bits to
   * identify the specific host.

   *
   * @param prefix CIDR notation of the network block
   *
   * @throws IpAddressException if the prefix contains invalid numbers for an address
   */
  public IpNetwork(final String prefix) throws IpAddressException {
    // Look for the '/' delimiting the bitmask count
    final int mark = prefix.indexOf('/');

    if (mark > 0) {
      try {
        netmask = new IpAddress(IpNetwork.getOctets(Integer.parseInt(prefix.substring(mark + 1))));
        final IpAddress ipAddress = new IpAddress(prefix.substring(0, mark));
        octets = ipAddress.getOctets();
        ipAddressIterator = new IpNetworkElementIterator(ipAddress, netmask, this);
      } catch (final Exception ex) {
        throw new IpAddressException("Invalid network block");
      }
    } else {
      throw new IpAddressException("Could not find bitmask count");
    }
  }

  /**
   * Creates a new instance of IpNetwork
   *
   * @param net String representing a network address like: 192.168.0.0
   * @param mask String representing a mask address like: 255.255.0.0
   *
   * @throws IpAddressException if the network address is invalid
   */
  public IpNetwork(final String net, final String mask) throws IpAddressException {
    super(net);

    netmask = new IpAddress(mask);
    ipAddressIterator = new IpNetworkElementIterator(this, netmask, this);
  }

  /**
   * Checks to see of the given IpAddress is within this network.
   *
   * @param addr the address to check
   *
   * @return true if the address is in this subnet, false otherwise
   */
  public boolean contains(final InetAddress addr) {
    try {
      return contains(new IpAddress(addr));
    } catch (final Exception e) {
      return false;
    }
  }

  /**
   * Checks to see of the given IpAddress is within this network.
   *
   * @param addr the address to check
   *
   * @return true if the address is in this subnet, false otherwise
   */
  public boolean contains(final IpAddress addr) {
    boolean retval = false;

    if ((addr != null) || (netmask != null)) {
      final IpAddress ip = new IpAddress(addr);
      ip.applyNetMask(netmask);

      retval = ip.equals(this.applyNetMask(netmask));
    }

    return retval;

  }

  /**
   * Checks to see of the given IpAddress is within this network.
   *
   * @param addr the address to check
   *
   * @return true if the address is in this subnet, false otherwise
   */
  public boolean contains(final String addr) {
    try {
      return contains(new IpAddress(addr));
    } catch (final Exception e) {
      return false;
    }
  }

  public int determineNumberofOctetsToCareAbout() {
    final short[] mask = netMaskInverse().getOctets();
    int i = mask.length - 1;
    int num = 0;
    for (i = mask.length - 1; i >= 0; i--) {
      // System.out.println("Octet " + i + " is " + mask[i]);
      if (mask[i] > 0) {
        num++;
      }
    }
    return num;
  }

  /**
   * Test equivalence of the given object with this network address
   */
  @Override
  public boolean equals(final Object obj) {
    if ((obj != null) && (obj instanceof IpNetwork)) {
      return super.equals((IpAddress)obj);
    }
    return false;
  }

  /**
   * Given the current address, get the broadcast address for the specified
   * netmask.
   *
   * @return an IpAddress representing the broadcast address for this network
   */
  public IpAddress getBroadcastAddress() {
    final IpAddress temporaryNetmask = (IpAddress)netmask.clone();
    final short[] mask = temporaryNetmask.getOctets();
    final short[] result = new short[octets.length];

    for (int i = 0; i < mask.length; i++) {
      result[i] = octets[i];
      result[i] &= mask[i];

      mask[i] = (byte)(~mask[i] & 0xffff);
      result[i] |= mask[i];

      if (result[i] < 0) {
        result[i] = (short)(256 - ((byte)(result[i]) * -1));
      }
    }

    IpAddress retval = null;

    try {
      retval = new IpAddress(result);
    } catch (final Exception e) {
      // should always work since we have checked source data previously
    }

    return retval;
  }

  public Iterator<IpAddress> iterator() {
    return ipAddressIterator;
  }

  public IpAddress netMaskInverse() {
    final IpAddress temporaryNetmask = (IpAddress)netmask.clone();
    final short[] mask = temporaryNetmask.getOctets();
    final short[] result = new short[octets.length];
    for (int i = 0; i < mask.length; i++) {
      result[i] = octets[i];
      result[i] &= mask[i];

      mask[i] = (byte)(~mask[i] & 0xffff);
      // System.out.println("mask " + i + "  " + mask[i]);
      result[i] = mask[i];

      if (result[i] < 0) {
        result[i] = (short)(256 - ((byte)(result[i]) * -1));
      }

    }

    final IpAddress retval = new IpAddress(result);

    return retval;
  }

  /**
   * @return The string representation of the network in CIDR format.
   */
  @Override
  public String toString() {
    final StringBuffer buf = new StringBuffer();

    // Figure out the number of bits set in the mask
    final short[] mask = netmask.getOctets();
    int bitcount = 0;

    for (final short element : mask) {
      for (int x = 0; x < IpNetwork.BITS.length; x++) {
        if (IpNetwork.BITS[x] == element) {
          bitcount += x;
          break;
        }
      }
    }

    int last;
    if (bitcount <= 8) {
      last = 0;
    } else if (bitcount > 8 && bitcount <= 16) {
      last = 1;
    } else if (bitcount > 16 && bitcount <= 24) {
      last = 2;
    } else {
      last = 3;
    }

    final short[] addr = getOctets();
    for (int i = 0; i <= last; i++) {
      buf.append(addr[i]);
      if (i != last) {
        buf.append('.');
      }
    }

    // Delimit the bitmask size
    buf.append('/');

    // append the number of bits in the mask
    buf.append(bitcount);

    // Return the CIDR block format
    return buf.toString();
  }

  private class IpNetworkElementIterator implements Iterator<IpAddress> {
    IpAddress broadcastAddress;
    long finalIpAddress = 0;
    boolean hasNextFlag = false;
    IpAddress ipAddress = null;
    IpAddress netMask = null;
    long startIpAddress = 0;
    long testIpAddress = 0;

    private IpNetworkElementIterator(final IpAddress address, final IpAddress mask, final IpNetwork network) {
      //begins with the subnet IpAddress to figure out where the hosts start
      broadcastAddress = network.getBroadcastAddress();
      netMask = ((IpAddress)mask.clone());
      ipAddress = ((IpAddress)address.clone()).applyNetMask(netMask);
      startIpAddress = IpAddressToDouble(ipAddress);
      finalIpAddress = IpAddressToDouble(broadcastAddress);
    }

    @Override
    public boolean hasNext() {
      testIpAddress = startIpAddress + 1;
      if (testIpAddress < finalIpAddress) {
        hasNextFlag = true;
        return true;
      } else {
        return false;
      }
    }

    @Override
    public IpAddress next() throws NoSuchElementException {
      if (hasNextFlag) {
        ipAddress = doubleToIpAddress(testIpAddress, getOctets().length);
        startIpAddress = testIpAddress;
      } else {
        throw new NoSuchElementException();
      }

      return ipAddress;
    }

    @Override
    public void remove() {
      //Since this item is not really a collection but a
      //a mechanism for calculating the next element the remove
      //does nothing.
    }

    private final IpAddress doubleToIpAddress(final long value, final int length) {
      final short[] retval = new short[8];
      retval[0] = (short)((value >> 56) & 0x00FF);
      retval[1] = (short)((value >>> 48) & 0x00FF);
      retval[2] = (short)((value >>> 40) & 0x00FF);
      retval[3] = (short)((value >>> 32) & 0x00FF);
      retval[4] = (short)((value >>> 24) & 0x00FF);
      retval[5] = (short)((value >>> 16) & 0x00FF);
      retval[6] = (short)((value >>> 8) & 0x00FF);
      retval[7] = (short)((value >>> 0) & 0x00FF);

      final short[] ipArray = new short[length];

      System.arraycopy(retval, retval.length - length, ipArray, 0, length);
      final IpAddress address = new IpAddress(ipArray);

      return address;
    }

    private final long IpAddressToDouble(final IpAddress address) {
      final short addressOctets[] = address.getOctets();
      long value = 0;
      final int addressLength = addressOctets.length;
      final int lastElementNum = addressLength - 1;
      for (int i = addressLength - 1; i >= 0; i--) {
        //System.out.println("Multiplier " + (Math.round( Math.pow( 256,lastElementNum-i))));
        value = value + (addressOctets[i] * (Math.round(Math.pow(256, lastElementNum - i))));
        //System.out.println("Byte " + i + " value: " + value);
      }

      return value;
    }

  }

}


text:
// Copyright (c) 2012 Ecma International.  All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
es5id: 15.4.4.20-5-2
description: Array.prototype.filter - thisArg is Object
---*/

  var res = false;
  var o = new Object();
  o.res = true;
  function callbackfn(val, idx, obj)
  {
    return this.res;
  }

  var srcArr = [1];
  var resArr = srcArr.filter(callbackfn,o);

assert.sameValue(resArr.length, 1, 'resArr.length');


text:
package com.gooddata.sdk.model.gdc;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.gooddata.sdk.common.gdc.GdcError;
import com.gooddata.sdk.common.util.GoodDataToStringBuilder;

import java.util.Collection;
import java.util.Collections;

/**
 * Abstract asynchronous task status.
 * Deserialization only.
 */
@JsonTypeInfo(include = JsonTypeInfo.As.WRAPPER_OBJECT, use = JsonTypeInfo.Id.NAME)
@JsonTypeName("wTaskStatus")
@JsonIgnoreProperties(ignoreUnknown = true)
public class TaskStatus {

    private static final String OK = "OK";
    private static final String RUNNING = "RUNNING";

    private final String status;

    private final String pollUri;

    private final Collection<GdcError> messages;

    @JsonCreator
    private TaskStatus(@JsonProperty("status") String status, @JsonProperty("poll") String pollUri,
                       @JsonProperty("messages") Collection<GdcError> messages) {
        this.status = status;
        this.pollUri = pollUri;
        this.messages = messages;
    }

    public TaskStatus(final String status, final String pollUri) {
        this(status, pollUri, Collections.emptyList());
    }

    public String getStatus() {
        return status;
    }

    public String getPollUri() {
        return pollUri;
    }

    public Collection<GdcError> getMessages() {
        return messages;
    }

    public boolean isSuccess() {
        return OK.equals(status);
    }

    public boolean isRunning() {
        return RUNNING.equals(status);
    }

    @Override
    public String toString() {
        return GoodDataToStringBuilder.defaultToString(this);
    }
}


text:
package org.eigenbase.sql;

/**
 * Enumeration representing different access types
 *
 * @author angel
 * @version $Id$
 * @since Sep 18, 2005
 */
public enum SqlAccessEnum
{
    SELECT, UPDATE, INSERT, DELETE;
}

// End SqlAccessEnum.java


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using Gherkin.Ast;

namespace Gherkin
{
    public abstract class ParserException : Exception
    {
        public Location Location { get; private set; }

        protected ParserException(string message, Location location = null) : base(GetMessage(message, location))
        {
            Location = location;
        }

        private static string GetMessage(string message, Location location)
        {
            if (location == null)
                return message;

            return string.Format("({0}:{1}): {2}", location.Line, location.Column, message);
        }

        protected ParserException(SerializationInfo info, StreamingContext context) : base(info, context)
        {
            Location = (Location)info.GetValue("Location", typeof(Location));
        }

        public override void GetObjectData(SerializationInfo info, StreamingContext context)
        {
            base.GetObjectData(info, context);
            info.AddValue("Location", Location);
        }
    }

    [Serializable]
    public class AstBuilderException : ParserException
    {
        public AstBuilderException(string message, Location location) : base(message, location)
        {
        }

        protected AstBuilderException(SerializationInfo info, StreamingContext context) : base(info, context)
        {
        }
    }

    [Serializable]
    public class NoSuchLanguageException : ParserException
    {
        public NoSuchLanguageException(string language, Location location = null) :
            base("Language not supported: " + language, location)
        {
            if (language == null) throw new ArgumentNullException("language");
        }

        protected NoSuchLanguageException(SerializationInfo info, StreamingContext context) : base(info, context)
        {
        }
    }

    public abstract class TokenParserException : ParserException
    {
        protected TokenParserException(string message, Token receivedToken)
            : base(message, GetLocation(receivedToken))
        {
            if (receivedToken == null) throw new ArgumentNullException("receivedToken");
        }

        private static Location GetLocation(Token receivedToken)
        {
            return receivedToken.IsEOF || receivedToken.Location.Column > 1
                ? receivedToken.Location
                : new Location(receivedToken.Location.Line, receivedToken.Line.Indent + 1);
        }

        protected TokenParserException(SerializationInfo info, StreamingContext context) : base(info, context)
        {
        }
    }

    [Serializable]
    public class UnexpectedTokenException : TokenParserException
    {
        public string StateComment { get; private set; }

        public Token ReceivedToken { get; private set; }
        public string[] ExpectedTokenTypes { get; private set; }

        public UnexpectedTokenException(Token receivedToken, string[] expectedTokenTypes, string stateComment)
            : base(GetMessage(receivedToken, expectedTokenTypes), receivedToken)
        {
            if (receivedToken == null) throw new ArgumentNullException("receivedToken");
            if (expectedTokenTypes == null) throw new ArgumentNullException("expectedTokenTypes");

            ReceivedToken = receivedToken;
            ExpectedTokenTypes = expectedTokenTypes;
            StateComment = stateComment;
        }

        private static string GetMessage(Token receivedToken, string[] expectedTokenTypes)
        {
            return string.Format("expected: {0}, got '{1}'",
                string.Join(", ", expectedTokenTypes),
                receivedToken.GetTokenValue().Trim());
        }

        protected UnexpectedTokenException(SerializationInfo info, StreamingContext context) : base(info, context)
        {
        }
    }

    [Serializable]
    public class UnexpectedEOFException : TokenParserException
    {
        public string StateComment { get; private set; }
        public string[] ExpectedTokenTypes { get; private set; }
        public UnexpectedEOFException(Token receivedToken, string[] expectedTokenTypes, string stateComment)
            : base(GetMessage(expectedTokenTypes), receivedToken)
        {
            if (receivedToken == null) throw new ArgumentNullException("receivedToken");
            if (expectedTokenTypes == null) throw new ArgumentNullException("expectedTokenTypes");

            ExpectedTokenTypes = expectedTokenTypes;
            StateComment = stateComment;
        }

        private static string GetMessage(string[] expectedTokenTypes)
        {
            return string.Format("unexpected end of file, expected: {0}",
                string.Join(", ", expectedTokenTypes));
        }

        protected UnexpectedEOFException(SerializationInfo info, StreamingContext context) : base(info, context)
        {
        }
    }

    [Serializable]
    public class CompositeParserException : ParserException
    {
        public IEnumerable<ParserException> Errors { get; private set; }

        public CompositeParserException(ParserException[] errors)
            : base(GetMessage(errors))
        {
            if (errors == null) throw new ArgumentNullException("errors");

            Errors = errors;
        }

        private static string GetMessage(ParserException[] errors)
        {
            return "Parser errors:" + Environment.NewLine + string.Join(Environment.NewLine, errors.Select(e => e.Message));
        }

        protected CompositeParserException(SerializationInfo info, StreamingContext context) : base(info, context)
        {
            Errors = (ParserException[])info.GetValue("Errors", typeof (ParserException[]));
        }

        public override void GetObjectData(SerializationInfo info, StreamingContext context)
        {
            base.GetObjectData(info, context);
            info.AddValue("Errors", Errors.ToArray());
        }
    }
}


text:
#ifndef TENSORFLOW_CORE_TPU_KERNELS_TPU_RESHARD_VARIABLES_OP_H_
#define TENSORFLOW_CORE_TPU_KERNELS_TPU_RESHARD_VARIABLES_OP_H_

#include <memory>

#include "tensorflow/core/framework/op.h"
#include "tensorflow/core/framework/op_kernel.h"
#include "tensorflow/core/platform/mutex.h"
#include "tensorflow/core/tpu/kernels/tpu_compilation_cache_common.pb.h"

namespace tensorflow {

// Op that changes the sharding state for a set of on-device variables. The
// sharding state is represented as the key of the compilation that generated
// the sharding/unsharding programs along with the main program. The op checks
// if the current sharding state matches the desired one, and if not, uses the
// sharding/unsharding programs to transform the variables to the desired state.
class TPUReshardVariablesOpKernel : public AsyncOpKernel {
 public:
  explicit TPUReshardVariablesOpKernel(OpKernelConstruction* context);
  ~TPUReshardVariablesOpKernel() override;

  void ComputeAsync(OpKernelContext* context, DoneCallback done) override;

 private:
  Status DoWork(OpKernelContext* context);
  Status DoTpuExecute(OpKernelContext* context, const Tensor& format_key,
                      tpu::CompilationCacheFetchTarget fetch_target);

  int64_t num_vars_;
};

}  // namespace tensorflow

#endif  // TENSORFLOW_CORE_TPU_KERNELS_TPU_RESHARD_VARIABLES_OP_H_


text:
require 'spec_helper'

RSpec.describe Uninterruptible::TLSServerFactory do
  include TLSConfiguration

  describe '.new' do
    it 'accepts an Uninterruptible configuration' do
      factory = described_class.new(valid_tls_configuration)
      expect(factory).to be_a(described_class)
    end

    it 'raises an error if the configuration is for a unix server' do
      config = valid_tls_configuration
      config.bind = "unix:///tmp/mysocket.sock"

      expect { described_class.new(config) }.to raise_error(Uninterruptible::ConfigurationError)
    end

    it 'raises an error if the tls_key is not set' do
      config = valid_tls_configuration
      config.tls_key = nil

      expect { described_class.new(config) }.to raise_error(Uninterruptible::ConfigurationError)
    end

    it 'raises an error if the tls_certificate is not set' do
      config = valid_tls_configuration
      config.tls_certificate = nil

      expect { described_class.new(config) }.to raise_error(Uninterruptible::ConfigurationError)
    end
  end

  describe '#wrap_with_tls' do
    let(:factory) { described_class.new(valid_tls_configuration) }
    let(:tcp_server) { TCPServer.new('127.0.0.1', 6626) }

    it 'returns an OpenSSL::SSL::SSLServer' do
      expect(factory.wrap_with_tls(tcp_server)).to be_a(OpenSSL::SSL::SSLServer)
      tcp_server.close
    end
  end
end


text:
                Ocean

                Sky

                Earth

                Storm

                Sprite (lightning)

                Matter

                Fire

                Forest

                Ecosystem

                Visible spectrum

                Alan Watts

                Richard Feynman

                Buckminster Fuller

                M. C. Escher


text:
namespace WebInterface {

    public partial class ViewSwitcher {
    }
}


text: import base from './base.scss';


text:
{% extends "base_statdev.html" %}
{% load crispy_forms_tags %}

{% block page_content_inner %}

    Back to Application

Referral of application {{ application.pk }}

Please provide any required feedback related to this application (in addition to already-proposed conditions):

{% crispy form %}

                        Name
                        Sent date
                        Period (days)
                        Status
                        Details
                        Action

                    {% for refer_obj in application_referrals %}

                        {{ refer_obj.referee }}
                        {{ refer_obj.sent_date|date:"d-M-Y" }}
                        {{ refer_obj.period }}
                        {{ refer_obj.get_status_display }}
                        {{ refer_obj.details }}

                        {% if may_referral_delete == "True" %}
                              Delete
                        {% endif %}

					{% endfor %}

{% endblock %}


text:
'use strict';

// MODULES //

var tape = require( 'tape' );
var gsumkbn = require( './../lib' );

// TESTS //

tape( 'main export is a function', function test( t ) {
	t.ok( true, __filename );
	t.strictEqual( typeof gsumkbn, 'function', 'main export is a function' );
	t.end();
});

tape( 'attached to the main export is a method providing an ndarray interface', function test( t ) {
	t.strictEqual( typeof gsumkbn.ndarray, 'function', 'method is a function' );
	t.end();
});


text:
<?php

require("OAuth.php");

class Netflix {

    protected $consumer;

    function __construct($key, $secret){
        $this->consumer = new OAuthConsumer($key, $secret);
    }

    function request($url, $method, $params = null){
        $sign = new OAuthSignatureMethod_HMAC_SHA1();
        $request = OAuthRequest::from_consumer_and_token($this->consumer, null, $method, $url, $params);
        $request->sign_request($sign, $this->consumer, null);
        $ch = curl_init($request);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
        return curl_exec($ch);
    }

}

?>


text:
package org.headsupdev.support.java;

import java.util.Calendar;
import java.util.Date;

/**
 * TODO Add documentation
 *
 * Created: 10/04/2012
 *
 * @author roberthewitt
 * @since 1.2
 */
public class DateUtil
{

    private static void setDateToZeroHour( Calendar calendar )
    {
        calendar.set( Calendar.HOUR_OF_DAY, 0 );
        calendar.set( Calendar.MINUTE, 0 );
        calendar.set( Calendar.SECOND, 0 );
        calendar.set( Calendar.MILLISECOND, 0 );
    }

    /**
     * Convenience wrapper for assuming the start of the week is monday
     *
     * @param calendar
     * @return a date object set to the start of current week, eg. yyyy-mm-dd 00:00:00 000
     */
    public static Date getStartOfWeekCurrent( Calendar calendar )
    {
        return getStartOfWeekCurrent( calendar, Calendar.MONDAY );
    }

    /**
     * @param calendar
     * @param dayStartOfWeek this is the same constants as Calendar.MONDAY etc
     * @return a date object set to the start of current week, eg. yyyy-mm-dd 00:00:00 000
     */
    public static Date getStartOfWeekCurrent( Calendar calendar, int dayStartOfWeek )
    {
        return getStartOfWeek( calendar, new Date(), dayStartOfWeek );
    }

    /**
     * convenience wrapper assuming the start of the week is monday
     *
     * @param calendar
     * @param date
     * @return a date object set to the start of the week, eg. yyyy-mm-dd 00:00:00 000
     */
    public static Date getStartOfWeek( Calendar calendar, Date date )
    {
        return getStartOfWeek( calendar, date, Calendar.MONDAY );
    }

    /**
     * this will return the start of the week for any date passed in
     *
     * @param calendar
     * @param date
     * @param dayStartOfWeek this is the same constants as Calendar.MONDAY etc
     * @return a date object set to the start of the week, eg. yyyy-mm-dd 00:00:00 000
     */
    public static Date getStartOfWeek( Calendar calendar, Date date, int dayStartOfWeek )
    {
        ensureStateValid( calendar, date );

        calendar.setTime( date );
        setDateToZeroHour( calendar );
        while ( calendar.get( Calendar.DAY_OF_WEEK ) != dayStartOfWeek )
        {
            calendar.add( Calendar.DATE, -1 );
        }
        return calendar.getTime();
    }

    /**
     * convenience wrapper assuming the start of the week is monday
     *
     * @param calendar
     * @return a date object set to the end of current week, eg. yyyy-mm-dd 23:59:59 999
     */
    public static Date getEndOfWeekCurrent( Calendar calendar )
    {
        return getEndOfWeekCurrent( calendar, Calendar.MONDAY );
    }

    /**
     * @param calendar
     * @param dayStartOfWeek this is the same constants as Calendar.MONDAY etc
     * @return a date object set to the end of current week, eg. yyyy-mm-dd 23:59:59 999
     */
    public static Date getEndOfWeekCurrent( Calendar calendar, int dayStartOfWeek )
    {
        return getEndOfWeek( calendar, new Date(), dayStartOfWeek );
    }

    /**
     * convenience wrapper assuming the start of the week is monday
     *
     * @param calendar
     * @param date
     * @return a date object set to the end of the week, eg. yyyy-mm-dd 23:595:59 999
     */
    public static Date getEndOfWeek( Calendar calendar, Date date )
    {
        return getEndOfWeek( calendar, date, Calendar.MONDAY );
    }

    /**
     * @param calendar
     * @param date
     * @param dayStartOfWeek this is the same constants as Calendar.MONDAY etc
     * @return a date object set to the end of the week, eg. yyyy-mm-dd 23:59:59 999
     */
    public static Date getEndOfWeek( Calendar calendar, Date date, int dayStartOfWeek )
    {
        ensureStateValid( calendar, date );
        calendar.setTime( date );
        setDateToZeroHour( calendar );
        do
        {
            calendar.add( Calendar.DATE, 1 );
        }
        while ( calendar.get( Calendar.DAY_OF_WEEK ) != dayStartOfWeek );
        calendar.add( Calendar.MILLISECOND, -1 );
        return calendar.getTime();
    }

    public static Date getStartOfToday( Calendar calendar )
    {
        return getStartOfDate( calendar, new Date() );
    }

    public static Date getEndOfToday( Calendar calendar )
    {
        return getEndOfDate( calendar, new Date() );
    }

    /**
     * Both arguments are required and will throw exception if either are null
     *
     * @param calendar
     * @param date     for which we require the beginning of
     * @return
     */
    public static Date getStartOfDate( Calendar calendar, Date date )
    {
        ensureStateValid( calendar, date );

        calendar.setTime( date );
        setDateToZeroHour( calendar );
        return calendar.getTime();
    }

    /**
     * Both arguments are required and will throw exception if either are null
     *
     * @param calendar
     * @param date
     * @return
     */
    public static Date getEndOfDate( Calendar calendar, Date date )
    {
        getStartOfDate( calendar, date );
        calendar.add( Calendar.DATE, 1 );
        calendar.add( Calendar.MILLISECOND, -1 );
        return calendar.getTime();
    }

    private static void ensureStateValid( Calendar calendar, Date date )
    {
        ensureStateValid( calendar );
        if ( date == null )
        {
            throw new IllegalStateException( "Date object was null, this is required" );
        }
    }

    private static void ensureStateValid( Calendar calendar )
    {
        if ( calendar == null )
        {
            throw new IllegalStateException( "Calendar object was null, this is required" );
        }
    }

}


text:
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="ProjectModuleManager">
    <modules>
<<<<<<< HEAD
      <module fileurl="file://$PROJECT_DIR$/.idea/Bombplan.iml" filepath="$PROJECT_DIR$/.idea/Bombplan.iml" />
=======
      <module fileurl="file://$PROJECT_DIR$/Project/Project.iml" filepath="$PROJECT_DIR$/Project/Project.iml" />
>>>>>>> master
    </modules>
  </component>
</project>


text:
<meta charset="UTF-8">
<title>Commands.commandAliases - KBukkit</title>
<link rel="stylesheet" href="..\..\..\style.css">

KBukkit / com.deanveloper.kbukkit.util / Commands / commandAliases

commandAliases

@JvmStatic val commandAliases: Map<String, Array<String>>

Gets a list of command aliases defined in the server properties.

Return

a map of aliases to command names


text:
{% extends "base.html" %}

{% set title = _('Slow Performing Add-ons') %}
{% set app = APP.pretty %}

{% block title %}{{ page_title(title) }}{% endblock %}

{% block bodyclass %}inverse{% endblock %}

{% block extrahead %}
<link rel="stylesheet" href="{{ MEDIA_URL }}css/zamboni/perf.css">
{% endblock %}

{% block content %}

  {{ breadcrumbs([(None, title)]) }}

{{ title }}

{% if addons %}
  {% set worst = addons[0].ts_slowness %}

{% trans %}
    Add-ons provide many useful features and functions, but they can also cause
    {{ app }} to become slower. Some add-ons can even slow {{ app }} to a crawl
    and make it difficult to use for regular web browsing. If you think add-ons
    might be the reason {{ app }} is lethargic, check the list below for some
    of the biggest bottlenecks. And remember, for best performance you should
    disable add-ons that you no longer use regularly.
  {% endtrans %}

{{ _('Add-ons with Slow Start-up') }}

{% trans %}
    The following add-ons have a significant impact on how long it takes {{ app }} to start up.
  {% endtrans %}

  {% if show_os %}

      {# L10n: Show All, Windows, Mac, Linux. The other names are inserted after the colon. #}
      {{ _('Show:') }}

        {# No spaces or all is ruined! #}
         {{ _('All') }}{% for p in platforms|sort %}, {{ p }}{% endfor %}

  {% endif %}

            {{ _('Rank') }}
            {{ _('Add-on') }}

              {{ _('Impact') }}
              {{ _('Longer lines are slower') }}

          {% for addon in addons %}

            #{{ loop.index }}

              {% if loop.index < 11 %}

                    {{
                      addon.name.localized_string }}

                      {{ _('by') }} {{ users_list(addon.listed_authors) }}

              {% else %}

                  {{ addon.name }}

              {% endif %}

            {% with num = addon.ts_slowness %}

                  {# L10n: {0} is an add-on's percentage of slowness #}
                  {{ _('{0}% slower')|f(num|int)|safe }}

            {% endwith %}

          {% endfor %}

      {% if addons|length > 10 %}

{{ _('Show more add-ons') }}

      {% endif %}

{% else %}

{{ _('No results found.') }}

{% endif %}

{{ _('For Add-on Developers') }}

{% trans %}
    Don't let poor performance affect the experience of your users.  Here are a
    few tips on how to keep your add-ons responsive and nimble.
    {% endtrans %}

      {{ _('Learn more about performance') }}

{% endblock %}


text:
using OpenTK.Graphics.OpenGL;
namespace OpenRGSS.Runtime.RGSS
{
    public class Sprite : Entity
    {
        private Viewport _viewport;
        public Viewport viewport
        {
            get { return _viewport; }
        }

        public Bitmap _bitmap;
        public Bitmap bitmap
        {
            get
            {
                return this._bitmap;
            }
            set
            {
                this._bitmap = value;
                this.src_rect.set(0, 0, this._bitmap.width, this._bitmap.height);
            }
        }

        public Rect src_rect = new Rect(0, 0, 640, 480);
        public bool visible;
        public int x;
        public int y;
        public int z;
        public int ox;
        public int oy;
        public double zoom_x;
        public double zoom_y;
        public int angle;
        public bool mirror;
        public int bush_depth;
        public int opacity;
        public int blend_type;
        public Color color;
        public Tone tone;

        public Sprite() : this(null)
        {
        }

        public Sprite(Viewport viewport = null)
        {
            if (viewport == null)
            {
                viewport = new Viewport();
            }

            this._viewport = viewport;

            this.viewport.AddEntity(this);
        }

        public void dispose()
        {
            if(this.bitmap != null) this.bitmap.dispose();
            this.viewport.RemoveEntity(this);
        }

        public bool disposedQM()
        {
            return false;
        }

        public void flash(Color color, int duration)
        {
        }

        public void update()
        {
            //System.Console.WriteLine("Sprite Update");
        }

        public void Draw()
        {
            if (this.bitmap == null) return;
            GL.BindTexture(TextureTarget.Texture2D, this.bitmap.TextureId);
            GL.Begin(PrimitiveType.Quads);

            double src_x = this.src_rect.x * 1.0 / this.bitmap.width;
            double src_y = this.src_rect.y * 1.0 / this.bitmap.height;
            double src_w = (this.src_rect.x + this.src_rect.width) * 1.0 / this.bitmap.width;
            double src_h = (this.src_rect.y + this.src_rect.height) * 1.0 / this.bitmap.height;

            int dx = this.x - this.ox;
            int dy = this.y - this.oy;

            GL.TexCoord2(src_x, src_y); GL.Vertex3(dx, dy, this.z);
            GL.TexCoord2(src_x, src_h); GL.Vertex3(dx, dy + this.src_rect.height, this.z);
            GL.TexCoord2(src_w, src_h); GL.Vertex3(dx + this.src_rect.width, dy + this.src_rect.height, this.z);
            GL.TexCoord2(src_w, src_y); GL.Vertex3(dx + this.src_rect.width, dy, this.z);
            GL.End();
        }
    }
}


text:
var profile = require('../../../lib/util/profile');

exports.getMockedProfile = function () {
  var newProfile = new profile.Profile();

  newProfile.addSubscription(new profile.Subscription({
    id: '6e0b24a6-2bef-4598-9bd3-f87e9700e24c',
    name: 'Windows Azure Internal Consumption',
    user: {
      name: 'user@domain.example',
      type: 'user'
    },
    tenantId: '72f988bf-86f1-41af-91ab-2d7cd011db47',
    state: 'Enabled',
    registeredProviders: [],
    _eventsCount: '1',
    isDefault: true
  }, newProfile.environments['AzureCloud']));

  return newProfile;
};

exports.setEnvironment = function() {
  process.env['AZURE_ARM_TEST_LOCATION'] = 'westus';
};

exports.scopes = [];

exports.randomTestIdsGenerated = function() { return ['armclibatch1951','armclibatch7370','armclibatchgroup8055'];};


text:
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="ProjectModuleManager">
    <modules>
      <module fileurl="file://$PROJECT_DIR$/.idea/shorten-sql.iml" filepath="$PROJECT_DIR$/.idea/shorten-sql.iml" />
    </modules>
  </component>
</project>


text:
cask 'font-monoid-small-1' do
  version :latest
  sha256 :no_check

  # github.com/larsenwork/monoid was verified as official when first introduced to the cask
  url 'https://github.com/larsenwork/monoid/blob/release/Monoid-Small-1.zip?raw=true'
  name 'Monoid-Small-1'
  homepage 'http://larsenwork.com/monoid/'

  font 'Monoid-Bold-Small-1.ttf'
  font 'Monoid-Italic-Small-1.ttf'
  font 'Monoid-Regular-Small-1.ttf'
  font 'Monoid-Retina-Small-1.ttf'

  caveats <<~EOS
    #{token} is dual licensed with MIT and OFL licenses.
    https://github.com/larsenwork/monoid/tree/master#license
  EOS
end


text:
using System;
using System.Threading;
using Nancy.Hosting.Self;

namespace FP.Spartakiade2017.Docker.RaspberryPi
{
    class Program
    {
        static void Main(string[] args)
        {
            try
            {
                using (var host = new NancyHost(new Uri("http://localhost:7777")))
                {
                    host.Start();
                    Console.WriteLine("Starting WebApp on Url http://localhost:7777");
                    while (Console.ReadLine() != "quit") { Thread.Sleep(Int32.MaxValue); }
                }

            }
            catch (Exception ex)
            {
                Console.WriteLine(ex);
            }
        }

    }
}


text:
<?php

/**
 * This code was generated by
 * \ / _    _  _|   _  _
 * | (_)\/(_)(_|\/| |(/_  v1.0.0
 * /       /
 */

namespace Twilio\Tests\Integration\Chat\V2\Service\User;

use Twilio\Exceptions\DeserializeException;
use Twilio\Exceptions\TwilioException;
use Twilio\Http\Response;
use Twilio\Tests\HolodeckTestCase;
use Twilio\Tests\Request;

class UserBindingTest extends HolodeckTestCase {
    public function testReadRequest(): void {
        $this->holodeck->mock(new Response(500, ''));

        try {
            $this->twilio->chat->v2->services("ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
                                   ->users("USXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
                                   ->userBindings->read();
        } catch (DeserializeException $e) {}
          catch (TwilioException $e) {}

        $this->assertRequest(new Request(
            'get',
            'https://chat.twilio.com/v2/Services/ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Users/USXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Bindings'
        ));
    }

    public function testReadFullResponse(): void {
        $this->holodeck->mock(new Response(
            200,
            '
            {
                "meta": {
                    "page": 0,
                    "page_size": 50,
                    "first_page_url": "https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Users/USaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Bindings?PageSize=50&Page=0",
                    "previous_page_url": null,
                    "url": "https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Users/USaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Bindings?PageSize=50&Page=0",
                    "next_page_url": null,
                    "key": "bindings"
                },
                "bindings": [
                    {
                        "sid": "BSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
                        "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
                        "service_sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
                        "date_created": "2016-10-21T11:37:03Z",
                        "date_updated": "2016-10-21T11:37:03Z",
                        "endpoint": "TestUser-endpoint",
                        "identity": "TestUser",
                        "user_sid": "USaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
                        "binding_type": "gcm",
                        "credential_sid": "CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
                        "message_types": [
                            "removed_from_channel",
                            "new_message",
                            "added_to_channel",
                            "invited_to_channel"
                        ],
                        "url": "https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Users/USaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Bindings/BSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
                    }
                ]
            }
            '
        ));

        $actual = $this->twilio->chat->v2->services("ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
                                         ->users("USXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
                                         ->userBindings->read();

        $this->assertGreaterThan(0, \count($actual));
    }

    public function testReadEmptyResponse(): void {
        $this->holodeck->mock(new Response(
            200,
            '
            {
                "meta": {
                    "page": 0,
                    "page_size": 50,
                    "first_page_url": "https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Users/USaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Bindings?PageSize=50&Page=0",
                    "previous_page_url": null,
                    "url": "https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Users/USaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Bindings?PageSize=50&Page=0",
                    "next_page_url": null,
                    "key": "bindings"
                },
                "bindings": []
            }
            '
        ));

        $actual = $this->twilio->chat->v2->services("ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
                                         ->users("USXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
                                         ->userBindings->read();

        $this->assertNotNull($actual);
    }

    public function testFetchRequest(): void {
        $this->holodeck->mock(new Response(500, ''));

        try {
            $this->twilio->chat->v2->services("ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
                                   ->users("USXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
                                   ->userBindings("BSXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")->fetch();
        } catch (DeserializeException $e) {}
          catch (TwilioException $e) {}

        $this->assertRequest(new Request(
            'get',
            'https://chat.twilio.com/v2/Services/ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Users/USXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Bindings/BSXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
        ));
    }

    public function testFetchResponse(): void {
        $this->holodeck->mock(new Response(
            200,
            '
            {
                "sid": "BSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
                "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
                "service_sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
                "date_created": "2016-10-21T11:37:03Z",
                "date_updated": "2016-10-21T11:37:03Z",
                "endpoint": "TestUser-endpoint",
                "identity": "TestUser",
                "user_sid": "USaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
                "binding_type": "gcm",
                "credential_sid": "CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
                "message_types": [
                    "removed_from_channel",
                    "new_message",
                    "added_to_channel",
                    "invited_to_channel"
                ],
                "url": "https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Users/USaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Bindings/BSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
            }
            '
        ));

        $actual = $this->twilio->chat->v2->services("ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
                                         ->users("USXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
                                         ->userBindings("BSXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")->fetch();

        $this->assertNotNull($actual);
    }

    public function testDeleteRequest(): void {
        $this->holodeck->mock(new Response(500, ''));

        try {
            $this->twilio->chat->v2->services("ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
                                   ->users("USXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
                                   ->userBindings("BSXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")->delete();
        } catch (DeserializeException $e) {}
          catch (TwilioException $e) {}

        $this->assertRequest(new Request(
            'delete',
            'https://chat.twilio.com/v2/Services/ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Users/USXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Bindings/BSXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
        ));
    }

    public function testDeleteResponse(): void {
        $this->holodeck->mock(new Response(
            204,
            null
        ));

        $actual = $this->twilio->chat->v2->services("ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
                                         ->users("USXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
                                         ->userBindings("BSXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")->delete();

        $this->assertTrue($actual);
    }
}


text:
package org.assertj.core.api.iterable;

import static org.assertj.core.api.Assertions.assertThatNullPointerException;
import static org.assertj.core.internal.ErrorMessages.nullSubsequence;
import static org.assertj.core.util.Arrays.array;
import static org.assertj.core.util.Sets.newLinkedHashSet;
import static org.mockito.Mockito.verify;

import java.util.List;

import org.assertj.core.api.AbstractIterableAssert;
import org.assertj.core.api.ConcreteIterableAssert;
import org.assertj.core.api.IterableAssertBaseTest;
import org.junit.jupiter.api.Test;

/**
 * Tests for <code>{@link AbstractIterableAssert#doesNotContainSubsequence(List)}</code>.
 *
 * @author Chris Arnott
 */
public class IterableAssert_doesNotContainSubsequence_List_Test extends IterableAssertBaseTest {

  @Override
  protected ConcreteIterableAssert<Object> invoke_api_method() {
    // IterableAssertBaseTest is testing Iterable<Object>, so the List type needs to be Object
    // or the {@link AbstractIterableAssert#doesNotContainSubsequence(Object...)} method is called.
    return assertions.doesNotContainSubsequence(newLinkedHashSet((Object) "Luke", "Leia"));
  }

  @Override
  protected void verify_internal_effects() {
	  verify(iterables).assertDoesNotContainSubsequence(getInfo(assertions), getActual(assertions), array("Luke", "Leia"));
  }

  @Test
  public void should_throw_error_if_subsequence_is_null() {
    assertThatNullPointerException().isThrownBy(() -> {
      List<Object> nullList = null;
      assertions.doesNotContainSubsequence(nullList);
    }).withMessage(nullSubsequence());
  }
}


text:
Let's Chat

        <form id="form-contact" action="https://formspree.io/{{ .Site.Params.email }}" method="POST">

<input type="text" name="name" placeholder="Name" required>

<input type="email" name="email" placeholder="Email" required>

<input type="text" name="_subject" placeholder="Subject" required>

<textarea name="message" placeholder="Message" required></textarea>

                <input type="text" name="_gotcha" style="display:none">
                <input type="hidden" name="_next" value="/">

<input type="submit" value="Send">

Thanks for your email!

        </form>