package org.ringojs.util;

import org.mozilla.javascript.Context;
import org.mozilla.javascript.Scriptable;
import org.mozilla.javascript.ContextFactory;
import org.mozilla.javascript.debug.DebugFrame;
import org.mozilla.javascript.debug.DebuggableScript;
import org.mozilla.javascript.debug.Debugger;

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

/**
 * A base class for Debuggers and Profilers implemented in Javascript.
 * This allows to exclude the debugger/profiler module and all modules
 * it uses to be excluded from debugging/profiling.
 */
public abstract class DebuggerBase implements Debugger {

    String debuggerScript;
    int debuggerScriptDepth = 0;
    final Logger log = Logger.getLogger(DebuggerBase.class.getName());

    public abstract DebuggerBase createDebugger();

    public abstract Object createContextData();

    public abstract void handleCompilationDone(Context cx, DebuggableScript fnOrScript, String source);

    public abstract DebugFrame getScriptFrame(Context cx, DebuggableScript fnOrScript);

    public void attach() {
        attach(createContextData());
    }

    public void setDebuggerScript(String path) {
        debuggerScript = path;
    }

    public void install() {
        ContextFactory factory = Context.getCurrentContext().getFactory();
        factory.addListener(new ContextFactory.Listener() {
            public void contextCreated(Context cx) {
                DebuggerBase debugger = createDebugger();
                if (debugger != null) {
                    debugger.attach(createContextData());
                }
            }
            public void contextReleased(Context cx) {
            }
        });
    }

    public void attach(Object contextData) {
        Context cx = Context.getCurrentContext();
        cx.setDebugger(this, contextData);
        cx.setOptimizationLevel(-1);
        cx.setGeneratingDebug(true);
    }

    public void detach() {
        Context cx = Context.getCurrentContext();
        cx.setDebugger(null, null);
    }

    public Object getContextData() {
        return Context.getCurrentContext().getDebuggerContextData();
    }

    public synchronized void suspend() {
        try {
            wait();
        } catch (InterruptedException ir) {
            Thread.currentThread().interrupt();
        }
    }

    public synchronized void resume() {
        notify();
    }

    public DebugFrame getFrame(Context cx, DebuggableScript fnOrScript) {
        String path = fnOrScript.getSourceName();
        if (log.isLoggable(Level.FINE)) {
            log.fine("Getting Frame for " + path +
                      ", debugger script depth is " + debuggerScriptDepth);
        }
        if (debuggerScriptDepth > 0 || path.equals(debuggerScript)) {
            return new DebuggerScriptFrame();
        } else {
            return getScriptFrame(cx, fnOrScript);
        }
    }

    /**
     * Get a string representation for the given script
     * @param script a function or script
     * @return the file and/or function name of the script
     */
    static String getScriptName(DebuggableScript script) {
        if (script.isFunction()) {
            return script.getSourceName() + ": " + script.getFunctionName();
        } else {
            return script.getSourceName();
        }
    }

    class DebuggerScriptFrame implements DebugFrame {

        public void onEnter(Context cx, Scriptable activation, Scriptable thisObj, Object[] args) {
            log.fine("Entering debugger script frame");
            debuggerScriptDepth ++;
        }

        public void onExit(Context cx, boolean byThrow, Object resultOrException) {
            log.fine("Exiting debugger script frame");
            debuggerScriptDepth --;
        }

        public void onLineChange(Context cx, int lineNumber) {}

        public void onExceptionThrown(Context cx, Throwable ex) {}

        public void onDebuggerStatement(Context cx) {}
    }

}


<!DOCTYPE html>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Facecat</title>

    <link href="/static/css/bootstrap.min.css" rel="stylesheet">

    <link href="/static/css/facecat.css" rel="stylesheet">

            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
              Toggle navigation

            </button>
            Facecat

 Upload

 Generated

      % if 'error' in locals():

An error happend while processing your request.

      % end

Upload a picture  It's more fun if it's the picture of someone.

        <form id="form-upload" class="padded" role="form" action="/upload" method="post" enctype="multipart/form-data">

                    Browse… <input name="upload" id="upload" type="file">

                <input type="text" class="form-control" readonly>

              <button type="submit" class="form-control btn btn-primary" id="submit" role="button">Upload</button>

        </form>


namespace AH.ModuleController.UI.DIET.Forms
{
    partial class frmPatientListDietAssign
    {
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;

        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        #region Windows Form Designer generated code

        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
            this.groupBox4 = new System.Windows.Forms.GroupBox();
            this.btnShow = new System.Windows.Forms.Button();
            this.smartLabel4 = new AtiqsControlLibrary.SmartLabel();
            this.cboReceivingNurseStation = new AtiqsControlLibrary.SmartComboBox();
            this.dgvDietList = new AtiqsControlLibrary.SmartDataGridView();
            this.dgvPatientList = new AtiqsControlLibrary.SmartDataGridView();
            this.txtAdmissionID = new System.Windows.Forms.TextBox();
            this.txtDeitID = new System.Windows.Forms.TextBox();
            this.pnlMain.SuspendLayout();
            this.pnlTop.SuspendLayout();
            this.groupBox4.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.dgvDietList)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.dgvPatientList)).BeginInit();
            this.SuspendLayout();
            //
            // btnTopClose
            //
            this.btnTopClose.Location = new System.Drawing.Point(1128, 12);
            //
            // frmLabel
            //
            this.frmLabel.Location = new System.Drawing.Point(393, 9);
            this.frmLabel.Size = new System.Drawing.Size(406, 33);
            this.frmLabel.Text = "Assign Diet For Admitted Patient ";
            //
            // pnlMain
            //
            this.pnlMain.Controls.Add(this.dgvDietList);
            this.pnlMain.Controls.Add(this.groupBox4);
            this.pnlMain.Controls.Add(this.dgvPatientList);
            this.pnlMain.Location = new System.Drawing.Point(0, 58);
            this.pnlMain.Size = new System.Drawing.Size(1260, 606);
            //
            // pnlTop
            //
            this.pnlTop.Controls.Add(this.txtDeitID);
            this.pnlTop.Controls.Add(this.txtAdmissionID);
            this.pnlTop.Size = new System.Drawing.Size(1260, 58);
            this.pnlTop.Controls.SetChildIndex(this.frmLabel, 0);
            this.pnlTop.Controls.SetChildIndex(this.btnTopClose, 0);
            this.pnlTop.Controls.SetChildIndex(this.txtAdmissionID, 0);
            this.pnlTop.Controls.SetChildIndex(this.txtDeitID, 0);
            //
            // btnEdit
            //
            this.btnEdit.Location = new System.Drawing.Point(110, 673);
            this.btnEdit.Size = new System.Drawing.Size(19, 27);
            this.btnEdit.Visible = false;
            //
            // btnSave
            //
            this.btnSave.Location = new System.Drawing.Point(135, 681);
            this.btnSave.Size = new System.Drawing.Size(33, 17);
            this.btnSave.Visible = false;
            //
            // btnDelete
            //
            this.btnDelete.Location = new System.Drawing.Point(50, 673);
            this.btnDelete.Size = new System.Drawing.Size(21, 27);
            this.btnDelete.Visible = false;
            //
            // btnNew
            //
            this.btnNew.Location = new System.Drawing.Point(1026, 670);
            this.btnNew.Click += new System.EventHandler(this.btnNew_Click);
            //
            // btnClose
            //
            this.btnClose.Location = new System.Drawing.Point(1140, 670);
            this.btnClose.TabIndex = 3;
            //
            // btnPrint
            //
            this.btnPrint.Location = new System.Drawing.Point(77, 673);
            this.btnPrint.Size = new System.Drawing.Size(27, 27);
            this.btnPrint.Visible = false;
            //
            // groupBox1
            //
            this.groupBox1.Location = new System.Drawing.Point(0, 709);
            this.groupBox1.Size = new System.Drawing.Size(1260, 25);
            //
            // groupBox4
            //
            this.groupBox4.BackColor = System.Drawing.Color.PaleTurquoise;
            this.groupBox4.Controls.Add(this.btnShow);
            this.groupBox4.Controls.Add(this.smartLabel4);
            this.groupBox4.Controls.Add(this.cboReceivingNurseStation);
            this.groupBox4.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.groupBox4.ForeColor = System.Drawing.Color.DarkBlue;
            this.groupBox4.Location = new System.Drawing.Point(3, 2);
            this.groupBox4.Name = "groupBox4";
            this.groupBox4.Size = new System.Drawing.Size(1256, 104);
            this.groupBox4.TabIndex = 5;
            this.groupBox4.TabStop = false;
            this.groupBox4.MouseHover += new System.EventHandler(this.groupBox4_MouseHover);
            //
            // btnShow
            //
            this.btnShow.BackColor = System.Drawing.Color.DarkSalmon;
            this.btnShow.Location = new System.Drawing.Point(540, 40);
            this.btnShow.Name = "btnShow";
            this.btnShow.Size = new System.Drawing.Size(238, 30);
            this.btnShow.TabIndex = 158;
            this.btnShow.Text = "Click Patient List to Add Diet";
            this.btnShow.UseVisualStyleBackColor = false;
            this.btnShow.Click += new System.EventHandler(this.btnShow_Click);
            //
            // smartLabel4
            //
            this.smartLabel4.AutoSize = true;
            this.smartLabel4.BackColor = System.Drawing.Color.PaleTurquoise;
            this.smartLabel4.Font = new System.Drawing.Font("Times New Roman", 9.75F, System.Drawing.FontStyle.Bold);
            this.smartLabel4.Location = new System.Drawing.Point(42, 46);
            this.smartLabel4.Name = "smartLabel4";
            this.smartLabel4.Size = new System.Drawing.Size(120, 15);
            this.smartLabel4.TabIndex = 157;
            this.smartLabel4.Text = "Select Nurse Station";
            //
            // cboReceivingNurseStation
            //
            this.cboReceivingNurseStation.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            this.cboReceivingNurseStation.Font = new System.Drawing.Font("Microsoft Sans Serif", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.cboReceivingNurseStation.ForeColor = System.Drawing.Color.Blue;
            this.cboReceivingNurseStation.FormattingEnabled = true;
            this.cboReceivingNurseStation.Items.AddRange(new object[] {
            "1",
            "2"});
            this.cboReceivingNurseStation.Location = new System.Drawing.Point(168, 43);
            this.cboReceivingNurseStation.Name = "cboReceivingNurseStation";
            this.cboReceivingNurseStation.Size = new System.Drawing.Size(356, 26);
            this.cboReceivingNurseStation.TabIndex = 156;
            //
            // dgvDietList
            //
            this.dgvDietList.AllowUserToAddRows = false;
            this.dgvDietList.AllowUserToDeleteRows = false;
            this.dgvDietList.AllowUserToOrderColumns = true;
            this.dgvDietList.AllowUserToResizeColumns = false;
            this.dgvDietList.AllowUserToResizeRows = false;
            this.dgvDietList.BackgroundColor = System.Drawing.Color.White;
            this.dgvDietList.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single;
            dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
            dataGridViewCellStyle1.BackColor = System.Drawing.Color.LightGreen;
            dataGridViewCellStyle1.Font = new System.Drawing.Font("Tahoma", 8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            dataGridViewCellStyle1.ForeColor = System.Drawing.Color.Black;
            dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
            this.dgvDietList.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1;
            this.dgvDietList.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
            dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
            dataGridViewCellStyle2.BackColor = System.Drawing.Color.White;
            dataGridViewCellStyle2.Font = new System.Drawing.Font("Tahoma", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            dataGridViewCellStyle2.ForeColor = System.Drawing.Color.Black;
            dataGridViewCellStyle2.SelectionBackColor = System.Drawing.Color.Lavender;
            dataGridViewCellStyle2.SelectionForeColor = System.Drawing.Color.Crimson;
            dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
            this.dgvDietList.DefaultCellStyle = dataGridViewCellStyle2;
            this.dgvDietList.Location = new System.Drawing.Point(865, 75);
            this.dgvDietList.MultiSelect = false;
            this.dgvDietList.Name = "dgvDietList";
            this.dgvDietList.RowHeadersVisible = false;
            dataGridViewCellStyle3.BackColor = System.Drawing.Color.White;
            this.dgvDietList.RowsDefaultCellStyle = dataGridViewCellStyle3;
            this.dgvDietList.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
            this.dgvDietList.Size = new System.Drawing.Size(272, 395);
            this.dgvDietList.TabIndex = 159;
            this.dgvDietList.CellMouseDoubleClick += new System.Windows.Forms.DataGridViewCellMouseEventHandler(this.dgvDietList_CellMouseDoubleClick);
            //
            // dgvPatientList
            //
            this.dgvPatientList.AllowUserToAddRows = false;
            this.dgvPatientList.AllowUserToDeleteRows = false;
            this.dgvPatientList.AllowUserToOrderColumns = true;
            this.dgvPatientList.AllowUserToResizeColumns = false;
            this.dgvPatientList.AllowUserToResizeRows = false;
            this.dgvPatientList.BackgroundColor = System.Drawing.Color.White;
            this.dgvPatientList.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single;
            dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
            dataGridViewCellStyle4.BackColor = System.Drawing.Color.LightGreen;
            dataGridViewCellStyle4.Font = new System.Drawing.Font("Tahoma", 8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            dataGridViewCellStyle4.ForeColor = System.Drawing.Color.Black;
            dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
            this.dgvPatientList.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle4;
            this.dgvPatientList.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
            dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
            dataGridViewCellStyle5.BackColor = System.Drawing.Color.White;
            dataGridViewCellStyle5.Font = new System.Drawing.Font("Tahoma", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            dataGridViewCellStyle5.ForeColor = System.Drawing.Color.Black;
            dataGridViewCellStyle5.SelectionBackColor = System.Drawing.Color.Lavender;
            dataGridViewCellStyle5.SelectionForeColor = System.Drawing.Color.Crimson;
            dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
            this.dgvPatientList.DefaultCellStyle = dataGridViewCellStyle5;
            this.dgvPatientList.Location = new System.Drawing.Point(2, 106);
            this.dgvPatientList.MultiSelect = false;
            this.dgvPatientList.Name = "dgvPatientList";
            this.dgvPatientList.RowHeadersVisible = false;
            dataGridViewCellStyle6.BackColor = System.Drawing.Color.White;
            this.dgvPatientList.RowsDefaultCellStyle = dataGridViewCellStyle6;
            this.dgvPatientList.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
            this.dgvPatientList.Size = new System.Drawing.Size(1253, 497);
            this.dgvPatientList.TabIndex = 6;
            this.dgvPatientList.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvPatientList_CellClick);
            //
            // txtAdmissionID
            //
            this.txtAdmissionID.Location = new System.Drawing.Point(916, 9);
            this.txtAdmissionID.Name = "txtAdmissionID";
            this.txtAdmissionID.Size = new System.Drawing.Size(100, 20);
            this.txtAdmissionID.TabIndex = 161;
            this.txtAdmissionID.Visible = false;
            //
            // txtDeitID
            //
            this.txtDeitID.Location = new System.Drawing.Point(1022, 7);
            this.txtDeitID.Name = "txtDeitID";
            this.txtDeitID.Size = new System.Drawing.Size(100, 20);
            this.txtDeitID.TabIndex = 162;
            this.txtDeitID.Visible = false;
            //
            // frmPatientListDietAssign
            //
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.ClientSize = new System.Drawing.Size(1260, 734);
            this.isEnterTabAllow = true;
            this.Name = "frmPatientListDietAssign";
            this.Load += new System.EventHandler(this.frmPatientList_Load);
            this.pnlMain.ResumeLayout(false);
            this.pnlTop.ResumeLayout(false);
            this.pnlTop.PerformLayout();
            this.groupBox4.ResumeLayout(false);
            this.groupBox4.PerformLayout();
            ((System.ComponentModel.ISupportInitialize)(this.dgvDietList)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.dgvPatientList)).EndInit();
            this.ResumeLayout(false);

        }

        #endregion

        private System.Windows.Forms.GroupBox groupBox4;
        private AtiqsControlLibrary.SmartDataGridView dgvPatientList;
        private AtiqsControlLibrary.SmartLabel smartLabel4;
        private AtiqsControlLibrary.SmartComboBox cboReceivingNurseStation;
        private System.Windows.Forms.Button btnShow;
        public System.Windows.Forms.TextBox txtAdmissionID;
        public System.Windows.Forms.TextBox txtDeitID;
        private AtiqsControlLibrary.SmartDataGridView dgvDietList;

    }
}


