text:
/*
 * @lc app=leetcode id=763 lang=java
 *
 * [763] Partition Labels
 *
 * https://leetcode.com/problems/partition-labels/description/
 *
 * algorithms
 * Medium (77.74%)
 * Total Accepted:    209.7K
 * Total Submissions: 269.7K
 * Testcase Example:  '"ababcbacadefegdehijhklij"'
 *
 * A string S of lowercase English letters is given. We want to partition this
 * string into as many parts as possible so that each letter appears in at most
 * one part, and return a list of integers representing the size of these
 * parts.
 *
 *
 *
 * Example 1:
 *
 *
 * Input: S = "ababcbacadefegdehijhklij"
 * Output: [9,7,8]
 * Explanation:
 * The partition is "ababcbaca", "defegde", "hijhklij".
 * This is a partition so that each letter appears in at most one part.
 * A partition like "ababcbacadefegde", "hijhklij" is incorrect, because it
 * splits S into less parts.
 *
 *
 *
 *
 * Note:
 *
 *
 * S will have length in range [1, 500].
 * S will consist of lowercase English letters ('a' to 'z') only.
 *
 *
 *
 *
 */
class Solution {
    public List<Integer> partitionLabels(String S) {
        List<Integer> ans = new ArrayList<>();
        int[] r = new int[26];
        int n = S.length();
        for (int i = 0; i < n; i++) {
            int id = S.charAt(i) - 'a';
            r[id] = i;
        }
        int i = 0;
        while (i < n) {
            int beg = i;
            int end = i;
            while (true) {
                int id = S.charAt(i) - 'a';
                if (r[id] > end) {
                    end = r[id];
                }
                if (end == i)
                    break;
                i++;
            }
            ans.add(end - beg + 1);
            i++;
        }
        return ans;
    }
}


text:
using System;
using System.Collections.Generic;
using System.IO;

namespace Semmle.Extraction.CIL.Entities
{
    internal sealed class ErrorType : Type
    {
        public ErrorType(Context cx) : base(cx)
        {
        }

        public override void WriteId(EscapingTextWriter trapFile, bool inContext) => trapFile.Write("<ErrorType>");

        public override CilTypeKind Kind => CilTypeKind.ValueOrRefType;

        public override string Name => "!error";

        public override Namespace ContainingNamespace => Context.GlobalNamespace;

        public override Type? ContainingType => null;

        public override int ThisTypeParameterCount => 0;

        public override void WriteAssemblyPrefix(TextWriter trapFile) => throw new NotImplementedException();

        public override IEnumerable<Type> TypeParameters => throw new NotImplementedException();

        public override Type Construct(IEnumerable<Type> typeArguments) => throw new NotImplementedException();
    }
}

redpajama_set_name: RedPajamaGithub


text:
from django.conf.urls import patterns, include, url
from forum.forms.user import LoginForm

from views import common, user, topic, notification
from forum.sitemap import TopicSitemap

# Uncomment the next two lines to enable the admin:
# from django.contrib import admin
# admin.autodiscover()

urlpatterns = patterns('',
    # Examples:
    # url(r'^$', 'xp.views.home', name='home'),
    # url(r'^xp/', include('xp.foo.urls')),

    # Uncomment the admin/doc line below to enable admin documentation:
    # url(r'^admin/doc/', include('django.contrib.admindocs.urls')),

    # Uncomment the next line to enable the admin:
    # url(r'^admin/', include(admin.site.urls)),
    url(r'^$', common.method_splitter, {'GET': topic.get_index}),
    url(r'^t/(\d+)/$', common.method_splitter, {'GET': topic.get_view, 'POST': topic.post_view}),
    url(r'^t/create/(.*)/$', common.method_splitter, {'GET': topic.get_create, 'POST': topic.post_create}),
    url(r'^t/edit/(.*)/$', common.method_splitter, {'GET': topic.get_edit, 'POST': topic.post_edit}),
    url(r'^reply/edit/(.*)/$', common.method_splitter, {'GET': topic.get_reply_edit, 'POST': topic.post_reply_edit}),
    url(r'^node/(.*)/$', common.method_splitter, {'GET': topic.get_node_topics}),
    url(r'^u/(.*)/topics/$', common.method_splitter, {'GET': topic.get_user_topics}),
    url(r'^u/(.*)/replies/$', common.method_splitter, {'GET': topic.get_user_replies}),
    url(r'^u/(.*)/favorites/$', common.method_splitter, {'GET': topic.get_user_favorites}),
    url(r'^u/(.*)/$', common.method_splitter, {'GET': topic.get_profile}),
    url(r'^vote/$', common.method_splitter, {'GET': topic.get_vote}),
    url(r'^favorite/$', common.method_splitter, {'GET': topic.get_favorite}),
    url(r'^unfavorite/$', common.method_splitter, {'GET': topic.get_cancel_favorite}),
    url(r'^notifications/$', common.method_splitter, {'GET': notification.get_list}),
    url(r'^members/$', common.method_splitter, {'GET': topic.get_members}),
    url(r'^setting/$', common.method_splitter, {'GET': user.get_setting, 'POST': user.post_setting}),
    url(r'^setting/avatar/$', common.method_splitter, {'GET': user.get_setting_avatar, 'POST': user.post_setting_avatar}),
    url(r'^setting/password/$', common.method_splitter, {'GET': user.get_settingpwd, 'POST': user.post_settingpwd}),
    url(r'^forgot/$', common.method_splitter, {'GET': user.get_forgotpwd, 'POST': user.post_forgotpwd}),
    url(r'^login/$', common.method_splitter, {'GET': user.get_login, 'POST': user.post_login}),
    url(r'^logout/$', common.method_splitter, {'GET': user.get_logout}),
    url(r'^register/$', common.method_splitter, {'GET': user.get_register, 'POST': user.post_register}),

    url(r'^sitemap\.xml$', 'django.contrib.sitemaps.views.sitemap', {'sitemaps': {'topics': TopicSitemap}}),
)


text:
typedef struct {
  uint32_t offset;
  uint32_t length;
} swiftparse_range_t;

typedef uint8_t swiftparse_trivia_kind_t;
typedef uint8_t swiftparse_token_kind_t;
typedef uint16_t swiftparse_syntax_kind_t;

/// This is for the client to provide an opaque pointer that the parser will
/// associate with a syntax node.
typedef void *swiftparse_client_node_t;

typedef struct {
  /// The length in source this trivia piece occupies, in UTF8 bytes.
  uint32_t length;
  swiftparse_trivia_kind_t kind;
} swiftparse_trivia_piece_t;

typedef struct {
  const swiftparse_trivia_piece_t *leading_trivia;
  const swiftparse_trivia_piece_t *trailing_trivia;
  uint16_t leading_trivia_count;
  uint16_t trailing_trivia_count;
  swiftparse_token_kind_t kind;
  /// Represents the range for the node, including trivia.
  swiftparse_range_t range;
} swiftparse_token_data_t;

typedef struct {
  const swiftparse_client_node_t *nodes;
  uint32_t nodes_count;
} swiftparse_layout_data_t;

typedef struct {
  union {
    swiftparse_token_data_t token_data;
    swiftparse_layout_data_t layout_data;
  };
  /// The syntax kind. A value of '0' means this is a token node.
  swiftparse_syntax_kind_t kind;
  bool present;
} swiftparse_syntax_node_t;

#endif


text:
    <meta http-equiv="Content-Type" content="text/html; charset=Windows-1252" />
    <meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5" />
    <title>ReaderWriterLock Methods</title>
    <xml>
    </xml>
    <link rel="stylesheet" type="text/css" href="MSDN.css" />

            log4net SDK Reference

ReaderWriterLock Methods

The methods of the ReaderWriterLock class are listed below. For a complete list of ReaderWriterLock class members, see the ReaderWriterLock Members topic.

Public Instance Methods

AcquireReaderLock	 Acquires a reader lock

AcquireWriterLock	 Acquires the writer lock

Equals (inherited from Object)
        Determines whether the specified Object is equal to the current Object.

GetHashCode (inherited from Object)
        Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.

GetType (inherited from Object)
        Gets the Type of the current instance.

ReleaseReaderLock	 Decrements the lock count

ReleaseWriterLock	 Decrements the lock count on the writer lock

ToString (inherited from Object)
        Returns a String that represents the current Object.

See Also

        ReaderWriterLock Class | log4net.Util Namespace

          Copyright 2001-2006 The Apache Software Foundation.

Generated from assembly log4net [1.2.10.0]


text:
"""Module providing abstract base for all sentiment analyzers.

Attributes:
  BaseAnalyzer (class): abstract base for all sentiment analyzers

"""

##################################################################
# Imports
from __future__ import absolute_import, print_function, unicode_literals
from six import iteritems
try:
    from cPickle import dump, load
except ImportError:
    from _pickle import dump, load

import gc
import numpy as np
import os

from cgsa.base import BaseAnalyzer
from cgsa.utils.common import LOGGER
from cgsa.constants import (DFLT_MODEL_PATH, DFLT_W2V_PATH, BAZIOTIS,
                            BILSTM, GAMON, GUENTHER, HU_LIU, JUREK,
                            KOLCHYNA, LBA, MOHAMMAD, MUSTO, MVRNN, RNN, RNTN,
                            SEVERYN, TABOADA, YESSENALINA, CLS2IDX, IDX2CLS)
from cgsa.dl.base import DLBaseAnalyzer
from cgsa.judge import DefaultJudge
from cgsa.utils import balance_data

from cgsa.utils.word2vec import Word2Vec

##################################################################
# Variables and Constants
DEBUG_NFEATS = 10

