text:
package eu.lunisolar.magma.func.consumer.primitives.obj;

import javax.annotation.Nonnull; // NOSONAR
import javax.annotation.Nullable; // NOSONAR
import javax.annotation.concurrent.NotThreadSafe; // NOSONAR
import java.util.Objects; // NOSONAR
import eu.lunisolar.magma.basics.*; //NOSONAR
import eu.lunisolar.magma.basics.exceptions.*; // NOSONAR
import eu.lunisolar.magma.func.*; // NOSONAR
import eu.lunisolar.magma.basics.meta.*; // NOSONAR
import eu.lunisolar.magma.basics.meta.aType.*; // NOSONAR
import eu.lunisolar.magma.basics.meta.functional.*; // NOSONAR
import eu.lunisolar.magma.basics.meta.functional.type.*; // NOSONAR
import eu.lunisolar.magma.basics.meta.functional.domain.*; // NOSONAR
import eu.lunisolar.magma.func.IA;
import eu.lunisolar.magma.func.SA;
import eu.lunisolar.magma.func.consumer.*; // NOSONAR
import eu.lunisolar.magma.func.*; // NOSONAR
import eu.lunisolar.magma.func.tuple.*; // NOSONAR
import java.util.concurrent.*; // NOSONAR
import java.util.function.*; // NOSONAR
import java.util.*; // NOSONAR
import java.lang.reflect.*; // NOSONAR

import eu.lunisolar.magma.func.action.*; // NOSONAR
import eu.lunisolar.magma.func.consumer.*; // NOSONAR
import eu.lunisolar.magma.func.consumer.primitives.*; // NOSONAR
import eu.lunisolar.magma.func.consumer.primitives.bi.*; // NOSONAR
import eu.lunisolar.magma.func.consumer.primitives.obj.*; // NOSONAR
import eu.lunisolar.magma.func.consumer.primitives.tri.*; // NOSONAR
import eu.lunisolar.magma.func.function.*; // NOSONAR
import eu.lunisolar.magma.func.function.conversion.*; // NOSONAR
import eu.lunisolar.magma.func.function.from.*; // NOSONAR
import eu.lunisolar.magma.func.function.to.*; // NOSONAR
import eu.lunisolar.magma.func.operator.binary.*; // NOSONAR
import eu.lunisolar.magma.func.operator.ternary.*; // NOSONAR
import eu.lunisolar.magma.func.operator.unary.*; // NOSONAR
import eu.lunisolar.magma.func.predicate.*; // NOSONAR
import eu.lunisolar.magma.func.supplier.*; // NOSONAR

/**
 * Non-throwing functional interface (lambda) LTieBoolConsumer for Java 8.
 *
 * Type: consumer
 *
 * Domain (lvl: 3): T a1,int a2,boolean a3
 *
 * Co-domain: none
 *
 * Special case of consumer that corresponds to expressions like     (list, index, element) -> List::set    or  (list, index, element) -> Array::set
 *
 */
@FunctionalInterface
@SuppressWarnings("UnusedDeclaration")
public interface LTieBoolConsumer<T> extends MetaConsumer, MetaInterface.NonThrowing, TieConsumer<T, aBool>, Codomain<aVoid>, Domain3<a<T>, aInt, aBool> {

	String DESCRIPTION = "LTieBoolConsumer: void accept(T a1,int a2,boolean a3)";

	// void accept(T a1,int a2,boolean a3) ;
	default void accept(T a1, int a2, boolean a3) {
		// nestingAccept(a1,a2,a3);
		try {
			this.acceptX(a1, a2, a3);
		} catch (Throwable e) { // NOSONAR
			throw Handling.nestCheckedAndThrow(e);
		}
	}

	/**
	 * Implement this, but call accept(T a1,int a2,boolean a3)
	 */
	void acceptX(T a1, int a2, boolean a3) throws Throwable;

	default LTuple.Void tupleAccept(LObjIntBoolTriple<T> args) {
		accept(args.first(), args.second(), args.third());
		return LTuple.Void.INSTANCE;
	}

	/** Function call that handles exceptions according to the instructions. */
	default void handlingAccept(T a1, int a2, boolean a3, HandlingInstructions<Throwable, RuntimeException> handling) {
		try {
			this.acceptX(a1, a2, a3);
		} catch (Throwable e) { // NOSONAR
			throw Handler.handleOrNest(e, handling);
		}
	}

	default LTieBoolConsumer<T> handling(HandlingInstructions<Throwable, RuntimeException> handling) {
		return (a1, a2, a3) -> handlingAccept(a1, a2, a3, handling);
	}

	default void accept(T a1, int a2, boolean a3, @Nonnull ExWMF<RuntimeException> factory, @Nonnull String newMessage) {
		try {
			this.acceptX(a1, a2, a3);
		} catch (Throwable e) { // NOSONAR
			throw Handling.wrap(e, factory, newMessage);
		}
	}

	default void accept(T a1, int a2, boolean a3, @Nonnull ExWMF<RuntimeException> factory, @Nonnull String newMessage, @Nullable Object param1) {
		try {
			this.acceptX(a1, a2, a3);
		} catch (Throwable e) { // NOSONAR
			throw Handling.wrap(e, factory, newMessage, param1);
		}
	}

	default void accept(T a1, int a2, boolean a3, @Nonnull ExWMF<RuntimeException> factory, @Nonnull String newMessage, @Nullable Object param1, @Nullable Object param2) {
		try {
			this.acceptX(a1, a2, a3);
		} catch (Throwable e) { // NOSONAR
			throw Handling.wrap(e, factory, newMessage, param1, param2);
		}
	}

	default void accept(T a1, int a2, boolean a3, @Nonnull ExWMF<RuntimeException> factory, @Nonnull String newMessage, @Nullable Object param1, @Nullable Object param2, @Nullable Object param3) {
		try {
			this.acceptX(a1, a2, a3);
		} catch (Throwable e) { // NOSONAR
			throw Handling.wrap(e, factory, newMessage, param1, param2, param3);
		}
	}

	default LTieBoolConsumer<T> trying(@Nonnull ExWMF<RuntimeException> factory, @Nonnull String newMessage) {
		return (a1, a2, a3) -> accept(a1, a2, a3, factory, newMessage);
	}

	default LTieBoolConsumer<T> trying(@Nonnull ExWMF<RuntimeException> factory, @Nonnull String newMessage, @Nullable Object param1) {
		return (a1, a2, a3) -> accept(a1, a2, a3, factory, newMessage, param1);
	}

	default LTieBoolConsumer<T> trying(@Nonnull ExWMF<RuntimeException> factory, @Nonnull String newMessage, @Nullable Object param1, @Nullable Object param2) {
		return (a1, a2, a3) -> accept(a1, a2, a3, factory, newMessage, param1, param1);
	}

	default LTieBoolConsumer<T> trying(@Nonnull ExWMF<RuntimeException> factory, @Nonnull String newMessage, @Nullable Object param1, @Nullable Object param2, @Nullable Object param3) {
		return (a1, a2, a3) -> accept(a1, a2, a3, factory, newMessage, param1, param2, param3);
	}

	default void accept(T a1, int a2, boolean a3, @Nonnull ExWF<RuntimeException> factory) {
		try {
			this.acceptX(a1, a2, a3);
		} catch (Throwable e) { // NOSONAR
			throw Handling.wrap(e, factory);
		}
	}

	default LTieBoolConsumer<T> trying(@Nonnull ExWF<RuntimeException> factory) {
		return (a1, a2, a3) -> accept(a1, a2, a3, factory);
	}

	default void acceptThen(T a1, int a2, boolean a3, @Nonnull LConsumer<Throwable> handler) {
		try {
			this.acceptX(a1, a2, a3);
		} catch (Throwable e) { // NOSONAR
			Handling.handleErrors(e);
			handler.accept(e);
		}
	}

	default LTieBoolConsumer<T> tryingThen(@Nonnull LConsumer<Throwable> handler) {
		return (a1, a2, a3) -> acceptThen(a1, a2, a3, handler);
	}

	/** Function call that handles exceptions by always nesting checked exceptions and propagating the others as is. */
	default void nestingAccept(T a1, int a2, boolean a3) {
		try {
			this.acceptX(a1, a2, a3);
		} catch (Throwable e) { // NOSONAR
			throw Handling.nestCheckedAndThrow(e);
		}
	}

	/** Function call that handles exceptions by always propagating them as is, even when they are undeclared checked ones. */
	default void shovingAccept(T a1, int a2, boolean a3) {
		try {
			this.acceptX(a1, a2, a3);
		} catch (Throwable e) { // NOSONAR
			throw Handling.shoveIt(e);
		}
	}

	static <T> void shovingAccept(T a1, int a2, boolean a3, LTieBoolConsumer<T> func) {
		Null.nonNullArg(func, "func");
		func.shovingAccept(a1, a2, a3);
	}

	static <T> void handlingAccept(T a1, int a2, boolean a3, LTieBoolConsumer<T> func, HandlingInstructions<Throwable, RuntimeException> handling) { // <-
		Null.nonNullArg(func, "func");
		func.handlingAccept(a1, a2, a3, handling);
	}

	static <T> void tryAccept(T a1, int a2, boolean a3, LTieBoolConsumer<T> func) {
		Null.nonNullArg(func, "func");
		func.nestingAccept(a1, a2, a3);
	}

	static <T> void tryAccept(T a1, int a2, boolean a3, LTieBoolConsumer<T> func, @Nonnull ExWMF<RuntimeException> factory, @Nonnull String newMessage) {
		Null.nonNullArg(func, "func");
		func.accept(a1, a2, a3, factory, newMessage);
	}

	static <T> void tryAccept(T a1, int a2, boolean a3, LTieBoolConsumer<T> func, @Nonnull ExWMF<RuntimeException> factory, @Nonnull String newMessage, @Nullable Object param1) {
		Null.nonNullArg(func, "func");
		func.accept(a1, a2, a3, factory, newMessage, param1);
	}

	static <T> void tryAccept(T a1, int a2, boolean a3, LTieBoolConsumer<T> func, @Nonnull ExWMF<RuntimeException> factory, @Nonnull String newMessage, @Nullable Object param1, @Nullable Object param2) {
		Null.nonNullArg(func, "func");
		func.accept(a1, a2, a3, factory, newMessage, param1, param2);
	}

	static <T> void tryAccept(T a1, int a2, boolean a3, LTieBoolConsumer<T> func, @Nonnull ExWMF<RuntimeException> factory, @Nonnull String newMessage, @Nullable Object param1, @Nullable Object param2, @Nullable Object param3) {
		Null.nonNullArg(func, "func");
		func.accept(a1, a2, a3, factory, newMessage, param1, param2, param3);
	}

	static <T> void tryAccept(T a1, int a2, boolean a3, LTieBoolConsumer<T> func, @Nonnull ExWF<RuntimeException> factory) {
		Null.nonNullArg(func, "func");
		func.accept(a1, a2, a3, factory);
	}

	static <T> void tryAcceptThen(T a1, int a2, boolean a3, LTieBoolConsumer<T> func, @Nonnull LConsumer<Throwable> handler) {
		Null.nonNullArg(func, "func");
		func.acceptThen(a1, a2, a3, handler);
	}

	default void failSafeAccept(T a1, int a2, boolean a3, @Nonnull LTieBoolConsumer<T> failSafe) {
		try {
			accept(a1, a2, a3);
		} catch (Throwable e) { // NOSONAR
			Handling.handleErrors(e);
			failSafe.accept(a1, a2, a3);
		}
	}

	static <T> void failSafeAccept(T a1, int a2, boolean a3, LTieBoolConsumer<T> func, @Nonnull LTieBoolConsumer<T> failSafe) {
		Null.nonNullArg(failSafe, "failSafe");
		if (func == null) {
			failSafe.accept(a1, a2, a3);
		} else {
			func.failSafeAccept(a1, a2, a3, failSafe);
		}
	}

	static <T> LTieBoolConsumer<T> failSafe(LTieBoolConsumer<T> func, @Nonnull LTieBoolConsumer<T> failSafe) {
		Null.nonNullArg(failSafe, "failSafe");
		return (a1, a2, a3) -> failSafeAccept(a1, a2, a3, func, failSafe);
	}

	/** Returns description of the functional interface. */
	@Nonnull
	default String functionalInterfaceDescription() {
		return LTieBoolConsumer.DESCRIPTION;
	}

	default LTieBoolFunction<T> toTieFunction() {
		return (t, i, e) -> {
			this.accept(t, i, e);
			return 1;
		};
	}

	/** From-To. Intended to be used with non-capturing lambda. */
	public static <T> void fromTo(int min_a2, int max_a2, T a1, boolean a3, @Nonnull LTieBoolConsumer<T> func) {
		Null.nonNullArg(func, "func");
		if (min_a2 <= max_a2) {
			for (int a2 = min_a2; a2 <= max_a2; a2++) {
				func.accept(a1, a2, a3);
			}
		} else {
			for (int a2 = min_a2; a2 >= max_a2; a2--) {
				func.accept(a1, a2, a3);
			}
		}
	}