package org.medipi.clinical.dao;

import java.util.List;
import org.medipi.clinical.entities.PatientGroup;
import org.springframework.stereotype.Repository;

/**
 * Implementation of Data Access Object for Patient
 * @author rick@robinsonhq.com
 */
@Repository
public class PatientGroupDAOImpl extends GenericDAOImpl<PatientGroup> implements PatientGroupDAO {
    @Override
    public List<PatientGroup> getAllGroups() {
        return this.getEntityManager().createNamedQuery("PatientGroup.findAll", PatientGroup.class)
                .getResultList();
    }
}


package enums;

public enum GameStatusType {
	GAME_WAITING,
	GAME_READY,
	GAME_PAUSE,
	GAME_RUNNING,
	GAME_END
}


package com.taotao.model;

import java.util.Date;

/**
 * TITLE:广告的model
 * USER:TAOTK
 * DATA:2016/9/14
 * TIME:10:48
 * COMPANY:www.51pjia.com
 */
public class PjPoster {

    private Integer id; //int(11) NOT NULL,
    private Integer category_id;// int(11) DEFAULT NULL,
    private String category_name; //varchar(32) DEFAULT NULL,
    private Integer poster_sort; //int(11) DEFAULT NULL,
    private String poster_url; //varchar(50) DEFAULT NULL,
    private String poster_size; //varchar(32) DEFAULT NULL,
    private Date create_time;//datetime DEFAULT NULL,
    private Integer poster_status; //int(11) DEFAULT NULL,
    private Integer poster_address;
    private String categoryName;
    private String poster_small_url;//小图片

    public String getPoster_small_url() {
        return poster_small_url;
    }
    public void setPoster_small_url(String poster_small_url) {
        this.poster_small_url = poster_small_url;
    }
    public String getCategoryName() {
        return categoryName;
    }

    public void setCategoryName(String categoryName) {
        this.categoryName = categoryName;
    }

    public Integer getPoster_address() {
        return poster_address;
    }

    public void setPoster_address(Integer poster_address) {
        this.poster_address = poster_address;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getCategory_id() {
        return category_id;
    }

    public void setCategory_id(Integer category_id) {
        this.category_id = category_id;
    }

    public String getCategory_name() {
        return category_name;
    }

    public void setCategory_name(String category_name) {
        this.category_name = category_name;
    }

    public Integer getPoster_sort() {
        return poster_sort;
    }

    public void setPoster_sort(Integer poster_sort) {
        this.poster_sort = poster_sort;
    }

    public String getPoster_url() {
        return poster_url;
    }

    public void setPoster_url(String poster_url) {
        this.poster_url = poster_url;
    }

    public String getPoster_size() {
        return poster_size;
    }

    public void setPoster_size(String poster_size) {
        this.poster_size = poster_size;
    }

    public Date getCreate_time() {
        return create_time;
    }

    public void setCreate_time(Date create_time) {
        this.create_time = create_time;
    }

    public Integer getPoster_status() {
        return poster_status;
    }

    public void setPoster_status(Integer poster_status) {
        this.poster_status = poster_status;
    }

    @Override
    public String toString() {
        return "PjPoster{" +
                "id=" + id +
                ", category_id=" + category_id +
                ", category_name='" + category_name + '\'' +
                ", poster_sort=" + poster_sort +
                ", poster_url='" + poster_url + '\'' +
                ", poster_size='" + poster_size + '\'' +
                ", create_time=" + create_time +
                ", poster_status=" + poster_status +
                ", poster_address=" + poster_address +
                ", categoryName='" + categoryName + '\'' +
                ", poster_small_url='" + poster_small_url + '\'' +
                '}';
    }
}


'use strict';
var $;
var _default = {
	'emission': '-',
	'qte': '-',
	'dist': '-'
};

function toggleCentre(type) {
	var selector = ['.from-', ', .to-', ''].join(type + ' circle');
	$(selector).attr('r', function (idx, old) {return !old; })
	.toggleClass('highlight')
	;
}

/**
 * Toggle visibility of given route type. If 'type' is 'route' then display all types
 * @param  {[type]} type  of routes to display.
 * @param  {[type]} state of input (checked or not)
 */
function toggleRoute(type, state) {
	var routeSet;
	routeSet = (type === 'route' ? $('.route')
					: $('.route.from-' + type + ', .route.to-' + type)
				);

	routeSet
		.attr('marker-mid', function (i, val) {return state ? 'url(#arw-mid)' : ''; })
		.attr('marker-end', function (i, val) {return state ? 'url(#arw-end)' : ''; })
		.toggleClass('show')
	;
}

/**
 * Sum values from 'selector' items list
 * @param  {string} selector selector
 * @return {int}             sum
*/
function sumData(selector) {
	var sum = 0;
	var formatNumber = d3.format(',.0f');

	$(selector).each(function () {
		sum += +$(this).text().replace(/(k[gm]| t)/i, '');
	});
	return formatNumber(Math.round(sum)).replace(/,/, ' ');
}

function updateTotal() {

}

$('input.route').change(function () {
	var type = $(this).attr('id').replace('centre-', '');
	$('path.route').toggleClass('show');
	toggleRoute(type, $(this).prop('checked'));
	$('#centre-epci, #centre-transfert, #centre-traitement')
		.attr('disabled', function (idx, old) {
			return !old;
		});
});
$('input.emission').change(function () {
	$('text.emission').toggleClass('show');
	$('.emission .value').text(function (idx, old) {
		return (old === _default.emission ? sumData('svg text.emission'): _default.emission);
	});
});
$('input.qte').change(function () {
	$('text.qte').toggleClass('show');
	$('.qte .value').text(function (idx, old) {
		return (old === _default.qte ? sumData('svg text.qte'): _default.qte);
	});
});
$('input.dist').change(function () {
	$('text.dist').toggleClass('show');
	$('.dist .value').text(function (idx, old) {
		return (old === _default.dist ? sumData('svg text.dist'): _default.dist);
	});
});

$('input').change(function () {
	var type = $(this).attr('id').replace('centre-', '');
	toggleCentre(type);
	toggleRoute(type, $(this).prop('checked'));
});

/**
 * Update counter with data from given entity
 * @param  {string} id entity id (used as selector)
 * @return {void}    directly update UI
 */
function updateCounter(id) {
	$('.emission .value').text(function () {
		return sumData('svg text' + '.' + idify(id) + '.emission');
	});
	$('.qte .value').text(function () {
		return sumData('svg text' + '.' + idify(id) + '.qte');
	});
	$('.dist .value').text(function () {
		return sumData('svg text' + '.' + idify(id) + '.dist');
	});
}

/**
 * Highlight entity's area
 * @param  {string} eid entity's id
 * @return {void}    directly update UI
 */
function highlightEntity(eid) {
	// reset style on others elements
	d3.selectAll('.entity').classed('active', false);

	// apply style to element(s)
	d3.select('.entity.' + eid).classed('active', true);
}

/**
 * Show entity's *label*
 * @param  {string} eid entity's id
 * @return {void}    directly update UI
 */
function showEntityLabel(eid) {
	d3.selectAll('.entity-label').classed('show', false);
	d3.selectAll('.entity-label.' + eid).classed('show', true);
}

/**
 * Show entity's *routes*
 * @param  {string} eid entity's id
 * @return {void}    directly update UI
 */
function showEntityRoute(eid) {
	d3.selectAll('.route')
		.classed('show', false)
		.attr('marker-mid', null)
		.attr('marker-end', null)
	;
	d3.selectAll('.route.' + eid)
		.classed('show', true)
		.attr('marker-mid', 'url(#arw-mid)')
		.attr('marker-end', 'url(#arw-end)')
	;
}


package org.radargun.stages.cache.generators;

import java.io.Serializable;
import java.lang.annotation.Annotation;
import java.lang.reflect.Constructor;
import java.util.Random;

import org.radargun.config.DefinitionElement;
import org.radargun.config.Init;
import org.radargun.config.Property;
import org.radargun.logging.Log;
import org.radargun.logging.LogFactory;

/**
 * @author Radim Vansa <rvansa@redhat.com>
 */
@DefinitionElement(name = "jpa", doc = "Instantiates JPA entities. The constructor for the entities must match to the generateValue() method.")
public class JpaValueGenerator implements ValueGenerator {
   protected static Log log = LogFactory.getLog(JpaValueGenerator.class);

