text:
package com.spotify.heroic.metric;

import static com.spotify.heroic.common.Optionals.firstPresent;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.JsonNode;
import com.google.auto.value.AutoValue;
import com.spotify.heroic.QueryBuilder;
import com.spotify.heroic.QueryDateRange;
import com.spotify.heroic.QueryOptions;
import com.spotify.heroic.aggregation.Aggregation;
import com.spotify.heroic.aggregation.Chain;
import com.spotify.heroic.common.FeatureSet;
import com.spotify.heroic.filter.Filter;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.function.Function;
import java.util.function.Supplier;

@AutoValue
public abstract class QueryMetrics {
    public static QueryMetrics create(
        Optional<String> query,
        Optional<Aggregation> aggregation,
        Optional<String> source,
        Optional<QueryDateRange> range,
        Optional<Filter> filter,
        Optional<QueryOptions> options,
        Optional<JsonNode> clientContext
    ) {
        return legacyCreate(query, aggregation, source, range, filter, options, clientContext,
             Optional.empty(), Optional.empty(), Optional.empty(),
            Optional.empty(), false);
    }

    @JsonCreator
    public static QueryMetrics legacyCreate(
        @JsonProperty("query") Optional<String> query,
        @JsonProperty("aggregation") Optional<Aggregation> aggregation,
        @JsonProperty("source") Optional<String> source,
        @JsonProperty("range") Optional<QueryDateRange> range,
        @JsonProperty("filter") Optional<Filter> filter,
        @JsonProperty("options") Optional<QueryOptions> options,
        @JsonProperty("clientContext") Optional<JsonNode> clientContext,
        // legacy options
        @JsonProperty("aggregators") Optional<List<Aggregation>> aggregators,
        @JsonProperty("key") Optional<String> key,
        @JsonProperty("tags") Optional<Map<String, String>> tags,
        @JsonProperty("features") Optional<FeatureSet> features,
        /* ignored */ @JsonProperty("noCache") Boolean noCache
    ) {

        final Optional<Aggregation> legitAggregation = firstPresent(aggregation,
            aggregators.filter(c -> !c.isEmpty()).map(Chain::fromList));
        final Optional<MetricType> sourceMetric = source.flatMap(MetricType::fromIdentifier);

        return new AutoValue_QueryMetrics(query, legitAggregation, sourceMetric, range, filter,
            options, clientContext, key, tags, features);
    }

    @JsonProperty("query")
    public abstract Optional<String> query();
    @JsonProperty("aggregation")
    public abstract Optional<Aggregation> aggregation();
    @JsonProperty("source")
    public abstract Optional<MetricType> source();
    @JsonProperty("range")
    public abstract Optional<QueryDateRange> range();
    @JsonProperty("filter")
    public abstract Optional<Filter> filter();
    @JsonProperty("options")
    public abstract Optional<QueryOptions> options();
    @JsonProperty("clientContext")
    public abstract Optional<JsonNode> clientContext();

    /* legacy state */
    @JsonProperty("key")
    public abstract Optional<String> key();
    @JsonProperty("tags")
    public abstract Optional<Map<String, String>> tags();
    @JsonProperty("features")
    public abstract Optional<FeatureSet> features();

    public QueryBuilder toQueryBuilder(final Function<String, QueryBuilder> stringToQuery) {
        final Supplier<? extends QueryBuilder> supplier = () -> new QueryBuilder()
            .key(key())
            .tags(tags())
            .filter(filter())
            .range(range())
            .aggregation(aggregation())
            .source(source())
            .options(options())
            .clientContext(clientContext());

        return query()
            .map(stringToQuery)
            .orElseGet(supplier)
            .rangeIfAbsent(range())
            .optionsIfAbsent(options())
            .features(features());
    }
}

redpajama_set_name: RedPajamaGithub


text:
package net.graphical.model.causality.learning.gies;

import net.graphical.model.causality.graph.model.intervention.InterventionFamily;
import net.graphical.model.causality.learning.gies.operation.Deletion;
import net.graphical.model.causality.scoreFunction.ScoreFunction;
import net.graphical.model.causality.graph.model.AdjImpl.ChainGraph;
import net.graphical.model.causality.graph.model.AdjImpl.Vertex;
import net.graphical.model.causality.graph.model.Node;
import net.graphical.model.causality.learning.gies.operation.Operation;

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

/**
 * Created by sli on 10/28/15.
 *
 * Algorithm 3
 */
public class StepBackward extends Step {
    public StepBackward(ChainGraph essentialGraph, ScoreFunction scoreFunction, InterventionFamily interventionFamily) {
        super(essentialGraph, scoreFunction, interventionFamily);
    }

    public void perturbEssentialGraph() throws Exception {

        Operation optimalOperation = null;

        for(Node v : essentialGraph.getNodes()){
            for(Node u : getNeigborOrParent(v) ){
                Operation deletion = new Deletion(interventionFamily, essentialGraph, u, v, scoreFunction).propose();
                if(optimalOperation == null || deletion.getMaxScoreChange() > optimalOperation.getMaxScoreChange()){
                    optimalOperation = deletion;
                }

            }
        }

        if(optimalOperation != null && optimalOperation.getMaxScoreChange() > SCORE_DIFF_THRESHOLD){
            optimalOperation.commit();
        }

    }

    private List<Node> getNeigborOrParent(Node node){
        Vertex v = essentialGraph.getVertexByNumber(node.getNumber());
        List<Node> np = new ArrayList<>();
        np.addAll(v.getNeighbors());
        np.addAll(v.getParents());
        return np;
    }
}


text:
var Product = Backbone.Model.extend({});

var Products = Backbone.Collection.extend({
  model: Product,
  //url: "/products/listProducts"

  #{if url != null}
  	url: "${url}",
  #{/if}
  #{else}
  	url: "@{list()}",
  #{/else}

});

var products = new Products();

var columns = [
               /*{
    name: "id", // The key of the model attribute
    label: "ID", // The name to display in the header
    editable: false, // By default every cell in a column is editable, but *ID* shouldn't be
    // Defines a cell type, and ID is displayed as an integer without the ',' separating 1000s.
    cell: Backgrid.IntegerCell.extend({
      orderSeparator: ''
    })
  },
  {
    name: "description",
    label: "Description",
    cell: "string"
  }, {
    name: "amount",
    label: "Amount",
    cell: "integer"
  }*/

  #{list items:tableFields, as: 'field'}
  {
		 name: "${field.name}",
	     label: "&{field.name}",
	     #{if field.formatter !=null}
	     	formatter: "${field.formatter}",
	     #{/if}
	     #{if field.readOnly}
		  	editable: ${false},
		 #{/if}
		 cell: ${field.cell}
   },
   #{/list}

  ];

// Initialize a new Grid instance
var grid = new Backgrid.Grid({
  columns: columns,
  collection: products
});

$( document ).ready(function() {

// Render the grid and attach the root to your HTML document
$("#grid").append(grid.render().el);

// Fetch some countries from the url
products.fetch({reset: true});

});


text:
var Deepstream = require( '../../src/deepstream.io' );

describe( 'parses low level authData to simpler output', function() {
	var message;
	var parsedMessage;

	beforeEach( function() {
		message = {
			topic: 'R',
			action: 'CR',
			data: [ 'RecordName', 1, 'data' ]
		};

		parsedMessage = {
			isRecord: false,
			isEvent: false,
			isRPC: false,

			isCreate: false,
			isRead: false,
			isChange: false,
			isDelete: false,

			name: 'RecordName',
			path: undefined,
			data: 'data'
		};
	});

	it( 'parses RPC message correctly', function() {
		message.topic = 'P';
		message.action = '';

		parsedMessage.isRPC = true;

		expect( Deepstream.readMessage( message ) ).toEqual( parsedMessage );
	});

	it( 'parses Event message correctly', function() {
		message.topic = 'E';
		message.action = '';

		parsedMessage.isEvent = true;

		expect( Deepstream.readMessage( message ) ).toEqual( parsedMessage );
	});

	describe( 'when a record is recieved', function() {
		beforeEach( function() {
			parsedMessage.isRecord = true;
		});

		it( 'parses read/create message correctly', function() {
			message.action = 'CR';
			message.data = [ 'RecordName', 1, 'data' ];

			parsedMessage.isCreate = true;
			parsedMessage.isRead = true;

			expect( Deepstream.readMessage( message ) ).toEqual( parsedMessage );
		});

		it( 'parses patch message correctly', function() {
			message.action = 'P';
			message.data = [ 'RecordName', 1, 'path', 'data' ];

			parsedMessage.isChange = true;
			parsedMessage.path = 'path';
			parsedMessage.data = 'data';

			expect( Deepstream.readMessage( message ) ).toEqual( parsedMessage );
		});

		it( 'returns record gets changed via update', function() {
			message.action = 'U';
			message.data = [ 'RecordName', 1, 'data' ];

			parsedMessage.isChange = true;
			parsedMessage.data = 'data';

			expect( Deepstream.readMessage( message ) ).toEqual( parsedMessage );
		});

		it( 'returns record gets deleted', function() {
			message.action = 'D';
			parsedMessage.isDelete = true;

			expect( Deepstream.readMessage( message ) ).toEqual( parsedMessage );
		});
	});
});


text:
// ****************************************************************
// Change the define for RX_HARDWARE and modify the dummy routines
// in the prototype section to fit your needs.
// The routines in wse_sdrxx.c can serve as a starting point.
#define RX_HARDWARE 0
// ****************************************************************
//
// Here are the instructions for setting up Linrad so that Slave Instances of Linrad track the Master Linrad.
// The Master and Slave instances of Linrad are compiled differently, and of course must exist in separate directories.
//
// The software as written assumes that the master and slave are on the same computer.  If they are not, then you must
// set up a drive from one of the computers as a Network Drive on the other, so that it can be referenced with a drive
// letter such as C: or D: or E: or whatever from the remote computer.  I have used the program with a Network Drive,
// so I know that using a Network Drive presents no issues with this software.
//
// There are two versions of the Master software, one in the directory /lir04-05_Master, and one in the directory
// /lir04-05_Master_Immediate_QSY.
//
// The software in the directory ...Master works like this:
// 1.  When you type "U" on the master instance of Linrad, it will write the QSO frequency to a file.
// 2.  The slave instance of Linrad will read that file and QSY to that frequency.
//
// The software in the directory ...Master_Immediate_QSY works like this:
// 1.  When you change frequency, the master instance of Linrad immediately writes the QSO frequency to a file.
// 2.  The slave instance of Linrad will read that file and QSY to that frequency.
//
// The Master Linrad instance writes file containing the QSO frequency information to the directory named
// \lin2ft\ on the disk it is on.
// The file name of the file with the QSO frequency information is
// \Radio0file
// So the complete address of the QSO frequency information file is \lin2ft\Radio0file.
//
//
// The Slave Linrad instance looks in the Slave Linrad directory for the file freq_location.txt
// That file tells the Slave Linrad where to look for the QSO frequency information file.
// This is necessary and not hardwired into the software because the Disk on which this file
// is located will be different on different systems.  For example, on my system the QSO frequency information file
// in on disk F.  So the file freq_location.txt on my system contains the single line:
// F:\\lin2ft\\Radio0file
// indicating that the QSO information file has the address F:\lin2ft\Radio0file.  However, on your system the same file
// may be located on disk C:, in which case the frequency information file needs to contain the line:
// C:\\lin2ft\Radio0file
//
// Note that because of the way the C language handles the "\" character, you need to place two backslashes for every backslash needed.
// Thus F:\\lin2ft\\Radio0file must be written into the frequency information file instead of F:\lin2ft\Radio0file
//
// The Master Linrad file is compiled using the file users_w3sz_hb9dri.C and renaming it wusers_hwaredriver.c
// if using windows or users_hwaredriver.c if using Linux.
// THE EXTRA_W3SZ FILE IS NOT USED FOR THE MASTER.
// Then "configure" and "make" and Master Linrad should be ready to go.
//
// The Slave Linrad is compiled using the file extra)w3sz_hb9dri.c and renaming it to users_extra.c
// THE USERS_W3SZ_HB9DRI.C FILE IS NOT USED FOR THE SLAVE.
// Then "configure" and "make" and Slave Linrad should be ready to go.
//
// I attached a zip file of the master files and a zip file of the slave files.  Just unzip them and proceed as outlined above.
// Make sure to create a directory \lin2ft\ on the drive on which the Master Linrad is placed.
// Make sure to create the freq_location.txt file in each Slave Linrad directory, and write the location of the
// QSO frequency file in that file as outlined above.
//
// When running, the command window on the Slave instance of Linrad will first indicate that it found the QSO frequency file
// [assuming that it did find it], and then display frequency information with each "U" QSY (or immediately,
// if you are using the software version from the directory ...Master_Immediate_QSY.
// The information is:
// [a] QSO frequency, [b] number of Hz from the bottom of the window, [c] number of Hz from the center frequency, [[d] the
// result of a calculation that should always equal the QSO frequency, [a].
// [b] - [a] should always equal 48000.
// Thus this line provides 2 internal checks of the data.
// Below are two examples of the output:
//
// F:\lir04-05_Slave>linrad
// Found F:\\lin2ft\\Radio0file
//  144170567 93567 45567  144170567
//  144159692 82692 34692  144159692
//  144088255 11255 -36745  144088255
//
// F:\lir04-05_Slave>linrad
// Found F:\\lin2ft\\Radio0file
//  144088255 11255 -36745  144088255
//  144134755 57755 9755  144134755
//  144098192 21192 -26808  144098192
//
// Let me know if there are any problems, if you need further info, or if you want me to change the program from what is currently written.
//
//
// Roger Rehr
// 1 March, 2015
//***********************************************