	/** From-To. Intended to be used with non-capturing lambda. */
	public static <T> void fromTill(int min_a2, int max_a2, T a1, boolean a3, @Nonnull LTieBoolConsumer<T> func) {
		Null.nonNullArg(func, "func");
		if (min_a2 <= max_a2) {
			for (int a2 = min_a2; a2 < max_a2; a2++) {
				func.accept(a1, a2, a3);
			}
		} else {
			for (int a2 = min_a2; a2 > max_a2; a2--) {
				func.accept(a1, a2, a3);
			}
		}
	}

	/** From-To. Intended to be used with non-capturing lambda. */
	public static <T> void times(int max_a2, T a1, boolean a3, @Nonnull LTieBoolConsumer<T> func) {
		if (max_a2 < 0)
			return;
		fromTill(0, max_a2, a1, a3, func);
	}

	/**  */
	public static <T> LTieBoolConsumer<T> uncurry(@Nonnull LFunction<T, LIntFunction<LBoolConsumer>> func) {
		Null.nonNullArg(func, "func");
		return (T a1, int a2, boolean a3) -> func.apply(a1).apply(a2).accept(a3);
	}

	/** Change function to one with codomain (always returning same value provided in argument). */
	default LObjIntBoolFunction<T, T> returning(T value) {
		return (a1, a2, a3) -> {
			LTieBoolConsumer.this.accept(a1, a2, a3);
			return value;
		};
	}

	/** Calls domain consumer before main function. */
	default LTieBoolConsumer<T> beforeDo(@Nonnull LTieBoolConsumer<T> before) {
		Null.nonNullArg(before, "before");
		return (T a1, int a2, boolean a3) -> {
			before.accept(a1, a2, a3);
			accept(a1, a2, a3);
		};
	}

	/** Convenient method in case lambda expression is ambiguous for the compiler (that might happen for overloaded methods accepting different interfaces). */
	@Nonnull
	static <T> LTieBoolConsumer<T> tieBoolCons(final @Nonnull LTieBoolConsumer<T> lambda) {
		Null.nonNullArg(lambda, "lambda");
		return lambda;
	}

	// <editor-fold desc="recursive">

	final class S<T> implements LTieBoolConsumer<T> {
		private LTieBoolConsumer<T> target = null;
		@Override
		public void acceptX(T a1, int a2, boolean a3) throws Throwable {
			target.acceptX(a1, a2, a3);
		}
	}

	@Nonnull
	static <T> LTieBoolConsumer<T> recursive(final @Nonnull LFunction<LTieBoolConsumer<T>, LTieBoolConsumer<T>> selfLambda) {
		final S<T> single = new S();
		LTieBoolConsumer<T> func = selfLambda.apply(single);
		single.target = func;
		return func;
	}

	// </editor-fold>

	@Nonnull
	static <T> LTieBoolConsumer<T> tieBoolConsThrowing(final @Nonnull ExF<Throwable> exF) {
		Null.nonNullArg(exF, "exF");
		return (a1, a2, a3) -> {
			throw exF.produce();
		};
	}

	@Nonnull
	static <T> LTieBoolConsumer<T> tieBoolConsThrowing(final String message, final @Nonnull ExMF<Throwable> exF) {
		Null.nonNullArg(exF, "exF");
		return (a1, a2, a3) -> {
			throw exF.produce(message);
		};
	}

	static <T> void call(T a1, int a2, boolean a3, final @Nonnull LTieBoolConsumer<T> lambda) {
		Null.nonNullArg(lambda, "lambda");
		lambda.accept(a1, a2, a3);
	}

	// <editor-fold desc="wrap">

	// </editor-fold>

	// <editor-fold desc="compose (functional)">

	/** Allows to manipulate the domain of the function. */
	@Nonnull
	default <V1> LTieBoolConsumer<V1> compose(@Nonnull final LFunction<? super V1, ? extends T> before1, @Nonnull final LIntUnaryOperator before2, @Nonnull final LLogicalOperator before3) {
		Null.nonNullArg(before1, "before1");
		Null.nonNullArg(before2, "before2");
		Null.nonNullArg(before3, "before3");
		return (v1, v2, v3) -> this.accept(before1.apply(v1), before2.applyAsInt(v2), before3.apply(v3));
	}

	/** Allows to manipulate the domain of the function. */
	@Nonnull
	default <V1, V2, V3> LTriConsumer<V1, V2, V3> unboxingCompose(@Nonnull final LFunction<? super V1, ? extends T> before1, @Nonnull final LToIntFunction<? super V2> before2, @Nonnull final LPredicate<? super V3> before3) {
		Null.nonNullArg(before1, "before1");
		Null.nonNullArg(before2, "before2");
		Null.nonNullArg(before3, "before3");
		return (v1, v2, v3) -> this.accept(before1.apply(v1), before2.applyAsInt(v2), before3.test(v3));
	}

	// </editor-fold>

	// <editor-fold desc="andThen (consumer/action)">

	/** Combines two LTieBoolConsumer<T> together in a order. */
	@Nonnull
	default LTieBoolConsumer<T> andThen(@Nonnull LTieBoolConsumer<? super T> after) {
		Null.nonNullArg(after, "after");
		return (a1, a2, a3) -> {
			this.accept(a1, a2, a3);
			after.accept(a1, a2, a3);
		};
	}

	// </editor-fold>

	// <editor-fold desc="variant conversions">

	// </editor-fold>

	/** Does nothing (LTieBoolConsumer) */
	public static <T> void doNothing(T a1, int a2, boolean a3) {
		// NOSONAR
	}

	/**
	* For each element (or tuple) from arguments, calls the consumer.
	* Thread safety, fail-fast, fail-safety of this method is not expected.
	* @returns iterations count
	*/
	public static <C1, C2, C3, T> int forEach(IndexedRead<C1, a<T>> ia1, C1 source1, IndexedRead<C2, aInt> ia2, C2 source2, IndexedRead<C3, aBool> ia3, C3 source3, LTieBoolConsumer<? super T> consumer) {
		int size = ia1.size(source1);
		LOiFunction<Object, T> oiFunc1 = (LOiFunction) ia1.getter();
		size = Integer.min(size, ia2.size(source2));
		LOiToIntFunction<Object> oiFunc2 = (LOiToIntFunction) ia2.getter();
		size = Integer.min(size, ia3.size(source3));
		LObjIntPredicate<Object> oiFunc3 = (LObjIntPredicate) ia3.getter();
		int i = 0;
		for (; i < size; i++) {
			T a1 = oiFunc1.apply(source1, i);
			int a2 = oiFunc2.applyAsInt(source2, i);
			boolean a3 = oiFunc3.test(source3, i);
			consumer.accept(a1, a2, a3);
		}
		return i;

	}

	/**
	* For each element (or tuple) from arguments, calls the consumer.
	* Thread safety, fail-fast, fail-safety of this method is not expected.
	* @returns iterations count
	*/
	public static <C1, I1, C2, C3, T> int iterate(SequentialRead<C1, I1, a<T>> sa1, C1 source1, IndexedRead<C2, aInt> ia2, C2 source2, IndexedRead<C3, aBool> ia3, C3 source3, LTieBoolConsumer<? super T> consumer) {
		Object iterator1 = ((LFunction) sa1.adapter()).apply(source1);
		LPredicate<Object> testFunc1 = (LPredicate) sa1.tester();
		LFunction<Object, T> nextFunc1 = (LFunction) sa1.supplier();
		int size = ia2.size(source2);
		LOiToIntFunction<Object> oiFunc2 = (LOiToIntFunction) ia2.getter();
		size = Integer.min(size, ia3.size(source3));
		LObjIntPredicate<Object> oiFunc3 = (LObjIntPredicate) ia3.getter();
		int i = 0;
		while (testFunc1.test(iterator1) && i < size) {
			T a1 = nextFunc1.apply(iterator1);
			int a2 = oiFunc2.applyAsInt(source2, i);
			boolean a3 = oiFunc3.test(source3, i);
			consumer.accept(a1, a2, a3);
			i++;
		}
		return i;

	}

	/**
	* For each element (or tuple) from arguments, calls the consumer.
	* Thread safety, fail-fast, fail-safety of this method is not expected.
	* @returns iterations count
	*/
	public static <C1, C2, I2, C3, T> int iterate(IndexedRead<C1, a<T>> ia1, C1 source1, SequentialRead<C2, I2, aInt> sa2, C2 source2, IndexedRead<C3, aBool> ia3, C3 source3, LTieBoolConsumer<? super T> consumer) {
		int size = ia1.size(source1);
		LOiFunction<Object, T> oiFunc1 = (LOiFunction) ia1.getter();
		Object iterator2 = ((LFunction) sa2.adapter()).apply(source2);
		LPredicate<Object> testFunc2 = (LPredicate) sa2.tester();
		LToIntFunction<Object> nextFunc2 = (LToIntFunction) sa2.supplier();
		size = Integer.min(size, ia3.size(source3));
		LObjIntPredicate<Object> oiFunc3 = (LObjIntPredicate) ia3.getter();
		int i = 0;
		while (i < size && testFunc2.test(iterator2)) {
			T a1 = oiFunc1.apply(source1, i);
			int a2 = nextFunc2.applyAsInt(iterator2);
			boolean a3 = oiFunc3.test(source3, i);
			consumer.accept(a1, a2, a3);
			i++;
		}
		return i;

	}

	/**
	* For each element (or tuple) from arguments, calls the consumer.
	* Thread safety, fail-fast, fail-safety of this method is not expected.
	* @returns iterations count
	*/
	public static <C1, I1, C2, I2, C3, T> int iterate(SequentialRead<C1, I1, a<T>> sa1, C1 source1, SequentialRead<C2, I2, aInt> sa2, C2 source2, IndexedRead<C3, aBool> ia3, C3 source3, LTieBoolConsumer<? super T> consumer) {
		Object iterator1 = ((LFunction) sa1.adapter()).apply(source1);
		LPredicate<Object> testFunc1 = (LPredicate) sa1.tester();
		LFunction<Object, T> nextFunc1 = (LFunction) sa1.supplier();
		Object iterator2 = ((LFunction) sa2.adapter()).apply(source2);
		LPredicate<Object> testFunc2 = (LPredicate) sa2.tester();
		LToIntFunction<Object> nextFunc2 = (LToIntFunction) sa2.supplier();
		int size = ia3.size(source3);
		LObjIntPredicate<Object> oiFunc3 = (LObjIntPredicate) ia3.getter();
		int i = 0;
		while (testFunc1.test(iterator1) && testFunc2.test(iterator2) && i < size) {
			T a1 = nextFunc1.apply(iterator1);
			int a2 = nextFunc2.applyAsInt(iterator2);
			boolean a3 = oiFunc3.test(source3, i);
			consumer.accept(a1, a2, a3);
			i++;
		}
		return i;

	}

	/**
	* For each element (or tuple) from arguments, calls the consumer.
	* Thread safety, fail-fast, fail-safety of this method is not expected.
	* @returns iterations count
	*/
	public static <C1, C2, C3, I3, T> int iterate(IndexedRead<C1, a<T>> ia1, C1 source1, IndexedRead<C2, aInt> ia2, C2 source2, SequentialRead<C3, I3, aBool> sa3, C3 source3, LTieBoolConsumer<? super T> consumer) {
		int size = ia1.size(source1);
		LOiFunction<Object, T> oiFunc1 = (LOiFunction) ia1.getter();
		size = Integer.min(size, ia2.size(source2));
		LOiToIntFunction<Object> oiFunc2 = (LOiToIntFunction) ia2.getter();
		Object iterator3 = ((LFunction) sa3.adapter()).apply(source3);
		LPredicate<Object> testFunc3 = (LPredicate) sa3.tester();
		LPredicate<Object> nextFunc3 = (LPredicate) sa3.supplier();
		int i = 0;
		while (i < size && testFunc3.test(iterator3)) {
			T a1 = oiFunc1.apply(source1, i);
			int a2 = oiFunc2.applyAsInt(source2, i);
			boolean a3 = nextFunc3.test(iterator3);
			consumer.accept(a1, a2, a3);
			i++;
		}
		return i;

	}