   @Property(name = "class", doc = "Fully qualified name of the value class.", optional = false)
   private String clazzName;

   private Class<?> clazz;
   private Class<? extends Annotation> entityClazz;
   private Constructor<?> ctor;

   @Init
   public void init() {
      try {
         entityClazz = (Class<? extends Annotation>) Class.forName("javax.persistence.Entity");
         clazz = Class.forName(clazzName);
         if (!clazz.isAnnotationPresent(entityClazz)) {
            throw new IllegalArgumentException("Class " + clazz.getName() + " is not an entity - no @Entity present");
         }
         ctor = clazz.getConstructor(Object.class, int.class, Random.class);
      } catch (Exception e) {
         // trace as this can happen on master node
         log.trace("Could not initialize generator " + this, e);
      }
   }

   @Override
   public Object generateValue(Object key, int size, Random random) {
      if (ctor == null) throw new IllegalStateException("The generator was not properly initialized");
      try {
         return ctor.newInstance(key, size, random);
      } catch (Exception e) {
         throw new IllegalStateException(e);
      }
   }

   @Override
   public int sizeOf(Object value) {
      if (value instanceof JpaValue) {
         return ((JpaValue) value).size();
      } else {
         throw new IllegalArgumentException();
      }
   }

   @Override
   public boolean checkValue(Object value, Object key, int expectedSize) {
      if (clazz == null) throw new IllegalStateException("The generator was not properly initialized");
      return clazz.isInstance(value) && ((JpaValue) value).check(expectedSize);
   }

   public static String getRandomString(int size, Random random) {
      StringBuilder sb = new StringBuilder(size);
      for (int i = 0; i < size; ++i) {
         sb.append((char) (random.nextInt(26) + 'A'));
      }
      return sb.toString();
   }

   public abstract static class JpaValue implements Serializable {
      public int size() {
         throw new UnsupportedOperationException();
      }

      public boolean check(int expectedSize) {
         return true;
      }
   }

}


#include "mitkGeometry2D.h"
#include <vtkTransform.h>

mitk::Geometry2D::Geometry2D()
  : m_ScaleFactorMMPerUnitX( 1.0 ),
    m_ScaleFactorMMPerUnitY( 1.0 ),
    m_ReferenceGeometry( NULL )
{
}

mitk::Geometry2D::Geometry2D(const Geometry2D& other)
  : Geometry3D(other), m_ScaleFactorMMPerUnitX( other.m_ScaleFactorMMPerUnitX),
    m_ScaleFactorMMPerUnitY( other.m_ScaleFactorMMPerUnitY),
    m_ReferenceGeometry( other.m_ReferenceGeometry )
{
}

mitk::Geometry2D::~Geometry2D()
{
}

void
mitk::Geometry2D::SetIndexToWorldTransform(
  mitk::AffineTransform3D* transform)
{
  Superclass::SetIndexToWorldTransform(transform);

  m_ScaleFactorMMPerUnitX=GetExtentInMM(0)/GetExtent(0);
  m_ScaleFactorMMPerUnitY=GetExtentInMM(1)/GetExtent(1);

  assert(m_ScaleFactorMMPerUnitX<ScalarTypeNumericTraits::infinity());
  assert(m_ScaleFactorMMPerUnitY<ScalarTypeNumericTraits::infinity());
}

void
mitk::Geometry2D::SetExtentInMM(int direction, ScalarType extentInMM)
{
  Superclass::SetExtentInMM(direction, extentInMM);

  m_ScaleFactorMMPerUnitX=GetExtentInMM(0)/GetExtent(0);
  m_ScaleFactorMMPerUnitY=GetExtentInMM(1)/GetExtent(1);

  assert(m_ScaleFactorMMPerUnitX<ScalarTypeNumericTraits::infinity());
  assert(m_ScaleFactorMMPerUnitY<ScalarTypeNumericTraits::infinity());
}

bool
mitk::Geometry2D::Map(
  const mitk::Point3D &pt3d_mm, mitk::Point2D &pt2d_mm) const
{
  assert(m_BoundingBox.IsNotNull());

  Point3D pt3d_units;
  BackTransform(pt3d_mm, pt3d_units);
  pt2d_mm[0]=pt3d_units[0]*m_ScaleFactorMMPerUnitX;
  pt2d_mm[1]=pt3d_units[1]*m_ScaleFactorMMPerUnitY;
  pt3d_units[2]=0;
  return const_cast<BoundingBox*>(m_BoundingBox.GetPointer())->IsInside(pt3d_units);
}

void
mitk::Geometry2D::Map(const mitk::Point2D &pt2d_mm, mitk::Point3D &pt3d_mm) const
{
  Point3D pt3d_units;
  pt3d_units[0]=pt2d_mm[0]/m_ScaleFactorMMPerUnitX;
  pt3d_units[1]=pt2d_mm[1]/m_ScaleFactorMMPerUnitY;
  pt3d_units[2]=0;
  pt3d_mm = GetParametricTransform()->TransformPoint(pt3d_units);
}

void
mitk::Geometry2D::IndexToWorld(
  const mitk::Point2D &/*pt_units*/, mitk::Point2D &/*pt_mm*/) const
{
  itkExceptionMacro(<< "No general transform possible (only affine) ==> no general" \
    " IndexToWorld(const mitk::Point2D &pt_mm, mitk::Point2D &pt_units)" \
    " possible. Has to be implemented in sub-class.");
}

void
mitk::Geometry2D::WorldToIndex(
  const mitk::Point2D &/*pt_mm*/, mitk::Point2D &/*pt_units*/) const
{
  itkExceptionMacro(<< "No general back transform possible (only affine) ==> no general" \
    " WorldToIndex(const mitk::Point2D &pt_mm, mitk::Point2D &pt_units)" \
    " possible. Has to be implemented in sub-class.");
}

void
mitk::Geometry2D::IndexToWorld(const mitk::Point2D &/*atPt2d_units*/,
  const mitk::Vector2D &/*vec_units*/, mitk::Vector2D &/*vec_mm*/) const
{
  itkExceptionMacro(<< "No general transform possible (only affine) ==> no general" \
    " IndexToWorld(const mitk::Vector2D &vec_mm, mitk::Vector2D &vec_units)" \
    " possible. Has to be implemented in sub-class.");
}

void
mitk::Geometry2D::WorldToIndex(const mitk::Point2D &/*atPt2d_mm*/,
  const mitk::Vector2D &/*vec_mm*/, mitk::Vector2D &/*vec_units*/) const
{
  itkExceptionMacro(<< "No general back transform possible (only affine) ==> no general" \
    " WorldToIndex(const mitk::Vector2D &vec_mm, mitk::Vector2D &vec_units)" \
    " possible. Has to be implemented in sub-class.");
}

void
mitk::Geometry2D::SetSizeInUnits(mitk::ScalarType width, mitk::ScalarType height)
{
  ScalarType bounds[6]={0, width, 0, height, 0, 1};
  ScalarType extent, newextentInMM;
  if(GetExtent(0)>0)
  {
    extent = GetExtent(0);
    if(width>extent)
      newextentInMM = GetExtentInMM(0)/width*extent;
    else
      newextentInMM = GetExtentInMM(0)*extent/width;
    SetExtentInMM(0, newextentInMM);
  }
  if(GetExtent(1)>0)
  {
    extent = GetExtent(1);
    if(width>extent)
      newextentInMM = GetExtentInMM(1)/height*extent;
    else
      newextentInMM = GetExtentInMM(1)*extent/height;
    SetExtentInMM(1, newextentInMM);
  }
  SetBounds(bounds);
}

bool
mitk::Geometry2D::Project(
  const mitk::Point3D &pt3d_mm, mitk::Point3D &projectedPt3d_mm) const
{
  assert(m_BoundingBox.IsNotNull());

  Point3D pt3d_units;
  BackTransform(pt3d_mm, pt3d_units);
  pt3d_units[2] = 0;
  projectedPt3d_mm = GetParametricTransform()->TransformPoint(pt3d_units);
  return const_cast<BoundingBox*>(m_BoundingBox.GetPointer())->IsInside(pt3d_units);
}

bool
mitk::Geometry2D::Project(const mitk::Vector3D &vec3d_mm, mitk::Vector3D &projectedVec3d_mm) const
{
   assert(m_BoundingBox.IsNotNull());

   Vector3D vec3d_units;
   BackTransform(vec3d_mm, vec3d_units);
   vec3d_units[2] = 0;
   projectedVec3d_mm = GetParametricTransform()->TransformVector(vec3d_units);
   return true;
}

bool
mitk::Geometry2D::Project(const mitk::Point3D & atPt3d_mm,
                          const mitk::Vector3D &vec3d_mm, mitk::Vector3D &projectedVec3d_mm) const
{
   MITK_WARN << "Deprecated function! Call Project(vec3D,vec3D) instead.";
   assert(m_BoundingBox.IsNotNull());

   Vector3D vec3d_units;
   BackTransform(atPt3d_mm, vec3d_mm, vec3d_units);
   vec3d_units[2] = 0;
   projectedVec3d_mm = GetParametricTransform()->TransformVector(vec3d_units);

   Point3D pt3d_units;
   BackTransform(atPt3d_mm, pt3d_units);
   return const_cast<BoundingBox*>(m_BoundingBox.GetPointer())->IsInside(pt3d_units);
}

bool
mitk::Geometry2D::Map(const mitk::Point3D & atPt3d_mm,
  const mitk::Vector3D &vec3d_mm, mitk::Vector2D &vec2d_mm) const
{
  Point2D pt2d_mm_start, pt2d_mm_end;
  Point3D pt3d_mm_end;
  bool inside=Map(atPt3d_mm, pt2d_mm_start);
  pt3d_mm_end = atPt3d_mm+vec3d_mm;
  inside&=Map(pt3d_mm_end, pt2d_mm_end);
  vec2d_mm=pt2d_mm_end-pt2d_mm_start;
  return inside;
}

void
mitk::Geometry2D::Map(const mitk::Point2D &/*atPt2d_mm*/,
  const mitk::Vector2D &/*vec2d_mm*/, mitk::Vector3D &/*vec3d_mm*/) const
{
  //@todo implement parallel to the other Map method!
  assert(false);
}

mitk::ScalarType
mitk::Geometry2D::SignedDistance(const mitk::Point3D& pt3d_mm) const
{
  Point3D projectedPoint;
  Project(pt3d_mm, projectedPoint);
  Vector3D direction = pt3d_mm-projectedPoint;
  ScalarType distance = direction.GetNorm();

  if(IsAbove(pt3d_mm) == false)
    distance*=-1.0;

  return distance;
}

bool
mitk::Geometry2D::IsAbove(const mitk::Point3D& pt3d_mm) const
{
  Point3D pt3d_units;
  Geometry3D::WorldToIndex(pt3d_mm, pt3d_units);
  return (pt3d_units[2] > m_BoundingBox->GetBounds()[4]);
}

itk::LightObject::Pointer
mitk::Geometry2D::InternalClone() const
{
  Self::Pointer newGeometry = new Geometry2D(*this);
  newGeometry->UnRegister();
  return newGeometry.GetPointer();
}

void
mitk::Geometry2D::PrintSelf(std::ostream& os, itk::Indent indent) const
{
  Superclass::PrintSelf(os,indent);
  os << indent << " ScaleFactorMMPerUnitX: "
     << m_ScaleFactorMMPerUnitX << std::endl;
  os << indent << " ScaleFactorMMPerUnitY: "
     << m_ScaleFactorMMPerUnitY << std::endl;
}

void
mitk::Geometry2D::SetReferenceGeometry( mitk::Geometry3D *geometry )
{
  m_ReferenceGeometry = geometry;
}

mitk::Geometry3D *
mitk::Geometry2D::GetReferenceGeometry() const
{
  return m_ReferenceGeometry;
}

bool
mitk::Geometry2D::HasReferenceGeometry() const
{
  return ( m_ReferenceGeometry != NULL );
}


<?php

/**
 * csv import class for the addressbook
 *
 * @package     Addressbook
 * @subpackage  Import
 */
class Addressbook_Import_Csv extends Tinebase_Import_Csv_Abstract
{
    /**
     * additional config options
     *
     * @var array
     */
    protected $_additionalOptions = array(
        'container_id'      => '',
    );

