text:
package storage

import (
	"path"
	"sync"

	"github.com/docker/distribution"
	"github.com/docker/distribution/context"
	"github.com/docker/distribution/digest"
)

type signatureStore struct {
	repository *repository
	blobStore  *blobStore
	ctx        context.Context
}

func newSignatureStore(ctx context.Context, repo *repository, blobStore *blobStore) *signatureStore {
	return &signatureStore{
		ctx:        ctx,
		repository: repo,
		blobStore:  blobStore,
	}
}

var _ distribution.SignatureService = &signatureStore{}

func (s *signatureStore) Get(dgst digest.Digest) ([][]byte, error) {
	signaturesPath, err := pathFor(manifestSignaturesPathSpec{
		name:     s.repository.Name(),
		revision: dgst,
	})

	if err != nil {
		return nil, err
	}

	// Need to append signature digest algorithm to path to get all items.
	// Perhaps, this should be in the pathMapper but it feels awkward. This
	// can be eliminated by implementing listAll on drivers.
	signaturesPath = path.Join(signaturesPath, "sha256")

	signaturePaths, err := s.blobStore.driver.List(s.ctx, signaturesPath)
	if err != nil {
		return nil, err
	}

	var wg sync.WaitGroup
	type result struct {
		index     int
		signature []byte
		err       error
	}
	ch := make(chan result)

	bs := s.linkedBlobStore(s.ctx, dgst)
	for i, sigPath := range signaturePaths {
		sigdgst, err := digest.ParseDigest("sha256:" + path.Base(sigPath))
		if err != nil {
			context.GetLogger(s.ctx).Errorf("could not get digest from path: %q, skipping", sigPath)
			continue
		}

		wg.Add(1)
		go func(idx int, sigdgst digest.Digest) {
			defer wg.Done()
			context.GetLogger(s.ctx).
				Debugf("fetching signature %q", sigdgst)

			r := result{index: idx}

			if p, err := bs.Get(s.ctx, sigdgst); err != nil {
				context.GetLogger(s.ctx).
					Errorf("error fetching signature %q: %v", sigdgst, err)
				r.err = err
			} else {
				r.signature = p
			}

			ch <- r
		}(i, sigdgst)
	}
	done := make(chan struct{})
	go func() {
		wg.Wait()
		close(done)
	}()

	// aggregrate the results
	signatures := make([][]byte, len(signaturePaths))
loop:
	for {
		select {
		case result := <-ch:
			signatures[result.index] = result.signature
			if result.err != nil && err == nil {
				// only set the first one.
				err = result.err
			}
		case <-done:
			break loop
		}
	}

	return signatures, err
}

// Enumerate returns an array of digests of manifest signatures.
func (s *signatureStore) Enumerate(manifestReference digest.Digest) ([]digest.Digest, error) {
	return enumerateAllBlobs(s.linkedBlobStore(s.ctx, manifestReference), s.ctx)
}

func (s *signatureStore) Put(dgst digest.Digest, signatures ...[]byte) error {
	bs := s.linkedBlobStore(s.ctx, dgst)
	for _, signature := range signatures {
		if _, err := bs.Put(s.ctx, "application/json", signature); err != nil {
			return err
		}
	}
	return nil
}

// Delete removes all signature links of given manifest revision.
func (s *signatureStore) Delete(revision digest.Digest) error {
	dgsts, err := s.Enumerate(revision)
	if err != nil {
		return err
	}
	lbs := s.linkedBlobStore(s.ctx, revision)
	for _, dgst := range dgsts {
		if err = lbs.Delete(s.ctx, dgst); err != nil {
			return err
		}
	}
	return nil
}

// linkedBlobStore returns the namedBlobStore of the signatures for the
// manifest with the given digest. Effectively, each signature link path
// layout is a unique linked blob store.
func (s *signatureStore) linkedBlobStore(ctx context.Context, revision digest.Digest) *linkedBlobStore {
	linkpath := func(name string, dgst digest.Digest) (string, error) {
		return pathFor(manifestSignatureLinkPathSpec{
			name:      name,
			revision:  revision,
			signature: dgst,
		})
	}
	linkRootPath := func(name string) (string, error) {
		return pathFor(manifestSignaturesPathSpec{
			name:     name,
			revision: revision,
		})
	}

	return &linkedBlobStore{
		ctx:        ctx,
		repository: s.repository,
		blobStore:  s.blobStore,
		blobAccessController: &linkedBlobStatter{
			blobStore:             s.blobStore,
			repository:            s.repository,
			linkPathFns:           []linkPathFunc{linkpath},
			removeParentsOnDelete: true,
		},
		linkPathFns:      []linkPathFunc{linkpath},
		blobsRootPathFns: []blobsRootPathFunc{linkRootPath},
	}
}


text:
<?php snippet('header') ?>

          <?= snippet('integrations/post', array('post' => $page)) ?>

            <?= snippet('blog-sitenav') ?>

<?php snippet('footer') ?>

redpajama_set_name: RedPajamaGithub


text:
#ifndef ScriptController_h
#define ScriptController_h

#include <map>

#include "kroll.h"

namespace kroll {

class Interpreter;

class KROLL_API ScriptController {
public:
    ScriptController();

    void AddInterpreter(Interpreter* interpreter, const char* supportedScriptTypes[]);
    void RemoveInterpreter(Interpreter* interpreter);

    KValueRef EvaluateFile(const char* filepath, KObjectRef context);

private:
    Interpreter* findInterpreterForType(const char* scriptType);

    typedef std::map<std::string, Interpreter*> InterpreterMapping;
    InterpreterMapping interpreters;
};

} // namespace kroll

#endif


text:
package org.n52.sos.util;

import java.util.Arrays;
import java.util.Collections;
import java.util.List;

import com.google.common.base.Joiner;

/**
 * @param <A>
 * @author Christian Autermann <c.autermann@52north.org>
 * @since 4.0.0
 *
 */
public abstract class CompositeAction<A extends Action> extends RunnableAction {

    private List<A> actions;

    public CompositeAction(A... actions) {
        this.actions = Arrays.asList(actions);
    }

    public List<A> getActions() {
        return Collections.unmodifiableList(actions);
    }

    @Override
    public void execute() {
        if (getActions() != null) {
            for (A action : getActions()) {
                pre(action);
                action.execute();
                post(action);
            }
        }
    }

    protected abstract void pre(A action);

    protected abstract void post(A action);

    @Override
    public String toString() {
        return String.format("%s[actions=[%s]]", getClass().getSimpleName(), Joiner.on(", ").join(getActions()));
    }
}


text:
<?php

namespace app\models;

use Yii;

use app\models\general\GeneralLabel;

/**
 * This is the model class for table "tbl_laporan_penyertaan_kejohanan_pegawai".
 *
 * @property integer $laporan_penyertaan_kejohanan_pegawai_id
 * @property integer $penyertaan_sukan_id
 * @property string $nama
 * @property string $session_id
 * @property integer $created_by
 * @property integer $updated_by
 * @property string $created
 * @property string $updated
 */
class LaporanPenyertaanKejohananPegawai extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'tbl_laporan_penyertaan_kejohanan_pegawai';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['penyertaan_sukan_id', 'created_by', 'updated_by'], 'integer'],
            [['created', 'updated'], 'safe'],
            [['nama'], 'string', 'max' => 255],
            [['session_id'], 'string', 'max' => 100],
            [['nama'], 'filter', 'filter' => function ($value) {
                return  \common\models\general\GeneralFunction::filterXSS($value);
            }],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'laporan_penyertaan_kejohanan_pegawai_id' => 'Laporan Penyertaan Kejohanan Pegawai ID',
            'penyertaan_sukan_id' => 'Penyertaan Sukan ID',
            'nama' => GeneralLabel::nama,
            'session_id' => 'Session ID',
            'created_by' => 'Created By',
            'updated_by' => 'Updated By',
            'created' => 'Created',
            'updated' => 'Updated',
        ];
    }
}


text:
using namespace Halide;

int main(int argc, char **argv) {

    ImageParam input(UInt(8), 2);
    Func output("output");
    Var x("x"), y("y");

	uint8_t threshold = 128;

    // The algorithm
	output(x, y) = cast<uint8_t>(select(input(x, y) > threshold, 255, 0));
    output.compile_to_file("halide_threshold_gen", input);

    return 0;
}


text:
<?php
defined('BASEPATH') OR exit('No direct script access allowed');

class Player extends Application {

	/**
	 * Index Page for this controller.
	 *
	 * Maps to the following URL
	 * 		http://example.com/index.php/welcome
	 *	- or -
	 * 		http://example.com/index.php/welcome/index
	 *	- or -
	 * Since this controller is set as the default controller in
	 * config/routes.php, it's displayed at http://example.com/
	 *
	 * So any other public methods not prefixed with an underscore will
	 * map to /index.php/welcome/<method_name>
	 * @see http://codeigniter.com/user_guide/general/urls.html
	 */
        function index()
	{
            $action = $this->input->post('button');
    // Decide what to do
            switch ($action)
            {
                case 'Save': $this->Save(); break;
                case 'Delete': $this->Delete(); break;
                case 'Cancel': $this->Cancel(); break;
            }

        }

        function Save(){
            $id = $this->input->post('ID');
            $data = array
            (
                'Name' => $this->input->post('Name'),
                'mug' => $this->input->post('Mug'),
                'player_number' => $this->input->post('Player_Number'),
                'Pos' => $this->input->post('Pos'),
                'Status' => $this->input->post('Status'),
                'Height' => $this->input->post('Height'),
                'Weight' => $this->input->post('Weight'),
                'Birthdate' => $this->input->post('Birthdate'),
                'Exp' => $this->input->post('Exp'),
                'College' => $this->input->post('College')
            );
            $this->Team->update_player($id,$data);
            redirect('/Roster',$data);
        }

        function Delete(){
            $id = $this->input->post('ID');
            $this->Team->delete_player($id);

        }

        function Add()
        {
            $this->load->library('form_validation');

            $this->form_validation->set_rules('Name', 'Name', 'required|min_length[2]|max_length[30]');
            $this->form_validation->set_rules('Player_Number', 'Player_Number', 'required|min_length[2]|max_length[30]');
            $this->form_validation->set_rules('Pos', 'Pos', 'required|min_length[2]|max_length[30]');
            $this->form_validation->set_rules('Status', 'Status', 'required|min_length[2]|max_length[30]');
            $this->form_validation->set_rules('Height', 'Height', 'required|min_length[2]|max_length[5]');
            $this->form_validation->set_rules('Weight', 'Weight', 'required|min_length[2]|max_length[5]');
            $this->form_validation->set_rules('Birthdate', 'Birthdate', 'required|min_length[2]|max_length[16]');
            $this->form_validation->set_rules('Exp', 'Exp', 'required|min_length[2]|max_length[30]');
            $this->form_validation->set_rules('College', 'College', 'required|min_length[2]|max_length[30]');
            $this->form_validation->set_rules('Mug', 'Mugshot', 'required|min_length[5]|max_length[30]');

            //if ($this->form_validation->run() == FALSE) {
               // $this->load->view('add_player');
            //} else
            {
                $this->load->model('Players');
                $data = array
                (
                   'Name' => $this->input->post('Name'),
                   'mug' => $this->input->post('Mug'),
                   'player_number' => $this->input->post('Player_Number'),
                   'Pos' => $this->input->post('Pos'),
                   'Status' => $this->input->post('Status'),
                   'Height' => $this->input->post('Height'),
                   'Weight' => $this->input->post('Weight'),
                   'Birthdate' => $this->input->post('Birthdate'),
                   'Exp' => $this->input->post('Exp'),
                   'College' => $this->input->post('College')
                );

            $this->players->form_insert($data);
            $this->load->view('roster');

            }
        }

