text:
// PathVisio,
// a tool for data visualization and analysis using Biological Pathways
// Copyright 2006-2011 BiGCaT Bioinformatics
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
package org.pathvisio.wikipathways.client;

import java.util.HashMap;
import java.util.Map;

import com.google.gwt.user.client.rpc.IsSerializable;

/**
 * A search result for the WikiPathways search.
 * @author thomas
 */
public class Result implements IsSerializable {
	private String pathwayId;
	private String imageId;
	private String title;
	private String description;
	private String url;
	private String organism;

	private Map<String, String[]> properties;

	/**
	 * Create a search result.
	 * @param pathwayId The identifier of the resulting pathway
	 * @param title The title that should be displayed for this result
	 * @param description The description that should be displayed for this result
	 * @param url The url of the resulting pathway
	 * @param organism The organism of the resulting pathway
	 */
	public Result(String pathwayId, String title, String description, String url, String organism) {
		properties = new HashMap<String, String[]>();
		this.pathwayId = pathwayId;
		this.title = title;
		this.description = description;
		this.url = url;
		this.organism = organism;
	}

	/**
	 * Set the image id, that is used to retrieve the preview
	 * image from the server.
	 */
	public void setImageId(String imageId) {
		this.imageId = imageId;
	}

	/**
	 * Set a custom property
	 * @param prop The property name
	 * @param values The property values
	 */
	public void setProperty(String prop, String[] values) {
		properties.put(prop, values);
	}

	/**
	 * Set the pathway id of the resulting pathway.
	 */
	public void setPathwayId(String pathwayId) {
		this.pathwayId = pathwayId;
	}

	/**
	 * Set the organism of the resulting pathway;
	 */
	public void setOrganism(String organism) {
		this.organism = organism;
	}

	/**
	 * Get the title to display
	 */
	public String getTitle() {
		return title;
	}

	/**
	 * Get the description to display
	 */
	public String getDescription() {
		return description;
	}

	/**
	 * Get the url of the resulting pathway
	 */
	public String getUrl() {
		return url;
	}

	/**
	 * Get the id of the preview image
	 */
	public String getImageId() {
		return imageId;
	}

	/**
	 * Get the identifier of the resulting pathway
	 */
	public String getPathwayId() {
		return pathwayId;
	}

	/**
	 * Get the organism of the resulting pathway
	 */
	public String getOrganism() {
		return organism;
	}

	/**
	 * Get the custom properties
	 */
	public Map<String, String[]> getProperties() {
		return properties;
	}

	public Result() {
	}
}


text:
layout: page
title: Sara Tate's 84th Birthday
date: 2016-05-24
author: Cynthia Mcknight
tags: weekly links, java
status: published
summary: Aliquam commodo malesuada odio at commodo. Phasellus mattis lorem a.
banner: images/banner/leisure-05.jpg
booking:
  startDate: 12/15/2018
  endDate: 12/18/2018
  ctyhocn: LSEDOHX
  groupCode: ST8B
published: true
---
Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Proin suscipit, enim sit amet faucibus rhoncus, lacus lacus sodales metus, convallis porta turpis libero ut enim. Aliquam felis velit, blandit vel orci sit amet, varius accumsan lacus. Curabitur egestas maximus aliquet. Etiam hendrerit egestas tellus eget dapibus. Duis viverra diam dui, nec pulvinar velit varius nec. Vestibulum rhoncus rutrum massa quis lobortis. Nullam congue lectus sit amet rutrum facilisis. Suspendisse varius sem magna, vitae maximus tortor elementum sed. Mauris semper sollicitudin neque ut hendrerit. Pellentesque ultricies euismod risus eget scelerisque.

* Phasellus vel turpis eget ex congue mollis ac nec est
* Fusce consectetur ex at tellus imperdiet, non maximus mauris elementum
* Curabitur vel felis et orci pulvinar rutrum non sit amet turpis.

In vestibulum auctor bibendum. Etiam pretium tortor id aliquam bibendum. Suspendisse tempus, felis a sagittis sagittis, ante nisl facilisis sem, sed dapibus eros justo et arcu. Pellentesque tincidunt ultricies cursus. Nullam blandit, elit quis scelerisque blandit, sapien nulla pretium justo, eget posuere arcu ante quis nulla. Morbi accumsan venenatis augue, accumsan dictum magna. Nulla massa tellus, gravida id hendrerit egestas, sodales quis libero. Suspendisse lacinia nibh ullamcorper, pulvinar lorem id, bibendum massa. Nam maximus lectus nec dolor feugiat consectetur. Aliquam erat volutpat. In hac habitasse platea dictumst.

redpajama_set_name: RedPajamaGithub


text:
namespace app { namespace Experimental { namespace TextureLoader { struct Callback; } } }
namespace app { namespace Uno { struct Buffer; } }

namespace app {
namespace Experimental {
namespace TextureLoader {

struct TextureLoaderImpl__uType : ::uClassType
{
};

TextureLoaderImpl__uType* TextureLoaderImpl__typeof();

void TextureLoaderImpl__JpegByteArrayToTexture2D(::uStatic* __this, ::app::Uno::Buffer* arr_, ::app::Experimental::TextureLoader::Callback* callback_);
void TextureLoaderImpl__PngByteArrayToTexture2D(::uStatic* __this, ::app::Uno::Buffer* arr_, ::app::Experimental::TextureLoader::Callback* callback_);

}}}

#endif


text:
PyMontyHall
===========

A Python simulator of the monty hall problem for determining statistic results


text:
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>W29808_text</title>
        <link rel="stylesheet" type="text/css" href="style.css" />

                «

    <p class="styleSans12000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">

    <p class="styleSans11.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">TABLE OF CONTENTS

    <p class="styleSans552.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">

    <p class="styleSans9.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">

    <p class="styleSans8.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">

    <p class="styleSans1.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">

    <p class="styleSans9.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">

    <p class="styleSans8.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">

    <p class="styleSans8.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">

    <p class="styleSans4.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">


text:
using Abp.Domain.Entities;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text;

namespace NewWechat.CRM
{
    [Table("CrmCustomerVehicles")]
    public class CrmCustomerVehicle : Entity<Guid>
    {
        public string MakeCode { get; set; }
        public string CategoryCode { get; set; }
        public string ModelCode { get; set; }
        public string Vin { get; set; }
        public string PlateNo { get; set; }
        public string ModelYear { get; set; }
        public string EngineType { get; set; }
        public string TransmissionType { get; set; }
        [ForeignKey("CustomerId")]
        public CrmCustomer Customer { get; set; }
        public Guid CustomerId { get; set; }
    }
}


text:
package com.nominanuda.hyperapi;

import javax.ws.rs.PUT;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.QueryParam;

import com.nominanuda.zen.obj.wrap.ObjWrapper;

@HyperApi
public interface TestHyperApi {
	@PUT @Path("/foo/{bar}?{baz}")
	Boo putFoo(
		@PathParam("bar") String bar,
		@QueryParam("baz") String baz,
		Moo moo
	);

	interface Moo extends ObjWrapper {
		default String miao() {return "miao";}
	}

	interface Boo extends ObjWrapper {
		default String bau() {return "bau";}
	}

}


text:
namespace Generator {
	static class TypeIds {
		public static readonly TypeId OrigCodeValues = new(nameof(OrigCodeValues));
		public static readonly TypeId RemovedCodeValues = new(nameof(RemovedCodeValues));
		public static readonly TypeId InstructionDefs = new(nameof(InstructionDefs));
		public static readonly TypeId EncoderTypes = new(nameof(EncoderTypes));
		public static readonly TypeId InstrInfoTypes = new(nameof(InstrInfoTypes));
		public static readonly TypeId GasCtorInfos = new(nameof(GasCtorInfos));
		public static readonly TypeId IntelCtorInfos = new(nameof(IntelCtorInfos));
		public static readonly TypeId MasmCtorInfos = new(nameof(MasmCtorInfos));
		public static readonly TypeId NasmCtorInfos = new(nameof(NasmCtorInfos));
		public static readonly TypeId FastFmtTblInfos = new(nameof(FastFmtTblInfos));
		public static readonly TypeId MemorySizeDefs = new(nameof(MemorySizeDefs));
		public static readonly TypeId RegisterDefs = new(nameof(RegisterDefs));
		public static readonly TypeId DecoderTables = new(nameof(DecoderTables));
		public static readonly TypeId TupleTypeTable = new(nameof(TupleTypeTable));
		public static readonly TypeId OpCodeOperandKindDefs = new(nameof(OpCodeOperandKindDefs));

		public static readonly TypeId IcedConstants = new(nameof(IcedConstants));
		public static readonly TypeId DecoderTestParserConstants = new(nameof(DecoderTestParserConstants));
		public static readonly TypeId DecoderConstants = new(nameof(DecoderConstants));
		public static readonly TypeId ExportedPythonTypes = new(nameof(ExportedPythonTypes));

