text:
<?php

namespace BroGlog\BlogBundle\Menu;

use Knp\Menu\FactoryInterface;
use Knp\Menu\ItemInterface;
use Symfony\Component\DependencyInjection\ContainerAware;

class PostMenuBuilder extends ContainerAware
{

    public function build(FactoryInterface $factory, array $options)
    {
        //todo
        $postPerms = $this->container->get('broglog_blog.post_permissions');
        $post = array_key_exists('post', $options) ? $options['post'] : null;
        $menus = array();
        if($postPerms->canCreate())
        {
            $menus[] = $factory->createItem('New post', array
            (
                'route' => 'bro_glog_blog_new'
            ));
        }
        if(($post != null) && ($postPerms->canEdit($post)))
        {
            $menus[] = $factory->createItem('Edit post', array
            (
                'route' => 'bro_glog_blog_edit',
                'routeParameters' => array('id' => $post->getId()),
            ));
        }
        if(($post != null) && ($postPerms->canDelete($post)))
        {
            $menus[] = $factory->createItem('Delete post', array
            (
                'route' => 'bro_glog_blog_delete',
                'routeParameters' => array('id' => $post->getId()),
            ));
        }
        return $menus;
    }
}


text:
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
am__make_running_with_option = \
  case $${target_option-} in \
      ?) ;; \
      *) echo "am__make_running_with_option: internal error: invalid" \
              "target option '$${target_option-}' specified" >&2; \
         exit 1;; \
  esac; \
  has_opt=no; \
  sane_makeflags=$$MAKEFLAGS; \
  if $(am__is_gnu_make); then \
    sane_makeflags=$$MFLAGS; \
  else \
    case $$MAKEFLAGS in \
      *\\[\ \	]*) \
        bs=\\; \
        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
    esac; \
  fi; \
  skip_next=no; \
  strip_trailopt () \
  { \
    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
  }; \
  for flg in $$sane_makeflags; do \
    test $$skip_next = yes && { skip_next=no; continue; }; \
    case $$flg in \
      *=*|--*) continue;; \
        -*I) strip_trailopt 'I'; skip_next=yes;; \
      -*I?*) strip_trailopt 'I';; \
        -*O) strip_trailopt 'O'; skip_next=yes;; \
      -*O?*) strip_trailopt 'O';; \
        -*l) strip_trailopt 'l'; skip_next=yes;; \
      -*l?*) strip_trailopt 'l';; \
      -[dEDm]) skip_next=yes;; \
      -[JT]) skip_next=yes;; \
    esac; \
    case $$flg in \
      *$$target_option*) has_opt=yes; break;; \
    esac; \
  done; \
  test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/libva
pkgincludedir = $(includedir)/libva
pkglibdir = $(libdir)/libva
pkglibexecdir = $(libexecdir)/libva
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = i686-pc-linux-gnu
host_triplet = i686-pc-linux-gnu
subdir = debian.upstream
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
	$(srcdir)/changelog.in $(srcdir)/control.in \
	$(srcdir)/libva.install.in $(srcdir)/libva-drm.install.in \
	$(srcdir)/libva-egl.install.in $(srcdir)/libva-glx.install.in \
	$(srcdir)/libva-wayland.install.in \
	$(srcdir)/libva-x11.install.in $(dist_noinst_DATA)
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
	$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES = changelog control
CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_$(V))
am__v_P_ = $(am__v_P_$(AM_DEFAULT_VERBOSITY))
am__v_P_0 = false
am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_$(V))
am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
am__v_GEN_0 = @echo "  GEN     " $@;
am__v_GEN_1 =
AM_V_at = $(am__v_at_$(V))
am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
am__v_at_0 = @
am__v_at_1 =
SOURCES =
DIST_SOURCES =
am__can_run_installinfo = \
  case $$AM_UPDATE_INFO_DIR in \
    n|no|NO) false;; \
    *) (install-info --version) >/dev/null 2>&1;; \
  esac
DATA = $(dist_noinst_DATA)
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = ${SHELL} /usr/src/libva/libva/missing aclocal-1.13
AMTAR = $${TAR-tar}
AM_DEFAULT_VERBOSITY = 0
AR = ar
AUTOCONF = ${SHELL} /usr/src/libva/libva/missing autoconf
AUTOHEADER = ${SHELL} /usr/src/libva/libva/missing autoheader
AUTOMAKE = ${SHELL} /usr/src/libva/libva/missing automake-1.13
AWK = gawk
CC = gcc
CCDEPMODE = depmode=gcc3
CFLAGS = -g -O2
CPP = gcc -E
CPPFLAGS =
CXX = g++
CXXCPP = g++ -E
CXXDEPMODE = depmode=gcc3
CXXFLAGS = -g -O2
CYGPATH_W = echo
DEFS = -DHAVE_CONFIG_H
DEPDIR = .deps
DLLTOOL = false
DOXYGEN =
DRM_CFLAGS = -I/usr/include/libdrm
DRM_LIBS = -ldrm
DSYMUTIL =
DUMPBIN =
ECHO_C =
ECHO_N = -n
ECHO_T =
EGL_CFLAGS = -I/usr/X11R7/include -I/usr/include/libdrm
EGL_LIBS = -lEGL
EGREP = /usr/bin/grep -E
EXEEXT =
FGREP = /usr/bin/grep -F
GLX_CFLAGS = -I/usr/X11R7/include -I/usr/include/libdrm
GLX_LIBS = -L/usr/X11R7/lib -lGL -lX11
GREP = /usr/bin/grep
INSTALL = /usr/bin/ginstall -c
INSTALL_DATA = ${INSTALL} -m 644
INSTALL_PROGRAM = ${INSTALL}
INSTALL_SCRIPT = ${INSTALL}
INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
LD = /usr/i686-linux-gnu/bin/ld
LDFLAGS =
LIBDRM_VERSION = 2.4
LIBOBJS =
LIBS =
LIBTOOL = $(SHELL) $(top_builddir)/libtool
LIBVA_DRIVERS_PATH = ${exec_prefix}/lib/dri
LIBVA_LT_LDFLAGS = -version-info 3301:0:3300
LIBVA_LT_VERSION = 3301:0:3300
LIBVA_MAJOR_VERSION = 1
LIBVA_MICRO_VERSION = 1
LIBVA_MINOR_VERSION = 1
LIBVA_VERSION = 1.1.1
LIPO =
LN_S = ln -s
LTLIBOBJS =
MAKEINFO = ${SHELL} /usr/src/libva/libva/missing makeinfo
MANIFEST_TOOL = :
MKDIR_P = /usr/bin/mkdir -p
NM = /usr/bin/nm -B
NMEDIT =
OBJDUMP = objdump
OBJEXT = o
OTOOL =
OTOOL64 =
PACKAGE = libva
PACKAGE_BUGREPORT = waldo.bastian@intel.com
PACKAGE_NAME = libva
PACKAGE_STRING = libva 1.1.1
PACKAGE_TARNAME = libva
PACKAGE_URL =
PACKAGE_VERSION = 1.1.1
PATH_SEPARATOR = :
PKG_CONFIG = /usr/bin/pkg-config
PKG_CONFIG_LIBDIR =
PKG_CONFIG_PATH = :/usr/X11R7/lib/pkgconfig/
RANLIB = ranlib
SED = /usr/bin/sed
SET_MAKE =
SHELL = /bin/sh
STRIP = strip
TODAY = Fri, 14 Jun 2013 13:43:02 +0200
VA_API_MAJOR_VERSION = 0
VA_API_MICRO_VERSION = 0
VA_API_MINOR_VERSION = 33
VA_API_VERSION = 0.33.0
VERSION = 1.1.1
WAYLAND_API_VERSION = 1.0.0
WAYLAND_CFLAGS =
WAYLAND_LIBS =
X11_CFLAGS = -I/usr/X11R7/include
X11_LIBS = -L/usr/X11R7/lib -lX11
XEXT_CFLAGS = -I/usr/X11R7/include
XEXT_LIBS = -L/usr/X11R7/lib -lXext
XFIXES_CFLAGS = -I/usr/X11R7/include
XFIXES_LIBS = -L/usr/X11R7/lib -lXfixes
abs_builddir = /usr/src/libva/libva/debian.upstream
abs_srcdir = /usr/src/libva/libva/debian.upstream
abs_top_builddir = /usr/src/libva/libva
abs_top_srcdir = /usr/src/libva/libva
ac_ct_AR = ar
ac_ct_CC = gcc
ac_ct_CXX = g++
ac_ct_DUMPBIN =
am__include = include
am__leading_dot = .
am__quote =
am__tar = $${TAR-tar} chof - "$$tardir"
am__untar = $${TAR-tar} xf -
bindir = ${exec_prefix}/bin
build = i686-pc-linux-gnu
build_alias =
build_cpu = i686
build_os = linux-gnu
build_vendor = pc
builddir = .
datadir = ${datarootdir}
datarootdir = ${prefix}/share
docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
dvidir = ${docdir}
exec_prefix = ${prefix}
host = i686-pc-linux-gnu
host_alias =
host_cpu = i686
host_os = linux-gnu
host_vendor = pc
htmldir = ${docdir}
includedir = ${prefix}/include
infodir = ${datarootdir}/info
install_sh = ${SHELL} /usr/src/libva/libva/install-sh
libdir = ${exec_prefix}/lib
libexecdir = ${exec_prefix}/libexec
localedir = ${datarootdir}/locale
localstatedir = ${prefix}/var
mandir = ${datarootdir}/man
mkdir_p = $(MKDIR_P)
oldincludedir = /usr/include
pdfdir = ${docdir}
pkgconfigdir = ${exec_prefix}/lib/pkgconfig
prefix = /usr/local
program_transform_name = s,x,x,
psdir = ${docdir}
sbindir = ${exec_prefix}/sbin
sharedstatedir = ${prefix}/com
srcdir = .
sysconfdir = ${prefix}/etc
target_alias =
top_build_prefix = ../
top_builddir = ..
top_srcdir = ..
wayland_scanner_rules =
DEBIANFILES = \
	README.Debian					\
	changelog.in					\
	compat						\
	control.in					\
	copyright					\
	libva-dev.install				\
	libva-drm.install.in				\
	libva-egl.install.in				\
	libva-glx.install.in				\
	libva-wayland.install.in			\
	libva-x11.install.in				\
	libva.install.in	 			\
	rules						\
	vainfo.install					\
	$(NULL)

DEBIANGENFILES = \
	changelog					\
	control						\
	libva$(LIBVA_MAJOR_VERSION).install		\
	libva-drm$(LIBVA_MAJOR_VERSION).install		\
	libva-egl$(LIBVA_MAJOR_VERSION).install		\
	libva-glx$(LIBVA_MAJOR_VERSION).install		\
	libva-wayland$(LIBVA_MAJOR_VERSION).install	\
	libva-x11-$(LIBVA_MAJOR_VERSION).install	\
	$(NULL)

EXTRA_DIST = $(DEBIANFILES)
dist_noinst_DATA = $(DEBIANGENFILES)

# Extra clean files so that maintainer-clean removes *everything*
MAINTAINERCLEANFILES = Makefile.in $(DEBIANGENFILES)
all: all-am

.SUFFIXES:
$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
	@for dep in $?; do \
	  case '$(am__configure_deps)' in \
	    *$$dep*) \
	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
	        && { if test -f $@; then exit 0; else break; fi; }; \
	      exit 1;; \
	  esac; \
	done; \
	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu debian.upstream/Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --gnu debian.upstream/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	@case '$?' in \
	  *config.status*) \
	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
	  *) \
	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
	esac;