##################################################################
# Classes
class SentimentAnalyzer(object):
    """Main class for coarse-grained sentiment analyzers.

    Attributes:
      models (list(BaseSenser)):
        sense disambiguation models
      judge (cgsa.Judge):
        meta-classifier

    """
    @staticmethod
    def load(a_path, w2v_path, on_demand=False):
        """Load serialized model(s) from disc.

        Args:
          a_path (str): path to file from which to load the model
          on_demand (bool): load models later (when explicitly asked for)

        Returns:
          (void)

        """
        # load paths to serialized models
        LOGGER.debug("Loading analyzer from file: %s", a_path)
        with open(a_path, "rb") as ifile:
            analyzer = load(ifile)
        # normalize paths to serialized models
        analyzer._dirname = os.path.dirname(a_path)
        analyzer._logger = LOGGER
        if analyzer._w2v or analyzer._lstsq:
            if w2v_path != analyzer._w2v_path:
                LOGGER.warn(
                    "Classifier %r was trained with a different embedding"
                    " file: trained with %s vs. testing with %s", analyzer,
                    analyzer._w2v_path, w2v_path
                )
            analyzer._embeddings = Word2Vec(w2v_path)
        if not on_demand:
            analyzer._models = [
                model_i
                for model_i in SentimentAnalyzer._load_models(
                        analyzer
                )
            ]
        return analyzer

    @staticmethod
    def _load_models(a_analyzer):
        """Load serialized sub-model(s) from disc.

        Args:
          a_analyzer (SentimentAnalyzer): instance of this class

        Yields:
          (cgsa.base.BaseAnalyzer): loaded submodel

        """
        for mpath_i in a_analyzer._model_paths:
            a_analyzer._logger.debug(
                "Loading model from file: %s (dirname: %s)",
                mpath_i, a_analyzer._dirname)
            with open(os.path.join(a_analyzer._dirname,
                                   mpath_i), "rb") as ifile:
                model_i = BaseAnalyzer.load(a_analyzer._dirname, ifile)
                model_i.restore(a_analyzer._embeddings)
                yield model_i

    def __init__(self, a_models, *args, **kwargs):
        """Class constructor.

        Args:
          a_models (list[str]): type of the models to train
          a_args (list[str]): arguments to use for initializing models
          a_kwargs (dict): keyword arguments to use for initializing models

        """
        self._models = []
        self.judge = DefaultJudge()

        self._dirname = None
        self._n_cls = 0
        self._wbench = None
        self._logger = LOGGER
        self._model_paths = []
        self._trained_models = []
        self._w2v = kwargs.get("w2v", False)
        self._lstsq = kwargs.get("lstsq", False)
        self._w2v_path = os.path.abspath(
            kwargs.pop("w2v_path", DFLT_W2V_PATH)
        )
        self._embeddings = None
        if self._w2v or self._lstsq:
            self._embeddings = Word2Vec(self._w2v_path)
        kwargs["embeddings"] = self._embeddings
        self._init_models(a_models, *args, **kwargs)

    def train(self, a_train_data, a_dev_data=None,
              a_path=DFLT_MODEL_PATH, a_grid_search=True,
              a_multi_gpu=False, a_balance=False):
        """Train specified model(s) on the provided data.

        Args:
          a_train_data (list or None):
            training set
          a_dev_data (list or None):
            development set
          a_path (str):
            path for storing the model
          a_grid_search (bool):
            use grid search in order to determine hyper-paramaters of
            the model
          a_multi_gpu (bool): train model on multiple GPUs
          a_balance (bool): balance dataset to get equal number of instances
            for all classes (via downsampling)

        Returns:
          void:

        """
        # convert polarity classes to integer indices
        self._n_cls = len(
            set(t.label for t in a_train_data) |
            set(t.label for t in (a_dev_data if a_dev_data else []))
        )
        train_x, train_y = self._generate_ts(a_train_data)
        dev_x, dev_y = self._generate_ts(a_dev_data)
        dirname = os.path.dirname(a_path) if a_path else None
        # separately train and dump each model
        for i, model_i in enumerate(self._models):
            try:
                if a_balance:
                    train_x, train_y = balance_data(train_x, train_y)
                model_i.train(train_x, train_y, dev_x, dev_y,
                              a_grid_search=a_grid_search,
                              a_multi_gpu=a_multi_gpu)
            except:
                # in the end, we are going to switch to the fault-tolerant mode
                raise
            else:
                if dirname:
                    self._save_model(model_i, dirname)
                    self._models[i] = None
        if a_path:
            LOGGER.debug("Saving analyzer in %s...", a_path)
            self._reset()
            with open(a_path, "wb") as ofile:
                dump(self, ofile)
            LOGGER.debug("Analyzer saved...")

    def batch_predict(self, a_instances):
        """Predict multiple input instances at once.

        Models will be loaded

        Args:
          a_models (list[str]): type of the models to train

        """
        # create a workspace for doing the predictions
        probs = np.zeros((len(a_instances),
                          len(self._model_paths),
                          len(IDX2CLS)
                          ))
        # load each trained model and let it predict the classes
        for i, model_i in enumerate(SentimentAnalyzer._load_models(self)):
            for inst_j, y_j in zip(a_instances, probs):
                model_i.predict_proba(inst_j, y_j[i])
            # unload the moddel to save some disc space
            model_i = None
            gc.collect()
        # let judge merge the decisions
        for inst_j, y_j in zip(a_instances, probs):
            lbl_idx, _ = self.judge.predict(y_j)
            inst_j.label = IDX2CLS[lbl_idx]

    def predict(self, instance):
        """Predict label of a single input instance.

        Args:
          instance (cgsa.utils.data.Tweet): input instance to classify

        Returns:
          str: predicted label

        Note:
          modifies input tweet in place

        """
        if self._wbench is None:
            self._wbench = np.zeros((len(self._models), len(CLS2IDX)))
        else:
            self._wbench *= 0
        # let each trained model predict the probabilities of classes
        for i, model_i in enumerate(self._models):
            model_i.predict_proba(instance, self._wbench[i])
        # let the judge unite the decisions
        lbl_idx, _ = self.judge.predict(self._wbench)
        return IDX2CLS[lbl_idx]

    def debug(self, instance):
        """Explain predictions of each classifier.

        Args:
          instance (cgsa.utils.data.Tweet): input instance to classify

        Returns:
          str: predicted label

        Note:
          modifies input tweet in place

        """
        n_classes = len(CLS2IDX)
        if self._wbench is None:
            self._wbench = np.zeros((len(self._models), n_classes))
        else:
            self._wbench *= 0

        from .explainer import Explainer
        explainer = Explainer(class_names=IDX2CLS)
        # let each trained model predict the probabilities of classes
        for i, model_i in enumerate(self._models):
            self._logger.info("Considering model (%d): %r", i, model_i)
            model_i.predict_proba(instance, self._wbench[i])
            self._logger.info("Predicted scores: %r", self._wbench[i])
            # explanations
            predict_proba_raw = model_i.predict_proba
            if hasattr(model_i, "predict_proba_raw"):
                predict_proba_raw = model_i.predict_proba_raw

            explanations = explainer.explain_instance(
                instance,
                predict_proba_raw,
                num_features=DEBUG_NFEATS,
                labels=[y for y in range(len(IDX2CLS))]
            )
            for i, cls in iteritems(IDX2CLS):
                self._logger.info("Class: %s", cls)
                explanation = explanations.as_list(label=i)
                self._logger.info("Explanation: %r", explanation)
        # let the judge unite the decisions
        self._logger.info("All predicted scores: %r", self._wbench)
        lbl_idx, _ = self.judge.predict(self._wbench)
        self._logger.info("Judge prediction: %r", self._wbench)
        return IDX2CLS[lbl_idx]

    def save(self, a_path):
        """Dump model to disc.

        Args:
          a_models (list[str]): type of the models to train

        """
        dirname = self._check_path(a_path)
        # store each trained model
        for i, model_i in enumerate(self._models):
            self._logger.debug("Saving model in %s", dirname)
            self._save_model(model_i, dirname)
            self._models[i] = model_i = None
            gc.collect()
        self._reset()
        dump(self, a_path)

    def _check_path(self, a_path):
        """Check whether path can be created and is writable.

        Args:
          a_path (str): file path to be checked

        Returns:
          str: directory name of the path

        """
        dirname = os.path.dirname(a_path)
        if not os.path.exists(dirname):
            os.makedirs(dirname)
        elif not os.path.exists(a_path):
            if not os.access(dirname, os.W_OK) or \
               not os.path.isdir(dirname):
                raise RuntimeError("Cannot write to directory '{:s}'.".format(
                    dirname))
        else:
            if not os.access(a_path, os.W_OK):
                raise RuntimeError("Cannot write to file '{:s}'.".format(
                    a_path))
        return dirname

    def _init_models(self, a_models, *a_args, **a_kwargs):
        """Initialize specified models.

        Args:
          a_models (list[str]): type of the models to train
          a_args (list[str]): arguments to use for initializing models
          a_kwargs (dict): keyword arguments to use for initializing models

        Returns:
          void:

        """
        for model_i in a_models:
            if model_i == BAZIOTIS:
                from cgsa.dl.baziotis import BaziotisAnalyzer
                analyzer_cls = BaziotisAnalyzer
            elif model_i == BILSTM:
                from cgsa.dl.bilstm import BiLSTMAnalyzer
                analyzer_cls = BiLSTMAnalyzer
            elif model_i == GAMON:
                from cgsa.ml.gamon import GamonAnalyzer
                analyzer_cls = GamonAnalyzer
            elif model_i == GUENTHER:
                from cgsa.ml.guenther import GuentherAnalyzer
                analyzer_cls = GuentherAnalyzer
            elif model_i == HU_LIU:
                from cgsa.lexicon.hu_liu import HuLiuAnalyzer
                analyzer_cls = HuLiuAnalyzer
            elif model_i == JUREK:
                from cgsa.lexicon.jurek import JurekAnalyzer
                analyzer_cls = JurekAnalyzer
            elif model_i == KOLCHYNA:
                from cgsa.lexicon.kolchyna import KolchynaAnalyzer
                analyzer_cls = KolchynaAnalyzer
            elif model_i == LBA:
                from cgsa.dl.lba import LBAAnalyzer
                analyzer_cls = LBAAnalyzer
            elif model_i == MUSTO:
                from cgsa.lexicon.musto import MustoAnalyzer
                analyzer_cls = MustoAnalyzer
            elif model_i == MOHAMMAD:
                from cgsa.ml.mohammad import MohammadAnalyzer
                analyzer_cls = MohammadAnalyzer
            elif model_i == MVRNN:
                from cgsa.dl.mvrnn import MVRNNAnalyzer
                analyzer_cls = MVRNNAnalyzer
            elif model_i == RNN:
                from cgsa.dl.rnn import RNNAnalyzer
                analyzer_cls = RNNAnalyzer
            elif model_i == RNTN:
                from cgsa.dl.rntn import RNTNAnalyzer
                analyzer_cls = RNTNAnalyzer
            elif model_i == SEVERYN:
                from cgsa.dl.severyn import SeverynAnalyzer
                analyzer_cls = SeverynAnalyzer
            elif model_i == TABOADA:
                from cgsa.lexicon.taboada import TaboadaAnalyzer
                analyzer_cls = TaboadaAnalyzer
            elif model_i == YESSENALINA:
                from cgsa.dl.yessenalina import YessenalinaAnalyzer
                analyzer_cls = YessenalinaAnalyzer
            else:
                raise NotImplementedError
            self._models.append(analyzer_cls(*a_args, **a_kwargs))

    def _generate_ts(self, a_data):
        """Generate training set.

        Args:
          a_data (list): input instances

        Returns:
          2-tuple(list, list):
            lists of input features and expected classes

        """
        x, y = [], []
        if not a_data:
            return (x, y)
        for msg_i in a_data:
            if not msg_i:
                continue
            x.append(msg_i)
            y_i = msg_i.label
            # we use a pre-defined mapping of symbolic labels to integers, as
            # we need these labels to be sorted proportionally to the
            # subjective scores they get assigned when optimizing threshold of
            # lexicon-based methods
            assert y_i in CLS2IDX, "Unknown label {:s}".format(y_i)
            y_i = CLS2IDX[y_i]
            y.append(y_i)
        return (x, y)

    def _prejudge(self, a_rel, a_data):
        """Collect judgments of single classifiers.

        Args:
          a_rel (dict):
            discourse relation whose sense should be predicted
          a_data (2-tuple(dict, dict)):
            list of input JSON data

        Returns:
          np.array: modified ``a_ret``

        """
        if self._wbench is None:
            self._wbench = np.zeros((len(self._models), len(CLS2IDX)))
        else:
            self._wbench *= 0
        for i, model_i in enumerate(self._models):
            model_i.predict(a_rel, a_data, self._wbench, i)
        return self._wbench

    def _reset(self):
        """Remove members which cannot be serialized.

        """
        self._wbench = None
        self._logger = None
        self._models = []
        self._embeddings = None

    def _save_model(self, a_model, a_path):
        """Save single model to specifid path.

        Args:
          a_model (cgsa.BaseAnalyzer): prediction model
          a_path (str): file path to be checked

        Returns:
          str: directory name of the path

        """
        relpath = a_model.name + ".model"
        abspath = os.path.join(a_path, relpath)
        self._logger.info("Saving model %s to %s...",
                          a_model.name, abspath
                          )
        a_model.reset()
        if isinstance(a_model, DLBaseAnalyzer):
            a_model.save(abspath)
        else:
            with open(abspath, "wb") as ofile:
                dump(a_model, ofile)
        self._logger.info(
            "Model %s saved to %s...",
            a_model.name, abspath
        )
        self._model_paths.append(
            os.path.relpath(abspath, a_path)
        )
        return self._model_paths[-1]


text:
Given(/the following JSON schema:$/) do |schema|
  @schema = schema
end

When(/^I run the JSON data generator$/) do
  @output = JsonTestData.generate!(@schema)
end

When(/^I run the JSON data generator with the "ruby" option$/) do
  @output = JsonTestData.generate!(@schema, ruby: true)
end

Then(/^the output should match the schema$/) do
  expect(@output).to match_schema(@schema)
end

Then(/^the output should be a Ruby hash$/) do
  expect(@output).to be_a(Hash)
end

Then(/^the output should be a Ruby array$/) do
  expect(@output).to be_a(Array)
end