		public static readonly TypeId Code = new(nameof(Code));
		public static readonly TypeId CodeSize = new(nameof(CodeSize));
		public static readonly TypeId CpuidFeature = new(nameof(CpuidFeature));
		public static readonly TypeId CpuidFeatureInternal = new(nameof(CpuidFeatureInternal));
		public static readonly TypeId DecoderError = new(nameof(DecoderError));
		public static readonly TypeId DecoderOptions = new(nameof(DecoderOptions));
		public static readonly TypeId DecoderTestOptions = new(nameof(DecoderTestOptions));
		public static readonly TypeId EvexOpCodeHandlerKind = new(nameof(EvexOpCodeHandlerKind));
		public static readonly TypeId MvexOpCodeHandlerKind = new(nameof(MvexOpCodeHandlerKind));
		public static readonly TypeId HandlerFlags = new(nameof(HandlerFlags));
		public static readonly TypeId LegacyHandlerFlags = new(nameof(LegacyHandlerFlags));
		public static readonly TypeId MemorySize = new(nameof(MemorySize));
		public static readonly TypeId BroadcastToKind = new(nameof(BroadcastToKind));
		public static readonly TypeId FastMemoryKeywords = new(nameof(FastMemoryKeywords));
		public static readonly TypeId IntelMemoryKeywords = new(nameof(IntelMemoryKeywords));
		public static readonly TypeId MasmMemoryKeywords = new(nameof(MasmMemoryKeywords));
		public static readonly TypeId NasmMemoryKeywords = new(nameof(NasmMemoryKeywords));
		public static readonly TypeId LegacyOpCodeHandlerKind = new(nameof(LegacyOpCodeHandlerKind));
		public static readonly TypeId PseudoOpsKind = new(nameof(PseudoOpsKind));
		public static readonly TypeId Register = new(nameof(Register));
		public static readonly TypeId RegisterKind = new(nameof(RegisterKind));
		public static readonly TypeId RegisterClass = new(nameof(RegisterClass));
		public static readonly TypeId SerializedDataKind = new(nameof(SerializedDataKind));
		public static readonly TypeId TupleType = new(nameof(TupleType));
		public static readonly TypeId VexOpCodeHandlerKind = new(nameof(VexOpCodeHandlerKind));
		public static readonly TypeId Mnemonic = new(nameof(Mnemonic));
		public static readonly TypeId GasCtorKind = new(nameof(GasCtorKind));
		public static readonly TypeId IntelCtorKind = new(nameof(IntelCtorKind));
		public static readonly TypeId MasmCtorKind = new(nameof(MasmCtorKind));
		public static readonly TypeId NasmCtorKind = new(nameof(NasmCtorKind));
		public static readonly TypeId GasSizeOverride = new(nameof(GasSizeOverride));
		public static readonly TypeId GasInstrOpInfoFlags = new(nameof(GasInstrOpInfoFlags));
		public static readonly TypeId IntelSizeOverride = new(nameof(IntelSizeOverride));
		public static readonly TypeId IntelBranchSizeInfo = new(nameof(IntelBranchSizeInfo));
		public static readonly TypeId IntelInstrOpInfoFlags = new(nameof(IntelInstrOpInfoFlags));
		public static readonly TypeId MasmInstrOpInfoFlags = new(nameof(MasmInstrOpInfoFlags));
		public static readonly TypeId NasmSignExtendInfo = new(nameof(NasmSignExtendInfo));
		public static readonly TypeId NasmSizeOverride = new(nameof(NasmSizeOverride));
		public static readonly TypeId NasmBranchSizeInfo = new(nameof(NasmBranchSizeInfo));
		public static readonly TypeId NasmInstrOpInfoFlags = new(nameof(NasmInstrOpInfoFlags));
		public static readonly TypeId NasmMemorySizeInfo = new(nameof(NasmMemorySizeInfo));
		public static readonly TypeId NasmFarMemorySizeInfo = new(nameof(NasmFarMemorySizeInfo));
		public static readonly TypeId FastFmtFlags = new(nameof(FastFmtFlags));
		public static readonly TypeId RoundingControl = new(nameof(RoundingControl));
		public static readonly TypeId OpKind = new(nameof(OpKind));
		public static readonly TypeId InstrScale = new(nameof(InstrScale));
		public static readonly TypeId InstrFlags1 = new(nameof(InstrFlags1));
		public static readonly TypeId MvexInstrFlags = new(nameof(MvexInstrFlags));
		public static readonly TypeId VectorLength = new(nameof(VectorLength));
		public static readonly TypeId MandatoryPrefixByte = new(nameof(MandatoryPrefixByte));
		public static readonly TypeId StateFlags = new(nameof(StateFlags));
		public static readonly TypeId EncodingKind = new(nameof(EncodingKind));
		public static readonly TypeId FlowControl = new(nameof(FlowControl));
		public static readonly TypeId OpCodeOperandKind = new(nameof(OpCodeOperandKind));
		public static readonly TypeId RflagsBits = new(nameof(RflagsBits));
		public static readonly TypeId ImpliedAccess = new(nameof(ImpliedAccess));
		public static readonly TypeId RflagsInfo = new(nameof(RflagsInfo));
		public static readonly TypeId OpInfo0 = new(nameof(OpInfo0));
		public static readonly TypeId OpInfo1 = new(nameof(OpInfo1));
		public static readonly TypeId OpInfo2 = new(nameof(OpInfo2));
		public static readonly TypeId OpInfo3 = new(nameof(OpInfo3));
		public static readonly TypeId OpInfo4 = new(nameof(OpInfo4));
		public static readonly TypeId InfoFlags1 = new(nameof(InfoFlags1));
		public static readonly TypeId InfoFlags2 = new(nameof(InfoFlags2));
		public static readonly TypeId InstrInfoConstants = new(nameof(InstrInfoConstants));
		public static readonly TypeId OpAccess = new(nameof(OpAccess));
		public static readonly TypeId ConditionCode = new(nameof(ConditionCode));
		public static readonly TypeId MiscInstrInfoTestConstants = new(nameof(MiscInstrInfoTestConstants));
		public static readonly TypeId InstructionInfoKeys = new(nameof(InstructionInfoKeys));
		public static readonly TypeId RflagsBitsConstants = new(nameof(RflagsBitsConstants));
		public static readonly TypeId MemorySizeFlags = new(nameof(MemorySizeFlags));
		public static readonly TypeId RegisterFlags = new(nameof(RegisterFlags));
		public static readonly TypeId MiscSectionNames = new(nameof(MiscSectionNames));
		public static readonly TypeId LegacyOpCodeTable = new(nameof(LegacyOpCodeTable));
		public static readonly TypeId VexOpCodeTable = new(nameof(VexOpCodeTable));
		public static readonly TypeId XopOpCodeTable = new(nameof(XopOpCodeTable));
		public static readonly TypeId EvexOpCodeTable = new(nameof(EvexOpCodeTable));
		public static readonly TypeId MvexOpCodeTable = new(nameof(MvexOpCodeTable));
		public static readonly TypeId LegacyOpKind = new(nameof(LegacyOpKind));
		public static readonly TypeId VexOpKind = new(nameof(VexOpKind));
		public static readonly TypeId XopOpKind = new(nameof(XopOpKind));
		public static readonly TypeId EvexOpKind = new(nameof(EvexOpKind));
		public static readonly TypeId MvexOpKind = new(nameof(MvexOpKind));
		public static readonly TypeId MandatoryPrefix = new(nameof(MandatoryPrefix));
		public static readonly TypeId OpCodeTableKind = new(nameof(OpCodeTableKind));
		public static readonly TypeId DisplSize = new(nameof(DisplSize));
		public static readonly TypeId ImmSize = new(nameof(ImmSize));
		public static readonly TypeId EncoderFlags = new(nameof(EncoderFlags));
		public static readonly TypeId EncFlags1 = new(nameof(EncFlags1));
		public static readonly TypeId EncFlags2 = new(nameof(EncFlags2));
		public static readonly TypeId EncFlags3 = new(nameof(EncFlags3));
		public static readonly TypeId OpCodeInfoFlags1 = new(nameof(OpCodeInfoFlags1));
		public static readonly TypeId OpCodeInfoFlags2 = new(nameof(OpCodeInfoFlags2));
		public static readonly TypeId DecOptionValue = new(nameof(DecOptionValue));
		public static readonly TypeId InstrStrFmtOption = new(nameof(InstrStrFmtOption));
		public static readonly TypeId WBit = new(nameof(WBit));
		public static readonly TypeId LBit = new(nameof(LBit));
		public static readonly TypeId OpCodeInfoKeys = new(nameof(OpCodeInfoKeys));
		public static readonly TypeId OpCodeInfoFlags = new(nameof(OpCodeInfoFlags));
		public static readonly TypeId LKind = new(nameof(LKind));
		public static readonly TypeId RepPrefixKind = new(nameof(RepPrefixKind));
		public static readonly TypeId OpSize = new(nameof(OpSize));
		public static readonly TypeId RelocKind = new(nameof(RelocKind));
		public static readonly TypeId BlockEncoderOptions = new(nameof(BlockEncoderOptions));
		public static readonly TypeId NumberBase = new(nameof(NumberBase));
		public static readonly TypeId MemorySizeOptions = new(nameof(MemorySizeOptions));
		public static readonly TypeId FormatMnemonicOptions = new(nameof(FormatMnemonicOptions));
		public static readonly TypeId PrefixKind = new(nameof(PrefixKind));
		public static readonly TypeId DecoratorKind = new(nameof(DecoratorKind));
		public static readonly TypeId NumberKind = new(nameof(NumberKind));
		public static readonly TypeId FormatterTextKind = new(nameof(FormatterTextKind));
		public static readonly TypeId SymbolFlags = new(nameof(SymbolFlags));
		public static readonly TypeId GasInstrOpKind = new(nameof(GasInstrOpKind));
		public static readonly TypeId IntelInstrOpKind = new(nameof(IntelInstrOpKind));
		public static readonly TypeId MasmInstrOpKind = new(nameof(MasmInstrOpKind));
		public static readonly TypeId NasmInstrOpKind = new(nameof(NasmInstrOpKind));
		public static readonly TypeId FormatterFlowControl = new(nameof(FormatterFlowControl));
		public static readonly TypeId OptionsProps = new(nameof(OptionsProps));
		public static readonly TypeId MasmSymbolTestFlags = new(nameof(MasmSymbolTestFlags));
		public static readonly TypeId FormatterSyntax = new(nameof(FormatterSyntax));
		public static readonly TypeId CC_b = new(nameof(CC_b));
		public static readonly TypeId CC_ae = new(nameof(CC_ae));
		public static readonly TypeId CC_e = new(nameof(CC_e));
		public static readonly TypeId CC_ne = new(nameof(CC_ne));
		public static readonly TypeId CC_be = new(nameof(CC_be));
		public static readonly TypeId CC_a = new(nameof(CC_a));
		public static readonly TypeId CC_p = new(nameof(CC_p));
		public static readonly TypeId CC_np = new(nameof(CC_np));
		public static readonly TypeId CC_l = new(nameof(CC_l));
		public static readonly TypeId CC_ge = new(nameof(CC_ge));
		public static readonly TypeId CC_le = new(nameof(CC_le));
		public static readonly TypeId CC_g = new(nameof(CC_g));
		public static readonly TypeId CodeAsmMemoryOperandSize = new(nameof(CodeAsmMemoryOperandSize));
		public static readonly TypeId TestInstrFlags = new(nameof(TestInstrFlags));
		public static readonly TypeId MvexConvFn = new(nameof(MvexConvFn));
		public static readonly TypeId MvexEHBit = new(nameof(MvexEHBit));
		public static readonly TypeId NonDestructiveOpKind = new(nameof(NonDestructiveOpKind));
		public static readonly TypeId MvexInfoFlags1 = new(nameof(MvexInfoFlags1));
		public static readonly TypeId MvexInfoFlags2 = new(nameof(MvexInfoFlags2));
		public static readonly TypeId MvexRegMemConv = new(nameof(MvexRegMemConv));
		public static readonly TypeId MvexTupleTypeLutKind = new(nameof(MvexTupleTypeLutKind));
	}
}


text:
function ConvertTo-ScriptBlock{
    <#
        .SYNOPSIS
            Convert to ScriptBlock.
        .DESCRIPTION
            Convert input to ScriptBlock.
        .EXAMPLE
            Get-Content '.\scriptFile.ps1' -raw | ConvertTo-ScriptBlock
            Converts a script file to a ScriptBlock.
        .LINK
            https://communary.wordpress.com/
            https://github.com/gravejester/Communary.ToolBox
        .NOTES
            Author: Øyvind Kallstad
            Date: 13.03.2014
            Version: 1.0
    #>
	param (
        # Input you want converted to a ScriptBlock.
        [Parameter(Mandatory = $true, ValueFromPipeline = $true)]$InputObject
    )

    try {
        $scriptBlock = [ScriptBlock]::Create($inputObject)
    }

    catch {
        Write-Warning $_.Exception.Message
    }

    Write-Output $scriptBlock
}


text:
package net.bither;

import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.FrameLayout;
import android.widget.ImageButton;
import android.widget.TextView;

import net.bither.bitherj.core.Address;
import net.bither.bitherj.core.AddressManager;
import net.bither.bitherj.core.BitherjSettings;
import net.bither.fragment.cold.ColdAddressFragment;
import net.bither.fragment.hot.HotAddressFragment;
import net.bither.preference.AppSharedPreference;
import net.bither.runnable.ThreadNeedService;
import net.bither.service.BlockchainService;
import net.bither.ui.base.DropdownMessage;
import net.bither.ui.base.OverScrollableListView;
import net.bither.ui.base.SwipeRightFragmentActivity;
import net.bither.ui.base.dialog.DialogConfirmTask;
import net.bither.ui.base.dialog.DialogProgress;
import net.bither.ui.base.listener.IBackClickListener;
import net.bither.util.StringUtil;
import net.bither.util.ThreadUtil;
import net.bither.util.WalletUtils;