#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <fcntl.h>
#include <stdlib.h>
//added August 2007
#include <time.h>

#include "sigdef.h" // Remove this define in linrad-03.01 and later.
// The definition of baseb_reset_counter is moved from sigdef.h to uidef.h
#include "screendef.h" //w3sz

extern int w3sz_offset_hz;  //w3sz offset equal to ug.par2 to be used elsewhere in program
extern int w3sz_offset_hz_old;  //w3sz
extern int w3sz_users_flag;//w3sz

double old_hwfreq;

typedef struct {
int ytop;
int ybottom;
int xleft;
int xright;
float par1;
float par2;
} UG_PARMS;

#define UG_TOP 0
#define UG_BOTTOM 1
#define UG_LEFT 2
#define UG_RIGHT 3
#define UG_INCREASE_PAR1 4
#define UG_DECREASE_PAR1 5
#define UG_DO_WHATEVER 6
#define MAX_UGBUTT 7

UG_PARMS ug;
BUTTONS ugbutt[MAX_UGBUTT];

int ug_old_y1;
int ug_old_y2;
int ug_old_x1;
int ug_old_x2;
int users_graph_scro;
void make_users_control_graph(void);

void userdefined_u(void)
{
// This routine is called when the 'U' key is pressed
// It then sends frequency information to Radio0 via
// a file at \lin2ft\Radio0file.   Unlike the original
// version of this add-on, it does not mute Linrad.
// This routine written by w3sz

char ft2[80]="";
char bb[80]="";

float freqpre;
char ft[80]="";
char zro[80]="";
char zr1[80]="";
char ffin[11]="";

float freq;
float lofreq;

time_t now;
int l_time;
char *ft1000file[19]={"\\lin2ft\\Radio0file"};

l_time = time(&now);

FILE *Fp1;

strcat(bb,"bb");
strcat(zro,"0");
strcat(zr1,"0");

//freqpre=fg.passband_center;
//freqpre=freqpre*10E6;
//freq=(mix1_fq_mid[fftx_nx]);
//freq=freq*10;
//freq=freq+freqpre-960000;
//freq=freq*100;

/*
The info in mix1_fq_mid[fftx_nx] is only valid when the AFC has
locked to a signal. In case AFC is deselected or the AFC failed
the data may be incorrect. The number 480000 is ui.sampling_speed/2
and it should be applied only in I/Q mode.
*/

freq= hwfreq*1000000.0 ;
freqpre=1000.0*ug.par2;
/*

This should be correct always. Linrad looks at the flags and selects
the frequency actually in use for conversion to the baseband and adds
the bfo offset 'bg.bfo_freq' in ssb mode.

Look at the routine 'frequency_readout' in baseb_graph.c. for
details.

*/

// If transverter is used, set par1 to LO frequency and
//  subtract LO value based on user_parameter 'par1'
// par1 is multiplied by 10**8 to give IF freq in desired units
//if there is no transverter, set par1 to zero
lofreq= ug.par1 * 10E8;
freq=freq-lofreq;

//Add or subtract to put Linrad and FT1000 on same frequency
// 1,000,000 equals 1 kHz; freqpre = 1000*ug.par2, so
// ug.par2 is entered directly in Hz for correction
freq=freq+freqpre;

//test by sending corrected output to file for review

/*
FILE *Fp2;
Fp2=fopen("aatestfile","a+");
fprintf(Fp2,"%f\n",freq);
fclose(Fp2);
*/

// Round up to compensate for truncation
freq=freq+5000;
freq=freq*10;
// Add leading zeroes as necessary for proper format

sprintf(ft,"%11f",freq);

if ((freq < 10E10) && (freq >=10E9))
{
strcat(zro,zro);
strcat(zro,ft);
strncpy(ft2,zro,12);
}
else if (freq < 10E9)
{
strcat(zro,zro);
strcat(zro,zr1);
strcat(zro,ft);
strncpy(ft2,zro,12);
}

else
{
strcat(zro,ft);
strncpy(ft2,zro,12);
}

strncpy(ffin,ft2,10);

Fp1=fopen(*ft1000file,"w");
//fprintf(Fp1,ffin);
fprintf(Fp1,"%s\n%i\n",ffin,l_time);
fclose(Fp1);

FILE *Fp2;
char *aatestfile[47]={"aatestfile"};

Fp2=fopen(*aatestfile,"w");
fprintf(Fp2,"%s\n%i\n",ffin,l_time);
fclose(Fp2);

//mix1_selfreq[0]=-1;
//lir_empty_da_device_buffer();
//baseb_reset_counter++;
}

void users_eme(void)
{
// Called each time moon position is updated.
// data in degrees is available in:
// float moon_az;
// float moon_el;
}

void userdefined_q(void)
{
// This routine is called when the 'Q' key is pressed
// It then sends frequency information to Radio1 via
// a file at \lin2ft\Radio1file.   Unlike the original
// version of this add-on, it does not mute Linrad.
// This routine written by w3sz
char ft2[80]="";
char bb[80]="";

float freqpre;
char ft[80]="";
char zro[80]="";
char zr1[80]="";
char ffin[11]="";

float freq;
float lofreq;

time_t now;
int l_time;
char *ft1000file[19]={"\\lin2ft\\Radio1file"};

l_time = time(&now);

FILE *Fp1;

strcat(bb,"bb");
strcat(zro,"0");
strcat(zr1,"0");

//freqpre=fg.passband_center;
//freqpre=freqpre*10E6;
//freq=(mix1_fq_mid[fftx_nx]);
//freq=freq*10;
//freq=freq+freqpre-960000;
//freq=freq*100;

/*
The info in mix1_fq_mid[fftx_nx] is only valid when the AFC has
locked to a signal. In case AFC is deselected or the AFC failed
the data may be incorrect. The number 480000 is ui.sampling_speed/2
and it should be applied only in I/Q mode.
*/

freq= hwfreq*1000000.0 ;
freqpre=1000.0*ug.par2;
/*

This should be correct always. Linrad looks at the flags and selects
the frequency actually in use for conversion to the baseband and adds
the bfo offset 'bg.bfo_freq' in ssb mode.

Look at the routine 'frequency_readout' in baseb_graph.c. for
details.

*/

// If transverter is used, set par1 to LO frequency and
//  subtract LO value based on user_parameter 'par1'
// par1 is multiplied by 10**8 to give IF freq in desired units
//if there is no transverter, set par1 to zero
lofreq= ug.par1 * 10E8;
freq=freq-lofreq;

//Add or subtract to put Linrad and FT1000 on same frequency
// 1,000,000 equals 1 kHz; freqpre = 1000*ug.par2, so
// ug.par2 is entered directly in Hz for correction
freq=freq+freqpre;

//test by sending corrected output to file for review

/*
FILE *Fp2;
Fp2=fopen("aatestfile","a+");
fprintf(Fp2,"%f\n",freq);
fclose(Fp2);
*/

// Round up to compensate for truncation
freq=freq+5000;
freq=freq*10;
// Add leading zeroes as necessary for proper format

sprintf(ft,"%11f",freq);

if ((freq < 10E10) && (freq >=10E9))
{
strcat(zro,zro);
strcat(zro,ft);
strncpy(ft2,zro,12);
}
else if (freq < 10E9)
{
strcat(zro,zro);
strcat(zro,zr1);
strcat(zro,ft);
strncpy(ft2,zro,12);
}

else
{
strcat(zro,ft);
strncpy(ft2,zro,12);
}

strncpy(ffin,ft2,10);

Fp1=fopen(*ft1000file,"w");
//fprintf(Fp1,ffin);
fprintf(Fp1,"%s\n%i\n",ffin,l_time);
fclose(Fp1);

FILE *Fp2;
char *aatestfile[47]={"aatestfile"};

Fp2=fopen(*aatestfile,"w");
fprintf(Fp2,"%s\n%i\n",ffin,l_time);
fclose(Fp2);

//mix1_selfreq[0]=-1;
//lir_empty_da_device_buffer();
//baseb_reset_counter++;
return;
}

//end of w3sz routine

//    ************ PROTOTYPE ROUTINES FOR USER WINDOWS  ***************
// User defined windows to allow mouse control.
// In case several windows are desired, give them different
// numbers (64 and above) and use scro[m].no to decide what to do
// in your mouse_on_users_graph routine.

#define USERS_GRAPH_TYPE1 64

// Define your parameters in this structure.
// Save it to a file and recover it from init_users_control_window(void)

void init_users_control_window(void)
{
char *w3szfile[10]={"aajunkfile"};
FILE *Fp;
switch (rx_mode)
  {

case MODE_WCW:
	*w3szfile="aawcw_file";
	break;
  case MODE_HSMS:
   	*w3szfile="aahsmsfile";
  case MODE_QRSS:
 	*w3szfile="aaqrssfile";
  break;

  case MODE_NCW:
 	*w3szfile="aancw_file";
  case MODE_SSB:
	*w3szfile="aassb_file";
 break;

  case MODE_FM:
 	*w3szfile="aafm__file";
  case MODE_AM:
 	*w3szfile="aaam__file";
  case MODE_TXTEST:
 	*w3szfile="aatxtefile";
  case MODE_RX_ADTEST:
 	*w3szfile="aarxadfile";
  case MODE_TUNE:
 	*w3szfile="aatunefile";

  break;
  }
Fp=fopen(*w3szfile,"r");
if(Fp == NULL)
  {
// Set initial values if there is no file.
  ug.xleft=0;
  ug.ytop=0;
  ug.par1=0.0;
  ug.par2=0.0;
  }
else
  {
  fscanf(Fp,"%d%d%f%f",&ug.xleft,&ug.ytop,&ug.par1,&ug.par2);
  fclose(Fp);
  }
ug.xright=ug.xleft+25*text_width;
ug.ybottom=ug.ytop+3.5*text_height;
if (ug.par2 > -10000 && ug.par2<=10000)//w3sz
{
w3sz_offset_hz=(int)ug.par2; //w3sz
}
else//w3sz
{
w3sz_offset_hz = 0;//w3sz
}
w3sz_users_flag=1;//w3sz

users_graph_scro=no_of_scro;
make_users_control_graph();
no_of_scro++;
if(no_of_scro >= MAX_SCRO)lirerr(89);
}

void users_init_mode(void)
{
// A switch statement can be used to do different things depending on
// the processing mode.
switch (rx_mode)
  {
  case MODE_WCW:
// Open a window to allow mouse control of your own things
	init_users_control_window();
	break;
  case MODE_HSMS:
  case MODE_QRSS:
  break;

  case MODE_NCW:
  case MODE_SSB:
// Open a window to allow mouse control of your own things
  	init_users_control_window();
  break;

  case MODE_FM:
  case MODE_AM:
  case MODE_TXTEST:
  case MODE_RX_ADTEST:
  case MODE_TUNE:
  break;
  }
}