text:
/*
 * Project: Things
 * Contributor(s): M.A.Tucker, Adaptive Handy Apps, LLC
 * Origination: M.A.Tucker JAN 2017
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.adaptivehandyapps.ahathing.dao;

import com.google.gson.annotations.SerializedName;

import java.util.ArrayList;
import java.util.List;

///////////////////////////////////////////////////////////////////////////
public class DaoBaseRepo {
//	public static final String JSON_CONTAINER = "theatres";

	@SerializedName("monikerList")
	private List<String> monikerList;
	@SerializedName("daoList")
	private List<Object> daoList;

	public DaoBaseRepo(){
		monikerList = new ArrayList<>();
		daoList = new ArrayList<>();
	}

	///////////////////////////////////////////////////////////////////////////
	public Boolean set(Object object) {
		// copying results in object not updating in consumer after set
//		DaoBase daoBase = (DaoBase) object;
		// if repo contains object
		if (contains(((DaoBase) object).getMoniker())) {
			// update object
			daoList.set(indexOf(((DaoBase) object).getMoniker()), object);
		}
		else {
			// new object
			monikerList.add(((DaoBase) object).getMoniker());
			daoList.add(object);
		}
		return true;
	}
	///////////////////////////////////////////////////////////////////////////
	public Object get(String monikerTest) {
		Object object = null;
		int inx = monikerList.indexOf(monikerTest);
		if (inx != -1) {
			object = daoList.get(inx);
		}
		return object;
	}
	///////////////////////////////////////////////////////////////////////////
	public Object get(int inx) {
		Object object = null;
		if (inx > -1 && inx < daoList.size()) {
			object = daoList.get(inx);
		}
		return object;
	}
	///////////////////////////////////////////////////////////////////////////
	public List<String> getMonikerList() {
		return monikerList;
	}
	public List<Object> getDaoList() {
		return daoList;
	}
	///////////////////////////////////////////////////////////////////////////
	public Boolean remove(String moniker) {
		int inx = monikerList.indexOf(moniker);
		if (inx != -1) {
			monikerList.remove(inx);
			daoList.remove(inx);
			return true;
		}
		return false;
	}
	///////////////////////////////////////////////////////////////////////////
	public Boolean contains(String moniker) {
		return monikerList.contains(moniker);
	}
	///////////////////////////////////////////////////////////////////////////
	public int indexOf(String moniker) {
		return monikerList.indexOf(moniker);
	}
	///////////////////////////////////////////////////////////////////////////
	public int size() {
		return monikerList.size();
	}
}
///////////////////////////////////////////////////////////////////////////


text:
NSString * const kGTLRBloggerOrderByOrderByUnspecified = @"ORDER_BY_UNSPECIFIED";
NSString * const kGTLRBloggerOrderByPublished          = @"PUBLISHED";
NSString * const kGTLRBloggerOrderByUpdated            = @"UPDATED";

// range
NSString * const kGTLRBloggerRangeAll     = @"all";
NSString * const kGTLRBloggerRangeX30days = @"30DAYS";
NSString * const kGTLRBloggerRangeX7days  = @"7DAYS";

// role
NSString * const kGTLRBloggerRoleAdmin               = @"ADMIN";
NSString * const kGTLRBloggerRoleAuthor              = @"AUTHOR";
NSString * const kGTLRBloggerRoleReader              = @"READER";
NSString * const kGTLRBloggerRoleViewTypeUnspecified = @"VIEW_TYPE_UNSPECIFIED";

// status
NSString * const kGTLRBloggerStatusDeleted     = @"DELETED";
NSString * const kGTLRBloggerStatusDraft       = @"DRAFT";
NSString * const kGTLRBloggerStatusEmptied     = @"EMPTIED";
NSString * const kGTLRBloggerStatusLive        = @"LIVE";
NSString * const kGTLRBloggerStatusPending     = @"PENDING";
NSString * const kGTLRBloggerStatusScheduled   = @"SCHEDULED";
NSString * const kGTLRBloggerStatusSoftTrashed = @"SOFT_TRASHED";
NSString * const kGTLRBloggerStatusSpam        = @"SPAM";

// view
NSString * const kGTLRBloggerViewAdmin               = @"ADMIN";
NSString * const kGTLRBloggerViewAuthor              = @"AUTHOR";
NSString * const kGTLRBloggerViewReader              = @"READER";
NSString * const kGTLRBloggerViewViewTypeUnspecified = @"VIEW_TYPE_UNSPECIFIED";

// ----------------------------------------------------------------------------
// Query Classes
//

@implementation GTLRBloggerQuery

@dynamic fields;

@end

@implementation GTLRBloggerQuery_BlogsGet

@dynamic blogId, maxPosts, view;

+ (instancetype)queryWithBlogId:(NSString *)blogId {
  NSArray *pathParams = @[ @"blogId" ];
  NSString *pathURITemplate = @"v3/blogs/{blogId}";
  GTLRBloggerQuery_BlogsGet *query =
    [[self alloc] initWithPathURITemplate:pathURITemplate
                               HTTPMethod:nil
                       pathParameterNames:pathParams];
  query.blogId = blogId;
  query.expectedObjectClass = [GTLRBlogger_Blog class];
  query.loggingName = @"blogger.blogs.get";
  return query;
}

@end

@implementation GTLRBloggerQuery_BlogsGetByUrl

@dynamic url, view;

+ (instancetype)queryWithUrl:(NSString *)url {
  NSString *pathURITemplate = @"v3/blogs/byurl";
  GTLRBloggerQuery_BlogsGetByUrl *query =
    [[self alloc] initWithPathURITemplate:pathURITemplate
                               HTTPMethod:nil
                       pathParameterNames:nil];
  query.url = url;
  query.expectedObjectClass = [GTLRBlogger_Blog class];
  query.loggingName = @"blogger.blogs.getByUrl";
  return query;
}

@end

@implementation GTLRBloggerQuery_BlogsListByUser

@dynamic fetchUserInfo, role, status, userId, view;

+ (NSDictionary<NSString *, Class> *)arrayPropertyToClassMap {
  NSDictionary<NSString *, Class> *map = @{
    @"role" : [NSString class],
    @"status" : [NSString class]
  };
  return map;
}

+ (instancetype)queryWithUserId:(NSString *)userId {
  NSArray *pathParams = @[ @"userId" ];
  NSString *pathURITemplate = @"v3/users/{userId}/blogs";
  GTLRBloggerQuery_BlogsListByUser *query =
    [[self alloc] initWithPathURITemplate:pathURITemplate
                               HTTPMethod:nil
                       pathParameterNames:pathParams];
  query.userId = userId;
  query.expectedObjectClass = [GTLRBlogger_BlogList class];
  query.loggingName = @"blogger.blogs.listByUser";
  return query;
}

@end

@implementation GTLRBloggerQuery_BlogUserInfosGet

@dynamic blogId, maxPosts, userId;

+ (instancetype)queryWithUserId:(NSString *)userId
                         blogId:(NSString *)blogId {
  NSArray *pathParams = @[
    @"blogId", @"userId"
  ];
  NSString *pathURITemplate = @"v3/users/{userId}/blogs/{blogId}";
  GTLRBloggerQuery_BlogUserInfosGet *query =
    [[self alloc] initWithPathURITemplate:pathURITemplate
                               HTTPMethod:nil
                       pathParameterNames:pathParams];
  query.userId = userId;
  query.blogId = blogId;
  query.expectedObjectClass = [GTLRBlogger_BlogUserInfo class];
  query.loggingName = @"blogger.blogUserInfos.get";
  return query;
}

@end

@implementation GTLRBloggerQuery_CommentsApprove

@dynamic blogId, commentId, postId;

+ (instancetype)queryWithBlogId:(NSString *)blogId
                         postId:(NSString *)postId
                      commentId:(NSString *)commentId {
  NSArray *pathParams = @[
    @"blogId", @"commentId", @"postId"
  ];
  NSString *pathURITemplate = @"v3/blogs/{blogId}/posts/{postId}/comments/{commentId}/approve";
  GTLRBloggerQuery_CommentsApprove *query =
    [[self alloc] initWithPathURITemplate:pathURITemplate
                               HTTPMethod:@"POST"
                       pathParameterNames:pathParams];
  query.blogId = blogId;
  query.postId = postId;
  query.commentId = commentId;
  query.expectedObjectClass = [GTLRBlogger_Comment class];
  query.loggingName = @"blogger.comments.approve";
  return query;
}

@end

@implementation GTLRBloggerQuery_CommentsDelete

@dynamic blogId, commentId, postId;

+ (instancetype)queryWithBlogId:(NSString *)blogId
                         postId:(NSString *)postId
                      commentId:(NSString *)commentId {
  NSArray *pathParams = @[
    @"blogId", @"commentId", @"postId"
  ];
  NSString *pathURITemplate = @"v3/blogs/{blogId}/posts/{postId}/comments/{commentId}";
  GTLRBloggerQuery_CommentsDelete *query =
    [[self alloc] initWithPathURITemplate:pathURITemplate
                               HTTPMethod:@"DELETE"
                       pathParameterNames:pathParams];
  query.blogId = blogId;
  query.postId = postId;
  query.commentId = commentId;
  query.loggingName = @"blogger.comments.delete";
  return query;
}

@end

@implementation GTLRBloggerQuery_CommentsGet

@dynamic blogId, commentId, postId, view;

+ (instancetype)queryWithBlogId:(NSString *)blogId
                         postId:(NSString *)postId
                      commentId:(NSString *)commentId {
  NSArray *pathParams = @[
    @"blogId", @"commentId", @"postId"
  ];
  NSString *pathURITemplate = @"v3/blogs/{blogId}/posts/{postId}/comments/{commentId}";
  GTLRBloggerQuery_CommentsGet *query =
    [[self alloc] initWithPathURITemplate:pathURITemplate
                               HTTPMethod:nil
                       pathParameterNames:pathParams];
  query.blogId = blogId;
  query.postId = postId;
  query.commentId = commentId;
  query.expectedObjectClass = [GTLRBlogger_Comment class];
  query.loggingName = @"blogger.comments.get";
  return query;
}

@end

@implementation GTLRBloggerQuery_CommentsList

@dynamic blogId, endDate, fetchBodies, maxResults, pageToken, postId, startDate,
         status, view;

+ (instancetype)queryWithBlogId:(NSString *)blogId
                         postId:(NSString *)postId {
  NSArray *pathParams = @[
    @"blogId", @"postId"
  ];
  NSString *pathURITemplate = @"v3/blogs/{blogId}/posts/{postId}/comments";
  GTLRBloggerQuery_CommentsList *query =
    [[self alloc] initWithPathURITemplate:pathURITemplate
                               HTTPMethod:nil
                       pathParameterNames:pathParams];
  query.blogId = blogId;
  query.postId = postId;
  query.expectedObjectClass = [GTLRBlogger_CommentList class];
  query.loggingName = @"blogger.comments.list";
  return query;
}

@end

@implementation GTLRBloggerQuery_CommentsListByBlog

@dynamic blogId, endDate, fetchBodies, maxResults, pageToken, startDate, status;

+ (NSDictionary<NSString *, Class> *)arrayPropertyToClassMap {
  NSDictionary<NSString *, Class> *map = @{
    @"status" : [NSString class]
  };
  return map;
}

+ (instancetype)queryWithBlogId:(NSString *)blogId {
  NSArray *pathParams = @[ @"blogId" ];
  NSString *pathURITemplate = @"v3/blogs/{blogId}/comments";
  GTLRBloggerQuery_CommentsListByBlog *query =
    [[self alloc] initWithPathURITemplate:pathURITemplate
                               HTTPMethod:nil
                       pathParameterNames:pathParams];
  query.blogId = blogId;
  query.expectedObjectClass = [GTLRBlogger_CommentList class];
  query.loggingName = @"blogger.comments.listByBlog";
  return query;
}

@end

@implementation GTLRBloggerQuery_CommentsMarkAsSpam

@dynamic blogId, commentId, postId;

+ (instancetype)queryWithBlogId:(NSString *)blogId
                         postId:(NSString *)postId
                      commentId:(NSString *)commentId {
  NSArray *pathParams = @[
    @"blogId", @"commentId", @"postId"
  ];
  NSString *pathURITemplate = @"v3/blogs/{blogId}/posts/{postId}/comments/{commentId}/spam";
  GTLRBloggerQuery_CommentsMarkAsSpam *query =
    [[self alloc] initWithPathURITemplate:pathURITemplate
                               HTTPMethod:@"POST"
                       pathParameterNames:pathParams];
  query.blogId = blogId;
  query.postId = postId;
  query.commentId = commentId;
  query.expectedObjectClass = [GTLRBlogger_Comment class];
  query.loggingName = @"blogger.comments.markAsSpam";
  return query;
}

@end

@implementation GTLRBloggerQuery_CommentsRemoveContent

@dynamic blogId, commentId, postId;

+ (instancetype)queryWithBlogId:(NSString *)blogId
                         postId:(NSString *)postId
                      commentId:(NSString *)commentId {
  NSArray *pathParams = @[
    @"blogId", @"commentId", @"postId"
  ];
  NSString *pathURITemplate = @"v3/blogs/{blogId}/posts/{postId}/comments/{commentId}/removecontent";
  GTLRBloggerQuery_CommentsRemoveContent *query =
    [[self alloc] initWithPathURITemplate:pathURITemplate
                               HTTPMethod:@"POST"
                       pathParameterNames:pathParams];
  query.blogId = blogId;
  query.postId = postId;
  query.commentId = commentId;
  query.expectedObjectClass = [GTLRBlogger_Comment class];
  query.loggingName = @"blogger.comments.removeContent";
  return query;
}

@end

@implementation GTLRBloggerQuery_PagesDelete

@dynamic blogId, pageId;

+ (instancetype)queryWithBlogId:(NSString *)blogId
                         pageId:(NSString *)pageId {
  NSArray *pathParams = @[
    @"blogId", @"pageId"
  ];
  NSString *pathURITemplate = @"v3/blogs/{blogId}/pages/{pageId}";
  GTLRBloggerQuery_PagesDelete *query =
    [[self alloc] initWithPathURITemplate:pathURITemplate
                               HTTPMethod:@"DELETE"
                       pathParameterNames:pathParams];
  query.blogId = blogId;
  query.pageId = pageId;
  query.loggingName = @"blogger.pages.delete";
  return query;
}

@end

@implementation GTLRBloggerQuery_PagesGet

@dynamic blogId, pageId, view;

+ (instancetype)queryWithBlogId:(NSString *)blogId
                         pageId:(NSString *)pageId {
  NSArray *pathParams = @[
    @"blogId", @"pageId"
  ];
  NSString *pathURITemplate = @"v3/blogs/{blogId}/pages/{pageId}";
  GTLRBloggerQuery_PagesGet *query =
    [[self alloc] initWithPathURITemplate:pathURITemplate
                               HTTPMethod:nil
                       pathParameterNames:pathParams];
  query.blogId = blogId;
  query.pageId = pageId;
  query.expectedObjectClass = [GTLRBlogger_Page class];
  query.loggingName = @"blogger.pages.get";
  return query;
}

@end

@implementation GTLRBloggerQuery_PagesInsert

@dynamic blogId, isDraft;

+ (instancetype)queryWithObject:(GTLRBlogger_Page *)object
                         blogId:(NSString *)blogId {
  if (object == nil) {
#if defined(DEBUG) && DEBUG
    NSAssert(object != nil, @"Got a nil object");
#endif
    return nil;
  }
  NSArray *pathParams = @[ @"blogId" ];
  NSString *pathURITemplate = @"v3/blogs/{blogId}/pages";
  GTLRBloggerQuery_PagesInsert *query =
    [[self alloc] initWithPathURITemplate:pathURITemplate
                               HTTPMethod:@"POST"
                       pathParameterNames:pathParams];
  query.bodyObject = object;
  query.blogId = blogId;
  query.expectedObjectClass = [GTLRBlogger_Page class];
  query.loggingName = @"blogger.pages.insert";
  return query;
}

@end

@implementation GTLRBloggerQuery_PagesList

@dynamic blogId, fetchBodies, maxResults, pageToken, status, view;

+ (NSDictionary<NSString *, Class> *)arrayPropertyToClassMap {
  NSDictionary<NSString *, Class> *map = @{
    @"status" : [NSString class]
  };
  return map;
}

+ (instancetype)queryWithBlogId:(NSString *)blogId {
  NSArray *pathParams = @[ @"blogId" ];
  NSString *pathURITemplate = @"v3/blogs/{blogId}/pages";
  GTLRBloggerQuery_PagesList *query =
    [[self alloc] initWithPathURITemplate:pathURITemplate
                               HTTPMethod:nil
                       pathParameterNames:pathParams];
  query.blogId = blogId;
  query.expectedObjectClass = [GTLRBlogger_PageList class];
  query.loggingName = @"blogger.pages.list";
  return query;
}

@end

@implementation GTLRBloggerQuery_PagesPatch

@dynamic blogId, pageId, publish, revert;

+ (instancetype)queryWithObject:(GTLRBlogger_Page *)object
                         blogId:(NSString *)blogId
                         pageId:(NSString *)pageId {
  if (object == nil) {
#if defined(DEBUG) && DEBUG
    NSAssert(object != nil, @"Got a nil object");
#endif
    return nil;
  }
  NSArray *pathParams = @[
    @"blogId", @"pageId"
  ];
  NSString *pathURITemplate = @"v3/blogs/{blogId}/pages/{pageId}";
  GTLRBloggerQuery_PagesPatch *query =
    [[self alloc] initWithPathURITemplate:pathURITemplate
                               HTTPMethod:@"PATCH"
                       pathParameterNames:pathParams];
  query.bodyObject = object;
  query.blogId = blogId;
  query.pageId = pageId;
  query.expectedObjectClass = [GTLRBlogger_Page class];
  query.loggingName = @"blogger.pages.patch";
  return query;
}

@end

@implementation GTLRBloggerQuery_PagesPublish

@dynamic blogId, pageId;

+ (instancetype)queryWithBlogId:(NSString *)blogId
                         pageId:(NSString *)pageId {
  NSArray *pathParams = @[
    @"blogId", @"pageId"
  ];
  NSString *pathURITemplate = @"v3/blogs/{blogId}/pages/{pageId}/publish";
  GTLRBloggerQuery_PagesPublish *query =
    [[self alloc] initWithPathURITemplate:pathURITemplate
                               HTTPMethod:@"POST"
                       pathParameterNames:pathParams];
  query.blogId = blogId;
  query.pageId = pageId;
  query.expectedObjectClass = [GTLRBlogger_Page class];
  query.loggingName = @"blogger.pages.publish";
  return query;
}

@end

@implementation GTLRBloggerQuery_PagesRevert

@dynamic blogId, pageId;

+ (instancetype)queryWithBlogId:(NSString *)blogId
                         pageId:(NSString *)pageId {
  NSArray *pathParams = @[
    @"blogId", @"pageId"
  ];
  NSString *pathURITemplate = @"v3/blogs/{blogId}/pages/{pageId}/revert";
  GTLRBloggerQuery_PagesRevert *query =
    [[self alloc] initWithPathURITemplate:pathURITemplate
                               HTTPMethod:@"POST"
                       pathParameterNames:pathParams];
  query.blogId = blogId;
  query.pageId = pageId;
  query.expectedObjectClass = [GTLRBlogger_Page class];
  query.loggingName = @"blogger.pages.revert";
  return query;
}

@end

@implementation GTLRBloggerQuery_PagesUpdate

@dynamic blogId, pageId, publish, revert;

+ (instancetype)queryWithObject:(GTLRBlogger_Page *)object
                         blogId:(NSString *)blogId
                         pageId:(NSString *)pageId {
  if (object == nil) {
#if defined(DEBUG) && DEBUG
    NSAssert(object != nil, @"Got a nil object");
#endif
    return nil;
  }
  NSArray *pathParams = @[
    @"blogId", @"pageId"
  ];
  NSString *pathURITemplate = @"v3/blogs/{blogId}/pages/{pageId}";
  GTLRBloggerQuery_PagesUpdate *query =
    [[self alloc] initWithPathURITemplate:pathURITemplate
                               HTTPMethod:@"PUT"
                       pathParameterNames:pathParams];
  query.bodyObject = object;
  query.blogId = blogId;
  query.pageId = pageId;
  query.expectedObjectClass = [GTLRBlogger_Page class];
  query.loggingName = @"blogger.pages.update";
  return query;
}

@end

@implementation GTLRBloggerQuery_PageViewsGet

@dynamic blogId, range;

+ (NSDictionary<NSString *, Class> *)arrayPropertyToClassMap {
  NSDictionary<NSString *, Class> *map = @{
    @"range" : [NSString class]
  };
  return map;
}

+ (instancetype)queryWithBlogId:(NSString *)blogId {
  NSArray *pathParams = @[ @"blogId" ];
  NSString *pathURITemplate = @"v3/blogs/{blogId}/pageviews";
  GTLRBloggerQuery_PageViewsGet *query =
    [[self alloc] initWithPathURITemplate:pathURITemplate
                               HTTPMethod:nil
                       pathParameterNames:pathParams];
  query.blogId = blogId;
  query.expectedObjectClass = [GTLRBlogger_Pageviews class];
  query.loggingName = @"blogger.pageViews.get";
  return query;
}

@end

@implementation GTLRBloggerQuery_PostsDelete

@dynamic blogId, postId;

+ (instancetype)queryWithBlogId:(NSString *)blogId
                         postId:(NSString *)postId {
  NSArray *pathParams = @[
    @"blogId", @"postId"
  ];
  NSString *pathURITemplate = @"v3/blogs/{blogId}/posts/{postId}";
  GTLRBloggerQuery_PostsDelete *query =
    [[self alloc] initWithPathURITemplate:pathURITemplate
                               HTTPMethod:@"DELETE"
                       pathParameterNames:pathParams];
  query.blogId = blogId;
  query.postId = postId;
  query.loggingName = @"blogger.posts.delete";
  return query;
}

@end

@implementation GTLRBloggerQuery_PostsGet

@dynamic blogId, fetchBody, fetchImages, maxComments, postId, view;

+ (instancetype)queryWithBlogId:(NSString *)blogId
                         postId:(NSString *)postId {
  NSArray *pathParams = @[
    @"blogId", @"postId"
  ];
  NSString *pathURITemplate = @"v3/blogs/{blogId}/posts/{postId}";
  GTLRBloggerQuery_PostsGet *query =
    [[self alloc] initWithPathURITemplate:pathURITemplate
                               HTTPMethod:nil
                       pathParameterNames:pathParams];
  query.blogId = blogId;
  query.postId = postId;
  query.expectedObjectClass = [GTLRBlogger_Post class];
  query.loggingName = @"blogger.posts.get";
  return query;
}

@end

@implementation GTLRBloggerQuery_PostsGetByPath

@dynamic blogId, maxComments, path, view;

+ (instancetype)queryWithBlogId:(NSString *)blogId
                           path:(NSString *)path {
  NSArray *pathParams = @[ @"blogId" ];
  NSString *pathURITemplate = @"v3/blogs/{blogId}/posts/bypath";
  GTLRBloggerQuery_PostsGetByPath *query =
    [[self alloc] initWithPathURITemplate:pathURITemplate
                               HTTPMethod:nil
                       pathParameterNames:pathParams];
  query.blogId = blogId;
  query.path = path;
  query.expectedObjectClass = [GTLRBlogger_Post class];
  query.loggingName = @"blogger.posts.getByPath";
  return query;
}

@end

@implementation GTLRBloggerQuery_PostsInsert

@dynamic blogId, fetchBody, fetchImages, isDraft;

+ (instancetype)queryWithObject:(GTLRBlogger_Post *)object
                         blogId:(NSString *)blogId {
  if (object == nil) {
#if defined(DEBUG) && DEBUG
    NSAssert(object != nil, @"Got a nil object");
#endif
    return nil;
  }
  NSArray *pathParams = @[ @"blogId" ];
  NSString *pathURITemplate = @"v3/blogs/{blogId}/posts";
  GTLRBloggerQuery_PostsInsert *query =
    [[self alloc] initWithPathURITemplate:pathURITemplate
                               HTTPMethod:@"POST"
                       pathParameterNames:pathParams];
  query.bodyObject = object;
  query.blogId = blogId;
  query.expectedObjectClass = [GTLRBlogger_Post class];
  query.loggingName = @"blogger.posts.insert";
  return query;
}

@end

@implementation GTLRBloggerQuery_PostsList

@dynamic blogId, endDate, fetchBodies, fetchImages, labels, maxResults, orderBy,
         pageToken, startDate, status, view;

+ (NSDictionary<NSString *, Class> *)arrayPropertyToClassMap {
  NSDictionary<NSString *, Class> *map = @{
    @"status" : [NSString class]
  };
  return map;
}

+ (instancetype)queryWithBlogId:(NSString *)blogId {
  NSArray *pathParams = @[ @"blogId" ];
  NSString *pathURITemplate = @"v3/blogs/{blogId}/posts";
  GTLRBloggerQuery_PostsList *query =
    [[self alloc] initWithPathURITemplate:pathURITemplate
                               HTTPMethod:nil
                       pathParameterNames:pathParams];
  query.blogId = blogId;
  query.expectedObjectClass = [GTLRBlogger_PostList class];
  query.loggingName = @"blogger.posts.list";
  return query;
}

@end

@implementation GTLRBloggerQuery_PostsPatch

@dynamic blogId, fetchBody, fetchImages, maxComments, postId, publish, revert;

+ (instancetype)queryWithObject:(GTLRBlogger_Post *)object
                         blogId:(NSString *)blogId
                         postId:(NSString *)postId {
  if (object == nil) {
#if defined(DEBUG) && DEBUG
    NSAssert(object != nil, @"Got a nil object");
#endif
    return nil;
  }
  NSArray *pathParams = @[
    @"blogId", @"postId"
  ];
  NSString *pathURITemplate = @"v3/blogs/{blogId}/posts/{postId}";
  GTLRBloggerQuery_PostsPatch *query =
    [[self alloc] initWithPathURITemplate:pathURITemplate
                               HTTPMethod:@"PATCH"
                       pathParameterNames:pathParams];
  query.bodyObject = object;
  query.blogId = blogId;
  query.postId = postId;
  query.expectedObjectClass = [GTLRBlogger_Post class];
  query.loggingName = @"blogger.posts.patch";
  return query;
}

@end

@implementation GTLRBloggerQuery_PostsPublish

@dynamic blogId, postId, publishDate;

+ (instancetype)queryWithBlogId:(NSString *)blogId
                         postId:(NSString *)postId {
  NSArray *pathParams = @[
    @"blogId", @"postId"
  ];
  NSString *pathURITemplate = @"v3/blogs/{blogId}/posts/{postId}/publish";
  GTLRBloggerQuery_PostsPublish *query =
    [[self alloc] initWithPathURITemplate:pathURITemplate
                               HTTPMethod:@"POST"
                       pathParameterNames:pathParams];
  query.blogId = blogId;
  query.postId = postId;
  query.expectedObjectClass = [GTLRBlogger_Post class];
  query.loggingName = @"blogger.posts.publish";
  return query;
}

@end

@implementation GTLRBloggerQuery_PostsRevert

@dynamic blogId, postId;

+ (instancetype)queryWithBlogId:(NSString *)blogId
                         postId:(NSString *)postId {
  NSArray *pathParams = @[
    @"blogId", @"postId"
  ];
  NSString *pathURITemplate = @"v3/blogs/{blogId}/posts/{postId}/revert";
  GTLRBloggerQuery_PostsRevert *query =
    [[self alloc] initWithPathURITemplate:pathURITemplate
                               HTTPMethod:@"POST"
                       pathParameterNames:pathParams];
  query.blogId = blogId;
  query.postId = postId;
  query.expectedObjectClass = [GTLRBlogger_Post class];
  query.loggingName = @"blogger.posts.revert";
  return query;
}

@end

@implementation GTLRBloggerQuery_PostsSearch

@dynamic blogId, fetchBodies, orderBy, q;

+ (instancetype)queryWithBlogId:(NSString *)blogId
                              q:(NSString *)q {
  NSArray *pathParams = @[ @"blogId" ];
  NSString *pathURITemplate = @"v3/blogs/{blogId}/posts/search";
  GTLRBloggerQuery_PostsSearch *query =
    [[self alloc] initWithPathURITemplate:pathURITemplate
                               HTTPMethod:nil
                       pathParameterNames:pathParams];
  query.blogId = blogId;
  query.q = q;
  query.expectedObjectClass = [GTLRBlogger_PostList class];
  query.loggingName = @"blogger.posts.search";
  return query;
}

@end

@implementation GTLRBloggerQuery_PostsUpdate

@dynamic blogId, fetchBody, fetchImages, maxComments, postId, publish, revert;

+ (instancetype)queryWithObject:(GTLRBlogger_Post *)object
                         blogId:(NSString *)blogId
                         postId:(NSString *)postId {
  if (object == nil) {
#if defined(DEBUG) && DEBUG
    NSAssert(object != nil, @"Got a nil object");
#endif
    return nil;
  }
  NSArray *pathParams = @[
    @"blogId", @"postId"
  ];
  NSString *pathURITemplate = @"v3/blogs/{blogId}/posts/{postId}";
  GTLRBloggerQuery_PostsUpdate *query =
    [[self alloc] initWithPathURITemplate:pathURITemplate
                               HTTPMethod:@"PUT"
                       pathParameterNames:pathParams];
  query.bodyObject = object;
  query.blogId = blogId;
  query.postId = postId;
  query.expectedObjectClass = [GTLRBlogger_Post class];
  query.loggingName = @"blogger.posts.update";
  return query;
}

@end

@implementation GTLRBloggerQuery_PostUserInfosGet

@dynamic blogId, maxComments, postId, userId;

+ (instancetype)queryWithUserId:(NSString *)userId
                         blogId:(NSString *)blogId
                         postId:(NSString *)postId {
  NSArray *pathParams = @[
    @"blogId", @"postId", @"userId"
  ];
  NSString *pathURITemplate = @"v3/users/{userId}/blogs/{blogId}/posts/{postId}";
  GTLRBloggerQuery_PostUserInfosGet *query =
    [[self alloc] initWithPathURITemplate:pathURITemplate
                               HTTPMethod:nil
                       pathParameterNames:pathParams];
  query.userId = userId;
  query.blogId = blogId;
  query.postId = postId;
  query.expectedObjectClass = [GTLRBlogger_PostUserInfo class];
  query.loggingName = @"blogger.postUserInfos.get";
  return query;
}

@end

@implementation GTLRBloggerQuery_PostUserInfosList

@dynamic blogId, endDate, fetchBodies, labels, maxResults, orderBy, pageToken,
         startDate, status, userId, view;

+ (NSDictionary<NSString *, Class> *)arrayPropertyToClassMap {
  NSDictionary<NSString *, Class> *map = @{
    @"status" : [NSString class]
  };
  return map;
}

+ (instancetype)queryWithUserId:(NSString *)userId
                         blogId:(NSString *)blogId {
  NSArray *pathParams = @[
    @"blogId", @"userId"
  ];
  NSString *pathURITemplate = @"v3/users/{userId}/blogs/{blogId}/posts";
  GTLRBloggerQuery_PostUserInfosList *query =
    [[self alloc] initWithPathURITemplate:pathURITemplate
                               HTTPMethod:nil
                       pathParameterNames:pathParams];
  query.userId = userId;
  query.blogId = blogId;
  query.expectedObjectClass = [GTLRBlogger_PostUserInfosList class];
  query.loggingName = @"blogger.postUserInfos.list";
  return query;
}

@end

@implementation GTLRBloggerQuery_UsersGet

@dynamic userId;

+ (instancetype)queryWithUserId:(NSString *)userId {
  NSArray *pathParams = @[ @"userId" ];
  NSString *pathURITemplate = @"v3/users/{userId}";
  GTLRBloggerQuery_UsersGet *query =
    [[self alloc] initWithPathURITemplate:pathURITemplate
                               HTTPMethod:nil
                       pathParameterNames:pathParams];
  query.userId = userId;
  query.expectedObjectClass = [GTLRBlogger_User class];
  query.loggingName = @"blogger.users.get";
  return query;
}

@end


text:
'use babel';
const AtomMDWrap = require('../lib/atom-markdown-wrapper');
const MDWrap = require('../lib/mdwrap');

describe('Atom Markdown Wrapper', () => {
  let [editor, sel, txt, anchor, img, res] = [];

  beforeEach(() => {
    waitsForPromise(() => {
      return atom.workspace.open('sample.md');
    });

    waitsForPromise(() => {
      return atom.packages.activatePackage('language-gfm');
    });

    this.MDWrap = new MDWrap();

    return this.MDWrap;
  });

  afterEach(() => {
    atom.reset();

    return this.MDWrap.destroy();
  });

  it('should load correctly', () => {
    expect(AtomMDWrap).toBeDefined();
  });

  describe('MDWrap', () => {
    beforeEach(() => {
      editor = atom.workspace.getActiveTextEditor();
      sel = 'selection';
      txt = 'https://example.com';
      anchor = '#example';
      img = 'https://example.com/image.png';
    });

    afterEach(() => {
      editor = null;
      sel = null;
      txt = null;
      anchor = null;
      img = null;
    });

    it('should be defined', () => {
      expect(this.MDWrap).toBeDefined();
    });

    describe('.paste()', () => {
      it('should be defined', () => {
        expect(this.MDWrap.paste).toBeDefined();
      });

      it('should require three parameters', () => {
        spyOn(this.MDWrap, 'paste');

        this.MDWrap.paste(1, 2, 3);
        expect(this.MDWrap.paste).toHaveBeenCalledWith(1, 2, 3);
      });

      it('should only paste valid links', () => {
        let res = () => new MDWrap().paste(editor, sel, 'foobar');

        expect(res).toThrow('Not a valid URL or #anchor');
      });

      it(
        'should replace `selection` with [selection](https://example.com) for web links',
        () => {
          spyOn(this.MDWrap, 'paste').andCallThrough();

          res = this.MDWrap.paste(editor, sel, txt);
          expect(this.MDWrap.paste).toHaveBeenCalledWith(editor, sel, txt);
          expect(res).toBe('[selection](https://example.com)');
        }
      );

      it(
        'should replace `selection` with [selection](#example) for anchor links',
        () => {
          spyOn(this.MDWrap, 'paste').andCallThrough();

          res = this.MDWrap.paste(editor, sel, anchor);
          expect(this.MDWrap.paste).toHaveBeenCalledWith(editor, sel, anchor);
          expect(res).toBe('[selection](#example)');
        }
      );
    });

    describe('.image()', () => {
      it('should be defined', () => {
        expect(this.MDWrap.image).toBeDefined();
      });

      it('should require two parameters', () => {
        spyOn(this.MDWrap, 'image');

        this.MDWrap.image(1, 2);
        expect(this.MDWrap.image).toHaveBeenCalledWith(1, 2);
      });

      it('should accept three parameters', () => {
        spyOn(this.MDWrap, 'image');

        this.MDWrap.image(1, 2, 3);
        expect(this.MDWrap.image).toHaveBeenCalledWith(1, 2, 3);
      });

      it('should only paste valid URLs', () => {
        let res = () => new MDWrap().image(editor, sel, 'image');

        expect(res).toThrow('Not a valid image URL');
      });

      it('should insert ![](https://example.com/image.png)', () => {
        spyOn(this.MDWrap, 'image').andCallThrough();

        res = this.MDWrap.image(editor, undefined, img);
        expect(this.MDWrap.image).toHaveBeenCalledWith(editor, undefined, img);
        expect(res).toBe('![](https://example.com/image.png)');
      });

      it(
        'should replace `selection` with ![selection](https://example.com/image.png)',
        () => {
          spyOn(this.MDWrap, 'image').andCallThrough();

          res = this.MDWrap.image(editor, sel, img);
          expect(this.MDWrap.image).toHaveBeenCalledWith(editor, sel, img);
          expect(res).toBe('![selection](https://example.com/image.png)');
        }
      );
    });

    describe('.bold()', () => {
      it('should be defined', () => {
        expect(this.MDWrap.bold).toBeDefined();
      });

      it('should require 1 parameter', () => {
        spyOn(this.MDWrap, 'bold');

        this.MDWrap.bold(1);
        expect(this.MDWrap.bold).toHaveBeenCalledWith(1);
      });

      it('should insert **selection**', () => {
        spyOn(this.MDWrap, 'bold').andCallThrough();

        res = this.MDWrap.bold(editor);
        expect(this.MDWrap.bold).toHaveBeenCalledWith(editor);
        expect(typeof res).toBe('object');
        expect(res.length).toBe(1);
        expect(res[0]).toBe(false);
      });
    });

    describe('.italic()', () => {
      it('should be defined', () => {
        expect(this.MDWrap.italic).toBeDefined();
      });

      it('should require 1 parameter', () => {
        spyOn(this.MDWrap, 'italic');

        this.MDWrap.italic(1);
        expect(this.MDWrap.italic).toHaveBeenCalledWith(1);
      });

      it('should insert _selection_', () => {
        spyOn(this.MDWrap, 'italic').andCallThrough();

        res = this.MDWrap.italic(editor);
        expect(this.MDWrap.italic).toHaveBeenCalledWith(editor);
        expect(typeof res).toBe('object');
        expect(res.length).toBe(1);
        expect(res[0]).toBe(false);
      });
    });

    describe('.strikethrough()', () => {
      it('should be defined', () => {
        expect(this.MDWrap.strikethrough).toBeDefined();
      });

      it('should require 1 parameter', () => {
        spyOn(this.MDWrap, 'strikethrough');

        this.MDWrap.strikethrough(1);
        expect(this.MDWrap.strikethrough).toHaveBeenCalledWith(1);
      });

      it('should insert ~~selection~~', () => {
        spyOn(this.MDWrap, 'strikethrough').andCallThrough();

        res = this.MDWrap.strikethrough(editor);
        expect(this.MDWrap.strikethrough).toHaveBeenCalledWith(editor);
        expect(typeof res).toBe('object');
        expect(res.length).toBe(1);
        expect(res[0]).toBe(false);
      });
    });
  });
});


text:
'use strict';

var path = require('path');

var mjml = require('mjml');

module.exports = function(grunt) {

  function compile(src, dest){
    var srcContent;
    var res;
    try{
      srcContent = grunt.file.read(src);
      res = (mjml.mjml2html || mjml)(srcContent);
      if (res.errors && res.errors.length) {
        grunt.log.error('error processing file ' + src);
        grunt.fatal(JSON.stringify(res.errors, null, 4));
      } else {
        // write result
        grunt.file.write(dest, res.html);
        // Print a success message.
        grunt.log.writeln('File "' + dest + '" created.');
      }
    } catch(e) {
      grunt.log.error('error processing file ' + src);
      grunt.fatal(e);
    }
  }

  // Please see the Grunt documentation for more information regarding task
  // creation: http://gruntjs.com/creating-tasks

  grunt.registerMultiTask('mjml', 'Grunt integration for mjml, the email template engine', function() {
    // Merge task-specific and/or target-specific options with these defaults.
    var options = this.options({
    });

    // Iterate over all specified file groups.
    this.files.forEach(function(f) {

      var isDestFile = path.extname(f.dest)?true:false;

      f.src.filter(function(src){
        return grunt.file.isFile(src);
      }).forEach(function(src){
        // Write the destination file.
        if(!isDestFile) {
          compile(src, path.join( f.dest , path.basename(src)));
        } else {
          compile(src, f.dest);
        }
      });

    });
  });

};


text:
package com.intellij.vcs.log;

import com.intellij.openapi.vcs.changes.Change;
import org.jetbrains.annotations.NotNull;

import java.util.Collection;

/**
 * All metadata + changes.
 */