import java.util.ArrayList;

/**
 * Created by songchenwen on 14-11-3.
 */
public class TrashCanActivity extends SwipeRightFragmentActivity {
    private OverScrollableListView lv;
    private TextView tvEmpty;
    private ArrayList<Address> addresses;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_trash_can);
        addresses = new ArrayList<Address>();
        initView();
        refresh();
    }

    private void refresh() {
        addresses.clear();
        addresses.addAll(AddressManager.getInstance().getTrashAddresses());
        adapter.notifyDataSetChanged();
        if (addresses.size() > 0) {
            tvEmpty.setVisibility(View.GONE);
        } else {
            tvEmpty.setVisibility(View.VISIBLE);
        }
    }

    private void initView() {
        findViewById(R.id.ibtn_back).setOnClickListener(new IBackClickListener());
        lv = (OverScrollableListView) findViewById(R.id.lv);
        tvEmpty = (TextView) findViewById(R.id.tv_empty);
        lv.setAdapter(adapter);

    }

    private BaseAdapter adapter = new BaseAdapter() {
        private LayoutInflater inflater;
        private DialogProgress dp;

        @Override
        public int getCount() {
            return addresses.size();
        }

        @Override
        public Address getItem(int position) {
            return addresses.get(position);
        }

        @Override
        public long getItemId(int position) {
            return position;
        }

        @Override
        public View getView(int position, View convertView, ViewGroup parent) {
            ViewHolder h;
            if (convertView == null) {
                if (inflater == null) {
                    inflater = LayoutInflater.from(TrashCanActivity.this);
                }
                convertView = inflater.inflate(R.layout.list_item_trash_can, null);
                h = new ViewHolder(convertView);
            } else {
                h = (ViewHolder) convertView.getTag();
            }
            Address address = getItem(position);
            h.tv.setText(WalletUtils.formatHash(address.getAddress(), 4, 12));
            h.flAddress.setOnClickListener(new CopyClick(address.getAddress()));
            h.ibtnViewOnNet.setOnClickListener(new ViewOnNetClick(address.getAddress()));
            if (AppSharedPreference.getInstance().getAppMode() == BitherjSettings.AppMode.HOT) {
                h.ibtnViewOnNet.setVisibility(View.VISIBLE);
            } else {
                h.ibtnViewOnNet.setVisibility(View.GONE);
            }
            h.ibtnRestore.setOnClickListener(new RestoreClick(address));
            return convertView;
        }

        class ViewHolder {
            TextView tv;
            FrameLayout flAddress;
            ImageButton ibtnViewOnNet;
            ImageButton ibtnRestore;

            public ViewHolder(View v) {
                tv = (TextView) v.findViewById(R.id.tv_address);
                flAddress = (FrameLayout) v.findViewById(R.id.fl_address);
                ibtnViewOnNet = (ImageButton) v.findViewById(R.id.ibtn_view_on_net);
                ibtnRestore = (ImageButton) v.findViewById(R.id.ibtn_restore);
                v.setTag(this);
            }
        }

        class CopyClick implements View.OnClickListener {
            private String address;

            public CopyClick(String address) {
                this.address = address;
            }

            @Override
            public void onClick(View v) {
                StringUtil.copyString(address);
                DropdownMessage.showDropdownMessage(TrashCanActivity.this,
                        R.string.copy_address_success);
            }
        }

        class ViewOnNetClick implements View.OnClickListener {
            private String address;

            ViewOnNetClick(String address) {
                this.address = address;
            }

            @Override
            public void onClick(View v) {
                DialogConfirmTask dialog = new DialogConfirmTask(v.getContext(),
                        getString(R.string.address_option_view_on_blockchain_info), new Runnable() {
                    @Override
                    public void run() {
                        ThreadUtil.runOnMainThread(new Runnable() {
                            @Override
                            public void run() {
                                Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("http" +
                                        "://blockchain.info/address/" + address)).addFlags(Intent
                                        .FLAG_ACTIVITY_NEW_TASK);
                                try {
                                    startActivity(intent);
                                } catch (Exception e) {
                                    e.printStackTrace();
                                    DropdownMessage.showDropdownMessage(TrashCanActivity.this,
                                            R.string.find_browser_error);
                                }
                            }
                        });
                    }
                });
                dialog.show();
            }
        }

        class RestoreClick implements View.OnClickListener {
            private Address address;

            RestoreClick(Address address) {
                this.address = address;
            }

            @Override
            public void onClick(View v) {
                if (dp == null) {
                    dp = new DialogProgress(TrashCanActivity.this, R.string.please_wait);
                }
                new DialogConfirmTask(TrashCanActivity.this,
                        getString(R.string.trash_address_restore), new Runnable() {
                    @Override
                    public void run() {
                        new ThreadNeedService(dp, TrashCanActivity.this){
                            @Override
                            public void runWithService(BlockchainService service) {
                                if (service != null) {
                                    service.stopAndUnregister();
                                }
                                AddressManager.getInstance().restorePrivKey(address);
                                if(service != null) {
                                    service.startAndRegister();
                                }
                                ThreadUtil.runOnMainThread(new Runnable() {
                                    @Override
                                    public void run() {
                                        if(dp.isShowing()) {
                                            dp.dismiss();
                                        }
                                        refresh();
                                        notifyDataSetChanged();
                                        if (AppSharedPreference.getInstance().getAppMode() ==
                                                BitherjSettings.AppMode.HOT) {
                                            Fragment f = BitherApplication.hotActivity.getFragmentAtIndex
                                                    (1);
                                            if (f instanceof HotAddressFragment) {
                                                HotAddressFragment hotAddressFragment =
                                                        (HotAddressFragment) f;
                                                hotAddressFragment.refresh();
                                            }
                                        } else {
                                            Fragment f = BitherApplication.coldActivity
                                                    .getFragmentAtIndex(1);
                                            if (f instanceof ColdAddressFragment) {
                                                ColdAddressFragment coldAddressFragment =
                                                        (ColdAddressFragment) f;
                                                coldAddressFragment.refresh();
                                            }
                                        }
                                    }
                                });
                            }
                        }.start();
                    }
                }).show();
            }
        }
    };
}


text:
<tool id="EMBOSS: msbar55" name="msbar" version="5.0.0.1">
  <description>Mutate sequence beyond all recognition</description>
  <macros>
    <import>macros.xml</import>
  </macros>
  <expand macro="requirements" />
  <code file="emboss_format_corrector.py" />
  <command>msbar -sequence '$input1' -outseq '$out_file1' -count $count -point $point -block $block -codon $codon -inframe $inframe -minimum $minimum -maximum $maximum -osformat2 $out_format1
  -auto</command>
  <inputs>
    <param name="input1" type="data" format="fasta" label="Sequence 1" />
    <param name="count" type="integer" value="1" label="Number of times to perform the mutation operations" />
    <param name="point" type="select" label="Types of point mutations to perform">
      <option value="0">None</option>
      <option value="1">Any of the following</option>
      <option value="2">Insertions</option>
      <option value="3">Deletions</option>
      <option value="4">Changes</option>
      <option value="5">Duplications</option>
      <option value="6">Moves</option>
    </param>
    <param name="block" type="select" label="Types of block mutations to perform">
      <option value="0">None</option>
      <option value="1">Any of the following</option>
      <option value="2">Insertions</option>
      <option value="3">Deletions</option>
      <option value="4">Changes</option>
      <option value="5">Duplications</option>
      <option value="6">Moves</option>
    </param>
    <param name="codon" type="select" label="Types of codon mutations to perform" help="These are only done if the sequence is nucleic">
      <option value="0">None</option>
      <option value="1">Any of the following</option>
      <option value="2">Insertions</option>
      <option value="3">Deletions</option>
      <option value="4">Changes</option>
      <option value="5">Duplications</option>
      <option value="6">Moves</option>
    </param>
    <param name="inframe" type="select" label="Do 'codon' and 'block' operations in frame">
      <option value="no">No</option>
      <option value="yes">Yes</option>
    </param>
    <param name="minimum" type="integer" value="1" label="Minimum size for a block mutation" />
    <param name="maximum" type="integer" value="10" label="Maximum size for a block mutation" />
    <param name="out_format1" type="select" label="Output sequence file format">
      <option value="fasta">FASTA (m)</option>
      <option value="acedb">ACeDB (m)</option>
      <option value="asn1">ASN.1 (m)</option>
      <option value="clustal">Clustal (m)</option>
      <option value="codata">CODATA (m)</option>
      <option value="embl">EMBL (m)</option>
      <option value="fitch">Fitch (m)</option>
      <option value="gcg">Wisconsin Package GCG 9.x and 10.x (s)</option>
      <option value="genbank">GENBANK (m)</option>
      <option value="gff">GFF (m)</option>
      <option value="hennig86">Hennig86 (m)</option>
      <option value="ig">Intelligenetics (m)</option>
      <option value="jackknifer">Jackknifer (m)</option>
      <option value="jackknifernon">Jackknifernon (m)</option>
      <option value="mega">Mega (m)</option>
      <option value="meganon">Meganon (m)</option>
      <option value="msf">Wisconsin Package GCG's MSF (m)</option>
      <option value="pir">NBRF (PIR) (m)</option>
      <option value="ncbi">NCBI style FASTA (m)</option>
      <option value="nexus">Nexus/PAUP (m)</option>
      <option value="nexusnon">Nexusnon/PAUPnon (m)</option>
      <option value="phylip">PHYLIP interleaved (m)</option>
      <option value="phylipnon">PHYLIP non-interleaved (m)</option>
      <option value="selex">SELEX (m)</option>
      <option value="staden">Staden (s)</option>
      <option value="strider">DNA strider (m)</option>
      <option value="swiss">SwisProt entry (m)</option>
      <option value="text">Plain sequence (s)</option>
      <option value="treecon">Treecon (m)</option>
    </param>
  </inputs>
  <outputs>
    <data name="out_file1" format="fasta" />
  </outputs>
  <tests>
    <test>
      <param name="input1" value="2.fasta"/>
      <param name="count" value="1"/>
      <param name="point" value="0"/>
      <param name="block" value="0"/>
      <param name="codon" value="0"/>
      <param name="inframe" value="no"/>
      <param name="minimum" value="1"/>
      <param name="maximum" value="10"/>
      <param name="out_format1" value="fasta"/>
      <output name="out_file1" file="emboss_msbar_out.fasta"/>
    </test>
  </tests>
  <help>
.. class:: warningmark

The input dataset needs to be sequences.

-----

    You can view the original documentation here_.

    .. _here: http://galaxy-iuc.github.io/emboss-5.0-docs/msbar.html
  </help>
  <expand macro="citations" />
</tool>


text:
#pragma once

#include "../Core/Object.h"

