text:
//     Data Access is a Java library to store data
//     Copyright (C) 2017-2019 Adrián Romero Corchado.
//
//     This file is part of Data Access
//
//     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.adr.data.test;

import com.adr.data.var.VariantString;
import java.util.Arrays;
import java.util.List;
import org.junit.Test;
import com.adr.data.record.Record;
import com.adr.data.recordparser.RecordsSerializer;
import com.adr.data.var.Kind;
import com.adr.data.var.VariantBoolean;
import com.adr.data.var.VariantInt;
import com.adr.data.var.VariantLong;
import java.io.IOException;
import org.junit.Assert;

/**
 * @author adrian
 */
public class ParserTests {

    @Test
    public void recordsSerialization1() throws IOException {

        Record record = Record.builder()
                .entry("id", new VariantString("1"))
                .entry("field", new VariantString("pepeluis"))
                .entry("amount", new VariantInt(32))
                .entry("añejo", 32.0)
                .entry("unenter ito", 32)
                .entry("usvalid \nCon retorno", 32)
                .entry("unlong", new VariantLong(33L))
                .entry("value", VariantString.NULL)
                .build();
        String recordstr = "(id: \"1\", field: \"pepeluis\", amount: 32, añejo: 32.0, \"unenter ito\": 32, \"usvalid \\nCon retorno\": 32, unlong: 33:LONG, value: NULL)";

        Assert.assertEquals(recordstr, RecordsSerializer.write(record));
    }

    @Test
    public void recordsParseNumber() throws IOException {
        Record r = RecordsSerializer.read("(field : TRUE)");
        Assert.assertTrue(r.getBoolean("field"));

        r = RecordsSerializer.read("( \"field\" : 123.4  ) ");
        Assert.assertTrue(123.4 == r.getDouble("field"));

        r = RecordsSerializer.read("( \"field\" : \"123\":INT  ) ");
        Assert.assertTrue(123 == r.getInteger("field"));

        r = RecordsSerializer.read("( \"field\" : NULL : INT  ) ");
        Assert.assertEquals(Kind.INT, r.get("field").getKind());
        Assert.assertTrue(r.get("field").isNull());

        r = RecordsSerializer.read("( \"field\" : NULL   ) ");
        Assert.assertEquals(Kind.STRING, r.get("field").getKind());
        Assert.assertTrue(r.get("field").isNull());

        r = RecordsSerializer.read("( \"field\" : \"\"   ) ");
        Assert.assertEquals(Kind.STRING, r.get("field").getKind());
        Assert.assertEquals("", r.get("field").asString());
    }

    @Test
    public void recordsSerializationEmpty() throws IOException {
        Assert.assertEquals("()", RecordsSerializer.write(Record.EMPTY));
    }

    @Test
    public void recordsParseEmpty() throws IOException {
        Assert.assertEquals(Record.EMPTY, RecordsSerializer.read("()"));
    }

    @Test
    public void recordsSerializationList() throws IOException {

        List<Record> records = Arrays.asList(
                Record.builder()
                        .entry("id", "1")
                        .entry("field", "pepeluis")
                        .build(),
                Record.builder()
                        .entry("id", "2")
                        .entry("field", "hilario")
                        .build());
        String recordsstr = "(id: \"1\", field: \"pepeluis\")\n(id: \"2\", field: \"hilario\")";

        Assert.assertEquals(recordsstr, RecordsSerializer.writeList(records));
    }

    @Test
    public void recordsWithIdentifiers() throws IOException {
        Record r = Record.builder()
                .entry("COLLECTION.KEY", "USERNAME")
                .entry("ID.KEY", VariantString.NULL)
                .entry("NAME", VariantString.NULL)
                .entry("NAME..CONTAINS", "a")
                .entry("VISIBLE", VariantBoolean.NULL)
                .entry("CODECARD", VariantString.NULL)
                .entry("..ORDERBY", "NAME")
                .build();

        String s = RecordsSerializer.write(r);
        Record r2 = RecordsSerializer.read(s);
        String s2 = RecordsSerializer.write(r2);
        Assert.assertEquals(s, s2);
    }
}


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

class Admin_model extends CI_Model {

	public function __construct(){
		parent::__construct();
		//Do your magic here
	}

	public function getWaitingActions(){
		$this->db->db_select('mn_influence');

		$this->db->select('act.*, con.nom as nomContact, con.niveau as niveauContact, sec.secteur as nomSecteur');
		$this->db->from('mn_influence.actions act');
		$this->db->join('mn_influence.contacts con', 'con.id = act.id_contact', 'left');
		$this->db->join('mn_influence.secteurs sec', 'sec.id = con.secteur', 'left');
		$this->db->where('etat', 'ATTENT');
		$this->db->order_by('date_parution', 'asc');

		$query = $this->db->get();

		return $query->result();
	}

	public function getAction($idAction){
		$this->db->db_select('mn_influence');

		$this->db->select('act.*, con.nom as nomContact, con.power as powerContact, con.niveau as niveauContact, sec.secteur as nomSecteur');
		$this->db->from('mn_influence.actions act');
		$this->db->join('mn_influence.contacts con', 'con.id = act.id_contact', 'left');
		$this->db->join('mn_influence.secteurs sec', 'sec.id = con.secteur', 'left');
		$this->db->where('act.id', $idAction);
		$query = $this->db->get('actions',1);

		return $query->row();
	}

	public function saveAction($idAction){
		$this->db->db_select('mn_influence');
		$data = array(
			'etat' => 'ACCEPT',
			'date_modif' => date('Y-m-d H:i:s', time()),
			'niveau' => $this->input->post('niveauAction'),
			'commentaires' => $this->input->post('commentaires')
		);

		$this->db->where('id', $idAction);
		$this->db->update('actions', $data);

		$actionPower = intval($this->input->post('niveauActionFinal'));
		$idContact = intval($this->input->post('idContact'));

		$query = "UPDATE mn_influence.contacts SET power = power-{$actionPower} WHERE id = {$idContact};";
		$this->db->query($query);

		foreach ($this->input->post('secteurs') as $secteur) {
			$this->db->insert('action_secteur', array('id_action' => $idAction, 'id_secteur' => $secteur ));
		}
	}

	public function refusAction($idAction){
		$this->db->db_select('mn_influence');
		$data = array(
			'etat' => 'REFUS',
			'date_modif' => date('Y-m-d H:i:s', time()),
			'commentaires' => $this->input->post('commentaires')
		);

		$this->db->where('id', $idAction);
		$this->db->update('actions', $data);

	}

	public function getJoueurFromContact($idContact){
		$this->db->select('jou.*');
		$this->db->from('mn_personnages.personnages perso');
		$this->db->join('mn_influence.contacts con', 'con.proprietaire = perso.id', 'left');
		$this->db->join('mn_mortenuit.users jou', 'jou.id = perso.id_user', 'left');
		$this->db->where('con.id', $idContact);

		$query = $this->db->get();

		return $query->result();
	}

	public function validatePerso(){
		$this->db->db_select('mn_personnages');

		$this->db->select("perso.*, CONCAT(user.Prenom, ' ' , user.nom) as 'nomUser' ");
		$this->db->from('mn_personnages.personnages perso');
		$this->db->join('mn_mortenuit.users user', 'user.id = perso.id_user', 'left');
		$this->db->where('perso.etat', 'ATTENT');
		$query = $this->db->get();

		return $query->result();
	}

	public function inspectPerso($idPerso){
		$this->db->select('perso.*, clan.name as clanNom, nat.nom as natNom, att.nom as attNom');
		$this->db->from('mn_personnages.personnages perso');
		$this->db->join('mn_systeme.clans clan', 'clan.id = perso.clan', 'left');
		$this->db->join('mn_systeme.natures nat', 'nat.id = perso.nature', 'left');
		$this->db->join('mn_systeme.natures att ', 'att.id = perso.attitude', 'left');

		$this->db->where('perso.id', $idPerso);
		$query = $this->db->get();

		$perso['perso'] = $query->row();

		$idDisc = array($perso['perso']->startDisc_1,$perso['perso']->startDisc_2,$perso['perso']->startDisc_3);

		$this->db->select('discacq.*, disc.name as nomDisc');
		$this->db->from('mn_personnages.disciplines_acquises discacq');
		$this->db->join('mn_systeme.disciplines disc', 'disc.id = discacq.id_discipline', 'left');
		$this->db->where('discacq.id_personnage', $idPerso);
		$query = $this->db->get();
		$perso['disciplines'] = $query->result();

		return $perso;
	}

	public function confirmPerso($idPerso, $bool){
		if ($bool) :
			$data = array('etat' => 'ACTIF');
		else :
			$data = array('etat' => 'REFUS');
		endif;
		$this->db->where('id', $idPerso);
		$this->db->update('mn_personnages.personnages', $data);
	}

	public function getEmailByPerso($idPerso){

		$this->db->select('courriel');
		$this->db->from('mn_mortenuit.users user');
		$this->db->join('mn_personnages.personnages perso', 'perso.id_user = user.id', 'left');
		$this->db->where('perso.id', $idPerso);

		$query = $this->db->get();

		return $query->row();
	}

}

/* End of file Admin_model.php */
/* Location: ./application/models/Admin_model.php */ ?>

redpajama_set_name: RedPajamaGithub


text:
extern "Java"
{
  namespace gnu
  {
    namespace javax
    {
      namespace net
      {
        namespace ssl
        {
            class Session;
          namespace provider
          {
              class SimpleSessionContext;
          }
        }
      }
    }
  }
}

class gnu::javax::net::ssl::provider::SimpleSessionContext : public ::gnu::javax::net::ssl::AbstractSessionContext
{

public:
  SimpleSessionContext();
public: // actually protected
  ::gnu::javax::net::ssl::Session * implGet(JArray< jbyte > *);
public:
  void load(JArray< jchar > *);
  void put(::gnu::javax::net::ssl::Session *);
  void remove(JArray< jbyte > *);
  void store(JArray< jchar > *);
  ::java::util::Enumeration * getIds();
  jint getSessionCacheSize();
  void setSessionCacheSize(jint);
public: // actually package-private
  static ::java::util::HashMap * access$0(::gnu::javax::net::ssl::provider::SimpleSessionContext *);
public:
  static const jint DEFAULT_TIMEOUT = 300;
private:
  ::java::util::HashMap * __attribute__((aligned(__alignof__( ::gnu::javax::net::ssl::AbstractSessionContext)))) store__;
  jint storeLimit;
public:
  static ::java::lang::Class class$;
};

#endif // __gnu_javax_net_ssl_provider_SimpleSessionContext__


text:
/* DO NOT EDIT THIS FILE - it is machine generated */
#include <jni.h>
/* Header for class opencl_executor_Executor */