$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh

$(top_srcdir)/configure:  $(am__configure_deps)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
changelog: $(top_builddir)/config.status $(srcdir)/changelog.in
	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
control: $(top_builddir)/config.status $(srcdir)/control.in
	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@

mostlyclean-libtool:
	-rm -f *.lo

clean-libtool:
	-rm -rf .libs _libs
tags TAGS:

ctags CTAGS:

cscope cscopelist:

distdir: $(DISTFILES)
	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
	list='$(DISTFILES)'; \
	  dist_files=`for file in $$list; do echo $$file; done | \
	  sed -e "s|^$$srcdirstrip/||;t" \
	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
	case $$dist_files in \
	  */*) $(MKDIR_P) `echo "$$dist_files" | \
			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
			   sort -u` ;; \
	esac; \
	for file in $$dist_files; do \
	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
	  if test -d $$d/$$file; then \
	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
	    if test -d "$(distdir)/$$file"; then \
	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
	    fi; \
	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
	    fi; \
	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
	  else \
	    test -f "$(distdir)/$$file" \
	    || cp -p $$d/$$file "$(distdir)/$$file" \
	    || exit 1; \
	  fi; \
	done
check-am: all-am
check: check-am
all-am: Makefile $(DATA)
installdirs:
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am

install-am: all-am
	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am

installcheck: installcheck-am
install-strip:
	if test -z '$(STRIP)'; then \
	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
	      install; \
	else \
	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
	fi
mostlyclean-generic:

clean-generic:

distclean-generic:
	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)

maintainer-clean-generic:
	@echo "This command is intended for maintainers to use"
	@echo "it deletes files that may require special tools to rebuild."
	-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
clean: clean-am

clean-am: clean-generic clean-libtool mostlyclean-am

distclean: distclean-am
	-rm -f Makefile
distclean-am: clean-am distclean-generic

dvi: dvi-am

dvi-am:

html: html-am

html-am:

info: info-am

info-am:

install-data-am:

install-dvi: install-dvi-am

install-dvi-am:

install-exec-am:

install-html: install-html-am

install-html-am:

install-info: install-info-am

install-info-am:

install-man:

install-pdf: install-pdf-am

install-pdf-am:

install-ps: install-ps-am

install-ps-am:

installcheck-am:

maintainer-clean: maintainer-clean-am
	-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic

mostlyclean: mostlyclean-am

mostlyclean-am: mostlyclean-generic mostlyclean-libtool

pdf: pdf-am

pdf-am:

ps: ps-am

ps-am:

uninstall-am:

.MAKE: install-am install-strip

.PHONY: all all-am check check-am clean clean-generic clean-libtool \
	cscopelist-am ctags-am distclean distclean-generic \
	distclean-libtool distdir dvi dvi-am html html-am info info-am \
	install install-am install-data install-data-am install-dvi \
	install-dvi-am install-exec install-exec-am install-html \
	install-html-am install-info install-info-am install-man \
	install-pdf install-pdf-am install-ps install-ps-am \
	install-strip installcheck installcheck-am installdirs \
	maintainer-clean maintainer-clean-generic mostlyclean \
	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
	tags-am uninstall uninstall-am

# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

redpajama_set_name: RedPajamaGithub


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
Syll. fung. (Abellini) 5: 124 (1887)

#### Original name
Agaricus congregabile Britzelm.

### Remarks
null


text:
package org.grickle.jsondtotest.client;

import java.util.Comparator;
import java.util.Set;
import java.util.TreeSet;

import org.grickle.jsondto.client.Pickler;

import com.google.gwt.json.client.JSONArray;
import com.google.gwt.json.client.JSONBoolean;
import com.google.gwt.json.client.JSONNumber;
import com.google.gwt.json.client.JSONObject;
import com.google.gwt.json.client.JSONString;
import com.google.gwt.json.client.JSONValue;
import com.google.gwt.junit.client.GWTTestCase;

/**
 *
 */
public abstract class AbstractGWTTest extends GWTTestCase
{

    /**
     *
     */
    public AbstractGWTTest()
    {
        super();
    }

    @Override
    public String getModuleName()
    {
        return "org.grickle.jsondtotest.jsondtoJUnit";
    }

    /**
     * Test pickle then unpickle.
     *
     * @param <T>
     * @param pickler
     * @param value
     */
    public <T> void runPUTest(Pickler<T> pickler, T value)
    {
        Comparator<T> cmp = new Comparator<T>(){
            @Override
            public int compare(T a, T b)
            {
                if ( a == null && b == null )
                    return 0;
                if ( a != null && a.equals(b) )
                    return 0;
                return 1;
            }
        };

        runPUTest(pickler, value, cmp);
    }

    /**
     * Test pickle, then unpickle with a comparator.
     *
     * @param <T>
     * @param pickler
     * @param value
     * @param cmp
     */
    <T> void runPUTest(Pickler<T> pickler, T value, Comparator<T> cmp)
    {
        System.out.println("=== Pickling with " + pickler.getClass().getName() + " ===");
        System.out.println(" original: " + value);

        JSONValue pickled = pickler.pickle(value);
        System.out.println(" pickled: " + pickled);

        T unpickled = pickler.unpickle(pickled);
        System.out.println(" unpickled: " + unpickled);

        assertTrue( cmp.compare(value, unpickled) == 0 );
    }

    /**
     * Test unpickle, then pickle
     *
     * @param <T>
     * @param p
     * @param string
     */
    protected <T> void runUPTest(Pickler<T> pickler, JSONValue pickled, JSONValue expectedRepickle)
    {
        System.out.println("=== Unpickling with " + pickler.getClass().getName() + " ===");
        System.out.println(" original json: " + pickled);

        T obj = pickler.unpickle(pickled);
        System.out.println(" unpickled: " + obj);

        JSONValue repickled = pickler.pickle(obj);
        System.out.println(" repickled: " + repickled);
        System.out.println(" expectedRepickle: " + expectedRepickle);

        assertEquals(repickled, expectedRepickle);
    }

    protected void assertEquals(JSONValue expected, JSONValue actual)
    {
        if ( ! isEqual(expected, actual) )
            failNotEquals("JSON Values are not the same", expected, actual);
    }

    protected boolean isEqual(JSONValue expected, JSONValue actual)
    {
        if ( expected.isArray() != null && actual.isArray() != null)
            return isEqual(expected.isArray(), actual.isArray());
        else if ( expected.isBoolean() != null && actual.isBoolean() != null)
            return isEqual(expected.isBoolean(), actual.isBoolean());
        else if ( expected.isNull() != null && actual.isNull() != null )
            return true;
        else if ( expected.isNumber() != null && actual.isNumber() != null )
            return isEqual(expected.isNumber(), actual.isNumber());
        else if ( expected.isObject() != null && actual.isObject() != null )
            return isEqual(expected.isObject(), actual.isObject());
        else if ( expected.isString() != null & actual.isString() != null )
            return isEqual(expected.isString(), actual.isString());
        return false;
    }

    private boolean isEqual(JSONString expected, JSONString actual)
    {
        return expected.stringValue().equals(actual.stringValue());
    }

    private boolean isEqual(JSONNumber expected, JSONNumber actual)
    {
        return expected.doubleValue() == actual.doubleValue();
    }

    private boolean isEqual(JSONBoolean expected, JSONBoolean actual)
    {
        return expected.booleanValue() == actual.booleanValue();
    }

    private boolean isEqual(JSONObject expected, JSONObject actual)
    {
        Set<String> keys = new TreeSet<String>();
        keys.addAll(expected.keySet());
        keys.addAll(actual.keySet());
        for(String k : keys)
        {
            if ( ! expected.containsKey(k) )
                return false;
            if ( ! actual.containsKey(k) )
                return false;
            if ( ! isEqual(expected.get(k), actual.get(k)) )
                return false;
        }
        return true;
    }

    private boolean isEqual(JSONArray expected, JSONArray actual)
    {
        if ( expected.size() != actual.size() )
            return false;
        for(int i=0,max=expected.size(); i<max; ++i)
            if ( ! isEqual(expected.get(i), actual.get(i)) )
                return false;
        return true;
    }

}


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Evo C++ Library v0.5.1: evo/bit_array.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>

<link href="doxygen.css" rel="stylesheet" type="text/css" />

Evo C++ Library v0.5.1

evo

Classes |
Namespaces |
Macros |
Typedefs |
Functions

bit_array.h File Reference

Evo BitArray.
More...

#include "bits.h"

#include "impl/iter.h"

#include "impl/str.h"

Go to the source code of this file.

Classes

class  	BitArraySubsetT< TParent >

 	A subset of a BitArray.  More...

class  	BitArrayT< T, TSize >

 	Dynamic bit array container with similar interface to Array and List.  More...

Namespaces

  	evo

 	Evo C++ Library namespace.

Macros

#define 	INCL_evo_bit_array_h

Typedefs

typedef BitArrayT 	BitArray

 	Default dynamic bit array container – see BitArrayT.  More...

typedef BitArraySubsetT< BitArray > 	BitArraySubset

 	Default subset of a BitArray – see BitArraySubsetT.  More...

Functions

template<class T >

bool 	operator!= (const BitArraySubsetT< BitArrayT< T > > &a, const BitArrayT< T > &b)

 	Inequality operator.  More...

template<class T >

bool 	operator== (const BitArraySubsetT< BitArrayT< T > > &a, const BitArrayT< T > &b)

 	Equality operator.  More...

Detailed Description

Evo BitArray.

Macro Definition Documentation

◆ INCL_evo_bit_array_h

          #define INCL_evo_bit_array_h

<address class="footer">
Generated on Tue May 7 2019 18:17:28 for Evo C++ Library v0.5.1 by

 1.8.13
</address>


text:
require 'spec_helper'

module Sendgrid
  module API
    describe Client do

      subject { described_class.new(user, key) }
      let(:user) { 'some user' }
      let(:key) { 'some key' }

      its(:user) { should == user }
      its(:key) { should == key }

      it { should respond_to(:profile) }
      it { should respond_to(:stats) }
      it { should respond_to(:mail) }
      it { should respond_to(:lists) }
      it { should respond_to(:emails) }
      it { should respond_to(:sender_addresses) }
      it { should respond_to(:categories) }
      it { should respond_to(:marketing_emails) }
      it { should respond_to(:recipients) }
      it { should respond_to(:schedule) }

      its(:profile) { should_not be_nil }
      its(:stats) { should_not be_nil }
      its(:mail) { should_not be_nil }
      its(:lists) { should_not be_nil }
      its(:emails) { should_not be_nil }
      its(:sender_addresses) { should_not be_nil }
      its(:categories) { should_not be_nil }
      its(:marketing_emails) { should_not be_nil }
      its(:recipients) { should_not be_nil }
      its(:schedule) { should_not be_nil }

    end
  end
end


text:
<!doctype html>

      <meta charset="utf-8">
      <meta name="viewport" content="width=device-width,initial-scale=1">
      <meta http-equiv="x-ua-compatible" content="ie=edge">

        <meta name="description" content="Uma introdução à computação científica usando python 2.7">

        <meta name="author" content="Marco André Argenta">

        <meta name="lang:clipboard.copy" content="Copiar para área de transferência">

        <meta name="lang:clipboard.copied" content="Copiado para área de transferência">

        <meta name="lang:search.language" content="pt">

        <meta name="lang:search.pipeline.stopwords" content="True">

        <meta name="lang:search.pipeline.trimmer" content="True">

        <meta name="lang:search.result.none" content="Nenhum resultado encontrado">

        <meta name="lang:search.result.one" content="1 resultado encontrado">

        <meta name="lang:search.result.other" content="# resultados encontrados">

        <meta name="lang:search.tokenizer" content="[\s\-]+">

      <link rel="shortcut icon" href="../../imagens/terminal.ico">
      <meta name="generator" content="mkdocs-1.0.4, mkdocs-material-4.2.0">

        <title>Condicionais - Computação Científica</title>

      <link rel="stylesheet" href="../../assets/stylesheets/application.750b69bd.css">

        <link rel="stylesheet" href="../../assets/stylesheets/application-palette.224b79ff.css">

        <meta name="theme-color" content="#f9a825">

        <link href="https://fonts.gstatic.com" rel="preconnect" crossorigin>
        <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,400i,700|Source+Code+Pro">

    <link rel="stylesheet" href="../../assets/fonts/material-icons.css">

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

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

    <svg class="md-svg">
      <defs>

      </defs>
    </svg>
    <input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off">
    <input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off">

        Ir para o conteúdo

              Computação Científica

              Condicionais

    <form class="md-search__form" name="search">
      <input type="text" class="md-search__input" name="query" placeholder="Buscar" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="query" data-md-state="active">

      <button type="reset" class="md-icon md-search__icon" data-md-component="reset" tabindex="-1">
        
      </button>
    </form>

            Digite para iniciar a busca

    Computação Científica

      Início

      <input class="md-toggle md-nav__toggle" data-md-toggle="nav-2" type="checkbox" id="nav-2">

      Equações

        Equações

      Programando Equações

      Regras de programação

      Sintaxe e erros

      <input class="md-toggle md-nav__toggle" data-md-toggle="nav-3" type="checkbox" id="nav-3" checked>

      Laços e listas

        Laços e listas

      Laços simples

    <input class="md-toggle md-nav__toggle" data-md-toggle="toc" type="checkbox" id="__toc">

        Condicionais

      Condicionais

    Índice

    Expressões condicionais são verdadeiras ou falsas

    Combinando expressões condicionais

      Listas

      Laços avançados

      Listas avançadas

      Tuplas

      <input class="md-toggle md-nav__toggle" data-md-toggle="nav-4" type="checkbox" id="nav-4">

      Funções e ramificações

        Funções e ramificações

      Funções

      Funções lambda

      Ramificações

      Funçoes de teste

      <input class="md-toggle md-nav__toggle" data-md-toggle="nav-5" type="checkbox" id="nav-5">

      Entrada de dados e erros

        Entrada de dados e erros

      Entrada de dados

      Argumentos linha comando

      Função eval

      Função exec

      Interfaces gráficas

      Dados de arquivos

      Erros

      Módulos

      <input class="md-toggle md-nav__toggle" data-md-toggle="nav-6" type="checkbox" id="nav-6">

      Arranjos e gráficos

        Arranjos e gráficos

      Arranjos

      Gráficos

      Aprofundando em arranjos

      <input class="md-toggle md-nav__toggle" data-md-toggle="nav-7" type="checkbox" id="nav-7">

      Dicionários e cadeias de caracteres

        Dicionários e cadeias de caracteres

      Dicionários

      Dados de arquivos

      Cadeia de Caracteres

      Resumo das funcionalidades

      <input class="md-toggle md-nav__toggle" data-md-toggle="nav-8" type="checkbox" id="nav-8">

      Classes

        Classes

      Classes

      Exemplos

      Métodos especiais

      Aplicações

      <input class="md-toggle md-nav__toggle" data-md-toggle="nav-9" type="checkbox" id="nav-9">

      Programação orientada a objeto

        Programação orientada a objeto

      Programação Orientada a Objeto

      Exemplos heranças

      Classes para derivadas

      Classes para integrais

    Índice

    Expressões condicionais são verdadeiras ou falsas

    Combinando expressões condicionais

Condicionais

Expressões condicionais são verdadeiras ou falsas

Uma expressão com valor verdadeiro (true) ou falso (false) é chamada de expressão condicional. Exemplos: $  C=40  $, $  C \neq 40  $, $  C \geq 40  $, $  C>40  $, $  C < 40  $.

1
2
3
4
5

C == 40  ## note o duplo ==, C = 40 é uma atribuição!
C != 40
C >= 40
C >  40
C <  40

Podemos testar expressões condicionais no shell do Python:

1
2
3
4
5
6
7

>>> C = 41
>>> C != 40
True
>>> C < 40
False
>>> C == 41
True

Combinando expressões condicionais

Varias condições podem ser combinadas com e/ou and/or:

1
2
3
4
5

while condição1 and condição2:
    ...

while condição1 or condição2:
    ...

Regra 1: condição1 and condição2 é verdadeira se ambas, condição1 e condição2 forem verdadeiras.

Regra 2: condição1 or condição2 é verdadeira se uma for verdadeira, condição1 ou condição2.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13

>>> x = 0;  y = 1.2
>>> x >= 0 and y < 1
False
>>> x >= 0 or y < 1
True
>>> x > 0 or y > 1
True
>>> x > 0 or not y > 1
False
>>> -1 < x <= 0   ##  -1 < x e x <= 0
True
>>> not (x > 0 or y > 0)
False

                  Anterior

                Laços simples

                  Próximo

                Listas

            Copyright © 2011 Marco André Argenta

        powered by
        MkDocs
        and

          Material for MkDocs


text:
package org.cache2k.test.core;

import org.cache2k.Cache;
import org.cache2k.Cache2kBuilder;
import org.cache2k.CacheManager;
import org.cache2k.testing.category.FastTests;
import org.junit.Test;
import org.junit.experimental.categories.Category;

import java.net.URL;
import java.net.URLClassLoader;

import static org.assertj.core.api.Assertions.assertThat;
import static org.cache2k.Cache2kBuilder.forUnknownTypes;
import static org.cache2k.Cache2kBuilder.of;
import static org.cache2k.CacheManager.*;
import static org.cache2k.test.core.StaticUtil.count;
import static org.cache2k.test.core.StaticUtil.enforceWiredCache;
import static org.junit.Assert.*;

/**
 * Test creation and destruction of cache managers.
 *
 * @author Jens Wilke
 */
@Category(FastTests.class)
public class CacheManagerAndCacheLifeCycleTest {

  @Test(expected = IllegalStateException.class)
  public void setDefaultManagerName_Exception() {
    CacheManager.getInstance();
    CacheManager.setDefaultName("hello");
  }

  @Test
  public void openClose() {
    String uniqueName = this.getClass().getName() + ".openClose";
    CacheManager cm = CacheManager.getInstance(uniqueName);
    cm.close();
    CacheManager cm2 = CacheManager.getInstance(uniqueName);
    assertNotSame(cm, cm2);
    cm2.close();
  }

  @Test
  public void differentClassLoaderDifferentManager() {
    getInstance();
    ClassLoader cl1 = new URLClassLoader(new URL[0], this.getClass().getClassLoader());
    ClassLoader cl2 = new URLClassLoader(new URL[0], this.getClass().getClassLoader());
    CacheManager cm1 = getInstance(cl1);
    CacheManager cm2 = getInstance(cl2);
    assertNotSame(cm1, cm2);
    assertThat(cm1.isClosed()).isFalse();
    assertThat(cm2.isClosed()).isFalse();
    Cache c1 = forUnknownTypes().manager(cm1).build();
    Cache c2 = forUnknownTypes().manager(cm2).build();
    closeAll(cl1);
    closeAll(cl2);
    assertThat(cm1.isClosed()).isTrue();
    assertThat(cm2.isClosed()).isTrue();
    assertThat(c1.isClosed()).isTrue();
    assertThat(c2.isClosed()).isTrue();
  }

  @Test
  public void closeSpecific() {
    CacheManager cm0 = getInstance();
    ClassLoader cl1 = new URLClassLoader(new URL[0], this.getClass().getClassLoader());
    CacheManager cm1 = getInstance(cl1);
    assertThat(cm1.getClassLoader()).isNotEqualTo(cm0.getClassLoader());
    close(cl1, "something");
    assertThat(cm1.isClosed()).isFalse();
    close(cl1, "default");
    assertThat(cm1.isClosed()).isTrue();
  }

  @Test
  public void closesCache() {
    String uniqueName = this.getClass().getName() + ".closesCache";
    CacheManager cm = getInstance(uniqueName);
    Cache c = forUnknownTypes()
      .manager(cm)
      .name("dummy")
      .build();
    assertThat(c.getCacheManager()).isSameAs(cm);
    assertThat(cm.toString().contains(", activeCaches=[dummy]")).isTrue();
    cm.close();
    String s = cm.toString();
    assertThat(s.contains(", closed=true")).isTrue();
    assertThat(s.contains(", objectId=")).isTrue();
    assertThat(s.contains("name='" + uniqueName)).isTrue();
    assertThat(c.isClosed()).isTrue();
  }

  @Test
  public void clearAllCaches() {
    String uniqueName = this.getClass().getName() + ".clearAllCaches";
    CacheManager cm = getInstance(uniqueName);
    Cache c = forUnknownTypes()
      .manager(cm)
      .name("dummy")
      .build();
    c.put("hello", "paul");
    assertThat(c.keys().iterator().hasNext())
      .as("has some data")
      .isTrue();
    c.getCacheManager().clear();
    assertThat(c.keys().iterator().hasNext())
      .as("no data")
      .isFalse();
    cm.close();
  }

  @Test
  public void createCache() {
    String uniqueName = this.getClass().getName() + ".createCache";
    CacheManager cm = getInstance(uniqueName);
    Cache c = cm.createCache(forUnknownTypes().name("dummy").config());
    assertThat(c.getName()).isEqualTo("dummy");
    assertThat(c.getCacheManager()).isSameAs(cm);
    cm.close();
  }

  @Test
  public void getActiveCaches() {
    String uniqueName = this.getClass().getName() + ".getActiveCaches";
    CacheManager cm = getInstance(uniqueName);
    assertThat(cm.getActiveCaches().iterator().hasNext()).isFalse();
    Cache c = forUnknownTypes().manager(cm).build();
    assertThat(cm.getActiveCaches().iterator().hasNext()).isTrue();
    cm.close();
  }

  @Test
  public void onlyOneCacheForWired() {
    String uniqueName = this.getClass().getName() + ".onlyOneCacheForWired";
    CacheManager cm = getInstance(uniqueName);
    Cache2kBuilder b = forUnknownTypes().manager(cm);
    enforceWiredCache(b);
    Cache c = b.build();
    assertThat(count(cm.getActiveCaches()))
      .as("one cache active")
      .isEqualTo(1);
    cm.close();
  }

  @Test
  public void testToStringAnon() {
    Cache<Integer, Integer> c =
      Cache2kBuilder.of(Integer.class, Integer.class)
        .eternal(true)
        .build();
    c.toString();
    c.close();
  }

  @Test
  public void testToString() {
    Cache<Integer, Integer> c =
      of(Integer.class, Integer.class)
        .name("testToString")
        .eternal(true)
        .build();
    assertThat(c.toString()).contains("Cache(name='testToString', size");
    c.close();
    assertThat(c.toString()).contains("Cache(name='testToString', closed=true");
  }

  @Test
  public void testToStringWithManager() {
    String managerName = this.getClass().getSimpleName();
    CacheManager cm = getInstance(managerName);
    Cache<Integer, Integer> c =
      of(Integer.class, Integer.class)
        .manager(cm)
        .name("testToString")
        .eternal(true)
        .build();
    assertThat(c.toString()).contains("Cache(name='testToString', manager='" + managerName + "'");
    c.close();
    cm.close();
    assertThat(c.toString()).contains("Cache(name='testToString', manager='" + managerName + "'");
  }

}


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
Lloydia 8: 270 (1946)

#### Original name
Russula subcarnicolor Murrill

### Remarks
null


text:
using System;
using MediatR;
using SFA.DAS.EmployerAccounts.Models.Account;

namespace SFA.DAS.EmployerAccounts.Commands.PayeRefData
{
    public sealed class SavePayeRefData : IAsyncRequest
    {
        public SavePayeRefData(EmployerAccountPayeRefData payeRefData)
        {
            PayeRefData = payeRefData ?? throw new ArgumentNullException(nameof(payeRefData));
        }

        public EmployerAccountPayeRefData PayeRefData { get;  }
    }
}


text:
import { Component } from '@angular/core';

@Component({
  template: `