        function Cancel(){
            redirect('/Roster',$data);
        }

}


text:
using namespace cocos2d;
using namespace std;

MW_FRAMEWORK_BEGIN

MWViewController *MWViewController::create(MWViewSegue *segue)
{
    auto pVc = new (nothrow) MWViewController();
    if (pVc && pVc->init(segue)) {
        pVc->autorelease();
        return pVc;
    }
    CC_SAFE_RELEASE(pVc);
    return nullptr;
}

bool MWViewController::init(MWViewSegue *segue)
{
    CC_SAFE_RELEASE(_segue);
    _segue = segue;
    CC_SAFE_RETAIN(_segue);

    return true;
}

MWViewController::MWViewController()
: _scene(nullptr)
, _view(nullptr)
, _segue(nullptr)
, _identifer()
{
}

MWViewController::~MWViewController()
{
    CC_SAFE_RELEASE(_view);
    CC_SAFE_RELEASE(_segue);
}

void MWViewController::viewDidLoad()
{
    if (!_view) {
        _view = MWGameView::create();
        _view->retain();
    }

#if MW_ENABLE_SCRIPT_BINDING
    if (_scriptType == kScriptTypeLua) {
        // lua todo
    } else if (_scriptType == kScriptTypeJavascript) {
        MWJsUtils::getInstance()->executeOwnerFunction(this, "viewDidLoad", 0, nullptr);
    }
#endif
}

void MWViewController::viewDidUnload()
{
#if MW_ENABLE_SCRIPT_BINDING
    if (_scriptType == kScriptTypeLua) {
        // lua todo
    } else if (_scriptType == kScriptTypeJavascript) {
        MWJsUtils::getInstance()->executeOwnerFunction(this, "viewDidUnload", 0, nullptr);
    }
#endif

    if (_view && _view->getParent()) {
        _view->removeFromParent();
    }
}

void MWViewController::didReceiveMemoryWarning()
{
#if MW_ENABLE_SCRIPT_BINDING
    if (_scriptType == kScriptTypeLua) {
        // lua todo
    } else if (_scriptType == kScriptTypeJavascript) {
        MWJsUtils::getInstance()->executeOwnerFunction(this, "didReceiveMemoryWarning", 0, nullptr);
    }
#endif
}

MW_FRAMEWORK_END


text:
(function () {
  'use strict';

  angular
    .module('webApp')
    .service('ModelService', ModelService);

  ModelService.$inject = ['ModalService', 'PolicyModelFactory', '$translate', 'ModelFactory', 'CubeService', 'UtilsService'];

  function ModelService( ModalService, PolicyModelFactory, $translate, ModelFactory, CubeService, UtilsService) {
    var vm = this;

    var modelCreationPanel = {};

    vm.showConfirmRemoveModel = showConfirmRemoveModel;
    vm.addModel = addModel;
    vm.removeModel = removeModel;
    vm.isLastModel = isLastModel;
    vm.isNewModel = isNewModel;
    vm.getModelCreationStatus = getModelCreationStatus;
    vm.changeModelCreationPanelVisibility = changeModelCreationPanelVisibility;
    vm.isActiveModelCreationPanel = isActiveModelCreationPanel;
    vm.activateModelCreationPanel = activateModelCreationPanel;
    vm.disableModelCreationPanel = disableModelCreationPanel;
    vm.resetModel = resetModel;

    init();

    function init() {
      vm.policy = PolicyModelFactory.getCurrentPolicy();
      modelCreationPanel = {enabled: false};
    }

    function activateModelCreationPanel() {
      modelCreationPanel.enabled = true;
    }

    function disableModelCreationPanel() {
      modelCreationPanel.enabled = false;
    }

    function getModelCreationStatus(){
      return modelCreationPanel;
    }

    function showConfirmRemoveModel(cubeNames) {
      var templateUrl = "templates/modal/confirm-modal.tpl.html";
      var controller = "ConfirmModalCtrl";
      var message = "";
      var extraClass = "";
      var size = "lg";

      if (cubeNames && cubeNames.length > 0) {
        message = $translate.instant('_REMOVE_MODEL_MESSAGE_', {modelList: cubeNames.toString()});
      }
      var resolve = {
        title: function () {
          return "_REMOVE_MODEL_CONFIRM_TITLE_"
        },
        message: function () {
          return message;
        }
      };
      var modalInstance = ModalService.openModal(controller, templateUrl, resolve, extraClass, size);

     return modalInstance.result;
    }

    function addModel() {
      vm.error = "";
      var modelToAdd = angular.copy(ModelFactory.getModel());
      if (ModelFactory.isValidModel()) {
        if (ModelFactory.isAutoGeneratedDateTime() || ModelFactory.isFilterModel()) {
          delete modelToAdd.inputField;
        }
        vm.policy.transformations.push(modelToAdd);
      }
    }

    function removeModel() {
      var modelPosition = ModelFactory.getContext().position;
      //check if there are cubes whose dimensions have model outputFields as fields
      var cubeList = CubeService.findCubesUsingOutputs(vm.policy.transformations[modelPosition].outputFields);

      return showConfirmRemoveModel(cubeList.names).then(function () {
        vm.policy.cubes = UtilsService.removeItemsFromArray(vm.policy.cubes, cubeList.positions);
        vm.policy.transformations.splice(modelPosition, 1);
      });
    }

    function isLastModel(index) {
      return index == vm.policy.transformations.length - 1;
    }

    function isNewModel(index) {
      return index == vm.policy.transformations.length;
    }

    function changeModelCreationPanelVisibility(isVisible) {
      modelCreationPanel.enabled = isVisible;
    }

    function isActiveModelCreationPanel() {
      return   modelCreationPanel.enabled;
    }

    function resetModel(template){
      var modelNumber = vm.policy.transformations.length;
      var order = 0;

      if (modelNumber > 0) {
        order = vm.policy.transformations[modelNumber - 1].order + 1
      }
      ModelFactory.resetModel(template.model, order, vm.policy.transformations.length);
    }
  }
})();


text:
FROM biocontainers/biocontainers:vdebian-buster-backports_cv1
MAINTAINER biocontainers <biodocker@gmail.com>
LABEL    software="openslide" \
    base_image="biocontainers/biocontainers:vdebian-buster-backports_cv1" \
    container="openslide" \
    about.summary="Python 3 wrapper for reading whole slide image files" \
    about.home="http://openslide.org" \
    software.version="1.1.1-4-deb-py3" \
    upstream.version="1.1.1" \
    version="1" \
    about.copyright=" 2010-2014 Carnegie Mellon University" \
    about.license="LGPL-2.1" \
    about.license_file="/usr/share/doc/openslide/copyright" \
    about.tags=""

