text:
%%%%%%%%%%%%%%%%%%%%
%%% Super main
%%%%%%%%%%%%%%%%%%%%
init;

%% Main parameters to choose
% Type of dynamics
dynamics = 'SQG';
% dynamics = '2D';

nb_days =30;

% Deterministic or random model
stochastic_simulation = false;
% Usual SQG model (stochastic_simulation=false)
% or SQG_MU model (stochastic_simulation=true)

% Type of initial condtions
type_data ='Constantin_case2' ;
% 'Vortices' : 2 large anticyclones and 2 large cyclones
%   (used in "Geophysical flow under location uncertainty", Resseguier V.,
%    Memin E., Chapron B.)
% 'Vortices2' : same as 'Vortices' but properly periodized (by Pierre Derian).
% 'Perturbed_vortices' : Same flow with slight small-scale modifications
%   (used in "Chaotic transitions and location uncertainty in geophysical
%    fluid flows", Resseguier V., Memin E., Chapron B.)
% 'Spectrum' : Gaussian random field with a spectrum slope deined by
%   the variable slop_b_ini (default value  = -5/3)
% 'Zero' : Field equal to zero everywhere

% Resolution
%resolution = 128;
%resolution = 512;
resolution = 128;
%resolution = 1024;
%resolution = 2048;

resolution_HR = 1024;

% The number of grid point is resolution^2
% It has to be an even integer

% Forcing

% Forcing or not
forcing = false;
% If yes, there is a forcing
% F = ampli_forcing * odg_b * 1/T_caract * sin( 2 freq_f pi y/L_y)
% % If yes, there is an additionnal velocity V = (0 Vy)
% % with Vy = ampli_forcing * odg_b *  sin( 2 freq_f pi y/L_y)

% Viscosity
Lap_visco.bool = true;

% % Smagorinsky-like viscosity
% Smag.bool = false;
% % HV.bool = false;

% Hyper-viscosity
HV.bool = false;

% Smagorinsky-like diffusivity/viscosity or Hyper-viscosity
Smag.bool = true;

if Lap_visco.bool
    % Ratio between the Shanon resolution and filtering frequency used to
    % filter the heterogenous diffusion coefficient
    v_dealias_ratio_mask_LS = 1./ [1 2 4 8 16 64]';
    v_dealias_ratio_mask_LS = sort(v_dealias_ratio_mask_LS);
    % For Smagorinsky-like diffusivity/viscosity or Hyper-viscosity,
    % Ratio between the Shanon resolution cut-off ( = pi / sqrt( dx*dy) )
    % and the targeted diffusion scale
    v_kappamax_on_kappad = 0.4:0.2:1.2 ;
    v_kappamax_on_kappad = sort(v_kappamax_on_kappad);

    for p=1:length(v_dealias_ratio_mask_LS)
        for q=1:length(v_kappamax_on_kappad)
            Smag(p,q).bool = true;
            Smag(p,q).dealias_ratio_mask_LS = v_dealias_ratio_mask_LS(p);
            Smag(p,q).kappamax_on_kappad = v_kappamax_on_kappad(q);
            Smag(p,q).weight_cst_dissip = 0;
        end
    end
elseif HV.bool
    % Ratio between the Shanon resolution and filtering frequency used to
    % filter the heterogenous diffusion coefficient
    Smag.dealias_ratio_mask_LS = 1

    % For Smagorinsky-like diffusivity/viscosity or Hyper-viscosity,
    % Ratio between the Shanon resolution cut-off ( = pi / sqrt( dx*dy) )
    % and the targeted diffusion scale
    Smag.kappamax_on_kappad = 1.1;% still small oscillations or just pixels?

    % For Smagorinsky-like diffusivity/viscosity or Hyper-viscosity,
    % Factor in front of the additional constant dissipation
    % Set to 0 for no additional constant dissipation
    % % %     HV.weight_cst_dissip = 1/10;% bit of (stable) aliasing
    %     % HV.weight_cst_dissip = 1/3; % still a bit of (stable) aliasing
    %     HV.weight_cst_dissip = 1/3;
    %     % HV.weight_cst_dissip = 0;

    Smag.weight_cst_dissip = 1/1;
    % % %     HV.weight_cst_dissip = 1/10;% bit of (stable) aliasing
else
    Smag.kappamax_on_kappad = 0;
end
%     % Smag.kappamax_on_kappad = 1.1;
%     % % Smag.kappad_on_kappamax = 1/2;
%     if Smag.bool
%         warning('This value needed to be tuned?')
%     end

%% Main
s_Smag = size(Smag);
Smag = Smag(:);
%Smag = Smag(1:2);
ll=length(Smag);
error_vs_t = nan([nb_days,2,ll]);
for j=1:ll
%parfor j=1:ll
    error_vs_t(:,:,j) = post_process_error_grid(...
        stochastic_simulation,type_data,resolution,resolution_HR,...
        forcing,sigma(j),Lap_visco,HV,Smag(j));
end
error_vs_t = reshape(error_vs_t,[nb_days 2 s_Smag]);

%% Folder to save plots and files

% Physical parameters
model = fct_physical_param(dynamics);

% Gather parameters in the structure model
% model.sigma.slope_sigma = slope_sigma;
% model.sigma.kappamin_on_kappamax = kappamin_on_kappamax;
% if strcmp(type_data,'Spectrum')
%     model.slope_b_ini = slope_b_ini;
% end
model.dynamics=dynamics;
model.type_data=type_data;
% model.advection.N_ech=N_ech;
% model.sigma.k_c = k_c;
% model.advection.advection_duration=advection_duration;
% model.advection.plot_dissip = plot_dissip;
% model.advection.plot_moments = plot_moments;
model.advection.forcing.bool = forcing;
% model.advection.forcing.ampli_forcing = ampli_forcing;
% model.advection.forcing.freq_f = freq_f;
% model.advection.forcing.forcing_type = forcing_type;
model.advection.HV = HV;
model.advection.Lap_visco = Lap_visco;
model.advection.Smag = Smag(1);
% model.advection.use_save = use_save;
% model.advection.day_save = day_save;
% model.grid.dealias_method = dealias_method; %de-aliasing method
% %model.Smag.dealias_ratio_mask_LS = dealias_ratio_mask_LS;
% model.plots = plots_bool;
% model.advection.coef_diff = coef_diff;

if model.advection.HV.bool
    add_subgrid_deter = '_HV';
elseif model.advection.Lap_visco.bool
    add_subgrid_deter = '_Lap_visco';
else
    add_subgrid_deter = '_no_deter_subgrid';
    %add_subgrid_deter = [];
end
% if ( model.advection.HV.bool || model.advection.Lap_visco.bool) && ...
%         model.advection.Smag.bool
if ( model.advection.HV.bool | model.advection.Lap_visco.bool) & ...
        model.advection.Smag.bool
    add_subgrid_deter = [add_subgrid_deter '_Smag'];
    %     add_subgrid_deter = [add_subgrid_deter '_kappamax_on_kappad_' ...
    %         fct_num2str(model.advection.Smag.kappamax_on_kappad) ...
    %         '_dealias_ratio_mask_LS_' ...
    %         fct_num2str(model.grid.dealias_ratio_mask_LS)];
end

if ~stochastic_simulation % Deterministic case
    model.folder.folder_simu = [ 'images/usual_' model.dynamics ...
        add_subgrid_deter '/' model.type_data ];
else % Stochastic case
    model.folder.folder_simu = [ 'images/' model.dynamics ...
        '_MU' add_subgrid_deter '/' model.type_data ];
end
if model.advection.forcing.bool
    model.folder.folder_simu = [ model.folder.folder_simu ...
        '_forced_turb' ];
else
    model.folder.folder_simu = [ model.folder.folder_simu ...
        '_free_turb' ];
end
model.folder.folder_simu = [ model.folder.folder_simu ...
    '/' num2str(resolution) 'x' num2str(resolution) ];
% if ( model.advection.HV.bool | model.advection.Lap_visco.bool) & ...
%         model.advection.Smag.bool
%     subgrid_details = ['kappamax_on_kappad_' ...
%         fct_num2str(model.advection.Smag.kappamax_on_kappad) ...
%         '_dealias_ratio_mask_LS_' ...
%         fct_num2str(model.advection.Smag.dealias_ratio_mask_LS)];
%     model.folder.folder_simu = [ model.folder.folder_simu ...
%         '/' subgrid_details ];
% end
% % Create the folders
% fct_create_folder_plots(model)

% % Colormap
% load('BuYlRd.mat');
% model.folder.colormap = BuYlRd; clear BuYlRd
%
% % Version of matlab
% vers = version;
% year = str2double(vers(end-5:end-2));
% subvers = vers(end-1);
% model.folder.colormap_freeze = ...
%     (  year < 2014 || ( year == 2014 && strcmp(subvers,'a') ) );

%%

% if HV.bool
%     add_subgrid_deter = '_HV';
% elseif model.advection.Lap_visco.bool
%     add_subgrid_deter = '_Lap_visco';
% else
%     add_subgrid_deter = '_no_deter_subgrid';
%     %add_subgrid_deter = [];
% end
% % if ( model.advection.HV.bool || model.advection.Lap_visco.bool) && ...
% %         model.advection.Smag.bool
% if ( model.advection.HV.bool | model.advection.Lap_visco.bool) & ...
%         model.advection.Smag.bool
%     add_subgrid_deter = [add_subgrid_deter '_Smag'];
%     %     add_subgrid_deter = [add_subgrid_deter '_kappamax_on_kappad_' ...
%     %         fct_num2str(model.advection.Smag.kappamax_on_kappad) ...
%     %         '_dealias_ratio_mask_LS_' ...
%     %         fct_num2str(model.grid.dealias_ratio_mask_LS)];
% end
%
% if ~stochastic_simulation % Deterministic case
%    folder_simu = [ 'images/usual_' dynamics ...
%         add_subgrid_deter '/' type_data ];
% else % Stochastic case
%     folder_simu = [ 'images/' dynamics ...
%         '_MU' add_subgrid_deter '/' type_data ];
% end
% if forcing.bool
%     folder_simu = [ folder_simu ...
%         '_forced_turb' ];
% else
%     folder_simu = [folder_simu ...
%         '_free_turb' ];
% end
% folder_simu = [ folder_simu ...
%     '/' num2str(resolution) 'x' num2str(resolution) ];
% % if ( HV.bool | model.advection.Lap_visco.bool) & ...
% %         model.advection.Smag.bool
% %     subgrid_details = ['kappamax_on_kappad_' ...
% %         fct_num2str(Smag.kappamax_on_kappad) ...
% %         '_dealias_ratio_mask_LS_' ...
% %         fct_num2str(Smag.dealias_ratio_mask_LS)];
% %     folder_simu = [ folder_simu ...
% %         '/' subgrid_details ];
% % end
% % Create the folders
% model.folder.folder_simu = folder_simu;
% fct_create_folder_plots(model)

%% Save
mean_error = squeeze(mean(error_vs_t,1));
mkdir([model.folder.folder_simu '/error_files']);
save( [model.folder.folder_simu '/error_files/error.mat'], ...
    'model','Smag','v_dealias_ratio_mask_LS','v_kappamax_on_kappad',...
    'error_vs_t','mean_error');

%% Plots
close all
taille_police = 12;

figure(1)
imagesc(v_dealias_ratio_mask_LS,v_kappamax_on_kappad,...
    squeeze(mean_error(1,:,:))');
axis xy;axis equal; colorbar;
ylabel('$(\pi/\Delta x)/k_d$',...
    'FontUnits','points',...
    'interpreter','latex',...
    'FontSize',taille_police,...
    'FontName','Times')
xlabel('Filtering diff. coef.',...
    'interpreter','latex',...
    'FontUnits','points',...
    'FontWeight','normal',...
    'FontSize',taille_police,...
    'FontName','Times')
title('time-mean Spectrum error (m.s$^-2$)',...
    'FontUnits','points',...
    'FontWeight','normal',...
    'interpreter','latex',...
    'FontSize',12,...
    'FontName','Times')

figure(2)
imagesc(v_dealias_ratio_mask_LS,v_kappamax_on_kappad,...
    squeeze(mean_error(2,:,:))');
axis xy;axis equal; colorbar;
ylabel('$(\pi/\Delta x)/k_d$',...
    'FontUnits','points',...
    'interpreter','latex',...
    'FontSize',taille_police,...
    'FontName','Times')
xlabel('Filtering diff. coef.',...
    'interpreter','latex',...
    'FontUnits','points',...
    'FontWeight','normal',...
    'FontSize',taille_police,...
    'FontName','Times')
title('time-mean RMSE (m.s$^-2$)',...
    'FontUnits','points',...
    'FontWeight','normal',...
    'interpreter','latex',...
    'FontSize',12,...
    'FontName','Times')

%% Plots at 7 days
error_7days = squeeze(error_vs_t(8,:,:,:));

figure(3)
imagesc(v_dealias_ratio_mask_LS,v_kappamax_on_kappad,...
    squeeze(error_7days(1,:,:))');
axis xy;axis equal; colorbar;
ylabel('$(\pi/\Delta x)/k_d$',...
    'FontUnits','points',...
    'interpreter','latex',...
    'FontSize',taille_police,...
    'FontName','Times')
xlabel('Filtering diff. coef.',...
    'interpreter','latex',...
    'FontUnits','points',...
    'FontWeight','normal',...
    'FontSize',taille_police,...
    'FontName','Times')
title('Spectrum error (m.s$^-2$) at $7$ days',...
    'FontUnits','points',...
    'FontWeight','normal',...
    'interpreter','latex',...
    'FontSize',12,...
    'FontName','Times')

figure(4)
imagesc(v_dealias_ratio_mask_LS,v_kappamax_on_kappad,...
    squeeze(error_7days(2,:,:))');
axis xy;axis equal; colorbar;
ylabel('$(\pi/\Delta x)/k_d$',...
    'FontUnits','points',...
    'interpreter','latex',...
    'FontSize',taille_police,...
    'FontName','Times')
xlabel('Filtering diff. coef.',...
    'interpreter','latex',...
    'FontUnits','points',...
    'FontWeight','normal',...
    'FontSize',taille_police,...
    'FontName','Times')
title('RMSE (m.s$^-2$) at $7$ days',...
    'FontUnits','points',...
    'FontWeight','normal',...
    'interpreter','latex',...
    'FontSize',12,...
    'FontName','Times')


text:
package tango

import (
	"net/http"
	"text/template"
	"appengine"
	"appengine/user"
	"encoding/json"
)

/**
 * 単語学習ページの表示
 * play.html 学習ページ全体のテンプレート
 */
func play(w http.ResponseWriter, r *http.Request) {
	type Contents struct {
		Words string
	}

	var c appengine.Context
	var u *user.User
	var contents *Contents
	var err error
	var page *template.Template
	var entities []Entity
	var bytes []byte

	c = appengine.NewContext(r)
	u = user.Current(c)

	// 単語一覧を取得
	entities = get(c, u)

	// JSONに変換
	bytes, err = json.Marshal(entities)
	Check(c, err)
	contents = new(Contents)
	contents.Words = string(bytes)

	// ページテンプレート取得
	page, err = template.ParseFiles("server/play.html")
	Check(c, err)

	// 表示
	page.Execute(w, contents)
}

redpajama_set_name: RedPajamaGithub


text:
package edu.uci.isr.xarch.changesets;

import org.w3c.dom.*;

import edu.uci.isr.xarch.*;

import java.util.*;

/**
 * DOM-Based implementation of the IPathReference interface.
 *
 * @author Automatically generated by xArch apigen.
 */
public class PathReferenceImpl implements IPathReference, DOMBased{

	public static final String XSD_TYPE_NSURI = ChangesetsConstants.NS_URI;
	public static final String XSD_TYPE_NAME = "PathReference";

	protected IXArch xArch;

	/** Tag name for xArchPaths in this object. */
	public static final String X_ARCH_PATH_ATTR_NAME = "xArchPath";
	/** Tag name for changeSets in this object. */
	public static final String CHANGE_SET_ELT_NAME = "changeSet";

	protected Element elt;

	private static SequenceOrder seqOrd = new SequenceOrder(
		new QName[]{
			new QName(ChangesetsConstants.NS_URI, CHANGE_SET_ELT_NAME)
		}
	);

	public PathReferenceImpl(Element elt){
		if(elt == null){
			throw new IllegalArgumentException("Element cannot be null.");
		}
		this.elt = elt;
	}

	public Node getDOMNode(){
		return elt;
	}

	public void setDOMNode(Node node){
		if(node.getNodeType() != Node.ELEMENT_NODE){
			throw new IllegalArgumentException("Base DOM node of this type must be an Element.");
		}
		elt = (Element)node;
	}

	protected static SequenceOrder getSequenceOrder(){
		return seqOrd;
	}

	public void setXArch(IXArch xArch){
		this.xArch = xArch;
	}

	public IXArch getXArch(){
		return this.xArch;
	}

	public IXArchElement cloneElement(int depth){
		synchronized(DOMUtils.getDOMLock(elt)){
			Document doc = elt.getOwnerDocument();
			if(depth == 0){
				Element cloneElt = (Element)elt.cloneNode(false);
				cloneElt = (Element)doc.importNode(cloneElt, true);
				PathReferenceImpl cloneImpl = new PathReferenceImpl(cloneElt);
				cloneImpl.setXArch(getXArch());
				return cloneImpl;
			}
			else if(depth == 1){
				Element cloneElt = (Element)elt.cloneNode(false);
				cloneElt = (Element)doc.importNode(cloneElt, true);
				PathReferenceImpl cloneImpl = new PathReferenceImpl(cloneElt);
				cloneImpl.setXArch(getXArch());

				NodeList nl = elt.getChildNodes();
				int size = nl.getLength();
				for(int i = 0; i < size; i++){
					Node n = nl.item(i);
					Node cloneNode = (Node)n.cloneNode(false);
					cloneNode = doc.importNode(cloneNode, true);
					cloneElt.appendChild(cloneNode);
				}
				return cloneImpl;
			}
			else /* depth = infinity */{
				Element cloneElt = (Element)elt.cloneNode(true);
				cloneElt = (Element)doc.importNode(cloneElt, true);
				PathReferenceImpl cloneImpl = new PathReferenceImpl(cloneElt);
				cloneImpl.setXArch(getXArch());
				return cloneImpl;
			}
		}
	}

	//Override 'equals' to be DOM-based...
	public boolean equals(Object o){
		if(o == null){
			return false;
		}
		if(!(o instanceof DOMBased)){
			return super.equals(o);
		}
		DOMBased db = (DOMBased)o;
		Node dbNode = db.getDOMNode();
		return dbNode.equals(getDOMNode());
	}

	//Override 'hashCode' to be based on the underlying node
	public int hashCode(){
		return getDOMNode().hashCode();
	}

	/**
	 * For internal use only.
	 */
	private static Object makeDerivedWrapper(Element elt, String baseTypeName){
		synchronized(DOMUtils.getDOMLock(elt)){
			QName typeName = XArchUtils.getXSIType(elt);
			if(typeName == null){
				return null;
			}
			else{
				if(!DOMUtils.hasXSIType(elt, "http://www.ics.uci.edu/pub/arch/xArch/changesets.xsd", baseTypeName)){
					try{
						String packageTitle = XArchUtils.getPackageTitle(typeName.getNamespaceURI());
						String packageName = XArchUtils.getPackageName(packageTitle);
						String implName = XArchUtils.getImplName(packageName, typeName.getName());
						Class c = Class.forName(implName);
						java.lang.reflect.Constructor con = c.getConstructor(new Class[]{Element.class});
						Object o = con.newInstance(new Object[]{elt});
						return o;
					}
					catch(Exception e){
						//Lots of bad things could happen, but this
						//is OK, because this is best-effort anyway.
					}
				}
				return null;
			}
		}
	}

	public XArchTypeMetadata getTypeMetadata(){
		return IPathReference.TYPE_METADATA;
	}

	public XArchInstanceMetadata getInstanceMetadata(){
		return new XArchInstanceMetadata(XArchUtils.getPackageTitle(elt.getNamespaceURI()));
	}
	/**
	 * Set the xArchPath attribute on this object.
	 * @param xArchPath attribute value.
	 */
	public void setXArchPath(String xArchPath){
		{
			String oldValue = getXArchPath();
			if(oldValue == null ? xArchPath == null : oldValue.equals(xArchPath))
				return;
			DOMUtils.removeAttribute(elt, ChangesetsConstants.NS_URI, X_ARCH_PATH_ATTR_NAME);
			IXArch _x = getXArch();
			if(_x != null){
				_x.fireXArchEvent(
					new XArchEvent(this,
					XArchEvent.CLEAR_EVENT,
					XArchEvent.ATTRIBUTE_CHANGED,
					"xArchPath", oldValue,
					XArchUtils.getDefaultXArchImplementation().isContainedIn(xArch, this), true)
				);
			}
		}
		DOMUtils.setAttribute(elt, ChangesetsConstants.NS_URI, X_ARCH_PATH_ATTR_NAME, xArchPath);
		IXArch _x = getXArch();
		if(_x != null){
			_x.fireXArchEvent(
				new XArchEvent(this,
				XArchEvent.SET_EVENT,
				XArchEvent.ATTRIBUTE_CHANGED,
				"xArchPath", xArchPath,
				XArchUtils.getDefaultXArchImplementation().isContainedIn(xArch, this))
			);
		}
	}

	/**
	 * Removes the xArchPath attribute from this object.
	 */
	public void clearXArchPath(){
		String oldValue = getXArchPath();
		if(oldValue == null)
			return;
		DOMUtils.removeAttribute(elt, ChangesetsConstants.NS_URI, X_ARCH_PATH_ATTR_NAME);
		IXArch _x = getXArch();
		if(_x != null){
			_x.fireXArchEvent(
				new XArchEvent(this,
				XArchEvent.CLEAR_EVENT,
				XArchEvent.ATTRIBUTE_CHANGED,
				"xArchPath", oldValue,
				XArchUtils.getDefaultXArchImplementation().isContainedIn(xArch, this))
			);
		}
	}

	/**
	 * Gets the value of the xArchPath attribute on this object.
	 * @return xArchPath attribute's value or null if that
	 * attribute is not set.
	 */
	public String getXArchPath(){
		return DOMUtils.getAttributeValue(elt, ChangesetsConstants.NS_URI, X_ARCH_PATH_ATTR_NAME);
	}

	/**
	 * Determines if this object's xArchPath attribute has the
	 * given value.
	 * @param xArchPath value to test.
	 * @return true if the values match, false otherwise.
	 * Matching is done by string-matching.
	 */
	public boolean hasXArchPath(String xArchPath){
		return DOMUtils.objNullEq(getXArchPath(), xArchPath);
	}

	public void setChangeSet(edu.uci.isr.xarch.instance.IXMLLink value){
		if(!(value instanceof DOMBased)){
			throw new IllegalArgumentException("Cannot handle non-DOM-based xArch entities.");
		}
		{
			edu.uci.isr.xarch.instance.IXMLLink oldElt = getChangeSet();
			DOMUtils.removeChildren(elt, ChangesetsConstants.NS_URI, CHANGE_SET_ELT_NAME);

			IXArch context = getXArch();
			if(context != null){
				context.fireXArchEvent(
					new XArchEvent(this,
					XArchEvent.CLEAR_EVENT,
					XArchEvent.ELEMENT_CHANGED,
					"changeSet", oldElt,
					XArchUtils.getDefaultXArchImplementation().isContainedIn(xArch, this), true)
				);
			}
		}
		Element newChildElt = (Element)(((DOMBased)value).getDOMNode());
		newChildElt = DOMUtils.cloneAndRename(newChildElt, ChangesetsConstants.NS_URI, CHANGE_SET_ELT_NAME);
		((DOMBased)value).setDOMNode(newChildElt);

		synchronized(DOMUtils.getDOMLock(elt)){
			elt.appendChild(newChildElt);
			DOMUtils.order(elt, getSequenceOrder());
		}

		IXArch context = getXArch();
		if(context != null){
			context.fireXArchEvent(
				new XArchEvent(this,
				XArchEvent.SET_EVENT,
				XArchEvent.ELEMENT_CHANGED,
				"changeSet", value,
				XArchUtils.getDefaultXArchImplementation().isContainedIn(xArch, this))
			);
		}
	}

	public void clearChangeSet(){
		edu.uci.isr.xarch.instance.IXMLLink oldElt = getChangeSet();
		DOMUtils.removeChildren(elt, ChangesetsConstants.NS_URI, CHANGE_SET_ELT_NAME);

		IXArch context = getXArch();
		if(context != null){
			context.fireXArchEvent(
				new XArchEvent(this,
				XArchEvent.CLEAR_EVENT,
				XArchEvent.ELEMENT_CHANGED,
				"changeSet", oldElt,
				XArchUtils.getDefaultXArchImplementation().isContainedIn(xArch, this))
			);
		}
	}

	public edu.uci.isr.xarch.instance.IXMLLink getChangeSet(){
		NodeList nl = DOMUtils.getChildren(elt, ChangesetsConstants.NS_URI, CHANGE_SET_ELT_NAME);
		if(nl.getLength() == 0){
			return null;
		}
		else{
			Element el = (Element)nl.item(0);
			IXArch de = getXArch();
			if(de != null){
				IXArchElement cachedXArchElt = de.getWrapper(el);
				if(cachedXArchElt != null){
					return (edu.uci.isr.xarch.instance.IXMLLink)cachedXArchElt;
				}
			}

			Object o = makeDerivedWrapper(el, "XMLLink");
			if(o != null){
				try{
					((edu.uci.isr.xarch.IXArchElement)o).setXArch(getXArch());
					if(de != null){
						de.cacheWrapper(el, ((edu.uci.isr.xarch.IXArchElement)o));
					}
					return (edu.uci.isr.xarch.instance.IXMLLink)o;
				}
				catch(Exception e){}
			}
			edu.uci.isr.xarch.instance.XMLLinkImpl eltImpl = new edu.uci.isr.xarch.instance.XMLLinkImpl(el);
			eltImpl.setXArch(getXArch());
			if(de != null){
				de.cacheWrapper(el, ((edu.uci.isr.xarch.IXArchElement)eltImpl));
			}
			return eltImpl;
		}
	}

	public boolean hasChangeSet(edu.uci.isr.xarch.instance.IXMLLink value){
		edu.uci.isr.xarch.instance.IXMLLink thisValue = getChangeSet();
		edu.uci.isr.xarch.instance.IXMLLink thatValue = value;

		if((thisValue == null) && (thatValue == null)){
			return true;
		}
		else if((thisValue == null) && (thatValue != null)){
			return false;
		}
		else if((thisValue != null) && (thatValue == null)){
			return false;
		}
		return thisValue.isEquivalent(thatValue);
	}

	public boolean isEquivalent(IPathReference c){
		return (getClass().equals(c.getClass())) &&
		hasXArchPath(c.getXArchPath()) &&
			hasChangeSet(c.getChangeSet()) ;
	}

}


text:
import lldb
from lldbsuite.test.decorators import *
import lldbsuite.test.lldbtest as lldbtest
import lldbsuite.test.lldbutil as lldbutil
import os
import unittest2

class TestSwiftUnknownReference(lldbtest.TestBase):

    mydir = lldbtest.TestBase.compute_mydir(__file__)

    def check_class(self, var_self):
        lldbutil.check_variable(self, var_self, num_children=2)
        m_base_string = var_self.GetChildMemberWithName("base_string")
        m_string = var_self.GetChildMemberWithName("string")
        lldbutil.check_variable(self, m_base_string, summary='"hello"')
        lldbutil.check_variable(self, m_string, summary='"world"')

    @swiftTest
    def test_unknown_objc_ref(self):
        """Test unknown references to Objective-C objects."""
        self.build()
        target, process, thread, bkpt = lldbutil.run_to_source_breakpoint(
            self, 'break here', lldb.SBFileSpec('main.swift'))

        frame = thread.frames[0]
        var_self = frame.FindVariable("self")
        m_pure_ref = var_self.GetChildMemberWithName("pure_ref")
        self.check_class(m_pure_ref)
        m_objc_ref = var_self.GetChildMemberWithName("objc_ref")
        self.check_class(m_objc_ref)

if __name__ == '__main__':
    import atexit
    lldb.SBDebugger.Initialize()
    atexit.register(lldb.SBDebugger.Terminate)
    unittest2.main()


text:
//%2005////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2000, 2001, 2002  BMC Software, Hewlett-Packard Development
// Company, L. P., IBM Corp., The Open Group, Tivoli Systems.
// Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L. P.;
// IBM Corp.; EMC Corporation, The Open Group.
// Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L.P.;
// IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group.
// Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.;
// EMC Corporation; VERITAS Software Corporation; The Open Group.
//
// 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.
//
//==============================================================================
//
// Author: Yi Zhou, Hewlett-Packard Company (yi.zhou@hp.com)
//
// Modified By:
//
//%/////////////////////////////////////////////////////////////////////////////

PEGASUS_NAMESPACE_BEGIN

PEGASUS_USING_STD;

#if defined(PEGASUS_OS_HPUX) || \
    defined(PEGASUS_OS_LINUX)
# define SENDMAIL_CMD "/usr/sbin/sendmail"
# define SENDMAIL_CMD_OPTS "-t -i <"
# define TEMP_MAIL_FILE "tmpMailFile"
# define MAX_SENDMAIL_CMD_LEN 100
# define SH_EXECUTE_FAILED 127
# define TEMP_NAME_LEN L_tmpnam
# include <unistd.h>
#endif

class PEGASUS_HANDLER_LINKAGE EmailListenerDestination: public CIMHandler
{
public:

    EmailListenerDestination()
    {
    }

    virtual ~EmailListenerDestination()
    {
    }

    void initialize(CIMRepository* repository);

    void terminate()
    {
    }

    void handleIndication(
	const OperationContext& context,
	const String nameSpace,
	CIMInstance& indication,
	CIMInstance& handler,
	CIMInstance& subscription,
	ContentLanguages& contentLanguages);

private:

    /**
        Sends the formatted indication to the specified recipients.
	Utility "sendmail" is the default tool to be used. The platform
	maintainer can also choose different tools.

        @param  mailTo         the addresses of the To: field
        @param  mailCc         the addresses of the Cc: field
        @param  mailSubject    the Subject: field of the mail message
        @param  formattedText  the formatted indication
    */

    void _sendViaEmail(
	const Array<String> & mailTo,
	const Array<String> & mailCc,
	const String & mailSubject,
	const String & formattedText);

    /**
        Build the header of the mail message which includes To:, Cc:,
	From:, and Subject: fields

        @param  mailTo         the addresses of the To: field
        @param  mailCc         the addresses of the Cc: field
        @param  mailSubject    the Subject: field of the mail message
        @param  filePtr        the pointer to the temporary file
    */

    void _buildMailHeader(
	const Array<String> & mailTo,
	const Array<String> & mailCc,
	const String & mailSubject,
	FILE * filePtr);

    /**
        Build the mail address string from address array

        @param  mailAddr       the array of the mail addresses

        @return the string of the mail addresses
    */
    String _buildMailAddrStr(
	const Array<String> & mailAddr);

    /**
        Write the mail header string to file

        @param  mailHdrStr     the header string to be written to the file
        @param  filePtr        the pointer to the temporary file
    */
    void _writeStrToFile(
	const String & mailHdrStr,
	FILE * filePtr);

    /**
        Sends the indication via e-mail by opening a pipe to sendmail()

        @param  mailFile       The temporary file name
    */
    void _sendMsg(char * mailFile);

    /**
	Opens a temporary file to hold the indication mail message

        @param  filePtr     the address of the pointer to the open file
        @param  mailFile    the temporary file name
    */
    void _openFile(
	FILE **filePtr,
	char * mailFile);

};

PEGASUS_NAMESPACE_END


text:
//******************************************************************************************************
//  ChannelData.cs - Gbtc
//
//  Copyright © 2017, Grid Protection Alliance.  All Rights Reserved.
//
//  Licensed to the Grid Protection Alliance (GPA) under one or more contributor license agreements. See
//  the NOTICE file distributed with this work for additional information regarding copyright ownership.
//  The GPA licenses this file to you under the MIT License (MIT), the "License"; you may
//  not use this file except in compliance with the License. You may obtain a copy of the License at:
//
//      http://opensource.org/licenses/MIT
//
//  Unless agreed to in writing, the subject software distributed under the License is distributed on an
//  "AS-IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. Refer to the
//  License for the specific language governing permissions and limitations.
//
//  Code Modification History:
//  ----------------------------------------------------------------------------------------------------
//  12/12/2019 - C. Lackner
//       Generated original version of source code.
//
//******************************************************************************************************

using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using GSF;
using GSF.Data;
using GSF.Data.Model;
using Ionic.Zlib;

namespace openXDA.Model
{
    [TableName("ChannelData")]
    public class ChannelData
    {
        #region [ Members ]

        // Nested Types
        private class DataPoint
        {
            public DateTime Time;
            public double Value;
        }

        #endregion

        #region [ Properties ]

        [PrimaryKey(true)]
        public int ID { get; set; }

        public int SeriesID { get; set; }

        public int EventID { get; set; }

        public byte[] TimeDomainData { get; set; }

        public int MarkedForDeletion { get; set; }

        #endregion

        #region [ Methods ]

        /// <summary>
        /// Adjusts the TimeDomain Data by Moving it a certain ammount of Time
        /// </summary>
        /// <param name="ticks"> The number of Ticks the Data is moved. For moving it backwards in Time this needs to be < 0 </param>
        public void AdjustData(Ticks ticks)
        {
            // Initially we assume Data is already migrated...
            if (TimeDomainData == null)
                return;

            Tuple<int, List<DataPoint>> decompressed = Decompress(TimeDomainData)[0];
            List<DataPoint> data = decompressed.Item2;

            foreach (DataPoint dataPoint in data)
                dataPoint.Time = dataPoint.Time.AddTicks(ticks);

            TimeDomainData = ToData(data, decompressed.Item1);
        }

        #endregion

        #region [ Static ]

        public static List<byte[]> DataFromEvent(int eventID, Func<AdoDataConnection> connectionFactory)
        {
            using (AdoDataConnection connection = connectionFactory())
            {
                TableOperations<Event> eventTable = new TableOperations<Event>(connection);
                Event evt = eventTable.QueryRecordWhere("ID = {0}", eventID);

                TableOperations<Asset> assetTable = new TableOperations<Asset>(connection);
                Asset asset = assetTable.QueryRecordWhere("ID = {0}", evt.AssetID);
                asset.ConnectionFactory = connectionFactory;

                List<Channel> channels = asset.DirectChannels
                    .Concat(asset.ConnectedChannels)
                    .Where(channel => channel.MeterID == evt.MeterID)
                    .ToList();

                if (!channels.Any())
                    return new List<byte[]>();

                IEnumerable<int> assetIDs = channels
                    .Select(channel => channel.AssetID)
                    .Distinct();

                foreach (int assetID in assetIDs)
                    MigrateLegacyBlob(connection, evt.FileGroupID, assetID, evt.StartTime);

                // Optimization to avoid individually querying channels that don't have any data
                HashSet<int> channelsWithData = QueryChannelsWithData(connection, evt);
                channels.RemoveAll(channel => !channelsWithData.Contains(channel.ID));

                List<byte[]> eventData = new List<byte[]>();

                foreach (Channel channel in channels)
                {
                    const string DataQueryFormat =
                        "SELECT ChannelData.TimeDomainData " +
                        "FROM " +
                        "    ChannelData JOIN " +
                        "    Series ON ChannelData.SeriesID = Series.ID JOIN " +
                        "    Event ON ChannelData.EventID = Event.ID " +
                        "WHERE " +
                        "    Event.FileGroupID = {0} AND " +
                        "    Series.ChannelID = {1} AND " +
                        "    Event.StartTime = {2}";

                    object startTime2 = ToDateTime2(connection, evt.StartTime);
                    byte[] timeDomainData = connection.ExecuteScalar<byte[]>(DataQueryFormat, evt.FileGroupID, channel.ID, startTime2);

                    if (timeDomainData is null)
                        continue;

                    eventData.Add(timeDomainData);
                }

                return eventData;
            }
        }

        public static byte[] DataFromEvent(int eventID, int channelID, Func<AdoDataConnection> connectionFactory)
        {
            using (AdoDataConnection connection = connectionFactory())
            {
                TableOperations<Event> eventTable = new TableOperations<Event>(connection);
                Event evt = eventTable.QueryRecordWhere("ID = {0}", eventID);
                MigrateLegacyBlob(connection, evt);

                const string QueryFormat =
                    "SELECT ChannelData.TimeDomainData " +
                    "FROM " +
                    "    ChannelData JOIN " +
                    "    Series ON ChannelData.SeriesID = Series.ID " +
                    "WHERE " +
                    "    ChannelData.EventID = {0} AND " +
                    "    Series.ChannelID = {1}";

                return connection.ExecuteScalar<byte[]>(QueryFormat, eventID, channelID);
            }
        }

        private static void MigrateLegacyBlob(AdoDataConnection connection, int fileGroupID, int assetID, DateTime startTime)
        {
            const string AssetQueryFilter = "FileGroupID = {0} AND AssetID = {1} AND StartTime = {2}";
            object startTime2 = ToDateTime2(connection, startTime);

            TableOperations<Event> eventTable = new TableOperations<Event>(connection);
            Event evt = eventTable.QueryRecordWhere(AssetQueryFilter, fileGroupID, assetID, startTime2);
            MigrateLegacyBlob(connection, evt);
        }

        private static void MigrateLegacyBlob(AdoDataConnection connection, Event evt)
        {
            if (evt is null || evt.EventDataID is null)
                return;

            int eventDataID = evt.EventDataID.GetValueOrDefault();
            byte[] timeDomainData = connection.ExecuteScalar<byte[]>("SELECT TimeDomainData FROM EventData WHERE ID = {0}", eventDataID);
            List<Tuple<int, List<DataPoint>>> decompressedData = Decompress(timeDomainData);

            TableOperations<ChannelData> channelDataTable = new TableOperations<ChannelData>(connection);

            foreach (Tuple<int, List<DataPoint>> tuple in decompressedData)
            {
                int seriesID = tuple.Item1;
                List<DataPoint> data = tuple.Item2;

                ChannelData channelData = new ChannelData();
                channelData.SeriesID = seriesID;
                channelData.EventID = evt.ID;
                channelData.TimeDomainData = ToData(data, seriesID);

                try
                {
                    channelDataTable.AddNewRecord(channelData);
                }
                catch (SqlException ex)
                {
                    // Ignore errors regarding unique key constraints
                    // which can occur as a result of a race condition
                    bool isUniqueViolation = (ex.Number == 2601) || (ex.Number == 2627);

                    if (!isUniqueViolation)
                        throw;
                }
            }

            connection.ExecuteNonQuery("UPDATE Event SET EventDataID = NULL WHERE ID = {0}", evt.ID);
            connection.ExecuteNonQuery("DELETE FROM EventData WHERE ID = {0}", eventDataID);
        }

        private static byte[] ToData(List<DataPoint> data, int seriesID)
        {
            var timeSeries = data.Select(dataPoint => new { Time = dataPoint.Time.Ticks, Compressed = false }).ToList();

            for (int i = 1; i < timeSeries.Count; i++)
            {
                long previousTimestamp = data[i - 1].Time.Ticks;
                long timestamp = timeSeries[i].Time;
                long diff = timestamp - previousTimestamp;

                if (diff >= 0 && diff <= ushort.MaxValue)
                    timeSeries[i] = new { Time = diff, Compressed = true };
            }

            int timeSeriesByteLength = timeSeries.Sum(obj => obj.Compressed ? sizeof(ushort) : sizeof(int) + sizeof(long));
            int dataSeriesByteLength = sizeof(int) + (2 * sizeof(double)) + (data.Count * sizeof(ushort));
            int totalByteLength = sizeof(int) + timeSeriesByteLength + dataSeriesByteLength;

            byte[] result = new byte[totalByteLength];
            int offset = 0;

            offset += LittleEndian.CopyBytes(data.Count, result, offset);

            List<int> uncompressedIndexes = timeSeries
                .Select((obj, Index) => new { obj.Compressed, Index })
                .Where(obj => !obj.Compressed)
                .Select(obj => obj.Index)
                .ToList();

            for (int i = 0; i < uncompressedIndexes.Count; i++)
            {
                int index = uncompressedIndexes[i];
                int nextIndex = (i + 1 < uncompressedIndexes.Count) ? uncompressedIndexes[i + 1] : timeSeries.Count;

                offset += LittleEndian.CopyBytes(nextIndex - index, result, offset);
                offset += LittleEndian.CopyBytes(timeSeries[index].Time, result, offset);

                for (int j = index + 1; j < nextIndex; j++)
                    offset += LittleEndian.CopyBytes((ushort)timeSeries[j].Time, result, offset);
            }

            const ushort NaNValue = ushort.MaxValue;
            const ushort MaxCompressedValue = ushort.MaxValue - 1;
            double range = data.Select(item => item.Value).Max() - data.Select(item => item.Value).Min();
            double decompressionOffset = data.Select(item => item.Value).Min();
            double decompressionScale = range / MaxCompressedValue;
            double compressionScale = (decompressionScale != 0.0D) ? 1.0D / decompressionScale : 0.0D;

            offset += LittleEndian.CopyBytes(seriesID, result, offset);
            offset += LittleEndian.CopyBytes(decompressionOffset, result, offset);
            offset += LittleEndian.CopyBytes(decompressionScale, result, offset);

            foreach (DataPoint dataPoint in data)
            {
                ushort compressedValue = (ushort)Math.Round((dataPoint.Value - decompressionOffset) * compressionScale);

                if (compressedValue == NaNValue)
                    compressedValue--;

                if (double.IsNaN(dataPoint.Value))
                    compressedValue = NaNValue;

                offset += LittleEndian.CopyBytes(compressedValue, result, offset);
            }

            byte[] returnArray = GZipStream.CompressBuffer(result);
            returnArray[0] = 0x44;
            returnArray[1] = 0x33;

            return returnArray;
        }

        private static List<Tuple<int, List<DataPoint>>> Decompress(byte[] data)
        {
            List<Tuple<int, List<DataPoint>>> result = new List<Tuple<int, List<DataPoint>>>();

            if (data == null)
                return result;
            // If the blob contains the GZip header,
            // use the legacy deserialization algorithm
            if (data[0] == 0x1F && data[1] == 0x8B)
            {
                return Decompress_Legacy(data);
            }

            // Restore the GZip header before uncompressing
            data[0] = 0x1F;
            data[1] = 0x8B;

            byte[] uncompressedData;
            int offset;

            uncompressedData = GZipStream.UncompressBuffer(data);
            offset = 0;

            int m_samples = LittleEndian.ToInt32(uncompressedData, offset);
            offset += sizeof(int);

            List<DateTime> times = new List<DateTime>();

            while (times.Count < m_samples)
            {
                int timeValues = LittleEndian.ToInt32(uncompressedData, offset);
                offset += sizeof(int);

                long currentValue = LittleEndian.ToInt64(uncompressedData, offset);
                offset += sizeof(long);
                times.Add(new DateTime(currentValue));

                for (int i = 1; i < timeValues; i++)
                {
                    currentValue += LittleEndian.ToUInt16(uncompressedData, offset);
                    offset += sizeof(ushort);
                    times.Add(new DateTime(currentValue));
                }
            }

            while (offset < uncompressedData.Length)
            {
                List<DataPoint> dataSeries = new List<DataPoint>();
                int seriesID = LittleEndian.ToInt32(uncompressedData, offset);
                offset += sizeof(int);

                const ushort NaNValue = ushort.MaxValue;
                double decompressionOffset = LittleEndian.ToDouble(uncompressedData, offset);
                double decompressionScale = LittleEndian.ToDouble(uncompressedData, offset + sizeof(double));
                offset += 2 * sizeof(double);

                for (int i = 0; i < m_samples; i++)
                {
                    ushort compressedValue = LittleEndian.ToUInt16(uncompressedData, offset);
                    offset += sizeof(ushort);

                    double decompressedValue = decompressionScale * compressedValue + decompressionOffset;

                    if (compressedValue == NaNValue)
                        decompressedValue = double.NaN;

                    dataSeries.Add(new DataPoint()
                    {
                        Time = times[i],
                        Value = decompressedValue
                    });
                }

                    result.Add(new Tuple<int, List<DataPoint>>(seriesID, dataSeries));
            }

            return result;
        }

        private static List<Tuple<int, List<DataPoint>>> Decompress_Legacy(byte[] data)
        {
            List<Tuple<int, List<DataPoint>>> result = new List<Tuple<int, List<DataPoint>>>();
            byte[] uncompressedData;
            int offset;
            DateTime[] times;
            int seriesID;

            uncompressedData = GZipStream.UncompressBuffer(data);
            offset = 0;

            int m_samples = LittleEndian.ToInt32(uncompressedData, offset);
            offset += sizeof(int);

            times = new DateTime[m_samples];

            for (int i = 0; i < m_samples; i++)
            {
                times[i] = new DateTime(LittleEndian.ToInt64(uncompressedData, offset));
                offset += sizeof(long);
            }

            while (offset < uncompressedData.Length)
            {
                seriesID = LittleEndian.ToInt32(uncompressedData, offset);
                offset += sizeof(int);

                List<DataPoint> points = new List<DataPoint>();

                for (int i = 0; i < m_samples; i++)
                {
                    points.Add(new DataPoint()
                    {
                        Time = times[i],
                        Value = LittleEndian.ToDouble(uncompressedData, offset)
                    });

                    offset += sizeof(double);
                }

                result.Add(new Tuple<int, List<DataPoint>>(seriesID, points));
            }
            return result;
        }

        private static HashSet<int> QueryChannelsWithData(AdoDataConnection connection, Event evt)
        {
            const string FilterQueryFormat =
                "SELECT Series.ChannelID " +
                "FROM " +
                "    ChannelData JOIN " +
                "    Series ON ChannelData.SeriesID = Series.ID JOIN " +
                "    Event ON ChannelData.EventID = Event.ID " +
                "WHERE " +
                "    Event.FileGroupID = {0} AND " +
                "    Event.StartTime = {1}";

            object startTime2 = ToDateTime2(connection, evt.StartTime);

            using (DataTable table = connection.RetrieveData(FilterQueryFormat, evt.FileGroupID, startTime2))
            {
                IEnumerable<int> channelsWithData = table
                    .AsEnumerable()
                    .Select(row => row.ConvertField<int>("ChannelID"));

                return new HashSet<int>(channelsWithData);
            }
        }

        private static object ToDateTime2(AdoDataConnection connection, DateTime dateTime)
        {
            using (IDbCommand command = connection.Connection.CreateCommand())
            {
                IDbDataParameter parameter = command.CreateParameter();
                parameter.DbType = DbType.DateTime2;
                parameter.Value = dateTime;
                return parameter;
            }
        }

        #endregion
    }
}


text:
package aot1.analyzer;

import aot1.parser.Parser;
import aot1.parser.models.Layer3Packet;
import aot1.utils.generics.Observable;
import org.apache.log4j.Logger;

/**
 * Packet size analyzer
 * Created by kubac65 on 05/02/17.
 */
public class PacketSizeAnalyzer extends Analyzer<PacketSizeAnalyzer.Output> {

    /**
     * Packet size analyzer output
     */
    public static class Output {

        /**
         * Min packet size
         */
        private int minSize;

        /**
         * Max packet size
         */
        private int maxSize;

        /**
         * Avg packet size
         */
        private int avgSize;

        /**
         * Gets min packet size
         *
         * @return min packet size
         */
        public int getMinSize() {
            return minSize;
        }

        /**
         * Gets max packet size
         *
         * @return max packet size
         */
        public int getMaxSize() {
            return maxSize;
        }

        /**
         * Gets avg packet size
         *
         * @return avg packet size
         */
        public int getAvgSize() {
            return avgSize;
        }
    }

    private int minSize;
    private int maxSize;
    private int avgSize;

    private long tempSum = 0;
    private int count = 0;

    /**
     * Creates an instance of the packet analyzer
     *
     * @param parser Traffic parser
     * @param log    Application logger
     */
    protected PacketSizeAnalyzer(Parser parser, Logger log) {
        super(parser, log);
    }

    @Override
    public void update(Observable<Layer3Packet> source, Layer3Packet object) {
        boolean update = false;

        int packetBytes = object.getTotBytes();
        if (this.minSize == 0) {
            this.minSize = packetBytes;
            update = true;
        }

        if (packetBytes > this.maxSize) {
            this.maxSize = packetBytes;
            update = true;
        } else if (packetBytes < this.minSize) {
            this.minSize = packetBytes;
            update = true;
        }

        this.tempSum += packetBytes;
        this.count++;
        int newAvg = (int) (this.tempSum / count);

        if (newAvg != this.avgSize) {
            this.avgSize = newAvg;
            update = true;
        }

        if (update) {
            Output o = new Output();
            o.minSize = this.minSize;
            o.maxSize = this.maxSize;
            o.avgSize = this.avgSize;
            this.notifyObservers(o);
        }
    }
}


text:
from __future__ import division
import numpy as np
import matplotlib.pyplot as plt

import csv
from os import listdir
from os.path import isfile, join
import sys

mypath = "/home/davinciwin/Algos/Amish_data"
output_path = "/home/davinciwin/Algos"
onlyfiles = [f for f in listdir(mypath) if isfile(join(mypath, f))]

error = dict()
only_error = []
quality = float(sys.argv[1])
name = sys.argv[2]
optimum = int(sys.argv[3])
for i in range(len(onlyfiles)):

    input_file_reader = csv.reader(
        open(mypath + "/" + onlyfiles[i]), delimiter=',')
    counter = 0
    row_error = []
    row_time = []
    for row in input_file_reader:
        if(float(row[0]) > quality):
            print row[0], quality
            error[row[0]] = (int(row[1]) - optimum) / optimum
            only_error.append((int(row[1]) - optimum) / optimum)
            break
        # print row[1]

storage_time = []
print only_error

only_error.sort()
# print storage_time

output_file = open(output_path + "/" + "results" + "_" +
                   name + str(quality) + str(optimum) + "sqd.txt", 'w')

counter = -1
test = only_error[0]
test_array = []
count_array = []
while(test < float(max(only_error))):
    counter += 1
    test = only_error[counter]
    count = 0
    for m in range(len(only_error)):
        if(only_error[m] <= test):
            count += 1
    output_file.write(str(test) + "," + str(count / 10) + "\n")
    test_array.append(test)
    count_array.append(count / 10)

# plt.plot(test_array,count_array)
# plt.show()


text:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns2:cmClass xmlns:ns2="test.modeling.uml.basic.cm">
    <name>IMyInterface</name>
    <visibilityKind>0</visibilityKind>
    <ID>TYPE_2</ID>
    <packageID>PACKAGE_2</packageID>
    <isInterface>true</isInterface>
    <abstract>false</abstract>
    <finalSpecialization>false</finalSpecialization>
    <superClasseIDs/>
    <ownedOperations>
        <operation>
            <name>method2</name>
            <visibilityKind>0</visibilityKind>
            <typeID>TYPE_Void</typeID>
            <abstract>false</abstract>
            <static>false</static>
            <finalSpecialization>false</finalSpecialization>
            <parameters/>
            <exceptions/>
        </operation>
    </ownedOperations>
    <ownedAttributes/>
</ns2:cmClass>


text: This folder contains examples using the [VSPK-Go](https://github.com/nuagenetworks/vspk-go)


text:
class EucjpMecabIpadicRequirement < Requirement
  fatal true

  def initialize(tags = [])
    super
    @mecab_ipadic_installed = Formula["mecab-ipadic"].installed?
  end

  satisfy(:build_env => false) { @mecab_ipadic_installed && mecab_dic_charset == "euc" }

  def message
    if @mecab_ipadic_installed
      <<~EOS
        Hyper Estraier supports only the EUC-JP version of MeCab-IPADIC.
        However, you have installed the #{mecab_dic_charset} version so far.

        You have to reinstall your mecab-ipadic package manually with the
        --with-charset=euc option before resuming the hyperestraier installation,
        or you have to build hyperestraier without MeCab support.

        To reinstall your mecab-ipadic and resume the hyperestraier installation:

            $ brew uninstall mecab-ipadic
            $ brew install mecab-ipadic --with-charset=euc
            $ brew install hyperestraier --enable-mecab

        To build hyperestraier without MeCab support:

            $ brew install hyperestraier
      EOS
    else
      <<~EOS
        An EUC-JP version of MeCab-IPADIC is required. You have to install your
        mecab-ipadic package manually with the --with-charset=euc option before
        resuming the hyperestraier installation, or you have to build hyperestraier
        without MeCab support.

        To install an EUC-JP version of mecab-ipadic and resume the hyperestraier
        installation:

            $ brew install mecab-ipadic --with-charset=euc
            $ brew install hyperestraier --enable-mecab

        To build hyperestraier without MeCab support:

            $ brew install hyperestraier
      EOS
    end
  end

  def mecab_dic_charset
    /^charset:\t(\S+)$/ =~ `mecab -D` && Regexp.last_match[1]
  end
end

class Hyperestraier < Formula
  desc "Full-text search system for communities"
  homepage "http://fallabs.com/hyperestraier/index.html"
  url "http://fallabs.com/hyperestraier/hyperestraier-1.4.13.tar.gz"
  sha256 "496f21190fa0e0d8c29da4fd22cf5a2ce0c4a1d0bd34ef70f9ec66ff5fbf63e2"

  bottle do
    cellar :any
    sha256 "f0eeb8e60dc0639fdbf5c15fc22c954a627b5136525021706876972b5bfdd816" => :high_sierra
    sha256 "c6018d888e9a4f03546f1727d9ec7b6d7eb6a87fc4f6755667bdafa71929aca7" => :sierra
    sha256 "c90ef2d3ccac1af3247726697be33748ec53df85a98af4611b6dbfc9a8dca0c7" => :el_capitan
    sha256 "d18c19a9d691e2bd209cc05006b608776066352d297865238cc7262a527a82bd" => :yosemite
    sha256 "b52c716897730a939ba7763492b7b1080a70c918b07571f4a4e296aea42f42ee" => :mavericks
  end

  depends_on "qdbm"
  depends_on "mecab" => :optional

  if build.with? "mecab"
    depends_on "mecab-ipadic"
    depends_on EucjpMecabIpadicRequirement
  end

  deprecated_option "enable-mecab" => "with-mecab"

  def install
    args = %W[
      --disable-debug
      --disable-dependency-tracking
      --prefix=#{prefix}
    ]

    args << "--enable-mecab" if build.with? "mecab"

    system "./configure", *args
    system "make", "mac"
    system "make", "check-mac"
    system "make", "install-mac"
  end

  test do
    system "#{bin}/estcmd", "version"
  end
end


text:
package com.azure.resourcemanager.logic.implementation;

import com.azure.core.http.rest.PagedIterable;
import com.azure.core.http.rest.Response;
import com.azure.core.http.rest.SimpleResponse;
import com.azure.core.util.Context;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.logic.fluent.IntegrationServiceEnvironmentsClient;
import com.azure.resourcemanager.logic.fluent.models.IntegrationServiceEnvironmentInner;
import com.azure.resourcemanager.logic.models.IntegrationServiceEnvironment;
import com.azure.resourcemanager.logic.models.IntegrationServiceEnvironments;
import com.fasterxml.jackson.annotation.JsonIgnore;

public final class IntegrationServiceEnvironmentsImpl implements IntegrationServiceEnvironments {
    @JsonIgnore private final ClientLogger logger = new ClientLogger(IntegrationServiceEnvironmentsImpl.class);

    private final IntegrationServiceEnvironmentsClient innerClient;

    private final com.azure.resourcemanager.logic.LogicManager serviceManager;

    public IntegrationServiceEnvironmentsImpl(
        IntegrationServiceEnvironmentsClient innerClient, com.azure.resourcemanager.logic.LogicManager serviceManager) {
        this.innerClient = innerClient;
        this.serviceManager = serviceManager;
    }

    public PagedIterable<IntegrationServiceEnvironment> list() {
        PagedIterable<IntegrationServiceEnvironmentInner> inner = this.serviceClient().list();
        return Utils.mapPage(inner, inner1 -> new IntegrationServiceEnvironmentImpl(inner1, this.manager()));
    }

    public PagedIterable<IntegrationServiceEnvironment> list(Integer top, Context context) {
        PagedIterable<IntegrationServiceEnvironmentInner> inner = this.serviceClient().list(top, context);
        return Utils.mapPage(inner, inner1 -> new IntegrationServiceEnvironmentImpl(inner1, this.manager()));
    }

    public PagedIterable<IntegrationServiceEnvironment> listByResourceGroup(String resourceGroup) {
        PagedIterable<IntegrationServiceEnvironmentInner> inner =
            this.serviceClient().listByResourceGroup(resourceGroup);
        return Utils.mapPage(inner, inner1 -> new IntegrationServiceEnvironmentImpl(inner1, this.manager()));
    }

    public PagedIterable<IntegrationServiceEnvironment> listByResourceGroup(
        String resourceGroup, Integer top, Context context) {
        PagedIterable<IntegrationServiceEnvironmentInner> inner =
            this.serviceClient().listByResourceGroup(resourceGroup, top, context);
        return Utils.mapPage(inner, inner1 -> new IntegrationServiceEnvironmentImpl(inner1, this.manager()));
    }

    public IntegrationServiceEnvironment getByResourceGroup(
        String resourceGroup, String integrationServiceEnvironmentName) {
        IntegrationServiceEnvironmentInner inner =
            this.serviceClient().getByResourceGroup(resourceGroup, integrationServiceEnvironmentName);
        if (inner != null) {
            return new IntegrationServiceEnvironmentImpl(inner, this.manager());
        } else {
            return null;
        }
    }

    public Response<IntegrationServiceEnvironment> getByResourceGroupWithResponse(
        String resourceGroup, String integrationServiceEnvironmentName, Context context) {
        Response<IntegrationServiceEnvironmentInner> inner =
            this
                .serviceClient()
                .getByResourceGroupWithResponse(resourceGroup, integrationServiceEnvironmentName, context);
        if (inner != null) {
            return new SimpleResponse<>(
                inner.getRequest(),
                inner.getStatusCode(),
                inner.getHeaders(),
                new IntegrationServiceEnvironmentImpl(inner.getValue(), this.manager()));
        } else {
            return null;
        }
    }

    public void deleteByResourceGroup(String resourceGroup, String integrationServiceEnvironmentName) {
        this.serviceClient().delete(resourceGroup, integrationServiceEnvironmentName);
    }

    public Response<Void> deleteWithResponse(
        String resourceGroup, String integrationServiceEnvironmentName, Context context) {
        return this.serviceClient().deleteWithResponse(resourceGroup, integrationServiceEnvironmentName, context);
    }

    public void restart(String resourceGroup, String integrationServiceEnvironmentName) {
        this.serviceClient().restart(resourceGroup, integrationServiceEnvironmentName);
    }

    public Response<Void> restartWithResponse(
        String resourceGroup, String integrationServiceEnvironmentName, Context context) {
        return this.serviceClient().restartWithResponse(resourceGroup, integrationServiceEnvironmentName, context);
    }

    public IntegrationServiceEnvironment getById(String id) {
        String resourceGroup = Utils.getValueFromIdByName(id, "resourceGroups");
        if (resourceGroup == null) {
            throw logger
                .logExceptionAsError(
                    new IllegalArgumentException(
                        String
                            .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
        }
        String integrationServiceEnvironmentName = Utils.getValueFromIdByName(id, "integrationServiceEnvironments");
        if (integrationServiceEnvironmentName == null) {
            throw logger
                .logExceptionAsError(
                    new IllegalArgumentException(
                        String
                            .format(
                                "The resource ID '%s' is not valid. Missing path segment"
                                    + " 'integrationServiceEnvironments'.",
                                id)));
        }
        return this
            .getByResourceGroupWithResponse(resourceGroup, integrationServiceEnvironmentName, Context.NONE)
            .getValue();
    }

    public Response<IntegrationServiceEnvironment> getByIdWithResponse(String id, Context context) {
        String resourceGroup = Utils.getValueFromIdByName(id, "resourceGroups");
        if (resourceGroup == null) {
            throw logger
                .logExceptionAsError(
                    new IllegalArgumentException(
                        String
                            .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
        }
        String integrationServiceEnvironmentName = Utils.getValueFromIdByName(id, "integrationServiceEnvironments");
        if (integrationServiceEnvironmentName == null) {
            throw logger
                .logExceptionAsError(
                    new IllegalArgumentException(
                        String
                            .format(
                                "The resource ID '%s' is not valid. Missing path segment"
                                    + " 'integrationServiceEnvironments'.",
                                id)));
        }
        return this.getByResourceGroupWithResponse(resourceGroup, integrationServiceEnvironmentName, context);
    }

    public void deleteById(String id) {
        String resourceGroup = Utils.getValueFromIdByName(id, "resourceGroups");
        if (resourceGroup == null) {
            throw logger
                .logExceptionAsError(
                    new IllegalArgumentException(
                        String
                            .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
        }
        String integrationServiceEnvironmentName = Utils.getValueFromIdByName(id, "integrationServiceEnvironments");
        if (integrationServiceEnvironmentName == null) {
            throw logger
                .logExceptionAsError(
                    new IllegalArgumentException(
                        String
                            .format(
                                "The resource ID '%s' is not valid. Missing path segment"
                                    + " 'integrationServiceEnvironments'.",
                                id)));
        }
        this.deleteWithResponse(resourceGroup, integrationServiceEnvironmentName, Context.NONE).getValue();
    }

    public Response<Void> deleteByIdWithResponse(String id, Context context) {
        String resourceGroup = Utils.getValueFromIdByName(id, "resourceGroups");
        if (resourceGroup == null) {
            throw logger
                .logExceptionAsError(
                    new IllegalArgumentException(
                        String
                            .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
        }
        String integrationServiceEnvironmentName = Utils.getValueFromIdByName(id, "integrationServiceEnvironments");
        if (integrationServiceEnvironmentName == null) {
            throw logger
                .logExceptionAsError(
                    new IllegalArgumentException(
                        String
                            .format(
                                "The resource ID '%s' is not valid. Missing path segment"
                                    + " 'integrationServiceEnvironments'.",
                                id)));
        }
        return this.deleteWithResponse(resourceGroup, integrationServiceEnvironmentName, context);
    }

    private IntegrationServiceEnvironmentsClient serviceClient() {
        return this.innerClient;
    }

    private com.azure.resourcemanager.logic.LogicManager manager() {
        return this.serviceManager;
    }

    public IntegrationServiceEnvironmentImpl define(String name) {
        return new IntegrationServiceEnvironmentImpl(name, this.manager());
    }
}


text:
package T145.magistics.common;

import T145.magistics.common.blocks.BlockResearchApparatus;
import T145.magistics.common.blocks.base.BlockItemBase;
import T145.magistics.common.items.curios.ItemCodexArcanum;
import T145.magistics.common.tiles.TileResearchApparatus;
import net.minecraft.block.Block;
import net.minecraft.item.Item;
import net.minecraft.item.ItemBlock;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.SoundEvent;
import net.minecraftforge.client.event.ModelRegistryEvent;
import net.minecraftforge.event.RegistryEvent;
import net.minecraftforge.fml.common.Mod.EventBusSubscriber;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.common.registry.GameRegistry;
import net.minecraftforge.registries.IForgeRegistry;

@GameRegistry.ObjectHolder(Magistics.ID)
public class MagisticsLoader {

	public static final BlockResearchApparatus RESEARCH_TABLE = new BlockResearchApparatus(true);
	public static final BlockResearchApparatus PEDESTAL = new BlockResearchApparatus(false);

	public static final ItemCodexArcanum CODEX_ARCANUM = new ItemCodexArcanum();

	public static final SoundEvent SOUND_ATTACH = getSoundEvent("attach");
	public static final SoundEvent SOUND_BEAMLOOP = getSoundEvent("beamloop");
	public static final SoundEvent SOUND_BUBBLING = getSoundEvent("bubbling");
	public static final SoundEvent SOUND_CREAKING1 = getSoundEvent("creaking1");
	public static final SoundEvent SOUND_CREAKING2 = getSoundEvent("creaking2");
	public static final SoundEvent SOUND_ELECLOOP = getSoundEvent("elecloop");
	public static final SoundEvent SOUND_FIRELOOP = getSoundEvent("fireloop");
	public static final SoundEvent SOUND_GORE1 = getSoundEvent("gore1");
	public static final SoundEvent SOUND_GORE2 = getSoundEvent("gore2");
	public static final SoundEvent SOUND_HEAL = getSoundEvent("heal");
	public static final SoundEvent SOUND_INFUSER = getSoundEvent("infuser");
	public static final SoundEvent SOUND_INFUSER_DARK = getSoundEvent("infuserdark");
	public static final SoundEvent SOUND_LEARN = getSoundEvent("learn");
	public static final SoundEvent SOUND_MONOLITH = getSoundEvent("monolith");
	public static final SoundEvent SOUND_MONOLITH_FOUND = getSoundEvent("monolithfound");
	public static final SoundEvent SOUND_PAGE1 = getSoundEvent("page1");
	public static final SoundEvent SOUND_PAGE2 = getSoundEvent("page2");
	public static final SoundEvent SOUND_PORTAL_CLOSE = getSoundEvent("pclose");
	public static final SoundEvent SOUND_PLACE = getSoundEvent("place");
	public static final SoundEvent SOUND_POD_BURST = getSoundEvent("podburst");
	public static final SoundEvent SOUND_PORTAL_OPEN = getSoundEvent("popen");
	public static final SoundEvent SOUND_RECOVER = getSoundEvent("recover");
	public static final SoundEvent SOUND_ROOTS = getSoundEvent("roots");
	public static final SoundEvent SOUND_RUMBLE = getSoundEvent("rumble");
	public static final SoundEvent SOUND_RUNE_SET = getSoundEvent("runeset");
	public static final SoundEvent SOUND_SCRIBBLE = getSoundEvent("scribble");
	public static final SoundEvent SOUND_SHOCK1 = getSoundEvent("shock1");
	public static final SoundEvent SOUND_SHOCK2 = getSoundEvent("shock2");
	public static final SoundEvent SOUND_SINGULARITY = getSoundEvent("singularity");
	public static final SoundEvent SOUND_STOMP1 = getSoundEvent("stomp1");
	public static final SoundEvent SOUND_STOMP2 = getSoundEvent("stomp2");
	public static final SoundEvent SOUND_STONE_CLOSE = getSoundEvent("stoneclose");
	public static final SoundEvent SOUND_STONE_OPEN = getSoundEvent("stoneopen");
	public static final SoundEvent SOUND_SUCK = getSoundEvent("suck");
	public static final SoundEvent SOUND_SWING1 = getSoundEvent("swing1");
	public static final SoundEvent SOUND_SWING2 = getSoundEvent("swing2");
	public static final SoundEvent SOUND_TINKERING = getSoundEvent("tinkering");
	public static final SoundEvent SOUND_TOOL1 = getSoundEvent("tool1");
	public static final SoundEvent SOUND_TOOL2 = getSoundEvent("tool2");
	public static final SoundEvent SOUND_UPGRADE = getSoundEvent("upgrade");
	public static final SoundEvent SOUND_WHISPER = getSoundEvent("whisper");
	public static final SoundEvent SOUND_WIND1 = getSoundEvent("wind1");
	public static final SoundEvent SOUND_WIND2 = getSoundEvent("wind2");
	public static final SoundEvent SOUND_ZAP1 = getSoundEvent("zap1");
	public static final SoundEvent SOUND_ZAP2 = getSoundEvent("zap2");

	public static final SoundEvent getSoundEvent(String name) {
		return new SoundEvent(new ResourceLocation(Magistics.ID, name)).setRegistryName(name);
	}

	@EventBusSubscriber(modid = Magistics.ID)
	public static class ServerLoader {

		@SubscribeEvent
		public static void registerSounds(final RegistryEvent.Register<SoundEvent> event) {
			final IForgeRegistry<SoundEvent> registry = event.getRegistry();
			registry.register(SOUND_ATTACH);
			registry.register(SOUND_BEAMLOOP);
			registry.register(SOUND_BUBBLING);
			registry.register(SOUND_CREAKING1);
			registry.register(SOUND_CREAKING2);
			registry.register(SOUND_ELECLOOP);
			registry.register(SOUND_FIRELOOP);
			registry.register(SOUND_GORE1);
			registry.register(SOUND_GORE2);
			registry.register(SOUND_HEAL);
			registry.register(SOUND_INFUSER);
			registry.register(SOUND_INFUSER_DARK);
			registry.register(SOUND_LEARN);
			registry.register(SOUND_MONOLITH);
			registry.register(SOUND_MONOLITH_FOUND);
			registry.register(SOUND_PAGE1);
			registry.register(SOUND_PAGE2);
			registry.register(SOUND_PORTAL_CLOSE);
			registry.register(SOUND_PLACE);
			registry.register(SOUND_POD_BURST);
			registry.register(SOUND_PORTAL_OPEN);
			registry.register(SOUND_RECOVER);
			registry.register(SOUND_ROOTS);
			registry.register(SOUND_RUMBLE);
			registry.register(SOUND_RUNE_SET);
			registry.register(SOUND_SCRIBBLE);
			registry.register(SOUND_SHOCK1);
			registry.register(SOUND_SHOCK2);
			registry.register(SOUND_SINGULARITY);
			registry.register(SOUND_STOMP1);
			registry.register(SOUND_STOMP2);
			registry.register(SOUND_STONE_CLOSE);
			registry.register(SOUND_STONE_OPEN);
			registry.register(SOUND_SUCK);
			registry.register(SOUND_SWING1);
			registry.register(SOUND_SWING2);
			registry.register(SOUND_TINKERING);
			registry.register(SOUND_TOOL1);
			registry.register(SOUND_TOOL2);
			registry.register(SOUND_UPGRADE);
			registry.register(SOUND_WHISPER);
			registry.register(SOUND_WIND1);
			registry.register(SOUND_WIND2);
			registry.register(SOUND_ZAP1);
			registry.register(SOUND_ZAP2);
		}

		@SubscribeEvent
		public static void registerBlocks(final RegistryEvent.Register<Block> event) {
			final IForgeRegistry<Block> registry = event.getRegistry();
			registry.register(RESEARCH_TABLE);
			registry.register(PEDESTAL);
			registerTileEntity(TileResearchApparatus.class);
		}

		private static void registerTileEntity(Class tileClass) {
			GameRegistry.registerTileEntity(tileClass, tileClass.getSimpleName());
		}

		@SubscribeEvent
		public static void registerItems(final RegistryEvent.Register<Item> event) {
			final IForgeRegistry<Item> registry = event.getRegistry();
			registerItemBlock(registry, RESEARCH_TABLE);
			registerItemBlock(registry, PEDESTAL);
			registry.register(CODEX_ARCANUM);
		}

		private static void registerItemBlock(IForgeRegistry<Item> registry, Block block) {
			registry.register(new ItemBlock(block).setRegistryName(block.getRegistryName()));
		}

		private static void registerItemBlock(IForgeRegistry<Item> registry, Block block, Class types) {
			registry.register(new BlockItemBase(block, types).setRegistryName(block.getRegistryName()));
		}
	}

	@EventBusSubscriber(modid = Magistics.ID)
	public static class ClientLoader {

		@SubscribeEvent
		public static void onModelRegistration(ModelRegistryEvent event) {
			registerFluidRenderers();
			registerEntityRenderers();
			registerBlockModels();
			registerItemModels();
		}

		private static void registerFluidRenderers() {}

		private static void registerEntityRenderers() {}

		private static void registerBlockModels() {
			RESEARCH_TABLE.initModel();
			PEDESTAL.initModel();
		}

		private static void registerItemModels() {
			CODEX_ARCANUM.initModel();
		}
	}
}


text:
/* Generated By:JavaCC: Do not edit this line. regExpGrammar2TreeConstants.java Version 5.0 */
package regExParsePkg2;

public interface regExpGrammar2TreeConstants
{
  public int JJTSTART = 0;
  public int JJTVOID = 1;
  public int JJTNEGCONCAT = 2;
  public int JJTCONCAT = 3;
  public int JJTCHOICE = 4;
  public int JJTTERM = 5;
  public int JJTALIAS = 6;
  public int JJTELEMENT = 7;

  public String[] jjtNodeName = {
    "START",
    "void",
    "NEGCONCAT",
    "CONCAT",
    "CHOICE",
    "TERM",
    "ALIAS",
    "ELEMENT",
  };
}
/* JavaCC - OriginalChecksum=e6f5d2ed15bf7459e17624db83912c11 (do not edit this line) */


text:
<?php global $wpdb ?>

▼

<?php _ex( 'Tables', 'Database tables', 'wp-migrate-db' ); ?>

					<input id="search-all-imported" type="radio" value="search_all_imported" name="table_migrate_option"<?php echo ( $loaded_profile['table_migrate_option'] == 'search_all_imported' ? ' checked="checked"' : '' ); ?> />
					<?php _e( 'Run the find & replace all imported tables', 'wp-migrate-db' ); ?>

					<input id="migrate-only-with-prefix" type="radio" value="migrate_only_with_prefix" name="table_migrate_option"<?php echo( $loaded_profile['table_migrate_option'] == 'migrate_only_with_prefix' ? ' checked="checked"' : '' ); ?> />
					<?php _e( 'Migrate all tables with prefix', 'wp-migrate-db' ); ?>
					<?php _e( 'Search in all tables with prefix', 'wp-migrate-db' ); ?>
					<?php _e( 'Run the find & replace on all imported tables with prefix', 'wp-migrate-db' ); ?>

						 "<?php echo esc_html( $wpdb->base_prefix ); ?>"

					<input id="migrate-selected" class="show-multiselect" type="radio" value="migrate_select" name="table_migrate_option"<?php echo( $loaded_profile['table_migrate_option'] == 'migrate_select' ? ' checked="checked"' : '' ); ?> />
					<?php _e( 'Migrate only selected tables below', 'wp-migrate-db' ); ?>
					<?php _e( 'Search only in selected tables below', 'wp-migrate-db' ); ?>
					<?php _e( 'Run the find & replace on the imported tables selected below', 'wp-migrate-db' ); ?>

			<select multiple="multiple" name="select_tables[]" id="select-tables" class="multiselect" autocomplete="off">
				<?php
				$table_sizes        = $this->table->get_table_sizes();
				$temp_prefix_length = strlen( $this->props->temp_prefix );
				foreach ( $this->table->get_tables() as $table ) :
					if( ! isset( $table_sizes[ $table ] ) || $this->props->temp_prefix === substr( $table, 0, $temp_prefix_length ) ) {
						continue;
					}
					$size = (int) $table_sizes[ $table ] * 1024;
					if ( ! empty( $loaded_profile['select_tables'] ) && in_array( $table, $loaded_profile['select_tables'] ) ) {
						printf( '<option value="%1$s" selected="selected">%1$s (%2$s)</option>', esc_html( $table ), size_format( $size ) );
					} else {
						printf( '<option value="%1$s">%1$s (%2$s)</option>', esc_html( $table ), size_format( $size ) );
					}
				endforeach;
				?>
			</select>

			<?php _e( 'Select All', 'wp-migrate-db' ); ?>
			/
			<?php _e( 'Deselect All', 'wp-migrate-db' ); ?>
			/
			<?php _e( 'Invert Selection', 'wp-migrate-db' ); ?>


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

<title>CodingErrorAction (Java Platform SE 8 )</title>
<meta name="date" content="2014-12-17">
<meta name="keywords" content="java.nio.charset.CodingErrorAction class">
<meta name="keywords" content="IGNORE">
<meta name="keywords" content="REPLACE">
<meta name="keywords" content="REPORT">
<meta name="keywords" content="toString()">
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Skip navigation links

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Java™ Platform
Standard Ed. 8

Prev Class

Next Class

Frames

No Frames

All Classes

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method

compact1, compact2, compact3

java.nio.charset

Class CodingErrorAction

java.lang.Object

java.nio.charset.CodingErrorAction

public class CodingErrorAction
extends Object

A typesafe enumeration for coding-error actions.

 Instances of this class are used to specify how malformed-input and
 unmappable-character errors are to be handled by charset decoders and encoders.

Since:

1.4

Field Summary

Fields

Modifier and Type
Field and Description

static CodingErrorAction
IGNORE

Action indicating that a coding error is to be handled by dropping the
 erroneous input and resuming the coding operation.

static CodingErrorAction
REPLACE

Action indicating that a coding error is to be handled by dropping the
 erroneous input, appending the coder's replacement value to the output
 buffer, and resuming the coding operation.

static CodingErrorAction
REPORT

Action indicating that a coding error is to be reported, either by
 returning a CoderResult object or by throwing a CharacterCodingException, whichever is appropriate for the method
 implementing the coding process.

Method Summary

All Methods Instance Methods Concrete Methods

Modifier and Type
Method and Description

String
toString()

Returns a string describing this action.

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Field Detail

IGNORE

public static final CodingErrorAction IGNORE

Action indicating that a coding error is to be handled by dropping the
 erroneous input and resuming the coding operation.

REPLACE

public static final CodingErrorAction REPLACE

Action indicating that a coding error is to be handled by dropping the
 erroneous input, appending the coder's replacement value to the output
 buffer, and resuming the coding operation.

REPORT

public static final CodingErrorAction REPORT

Action indicating that a coding error is to be reported, either by
 returning a CoderResult object or by throwing a CharacterCodingException, whichever is appropriate for the method
 implementing the coding process.

Method Detail

toString

public String toString()

Returns a string describing this action.

Overrides:

toString in class Object

Returns:

A descriptive string

Skip navigation links

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Java™ Platform
Standard Ed. 8

Prev Class

Next Class

Frames

No Frames

All Classes

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method

 Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
 Copyright © 1993, 2015, Oracle and/or its affiliates.  All rights reserved.


text:
namespace boost { namespace process { namespace detail {

template<typename Executor, typename Function>
void foreach_used_handle(Executor &exec, Function &&func);

namespace windows {

using native_handle_type = ::boost::winapi::HANDLE_ ;

inline std::vector<native_handle_type> get_handles(std::error_code & ec)
{
    auto pid = ::boost::winapi::GetCurrentProcessId();

    std::vector<char> buffer(2048);
    constexpr static auto STATUS_INFO_LENGTH_MISMATCH_ = static_cast<::boost::winapi::NTSTATUS_>(0xC0000004l);
    auto info_pointer = reinterpret_cast<workaround::SYSTEM_HANDLE_INFORMATION_*>(buffer.data());

    ::boost::winapi::NTSTATUS_ nt_status = STATUS_INFO_LENGTH_MISMATCH_;

    for (;
           nt_status == STATUS_INFO_LENGTH_MISMATCH_;
           nt_status = workaround::nt_system_query_information(
                            workaround::SystemHandleInformation_,
                            info_pointer, static_cast<::boost::winapi::ULONG_>(buffer.size()),
                            nullptr))
    {
        buffer.resize(buffer.size() * 2);
        info_pointer = reinterpret_cast<workaround::SYSTEM_HANDLE_INFORMATION_*>(buffer.data());
    }

    if (nt_status < 0 || nt_status > 0x7FFFFFFF)
    {
        ec = ::boost::process::detail::get_last_error();
        return {};
    }
    else
        ec.clear();

    std::vector<native_handle_type> res;
    for (auto itr = info_pointer->Handle; itr != (info_pointer->Handle + info_pointer->Count); itr++)
    {
        if (itr->OwnerPid == pid)
            res.push_back(reinterpret_cast<native_handle_type>(static_cast<std::uintptr_t>(itr->HandleValue)));
    }

    return res;
}

inline std::vector<native_handle_type> get_handles()
{
    std::error_code ec;

    auto res = get_handles(ec);
    if (ec)
        boost::process::detail::throw_error(ec, "NtQuerySystemInformation failed");

    return res;
}

inline bool is_stream_handle(native_handle_type handle, std::error_code & ec)
{
    ::boost::winapi::ULONG_ actual_size;
    auto nt_status = workaround::nt_query_object(
            handle,
            workaround::ObjectTypeInformation,
            NULL,
            0, &actual_size);

    std::vector<char> vec;
    vec.resize(actual_size);

    workaround::OBJECT_TYPE_INFORMATION_ * type_info_p = reinterpret_cast<workaround::OBJECT_TYPE_INFORMATION_*>(vec.data());
    nt_status = workaround::nt_query_object(
            handle,
            workaround::ObjectTypeInformation,
            type_info_p,
            actual_size, &actual_size);

    if (nt_status < 0 || nt_status > 0x7FFFFFFF)
    {
        ec = ::boost::process::detail::get_last_error();
        return false;
    }
    else
        ec.clear();

    auto &nm = type_info_p->TypeName.Buffer;
    return type_info_p->TypeName.Length >= 5 &&
            nm[0] == L'F' &&
            nm[1] == L'i' &&
            nm[2] == L'l' &&
            nm[3] == L'e' &&
            nm[4] == L'\0';
}

inline bool is_stream_handle(native_handle_type handle)
{
    std::error_code ec;
    auto res = is_stream_handle(handle, ec);
    if (ec)
        boost::process::detail::throw_error(ec, "NtQueryObject failed");

    return res;
}

struct limit_handles_ : handler_base_ext
{
    mutable std::vector<::boost::winapi::HANDLE_> handles_with_inherit_flag;

    template<typename Executor>
    void on_setup(Executor & exec) const
    {
        auto all_handles = get_handles();
        foreach_used_handle(exec,
                [&](::boost::winapi::HANDLE_ handle)
                {
                    auto itr = std::find(all_handles.begin(), all_handles .end(), handle);
                    ::boost::winapi::DWORD_ flags = 0u;
                    if (itr != all_handles.end())
                        *itr = ::boost::winapi::INVALID_HANDLE_VALUE_;
                    else if ((::boost::winapi::GetHandleInformation(*itr, &flags) != 0)
                            &&((flags & ::boost::winapi::HANDLE_FLAG_INHERIT_) == 0)) //it is NOT inherited anyhow, so ignore too
                        *itr = ::boost::winapi::INVALID_HANDLE_VALUE_;
                });

        auto part_itr = std::partition(all_handles.begin(), all_handles.end(),
                                       [](::boost::winapi::HANDLE_ handle) {return handle != ::boost::winapi::INVALID_HANDLE_VALUE_;});

        all_handles.erase(part_itr, all_handles.end()); //remove invalid handles
        handles_with_inherit_flag = std::move(all_handles);

        for (auto handle : handles_with_inherit_flag)
            ::boost::winapi::SetHandleInformation(handle, ::boost::winapi::HANDLE_FLAG_INHERIT_, 0);
    }

    template<typename Executor>
    void on_error(Executor & exec, const std::error_code & ec) const
    {
        for (auto handle : handles_with_inherit_flag)
            ::boost::winapi::SetHandleInformation(handle, ::boost::winapi::HANDLE_FLAG_INHERIT_, ::boost::winapi::HANDLE_FLAG_INHERIT_);
    }

    template<typename Executor>
    void on_sucess(Executor & exec) const
    {
        for (auto handle : handles_with_inherit_flag)
            ::boost::winapi::SetHandleInformation(handle, ::boost::winapi::HANDLE_FLAG_INHERIT_, ::boost::winapi::HANDLE_FLAG_INHERIT_);
    }

};

}}}}

#endif //PROCESS_HANDLES_HPP


text:
<!DOCTYPE html>

  <meta charset="utf-8">
  <title>Changelog</title>
  <base target="_top">
  <link rel="stylesheet" type="text/css" href="../resources/css/style.css" />
  <meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
  <meta name="format-detection" content="telephone=no">

  <panel>

    <block>

PullToClear Changelog

    </block>

    Version 0.3.1 (October 14, 2017)
    <fieldset>

Official support for NCLink10

Lots of refactoring and little improvements, that you should not notice

    </fieldset>

    Version 0.2.1 (October 11, 2017)
    <fieldset>

initial public release

no 3rd party tweak support yet

    </fieldset>

  </panel>


text:
package main

import (
	"log"

	"golang.org/x/text/internal/gen"
	"golang.org/x/text/internal/language"
	"golang.org/x/text/internal/language/compact"
	"golang.org/x/text/unicode/cldr"
)

func main() {
	r := gen.OpenCLDRCoreZip()
	defer r.Close()

	d := &cldr.Decoder{}
	data, err := d.DecodeZip(r)
	if err != nil {
		log.Fatalf("DecodeZip: %v", err)
	}

	w := gen.NewCodeWriter()
	defer w.WriteGoFile("parents.go", "compact")

	// Create parents table.
	type ID uint16
	parents := make([]ID, compact.NumCompactTags)
	for _, loc := range data.Locales() {
		tag := language.MustParse(loc)
		index, ok := compact.FromTag(tag)
		if !ok {
			continue
		}
		parentIndex := compact.ID(0) // und
		for p := tag.Parent(); p != language.Und; p = p.Parent() {
			if x, ok := compact.FromTag(p); ok {
				parentIndex = x
				break
			}
		}
		parents[index] = ID(parentIndex)
	}

	w.WriteComment(`
	parents maps a compact index of a tag to the compact index of the parent of
	this tag.`)
	w.WriteVar("parents", parents)
}


text:
aether
======

A Starkers-like blank skeleton theme for Ghost


text:
<!doctype html>

    <meta charset="utf-8">
    <title></title>
    <meta name="description" content="">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>

    <link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.css" />
    <link rel="stylesheet" href="bower_components/animate-css/animate.css" />
    <link rel="stylesheet" href="bower_components/font-awesome/css/font-awesome.css" />
    <link rel="stylesheet" href="bower_components/simple-line-icons/css/simple-line-icons.css" />
    <link rel="stylesheet" href="bower_components/angular-growl-v2/build/angular-growl.css" />

    <link rel="stylesheet" href="styles/jplayer.flat.css" type="text/css"/>
    <link rel="stylesheet" href="styles/app.css" type="text/css"/>


text:
#ifndef ALIEMCALCALIBTIMEDEPCORRECTION_H
#define ALIEMCALCALIBTIMEDEPCORRECTION_H

#include <TObject.h>
#include <TObjArray.h>
#include <TArrayF.h>
#include "AliEMCALGeoParams.h"
class TString;
class TTree;

///////////////////////////////////////////////////////////////////////////////
///
/// \class AliEMCALSuperModuleCalibTimeDepCorrection
/// \ingroup EMCALUtils
/// \brief Handle SM objects for temperature dependent corrections.
///
/// \author:  David Silvermyr, <david.silvermyr@cern.ch>
///
///////////////////////////////////////////////////////////////////////////////

// ******* internal class definition *************
// 1 SuperModule's worth of info
class AliEMCALSuperModuleCalibTimeDepCorrection : public TObject
{

public:

  AliEMCALSuperModuleCalibTimeDepCorrection(const int smNum=0) : TObject(), // just init values
  fSuperModuleNum(smNum)
  {
    for (int icol=0; icol<AliEMCALGeoParams::fgkEMCALCols; icol++) {
      for (int irow=0; irow<AliEMCALGeoParams::fgkEMCALRows; irow++) {
        fCorrection[icol][irow].Reset();
      }
    }
  }

public:

  void  SetSuperModuleNum(Int_t i) { fSuperModuleNum = i    ; }
  Int_t GetSuperModuleNum()  const { return fSuperModuleNum ; }

  TArrayF * GetCorrection(int icol, int irow)
  { return &fCorrection[icol][irow]; }

private:

  Int_t fSuperModuleNum;                                                                  ///< SM id
  TArrayF fCorrection[AliEMCALGeoParams::fgkEMCALCols][AliEMCALGeoParams::fgkEMCALRows];  ///< values

  /// \cond CLASSIMP
  ClassDef(AliEMCALSuperModuleCalibTimeDepCorrection, 2) ;
  /// \endcond

};
// ******* end of internal class definition *************

///////////////////////////////////////////////////////////////////////////////
///
/// \class AliEMCALCalibTimeDepCorrection
/// \brief Objects of this class contain info on time/temperature-dependent corrections.
///
/// \author:  David Silvermyr, <david.silvermyr@cern.ch>
///
///////////////////////////////////////////////////////////////////////////////

class AliEMCALCalibTimeDepCorrection : public TObject
{

public:

  AliEMCALCalibTimeDepCorrection(const int nSM = AliEMCALGeoParams::fgkEMCALModules);

  // interface methods; getting the whole struct should be more efficient though
  void InitCorrection(Int_t nSM, Int_t nBins, Float_t val=1.0); // assign a certain value to all
                                                                // use the methods below with caution: take care that your argument ranges are valid
  void SetCorrection(Int_t smIndex, Int_t iCol, Int_t iRow, Int_t iBin, Float_t val=1.0); // assign a certain value to a given bin
  Float_t GetCorrection(Int_t smIndex, Int_t iCol, Int_t iRow, Int_t iBin) const; // assign a certain value to a given bin

  // Read and Write txt I/O methods are normally not used, but are useful for
  // filling the object before it is saved in OCDB
  void ReadTextInfo(Int_t nSM, const TString &txtFileName, Bool_t swapSides=kFALSE); // info file is for nSm=1 to fgkEMCALModules
  void WriteTextInfo(const TString &txtFileName, Bool_t swapSides=kFALSE); // info file is for nSm=1 to fgkEMCALModules
  void ReadRootInfo(const TString &rootFileName, Bool_t swapSides=kFALSE); // info file is for nSm=1 to fgkEMCALModules
  void ReadTreeInfo(TTree *treeGlob, TTree *treeCorr, Bool_t swapSides=kFALSE); // info file is for nSm=1 to fgkEMCALModules
  void WriteRootInfo(const TString &rootFileName, Bool_t swapSides=kFALSE); // info file is for nSm=1 to fgkEMCALModules

  virtual ~AliEMCALCalibTimeDepCorrection();

  // pointer to stored info.
  Int_t GetNSuperModule() const { return fNSuperModule; }

  // - via the index in the stored array:
  virtual AliEMCALSuperModuleCalibTimeDepCorrection * GetSuperModuleCalibTimeDepCorrectionId(Int_t smIndex) const
  { return (AliEMCALSuperModuleCalibTimeDepCorrection*) fSuperModuleData[smIndex]; }

  // - or via the actual SM number
  virtual AliEMCALSuperModuleCalibTimeDepCorrection * GetSuperModuleCalibTimeDepCorrectionNum(Int_t smNum) const;

  void SetStartTime(UInt_t ui)  { fStartTime   = ui; }
  void SetNTimeBins(Int_t i)    { fNTimeBins   = i ; }
  void SetTimeBinSize(Int_t i)  { fTimeBinSize = i ; }

  Int_t GetStartTime()    const { return fStartTime; }
  Int_t GetNTimeBins()    const { return fNTimeBins; }
  Int_t GetTimeBinSize()  const { return fTimeBinSize; }

  static Int_t GetMaxTimeBins() { return fgkMaxTimeBins; }

protected:

  Int_t 	  fNSuperModule;    ///< Number of supermodules.
  TObjArray fSuperModuleData; ///< SuperModule data

private:

  AliEMCALCalibTimeDepCorrection(const AliEMCALCalibTimeDepCorrection &);
  AliEMCALCalibTimeDepCorrection &operator = (const AliEMCALCalibTimeDepCorrection &);

  UInt_t fStartTime;  ///< timestamp for start of run/first bin
  Int_t fNTimeBins;   ///< how many timestamp bins do we have
  Int_t fTimeBinSize; ///< seconds per time-bin

  static const Int_t fgkMaxTimeBins = 50; ///< we are not going to have more correction time bins than this for a single runnumber..

  /// \cond CLASSIMP
  ClassDef(AliEMCALCalibTimeDepCorrection, 3) ;
  /// \endcond

};

#endif