    /**
     * creates a new importer from an importexport definition
     *
     * @param  Tinebase_Model_ImportExportDefinition $_definition
     * @param  array                                 $_options
     * @return Calendar_Import_Ical
     *
     * @todo move this to abstract when we no longer need to be php 5.2 compatible
     */
    public static function createFromDefinition(Tinebase_Model_ImportExportDefinition $_definition, array $_options = array())
    {
        return new Addressbook_Import_Csv(self::getOptionsArrayFromDefinition($_definition, $_options));
    }

    /**
     * constructs a new importer from given config
     *
     * @param array $_options
     */
    public function __construct(array $_options = array())
    {
        parent::__construct($_options);

        // don't set geodata for imported contacts as this is too much traffic for the nominatim server
        $this->_controller->setGeoDataForContacts(FALSE);

        // get container id from default container if not set
        if (empty($this->_options['container_id'])) {
            $defaultContainer = $this->_controller->getDefaultAddressbook();
            $this->_options['container_id'] = $defaultContainer->getId();
            if (Tinebase_Core::isLogLevel(Zend_Log::DEBUG)) Tinebase_Core::getLogger()->debug(__METHOD__ . '::' . __LINE__ . ' Setting default container id: ' . $this->_options['container_id']);
        }
    }

    /**
     * add some more values (container id)
     *
     * @return array
     */
    protected function _addData()
    {
        $result['container_id'] = $this->_options['container_id'];
        return $result;
    }

    /**
     * do conversions
     * -> sanitize account_id
     *
     * @param array $_data
     * @return array
     */
    protected function _doConversions($_data)
    {
        $result = parent::_doConversions($_data);

        // unset account id
        if (isset($result['account_id']) && empty($result['account_id'])) {
            unset($result['account_id']);
        }

        if (empty($result['n_family']) && empty($result['org_name'])) {
            if (isset($result['n_fn'])) {
                $result['n_family'] = $result['n_fn'];
            } else {
                $result['n_family'] = 'imported';
            }
        }

        return $result;
    }
}


package org.wildfly.swarm.cdi.jaxrsapi;

import org.wildfly.swarm.spi.api.Fraction;
import org.wildfly.swarm.spi.api.annotations.DeploymentModule;

/**
 * @author Ken Finnigan
 */
@DeploymentModule(name = "org.wildfly.swarm.cdi.jaxrsapi", slot = "deployment", export = true)
public class CDIJAXRSFraction implements Fraction<CDIJAXRSFraction> {
}


// REFACTOR IF POSSIBLE
/**
 * Within Viewport
 *
 * @description Determines whether an element is completely
 *              within the browser viewport
 * @author      Craig Patik, http://patik.com/
 * @version     0.0.4
 * @date        2014-07-05
 */
;(function() {
  /**
   * Determines whether an element is within the viewport
   * @param  {Object}  elem       DOM Element (required)
   * @param  {Object}  options    Optional settings
   * @return {Boolean}            Whether the element was completely within the viewport
   */
  var withinViewport = function _withinViewport(elem, options) {
    var result = false,
      metadata = {},
      config = {},
      settings, useHtmlElem, isWithin, scrollOffset, elemOffset, arr, i, side;

    if (typeof jQuery !== 'undefined' && elem instanceof jQuery) {
      elem = elem.get(0);
    }

    if (typeof elem !== 'object' || elem.nodeType !== 1) {
      throw new Error('First argument must be an element');
    }

    if (elem.getAttribute('data-withinviewport-settings') && window.JSON) {
      metadata = JSON.parse(elem.getAttribute('data-withinviewport-settings'));
    }

    // Settings argument may be a simple string (`top`, `right`, etc)
    if (typeof options === 'string') {
      settings = {sides: options};
    }
    else {
      settings = options || {};
    }

    // Build configuration from defaults and given settings
    config.container = settings.container || metadata.container || withinViewport.defaults.container || document.body;
    config.sides = settings.sides || metadata.sides || withinViewport.defaults.sides || 'all';
    config.top = settings.top || metadata.top || withinViewport.defaults.top || 0;
    config.right = settings.right || metadata.right || withinViewport.defaults.right || 0;
    config.bottom = settings.bottom || metadata.bottom || withinViewport.defaults.bottom || 0;
    config.left = settings.left || metadata.left || withinViewport.defaults.left || 0;

    // Whether we can use the `<html`> element for `scrollTop`
    // Unfortunately at the moment I can't find a way to do this without UA-sniffing
    useHtmlElem = !/Chrome/.test(navigator.userAgent);

    // Element testing methods
    isWithin = {
      // Element is below the top edge of the viewport
      top: function _isWithin_top() {
        return elemOffset[1] >= scrollOffset[1] + config.top;
      },

      // Element is to the left of the right edge of the viewport
      right: function _isWithin_right() {
        var container = (config.container === document.body) ? window : config.container;

        return elemOffset[0] + elem.offsetWidth <= container.innerWidth + scrollOffset[0] - config.right;
      },

      // Element is above the bottom edge of the viewport
      bottom: function _isWithin_bottom() {
        var container = (config.container === document.body) ? window : config.container;

        return elemOffset[1] + elem.offsetHeight <= scrollOffset[1] + container.innerHeight - config.bottom;
      },

      // Element is to the right of the left edge of the viewport
      left: function _isWithin_left() {
        return elemOffset[0] >= scrollOffset[0] + config.left;
      },

      all: function _isWithin_all() {
        return (isWithin.top() && isWithin.right() && isWithin.bottom() && isWithin.left());
      }
    };

    // Current offset values
    scrollOffset = (function _scrollOffset() {
      var x = config.container.scrollLeft,
        y = config.container.scrollTop;

      if (y === 0) {
        if (config.container.pageYOffset) {
          y = config.container.pageYOffset;
        }
        else if (window.pageYOffset) {
          y = window.pageYOffset;
        }
        else {
          if (config.container === document.body) {
            if (useHtmlElem) {
              y = (config.container.parentElement) ? config.container.parentElement.scrollTop : 0;
            }
            else {
              y = (config.container.parentElement) ? config.container.parentElement.scrollTop : 0;
            }
          }
          else {
            y = (config.container.parentElement) ? config.container.parentElement.scrollTop : 0;
          }
        }
      }

      if (x === 0) {
        if (config.container.pageXOffset) {
          x = config.container.pageXOffset;
        }
        else if (window.pageXOffset) {
          x = window.pageXOffset;
        }
        else {
          if (config.container === document.body) {
            x = (config.container.parentElement) ? config.container.parentElement.scrollLeft : 0;
          }
          else {
            x = (config.container.parentElement) ? config.container.parentElement.scrollLeft : 0;
          }
        }
      }

      return [x, y];
    }());

    elemOffset = (function _elemOffset() {
      var el = elem,
        x = 0,
        y = 0;

      if (el.parentNode) {
        x = el.offsetLeft;
        y = el.offsetTop;

        el = el.parentNode;
        while (el) {
          if (el == config.container) {
            break;
          }

          x += el.offsetLeft;
          y += el.offsetTop;

          el = el.parentNode;
        }
      }

      return [x, y];
    })();

    // Test the element against each side of the viewport that was requested
    arr = config.sides.split(' ');
    i = arr.length;
    while (i--) {
      side = arr[i].toLowerCase();
      if (/top|right|bottom|left|all/.test(side)) {
        if (isWithin[side]()) {
          result = true;
        }
        else {
          result = false;
          // Quit as soon as the first failure is found
          break;
        }
      }
    }

    return result;
  }; // end of `withinViewport()`

  // Default settings
  withinViewport.prototype.defaults = {
    container: document.body,
    sides: 'all',
    top: 0,
    right: 0,
    bottom: 0,
    left: 0
  };

  withinViewport.defaults = withinViewport.prototype.defaults;

  // Make function available globally
  window.withinViewport = withinViewport;

  /**
   * Optional enhancements and shortcuts
   *
   * @description Uncomment or comment these pieces as they apply to your project and coding preferences
   */

    // Shortcut methods for each side of the viewport
    // Ex: withinViewport.top(elem) is the same as withinViewport(elem, 'top')
  withinViewport.prototype.top = function _withinViewport_top(element) {
    return withinViewport(element, 'top');
  };

  withinViewport.prototype.right = function _withinViewport_right(element) {
    return withinViewport(element, 'right');
  };

  withinViewport.prototype.bottom = function _withinViewport_bottom(element) {
    return withinViewport(element, 'bottom');
  };

  withinViewport.prototype.left = function _withinViewport_left(element) {
    return withinViewport(element, 'left');
  };
}());


package com.microsoft.azure.management.network.v2019_08_01;

import java.util.List;
import com.microsoft.azure.management.network.v2019_08_01.implementation.SecurityRuleInner;
import com.fasterxml.jackson.annotation.JsonProperty;

/**
 * Subnet and it's custom security rules.
 */
public class SubnetAssociation {
    /**
     * Subnet ID.
     */
    @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY)
    private String id;