#ifndef _Included_opencl_executor_Executor
#define _Included_opencl_executor_Executor
#ifdef __cplusplus
extern "C" {
#endif
/*
 * Class:     opencl_executor_Executor
 * Method:    nativeMatrixMultiply
 * Signature: ([F[F[FIII)V
 */
JNIEXPORT void JNICALL Java_opencl_executor_Executor_nativeMatrixMultiply
  (JNIEnv *, jclass, jfloatArray, jfloatArray, jfloatArray, jint, jint, jint);

/*
 * Class:     opencl_executor_Executor
 * Method:    execute
 * Signature: (Lopencl/executor/Kernel;IIIIII[Lopencl/executor/KernelArg;)D
 */
JNIEXPORT jdouble JNICALL Java_opencl_executor_Executor_execute
  (JNIEnv *, jclass, jobject, jint, jint, jint, jint, jint, jint, jobjectArray);

/*
 * Class:     opencl_executor_Executor
 * Method:    benchmark
 * Signature: (Lopencl/executor/Kernel;IIIIII[Lopencl/executor/KernelArg;ID)[D
 */
JNIEXPORT jdoubleArray JNICALL Java_opencl_executor_Executor_benchmark
  (JNIEnv *, jclass, jobject, jint, jint, jint, jint, jint, jint, jobjectArray, jint, jdouble);

/*
 * Class:     opencl_executor_Executor
 * Method:    evaluate
 * Signature: (Lopencl/executor/Kernel;IIIIII[Lopencl/executor/KernelArg;ID)D
 */
JNIEXPORT jdouble JNICALL Java_opencl_executor_Executor_evaluate
  (JNIEnv *, jclass, jobject, jint, jint, jint, jint, jint, jint, jobjectArray, jint, jdouble);

/*
 * Class:     opencl_executor_Executor
 * Method:    init
 * Signature: (II)V
 */
JNIEXPORT void JNICALL Java_opencl_executor_Executor_init
  (JNIEnv *, jclass, jint, jint);

/*
 * Class:     opencl_executor_Executor
 * Method:    getDeviceLocalMemSize
 * Signature: ()J
 */
JNIEXPORT jlong JNICALL Java_opencl_executor_Executor_getDeviceLocalMemSize
  (JNIEnv *, jclass);

/*
 * Class:     opencl_executor_Executor
 * Method:    getDeviceGlobalMemSize
 * Signature: ()J
 */
JNIEXPORT jlong JNICALL Java_opencl_executor_Executor_getDeviceGlobalMemSize
  (JNIEnv *, jclass);

/*
 * Class:     opencl_executor_Executor
 * Method:    getDeviceMaxMemAllocSize
 * Signature: ()J
 */
JNIEXPORT jlong JNICALL Java_opencl_executor_Executor_getDeviceMaxMemAllocSize
  (JNIEnv *, jclass);

/*
 * Class:     opencl_executor_Executor
 * Method:    getDeviceMaxWorkGroupSize
 * Signature: ()J
 */
JNIEXPORT jlong JNICALL Java_opencl_executor_Executor_getDeviceMaxWorkGroupSize
  (JNIEnv *, jclass);

/*
 * Class:     opencl_executor_Executor
 * Method:    supportsDouble
 * Signature: ()Z
 */
JNIEXPORT jboolean JNICALL Java_opencl_executor_Executor_supportsDouble
  (JNIEnv *, jclass);

/*
 * Class:     opencl_executor_Executor
 * Method:    getPlatformName
 * Signature: ()Ljava/lang/String;
 */
JNIEXPORT jstring JNICALL Java_opencl_executor_Executor_getPlatformName
  (JNIEnv *, jclass);

/*
 * Class:     opencl_executor_Executor
 * Method:    getDeviceName
 * Signature: ()Ljava/lang/String;
 */
JNIEXPORT jstring JNICALL Java_opencl_executor_Executor_getDeviceName
  (JNIEnv *, jclass);

/*
 * Class:     opencl_executor_Executor
 * Method:    getDeviceType
 * Signature: ()Ljava/lang/String;
 */
JNIEXPORT jstring JNICALL Java_opencl_executor_Executor_getDeviceType
  (JNIEnv *, jclass);

/*
 * Class:     opencl_executor_Executor
 * Method:    isLittleEndian
 * Signature: ()Z
 */
JNIEXPORT jboolean JNICALL Java_opencl_executor_Executor_isLittleEndian
  (JNIEnv *, jclass);

/*
 * Class:     opencl_executor_Executor
 * Method:    shutdown
 * Signature: ()V
 */
JNIEXPORT void JNICALL Java_opencl_executor_Executor_shutdown
  (JNIEnv *, jclass);

#ifdef __cplusplus
}
#endif
#endif


text:
package com.sjx.sellhelper.constant;

import okhttp3.MediaType;

/**
 * Created by SJX on 2017/6/20.
 * url 接口常量
 */

public class UrlConstants {

    static String BaseApi;

    public static final MediaType JSON_TYPE = MediaType.parse("application/json; charset=utf-8");

    /**
     * 验证会员
     */
    public static final String API_AUTH_VIP = "checkPosUser";

    public static String getApi(String apiMethod) {
        return BaseApi + apiMethod;
    }
}


text:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="#ffeeedee">

    <me.yugy.github.lswitchbackport.library.Switch
        android:id="@+id/switch_view"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerInParent="true"
        />

</RelativeLayout>


text:
//#include "opencv2/core/utility.hpp"
#include "opencv2/imgproc.hpp"
#include "opencv2/imgcodecs.hpp"
#include "opencv2/highgui.hpp"
#include "opencv2/core.hpp"
#include <opencv2/objdetect.hpp>
#include <opencv2/video.hpp>
//#include "opencv2/bgsegm.hpp"

#include <iostream>
#include  <vector>

/* Testing functions*/
#include <stdarg.h> //needed for va_args
#include <time.h> //needed for strftime
#include <fstream>
void print(const char* format, ... );
void show(const char *name, cv::Mat &img);
void show(const char *name, cv::Mat &img1, cv::Mat &img2);
cv::Mat merge(cv::Mat &img1, cv::Mat &img2);
/* end testing*/

using namespace std;
using namespace cv;

CascadeClassifier sign_cascade;
string sign_cascade_folder = "../../SignCoachApp/AppAttempt/app/src/main/assets/data/";
string sign_cascade_ext = ".xml";
string hand_type = "R";

Mat fgMask; //fg mask fg mask generated by MOG2 method
Ptr<BackgroundSubtractor> pMOG2; //MOG2 Background subtractor

bool checkIfCorrect(Mat &src, char letter);
void fixRotation(Mat &src, Mat &dst, int rotation);
void rot90(Mat &src, int flag);

int main( int argc, char** argv )
{
    VideoCapture cap(0);

    /*
    if(argc < 1) {
        return -1;
    }
    VideoCapture cap(argv[1]);
    */

    if(!cap.isOpened())  { // check if we succeeded
        cout << "Failed to open webcam" << endl;
        return -1;
    }

    Mat src;
    bool loop = true;
    char letter = 'A';

    //pMOG2 = bgsegm::createBackgroundSubtractorMOG();
    pMOG2 = createBackgroundSubtractorMOG2();

    string sign_cascade_fullpath = sign_cascade_folder + string(1, letter) +  sign_cascade_ext;
    if( !sign_cascade.load( sign_cascade_fullpath ) ){ print("(!) Error loading %s", sign_cascade_fullpath); return false; };

    while(loop)
    {
        Mat frame;
        cap >> src; // get a new frame from camera
        if (src.empty())
            break;

        Mat dst;
        fixRotation(src, dst, 1);

        Mat found = dst.clone();

        bool result = checkIfCorrect(found, letter);
        string resultStr = "False";
        if (result) resultStr = "True";

        //putText(found, "Found " + string(1, letter) + " = " + resultStr, Point2f(20,50), FONT_HERSHEY_PLAIN, 3,  Scalar::all(0), 5);
        //show("Result", found);

        cout <<  "Found " + string(1, letter) + " = " + resultStr << endl;
        int key = 0xff & waitKey(250);

        if (key == 27) break;
        if (key != 255) {
            letter = char(toupper(key));
            string sign_cascade_fullpath = sign_cascade_folder + string(1, letter) +  sign_cascade_ext;
            if( !sign_cascade.load( sign_cascade_fullpath ) ){ print("(!) Error loading %s", sign_cascade_fullpath); return false; };
        }

   }

   return 0;
}

bool checkIfCorrect(Mat &src, char letter) {

    //string sign_cascade_fullpath = sign_cascade_folder + string(1, letter) +  sign_cascade_name;
    //if( !sign_cascade.load( sign_cascade_fullpath ) ){ print("(!) Error loading %s", sign_cascade_fullpath); return false; };

    pMOG2->apply(src, fgMask, 0.3);

    vector<Rect> signs;
    Mat gray, bw;
    RNG rng(12345);

    cvtColor( src, gray, COLOR_BGR2GRAY );
    equalizeHist( gray, gray );

    sign_cascade.detectMultiScale( /*src*/ /*gray*/ fgMask, signs, 1.1, 3, 0|CASCADE_SCALE_IMAGE ,Size(150,150) );

    Point center(src.cols / 2, src.rows / 2);
    circle(src, center, 5, Scalar::all(0), -15, 8, 0);

    /* For testing */
    int minIdx = -1;
    float minDist = src.cols*src.rows;
    float maxArea = 0;
    for( int i = 0; i < signs.size(); i++ )
    {
        Rect r = signs[i];
        float count = countNonZero(Mat(fgMask, r));
        Point p(r.x + r.width/2,  r.y+r.height/2);
        float res = cv::norm(center-p);

        if (count > maxArea && res < minDist  && r.contains(center)) {
            minIdx = i;
            minDist = res;
            maxArea = count;
        }
        //Scalar color = Scalar(rng.uniform(0,255), rng.uniform(0, 255), rng.uniform(0, 255));
        //rectangle( src, signs[i].tl(), signs[i].br(),color , 3, 8, 0 );
    }

    bool result = false;
    if (minIdx > -1) {
        rectangle( src, signs[minIdx].tl(), signs[minIdx].br(), Scalar(0,0,0), 3, 8, 0 );
        result = true;
    }

    Mat left;
    //cvtColor(gray, left, COLOR_GRAY2BGR);
    cvtColor(fgMask, left, COLOR_GRAY2BGR);
    Mat img = merge(left,src);
    show("Result", img);
    /* end testing */

    //sign_cascade.empty();
    //if (signs.size() > 0) return true;

    return result;
}

void fixRotation(Mat &src, Mat &dst, int rotation) {
    Mat original = src.clone();
    Size sz = src.size();
    rot90(src, rotation);
    //copyMakeBorder( src, dst, top, bottom, left, right, borderType, value );
    resize(src,dst,sz);
}

void rot90(Mat &src, int flag){
  //1=CW, 2=CCW, 3=180
  if (flag == 1){
    transpose(src, src);
    flip(src, src,1);
  } else if (flag == 2) {
    transpose(src, src);
    flip(src, src,0);
  } else if (flag ==3){
    flip(src, src,-1);
  } else if (flag != 0){
    cout  << "Unknown rotation flag(" << flag << ")" << endl;
  }
}

/*************************DEBUG FUNCTIONS**********************************************************************/

void print(const char* format, ... ) {
#ifdef debug
    va_list args;

    char buff[100]; //Buffer for the time

    time_t now = time (0); //Get current time object

    //Format time object into string using the format provided
    strftime(buff, 100, "%Y-%m-%d %H:%M:%S", localtime (&now));

    //Print time to the screen
    printf ("%s: ", buff);

    //Based on format, read in args from (...)
    va_start(args, format);

    //Fill-in format with args and print to screen
    vprintf(format, args);

    //Release args memory
    va_end(args);

    //Create a newline
    printf("\n");

    //Flush standard out to make sure this gets printed
    fflush(stdout);
#endif
}

void show(const char *name, Mat &img)
{
#ifdef debug
    namedWindow( name, 0 );
    imshow( name, img );
    resizeWindow(name, 800, 600);
#endif
}

Mat merge(Mat &img1, Mat &img2)
{
    Size sz1 = img1.size();
    Size sz2 = img2.size();
    //assert(sz1 == sz2);

    Mat img3(sz1.height, sz1.width+sz2.width, CV_8UC3);
    Mat left(img3, Rect(0, 0, sz1.width, sz1.height));
    img1.copyTo(left);
    Mat right(img3, Rect(sz1.width, 0, sz2.width, sz2.height));
    img2.copyTo(right);
    return img3;
}


text:
@class DMClassFileDataModel, DMAsset;

@interface DMCourseFileCell : UICollectionViewCell

@property (assign, nonatomic, getter=isEditorMode) BOOL editorMode;
@property (strong, nonatomic) DMClassFileDataModel *courseModel;
@property (assign, nonatomic) BOOL showBorder;

@property (strong, nonatomic) DMAsset *asset;

@end