void show_user_parms(void)
{
char s[80];

char *w3szfile[10]={"aajunkfile"};

// Show the user parameters on screen
// and issue hardware commands if required.
// Use hware_flag to direct calls to control_hware() when cpu time
// is available in case whatever you want to do takes too much time
// to be done immediately.
// Note that mouse control is done in the narrowband processing thread
// and that you can not use lir_sleep to wait for hardware response here.
hide_mouse(ug.xleft, ug.xright,ug.ytop,ug.ybottom);
sprintf(s,"LO(MHz) %10.6f ",ug.par1);
lir_pixwrite(ug.xleft+3*text_width,ug.ytop+text_height,s);
sprintf(s,"SH (Hz) %10.1f ",ug.par2);
lir_pixwrite(ug.xleft+3*text_width,ug.ytop+2*text_height,s);
if (ug.par2 >= -10000 && ug.par2<=10000)//w3sz
{
w3sz_offset_hz=(int)ug.par2; //w3sz
}
else//w3sz
{
w3sz_offset_hz = 0;//w3sz
}
FILE *Fp;

switch (rx_mode)
  {

case MODE_WCW:
	*w3szfile="aawcw_file";
	break;
  case MODE_HSMS:
   	*w3szfile="aahsmsfile";
  case MODE_QRSS:
 	*w3szfile="aaqrssfile";
  break;

  case MODE_NCW:
 	*w3szfile="aancw_file";
  case MODE_SSB:
	*w3szfile="aassb_file";
 break;

  case MODE_FM:
 	*w3szfile="aafm__file";
  case MODE_AM:
 	*w3szfile="aaam__file";
  case MODE_TXTEST:
 	*w3szfile="aatxtefile";
  case MODE_RX_ADTEST:
 	*w3szfile="aarxadfile";
  case MODE_TUNE:
 	*w3szfile="aatunefile";

  break;
  }

Fp=fopen(*w3szfile,"w");

fprintf(Fp,"%d\n%d\n%f\n%f\n",ug.xleft,ug.ytop,ug.par1,ug.par2);
fclose(Fp);

}

void mouse_continue_users_graph(void)
{
switch (mouse_active_flag-1)
  {
// Move border lines immediately.
// for other functions, wait until button is released.
// Look in freq_control.c how to move a fixed size window.
  case UG_TOP:
  graph_borders((void*)&ug,0);
  ug.ytop=mouse_y;
  graph_borders((void*)&ug,15);
  break;

  case UG_BOTTOM:
  graph_borders((void*)&ug,0);
  ug.ybottom=mouse_y;
  graph_borders((void*)&ug,15);
  break;

  case UG_LEFT:
  graph_borders((void*)&ug,0);
  ug.xleft=mouse_x;
  graph_borders((void*)&ug,15);
  break;

  case UG_RIGHT:
  graph_borders((void*)&ug,0);
  ug.xright=mouse_x;
  graph_borders((void*)&ug,15);
  break;

  default:
  goto await_release;
  }
if(leftpressed == BUTTON_RELEASED)goto finish;
return;
await_release:;
if(leftpressed != BUTTON_RELEASED) return;
// Assuming the user wants to control hardware we
// allow commands only when data is not over the network.
if( (ui.network_flag&NET_RX_INPUT) == 0)
  {
  switch (mouse_active_flag-1)
    {
    case UG_INCREASE_PAR1:
    ug.par1++;
    break;

    case UG_DECREASE_PAR1:
    ug.par1--;
    break;

    case UG_DO_WHATEVER:
// Issue hardware commands or fill the screen
// with whatever you like.
// Use hware_flag to direct calls to control_hware() when cpu time
// is available in case whatever you want to do takes too much time
// to be done immediately.
      settextcolor(7);
    break;

    default:
// This should never happen.
    lirerr(211053);
    break;
    }
  }
finish:;
hide_mouse(ug_old_x1,ug_old_x2,ug_old_y1,ug_old_y2);
leftpressed=BUTTON_IDLE;
mouse_active_flag=0;
graph_borders((void*)&ug,0);
lir_fillbox(ug_old_x1,ug_old_y1,ug_old_x2-ug_old_x1,ug_old_y2-ug_old_y1,0);
make_users_control_graph();
}

void new_user_par1(void)
{
ug.par1=numinput_float_data;
pause_thread(THREAD_SCREEN);
show_user_parms();
resume_thread(THREAD_SCREEN);
}

void new_user_par2(void)
{
ug.par2=numinput_float_data;
pause_thread(THREAD_SCREEN);
show_user_parms();
resume_thread(THREAD_SCREEN);
}

void mouse_on_users_graph(void)
{
int event_no;
// First find out is we are on a button or border line.
for(event_no=0; event_no<MAX_UGBUTT; event_no++)
  {
  if( ugbutt[event_no].x1 <= mouse_x &&
      ugbutt[event_no].x2 >= mouse_x &&
      ugbutt[event_no].y1 <= mouse_y &&
      ugbutt[event_no].y2 >= mouse_y)
    {
    ug_old_y1=ug.ytop;
    ug_old_y2=ug.ybottom;
    ug_old_x1=ug.xleft;
    ug_old_x2=ug.xright;
    mouse_active_flag=1+event_no;
    current_mouse_activity=mouse_continue_users_graph;
    return;
    }
  }
// Not button or border.
// Prompt the user for par1 or par2 depending on whether the mouse is
// in the upper or the lower part of the window.
mouse_active_flag=1;
numinput_xpix=ug.xleft+11*text_width;
if(mouse_x > ug.xleft+2*text_width && mouse_x<ug.xright-2*text_width)
  {
  if(mouse_y > (ug.ytop+ug.ybottom)/2)
    {
    numinput_ypix=ug.ytop+2*text_height;
    numinput_chars=12;
    erase_numinput_txt();
    numinput_flag=FIXED_FLOAT_PARM;
    par_from_keyboard_routine=new_user_par2;
    }
  else
    {
    numinput_ypix=ug.ytop+text_height;
    numinput_chars=12;
    erase_numinput_txt();
    numinput_flag=FIXED_FLOAT_PARM;
    par_from_keyboard_routine=new_user_par1;
    }
   } //added }
  else
    {
// If we did not select a numeric input by setting numinput_flag
// we have to set mouse_active flag.
// Set the routine to mouse_nothing, we just want to
// set flags when the mouse button is released.
    current_mouse_activity=mouse_nothing;
    mouse_active_flag=1;
    }
// removed }
}

void make_users_control_graph(void)
{
pause_thread(THREAD_SCREEN);
// Set a negative number here.
// In case several windows are desired, give them different
// negative numbers and use scro[m].no to decide what to do
// in your mouse_on_users_graph routine.
scro[users_graph_scro].no=USERS_GRAPH_TYPE1;
// These are the coordinates of the border lines.
scro[users_graph_scro].x1=ug.xleft;
scro[users_graph_scro].x2=ug.xright;
scro[users_graph_scro].y1=ug.ytop;
scro[users_graph_scro].y2=ug.ybottom;
// Each border line is treated as a button.
// That is for the mouse to get hold of them so the window can be moved.
ugbutt[UG_LEFT].x1=ug.xleft;
ugbutt[UG_LEFT].x2=ug.xleft;
ugbutt[UG_LEFT].y1=ug.ytop;
ugbutt[UG_LEFT].y2=ug.ybottom;
ugbutt[UG_RIGHT].x1=ug.xright;
ugbutt[UG_RIGHT].x2=ug.xright;
ugbutt[UG_RIGHT].y1=ug.ytop;
ugbutt[UG_RIGHT].y2=ug.ybottom;
ugbutt[UG_TOP].x1=ug.xleft;
ugbutt[UG_TOP].x2=ug.xright;
ugbutt[UG_TOP].y1=ug.ytop;
ugbutt[UG_TOP].y2=ug.ytop;
ugbutt[UG_BOTTOM].x1=ug.xleft;
ugbutt[UG_BOTTOM].x2=ug.xright;
ugbutt[UG_BOTTOM].y1=ug.ybottom;
ugbutt[UG_BOTTOM].y2=ug.ybottom;
// Draw the border lines
graph_borders((void*)&ug,7);
settextcolor(7);
make_button(ug.xleft+text_width,ug.ybottom-3*text_height/2-2,
                                         ugbutt,UG_DECREASE_PAR1,25);
make_button(ug.xright-text_width,ug.ybottom-3*text_height/2-2,
                                     ugbutt,UG_INCREASE_PAR1,24);
make_button(ug.xleft+text_width,ug.ybottom-text_height/2-2,
                                         ugbutt,UG_DO_WHATEVER,'A');
show_user_parms();
resume_thread(THREAD_SCREEN);
}

void users_close_devices(void)
{
// WSE units do not use the parallel port.
}

void users_open_devices(void)
{
}

void users_set_band_no(void)
{
// See users_tr.c
}

void update_users_rx_frequency(void)
{
// This routine is called from the screen thread.
// When Linrad changes QSO frequency, it immediately
// sends the new frequency to a file located at
// \lin2ft\Radio0file that can be read by another
// program, or a slave version of Linrad.
// This version does NOT mute Linrad after frequency change.
// This routine written by w3sz
if(fabs(hwfreq-old_hwfreq) > 0.001)
  {

char ft2[80]="";
char bb[80]="";

float freqpre;
char ft[80]="";
char zro[80]="";
char zr1[80]="";
char ffin[11]="";

float freq;
float lofreq;

time_t now;
int l_time;
char *ft1000file[19]={"\\lin2ft\\Radio0file"};

l_time = time(&now);

FILE *Fp1;

strcat(bb,"bb");
strcat(zro,"0");
strcat(zr1,"0");

//freqpre=fg.passband_center;
//freqpre=freqpre*10E6;
//freq=(mix1_fq_mid[fftx_nx]);
//freq=freq*10;
//freq=freq+freqpre-960000;
//freq=freq*100;

/*
The info in mix1_fq_mid[fftx_nx] is only valid when the AFC has
locked to a signal. In case AFC is deselected or the AFC failed
the data may be incorrect. The number 480000 is ui.sampling_speed/2
and it should be applied only in I/Q mode.
*/

freq= hwfreq*1000000.0 ;
freqpre=1000.0*ug.par2;
/*

This should be correct always. Linrad looks at the flags and selects
the frequency actually in use for conversion to the baseband and adds
the bfo offset 'bg.bfo_freq' in ssb mode.

Look at the routine 'frequency_readout' in baseb_graph.c. for
details.

*/

// If transverter is used, set par1 to LO frequency and
//  subtract LO value based on user_parameter 'par1'
// par1 is multiplied by 10**8 to give IF freq in desired units
//if there is no transverter, set par1 to zero
lofreq= ug.par1 * 10E8;
freq=freq-lofreq;

//Add or subtract to put Linrad and FT1000 on same frequency
// 1,000,000 equals 1 kHz; freqpre = 1000*ug.par2, so
// ug.par2 is entered directly in Hz for correction
freq=freq+freqpre;

//test by sending corrected output to file for review

/*
FILE *Fp2;
Fp2=fopen("aatestfile","a+");
fprintf(Fp2,"%f\n",freq);
fclose(Fp2);
*/

// Round up to compensate for truncation
freq=freq+5000;
freq=freq*10;
// Add leading zeroes as necessary for proper format

sprintf(ft,"%11f",freq);

if ((freq < 10E10) && (freq >=10E9))
{
strcat(zro,zro);
strcat(zro,ft);
strncpy(ft2,zro,12);
}
else if (freq < 10E9)
{
strcat(zro,zro);
strcat(zro,zr1);
strcat(zro,ft);
strncpy(ft2,zro,12);
}

else
{
strcat(zro,ft);
strncpy(ft2,zro,12);
}

strncpy(ffin,ft2,10);

Fp1=fopen(*ft1000file,"w");
//fprintf(Fp1,ffin);
fprintf(Fp1,"%s\n%i\n",ffin,l_time);
fclose(Fp1);

FILE *Fp2;
char *aatestfile[47]={"aatestfile"};

Fp2=fopen(*aatestfile,"w");
fprintf(Fp2,"%s\n%i\n",ffin,l_time);
fclose(Fp2);

//mix1_selfreq[0]=-1;
//lir_empty_da_device_buffer();
//baseb_reset_counter++;
//return;
}

//end of w3sz routine

}

// **********************************************************
//         WSE Rx and Tx and SDR-14/SDR-IQ Rx routines
// **********************************************************
#if (RX_HARDWARE == 0)
#include "wse_sdrxx.c"
#endif
// **********************************************************
// Dummy routines to support converters and other hardwares
// **********************************************************
#if (RX_HARDWARE == 1)
void control_hware(void){};
void set_hardware_tx_frequency(void){};

void set_hardware_rx_frequency(void)
{
fg.passband_increment=0.01;
fg.passband_direction = -1;
fft1_direction = fg.passband_direction;
}

void set_hardware_rx_gain(void){};
void hware_interface_test(void){};
void hware_set_rxtx(int state)
  {
  int i;
  i=state;
  };
void hware_hand_key(void){};
void clear_hware_data(void){};
#endif


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<TITLE>
Uses of Class org.apache.fop.render.awt.viewer.Translator (Apache FOP 2.1 API)
</TITLE>