public interface VcsFullCommitDetails extends VcsCommitMetadata {

  /**
   * For a merge commit this method should return combined changes from all parents.
   */
  @NotNull
  Collection<Change> getChanges();

  @NotNull
  Collection<Change> getChanges(int parent);
}


text:
#include <utility>

#include "tensorflow/core/framework/dataset.h"
#include "tensorflow/core/framework/partial_tensor_shape.h"
#include "tensorflow/core/framework/tensor.h"
#include "tensorflow/core/kernels/data/experimental/sql/driver_manager.h"
#include "tensorflow/core/kernels/data/experimental/sql/query_connection.h"
#include "tensorflow/core/lib/io/inputbuffer.h"
#include "tensorflow/core/lib/io/record_reader.h"
#include "tensorflow/core/lib/strings/stringprintf.h"

namespace tensorflow {
namespace data {
namespace experimental {
namespace {

class SqlDatasetOp : public DatasetOpKernel {
 public:
  explicit SqlDatasetOp(OpKernelConstruction* ctx) : DatasetOpKernel(ctx) {
    OP_REQUIRES_OK(ctx, ctx->GetAttr("output_types", &output_types_));
    OP_REQUIRES_OK(ctx, ctx->GetAttr("output_shapes", &output_shapes_));
    for (const DataType& dt : output_types_) {
      OP_REQUIRES(ctx,
                  dt == DT_STRING || dt == DT_INT8 || dt == DT_INT16 ||
                      dt == DT_INT32 || dt == DT_INT64 || dt == DT_UINT8 ||
                      dt == DT_UINT16 || dt == DT_BOOL || dt == DT_DOUBLE,
                  errors::InvalidArgument(
                      "Each element of `output_types_` must be one of: "
                      "DT_STRING, DT_INT8, DT_INT16, DT_INT32, DT_INT64, "
                      "DT_UINT8, DT_UINT16, DT_BOOL, DT_DOUBLE "));
    }
    for (const PartialTensorShape& pts : output_shapes_) {
      OP_REQUIRES(ctx, pts.dims() == 0,
                  errors::InvalidArgument(
                      "Each element of `output_shapes_` must be a scalar."));
    }
  }
  void MakeDataset(OpKernelContext* ctx, DatasetBase** output) override {
    tstring driver_name;
    OP_REQUIRES_OK(
        ctx, ParseScalarArgument<tstring>(ctx, "driver_name", &driver_name));

    tstring data_source_name;
    OP_REQUIRES_OK(ctx, ParseScalarArgument<tstring>(ctx, "data_source_name",
                                                     &data_source_name));

    tstring query;
    OP_REQUIRES_OK(ctx, ParseScalarArgument<tstring>(ctx, "query", &query));

    // TODO(b/64276826) Change this check when we add support for other
    // databases.
    OP_REQUIRES(ctx, driver_name == "sqlite",
                errors::InvalidArgument(tensorflow::strings::Printf(
                    "The database type, %s, is not supported by SqlDataset. "
                    "The set of supported databases is: {'sqlite'}.",
                    driver_name.c_str())));

    *output = new Dataset(ctx, driver_name, data_source_name, query,
                          output_types_, output_shapes_);
  }