	/**
	* For each element (or tuple) from arguments, calls the consumer.
	* Thread safety, fail-fast, fail-safety of this method is not expected.
	* @returns iterations count
	*/
	public static <C1, I1, C2, C3, I3, T> int iterate(SequentialRead<C1, I1, a<T>> sa1, C1 source1, IndexedRead<C2, aInt> ia2, C2 source2, SequentialRead<C3, I3, aBool> sa3, C3 source3, LTieBoolConsumer<? super T> consumer) {
		Object iterator1 = ((LFunction) sa1.adapter()).apply(source1);
		LPredicate<Object> testFunc1 = (LPredicate) sa1.tester();
		LFunction<Object, T> nextFunc1 = (LFunction) sa1.supplier();
		int size = ia2.size(source2);
		LOiToIntFunction<Object> oiFunc2 = (LOiToIntFunction) ia2.getter();
		Object iterator3 = ((LFunction) sa3.adapter()).apply(source3);
		LPredicate<Object> testFunc3 = (LPredicate) sa3.tester();
		LPredicate<Object> nextFunc3 = (LPredicate) sa3.supplier();
		int i = 0;
		while (testFunc1.test(iterator1) && i < size && testFunc3.test(iterator3)) {
			T a1 = nextFunc1.apply(iterator1);
			int a2 = oiFunc2.applyAsInt(source2, i);
			boolean a3 = nextFunc3.test(iterator3);
			consumer.accept(a1, a2, a3);
			i++;
		}
		return i;

	}

	/**
	* For each element (or tuple) from arguments, calls the consumer.
	* Thread safety, fail-fast, fail-safety of this method is not expected.
	* @returns iterations count
	*/
	public static <C1, C2, I2, C3, I3, T> int iterate(IndexedRead<C1, a<T>> ia1, C1 source1, SequentialRead<C2, I2, aInt> sa2, C2 source2, SequentialRead<C3, I3, aBool> sa3, C3 source3, LTieBoolConsumer<? super T> consumer) {
		int size = ia1.size(source1);
		LOiFunction<Object, T> oiFunc1 = (LOiFunction) ia1.getter();
		Object iterator2 = ((LFunction) sa2.adapter()).apply(source2);
		LPredicate<Object> testFunc2 = (LPredicate) sa2.tester();
		LToIntFunction<Object> nextFunc2 = (LToIntFunction) sa2.supplier();
		Object iterator3 = ((LFunction) sa3.adapter()).apply(source3);
		LPredicate<Object> testFunc3 = (LPredicate) sa3.tester();
		LPredicate<Object> nextFunc3 = (LPredicate) sa3.supplier();
		int i = 0;
		while (i < size && testFunc2.test(iterator2) && testFunc3.test(iterator3)) {
			T a1 = oiFunc1.apply(source1, i);
			int a2 = nextFunc2.applyAsInt(iterator2);
			boolean a3 = nextFunc3.test(iterator3);
			consumer.accept(a1, a2, a3);
			i++;
		}
		return i;

	}

	/**
	* For each element (or tuple) from arguments, calls the consumer.
	* Thread safety, fail-fast, fail-safety of this method depends highly on the arguments.
	* @returns iterations count
	*/
	public static <C1, I1, C2, I2, C3, I3, T> int iterate(SequentialRead<C1, I1, a<T>> sa1, C1 source1, SequentialRead<C2, I2, aInt> sa2, C2 source2, SequentialRead<C3, I3, aBool> sa3, C3 source3, LTieBoolConsumer<? super T> consumer) {
		Object iterator1 = ((LFunction) sa1.adapter()).apply(source1);
		LPredicate<Object> testFunc1 = (LPredicate) sa1.tester();
		LFunction<Object, T> nextFunc1 = (LFunction) sa1.supplier();
		Object iterator2 = ((LFunction) sa2.adapter()).apply(source2);
		LPredicate<Object> testFunc2 = (LPredicate) sa2.tester();
		LToIntFunction<Object> nextFunc2 = (LToIntFunction) sa2.supplier();
		Object iterator3 = ((LFunction) sa3.adapter()).apply(source3);
		LPredicate<Object> testFunc3 = (LPredicate) sa3.tester();
		LPredicate<Object> nextFunc3 = (LPredicate) sa3.supplier();
		int i = 0;
		while (testFunc1.test(iterator1) && testFunc2.test(iterator2) && testFunc3.test(iterator3)) {
			T a1 = nextFunc1.apply(iterator1);
			int a2 = nextFunc2.applyAsInt(iterator2);
			boolean a3 = nextFunc3.test(iterator3);
			consumer.accept(a1, a2, a3);
			i++;
		}
		return i;

	}

	/**
	* For each element (or tuple) from arguments, calls the consumer (with index).
	* Thread safety, fail-fast, fail-safety of this method is not expected.
	* @returns iterations count
	*/
	public static <C1, C3, T> int indexedForEach(IndexedRead<C1, a<T>> ia1, C1 source1, IndexedRead<C3, aBool> ia3, C3 source3, LTieBoolConsumer<? super T> consumer) {
		int size = ia1.size(source1);
		LOiFunction<Object, T> oiFunc1 = (LOiFunction) ia1.getter();
		size = Integer.min(size, ia3.size(source3));
		LObjIntPredicate<Object> oiFunc3 = (LObjIntPredicate) ia3.getter();
		int a2 = 0;
		for (; a2 < size; a2++) {
			T a1 = oiFunc1.apply(source1, a2);
			boolean a3 = oiFunc3.test(source3, a2);
			consumer.accept(a1, a2, a3);
		}
		return a2;

	}

	/**
	* For each element (or tuple) from arguments, calls the consumer (with index).
	* Thread safety, fail-fast, fail-safety of this method is not expected.
	* @returns iterations count
	*/
	public static <C1, I1, C3, T> int indexedIterate(SequentialRead<C1, I1, a<T>> sa1, C1 source1, IndexedRead<C3, aBool> ia3, C3 source3, LTieBoolConsumer<? super T> consumer) {
		Object iterator1 = ((LFunction) sa1.adapter()).apply(source1);
		LPredicate<Object> testFunc1 = (LPredicate) sa1.tester();
		LFunction<Object, T> nextFunc1 = (LFunction) sa1.supplier();
		int size = ia3.size(source3);
		LObjIntPredicate<Object> oiFunc3 = (LObjIntPredicate) ia3.getter();
		int a2 = 0;
		while (testFunc1.test(iterator1) && a2 < size) {
			T a1 = nextFunc1.apply(iterator1);
			boolean a3 = oiFunc3.test(source3, a2);
			consumer.accept(a1, a2, a3);
			a2++;
		}
		return a2;

	}

	/**
	* For each element (or tuple) from arguments, calls the consumer (with index).
	* Thread safety, fail-fast, fail-safety of this method is not expected.
	* @returns iterations count
	*/
	public static <C1, C3, I3, T> int indexedIterate(IndexedRead<C1, a<T>> ia1, C1 source1, SequentialRead<C3, I3, aBool> sa3, C3 source3, LTieBoolConsumer<? super T> consumer) {
		int size = ia1.size(source1);
		LOiFunction<Object, T> oiFunc1 = (LOiFunction) ia1.getter();
		Object iterator3 = ((LFunction) sa3.adapter()).apply(source3);
		LPredicate<Object> testFunc3 = (LPredicate) sa3.tester();
		LPredicate<Object> nextFunc3 = (LPredicate) sa3.supplier();
		int a2 = 0;
		while (a2 < size && testFunc3.test(iterator3)) {
			T a1 = oiFunc1.apply(source1, a2);
			boolean a3 = nextFunc3.test(iterator3);
			consumer.accept(a1, a2, a3);
			a2++;
		}
		return a2;

	}

	/**
	* For each element (or tuple) from arguments, calls the consumer (with index).
	* Thread safety, fail-fast, fail-safety of this method depends highly on the arguments.
	* @returns iterations count
	*/
	public static <C1, I1, C3, I3, T> int indexedIterate(SequentialRead<C1, I1, a<T>> sa1, C1 source1, SequentialRead<C3, I3, aBool> sa3, C3 source3, LTieBoolConsumer<? super T> consumer) {
		Object iterator1 = ((LFunction) sa1.adapter()).apply(source1);
		LPredicate<Object> testFunc1 = (LPredicate) sa1.tester();
		LFunction<Object, T> nextFunc1 = (LFunction) sa1.supplier();
		Object iterator3 = ((LFunction) sa3.adapter()).apply(source3);
		LPredicate<Object> testFunc3 = (LPredicate) sa3.tester();
		LPredicate<Object> nextFunc3 = (LPredicate) sa3.supplier();
		int a2 = 0;
		while (testFunc1.test(iterator1) && testFunc3.test(iterator3)) {
			T a1 = nextFunc1.apply(iterator1);
			boolean a3 = nextFunc3.test(iterator3);
			consumer.accept(a1, a2, a3);
			a2++;
		}
		return a2;

	}

	/**
	* For each element (or tuple) from arguments, calls the consumer. First argument is designated as 'target' object.
	* Thread safety, fail-fast, fail-safety of this method is not expected.
	* @returns 'target' object
	*/
	public static <T, C2, C3> T targetedForEach(T a1, IndexedRead<C2, aInt> ia2, C2 source2, IndexedRead<C3, aBool> ia3, C3 source3, LTieBoolConsumer<? super T> consumer) {
		int size = ia2.size(source2);
		LOiToIntFunction<Object> oiFunc2 = (LOiToIntFunction) ia2.getter();
		size = Integer.min(size, ia3.size(source3));
		LObjIntPredicate<Object> oiFunc3 = (LObjIntPredicate) ia3.getter();
		int i = 0;
		for (; i < size; i++) {
			int a2 = oiFunc2.applyAsInt(source2, i);
			boolean a3 = oiFunc3.test(source3, i);
			consumer.accept(a1, a2, a3);
		}
		return a1;

	}

	/**
	* For each element (or tuple) from arguments, calls the consumer. First argument is designated as 'target' object.
	* Thread safety, fail-fast, fail-safety of this method is not expected.
	* @returns 'target' object
	*/
	public static <T, C2, I2, C3> T targetedIterate(T a1, SequentialRead<C2, I2, aInt> sa2, C2 source2, IndexedRead<C3, aBool> ia3, C3 source3, LTieBoolConsumer<? super T> consumer) {
		Object iterator2 = ((LFunction) sa2.adapter()).apply(source2);
		LPredicate<Object> testFunc2 = (LPredicate) sa2.tester();
		LToIntFunction<Object> nextFunc2 = (LToIntFunction) sa2.supplier();
		int size = ia3.size(source3);
		LObjIntPredicate<Object> oiFunc3 = (LObjIntPredicate) ia3.getter();
		int i = 0;
		while (testFunc2.test(iterator2) && i < size) {
			int a2 = nextFunc2.applyAsInt(iterator2);
			boolean a3 = oiFunc3.test(source3, i);
			consumer.accept(a1, a2, a3);
			i++;
		}
		return a1;

	}

	/**
	* For each element (or tuple) from arguments, calls the consumer. First argument is designated as 'target' object.
	* Thread safety, fail-fast, fail-safety of this method is not expected.
	* @returns 'target' object
	*/
	public static <T, C2, C3, I3> T targetedIterate(T a1, IndexedRead<C2, aInt> ia2, C2 source2, SequentialRead<C3, I3, aBool> sa3, C3 source3, LTieBoolConsumer<? super T> consumer) {
		int size = ia2.size(source2);
		LOiToIntFunction<Object> oiFunc2 = (LOiToIntFunction) ia2.getter();
		Object iterator3 = ((LFunction) sa3.adapter()).apply(source3);
		LPredicate<Object> testFunc3 = (LPredicate) sa3.tester();
		LPredicate<Object> nextFunc3 = (LPredicate) sa3.supplier();
		int i = 0;
		while (i < size && testFunc3.test(iterator3)) {
			int a2 = oiFunc2.applyAsInt(source2, i);
			boolean a3 = nextFunc3.test(iterator3);
			consumer.accept(a1, a2, a3);
			i++;
		}
		return a1;

	}

	/**
	* For each element (or tuple) from arguments, calls the consumer. First argument is designated as 'target' object.
	* Thread safety, fail-fast, fail-safety of this method depends highly on the arguments.
	* @returns 'target' object
	*/
	public static <T, C2, I2, C3, I3> T targetedIterate(T a1, SequentialRead<C2, I2, aInt> sa2, C2 source2, SequentialRead<C3, I3, aBool> sa3, C3 source3, LTieBoolConsumer<? super T> consumer) {
		Object iterator2 = ((LFunction) sa2.adapter()).apply(source2);
		LPredicate<Object> testFunc2 = (LPredicate) sa2.tester();
		LToIntFunction<Object> nextFunc2 = (LToIntFunction) sa2.supplier();
		Object iterator3 = ((LFunction) sa3.adapter()).apply(source3);
		LPredicate<Object> testFunc3 = (LPredicate) sa3.tester();
		LPredicate<Object> nextFunc3 = (LPredicate) sa3.supplier();
		while (testFunc2.test(iterator2) && testFunc3.test(iterator3)) {
			int a2 = nextFunc2.applyAsInt(iterator2);
			boolean a3 = nextFunc3.test(iterator3);
			consumer.accept(a1, a2, a3);
		}
		return a1;

	}