    /**
     * Collection of custom security rules.
     */
    @JsonProperty(value = "securityRules")
    private List<SecurityRuleInner> securityRules;

    /**
     * Get subnet ID.
     *
     * @return the id value
     */
    public String id() {
        return this.id;
    }

    /**
     * Get collection of custom security rules.
     *
     * @return the securityRules value
     */
    public List<SecurityRuleInner> securityRules() {
        return this.securityRules;
    }

    /**
     * Set collection of custom security rules.
     *
     * @param securityRules the securityRules value to set
     * @return the SubnetAssociation object itself.
     */
    public SubnetAssociation withSecurityRules(List<SecurityRuleInner> securityRules) {
        this.securityRules = securityRules;
        return this;
    }

}


require 'active_record'

# establish connection
ActiveRecord::Base.configurations = App.config.database_yml
ActiveRecord::Base.establish_connection App.config.database_settings

if ActiveRecord::VERSION::MAJOR == 2

  class RubyAppDumpLogger
    def method_missing(method, *args)
    end
  end

  ActiveRecord::Base.logger = RubyAppDumpLogger.new
end


/**
* Create a new `Particle` object. Particles are extended Sprites that are emitted by a particle emitter such as Phaser.Particles.Arcade.Emitter.
*
* @class Phaser.Particle
* @constructor
* @extends Phaser.Sprite
* @param {Phaser.Game} game - A reference to the currently running game.
* @param {number} x - The x coordinate (in world space) to position the Particle at.
* @param {number} y - The y coordinate (in world space) to position the Particle at.
* @param {string|Phaser.RenderTexture|Phaser.BitmapData|PIXI.Texture} key - This is the image or texture used by the Particle during rendering. It can be a string which is a reference to the Cache entry, or an instance of a RenderTexture or PIXI.Texture.
* @param {string|number} frame - If this Particle is using part of a sprite sheet or texture atlas you can specify the exact frame to use by giving a string or numeric index.
*/
Phaser.Particle = function (game, x, y, key, frame) {

    Phaser.Sprite.call(this, game, x, y, key, frame);

    /**
    * @property {boolean} autoScale - If this Particle automatically scales this is set to true by Particle.setScaleData.
    * @protected
    */
    this.autoScale = false;

    /**
    * @property {array} scaleData - A reference to the scaleData array owned by the Emitter that emitted this Particle.
    * @protected
    */
    this.scaleData = null;

    /**
    * @property {number} _s - Internal cache var for tracking auto scale.
    * @private
    */
    this._s = 0;

    /**
    * @property {boolean} autoAlpha - If this Particle automatically changes alpha this is set to true by Particle.setAlphaData.
    * @protected
    */
    this.autoAlpha = false;

    /**
    * @property {array} alphaData - A reference to the alphaData array owned by the Emitter that emitted this Particle.
    * @protected
    */
    this.alphaData = null;

    /**
    * @property {number} _a - Internal cache var for tracking auto alpha.
    * @private
    */
    this._a = 0;

};

Phaser.Particle.prototype = Object.create(Phaser.Sprite.prototype);
Phaser.Particle.prototype.constructor = Phaser.Particle;

/**
* Updates the Particle scale or alpha if autoScale and autoAlpha are set.
*
* @method Phaser.Particle#update
* @memberof Phaser.Particle
*/
Phaser.Particle.prototype.update = function() {

    if (this.autoScale)
    {
        this._s--;

        if (this._s)
        {
            this.scale.set(this.scaleData[this._s].x, this.scaleData[this._s].y);
        }
        else
        {
            this.autoScale = false;
        }
    }

    if (this.autoAlpha)
    {
        this._a--;

        if (this._a)
        {
            this.alpha = this.alphaData[this._a].v;
        }
        else
        {
            this.autoAlpha = false;
        }
    }

};

/**
* Called by the Emitter when this particle is emitted. Left empty for you to over-ride as required.
*
* @method Phaser.Particle#onEmit
* @memberof Phaser.Particle
*/
Phaser.Particle.prototype.onEmit = function() {
};

/**
* Called by the Emitter if autoAlpha has been enabled. Passes over the alpha ease data and resets the alpha counter.
*
* @method Phaser.Particle#setAlphaData
* @memberof Phaser.Particle
*/
Phaser.Particle.prototype.setAlphaData = function(data) {

    this.alphaData = data;
    this._a = data.length - 1;
    this.alpha = this.alphaData[this._a].v;
    this.autoAlpha = true;

};

/**
* Called by the Emitter if autoScale has been enabled. Passes over the scale ease data and resets the scale counter.
*
* @method Phaser.Particle#setScaleData
* @memberof Phaser.Particle
*/
Phaser.Particle.prototype.setScaleData = function(data) {

    this.scaleData = data;
    this._s = data.length - 1;
    this.scale.set(this.scaleData[this._s].x, this.scaleData[this._s].y);
    this.autoScale = true;

};

/**
* Resets the Particle. This places the Particle at the given x/y world coordinates and then
* sets alive, exists, visible and renderable all to true. Also resets the outOfBounds state and health values.
* If the Particle has a physics body that too is reset.
*
* @method Phaser.Particle#reset
* @memberof Phaser.Particle
* @param {number} x - The x coordinate (in world space) to position the Particle at.
* @param {number} y - The y coordinate (in world space) to position the Particle at.
* @param {number} [health=1] - The health to give the Particle.
* @return {Phaser.Particle} This instance.
*/
Phaser.Particle.prototype.reset = function(x, y, health) {

    Phaser.Component.Reset.prototype.reset.call(this, x, y, health);

    this.alpha = 1;
    this.scale.set(1);

    this.autoScale = false;
    this.autoAlpha = false;

    return this;

};


/**
 * Array reduceRight
 */
function reduceRight(arr, fn, initVal) {
    // check for args.length since initVal might be "undefined" see #gh-57
    var hasInit = arguments.length > 2;

    if (arr == null || !arr.length) {
        if (hasInit) {
            return initVal;
        } else {
            throw new Error('reduce of empty array with no initial value');
        }
    }

    var i = arr.length, result = initVal, value;
    while (--i >= 0) {
        // we iterate over sparse items since there is no way to make it
        // work properly on IE 7-8. see #64
        value = arr[i];
        if (!hasInit) {
            result = value;
            hasInit = true;
        } else {
            result = fn(result, value, i, arr);
        }
    }
    return result;
}

module.exports = reduceRight;


require_relative 'spec_helper'

module LetsCert

  describe IOPlugin do

    it '.empty_data always returns the same hash' do
      hsh = IOPlugin.empty_data

      expect(hsh.keys.size).to eq(4)
      [:account_key, :key, :cert, :chain].each do |key|
        expect(hsh.keys).to include(key)
        expect(hsh[key]).to be_nil
      end
    end

    it '.register registers known subclasses' do
      names = %w(account_key.json key.pem key.der chain.pem fullchain.pem)
      names += %w(cert.pem cert.der)

      names.each do |name|
        expect(IOPlugin.registered.keys).to include(name)
      end
    end

    it '.register may register new classes' do
      class NewIO < IOPlugin;end
      IOPlugin.register(NewIO, 'newio')

      expect(IOPlugin.registered.keys).to include('newio')
      expect(IOPlugin.registered['newio']).to be_a(NewIO)
    end

    it '.register raises when plugin name contains a path' do
      class NewIO2 < IOPlugin; end
      expect { IOPlugin.register(NewIO2, 'new/io') }.to raise_error(LetsCert::Error)
    end

    it '#load raises NotImplementedError' do
      expect { IOPlugin.new('a').load }.to raise_error(NotImplementedError)
    end

    it '#save raises NotImplementedError' do
      expect { IOPlugin.new('a').save }.to raise_error(NotImplementedError)
    end

  end

end


extern "Java"
{
  namespace gnu
  {
    namespace java
    {
      namespace net
      {
        namespace protocol
        {
          namespace jar
          {
              class Handler;
          }
        }
      }
    }
  }
  namespace java
  {
    namespace net
    {
        class URL;
        class URLConnection;
    }
  }
}

class gnu::java::net::protocol::jar::Handler : public ::java::net::URLStreamHandler
{

public:
  Handler();
public: // actually protected
  virtual ::java::net::URLConnection * openConnection(::java::net::URL *);
  virtual void parseURL(::java::net::URL *, ::java::lang::String *, jint, jint);
private:
  static ::java::lang::String * flat(::java::lang::String *);
public: // actually protected
  virtual ::java::lang::String * toExternalForm(::java::net::URL *);
public:
  static ::java::lang::Class class$;
};

#endif // __gnu_java_net_protocol_jar_Handler__


namespace content_settings {

class WebsiteSettingsRegistryTest : public testing::Test {
 protected:
  WebsiteSettingsRegistry* registry() { return &registry_; }

 private:
  WebsiteSettingsRegistry registry_;
};

TEST_F(WebsiteSettingsRegistryTest, Get) {
  // CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE should be registered.
  const WebsiteSettingsInfo* info =
      registry()->Get(CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE);
  ASSERT_TRUE(info);
  EXPECT_EQ(CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE, info->type());
  EXPECT_EQ("auto-select-certificate", info->name());
}

TEST_F(WebsiteSettingsRegistryTest, GetByName) {
  // Random string shouldn't be registered.
  EXPECT_FALSE(registry()->GetByName("abc"));

  // "auto-select-certificate" should be registered.
  const WebsiteSettingsInfo* info =
      registry()->GetByName("auto-select-certificate");
  ASSERT_TRUE(info);
  EXPECT_EQ(CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE, info->type());
  EXPECT_EQ("auto-select-certificate", info->name());
  EXPECT_EQ(registry()->Get(CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE),
            info);

  // Register a new setting.
  registry()->Register(static_cast<ContentSettingsType>(10), "test", nullptr,
                       WebsiteSettingsInfo::UNSYNCABLE,
                       WebsiteSettingsInfo::LOSSY,
                       WebsiteSettingsInfo::TOP_LEVEL_ORIGIN_ONLY_SCOPE,
                       WebsiteSettingsRegistry::ALL_PLATFORMS,
                       WebsiteSettingsInfo::INHERIT_IN_INCOGNITO);
  info = registry()->GetByName("test");
  ASSERT_TRUE(info);
  EXPECT_EQ(10, info->type());
  EXPECT_EQ("test", info->name());
  EXPECT_EQ(registry()->Get(static_cast<ContentSettingsType>(10)), info);
}

TEST_F(WebsiteSettingsRegistryTest, GetPlatformDependent) {
#if defined(OS_IOS)
  // App banner shouldn't be registered on iOS.
  EXPECT_FALSE(registry()->Get(CONTENT_SETTINGS_TYPE_APP_BANNER));
#else
  // App banner should be registered on other platforms.
  EXPECT_TRUE(registry()->Get(CONTENT_SETTINGS_TYPE_APP_BANNER));
#endif

  // Auto select certificate is registered on all platforms.
  EXPECT_TRUE(registry()->Get(CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE));
}

TEST_F(WebsiteSettingsRegistryTest, Properties) {
  // "auto-select-certificate" should be registered.
  const WebsiteSettingsInfo* info =
      registry()->Get(CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE);
  ASSERT_TRUE(info);
  EXPECT_EQ("profile.content_settings.exceptions.auto_select_certificate",
            info->pref_name());
  EXPECT_EQ("profile.default_content_setting_values.auto_select_certificate",
            info->default_value_pref_name());
  ASSERT_FALSE(info->initial_default_value());
  EXPECT_EQ(PrefRegistry::NO_REGISTRATION_FLAGS,
            info->GetPrefRegistrationFlags());

  // Register a new setting.
  registry()->Register(static_cast<ContentSettingsType>(10), "test",
                       base::WrapUnique(new base::FundamentalValue(999)),
                       WebsiteSettingsInfo::SYNCABLE,
                       WebsiteSettingsInfo::LOSSY,
                       WebsiteSettingsInfo::TOP_LEVEL_ORIGIN_ONLY_SCOPE,
                       WebsiteSettingsRegistry::ALL_PLATFORMS,
                       WebsiteSettingsInfo::INHERIT_IN_INCOGNITO);
  info = registry()->Get(static_cast<ContentSettingsType>(10));
  ASSERT_TRUE(info);
  EXPECT_EQ("profile.content_settings.exceptions.test", info->pref_name());
  EXPECT_EQ("profile.default_content_setting_values.test",
            info->default_value_pref_name());
  int setting;
  ASSERT_TRUE(info->initial_default_value()->GetAsInteger(&setting));
  EXPECT_EQ(999, setting);
#if defined(OS_IOS)
  EXPECT_EQ(PrefRegistry::LOSSY_PREF, info->GetPrefRegistrationFlags());
#else
  EXPECT_EQ(PrefRegistry::LOSSY_PREF |
                user_prefs::PrefRegistrySyncable::SYNCABLE_PREF,
            info->GetPrefRegistrationFlags());
#endif
  EXPECT_EQ(WebsiteSettingsInfo::TOP_LEVEL_ORIGIN_ONLY_SCOPE,
            info->scoping_type());
  EXPECT_EQ(WebsiteSettingsInfo::INHERIT_IN_INCOGNITO,
            info->incognito_behavior());
}

TEST_F(WebsiteSettingsRegistryTest, Iteration) {
  registry()->Register(static_cast<ContentSettingsType>(10), "test",
                       base::WrapUnique(new base::FundamentalValue(999)),
                       WebsiteSettingsInfo::SYNCABLE,
                       WebsiteSettingsInfo::LOSSY,
                       WebsiteSettingsInfo::TOP_LEVEL_ORIGIN_ONLY_SCOPE,
                       WebsiteSettingsRegistry::ALL_PLATFORMS,
                       WebsiteSettingsInfo::INHERIT_IN_INCOGNITO);

  bool found = false;
  for (const WebsiteSettingsInfo* info : *registry()) {
    EXPECT_EQ(registry()->Get(info->type()), info);
    if (info->type() == 10) {
      EXPECT_FALSE(found);
      found = true;
    }
  }

  EXPECT_TRUE(found);
}

}  // namespace content_settings