<META NAME="date" CONTENT="2016-01-07">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../../../stylesheet.css" TITLE="Style">

      Overview
      Package
      Class
    Use
      Tree
      Deprecated
      Index
      Help

fop 2.1

 PREV
 NEXT

  FRAMES
 NO FRAMES

  All Classes

Uses of Class
org.apache.fop.render.awt.viewer.Translator

Packages that use Translator

org.apache.fop.render.awt.viewer
AWT Viewer PreviewDialog and PreviewPanel.

Uses of Translator in org.apache.fop.render.awt.viewer

Fields in org.apache.fop.render.awt.viewer declared as Translator

protected  Translator
PreviewDialog.translator

          The Translator for localization

Constructors in org.apache.fop.render.awt.viewer with parameters of type Translator

GoToPageDialog(java.awt.Frame frame,
               java.lang.String title,
               Translator translator)

          Creates modal dialog with a given title, attached to a given frame.

PreviewDialogAboutBox(java.awt.Frame parent,
                      Translator translator)

          Creates modal "About" dialog, attached to a given parent frame.

      Overview
      Package
      Class
    Use
      Tree
      Deprecated
      Index
      Help

fop 2.1

 PREV
 NEXT

  FRAMES
 NO FRAMES

  All Classes

Copyright 1999-2016 The Apache Software Foundation. All Rights Reserved.


text:
<?php

require_once VENDOR_DIR . DS . 'autoload.php';

use Phalcon\Loader;
use Dotenv\Dotenv;

$dotenv = new Dotenv(ROOT_DIR);
$dotenv->load();

$loader = new Loader();
$loader->registerDirs(
    [
        TASKS_DIR
    ]
);
$loader->register();


text:
#ifndef ELEKTRA_PLUGIN_TOML_SCALAR_H
#define ELEKTRA_PLUGIN_TOML_SCALAR_H

#include <stdbool.h>
#include <stddef.h>

typedef enum
{
	SCALAR_INTEGER_DEC,
	SCALAR_INTEGER_HEX,
	SCALAR_INTEGER_OCT,
	SCALAR_INTEGER_BIN,
	SCALAR_BOOLEAN,
	SCALAR_FLOAT_NUM,
	SCALAR_FLOAT_INF,
	SCALAR_FLOAT_POS_INF,
	SCALAR_FLOAT_NEG_INF,
	SCALAR_FLOAT_NAN,
	SCALAR_FLOAT_POS_NAN,
	SCALAR_FLOAT_NEG_NAN,
	SCALAR_STRING_COMMENT,
	SCALAR_STRING_BARE,
	SCALAR_STRING_LITERAL,
	SCALAR_STRING_BASIC,
	SCALAR_STRING_ML_LITERAL,
	SCALAR_STRING_ML_BASIC,
	SCALAR_DATE_OFFSET_DATETIME,
	SCALAR_DATE_LOCAL_DATETIME,
	SCALAR_DATE_LOCAL_DATE,
	SCALAR_DATE_LOCAL_TIME,
} ScalarType;

typedef struct
{
	ScalarType type;
	char * str;
	size_t leadingSpaces;
	size_t line;
} Scalar;

/*
 * @brief Creates a new scalar
 *
 * This function only creates a shallow copy of the supplied
 * scalarString takes ownership of it. Therefore, the supplied string
 * must not be freed in any other place than the freeScalar function.
 * If this cannot be guarenteed, use createScalarDup for a deep copy instead.
 *
 * This function is used in the lexer during the reading of string.s
 *
 * @param type The type of the scalar.
 * @param scalarString The raw string representation of the scalar.
 * @param line The line number, where the scalar was read from.
 *
 * @retval Pointer On success.
 * @retval NULL When out-of-memory.
 */
Scalar * createScalar (ScalarType type, char * scalarString, size_t line);

/*
 * @brief Creates a new comment scalar.
 *
 * Uses the createScalar function, so beware of the limitations of it.
 *
 * @param scalarString The raw string representation of the comment, excluding it's starting character.
 * @param leadingSpaces Amount of spaces in front of the comment.
 * @param line The line number, where the comment was read from.
 *
 * @retval Pointer On success.
 * @retval NULL When out-of-memory.
 */
Scalar * createScalarComment (char * scalarString, size_t spaces, size_t line);

/*
 * @brief Creates a new scalar
 *
 * Creates a deep copy of the given scalar string.
 *
 * This function is used in the lexer during the reading of non-string values.
 *
 * @param type The type of the scalar.
 * @param scalarString The raw string representation of the scalar.
 * @param line The line number, where the scalar was read from.
 *
 * @retval Pointer On success.
 * @retval NULL When out-of-memory.
 */
Scalar * createScalarDup (ScalarType type, const char * scalarString, size_t line);

/*
 * @brief Frees up a scalar and any memory pointed within it.
 *
 * @param scalar Scalar to be freed.
 */
void freeScalar (Scalar * scalar);

/*
 * @brief Converts the given scalar to format usable within Elektra.
 *
 * Converts binary, octal and hexadecimal scalars to decimal,
 * Handles special cases for floats (inf, nan) and strips underscores.
 * Applies escape characters to basic strings.
 *
 * @param scalar Scalar to be converted.
 *
 * @retval Pointer On Success.
 * @retval NULL When supplying unknown scalar type or on conversion errors.
 */
char * translateScalar (const Scalar * scalar);

/*
 * @brief Checks if the given string is bare.
 *
 * TOML bare strings only contain alphanumeric characters, underscores or hyphens.
 *
 * @param str String to be checked. Must not be NULL.
 *
 * @retval true If string only contains bare characters.
 * @retval false If contains non-bare characters.
 */
bool isValidBareString (const char * str);

/*
 * @brief Checks if the given scalar contains a valid RFC3339 datetime.
 *
 * @param scalar Scalare to be checked.
 *
 * @retval true If the scalar contains a valid RFC3339 datetime.
 * @retval false Otherwise.
 */
bool isValidDateTime (const Scalar * scalar);

/*
 * @brief Strips a string of leading/trailing characters.
 *
 * @param str String for which to return a stripped copy.
 * @param count Number of leading and trailing characters to omit on copying.
 *
 * @retval Pointer Copy of the supplied string, stripped.
 * @retval NULL When out-of-memory.
 */
char * stripTerminators (const char * str, size_t count);

#endif // ELEKTRA_PLUGIN_TOML_SCALAR_H


text:
package com.gs.collections.impl.list.fixed;

import java.io.IOException;
import java.lang.reflect.Array;
import java.util.Arrays;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import java.util.ListIterator;
import java.util.RandomAccess;

import com.gs.collections.api.block.function.Function;
import com.gs.collections.api.block.function.Function0;
import com.gs.collections.api.block.function.Function2;
import com.gs.collections.api.block.function.Function3;
import com.gs.collections.api.block.predicate.Predicate;
import com.gs.collections.api.block.predicate.Predicate2;
import com.gs.collections.api.block.procedure.ObjectIntProcedure;
import com.gs.collections.api.block.procedure.Procedure;
import com.gs.collections.api.block.procedure.Procedure2;
import com.gs.collections.api.list.MutableList;
import com.gs.collections.api.tuple.Twin;
import com.gs.collections.impl.block.factory.Comparators;
import com.gs.collections.impl.block.factory.Predicates;
import com.gs.collections.impl.list.mutable.AbstractMutableList;
import com.gs.collections.impl.list.mutable.FastList;
import com.gs.collections.impl.list.mutable.ListAdapter;
import com.gs.collections.impl.utility.ArrayIterate;
import com.gs.collections.impl.utility.Iterate;
import com.gs.collections.impl.utility.internal.IterableIterate;