USER root
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && (apt-get install -t buster-backports -y python3-openslide || apt-get install -y python3-openslide) && apt-get clean && apt-get purge && rm -rf /var/lib/apt/lists/* /tmp/*
USER biodocker


text:
[(#REM)

	Ce squelette definit les styles de l'espace prive

	Note: l'entete "Vary:" sert a repousser l'entete par
	defaut "Vary: Cookie,Accept-Encoding", qui est (un peu)
	genant en cas de "rotation du cookie de session" apres
	un changement d'IP (effet de clignotement).

	ATTENTION: il faut absolument le charset sinon Firefox croit que
	c'est du text/html !
	<style>
]
#CACHE{3600*100,cache-client}
#HTTP_HEADER{Content-Type: text/css; charset=iso-8859-15}
#HTTP_HEADER{Vary: Accept-Encoding}

#SET{claire,##ENV{couleur_claire,edf3fe}}
#SET{foncee,##ENV{couleur_foncee,3874b0}}
#SET{left,#ENV{ltr}|choixsiegal{left,left,right}}
#SET{right,#ENV{ltr}|choixsiegal{left,right,left}}

[(#REM)
	En attendant que tous les formulaires soient ecrits avec la syntaxe reecommandee
	ce style permet d eviter d avoir une police surdimensionnee dans les textarea de cfg
]
textarea {
	width: 97%;
	font-size:1em;
	margin:0;
}
.entete-formulaire{
	background:white;
	border:1px solid #GET{foncee};
	border-bottom:0;
	padding:0.5em;
	overflow:auto;
	zoom:1; /* correction IE6 */
}
.formulaire_spip .cadre{border: 1px solid #GET{foncee};}

.entete-formulaire p {margin:0 0 0.5em;}

/*
	Note sur ecran large et etroit, en [11846]
		large = 540px (ou 600px!)
		etroit = 505px
*/

/* Style des formulaires d'edition
----------------------------------------------- */
.formulaire_spip {
	font-size:11px;
	line-height: 1.4em;
	padding:0;
	clear:both;

	border: 1px solid #GET{foncee};
	color: #333;
	background: #fff [url((#CHEMIN{images/formulaire-editer.jpg}|image_sepia{#[(#GET{claire}|couleur_eclaircir)]}|image_aplatir{jpg}|extraire_attribut{src})) repeat-x bottom];
}

/*
.cadre-formulaire{background:white;padding:0;}
.entete-formulaire{padding:0.5em;}
*/

/* ul li */
.formulaire_spip ul {
	margin: 0;
	padding: 0;
	list-style: none;
}
.formulaire_spip li {
	margin: 0;
	padding: 10px 10px 10px 10px;
	padding-#GET{left}:130px;
	clear:both;
	overflow:hidden;
	border-top: 1px solid #[(#GET{foncee}|couleur_eclaircir|couleur_eclaircir)];
}
/* Pour les cases à cocher */
.formulaire_spip li.choix,
.formulaire_spip li.editer_groupe_mots_associer,
.formulaire_spip li.editer_groupe_mots_reglage_avance,
.formulaire_spip li.editer_groupe_mots_editeur{
	padding-#GET{left}:10px;
}
.formulaire_spip li fieldset li {border:0; padding-top:5px; padding-bottom:5px;}

/* elements du formulaire */
.formulaire_spip input.text,
.formulaire_spip input.password,
.formulaire_spip textarea,
.formulaire_spip select {
	width: 97%;
	font-size:1em;
	margin:0;
}
.formulaire_spip input.submit,
.formulaire_spip input.reset,
.formulaire_spip input.button {
	width: auto;
}

/* intitules (label) */
.formulaire_spip li label {
	width: 120px;
	float:#GET{left};
	margin-#GET{left}:-125px;
	text-align: #GET{left};
	vertical-align: top;
	color:#555;
	font-weight:bold;
	/* pour IE6 */
	position:relative;
	display:inline;
}
/* pour les autres */
.formulaire_spip ul>li label {
	display:block;
	position:static;
}

.formulaire_spip li p {
	margin-top:0;
	margin-bottom:0;
}

/* fieldset */
.formulaire_spip li.fieldset {padding:0;}
.formulaire_spip fieldset {
	margin:0;
	padding:0 0 5px 0;
	border:0;
}
.formulaire_spip li fieldset {
	border-top:1px solid #GET{claire};
	border-bottom:1px solid #GET{claire};
	background:transparent;
}
.formulaire_spip fieldset legend {
	padding:0.5em;
	font-weight:bold;
	font-style:italic;
	font-size:1.2em;
}
.formulaire_spip li fieldset legend {
	font-style:normal;
	font-size:1em;
	margin-#GET{left}:0px;
	line-height:0.6em;
	background:#fff; /* ie 6*/
}
.formulaire_spip li fieldset >legend {
	background:none; /* others */
}
.formulaire_spip li fieldset h3.legend {
	font-size:1.1em;
	color:#333;
	margin-top:0;
	background:#GET{claire};
	padding:2px 5px;
}

/* champ des radio/checkbox
*  on annule les decalages de label/champs
*  lorsqu'ils sont inclus dans une class .champ
*
*  La liste par defaut est verticale
*  pour l'avoir horizontale, il faut specifier :
*  .formulaire_spip .formulaire_editer .editer_qqc .champ{display:inline;}
*/
.formulaire_spip .choix label {float:none; margin-#GET{left}:5px; display:inline;color:#555 !important;font-weight:normal !important;width:auto;}
.formulaire_spip .choix label input {vertical-align:middle;}
.formulaire_spip .choix input.radio,
.formulaire_spip .choix input.checkbox {width:auto;}

/* icone d'aide */
/*.formulaire_spip li em.aide { float:#GET{right};margin-#GET{right}:-10px;}*/

/* boutons */
.formulaire_spip .boutons,.boutons_formulaire {
	margin:0; clear:both;
	text-align: #GET{right};
	font-size: 1.2em;
	padding: 7px 1em;
	margin:0;
}
#navigation .formulaire_spip .boutons,.boutons_formulaire,#extra .formulaire_spip .boutons,.boutons_formulaire {
	padding: 5px;
}

.boutons_formulaire {font-size:1em;}
.formulaire_spip .boutons input.submit,.boutons_formulaire input.submit {
	margin-#GET{left}: 1em;
	padding: 0 1em;
	font-weight:normal;
}

/* obligatoire */
.formulaire_spip li.obligatoire {
	background-color:[ #(#GET{claire}|couleur_eclaircir)];
}
.formulaire_spip li.obligatoire label {
	font-weight: bold;
	color:#000;
}

/* erreur */
.formulaire_spip .erreur input.text,
.formulaire_spip .erreur textarea {
	background-color: #FFCCCC;
	border-style: solid;
	border-color: #C30;
}
.formulaire_spip .erreur .erreur_message,
.formulaire_spip em.attention {
	color: #C30;
	font-weight: bold;
}
.formulaire_spip .erreur_message{
	display:block;
}

.formulaire_spip .reponse_formulaire{
	margin-#GET{left}:0.5em;
	margin-#GET{right}:0.5em;
	font-weight: bold;
	border:1px solid black;
	padding:5px;
}
/* message reussite ? */
.formulaire_spip .reponse_formulaire_ok{
	border-color: #53AD20;
	background:#E0FFCF;
}
.formulaire_spip .reponse_formulaire_erreur{
	border-color: #C30;
	background:#FFD0BF;
}

/* commentaires */
.formulaire_spip .explication{	font-size:10px;	padding:10px;}
.formulaire_spip li >.explication{ padding:0;}

/* remarques importantes */
.formulaire_spip em.attention{
	display:block;
	margin:0.5em;
	font-weight:normal;
}

/* barre d'outil */
.formulaire_spip table.spip_barre{
	background:#aaa;
	border: 1px solid #666;
	width:90%; /* pour mettre a la meme taille que les champs de formulaire */
	background:none; border:0; margin:0; padding:0;/**/
}
.formulaire_spip table.spip_barre a img {
	background-color:#ccc;
	padding: 2px;
	border: 1px solid #666;
	margin-right:1px;
}
.formulaire_spip table.spip_barre a:hover img{
	background:white;
}

/*
 * Formulaires compactes
 */
.formulaire_spip_compact li,#navigation .formulaire_spip li,#extra .formulaire_spip li {padding:2px 5px;border:none;}
.formulaire_spip_compact li label,#navigation .formulaire_spip li label,#extra .formulaire_spip li label {float:none;margin-#GET{left}:0;width:auto;}
.formulaire_spip .editer_date select {width:auto;}

/*
 * Cas particuliers
 */

/* annuler les f@@@@ div de sa majeste */
div.edition, div.label {display:inline;}

/* accepter la classe 'haut' pour mettre les blocs
   sur toute la largeur du formulaire comme la css du core... */
.formulaire_spip li.haut {padding-left:5px;}
.formulaire_spip li.haut label {margin-left:0px;margin-bottom:5px; display:block; float:none;width:auto;}
.formulaire_spip li.haut textarea {width:98%;}

.formulaire_editer .editer_parent {background:#eee;}
.formulaire_editer .editer_parent #choix_parent {}
.formulaire_editer .editer_parent #choix_parent_principal,
.formulaire_editer .editer_parent #choix_parent_selection {margin-#GET{left}:-120px;}

#contenu .formulaire_editer .editer_titre input,
#contenu .formulaire_editer .editer_nom input{font-size:1.2em; font-weight:bold;}
.formulaire_editer .editer_chapo textarea{height:12em;}

/* le brouteur de rubrique en cas de petit ecran doit etre aussi plus petit ! */
.etroit .formulaire_editer .editer_parent #titreparent{width:50% !important;}

/* pour mettre les text-area en grand...*/
.formulaire_editer .editer_texte,
.formulaire_editer .editer_chapo,
.formulaire_editer .editer_descriptif {padding-left:5px;}
.formulaire_editer .editer_texte label,
.formulaire_editer .editer_chapo label,
.formulaire_editer .editer_descriptif label {margin-left:0px;margin-bottom:5px; display:block; float:none;width:auto;}
.formulaire_editer .editer_texte textarea,
.formulaire_editer .editer_chapo textarea,
.formulaire_editer .editer_descriptif textarea {width:98%;}
.formulaire_editer .editer_texte table.spip_barre {width:98%;}
/* */

/* auteur */
.formulaire_editer_auteur .editer_statut ul{margin:0; }
.formulaire_editer_auteur .editer_statut li{list-style-position:inside; padding:0;}
.formulaire_editer_auteur .editer_statut input[type=submit]{width:auto;}

.formulaire_editer_auteur li.editer_statut .instituer_auteur {margin-top:15px;margin-left:-125px;}

.formulaire_editer .editer_redacteurs_connectes p.explication{margin:0.5em;}

/* si on enleve le: ul fieldset{margin-left:-125px;} il faut remettre ceci : * /
.formulaire_editer .editer_identification{padding-left:5px;}
.formulaire_editer .editer_redacteurs_connectes{padding-left:5px;}
.formulaire_editer .editer_referencement_automatise {padding-left:5px;}
.formulaire_editer .editer_syndications {padding-left:5px;}
.formulaire_editer .editer_liens_sites {padding-left:5px;}
/* */

/* sites */
.formulaire_editer .editer_referencement_automatise label {margin-left:0px;}
.formulaire_editer .editer_referencement_automatise li {padding-left:5px;}
.formulaire_editer .editer_referencement_automatise li label {display:block; float:none; width:auto;}

/* breves */
.formulaire_editer_breve .editer_statut{padding-#GET{left}:250px;}
.formulaire_editer_breve .editer_statut label{width:240px;margin-#GET{left}:-245px;}

/* navigateur de rubrique */
.confirmer_deplacement input {
	float: #GET{left};
	margin-#GET{left}: -20px;
}

/* barre typo */

table.spip_barre {
	background-color: #GET{foncee};
	border-left: 1px solid #GET{claire};
	border-right: 1px solid #GET{claire};
	padding: 3px;
	padding-bottom: 0px;
}

table.spip_barre a img {padding: 3px; border: 1px outset #GET{claire}; }
table.spip_barre a:hover img { background: #FFF; border: 1px solid #CC9; }
table.spip_barre input.barre { width: 99%; background: transparent; border: 0; color: #F57900; }

/* retablir les ul.spip dans les explications */

.formulaire_spip ul.spip,.formulaire_spip ol.spip {
	margin:10px 0;
	margin-#GET{left}: 10px;
	list-style-type: disc;
	list-style-position: outside;
}
.formulaire_spip ol.spip {
	list-style-type: decimal;
}
.formulaire_spip ul.spip li {
	margin-#GET{left}: 10px;
	padding: 0;
	overflow:visible;
}

.formulaire_spip a {color:[#(#GET{foncee}|couleur_foncer)];text-decoration:underline;}

/* Style des formulaires de configuration
----------------------------------------------- */
.formulaire_configurer {margin:2em 0;}


text:
require 'bronze/constraints'
require 'bronze/errors'

module Bronze::Constraints
  # Constraints encapsulate a single expectation that an object may or may not
  # match. Constraints can be used individually or aggregated into a contract.
  class Constraint
    # Error class for handling constraints that do not support negated matching.
    class InvalidNegationError < StandardError; end

    # Error class for handling unimplemented constraint methods. Subclasses of
    # Constraint must implement these methods.
    class NotImplementedError < StandardError; end

    def match object, passed_errors = nil
      @errors = passed_errors

      return [true, errors] if matches_object? object

      [false, build_errors(object)]
    end # method match

    # TODO: remove passed_errors pattern!
    def negated_match object, passed_errors = nil
      @errors = passed_errors

      return [true, errors] if negated_matches_object? object

      [false, build_negated_errors(object)]
    end # method negated_match
    alias_method :does_not_match, :negated_match

    private

    def build_errors _object
      errors
    end # method build_errors

    def build_negated_errors _object
      errors
    end # method build_errors

    def errors
      @errors ||= Bronze::Errors.new
    end # method errors

    def matches_object? _object
      raise NotImplementedError,
        "#{self.class.name} does not implement :matches_object?",
        caller
    end # method matches_object?

    def negated_matches_object? object
      !matches_object?(object)
    end # method negated_matches_object?

    def raise_invalid_negation call_stack = nil
      raise InvalidNegationError,
        "#{self.class.name} constraints do not support negated matching",
        call_stack || caller(*1..-1)
    end # method raise_invalid_negation
  end # class
end # module


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">

<title>org.snmp4j.mp</title>

Provides classes and interfaces for the SNMP message processing.

The org.snmp4j.mp classes provide services to process SNMP
messages. The services provided are defined in the
MessageProcessingModel interface and include the following:

Prepare data elements from an incoming SNMP message as described in
  RFC3412 §7.2.

Prepare a response message as defined in RFC3412 §7.1.

Prepare an outgoing message as defined in RFC3412 §7.1.

This interface is implemented
by the message processing model classes for the SNMP versions 1, v2c, and v3:
MPv1, MPv2c, and MPv3.

The MessageDispatcherImpl chooses which message processing model
it uses to process an outgoing or incoming SNMP message based on the SNMP
version of the message. The SNMP version is either extracted from the message
header (incoming message) or from the Target instance associated
with the outgoing PDU (ougoing message).

To be able to match requests and responses SNMP uses request IDs. Since request
IDs are created by the command generator, the request IDs are unique within
such a command generator only. SNMP4J therefore has to abstract from request IDs
and uses PduHandle instances instead.

  If a PDU is processed for sending by the SNMP4J
  MessageDispatcherImpl and
  the PDU's request ID is set to 0, then a SNMP4J application wide unique ID
  is generated and set as request ID of the supplied PDU. In any case, the
  PDU's request ID will be used as transaction ID of the outgoing message. The
  transaction ID identifies a messages PduHandle.

  If a PDU is received  by the SNMP4J
  MessageDispatcherImpl a unique transaction ID is generated so
  that command responders as well as the message processing model can match
  requests and responses.

  The following UML class diagram shows the most important classes of the
  org.snmp4j.mp package and their relationships
  (relationships to other packages are not shown):


text:
package com.specmate.testspecification.internal.generators;

import java.util.Comparator;
import java.util.Iterator;
import java.util.Set;
import java.util.Map.Entry;

import com.specmate.model.base.IContainer;
import com.specmate.model.requirements.CEGNode;

public class CEGNodeEvaluationComparator implements Comparator<CEGNodeEvaluation> {

	@Override
	public int compare(CEGNodeEvaluation nodeEval1, CEGNodeEvaluation nodeEval2) {
		Set<Entry<CEGNode, TaggedBoolean>> sortedNodeSet1 = nodeEval1.entrySet();
		Set<Entry<CEGNode, TaggedBoolean>> sortedNodeSet2 = nodeEval2.entrySet();

		Iterator<Entry<CEGNode, TaggedBoolean>> it1 = sortedNodeSet1.iterator();
		Iterator<Entry<CEGNode, TaggedBoolean>> it2 = sortedNodeSet2.iterator();

		while (it1.hasNext() && it2.hasNext()) {
			Entry<CEGNode, TaggedBoolean> sortedNodeSetEntry1 = it1.next();
			Entry<CEGNode, TaggedBoolean> sortedNodeSetEntry2 = it2.next();
			CEGNode node1 = sortedNodeSetEntry1.getKey();
			CEGNode node2 = sortedNodeSetEntry2.getKey();

			/*
			 * Compare properties of both evaluations until they differ
			 * Check order:
			 * 		1. Compare names of nodes
			 * 		2. Compare conditions of nodes
			 * 		3. Compare taggedBoolean value property of nodes
			 * 		4. Compare taggedBoolean tag property of nodes
			 * */
			int result = node1.getVariable().compareTo(node2.getVariable());
			if (result != 0) {
				return result;
			}
			// Check if the condition of the nodes is also the same
			int conditionResult = node1.getCondition().compareTo(node2.getCondition());
			if (conditionResult != 0) {
				return conditionResult;
			}

			/*
			 * Check if the taggedBoolean values are also equal
			 * Order: false < true
			 */
			TaggedBoolean taggedBoolean1 = sortedNodeSetEntry1.getValue();
			TaggedBoolean taggedBoolean2 = sortedNodeSetEntry2.getValue();
			int boolResult = Boolean.compare(taggedBoolean1.value, taggedBoolean2.value);
			if (boolResult != 0) {
				return boolResult;
			}

			/*
			 * Values are also equal, check if the tags are equal
			 * Order: all < any < auto
			 */
			int tagResult = taggedBoolean1.tag.compareTo(taggedBoolean2.tag);
			if (tagResult != 0) {
				return tagResult;
			}
		}
		/*
		 * Both or one of the sets has come to an end
		 * Either one set of evaluation is a subset of the other, or they are the same
		 */
		if (!it1.hasNext() && !it2.hasNext()) {
			/*
			 * Both sets are the same
			 * Even if the current test generation heuristic does not create two sets which are the same,
			 * we still need this in order to delete evaluations from the set
			 */
			return 0;
		}
		if (!it1.hasNext()) {
			// set1 is smaller, set nodeEval1 < nodeEval2
			return -1;
		}
		// set2 is smaller, set nodeEval2 < nodeEval1
		return 1;
	}
}


text:
from Genetic.constants import *
import random
from collections import OrderedDict

class dna(object):
    """Object that holds genetic information as a pair of strands
       - Each strand is a dict of numbers
    """
    def __init__(self, genes=[], strands=None):
        if strands is None:
            self.strands = (OrderedDict(), OrderedDict())
            for gene in genes:
                for strand in self.strands:
                    strand[gene] = dna.random_gene_value()
        else:
            self.strands = strands

    def get_random_strand(self):
        strand = self.strands[0] if random.random() < 0.5  else self.strands[1]
        return dna.mutate_strand(strand.copy())

    def get(self, key):
        return (self.strands[0][key] + self.strands[1][key])/2

    def __str__(self):
        output = ""
        if VERBOSE:
            for i in range(2):
                output += '[%s]: ' % i
                for key in self.strands[i]:
                    output += dna.format_output(key, self.strands[i][key])
                if i != 1:
                    output += "|/\| "
        else:
            for key in self.strands[0]:
                output += dna.format_output(key, self.get(key))
            pass
        return output

    def __repr__(self):
        return self.__str__()

    @staticmethod
    def format_output(key, value):
        return ('[%s]: {:8.%sf} ' % (key, DECIMAL_PRECISION)).format(value)

    @staticmethod
    def mutate_strand(strand):
        for key in strand:
            if random.random() < MUTATION_PROBABILITY:
                strand[key] = (((random.random() - 0.5) * MUTATION_SIZE) + 1) * strand[key]
        return strand

    @staticmethod
    def random_gene_value():
        return (random.random() - 0.5) * INITIAL_GENE_VALUE_LIMIT


text:
set -o errexit
set -o nounset

# Test existing persistent disk abilities.
#
# This test is designed to verify that mounting an existing Google Persistent
# Disk works.
# Input files have been placed inside the persistent disk ahead of time.
#
# The actual operation performed here is to download a BAM and compute
# the md5, writing it to <filename>.bam.md5.
# and compute its md5, writing it to <filename>.bam.md5.

readonly SCRIPT_DIR="$(dirname "${0}")"

# Do standard test setup
source "${SCRIPT_DIR}/test_setup_e2e.sh"

# Do io setup
source "${SCRIPT_DIR}/io_setup.sh"

readonly ZONES="${TEST_EXISTING_DISK_ZONE}"

io_setup::existing_disk_setup
echo "Launching pipeline..."
JOB_ID="$(io_setup::run_dsub_with_mount "${TEST_EXISTING_DISK_URL}")"

# Do validation
io_setup::check_output
io_setup::check_dstat "${JOB_ID}" false "${TEST_EXISTING_DISK_URL}"


text:
module AwesomeNestedSetOvveride
  # Add :polimorphic key option only when used to make it work with Rails 6.1+,
  # required since rails/rails@2c008d9
  # This can be removed when upgrading to an awesome_nested_set version
  # compliant with Rails 6.1+, already addressed in
  # collectiveidea/awesome_nested_set#421
  module RelateParent
    def acts_as_nested_set_relate_parent!
      # Disable Rubocop to keep original code for diffs
      # rubocop:disable
      options = {
        :class_name => self.base_class.to_s,
        :foreign_key => parent_column_name,
        :primary_key => primary_column_name,
        :counter_cache => acts_as_nested_set_options[:counter_cache],
        :inverse_of => (:children unless acts_as_nested_set_options[:polymorphic]),
        :touch => acts_as_nested_set_options[:touch]
      }
      options[:polymorphic] = true if acts_as_nested_set_options[:polymorphic]
      options[:optional] = true if ActiveRecord::VERSION::MAJOR >= 5
      belongs_to :parent, options
      # rubocop:enable
    end

    CollectiveIdea::Acts::NestedSet.prepend self
  end

  # Skip breaking model reload before update depth. Already addressed in
  # collectiveidea/awesome_nested_set#413
  # This can be removed when a new version of awesome_nested_set is released.
  module Model
    def set_depth!
      return unless has_depth_column?

      in_tenacious_transaction do
        update_depth(level)
      end
    end

    CollectiveIdea::Acts::NestedSet::Model.prepend self
  end
end


text:
(function() {

    module.exports = require('./lib/QueryCompiler');

})();


text:
<?php
namespace Iphp\FileStoreBundle\Tests\Naming;

use Iphp\FileStoreBundle\Naming\NamerServiceInvoker;
use Iphp\FileStoreBundle\Tests\Mocks;

class NamerServiceInvokerTest extends \PHPUnit_Framework_TestCase
{
    /**
     * @var \Iphp\FileStoreBundle\Naming\NamerServiceInvoker
     */
    protected $invoker;

    /**
     * @var \Symfony\Component\DependencyInjection\ContainerInterface
     */
    protected $container;

    protected function setUp()
    {
        $this->container = Mocks::getContainerMock($this);
        $this->invoker = new NamerServiceInvoker ($this->container);
    }

    public function testRename()
    {
        $propertyMapping = Mocks::getPropertyMappingMock($this);

        $namer = $this->getMockBuilder('Iphp\FileStoreBundle\Naming\DefaultNamer')
            ->disableOriginalConstructor()
            ->getMock();

        $this->container
            ->expects($this->once())
            ->method('get')
            ->with('test.service')
            ->will($this->returnValue($namer));

        $namer->expects($this->once())
            ->method('translitRename')
            ->with($propertyMapping, 'sample file name', array('param' => 1))
            ->will($this->returnValue('sample-file-name'));

        $this->assertSame(
            $this->invoker->rename('test.service', 'translit', $propertyMapping, 'sample file name', array('param' => 1)),
            'sample-file-name'
        );

    }

    public function testResolveCollision()
    {
        $namer = $this->getMockBuilder('Iphp\FileStoreBundle\Naming\DefaultNamer')
            ->disableOriginalConstructor()
            ->getMock();

        $this->container
            ->expects($this->once())
            ->method('get')
            ->with('test.service')
            ->will($this->returnValue($namer));

        $namer->expects($this->once())
            ->method('resolveCollision')
            ->with('sample-file-name', 1)
            ->will($this->returnValue('sample-file-name_1'));

        $this->assertSame($this->invoker->resolveCollision('test.service', 'sample-file-name', 1),
            'sample-file-name_1');
    }
}


text:
/*
 * Licensed under the Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
 * See https://github.com/openiddict/openiddict-core for more information concerning
 * the license and the contributors participating to this project.
 */

using System.ComponentModel;
using Microsoft.AspNetCore.DataProtection;
using OpenIddict.Validation.DataProtection;

namespace Microsoft.Extensions.DependencyInjection;

/// <summary>
/// Exposes the necessary methods required to configure the
/// OpenIddict ASP.NET Core Data Protection integration.
/// </summary>
public sealed class OpenIddictValidationDataProtectionBuilder
{
    /// <summary>
    /// Initializes a new instance of <see cref="OpenIddictValidationDataProtectionBuilder"/>.
    /// </summary>
    /// <param name="services">The services collection.</param>
    public OpenIddictValidationDataProtectionBuilder(IServiceCollection services)
        => Services = services ?? throw new ArgumentNullException(nameof(services));

    /// <summary>
    /// Gets the services collection.
    /// </summary>
    [EditorBrowsable(EditorBrowsableState.Never)]
    public IServiceCollection Services { get; }

    /// <summary>
    /// Amends the default OpenIddict validation ASP.NET Core Data Protection configuration.
    /// </summary>
    /// <param name="configuration">The delegate used to configure the OpenIddict options.</param>
    /// <remarks>This extension can be safely called multiple times.</remarks>
    /// <returns>The <see cref="OpenIddictValidationDataProtectionBuilder"/> instance.</returns>
    public OpenIddictValidationDataProtectionBuilder Configure(Action<OpenIddictValidationDataProtectionOptions> configuration)
    {
        if (configuration is null)
        {
            throw new ArgumentNullException(nameof(configuration));
        }

        Services.Configure(configuration);

        return this;
    }

    /// <summary>
    /// Configures OpenIddict to use a specific data protection provider
    /// instead of relying on the default instance provided by the DI container.
    /// </summary>
    /// <param name="provider">The data protection provider used to create token protectors.</param>
    /// <returns>The <see cref="OpenIddictValidationDataProtectionBuilder"/> instance.</returns>
    public OpenIddictValidationDataProtectionBuilder UseDataProtectionProvider(IDataProtectionProvider provider)
    {
        if (provider is null)
        {
            throw new ArgumentNullException(nameof(provider));
        }

        return Configure(options => options.DataProtectionProvider = provider);
    }

    /// <summary>
    /// Configures OpenIddict to use a specific formatter instead of relying on the default instance.
    /// </summary>
    /// <param name="formatter">The formatter used to read tokens.</param>
    /// <returns>The <see cref="OpenIddictValidationDataProtectionBuilder"/> instance.</returns>
    public OpenIddictValidationDataProtectionBuilder UseFormatter(IOpenIddictValidationDataProtectionFormatter formatter)
    {
        if (formatter is null)
        {
            throw new ArgumentNullException(nameof(formatter));
        }

        return Configure(options => options.Formatter = formatter);
    }

    /// <inheritdoc/>
    [EditorBrowsable(EditorBrowsableState.Never)]
    public override bool Equals(object? obj) => base.Equals(obj);

    /// <inheritdoc/>
    [EditorBrowsable(EditorBrowsableState.Never)]
    public override int GetHashCode() => base.GetHashCode();

    /// <inheritdoc/>
    [EditorBrowsable(EditorBrowsableState.Never)]
    public override string? ToString() => base.ToString();
}


text:
<?php

/**
 * Help
 *
 * The script provides a header response to a help page request,
 * in form of a header redirection to the Wiki URL of that help page.
 *
 * The request comes from our installation wizards.
 * All installation wizards provide a Help Button.
 *
 * A URL for Installation Wizard Help Button is
 * http://wpn-xm.org/help.php?section=install-wizard&type=webinstaller&page=1&version=0.6.0&language=de
 *
 * The URL is build automatically using the procedure HelpButtonClick() in the installer script.
 */

// fetch $_GET parameters

// $_GET['section'] = the help section requested (installation-wizard, ...)
$section = filter_input(INPUT_GET, 'section', FILTER_SANITIZE_STRING);
// $_GET['page'] = the page of the installation wizard
$page = filter_input(INPUT_GET, 'page', FILTER_SANITIZE_STRING);
// $_GET['version'] = version
$version = filter_input(INPUT_GET, 'version', FILTER_SANITIZE_STRING);
// $_GET['language'] = language
$language = filter_input(INPUT_GET, 'language', FILTER_SANITIZE_STRING);
// $_GET['type'] = type of installation wizard (lite, bigpack, allinone, web)
$type = filter_input(INPUT_GET, 'type', FILTER_SANITIZE_STRING);

/**
 * map for wizard page integers to their full page names
 * see http://www.jrsoftware.org/ishelp/index.php?topic=wizardpages
 */
$wizardPages = [
    '1' => 'welcome',
    '2' => 'license-agreement',
    '3' => 'password',
    '4' => 'information',
    '5' => 'user-information',
    '6' => 'select-destination-location',
    '7' => 'select-components',
    '8' => 'select-start-menu-folder',
    '9' => 'select-tasks',
   '10' => 'ready-to-install',
   '11' => 'preparing-to-install',
   '12' => 'installing',
   '13' => 'information',
   '14' => 'setup-completed',
];

/**
 * map for wizard types with correct case
 * see line with "#define InstallerType" in the iss files
 */
$wizardTypes = [
    'webinstaller' => 'Webinstaller',
    'allinone'     => 'AllInOne',
    'bigpack'      => 'BigPack',
    'lite'         => 'Lite',
    // from v0.8.0 on
    'standard' => 'Standard',
    'full'     => 'Full',
    // from v0.8.5 on
    'literc'   => 'LiteRC',
];

if (!empty($type) && !empty($version) && !empty($language) && !empty($page)) {

    /**
     * Example for a target URL:
     * https://github.com/WPN-XM/WPN-XM/wiki/Installation-Wizard-Webinstaller-v0.6.0-de#Welcome
     */

    $helpURL = sprintf(
        'https://github.com/WPN-XM/WPN-XM/wiki/Installation-Wizard-%s-v%s-%s#%s',
        $wizardTypes[$type],
        $version,
        $language,
        $wizardPages[$page]
    );

    // redirect
    header('Location: ' . $helpURL);
} else {
    header('HTTP/1.0 404 Not Found');
}


text:
{% spaceless %}
'Região {{ cluster.label }} - Urgência {{ cluster.score|floatformat:2 }}
{{ cluster.address|linebreaks }}
Focos: {{ cluster.focus_count }}

Criadouros: {{ cluster.breeding_count }}

Suspeitas: {{ cluster.suspicion_count }}'
{% endspaceless %}


text:
"""apman URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/1.10/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  url(r'^$', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  url(r'^$', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.conf.urls import url, include
    2. Add a URL to urlpatterns:  url(r'^blog/', include('blog.urls'))
"""
from django.conf.urls import include
from django.conf.urls.static import static
from django.contrib import admin
from django.contrib.auth import views as auth_views

from satsound.urls import *

urlpatterns = [
                  url(r'', include(satsound_urls), name='satsound'),
                  url(r'^accounts/', include('allauth.urls')),
                  url(r'^admin/password_reset/$', auth_views.password_reset, name='admin_password_reset'),
                  url(r'^admin/password_reset/done/$', auth_views.password_reset_done, name='password_reset_done'),
                  url(r'^reset/(?P<uidb64>[0-9A-Za-z_\-]+)/(?P<token>.+)/$', auth_views.password_reset_confirm,
                      name='password_reset_confirm'),
                  url(r'^reset/done/$', auth_views.password_reset_complete, name='password_reset_complete'),
                  url(r'^admin/', admin.site.urls, name='admin'),
                  url(r'^api/', include(api_urls), name='api-root'),
                  url(r'^api-auth/', include('rest_framework.urls', namespace='rest_framework')),
              ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)


text:
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
#include <unistd.h>
#include <stdio.h>
#include <sys/types.h>
#include <sys/wait.h>
#include "LineParser.h"

#define PATH_MAX 1024
#define MAX_INPUT_LENGTH 2048
#define STDIN 0
#define STDOUT 1
#define EXIT_SUCCESS 0
#define EXIT_FAILURE 1

typedef struct history_link{
  char* cmd;
  struct history_link* next;
}history_link;

typedef struct env_link{
  char* var;
  char* value;
  struct env_link* next;
}env_link;

/* if a user input contains piping, set up the pipes */
int** create_pipes(int num_pipes){
  int** pipes = (int**) malloc(sizeof(int**) * num_pipes);
  int index = 0;
  for(; index < num_pipes; index++){
    pipes[index] = (int*) malloc(sizeof(int*) * 2);
    if (pipe(pipes[index]) == -1) {
      perror("Create pipes: Pipe not successful");
      return 0;
    }
  }
  return pipes;
}

/* realease the pipes and free their memory allocations once they're not needed */
void release_pipes(int** pipes, int num_pipes){
  int index = 0;
  for(; index < num_pipes; index++){
    close(pipes[index][0]);
    close(pipes[index][1]);
    free(pipes[index]);
  }
  free(pipes);
}

/* get the left pipe of a block in the piping sequence */
int* get_left_pipe(int** pipes, cmdLine* pCmdLine){
  if(pCmdLine->idx > 0)
    return pipes[pCmdLine->idx - 1];
  else
    return NULL;
}

/* get the right pipe of a block in the piping sequence */
int* get_right_pipe(int** pipes, cmdLine* pCmdLine){
   if(pCmdLine->next == NULL)
     return NULL;
   else
     return pipes[pCmdLine->idx];
}

/* count the number of necessary pipes in the user input */
int count_pipes(cmdLine* pCmdLine){
  int result = 0;
  while(pCmdLine->next != NULL){
    result++;
    pCmdLine = pCmdLine->next;
  }
  return result;
}

/* search the history for a specific numbered entry */
char* search_history(history_link* head, int entry_num){
  int index = 1;
  while(index < entry_num){
    head = head->next;
    index++;
  }
  return head->cmd;
}

/* print the entire command history */
void print_history(history_link* head){
  int index = 1;
  while(head != NULL){
    printf("%u: %s\n", index, head->cmd);
    head = head->next;
    index++;
  }
}

/* clear the history memory allocations */
void clear_history(history_link* head){
  history_link* prev;
  while(head->next != NULL){
    free(head->cmd);
    prev = head;
    head = head->next;
    free(prev);
  }
  /* take care of the last link in the list, which doesn't satisfy the loop
  condition */
  if(head->next == NULL){
    free(head->cmd);
    free(head);
  }
}

/* check if user input contains reference to environment variables */
int vars_appear_in_user_input(cmdLine* cmd_line){
  int index = 0;
  for(; index < cmd_line->argCount; index++){
    if(strpbrk(cmd_line->arguments[index], "$") != 0)
      return index;
  }
  return 0;
}

/* return an environment variable's value */
char* get_from_env(char* var_to_pull, env_link* head){
  while(head != NULL){
    if(head->var == NULL)
      break;
    if(strcmp(var_to_pull, head->var) != 0)
      head = head->next;
    else
      break;
  }
  if(head == NULL)
    return NULL;
  return head->value;
}

/* clear the environment memory allocations */
void clear_env(env_link* head){
  env_link* prev;
  while(head->next != NULL){
    free(head->var);
    free(head->value);
    prev = head;
    head = head->next;
    free(prev);
  }
  if(head->next == NULL){
    free(head->var);
    free(head->value);
    free(head);
  }
}

/* extend the environment with a new variable. if a variable by that name
already exists, overwrite its value */
void extend_env(env_link* head, char* new_var, char* value){
  /* the environment is empty, just paste the data to the history's head link */
  if(head->var == NULL){
    head->var = new_var;
    head->value = value;
    head->next = NULL;
    return;
  }
  /* the environment isn't empty, search for its last link OR if the variable
  already appears*/
  while(strcmp(head->var, new_var) != 0 && head->next != NULL){
    head = head->next;
  }
  if(head->next != NULL || (head->next == NULL && strcmp(head->var, new_var) == 0)){
    free(head->var);
    free(head->value);
    head->var = new_var;
    head->value = value;
  /* the variable doesn't appear already; reached the end of the list, append a
   new link and paste the data */
  }else{
    head->next = (env_link*) malloc(sizeof(env_link));
    head = head->next;
    head->next = NULL;
    head->var = new_var;
    head->value = value;
  }
}

/* rename an environment variable, while keeping its key */
void rename_var_in_env(env_link* head, char* old_var, char* new_var){
  while(strcmp(head->var, old_var) != 0 && head->next != NULL){
    head = head->next;
  }
  free(head->var);
  free(old_var);
  head->var = new_var;
}

/* remove a variable-value pair from the environment. the returned value is the proper
list head after the removal */
env_link* remove_var_from_env(env_link* head, char* var_to_remove){
  env_link* true_head = head;
  /* if the variable to remove is the first link in the list */
  if(strcmp(var_to_remove, head->var) == 0){
    true_head = true_head->next;
    free(head->var);
    free(head->value);
    free(head);
    return true_head;
  }
  /* else, the variable to remove is along the list */
  env_link* jumper = head->next;
  while(strcmp(jumper->var, var_to_remove) != 0){
    jumper = jumper->next;
    head = head->next;
  }
  free(jumper->var);
  free(jumper->value);
  head->next = jumper->next;
  free(jumper);
  return true_head;
}

/* print all the environment variables and their values as <var>=<value> pairs */
void print_env(env_link* head){
  if(head == NULL){
    printf("The environment is empty.\n");
    return;
  }
  if(head->var == NULL){
    printf("The environment is empty.\n");
    return;
  }
  while(head != NULL){
    printf("%s=%s\n", head->var, head->value);
    head = head->next;
  }
}

/* execute the user input after all necessary pre-processing */
void execute(cmdLine* pCmdLine, int** pipes, int num_of_pipes, int* left_pipe, int* right_pipe, history_link* history_head, env_link* env_head){
  pid_t pid = fork();
  if(pid == -1) {
    perror("Fork failed.");
  }else if (pid == 0) {
      if(pCmdLine->inputRedirect != NULL){
        close(STDIN);
        fopen(pCmdLine->inputRedirect, "r");
      }
      if(pCmdLine->outputRedirect != NULL){
        close(STDOUT);
        fopen(pCmdLine->outputRedirect, "w");
      }
	    if(left_pipe != NULL){
        close(STDIN);
        dup(left_pipe[0]);
        close(left_pipe[0]);
	    }
	    if(right_pipe != NULL){
        close(STDOUT);
        dup(right_pipe[1]);
        close(right_pipe[1]);
	    }
      if(strcmp(pCmdLine->arguments[0], "history") == 0){
        print_history(history_head);
        clear_history(history_head);
        clear_env(env_head);
        freeCmdLines(pCmdLine);
        release_pipes(pipes, num_of_pipes);
        _exit(EXIT_SUCCESS);
      }
      else if (strcmp(pCmdLine->arguments[0], "env") == 0){
        print_env(env_head);
        clear_history(history_head);
        clear_env(env_head);
        freeCmdLines(pCmdLine);
        release_pipes(pipes, num_of_pipes);
        _exit(EXIT_SUCCESS);
      }
      else
        execvp(pCmdLine->arguments[0], pCmdLine->arguments);
	    perror("Error: ");
      clear_history(history_head);
      clear_env(env_head);
      freeCmdLines(pCmdLine);
      release_pipes(pipes, num_of_pipes);
	    _exit(EXIT_FAILURE);
    }else if(pCmdLine->blocking != 0){
        if(right_pipe != NULL)
          close(right_pipe[1]);
        if(left_pipe != NULL)
          close(left_pipe[0]);
        int status;
        (void)waitpid(pid, &status, 0);
    }else{
        if(right_pipe != NULL)
          close(right_pipe[1]);
        if(left_pipe != NULL)
          close(left_pipe[0]);
    }
}

int main(int argc, char** argv){
  if(argc != 1){
    printf("Usage: simple-shell\n\n\n\n\n\n\nPlease refer to README.md for usage instructions");
    exit(EXIT_FAILURE);
  }
  history_link* history_head = (history_link*) calloc(1, sizeof(history_link));
  history_link* history_tail = history_head;
  env_link* env_head = (env_link*) calloc(1, sizeof(env_link));
  char first_link = 1;
  int num_of_history_entries = 0;
  char* exclamation;
  cmdLine* cmd_lines;
  char loop_break = 0;
  char* home_path = getenv("HOME");
  while(1){
    char current_path[PATH_MAX] = "";
    getcwd(current_path, PATH_MAX);
    printf("%s>", current_path);
    fflush(stdout);
    char* user_input = (char*) malloc(MAX_INPUT_LENGTH);
    user_input = fgets(user_input, MAX_INPUT_LENGTH, stdin);
    if(!user_input){
      printf("There was an error while reading user input.\n");
      free(user_input);
      exit(EXIT_FAILURE);
    }
    /* fgets() appends an undesired '\n' to the end of the string, so we
    want to remove it. if there's no such character, it means that we're
    pulling a command from the history, and it was already 'cleaned' */
    if(user_input[strlen(user_input) - 1] == '\n')
      user_input[strlen(user_input) - 1] = '\0';
    if(first_link){
      history_head->cmd = user_input;
      first_link = 0;
      num_of_history_entries++;
    }else{
      history_tail->next = (history_link*) malloc(sizeof(history_link));
      history_tail = history_tail->next;
      history_tail->cmd = user_input;
      history_tail->next = NULL;
      num_of_history_entries++;
    }
    cmd_lines = parseCmdLines(user_input);
    /* check if the command is to pull an older command from hisotry */
    if((exclamation = strpbrk(cmd_lines->arguments[0], "!")) != 0){
      int history_entry_to_pull = atoi(++exclamation);
      if(history_entry_to_pull > num_of_history_entries || history_entry_to_pull < 0){
        printf("Error: request to execute a non-existent history entry.\n");
        freeCmdLines(cmd_lines);
        continue;
      }
      else{
        freeCmdLines(cmd_lines);
        user_input = search_history(history_head, history_entry_to_pull);
        cmd_lines = parseCmdLines(user_input);
      }
    }
    /* if the command contains enironment variables, we will replaces them with their respective values */
    int index;
    while((index = vars_appear_in_user_input(cmd_lines)) != 0){
      char* var = cmd_lines->arguments[index];
      var++;
      char* value = get_from_env(var, env_head);
      if(value == NULL){
        loop_break = 1;
        char* var = cmd_lines->arguments[index];
        var++;
        printf("No such environment value: %s.\n", var);
        break;
      }else if (!replaceCmdArg(cmd_lines, index, value)){
        loop_break = 1;
        printf("There is no such index: %u.\n", index);
        break;
      }
    }
    /* the command contains a non-existent variable, so there's no point to continue the loop */
    if(loop_break){
      freeCmdLines(cmd_lines);
      loop_break = 0;
      continue;
    }
    /* the command is to quit the program */
    if(strcmp(cmd_lines->arguments[0], "quit") == 0){
      freeCmdLines(cmd_lines);
      break;
    }
    /* the command is to change directory */
    if(strcmp(cmd_lines->arguments[0], "cd") == 0){
      if(strpbrk(cmd_lines->arguments[1], "~") == NULL){
        if(chdir(cmd_lines->arguments[1]) == -1)
          printf("No such directory: %s\n", cmd_lines->arguments[1]);
      }else{
        char* rest_of_path = cmd_lines->arguments[1];
        rest_of_path++;
        char* expanded_path = (char*) calloc(1, strlen(home_path) + strlen(rest_of_path) + 1);
        strcat(expanded_path, home_path);
        strcat(expanded_path, rest_of_path);
        if(chdir(expanded_path) == -1)
          printf("No such directory: %s\n", expanded_path);
        free(expanded_path);
      }
      freeCmdLines(cmd_lines);
    /* the command is to set an environment variable */
    }else if(strcmp(cmd_lines->arguments[0], "set") == 0){
        if(cmd_lines->argCount != 3){
          printf("Error: set command is formatted incorrectly.\n");
          freeCmdLines(cmd_lines);
        }else{
          char* key = (char*) calloc(1, strlen(cmd_lines->arguments[1]) + 1);
          char* value = (char*) calloc(1, strlen(cmd_lines->arguments[2]) + 1);
          strcpy(key, cmd_lines->arguments[1]);
          strcpy(value, cmd_lines->arguments[2]);
          extend_env(env_head, key, value);
          freeCmdLines(cmd_lines);
        }
    /* the command is to rename an environment variable */
    }else if(strcmp(cmd_lines->arguments[0], "rename") == 0){
        if(cmd_lines->argCount != 3){
          printf("Error: rename command is formatted incorrectly.\n");
          freeCmdLines(cmd_lines);
        }else{
          if(get_from_env(cmd_lines->arguments[1], env_head) == NULL){
            printf("Error: variable to rename doesn't exist.\n");
            freeCmdLines(cmd_lines);
            continue;
          }else if(get_from_env(cmd_lines->arguments[2], env_head) != NULL){
            printf("Error: new name to set already exists.\n");
            freeCmdLines(cmd_lines);
            continue;
          }
          char* old_key = (char*) calloc(1, strlen(cmd_lines->arguments[1]) + 1);
          char* new_key = (char*) calloc(1, strlen(cmd_lines->arguments[2]) + 1);
          strcpy(old_key, cmd_lines->arguments[1]);
          strcpy(new_key, cmd_lines->arguments[2]);
          rename_var_in_env(env_head, old_key, new_key);
          freeCmdLines(cmd_lines);
        }
    /* the command is to delete an environment variable */
    }else if(strcmp(cmd_lines->arguments[0], "delete") == 0){
        if(cmd_lines->argCount != 2){
          printf("Error: delete command is formatted incorrectly.\n");
          freeCmdLines(cmd_lines);
        }else{
          if(get_from_env(cmd_lines->arguments[1], env_head) == NULL){
            printf("Error: variable to delete doesn't exist.\n");
            freeCmdLines(cmd_lines);
            continue;
          }
          env_head = remove_var_from_env(env_head, cmd_lines->arguments[1]);
          if(env_head == NULL)
            env_head = (env_link*) calloc(1, sizeof(env_link));
          freeCmdLines(cmd_lines);
        }
    /* the command is to execute an executable with piping*/
    }else{
      int num_of_pipes = count_pipes(cmd_lines);
      int** pipes_array = create_pipes(num_of_pipes);
      if(!pipes_array){
        freeCmdLines(cmd_lines);
        release_pipes(pipes_array, num_of_pipes);
        continue;
      }
      cmdLine* first_part_of_user_input = cmd_lines;
      while(cmd_lines != NULL){
        int* left_pipe = get_left_pipe(pipes_array, cmd_lines);
        int* right_pipe = get_right_pipe(pipes_array, cmd_lines);
        execute(cmd_lines, pipes_array, num_of_pipes, left_pipe, right_pipe, history_head, env_head);
        cmd_lines = cmd_lines->next;
      }
      freeCmdLines(first_part_of_user_input);
      release_pipes(pipes_array, num_of_pipes);
    }
  }
  /* execution is over, just clean the memory allocations on the heap */
  clear_history(history_head);
  clear_env(env_head);
  return EXIT_SUCCESS;
}


text:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    tools:context="controller.ProfileActivity$PlaceholderFragment" >

    <FrameLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:layout_alignParentLeft="true"
        android:layout_alignParentRight="true"
        android:layout_alignParentTop="true"
        android:scrollbarStyle="insideOverlay" >

       <ScrollView
           android:id="@+id/scrollView1"
           android:layout_width="match_parent"
           android:layout_height="wrap_content" >

	        <LinearLayout
	            android:layout_width="match_parent"
	            android:layout_height="match_parent"
	            android:orientation="vertical" >

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content" >

                    <ImageView
                        android:id="@+id/imageViewprofilbild"
                        android:layout_width="68dp"
                        android:layout_height="124dp"
                        android:layout_weight="0.71"
                        android:src="@drawable/profilbild" />

                    <LinearLayout
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_weight="0.66"
                        android:orientation="vertical" >

                        <TextView
                            android:id="@+id/textViewKcal"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:layout_weight="0.71"
                            android:text="Ihr Name: "
                            android:textAppearance="?android:attr/textAppearanceLarge" />

                        <EditText
                            android:id="@+id/editTextName"
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:layout_weight="0.71"
                            android:inputType="textPersonName"
                            android:onClick="changeName" >

                            <requestFocus />
                        </EditText>
                    </LinearLayout>
                </LinearLayout>

                <LinearLayout
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:scrollbarStyle="insideOverlay"
                    android:scrollbars="vertical" >

                    <TextView
                        android:id="@+id/textViewkcalprotag"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:text="Konsumierte Kcal:  "
                        android:textAppearance="?android:attr/textAppearanceLarge" />

                    <TextView
                        android:id="@+id/textViewKcalDisplay"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:text="0"
                        android:textAppearance="?android:attr/textAppearanceLarge" />
                </LinearLayout>

                <TextView
                    android:id="@+id/textViewLikeDisplay"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:overScrollMode="ifContentScrolls"
                    android:scrollbars="horizontal|vertical"
                    android:textAppearance="?android:attr/textAppearanceLarge" />

                <TextView
                    android:id="@+id/textViewDislikeDisplay"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:textAppearance="?android:attr/textAppearanceLarge" />

        	</LinearLayout>

        </ScrollView>

    </FrameLayout>

</RelativeLayout>


text:
Functions
---------

.. automodule:: limix_genetics

  .. autofunction:: maf
  .. autofunction:: qqplot
  .. autofunction:: hitsplot


text:
<?xml version="1.0" encoding="UTF-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">

    <item android:drawable="@color/list_highlight_color" android:state_enabled="true" android:state_pressed="true"/>
    <item android:drawable="@android:color/white" android:state_enabled="true" android:state_focused="true"/>
    <item android:drawable="@android:color/white" android:state_enabled="true"/>

</selector>


text:
module GithubCLI
  module Formatters
    class Raw

      attr_reader :response

      def initialize(response)
        @response = response
      end

      def format
        response.to_h
      end
    end # Raw
  end # Formatters
end # GithubCLI


text:
package com.ftfl.ftflicare.database;

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

import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.database.SQLException;
import android.database.sqlite.SQLiteDatabase;
import android.util.Log;

import com.ftfl.ftflicare.model.VaccineModel;

public class VaccinationDataSource {

	// Database fields
	private SQLiteDatabase mDatabase;
	private DataBaseHelper mDbHelper;
	Cursor mCursor;

	VaccineModel mVaccineModel;
	List<VaccineModel> mVaccination = new ArrayList<VaccineModel>();

	public VaccinationDataSource(Context context) {
		mDbHelper = new DataBaseHelper(context);
	}

	/*
	 * open a method for writable database
	 */
	public void open() throws SQLException {
		mDatabase = mDbHelper.getWritableDatabase();
	}

	/*
	 * close database connection
	 */
	public void close() {
		mDbHelper.close();
	}

	/*
	 * insert data into the database.
	 */

	public boolean insertVaccinationInfo(VaccineModel eVaccineModel) {

		this.open();

		ContentValues cv = new ContentValues();

		cv.put(DataBaseHelper.COLUMN_VACCINE_NAME, eVaccineModel.getVaccineName());
		cv.put(DataBaseHelper.COLUMN_VACCINE_DATE, eVaccineModel.getVaccineDate());
		cv.put(DataBaseHelper.COLUMN_VACCINE_TIME, eVaccineModel.getVaccineTime());
		cv.put(DataBaseHelper.COLUMN_ALARM_CHECKED, eVaccineModel.getAlarmCecked());

		Long check = mDatabase.insert(DataBaseHelper.VACCINE_TABLE_NAME, null, cv);
		mDatabase.close();

		this.close();

		if (check < 0)
			return false;
		else
			return true;
	}

	public List<VaccineModel> getVaccineList() {
		this.open();

		Cursor mCursor = mDatabase.query(
				DataBaseHelper.VACCINE_TABLE_NAME, new String[] {
						DataBaseHelper.COLUMN_VACCINE_ID,
						DataBaseHelper.COLUMN_VACCINE_NAME,
						DataBaseHelper.COLUMN_VACCINE_DATE,
						DataBaseHelper.COLUMN_VACCINE_TIME,
						DataBaseHelper.COLUMN_ALARM_CHECKED},
						null, null, null, null, null);

		if (mCursor != null) {
			if (mCursor.moveToFirst()) {

				do {

					int vaccineID = mCursor.getInt(mCursor.getColumnIndex(DataBaseHelper.COLUMN_VACCINE_ID));
					String vaccineName = mCursor.getString(mCursor.getColumnIndex(DataBaseHelper.COLUMN_VACCINE_NAME));

					String vaccineDate = mCursor.getString(mCursor.getColumnIndex(DataBaseHelper.COLUMN_VACCINE_DATE));

					String vaccineTime = mCursor.getString(mCursor.getColumnIndex(DataBaseHelper.COLUMN_VACCINE_TIME));

					int alarmChecked = mCursor.getInt(mCursor.getColumnIndex(DataBaseHelper.COLUMN_ALARM_CHECKED));

					mVaccination.add(new VaccineModel(vaccineID, vaccineName, vaccineDate, vaccineTime, alarmChecked));

				} while (mCursor.moveToNext());
			}
			mCursor.close();
		}
		this.close();
		return mVaccination;
	}

	// delete data form database.
		public boolean deleteData(int eId) {
			this.open();
			try {
				mDatabase.delete(
						DataBaseHelper.VACCINE_TABLE_NAME,
						DataBaseHelper.COLUMN_VACCINE_ID + "=" + eId, null);
			} catch (Exception ex) {
				Log.e("ERROR", "data deletion problem....");
				return false;
			}
			this.close();
			return true;
		}

}


text:
package org.vaadin.natale.dataprovider;

import org.springframework.data.jpa.repository.JpaRepository;

/**
 * Creates a new ConfigurableBackEndDataProvider for JpaRepository.
 *
 * @param <T> data type
 */
public class JpaDataProvider<T> extends ConfigurableBackEndDataProvider<T> {

	public JpaDataProvider(JpaRepository<T, ?> repository) {
		super(repository::findAll, repository::save, repository::delete, repository::save);
	}
}


text:
<?php

namespace Tale\App\Feature;

use Tale\App\Feature\Model\Provider;
use Tale\App\FeatureBase;
use Tale\ClassLoader;
use Tale\Data\Source;

class Model extends FeatureBase
{

    /**
     * @var \Tale\ClassLoader[]
     */
    private $_loaders;

    public function init()
    {

        if (!class_exists('Tale\\Data\\Source'))
            throw new \RuntimeException(
                "Failed to load data feature: "
                ."The data source class wasnt found. "
                ."Maybe you need the Tale\\Data namespace?"
            );

        $app = $this->getApp();

        $app->bind('beforeRun', function () use($app) {

            if (!isset($this->data))
                throw new \RuntimeException(
                    "Failed to initialize model feature: "
                    ."The data feature is required"
                );

            /**
             * @var \Tale\App\Feature\Data $data
             */
            $data = $this->data;

            $this->_loaders = [];

            foreach ($this->getConfig() as $alias => $options) {

                $options = array_replace([
                    'path'              => $app->getOption('path').'/models',
                    'nameSpace'         => null,
                    'loadPattern'       => null,
                    'createLoader'      => true,
                    'source'            => null,
                    'database'          => null
                ], $options ? $options : []);

                if ($options['createLoader']) {

                    $loader = new ClassLoader($options['path'], $options['nameSpace'], $options['loadPattern']);
                    $loader->register();
                    $this->_loaders[] = $loader;
                }

                if (!$options['source'])
                    throw new \RuntimeException(
                        "Failed to set model source: No source given"
                    );

                if (!$options['database'])
                    throw new \RuntimeException(
                        "Failed to set model database: No database given"
                    );

                $source = $data->getSource($options['source']);

                /** @var \Tale\Data\Database $database */
                $database = $source->{$options['database']};

                if ($options['nameSpace'])
                    $database->addModelNameSpace($options['nameSpace']);

                if (isset($this->controller)) {

                    $this->controller->setArg($alias, $database);
                }
            }
        });

        $app->bind('afterRun', function () {

            foreach ($this->_loaders as $loader)
                $loader->unregister();

            unset($this->_loaders);
        });
    }

    /**
     * @return \Tale\ClassLoader[]
     */
    public function getLoaders()
    {
        return $this->_loaders;
    }

    public function getDependencies()
    {

        return [
            'data' => 'Tale\\App\\Feature\\Data',
            'controller' => 'Tale\\App\\Feature\\Controller'
        ];
    }
}


text:
package org.apache.wicket.jmx;

import java.lang.management.ManagementFactory;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.Callable;

import javax.management.Attribute;
import javax.management.AttributeList;
import javax.management.InstanceAlreadyExistsException;
import javax.management.InstanceNotFoundException;
import javax.management.MBeanRegistrationException;
import javax.management.MBeanServer;
import javax.management.MBeanServerFactory;
import javax.management.MalformedObjectNameException;
import javax.management.NotCompliantMBeanException;
import javax.management.ObjectName;
import javax.management.StandardMBean;

import org.apache.wicket.IInitializer;
import org.apache.wicket.ThreadContext;
import org.apache.wicket.WicketRuntimeException;
import org.apache.wicket.jmx.wrapper.Application;
import org.apache.wicket.jmx.wrapper.ApplicationSettings;
import org.apache.wicket.jmx.wrapper.DebugSettings;
import org.apache.wicket.jmx.wrapper.MarkupSettings;
import org.apache.wicket.jmx.wrapper.PageSettings;
import org.apache.wicket.jmx.wrapper.RequestCycleSettings;
import org.apache.wicket.jmx.wrapper.RequestLogger;
import org.apache.wicket.jmx.wrapper.ResourceSettings;
import org.apache.wicket.jmx.wrapper.SecuritySettings;
import org.apache.wicket.jmx.wrapper.SessionSettings;
import org.apache.wicket.jmx.wrapper.StoreSettings;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * Registers Wicket's MBeans.
 *

 * Users can specify the MBeanServer implementation in which to register the MBeans by setting the
 * org.apache.wicket.mbean.server.agentid property to the agent id of the MBeanServer
 * implementation they want, or by setting org.apache.wicket.mbean.server.class to the
 * mbean server class they want (if both are provided, and the agent id returns a server, that one
 * is used). This initializer will log an error when no mbean server with the provided agent id can
 * be found, and will then fall back to use the platform mbean server. When no agent id is provided,
 * the platform mbean server will be used.
 *
 * @author eelcohillenius
 * @author David Hosier
 */
public class Initializer implements IInitializer
{
	private static final Logger log = LoggerFactory.getLogger(Initializer.class);

	// It's best to store a reference to the MBeanServer rather than getting it
	// over and over
	private MBeanServer mbeanServer = null;

	/**
	 * List of registered names
	 */
	private final List<ObjectName> registered = new ArrayList<>();

	@Override
	public void destroy(final org.apache.wicket.Application application)
	{
		for (ObjectName objectName : registered)
		{
			try
			{
				mbeanServer.unregisterMBean(objectName);
			}
			catch (InstanceNotFoundException | MBeanRegistrationException e)
			{
				log.error(e.getMessage(), e);
			}
		}
	}

	@Override
	public void init(final org.apache.wicket.Application application)
	{
		try
		{
			String name = application.getName();

			String agentId = null;
			try
			{
				agentId = System.getProperty("wicket.mbean.server.agentid");
			}
			catch (SecurityException e)
			{
				// Ignore - we're not allowed to read this property.
				log.warn("not allowed to read property wicket.mbean.server.agentid due to security settings; ignoring");
			}
			if (agentId != null)
			{
				ArrayList<MBeanServer> mbeanServers = MBeanServerFactory.findMBeanServer(agentId);
				if (!mbeanServers.isEmpty())
				{
					mbeanServer = mbeanServers.get(0); // get first
				}
				else
				{
					log.error("unable to find mbean server with agent id {}", agentId);
				}
			}
			if (mbeanServer == null)
			{
				String impl = null;
				try
				{
					impl = System.getProperty("wicket.mbean.server.class");
				}
				catch (SecurityException e)
				{
					// Ignore - we're not allowed to read this property.
					log.warn("Not allowed to read property wicket.mbean.server.class due to security settings: {}. Ignoring",
							e.getMessage());
				}
				if (impl != null)
				{
					ArrayList<MBeanServer> mbeanServers = MBeanServerFactory.findMBeanServer(null);
					if (!mbeanServers.isEmpty())
					{
						for (MBeanServer mbs : mbeanServers)
						{
							if (mbs.getClass().getName().equals(impl))
							{
								mbeanServer = mbs;
								break;
							}
						}
					}
					if (mbeanServer == null)
					{
						log.error("unable to find mbean server of type '{}'", impl);
					}
				}
			}
			if (mbeanServer == null)
			{
				mbeanServer = ManagementFactory.getPlatformMBeanServer();
				// never null
			}

			log.info("registering Wicket mbeans with server '{}'", mbeanServer);

			// register top level application object, but first check whether
			// multiple instances of the same application (name) are running and
			// if so adjust the name
			String domain = "org.apache.wicket.app." + name;
			ObjectName appBeanName = new ObjectName(domain + ":type=Application");
			String tempDomain = domain;
			int i = 0;
			while (mbeanServer.isRegistered(appBeanName))
			{
				tempDomain = name + "-" + i++;
				appBeanName = new ObjectName(tempDomain + ":type=Application");
			}
			domain = tempDomain;

			Application appBean = new Application(application);
			register(application, appBean, appBeanName);

			register(application, new ApplicationSettings(application), new ObjectName(domain
				+ ":type=Application,name=ApplicationSettings"));
			register(application, new DebugSettings(application), new ObjectName(domain
				+ ":type=Application,name=DebugSettings"));
			register(application, new MarkupSettings(application), new ObjectName(domain
				+ ":type=Application,name=MarkupSettings"));
			register(application, new ResourceSettings(application), new ObjectName(domain
				+ ":type=Application,name=ResourceSettings"));
			register(application, new PageSettings(application), new ObjectName(domain
				+ ":type=Application,name=PageSettings"));
			register(application, new RequestCycleSettings(application), new ObjectName(domain
				+ ":type=Application,name=RequestCycleSettings"));
			register(application, new SecuritySettings(application), new ObjectName(domain
				+ ":type=Application,name=SecuritySettings"));
			register(application, new SessionSettings(application), new ObjectName(domain
				+ ":type=Application,name=SessionSettings"));
			register(application, new StoreSettings(application), new ObjectName(domain
				+ ":type=Application,name=StoreSettings"));

			RequestLogger sessionsBean = new RequestLogger(application);
			ObjectName sessionsBeanName = new ObjectName(domain + ":type=RequestLogger");
			register(application, sessionsBean, sessionsBeanName);
		}
		catch (MalformedObjectNameException | InstanceAlreadyExistsException |
				MBeanRegistrationException | NotCompliantMBeanException e)
		{
			throw new WicketRuntimeException(e);
		}
	}

	@Override
	public String toString()
	{
		return "Wicket JMX initializer";
	}

	/**
	 * Register MBean.
	 *
	 * @param o
	 *            MBean
	 * @param objectName
	 *            Object name
	 *
	 * @throws NotCompliantMBeanException
	 * @throws MBeanRegistrationException
	 * @throws InstanceAlreadyExistsException
	 */
	private <T> void register(final org.apache.wicket.Application application, final T o,
		final ObjectName objectName) throws InstanceAlreadyExistsException,
		MBeanRegistrationException, NotCompliantMBeanException
	{
		StandardMBean bean = new StandardMBean(o, (Class<T>)o.getClass().getInterfaces()[0]) {
			@Override
			public Object getAttribute(String attribute)
			{
				return withApplication(() -> super.getAttribute(attribute));
			}

			@Override
			public void setAttribute(Attribute attribute)
			{
				withApplication(() -> {
					super.setAttribute(attribute);
					return null;
				});
			}

			@Override
			public AttributeList setAttributes(AttributeList attributes)
			{
				return withApplication(() -> super.setAttributes(attributes));
			}

			@Override
			public Object invoke(String actionName, Object[] params, String[] signature)
			{
				return withApplication(() -> super.invoke(actionName, params, signature));
			}

			private <R> R withApplication(Callable<R> callable)
			{
				boolean existed = ThreadContext.exists();

				if (existed == false)
				{
					ThreadContext.setApplication(application);
				}

				try
				{
					return callable.call();
				}
				catch (Exception ex)
				{
					throw new WicketRuntimeException(ex);
				}
				finally
				{
					if (existed == false)
					{
						ThreadContext.detach();
					}
				}
			}
		};
		mbeanServer.registerMBean(bean, objectName);
		registered.add(objectName);
	}
}


text:
from index import app
from flask import render_template, request
from query import get_bands
from config import BASE_URL

bands = get_bands()

project_social = {
    'url': BASE_URL,
    'title': "Live From The Fort",
    'subtitle': "",
    'img': bands[0]['coverphoto'],
    'description': "'Live From The Fort' is an online video music series by Vermont Public Radio. The intimate performances, recorded at VPR studios in Colchester's historic Fort Ethan Allen, provide an opportunity to discover and explore the rich and diverse contemporary music scene Vermont.",
    'twitter_text': "Intimate performances by your favorite Vermont artists, performed live at VPR studios",
    'twitter_hashtag': "LiveFromTheFort"
}

@app.route('/')
def index():
    page_url = BASE_URL + request.path
    page_title = 'Live From The Fort'
    landing = True

    social = project_social

    return render_template('content.html',
        page_title=page_title,
        social=social,
        bands=bands,
        landing=landing,
        project_social=project_social,
        page_url=page_url)

@app.route('/<bandname>')
def band_page(bandname):
    for band in bands:
        if 'slug' in band and bandname == band['slug']:
            bands.remove(band)
            bands.insert(0, band)

    page_url = BASE_URL + request.path
    page_title = 'Live From The Fort: ' + bands[0]['bandname']

    social = {
        'title': page_title,
        'subtitle': "Recorded at VPR Studios",
        'img': bands[0]['coverphoto'],
        'description': "In this month's installment of 'Live From The Fort': " +
        bands[0]['bandname'],
        'twitter_text': bands[0]['bandname'],
        'twitter_hashtag': "LiveFromTheFort"
    }

    return render_template('content.html',
        page_title=page_title,
        social=social,
        bands=bands,
        project_social=project_social,
        page_url=page_url)