	/** ***ITERATION:    TIE_CONSUMER_GEN:  FOR, [SourcePurpose{arg=int sStart, type=CONST}, SourcePurpose{arg=int sEnd, type=CONST}, SourcePurpose{arg=int tStart, type=CONST}, SourcePurpose{arg=T trg1, type=CONST}, SourcePurpose{arg=boolean a3, type=TIE_SOURCE}, SourcePurpose{arg=boolean a3, type=TIE_GEN_SUPPLIER}] */
	default <SRC> int genericTieForEach(int sStart, int sEnd, int tStart, T trg1, SRC src3, OiFunction<SRC, aBool> srcAcc3) {
		return tieForEach(sStart, sEnd, tStart, trg1, src3, (LObjIntPredicate<SRC>) srcAcc3, this);

	}

	/** ***ITERATION:    TARGETED_INDEXED_FOR_EACH:  FOR, [SourcePurpose{arg=T trg1, type=CONST}, SourcePurpose{arg=boolean a3, type=IA}, SourcePurpose{arg=LTieBoolConsumer<? super T> consumer, type=CONST}] */
	public static <T, C3> T tiForEach(T trg1, IndexedRead<C3, aBool> ia3, C3 source3, LTieBoolConsumer<? super T> consumer) {

		tieForEach(trg1, ia3, source3, consumer);

		return trg1;

	}

	/** ***ITERATION:    TARGETED_INDEXED_FOR_EACH_NEW:  FOR, [SourcePurpose{arg=T trg1, type=SIZE_FACTORY}, SourcePurpose{arg=boolean a3, type=IA}, SourcePurpose{arg=LTieBoolConsumer<? super T> consumer, type=CONST}] */
	public static <T, C3> T ntiForEach(LIntFunction<T> trgFactory1, IndexedRead<C3, aBool> ia3, C3 source3, LTieBoolConsumer<? super T> consumer) {
		int size = ia3.size(source3);
		T trg1 = trgFactory1.apply(size);
		tieForEach(0, size, 0, trg1, source3, ia3.getter(), consumer);
		return trg1;
	}

	/** ***ITERATION:    TIE_CONSUMER_SHORT:  FOR, [SourcePurpose{arg=T trg1, type=CONST}, SourcePurpose{arg=boolean a3, type=IA}, SourcePurpose{arg=LTieBoolConsumer<? super T> consumer, type=CONST}] */
	public static <T, C3> int tieForEach(T trg1, IndexedRead<C3, aBool> ia3, C3 source3, LTieBoolConsumer<? super T> consumer) {
		int size = ia3.size(source3);
		return tieForEach(0, size, 0, trg1, source3, ia3.getter(), consumer);
	}

	/** ***ITERATION:    TIE_CONSUMER:  FOR, [SourcePurpose{arg=int sStart, type=CONST}, SourcePurpose{arg=int sEnd, type=CONST}, SourcePurpose{arg=int tStart, type=CONST}, SourcePurpose{arg=T trg1, type=CONST}, SourcePurpose{arg=boolean a3, type=TIE_SOURCE}, SourcePurpose{arg=boolean a3, type=TIE_SUPPLIER}, SourcePurpose{arg=LTieBoolConsumer<? super T> consumer, type=CONST}] */
	public static <T, SRC> int tieForEach(int sStart, int sEnd, int tStart, T trg1, SRC src3, LObjIntPredicate<SRC> srcAcc3, LTieBoolConsumer<? super T> consumer) {
		for (int sIndex = sStart, tIndex = tStart; sIndex < sEnd; sIndex++, tIndex++) {
			boolean a3 = srcAcc3.test(src3, sIndex);
			consumer.accept(trg1, tIndex, a3);
		}
		return sEnd - sStart;

	}

	/** ***ITERATION:    TIE_CONSUMER2_GEN:  FOR, [SourcePurpose{arg=int sStart, type=CONST}, SourcePurpose{arg=int tStart, type=CONST}, SourcePurpose{arg=T trg1, type=CONST}, SourcePurpose{arg=boolean a3, type=TIE_SOURCE}, SourcePurpose{arg=boolean a3, type=TE_GEN_PREDICATE}, SourcePurpose{arg=boolean a3, type=TE_GEN_SUPPLIER}] */
	default <SRC> int genericTieForEach(int sStart, int tStart, T trg1, SRC src3, OFunction<SRC, aBool> srcTest3, OFunction<SRC, aBool> srcAcc3) {
		return tieForEach(sStart, tStart, trg1, src3, (LPredicate<SRC>) srcTest3, (LPredicate<SRC>) srcAcc3, this);

	}

	/**
	* For each element (or tuple) from arguments, calls the consumer (with TIE: 'target', index, element). First argument is designated as 'target' object.
	* Thread safety, fail-fast, fail-safety of this method depends highly on the arguments.
	* @returns iterations count
	*/
	public static <T, SRC> int tieForEach(int sStart, int tStart, T trg1, SRC src3, LPredicate<SRC> srcTest3, LPredicate<SRC> srcAcc3, LTieBoolConsumer<? super T> consumer) {
		int tIndex = tStart;
		for (; srcTest3.test(src3); tIndex++) {
			boolean a3 = srcAcc3.test(src3);
			consumer.accept(trg1, tIndex, a3);
		}
		return tIndex - sStart;

	}

	/**
	* For each element (or tuple) from arguments, calls the consumer (with TIE: 'target', index, element). First argument is designated as 'target' object.
	* Thread safety, fail-fast, fail-safety of this method depends highly on the arguments.
	* @returns iterations count
	*/
	public static <T, C3, I3> int tieIterate(T trg1, SequentialRead<C3, I3, aBool> sa3, C3 source3, LTieBoolConsumer<? super T> consumer) {
		LFunction<C3, I3> toIntermediate = sa3.adapter();
		return tieForEach(0, 0, trg1, toIntermediate.apply(source3), sa3.tester(), sa3.supplier(), consumer);
	}

	/**
	* For each element (or tuple) from arguments, calls the consumer (with TIE: 'target', index, element). First argument is designated as 'target' object.
	* Thread safety, fail-fast, fail-safety of this method depends highly on the arguments.
	* @returns 'target' object
	*/
	public static <T, C3, I3> T tiIterate(T trg1, SequentialRead<C3, I3, aBool> sa3, C3 source3, LTieBoolConsumer<? super T> consumer) {

		tieIterate(trg1, sa3, source3, consumer);

		return trg1;

	}

	/** ***ITERATION:    TARGETED_INDEXED_ITERATE_NEW:  WHILE, [SourcePurpose{arg=T trg1, type=SUPPLIER}, SourcePurpose{arg=boolean a3, type=SA}, SourcePurpose{arg=LTieBoolConsumer<? super T> consumer, type=CONST}] */
	public static <T, C3, I3> T ntiIterate(LSupplier<T> source1, SequentialRead<C3, I3, aBool> sa3, C3 source3, LTieBoolConsumer<? super T> consumer) {
		T trg1 = source1.get();
		tieIterate(trg1, sa3, source3, consumer);

		return trg1;

	}

	// <editor-fold desc="fluentUse">

	public static <T, R> R inlineAcceptR(R retval, T a1, int a2, boolean a3, LTieBoolConsumer<T> consumer) {
		consumer.accept(a1, a2, a3);
		return retval;
	}

	public static <T> T inlineAccept(T a1, int a2, boolean a3, LTieBoolConsumer<T> consumer) {
		consumer.accept(a1, a2, a3);
		return a1;
	}

	// </editor-fold>

}


text:
#include "../libk.h"
/*
    rend.c is a ../WARF/wind.c derivative
    note: both are written in terms of text coordinates x,y
*/

void bildABUF(char* abuf, int* look, int maxindex)
{
    int count = 0;
    int y;
    int xmin = glob.xmin; int xmax = glob.xmax;
    int ymin = glob.ymin; int ymax = glob.ymax;
    for (y = ymin; y <= ymax; y++)
    {
      int x; char* s = xmin + text[y].row;
      for ( x = xmin; x <= xmax; x++)
      {

//  following are two tests to determine whether *s should be stored in abuf

        if (x>=text[y].size )  break; assert(*s != '\n');

//  here *s tests ok, assign it to abuf[]

        if (x == glob.ix && y == glob.iy) *look = count;
        abuf[count] = *s; s++; count++; assert(count < maxindex);
       } //end inner for loop

//  test whether to display the last line without a newline
//  which otherwise would move the cursor below the window (virtural screen)
//  possibly causing a virtual screen mismatch with the actual screen

      if(y != ymax) {abuf[count] = '\n'; count++;}
     }  //end outer for loop

printf("bildABUF count = %d\n",count);
   abuf[count] = '\0';
printf("bildABUF the length of abuf is %d \n",(int) strlen(abuf));
   return;
}

redpajama_set_name: RedPajamaGithub


text:
<?php
/* Smarty version 3.1.29, created on 2016-05-17 22:36:17
  from "/usr/local/var/www/frame.hustonline.local/application/views/admin/login.tpl" */

if ($_smarty_tpl->smarty->ext->_validateCompiled->decodeProperties($_smarty_tpl, array (
  'has_nocache_code' => false,
  'version' => '3.1.29',
  'unifunc' => 'content_573b2c610acf21_46420278',
  'file_dependency' =>
  array (
    'f0ada04f8ba9409603356e238b8915ff7f26aec9' =>
    array (
      0 => '/usr/local/var/www/frame.hustonline.local/application/views/admin/login.tpl',
      1 => 1463495643,
      2 => 'file',
    ),
  ),
  'includes' =>
  array (
  ),
),false)) {
function content_573b2c610acf21_46420278 ($_smarty_tpl) {
?>
<!DOCTYPE html>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="author" content="冰岩作坊">
    <title>后台管理系统</title>
    <link href="http://www.2shoujie.com/resource/bootstrap/css/bootstrap.min.css" rel="stylesheet">
    <link href="http://www.2shoujie.com/resource/bootstrap/css/sigin.css" rel="stylesheet">

    <form class="form-signin" role="form" action="/manage/login/sigin" method="post">

管理员入口

        <input type="email" name="username" class="form-control" placeholder="用户名" required autofocus>
        <input type="password" name="password" class="form-control" placeholder="密码" required>
        <button class="btn btn-lg btn-primary btn-block" type="submit">登录</button>
    </form>

<?php }
}


text:
// ----------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// ----------------------------------------------------------------------------

using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Xml.Linq;
using System.Threading.Tasks;

namespace Microsoft.WindowsAzure.MobileServices.TestFramework
{
    /// <summary>
    /// Harness for a test framework that allows asynchronous unit testing.
    /// </summary>
    public sealed class TestHarness
    {
        /// <summary>
        /// Initializes a new instance of the TestHarness class.
        /// </summary>
        public TestHarness()
        {
            this.Groups = new List<TestGroup>();
            this.Settings = new TestSettings();
            this.testRun = new TestRun();
            this.LogDump = new StringBuilder();
        }

        private TestRun testRun;
        /// <summary>
        /// Gets the list of test groups which contain TestMethods to execute.
        /// </summary>
        public IList<TestGroup> Groups { get; private set; }

        /// <summary>
        /// Gets the test settings used for this run.
        /// </summary>
        public TestSettings Settings { get; private set; }

        /// <summary>
        /// Gets or sets the TestReporter used to update the test interface as
        /// the test run progresses.
        /// </summary>
        public ITestReporter Reporter { get; set; }

        /// <summary>
        /// Gets the total number of test methods.
        /// </summary>
        /// <remarks>
        /// This is a simple helper to provide access to the total number of
        /// test methods which the Reporter can display.
        /// </remarks>
        public int Count
        {
            get { return this.Groups.SelectMany(g => g.Methods).Count(); }
        }

        /// <summary>
        /// Gets the number of test failures.
        /// </summary>
        public int Failures { get; set; }

        /// <summary>
        /// Get the number of tests already executed.
        /// </summary>
        public int Progress { get; private set; }

        /// <summary>
        /// Log Dump for individual tests
        /// </summary>
        public StringBuilder LogDump { get; set; }

        public string Platform { get; set; }
        /// <summary>
        /// Logs a message.
        /// </summary>
        /// <param name="message">The message.</param>
        public void Log(string message)
        {
            // Record the log to the LogDump only if the app is running in auto mode
            if (!Settings.ManualMode)
            {
                this.LogDump.AppendLine(message);
            }
            System.Diagnostics.Debug.WriteLine(message);
            this.Reporter.Log(message);

        }

        /// <summary>
        /// Load the tests from the given assembly.
        /// </summary>
        /// <param name="testAssembly">The assembly from which to load tests.</param>
        public void LoadTestAssembly(Assembly testAssembly)
        {
            LoadTestAssembly(this, testAssembly);
        }