 private:
  class Dataset : public DatasetBase {
   public:
    Dataset(OpKernelContext* ctx, const string& driver_name,
            const string& data_source_name, const string& query,
            const DataTypeVector& output_types,
            const std::vector<PartialTensorShape>& output_shapes)
        : DatasetBase(DatasetContext(ctx)),
          driver_name_(driver_name),
          data_source_name_(data_source_name),
          query_(query),
          output_types_(output_types),
          output_shapes_(output_shapes) {}

    std::unique_ptr<IteratorBase> MakeIteratorInternal(
        const string& prefix) const override {
      return absl::make_unique<Iterator>(
          Iterator::Params{this, strings::StrCat(prefix, "::Sql")});
    }

    const DataTypeVector& output_dtypes() const override {
      return output_types_;
    }

    const std::vector<PartialTensorShape>& output_shapes() const override {
      return output_shapes_;
    }

    string DebugString() const override { return "SqlDatasetOp::Dataset"; }

    Status InputDatasets(
        std::vector<const DatasetBase*>* inputs) const override {
      return Status::OK();
    }

    Status CheckExternalState() const override { return Status::OK(); }

   protected:
    Status AsGraphDefInternal(SerializationContext* ctx,
                              DatasetGraphDefBuilder* b,
                              Node** output) const override {
      Node* driver_name_node;
      TF_RETURN_IF_ERROR(b->AddScalar(driver_name_, &driver_name_node));
      Node* data_source_name_node;
      TF_RETURN_IF_ERROR(
          b->AddScalar(data_source_name_, &data_source_name_node));
      Node* query_node;
      TF_RETURN_IF_ERROR(b->AddScalar(query_, &query_node));
      TF_RETURN_IF_ERROR(b->AddDataset(
          this, {driver_name_node, data_source_name_node, query_node}, output));
      return Status::OK();
    }