public abstract class AbstractArrayAdapter<T>
        extends AbstractMutableList<T>
        implements RandomAccess
{
    protected T[] items;

    /**
     * This method must be here so subclasses can be serializable.
     */
    protected AbstractArrayAdapter()
    {
    }

    protected AbstractArrayAdapter(T[] newElements)
    {
        this.items = newElements;
    }

    @Override
    public boolean notEmpty()
    {
        return ArrayIterate.notEmpty(this.items);
    }

    @Override
    public T getFirst()
    {
        return ArrayIterate.getFirst(this.items);
    }

    @Override
    public T getLast()
    {
        return ArrayIterate.getLast(this.items);
    }

    @Override
    public void forEach(Procedure<? super T> procedure)
    {
        int size = this.size();
        for (int i = 0; i < size; i++)
        {
            procedure.value(this.items[i]);
        }
    }

    @Override
    public void forEachWithIndex(ObjectIntProcedure<? super T> objectIntProcedure)
    {
        int size = this.items.length;
        for (int i = 0; i < size; i++)
        {
            objectIntProcedure.value(this.items[i], i);
        }
    }

    @Override
    public void forEachWithIndex(int fromIndex, int toIndex, ObjectIntProcedure<? super T> objectIntProcedure)
    {
        ArrayIterate.forEachWithIndex(this.items, fromIndex, toIndex, objectIntProcedure);
    }

    @Override
    public void removeIf(Predicate<? super T> predicate)
    {
        throw new UnsupportedOperationException("Cannot remove from an array");
    }

    @Override
    public <P> void removeIfWith(Predicate2<? super T, ? super P> predicate, P parameter)
    {
        throw new UnsupportedOperationException("Cannot remove from an array");
    }

    @Override
    public T detect(Predicate<? super T> predicate)
    {
        return ArrayIterate.detect(this.items, predicate);
    }

    @Override
    public T detectIfNone(Predicate<? super T> predicate, Function0<? extends T> function)
    {
        T result = this.detect(predicate);
        if (result == null)
        {
            result = function.value();
        }
        return result;
    }

    @Override
    public int count(Predicate<? super T> predicate)
    {
        return ArrayIterate.count(this.items, predicate);
    }

    @Override
    public boolean anySatisfy(Predicate<? super T> predicate)
    {
        return ArrayIterate.anySatisfy(this.items, predicate);
    }

    @Override
    public boolean allSatisfy(Predicate<? super T> predicate)
    {
        return ArrayIterate.allSatisfy(this.items, predicate);
    }

    @Override
    public <IV> IV injectInto(IV injectedValue, Function2<? super IV, ? super T, ? extends IV> function)
    {
        return ArrayIterate.injectInto(injectedValue, this.items, function);
    }

    @Override
    public MutableList<T> select(Predicate<? super T> predicate)
    {
        return this.select(predicate, FastList.<T>newList());
    }

    @Override
    public <R extends Collection<T>> R select(Predicate<? super T> predicate, R target)
    {
        return ArrayIterate.select(this.items, predicate, target);
    }

    @Override
    public MutableList<T> reject(Predicate<? super T> predicate)
    {
        return this.reject(predicate, FastList.<T>newList());
    }

    @Override
    public <R extends Collection<T>> R reject(Predicate<? super T> predicate, R target)
    {
        return ArrayIterate.reject(this.items, predicate, target);
    }

    @Override
    public <V> MutableList<V> collect(Function<? super T, ? extends V> function)
    {
        return this.collect(function, FastList.<V>newList(this.size()));
    }

    @Override
    public <V, R extends Collection<V>> R collect(Function<? super T, ? extends V> function, R target)
    {
        return ArrayIterate.collect(this.items, function, target);
    }

    @Override
    public <V> MutableList<V> collectIf(
            Predicate<? super T> predicate, Function<? super T, ? extends V> function)
    {
        return this.collectIf(predicate, function, FastList.<V>newList());
    }

    @Override
    public <V, R extends Collection<V>> R collectIf(
            Predicate<? super T> predicate, Function<? super T, ? extends V> function, R target)
    {
        return ArrayIterate.<T, V, R>collectIf(this.items, predicate, function, target);
    }

    @Override
    public <P> Twin<MutableList<T>> selectAndRejectWith(
            Predicate2<? super T, ? super P> predicate,
            P parameter)
    {
        return ArrayIterate.selectAndRejectWith(this.items, predicate, parameter);
    }

    @Override
    public int size()
    {
        return this.items.length;
    }

    @Override
    public boolean isEmpty()
    {
        return ArrayIterate.isEmpty(this.items);
    }

    @Override
    public boolean contains(Object o)
    {
        return this.anySatisfy(Predicates.equal((T) o));
    }

    @Override
    public Iterator<T> iterator()
    {
        return Arrays.asList(this.items).iterator();
    }

    @Override
    public Object[] toArray()
    {
        return this.items.clone();
    }

    @Override
    public <E> E[] toArray(E[] array)
    {
        int size = this.size();
        E[] result = array.length < size
                ? (E[]) Array.newInstance(array.getClass().getComponentType(), size)
                : array;

        System.arraycopy(this.items, 0, result, 0, size);
        if (result.length > size)
        {
            result[size] = null;
        }
        return result;
    }

    @Override
    public boolean add(T item)
    {
        throw new UnsupportedOperationException("cannot add to an ArrayAdapter");
    }

    @Override
    public boolean remove(Object o)
    {
        throw new UnsupportedOperationException("Cannot remove from an ArrayAdapter");
    }

    @Override
    public boolean containsAll(Collection<?> collection)
    {
        return Iterate.allSatisfy(collection, Predicates.in(this.items));
    }

    @Override
    public boolean addAll(Collection<? extends T> collection)
    {
        throw new UnsupportedOperationException("cannot addAll to an ArrayAdapter");
    }

    @Override
    public boolean addAllIterable(Iterable<? extends T> iterable)
    {
        throw new UnsupportedOperationException("cannot addAll to an ArrayAdapter");
    }

    @Override
    public boolean removeAll(Collection<?> collection)
    {
        throw new UnsupportedOperationException("Cannot removeAll from an ArrayAdapter");
    }

    @Override
    public boolean removeAllIterable(Iterable<?> iterable)
    {
        throw new UnsupportedOperationException("Cannot removeAll from an ArrayAdapter");
    }

    @Override
    public boolean retainAll(Collection<?> collection)
    {
        throw new UnsupportedOperationException("Cannot remove from an ArrayAdapter");
    }

    @Override
    public boolean retainAllIterable(Iterable<?> iterable)
    {
        throw new UnsupportedOperationException("Cannot remove from an ArrayAdapter");
    }

    @Override
    public void clear()
    {
        throw new UnsupportedOperationException("Cannot clear an ArrayAdapter");
    }

    public boolean addAll(int index, Collection<? extends T> collection)
    {
        throw new UnsupportedOperationException("Cannot add all to an array from a specific index");
    }

    public T get(int index)
    {
        if (index >= this.size())
        {
            throw new IndexOutOfBoundsException("Index: " + index + ", Size: " + this.size());
        }

        return this.items[index];
    }

    public void add(int index, T element)
    {
        throw new UnsupportedOperationException("Cannot add to an ArrayAdapter at a specific index");
    }

    public T remove(int index)
    {
        throw new UnsupportedOperationException("Cannot remove from an ArrayAdapter");
    }

    @Override
    public int indexOf(Object item)
    {
        return ArrayIterate.indexOf(this.items, item);
    }

    @Override
    public int lastIndexOf(Object item)
    {
        return Arrays.asList(this.items).lastIndexOf(item);
    }

    @Override
    public ListIterator<T> listIterator(int index)
    {
        return Arrays.asList(this.items).listIterator(index);
    }

    @Override
    public MutableList<T> subList(int fromIndex, int toIndex)
    {
        return ListAdapter.adapt(Arrays.asList(this.items).subList(fromIndex, toIndex));
    }

    @Override
    public boolean equals(Object otherList)
    {
        if (otherList == this)
        {
            return true;
        }
        if (!(otherList instanceof List))
        {
            return false;
        }

        List<T> list = (List<T>) otherList;
        if (this.size() != list.size())
        {
            return false;
        }
        if (otherList instanceof AbstractArrayAdapter)
        {
            return this.sameTypeEquals((AbstractArrayAdapter<T>) otherList);
        }
        if (otherList instanceof RandomAccess)
        {
            return this.randomAccessListEquals(list);
        }
        return this.regularListEquals(list);
    }

    private boolean sameTypeEquals(AbstractArrayAdapter<?> abstractArrayAdapter)
    {
        return Arrays.equals(this.items, abstractArrayAdapter.items);
    }

    private boolean regularListEquals(List<T> otherList)
    {
        T[] localItems = this.items;
        Iterator<T> iterator = otherList.iterator();
        int size = this.items.length;
        for (int i = 0; i < size; i++)
        {
            T one = localItems[i];
            T two = iterator.next();
            if (!Comparators.nullSafeEquals(one, two))
            {
                return false;
            }
        }
        return true;
    }

    private boolean randomAccessListEquals(List<T> otherList)
    {
        T[] localItems = this.items;
        int n = this.items.length;
        for (int i = 0; i < n; i++)
        {
            T one = localItems[i];
            T two = otherList.get(i);
            if (!Comparators.nullSafeEquals(one, two))
            {
                return false;
            }
        }
        return true;
    }

    @Override
    public int hashCode()
    {
        return Arrays.hashCode(this.items);
    }

    @Override
    public <P> void forEachWith(Procedure2<? super T, ? super P> procedure, P parameter)
    {
        ArrayIterate.forEachWith(this.items, procedure, parameter);
    }

    @Override
    public <P> MutableList<T> selectWith(Predicate2<? super T, ? super P> predicate, P parameter)
    {
        return this.selectWith(predicate, parameter, FastList.<T>newList());
    }

    @Override
    public <P, R extends Collection<T>> R selectWith(
            Predicate2<? super T, ? super P> predicate,
            P parameter,
            R targetCollection)
    {
        return ArrayIterate.selectWith(this.items, predicate, parameter, targetCollection);
    }

    @Override
    public <P> MutableList<T> rejectWith(Predicate2<? super T, ? super P> predicate, P parameter)
    {
        return this.rejectWith(predicate, parameter, FastList.<T>newList());
    }

    @Override
    public <P, R extends Collection<T>> R rejectWith(
            Predicate2<? super T, ? super P> predicate,
            P parameter,
            R targetCollection)
    {
        return ArrayIterate.rejectWith(this.items, predicate, parameter, targetCollection);
    }

    @Override
    public <P, A> MutableList<A> collectWith(Function2<? super T, ? super P, ? extends A> function, P parameter)
    {
        return this.collectWith(function, parameter, FastList.<A>newList());
    }

    @Override
    public <P, A, R extends Collection<A>> R collectWith(
            Function2<? super T, ? super P, ? extends A> function, P parameter, R targetCollection)
    {
        return ArrayIterate.collectWith(this.items, function, parameter, targetCollection);
    }

    @Override
    public <IV, P> IV injectIntoWith(
            IV injectValue, Function3<? super IV, ? super T, ? super P, ? extends IV> function, P parameter)
    {
        return ArrayIterate.injectIntoWith(injectValue, this.items, function, parameter);
    }

    @Override
    public void forEach(int fromIndex, int toIndex, Procedure<? super T> procedure)
    {
        ArrayIterate.forEach(this.items, fromIndex, toIndex, procedure);
    }

    @Override
    public <P> T detectWith(Predicate2<? super T, ? super P> predicate, P parameter)
    {
        return ArrayIterate.detectWith(this.items, predicate, parameter);
    }

    @Override
    public <P> T detectWithIfNone(
            Predicate2<? super T, ? super P> predicate,
            P parameter,
            Function0<? extends T> function)
    {
        T result = this.detectWith(predicate, parameter);
        if (result == null)
        {
            result = function.value();
        }
        return result;
    }

    @Override
    public <P> int countWith(Predicate2<? super T, ? super P> predicate, P parameter)
    {
        return ArrayIterate.countWith(this.items, predicate, parameter);
    }

    @Override
    public <P> boolean anySatisfyWith(Predicate2<? super T, ? super P> predicate, P parameter)
    {
        return ArrayIterate.anySatisfyWith(this.items, predicate, parameter);
    }

    @Override
    public <P> boolean allSatisfyWith(Predicate2<? super T, ? super P> predicate, P parameter)
    {
        return ArrayIterate.allSatisfyWith(this.items, predicate, parameter);
    }

    @Override
    public void appendString(Appendable appendable, String start, String separator, String end)
    {
        try
        {
            appendable.append(start);

            if (this.notEmpty())
            {
                appendable.append(IterableIterate.stringValueOfItem(this, this.items[0]));
                int size = this.size();
                for (int i = 1; i < size; i++)
                {
                    appendable.append(separator);
                    appendable.append(IterableIterate.stringValueOfItem(this, this.items[i]));
                }
            }

            appendable.append(end);
        }
        catch (IOException e)
        {
            throw new RuntimeException(e);
        }
    }
}


text:
/**
 * Onshape REST API
 * The Onshape REST API consumed by all clients.
 *
 * OpenAPI spec version: 1.93
 * Contact: api-support@onshape.zendesk.com
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */

export class BTDiscountParams {
    'planId'?: string;
    'percentOff'?: number;
    'amountOff'?: number;
    'couponType'?: number;
    'couponValidMonths'?: number;
    'expiresInDays'?: number;

    static discriminator: string | undefined = undefined;

    static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
        {
            "name": "planId",
            "baseName": "planId",
            "type": "string"
        },
        {
            "name": "percentOff",
            "baseName": "percentOff",
            "type": "number"
        },
        {
            "name": "amountOff",
            "baseName": "amountOff",
            "type": "number"
        },
        {
            "name": "couponType",
            "baseName": "couponType",
            "type": "number"
        },
        {
            "name": "couponValidMonths",
            "baseName": "couponValidMonths",
            "type": "number"
        },
        {
            "name": "expiresInDays",
            "baseName": "expiresInDays",
            "type": "number"
        }    ];

    static getAttributeTypeMap() {
        return BTDiscountParams.attributeTypeMap;
    }
}


text:
"""
Search error list.

Licensed under MIT
Copyright (c) 2013 - 2015 Isaac Muse <isaacmuse@gmail.com>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions
of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.
"""
import wx
from .dynamic_lists import DynamicList
from ..localization import _
from .. import data

class ErrorList(DynamicList):
    """Error list."""

    def __init__(self, parent):
        """Initialization."""

        self.localize()

        super().__init__(
            parent,
            [
                self.ERROR,
                self.FILE_NAME
            ]
        )

        self.Bind(wx.EVT_LEFT_DCLICK, self.on_dclick)

    def localize(self):
        """Translate strings."""

        self.ERROR = _("Error")
        self.FILE_NAME = _("File Name")

    def create_image_list(self):
        """Create image list."""

        self.images = wx.ImageList(16, 16)
        self.tint = data.RGBA(self.GetForegroundColour().Get()[:3])
        self.error_symbol = self.images.Add(data.get_bitmap('error.png'))
        self.sort_up = self.images.Add(data.get_bitmap('arrow_up.png', tint=self.tint, alpha=0.3))
        self.sort_down = self.images.Add(data.get_bitmap('arrow_down.png', tint=self.tint, alpha=0.3))
        self.AssignImageList(self.images, wx.IMAGE_LIST_SMALL)

    def get_item_text(self, item, col, absolute=False):
        """Return the text for the given item and col."""

        real = self.get_real_col(col)
        if not absolute:
            item = self.itemIndexMap[item]
        if real == 0:
            return self.itemDataMap[item][real][0]
        else:
            return self.itemDataMap[item][real]

    def on_dclick(self, event):
        """Open file at in editor with optional line and column argument."""

        pos = event.GetPosition()
        item = self.HitTestSubItem(pos)[0]
        if item != -1:
            file_name = self.get_map_item(item, col=self.get_virt_col(1))
            full_error = ''.join(reversed(self.get_map_item(item, col=self.get_virt_col(0))))
            self.GetParent().GetParent().show_error("%s\n%s" % (file_name, full_error))
        event.Skip()


text:
package org.apache.pinot.core.query.reduce;

import com.google.common.base.Preconditions;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.pinot.common.utils.DataSchema;
import org.apache.pinot.common.utils.DataSchema.ColumnDataType;
import org.apache.pinot.core.query.postaggregation.PostAggregationFunction;
import org.apache.pinot.core.query.request.context.ExpressionContext;
import org.apache.pinot.core.query.request.context.FunctionContext;
import org.apache.pinot.core.query.request.context.QueryContext;

/**
 * The {@code PostAggregationHandler} handles the post-aggregation calculation as well as the column re-ordering for the
 * aggregation result.
 */
public class PostAggregationHandler {
  private final Map<FunctionContext, Integer> _aggregationFunctionIndexMap;
  private final int _numGroupByExpressions;
  private final Map<ExpressionContext, Integer> _groupByExpressionIndexMap;
  private final DataSchema _dataSchema;
  private final ValueExtractor[] _valueExtractors;
  private final DataSchema _resultDataSchema;