text:
var notie = function() {

	// Default options
	var options = {
		animationDelay: 300,
		backgroundClickDismiss: true
	}
	function setOptions(customOptions) {
		// Custom options
		for (var key in customOptions) {
			options[key] = customOptions[key];
		}
	}

	// alert
    // **************

	// create alert container
	var alertOuter = document.createElement('div');
	alertOuter.id = 'notie-alert-outer';

	// Hide alert on click
    alertOuter.onclick = function() {
        clearTimeout(alertTimeout1);
        clearTimeout(alertTimeout2);
        alertHide();
    };

	// add alert to body
	document.body.appendChild(alertOuter);

	// create alert inner container
	var alertInner = document.createElement('div');
    alertInner.id = 'notie-alert-inner';
    alertOuter.appendChild(alertInner);

	// create alert content container
	var alertContent = document.createElement('div');
    alertContent.id = 'notie-alert-content';
    alertInner.appendChild(alertContent);

	// Initialize alert text
    var alertText = document.createElement('span');
    alertText.id = 'notie-alert-text';
    alertContent.appendChild(alertText);

	// alert helper variables
    var alertIsShowing = false;
    var alertTimeout1;
    var alertTimeout2;
    var wasClickedCounter = 0;

	function alert(type, message, seconds) {

		blur();

        wasClickedCounter++;

        setTimeout(function() {
            wasClickedCounter--;
        }, (options.animationDelay + 10));

        if (wasClickedCounter === 1) {

            if (alertIsShowing) {

                clearTimeout(alertTimeout1);
                clearTimeout(alertTimeout2);

                alertHide(function() {
                    alertShow(type, message, seconds);
                });

            }
            else {
                alertShow(type, message, seconds);
            }

        }

    }

    function alertShow(type, message, seconds) {

        alertIsShowing = true;

        var duration = 0;
        if (typeof seconds === 'undefined' || seconds === 0) {
            var duration = 86400000;
        }
        else if (seconds > 0 && seconds < 1) {
            duration = 1000;
        }
        else {
            duration = seconds * 1000;
        }

		// Remove all color classes first
		removeClass(alertOuter, 'notie-background-success');
		removeClass(alertOuter, 'notie-background-warning');
		removeClass(alertOuter, 'notie-background-error');
		removeClass(alertOuter, 'notie-background-info');

        // Set notie type (background color)
        switch(type) {
            case 1:
				addClass(alertOuter, 'notie-background-success');
                break;
            case 2:
                addClass(alertOuter, 'notie-background-warning');
                break;
            case 3:
                addClass(alertOuter, 'notie-background-error');
                break;
            case 4:
                addClass(alertOuter, 'notie-background-info');
                break;
        }

        // Set notie text
        alertText.innerHTML = message;

        alertOuter.style.top = '-10000px';
        alertOuter.style.display = 'table';
        alertOuter.style.top = '-' + alertOuter.offsetHeight - 5 + 'px';

        alertTimeout1 = setTimeout(function() {

			addClass(alertOuter, 'notie-transition');

            alertOuter.style.top = 0;

            alertTimeout2 = setTimeout(function() {

                alertHide(function() {
                    // Nothing
                });

            }, duration);

        }, 20);

    }

    function alertHide(callback) {

        alertOuter.style.top = '-' + alertOuter.offsetHeight - 5 + 'px';

        setTimeout(function() {

			removeClass(alertOuter, 'notie-transition');

            alertOuter.style.top = '-10000px';

            alertIsShowing = false;

            if (callback) { callback(); }

        }, (options.animationDelay + 10));

    }

	// confirm
    // **************

	var confirmOuter = document.createElement('div');
    confirmOuter.id = 'notie-confirm-outer';

	var confirmInner = document.createElement('div');
    confirmInner.id = 'notie-confirm-inner';
    confirmOuter.appendChild(confirmInner);

	var confirmText = document.createElement('span');
    confirmText.id = 'notie-confirm-text';
    confirmInner.appendChild(confirmText);

	var confirmYes = document.createElement('div');
    confirmYes.id = 'notie-confirm-yes'
    confirmOuter.appendChild(confirmYes);

    var confirmNo = document.createElement('div');
   	confirmNo.id = 'notie-confirm-no';
	confirmOuter.appendChild(confirmNo);

	var confirmTextYes = document.createElement('span');
    confirmTextYes.id = 'notie-confirm-text-yes';
    confirmYes.appendChild(confirmTextYes);

    var confirmTextNo = document.createElement('span');
    confirmTextNo.id = 'notie-confirm-text-no';
    confirmNo.appendChild(confirmTextNo);

	var confirmBackground = document.createElement('div');
    confirmBackground.id = 'notie-confirm-background';
	addClass(confirmBackground, 'notie-transition');

	// Hide notie.confirm on no click and background click
    confirmBackground.onclick = function() {
        if (options.backgroundClickDismiss) {
            confirmHide();
        }
    };

	// Attach confirm elements to the body element
    document.body.appendChild(confirmOuter);
    document.body.appendChild(confirmBackground);

	// confirm helper variables
    var confirmIsShowing = false;

    function confirm(title, yesText, noText, yesCallback, noCallback) {

		blur();

        if (alertIsShowing) {
            // Hide notie.alert
            clearTimeout(alertTimeout1);
            clearTimeout(alertTimeout2);
            alertHide(function() {
                confirmShow(title, yesText, noText, yesCallback, noCallback);
            });
        }
        else {
            confirmShow(title, yesText, noText, yesCallback, noCallback);
        }

    }
    function confirmShow(title, yesText, noText, yesCallback, noCallback) {

        scrollDisable();

        // Yes callback function
        confirmYes.onclick = function() {
            confirmHide();
			if (yesCallback) {
				setTimeout(function() {
					yesCallback();
				}, (options.animationDelay + 10));
			}
        }

		// No callback function
		confirmNo.onclick = function() {
            confirmHide();
            if (noCallback) {
				setTimeout(function() {
					noCallback();
				}, (options.animationDelay + 10));
			}
        }

        function confirmShowInner() {

            // Set confirm text
            confirmText.innerHTML = title;
            confirmTextYes.innerHTML = yesText;
            confirmTextNo.innerHTML = noText;

            // Get confirm's height
            confirmOuter.style.top = '-10000px';
            confirmOuter.style.display = 'table';
            confirmOuter.style.top = '-' + confirmOuter.offsetHeight - 5 + 'px';
            confirmBackground.style.display = 'block';

            setTimeout(function() {

                addClass(confirmOuter, 'notie-transition');

                confirmOuter.style.top = 0;
                confirmBackground.style.opacity = '0.75';

                setTimeout(function() {
                    confirmIsShowing = true;
                }, (options.animationDelay + 10));

            }, 20);

        }

        if (confirmIsShowing) {
            confirmHide();
            setTimeout(function() {
                confirmShowInner();
            }, (options.animationDelay + 10));
        }
        else {
            confirmShowInner();
        }

    }

    function confirmHide() {

        confirmOuter.style.top = '-' + confirmOuter.offsetHeight - 5 + 'px';
        confirmBackground.style.opacity = '0';

        setTimeout(function() {

            removeClass(confirmOuter, 'notie-transition');
			confirmOuter.style.top = '-10000px';
            confirmBackground.style.display = 'none';

            scrollEnable();

            confirmIsShowing = false;

        }, (options.animationDelay + 10));

    }

	// input
    // **********

    var inputOuter = document.createElement('div');
    inputOuter.id = 'notie-input-outer';

	var inputBackground = document.createElement('div');
    inputBackground.id = 'notie-input-background';
	addClass(inputBackground, 'notie-transition');

	var inputInner = document.createElement('div');
    inputInner.id = 'notie-input-inner';
    inputOuter.appendChild(inputInner);

    var inputField = document.createElement('input');
    inputField.id = 'notie-input-field';
	inputField.setAttribute('autocomplete', 'off');
    inputField.setAttribute('autocorrect', 'off');
    inputField.setAttribute('autocapitalize', 'off');
    inputField.setAttribute('spellcheck', 'false');
	inputOuter.appendChild(inputField);

    var inputYes = document.createElement('div');
    inputYes.id = 'notie-input-yes';
    inputOuter.appendChild(inputYes);

    var inputNo = document.createElement('div');
    inputNo.id = 'notie-input-no';
    inputOuter.appendChild(inputNo);

    var inputText = document.createElement('span');
    inputText.id = 'notie-input-text';
    inputInner.appendChild(inputText);

    var inputYesText = document.createElement('span');
    inputYesText.id = 'notie-input-text-yes';
    inputYes.appendChild(inputYesText);

    var inputNoText = document.createElement('span');
    inputNoText.id = 'notie-input-text-no';
    inputNo.appendChild(inputNoText);

    // Attach input elements to the body element
    document.body.appendChild(inputOuter);
    document.body.appendChild(inputBackground);

	// Hide input on no click and background click
    inputBackground.onclick = function() {
        if (options.backgroundClickDismiss) {
            inputHide();
        }
    };

	// input helper variables
    var inputIsShowing = false;

	function input(options, title, submitText, cancelText, submitCallback, cancelCallback) {

		blur();

		if (typeof options.type !== 'undefined' && options.type) {
			inputField.setAttribute('type', options.type);
		}
		else {
			inputField.setAttribute('type', 'text');
		}

		if (typeof options.placeholder !== 'undefined' && options.placeholder) {
			inputField.setAttribute('placeholder', options.placeholder);
		}
		else {
			// Do not set placeholder
		}

        if (typeof options.prefilledValue !== 'undefined' && options.prefilledValue) {
			inputField.value = options.prefilledValue;
		}
		else {
			inputField.value = '';
		}

        if (alertIsShowing) {

            // Hide alert
            clearTimeout(alertTimeout1);
            clearTimeout(alertTimeout2);
            alertHide(function() {
                inputShow(title, submitText, cancelText, submitCallback, cancelCallback);
            });

        }
        else {
            inputShow(title, submitText, cancelText, submitCallback, cancelCallback);
        }

    }
    function inputShow(title, submitText, cancelText, submitCallback, cancelCallback) {

        scrollDisable();

        // Yes callback function
        inputYes.onclick = function() {
            inputHide();
			if (submitCallback) {
				setTimeout(function() {
					submitCallback(inputField.value);
				}, (options.animationDelay + 10));
			}
        }

		// No callback function
		inputNo.onclick = function() {
            inputHide();
            if (cancelCallback) {
				setTimeout(function() {
					cancelCallback(inputField.value);
				}, (options.animationDelay + 10));
			}
        }

        function inputShowInner() {

            // Set input text
            inputText.innerHTML = title;
            inputYesText.innerHTML = submitText;
            inputNoText.innerHTML = cancelText;

            // Get input's height
            inputOuter.style.top = '-10000px';
            inputOuter.style.display = 'table';
            inputOuter.style.top = '-' + inputOuter.offsetHeight - 5 + 'px';
            inputBackground.style.display = 'block';

            setTimeout(function() {

				addClass(inputOuter, 'notie-transition');

                inputOuter.style.top = 0;
                inputBackground.style.opacity = '0.75';

                setTimeout(function() {
                    inputIsShowing = true;

					// put focus on input field
					inputField.focus();

                }, (options.animationDelay + 10));

            }, 20);

        }

        if (inputIsShowing) {
            inputHide();
            setTimeout(function() {
                inputShowInner();
            }, (options.animationDelay + 10));
        }
        else {
            inputShowInner();
        }

    }

    function inputHide() {

        inputOuter.style.top = '-' + inputOuter.offsetHeight - 5 + 'px';
        inputBackground.style.opacity = '0';

        setTimeout(function() {

			removeClass(inputOuter, 'notie-transition');
            inputBackground.style.display = 'none';

            inputOuter.style.top = '-10000px';

            scrollEnable();

            inputIsShowing = false;

        }, (options.animationDelay + 10));

    }

	// select
    // **************

	var selectOuter = document.createElement('div');
    selectOuter.id = 'notie-select-outer';

	var selectInner = document.createElement('div');
    selectInner.id = 'notie-select-inner';
    selectOuter.appendChild(selectInner);

	var selectText = document.createElement('span');
    selectText.id = 'notie-select-text';
	selectInner.appendChild(selectText);

	var selectBackground = document.createElement('div');
    selectBackground.id = 'notie-select-background';
	addClass(selectBackground, 'notie-transition');

	var selectChoices = document.createElement('div');
	selectChoices.id = 'notie-select-choices';
	selectOuter.appendChild(selectChoices);

	var selectCancel = document.createElement('div');
    selectCancel.id = 'notie-select-cancel';
	selectCancel.innerHTML = 'Cancel';
    selectOuter.appendChild(selectCancel);

	// Attach select elements to the body element
    document.body.appendChild(selectOuter);
    document.body.appendChild(selectBackground);

	// Hide input on no click and background click
    selectBackground.onclick = function() {
        if (options.backgroundClickDismiss) {
            selectHide();
        }
    };

	selectCancel.onclick = function() {
		selectHide();
	}

	// select helper variables
    var selectIsShowing = false;

	function select(title, choices /*, callback1, callback2, ... */) {

		var funcs = [];
		for (var i = 0; i < arguments.length - 2; i++) {
			funcs[i] = arguments[i + 2];
		}

		if (funcs.length === choices.length) {

			blur();

			if (alertIsShowing) {
				// Hide notie.alert
				clearTimeout(alertTimeout1);
				clearTimeout(alertTimeout2);
				alertHide(function() {
					selectShow(title, choices, funcs);
				});
			}
			else {
				selectShow(title, choices, funcs);
			}

		}
		else {
			throw 'notie.select number of choices must match number of functions';
		}

    }

	function selectShow(title, choices, funcs) {

		scrollDisable();

		document.getElementById('notie-select-choices').innerHTML = '';

		for (var i = 0; i < choices.length; i++) {

			var selectChoice = document.createElement('div');
			selectChoice.innerHTML = choices[i].title;
			if (choices[i].color) {
				selectChoice.style.backgroundColor = choices[i].color;
			}
			if (i < choices.length - 1) {
				selectChoice.style.borderBottom = '1px solid rgba(255, 255, 255, 0.15)';
			}
			addClass(selectChoice, 'notie-select-choice');
			selectChoices.appendChild(selectChoice);

			// onclick for this choice
			selectChoice.onclick = (function(i) { return function() {
				selectHide();
				setTimeout(function() {
					funcs[i]();
				}, (options.animationDelay + 10));
			};})(i);

		}

        function selectShowInner(title) {

            // Set select text
            selectText.innerHTML = title;

            // Get select's height
            selectOuter.style.bottom = '-10000px';
            selectOuter.style.display = 'table';
            selectOuter.style.bottom = '-' + selectOuter.offsetHeight - 5 + 'px';
            selectBackground.style.display = 'block';

            setTimeout(function() {

                addClass(selectOuter, 'notie-transition');

                selectOuter.style.bottom = 0;
                selectBackground.style.opacity = '0.75';

                setTimeout(function() {
                    selectIsShowing = true;
                }, (options.animationDelay + 10));

            }, 20);

        }

        if (selectIsShowing) {
            selectHide();
            setTimeout(function() {
                selectShowInner(title);
            }, (options.animationDelay + 10));
        }
        else {
            selectShowInner(title);
        }

	}

	function selectHide() {

		selectOuter.style.bottom = '-' + selectOuter.offsetHeight - 5 + 'px';
        selectBackground.style.opacity = '0';

        setTimeout(function() {

            removeClass(selectOuter, 'notie-transition');
			selectOuter.style.bottom = '-10000px';
            selectBackground.style.display = 'none';

            scrollEnable();

            selectIsShowing = false;

        }, (options.animationDelay + 10));

	}

	// Internal helper functions
	// #################

	function addClass(element, className) {
		if (element.classList) {
			element.classList.add(className);
		}
		else {
			element.className += ' ' + className;
		}
	}
	function removeClass(element, className) {
		if (element.classList) {
			element.classList.remove(className);
		}
		else {
			element.className = element.className.replace(new RegExp('(^|\\b)' + className.split(' ').join('|') + '(\\b|$)', 'gi'), ' ');
		}
	}

	function blur() {
		document.activeElement.blur();
	}

	var originalBodyHeight, originalBodyOverflow;
    function scrollDisable() {
        originalBodyHeight = document.body.style.height;
        originalBodyOverflow = document.body.style.overflow;
        document.body.style.height = '100%';
        document.body.style.overflow = 'hidden';
    }
    function scrollEnable() {
        document.body.style.height = originalBodyHeight;
        document.body.style.overflow = originalBodyOverflow;
    }

	// Event listener for keydown enter and escape keys
    window.addEventListener('keydown', function(event) {
        var enterClicked = (event.which == 13 || event.keyCode == 13);
        var escapeClicked = (event.which == 27 || event.keyCode == 27);
        if (alertIsShowing) {
            if (enterClicked || escapeClicked) {
                clearTimeout(alertTimeout1);
                clearTimeout(alertTimeout2);
                alertHide();
            }
        }
        else if (confirmIsShowing) {
            if (enterClicked) {
                confirmYes.click();
            }
            else if (escapeClicked) {
                confirmHide();
            }
        }
        else if (inputIsShowing) {
            if (enterClicked) {
                inputYes.click();
            }
            else if (escapeClicked) {
                inputHide();
            }
        }
		else if (selectIsShowing) {
			if (escapeClicked) {
                selectHide();
            }
		}
    });

    return {
		setOptions: setOptions,
        alert: alert,
        confirm: confirm,
        input: input,
		select: select
    };

}();