        /// <summary>
        /// Filter out any test methods basd on the current settings.
        /// </summary>
        private int FilterTests()
        {
            // Create the list of filters (at some point we could make this
            // publicly accessible)
            List<TestFilter> filters = new List<TestFilter>();
            filters.Add(new FunctionalTestFilter(this.Settings));
            filters.Add(new TagTestFilter(this.Settings));

            // Apply any test filters to the set of tests before we begin
            // executing (test filters will change the Excluded property of
            // individual test methods)
            int originalCount = Count;
            foreach (TestFilter filter in filters)
            {
                filter.Filter(this.Groups);
            }
            int filteredCount = Count;
            if (filteredCount != originalCount)
            {
                this.Settings.TestRunStatusMessage += " - Only running " + filteredCount + "/" + originalCount + " tests";
            }
            return filteredCount;
        }

        /// <summary>
        /// Record the test metadata to the test run object at the start of the test run
        /// </summary>
        private void FillTestRunMetaData()
        {
            if (!Settings.ManualMode)
            {
                testRun.StartTime = DateTime.UtcNow;
                testRun.Tags.Add(Platform);
                testRun.Name = Platform + " " + Settings.Custom["RuntimeVersion"];
                testRun.VersionSpec.BranchName = Settings.Custom["RuntimeVersion"];
            }
        }

        /// <summary>
        /// Run the unit tests.
        /// </summary>
        public async void RunAsync()
        {
            // Ensure there's an interface to display the test results.
            if (this.Reporter == null)
            {
                throw new ArgumentNullException("Reporter");
            }

            /// Record the test metadata to the test run object at the start of the test run
            FillTestRunMetaData();

            // Setup the progress/failure counters
            this.Progress = 0;
            this.Failures = 0;

            // Filter out any test methods based on the current settings
            int filteredTestCount = FilterTests();

            // get the actual count of tests going to run
            testRun.TestCount = filteredTestCount;

            // Write out the test status message which may be modified by the
            // filters
            Reporter.Status(this.Settings.TestRunStatusMessage);

            // Enumerators that track the current group and method to execute
            // (which allows reentrancy into the test loop below to resume at
            // the correct location).
            IEnumerator<TestGroup> groups = this.Groups.OrderBy(g => g.Name).GetEnumerator();
            IEnumerator<TestMethod> methods = null;

            // Keep a reference to the current group so we can pass it to the
            // Reporter's EndGroup (we don't need one for the test method,
            // however, because we close over in the continuation).
            TestGroup currentGroup = null;

            // Create daylight test run and get the run id
            string runId = String.Empty;
            if (!Settings.ManualMode)
            {
                runId = await TestLogger.CreateDaylightRun(testRun, Settings);
            }

            // Setup the UI
            this.Reporter.StartRun(this);

            // The primary test loop is a "recursive" closure that will pass
            // itself as the continuation to async tests.
            //
            // Note: It's really important for performance to note that any
            // calls to testLoop only occur in the tail position.
            JObject sasResponseObject = null;
            DateTime RunStartTime = DateTime.UtcNow;
            Func<Task> testLoop = null;

            // Get the SAS token to upload the test logs to upload test logs to blob store
            if (!Settings.ManualMode && !String.IsNullOrEmpty(runId))
            {
                sasResponseObject = await TestLogger.GetSaSToken(Settings);

            }
            testLoop =
                async () =>
                {
                    if (methods != null && methods.MoveNext())
                    {
                        // If we were in the middle of a test group and there
                        // are more methods to execute, let's move to the next
                        // test method.

                        // Update the progress
                        this.Progress++;
                        Reporter.Progress(this);
                        // Start the test method
                        Reporter.StartTest(methods.Current);
                        if (methods.Current.Excluded)
                        {
                            // Ignore excluded tests and immediately recurse.
                            Reporter.EndTest(methods.Current);
                            await testLoop();
                        }
                        else
                        {
                            // Get the start time for individual tests
                            DateTime testStartTime = DateTime.UtcNow;

                            // Record the test result, upload the test log as a blob and clear the
                            // log for next test
                            Func<Task> recordTestResult = async () =>
                            {
                                if (!Settings.ManualMode && !String.IsNullOrEmpty(runId))
                                {
                                    var log = new TestLogs()
                                    {
                                        LogLines = LogDump.ToString(),
                                        LogHash = Guid.NewGuid().ToString()
                                    };
                                    // record the test result
                                    var testResult = new TestResult()
                                    {
                                        FullName = methods.Current.Name,
                                        StartTime = testStartTime,
                                        EndTime = DateTime.UtcNow,
                                        Outcome = methods.Current.Passed ? "Passed" : "Failed",
                                        RunId = runId,
                                        Tags = new List<string> { Platform },
                                        Source = currentGroup.Name,
                                        Logs = sasResponseObject != null ? log : null
                                    };

                                    // upload test log to the blob store
                                    if (sasResponseObject != null)
                                        await TestLogger.UploadTestLog(log, sasResponseObject);

                                    // Add the test result to the test result collection, which will eventually
                                    // be uploaded to daylight
                                    testRun.AddTestResult(testResult);
                                    LogDump.Clear();
                                }
                            };
                            // Execute the test method
                            methods.Current.Test.Start(
                                new ActionContinuation
                                {
                                    OnSuccess = async () =>
                                    {
                                        // Mark the test as passing, update the
                                        // UI, and continue with the next test.
                                        methods.Current.Passed = true;
                                        methods.Current.Test = null;
                                        Reporter.EndTest(methods.Current);
                                        await recordTestResult();
                                        await testLoop();
                                    },
                                    OnError = async (message) =>
                                    {
                                        // Mark the test as failing, update the
                                        // UI, and continue with the next test.
                                        methods.Current.Passed = false;
                                        methods.Current.Test = null;
                                        methods.Current.ErrorInfo = message;
                                        this.Failures++;
                                        System.Diagnostics.Debug.WriteLine(message);
                                        Reporter.Error(message);
                                        LogDump.AppendLine(message);
                                        Reporter.EndTest(methods.Current);
                                        await recordTestResult();
                                        await testLoop();
                                    }
                                });
                        }

                    }
                    else if (groups.MoveNext())
                    {
                        // If we've finished a test group and there are more,
                        // then move to the next one.

                        // Finish the UI for the last group.
                        if (currentGroup != null)
                        {
                            Reporter.EndGroup(currentGroup);
                            currentGroup = null;
                        }

                        // Setup the UI for this next group
                        currentGroup = groups.Current;
                        Reporter.StartGroup(currentGroup);

                        // Get the methods and immediately recurse which will
                        // start executing them.
                        methods = groups.Current.Methods.OrderBy(m => m.Name).GetEnumerator();
                        await testLoop();
                    }
                    else
                    {
                        if (!Settings.ManualMode && !String.IsNullOrEmpty(runId))
                        {
                            // post all the test results to daylight
                            await TestLogger.PostTestResults(testRun.TestResults.ToList(), Settings);

                            // String to store the test result summary of the entire suite
                            StringBuilder resultLog = new StringBuilder("Total Tests:" + filteredTestCount);
                            resultLog.AppendLine();
                            resultLog.AppendLine("Passed Tests:" + (filteredTestCount - Failures).ToString());
                            resultLog.AppendLine("Failed Tests:" + Failures);
                            resultLog.AppendLine("Detailed Results:" + Settings.Custom["DayLightUrl"] + "/" + Settings.Custom["DaylightProject"] + "/runs/" + runId);

                            var logs = new TestLogs()
                            {
                                LogLines = resultLog.ToString(),
                                LogHash = Guid.NewGuid().ToString()
                            };
                            // Record the the result of the entire test suite to master test run
                            var testResult = new TestResult()
                            {
                                FullName = Platform + " " + Settings.Custom["RuntimeVersion"],
                                Name = Platform + " " + Settings.Custom["RuntimeVersion"],
                                StartTime = RunStartTime,
                                EndTime = DateTime.UtcNow,
                                Outcome = Failures > 0 ? "Failed" : "Passed",
                                RunId = Settings.Custom["MasterRunId"],
                                Tags = new List<string> { Platform },
                                Source = "Managed",
                                Logs = sasResponseObject != null ? logs : null
                            };

                            // Upload the log of the test result summary for the test suite
                            if (sasResponseObject != null)
                                await TestLogger.UploadTestLog(logs, sasResponseObject);

                            // Post the test suite result to master run
                            await TestLogger.PostTestResults(new List<TestResult> { testResult }, Settings);
                        }
                        // Otherwise if we've finished the entire test run

                        // Finish the UI for the last group and update the
                        // progress after the very last test method.
                        Reporter.EndGroup(currentGroup);
                        Reporter.Progress(this);

                        // Finish the UI for the test run.
                        Reporter.EndRun(this);
                    }
                };

            // Start running the tests
            await testLoop();
        }

        private static void LoadTestAssembly(TestHarness harness, Assembly testAssembly)
        {
            Dictionary<Type, TestGroup> groups = new Dictionary<Type, TestGroup>();
            Dictionary<TestGroup, object> instances = new Dictionary<TestGroup, object>();
            foreach (Type type in testAssembly.ExportedTypes)
            {
                foreach (MethodInfo method in type.GetRuntimeMethods())
                {
                    if (method.GetCustomAttributes<TestMethodAttribute>().Any() ||
                            method.GetCustomAttributes<AsyncTestMethodAttribute>().Any())
                    {
                        TestGroup group = null;
                        object instance = null;
                        if (!groups.TryGetValue(type, out group))
                        {
                            group = CreateGroup(type);
                            harness.Groups.Add(group);
                            groups[type] = group;

                            instance = Activator.CreateInstance(type);
                            TestBase testBase = instance as TestBase;
                            if (testBase != null)
                            {
                                testBase.SetTestHarness(harness);
                            }

                            instances[group] = instance;
                        }
                        else
                        {
                            instances.TryGetValue(group, out instance);
                        }

                        TestMethod test = CreateMethod(type, instance, method);
                        group.Methods.Add(test);
                    }
                }
            }
        }

        private static TestGroup CreateGroup(Type type)
        {
            TestGroup group = new TestGroup();
            group.Name = type.Name;
            group.Tags.Add(type.Name);
            group.Tags.Add(type.FullName);

            if (type.GetTypeInfo().GetCustomAttributes<FunctionalTestAttribute>().Any())
            {
                group.Tags.Add("Functional");
            }

            foreach (TagAttribute attr in type.GetTypeInfo().GetCustomAttributes<TagAttribute>())
            {
                group.Tags.Add(attr.Tag);
            }
            return group;
        }

        private static TestMethod CreateMethod(Type type, object instance, MethodInfo method)
        {
            TestMethod test = new TestMethod();
            test.Name = method.Name;

            if (method.GetCustomAttributes<AsyncTestMethodAttribute>().Any())
            {
                test.Test = new AsyncTestMethodAsyncAction(instance, method);
            }
            else
            {
                test.Test = new TestMethodAsyncAction(instance, method);
            }

            ExcludeTestAttribute excluded = method.GetCustomAttribute<ExcludeTestAttribute>();
            if (excluded != null)
            {
                test.Exclude(excluded.Reason);
            }

            if (method.GetCustomAttributes<FunctionalTestAttribute>().Any())
            {
                test.Tags.Add("Functional");
            }

            test.Tags.Add(type.FullName + "." + method.Name);
            test.Tags.Add(type.Name + "." + method.Name);
            foreach (TagAttribute attr in method.GetCustomAttributes<TagAttribute>())
            {
                test.Tags.Add(attr.Tag);
            }

            return test;
        }
    }
}


text:
var util = require('util');

module.exports = function () {
    this.BeforeFeatures((features, callback) => {
        this.pid = null;
        this.initializeEnv(() => {
            this.initializeOptions(callback);
        });
    });

    this.Before((scenario, callback) => {
        this.scenarioTitle = scenario.getName();

        this.loadMethod = this.DEFAULT_LOAD_METHOD;
        this.queryParams = {};
        var d = new Date();
        this.scenarioTime = util.format('%d-%d-%dT%s:%s:%sZ', d.getFullYear(), d.getMonth()+1, d.getDate(), d.getHours(), d.getMinutes(), d.getSeconds());
        this.resetData();
        this.hasLoggedPreprocessInfo = false;
        this.hasLoggedScenarioInfo = false;
        this.setGridSize(this.DEFAULT_GRID_SIZE);
        this.setOrigin(this.DEFAULT_ORIGIN);
        callback();
    });

    this.After((scenario, callback) => {
        this.setExtractArgs('');
        this.setContractArgs('');
        if (this.loadMethod === 'directly' && !!this.OSRMLoader.loader) this.OSRMLoader.shutdown(callback);
        else callback();
    });

    this.Around('@stress', (scenario, callback) => {
        // TODO implement stress timeout? Around support is being dropped in cucumber-js anyway
        callback();
    });
};