import * as React from "react";
import ReactModal from "react-modal";

import { Config } from "../../../data/Config";

import { OnMobile, OnMobileTablet, OnDesktop, OnTablet } from "../../../helpers/Breakpoints";
import { smoothScrollTo } from "../../../helpers/smoothScrollTo";
import { formatNumber } from "../../../helpers/formatNumber";
import { translate } from "../../../helpers/translate";

import { TransformAnimation } from "../../Animations/Interactive/TransformAnimation";
import { getCorners, getLabel, CloseButton, SubmitButton } from "../../Buttons";
import { SocialLinks } from "../../Layout/Partials";
import { PartnershipPageState } from "./PartnershipPageState";
import { MapIcon } from "../../Icons/MapIcon";
import { ContactForm } from "./ContactForm";
import { BasePage } from "../BasePage";

export class PartnershipPage extends BasePage<{}, PartnershipPageState> {
    public state: PartnershipPageState = {
        isModalOpen: false,
    };

    public shouldComponentUpdate(nextProps: undefined, nextState: PartnershipPageState, nextContext: any): boolean {
        return super.shouldComponentUpdate(nextProps, nextState, nextContext)
            || this.state.isModalOpen !== nextState.isModalOpen;
    }

    public render(): JSX.Element {
        const modalProps = {
            className: {
                base: "modal",
                afterOpen: "",
                beforeClose: "",
            },
            overlayClassName: {
                base: "modal-overlay",
                afterOpen: "modal-opened",
                beforeClose: "modal-close",
            },
            closeTimeoutMS: 500
        };

        const transformAnimationProps = {
            transformedComponent: <ContactForm/>,
            staticComponent: getCorners(),
            initialComponent: getLabel(),
            className: "btn btn_transform",
            onEvent() {
                const { className, duration } = this as any;
                smoothScrollTo(
                    document.getElementsByClassName(className)[ 0 ] as HTMLElement,
                    -105,
                    "top",
                    duration,
                    0
                );
            },
            duration: 1000,
            event: "onClick"
        };

        return (

{translate("contactPage.title")}

                        <OnDesktop>
                            <ContactForm/>
                        </OnDesktop>

                            <OnDesktop>
                                <a href={`tel:+${Config.phone}`} className="contact-info__link">
                                    {formatNumber(Config.phone, "+xxx xx xxx-xx-xx")}

                                <a href={`mailto:${Config.mail}`} className="contact-info__link">{Config.mail}

                                    {translate("contactPage.support.title")}
                                    {translate("contactPage.support.subTitle")}
                                    24
                                        /7

                                    {translate("contactPage.location.title")}
                                    {translate(Config.location.country)}
                                    /
                                     {translate(Config.location.city)}

                            </OnDesktop>
                            <OnTablet>

                                    {translate("contactPage.support.title")}
                                    {translate("contactPage.support.subTitle")}
                                    24/7

                                    <a href={`tel:+${Config.phone}`} className="contact-info__link">
                                        {formatNumber(Config.phone, "+xxx xx xxx-xx-xx")}

                                    <a href={`mailto:${Config.mail}`} className="contact-info__link">{Config.mail}

                                <SubmitButton
                                    type="button"
                                    onClick={this.handleOpenModal}
                                    label={translate("buttons.cooperate")}
                                />

                                    {translate("contactPage.location.title")}
                                    {translate(Config.location.country)} / {translate(Config.location.city)}

                            </OnTablet>
                            <OnMobile>

                                    {translate("contactPage.support.title")}
                                    {translate("contactPage.support.subTitle")}
                                    24/7

                                    {translate("contactPage.location.title")}
                                    {translate(Config.location.country)} / {translate(Config.location.city)}

                                    <a href={`tel:+${Config.phone}`} className="contact-info__link">
                                        {formatNumber(Config.phone, "+xxx xx xxx-xx-xx")}

                                    <a href={`mailto:${Config.mail}`} className="contact-info__link">{Config.mail}

                                <TransformAnimation {...transformAnimationProps}/>
                                <SocialLinks/>
                            </OnMobile>

                    <OnMobileTablet>
                        <ReactModal
                            isOpen={this.state.isModalOpen}
                            contentLabel="Modal-partnership"
                            {...modalProps}
                        >

                                <CloseButton className="btn btn_close" onClick={this.handleCloseModal}/>

{translate("contactPage.form.title")}

                                <ContactForm onClose={this.handleCloseModal}/>

                        </ReactModal>
                    </OnMobileTablet>

                        <MapIcon/>

                                        {Config.location.country} / {Config.location.city}

                                    {Config.location.coordinates.lat}°
                                    {Config.location.coordinates.lng}°

        );
    }

    protected handleCloseModal = () => {
        this.setState({ isModalOpen: false });
    };

    protected handleOpenModal = () => {
        this.setState({ isModalOpen: true });
    };
}


'use strict';

/**
 * @ngdoc directive
 * @name izzyposWebApp.directive:adminPosHeader
 * @description
 * # adminPosHeader
 */
angular.module('sbAdminApp')
	.directive('siteheader',function(){
		return {
        templateUrl:'scripts/directives/header/siteheader.html',
        restrict: 'E',
        replace: true
    	}
	}).directive('dashboardheader',function(){
		return {
        templateUrl:'scripts/directives/header/dashboard_header.html',
        restrict: 'E',
        replace: true
    	}
	}).directive('cpdashboardheader',function(){
        return {
            templateUrl:'scripts/directives/header/cp_dashboard_header.html',
            restrict: 'E',
            replace: true
        }
    }).directive('vendordashboardheader',function(){
        return {
            templateUrl:'scripts/directives/header/vendor_dashboard_header.html',
            restrict: 'E',
            replace: true
        }
    }).directive('admindashboardheader',function(){
        return {
            templateUrl:'scripts/directives/header/admin_dashboard_header.html',
            restrict: 'E',
            replace: true
        }
    });


const express = require('express');
const router = express.Router();

// const Note = require('../models/note.model'); // need this for below router.params
const note = require('../controllers/note.ctrl');

// router.params('id', (req, res, next, id) => { // if an id parameter is present, this grabs it so we dont need
//   Note.findById(id, (err, note) => {          // multiple ".findById()" methods in the controller
//     if(err) throw err;
//     req.note = note;
//     next();
//   });
// });

router.get('/notes', note.index);
router.get('/notes/new', note.newNote);
router.get('/notes/:id', note.show);
router.get('/notes/:id/edit', note.edit);
router.put('/notes/:id', note.update);
router.delete('/notes/:id', note.destroy);
router.post('/notes', note.create);

module.exports = router;


package org.springframework.boot.actuate.autoconfigure.metrics.test;

import java.util.Collections;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.CyclicBarrier;

import javax.servlet.DispatcherType;

import io.micrometer.core.instrument.MeterRegistry;
import io.micrometer.core.instrument.MockClock;
import io.micrometer.core.instrument.binder.MeterBinder;
import io.micrometer.core.instrument.binder.jvm.JvmMemoryMetrics;
import io.micrometer.core.instrument.binder.logging.LogbackMetrics;
import io.micrometer.core.instrument.simple.SimpleConfig;
import io.micrometer.core.instrument.simple.SimpleMeterRegistry;
import org.junit.jupiter.api.Test;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.actuate.autoconfigure.metrics.JvmMetricsAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.metrics.LogbackMetricsAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.metrics.MetricsAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.metrics.SystemMetricsAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.metrics.amqp.RabbitMetricsAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.metrics.cache.CacheMetricsAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.metrics.jdbc.DataSourcePoolMetricsAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.metrics.orm.jpa.HibernateMetricsAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.metrics.web.client.HttpClientMetricsAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.metrics.web.reactive.WebFluxMetricsAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.metrics.web.servlet.WebMvcMetricsAutoConfiguration;
import org.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter;
import org.springframework.boot.autoconfigure.ImportAutoConfiguration;
import org.springframework.boot.autoconfigure.http.HttpMessageConvertersAutoConfiguration;
import org.springframework.boot.autoconfigure.jackson.JacksonAutoConfiguration;
import org.springframework.boot.autoconfigure.web.client.RestTemplateAutoConfiguration;
import org.springframework.boot.autoconfigure.web.servlet.DispatcherServletAutoConfiguration;
import org.springframework.boot.autoconfigure.web.servlet.ServletWebServerFactoryAutoConfiguration;
import org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
import org.springframework.boot.test.web.client.TestRestTemplate;
import org.springframework.boot.web.client.RestTemplateBuilder;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import org.springframework.context.annotation.Primary;
import org.springframework.http.HttpMethod;
import org.springframework.http.MediaType;
import org.springframework.test.util.ReflectionTestUtils;
import org.springframework.test.web.client.MockRestServiceServer;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

import static org.assertj.core.api.Assertions.assertThat;
import static org.springframework.test.web.client.ExpectedCount.once;
import static org.springframework.test.web.client.match.MockRestRequestMatchers.method;
import static org.springframework.test.web.client.match.MockRestRequestMatchers.requestTo;
import static org.springframework.test.web.client.response.MockRestResponseCreators.withSuccess;