// Node.js
if (typeof module === 'object' && module.exports) {
    module.exports = notie;
}


text:
package org.springframework.security.web.authentication;

import java.io.IOException;

import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import org.springframework.security.core.AuthenticationException;
import org.springframework.security.web.AuthenticationEntryPoint;

/**
 *

 * In the pre-authenticated authentication case (unlike CAS, for example) the user will
 * already have been identified through some external mechanism and a secure context
 * established by the time the security-enforcement filter is invoked.
 *

 * Therefore this class isn't actually responsible for the commencement of authentication,
 * as it is in the case of other providers. It will be called if the user is rejected by
 * the AbstractPreAuthenticatedProcessingFilter, resulting in a null authentication.
 *

 * The commence method will always return an
 * HttpServletResponse.SC_FORBIDDEN (403 error).
 *
 * @author Luke Taylor
 * @author Ruud Senden
 * @since 2.0
 * @see org.springframework.security.web.access.ExceptionTranslationFilter
 */
public class Http403ForbiddenEntryPoint implements AuthenticationEntryPoint {

	private static final Log logger = LogFactory.getLog(Http403ForbiddenEntryPoint.class);

	/**
	 * Always returns a 403 error code to the client.
	 */
	@Override
	public void commence(HttpServletRequest request, HttpServletResponse response, AuthenticationException arg2)
			throws IOException {
		logger.debug("Pre-authenticated entry point called. Rejecting access");
		response.sendError(HttpServletResponse.SC_FORBIDDEN, "Access Denied");
	}

}


text:
#include "Concurrency.h"

#if !defined(INTRA_NO_CONCURRENCY)

#include "Concurrency/Thread.h"
#include "Concurrency/Atomic.h"
#include "Concurrency/Mutex.h"
#include "Concurrency/Lock.h"
#include "Concurrency/Synchronized.h"
#include "Concurrency/CondVar.h"

#if(INTRA_LIBRARY_THREAD != INTRA_LIBRARY_THREAD_None)

#include "Range/ForEach.h"

#include "System/Stopwatch.h"

using namespace Intra;

void TestInterruption(FormattedWriter& output)
{
	AtomicBool flag;
	Thread thr("Sleeper", [&]() {
		if(ThisThread.Sleep(500)) flag.Set(true);
	});
	Stopwatch clock;
	ThisThread.Sleep(1);
	auto elapsedUs = clock.ElapsedUs();
	output.PrintLine("ThisThread.Sleep(1) time: ", elapsedUs, u8" μs.");
	thr.Interrupt();

	clock.Reset();
	thr.Join();
	elapsedUs = clock.ElapsedUs();
	output.PrintLine(thr.Name(), " joining time: ", elapsedUs, u8" μs.");
#ifndef INTRA_THREAD_NO_FULL_INTERRUPT
	INTRA_ASSERT(!flag.Get());
#endif

	CondVar cv;
	thr = Thread("CVWaiter", [&]() {
		INTRA_SYNCHRONIZED(cv)
			cv.WaitMs(500, []() {return false;});
	});
	ThisThread.Sleep(1);
	thr.Interrupt();

	clock.Reset();
	thr.Join();
	elapsedUs = clock.ElapsedUs();
	output.PrintLine(thr.Name(), " joining time: ", elapsedUs, u8" μs.");
#ifndef INTRA_THREAD_NO_FULL_INTERRUPT
	INTRA_ASSERT1(elapsedUs < 50000 || Utils::IsDebuggerAttached(), elapsedUs);
#endif

	thr = Thread("NonInterruptibleSleeper", [&]() {
		ThisThread.DisableInterruption();
		ThisThread.Sleep(500);
	});
	ThisThread.Sleep(1);
	thr.Interrupt();

	clock.Reset();
	thr.Join();
	elapsedUs = clock.ElapsedUs();
	output.PrintLine(thr.Name(), " joining time: ", elapsedUs, u8" μs.");
	INTRA_ASSERT1(elapsedUs >= 480000 || Utils::IsDebuggerAttached(), elapsedUs);
}

#endif
#endif


text:
<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
</head>
<body>
	<script src="exchangeValues.js"></script>
</body>
</html>


text:
#include "HeeksObjDlg.h"
#include "XYZBoxes.h"

class XYZBoxes;

class CuboidDlg : public HeeksObjDlg
{
	XYZBoxes *m_xyzPos;
	XYZBoxes *m_xyzSize;

public:
    CuboidDlg(wxWindow *parent, HeeksObj* object, const wxString& title = wxString(_T("Cuboid")), bool top_level = true);

	// HeeksObjDlg virtual functions
	void GetDataRaw(HeeksObj* object);
	void SetFromDataRaw(HeeksObj* object);
	void SetPictureByWindow(wxWindow* w);
	void SetPicture(const wxString& name);

    DECLARE_EVENT_TABLE()
};


text:
var jwt = require('jsonwebtoken');
var app = require('../../../server');
var request = require('supertest')(app);
var config = require('../../../config/config');
var FarmOwner = require('../../../app/models/farmOwner.model.js');

var farmOwner;