text:
<?php
class WpExhibitView extends WpExhibitModel {

	protected $fields = array(
		'kind' => NULL,
		'klass' => NULL,
		'field'  => NULL,
		'itemtype' => NULL,
		'label' => NULL,
		'caption' => NULL,
		'end' => NULL,
		'locationtype' => NULL,
		'coderfield' => NULL,
		'exhibitid' => NULL,
		'xField' => NULL,
		'yField' => NULL,
		'xLabel' => NULL,
		'yLabel' => NULL,
		'yScale' => NULL,
		'xScale' => NULL,
		'color' => NULL,
		'sortby' => NULL,
		'decoration' => NULL,
		'proxy' => NULL,
		'icon' => NULL,
		'bubblewidth' => NULL,
		'bubbleheight' => NULL,
		'markerwidth' => NULL,
        'markerheight' => NULL,
        'height' => NULL,
        'topBandUnit' => NULL,
        'bottomBandUnit' => NULL,
		'extra_attributes' => NULL,
        'ungrouped' => NULL
    );

	function WpExhibitView($opts = NULL) {
		parent::WpExhibitModel($opts);
	}

	function getTableName() {
		return WpExhibitConfig::table_name(WpExhibitConfig::$VIEWS_TABLE_KEY);
	}

	function getFormPrefix() {
		return WpExhibitConfig::$VIEW_FORM_PREFIX;
	}

	function getShortKind() {
		switch($this->get('kind')) {
			case 'view-table':
				return "Table";
			case 'view-timeline':
				return "Timeline";
			case 'view-map':
				return "Map";
			case 'view-tile':
				return "List";
			case 'view-scatter':
				return "Scatter Plot";
			case 'view-bar':
				return "Bar Chart";
			default:
				return "UnknownView";
		}
	}

	function getLinkCaption() {
		return $this->getShortKind() . ": " . $this->get('label');
	}

    function propString($prop, $value, $default) {
      if ($value == NULL) {
          if ($default == NULL) {
              return "";
          }
          else {
              return " " . $prop . "=\"" . $default . "\" ";
          }
      }
      else {
          return " " . $prop . "=\"" . $value . "\" ";
      }
    }

    function htmlContent() {
		$kind = $this->get('kind');
		$label = $this->get('label');
		$klass = $this->get('klass');
		$collection_insert = '';
		/*if ($klass != NULL) {
			$collection_insert = "ex:collectionID='collection_$klass'";
		}
		else {
			$collection_insert = "ex:collectionID='auto_union'";
		}*/

		if ($kind == "view-tile") {
			// Todo: add the actual date and time stuff
			$bulletstyle = $this->get('decoration');
            $inner = "";

            if ($this->get('extra_attributes') != NULL) {
                $inner .= " " . $this->get('extra_attributes') . " ";
            }

            return "

";
		}

		if ($kind == "view-timeline") {
			// Todo: add the actual date and time stuff
			$start = $this->get('field');

			$proxy = $this->get('proxy');
			$inner = "";
			if ($proxy != NULL) {
				$inner .= " ex:proxy='.$proxy' ";
            }

            $inner .= $this->propString("ex:timelineHeight", $this->get('height'), "170");
            $inner .= $this->propString("ex:topBandUnit", $this->get('topBandUnit'), NULL);
            $inner .= $this->propString("ex:bottomBandUnit", $this->get('bottomBandUnit'), NULL);
            if ($this->get('extra_attributes') != NULL) {
                $inner .= " " . $this->get('extra_attributes') . " ";
            }

            $ret =  "
get('end') != null) {
				$end = $this->get('end');
				$ret = $ret . " ex:end=\".$end\"";
			}
			$ret = $ret . ">
";
			return $ret;
		}
		else if ($kind == "view-map") {
			// Todo: add the actual location stuff

			$field = $this->get('field');
			$locationtype = $this->get('locationtype');
			$where = "ex:latlng='.$field'";
			$icon = $this->get('icon');
			$proxy = $this->get('proxy');
			$bw = $this->get('bubblewidth');
			$bh = $this->get('bubbleheight');
			$mw = $this->get('markerwidth');
			$mh = $this->get('markerheight');

			$after = "";
			$inner = "";

			if ($icon != NULL) {
				$inner .= " ex:icon='.$icon' ";
			}
			if ($proxy != NULL) {
				$inner .= " ex:proxy='.$proxy' ";
			}

            if ($this->get('extra_attributes') != NULL) {
                $inner .= " " . $this->get('extra_attributes') . " ";
            }
	    	//This case will handle if we are using geocoded data.
			if($locationtype == 'address') {
				$field = $field . '_generatedLatLng';
			}
			// NOTE: There is currently no nocderfeld thing being put in here.
			$ret = "

";
			return $ret;
		}
		else if ($kind == "view-table") {
			$columns = $this->get('field');
			$columnlabels = $this->get('caption');
			$klass = $this->get('klass');

            $inner = "";

            if ($this->get('extra_attributes') != NULL) {
                $inner .= " " . $this->get('extra_attributes') . " ";
            }

			// Todo: add the actual location stuff
			$ret = "
";
			$ret .= "

";
			$columns_arr = explode(",", $columns);
			foreach($columns_arr as $column) {
				$ret .= "	";
			}
			$ret .= "

";
			return $ret;
		}
		if ($kind == "view-scatter") {
			// Todo: add the actual date and time stuff
			$field_x = $this->get("xField");
			$field_y = $this->get("yField");
			$field_xLabel = $this->get("xLabel");
            $field_yLabel = $this->get("yLabel");
            $inner = "";
            if ($this->get('extra_attributes') != NULL) {
                $inner .= " " . $this->get('extra_attributes') . " ";
            }

			$ret =  "

";
			return $ret;
		}
		if ($kind == "view-bar") {
			// Todo: add the actual date and time stuff
			$field_x = $this->get("xField");
			$field_y = $this->get("yField");
			$field_xLabel = $this->get("xLabel");
            $field_yLabel = $this->get("yLabel");
            $inner = "";
            if ($this->get('extra_attributes') != NULL) {
                $inner .= " " . $this->get('extra_attributes') . " ";
            }

			$ret =  "

";
			return $ret;
		}
	}

	function getEditInfo() {
	    switch($this->get('kind')) {
			case 'view-table':
        	    return 'editable: true, tabid: "exhibit-views-table"';
			case 'view-timeline':
        	    return 'editable: true, tabid: "exhibit-views-timeline"';
			case 'view-map':
        	    return 'editable: true, tabid: "exhibit-views-maps"';
			case 'view-tile':
        	    return 'editable: true, tabid: "exhibit-views-list"';
			case 'view-scatter':
        	    return 'editable: true, tabid: "exhibit-views-scatter"';
			case 'view-bar':
        	    return 'editable: true, tabid: "exhibit-views-bar"';
			default:
        	    return 'editable: false';
		}
	}

}
?>


text:
class AddMissingSlugMigrations < ActiveRecord::Migration
  def up
    return say("Skipping slug creation in test environment") if Rails.env.test?

    SLUGS.each do |s|
      execute "INSERT INTO slug_migrations (slug, created_at, updated_at, content_id) VALUES ('#{s}', now(), now(), '#{SecureRandom.uuid}')"
    end
  end

  SLUGS = [
    "/service-manual/communications/index.html",
    "/service-manual/web-ops/index.html",
    "/service-manual/developers/index.html",
    "/service-manual/agile/index.html",
    "/service-manual/digital-by-default/index.html",
    "/service-manual/feedback/index.html",
    "/service-manual/governance/index.html",
    "/service-manual/chief-technology-officers/index.html",
    "/service-manual/measurement/index.html",
    "/service-manual/domain-names/index.html",
    "/service-manual/the-team/recruitment/index.html",
    "/service-manual/the-team/learning-and-development/index.html",
    "/service-manual/the-team/index.html",
    "/service-manual/browse/index.html",
    "/service-manual/technology/index.html",
    "/service-manual/digital-by-default-26-points/index.html",
    "/service-manual/operations/index.html",
    "/service-manual/user-researchers/index.html",
    "/service-manual/user-centred-design/resources/elements/index.html",
    "/service-manual/user-centred-design/resources/patterns/index.html",
    "/service-manual/user-centred-design/user-research/index.html",
    "/service-manual/user-centred-design/index.html",
    "/service-manual/themes/index.html",
    "/service-manual/phases/index.html",
    "/service-manual/cards/index.html",
    "/service-manual/assisted-digital/index.html",
    "/service-manual/performance-analysts/index.html",
    "/service-manual/start/index.html",
    "/service-manual/designers/index.html",
    "/service-manual/making-software/index.html",
    "/service-manual/identity-assurance/index.html",
    "/service-manual/service-managers/index.html",
    "/service-manual/content-designers/index.html",
    "/service-manual/technical-architects/index.html",

    "/service-manual/communications/index",
    "/service-manual/web-ops/index",
    "/service-manual/developers/index",
    "/service-manual/agile/index",
    "/service-manual/digital-by-default/index",
    "/service-manual/feedback/index",
    "/service-manual/governance/index",
    "/service-manual/chief-technology-officers/index",
    "/service-manual/measurement/index",
    "/service-manual/domain-names/index",
    "/service-manual/the-team/recruitment/index",
    "/service-manual/the-team/learning-and-development/index",
    "/service-manual/the-team/index",
    "/service-manual/browse/index",
    "/service-manual/technology/index",
    "/service-manual/digital-by-default-26-points/index",
    "/service-manual/operations/index",
    "/service-manual/user-researchers/index",
    "/service-manual/user-centred-design/resources/elements/index",
    "/service-manual/user-centred-design/resources/patterns/index",
    "/service-manual/user-centred-design/user-research/index",
    "/service-manual/user-centred-design/index",
    "/service-manual/themes/index",
    "/service-manual/phases/index",
    "/service-manual/cards/index",
    "/service-manual/assisted-digital/index",
    "/service-manual/performance-analysts/index",
    "/service-manual/start/index",
    "/service-manual/designers/index",
    "/service-manual/making-software/index",
    "/service-manual/identity-assurance/index",
    "/service-manual/service-managers/index",
    "/service-manual/content-designers/index",
    "/service-manual/technical-architects/index",
  ].freeze
end


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using Microsoft.VisualStudio.Text;
using Microsoft.VisualStudio.Text.Classification;
using Microsoft.VisualStudio.Text.Editor;
using Microsoft.VisualStudio.Text.Formatting;
using System.Windows.Media;
using System.ComponentModel.Composition;
using Microsoft.VisualStudio.Utilities;
using System.IO;
using EnvDTE;

namespace SketchTypingVSAddin
{
    /// <summary>
    /// Manages the image adornments in an instance of <see cref="IWpfTextView"/>
    /// </summary>
    internal class ImageAdornmentManager
    {
        private const string ImageAdornmentLayerName = "Intra Text Adornment";

        private IServiceProvider serviceProvider;
        private ImageAdornmentRepositoryService ImagesAdornmentsRepository { get; set; }
        internal IList<ImageAdornment> Images { get { return this.ImagesAdornmentsRepository.Images; } }

        internal HighlightLineAdornment HighlightLineAdornment { get; private set; }
        internal PreviewImageAdornment PreviewImageAdornment { get; private set; }
        internal IWpfTextView View { get; private set; }
        internal IAdornmentLayer AdornmentLayer { get; private set; }

        internal ImageAdornmentManager(IServiceProvider serviceProvider, IWpfTextView view, IEditorFormatMap editorFormatMap)
        {
            this.View = view;
            this.serviceProvider = serviceProvider;
            this.AdornmentLayer = this.View.GetAdornmentLayer(ImageAdornmentLayerName);

            this.ImagesAdornmentsRepository = new ImageAdornmentRepositoryService(view.TextBuffer);

            // Create the highlight line adornment
            this.HighlightLineAdornment = new HighlightLineAdornment(view, editorFormatMap);
            this.AdornmentLayer.AddAdornment(AdornmentPositioningBehavior.OwnerControlled, null, HighlightLineAdornment, HighlightLineAdornment.VisualElement, null);

            // Create the preview image adornment
            this.PreviewImageAdornment = new PreviewImageAdornment();
            this.AdornmentLayer.AddAdornment(AdornmentPositioningBehavior.OwnerControlled, null, this, this.PreviewImageAdornment.VisualElement, null);

            // Attach to the view events
            this.View.LayoutChanged += OnLayoutChanged;
            this.View.TextBuffer.Changed += OnBufferChanged;
            this.View.Closed += OnViewClosed;

            // Load and initialize the image adornments repository
            this.ImagesAdornmentsRepository.Load();
            this.ImagesAdornmentsRepository.Images.ToList().ForEach(image => InitializeImageAdornment(image));
        }