   private:
    class Iterator : public DatasetIterator<Dataset> {
     public:
      explicit Iterator(const Params& params)
          : DatasetIterator<Dataset>(params) {}
      ~Iterator() override {
        if (query_connection_initialized_) {
          Status s = query_connection_->Close();
          if (!s.ok()) {
            LOG(WARNING) << "Failed to close query connection: " << s;
          }
        }
      }

      Status GetNextInternal(IteratorContext* ctx,
                             std::vector<Tensor>* out_tensors,
                             bool* end_of_sequence) override {
        mutex_lock l(mu_);
        if (!query_connection_initialized_) {
          TF_RETURN_IF_ERROR(InitializeQueryConnection());
        }
        Status status = Status::OK();
        if (!end_of_sequence_) {
          next_calls_++;
          status =
              query_connection_->GetNext(ctx, out_tensors, &end_of_sequence_);
        }
        *end_of_sequence = end_of_sequence_;
        return status;
      }

     protected:
      std::shared_ptr<model::Node> CreateNode(
          IteratorContext* ctx, model::Node::Args args) const override {
        return model::MakeSourceNode(std::move(args));
      }

      Status SaveInternal(SerializationContext* ctx,
                          IteratorStateWriter* writer) override {
        mutex_lock l(mu_);
        if (query_connection_initialized_) {
          TF_RETURN_IF_ERROR(
              writer->WriteScalar(full_name("next_calls"), next_calls_));
        }
        return Status::OK();
      }

      Status RestoreInternal(IteratorContext* ctx,
                             IteratorStateReader* reader) override {
        mutex_lock l(mu_);
        if (reader->Contains(full_name("next_calls"))) {
          TF_RETURN_IF_ERROR(InitializeQueryConnection());
          TF_RETURN_IF_ERROR(
              reader->ReadScalar(full_name("next_calls"), &next_calls_));
          int64 rem_next_calls = next_calls_;
          std::vector<Tensor> out_tensors;
          end_of_sequence_ = false;
          while (rem_next_calls--) {
            TF_RETURN_IF_ERROR(query_connection_->GetNext(ctx, &out_tensors,
                                                          &end_of_sequence_));
            out_tensors.clear();
          }
        } else {
          query_connection_initialized_ = false;
          end_of_sequence_ = false;
        }
        return Status::OK();
      }

     private:
      Status InitializeQueryConnection() TF_EXCLUSIVE_LOCKS_REQUIRED(mu_) {
        query_connection_initialized_ = true;
        end_of_sequence_ = false;
        query_connection_ =
            sql::DriverManager::CreateQueryConnection(dataset()->driver_name_);
        Status s = query_connection_->Open(dataset()->data_source_name_,
                                           dataset()->query_,
                                           dataset()->output_types_);
        next_calls_ = 0;
        if (!s.ok()) {
          LOG(WARNING) << "Failed to connect to database: " << s;
          return s;
        }
        return Status::OK();
      }

      mutex mu_;
      // TODO(b/129062371): explore ways to seek into a SQLite databases.
      int64 next_calls_ TF_GUARDED_BY(mu_) = 0;
      std::unique_ptr<sql::QueryConnection> query_connection_
          TF_GUARDED_BY(mu_);
      bool query_connection_initialized_ TF_GUARDED_BY(mu_) = false;
      bool end_of_sequence_ TF_GUARDED_BY(mu_) = false;
    };
    const tstring driver_name_;
    const tstring data_source_name_;
    const tstring query_;
    const DataTypeVector output_types_;
    const std::vector<PartialTensorShape> output_shapes_;
  };
  DataTypeVector output_types_;
  std::vector<PartialTensorShape> output_shapes_;
};

REGISTER_KERNEL_BUILDER(Name("SqlDataset").Device(DEVICE_CPU), SqlDatasetOp);
REGISTER_KERNEL_BUILDER(Name("ExperimentalSqlDataset").Device(DEVICE_CPU),
                        SqlDatasetOp);

}  // namespace
}  // namespace experimental
}  // namespace data
}  // namespace tensorflow


text:
package fr.pizzeria.admin.web.boisson;

import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;

import javax.ejb.EJB;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import fr.pizzeria.admin.exception.StockageException;
import fr.pizzeria.admin.metier.BoissonService;

@WebServlet("/boissons/liste")
public class ListerBoissonController extends HttpServlet {

	private static final Logger LOG = Logger.getLogger(ListerBoissonController.class.getName());
	private static final String VUE_LISTER_BOISSON = "/WEB-INF/views/boissons/listerBoissons.jsp";
	private static final String URL_LISTE = "/boissons/liste";

	@EJB
	private BoissonService boissonService;

	@Override
	protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {

		try {
			req.setAttribute("listeBoissons", this.boissonService.findAllAvailable());
		} catch (StockageException e) {
			LOG.log(Level.WARNING, "-------!!!------- exception levée : " + e.getMessage() + " => " + e.getCause());
			req.setAttribute("msg", "Erreur du serveur, merci de contacter le support de l'application ");
		} finally {
			RequestDispatcher dispatcher = this.getServletContext().getRequestDispatcher(VUE_LISTER_BOISSON);
			dispatcher.forward(req, resp);
		}
	}