  public PostAggregationHandler(QueryContext queryContext, DataSchema dataSchema) {
    _aggregationFunctionIndexMap = queryContext.getAggregationFunctionIndexMap();
    assert _aggregationFunctionIndexMap != null;
    List<ExpressionContext> groupByExpressions = queryContext.getGroupByExpressions();
    if (groupByExpressions != null) {
      _numGroupByExpressions = groupByExpressions.size();
      _groupByExpressionIndexMap = new HashMap<>();
      for (int i = 0; i < _numGroupByExpressions; i++) {
        _groupByExpressionIndexMap.put(groupByExpressions.get(i), i);
      }
    } else {
      _numGroupByExpressions = 0;
      _groupByExpressionIndexMap = null;
    }

    // NOTE: The data schema will always have group-by expressions in the front, followed by aggregation functions of
    //       the same order as in the query context. This is handled in AggregationGroupByOrderByOperator.
    _dataSchema = dataSchema;

    List<ExpressionContext> selectExpressions = queryContext.getSelectExpressions();
    int numSelectExpressions = selectExpressions.size();
    _valueExtractors = new ValueExtractor[numSelectExpressions];
    String[] columnNames = new String[numSelectExpressions];
    ColumnDataType[] columnDataTypes = new ColumnDataType[numSelectExpressions];
    for (int i = 0; i < numSelectExpressions; i++) {
      ValueExtractor valueExtractor = getValueExtractor(selectExpressions.get(i));
      _valueExtractors[i] = valueExtractor;
      columnNames[i] = valueExtractor.getColumnName();
      columnDataTypes[i] = valueExtractor.getColumnDataType();
    }
    _resultDataSchema = new DataSchema(columnNames, columnDataTypes);
  }

  /**
   * Returns the DataSchema of the post-aggregation result.
   */
  public DataSchema getResultDataSchema() {
    return _resultDataSchema;
  }

  /**
   * Returns the post-aggregation result for the given row.
   */
  public Object[] getResult(Object[] row) {
    int numValues = _valueExtractors.length;
    Object[] result = new Object[numValues];
    for (int i = 0; i < numValues; i++) {
      result[i] = _valueExtractors[i].extract(row);
    }
    return result;
  }

  /**
   * Returns a ValueExtractor based on the given expression.
   */
  public ValueExtractor getValueExtractor(ExpressionContext expression) {
    if (expression.getType() == ExpressionContext.Type.LITERAL) {
      // Literal
      return new LiteralValueExtractor(expression.getLiteral());
    }
    if (_numGroupByExpressions > 0) {
      Integer groupByExpressionIndex = _groupByExpressionIndexMap.get(expression);
      if (groupByExpressionIndex != null) {
        // Group-by expression
        return new ColumnValueExtractor(groupByExpressionIndex);
      }
    }
    FunctionContext function = expression.getFunction();
    Preconditions
        .checkState(function != null, "Failed to find SELECT expression: %s in the GROUP-BY clause", expression);
    if (function.getType() == FunctionContext.Type.AGGREGATION) {
      // Aggregation function
      return new ColumnValueExtractor(_aggregationFunctionIndexMap.get(function) + _numGroupByExpressions);
    } else {
      // Post-aggregation function
      return new PostAggregationValueExtractor(function);
    }
  }

  /**
   * Value extractor for the post-aggregation function.
   */
  public interface ValueExtractor {

    /**
     * Returns the column name for the value extracted.
     */
    String getColumnName();

    /**
     * Returns the ColumnDataType of the value extracted.
     */
    ColumnDataType getColumnDataType();

    /**
     * Extracts the value from the given row.
     */
    Object extract(Object[] row);
  }

  /**
   * Value extractor for a literal.
   */
  private static class LiteralValueExtractor implements ValueExtractor {
    final String _literal;

    LiteralValueExtractor(String literal) {
      _literal = literal;
    }

    @Override
    public String getColumnName() {
      return '\'' + _literal + '\'';
    }

    @Override
    public ColumnDataType getColumnDataType() {
      return ColumnDataType.STRING;
    }

    @Override
    public Object extract(Object[] row) {
      return _literal;
    }
  }

  /**
   * Value extractor for a non-post-aggregation column (group-by expression or aggregation).
   */
  private class ColumnValueExtractor implements ValueExtractor {
    final int _index;

    ColumnValueExtractor(int index) {
      _index = index;
    }

    @Override
    public String getColumnName() {
      return _dataSchema.getColumnName(_index);
    }

    @Override
    public ColumnDataType getColumnDataType() {
      return _dataSchema.getColumnDataType(_index);
    }

    @Override
    public Object extract(Object[] row) {
      return row[_index];
    }
  }

  /**
   * Value extractor for a post-aggregation column.
   */
  private class PostAggregationValueExtractor implements ValueExtractor {
    final FunctionContext _function;
    final Object[] _arguments;
    final ValueExtractor[] _argumentExtractors;
    final PostAggregationFunction _postAggregationFunction;

    PostAggregationValueExtractor(FunctionContext function) {
      assert function.getType() == FunctionContext.Type.TRANSFORM;

      _function = function;
      List<ExpressionContext> arguments = function.getArguments();
      int numArguments = arguments.size();
      _arguments = new Object[numArguments];
      _argumentExtractors = new ValueExtractor[numArguments];
      ColumnDataType[] argumentTypes = new ColumnDataType[numArguments];
      for (int i = 0; i < numArguments; i++) {
        ExpressionContext argument = arguments.get(i);
        ValueExtractor argumentExtractor = getValueExtractor(argument);
        _argumentExtractors[i] = argumentExtractor;
        argumentTypes[i] = argumentExtractor.getColumnDataType();
      }
      _postAggregationFunction = new PostAggregationFunction(function.getFunctionName(), argumentTypes);
    }

    @Override
    public String getColumnName() {
      return _function.toString();
    }

    @Override
    public ColumnDataType getColumnDataType() {
      return _postAggregationFunction.getResultType();
    }

    @Override
    public Object extract(Object[] row) {
      int numArguments = _arguments.length;
      for (int i = 0; i < numArguments; i++) {
        _arguments[i] = _argumentExtractors[i].extract(row);
      }
      return _postAggregationFunction.invoke(_arguments);
    }
  }
}


text:
function iterate!(job::BasicMCJob, ::Type{HMC}, ::Type{Univariate})
  if isa(job.tuner, DualAveragingMCTuner)
    job.sstate.count += 1
  end

  if (isa(job.tuner, VanillaMCTuner) && job.tuner.verbose) ||
    isa(job.tuner, AcceptanceRateMCTuner) ||
    (isa(job.tuner, DualAveragingMCTuner) && job.tuner.verbose)
    job.sstate.tune.proposed += 1
  end

  job.sstate.momentum = randn()

  job.sstate.oldhamiltonian = hamiltonian(job.pstate.logtarget, job.sstate.momentum)

  job.sstate.pstate.value = job.pstate.value
  job.sstate.pstate.gradlogtarget = job.pstate.gradlogtarget

  if isa(job.tuner, DualAveragingMCTuner)
    job.sstate.nleaps = max(1, Int(round(job.sstate.tune.λ/job.sstate.tune.step)))
  end

  for i in 1:job.sstate.nleaps
    job.sstate.momentum = leapfrog!(
      job.sstate.pstate, job.sstate.pstate, job.sstate.momentum, job.sstate.tune.step, job.parameter.gradlogtarget!
    )
  end

  job.parameter.logtarget!(job.sstate.pstate)

  job.sstate.newhamiltonian = hamiltonian(job.sstate.pstate.logtarget, job.sstate.momentum)

  job.sstate.ratio = job.sstate.newhamiltonian-job.sstate.oldhamiltonian

  job.sstate.a = min(1., exp(job.sstate.ratio))

  if rand() < job.sstate.a
    job.pstate.value = job.sstate.pstate.value

    job.pstate.gradlogtarget = job.sstate.pstate.gradlogtarget
    if in(:gradloglikelihood, job.outopts[:monitor]) && job.parameter.gradloglikelihood! != nothing
      job.pstate.gradloglikelihood = job.sstate.pstate.gradloglikelihood
    end
    if in(:gradlogprior, job.outopts[:monitor]) && job.parameter.gradlogprior! != nothing
      job.pstate.gradlogprior = job.sstate.pstate.gradlogprior
    end

    job.pstate.logtarget = job.sstate.pstate.logtarget
    if in(:loglikelihood, job.outopts[:monitor]) && job.parameter.loglikelihood! != nothing
      job.pstate.loglikelihood = job.sstate.pstate.loglikelihood
    end
    if in(:logprior, job.outopts[:monitor]) && job.parameter.logprior! != nothing
      job.pstate.logprior = job.sstate.pstate.logprior
    end

    if !isempty(job.sstate.diagnosticindices)
      if haskey(job.sstate.diagnosticindices, :accept)
        job.pstate.diagnosticvalues[job.sstate.diagnosticindices[:accept]] = true
      end
    end

    if (isa(job.tuner, VanillaMCTuner) && job.tuner.verbose) ||
      isa(job.tuner, AcceptanceRateMCTuner) ||
      (isa(job.tuner, DualAveragingMCTuner) && job.tuner.verbose)
      job.sstate.tune.accepted += 1
    end
  else
    if !isempty(job.sstate.diagnosticindices)
      if haskey(job.sstate.diagnosticindices, :accept)
        job.pstate.diagnosticvalues[job.sstate.diagnosticindices[:accept]] = false
      end
    end
  end

  if (isa(job.tuner, VanillaMCTuner) && job.tuner.verbose) || isa(job.tuner, AcceptanceRateMCTuner)
    if job.sstate.tune.totproposed <= job.range.burnin && mod(job.sstate.tune.proposed, job.tuner.period) == 0
      rate!(job.sstate.tune)

      if isa(job.tuner, AcceptanceRateMCTuner)
        tune!(job.sstate.tune, job.tuner)
      end

      if job.tuner.verbose
        println(
          "Burnin iteration ",
          job.fmt_iter(job.sstate.tune.totproposed),
          " of ",
          job.range.burnin,
          ": ",
          job.fmt_perc(100*job.sstate.tune.rate),
          " % acceptance rate"
        )
      end

      reset_burnin!(job.sstate.tune)
    end
  elseif isa(job.tuner, DualAveragingMCTuner)
    if job.sstate.count <= job.tuner.nadapt
      tune!(job.sstate.tune, job.tuner, job.sstate.count, job.sstate.a)

      if job.tuner.verbose
        if mod(job.sstate.tune.proposed, job.tuner.period) == 0
          rate!(job.sstate.tune)

          println(
            "Burnin iteration ",
            job.fmt_iter(job.sstate.tune.totproposed),
            " of ",
            job.tuner.nadapt,
            ": ",
            job.fmt_perc(100*job.sstate.tune.rate),
            " % acceptance rate"
          )

          reset_burnin!(job.sstate.tune)
        end
      end
    else
      job.sstate.tune.step = job.sstate.tune.εbar
    end
  end
end