describe('FarmOwner route test', function() {
	farmOwner = {
		firstname: 'eric',
		lastname: 'cartman',
		email: 'ericcartman@gmail.com',
		phoneNo: 08097988678,
		password: 'ericcartman',
		farmName: 'ericcartman farms',
		agricType: 'mixed',
		numOfEmployees: 12,
		address: 'no 2 community road, akoka',
		state: 'lagos',
		website: 'www.ericcartman.com'
	};

	it('should ensure a farm owner with complete details can sign up', function(done) {
		request.post('/api/farmOwner/signup')
		.send(farmOwner)
		.expect(200)
		.end(function(err) {
			expect(err).toBe(null);
			done();
		});
	});

	it('should ensure farm owner with duplicate details isnt signed up', function(done) {
		request.post('/api/farmOwner/signup')
		.send(farmOwner)
		.expect(401)
		.end(function(err, res) {
			expect(res.body).toEqual(jasmine.objectContaining({
        success: false,
        message: 'Farm Name Already Exists!'
      }));
			done();
		});
	});

	it('should ensure a farm owner with undefined firstname isnt registered', function(done) {
		farmOwner = {firstname: undefined};
		request.post('/api/farmOwner/signup')
		.send(farmOwner)
		.expect(401)
		.end(function(err, res) {
			expect(res.body).toEqual(jasmine.objectContaining({
        success: false,
        message: 'Please fill the required field(s)!'
      }));
			done();
		});
	});

	it('should ensure a farm owner with undefined lastname isnt registered', function(done) {
		farmOwner = {lastname: undefined};
		request.post('/api/farmOwner/signup')
		.send(farmOwner)
		.expect(401)
		.end(function(err, res) {
			expect(res.body).toEqual(jasmine.objectContaining({
        success: false,
        message: 'Please fill the required field(s)!'
      }));
			done();
		});
	});

	it('should ensure a farm owner with undefined email isnt registered', function(done) {
		farmOwner = {email: undefined};
		request.post('/api/farmOwner/signup')
		.send(farmOwner)
		.expect(401)
		.end(function(err, res) {
			expect(res.body).toEqual(jasmine.objectContaining({
        success: false,
        message: 'Please fill the required field(s)!'
      }));
			done();
		});
	});

	it('should ensure a farm owner with undefined phone number isnt registered', function(done) {
		farmOwner = {phoneNo: undefined};
		request.post('/api/farmOwner/signup')
		.send(farmOwner)
		.expect(401)
		.end(function(err, res) {
			expect(res.body).toEqual(jasmine.objectContaining({
        success: false,
        message: 'Please fill the required field(s)!'
      }));
			done();
		});
	});

	it('should ensure a farm owner with undefined password isnt registered', function(done) {
		farmOwner = {password: undefined};
		request.post('/api/farmOwner/signup')
		.send(farmOwner)
		.expect(401)
		.end(function(err, res) {
			expect(res.body).toEqual(jasmine.objectContaining({
        success: false,
        message: 'Please fill the required field(s)!'
      }));
			done();
		});
	});

	it('should ensure a farm owner with undefined farm name isnt registered', function(done) {
		farmOwner = {farmName: undefined};
		request.post('/api/farmOwner/signup')
		.send(farmOwner)
		.expect(401)
		.end(function(err, res) {
			expect(res.body).toEqual(jasmine.objectContaining({
        success: false,
        message: 'Please fill the required field(s)!'
      }));
			done();
		});
	});

	it('should ensure a farm owner with undefined agric type isnt registered', function(done) {
		farmOwner = {agricType: undefined};
		request.post('/api/farmOwner/signup')
		.send(farmOwner)
		.expect(401)
		.end(function(err, res) {
			expect(res.body).toEqual(jasmine.objectContaining({
        success: false,
        message: 'Please fill the required field(s)!'
      }));
			done();
		});
	});

	it('should ensure a farm owner with undefined number of employees isnt registered', function(done) {
		farmOwner = {numOfEmployees: undefined};
		request.post('/api/farmOwner/signup')
		.send(farmOwner)
		.expect(401)
		.end(function(err, res) {
			expect(res.body).toEqual(jasmine.objectContaining({
        success: false,
        message: 'Please fill the required field(s)!'
      }));
			done();
		});
	});

	it('should ensure a farm owner with undefined address isnt registered', function(done) {
		farmOwner = {address: undefined};
		request.post('/api/farmOwner/signup')
		.send(farmOwner)
		.expect(401)
		.end(function(err, res) {
			expect(res.body).toEqual(jasmine.objectContaining({
        success: false,
        message: 'Please fill the required field(s)!'
      }));
			done();
		});
	});

	it('should ensure a farm owner with undefined state isnt registered', function(done) {
		farmOwner = {state: undefined};
		request.post('/api/farmOwner/signup')
		.send(farmOwner)
		.expect(401)
		.end(function(err, res) {
			expect(res.body).toEqual(jasmine.objectContaining({
        success: false,
        message: 'Please fill the required field(s)!'
      }));
			done();
		});
	});

	it('should ensure a registered farm owner can login', function(done) {
		farmOwner = {
			email: 'ericcartman@gmail.com',
			password: 'ericcartman'
		};
		request.post('/api/farmOwner/login')
		.send(farmOwner)
		.expect(200)
		.end(function(err) {
			expect(err).toBe(null);
			done();
		});
	});

	it('should ensure a user with incorrect email cant login', function(done) {
		farmOwner = {
			email: 'ericmccormick@gmail.com',
			password: 'ericcartman'
		};
		request.post('/api/farmOwner/login')
		.send(farmOwner)
		.expect(401)
		.end(function(err, res) {
			expect(res.body).toEqual(jasmine.objectContaining({
        success: false,
        message: 'Invalid Email or Password!'
      }));;
			done();
		});
	});

	it('should ensure a user with incorrect password cant login', function(done) {
		farmOwner = {
			email: 'ericcartman@gmail.com',
			password: 'ericmccormick'
		};
		request.post('/api/farmOwner/login')
		.send(farmOwner)
		.expect(401)
		.end(function(err, res) {
			expect(res.body).toEqual(jasmine.objectContaining({
        success: false,
        message: 'Invalid Email or Password!'
      }));;
			done();
		});
	});

});
// var token;

// describe('User route test', function() {

//   beforeEach(function(done) {
//     token = jwt.sign(farmOwner, config.secret, {
//       expiresIn: 1440
//     });
//     done();
//   });

//   it('should return the details of a farm owner with token', function(done) {
//     request.get('/api/farmOwner/ericcartman@gmail.com')
//     .set('x-access-token', token)
//     .expect(200)
//     .end(function(err) {
//       expect(err).toBe(null);
//       done();
//     });
//   });

//   it('should not return the details of a user without token', function(done) {
//     request.get('/api/user/keisukehonda')
//     .expect(403)
//     .end(function(err, res) {
//       expect(res.body).toEqual(jasmine.objectContaining({
//         success: false,
//         message: 'Signup or Login.'
//       }));
//       done();
//     });
//   });

//   it('should edit the details of a user with token', function(done) {
//     user = {
//       username: 'keisuketoyota'
//     };
//     request.put('/api/user/keisukehonda')
//     .set('x-access-token', token)
//     .expect(200)
//     .send(user)
//     .end(function(err) {
//       expect(err).toBe(null);
//       done();
//     });
//   });

//   it('should delete a user', function(done) {
//     request.delete('/api/user/keisuketoyota')
//     .set('x-access-token', token)
//     .expect(200)
//     .end(function(err) {
//       expect(err).toBe(null);
//       done();
//     });
//   });

// });


text:
<?php
// src/Cloudy/Bundle/CrudBundle/Entity/Blog.php

namespace Cloudy\Bundle\CrudBundle\Entity;

use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Collections\ArrayCollection;

/**
 * @ORM\Entity(repositoryClass="Cloudy\Bundle\CrudBundle\Entity\Repository\BlogRepository")
 * @ORM\Table(name="blog")
 * @ORM\HasLifecycleCallbacks
 */
class Blog
{
    /**
     * @ORM\Id
     * @ORM\Column(type="integer")
     * @ORM\GeneratedValue(strategy="AUTO")
     */
	protected $id;

    /**
     * @ORM\Column(type="string")
     */
    protected $title;

    /**
     * @ORM\Column(type="string", length=100)
     */
    protected $author;

    /**
     * @ORM\Column(type="text")
     */
    protected $blog;

    /**
     * @ORM\Column(type="string", length=20)
     */
    protected $image;

    /**
     * @ORM\Column(type="text")
     */
    protected $tags;

    /**
     * @ORM\OneToMany(targetEntity="Comment", mappedBy="blog")
     */
    protected $comments;

    /**
     * @ORM\Column(type="datetime")
     */
    protected $created;

    /**
     * @ORM\Column(type="datetime")
     */
    protected $updated;

	public function __construct()
		{
			$this->comments = new ArrayCollection();

			$this->setCreated(new \DateTime());
			$this->setUpdated(new \DateTime());
		}

	/**
     * @ORM\PreUpdate
     */
    public function setUpdatedValue()
    {
       $this->setUpdated(new \DateTime());
    }

    /**
     * Get id
     *
     * @return integer
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set title
     *
     * @param string $title
     * @return Blog
     */
    public function setTitle($title)
    {
        $this->title = $title;

        return $this;
    }

    /**
     * Get title
     *
     * @return string
     */
    public function getTitle()
    {
        return $this->title;
    }

    /**
     * Set author
     *
     * @param string $author
     * @return Blog
     */
    public function setAuthor($author)
    {
        $this->author = $author;

        return $this;
    }

    /**
     * Get author
     *
     * @return string
     */
    public function getAuthor()
    {
        return $this->author;
    }

    /**
     * Set blog
     *
     * @param string $blog
     * @return Blog
     */
    public function setBlog($blog)
    {
        $this->blog = $blog;

        return $this;
    }

    /**
     * Get blog
     *
     * @return string
     */
    public function getBlog($length = null)
    {
    if (false === is_null($length) && $length > 0)
        return substr($this->blog, 0, $length);
	else
        return $this->blog;
    }

    /**
     * Set image
     *
     * @param string $image
     * @return Blog
     */
    public function setImage($image)
    {
        $this->image = $image;

        return $this;
    }

    /**
     * Get image
     *
     * @return string
     */
    public function getImage()
    {
        return $this->image;
    }

    /**
     * Set tags
     *
     * @param string $tags
     * @return Blog
     */
    public function setTags($tags)
    {
        $this->tags = $tags;

        return $this;
    }

    /**
     * Get tags
     *
     * @return string
     */
    public function getTags()
    {
        return $this->tags;
    }

    /**
     * Set created
     *
     * @param \DateTime $created
     * @return Blog
     */
    public function setCreated($created)
    {
        $this->created = $created;

        return $this;
    }

    /**
     * Get created
     *
     * @return \DateTime
     */
    public function getCreated()
    {
        return $this->created;
    }

    /**
     * Set updated
     *
     * @param \DateTime $updated
     * @return Blog
     */
    public function setUpdated($updated)
    {
        $this->updated = $updated;

        return $this;
    }

    /**
     * Get updated
     *
     * @return \DateTime
     */
    public function getUpdated()
    {
        return $this->updated;
    }

    /**
     * Add comment
     *
     * @param \Cloudy\Bundle\CrudBundle\Entity\Comment $comment
     *
     * @return Blog
     */
    public function addComment(\Cloudy\Bundle\CrudBundle\Entity\Comment $comment)
    {
        $this->comments[] = $comment;

        return $this;
    }

    /**
     * Remove comment
     *
     * @param \Cloudy\Bundle\CrudBundle\Entity\Comment $comment
     */
    public function removeComment(\Cloudy\Bundle\CrudBundle\Entity\Comment $comment)
    {
        $this->comments->removeElement($comment);
    }

    /**
     * Get comments
     *
     * @return \Doctrine\Common\Collections\Collection
     */
    public function getComments()
    {
        return $this->comments;
    }

	public function __toString()
{
    return $this->getTitle();
}
}


text:
ARG BASE_IMAGE=fedora:latest
ARG LIBMUSTACHE_VERSION=master

# image0
FROM ${BASE_IMAGE}
ARG LIBMUSTACHE_VERSION
WORKDIR /build

RUN dnf groupinstall 'Development Tools' -y
RUN dnf install \
    gcc \
    automake \
    autoconf \
    libtool \
    libyaml-devel \
    json-c-devel \
    php-devel \
    -y

# libmustache
RUN git clone https://github.com/jbboehr/libmustache.git
WORKDIR /build/libmustache
RUN git checkout $LIBMUSTACHE_VERSION && git submodule update --init
RUN autoreconf -fiv
RUN ./configure \
        --prefix /usr/local/ \
        --enable-static \
        --disable-shared \
        CXXFLAGS="-O3 -fPIC -DPIC -flto" \
        RANLIB=gcc-ranlib \
        AR=gcc-ar \
        NM=gcc-nm \
        LD=gcc
RUN make
RUN make install

# php-mustache
WORKDIR /build/php-mustache
ADD . .
RUN phpize
RUN ./configure CXXFLAGS="-O3 -fPIC -DPIC"
RUN make
RUN make install

# image1
FROM ${BASE_IMAGE}
RUN dnf install php-cli -y
# this probably won't work on other arches
COPY --from=0 /usr/lib64/php/modules/mustache.so /usr/lib64/php/modules/mustache.so
# please forgive me
COPY --from=0 /usr/lib64/php/build/run-tests.php /usr/local/lib/php/build/run-tests.php
RUN echo extension=mustache.so | sudo tee /etc/php.d/90-mustache.ini


text:
layout: kanji
v4: 69
v6: 73
kanji: 的
keyword: bull´s eye
elements: bull's eye, white, dove, ladle, bound up, drop
strokes: 8
image: E79A84
on-yomi: テキ
kun-yomi: まと
permalink: /rtk/的/
prev: 勺
next: 首
---

1) [Christine_Tham] 22-7-2007(223): I managed to hit the bull's eye by throwing my white ladle.

2) [seanolan] 10-10-2006(167): A white, bound up, drop in the center is the bull's eye. (why Heisig had to use "ladle" instead of the original two primitives that make up "ladle" I'll never understand!).

3) [DrWarrior12] 21-7-2007(52): You're outside at a BBQ making the white sauce to go with whats on the grill. You lift the ladle to your lips. Right after you close your eyes to take a taste, a drop of white bird shit falls into the ladle - " Bull's Eye! " the bird says. Not seeing the incident, you proceed to taste your 'white sauce'.

4) [canji] 30-7-2008(20): He scooped out the bull's eye with a white laddle.

5) [ederu] 18-11-2008(14): A white, bound up, drop in the center is the bull's eye.