	@Override
	protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {

		Integer id = Integer.valueOf(req.getParameter("id").toString());
		LOG.log(Level.INFO, "-------!!!------- suppression/archivage de l'ingredient n : " + id);
		try {
			this.boissonService.delete(id);
		} catch (StockageException e) {
			LOG.log(Level.WARNING, "-------!!!------- exception levée : " + e.getMessage() + " => " + e.getCause());
			req.setAttribute("msg", "Erreur du serveur, merci de contacter le support de l'application ");
		} finally {
			resp.sendRedirect(req.getContextPath() + URL_LISTE);
		}
	}

}


text:
    {% if user.is_authenticated %}

NOTE: you are already logged in as {{ user }}.

    {% endif %}
    <form class="login" method="POST" action="{% url acct_login %}">
        {% csrf_token %}

{{ form.non_field_errors }}

            {% for field in form %}
                {% if field.errors %}
{{ field.errors }}
{% endif %}

{{ field.label_tag }}	{{ field }}

            {% endfor %}

	<input type="submit" value="Log in »" />

	Forgot password?

	 Switch to OpenID login

    </form>


text:
package org.purl.sword.base;

/**
 * Represents a deposit response. This holds the SWORD Entry element.
 *
 * @author Stuart Lewis
 */
public class AtomDocumentResponse extends DepositResponse
{

  /**
    * Create a new response with the specified http code.
    *
    * @param httpResponse Response code.
    */
   public AtomDocumentResponse(int httpResponse)
   {
      super(httpResponse);
   }

}


text:
<?php
/**
 * @author  Rizart Dokollari
 * @version 6/27/2015
 */

use database\migrations\CreateDatabase;
use database\seeds\DatabaseSeeder;

require __DIR__ . '/../../../vendor/autoload.php';

$databaseSeeder = new DatabaseSeeder();

$database = new CreateDatabase();

$database->down();
$database->up();

$databaseSeeder->run();


text:
/*
 * Hibernate, Relational Persistence for Idiomatic Java
 *
 * License: Apache License, Version 2.0
 * See the LICENSE file in the root directory or visit http://www.apache.org/licenses/LICENSE-2.0
 */
package org.hibernate.sqm.domain;

/**
 * Models information about an entity
 *
 * @author Steve Ebersole
 */
public interface EntityType extends IdentifiableType, Bindable {
	/**
	 * Return the entity name.
	 *
	 * @return entity name
	 */
	String getName();
}


text:
package org.pmw.tinylog.policies;

import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue;
import static org.pmw.tinylog.hamcrest.ClassMatchers.type;

import java.io.File;
import java.io.IOException;

import org.junit.Test;
import org.pmw.tinylog.util.FileHelper;

/**
 * Tests for hourly policy.
 *
 * @see HourlyPolicy
 */
public class HourlyPolicyTest extends AbstractTimeBasedPolicyTest {

	/**
	 * Test rolling at first full hour.
	 */
	@Test
	public final void testRollingAtFirstFullHour() {
		setTime(HOUR / 2L); // 00:30

		Policy policy = new HourlyPolicy();
		policy.init(null);
		assertTrue(policy.check((String) null));
		increaseTime(HOUR / 2L); // 01:00
		assertFalse(policy.check((String) null));

		policy.reset();
		assertTrue(policy.check((String) null));
		increaseTime(HOUR / 2L); // 01:30
		assertTrue(policy.check((String) null));
		increaseTime(HOUR / 2L); // 02:00
		assertFalse(policy.check((String) null));
	}

	/**
	 * Test continuing log files.
	 *
	 * @throws IOException
	 *             Test failed
	 */
	@Test
	public final void testContinueLogFile() throws IOException {
		setTime(HOUR / 2L); // 00:30
		File file = FileHelper.createTemporaryFile(null);
		file.setLastModified(getTime());

		Policy policy = new HourlyPolicy();
		policy.init(null);
		assertTrue(policy.check(file));
		assertTrue(policy.check((String) null));
		increaseTime(HOUR / 2L - 1L); // 01:59:59,999
		assertTrue(policy.check((String) null));
		increaseTime(1L); // 02:00
		assertFalse(policy.check((String) null));

		increaseTime(-1L); // 01:59:59,999
		policy = new HourlyPolicy();
		policy.init(null);
		assertTrue(policy.check(file));
		assertTrue(policy.check((String) null));
		increaseTime(1L); // 02:00
		assertFalse(policy.check((String) null));
	}

	/**
	 * Test discontinuing log files.
	 *
	 * @throws IOException
	 *             Test failed
	 */
	@Test
	public final void testDiscontinueLogFile() throws IOException {
		setTime(HOUR / 2L); // 00:30
		File file = FileHelper.createTemporaryFile(null);
		file.setLastModified(getTime());

		Policy policy = new HourlyPolicy();
		policy.init(null);
		assertTrue(policy.check(file));

		increaseTime(HOUR); // 01:30

		policy = new HourlyPolicy();
		policy.init(null);
		assertFalse(policy.check(file));

		file.delete();
	}

	/**
	 * Test non-existing log files.
	 *
	 * @throws IOException
	 *             Test failed
	 */
	@Test
	public final void testNonExistingLogFile() throws IOException {
		File file = FileHelper.createTemporaryFile(null);
		file.delete();

		Policy policy = new HourlyPolicy();
		policy.init(null);
		assertTrue(policy.check(file));
	}

	/**
	 * Test reading hourly policy from properties.
	 */
	@Test
	public final void testFromProperties() {
		Policy policy = createFromProperties("hourly");
		assertThat(policy, type(HourlyPolicy.class));

		policy.init(null);
		increaseTime(HOUR - 1L); // 00:59:59,999
		assertTrue(policy.check((String) null));
		increaseTime(1L); // 01:00
		assertFalse(policy.check((String) null));
	}

}


text:
console.log("getting apis...");
const Discord = require('discord.js');
const ytdl = require('ytdl-core');
const fs = require('fs');
const ffmpeg = require('ffmpeg');
const request = require("request");
const getYouTubeID = require('get-youtube-id');
const fetchVideoInfo = require('youtube-info');
const youtubenode = require('youtube-node');
const prompt = require('prompt');
const format = require('format-duration');
const spotify = require('./spotify.js');
const os = require('os-utils');
const youtube = new youtubenode()
const client = new Discord.Client();
const date = new Date();
const startTime = process.hrtime();
const prefix = "./"
//keys
console.log("pulling keys...");
const keys = JSON.parse(fs.readFileSync('keys.json')); //read all keys
const token = keys.discordtoken //discord api key
const yt_api_key = keys.youtubetoken //youtube api key
const bot_controller = keys.bot_controller //retros arcade bot coontroller role
const bot_controller2 = keys.bot_controller2 //dnak dev bot controller role
const bot_controller3 = keys.bot_controller3 //dank members bot controller role
//vars
console.log("setting variables...");
var musicServers = {}; //all servers playing music
var musicServer = {}; //current music server
var musicQueue = []; //queue in current server
var musicList = []; //names of music queue
var musicResults = []; //all results of search query
var musicSearch; //query for youtube search
var isPlaying = false; //is music playing
var isStreaming = false; //if music is streaming
var isSearch = true; //if query is for search
var isLooping = false; //if music is looping
var isSearching = false; //if searching
var isBotController = false; //if author is bot controller
var isBotSudo = false; //if djmango is sending message
var adminList = []; //list of admins
var cpuUse; //cpu usage
var duration; //duration of current song
var currentTime;
var serverID; //current server id
var teamdata; //json data from vexDB
var wordTodefine; //word to define
var wordDefinition; //defenition of word
var definitions; //def object
var status; //'is playing' status
var verification = {};
var verifyUser; //user to verify
var verifySpecialty; //users specialty
var notadmin = 'djmango thinks you are not good enough for me'
// TODO: add console command functions, add webhooks for github and bot restarting, factorio server manager
//set keys
console.log('pushing keys...');
youtube.setKey(yt_api_key) //apply youtube api key
//functions
client.on("ready", function() { //if ready, say so
  console.log("dnakbot is ready!\n" + `logged in as ${client.user.tag}!`);
  os.cpuUsage(function(v) {
    cpuUse = ('cpu usage (%): ' + Math.round(100 * v) / 100);
  });
  prompts()
});

function prompts() {
  prompt.get(['command'], function(err, result) {
    console.log('\n');
    console.log(result.command);
    switch (result.command) {
      case 'help': //log all commands, note to self, make sure to update this
        console.log('commands:\n b: lolxd');
        prompts()
        break;
      case 'timestamp':
        //console.log(Date.now() - process.hrtime())
        console.log("Time taken: %s", format((process.hrtime()[0] - startTime[0]) * 1000));
        prompts();
        break;
      case 'servers': //log all servers currently active
        //var leaving = client.guilds.get('id')
        //leaving.leave()
        var guilds = client.guilds.array();
        var names = '';
        for (var i = 0; i < guilds.length; i++) {
          names = names + guilds[i].name + ', '
        }
        console.log(names);
        prompts()
        break;
      default:
        console.log('unknown command')
        prompts()
    }
  });
}

function botcontroller(author) {
  //check if messsage author is bot controller
  //author = message.member
  var adminTemp = fs.readFileSync('./botAdmins.json');
  if (author.roles.has(bot_controller) || author.roles.has(bot_controller2) || author.roles.has(bot_controller3) || author.id == 193066810470301696 || adminTemp.toString().indexOf(author.id) !== -1) {
    isBotController = true;
  } else {
    isBotController = false;
  }
}

function requestdata(url) {
  //request data from url
  request({
    url: url,
    json: true
  }, function getteamdata(error, response, body) {
    if (!error && response.statusCode === 200) {
      teamdata = ('Team ' + body.result[0].number + ' located in ' + body.result[0].city +
        ', ' + body.result[0].region + ', ' + body.result[0].country + '. They are known as ' +
        body.result[0].team_name + ' of ' + body.result[0].organisation + '. They participate in the ' +
        body.result[0].program + ' ' + body.result[0].grade + ' competetion.');
    }
  })
}

function play(connection, message) {
  isStreaming = true;
  musicServer.dispatcher = connection.playStream(ytdl(musicServer.musicQueue[0], {
    filter: "audioonly"
  }));
  console.log('joined')
  info(connection, message)
  if (isLooping == false) musicServer.musicQueue.shift();
  musicServer.dispatcher.on("end", function() {
    if (musicServer.musicQueue[0]) musicList.shift(), message.reply('now playing ' + musicInfo.title.toLowerCase() + ' `' + duration + '` '), play(connection, message);
    else isPlaying = false, isStreaming = false, connection.disconnect();
  });
}

function info(message) {
  fetchVideoInfo(getYouTubeID(musicServer.musicQueue[0])).then(function(musicInfo) {
    musicList.push(musicInfo)
    if ((musicInfo.duration / 60) >= 1) { //if duration is more than a minute
      if ((musicInfo.duration / 3600) >= 1) { //if duration is more than a hour
        var hours = Math.floor(musicInfo.duration / 3600);
        if (Math.floor((musicInfo.duration / 60) - (hours * 3600)) < 0) {
          var minutes = 0
        } else {
          var minutes = Math.floor((musicInfo.duration / 60) - (hours * 3600));
        }
        var seconds = Math.floor((musicInfo.duration - (minutes * 60)) - (hours * 3600));
        if (minutes < 10) { //if less than 10 mins
          if (seconds < 10) { //if less than 10 secconds
            duration = `${hours}:0${minutes}:0${seconds}`
          } else {
            duration = `${hours}:0${minutes}:${seconds}`
          }
        } else { //if more than 10 mins
          if (seconds < 10) { //if less than 10 secconds
            duration = `${hours}:${minutes}:0${seconds}`
          } else {
            duration = `${hours}:${minutes}:${seconds}`
          }
        }
      } else { //if duration is less than an hour, more than a minute
        if (Math.floor(musicInfo.duration / 60) < 10) { //if less than 10 minutes
          var minutes = Math.floor(musicInfo.duration / 60);
          var seconds = musicInfo.duration - minutes * 60;
          if (seconds < 10) { //if less than 10 secconds
            duration = `0${minutes}:0${seconds}`
          } else {
            duration = `0${minutes}:${seconds}`
          }
        } else {
          var minutes = Math.floor(musicInfo.duration / 60);
          var seconds = musicInfo.duration - minutes * 60;
          duration = `${minutes}:${seconds}`
        }
      }
    } else { //if duration is less than a minute
      if (musicInfo.duration < 10) { //if less than 10 secconds
        var seconds = musicInfo.duration;
        duration = `0${seconds}`
      } else {
        var seconds = musicInfo.duration;
        duration = `${seconds}`
      }
    }
    message.reply('added ' + musicInfo.title + ' `' + duration + '` to the queue')
  });
}