function iterate!(job::BasicMCJob, ::Type{HMC}, ::Type{Multivariate})
  if isa(job.tuner, DualAveragingMCTuner)
    job.sstate.count += 1
  end

  if (isa(job.tuner, VanillaMCTuner) && job.tuner.verbose) ||
    isa(job.tuner, AcceptanceRateMCTuner) ||
    (isa(job.tuner, DualAveragingMCTuner) && job.tuner.verbose)
    job.sstate.tune.proposed += 1
  end

  job.sstate.momentum[:] = randn(job.pstate.size)

  job.sstate.oldhamiltonian = hamiltonian(job.pstate.logtarget, job.sstate.momentum)

  job.sstate.pstate.value = copy(job.pstate.value)
  job.sstate.pstate.gradlogtarget = copy(job.pstate.gradlogtarget)

  if isa(job.tuner, DualAveragingMCTuner)
    job.sstate.nleaps = max(1, Int(round(job.sstate.tune.λ/job.sstate.tune.step)))
  end

  for i in 1:job.sstate.nleaps
    leapfrog!(
      job.sstate.pstate,
      job.sstate.momentum,
      job.sstate.pstate,
      job.sstate.momentum,
      job.sstate.tune.step,
      job.parameter.gradlogtarget!
    )
  end

  job.parameter.logtarget!(job.sstate.pstate)

  job.sstate.newhamiltonian = hamiltonian(job.sstate.pstate.logtarget, job.sstate.momentum)

  job.sstate.ratio = job.sstate.newhamiltonian-job.sstate.oldhamiltonian

  job.sstate.a = min(1., exp(job.sstate.ratio))

  if rand() < job.sstate.a
    job.pstate.value = copy(job.sstate.pstate.value)

    job.pstate.gradlogtarget = copy(job.sstate.pstate.gradlogtarget)
    if in(:gradloglikelihood, job.outopts[:monitor]) && job.parameter.gradloglikelihood! != nothing
      job.pstate.gradloglikelihood = copy(job.sstate.pstate.gradloglikelihood)
    end
    if in(:gradlogprior, job.outopts[:monitor]) && job.parameter.gradlogprior! != nothing
      job.pstate.gradlogprior = copy(job.sstate.pstate.gradlogprior)
    end

    job.pstate.logtarget = job.sstate.pstate.logtarget
    if in(:loglikelihood, job.outopts[:monitor]) && job.parameter.loglikelihood! != nothing
      job.pstate.loglikelihood = job.sstate.pstate.loglikelihood
    end
    if in(:logprior, job.outopts[:monitor]) && job.parameter.logprior! != nothing
      job.pstate.logprior = job.sstate.pstate.logprior
    end

    if !isempty(job.sstate.diagnosticindices)
      if haskey(job.sstate.diagnosticindices, :accept)
        job.pstate.diagnosticvalues[job.sstate.diagnosticindices[:accept]] = true
      end
    end

    if (isa(job.tuner, VanillaMCTuner) && job.tuner.verbose) ||
      isa(job.tuner, AcceptanceRateMCTuner) ||
      (isa(job.tuner, DualAveragingMCTuner) && job.tuner.verbose)
      job.sstate.tune.accepted += 1
    end
  else
    if !isempty(job.sstate.diagnosticindices)
      if haskey(job.sstate.diagnosticindices, :accept)
        job.pstate.diagnosticvalues[job.sstate.diagnosticindices[:accept]] = false
      end
    end
  end

  if (isa(job.tuner, VanillaMCTuner) && job.tuner.verbose) || isa(job.tuner, AcceptanceRateMCTuner)
    if job.sstate.tune.totproposed <= job.range.burnin && mod(job.sstate.tune.proposed, job.tuner.period) == 0
      rate!(job.sstate.tune)

      if isa(job.tuner, AcceptanceRateMCTuner)
        tune!(job.sstate.tune, job.tuner)
      end

      if job.tuner.verbose
        println(
          "Burnin iteration ",
          job.fmt_iter(job.sstate.tune.totproposed),
          " of ",
          job.range.burnin,
          ": ",
          job.fmt_perc(100*job.sstate.tune.rate),
          " % acceptance rate"
        )
      end

      reset_burnin!(job.sstate.tune)
    end
  elseif isa(job.tuner, DualAveragingMCTuner)
    if job.sstate.count <= job.tuner.nadapt
      tune!(job.sstate.tune, job.tuner, job.sstate.count, job.sstate.a)

      if job.tuner.verbose
        if mod(job.sstate.tune.proposed, job.tuner.period) == 0
          rate!(job.sstate.tune)

          println(
            "Burnin iteration ",
            job.fmt_iter(job.sstate.tune.totproposed),
            " of ",
            job.tuner.nadapt,
            ": ",
            job.fmt_perc(100*job.sstate.tune.rate),
            " % acceptance rate"
          )

          reset_burnin!(job.sstate.tune)
        end
      end
    else
      job.sstate.tune.step = job.sstate.tune.εbar
    end
  end
end


text:
<!DOCTYPE html>

  <meta charset="UTF-8">
  <title>OuJS Dev</title>

Ent

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Laboriosam, dolores?

Omnis similique porro sequi voluptatum deleniti, alias nobis voluptate cum.

Minima repellat similique quae incidunt sapiente placeat expedita repellendus, nihil!

In rerum nisi quae, voluptatibus eaque distinctio, natus consequuntur eligendi!

Facilis natus magnam labore cum perferendis, aspernatur molestias tempore dicta.

Repudiandae itaque, ratione iste in fuga dolores voluptate aperiam aspernatur.

Libero recusandae accusamus repudiandae voluptas officia incidunt blanditiis, dicta adipisci!

Molestiae nihil id, esse et cum recusandae quia eius nobis!

Laudantium quae magnam ipsa optio unde, dolores deserunt maxime distinctio!

Ipsam autem libero nostrum repellendus pariatur blanditiis voluptate adipisci molestiae.

  <button id="btn-ajax">Call ajax</button>
  <button id="btn-ajax-json">JSON ajax</button>

  <form action="upd.php" method="post" enctype="multipart/form-data" id="form-ajax-file">
    <input type="file" id="file-upd">
    <input type="submit" id="btn-submit" value="Submit">
  </form>


text:
//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

namespace Umbraco.Web.UI.Umbraco.Dashboard {

    public partial class UserControlProxy {

        /// <summary>
        /// ClientLoader control.
        /// </summary>
        /// <remarks>
        /// Auto-generated field.
        /// To modify move field declaration from designer file to code-behind file.
        /// </remarks>
        protected global::umbraco.uicontrols.UmbracoClientDependencyLoader ClientLoader;

        /// <summary>
        /// CssInclude1 control.
        /// </summary>
        /// <remarks>
        /// Auto-generated field.
        /// To modify move field declaration from designer file to code-behind file.
        /// </remarks>
        protected global::ClientDependency.Core.Controls.CssInclude CssInclude1;

        /// <summary>
        /// JsInclude1 control.
        /// </summary>
        /// <remarks>
        /// Auto-generated field.
        /// To modify move field declaration from designer file to code-behind file.
        /// </remarks>
        protected global::ClientDependency.Core.Controls.JsInclude JsInclude1;

        /// <summary>
        /// JsInclude3 control.
        /// </summary>
        /// <remarks>
        /// Auto-generated field.
        /// To modify move field declaration from designer file to code-behind file.
        /// </remarks>
        protected global::ClientDependency.Core.Controls.JsInclude JsInclude3;

        /// <summary>
        /// JsInclude4 control.
        /// </summary>
        /// <remarks>
        /// Auto-generated field.
        /// To modify move field declaration from designer file to code-behind file.
        /// </remarks>
        protected global::ClientDependency.Core.Controls.JsInclude JsInclude4;

        /// <summary>
        /// JsInclude6 control.
        /// </summary>
        /// <remarks>
        /// Auto-generated field.
        /// To modify move field declaration from designer file to code-behind file.
        /// </remarks>
        protected global::ClientDependency.Core.Controls.JsInclude JsInclude6;

        /// <summary>
        /// JsInclude11 control.
        /// </summary>
        /// <remarks>
        /// Auto-generated field.
        /// To modify move field declaration from designer file to code-behind file.
        /// </remarks>
        protected global::ClientDependency.Core.Controls.JsInclude JsInclude11;

        /// <summary>
        /// JsInclude12 control.
        /// </summary>
        /// <remarks>
        /// Auto-generated field.
        /// To modify move field declaration from designer file to code-behind file.
        /// </remarks>
        protected global::ClientDependency.Core.Controls.JsInclude JsInclude12;

        /// <summary>
        /// JsInclude2 control.
        /// </summary>
        /// <remarks>
        /// Auto-generated field.
        /// To modify move field declaration from designer file to code-behind file.
        /// </remarks>
        protected global::ClientDependency.Core.Controls.JsInclude JsInclude2;

        /// <summary>
        /// form1 control.
        /// </summary>
        /// <remarks>
        /// Auto-generated field.
        /// To modify move field declaration from designer file to code-behind file.
        /// </remarks>
        protected global::System.Web.UI.HtmlControls.HtmlForm form1;

        /// <summary>
        /// container control.
        /// </summary>
        /// <remarks>
        /// Auto-generated field.
        /// To modify move field declaration from designer file to code-behind file.
        /// </remarks>
        protected global::System.Web.UI.WebControls.PlaceHolder container;
    }
}


text:
.. _install-ubuntu:

Install and configure for Ubuntu
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This section describes how to install and configure the Load-balancer
service for Ubuntu 18.04 (LTS).

Prerequisites
-------------

Before you install and configure the service, you must create a database,
service credentials, and API endpoints.

1. Create the database, complete these steps:

   * Use the database access client to connect to the database
     server as the ``root`` user:

     .. code-block:: console

        # mysql

   * Create the ``octavia`` database:

     .. code-block:: console

        CREATE DATABASE octavia;

   * Grant proper access to the ``octavia`` database:

     .. code-block:: console

        GRANT ALL PRIVILEGES ON octavia.* TO 'octavia'@'localhost' \
        IDENTIFIED BY 'OCTAVIA_DBPASS';
        GRANT ALL PRIVILEGES ON octavia.* TO 'octavia'@'%' \
        IDENTIFIED BY 'OCTAVIA_DBPASS';

     Replace OCTAVIA_DBPASS with a suitable password.

   * Exit the database access client.

     .. code-block:: console

        exit;

2. Source the ``admin`` credentials to gain access to admin-only CLI commands:

   .. code-block:: console

      $ . admin-openrc

3. To create the Octavia service credentials, complete these steps:

   * Create the ``octavia`` user:

     .. code-block:: console

        $ openstack user create --domain default --password-prompt octavia
          User Password:
          Repeat User Password:
          +---------------------+----------------------------------+
          | Field               | Value                            |
          +---------------------+----------------------------------+
          | domain_id           | default                          |
          | enabled             | True                             |
          | id                  | b18ee38e06034b748141beda8fc8bfad |
          | name                | octavia                          |
          | options             | {}                               |
          | password_expires_at | None                             |
          +---------------------+----------------------------------+

   * Add the ``admin`` role to the ``octavia`` user:

     .. code-block:: console

        $ openstack role add --project service --user octavia admin

     .. note::

        This command produces no output.

     .. note::
        The Octavia service does not require the full admin role.
        Details of how to run Octavia without the admin role will come in a future version of this document.

   * Create the octavia service entities:

     .. code-block:: console

        $ openstack service create --name octavia --description "OpenStack Octavia" load-balancer
          +-------------+----------------------------------+
          | Field       | Value                            |
          +-------------+----------------------------------+
          | description | OpenStack Octavia                |
          | enabled     | True                             |
          | id          | d854f6fff0a64f77bda8003c8dedfada |
          | name        | octavia                          |
          | type        | load-balancer                    |
          +-------------+----------------------------------+

4. Create the Load-balancer service API endpoints:

   .. code-block:: console

      $ openstack endpoint create --region RegionOne \
        load-balancer public http://controller:9876
        +--------------+----------------------------------+
        | Field        | Value                            |
        +--------------+----------------------------------+
        | enabled      | True                             |
        | id           | 47cf883de46242c39f147c52f2958ebf |
        | interface    | public                           |
        | region       | RegionOne                        |
        | region_id    | RegionOne                        |
        | service_id   | d854f6fff0a64f77bda8003c8dedfada |
        | service_name | octavia                          |
        | service_type | load-balancer                    |
        | url          | http://controller:9876           |
        +--------------+----------------------------------+

      $ openstack endpoint create --region RegionOne \
        load-balancer internal http://controller:9876
        +--------------+----------------------------------+
        | Field        | Value                            |
        +--------------+----------------------------------+
        | enabled      | True                             |
        | id           | 225aef8465ef4df48a341aaaf2b0a390 |
        | interface    | internal                         |
        | region       | RegionOne                        |
        | region_id    | RegionOne                        |
        | service_id   | d854f6fff0a64f77bda8003c8dedfada |
        | service_name | octavia                          |
        | service_type | load-balancer                    |
        | url          | http://controller:9876           |
        +--------------+----------------------------------+

      $ openstack endpoint create --region RegionOne \
        load-balancer admin http://controller:9876
        +--------------+----------------------------------+
        | Field        | Value                            |
        +--------------+----------------------------------+
        | enabled      | True                             |
        | id           | 375eb5057fb546edbdf3ee4866179672 |
        | interface    | admin                            |
        | region       | RegionOne                        |
        | region_id    | RegionOne                        |
        | service_id   | d854f6fff0a64f77bda8003c8dedfada |
        | service_name | octavia                          |
        | service_type | load-balancer                    |
        | url          | http://controller:9876           |
        +--------------+----------------------------------+

5. Create octavia-openrc file

   .. code-block:: console

      cat << EOF >> $HOME/octavia-openrc
      export OS_PROJECT_DOMAIN_NAME=Default
      export OS_USER_DOMAIN_NAME=Default
      export OS_PROJECT_NAME=service
      export OS_USERNAME=octavia
      export OS_PASSWORD=OCTAVIA_PASS
      export OS_AUTH_URL=http://controller:5000
      export OS_IDENTITY_API_VERSION=3
      export OS_IMAGE_API_VERSION=2
      export OS_VOLUME_API_VERSION=3
      EOF

   Replace OCTAVIA_PASS with the password you chose for the octavia user in
   the Identity service.

6. Source the ``octavia`` credentials to gain access to octavia CLI commands:

   .. code-block:: console

      $ . $HOME/octavia-openrc

7. Create the amphora image

   For creating amphora image, please refer to the `Building Octavia Amphora Images <https://docs.openstack.org/octavia/latest/admin/amphora-image-build.html>`_.