/**
 * Integration tests for Metrics.
 *
 * @author Jon Schneider
 */
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT,
		classes = MetricsIntegrationTests.MetricsApp.class,
		properties = "management.metrics.use-global-registry=false")
public class MetricsIntegrationTests {

	@Autowired
	private ApplicationContext context;

	@Autowired
	private RestTemplate external;

	@Autowired
	private TestRestTemplate loopback;

	@Autowired
	private MeterRegistry registry;

	@SuppressWarnings("unchecked")
	@Test
	public void restTemplateIsInstrumented() {
		MockRestServiceServer server = MockRestServiceServer.bindTo(this.external)
				.build();
		server.expect(once(), requestTo("/api/external"))
				.andExpect(method(HttpMethod.GET)).andRespond(withSuccess(
						"{\"message\": \"hello\"}", MediaType.APPLICATION_JSON));
		assertThat(this.external.getForObject("/api/external", Map.class))
				.containsKey("message");
		assertThat(this.registry.get("http.client.requests").timer().count())
				.isEqualTo(1);
	}

	@Test
	public void requestMappingIsInstrumented() {
		this.loopback.getForObject("/api/people", Set.class);
		assertThat(this.registry.get("http.server.requests").timer().count())
				.isEqualTo(1);
	}

	@Test
	public void automaticallyRegisteredBinders() {
		assertThat(this.context.getBeansOfType(MeterBinder.class).values())
				.hasAtLeastOneElementOfType(LogbackMetrics.class)
				.hasAtLeastOneElementOfType(JvmMemoryMetrics.class);
	}

	@Test
	@SuppressWarnings({ "rawtypes", "unchecked" })
	public void metricsFilterRegisteredForAsyncDispatches() {
		Map<String, FilterRegistrationBean> filterRegistrations = this.context
				.getBeansOfType(FilterRegistrationBean.class);
		assertThat(filterRegistrations).containsKey("webMvcMetricsFilter");
		FilterRegistrationBean registration = filterRegistrations
				.get("webMvcMetricsFilter");
		assertThat(registration.getFilter()).isInstanceOf(WebMvcMetricsFilter.class);
		assertThat((Set<DispatcherType>) ReflectionTestUtils.getField(registration,
				"dispatcherTypes")).containsExactlyInAnyOrder(DispatcherType.REQUEST,
						DispatcherType.ASYNC);
	}

	@Configuration(proxyBeanMethods = false)
	@ImportAutoConfiguration({ MetricsAutoConfiguration.class,
			JvmMetricsAutoConfiguration.class, LogbackMetricsAutoConfiguration.class,
			SystemMetricsAutoConfiguration.class, RabbitMetricsAutoConfiguration.class,
			CacheMetricsAutoConfiguration.class,
			DataSourcePoolMetricsAutoConfiguration.class,
			HibernateMetricsAutoConfiguration.class,
			HttpClientMetricsAutoConfiguration.class,
			WebFluxMetricsAutoConfiguration.class, WebMvcMetricsAutoConfiguration.class,
			JacksonAutoConfiguration.class, HttpMessageConvertersAutoConfiguration.class,
			RestTemplateAutoConfiguration.class, WebMvcAutoConfiguration.class,
			DispatcherServletAutoConfiguration.class,
			ServletWebServerFactoryAutoConfiguration.class })
	@Import(PersonController.class)
	static class MetricsApp {

		@Primary
		@Bean
		public MeterRegistry registry() {
			return new SimpleMeterRegistry(SimpleConfig.DEFAULT, new MockClock());
		}

		@Bean
		public RestTemplate restTemplate(RestTemplateBuilder restTemplateBuilder) {
			return restTemplateBuilder.build();
		}

		@Bean
		public CyclicBarrier cyclicBarrier() {
			return new CyclicBarrier(2);
		}

	}

	@RestController
	static class PersonController {

		@GetMapping("/api/people")
		Set<String> personName() {
			return Collections.singleton("Jon");
		}

	}

}


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

class Views extends Application
{
    public function index()
    {
        $this->data['pagetitle'] = 'Ordered TODO List';
        $tasks = $this->tasks->all();   // get all the tasks
        $this->data['content'] = 'Ok'; // so we don't need pagebody
        $this->data['leftside'] = $this->makePrioritizedPanel($tasks);
        $this->data['rightside'] = $this->makeCategorizedPanel($tasks);
        $this->render('template_secondary');
    }

    function makePrioritizedPanel($tasks)
    {
        foreach ($tasks as $task)
        {
            if ($task->status != 2)
                $undone[] = $task;
        }
        usort($undone, "orderByPriority");
        foreach ($undone as $task)
        $task->priority = $this->priorities->get($task->priority)->name;

        foreach ($undone as $task)
        $converted[] = (array) $task;

        $parms = ['display_tasks' => $converted];

        $role = $this->session->userdata('userrole');
        $parms['completer'] = ($role == ROLE_OWNER) ? '/views/complete' : '#';
        return $this->parser->parse('by_priority', $parms, true);
    }

    function makeCategorizedPanel($tasks)
    {
        $parms = ['display_tasks' => $this->tasks->getCategorizedTasks()];

        $role = $this->session->userdata('userrole');
        $parms['completer'] = ($role == ROLE_OWNER) ? '/views/complete' : '#';

        return $this->parser->parse('by_category',$parms,true);
    }

    function complete(){
        $role = $this->session->userdata('userrole');
        if ($role != ROLE_OWNER) redirect('/work');

        foreach($this->input->post() as $key=>$value){
            if(substr($key,0,4) == 'task'){
                $taskid = substr($key,4);
                $task = $this->tasks->get($taskid);
                $task->status = 2;
                $this->tasks->update($task);
            }
        }
        $this->index();
    }
}

function orderByPriority($a, $b)
{
    if ($a->priority > $b->priority)
        return -1;
    elseif ($a->priority < $b->priority)
        return 1;
    else
        return 0;
}


package edu.cs4730.mywatchface;

import android.annotation.SuppressLint;
import android.content.res.Resources;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Rect;
import android.graphics.Typeface;
import android.content.Context;
import android.view.SurfaceHolder;

import java.time.ZonedDateTime;
import java.util.Calendar;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.core.content.ContextCompat;
import androidx.wear.watchface.CanvasType;
import androidx.wear.watchface.ComplicationSlotsManager;
import androidx.wear.watchface.DrawMode;
import androidx.wear.watchface.RenderParameters;
import androidx.wear.watchface.Renderer;
import androidx.wear.watchface.WatchFace;
import androidx.wear.watchface.WatchFaceService;
import androidx.wear.watchface.WatchFaceType;
import androidx.wear.watchface.WatchState;
import androidx.wear.watchface.style.CurrentUserStyleRepository;
import kotlin.coroutines.Continuation;

import static android.graphics.Color.*;

/**
 * this code is based off google's original example, but updated to point, it is likely
 * no longer recognizable.
 */

public class myWatchFaceService extends WatchFaceService {

    private static final String TAG = "myWatchFaceService";

    private static final Typeface BOLD_TYPEFACE =
        Typeface.create(Typeface.SANS_SERIF, Typeface.BOLD);
    private static final Typeface NORMAL_TYPEFACE =
        Typeface.create(Typeface.SANS_SERIF, Typeface.NORMAL);

    @Nullable
    @Override
    protected WatchFace createWatchFace(@NonNull SurfaceHolder surfaceHolder,
                                        @NonNull WatchState watchState,
                                        @NonNull ComplicationSlotsManager complicationSlotsManager,
                                        @NonNull CurrentUserStyleRepository currentUserStyleRepository,
                                        @NonNull Continuation<? super WatchFace> continuation) {

        return new WatchFace(
            WatchFaceType.DIGITAL,
            new myWatchFaceService.myCanvasRender(getApplicationContext(), surfaceHolder, watchState, complicationSlotsManager, currentUserStyleRepository, CanvasType.HARDWARE)
        );

    }

    class myCanvasRender extends Renderer.CanvasRenderer2<myWatchFaceService.myCanvasRender.myShareAssets> {
        static private final long FRAME_PERIOD_MS_DEFAULT = 16L;
        final boolean clearWithBackgroundTintBeforeRenderingHighlightLayer = false;

        Context context;
        SurfaceHolder surfaceHolder;
        WatchState watchState;
        ComplicationSlotsManager complicationSlotsManager;
        CurrentUserStyleRepository currentUserStyleRepository;
        int canvasType;

        Paint mBackgroundPaint;
        Paint mHourPaint;
        Paint mMinutePaint;
        Paint mSecondPaint;
        Paint mAmPmPaint;
        Paint mColonPaint;
        float mColonWidth;

        Calendar mTime;
        boolean mShouldDrawColons;
        float mXOffset;
        float mYOffset;
        String mAmString;
        String mPmString;
        int mInteractiveBackgroundColor = Color.BLACK;//parseColor("black");
        int mInteractiveHourDigitsColor = parseColor("white");
        int mInteractiveMinuteDigitsColor = parseColor("white");
        int mInteractiveSecondDigitsColor = parseColor("gray");
        boolean mAmbient;

        static final String COLON_STRING = ":";

        @Override
        public void render(@NonNull Canvas canvas, @NonNull Rect bounds, @NonNull ZonedDateTime zonedDateTime, @NonNull myWatchFaceService.myCanvasRender.myShareAssets myShareAssets) {

            RenderParameters renderParameters = getRenderParameters();
            mAmbient = renderParameters.getDrawMode() == DrawMode.AMBIENT;
            // Calendar cal = new Calendar(getSystemTimeProvider().getSystemTimeMillis());
            mTime = Calendar.getInstance();

            /* draw your watch face */

            // Show colons for the first half of each second so the colons blink on when the time
            // updates.
            mShouldDrawColons = (System.currentTimeMillis() % 1000) < 500;

            // Draw the background.
            canvas.drawRect(0, 0, bounds.width(), bounds.height(), mBackgroundPaint);

            // Draw the hours.
            float x = mXOffset;
            String hourString = String.valueOf(convertTo12Hour(mTime.get(Calendar.HOUR)));
            canvas.drawText(hourString, x, mYOffset, mHourPaint);
            x += mHourPaint.measureText(hourString);

            // In ambient and mute modes, always draw the first colon. Otherwise, draw the
            // first colon for the first half of each second.
            if (mAmbient || mShouldDrawColons) {
                canvas.drawText(COLON_STRING, x, mYOffset, mColonPaint);
            }
            x += mColonWidth;

            // Draw the minutes.
            String minuteString = formatTwoDigitNumber(mTime.get(Calendar.MINUTE));
            canvas.drawText(minuteString, x, mYOffset, mMinutePaint);
            x += mMinutePaint.measureText(minuteString);

            // In ambient and mute modes, draw AM/PM. Otherwise, draw a second blinking
            // colon followed by the seconds.
            if (mAmbient) {
                x += mColonWidth;
                canvas.drawText(getAmPmString(mTime.get(Calendar.HOUR)), x, mYOffset, mAmPmPaint);
            } else {
                if (mShouldDrawColons) {
                    canvas.drawText(COLON_STRING, x, mYOffset, mColonPaint);
                }
                x += mColonWidth;
                canvas.drawText(formatTwoDigitNumber(mTime.get(Calendar.SECOND)), x, mYOffset,
                    mSecondPaint);

            }
        }