namespace Urho3D
{

/// AnimatedModel bone hierarchy created.
URHO3D_EVENT(E_BONEHIERARCHYCREATED, BoneHierarchyCreated)
{
    URHO3D_PARAM(P_NODE, Node);                    // Node pointer
}

/// AnimatedModel animation trigger.
URHO3D_EVENT(E_ANIMATIONTRIGGER, AnimationTrigger)
{
    URHO3D_PARAM(P_NODE, Node);                    // Node pointer
    URHO3D_PARAM(P_ANIMATION, Animation);          // Animation pointer
    URHO3D_PARAM(P_NAME, Name);                    // String
    URHO3D_PARAM(P_TIME, Time);                    // Float
    URHO3D_PARAM(P_DATA, Data);                    // User-defined data type
}

/// AnimatedModel animation finished or looped.
URHO3D_EVENT(E_ANIMATIONFINISHED, AnimationFinished)
{
    URHO3D_PARAM(P_NODE, Node);                    // Node pointer
    URHO3D_PARAM(P_ANIMATION, Animation);          // Animation pointer
    URHO3D_PARAM(P_NAME, Name);                    // String
    URHO3D_PARAM(P_LOOPED, Looped);                // Bool
}

/// Particle effect finished.
URHO3D_EVENT(E_PARTICLEEFFECTFINISHED, ParticleEffectFinished)
{
    URHO3D_PARAM(P_NODE, Node);                    // Node pointer
    URHO3D_PARAM(P_EFFECT, Effect);                // ParticleEffect pointer
}

/// Terrain geometry created.
URHO3D_EVENT(E_TERRAINCREATED, TerrainCreated)
{
    URHO3D_PARAM(P_NODE, Node);                    // Node pointer
}

}


text:
<?php namespace Aliyun\OSS\Test;

use Aliyun\OSS\Core\Exception;
use Aliyun\OSS\Http\ResponseCore;
use Aliyun\OSS\Result\GetCorsResult;

class GetCorsResultTest extends \PHPUnit_Framework_TestCase
{

    private $validXml = <<<BBBB
<?xml version="1.0" encoding="utf-8"?>
<CORSConfiguration>
<CORSRule>
<AllowedOrigin>http://www.b.com</AllowedOrigin>
<AllowedOrigin>http://www.a.com</AllowedOrigin>
<AllowedOrigin>http://www.a.com</AllowedOrigin>
<AllowedMethod>GET</AllowedMethod>
<AllowedMethod>PUT</AllowedMethod>
<AllowedMethod>POST</AllowedMethod>
<AllowedHeader>x-oss-test</AllowedHeader>
<AllowedHeader>x-oss-test2</AllowedHeader>
<AllowedHeader>x-oss-test2</AllowedHeader>
<AllowedHeader>x-oss-test3</AllowedHeader>
<ExposeHeader>x-oss-test1</ExposeHeader>
<ExposeHeader>x-oss-test1</ExposeHeader>
<ExposeHeader>x-oss-test2</ExposeHeader>
<MaxAgeSeconds>10</MaxAgeSeconds>
</CORSRule>
<CORSRule>
<AllowedOrigin>http://www.b.com</AllowedOrigin>
<AllowedMethod>GET</AllowedMethod>
<AllowedHeader>x-oss-test</AllowedHeader>
<ExposeHeader>x-oss-test1</ExposeHeader>
<MaxAgeSeconds>110</MaxAgeSeconds>
</CORSRule>
</CORSConfiguration>
BBBB;

    public function testParseValidXml()
    {
        $response = new ResponseCore(array(), $this->validXml, 200);
        $result   = new GetCorsResult($response);
        $this->assertTrue($result->isOK());
        $this->assertNotNull($result->getData());
        $this->assertNotNull($result->getRawResponse());
        $corsConfig = $result->getData();
        $this->assertEquals($this->cleanXml($this->validXml), $this->cleanXml($corsConfig->serializeToXml()));
    }

    private function cleanXml($xml)
    {
        return str_replace("\n", "", str_replace("\r", "", $xml));
    }

    public function testInvalidResponse()
    {
        $response = new ResponseCore(array(), $this->validXml, 300);
        try {
            new GetCorsResult($response);
            $this->assertTrue(false);
        } catch (Exception $e) {

        }
    }
}


text:
var preprocessor = require('../lib/preprocessor');
var helper = require('../lib/helper');