8. Upload the amphora image

   .. code-block:: console

      $ openstack image create --disk-format qcow2 --container-format bare \
        --private --tag amphora \
        --file <path to the amphora image> amphora-x64-haproxy

9. Create a flavor for the amphora image

   .. code-block:: console

      $ openstack flavor create --id 200 --vcpus 1 --ram 1024 \
        --disk 2 "amphora" --private

Install and configure components
--------------------------------

1. Install the packages:

   .. code-block:: console

      # apt install octavia-api octavia-health-manager octavia-housekeeping \
        octavia-worker python3-octavia python3-octaviaclient

   If octavia-common and octavia-api packages ask you to configure, choose No.

2. Create the certificates

   .. code-block:: console

      $ git clone https://opendev.org/openstack/octavia.git
      $ cd octavia/bin/
      $ source create_dual_intermediate_CA.sh
      $ sudo mkdir -p /etc/octavia/certs/private
      $ sudo chmod 755 /etc/octavia -R
      $ sudo cp -p etc/octavia/certs/server_ca.cert.pem /etc/octavia/certs
      $ sudo cp -p etc/octavia/certs/server_ca-chain.cert.pem /etc/octavia/certs
      $ sudo cp -p etc/octavia/certs/server_ca.key.pem /etc/octavia/certs/private
      $ sudo cp -p etc/octavia/certs/client_ca.cert.pem /etc/octavia/certs
      $ sudo cp -p etc/octavia/certs/client.cert-and-key.pem /etc/octavia/certs/private

   For the production environment, Please refer to the `Octavia Certificate Configuration Guide <https://docs.openstack.org/octavia/latest/admin/guides/certificates.html>`_.

3. Source the ``octavia`` credentials to gain access to octavia CLI commands:

   .. code-block:: console

      $ . octavia-openrc

4. Create security groups and their rules

   .. code-block:: console

      $ openstack security group create lb-mgmt-sec-grp
      $ openstack security group rule create --protocol icmp lb-mgmt-sec-grp
      $ openstack security group rule create --protocol tcp --dst-port 22 lb-mgmt-sec-grp
      $ openstack security group rule create --protocol tcp --dst-port 9443 lb-mgmt-sec-grp
      $ openstack security group create lb-health-mgr-sec-grp
      $ openstack security group rule create --protocol udp --dst-port 5555 lb-health-mgr-sec-grp

5. Create a key pair for logging in to the amphora instance

   .. code-block:: console

      $ openstack keypair create --public-key ~/.ssh/id_rsa.pub mykey

   .. note::

      Check whether " ~/.ssh/id_rsa.pub" file exists or not in advance.
      If the file does not exist, run the ssh-keygen command to create it.

6. Create dhclient.conf file for dhclient

   .. code-block:: console

      $ cd $HOME
      $ sudo mkdir -m755 -p /etc/dhcp/octavia
      $ sudo cp octavia/etc/dhcp/dhclient.conf /etc/dhcp/octavia

7. Create a network

   .. note::
      During the execution of the below command, please save the of
      BRNAME and MGMT_PORT_MAC in a notepad for further reference.

   .. code-block:: console

      $ OCTAVIA_MGMT_SUBNET=172.16.0.0/12
      $ OCTAVIA_MGMT_SUBNET_START=172.16.0.100
      $ OCTAVIA_MGMT_SUBNET_END=172.16.31.254
      $ OCTAVIA_MGMT_PORT_IP=172.16.0.2

      $ openstack network create lb-mgmt-net
      $ openstack subnet create --subnet-range $OCTAVIA_MGMT_SUBNET --allocation-pool \
        start=$OCTAVIA_MGMT_SUBNET_START,end=$OCTAVIA_MGMT_SUBNET_END \
        --network lb-mgmt-net lb-mgmt-subnet

      $ SUBNET_ID=$(openstack subnet show lb-mgmt-subnet -f value -c id)
      $ PORT_FIXED_IP="--fixed-ip subnet=$SUBNET_ID,ip-address=$OCTAVIA_MGMT_PORT_IP"

      $ MGMT_PORT_ID=$(openstack port create --security-group \
        lb-health-mgr-sec-grp --device-owner Octavia:health-mgr \
        --host=$(hostname) -c id -f value --network lb-mgmt-net \
        $PORT_FIXED_IP octavia-health-manager-listen-port)

      $ MGMT_PORT_MAC=$(openstack port show -c mac_address -f value \
        $MGMT_PORT_ID)

      $ sudo ip link add o-hm0 type veth peer name o-bhm0
      $ NETID=$(openstack network show lb-mgmt-net -c id -f value)
      $ BRNAME=brq$(echo $NETID|cut -c 1-11)
      $ sudo brctl addif $BRNAME o-bhm0
      $ sudo ip link set o-bhm0 up

      $ sudo ip link set dev o-hm0 address $MGMT_PORT_MAC
      $ sudo iptables -I INPUT -i o-hm0 -p udp --dport 5555 -j ACCEPT
      $ sudo dhclient -v o-hm0 -cf /etc/dhcp/octavia

8. Below settings are required to create veth pair after the host reboot

   Edit the ``/etc/systemd/network/o-hm0.network`` file

   .. code-block:: ini

      [Match]
      Name=o-hm0

      [Network]
      DHCP=yes

   Edit the ``/etc/systemd/system/octavia-interface.service`` file

   .. code-block:: ini

      [Unit]
      Description=Octavia Interface Creator
      Requires=neutron-linuxbridge-agent.service
      After=neutron-linuxbridge-agent.service

      [Service]
      Type=oneshot
      RemainAfterExit=true
      ExecStart=/opt/octavia-interface.sh start
      ExecStop=/opt/octavia-interface.sh stop

      [Install]
      WantedBy=multi-user.target

   Edit the ``/opt/octavia-interface.sh`` file

   .. code-block:: console

      #!/bin/bash

      set -ex

      MAC=$MGMT_PORT_MAC
      BRNAME=$BRNAME

      if [ "$1" == "start" ]; then
        ip link add o-hm0 type veth peer name o-bhm0
        brctl addif $BRNAME o-bhm0
        ip link set o-bhm0 up
        ip link set dev o-hm0 address $MAC
        ip link set o-hm0 up
        iptables -I INPUT -i o-hm0 -p udp --dport 5555 -j ACCEPT
      elif [ "$1" == "stop" ]; then
        ip link del o-hm0
      else
        brctl show $BRNAME
        ip a s dev o-hm0
      fi

   You need to substitute $MGMT_PORT_MAC and $BRNAME for the values in your environment.

9. Edit the ``/etc/octavia/octavia.conf`` file

   * In the ``[database]`` section, configure database access:

     .. code-block:: ini

        [database]
        connection = mysql+pymysql://octavia:OCTAVIA_DBPASS@controller/octavia

     Replace OCTAVIA_DBPASS with the password you chose for the Octavia databases.

   * In the ``[DEFAULT]`` section, configure the transport url for RabbitMQ message broker.

     .. code-block:: ini

        [DEFAULT]
        transport_url = rabbit://openstack:RABBIT_PASS@controller

     Replace RABBIT_PASS with the password you chose for the openstack account in RabbitMQ.

   * In the ``[oslo_messaging]`` section, configure the transport url for RabbitMQ message broker and topic name.

     .. code-block:: ini

        [oslo_messaging]
        ...
        topic = octavia_prov

     Replace RABBIT_PASS with the password you chose for the openstack account in RabbitMQ.

   * In the ``[api_settings]`` section, configure the host IP and port to bind to.

     .. code-block:: ini

        [api_settings]
        bind_host = 0.0.0.0
        bind_port = 9876

   * In the ``[keystone_authtoken]`` section, configure Identity service access.

     .. code-block:: ini

        [keystone_authtoken]
        www_authenticate_uri = http://controller:5000
        auth_url = http://controller:5000
        memcached_servers = controller:11211
        auth_type = password
        project_domain_name = Default
        user_domain_name = Default
        project_name = service
        username = octavia
        password = OCTAVIA_PASS

     Replace OCTAVIA_PASS with the password you chose for the octavia user in
     the Identity service.

   * In the ``[service_auth]`` section, configure credentials for using other openstack services

     .. code-block:: ini

        [service_auth]
        auth_url = http://controller:5000
        memcached_servers = controller:11211
        auth_type = password
        project_domain_name = Default
        user_domain_name = Default
        project_name = service
        username = octavia
        password = OCTAVIA_PASS

     Replace OCTAVIA_PASS with the password you chose for the octavia user in
     the Identity service.

   * In the ``[certificates]`` section, configure the absolute path to the CA Certificate, the Private Key for signing, and passphrases.

     .. code-block:: ini

        [certificates]
        ...
        server_certs_key_passphrase = insecure-key-do-not-use-this-key
        ca_private_key_passphrase = not-secure-passphrase
        ca_private_key = /etc/octavia/certs/private/server_ca.key.pem
        ca_certificate = /etc/octavia/certs/server_ca.cert.pem

     .. note::

        The values of ca_private_key_passphrase and server_certs_key_passphrase are default and should not be used in production.
        The server_certs_key_passphrase must be a base64 compatible and 32 characters long string.

   * In the ``[haproxy_amphora]`` section, configure the client certificate and the CA.

     .. code-block:: ini

        [haproxy_amphora]
        ...
        server_ca = /etc/octavia/certs/server_ca-chain.cert.pem
        client_cert = /etc/octavia/certs/private/client.cert-and-key.pem

   * In the ``[health_manager]`` section, configure the IP and port number for heartbeat.

     .. code-block:: ini

        [health_manager]
        ...
        bind_port = 5555
        bind_ip = 172.16.0.2
        controller_ip_port_list = 172.16.0.2:5555

   * In the ``[controller_worker]`` section, configure worker settings.

     .. code-block:: ini

        [controller_worker]
        ...
        amp_image_owner_id = <id of service project>
        amp_image_tag = amphora
        amp_ssh_key_name = mykey
        amp_secgroup_list = <lb-mgmt-sec-grp_id>
        amp_boot_network_list = <lb-mgmt-net_id>
        amp_flavor_id = 200
        network_driver = allowed_address_pairs_driver
        compute_driver = compute_nova_driver
        amphora_driver = amphora_haproxy_rest_driver
        client_ca = /etc/octavia/certs/client_ca.cert.pem

10. Populate the octavia database:

   .. code-block:: console

      # octavia-db-manage --config-file /etc/octavia/octavia.conf upgrade head

Finalize installation
---------------------

Restart the services:

  .. code-block:: console

     # systemctl restart octavia-api octavia-health-manager octavia-housekeeping octavia-worker


text:
require_relative '../declaration/methods'
require_relative '../statement/methods'

module RbVHDL::Ast

  module Statement

    class Generate
      attr_reader   :_owner
      attr_reader   :_label
      attr_reader   :_declarative_item_list
      attr_reader   :_statement_list
      attr_reader   :_annotation

      def initialize(owner, label, &block)
        @_owner                 = owner
        @_label                 = label
        @_declarative_item_list = []
        @_statement_list        = []
        @_annotation            = Hash.new
        if block_given? then
          self.instance_eval(&block)
        end
      end

      include RbVHDL::Ast::Declaration::Methods::BlockItem
      include RbVHDL::Ast::Statement::  Methods::Concurrent
    end

    class IfGenerate < Generate
      attr_reader   :_condition
      def initialize(owner, label, condition, &block)
        @_condition = condition
        super(owner, label, &block)
      end
    end

    class ForGenerate < Generate
      attr_reader   :_index_identifier
      attr_reader   :_index_range
      def initialize(owner, label, index_identifier, index_range, &block)
        @_index_identifier = index_identifier
        @_index_range      = index_range
        super(owner, label, &block)
      end
    end

  end

  def self.if_generate_statement(owner, label, condition, &block)
    _label     = RbVHDL::Ast.label(label)
    _condition = RbVHDL::Ast.expression(condition)
    return RbVHDL::Ast::Statement::IfGenerate.new(owner, _label, _condition, &block)
  end

  def self.for_generate_statement(owner, label, index_identifier, index_range, &block)
    _label            = RbVHDL::Ast.label(label)
    _index_identifier = RbVHDL::Ast.identifier(index_identifier)
    if index_range.class < RbVHDL::Ast::Type::Range then
      return RbVHDL::Ast::Statement::ForGenerate.new(owner, _label, _index_identifier, index_range, &block)
    else
      raise ArgumentError, "#{self.inspect}.#{__method__}(#{index_range.inspect}:#{index_range.class})"
    end
  end

end