        @Override
        public void renderHighlightLayer(@NonNull Canvas canvas, @NonNull Rect rect, @NonNull ZonedDateTime zonedDateTime, @NonNull myShareAssets myShareAssets) {
            ///what does this do?? no documentation as to it use.

        }

        class myShareAssets implements SharedAssets {
            @Override
            public void onDestroy() {

            }

        }

        @Nullable
        @Override
        public myWatchFaceService.myCanvasRender.myShareAssets createSharedAssets(@NonNull Continuation completion) {
            return new myWatchFaceService.myCanvasRender.myShareAssets();
        }

        private Paint createTextPaint(int defaultInteractiveColor) {
            return createTextPaint(defaultInteractiveColor, NORMAL_TYPEFACE);
        }

        private Paint createTextPaint(int defaultInteractiveColor, Typeface typeface) {
            Paint paint = new Paint();
            paint.setColor(defaultInteractiveColor);
            paint.setTypeface(typeface);
            paint.setAntiAlias(true);
            return paint;
        }

        @SuppressLint("DefaultLocale")
        private String formatTwoDigitNumber(int hour) {
            return String.format("%02d", hour);
        }

        private int convertTo12Hour(int hour) {
            int result = hour % 12;
            return (result == 0) ? 12 : result;
        }

        private String getAmPmString(int hour) {
            return (hour < 12) ? mAmString : mPmString;
        }

        public myCanvasRender(@NonNull Context mcontext, @NonNull SurfaceHolder msurfaceHolder, @NonNull WatchState mwatchState, @NonNull ComplicationSlotsManager mcomplicationSlotsManager, @NonNull final CurrentUserStyleRepository mcurrentUserStyleRepository, int mcanvasType) {
            super(msurfaceHolder, mcurrentUserStyleRepository, mwatchState, mcanvasType, FRAME_PERIOD_MS_DEFAULT, false);

            context = mcontext;
            surfaceHolder = msurfaceHolder;
            watchState = mwatchState;
            complicationSlotsManager = mcomplicationSlotsManager;
            currentUserStyleRepository = mcurrentUserStyleRepository;
            canvasType = mcanvasType;

            //setup initial Paint colors.
            mBackgroundPaint = new Paint();
            mBackgroundPaint.setColor(Color.BLACK);
            mBackgroundPaint.setAntiAlias(true);

            Resources resources = myWatchFaceService.this.getResources();
            //setup variables.
            mYOffset = resources.getDimension(R.dimen.digital_y_offset);
            mAmString = resources.getString(R.string.digital_am);
            mPmString = resources.getString(R.string.digital_pm);

            mBackgroundPaint = new Paint();
            mBackgroundPaint.setColor(mInteractiveBackgroundColor);
            mHourPaint = createTextPaint(mInteractiveHourDigitsColor, BOLD_TYPEFACE);
            mMinutePaint = createTextPaint(mInteractiveMinuteDigitsColor);
            mSecondPaint = createTextPaint(mInteractiveSecondDigitsColor);
            mAmPmPaint = createTextPaint(ContextCompat.getColor(getApplicationContext(), R.color.digital_am_pm));
            mColonPaint = createTextPaint(ContextCompat.getColor(getApplicationContext(), R.color.digital_colons));

            surfaceHolder.getSurfaceFrame();

            boolean isRound = true;  //how determine it's round or not?
            mXOffset = resources.getDimension(isRound ? R.dimen.digital_x_offset_round : R.dimen.digital_x_offset);
            float textSize = resources.getDimension(isRound ? R.dimen.digital_text_size_round : R.dimen.digital_text_size);
            float amPmSize = resources.getDimension(isRound ? R.dimen.digital_am_pm_size_round : R.dimen.digital_am_pm_size);

            mHourPaint.setTextSize(textSize);
            mMinutePaint.setTextSize(textSize);
            mSecondPaint.setTextSize(textSize);
            mAmPmPaint.setTextSize(amPmSize);
            mColonPaint.setTextSize(textSize);

            mColonWidth = mColonPaint.measureText(COLON_STRING);

        }
    }

}


package android.net;

/**
 * Thrown when parsing a URL fails.
 */
// See non-public class {@link WebAddress}.
public class ParseException extends RuntimeException {
    public String response;

    ParseException(String response) {
        this.response = response;
    }
}


// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.

using System;

namespace osu.Game.Database
{
    /// <summary>
    /// Represents a model manager that publishes events when <typeparamref name="TModel"/>s are added or removed.
    /// </summary>
    /// <typeparam name="TModel">The model type.</typeparam>
    public interface IModelManager<out TModel>
        where TModel : class
    {
        event Action<TModel> ItemAdded;

        event Action<TModel> ItemRemoved;
    }
}


package streaming_mysql_backup_tool
/*
* File Generated by enaml generator
* !!! Please do not edit this file !!!
*/
type BackupServer struct {

	/*Port - Descr: Port number used for listening for backup requests Default: 8081
*/
	Port interface{} `yaml:"port,omitempty"`

}


<!DOCTYPE html>

    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />

  <meta name="viewport" content="width=device-width,initial-scale=1">
  <meta http-equiv="x-ua-compatible" content="ie=edge">
  <meta name="lang:clipboard.copy" content="Copy to clipboard">
  <meta name="lang:clipboard.copied" content="Copied to clipboard">
  <meta name="lang:search.language" content="en">
  <meta name="lang:search.pipeline.stopwords" content="True">
  <meta name="lang:search.pipeline.trimmer" content="True">
  <meta name="lang:search.result.none" content="No matching documents">
  <meta name="lang:search.result.one" content="1 matching document">
  <meta name="lang:search.result.other" content="# matching documents">
  <meta name="lang:search.tokenizer" content="[\s\-]+">

    <link href="https://fonts.gstatic.com/" rel="preconnect" crossorigin>
    <link href="https://fonts.googleapis.com/css?family=Roboto+Mono:400,500,700|Roboto:300,400,400i,700&display=fallback" rel="stylesheet">

  <link rel="stylesheet" href="../_static/stylesheets/application.css"/>
  <link rel="stylesheet" href="../_static/stylesheets/application-palette.css"/>
  <link rel="stylesheet" href="../_static/stylesheets/application-fixes.css"/>

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

  <meta name="theme-color" content="#3f51b5">

    <title>statsmodels.discrete.conditional_models.ConditionalLogit.information — statsmodels</title>
  <link rel="icon" type="image/png" sizes="32x32" href="../_static/icons/favicon-32x32.png">
  <link rel="icon" type="image/png" sizes="16x16" href="../_static/icons/favicon-16x16.png">
  <link rel="manifest" href="../_static/icons/site.webmanifest">
  <link rel="mask-icon" href="../_static/icons/safari-pinned-tab.svg" color="#919191">
  <meta name="msapplication-TileColor" content="#2b5797">
  <meta name="msapplication-config" content="../_static/icons/browserconfig.xml">
  <link rel="stylesheet" href="../_static/stylesheets/examples.css">
  <link rel="stylesheet" href="../_static/stylesheets/deprecation.css">
    <link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
    <link rel="stylesheet" type="text/css" href="../_static/material.css" />
    <link rel="stylesheet" type="text/css" href="../_static/graphviz.css" />
    <link rel="stylesheet" type="text/css" href="../_static/plot_directive.css" />

    <link rel="shortcut icon" href="../_static/favicon.ico"/>
    <link rel="author" title="About these documents" href="../about.html" />
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="statsmodels.discrete.conditional_models.ConditionalLogit.initialize" href="statsmodels.discrete.conditional_models.ConditionalLogit.initialize.html" />
    <link rel="prev" title="statsmodels.discrete.conditional_models.ConditionalLogit.hessian" href="statsmodels.discrete.conditional_models.ConditionalLogit.hessian.html" />

  <svg class="md-svg">
    <defs data-children-count="0">

      <svg xmlns="http://www.w3.org/2000/svg" width="416" height="448" viewBox="0 0 416 448" id="__github"><path fill="currentColor" d="M160 304q0 10-3.125 20.5t-10.75 19T128 352t-18.125-8.5-10.75-19T96 304t3.125-20.5 10.75-19T128 256t18.125 8.5 10.75 19T160 304zm160 0q0 10-3.125 20.5t-10.75 19T288 352t-18.125-8.5-10.75-19T256 304t3.125-20.5 10.75-19T288 256t18.125 8.5 10.75 19T320 304zm40 0q0-30-17.25-51T296 232q-10.25 0-48.75 5.25Q229.5 240 208 240t-39.25-2.75Q130.75 232 120 232q-29.5 0-46.75 21T56 304q0 22 8 38.375t20.25 25.75 30.5 15 35 7.375 37.25 1.75h42q20.5 0 37.25-1.75t35-7.375 30.5-15 20.25-25.75T360 304zm56-44q0 51.75-15.25 82.75-9.5 19.25-26.375 33.25t-35.25 21.5-42.5 11.875-42.875 5.5T212 416q-19.5 0-35.5-.75t-36.875-3.125-38.125-7.5-34.25-12.875T37 371.5t-21.5-28.75Q0 312 0 260q0-59.25 34-99-6.75-20.5-6.75-42.5 0-29 12.75-54.5 27 0 47.5 9.875t47.25 30.875Q171.5 96 212 96q37 0 70 8 26.25-20.5 46.75-30.25T376 64q12.75 25.5 12.75 54.5 0 21.75-6.75 42 34 40 34 99.5z"/></svg>

    </defs>
  </svg>

  <input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer">
  <input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search">

   Skip to content

          statsmodels 0.13.5
           statsmodels.discrete.conditional_models.ConditionalLogit.information

    <form class="md-search__form" action="../search.html" method="get" name="search">
      <input type="text" class="md-search__input" name="q" placeholder="Search"
             autocapitalize="off" autocomplete="off" spellcheck="false"
             data-md-component="query" data-md-state="active">

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

            Type to start searching

      <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24" width="28" height="28">
        <use xlink:href="#__github" width="24" height="24"></use>
      </svg>

    statsmodels

User Guide

Regression with Discrete Dependent Variable

statsmodels.discrete.conditional_models.ConditionalLogit

    statsmodels 0.13.5

      <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24" width="28" height="28">
        <use xlink:href="#__github" width="24" height="24"></use>
      </svg>

    statsmodels

      Installing statsmodels

      Getting started

      User Guide

      Background

      Regression and Linear Models

      Linear Regression

      Generalized Linear Models

      Generalized Estimating Equations

      Generalized Additive Models (GAM)

      Robust Linear Models

      Linear Mixed Effects Models

      Regression with Discrete Dependent Variable

      Generalized Linear Mixed Effects Models

      ANOVA

      Other Models othermod

      Time Series Analysis

      Other Models

      Statistics and Tools

      Data Sets

      Sandbox

      Examples

      API Reference

      About statsmodels

      Developer Page

      Release Notes

    Contents

statsmodels.discrete.conditional_models.ConditionalLogit.information

ConditionalLogit.information

Show Source

statsmodels.discrete.conditional_models.ConditionalLogit.information¶

ConditionalLogit.information(params)¶

Fisher information matrix of model.

Returns -1 * Hessian of the log-likelihood evaluated at params.

Parameters:

paramsndarray

The model parameters.

                   Previous  statsmodels.discrete.conditional_models.ConditionalLogit.hessian

  Next  statsmodels.discrete.conditional_models.ConditionalLogit.initialize

              © Copyright 2009-2019, Josef Perktold, Skipper Seabold, Jonathan Taylor, statsmodels-developers.

            Last updated on
              Nov 02, 2022.

            Created using
            Sphinx 5.3.0.
             and
            Material for
              Sphinx