describe('preprocessor', function () {
  describe('preParse', function () {
    it('should do nothing if the file is empty', function () {
      let _xml = preprocessor.preParseXML('', {});
      helper.assert(_xml, '');
    });
    it('should remove XML inside multiple markers', function () {
      let _xml = '<xml>{d.this	IsA	Carbo
ne	Ma	rker}</xml>';
      let _expectedXML = '<xml>{d.thisIsACarboneMarker}
		</xml>';
      helper.assert(preprocessor.preParseXML(_xml, {}), _expectedXML);
    });
    it('should remove XML inside multiple markers and translate markers', function () {
      let _xml = '<xmlstart>{me<interxml>n<bullshit>u}
{t(Mond</interxml>ay)}

{#def = id=2  }

{t(Tuesday is <bullshit>the second day of the week!)}
</xmlend>';
      let _expectedXML = '<xmlstart>{me<interxml>n<bullshit>u}
Lundi</interxml>

{#def = id=2  }

Tuesday is the second day of the week!<bullshit>
</xmlend>';
      let _options = {
        lang         : 'fr',
        translations : {
          fr : {
            Monday : 'Lundi'
          }
        }
      };
      helper.assert(preprocessor.preParseXML(_xml, _options), _expectedXML);
    });
    it('should translate markers which are inside other markers', function () {
      let _xml = '<xml>{d.if:ifEqual(2, {t(Monday)})  }</xml>';
      let _expectedXML = '<xml>{d.if:ifEqual(2, Lundi)  }</xml>';
      let _options = {
        lang         : 'fr',
        translations : {
          fr : {
            Monday : 'Lundi'
          }
        }
      };
      helper.assert(preprocessor.preParseXML(_xml, _options), _expectedXML);
    });
    it('should translate markers which are inside other markers and remove XML inside', function () {
      let _xml = '<xml>{<t>d</t>.if:if<tag>Eq</tag>ual(2, {t(on
Monday) }
) }</xml>';
      let _expectedXML = '<xml>{d.if:ifEqual(2, le Lundi) }<t></t><tag></tag>

</xml>';
      let _options = {
        lang         : 'fr',
        translations : {
          fr : {
            'on Monday' : 'le Lundi'
          }
        }
      };
      helper.assert(preprocessor.preParseXML(_xml, _options), _expectedXML);
    });
  });
  describe('execute', function () {
    it('should do nothing if the file is an empty object', function (done) {
      preprocessor.execute({}, function (err, tmpl) {
        helper.assert(err+'', 'null');
        helper.assert(tmpl, {});
        done();
      });
    });
    it('should do nothing if the file is null', function (done) {
      preprocessor.execute(null, function (err, tmpl) {
        helper.assert(err + '', 'null');
        helper.assert(tmpl, null);
        done();
      });
    });
    describe('ODT preprocessing', function () {
      var _xml = `<office:document-content>
          <office:body>
            <office:text text:use-soft-page-breaks="true">

                <text:p text:style-name="P19">bla
                  <text:span text:style-name="T134">nam</text:span>
                  <text:soft-page-break/>
                  </text:p>

                <text:p text:style-name="P29">
                  <text:span text:style-name="T42">sd</text:span>
                  <text:soft-page-break></text:soft-page-break>
                  <text:span text:style-name="T43">position</text:span>
                  <text:soft-page-break/>
                  <text:span text:style-name="T42"></text:span>
                </text:p>

            </office:text>
          </office:body>
        </office:document-content>`
      ;
      it('should replace shared string by inline strings in a real xlsx file. The shared string should be removed', function (done) {
        var _report = {
          isZipped   : true,
          filename   : 'template.xlsx',
          embeddings : [],
          extension  : 'odt',
          files      : [
            { name : 'other.xml'  , parent : '', data : '<text:soft-page-break/>'},
            { name : 'content.xml', parent : '', data : _xml}
          ]
        };
        preprocessor.execute(_report, function (err, tmpl) {
          helper.assert(err + '', 'null');
          helper.assert(/soft-page-break/.test(tmpl.files[0].data), true);
          helper.assert(/soft-page-break/.test(tmpl.files[1].data), false);
          done();
        });
      });
    });
    describe('XSLX preprocessing', function () {
      var _sharedStringBefore = '<?xml version="1.0" encoding="UTF-8" standalone="yes"?><sst xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" count="6" uniqueCount="6"><si><t>Nom</t></si><si><t xml:space="preserve">Id </t></si><si><t>TOTAL</t></si><si><t>tata</t></si><si>'
                              + '<t>{d.name}</t></si><si><t>{d.id}</t></si></sst>';
      // var _sharedStringAfter  = '<?xml version="1.0" encoding="UTF-8" standalone="yes"?><sst xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" count="6" uniqueCount="6"><si><t>Nom</t></si><si><t xml:space="preserve">Id </t></si><si><t>TOTAL</t></si><si><t>tata</t></si><si>'
      //                        + '<t></t></si><si><t></t></si></sst>';
      var _sheetBefore  = '<?xml version="1.0" encoding="UTF-8" standalone="yes"?><worksheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="x14ac" xmlns:x14ac="http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac"><dimension ref="A1:C3"/><sheetViews><sheetView tabSelected="1" workbookViewId="0"><selection activeCell="C3" sqref="C3"/></sheetView></sheetViews><sheetFormatPr baseColWidth="10" defaultRowHeight="15" x14ac:dyDescent="0"/><sheetData>'
                        + '<row r="1" spans="1:3"><c r="A1" t="s"><v>0</v></c><c r="B1" t="s"><v>1</v></c><c r="C1" t="s"><v>2</v></c></row>'
                        + '<row r="2" spans="1:3"><c r="A2" t="s"><v>3</v></c><c r="B2"><v>100</v></c><c r="C2"><f>B2*100</f><v>10000</v></c></row>'
                        + '<row r="3" spans="1:3"><c r="A3" t="s"><v>4</v></c><c r="B3" t="s"><v>5</v></c><c r="C3" t="e"><f>B3*100</f><v>#VALUE!</v></c></row>'
                        + '</sheetData><pageMargins left="0.75" right="0.75" top="1" bottom="1" header="0.5" footer="0.5"/><extLst><ext uri="{64002731-A6B0-56B0-2670-7721B7C09600}" xmlns:mx="http://schemas.microsoft.com/office/mac/excel/2008/main"><mx:PLV Mode="0" OnePage="0" WScale="0"/></ext></extLst></worksheet>';
      var _sheetAfter   = '<?xml version="1.0" encoding="UTF-8" standalone="yes"?><worksheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="x14ac" xmlns:x14ac="http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac"><dimension ref="A1:C3"/><sheetViews><sheetView tabSelected="1" workbookViewId="0"><selection activeCell="C3" sqref="C3"/></sheetView></sheetViews><sheetFormatPr baseColWidth="10" defaultRowHeight="15" x14ac:dyDescent="0"/><sheetData>'
                        + '<row  ><c  t="inlineStr"><is><t>Nom</t></is></c><c  t="inlineStr"><is><t xml:space="preserve">Id </t></is></c><c  t="inlineStr"><is><t>TOTAL</t></is></c></row>'
                        + '<row  ><c  t="inlineStr"><is><t>tata</t></is></c><c ><v>100</v></c><c ><f>B2*100</f><v>10000</v></c></row>'
                        + '<row  ><c  t="inlineStr"><is><t>{d.name}</t></is></c><c  t="inlineStr"><is><t>{d.id}</t></is></c><c  t="e"><f>B3*100</f><v>#VALUE!</v></c></row>'
                        + '</sheetData><pageMargins left="0.75" right="0.75" top="1" bottom="1" header="0.5" footer="0.5"/><extLst><ext uri="{64002731-A6B0-56B0-2670-7721B7C09600}" xmlns:mx="http://schemas.microsoft.com/office/mac/excel/2008/main"><mx:PLV Mode="0" OnePage="0" WScale="0"/></ext></extLst></worksheet>';
      var _sharedStringBefore2 = _sharedStringBefore.replace('{d.id}', '{d.type}');
      //  var _sharedStringAfter2 = _sharedStringAfter.replace('{d.id}', '{d.type}');
      var _sheetBefore2 = _sheetBefore.replace('{d.id}', '{d.type}');
      var _sheetAfter2 = _sheetAfter.replace('{d.id}', '{d.type}');
      helper.assert(_sheetAfter2 !== _sheetAfter, true);
      describe('execute', function () {
        it('should replace shared string by inline strings in a real xlsx file. The shared string should be removed', function (done) {
          var _report = {
            isZipped   : true,
            filename   : 'template.xlsx',
            embeddings : [],
            extension  : 'xlsx',
            files      : [
              {name : 'xl/sharedStrings.xml'    , parent : '', data : _sharedStringBefore},
              {name : 'xl/worksheets/sheet1.xml', parent : '', data : _sheetBefore}
            ]
          };
          preprocessor.execute(_report, function (err, tmpl) {
            helper.assert(err + '', 'null');
            // tmpl.files[0].name.should.be.eql('xl/sharedStrings.xml');
            // tmpl.files[0].data.should.be.eql(_sharedStringAfter);
            helper.assert(tmpl.files[0].name, 'xl/worksheets/sheet1.xml');
            helper.assert(tmpl.files[0].data, _sheetAfter);
            done();
          });
        });
        it('should remove calcChain in xlsx file', function (done) {
          var _report = {
            isZipped   : true,
            filename   : 'template.xlsx',
            embeddings : [],
            extension  : 'xlsx',
            files      : [
              {name : 'xl/calcChain.xml'        , parent : '', data : '<xml></xml>'},
              {name : 'xl/worksheets/sheet1.xml', parent : '', data : '<xml></xml>'}
            ]
          };
          preprocessor.execute(_report, function (err, tmpl) {
            helper.assert(err + '', 'null');
            helper.assert(err + '', 'null');
            helper.assert(tmpl.files.length, 1);
            helper.assert(tmpl.files[0].name, 'xl/worksheets/sheet1.xml');
            helper.assert(tmpl.files[0].data, '<xml></xml>');
            done();
          });
        });
        it('should replace shared string by inline strings in embedded xlsx file', function (done) {
          var _report = {
            isZipped   : true,
            filename   : 'template.docx',
            embeddings : ['embedded/spreadsheet.xlsx'],
            extension  : 'docx',
            files      : [
              {name : 'my_file.xml'             , parent : ''                         , data : 'some text'},
              {name : 'xl/sharedStrings.xml'    , parent : 'embedded/spreadsheet.xlsx', data : _sharedStringBefore},
              {name : 'xl/worksheets/sheet1.xml', parent : 'embedded/spreadsheet.xlsx', data : _sheetBefore}
            ]
          };
          preprocessor.execute(_report, function (err, tmpl) {
            helper.assert(err + '', 'null');
            helper.assert(tmpl.files[0].name, 'my_file.xml');
            helper.assert(tmpl.files[0].data, 'some text');
            helper.assert(tmpl.files[0].parent, '');
            // tmpl.files[1].name.should.be.eql('xl/sharedStrings.xml');
            // tmpl.files[1].data.should.be.eql(_sharedStringAfter);
            // tmpl.files[1].parent.should.be.eql('embedded/spreadsheet.xlsx');
            helper.assert(tmpl.files[1].name, 'xl/worksheets/sheet1.xml');
            helper.assert(tmpl.files[1].data, _sheetAfter);
            helper.assert(tmpl.files[1].parent, 'embedded/spreadsheet.xlsx');
            done();
          });
        });
        it('should consider each embedded document separately', function (done) {
          var _report = {
            isZipped   : true,
            filename   : 'template.docx',
            embeddings : ['embedded/spreadsheet.xlsx', 'embedded/spreadsheet2.xlsx'],
            extension  : 'docx',
            files      : [
              {name : 'my_file.xml'             , parent : ''                          , data : 'some text'},
              {name : 'xl/sharedStrings.xml'    , parent : 'embedded/spreadsheet.xlsx' , data : _sharedStringBefore},
              {name : 'xl/worksheets/sheet1.xml', parent : 'embedded/spreadsheet.xlsx' , data : _sheetBefore},
              {name : 'xl/sharedStrings.xml'    , parent : 'embedded/spreadsheet2.xlsx', data : _sharedStringBefore2},
              {name : 'xl/worksheets/sheet1.xml', parent : 'embedded/spreadsheet2.xlsx', data : _sheetBefore2}
            ]
          };
          preprocessor.execute(_report, function (err, tmpl) {
            helper.assert(err + '', 'null');
            helper.assert(tmpl.files[0].name, 'my_file.xml');
            helper.assert(tmpl.files[0].data, 'some text');
            helper.assert(tmpl.files[0].parent, '');
            // tmpl.files[1].name.should.be.eql('xl/sharedStrings.xml');
            // tmpl.files[1].data.should.be.eql(_sharedStringAfter);
            // tmpl.files[1].parent.should.be.eql('embedded/spreadsheet.xlsx');
            helper.assert(tmpl.files[1].name, 'xl/worksheets/sheet1.xml');
            helper.assert(tmpl.files[1].data, _sheetAfter);
            helper.assert(tmpl.files[1].parent, 'embedded/spreadsheet.xlsx');
            // tmpl.files[2].name.should.be.eql('xl/sharedStrings.xml');
            // tmpl.files[2].data.should.be.eql(_sharedStringAfter2);
            // tmpl.files[2].parent.should.be.eql('embedded/spreadsheet2.xlsx');
            helper.assert(tmpl.files[2].name, 'xl/worksheets/sheet1.xml');
            helper.assert(tmpl.files[2].data, _sheetAfter2);
            helper.assert(tmpl.files[2].parent, 'embedded/spreadsheet2.xlsx');
            done();
          });
        });
      });
      describe('removeOneFile', function () {
        var _relationFileBefore = '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>'
          +'<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">'
          +'  <Relationship Id="rId8" Target="worksheets/sheet8.xml" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet"/>'
          +'  <Relationship Id="rId11" Target="sharedStrings.xml" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings"/>'
          +'  <Relationship Id="rId10" Target="styles.xml" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles"/>'
          +'</Relationships>';
        var _relationFileAfter = '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>'
          +'<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">'
          +'  <Relationship Id="rId8" Target="worksheets/sheet8.xml" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet"/>'
          +'  '
          +'  <Relationship Id="rId10" Target="styles.xml" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles"/>'
          +'</Relationships>';
        it('should do nothing if template is empty', function () {
          var _report = {
            isZipped  : true,
            filename  : 'template.docx',
            extension : 'docx',
            files     : []
          };
          preprocessor.removeOneFile(_report, 1);
          helper.assert(_report, {
            isZipped  : true,
            filename  : 'template.docx',
            extension : 'docx',
            files     : []
          });
        });
        it('should do nothing if index is negative', function () {
          var _report = {
            isZipped  : true,
            filename  : 'template.docx',
            extension : 'docx',
            files     : [{name : 'my_file.xml' , data : 'some text', parent : ''}]
          };
          preprocessor.removeOneFile(_report, -1);
          helper.assert(_report.files.length, 1);
        });
        it('should remove this 2nd file', function () {
          var _report = {
            isZipped  : true,
            filename  : 'template.docx',
            extension : 'docx',
            files     : [
              {name : 'my_file.xml' , data : 'some text', parent : ''},
              {name : 'my_file1.xml', data : 'some text', parent : ''},
              {name : 'my_file2.xml', data : 'some text', parent : ''}
            ]
          };
          preprocessor.removeOneFile(_report, 1, '');
          helper.assert(_report.files.length, 2);
          helper.assert(_report.files[0].name, 'my_file.xml');
          helper.assert(_report.files[1].name, 'my_file2.xml');
        });
        it('should remove this 2nd file and the relation in workbook', function () {
          var _report = {
            isZipped  : true,
            filename  : 'template.docx',
            extension : 'docx',
            files     : [
              {name : 'xl/my_file.xml'            , data : 'some text'        , parent : ''},
              {name : 'xl/my_file2.xml'           , data : 'some text'        , parent : ''},
              {name : 'xl/sharedStrings.xml'      , data : 'some text'        , parent : ''},
              {name : 'xl/_rels/workbook.xml.rels', data : _relationFileBefore, parent : ''}
            ]
          };
          preprocessor.removeOneFile(_report, 2, '');
          helper.assert(_report.files.length, 3);
          helper.assert(_report.files[0].name, 'xl/my_file.xml');
          helper.assert(_report.files[1].name, 'xl/my_file2.xml');
          helper.assert(_report.files[2].name, 'xl/_rels/workbook.xml.rels');
          helper.assert(_report.files[2].data, _relationFileAfter);
        });
        it('should change the workbook of the embedded document only', function () {
          var _report = {
            isZipped  : true,
            filename  : 'template.docx',
            extension : 'docx',
            files     : [
              {name : 'xl/my_file.xml'            , data : 'some text'        , parent : ''},
              {name : 'xl/my_file2.xml'           , data : 'some text'        , parent : ''},
              {name : 'xl/sharedStrings.xml'      , data : 'some text'        , parent : ''},
              {name : 'xl/_rels/workbook.xml.rels', data : _relationFileBefore, parent : ''},
              {name : 'xl/_rels/workbook.xml.rels', data : _relationFileBefore, parent : 'subdoc.xlsx'}
            ]
          };
          preprocessor.removeOneFile(_report, 2, 'subdoc.xlsx');
          helper.assert(_report.files.length, 4);
          helper.assert(_report.files[0].name, 'xl/my_file.xml');
          helper.assert(_report.files[1].name, 'xl/my_file2.xml');
          helper.assert(_report.files[2].name, 'xl/_rels/workbook.xml.rels');
          helper.assert(_report.files[2].data, _relationFileBefore);
          helper.assert(_report.files[3].name, 'xl/_rels/workbook.xml.rels');
          helper.assert(_report.files[3].data, _relationFileAfter);
        });
      });
      describe('convertSharedStringToInlineString', function () {
        it('should do not crash if the file is not an xlsx file (should not happen because execute filter)', function () {
          var _report = {
            isZipped  : true,
            filename  : 'template.docx',
            extension : 'docx',
            files     : [
              {name : 'my_file.xml', data : 'some text'}
            ]
          };
          var _fileConverted = preprocessor.convertSharedStringToInlineString(_report);
          helper.assert(_fileConverted, _report);
        });
        it('should replace shared string by inline strings in a real xlsx file', function () {
          var _report = {
            isZipped  : true,
            filename  : 'template.xlsx',
            extension : 'xlsx',
            files     : [
              {name : 'xl/sharedStrings.xml'    , data : _sharedStringBefore},
              {name : 'xl/worksheets/sheet1.xml', data : _sheetBefore}
            ]
          };
          var _fileConverted = preprocessor.convertSharedStringToInlineString(_report);
          helper.assert(_fileConverted, {
            isZipped  : true,
            filename  : 'template.xlsx',
            extension : 'xlsx',
            files     : [
              // {'name': 'xl/sharedStrings.xml'    , 'data': _sharedStringAfter},
              {name : 'xl/worksheets/sheet1.xml', data : _sheetAfter}
            ]
          });
        });
        it('should works with sheet2.xml');
      });
      describe('removeCalcChain', function () {
        var _relationFileBefore = '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>'
          +'<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">'
          +'  <Relationship Id="rId8"  Target="worksheets/sheet1.xml" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet"/>'
          +'  <Relationship Id="rId11" Target="calcChain.xml"         Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/calcChain"/>'
          +'  <Relationship Id="rId12" Target="sharedStrings.xml"     Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings"/>'
          +'</Relationships>';
        var _relationFileAfter = '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>'
          +'<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">'
          +'  <Relationship Id="rId8"  Target="worksheets/sheet1.xml" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet"/>'
          +'  '
          +'  <Relationship Id="rId12" Target="sharedStrings.xml"     Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings"/>'
          +'</Relationships>';
        it('should do not crash if the file is not an xlsx file (should not happen because execute filter)', function () {
          var _report = {
            isZipped  : true,
            filename  : 'template.docx',
            extension : 'docx',
            files     : [
              {name : 'my_file.xml', data : 'some text'}
            ]
          };
          var _fileConverted = preprocessor.removeCalcChain(_report);
          helper.assert(_fileConverted, _report);
        });
        it('should remove calcChain file', function () {
          var _report = {
            isZipped  : true,
            filename  : 'template.xlsx',
            extension : 'xlsx',
            files     : [
              {name : 'xl/sharedStrings.xml'      , data : '<xml></xml>'       },
              {name : 'xl/calcChain.xml'          , data : '<xml></xml>'       },
              {name : 'xl/worksheets/sheet1.xml'  , data : '<xml></xml>'       },
              {name : 'xl/_rels/workbook.xml.rels', data : _relationFileBefore },
            ]
          };
          var _fileConverted = preprocessor.removeCalcChain(_report);
          helper.assert(_fileConverted, {
            isZipped  : true,
            filename  : 'template.xlsx',
            extension : 'xlsx',
            files     : [
              {name : 'xl/sharedStrings.xml'      , data : '<xml></xml>'       },
              {name : 'xl/worksheets/sheet1.xml'  , data : '<xml></xml>'       },
              {name : 'xl/_rels/workbook.xml.rels', data : _relationFileAfter  },
            ]
          });
        });
        it('should remove calcChain file only in a specific embbeded file', function () {
          var _report = {
            isZipped  : true,
            filename  : 'template.xlsx',
            extension : 'xlsx',
            files     : [
              {name : 'xl/sharedStrings.xml'      , data : '<xml></xml>'       , parent : ''            },
              {name : 'xl/calcChain.xml'          , data : '<xml></xml>'       , parent : 'subdoc.xlsx' },
              {name : 'xl/calcChain.xml'          , data : '<xml></xml>'       , parent : ''            },
              {name : 'xl/worksheets/sheet1.xml'  , data : '<xml></xml>'       , parent : ''            },
              {name : 'xl/_rels/workbook.xml.rels', data : _relationFileBefore , parent : 'subdoc.xlsx' },
              {name : 'xl/_rels/workbook.xml.rels', data : _relationFileBefore , parent : ''            }
            ]
          };
          var _fileConverted = preprocessor.removeCalcChain(_report, 'subdoc.xlsx');
          helper.assert(_fileConverted, {
            isZipped  : true,
            filename  : 'template.xlsx',
            extension : 'xlsx',
            files     : [
              {name : 'xl/sharedStrings.xml'      , data : '<xml></xml>'       , parent : ''            },
              {name : 'xl/calcChain.xml'          , data : '<xml></xml>'       , parent : ''            },
              {name : 'xl/worksheets/sheet1.xml'  , data : '<xml></xml>'       , parent : ''            },
              {name : 'xl/_rels/workbook.xml.rels', data : _relationFileAfter  , parent : 'subdoc.xlsx' },
              {name : 'xl/_rels/workbook.xml.rels', data : _relationFileBefore , parent : ''            }
            ]
          });
        });
      });
      describe('readSharedString', function () {
        it('should do nothing if the string is empty or null', function () {
          helper.assert(preprocessor.readSharedString(null), []);
          helper.assert(preprocessor.readSharedString(''), []);
          helper.assert(preprocessor.readSharedString(undefined), []);
        });
        it('should parse xml and return an array of shared strings', function () {
          helper.assert(preprocessor.readSharedString('<si><t>Name</t></si>'), ['<t>Name</t>']);
          helper.assert(preprocessor.readSharedString('<xml><si><t>Name</t></si></xml>'), ['<t>Name</t>']);
          helper.assert(preprocessor.readSharedString('<xml> <si> <t> Name </t> </si>  </xml>'), [' <t> Name </t> ']);
        });
        it('should be able to parse a real xlsx shared string file', function () {
          helper.assert(preprocessor.readSharedString('<?xml version="1.0" encoding="UTF-8" standalone="yes"?><sst xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" count="6" uniqueCount="6"><si><t>Nom</t></si><si><t xml:space="preserve">Id </t></si><si><t>TOTAL</t></si><si><t>tata</t></si><si><t>{d.name}</t></si><si><t>{d.id}</t></si></sst>'),
            [ '<t>Nom</t>',
              '<t xml:space="preserve">Id </t>',
              '<t>TOTAL</t>',
              '<t>tata</t>',
              '<t>{d.name}</t>',
              '<t>{d.id}</t>' ]
          );
        });
      });
      describe('convertToInlineString', function () {
        it('should do nothing if the string is empty or null', function () {
          helper.assert(preprocessor.convertToInlineString(null), null);
          helper.assert(preprocessor.convertToInlineString(''), '');
          helper.assert(preprocessor.convertToInlineString(), undefined);
        });
        it('should replace shared string index by inline string', function () {
          helper.assert(preprocessor.convertToInlineString('<c r="A34" s="117" t="s"><v>0</v></c>', ['<t>{d.name}</t>']), '<c r="A34" s="117" t="inlineStr"><is><t>{d.name}</t></is></c>');
        });
        it('should not do bullshit if a text contain t="s"', function () {
          helper.assert(preprocessor.convertToInlineString('<c r="A34" s="117"><t>t="s"</t></c>', []), '<c r="A34" s="117"><t>t="s"</t></c>');
        });
        it('should replace shared string even if there are multiple shared string in different order\
            it should work if the type (t="s") of the tag is not always at the same position\
            it should work if index position is greater than 9 ', function () {
          var _sharedStrings = [
            'matrix',
            '{d.id}',
            '{d.name}',
            '{d.isActive}}',
            'a','b','c','d','e','f','g','h',
          ];
          helper.assert(preprocessor.convertToInlineString('<row r="34" spans="1:4"><c r="A34"  t="s"  s="117" ><v>3</v></c><c r="C34" s="118" t="s" ><v>11</v></c><c   t="s"   r="D34" s="33" ><v>2</v></c></row>',
            _sharedStrings
          ),
          '<row r="34" spans="1:4"><c r="A34"  t="inlineStr"  s="117" ><is>{d.isActive}}</is></c><c r="C34" s="118" t="inlineStr" ><is>h</is></c><c   t="inlineStr"   r="D34" s="33" ><is>{d.name}</is></c></row>'
          );
        });
        it('should do nothing if the tag does not contain nested <v> </v> even if the type is t="s"', function () {
          helper.assert(preprocessor.convertToInlineString('<c r="A34" s="117" t="s"><t>0</t></c>', ['<t>{d.name}</t>']), '<c r="A34" s="117" t="s"><t>0</t></c>');
        });
        it('should makes a number marker (:formatN applied) recognised as number type by changing the type t="s" to t="n", removing xml markups and formatter ":formatN() [One marker test]" ', function () {
          const _xml = '<c r="A2" s="0" t="s"><v>0</v></c>';
          const _sharedString = ['<t xml:space="preserve">{d.nbr2:formatN()}</t>'];
          const _expectedResult = '<c r="A2" s="0" t="n"><v>{d.nbr2}</v></c>';
          const _result = preprocessor.convertToInlineString(_xml, _sharedString);
          helper.assert(_result, _expectedResult);
          helper.assert(!!/t="s"/.exec(_result), false);
          helper.assert(!!/t="n"/.exec(_result), true);
        });

        it('should makes a number marker (:formatN applied) recognised as number type by changing the type t="n", removing xml markups and formatter ":formatN()" [Multiple markers test]', function () {
          const _xml = '<c r="A1" s="1" t="s"><v>0</v></c><c r="A2" s="0" t="s"><v>1</v></c><c r="A3" s="0" t="s"><v>2</v></c>';
          const _sharedString = ['<t xml:space="preserve">1</t>', '<t xml:space="preserve">{d.nbr2:formatN()}</t>', '<t xml:space="preserve">{d.nbr3:formatN()}</t>'];
          const _expectedResult = '<c r="A1" s="1" t="inlineStr"><is><t xml:space="preserve">1</t></is></c><c r="A2" s="0" t="n"><v>{d.nbr2}</v></c><c r="A3" s="0" t="n"><v>{d.nbr3}</v></c>';
          const _result = preprocessor.convertToInlineString(_xml, _sharedString);
          helper.assert(_result, _expectedResult);
          helper.assert(!!/t="s"/.exec(_result), false);
          helper.assert(!!/t="n"/.exec(_result), true);
        });

        it('should not makes a number marker recognised as number type because of wrong formatN typing [testing regex]', function () {
          const _xml = '<c r="A1" s="1" t="s"><v>0</v></c><c r="A2" s="0" t="s"><v>1</v></c><c r="A3" s="0" t="s"><v>2</v></c>';
          const _sharedString = ['<t xml:space="preserve">{d.nbr1:formatN(}</t>', '<t xml:space="preserve">{d.nbr2formatN()}</t>', '<t xml:space="preserve">{d.nbr3:formatN)}</t>'];
          const _expectedResult = '<c r="A1" s="1" t="inlineStr"><is><t xml:space="preserve">{d.nbr1:formatN(}</t></is></c><c r="A2" s="0" t="inlineStr"><is><t xml:space="preserve">{d.nbr2formatN()}</t></is></c><c r="A3" s="0" t="inlineStr"><is><t xml:space="preserve">{d.nbr3:formatN)}</t></is></c>';
          const _result = preprocessor.convertToInlineString(_xml, _sharedString);
          helper.assert(_result, _expectedResult);
          helper.assert(!!/t="inlineStr"/.exec(_result), true);
        });
      });
      describe('convertNumberMarkersIntoNumericFormat', function () {
        it('should makes a number marker (:formatN) recognised as number cell for ODS files [1 marker]', function () {
          const _template = {
            files : [{
              name : 'content.xml',
              data : '
<text:p>{d.nbr:formatN()}</text:p>
'
            }]
          };
          const _expectedResult = '
<text:p>{d.nbr}</text:p>
';
          preprocessor.convertNumberMarkersIntoNumericFormat(_template);
          helper.assert(_template.files[0].data, _expectedResult);
        });

        it('should makes a number marker (:formatN) recognised as number cell for ODS files [2 markers]', function () {
          const _template = {
            files : [{
              name : 'content.xml',
              data : '
<text:p>{d.nbr:formatN()}</text:p>

<text:p>{d.nbr6:formatN()}</text:p>
'
            }]
          };
          const _expectedResult = '
<text:p>{d.nbr}</text:p>

<text:p>{d.nbr6}</text:p>
';
          preprocessor.convertNumberMarkersIntoNumericFormat(_template);
          helper.assert(_template.files[0].data, _expectedResult);
        });

        it('should makes a number marker (:formatN) recognised as number cell for ODS files [1 markers + style attributes]', function () {
          const _template = {
            files : [{
              name : 'content.xml',
              data : '
<text:p>{d.nbr7:formatN()}</text:p>
'
            }]
          };
          const _expectedResult = '
<text:p>{d.nbr7}</text:p>
';
          preprocessor.convertNumberMarkersIntoNumericFormat(_template);
          helper.assert(_template.files[0].data, _expectedResult);
        });

        it('should makes a number marker (:formatN) recognised as number cell for ODS files [1 markers + 2 style attributes and spaces]', function () {
          const _template = {
            files : [{
              name : 'content.xml',
              data : '
  <text:p>   {d.nbr7:formatN()}  </text:p>
'
            }]
          };
          const _expectedResult = '
  <text:p>   {d.nbr7}  </text:p>
';
          preprocessor.convertNumberMarkersIntoNumericFormat(_template);
          helper.assert(_template.files[0].data, _expectedResult);
        });
        it('should not convert to number if the cell contains multiple markers', function () {
          const _template = {
            files : [{
              name : 'content.xml',
              data : '
  <text:p>   {d.nbr7:formatN()} {d.nbr6:formatN()}  </text:p>
'
            }]
          };
          const _expectedResult = '
  <text:p>   {d.nbr7:formatN()} {d.nbr6:formatN()}  </text:p>
';
          preprocessor.convertNumberMarkersIntoNumericFormat(_template);
          helper.assert(_template.files[0].data, _expectedResult);
        });
        it('should accept unknown attributes in XML and other order of calcext:value-type and office:value-type', function () {
          const _template = {
            files : [{
              name : 'content.xml',
              data : ''
                + '
'
                + '
'
                + '    <text:p>{d.analyticalGroup[id=8].label:ifEmpty(\'-\')}</text:p>'
                + '
'
                + '
'
                + '    <text:p>{d.analyticalGroup[id=8].consumption:ifEmpty(\'-\'):formatN()}</text:p>'
                + '
'
                + '
'
                + '    <text:p>{d.analyticalGroup[id=8].consumption:ifEmpty(\'-\'):formatN()}</text:p>'
                + '
'
                + '
'
                + '
'
            }]
          };
          const _expectedResult = ''
            + '
'
            + '
'
            + '    <text:p>{d.analyticalGroup[id=8].label:ifEmpty(\'-\')}</text:p>'
            + '
'
            + '
'
            + '    <text:p>{d.analyticalGroup[id=8].consumption:ifEmpty(\'-\')}</text:p>'
            + '
'
            + '
'
            + '    <text:p>{d.analyticalGroup[id=8].consumption:ifEmpty(\'-\')}</text:p>'
            + '
'
            + '
'
            + '
';
          preprocessor.convertNumberMarkersIntoNumericFormat(_template);
          helper.assert(_template.files[0].data, _expectedResult);
        });

      });
      describe('removeRowCounterInWorksheet', function () {
        it('should do nothing if the string is empty or null', function () {
          helper.assert(preprocessor.removeRowCounterInWorksheet(null), null);
          helper.assert(preprocessor.removeRowCounterInWorksheet(''), '');
          helper.assert(preprocessor.removeRowCounterInWorksheet(), undefined);
        });
        it('should remove absolute position "r=" and spans in "row" tag', function () {
          // spans are optional (XLSX optimization)
          var _xml      = '<row r="1" spans="1:2" x14ac:dyDescent="0.2">';
          var _expected = '<row   x14ac:dyDescent="0.2">';
          helper.assert(preprocessor.removeRowCounterInWorksheet(_xml), _expected);
        });
        it('should remove absolute position "r=" and spans in "c" tag', function () {
          var _xml      = '<c r="B1" spans="1:2" x14ac:dyDescent="0.2">';
          var _expected = '<c   x14ac:dyDescent="0.2">';
          helper.assert(preprocessor.removeRowCounterInWorksheet(_xml), _expected);
        });
        it('should remove absolute position "r=" in "c" tag even if the attribute is not the first one', function () {
          var _xml      = '<c spans="1:2" r="A1" x14ac:dyDescent="0.2">';
          var _expected = '<c   x14ac:dyDescent="0.2">';
          helper.assert(preprocessor.removeRowCounterInWorksheet(_xml), _expected);
          _xml      = '<row spans="1:2" r="1" x14ac:dyDescent="0.2">';
          _expected = '<row   x14ac:dyDescent="0.2">';
          helper.assert(preprocessor.removeRowCounterInWorksheet(_xml), _expected);
        });
        it('should not remove absolute position "r=" in other tags than "c" or "row"', function () {
          var _xml      = '<titi r="1" spans="1:2" x14ac:dyDescent="0.2">';
          var _expected = '<titi r="1" spans="1:2" x14ac:dyDescent="0.2">';
          helper.assert(preprocessor.removeRowCounterInWorksheet(_xml), _expected);
        });
        it('should remove absolute row position in XML', function () {
          var _xml =''
            +'<sheetData>'
            +'  <row r="1" spans="1:2" x14ac:dyDescent="0.2">'
            +'    <c r="A1" t="inlineStr">'
            +'      <is>'
            +'        <t>{d[i].name}</t>'
            +'      </is>'
            +'    </c>'
            +'    <c r="B1" t="inlineStr">'
            +'      <is>'
            +'        <t>{d[i].qty}</t>'
            +'      </is>'
            +'    </c>'
            +'  </row>'
            +'  <row r="2" spans="1:2" x14ac:dyDescent="0.2">'
            +'    <c r="A2" t="inlineStr">'
            +'      <is>'
            +'        <t>{d[i+1].name}</t>'
            +'      </is>'
            +'    </c>'
            +'  </row>'
            +'</sheetData>';
          var _expected = ''
            +'<sheetData>'
            +'  <row   x14ac:dyDescent="0.2">'
            +'    <c  t="inlineStr">'
            +'      <is>'
            +'        <t>{d[i].name}</t>'
            +'      </is>'
            +'    </c>'
            +'    <c  t="inlineStr">'
            +'      <is>'
            +'        <t>{d[i].qty}</t>'
            +'      </is>'
            +'    </c>'
            +'  </row>'
            +'  <row   x14ac:dyDescent="0.2">'
            +'    <c  t="inlineStr">'
            +'      <is>'
            +'        <t>{d[i+1].name}</t>'
            +'      </is>'
            +'    </c>'
            +'  </row>'
            +'</sheetData>';
          helper.assert(preprocessor.removeRowCounterInWorksheet(_xml), _expected);
        });
        it('should not cut, alter or remove the attributes "operator=", it is used for XLSX chart rendering', function () {
          var _xml = '<conditionalFormatting sqref="A7">'
            + '<cfRule type="cellIs" priority="2" operator="greaterThan" aboveAverage="0" equalAverage="0" bottom="0" percent="0" rank="0" text="" dxfId="0">'
            + '<formula>500</formula>'
            + '</cfRule>'
            + '<cfRule type="cellIs" priority="3" operator="equal" aboveAverage="0" equalAverage="0" bottom="0" percent="0" rank="0" text="" dxfId="1">'
            +'<formula>500</formula>'
            + '</cfRule>'
            + '<cfRule type="cellIs" priority="4" operator="lessThan" aboveAverage="0" equalAverage="0" bottom="0" percent="0" rank="0" text="" dxfId="2">'
            + '<formula>500</formula>'
            + '</cfRule>'
            + '</conditionalFormatting>';
          helper.assert(preprocessor.removeRowCounterInWorksheet(_xml), _xml);
        });
      });
    });
  });
});


text:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<servico>
    <titulo>Requerimentos Patrimoniais Disponíveis na Internet</titulo>
    <descricao>
        <![CDATA[AGORA seu REQUERIMENTO está disponível em formato editável. Escolha o requerimento e clique para abri-lo. Deve preencher, imprimir, pois não é possível salvar dados digitados no formulário. O documento deve ser protocolado na Superintendência do Patrimônio da Uniao em seu Estado.

Localize no menu "Informações Úteis" a Superintendência mais próxima de você.

Acesse o menu "INFORMAÇÕES ÚTEIS" para achar o link de todos os requerimentos.]]>
    </descricao>
    <requisitos/>
    <etapas></etapas>
    <canaisPrestacaoServico>
        <canalPrestacaoServico>
            <tipoCanalPrestacaoServico>
                <titulo>Web</titulo>
            </tipoCanalPrestacaoServico>
            <descricao>Acesse o menu "INFORMAÇÕES ÚTEIS" para achar o link de todos os requerimentos.</descricao>
            <url>http://patrimoniodetodos.gov.br/servicos</url>
        </canalPrestacaoServico>
    </canaisPrestacaoServico>
    <taxa></taxa>
    <informacoesUteis>
        <informacaoUtil>
            <tipoInformacaoUtil>
                <titulo>Formulários</titulo>
            </tipoInformacaoUtil>
            <descricao>1. Requerimento de Aforamento;</descricao>
            <url>http://patrimoniodetodos.gov.br/pasta-de-arquivos/Aforamentook.pdf</url>
        </informacaoUtil>
        <informacaoUtil>
            <tipoInformacaoUtil>
                <titulo>Formulários</titulo>
            </tipoInformacaoUtil>
            <descricao>2. Requerimento de Averbação de Transferência</descricao>
            <url>http://patrimoniodetodos.gov.br/pasta-de-arquivos/Averbacao.pdf</url>
        </informacaoUtil>
        <informacaoUtil>
            <tipoInformacaoUtil>
                <titulo>Formulários</titulo>
            </tipoInformacaoUtil>
            <descricao>3. Requerimentos Diversos;</descricao>
            <url>http://patrimoniodetodos.gov.br/pasta-de-arquivos/Diversos_ok.pdf</url>
        </informacaoUtil>
        <informacaoUtil>
            <tipoInformacaoUtil>
                <titulo>Formulários</titulo>
            </tipoInformacaoUtil>
            <descricao>4. Requerimento de Inscrição de Ocupação;</descricao>
            <url>http://patrimoniodetodos.gov.br/pasta-de-arquivos/Inscricao_ok.pdf</url>
        </informacaoUtil>
        <informacaoUtil>
            <tipoInformacaoUtil>
                <titulo>Formulários</titulo>
            </tipoInformacaoUtil>
            <descricao>5. Requerimento de Isenção de Pagamento de Taxas de Ocupação ou Foro;</descricao>
            <url>http://patrimoniodetodos.gov.br/pasta-de-arquivos/Isencao_ok.pdf</url>
        </informacaoUtil>
        <informacaoUtil>
            <tipoInformacaoUtil>
                <titulo>Formulários</titulo>
            </tipoInformacaoUtil>
            <descricao>6. Requerimento de Permissão de Uso;</descricao>
            <url>http://patrimoniodetodos.gov.br/pasta-de-arquivos/Permissao_OK.pdf</url>
        </informacaoUtil>
        <informacaoUtil>
            <tipoInformacaoUtil>
                <titulo>Formulários</titulo>
            </tipoInformacaoUtil>
            <descricao>7. Requerimento de Regularização de Aterro com Compra do Domínio Útil;</descricao>
            <url>http://patrimoniodetodos.gov.br/pasta-de-arquivos/Regularizacao_ok.pdf</url>
        </informacaoUtil>
        <informacaoUtil>
            <tipoInformacaoUtil>
                <titulo>Formulários</titulo>
            </tipoInformacaoUtil>
            <descricao>8. Requerimento para Remição do Aforamento;</descricao>
            <url>http://patrimoniodetodos.gov.br/pasta-de-arquivos/Remicao_ok.pdf</url>
        </informacaoUtil>
        <informacaoUtil>
            <tipoInformacaoUtil>
                <titulo>Formulários</titulo>
            </tipoInformacaoUtil>
            <descricao>9. Requerimento de Revigoração do Aforamento;</descricao>
            <url>http://patrimoniodetodos.gov.br/pasta-de-arquivos/Revigoracao_ok.pdf</url>
        </informacaoUtil>
        <informacaoUtil>
            <tipoInformacaoUtil>
                <titulo>Formulários</titulo>
            </tipoInformacaoUtil>
            <descricao>10. Requerimento de Revisão;</descricao>
            <url>http://patrimoniodetodos.gov.br/pasta-de-arquivos/Revisao.pdf</url>
        </informacaoUtil>
        <informacaoUtil>
            <tipoInformacaoUtil>
                <titulo>Formulários</titulo>
            </tipoInformacaoUtil>
            <descricao>11. Requerimento de Unificação ou Desmembramento ou Fracionamento;</descricao>
            <url>http://patrimoniodetodos.gov.br/pasta-de-arquivos/Unificacao.pdf</url>
        </informacaoUtil>
        <informacaoUtil>
            <tipoInformacaoUtil>
                <titulo>Localização das unidades</titulo>
            </tipoInformacaoUtil>
            <descricao>Localize aqui a superintendência mais próxima de você</descricao>
            <url>http://www.planejamento.gov.br/ministerio.asp?index=9&ler=s880</url>
        </informacaoUtil>
    </informacoesUteis>
    <compromissosAtendimento></compromissosAtendimento>
    <legislacoes></legislacoes>
    <palavrasChave></palavrasChave>
    <orgaoResponsavel>
        <titulo>Ministério do Planejamento, Orçamento e Gestão</titulo>
    </orgaoResponsavel>
    <orgaoPrestador>
        <titulo>SECRETARIA DO PATRIMÔNIO DA UNIÃO - SPU/MP</titulo>
        <endereco>Esplanda dos Ministérios, Bloco C - Brasília/DF</endereco>
        <telefone>(61) 2020-1981/1922/1249</telefone>
    </orgaoPrestador>
    <publicosAlvo>
        <publicoAlvo>
            <titulo>Serviços aos cidadãos</titulo>
            <linhasDaViva>
                <linhaDaVida>
                    <titulo>Adolescentes</titulo>
                    <eventoslinhaDaVida>
                        <eventolinhaDaVida>
                            <titulo>Alistamento militar</titulo>
                        </eventolinhaDaVida>
                    </eventoslinhaDaVida>
                </linhaDaVida>
            </linhasDaViva>
        </publicoAlvo>
        <publicoAlvo>
            <titulo>Serviços às empresas</titulo>
            <linhasDaViva>
                <linhaDaVida>
                    <titulo>Obter Crédito e Apoio financeiro</titulo>
                    <eventoslinhaDaVida>
                        <eventolinhaDaVida>
                            <titulo>Empreendedor Individual</titulo>
                        </eventolinhaDaVida>
                    </eventoslinhaDaVida>
                </linhaDaVida>
            </linhasDaViva>
        </publicoAlvo>
    </publicosAlvo>
    <areasInteresse>
        <area>
            <titulo>Habitação</titulo>
        </area>
    </areasInteresse>