        private void OnViewClosed(object sender, EventArgs e)
        {
            // Save the image adornments
            this.ImagesAdornmentsRepository.Save();

            // Detach from the view events
            this.View.LayoutChanged -= OnLayoutChanged;
            this.View.TextBuffer.Changed -= OnBufferChanged;
            this.View.Closed -= OnViewClosed;
        }

        private void OnBufferChanged(object sender, TextContentChangedEventArgs e)
        {
            // Remove the image adornments if the associated spans were deleted.
            List<ImageAdornment> imagesToBeRemoved = new List<ImageAdornment>();
            foreach (ImageAdornment imageAdornment in this.ImagesAdornmentsRepository.Images)
            {
                Span span = imageAdornment.TrackingSpan.GetSpan(e.After);
                if (span.Length == 0)
                {
                    imagesToBeRemoved.Add(imageAdornment);
                }
            }

            imagesToBeRemoved.ForEach(imageAdornment => RemoveImageAdornment(imageAdornment));
        }

        private void OnLayoutChanged(object sender, TextViewLayoutChangedEventArgs e)
        {
            List<ImageAdornment> imageAdornmentsToBeShown = new List<ImageAdornment>();

            // Detect which images should be shown again based on the new or reformatted spans
            foreach (Span span in e.NewOrReformattedSpans)
            {
                imageAdornmentsToBeShown.AddRange(this.ImagesAdornmentsRepository.Images.Where(image => image.TrackingSpan.GetSpan(this.View.TextSnapshot).OverlapsWith(span)));
            }

            foreach (ImageAdornment imageAdornment in imageAdornmentsToBeShown)
            {
                SnapshotSpan imageSnaphotSpan = imageAdornment.TrackingSpan.GetSpan(this.View.TextSnapshot);
                // Get the text view line associated with the image span
                ITextViewLine newOrReformattedLine = e.NewOrReformattedLines.FirstOrDefault(line =>
                    line.ContainsBufferPosition(imageSnaphotSpan.Start) && line.ContainsBufferPosition(imageSnaphotSpan.End));
                if (newOrReformattedLine != null)
                {
                    // Use the top of the text view line to set image top location. And finally adjust the final location using the delta Y.
                    Canvas.SetTop(imageAdornment.VisualElement, newOrReformattedLine.Top + imageAdornment.TextViewLineDelta.Y);
                    Show(imageAdornment, newOrReformattedLine);
                }
            }
        }

        internal ITextViewLine GetTargetTextViewLine(UIElement uiElement)
        {
            if (this.View.TextViewLines == null)
                return null;

            return this.View.TextViewLines.GetTextViewLineContainingYCoordinate(Canvas.GetTop(uiElement));
        }

        internal ITextViewLine GetTargetTextViewLine(ImageAdornment imageAdornment)
        {
            if (this.View.TextViewLines == null)
                return null;

            return this.View.TextViewLines.GetTextViewLineContainingBufferPosition(imageAdornment.TrackingSpan.GetStartPoint(this.View.TextSnapshot));
        }

        /// <summary>
        /// Creates and adds an image adornment for the image.
        /// </summary>
        /// <param name="image"></param>
        /// <returns></returns>
        internal ImageAdornment AddImageAdornment(Image image)
        {
            ITextViewLine targetLine = GetTargetTextViewLine(image);

            if (targetLine != null && targetLine.Length > 0)
            {
                ImageAdornment imageAdornment = new ImageAdornment(
                    new SnapshotSpan(targetLine.Start, targetLine.Length),
                    image);

                // Initialize the image adornment
                InitializeImageAdornment(imageAdornment);

                // Add the image adornment to the repository
                ImagesAdornmentsRepository.Add(imageAdornment);
                ImagesAdornmentsRepository.EnsureRepositoryFileExists();

                // Add the repository file to the solution explorer
                AddFileToTheActiveDocument(this.ImagesAdornmentsRepository.RepositoryFilename);

                // Show the image
                Show(imageAdornment);

                DisplayTextViewLine(imageAdornment);

                return imageAdornment;
            }

            return null;
        }

        /// <summary>
        /// Adds the file as a child of the active document.
        /// </summary>
        /// <param name="filename"></param>
        internal void AddFileToTheActiveDocument(string filename)
        {
            if (!string.IsNullOrEmpty(filename) && File.Exists(filename))
            {
                if (this.serviceProvider != null)
                {
                    DTE vs = this.serviceProvider.GetService(typeof(DTE)) as DTE;
                    if (vs != null && vs.ActiveDocument != null)
                    {
                        ProjectItem projectItem = vs.ActiveDocument.ProjectItem.ProjectItems.AddFromFile(filename);
                        if (projectItem != null)
                        {
                            Property buildActionProperty = projectItem.Properties.Item("BuildAction");
                            if (buildActionProperty != null)
                            {
                                buildActionProperty.Value = 0;
                            }
                        }
                    }
                }
            }
        }

        private void InitializeImageAdornment(ImageAdornment imageAdornment)
        {
            imageAdornment.VisualElement.MouseMove += new MouseEventHandler(OnAdornmentVisualElementMouseMove);
            imageAdornment.VisualElement.MouseLeftButtonDown += new MouseButtonEventHandler(OnAdornmentVisualElementMouseLeftButtonDown);
            imageAdornment.VisualElement.MouseLeftButtonUp += new MouseButtonEventHandler(OnAdornmentVisualElementMouseLeftButtonUp);
            imageAdornment.VisualElement.MouseLeave += new MouseEventHandler(OnAdornmentVisualElementMouseLeave);
//            imageAdornment.VisualElement.Deleted += new EventHandler(OnAdornmentVisualElementDeleted);
  //          imageAdornment.VisualElement.Resizing += new EventHandler(OnImageAdornmentResizing);
        }

        private void OnAdornmentVisualElementDeleted(object sender, EventArgs e)
        {
    //        EditorImage visualElement = sender as EditorImage;
      //      ImageAdornment imageAdornment = visualElement.Tag as ImageAdornment;

        //    RemoveImageAdornment(imageAdornment);

        }

        private void RemoveImageAdornment(ImageAdornment imageAdornment)
        {
            this.ImagesAdornmentsRepository.Remove(imageAdornment);
            this.AdornmentLayer.RemoveAdornment(imageAdornment.VisualElement);
        }

        private void OnAdornmentVisualElementMouseMove(object sender, MouseEventArgs e)
        {
            FrameworkElement visualElement = sender as FrameworkElement;
            ImageAdornment imageAdornment = visualElement.Tag as ImageAdornment;

            if (e.LeftButton == MouseButtonState.Pressed)
            {
                // Move the image adornment
            //    if (!imageAdornment.VisualElement.IsResizing && !this.ImagesAdornmentsRepository.Images.ToList().Exists(image => image != imageAdornment && image.VisualElement.IsMoving))
                {
                    imageAdornment.VisualElement.IsMoving = true;

                    Point adjustedPosition = e.GetPosition(this.View.VisualElement);
                    adjustedPosition.X += this.View.ViewportLeft - (imageAdornment.VisualElement.Width / 2);
                    adjustedPosition.Y += this.View.ViewportTop - (imageAdornment.VisualElement.Height / 2);

                    this.AdornmentLayer.RemoveAdornmentsByTag(imageAdornment);

                    imageAdornment.VisualElement.Opacity = PreviewImageAdornment.PreviewOpacity;
                    imageAdornment.VisualElement.MoveTo(adjustedPosition);

                    Show(imageAdornment);

                    this.HighlightLineAdornment.Highlight(GetTargetTextViewLine(imageAdornment));
                }
            }

            e.Handled = true;
        }

        private void OnAdornmentVisualElementMouseLeave(object sender, MouseEventArgs e)
        {
            FrameworkElement visualElement = sender as FrameworkElement;
            ImageAdornment imageAdornment = visualElement.Tag as ImageAdornment;
            imageAdornment.VisualElement.Opacity = 1;
            imageAdornment.VisualElement.IsMoving = false;
            this.HighlightLineAdornment.Clear();
        }

        private void OnAdornmentVisualElementMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            FrameworkElement visualElement = sender as FrameworkElement;
            ImageAdornment imageAdornment = visualElement.Tag as ImageAdornment;
            this.HighlightLineAdornment.Highlight(GetTargetTextViewLine(imageAdornment));
            e.Handled = true;
        }

        private void OnAdornmentVisualElementMouseLeftButtonUp(object sender, MouseButtonEventArgs e)
        {
            FrameworkElement visualElement = sender as FrameworkElement;
            ImageAdornment imageAdornment = visualElement.Tag as ImageAdornment;
            imageAdornment.VisualElement.Opacity = 1;
            this.HighlightLineAdornment.Clear();
            this.DisplayTextViewLine(imageAdornment);
        }

        private void Show(ImageAdornment imageAdornment)
        {
            Show(imageAdornment, GetTargetTextViewLine(imageAdornment));
        }

        private void Show(ImageAdornment imageAdornment, ITextViewLine targetTextViewLine)
        {
            if (targetTextViewLine != null)
            {
                // Update the line delta
                imageAdornment.TextViewLineDelta = new Point(imageAdornment.VisualElement.Left - targetTextViewLine.Left, imageAdornment.VisualElement.Top - targetTextViewLine.Top);
            }

            this.AdornmentLayer.RemoveAdornmentsByTag(imageAdornment);
            this.AdornmentLayer.AddAdornment(AdornmentPositioningBehavior.TextRelative, imageAdornment.TrackingSpan.GetSpan(this.View.TextSnapshot), imageAdornment, imageAdornment.VisualElement, null);

            UpdateTargetLocation(imageAdornment);
        }

        private void OnImageAdornmentResizing(object sender, EventArgs e)
        {
            if (this.View.TextViewLines != null)
            {
                EditorImage editorImage = sender as EditorImage;
                ImageAdornment imageAdornment = editorImage.Tag as ImageAdornment;
                DisplayTextViewLine(imageAdornment);
            }
        }

        private void DisplayTextViewLine(ImageAdornment imageAdornment)
        {
            ITextViewLine textViewLine = this.View.TextViewLines.FirstOrDefault(line => imageAdornment.ApplyRenderTrackingPoint(this.View.TextSnapshot, line));

            if (textViewLine != null)
            {
                this.View.DisplayTextLineContainingBufferPosition(textViewLine.Start, textViewLine.Top, ViewRelativePosition.Top);
            }
            else
            {
				this.View.DisplayTextLineContainingBufferPosition(new SnapshotPoint(this.View.TextSnapshot, 0), 0.0, ViewRelativePosition.Top);
            }
        }

        private void UpdateTargetLocation(ImageAdornment imageAdornment)
        {
            imageAdornment.RenderTrackingPoint = null;

            foreach (ITextViewLine line in this.View.TextViewLines)
            {
                Rect lineArea = new Rect(line.Left, line.Top, line.Width, line.Height);
                Rect imageAdornmentArea = Rect.Empty;// imageAdornment.VisualElement.Area;
                // Use the height half to be able to move the image up and down
                imageAdornmentArea.Height = imageAdornmentArea.Height / 2;

                if (line.Length > 0 && lineArea.IntersectsWith(imageAdornmentArea))
                {
                    imageAdornment.RenderTrackingPoint = this.View.TextSnapshot.CreateTrackingPoint(line.Start.Position, PointTrackingMode.Negative);
                    imageAdornment.UpdateTrackingSpan(line);

                    return;
                }
            }
        }
    }
}


text:
package com.ztiany.register.service;

import com.ztiany.register.domain.User;
import com.ztiany.register.exception.UserExistException;

public interface BusinessService {

    /**
     * 完成用户信息注册
     *
     * @param user 用户
     * @throws UserExistException 用户名已经存在了
     */
    void register(User user) throws UserExistException;

    /**
     * 完成用户的登录
     *
     * @param username 用户名
     * @param password 密码
     * @return 错误的用户名或密码,返回null
     */
    User login(String username, String password);
}


text:
module Datetimepicker
  module Core
    VERSION = "1.0.0"
  end
end


text:
"""This code example creates a new native creative for a given advertiser.

To determine which companies are advertisers, run get_advertisers.py.

The code in this example will use app data from the Google sample app
'Pie Noon':

https://play.google.com/store/apps/details?id=com.google.fpl.pie_noon&hl=en

The LoadFromStorage method is pulling credentials and properties from a
"googleads.yaml" file. By default, it looks for this file in your home
directory. For more information, see the "Caching authentication information"
section of our README.
"""

import uuid
from urllib.request import urlopen

# Import appropriate modules from the client library.
from googleads import ad_manager

# Set id of the advertiser (company) that the creative will be assigned to.
ADVERTISER_ID = 'INSERT_ADVERTISER_ID_HERE'
ICON_URL = ('https://lh4.ggpht.com/GIGNKdGHMEHFDw6TM2bgAUDKPQQRIReKZPqEpMeEhZO'
            'PYnTdOQGaSpGSEZflIFs0iw=h300')