text:
Having trouble? Got questions? Check the [FAQ](FAQ.md) or try the
[SL4A discussion group](http://groups.google.com/group/android-scripting).

Android devices from Donut upward have text-to-speech (TTS) support built in and
do not need to install TTS separately. On older devices, TTS is made possible by
the [eyes-free](http://code.google.com/p/eyes-free/) project. Tap, click, or
scan the following barcode to install TTS:

[![](http://chart.apis.google.com/chart?cht=qr&chs=200x200&chl=market://search?q=pname:com.google.tts&nonsense=something_that_ends_with.png)](http://bit.ly/1aeAhU)

<!---
 vi: ft=markdown:et:fdm=marker
 -->


text:
/* ============================================================ include files */

#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#else
#error need stdlib.h
#endif

#ifdef HAVE_UNISTD_H
#include <unistd.h>
#else
#error need unistd.h
#endif

#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#else
#error need sys/types.h
#endif

#ifdef HAVE_SYS_WAIT_H
#include <sys/wait.h>
#else
#error need sys/wait.h
#endif

#ifdef HAVE_ERRNO_H
#include <errno.h>
#else
#error need errno.h
#endif

#ifdef HAVE_SCHED_H
#include <sched.h>
#else
#error need sched.h
#endif

#include "Util.h"
#include "IceCast2.h"
#include "MultiThreadedConnector.h"
#include "DarkIce.h"

#ifdef HAVE_LAME_LIB
#include "LameLibEncoder.h"
#endif

/* ===================================================  local data structures */

/* ================================================  local constants & macros */

/*------------------------------------------------------------------------------
 *  File identity
 *----------------------------------------------------------------------------*/
static const char fileid[] = "$Id: DarkIce.cpp 553 2013-07-15 05:50:56Z rafael@riseup.net $";

/*------------------------------------------------------------------------------
 *  Make sure wait-related stuff is what we expect
 *----------------------------------------------------------------------------*/
#ifndef WEXITSTATUS
# define WEXITSTATUS(stat_val)      ((unsigned)(stat_val) >> 8)
#endif
#ifndef WIFEXITED
# define WIFEXITED(stat_val)        (((stat_val) & 255) == 0)
#endif

/* ===============================================  local function prototypes */

/* =============================================================  module code */

/*------------------------------------------------------------------------------
 *  Initialize the object
 *----------------------------------------------------------------------------*/
void
DarkIce :: init ( const Config      & config )              throw ( Exception )
{
    unsigned int             bufferSecs;
    const ConfigSection    * cs;
    const char             * str;
    unsigned int             sampleRate;
    unsigned int             bitsPerSample;
    unsigned int             channel;
    bool                     reconnect;
    const char             * device;
    const char             * jackClientName;
    const char             * paSourceName;

    // the [general] section
    if ( !(cs = config.get( "general")) ) {
        throw Exception( __FILE__, __LINE__, "no section [general] in config");
    }
    str = cs->getForSure( "duration", " missing in section [general]");
    duration = Util::strToL( str);
    str = cs->getForSure( "bufferSecs", " missing in section [general]");
    bufferSecs = Util::strToL( str);
    if (bufferSecs == 0) {
        throw Exception(__FILE__, __LINE__,
                        "setting bufferSecs to 0 not supported");
    }
    str           = cs->get( "reconnect");
    reconnect     = str ? (Util::strEq( str, "yes") ? true : false) : true;

    // real-time scheduling is enabled by default
    str = cs->get( "realtime" );
    enableRealTime = str ? (Util::strEq( str, "yes") ? true : false) : true;

    // get realtime scheduling priority. If unspecified, set it to 4.
    // Why 4? jackd's default priority is 10, jackd client threads run
    // at 5, so make the encoder thread use 4. jackd automatically sets
    // the process callback priority to the right value, so all we have
    // to care about is the encoder priority.
    str = cs->get( "rtprio" );
    realTimeSchedPriority = (str != NULL) ? Util::strToL( str ) : 4;

    // the [input] section
    if ( !(cs = config.get( "input")) ) {
        throw Exception( __FILE__, __LINE__, "no section [input] in config");
    }

    str        = cs->getForSure( "sampleRate", " missing in section [input]");
    sampleRate = Util::strToL( str);
    str       = cs->getForSure( "bitsPerSample", " missing in section [input]");
    bitsPerSample = Util::strToL( str);
    str           = cs->getForSure( "channel", " missing in section [input]");
    channel       = Util::strToL( str);
    device        = cs->getForSure( "device", " missing in section [input]");
    jackClientName = cs->get ( "jackClientName");
    paSourceName = cs->get ( "paSourceName");

    dsp             = AudioSource::createDspSource( device,
                                                    jackClientName,
                                                    paSourceName,
                                                    sampleRate,
                                                    bitsPerSample,
                                                    channel );
    encConnector    = new MultiThreadedConnector( dsp.get(), reconnect );

    noAudioOuts = 0;
    configIceCast2( config, bufferSecs);
}

/*------------------------------------------------------------------------------
 *  Look for the IceCast2 stream outputs in the config file
 *----------------------------------------------------------------------------*/
void
DarkIce :: configIceCast2 (  const Config      & config,
                             unsigned int        bufferSecs  )
                                                        throw ( Exception )
{
    // look for IceCast2 encoder output streams,
    // sections [icecast2-0], [icecast2-1], ...
    char            stream[]        = "icecast2- ";
    size_t          streamLen       = Util::strLen( stream);
    unsigned int    u;

    for ( u = noAudioOuts; u < maxOutput; ++u ) {
        const ConfigSection    * cs;

        // ugly hack to change the section name to "stream0", "stream1", etc.
        stream[streamLen-1] = '0' + (u - noAudioOuts);

        if ( !(cs = config.get( stream)) ) {
            break;
        }

        const char                * str;

        IceCast2::StreamFormat      format;
        unsigned int                sampleRate      = 0;
        unsigned int                channel         = 0;
        AudioEncoder::BitrateMode   bitrateMode;
        unsigned int                bitrate         = 0;
        unsigned int                maxBitrate      = 0;
        double                      quality         = 0.0;
        const char                * server          = 0;
        unsigned int                port            = 0;
        const char                * password        = 0;
        const char                * mountPoint      = 0;
        const char                * name            = 0;
        const char                * description     = 0;
        const char                * url             = 0;
        const char                * genre           = 0;
        bool                        isPublic        = false;
        int                         lowpass         = 0;
        int                         highpass        = 0;
        const char                * localDumpName   = 0;
        FileSink                  * localDumpFile   = 0;
        bool                        fileAddDate     = false;
        const char                * fileDateFormat  = 0;
        AudioEncoder              * encoder         = 0;
        int                         bufferSize      = 0;

        str         = cs->getForSure( "format", " missing in section ", stream);
        if ( Util::strEq( str, "mp3") ) {
            format = IceCast2::mp3;
        } else {
            throw Exception( __FILE__, __LINE__,
                             "unsupported stream format: ", str);
        }

        str         = cs->get( "sampleRate");
        sampleRate  = str ? Util::strToL( str) : dsp->getSampleRate();
        str         = cs->get( "channel");
        channel     = str ? Util::strToL( str) : dsp->getChannel();

        // determine fixed bitrate or variable bitrate quality
        str         = cs->get( "bitrate");
        bitrate     = str ? Util::strToL( str) : 0;
        str         = cs->get( "maxBitrate");
        maxBitrate  = str ? Util::strToL( str) : 0;
        str         = cs->get( "quality");
        quality     = str ? Util::strToD( str) : 0.0;

        str         = cs->getForSure( "bitrateMode",
                                      " not specified in section ",
                                      stream);
        if ( Util::strEq( str, "cbr") ) {
            bitrateMode = AudioEncoder::cbr;

            if ( bitrate == 0 ) {
                throw Exception( __FILE__, __LINE__,
                                 "bitrate not specified for CBR encoding");
            }
        } else if ( Util::strEq( str, "abr") ) {
            bitrateMode = AudioEncoder::abr;

            if ( bitrate == 0 ) {
                throw Exception( __FILE__, __LINE__,
                                 "bitrate not specified for ABR encoding");
            }
        } else if ( Util::strEq( str, "vbr") ) {
            bitrateMode = AudioEncoder::vbr;

            if ( cs->get( "quality" ) == 0 ) {
                throw Exception( __FILE__, __LINE__,
                                 "quality not specified for VBR encoding");
            }
        } else {
            throw Exception( __FILE__, __LINE__,
                             "invalid bitrate mode: ", str);
        }

        server      = cs->getForSure( "server", " missing in section ", stream);
        str         = cs->getForSure( "port", " missing in section ", stream);
        port        = Util::strToL( str);
        password    = cs->getForSure("password"," missing in section ",stream);
        mountPoint  = cs->getForSure( "mountPoint",
                                      " missing in section ",
                                      stream);
        name        = cs->get( "name");
        description = cs->get( "description");
        url         = cs->get( "url");
        genre       = cs->get( "genre");
        str         = cs->get( "public");
        isPublic    = str ? (Util::strEq( str, "yes") ? true : false) : false;
        str         = cs->get( "lowpass");
        lowpass     = str ? Util::strToL( str) : 0;
        str         = cs->get( "highpass");
        highpass    = str ? Util::strToL( str) : 0;
        str         = cs->get( "fileAddDate");
        fileAddDate = str ? (Util::strEq( str, "yes") ? true : false) : false;
        fileDateFormat = cs->get( "fileDateFormat");

        bufferSize = dsp->getSampleSize() * dsp->getSampleRate() * bufferSecs;
        reportEvent( 3, "buffer size: ", bufferSize);

        localDumpName = cs->get( "localDumpFile");

        // go on and create the things

        // check for and create the local dump file if needed
        if ( localDumpName != 0 ) {
            if ( fileAddDate ) {
                if (fileDateFormat == 0) {
                    localDumpName = Util::fileAddDate(localDumpName);
                }
                else {
                    localDumpName = Util::fileAddDate(  localDumpName,
                                                        fileDateFormat );
                }
            }

            localDumpFile = new FileSink( stream, localDumpName);
            if ( !localDumpFile->exists() ) {
                if ( !localDumpFile->create() ) {
                    reportEvent( 1, "can't create local dump file",
                                    localDumpName);
                    localDumpFile = 0;
                }
            }
            if ( fileAddDate ) {
                delete[] localDumpName;
            }
        }

        // streaming related stuff
        audioOuts[u].socket = new TcpSocket( server, port);
        audioOuts[u].server = new IceCast2( audioOuts[u].socket.get(),
                                            password,
                                            mountPoint,
                                            format,
                                            bitrate,
                                            name,
                                            description,
                                            url,
                                            genre,
                                            isPublic,
                                            localDumpFile);

        switch ( format ) {
            case IceCast2::mp3:
#ifndef HAVE_LAME_LIB
                throw Exception( __FILE__, __LINE__,
                                 "DarkIce not compiled with lame support, "
                                 "thus can't create mp3 stream: ",
                                 stream);
#else
                encoder = new LameLibEncoder(
                                             audioOuts[u].server.get(),
                                             dsp.get(),
                                             bitrateMode,
                                             bitrate,
                                             quality,
                                             sampleRate,
                                             channel,
                                             lowpass,
                                             highpass );

                audioOuts[u].encoder = new BufferedSink(encoder, bufferSize, dsp->getSampleSize());

#endif // HAVE_LAME_LIB
                break;

            default:
                throw Exception( __FILE__, __LINE__,
                                "Illegal stream format: ", format);
        }

        encConnector->attach( audioOuts[u].encoder.get());
    }

    noAudioOuts += u;
}

/*------------------------------------------------------------------------------
 *  Set POSIX real-time scheduling
 *----------------------------------------------------------------------------*/
void
DarkIce :: setRealTimeScheduling ( void )               throw ( Exception )
{
// Only if the OS has the POSIX real-time scheduling functions implemented.
#if defined( HAVE_SCHED_GETSCHEDULER ) && defined( HAVE_SCHED_GETPARAM )
    int                 high_priority;
    struct sched_param  param;

    /* store the old scheduling parameters */
    if ( (origSchedPolicy = sched_getscheduler(0)) == -1 ) {
        throw Exception( __FILE__, __LINE__, "sched_getscheduler", errno);
    }

    if ( sched_getparam( 0, &param) == -1 ) {
        throw Exception( __FILE__, __LINE__, "sched_getparam", errno);
    }
    origSchedPriority = param.sched_priority;

    /* set SCHED_FIFO with max - 1 priority or user configured value */
    if ( (high_priority = sched_get_priority_max(SCHED_FIFO)) == -1 ) {
        throw Exception(__FILE__,__LINE__,"sched_get_priority_max",errno);
    }
    reportEvent( 8, "scheduler high priority", high_priority);

    if (realTimeSchedPriority > high_priority) {
        param.sched_priority = high_priority - 1;
    } else {
        param.sched_priority = realTimeSchedPriority;
    }

    if ( sched_setscheduler( 0, SCHED_FIFO, &param) == -1 ) {
        reportEvent( 1,
                     "Could not set POSIX real-time scheduling, "
                     "this may cause recording skips.\n"
                     "Try to run darkice as the super-user.");
    } else {
        /* ask the new priortiy and report it */
        if ( sched_getparam( 0, &param) == -1 ) {
            throw Exception( __FILE__, __LINE__, "sched_getparam", errno);
        }

        reportEvent( 1,
                     "Using POSIX real-time scheduling, priority",
                     param.sched_priority );
    }
#else
    reportEvent( 1, "POSIX scheduling not supported on this system, "
                    "this may cause recording skips");
#endif // HAVE_SCHED_GETSCHEDULER && HAVE_SCHED_GETPARAM
}

/*------------------------------------------------------------------------------
 *  Set the original scheduling of the process, the one prior to the
 *  setRealTimeScheduling call.
 *  WARNING: make sure you don't call this before setRealTimeScheduling!!
 *----------------------------------------------------------------------------*/
void
DarkIce :: setOriginalScheduling ( void )               throw ( Exception )
{
// Only if the OS has the POSIX real-time scheduling functions implemented.
#if defined( HAVE_SCHED_GETSCHEDULER ) && defined( HAVE_SCHED_GETPARAM )
    uid_t   euid;

    euid = geteuid();

    if ( euid == 0 ) {
        struct sched_param  param;

        if ( sched_getparam( 0, &param) == -1 ) {
            throw Exception( __FILE__, __LINE__, "sched_getparam", errno);
        }

        param.sched_priority = origSchedPriority;

        if ( sched_setscheduler( 0, origSchedPolicy, &param) == -1 ) {
            throw Exception( __FILE__, __LINE__, "sched_setscheduler", errno);
        }

        reportEvent( 5, "reverted to original scheduling");
    }
#endif // HAVE_SCHED_GETSCHEDULER && HAVE_SCHED_GETPARAM
}

/*------------------------------------------------------------------------------
 *  Run the encoder
 *----------------------------------------------------------------------------*/
bool
DarkIce :: encode ( void )                          throw ( Exception )
{
    unsigned int       len;
    unsigned long      bytes;

    if ( !encConnector->open() ) {
        throw Exception( __FILE__, __LINE__, "can't open connector");
    }

    bytes = dsp->getSampleRate() * dsp->getSampleSize() * duration;

    len = encConnector->transfer( bytes, 4096, 1, 0 );

    reportEvent( 1, len, "bytes transfered to the encoders");

    encConnector->close();

    return true;
}

/*------------------------------------------------------------------------------
 *  Run
 *----------------------------------------------------------------------------*/
int
DarkIce :: run ( void )                             throw ( Exception )
{
    reportEvent( 3, "encoding");

    if (enableRealTime) {
        setRealTimeScheduling();
    }
    encode();
    if (enableRealTime) {
        setOriginalScheduling();
    }
    reportEvent( 3, "encoding ends");

    return 0;
}

/*------------------------------------------------------------------------------
 *  Tell each sink to cut what they are doing, and start again.
 *----------------------------------------------------------------------------*/
void
DarkIce :: cut ( void )                             throw ()
{
    reportEvent( 5, "cutting");

    encConnector->cut();

    reportEvent( 5, "cutting ends");
}


text:
SET(CMAKE_DEPENDS_LANGUAGES
  "CXX"
  )
# The set of files for implicit dependencies of each language:
SET(CMAKE_DEPENDS_CHECK_CXX
  "/home/trevor/ROS/catkin_ws/src/hector_slam/hector_mapping/src/HectorMappingRos.cpp" "/home/trevor/ROS/catkin_ws/build/hector_slam/hector_mapping/CMakeFiles/hector_mapping.dir/src/HectorMappingRos.cpp.o"
  "/home/trevor/ROS/catkin_ws/src/hector_slam/hector_mapping/src/PoseInfoContainer.cpp" "/home/trevor/ROS/catkin_ws/build/hector_slam/hector_mapping/CMakeFiles/hector_mapping.dir/src/PoseInfoContainer.cpp.o"
  "/home/trevor/ROS/catkin_ws/src/hector_slam/hector_mapping/src/main.cpp" "/home/trevor/ROS/catkin_ws/build/hector_slam/hector_mapping/CMakeFiles/hector_mapping.dir/src/main.cpp.o"
  )
SET(CMAKE_CXX_COMPILER_ID "GNU")

# Preprocessor definitions for this target.
SET(CMAKE_TARGET_DEFINITIONS
  "ROSCONSOLE_BACKEND_LOG4CXX"
  "ROS_BUILD_SHARED_LIBS=1"
  "ROS_PACKAGE_NAME=\"hector_mapping\""
  )

# Targets to which this target links.
SET(CMAKE_TARGET_LINKED_INFO_FILES
  )

# The include file search paths:
SET(CMAKE_C_TARGET_INCLUDE_PATH
  "/home/trevor/ROS/catkin_ws/devel/include"
  "/usr/include/eigen3"
  "/home/trevor/ROS/catkin_ws/src/hector_slam/hector_mapping/include"
  "/home/trevor/ROS/catkin_ws/src/hector_slam/hector_mapping/include/hector_slam_lib"
  "/opt/ros/indigo/include"
  )
SET(CMAKE_CXX_TARGET_INCLUDE_PATH ${CMAKE_C_TARGET_INCLUDE_PATH})
SET(CMAKE_Fortran_TARGET_INCLUDE_PATH ${CMAKE_C_TARGET_INCLUDE_PATH})
SET(CMAKE_ASM_TARGET_INCLUDE_PATH ${CMAKE_C_TARGET_INCLUDE_PATH})


text:
import requests
import json
import os
import ConfigParser
import logging

def _request(url, headers=None, body=None, request_type=None):
    try:
        if request_type == 'PUT':
            encoded_body = json.dumps(body)
            return requests.put(url, headers=headers, data=encoded_body)
        elif request_type == 'POST':
            encoded_body = json.dumps(body)
            return requests.post(url, headers=headers, data=encoded_body)
        else:
            return requests.get(url, headers=headers)

    except Exception as e:
        logging.error("Failed sending request to keystone")
        return None

class Identity():
    '''Identity class to get project-scoped
       tokens for user'''
    def __init__(self, conf_file):
        config = ConfigParser.RawConfigParser()
        config.read(conf_file)
        if not self._parse_config(config):
            raise Exception()

    def _parse_config(self, config):
        try:
            self.keystone_ep = config.get('DEFAULT', 'keystone_endpoint')
            self.barbican_ep = config.get('DEFAULT', 'barbican_endpoint')
            self.domain_name = config.get('DEFAULT', 'domain_name')
            self.os_username = config.get('DEFAULT', 'username')
            self.os_password = config.get('DEFAULT', 'password')
            self.os_project_name = \
                config.get('DEFAULT', 'project_name')
            self.identity_version = \
                config.get('DEFAULT', 'keystone_version')
            self.auth_token = None

            if not self.keystone_ep:
                logging.error("Keystone Endpoint missing in the config file")
                return False

            if not self.identity_version:
                self.identity_version = 'v2.0'

            self.keystone_ep = self.keystone_ep + '/' + self.identity_version

            if self.identity_version == 'v3' and not self.domain_name:
                logging.error("Domain name missing in the config file")
                return False

            if not self.os_username:
                logging.error("Username missing in the config file")
                return False

            if not self.os_password:
                logging.error("Password missing in the config file")
                return False

            if self.identity_version == 'v2.0':
                if not self._get_v2_project_scoped_auth_token():
                    logging.error("Failed to fetch v2.0 token")
                    return False
            elif self.identity_version == 'v3' and self.os_project_name is None:
                if not self._get_domain_scoped_auth_token():
                    logging.error("Failed to fetch domain scoped token")
                    return False
            else:
                if not self._get_v3_project_scoped_auth_token():
                    logging.error("Failed to fetch project scoped token")
                    return False

            return True

        except Exception as e:
            logging.error(str(e))
            return False

    def _get_v3_project_scoped_auth_token(self):
        try:
            headers = {
                "Content-Type": "application/json",
            }
            body = {
                "auth": {
                    "identity": {
                        "methods": ["password"],
                        "password": {
                            "user": {
                                "name": self.os_username,
                                "domain": { "id": "default" },
                                "password": self.os_password
                             }
                        }
                    },
                    "scope": {
                        "project": {
                            "name": self.os_project_name,
                            "domain": { "id": "default" }
                        }
                    }
                }
            }

            url = self.keystone_ep + "/auth/tokens"
            resp = _request(url, headers, body, 'POST')
            if resp and resp.status_code in range(200, 299):
                headers = resp.headers
                if headers and 'x-subject-token' in headers:
                    self.auth_token = headers['x-subject-token']
                    return True

            return False
        except Exception as e:
            logging.error(str(e))
            return False

    def _get_v2_project_scoped_auth_token(self):
        try:
            headers = {
                "Content-Type": "application/json",
            }
            body = {
                "auth": {
                    "tenantName": self.os_project_name,
                    "passwordCredentials": {
                        "username": self.os_username,
                        "password": self.os_password
                    }
                }
            }

            url = self.keystone_ep + "/tokens"
            resp = _request(url, headers, body, 'POST')
            if resp and resp.status_code in range(200, 299):
                json_data = json.loads(resp.text)
                self.auth_token = json_data['access']['token']['id']
                return True
            return False
        except Exception as e:
            logging.error(str(e))
            return False

    def _get_domain_scoped_auth_token(self):
        # Not supported by barbican
        return False


text:
package org.apache.ibatis.submitted.multiple_discriminator;

public interface PersonMapper {

    public Person get(Long id);
    public Person get2(Long id);
    public Person getLoop();
}


text:
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2003-2008 Matthias Christian Schabel
// Copyright (C) 2008 Steven Watanabe
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

/**
\file

\brief test_predicates.cpp

\details
Test metafunctions is_unit, is_quantity, is_dimension_list ....

Output:
@verbatim
@endverbatim
**/

#include <boost/mpl/assert.hpp>
#include <boost/mpl/list/list0.hpp>

#include <boost/units/base_dimension.hpp>
#include <boost/units/base_unit.hpp>
#include <boost/units/dimension.hpp>
#include <boost/units/is_dimension_list.hpp>
#include <boost/units/is_quantity.hpp>
#include <boost/units/is_quantity_of_dimension.hpp>
#include <boost/units/is_quantity_of_system.hpp>
#include <boost/units/is_unit.hpp>
#include <boost/units/is_unit_of_dimension.hpp>
#include <boost/units/is_unit_of_system.hpp>
#include <boost/units/make_system.hpp>
#include <boost/units/quantity.hpp>
#include <boost/units/unit.hpp>

namespace bu = boost::units;

struct dimension_tag : boost::units::base_dimension<dimension_tag,0> { };

typedef dimension_tag::dimension_type dimension;

struct base_unit1 : bu::base_unit<base_unit1, dimension, 100> {};
struct base_unit2 : bu::base_unit<base_unit2, dimension, 101> {};

typedef bu::make_system<base_unit1>::type system1;
typedef bu::make_system<base_unit2>::type system2;

int main(int,char *[])
{
    BOOST_MPL_ASSERT((bu::is_dimension_list<bu::dimensionless_type>));
    BOOST_MPL_ASSERT((bu::is_dimension_list<dimension>));
    BOOST_MPL_ASSERT_NOT((bu::is_dimension_list<boost::mpl::list0<> >));
    BOOST_MPL_ASSERT_NOT((bu::is_dimension_list<int>));

    BOOST_MPL_ASSERT((bu::is_unit<bu::unit<bu::dimensionless_type, system1> >));
    BOOST_MPL_ASSERT((bu::is_unit<bu::unit<dimension, system1> >));
    BOOST_MPL_ASSERT_NOT((bu::is_unit<int>));

    BOOST_MPL_ASSERT((bu::is_unit_of_system<bu::unit<bu::dimensionless_type, system1>, system1>));
    BOOST_MPL_ASSERT((bu::is_unit_of_system<bu::unit<dimension, system1>, system1>));
    BOOST_MPL_ASSERT_NOT((bu::is_unit_of_system<bu::unit<bu::dimensionless_type, system1>, system2>));
    BOOST_MPL_ASSERT_NOT((bu::is_unit_of_system<bu::unit<dimension, system1>, system2>));
    BOOST_MPL_ASSERT_NOT((bu::is_unit_of_system<int, system1>));
    BOOST_MPL_ASSERT_NOT((bu::is_unit_of_system<int, system2>));

    BOOST_MPL_ASSERT((bu::is_unit_of_dimension<bu::unit<bu::dimensionless_type, system1>, bu::dimensionless_type>));
    BOOST_MPL_ASSERT((bu::is_unit_of_dimension<bu::unit<dimension, system1>, dimension>));
    BOOST_MPL_ASSERT_NOT((bu::is_unit_of_dimension<bu::unit<bu::dimensionless_type, system1>, dimension>));
    BOOST_MPL_ASSERT_NOT((bu::is_unit_of_dimension<bu::unit<dimension, system1>, bu::dimensionless_type>));
    BOOST_MPL_ASSERT_NOT((bu::is_unit_of_dimension<int, bu::dimensionless_type>));
    BOOST_MPL_ASSERT_NOT((bu::is_unit_of_dimension<int, dimension>));

    BOOST_MPL_ASSERT((bu::is_quantity<bu::quantity<bu::unit<bu::dimensionless_type, system1> > >));
    BOOST_MPL_ASSERT((bu::is_quantity<bu::quantity<bu::unit<dimension, system1> > >));
    BOOST_MPL_ASSERT_NOT((bu::is_quantity<int>));

    BOOST_MPL_ASSERT((bu::is_quantity<bu::quantity<bu::unit<bu::dimensionless_type, system1>, int> >));
    BOOST_MPL_ASSERT((bu::is_quantity<bu::quantity<bu::unit<dimension, system1>, int> >));

    BOOST_MPL_ASSERT((bu::is_quantity_of_system<bu::quantity<bu::unit<bu::dimensionless_type, system1> >, system1>));
    BOOST_MPL_ASSERT((bu::is_quantity_of_system<bu::quantity<bu::unit<dimension, system1> >, system1>));
    BOOST_MPL_ASSERT_NOT((bu::is_quantity_of_system<bu::quantity<bu::unit<bu::dimensionless_type, system1> >, system2>));
    BOOST_MPL_ASSERT_NOT((bu::is_quantity_of_system<bu::quantity<bu::unit<dimension, system1> >, system2>));
    BOOST_MPL_ASSERT_NOT((bu::is_quantity_of_system<int, system1>));
    BOOST_MPL_ASSERT_NOT((bu::is_quantity_of_system<int, system2>));

    BOOST_MPL_ASSERT((bu::is_quantity_of_dimension<bu::quantity<bu::unit<bu::dimensionless_type, system1> >, bu::dimensionless_type>));
    BOOST_MPL_ASSERT((bu::is_quantity_of_dimension<bu::quantity<bu::unit<dimension, system1> >, dimension>));
    BOOST_MPL_ASSERT_NOT((bu::is_quantity_of_dimension<bu::quantity<bu::unit<bu::dimensionless_type, system1> >, dimension>));
    BOOST_MPL_ASSERT_NOT((bu::is_quantity_of_dimension<bu::quantity<bu::unit<dimension, system1> >, bu::dimensionless_type>));
    BOOST_MPL_ASSERT_NOT((bu::is_quantity_of_dimension<int, bu::dimensionless_type>));
    BOOST_MPL_ASSERT_NOT((bu::is_quantity_of_dimension<int, dimension>));

    return 0;
}


text:
using System;
using System.Collections.Generic;
using System.Linq;
using Foundation;
using UIKit;
using ObjCRuntime;
using CoreGraphics;

namespace CoreAnimationExample
{
	public partial class CustomizableAnimationViewerScreen : UIViewController, IDetailView
	{
		public event EventHandler ContentsButtonClicked;

		public override void ViewDidLoad ()
		{
			base.ViewDidLoad ();

			btnContents.TouchUpInside += (sender, e) => {
				if (ContentsButtonClicked != null)
					ContentsButtonClicked (sender, e);
			};

			btnStart.TouchUpInside += (s, e) => {

				// begin our animation block. the name allows us to refer to it later
				UIView.BeginAnimations ("ImageMove");

				UIView.SetAnimationDidStopSelector (new Selector ("animationStopped:numFinished:context:"));
				UIView.SetAnimationDelegate (this); //NOTE: you need this for the selector b.s.

				// animation delay
				UIView.SetAnimationDelay ((double)sldrDelay.Value);

				// animation duration
				UIView.SetAnimationDuration ((double)sldrDuration.Value);

				// animation curve
				UIViewAnimationCurve curve = UIViewAnimationCurve.EaseInOut;
				switch (sgmtCurves.SelectedSegment) {
					case 0:
						curve = UIViewAnimationCurve.EaseInOut;
						break;
					case 1:
						curve = UIViewAnimationCurve.EaseIn;
						break;
					case 2:
						curve = UIViewAnimationCurve.EaseOut;
						break;
					case 3:
						curve = UIViewAnimationCurve.Linear;
						break;
				}
				UIView.SetAnimationCurve (curve);

				// repeat count
				UIView.SetAnimationRepeatCount (float.Parse (txtRepeateCount.Text));

				// autorevese when repeating
				UIView.SetAnimationRepeatAutoreverses (swtchAutoReverse.On);

				// move the image one way or the other
				if (imgToAnimate.Frame.Y == 214) {
					imgToAnimate.Frame = new CGRect (
						new CGPoint (imgToAnimate.Frame.X, imgToAnimate.Frame.Y + 400),
						imgToAnimate.Frame.Size);
				} else {
					imgToAnimate.Frame = new CGRect (
						new CGPoint (imgToAnimate.Frame.X, imgToAnimate.Frame.Y - 400),
						imgToAnimate.Frame.Size);
				}

				// finish our animation block
				UIView.CommitAnimations ();
			};
		}

		[Export ("animationStopped:numFinished:context:")]
		public void AnimationStopped (string name, NSNumber numFinished, IntPtr context)
		{
			Console.WriteLine ("Animation completed");
		}
	}
}


text:
boardinghouse.migrations package
================================

Submodules
----------

.. toctree::

   boardinghouse.migrations.0001_initial
   boardinghouse.migrations.0002_patch_admin

Module contents
---------------

.. automodule:: boardinghouse.migrations
    :members:
    :show-inheritance:


text:
[![Binder](http://mybinder.org/badge.svg)](http://mybinder.org/repo/YeoLab/single-cell-bioinformatics)

# single-cell-bioinformatics

Course material in notebook format for learning about single cell bioinformatics methods. To view this material, you have several options:

## 1. View the [live version](http://mybinder.org/repo/YeoLab/single-cell-bioinformatics)

Where you can run and edit code (also accessible by clicking the pink "launch binder" badge above)

## 2. View the [static version](http://nbviewer.jupyter.org/github/yeolab/single-cell-bioinformatics/blob/master/index.ipynb)

Where you cannot run or edit code, but view all the content

## 3. Set this up on your own computer

* 0. If you're using Windows, install [git](https://msysgit.github.io/)
* 1. Install [Miniconda](http://conda.pydata.org/miniconda.html) with Python 3. Command line instructions for mac and linux are shown below.
```
# Mac OS X
curl https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh > miniconda.sh

# 64-bit Linux
curl https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh > miniconda.sh

# After downloading, install (both Mac and Linux)
bash -b miniconda.sh
```
* 2. Clone this repository and all submodules

```
git clone --recursive https://github.com/YeoLab/single-cell-bioinformatics
```
* 3. Go to the new directory
```
cd single-cell-bioinformatics
```
* 4. Create a new environment with the necessary packages
```
conda create --yes -n single-cell-bioinformatics --file conda_requirements.txt
```
* 5. Activate the environment
```
source activate single-cell-bioinformatics  # On windows, do "activate single-cell-bioinformatics"
```
* 6. Install the remaiing requirements
```
pip install -r requirements.txt
```
* 7. PHEW. Now you can launch the notebooks!!
```
jupyter notebook
```

## Frozen versions of previous implementations

* [SCRM 2016](https://github.com/YeoLab/single-cell-bioinformatics-scrm-2016)


text:
package io.cdap.plugin.zuora.objects;

import com.google.gson.annotations.SerializedName;
import io.cdap.cdap.api.data.schema.Schema;
import io.cdap.plugin.zuora.restobjects.annotations.ObjectDefinition;
import io.cdap.plugin.zuora.restobjects.annotations.ObjectFieldDefinition;
import io.cdap.plugin.zuora.restobjects.objects.BaseObject;

import java.util.List;

import javax.annotation.Nullable;

/**
* Object name: ExecuteResult (ExecuteResult).
* Related objects:
**/
@SuppressWarnings("unused")
@ObjectDefinition(
  Name = "ExecuteResult",
  ObjectType = ObjectDefinition.ObjectDefinitionType.NESTED
)
public class ExecuteResult extends BaseObject {
  /**
  * Name: Errors (Errors), Type: array|ActionsErrorResponse.
  * Options (custom, update, select): false, false, false
  **/
  @Nullable
  @SerializedName("errors")
  @ObjectFieldDefinition(FieldType = Schema.Type.ARRAY, NestedClass = "ActionsErrorResponse")
  private List<ActionsErrorResponse> errors;

  /**
  * Name: Id (Id), Type: string.
  * Options (custom, update, select): false, false, false
  **/
  @Nullable
  @SerializedName("id")
  @ObjectFieldDefinition(FieldType = Schema.Type.STRING)
  private String id;

  /**
  * Name: Success (Success), Type: boolean.
  * Options (custom, update, select): false, false, false
  **/
  @Nullable
  @SerializedName("success")
  @ObjectFieldDefinition(FieldType = Schema.Type.BOOLEAN)
  private Boolean success;

  @Override
  public void addFields() {
    addCustomField("errors", errors, List.class);
    addCustomField("id", id, String.class);
    addCustomField("success", success, Boolean.class);
  }
}


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
null

#### Original name
Spiromastix polyporum ined.

### Remarks
null


text:
package com.amazonaws.services.simpledb.model.transform;

import javax.annotation.Generated;

import com.amazonaws.SdkClientException;
import com.amazonaws.Request;
import com.amazonaws.DefaultRequest;
import com.amazonaws.http.HttpMethodName;
import com.amazonaws.services.simpledb.model.*;
import com.amazonaws.transform.Marshaller;
import com.amazonaws.util.StringUtils;

/**
 * ListDomainsRequest Marshaller
 */

@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class ListDomainsRequestMarshaller implements Marshaller<Request<ListDomainsRequest>, ListDomainsRequest> {

    public Request<ListDomainsRequest> marshall(ListDomainsRequest listDomainsRequest) {

        if (listDomainsRequest == null) {
            throw new SdkClientException("Invalid argument passed to marshall(...)");
        }

        Request<ListDomainsRequest> request = new DefaultRequest<ListDomainsRequest>(listDomainsRequest, "AmazonSimpleDB");
        request.addParameter("Action", "ListDomains");
        request.addParameter("Version", "2009-04-15");
        request.setHttpMethod(HttpMethodName.POST);

        if (listDomainsRequest.getMaxNumberOfDomains() != null) {
            request.addParameter("MaxNumberOfDomains", StringUtils.fromInteger(listDomainsRequest.getMaxNumberOfDomains()));
        }

        if (listDomainsRequest.getNextToken() != null) {
            request.addParameter("NextToken", StringUtils.fromString(listDomainsRequest.getNextToken()));
        }

        return request;
    }

}