</servico>


text:
"use strict";

var express = require('express');
var app = express();
var routers = {};
var NoteRouter = express.Router();
var MoodRouter = express.Router();
routers.NoteRouter = NoteRouter;
routers.MoodRouter = MoodRouter;

require('./config.js')(app, express, routers);

require('../note/note_routes.js')(NoteRouter);
require('../mood/mood_routes.js')(MoodRouter);

module.exports = exports = app;


text:
using System.Collections.Generic;

namespace SimShift.MapTool
{
    public class Ets2PrefabNode
    {
        public float X;
        public float Y;
        public float Z;

        public float RotationX;
        public float RotationY;
        public float RotationZ;

        public List<Ets2PrefabCurve> InputCurve;
        public List<Ets2PrefabCurve> OutputCurve;

        public double Yaw { get; set; }
        public int Node { get; set; }
    }
}


text:
<!doctype html>
<html><head>
  <meta charset="utf-8">
  <link rel="stylesheet" href="font-awesome/css/font-awesome.css">
  <script src="es6-promise/promise.js"></script>
  <link rel="import" href="brick-common/brick-common.html">
  <link rel="import" href="brick-appbar/dist/brick-appbar.html">
  <link rel="import" href="brick-calendar/dist/brick-calendar.html">
  <link rel="import" href="brick-deck/dist/brick-deck.html">
  <link rel="import" href="brick-dialog/dist/brick-dialog.html">
  <link rel="import" href="brick-flipbox/dist/brick-flipbox.html">
  <link rel="import" href="brick-form/dist/brick-form.html">
  <link rel="import" href="brick-input/dist/brick-input.html">
  <link rel="import" href="brick-layout/dist/brick-layout.html">
  <link rel="import" href="brick-listview/dist/brick-listview.html">
  <link rel="import" href="brick-menu/dist/brick-menu.html">
  <link rel="import" href="brick-storage-indexeddb/dist/brick-storage-indexeddb.html">
  <link rel="import" href="brick-tabbar/dist/brick-tabbar.html">
  <link rel="import" href="brick-action/dist/brick-action.html">
  <link rel="import" href="brick-button/dist/brick-button.html">