APP_ICON_SMALL = ('https://lh6.ggpht.com/Jzvjne5CLs6fJ1MHF-XeuUfpABzl0YNMlp4Rp'
                  'HnvPRCIj4--eTDwtyouwUDzVVekXw=w300')

def main(client, advertiser_id):
  # Initialize appropriate service.
  creative_service = client.GetService('CreativeService', version='v202208')

  # Use the system defined native app install creative template.
  creative_template_id = '10004400'

  image_data = urlopen(ICON_URL).read()

  app_icon_data = urlopen(APP_ICON_SMALL).read()

  # Create creative from templates.
  creative = {
      'xsi_type': 'TemplateCreative',
      'name': 'Native Creative #%s' % uuid.uuid4(),
      'advertiserId': advertiser_id,
      'size': {'width': '1', 'height': '1', 'isAspectRatio': False},
      'creativeTemplateId': creative_template_id,
      'destinationUrl': ('https://play.google.com/store/apps/details?id='
                         'com.google.fpl.pie_noon'),
      'creativeTemplateVariableValues': [
          {
              'xsi_type': 'AssetCreativeTemplateVariableValue',
              'uniqueName': 'Image',
              'asset': {
                  'assetByteArray': image_data,
                  'fileName': 'file%s.png' % uuid.uuid4()
              }
          },
          {
              'xsi_type': 'AssetCreativeTemplateVariableValue',
              'uniqueName': 'Appicon',
              'asset': {
                  'assetByteArray': app_icon_data,
                  'fileName': 'appicon%s.png' % uuid.uuid4()
              }
          },
          {
              'xsi_type': 'StringCreativeTemplateVariableValue',
              'uniqueName': 'Price',
              'value': 'Free'
          },
          {
              'xsi_type': 'StringCreativeTemplateVariableValue',
              'uniqueName': 'Calltoaction',
              'value': 'Install'
          },
          {
              'xsi_type': 'StringCreativeTemplateVariableValue',
              'uniqueName': 'Starrating',
              'value': '4'
          },
          {
              'xsi_type': 'StringCreativeTemplateVariableValue',
              'uniqueName': 'Store',
              'value': 'Google Play'
          },
          {
              'xsi_type': 'UrlCreativeTemplateVariableValue',
              'uniqueName': 'DeeplinkclickactionURL',
              'value': 'market://details?id=com.google.fpl.pie_noon'
          },
          {
              'xsi_type': 'StringCreativeTemplateVariableValue',
              'uniqueName': 'Body',
              'value': 'Try multi-screen mode!'
          },
          {
              'xsi_type': 'StringCreativeTemplateVariableValue',
              'uniqueName': 'Headline',
              'value': 'Pie Noon'
          }
      ]
  }

  # Call service to create the creative.
  creative = creative_service.createCreatives([creative])[0]

  # Display results.
  print('Native creative with id "%s" and name "%s" was '
        'created and can be previewed at %s.'
        % (creative['id'], creative['name'], creative['previewUrl']))

if __name__ == '__main__':
  # Initialize client object.
  ad_manager_client = ad_manager.AdManagerClient.LoadFromStorage()
  main(ad_manager_client, ADVERTISER_ID)


text:
#define SEQAN_PROFILE

#include <iostream>
#include <sstream>
#include <fstream>

// load command line parser
#include <seqan/misc/misc_cmdparser.h>

#include <seqan/store.h>

#include "utils.h"
#include "assembly_parser.h"
#include "column_scanner.h"
#include "rgraph.h"

using namespace seqan;
using namespace std;

void _makeParser(CommandLineParser & parser)
{
    // needed input file
    //addOption(parser,CommandLineOption('a',"afg","filename of the afg assembly file",(OptionType::String | OptionType::Mandatory ) ));

    addOption(parser, CommandLineOption("a", "assembly", "input assembly filename", (OptionType::String | OptionType::Mandatory ) ));
    addHelpLine(parser, "Currently supported input formats are afg (AMOS message format)");
    addOption(parser,CommandLineOption("c","contig","(zero based) number of the contig in the assembly that should be analyzed, default is 0",OptionType::Int ));
    addOption(parser,CommandLineOption("n","copy-number","number of compressed repeat copies in the given contig (default is 2)",OptionType::Int ));
    addHelpLine(parser, "");

    addOption(parser,CommandLineOption("","no-clean","do not clean the graph",OptionType::Boolean));
    addOption(parser,CommandLineOption("","dotfile","write constructed graph as dotfile to visualize in Graphviz",OptionType::Boolean));
    addHelpLine(parser, "");

    addOption(parser,CommandLineOption("p","output-prefix","filename prefix for the result files.",(OptionType::String | OptionType::Mandatory ) ));
    addHelpLine(parser, "Files for the ILP and the Result will be named PREFIX.(lp|rs|dot|heu)");
    // only needed for Gunnar
    //addHelpLine(parser, "");
    //addOption(parser,CommandLineOption(' ',"side-chain-format","reformulate the problem into the side-chain positioning problem",OptionType::Boolean));

    addSection(parser, "Column Detection Strategy");
    addOption(parser, CommandLineOption("d","dnp", "use DNP strategy for column detection [DEFAULT]",OptionType::Boolean));
    addOption(parser, CommandLineOption("s","simple-columns", "use the simple (normal distributed) column detection strategy",OptionType::Boolean));
    addOption(parser, CommandLineOption("e","error", "expected sequencing error (is only used in combination with simple strategy)", OptionType::Double));
    //addHelpLine(parser, "The default is DNP");

    addSection(parser, "Heuristic selection");
    addOption(parser, CommandLineOption("","hpcm", "try to solve the problem with the multi-component-expansion (mce) heuristic [DEFAULT]",OptionType::Boolean));
    addOption(parser, CommandLineOption("","hsce", "try to solve the problem with the single-component-expansion (sce) heuristic",OptionType::Boolean));
    //addHelpLine(parser, "The default is hpcm");

    addTitleLine(parser,"***********************************************");
    addTitleLine(parser,"***                 RepSep                  ***");
    addTitleLine(parser,"***          (c) Stephan Aiche 2009         ***");
    addTitleLine(parser,"***********************************************");

    addUsageLine(parser, "[OPTION]... --assembly <input file> --output-prefix <prefix>");
}

int main(int argc, const char *argv[])
{
    CommandLineParser parser;
    addVersionLine(parser, "RepSep version 0.1 20090723");
    _makeParser(parser);

    if (argc == 1)
    {
        shortHelp(parser, cerr);	// print short help and exit
        return 0;
    }

    bool stop = !parse(parser, argc, argv, cerr);

    if (isSetLong(parser, "help") || isSetLong(parser, "version") || stop) return 0;	// print help or version and exit

    // print some hello text
    version(parser);

    // run starts
    SEQAN_PROTIMESTART(profileTime);

    typedef FragmentStore<> TFragmentStore;
    typedef Size<TFragmentStore>::Type TSize;
    TFragmentStore fragStore;

    CharString assembly_filename;
    getOptionValueLong(parser, "assembly", assembly_filename);

    cout << "loading data from " << assembly_filename << " .. " << flush;

    TSize numberOfContigs = 0;
    // TSize numberOfReads = 0;

    FILE* strmReads = fopen(toCString(assembly_filename), "rb");
    read(strmReads, fragStore, Amos());
    fclose(strmReads);
    numberOfContigs = length(fragStore.contigStore);
    // numberOfReads = length(fragStore.readStore);

    cout << "done (" << SEQAN_PROTIMEUPDATE(profileTime) << " seconds)" << endl;

    /*
    cout << endl << "------------------------------- " << endl;
    cout << "stats: " << endl;
    cout << "number of contigs: " << numberOfContigs << endl;
    cout << "number of reads:   " << numberOfReads << endl;
    cout << "------------------------------- " << endl;
    */
    int selected_contig = 0;
    getOptionValueLong(parser, "contig", selected_contig);

    if(! (static_cast<TSize>(selected_contig) < numberOfContigs) ) {
        cout << "You have selected an invalid contig! Only " << numberOfContigs << " different contig(s) were found" << endl;
        cout << "in the currently assembly" << endl;
        return 1;
    }

    cout << "#INFO: you have selected contig nr. " << selected_contig << endl;

    // construct matrix for parsing
    typedef char TAlpahbet;
    typedef Id<TFragmentStore::TAlignedReadStore>::Type TId;
    typedef Size<TFragmentStore::TReadSeq>::Type TReadPos;

    typedef Triple<TAlpahbet,TId,TReadPos> TMatrixValue;
    typedef String<TMatrixValue> TMatrix;

    TMatrix matrix;
    typedef Triple<char, TId, TReadPos> TColumnAlphabet;
    typedef String<TColumnAlphabet> TCandidateColumn;
    typedef Pair<TReadPos, TCandidateColumn> TAnnotatedCandidateColumn;
    String<TAnnotatedCandidateColumn> candidates;

    SEQAN_PROTIMEUPDATE(profileTime);
    cout << "parsing contig for candidate columns .. " << flush;

    // TODO: add code for selection of scanner
    parseContig(fragStore, selected_contig, candidates, SimpleColumn());

    for(TSize x = 0 ; x < length(candidates) ; ++x)
    {
      cout << candidates[x].i1 << endl;
    }

    cout << "done (" << SEQAN_PROTIMEUPDATE(profileTime) << " seconds)" << endl;
    cout << "#INFO: <" << length(candidates) << "> possible candidate columns were identified" << endl;

    ReadGraph<TColumnAlphabet, Value<TFragmentStore::TAlignedReadStore>::Type, TReadPos > rgraph;

    cout << "adding candidates to graph .. " << flush;
    construct(rgraph, candidates, fragStore, selected_contig);
    cout << "done (" << SEQAN_PROTIMEUPDATE(profileTime) << " seconds)" << endl;

    cout << "adding mate pairs to graph .. " << flush;
    add_mate_pairs(rgraph, fragStore, selected_contig);
    cout << "done (" << SEQAN_PROTIMEUPDATE(profileTime) << " seconds)" << endl;

    GraphScoring scoring_scheme;

    cout << "compute scores for graph edges .. " << flush;
    scoreGraph_(rgraph, fragStore, static_cast<TSize>( selected_contig ), scoring_scheme);
    cout << "done (" << SEQAN_PROTIMEUPDATE(profileTime) << " seconds)" << endl;

    if(!isSetLong(parser, "no-clean") )
    {
        cout << "cleaning graph .. " << flush;
        // TODO: cleaning needs to be implemented
        cout << "done (" << SEQAN_PROTIMEUPDATE(profileTime) << " seconds)" << endl;
    }
    else
    {
        cout << "#INFO: skipped graph cleaning" << endl;
    }

    cout << "analyzing constructed graph .. " << flush;
    bool hasMultiComp = hasMultipleComponents(rgraph);
    cout << "done (" << SEQAN_PROTIMEUPDATE(profileTime) << " seconds)" << endl;

    if(hasMultiComp) {
        cout << "This graph has multiple components!!" << endl;
    }

    // TODO: add some statistics for the graph
    cout << endl << "################ graph info ################" << endl;

    cout << " |edges| " << numEdges(rgraph) << endl;
    cout << " |vertices| " << numVertices(rgraph) << endl;

    cout << "############################################" << endl << endl << flush;

    // TODO: implement heurisitics
    typedef Graph_< ReadGraph<TColumnAlphabet, Value<TFragmentStore::TAlignedReadStore>::Type, TReadPos > >::Type TGraph;
    typedef VertexDescriptor<TGraph>::Type TVertexDescriptor;

    typedef String<TVertexDescriptor> TComponent;
    typedef String<TComponent> TComponentList;

    TComponentList components;

    int copy_number = 0;
    getOptionValueLong(parser, "copy-number", copy_number);

    if(isSetLong(parser, "hpcm"))
    {
      cout << "separate the graph using (GuidedParallelComponentMerge) .. " << flush;
      solve(rgraph,components,copy_number,GuidedParallelComponentMerge());
      cout << "done (" << SEQAN_PROTIMEUPDATE(profileTime) << " seconds)" << endl;
    }
    else
    {
      cout << "separate the graph using (SingleComponentExpansion) .. " << flush;
      solve(rgraph,components,copy_number,SingleComponentExpansion());
      cout << "done (" << SEQAN_PROTIMEUPDATE(profileTime) << " seconds)" << endl;
    }

    for(TSize c = 0 ; c < length(components) ; ++c)
    {
      cout << "Component <" << c << "> contains " << length(components[c]) << " reads " << endl;
      for(TSize r = 0 ; r < length(components[c]) ; ++r)
      {
        cout << value(rgraph.vertexCargo,components[c][r]).alignedRead.readId << " (" << fragStore.readNameStore[value(rgraph.vertexCargo,value(components[c],r)).alignedRead.readId] << ")" << endl;
      }
    }
    // TODO: implement IO stuff
}