Welcome to mathQuiz.com

Please select one of the following

              <input type="radio" name="optradio" id="teacher" routerLink="/teacher" routerLinkActive="active">I am a teacher

            <input type="radio" name="optradio" id="student" routerLink="/student" routerLinkActive="active">I am a student

            <input type="radio" name="optradio" id="parent" routerLink="/parent" routerLinkActive="active">I am a parent

  `
})
export class AppWelcomeComponent {}


text:
#ifndef JUCE_SCOPEDPOINTER_H_INCLUDED
#define JUCE_SCOPEDPOINTER_H_INCLUDED

//==============================================================================
/**
    This class holds a pointer which is automatically deleted when this object goes
    out of scope.

    Once a pointer has been passed to a ScopedPointer, it will make sure that the pointer
    gets deleted when the ScopedPointer is deleted. Using the ScopedPointer on the stack or
    as member variables is a good way to use RAII to avoid accidentally leaking dynamically
    created objects.

    A ScopedPointer can be used in pretty much the same way that you'd use a normal pointer
    to an object. If you use the assignment operator to assign a different object to a
    ScopedPointer, the old one will be automatically deleted.

    Important note: The class is designed to hold a pointer to an object, NOT to an array!
    It calls delete on its payload, not delete[], so do not give it an array to hold! For
    that kind of purpose, you should be using HeapBlock or Array instead.

    A const ScopedPointer is guaranteed not to lose ownership of its object or change the
    object to which it points during its lifetime. This means that making a copy of a const
    ScopedPointer is impossible, as that would involve the new copy taking ownership from the
    old one.

    If you need to get a pointer out of a ScopedPointer without it being deleted, you
    can use the release() method.

    Something to note is the main difference between this class and the std::auto_ptr class,
    which is that ScopedPointer provides a cast-to-object operator, wheras std::auto_ptr
    requires that you always call get() to retrieve the pointer. The advantages of providing
    the cast is that you don't need to call get(), so can use the ScopedPointer in pretty much
    exactly the same way as a raw pointer. The disadvantage is that the compiler is free to
    use the cast in unexpected and sometimes dangerous ways - in particular, it becomes difficult
    to return a ScopedPointer as the result of a function. To avoid this causing errors,
    ScopedPointer contains an overloaded constructor that should cause a syntax error in these
    circumstances, but it does mean that instead of returning a ScopedPointer from a function,
    you'd need to return a raw pointer (or use a std::auto_ptr instead).
*/
template <class ObjectType>
class ScopedPointer
{
public:
    //==============================================================================
    /** Creates a ScopedPointer containing a null pointer. */
    inline ScopedPointer() noexcept   : object (nullptr)
    {
    }

    /** Creates a ScopedPointer that owns the specified object. */
    inline ScopedPointer (ObjectType* const objectToTakePossessionOf) noexcept
        : object (objectToTakePossessionOf)
    {
    }

    /** Creates a ScopedPointer that takes its pointer from another ScopedPointer.

        Because a pointer can only belong to one ScopedPointer, this transfers
        the pointer from the other object to this one, and the other object is reset to
        be a null pointer.
    */
    ScopedPointer (ScopedPointer& objectToTransferFrom) noexcept
        : object (objectToTransferFrom.object)
    {
        objectToTransferFrom.object = nullptr;
    }

    /** Destructor.
        This will delete the object that this ScopedPointer currently refers to.
    */
    inline ~ScopedPointer()                 { ContainerDeletePolicy<ObjectType>::destroy (object); }

    /** Changes this ScopedPointer to point to a new object.

        Because a pointer can only belong to one ScopedPointer, this transfers
        the pointer from the other object to this one, and the other object is reset to
        be a null pointer.

        If this ScopedPointer already points to an object, that object
        will first be deleted.
    */
    ScopedPointer& operator= (ScopedPointer& objectToTransferFrom)
    {
        if (this != objectToTransferFrom.getAddress())
        {
            // Two ScopedPointers should never be able to refer to the same object - if
            // this happens, you must have done something dodgy!
            jassert (object == nullptr || object != objectToTransferFrom.object);

            ObjectType* const oldObject = object;
            object = objectToTransferFrom.object;
            objectToTransferFrom.object = nullptr;
            ContainerDeletePolicy<ObjectType>::destroy (oldObject);
        }

        return *this;
    }

    /** Changes this ScopedPointer to point to a new object.

        If this ScopedPointer already points to an object, that object
        will first be deleted.

        The pointer that you pass in may be a nullptr.
    */
    ScopedPointer& operator= (ObjectType* const newObjectToTakePossessionOf)
    {
        if (object != newObjectToTakePossessionOf)
        {
            ObjectType* const oldObject = object;
            object = newObjectToTakePossessionOf;
            ContainerDeletePolicy<ObjectType>::destroy (oldObject);
        }

        return *this;
    }

   #if JUCE_COMPILER_SUPPORTS_MOVE_SEMANTICS
    ScopedPointer (ScopedPointer&& other) noexcept
        : object (other.object)
    {
        other.object = nullptr;
    }

    ScopedPointer& operator= (ScopedPointer&& other) noexcept
    {
        object = other.object;
        other.object = nullptr;
        return *this;
    }
   #endif

    //==============================================================================
    /** Returns the object that this ScopedPointer refers to. */
    inline operator ObjectType*() const noexcept                                    { return object; }

    /** Returns the object that this ScopedPointer refers to. */
    inline ObjectType* get() const noexcept                                         { return object; }

    /** Returns the object that this ScopedPointer refers to. */
    inline ObjectType& operator*() const noexcept                                   { return *object; }

    /** Lets you access methods and properties of the object that this ScopedPointer refers to. */
    inline ObjectType* operator->() const noexcept                                  { return object; }

    //==============================================================================
    /** Removes the current object from this ScopedPointer without deleting it.
        This will return the current object, and set the ScopedPointer to a null pointer.
    */
    ObjectType* release() noexcept                                                  { ObjectType* const o = object; object = nullptr; return o; }

    //==============================================================================
    /** Swaps this object with that of another ScopedPointer.
        The two objects simply exchange their pointers.
    */
    void swapWith (ScopedPointer <ObjectType>& other) noexcept
    {
        // Two ScopedPointers should never be able to refer to the same object - if
        // this happens, you must have done something dodgy!
        jassert (object != other.object || this == other.getAddress());

        std::swap (object, other.object);
    }

    /** If the pointer is non-null, this will attempt to return a new copy of the object that is pointed to.
        If the pointer is null, this will safely return a nullptr.
    */
    inline ObjectType* createCopy() const                                           { return createCopyIfNotNull (object); }

private:
    //==============================================================================
    ObjectType* object;

    // (Required as an alternative to the overloaded & operator).
    const ScopedPointer* getAddress() const noexcept                                { return this; }

  #if ! JUCE_MSVC  // (MSVC can't deal with multiple copy constructors)
    /* The copy constructors are private to stop people accidentally copying a const ScopedPointer
       (the compiler would let you do so by implicitly casting the source to its raw object pointer).

       A side effect of this is that in a compiler that doesn't support C++11, you may hit an
       error when you write something like this:

          ScopedPointer<MyClass> m = new MyClass();  // Compile error: copy constructor is private.

       Even though the compiler would normally ignore the assignment here, it can't do so when the
       copy constructor is private. It's very easy to fix though - just write it like this:

          ScopedPointer<MyClass> m (new MyClass());  // Compiles OK

       It's probably best to use the latter form when writing your object declarations anyway, as
       this is a better representation of the code that you actually want the compiler to produce.
    */
    JUCE_DECLARE_NON_COPYABLE (ScopedPointer)
  #endif
};

//==============================================================================
/** Compares a ScopedPointer with another pointer.
    This can be handy for checking whether this is a null pointer.
*/
template <class ObjectType>
bool operator== (const ScopedPointer<ObjectType>& pointer1, ObjectType* const pointer2) noexcept
{
    return static_cast <ObjectType*> (pointer1) == pointer2;
}

/** Compares a ScopedPointer with another pointer.
    This can be handy for checking whether this is a null pointer.
*/
template <class ObjectType>
bool operator!= (const ScopedPointer<ObjectType>& pointer1, ObjectType* const pointer2) noexcept
{
    return static_cast <ObjectType*> (pointer1) != pointer2;
}

//==============================================================================
#ifndef DOXYGEN
// NB: This is just here to prevent any silly attempts to call deleteAndZero() on a ScopedPointer.
template <typename Type>
void deleteAndZero (ScopedPointer<Type>&)  { static_jassert (sizeof (Type) == 12345); }
#endif

#endif   // JUCE_SCOPEDPOINTER_H_INCLUDED


text:
<!DOCTYPE html>

  <title></title>
  <link rel="stylesheet" type="text/css" href="css/traffic.css">


text:
package main.java.DTOs;

/**
 * Created by Tatka on 28.11.2016.
 */
public class FilterDTO {
    private String key;
    private String value;

    public FilterDTO() {
    }

    public FilterDTO(String key, String value) {
        this.key = key;
        this.value = value;
    }

    public String getKey() {
        return key;
    }

    public String getValue() {
        return value;
    }
}


text:
from collections import deque

def _get_connected_nodes(graph, node):
    if hasattr(graph, '__call__'):
        return graph(node)
    else:
        return graph[node]

def _is_at_end(end, path):
    if hasattr(end, '__call__'):
        return end(path)
    else:
        return path[-1] == end

def bfs(graph, start, end):
    """Breadth-first search

    inspired by - http://stackoverflow.com/a/16747264/947305

    Args:
        graph: a dict where keys are the node and the value is an list of nodes
               which it connects to
            OR a function which takes in the current node and returns
               connecting nodes as a list
        start: the node to start the search
        end:   the node to end the search
            OR a function which evaluates to true when a condition is met. This
               function takes the current path represented by a list
    Returns:
        the shortest path from start to end as a list of nodes (in order of visit)

    Assumptions:
    - the edges are not weighted
    - the edges are only in the direction speficied in the graph

    >>> bfs({'a':['b'], 'b':['a','c'], 'c':['b']}, 'a', 'c')
    ['a', 'b', 'c']

    >>> def generate_connected_nodes(nod):
    ...     return [nod+1, nod+2]
    ...
    >>> bfs(generate_connected_nodes, 0, 3)
    [0, 1, 3]

    >>> def len_gt_2(path):
    ...     return len(path) > 2
    ...
    >>> bfs({'a':['b'], 'b':['c'], 'c':['d'], 'd':['a']}, 'a', len_gt_2)
    ['a', 'b', 'c']

    >>> bfs({'a':['b'], 'b':['a'], 'c':['b']}, 'a', 'c') is None
    True
    """

    q = deque()
    path = [start]
    q.append(path)
    visited = set([start])

    while not len(q) == 0:
        path = q.popleft()
        last_node = path[-1]
        if _is_at_end(end, path):
            return path
        for node in _get_connected_nodes(graph, last_node):
            if node not in visited:
                visited.add(node)
                q.append(path + [node])
    return None

if __name__ == "__main__":
    import doctest
    doctest.testmod()


text:
package org.edx.indonesiax.test;

import org.edx.indonesiax.base.MainApplication;
import org.edx.indonesiax.logger.Logger;

/**
 * The {@link MainApplication} class is overridden for testing in
 * order to only have the components enabled that are relevant to
 * the tests, and setting a mock RoboGuice module.
 *
 * The following components are not enabled:
 *
 * - Application lifecycle callbacks.
 *   This was used to detect to force the application to start
 *   from the main screen when relaunched from the background,
 *   which is not present in the current tests.
 *
 * - RoboGuice injector initialization.
 *
 * - Crashlytics/Fabric crash reporting.
 *
 * - Facebook SDK intialization.
 *
 * - Parse notifications initialization and subscription.
 *
 * - Checking for application upgrades, and repairing download
 *   statuses and clearing the web view cookie cache.
 */
public class TestApplication extends MainApplication {
    @Override
    public void onCreate() {
        // initialize logger
        Logger.init(this.getApplicationContext());
        application = this;
    }
}


text:
<?php

namespace Nord\Lumen\Fractal;

use Closure;
use Illuminate\Http\Request;

class FractalMiddleware
{

    /**
     * @var FractalService
     */
    private $service;

    /**
     * FractalMiddleware constructor.
     *
     * @param FractalService $service
     */
    public function __construct(FractalService $service)
    {
        $this->service = $service;
    }

    /**
     * Run the request filter.
     *
     * @param Request $request
     * @param Closure $next
     *
     * @return mixed
     */
    public function handle($request, Closure $next)
    {
        if ($request->has('include')) {
            $this->service->parseIncludes($request->get('include'));
        }

        return $next($request);
    }
}


text:
# encoding: UTF-8

require 'prometheus/client'
require 'prometheus/client/formats/text'

module Prometheus
  module Middleware
    # Exporter is a Rack middleware that provides a sample implementation of a
    # Prometheus HTTP exposition endpoint.
    #
    # By default it will export the state of the global registry and expose it
    # under `/metrics`. Use the `:registry` and `:path` options to change the
    # defaults.
    class Exporter
      attr_reader :app, :registry, :path

      FORMATS  = [Client::Formats::Text].freeze
      FALLBACK = Client::Formats::Text

      def initialize(app, options = {})
        @app = app
        @registry = options[:registry] || Client.registry
        @path = options[:path] || '/metrics'
        @acceptable = build_dictionary(FORMATS, FALLBACK)
      end

      def call(env)
        if env['PATH_INFO'] == @path
          format = negotiate(env, @acceptable)
          format ? respond_with(format) : not_acceptable(FORMATS)
        else
          @app.call(env)
        end
      end

      private

      def negotiate(env, formats)
        parse(env.fetch('HTTP_ACCEPT', '*/*')).each do |content_type, _|
          return formats[content_type] if formats.key?(content_type)
        end

        nil
      end

      def parse(header)
        header.split(/\s*,\s*/).map do |type|
          attributes = type.split(/\s*;\s*/)
          quality = extract_quality(attributes)

          [attributes.join('; '), quality]
        end.sort_by(&:last).reverse
      end

      def extract_quality(attributes, default = 1.0)
        quality = default

        attributes.delete_if do |attr|
          quality = attr.split('q=').last.to_f if attr.start_with?('q=')
        end

        quality
      end

      def respond_with(format)
        [
          200,
          { 'Content-Type' => format::CONTENT_TYPE },
          [format.marshal(@registry)],
        ]
      end

      def not_acceptable(formats)
        types = formats.map { |format| format::MEDIA_TYPE }

        [
          406,
          { 'Content-Type' => 'text/plain' },
          ["Supported media types: #{types.join(', ')}"],
        ]
      end

      def build_dictionary(formats, fallback)
        formats.each_with_object('*/*' => fallback) do |format, memo|
          memo[format::CONTENT_TYPE] = format
          memo[format::MEDIA_TYPE] = format
        end
      end
    end
  end
end


text:
*Our project's goal is to create a web application that processes text given by a user to determine the users current emotional state. Based off of the text excerpt written by the user MoodBot will then be able to provide the user with suggestions to continue that mood or how to change it. Going along with our idea we would like to implement some stretch goals that would allow us to process data from sites like Twitter or Reddit to see the emotional hisotry of that site. In the case of a Twitter user, MoodBot would be able to give a month to month report of the emotional data based off of the users tweet history. That is what our project is aiming to accomplish.*
## MVP:
* Take user input and output a response
* sentiment language processing
* Be able to give options back to the use based off of users emotions data
* front facing web abb that takes input, parses that data and responds with suggestions.
## Stretch Goals:
* Twitter data analytics
* Reddit (subreddits) data analytics
* Show users history - month to month, happiest tweet/saddest tweet, graph the data to show the analysis

# Team Members:
 * Casey O'Kane - okanecasey@gmail.com
 * Alex Short - ajshort2010@hotmail.com
 * Kurt Maurer - kurtrm@gmail.com
 * Anna Shelby - bonanashelby@gmail.com

# Dependencies for Project: (these will prolly change)
## Requires:
* pyramid
* pyramid_jinja2
* pyramid_debugtoolbar
* pyramid_tm
* SQLAlchemy
* transaction
* zope.sqlalchemy
* Waitress
* ipython
* pyramid_ipython
* psycopg2

## Test Requires:
* pytest
* pytest-cov
* tox

# GitHub Repository
[GitHub Repository for MoodBot](https://github.com/Bonanashelby/MoodBot)


text:
<?php

/**
 * namespace definition and usage
 */
namespace Questionnaire\Service;

use Questionnaire\Form\QuestionnaireFormInterface;
use Questionnaire\Table\QuestionnaireTableInterface;

/**
 * Blog Service interface
 *
 * @package    Blog
 */
interface QuestionnaireServiceInterface
{
    /**
     * Constructor
     *
     * @param BlogTableInterface $table
     * @param AuthenticationService $authentication
     */
    public function __construct(QuestionnaireTableInterface $table);

    /**
     * Get blog table
     *
     * @return BlogTableInterface
     */
    public function getTable();

    /**
     * Set blog table
     *
     * @param BlogTableInterface $table
     * @return BlogServiceInterface
     */
    public function setTable(QuestionnaireTableInterface $table);

    /**
     * Get service message
     *
     * @return array
     */
    public function getMessage();

    /**
     * Clear service message
     */
    public function clearMessage();

    /**
     * Add service message
     *
     * @param string new message
     */
    public function setMessage($message);

    /**
     * Get form with triggering the Event-Manager
     *
     * @param  string $type form type
     * @return BlogFormInterface
     */
    public function getForm($type = 'create');

    /**
     * Set form
     *
     * @param BlogFormInterface $form
     * @param string $type form type
     */
    public function setForm(QuestionnaireFormInterface $form, $type = 'create');

    /**
     * Fetch single by url
     *
     * @param varchar $url
     * @return BlogEntityInterface
     */
    public function fetchSingleByName($name);

    /**
     * Fetch single by id
     *
     * @param varchar $id
     * @return BlogEntityInterface
     */
    public function fetchSingleById($id);

    /**
     * Fetch list of blogs
     *
     * @param integer $page number of page
     * @return Paginator
     */
    public function fetchList($page = 1, $perPage = 15);

    /**
     * Save a blog
     *
     * @param array $data input data
     * @param integer $id id of blog entry
     * @return BlogEntityInterface
     */
    public function save(array $data, $id = null);

    /**
     * Delete existing blog
     *
     * @param integer $id blog id
     * @param array $data input data
     * @return BlogEntityInterface
     */
    public function delete($id);
}


text:
package tv.lycam.internal;

import com.google.gson.JsonArray;
import com.google.gson.JsonObject;
import org.kurento.client.IceCandidate;
import tv.lycam.NotificationRoomManager;
import tv.lycam.api.NotificationRoomHandler;
import tv.lycam.api.UserNotificationService;
import tv.lycam.api.pojo.ParticipantRequest;
import tv.lycam.api.pojo.UserParticipant;
import tv.lycam.exception.RoomException;

import java.util.Set;

/**
 * Created by chengbin on 2017/6/9.
 */
public class DefaultNotificationRoomHandler implements NotificationRoomHandler {

    private UserNotificationService notifService;

    public DefaultNotificationRoomHandler(UserNotificationService notifService) {
        this.notifService = notifService;
    }

    @Override
    public void onRoomClosed(String roomName, Set<UserParticipant> participants) {
        JsonObject notifParams = new JsonObject();
        notifParams.addProperty(ProtocolElements.ROOMCLOSED_ROOM_PARAM, roomName);
        for (UserParticipant participant : participants) {
            notifService
                    .sendNotification(participant.getParticipantId(), ProtocolElements.ROOMCLOSED_METHOD,
                            notifParams);
        }
    }

    @Override
    public void onParticipantJoined(ParticipantRequest request, String roomName, String newUserName,
                                    Set<UserParticipant> existingParticipants, RoomException error) {
        if (error != null) {
            notifService.sendErrorResponse(request, null, error);
            return;
        }

        JsonArray result = new JsonArray();
        for (UserParticipant participant : existingParticipants) {
            JsonObject participantJson = new JsonObject();
            participantJson
                    .addProperty(ProtocolElements.JOINROOM_PEERID_PARAM, participant.getUserName());
            if (participant.isStreaming()) {
                JsonObject stream = new JsonObject();
                stream.addProperty(ProtocolElements.JOINROOM_PEERSTREAMID_PARAM, "webcam");
                JsonArray streamsArray = new JsonArray();
                streamsArray.add(stream);
                participantJson.add(ProtocolElements.JOINROOM_PEERSTREAMS_PARAM, streamsArray);
            }
            result.add(participantJson);

            JsonObject notifParams = new JsonObject();
            notifParams.addProperty(ProtocolElements.PARTICIPANTJOINED_USER_PARAM, newUserName);
            notifService.sendNotification(participant.getParticipantId(),
                    ProtocolElements.PARTICIPANTJOINED_METHOD, notifParams);
        }
        notifService.sendResponse(request, result);
    }

    @Override
    public void onParticipantLeft(ParticipantRequest request, String userName,
                                  Set<UserParticipant> remainingParticipants, RoomException error) {
        if (error != null) {
            notifService.sendErrorResponse(request, null, error);
            return;
        }

        JsonObject params = new JsonObject();
        params.addProperty(ProtocolElements.PARTICIPANTLEFT_NAME_PARAM, userName);
        for (UserParticipant participant : remainingParticipants) {
            notifService
                    .sendNotification(participant.getParticipantId(), ProtocolElements.PARTICIPANTLEFT_METHOD,
                            params);
        }

        notifService.sendResponse(request, new JsonObject());
        notifService.closeSession(request);
    }

    @Override
    public void onPublishMedia(ParticipantRequest request, String publisherName, String sdpAnswer,
                               Set<UserParticipant> participants, RoomException error) {
        if (error != null) {
            notifService.sendErrorResponse(request, null, error);
            return;
        }
        JsonObject result = new JsonObject();
        result.addProperty(ProtocolElements.PUBLISHVIDEO_SDPANSWER_PARAM, sdpAnswer);
        notifService.sendResponse(request, result);

        JsonObject params = new JsonObject();
        params.addProperty(ProtocolElements.PARTICIPANTPUBLISHED_USER_PARAM, publisherName);
        JsonObject stream = new JsonObject();
        stream.addProperty(ProtocolElements.PARTICIPANTPUBLISHED_STREAMID_PARAM, "webcam");
        JsonArray streamsArray = new JsonArray();
        streamsArray.add(stream);
        params.add(ProtocolElements.PARTICIPANTPUBLISHED_STREAMS_PARAM, streamsArray);

        for (UserParticipant participant : participants) {
            if (participant.getParticipantId().equals(request.getParticipantId())) {
                continue;
            } else {
                notifService.sendNotification(participant.getParticipantId(),
                        ProtocolElements.PARTICIPANTPUBLISHED_METHOD, params);
            }
        }
    }

    @Override
    public void onUnpublishMedia(ParticipantRequest request, String publisherName,
                                 Set<UserParticipant> participants, RoomException error) {
        if (error != null) {
            notifService.sendErrorResponse(request, null, error);
            return;
        }
        notifService.sendResponse(request, new JsonObject());

        JsonObject params = new JsonObject();
        params.addProperty(ProtocolElements.PARTICIPANTUNPUBLISHED_NAME_PARAM, publisherName);

        for (UserParticipant participant : participants) {
            if (participant.getParticipantId().equals(request.getParticipantId())) {
                continue;
            } else {
                notifService.sendNotification(participant.getParticipantId(),
                        ProtocolElements.PARTICIPANTUNPUBLISHED_METHOD, params);
            }
        }
    }

    @Override
    public void onSubscribe(ParticipantRequest request, String sdpAnswer, RoomException error) {
        if (error != null) {
            notifService.sendErrorResponse(request, null, error);
            return;
        }
        JsonObject result = new JsonObject();
        result.addProperty(ProtocolElements.RECEIVEVIDEO_SDPANSWER_PARAM, sdpAnswer);
        notifService.sendResponse(request, result);
    }

    @Override
    public void onUnsubscribe(ParticipantRequest request, RoomException error) {
        if (error != null) {
            notifService.sendErrorResponse(request, null, error);
            return;
        }
        notifService.sendResponse(request, new JsonObject());
    }

    @Override
    public void onSendMessage(ParticipantRequest request, String message, String userName,
                              String roomName, Set<UserParticipant> participants, RoomException error) {
        if (error != null) {
            notifService.sendErrorResponse(request, null, error);
            return;
        }
        notifService.sendResponse(request, new JsonObject());

        JsonObject params = new JsonObject();
        params.addProperty(ProtocolElements.PARTICIPANTSENDMESSAGE_ROOM_PARAM, roomName);
        params.addProperty(ProtocolElements.PARTICIPANTSENDMESSAGE_USER_PARAM, userName);
        params.addProperty(ProtocolElements.PARTICIPANTSENDMESSAGE_MESSAGE_PARAM, message);

        for (UserParticipant participant : participants) {
            notifService.sendNotification(participant.getParticipantId(),
                    ProtocolElements.PARTICIPANTSENDMESSAGE_METHOD, params);
        }
    }

    @Override
    public void onRecvIceCandidate(ParticipantRequest request, RoomException error) {
        if (error != null) {
            notifService.sendErrorResponse(request, null, error);
            return;
        }

        notifService.sendResponse(request, new JsonObject());
    }

    @Override
    public void onParticipantLeft(String userName, Set<UserParticipant> remainingParticipants) {
        JsonObject params = new JsonObject();
        params.addProperty(ProtocolElements.PARTICIPANTLEFT_NAME_PARAM, userName);
        for (UserParticipant participant : remainingParticipants) {
            notifService
                    .sendNotification(participant.getParticipantId(), ProtocolElements.PARTICIPANTLEFT_METHOD,
                            params);
        }
    }

    @Override
    public void onParticipantEvicted(UserParticipant participant) {
        notifService.sendNotification(participant.getParticipantId(),
                ProtocolElements.PARTICIPANTEVICTED_METHOD, new JsonObject());
    }

    // ------------ EVENTS FROM ROOM HANDLER -----

    @Override
    public void onIceCandidate(String roomName, String participantId, String endpointName,
                               IceCandidate candidate) {
        JsonObject params = new JsonObject();
        params.addProperty(ProtocolElements.ICECANDIDATE_EPNAME_PARAM, endpointName);
        params.addProperty(ProtocolElements.ICECANDIDATE_SDPMLINEINDEX_PARAM,
                candidate.getSdpMLineIndex());
        params.addProperty(ProtocolElements.ICECANDIDATE_SDPMID_PARAM, candidate.getSdpMid());
        params.addProperty(ProtocolElements.ICECANDIDATE_CANDIDATE_PARAM, candidate.getCandidate());
        notifService.sendNotification(participantId, ProtocolElements.ICECANDIDATE_METHOD, params);
    }

    @Override
    public void onPipelineError(String roomName, Set<String> participantIds, String description) {
        JsonObject notifParams = new JsonObject();
        notifParams.addProperty(ProtocolElements.MEDIAERROR_ERROR_PARAM, description);
        for (String pid : participantIds) {
            notifService.sendNotification(pid, ProtocolElements.MEDIAERROR_METHOD, notifParams);
        }
    }

    @Override
    public void onMediaElementError(String roomName, String participantId, String description) {
        JsonObject notifParams = new JsonObject();
        notifParams.addProperty(ProtocolElements.MEDIAERROR_ERROR_PARAM, description);
        notifService.sendNotification(participantId, ProtocolElements.MEDIAERROR_METHOD, notifParams);
    }

    @Override
    public void updateFilter(String roomName, Participant participant, String filterId,
                             String state) {
    }

    @Override
    public String getNextFilterState(String filterId, String state) {
        return null;
    }

}


text:
void output_char(long c);

// print a char to STDOUT
void output_readable_char(long c);

#define putchar(c) output_char(c)
#define putdouble(a) output_double(a)
#define putlong(a) output_long(a)

#define putq(a) output_q(a)

#define put1(c) putchar(c)
#define put2(a,b) {put1(a); put1(b);}
#define put4(a,b,c,d) {put2(a,b); put2(c,d);}
#define put8(a,b,c,d,e,f,g,h) {put4(a,b,c,d); put4(e,f,g,h);}
#define writeln4(a,b,c,d) {put4(a,b,c,d); put1(C_n);}
#define writeln6(a,b,c,d,e,f) {put4(a,b,c,d); put2(e,f); put1(C_n);}
#define writelns6(a) {writeln6(a[0],a[1],a[2],a[3],a[4],a[5]);}
#define writeln3(a,b,c) {put2(a,b); put2(c, C_n);}
#define writelns4(a) {put4(a[0], a[1], a[2], a[3]); put1(C_n);}
#define wr5cqn(a,b,c,d,e,q) {put4(a,b,c,d);output_q(q);put1(C_n);}
#define wr4n writeln4
#define wr8n(a,b,c,d,e,f,g,h) {put4(a,b,c,d); put4(e,f,g,h);put1(C_n);}
#define wrln() {putchar(C_n);}

#define output_long(a) output_q(a)
#define output_long_hex(a) output_q_hex(a)

// print a 64bit integer to STDOUT
void output_q(long n);

// print a 64bit integer of at least d digits (filled 0s for padding)
// to STDOUT
void output_q_digits(long n, long d);

// print a 64bit integer in hexdecimal format to STDOUT
// Note: only print 15 bits
void output_q_hex(long n);

// print the current runner's to STDOUT
void output_id();

// print @sl charactores in @s to STDOUT
void output_char_str(char* s, long sl);

void output_readable_char_str(char* s, long sl);

// print string @s to STDOUT
void output_str(char* s);

// input a char from STDIN
#define __input_char() *(long*)0x100000200

// // for debug only
// long __input_char();

#define getc1 input_char

// input a char from STDIN
char input_char();

// input a long from STDIN
// Note: will also read in an extra char
// return immediately after reading '\0'
// do not recognize +
long input_q();

// -1 reach EOF
// 0 success
long input_line(char *buf, long maxlen, long *len);

// input a long from STDIN
// Note: will also read in an extra char
// return immediately after reading '\0'
// do not recognize +
// result is in *result
// return 0 on success
// -1 on end of file
long input_long(long *result);

// input a long from STDIN
// Note: will also read in an extra char
// return immediately after reading '\0'
// do not recognize +
// result in *result
// return 0 on success
// -1 on end of file
// only accept lower 0xabcdef89 and like
long input_long_hex(long *result);

#define IEEE754_SIGN   0x8000000000000000
#define IEEE754_EXP    0x7FF0000000000000
#define IEEE754_FRAC   0x000FFFFFFFFFFFFF
#define IEEE754_2POW52 0x0010000000000000

// N x 2 ^ M
void output_double_binary(double d);

void output_double(double d);

// input a double from STDIN
// Note: will also read in an extra char
// return immediately after reading '\0'
// do not recognize +
// must leading with 0.xxx or nnn.xxx
// that is, .xxx is not supported
// result is in *result
// return 0 on success
// -1 on end of file
long input_double(double *result);

void output_double(double d);

// input a double from STDIN
// Note: will also read in an extra char
// return immediately after reading '\0'
// do not recognize +
// must leading with 0.xxx or nnn.xxx
// that is, .xxx is not supported
// result is in *result
// return 0 on success
// -1 on end of file
long input_double(double *result);

#endif // I0STDIO_H


text:
package com.nowellpoint.mongodb.persistence;

import java.util.List;

public interface Query<T> {

	/**
	 *
	 * @param key
	 * @return Query
	 */

	Query<T> field(String key);

	/**
	 *
	 * @param value
	 * @return Query
	 */

	Query<T> isEqual(Object value);

	/**
	 *
	 * @return T
	 */

	T getSingleResult();

	/**
	 *
	 * @return
	 */

	List<T> getResultList();
}


text:
package org.sagebionetworks.web.client.view.users;

import com.google.gwt.user.client.ui.IsWidget;
import com.google.gwt.user.client.ui.Widget;

public interface RegisterWidgetView extends IsWidget {
  /**
   * Set the presenter.
   *
   * @param presenter
   */
  void setPresenter(Presenter presenter);

  void setSynAlert(Widget w);

  void enableEmailAddressField(boolean enabled);

  /**
   * Presenter interface
   */
  interface Presenter {
    void registerUser(String email);

    String getEncodedMembershipInvtnSignedToken();
  }

  void enableRegisterButton(boolean enable);

  void setVisible(boolean isVisible);

  void setEmail(String email);

  void clear();

  void showInfo(String message);
}


text:
<!DOCTYPE html>

	<meta charset="UTF-8">
	<meta name="author" content="Saverio Caminiti">
	<title>cssSlideJS Example</title>

	<link rel="stylesheet" type="text/css" href="style.css">

cssSlideJS examples/rotate

A slideshow with image rotation effect.

cssSlideJS by Saverio Caminiti


text:
/**
 * @class Ext.grid.GridPanel
 * @extends Ext.Panel
 * This class represents the primary interface of a component based grid control.
 *

Usage:
 *
var grid = new Ext.grid.GridPanel({
    store: new Ext.data.Store({
        reader: reader,
        data: xg.dummyData
    }),
    columns: [
        {id:'company', header: "Company", width: 200, sortable: true, dataIndex: 'company'},
        {header: "Price", width: 120, sortable: true, renderer: Ext.util.Format.usMoney, dataIndex: 'price'},
        {header: "Change", width: 120, sortable: true, dataIndex: 'change'},
        {header: "% Change", width: 120, sortable: true, dataIndex: 'pctChange'},
        {header: "Last Updated", width: 135, sortable: true, renderer: Ext.util.Format.dateRenderer('m/d/Y'), dataIndex: 'lastChange'}
    ],
    viewConfig: {
        forceFit: true,

//      Return CSS class to apply to rows depending upon data values
        getRowClass: function(record, index) {
            var c = record.get('change');
            if (c < 0) {
                return 'price-fall';
            } else if (c > 0) {
                return 'price-rise';
            }
        }
    },
    sm: new Ext.grid.RowSelectionModel({singleSelect:true}),
    width:600,
    height:300,
    frame:true,
    title:'Framed with Checkbox Selection and Horizontal Scrolling',
    iconCls:'icon-grid'
});

 * Notes:

 *
Although this class inherits many configuration options from base classes, some of them
 * (such as autoScroll, layout, items, etc) are not used by this class, and will have no effect.

 *
A grid requires a width in which to scroll its columns, and a height in which to scroll its rows. The dimensions can either
 * be set through the {@link #height} and {@link #width} configuration options or automatically set by using the grid in a {@link Ext.Container Container}
 * who's {@link Ext.Container#layout layout} provides sizing of its child items.

 *
To access the data in a Grid, it is necessary to use the data model encapsulated
 * by the {@link #store Store}. See the {@link #cellclick} event.

 *

 * @constructor
 * @param {Object} config The config object
 */
Ext.grid.GridPanel = Ext.extend(Ext.Panel, {
    /**
     * @cfg {Ext.data.Store} store The {@link Ext.data.Store} the grid should use as its data source (required).
     */
    /**
     * @cfg {Object} cm Shorthand for {@link #colModel}.
     */
    /**
     * @cfg {Object} colModel The {@link Ext.grid.ColumnModel} to use when rendering the grid (required).
     */
    /**
     * @cfg {Object} sm Shorthand for {@link #selModel}.
     */
    /**
     * @cfg {Object} selModel Any subclass of {@link Ext.grid.AbstractSelectionModel} that will provide
     * the selection model for the grid (defaults to {@link Ext.grid.RowSelectionModel} if not specified).
     */
    /**
     * @cfg {Array} columns An array of columns to auto create a ColumnModel
     */
    /**
    * @cfg {Number} maxHeight Sets the maximum height of the grid - ignored if autoHeight is not on.
    */
    /**
     * @cfg {Boolean} disableSelection True to disable selections in the grid (defaults to false). - ignored if a SelectionModel is specified
     */
    /**
     * @cfg {Boolean} enableColumnMove False to turn off column reordering via drag drop (defaults to true).
     */
    /**
     * @cfg {Boolean} enableColumnResize False to turn off column resizing for the whole grid (defaults to true).
     */
    /**
     * @cfg {Object} viewConfig A config object that will be used to create the grid's UI view.  Any of
     * the config options available for {@link Ext.grid.GridView} can be specified here. This option
     * is ignored if {@link #view} is xpecified.
     */
    /**
     * @cfg {Boolean} hideHeaders True to hide the grid's header (defaults to false).
     */

    /**
     * Configures the text in the drag proxy (defaults to "{0} selected row(s)").
     * {0} is replaced with the number of selected rows.
     * @type String
     */
    ddText : "{0} selected row{1}",
    /**
     * @cfg {Number} minColumnWidth The minimum width a column can be resized to. Defaults to 25.
     */
    minColumnWidth : 25,
    /**
     * @cfg {Boolean} trackMouseOver True to highlight rows when the mouse is over. Default is true.
     */
    trackMouseOver : true,
    /**
     * @cfg {Boolean}
enableDragDrop True to enable dragging of the selected rows of the GridPanel.

     *
Setting this to <tt>true</tt> causes this GridPanel's {@link #getView GridView} to create an instance of
     * {@link Ext.grid.GridDragZone}. This is available (only after the Grid has been rendered) as the
     * GridView's {@link Ext.grid.GridView#dragZone dragZone} property.

     *
A cooperating {@link Ext.dd.DropZone DropZone} must be created who's implementations of
     * {@link Ext.dd.DropZone#onNodeEnter onNodeEnter}, {@link Ext.dd.DropZone#onNodeOver onNodeOver},
     * {@link Ext.dd.DropZone#onNodeOut onNodeOut} and {@link Ext.dd.DropZone#onNodeDrop onNodeDrop}
 are able
     * to process the {@link Ext.grid.GridDragZone#getDragData data} which is provided.
     */
    enableDragDrop : false,
    /**
     * @cfg {Boolean} enableColumnMove True to enable drag and drop reorder of columns.
     */
    enableColumnMove : true,
    /**
     * @cfg {Boolean} enableColumnHide True to enable hiding of columns with the header context menu.
     */
    enableColumnHide : true,
    /**
     * @cfg {Boolean} enableHdMenu True to enable the drop down button for menu in the headers.
     */
    enableHdMenu : true,
    /**
     * @cfg {Boolean} stripeRows True to stripe the rows. Default is false.
     *
This causes the CSS class <tt>x-grid3-row-alt</tt> to be added to alternate rows of
     * the grid. A default CSS rule is provided which sets a background colour, but you can override this
     * with a rule which either overrides the background-color style using the "!important"
     * modifier, or which uses a CSS selector of higher specificity.
     */
    stripeRows : false,
    /**
     * @cfg {String} autoExpandColumn The id of a column in this grid that should expand to fill unused space. This id can not be 0.
     */
    autoExpandColumn : false,
    /**
    * @cfg {Number} autoExpandMin The minimum width the autoExpandColumn can have (if enabled).
    * defaults to 50.
    */
    autoExpandMin : 50,
    /**
    * @cfg {Number} autoExpandMax The maximum width the autoExpandColumn can have (if enabled). Defaults to 1000.
    */
    autoExpandMax : 1000,
    /**
     * @cfg {Object} view The {@link Ext.grid.GridView} used by the grid. This can be set before a call to render().
     */
    view : null,
    /**
     * @cfg {Object} loadMask An {@link Ext.LoadMask} config or true to mask the grid while loading (defaults to false).
     */
    loadMask : false,

    /**
     * @cfg {Boolean} deferRowRender True to enable deferred row rendering. Default is true.
     */
    deferRowRender : true,

    // private
    rendered : false,
    // private
    viewReady: false,
    /**
     * @cfg {Array} stateEvents
     * An array of events that, when fired, should trigger this component to save its state (defaults to ["columnmove", "columnresize", "sortchange"]).
     * These can be any types of events supported by this component, including browser or custom events (e.g.,
     * ['click', 'customerchange']).
     *
See {@link #stateful} for an explanation of saving and restoring Component state.

     */
    stateEvents: ["columnmove", "columnresize", "sortchange"],

    // private
    initComponent : function(){
        Ext.grid.GridPanel.superclass.initComponent.call(this);

        // override any provided value since it isn't valid
        this.autoScroll = false;
        this.autoWidth = false;

        if(Ext.isArray(this.columns)){
            this.colModel = new Ext.grid.ColumnModel(this.columns);
            delete this.columns;
        }

        // check and correct shorthanded configs
        if(this.ds){
            this.store = this.ds;
            delete this.ds;
        }
        if(this.cm){
            this.colModel = this.cm;
            delete this.cm;
        }
        if(this.sm){
            this.selModel = this.sm;
            delete this.sm;
        }
        this.store = Ext.StoreMgr.lookup(this.store);

        this.addEvents(
            // raw events
            /**
             * @event click
             * The raw click event for the entire grid.
             * @param {Ext.EventObject} e
             */
            "click",
            /**
             * @event dblclick
             * The raw dblclick event for the entire grid.
             * @param {Ext.EventObject} e
             */
            "dblclick",
            /**
             * @event contextmenu
             * The raw contextmenu event for the entire grid.
             * @param {Ext.EventObject} e
             */
            "contextmenu",
            /**
             * @event mousedown
             * The raw mousedown event for the entire grid.
             * @param {Ext.EventObject} e
             */
            "mousedown",
            /**
             * @event mouseup
             * The raw mouseup event for the entire grid.
             * @param {Ext.EventObject} e
             */
            "mouseup",
            /**
             * @event mouseover
             * The raw mouseover event for the entire grid.
             * @param {Ext.EventObject} e
             */
            "mouseover",
            /**
             * @event mouseout
             * The raw mouseout event for the entire grid.
             * @param {Ext.EventObject} e
             */
            "mouseout",
            /**
             * @event keypress
             * The raw keypress event for the entire grid.
             * @param {Ext.EventObject} e
             */
            "keypress",
            /**
             * @event keydown
             * The raw keydown event for the entire grid.
             * @param {Ext.EventObject} e
             */
            "keydown",

            // custom events
            /**
             * @event cellmousedown
             * Fires before a cell is clicked
             * @param {Grid} this
             * @param {Number} rowIndex
             * @param {Number} columnIndex
             * @param {Ext.EventObject} e
             */
            "cellmousedown",
            /**
             * @event rowmousedown
             * Fires before a row is clicked
             * @param {Grid} this
             * @param {Number} rowIndex
             * @param {Ext.EventObject} e
             */
            "rowmousedown",
            /**
             * @event headermousedown
             * Fires before a header is clicked
             * @param {Grid} this
             * @param {Number} columnIndex
             * @param {Ext.EventObject} e
             */
            "headermousedown",

            /**
             * @event cellclick
             * Fires when a cell is clicked.
             * The data for the cell is drawn from the {@link Ext.data.Record Record}
             * for this row. To access the data in the listener function use the
             * following technique:
             *

    function(grid, rowIndex, columnIndex, e) {
        var record = grid.getStore().getAt(rowIndex);  // Get the Record
        var fieldName = grid.getColumnModel().getDataIndex(columnIndex); // Get field name
        var data = record.get(fieldName);
    }

             * @param {Grid} this
             * @param {Number} rowIndex
             * @param {Number} columnIndex
             * @param {Ext.EventObject} e
             */
            "cellclick",
            /**
             * @event celldblclick
             * Fires when a cell is double clicked
             * @param {Grid} this
             * @param {Number} rowIndex
             * @param {Number} columnIndex
             * @param {Ext.EventObject} e
             */
            "celldblclick",
            /**
             * @event rowclick
             * Fires when a row is clicked
             * @param {Grid} this
             * @param {Number} rowIndex
             * @param {Ext.EventObject} e
             */
            "rowclick",
            /**
             * @event rowdblclick
             * Fires when a row is double clicked
             * @param {Grid} this
             * @param {Number} rowIndex
             * @param {Ext.EventObject} e
             */
            "rowdblclick",
            /**
             * @event headerclick
             * Fires when a header is clicked
             * @param {Grid} this
             * @param {Number} columnIndex
             * @param {Ext.EventObject} e
             */
            "headerclick",
            /**
             * @event headerdblclick
             * Fires when a header cell is double clicked
             * @param {Grid} this
             * @param {Number} columnIndex
             * @param {Ext.EventObject} e
             */
            "headerdblclick",
            /**
             * @event rowcontextmenu
             * Fires when a row is right clicked
             * @param {Grid} this
             * @param {Number} rowIndex
             * @param {Ext.EventObject} e
             */
            "rowcontextmenu",
            /**
             * @event cellcontextmenu
             * Fires when a cell is right clicked
             * @param {Grid} this
             * @param {Number} rowIndex
             * @param {Number} cellIndex
             * @param {Ext.EventObject} e
             */
            "cellcontextmenu",
            /**
             * @event headercontextmenu
             * Fires when a header is right clicked
             * @param {Grid} this
             * @param {Number} columnIndex
             * @param {Ext.EventObject} e
             */
            "headercontextmenu",
            /**
             * @event bodyscroll
             * Fires when the body element is scrolled
             * @param {Number} scrollLeft
             * @param {Number} scrollTop
             */
            "bodyscroll",
            /**
             * @event columnresize
             * Fires when the user resizes a column
             * @param {Number} columnIndex
             * @param {Number} newSize
             */
            "columnresize",
            /**
             * @event columnmove
             * Fires when the user moves a column
             * @param {Number} oldIndex
             * @param {Number} newIndex
             */
            "columnmove",
            /**
             * @event sortchange
             * Fires when the grid's store sort changes
             * @param {Grid} this
             * @param {Object} sortInfo An object with the keys field and direction
             */
            "sortchange"
        );
    },

    // private
    onRender : function(ct, position){
        Ext.grid.GridPanel.superclass.onRender.apply(this, arguments);

        var c = this.body;

        this.el.addClass('x-grid-panel');

        var view = this.getView();
        view.init(this);

        c.on("mousedown", this.onMouseDown, this);
        c.on("click", this.onClick, this);
        c.on("dblclick", this.onDblClick, this);
        c.on("contextmenu", this.onContextMenu, this);
        c.on("keydown", this.onKeyDown, this);

        this.relayEvents(c, ["mousedown","mouseup","mouseover","mouseout","keypress"]);

        this.getSelectionModel().init(this);
        this.view.render();
    },

    // private
    initEvents : function(){
        Ext.grid.GridPanel.superclass.initEvents.call(this);

        if(this.loadMask){
            this.loadMask = new Ext.LoadMask(this.bwrap,
                    Ext.apply({store:this.store}, this.loadMask));
        }
    },

    initStateEvents : function(){
        Ext.grid.GridPanel.superclass.initStateEvents.call(this);
        this.colModel.on('hiddenchange', this.saveState, this, {delay: 100});
    },

    applyState : function(state){
        var cm = this.colModel;
        var cs = state.columns;
        if(cs){
            for(var i = 0, len = cs.length; i < len; i++){
                var s = cs[i];
                var c = cm.getColumnById(s.id);
                if(c){
                    c.hidden = s.hidden;
                    c.width = s.width;
                    var oldIndex = cm.getIndexById(s.id);
                    if(oldIndex != i){
                        cm.moveColumn(oldIndex, i);
                    }
                }
            }
        }
        if(state.sort){
            this.store[this.store.remoteSort ? 'setDefaultSort' : 'sort'](state.sort.field, state.sort.direction);
        }
    },

    getState : function(){
        var o = {columns: []};
        for(var i = 0, c; c = this.colModel.config[i]; i++){
            o.columns[i] = {
                id: c.id,
                width: c.width
            };
            if(c.hidden){
                o.columns[i].hidden = true;
            }
        }
        var ss = this.store.getSortState();
        if(ss){
            o.sort = ss;
        }
        return o;
    },

    // private
    afterRender : function(){
        Ext.grid.GridPanel.superclass.afterRender.call(this);
        this.view.layout();
        if(this.deferRowRender){
            this.view.afterRender.defer(10, this.view);
        }else{
            this.view.afterRender();
        }
        this.viewReady = true;
    },

    /**
     *
Reconfigures the grid to use a different Store and Column Model.
     * The View will be bound to the new objects and refreshed.

     *
Be aware that upon reconfiguring a GridPanel, certain existing settings may become
     * invalidated. For example the configured {@link #autoExpandColumn} may no longer exist in the
     * new ColumnModel. Also, an existing {@link Ext.PagingToolbar PagingToolbar} will still be bound
     * to the old Store, and will need rebinding. Any {@link #plugins} might also need reconfiguring
     * with the new data.

     * @param {Ext.data.Store} store The new {@link Ext.data.Store} object
     * @param {Ext.grid.ColumnModel} colModel The new {@link Ext.grid.ColumnModel} object
     */
    reconfigure : function(store, colModel){
        if(this.loadMask){
            this.loadMask.destroy();
            this.loadMask = new Ext.LoadMask(this.bwrap,
                    Ext.apply({store:store}, this.initialConfig.loadMask));
        }
        this.view.bind(store, colModel);
        this.store = store;
        this.colModel = colModel;
        if(this.rendered){
            this.view.refresh(true);
        }
    },

    // private
    onKeyDown : function(e){
        this.fireEvent("keydown", e);
    },

    // private
    onDestroy : function(){
        if(this.rendered){
            if(this.loadMask){
                this.loadMask.destroy();
            }
            var c = this.body;
            c.removeAllListeners();
            this.view.destroy();
            c.update("");
        }
        this.colModel.purgeListeners();
        Ext.grid.GridPanel.superclass.onDestroy.call(this);
    },

    // private
    processEvent : function(name, e){
        this.fireEvent(name, e);
        var t = e.getTarget();
        var v = this.view;
        var header = v.findHeaderIndex(t);
        if(header !== false){
            this.fireEvent("header" + name, this, header, e);
        }else{
            var row = v.findRowIndex(t);
            var cell = v.findCellIndex(t);
            if(row !== false){
                this.fireEvent("row" + name, this, row, e);
                if(cell !== false){
                    this.fireEvent("cell" + name, this, row, cell, e);
                }
            }
        }
    },

    // private
    onClick : function(e){
        this.processEvent("click", e);
    },

    // private
    onMouseDown : function(e){
        this.processEvent("mousedown", e);
    },

    // private
    onContextMenu : function(e, t){
        this.processEvent("contextmenu", e);
    },

    // private
    onDblClick : function(e){
        this.processEvent("dblclick", e);
    },

    // private
    walkCells : function(row, col, step, fn, scope){
        var cm = this.colModel, clen = cm.getColumnCount();
        var ds = this.store, rlen = ds.getCount(), first = true;
        if(step < 0){
            if(col < 0){
                row--;
                first = false;
            }
            while(row >= 0){
                if(!first){
                    col = clen-1;
                }
                first = false;
                while(col >= 0){
                    if(fn.call(scope || this, row, col, cm) === true){
                        return [row, col];
                    }
                    col--;
                }
                row--;
            }
        } else {
            if(col >= clen){
                row++;
                first = false;
            }
            while(row < rlen){
                if(!first){
                    col = 0;
                }
                first = false;
                while(col < clen){
                    if(fn.call(scope || this, row, col, cm) === true){
                        return [row, col];
                    }
                    col++;
                }
                row++;
            }
        }
        return null;
    },

    // private
    getSelections : function(){
        return this.selModel.getSelections();
    },

    // private
    onResize : function(){
        Ext.grid.GridPanel.superclass.onResize.apply(this, arguments);
        if(this.viewReady){
            this.view.layout();
        }
    },

    /**
     * Returns the grid's underlying element.
     * @return {Element} The element
     */
    getGridEl : function(){
        return this.body;
    },

    // private for compatibility, overridden by editor grid
    stopEditing : Ext.emptyFn,

    /**
     * Returns the grid's SelectionModel.
     * @return {Ext.grid.AbstractSelectionModel SelectionModel} The selection model configured by the
     * @link (#selModel} configuration option. This will be a subclass of {Ext.grid.AbstractSelectionModel}
     * which provides either cell or row selectability.
     */
    getSelectionModel : function(){
        if(!this.selModel){
            this.selModel = new Ext.grid.RowSelectionModel(
                    this.disableSelection ? {selectRow: Ext.emptyFn} : null);
        }
        return this.selModel;
    },

    /**
     * Returns the grid's data store.
     * @return {Ext.data.Store} The store
     */
    getStore : function(){
        return this.store;
    },

    /**
     * Returns the grid's ColumnModel.
     * @return {Ext.grid.ColumnModel} The column model
     */
    getColumnModel : function(){
        return this.colModel;
    },

    /**
     * Returns the grid's GridView object.
     * @return {Ext.grid.GridView} The grid view
     */
    getView : function(){
        if(!this.view){
            this.view = new Ext.grid.GridView(this.viewConfig);
        }
        return this.view;
    },
    /**
     * Called to get grid's drag proxy text, by default returns this.ddText.
     * @return {String} The text
     */
    getDragDropText : function(){
        var count = this.selModel.getCount();
        return String.format(this.ddText, count, count == 1 ? '' : 's');
    }

    /**
     * @cfg {String/Number} activeItem
     * @hide
     */
    /**
     * @cfg {Boolean} autoDestroy
     * @hide
     */
    /**
     * @cfg {Object/String/Function} autoLoad
     * @hide
     */
    /**
     * @cfg {Boolean} autoWidth
     * @hide
     */
    /**
     * @cfg {Boolean/Number} bufferResize
     * @hide
     */
    /**
     * @cfg {String} defaultType
     * @hide
     */
    /**
     * @cfg {Object} defaults
     * @hide
     */
    /**
     * @cfg {Boolean} hideBorders
     * @hide
     */
    /**
     * @cfg {Mixed} items
     * @hide
     */
    /**
     * @cfg {String} layout
     * @hide
     */
    /**
     * @cfg {Object} layoutConfig
     * @hide
     */
    /**
     * @cfg {Boolean} monitorResize
     * @hide
     */
    /**
     * @property items
     * @hide
     */
    /**
     * @method add
     * @hide
     */
    /**
     * @method cascade
     * @hide
     */
    /**
     * @method doLayout
     * @hide
     */
    /**
     * @method find
     * @hide
     */
    /**
     * @method findBy
     * @hide
     */
    /**
     * @method findById
     * @hide
     */
    /**
     * @method findByType
     * @hide
     */
    /**
     * @method getComponent
     * @hide
     */
    /**
     * @method getLayout
     * @hide
     */
    /**
     * @method getUpdater
     * @hide
     */
    /**
     * @method insert
     * @hide
     */
    /**
     * @method load
     * @hide
     */
    /**
     * @method remove
     * @hide
     */
    /**
     * @event add
     * @hide
     */
    /**
     * @event afterLayout
     * @hide
     */
    /**
     * @event beforeadd
     * @hide
     */
    /**
     * @event beforeremove
     * @hide
     */
    /**
     * @event remove
     * @hide
     */

    /**
     * @cfg {String} allowDomMove  @hide
     */
    /**
     * @cfg {String} autoEl @hide
     */
    /**
     * @cfg {String} applyTo  @hide
     */
    /**
     * @cfg {String} autoScroll  @hide
     */
    /**
     * @cfg {String} bodyBorder  @hide
     */
    /**
     * @cfg {String} bodyStyle  @hide
     */
    /**
     * @cfg {String} contentEl  @hide
     */
    /**
     * @cfg {String} disabledClass  @hide
     */
    /**
     * @cfg {String} elements  @hide
     */
    /**
     * @cfg {String} html  @hide
     */
    /**
     * @property disabled
     * @hide
     */
    /**
     * @method applyToMarkup
     * @hide
     */
    /**
     * @method enable
     * @hide
     */
    /**
     * @method disable
     * @hide
     */
    /**
     * @method setDisabled
     * @hide
     */
});
Ext.reg('grid', Ext.grid.GridPanel);


text:
package main

import (
	"log"

	// Imports the Stackdriver Logging client package.
	"cloud.google.com/go/logging"
	"golang.org/x/net/context"
)

func main() {
	ctx := context.Background()

	// Sets your Google Cloud Platform project ID.
	projectID := "YOUR_PROJECT_ID"

	// Creates a client.
	client, err := logging.NewClient(ctx, projectID)
	if err != nil {
		log.Fatalf("Failed to create client: %v", err)
	}
	defer client.Close()

	// Sets the name of the log to write to.
	logName := "my-log"

	logger := client.Logger(logName).StandardLogger(logging.Info)

	// Logs "hello world", log entry is visible at
	// Stackdriver Logs.
	logger.Println("hello world")
}

// [END logging_stdlogging]