function sendteamdata() {
  message.channel.send(teamdata)
}

client.on('guildMemberAdd', member => {
  //welcome message on join
  member.guild.defaultChannel.send({
    embed: {
      color: 0xFFFFFF,
      author: {
        name: client.user.username,
        icon_url: client.user.avatarURL
      },
      title: "dnakbot",
      url: "http://github.com/djmango/dnakbot",
      description: `Welcome to the server, ${member}!`,
      fields: [{
          name: "Info",
          value: "I am dnak bot, a bot created by djmango. get started by typing ./help!"
        },
        {
          name: "Donations",
          value: "pls help keep this bot online by donating bitcoin to **1KGVv2QKego2eKVDibci6nXaJcVw9ZdmXV** or PayPal to **anoneemousehax@gmail.com**."
        },
        {
          name: "Feedback",
          value: "feel free to report bugs or a #feature-request on my [github](http://github.com/djmango/dnakbot)!"
        },
      ],
      timestamp: new Date(),
      footer: {
        icon_url: client.user.avatarURL,
        text: "© djmango"
      }
    }
  });
});
client.on('message', async message => {
  var args = message.content.substring(prefix.length).split(" "); //take each argument
  switch (args[0].toLowerCase()) {
    case "ping":
      //message.channel.send('pong ' + '`' + message.member.client.ping + ' msecs' + '`');
      const m = await message.channel.send("ping?");
      m.edit(`pong! latency is ${m.createdTimestamp - message.createdTimestamp}ms. api latency is ${Math.round(client.ping)}ms`);
      break;
    default:
  }

})
client.on('message', message => { //check for message
  botcontroller(message.member) //find out if message author is a bot controller
  serverID = JSON.parse(message.guild.id); //pull server id
  os.cpuUsage(function(v) {
    cpuUse = ('cpu usage (%): ' + Math.round(100 * v) / 100);
  });
  if (message.author.equals(client.user)) return; //check if the client sent the message, if so ignore
  if (message.author.id == 193066810470301696) isBotSudo = true;
  else isBotSudo = false;
  definitions = JSON.parse(fs.readFileSync(`verification.json`)) //pull admins
  if (!message.content.startsWith(prefix)) return; //check for prefix
  var args = message.content.substring(prefix.length).split(" "); //take each argument
  switch (args[0].toLowerCase()) {
    //reply statements
    case "help":
      message.channel.send('hello my name is dnak bot, i am a dnak discrod bot made by djmango. features include youtube music, youtube playlists and custom definitions. type ./commands for commands')
      break;
    case "commands":
      message.channel.send({
        embed: {
          color: 0xFFFFFF,
          author: {
            name: client.user.username,
            icon_url: client.user.avatarURL
          },
          title: "commands",
          description: 'list of commands for dnakbot',
          fields: [{
              name: "general",
              value: "`ping`, `help`, `info`, `commands`, `def`"
            },
            {
              name: "music",
              value: "`play`, `choose`, `skip`, `pause`, `resume`, `join`, `queue`, `song`, `loop`"
            },
            {
              name: "verification",
              value: "`verify`"
            },
            {
              name: "admin",
              value: "`def add`, `purge`, `status`"
            },
          ],
          timestamp: new Date(),
          footer: {
            icon_url: client.user.avatarURL,
            text: "© djmango"
          }
        }
      });
      break;
      //admin commands
    case "status":
      status = ''
      for (var i = 1; i < args.length; i++) {
        status = status + args[i] + ' '
      }
      if (isBotController == true)
        client.user.setGame(status), message.channel.send('setting status to playing ' + status)
      else message.channel.send(notadmin)
      break;
    case "purge":
      if (isBotController == true) {
        let messagecount = parseInt(args[1]);
        message.channel.fetchMessages({
          limit: messagecount
        }).then(messages => message.channel.bulkDelete(messages));
      } else message.channel.send(notadmin)
      break;
    case "info":
      var uptime = format((process.hrtime()[0] - startTime[0]) * 1000);
      var memory = (Math.round(10 * os.freemem()) / 100 + "/" + Math.round(10 * os.totalmem()) / 100)
      message.reply("```\nbot uptime: " + uptime + "\n" + cpuUse + "\nmemory (mb): " + memory + "\nos: ubuntu server 16.04 lts 64bit" +
        "\nsystem uptime: " + format(os.sysUptime() * 1000) + "```")
      break;
      //def commands
    case "def":
      if (args[1]) {
        switch (args[1].toLowerCase()) {
          case "add":
            //documentation: use object, server:object:word:defenition, { a: {x: 7, y: 9} }
            //[serverID {wordTodefine: wordDefinition, wordTodefine, wordDefinition }]
            //def add (word to define) (definition)
            definitions = JSON.parse(fs.readFileSync(`./def/def${serverID}.json`)) //pull definitions for server
            wordTodefine = args[2]
            wordDefinition = ''
            for (var i = 3; i < args.length; i++) { //for loop to loop through def args
              wordDefinition = wordDefinition + ' ' + args[i]
            }
            definitions[wordTodefine] = wordDefinition
            fs.writeFile(`./def/def${serverID}.json`, JSON.stringify(definitions)) //push updated definitions for server
            break;
          case "init":
            fs.writeFileSync(`./def/def${serverID}.json`, JSON.stringify({}));
            break;
          default:
            definitions = JSON.parse(fs.readFileSync(`./def/def${serverID}.json`)) //pull definitions for server
            wordTodefine = (args[1])
            message.channel.send(definitions[wordTodefine])
        }
      } else {
        message.channel.send('uses include `def init (run this first)`, `def add (word to define) (definition)`, `def (word)`, and `def del (definition to delete)`')
      }
      break;
      //music commands
    case "play":
      isSearch = true;
      if (args[1]) { //if link or search query is provided, run code
        serverID = JSON.parse(message.guild.id);
        if (!message.member.voiceChannel) { //check if on voice channel
          message.reply('u not in voice channel b')
          return
        };
        if (isSearching == true) {
          message.reply('choose a song before you search again')
          return
        }
        if (args[1].indexOf('.com') && !args[1].indexOf('youtube.com')) {
          message.reply('only youtube b')
        }
        if (!musicServers[serverID]) musicServers[serverID] = {
          musicQueue: []
        };
        if (args[1].indexOf('youtube.com') >= 0) { //if its a link, run code
          musicServers[serverID].musicQueue.push(args[1]);
          musicServer = musicServers[serverID];
          info(message)
          isPlaying = true;
          isSearch = false;
        } else { //if its a search query, run code
          for (var i = 1; i < args.length; i++) { //for loop to loop through search query
            musicSearch = musicSearch + ' ' + args[i]
          }

          youtube.search(musicSearch, 5, function(error, result) {
            if (error) {
              console.log(error);
            } else {
              //push results to public variable
              for (var i = 0; i < 5; i++) {
                //console.log(result.items[i])
                musicResults[i] = result.items[i]
              }
              //choose song out of results
              var ret = "\n\n`";
              for (var i = 0; i < 4; i++) {
                //console.log(musicResults[i].snippet)
                console.log(i)
                //console.log(ret += (i + 1) + ": " + musicResults[i].snippet.title + "\n")
                ret += (i + 1) + ": " + musicResults[i].snippet.title + "\n";
              }
              ret += "`"
              message.reply('search results:' + ret);
              isSearching = true;
              isSearch = true;
            }
          });
        }
        if (!message.guild.voiceConnection && isSearch == false) message.member.voiceChannel.join().then(function(connection) {
          play(connection, message)
        });
        else if (isStreaming == false && isSearch == false) {
          play(connection, message)
        }
      } else {
        message.reply('pls provide a link or search query')
        return;
      }
      break;
    case "choose":
      serverID = JSON.parse(message.guild.id);
      args[1] = args[1] - 1;
      message.reply('now playing: ' + musicResults[args[1]].snippet.title)
      musicServers[serverID].musicQueue.push('https://www.youtube.com/watch?v=' + musicResults[args[1]].id.videoId);
      console.log(musicServers[serverID].musicQueue[0])
      musicServer = musicServers[serverID];
      isPlaying = true;
      isSearching = false;
      info(message)
      if (!message.guild.voiceConnection) message.member.voiceChannel.join().then(function(connection) {
        play(connection, message)
      });
      else if (isStreaming == false && message.guild.voiceConnection) {
        play(connection, message)
      }
      break;
    case "join":
      message.member.voiceChannel.join()
      message.reply('joining now!')
      break;
    case "skip":
      if (musicServer.musicQueue[0]) {
        serverID = JSON.parse(message.guild.id);
        musicServer = musicServers[serverID];
        musicList.shift()
        musicServer.dispatcher.end()
      }
      break;
    case "song":
      message.reply('currently playing ' + musicList[0].title + ' ' + duration)
      break;
    case "queue":
      var ret = "\n\n`";
      for (var i = 0; i < musicList.length; i++) {
        ret += (i + 1) + ": " + musicList[i].title + (i === 0 ? " **(current)**" : "") + "\n";
      }
      ret += "`"
      message.reply(ret);
      break;
    case "pause":
      if (isPlaying == true) musicServer.dispatcher.paused = true, message.reply('paused')
      else message.reply('not playing anything b')
      break;
    case "resume":
      if (isPlaying == true) musicServer.dispatcher.paused = false, message.reply('resumed')
      else message.reply('not playing anything b')
      break;
    case "loop":
      if (isLooping == true) {
        isLooping = false
      }
      if (isLooping == false) {
        isLooping = true
      }
      break;
      //moderation commmands
    case "verify":
      if (message.channel.id == 352174524827172865 || message.channel.id == 342927069807640579) {
        if (!args[2] || !args[1]) {
          message.reply('make sure to follow the format described in the pins')
          return
        }
        verifyUser = args[1]
        for (var i = 2; i < args.length; i++) {
          verifySpecialty = args[i]
        }
        verification[verifyUser] = verifySpecialty
        fs.writeFile('./verification.json', JSON.stringify(verification))
        message.reply('thank you for submitting a verification request')
      } else {
        message.reply("use the #verification chat for verification requests");
        message.delete();
      }
      break;
    case "whois":
      // TODO: finish user lookup, also add an economy thingy
      var whois = args[1]
      let embed = new Discord.RichEmbed()
        .setAuthor(message.author.username)
        .setDescription("This is the user's info")
        .setColor("9B59B6")
        .addField("Full Username", `${message.author.username}#${message.author.discriminator}`)
        .addField("Full ID", `${message.author.id}`)
        .addField("Created At", message.author.createdAt)
      message.channel.sendEmbed(embed)
      break;
      //sudo commands
    case "sudo":
      if (isBotSudo == false) {
        message.reply('you are not djmango sorry b');
        return;
      }
      switch (args[1]) {
        case "giveme":
          message.author.addRole(args[2]);
          break;
        case "help":
          message.reply('```op: ./sudo op (name) (id), deop: ./sudo deop (name), oplist: ./sudo oplist```')
          break;
        case "op":
          var adminTemp = JSON.parse(fs.readFileSync('./botAdmins.json'));
          adminTemp[args[2]] = args[3]
          fs.writeFileSync('./botAdmins.json', JSON.stringify(adminTemp), (err) => {
            if (err) throw err;
          });
          break;
        case "deop":
          var adminTemp = JSON.parse(fs.readFileSync('./botAdmins.json'));
          delete adminTemp[args[2]]
          fs.writeFileSync('./botAdmins.json', JSON.stringify(adminTemp), (err) => {
            if (err) throw err;
          });
          break;
        case "oplist":
          var adminTemp = fs.readFileSync('./botAdmins.json');
          message.reply(adminTemp.toString())
          break;
        default:

      }
      break;
      //wiki commands
    case "vex":
      switch (args[1]) {
        case "team":
          requestdata(url = `https://api.vexdb.io/v1/get_teams?team=${args[2]}`);
          setTimeout(sendteamdata, 1000);
          break;

        default:
          message.channel.send("Incorrect command, use ./vex team (team number)");
      }
      break;
    default: //default
      if (args[0].toLowerCase() !== "ping") {
        message.channel.send("incorrect command");
      }
  }
});

client.login(token);