</head></html>


text:
import TypeScriptServiceClientHost from '../typeScriptServiceClientHost';
import { CommandManager } from '../utils/commandManager';
import { Lazy } from '../utils/lazy';
import { PluginManager } from '../utils/plugins';
import { ConfigurePluginCommand } from './configurePlugin';
import { JavaScriptGoToProjectConfigCommand, TypeScriptGoToProjectConfigCommand } from './goToProjectConfiguration';
import { OpenTsServerLogCommand } from './openTsServerLog';
import { ReloadJavaScriptProjectsCommand, ReloadTypeScriptProjectsCommand } from './reloadProject';
import { RestartTsServerCommand } from './restartTsServer';
import { SelectTypeScriptVersionCommand } from './selectTypeScriptVersion';

export function registerCommands(
	commandManager: CommandManager,
	lazyClientHost: Lazy<TypeScriptServiceClientHost>,
	pluginManager: PluginManager
) {
	commandManager.register(new ReloadTypeScriptProjectsCommand(lazyClientHost));
	commandManager.register(new ReloadJavaScriptProjectsCommand(lazyClientHost));
	commandManager.register(new SelectTypeScriptVersionCommand(lazyClientHost));
	commandManager.register(new OpenTsServerLogCommand(lazyClientHost));
	commandManager.register(new RestartTsServerCommand(lazyClientHost));
	commandManager.register(new TypeScriptGoToProjectConfigCommand(lazyClientHost));
	commandManager.register(new JavaScriptGoToProjectConfigCommand(lazyClientHost));
	commandManager.register(new ConfigurePluginCommand(pluginManager));
}


text:
var qioHttp = require('q-io/http');

qioHttp.read('http://localhost:7000')
  .then(function (data) {
    return qioHttp.read('http://localhost:7001/' + data);
  })
  .then(function (user) {
    console.log(JSON.parse(user));
  })
  .then(null, console.error)
  .done();


text:
Dyanote

        <react-component
          ng-controller="searchFRPController as search"
          name="Search" props="search.props" watch-depth="value"/>

        {{ header.username }}

            Report a problem
            Backup notes
            Restore backup
            Logout


text:
package com.beamofsoul.bip.management.control;

import static com.beamofsoul.bip.management.util.ConfigurationReader.PROJECT_BASE_FILTER_SENSITIVE;
import static com.beamofsoul.bip.management.util.ConfigurationReader.asBoolean;
import static com.beamofsoul.bip.management.util.ConfigurationReader.getValue;

import java.io.IOException;

import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.annotation.WebFilter;
import javax.servlet.http.HttpServletRequest;

import org.apache.commons.lang3.StringUtils;
import org.springframework.web.bind.annotation.RequestMethod;

import com.beamofsoul.bip.management.util.HttpServletRequestUtils;
import com.beamofsoul.bip.management.util.SensitiveWordsMapping;

import lombok.extern.slf4j.Slf4j;

/**
 * @ClassName SensitiveWordFilter
 * @Description 敏感词过滤器(标记WebFilter注解的类会被ServletComponentScan注解扫描识别)
 * @author MingshuJian
 * @Date 2017年6月2日 上午10:02:44
 * @version 1.0.0
 */
@Slf4j
@WebFilter(filterName = "sensitiveWordFilter", urlPatterns = "/*")
public class SensitiveWordFilter implements Filter {

	public static boolean isOpen;

	@Override
	public void init(FilterConfig filterConfig) throws ServletException {
		isOpen = asBoolean(getValue(PROJECT_BASE_FILTER_SENSITIVE));
		log.debug("初始化敏感词过滤器完毕,当前状态为:" + (isOpen ? "开启" : "关闭") + "...");
	}

	@Override
	public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
			throws IOException, ServletException {

		HttpServletRequest httpServletRequest = (HttpServletRequest) request;
		if (isOpen && httpServletRequest.getMethod().equalsIgnoreCase(RequestMethod.POST.name())) {
			String requestBody = HttpServletRequestUtils.getRequestBody(httpServletRequest);
			CustomHttpServletRequestWrapper requestWrapper = new CustomHttpServletRequestWrapper(httpServletRequest,requestBody);
			if (StringUtils.isNotBlank(requestBody)) requestWrapper.setRequestBody(SensitiveWordsMapping.filter(requestBody));
			chain.doFilter(requestWrapper, response);
		} else {
			chain.doFilter(request, response);
		}
	}

	@Override
	public void destroy() {
		log.debug("销毁敏感词过滤器完毕...");
	}
}


text:
FILE(REMOVE_RECURSE
  "CMakeFiles/timeRot2.dir/timeRot2.cpp.o"
  "timeRot2.pdb"
  "timeRot2"
)

# Per-language clean rules from dependency scanning.
FOREACH(lang CXX)
  INCLUDE(CMakeFiles/timeRot2.dir/cmake_clean_${lang}.cmake OPTIONAL)
ENDFOREACH(lang)