text:
package ch.ntb.inf.deep.ssa;

import ch.ntb.inf.deep.cfg.CFG;
import ch.ntb.inf.deep.cfg.CFGNode;
import ch.ntb.inf.deep.classItems.ICclassFileConsts;
import ch.ntb.inf.deep.host.StdStreams;
import ch.ntb.inf.deep.ssa.instruction.SSAInstruction;

public class SSA implements ICclassFileConsts, SSAInstructionOpcs {
	private static final boolean dbg = false;
	public CFG cfg;
	public int nofLoopheaders;
	public boolean isParam[]; // indicates which locals are passed as parameters
	public int paramType[]; // types of those parameters
	public LineNrSSAInstrPair[] lineNumTab; // length equals line number table length in class file, entries are sorted by bca
	public int highestLineNr;
	public int lowestLineNr;
	private int returnCount;
	private SSANode returnNodes[];
	private SSANode loopHeaders[];
	private SSANode sortedNodes[];
	private int nofSortedNodes;

	public SSA(CFG cfg) {
		this.cfg = cfg;
		int nofNodes = cfg.getNumberOfNodes();
		loopHeaders = new SSANode[nofNodes];
		sortedNodes = new SSANode[nofNodes];
		returnNodes = new SSANode[4];

		if (dbg) StdStreams.vrb.println("generate ssa for " + cfg.method.owner.name + "." + cfg.method.name);

		findParameters();	// fills parameter array
		sortNodes((SSANode)cfg.rootNode);

		if (dbg) {
			StdStreams.vrb.print("Node order: ");
			for (int i = 0; i < nofSortedNodes - 1; i++){
				StdStreams.vrb.print("[" + sortedNodes[i].firstBCA + ":"+ sortedNodes[i].lastBCA + "], ");
			}
			StdStreams.vrb.println("[" + sortedNodes[nofSortedNodes-1].firstBCA + ":"+ sortedNodes[nofSortedNodes-1].lastBCA + "]");
			if (isParam.length > 0){
				StdStreams.vrb.println("IsParam");
				StdStreams.vrb.print("[ ");
				for (int i = 0; i < isParam.length - 1; i++) {
					StdStreams.vrb.print(isParam[i] + ", ");
				}
				StdStreams.vrb.println(isParam[isParam.length - 1] + " ]");
			}

		}

		// visit all
		for (int i = 0; i < nofSortedNodes; i++) {
			SSANode node = sortedNodes[i];
			node.owner = this;
			node.merge();
			node.traversCode();	// translate bytecode into ssa instructions
		}
		if (dbg) StdStreams.vrb.println(toString());

		// visit loop headers again
		for (int i = 0; i < nofLoopheaders; i++) {
			SSANode node = loopHeaders[i];
			node.addOpdsToPhiFunctions();
		}

		// clean up phi-functions
		for (int i = 0; i < nofSortedNodes; i++) {
			SSANode node = sortedNodes[i];
			if (!node.isLoopHeader()){
				node.eliminateRedundantPhiFunc();
			}
		}

		// clean up phi-functions in loop headers
		for (int i = 0; i < nofLoopheaders; i++) {
			loopHeaders[i].eliminateRedundantPhiFunc();
		}

		// if the method has multiple return statements, check if all required parameters are loaded in the last node
		if (returnCount > 1) {
			int nofParams = cfg.method.nofParams;
			if ((cfg.method.accAndPropFlags & (1<<apfStatic)) == 0) {	// instance method
				nofParams++;	// add parameter "this"
			}
			if (nofParams > 0){
				//search last node
				SSANode last = null;
				for (int i = 0;  i < returnCount; i++) {
					if (last == null) {
						last = returnNodes[i];
					} else if (last.firstBCA < returnNodes[i].firstBCA) {
						last = returnNodes[i];
					}
				}
				for (int x = 0; x < nofParams; x++) {
					boolean isNeeded = false;
					for (int i = 0; i < returnCount && !isNeeded; i++) {
						if (returnNodes[i].exitSet[cfg.method.maxStackSlots + x] != null) {
							isNeeded = true;
						}
					}
					if (isNeeded){
						last.loadParameter(cfg.method.maxStackSlots + x, paramType[cfg.method.maxStackSlots + x]);
					}

				}
			}
		}
		renumberInstructions(cfg);
		createLineNrSSATable();
//		if (true) StdStreams.vrb.println(cfg.toString());
//		if (true) StdStreams.vrb.println(toString());
	}

	/**
	 * Sort ssa nodes starting with @param node.
	 * Adds loop headers to array of loop headers
	 */
	private void sortNodes(SSANode node) {
		if (node.traversed) return;	// already processed
		if (node.nofPredecessors > 0) {
			if (node.isLoopHeader()) {
				if (node.idom != null) sortNodes((SSANode) node.idom);
				if (!node.traversed) {	// must be ckecked, as traversed might be set by recursive call
					loopHeaders[nofLoopheaders++] = node;	// put into loop header list
					sortedNodes[nofSortedNodes++] = node;
				}
			} else {
				for (int i = 0; i < node.nofPredecessors; i++) {
					sortNodes((SSANode) node.predecessors[i]);
				}
				if (!node.traversed) sortedNodes[nofSortedNodes++] = node;
			}
		} else {
			if (!node.traversed) sortedNodes[nofSortedNodes++] = node;
		}
		node.traversed = true;
		for (int i = 0; i < node.nofSuccessors; i++) {
			sortNodes((SSANode) node.successors[i]);
		}
	}

	/**
	 * @return array with all SSA nodes of this ssa
	 */
	public SSANode[] getNodes() {
		SSANode current = (SSANode) this.cfg.rootNode;
		SSANode[] nodes = new SSANode[this.getNofNodes()];
		for (int i = 0; i < nodes.length; i++){
			nodes[i] = current;
			current = (SSANode)current.next;
		}
		return nodes;
	}

	/**
	 * @return nof SSA nodes in this ssa
	 */
	public int getNofNodes() {
		int count = 0;
		CFGNode current = this.cfg.rootNode;
		while(current != null){
			count++;
			current = current.next;
		}
		return count;
	}

	/**
	 * Renumber all the instructions in the SSA before computing live intervals
	 * @return nof SSA instructions in method
	 */
	public static int renumberInstructions(CFG cfg) {
		int counter = 0;
		SSANode b = (SSANode) cfg.rootNode;
		while (b != null) {
			for (int i = 0; i < b.nofPhiFunc; i++) {
				b.phiFunctions[i].result.n = counter++;
			}
			for (int i = 0; i < b.nofInstr; i++) {
				assert b.instructions[i] != null;
				b.instructions[i].result.n = counter++;
			}
			b = (SSANode) b.next;
		}
		return counter;
	}

	/**
	 * Determines which entries in the state array are parameters (isParam[])
	 * together with their types (paramType[]).
	 */
	private void findParameters() {
		String descriptor = cfg.method.methDescriptor.toString();
		int index = cfg.method.maxStackSlots;
		isParam = new boolean[cfg.method.maxStackSlots + cfg.method.maxLocals];
		paramType = new int[cfg.method.maxStackSlots + cfg.method.maxLocals];
		int flags = cfg.method.accAndPropFlags;
		if ((flags & (1<<apfStatic)) == 0) {	// instance method, add parameter "this"
			isParam[index] = true;
			paramType[index++] = SSAValue.tRef;
		}

		char ch = descriptor.charAt(1);
		for (int i = 1;ch != ')'; i++) {//traverse only between (....);
			isParam[index] = true;
			if (ch == '[') {
				while(ch == '[') {
					i++;
					ch = descriptor.charAt(i);
				}
				paramType[index++] = (decodeFieldType(ch) & 0x7fffffff) + 10;//+10 is for Arrays
			} else {
				paramType[index] = decodeFieldType(ch);
				if (paramType[index]== SSAValue.tLong || paramType[index] == SSAValue.tDouble) index +=2;
				else index++;
			}
			if (ch == 'L') {
				while (ch != ';') {
					i++;
					ch = descriptor.charAt(i);
				}
			}
			ch = descriptor.charAt(i+1);
		}
	}

	public int decodeFieldType(char character){
		int type;;
		switch(character){
		case 'B':
			type = SSAValue.tByte | (1 <<SSAValue.ssaTaFitIntoInt);
			break;
		case 'C':
			type = SSAValue.tChar | (1 <<SSAValue.ssaTaFitIntoInt);
			break;
		case 'D':
			type = SSAValue.tDouble;
			break;
		case 'F':
			type = SSAValue.tFloat;
			break;
		case 'I':
			type = SSAValue.tInteger | (1 <<SSAValue.ssaTaFitIntoInt);
			break;
		case 'J':
			type = SSAValue.tLong;
			break;
		case 'L':
			type = SSAValue.tRef;
			break;
		case 'S':
			type = SSAValue.tShort | (1 <<SSAValue.ssaTaFitIntoInt);
			break;
		case 'Z':
			type = SSAValue.tBoolean | (1 <<SSAValue.ssaTaFitIntoInt);
			break;
		default:
			type = SSAValue.tVoid;
			break;
		}
		return type;
	}

	/**
	 * Adds node to array containing all nodes with return instruction at the end
	 */
	void countAndRegisterReturnNodes(SSANode node) {
		if (returnCount >= returnNodes.length) {
			SSANode[] temp = new SSANode[2*returnNodes.length];
			for (int i = 0; i < returnCount; i++) temp[i] = returnNodes[i];
			returnNodes = temp;
		}
		returnNodes[returnCount++] = node;
	}

	private void createLineNrSSATable() {
		int[] origTab = cfg.method.lineNrTab;
		if (origTab != null) {
			lineNumTab = new LineNrSSAInstrPair[origTab.length];
			SSANode node = (SSANode) cfg.rootNode;
			for (int n = 0; n < origTab.length; n++) {
				int pc = (origTab[n] >> 16) & 0xFFFF;
				if (pc == 0) {
					lineNumTab[n] = new LineNrSSAInstrPair(pc, origTab[n] & 0xFFFF, node.instructions[0]);
					setHighestLowestLineNr(origTab[n] & 0xFFFF);
				} else {
					while (node != null) {
						int i = 0;
						while (i < node.nofInstr && pc > node.instructions[i].bca) i++;
						if (i < node.nofInstr) {
							if (pc == node.instructions[i].bca)
								lineNumTab[n] = new LineNrSSAInstrPair(pc, origTab[n] & 0xFFFF, node.instructions[i]);
							else if (i > 0 && pc == node.instructions[i-1].bca)
								lineNumTab[n] = new LineNrSSAInstrPair(pc, origTab[n] & 0xFFFF, node.instructions[i-1]);
							else
								lineNumTab[n] = new LineNrSSAInstrPair(pc, origTab[n] & 0xFFFF, node.instructions[i]);
							setHighestLowestLineNr(origTab[n] & 0xFFFF);
							break;

						}
						node = (SSANode) node.next;
					}
				}
			}
		}
	}

	public LineNrSSAInstrPair[] getLineNrTable() {
		return lineNumTab;
	}

	/**
	 * returns the SSA instruction which was generated by a certain Bytecode instruction with address bca
	 */
	public SSAInstruction searchBca(int bca) {
		SSANode node = (SSANode)cfg.rootNode;
		while (node != null) {
			SSAInstruction instr = node.searchBca(bca);
			if (instr != null) return instr;
			node = (SSANode) node.next;
		}
		return null;
	}

	private void setHighestLowestLineNr(int lineNr) {
		if (highestLineNr < 1) { // no lineNr is set before
			highestLineNr = lineNr;
			lowestLineNr = lineNr;
		}
		if (highestLineNr < lineNr)	highestLineNr = lineNr;
		if (lineNr < lowestLineNr) lowestLineNr = lineNr;
	}

	public void printLineNumTab() {
		StdStreams.vrb.println("lineNumTab.length=" + lineNumTab.length);
		for (int i = 0; i < lineNumTab.length && lineNumTab[i] != null; i++) StdStreams.vrb.println(lineNumTab[i].toString());
	}

	public String toString() {
		StringBuilder sb = new StringBuilder();
		SSANode node = (SSANode) this.cfg.rootNode;

		sb.append("SSA for Method: " + cfg.method.owner.name + "." + cfg.method.name + cfg.method.methDescriptor + "\n");
		SSA.renumberInstructions(cfg);

		while (node != null) {
			sb.append(node.toString() + "\n");
			node = (SSANode) node.next;
		}
		return sb.toString();
	}

}


text:
layout:     post
title:      "3. Planning by Dynamic Programming"
subtitle:   ""
date:       2018-05-03 12:00:00
author:     "Kartik Kaul"
header-img: "img/net.jpg"
categories: 7.Reinforcement_Learning
---

<iframe src="https://drive.google.com/file/d/1gzf8biNgt5YdX3e3L74AfiAPLv-wEF8v/preview" width="720" height="720"></iframe>

redpajama_set_name: RedPajamaGithub


text:
<TITLE>Review for Instinct (1999)</TITLE>
<LINK REL="STYLESHEET" TYPE="text/css" HREF="/ramr.css">

Instinct (1999)

reviewed by
Greg King

INSTINCT (M).
(Touchstone/Buena Vista International)
Director: Jon Turteltaub
Stars: Anthony Hopkins, Cuba Gooding jr, Donald Sutherland, Maura
Tierney, George Dzundza, John
Ashton, John Aylward, Thomas Q Morris, Paul Bates.

Silence Of The Gorillas?

In a role that can be considered a warm up rehearsal before
reprising his famous character of suave serial cannibal Hannibal
Lecter, Anthony Hopkins plays Ethan Powell, a renowned anthropologist
accused of murder.  For many years, Powell has lived amongst the
renowned silver back gorillas of Rwanda, observing them.  For some
reason this male equivalent of Dian Fossey snaps and brutally murders
two men.  Imprisoned in a hell hole in Rwanda, he has refused to speak
to anyone for two years.  This enigmatic scientist is then extradited
back to America, and imprisoned while awaiting an evaluation to
determine his competency to stand trial.

Eager young psychiatry student Theo Caulder (Cuba Gooding jr)
is assigned the task of breaking through the doctor's reticence and
silence and determining what happened in the jungles of Rwanda.
Powell challenges Caulder's perception of the world around him, and
somehow turns the tables on the fledgling psychiatrist.  He also
inspires Caulder to introduce a number of changes to the oppressive
prison system that negates the authority and abusive power of the
wardens and guards.  Instinct is a taut and occasionally riveting
psychological thriller that has its flaws.  Written by Gerald DiPego
(Phenomenon, etc), the film combines elements of Silence Of The Lambs,
Gorillas In The Mist and One Flew Over The Cuckoo's Nest with many of
the clichés of the prison movie.
 The plot is predictable, and the script is further let down by some
one dimensional characterisation and some clichéd dialogue.
However, Jon Turteltaub (Phenomenon, etc) directs the material with an
assurance that glosses over some of these flaws.  Some scenes bristle
with an almost palpable tension.  Hopkins and Gooding generate enough
sparks in their confrontations to bring some energy and a touch of
class to the film.  Hopkins is superb although he delivers a mannered
performance as the tormented scientist.  Scene stealer Gooding more
than holds his own here and delivers his usual polished performance.
Maura Tierney (Liar Liar, etc) has little to do as Powell's estranged
daughter, but she adds a touch of dignity and sympathy to her
performance.  Donald Sutherland plays Caulder mentor, a stereotyped
role that has almost become a staple of his repertoire.

***
greg king
http://www.netau.com.au/gregking

The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).

The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.

Please direct comments/criticisms of the review to relevant newsgroups.

Broken URLs inthe reviews are the responsibility of the author.

The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.

Related links: index of all rec.arts.movies.reviews reviews


text:
/*
 *  xml2h.cpp
 *  $Id$
 *
 *  Author
 *  Roman Juranek <ijuranek@fit.vutbr.cz>
 *
 *  Graph@FIT
 *  Department of Computer Graphics and Multimedia
 *  Faculty of Information Technology
 *  Brno University of Technology
 *
 *  Description
 *  Conversion program that transforms XML classifiers to C source code.
 *
 */

#include <libabr.h>

#include <argtable2.h>

#include <iostream>
#include <fstream>
#include <cstdio>

using namespace std;

int main(int argc, char ** argv)
{
    // Process arguments
    const char * progname = "xml2h";
    arg_file * file = arg_file1("i", "input", "FILE", "The XML file with classifier");
    arg_file * file1 = arg_file1("o", "output", "FILE", "Output file without extension");
    arg_str * name = arg_str1("n", "name", "NAME", "Classifier identifier in the header");
    arg_lit * help = arg_lit0("h", "help", "Display this help and exit");
    struct arg_end * end = arg_end(20);

    void *argtable[] = { file, file1, name, help, end };

    int nerrors = arg_parse(argc, argv, argtable);

    if(help->count > 0)
    {
        fprintf(stderr, "Usage: %s", progname);
        arg_print_syntax(stderr, argtable, "\n\n");
        arg_print_glossary(stderr, argtable, "  %-30s %s\n");
		arg_freetable(argtable, sizeof(argtable)/sizeof(argtable[0]));
        return 1;
    }
    if (nerrors > 0)
    {
        arg_print_errors(stderr, end, progname);
        fprintf(stderr, "Try '%s --help' for more information.\n", progname);
		arg_freetable(argtable, sizeof(argtable)/sizeof(argtable[0]));
        return 1;
    }

    // Arguments ok, try load the classifier
    TClassifier * c = load_classifier_XML(file->filename[0]);

    if (!c)
    {
        fprintf(stderr, "Can not load classifier file '%s'\n", file->filename[0]);
		arg_freetable(argtable, sizeof(argtable)/sizeof(argtable[0]));
        return 1;
    }

    // Generate file names
    // BUG: long file names may cause buffer overflow
    char hfile[64];
    char cfile[64];
    sprintf(hfile, "%s.h", file1->filename[0]);
    sprintf(cfile, "%s.c", file1->filename[0]);

    // Open files
    // BUG: Files are not checked if they are successfuly opened!
    ofstream header(hfile);
    ofstream source(cfile);

    // Export the data
    export_classifier_header(c, header, name->sval[0]);
    export_classifier_source(c, source, name->sval[0], hfile);

    return 0;
}


text:
int main(int argc, char** argv) {
    QApplication app{ argc, argv };

    MdiWnd wnd{};
    wnd.setWindowTitle("Mdi Program");
    wnd.show();

    return app.exec();
}


text:
using ui::KeycodeConverter;

namespace {

// Number of native codes expected to be mapped for each kind of native code.
// These are in the same order as the columns in dom_code_data.inc
// as reflected in the DOM_CODE() macro below.
const size_t expected_mapped_key_count[] = {
    221,  // evdev
    221,  // xkb
    157,  // windows
    119,  // mac
};

const size_t kNativeColumns = std::size(expected_mapped_key_count);

struct KeycodeConverterData {
  uint32_t usb_keycode;
  const char* code;
  const char* id;
  int native_keycode[kNativeColumns];
};

#define DOM_CODE(usb, evdev, xkb, win, mac, code, id) \
  {                                                   \
    usb, code, #id, { evdev, xkb, win, mac }          \
  }
#define DOM_CODE_DECLARATION \
  const KeycodeConverterData kKeycodeConverterData[] =
#include "ui/events/keycodes/dom/dom_code_data.inc"
#undef DOM_CODE
#undef DOM_CODE_DECLARATION

const uint32_t kUsbNonExistentKeycode = 0xffffff;
const uint32_t kUsbUsBackslash = 0x070031;
const uint32_t kUsbNonUsHash = 0x070032;

TEST(UsbKeycodeMap, KeycodeConverterData) {
  // This test looks at all kinds of supported native codes.
  // Verify that there are no duplicate entries in the mapping.
  std::map<uint32_t, uint16_t> usb_to_native[kNativeColumns];
  std::map<uint16_t, uint32_t> native_to_usb[kNativeColumns];
  int invalid_native_keycode[kNativeColumns];
  for (size_t i = 0; i < kNativeColumns; ++i) {
    invalid_native_keycode[i] = kKeycodeConverterData[0].native_keycode[i];
  }
  for (const auto& it : kKeycodeConverterData) {
    SCOPED_TRACE(it.id);
    for (size_t i = 0; i < kNativeColumns; ++i) {
      if (it.native_keycode[i] == invalid_native_keycode[i])
        continue;
      // Verify that the USB or native codes aren't duplicated.
      EXPECT_EQ(0U, usb_to_native[i].count(it.usb_keycode))
          << " duplicate of USB code 0x" << std::hex << std::setfill('0')
          << std::setw(6) << it.usb_keycode
          << " to native 0x"
          << std::setw(4) << it.native_keycode[i]
          << " (previous was 0x"
          << std::setw(4) << usb_to_native[i][it.usb_keycode]
          << ")";
      usb_to_native[i][it.usb_keycode] = it.native_keycode[i];
      EXPECT_EQ(0U, native_to_usb[i].count(it.native_keycode[i]))
          << " duplicate of native code 0x" << std::hex << std::setfill('0')
          << std::setw(4) << it.native_keycode[i]
          << " to USB 0x"
          << std::setw(6) << it.usb_keycode
          << " (previous was 0x"
          << std::setw(6) << native_to_usb[i][it.native_keycode[i]]
          << ")";
      native_to_usb[i][it.native_keycode[i]] = it.usb_keycode;
    }
  }
  // Verify that the number of mapped keys is what we expect, i.e. we haven't
  // lost any, and if we've added some then the expectation has been updated.
  for (size_t i = 0; i < kNativeColumns; ++i) {
    SCOPED_TRACE(i);
    EXPECT_EQ(expected_mapped_key_count[i], usb_to_native[i].size());
  }
}

TEST(UsbKeycodeMap, EvdevXkb) {
  // XKB codes on a Linux system are 8 plus the corresponding evdev code.
  // Verify that this relationship holds in the keycode converter data.
  for (const auto& it : kKeycodeConverterData) {
    SCOPED_TRACE(it.id);
    int evdev_code = it.native_keycode[0];
    int xkb_code = it.native_keycode[1];
    if (evdev_code || xkb_code) {
      EXPECT_EQ(xkb_code, evdev_code + 8);
    }
  }
}

TEST(UsbKeycodeMap, Basic) {
  // Verify that the first element in the table is the "invalid" code.
  const ui::KeycodeMapEntry* keycode_map =
      ui::KeycodeConverter::GetKeycodeMapForTest();
  EXPECT_EQ(ui::KeycodeConverter::InvalidUsbKeycode(),
            keycode_map[0].usb_keycode);
  EXPECT_EQ(ui::KeycodeConverter::InvalidNativeKeycode(),
            keycode_map[0].native_keycode);
  EXPECT_EQ(ui::KeycodeConverter::InvalidNativeKeycode(),
            ui::KeycodeConverter::DomCodeToNativeKeycode(ui::DomCode::NONE));

  size_t numEntries = ui::KeycodeConverter::NumKeycodeMapEntriesForTest();
  for (size_t i = 0; i < numEntries; ++i) {
    const ui::KeycodeMapEntry* entry = &keycode_map[i];
    // Don't test keys with no native keycode mapping on this platform.
    if (entry->native_keycode == ui::KeycodeConverter::InvalidNativeKeycode())
      continue;

    // Verify UsbKeycodeToNativeKeycode works for this key.
    EXPECT_EQ(
        entry->native_keycode,
        ui::KeycodeConverter::UsbKeycodeToNativeKeycode(entry->usb_keycode));

    // Verify DomCodeToNativeKeycode works correctly.
    if (entry->code && *entry->code) {
      ui::DomCode dom_code =
          ui::KeycodeConverter::CodeStringToDomCode(entry->code);
      EXPECT_EQ(entry->native_keycode,
                ui::KeycodeConverter::DomCodeToNativeKeycode(dom_code));
    }
  }
}

TEST(UsbKeycodeMap, NonExistent) {
  // Verify that UsbKeycodeToNativeKeycode works for a non-existent USB keycode.
  EXPECT_EQ(
      ui::KeycodeConverter::InvalidNativeKeycode(),
      ui::KeycodeConverter::UsbKeycodeToNativeKeycode(kUsbNonExistentKeycode));
}

TEST(UsbKeycodeMap, UsBackslashIsNonUsHash) {
  // Verify that UsbKeycodeToNativeKeycode treats the non-US "hash" key
  // as equivalent to the US "backslash" key.
  EXPECT_EQ(ui::KeycodeConverter::UsbKeycodeToNativeKeycode(kUsbUsBackslash),
            ui::KeycodeConverter::UsbKeycodeToNativeKeycode(kUsbNonUsHash));
}

TEST(KeycodeConverter, DomCode) {
  // Test invalid and unknown arguments to CodeStringToDomCode()
  EXPECT_EQ(ui::DomCode::NONE, ui::KeycodeConverter::CodeStringToDomCode("-"));
  EXPECT_EQ(ui::DomCode::NONE, ui::KeycodeConverter::CodeStringToDomCode(""));
  // Round-trip test DOM Level 3 .code strings.
  const ui::KeycodeMapEntry* keycode_map =
      ui::KeycodeConverter::GetKeycodeMapForTest();
  size_t numEntries = ui::KeycodeConverter::NumKeycodeMapEntriesForTest();
  for (size_t i = 0; i < numEntries; ++i) {
    SCOPED_TRACE(i);
    const ui::KeycodeMapEntry* entry = &keycode_map[i];
    if (entry->code) {
      ui::DomCode code = ui::KeycodeConverter::CodeStringToDomCode(entry->code);
      EXPECT_STREQ(entry->code,
                   ui::KeycodeConverter::DomCodeToCodeString(code));
    }
    ui::DomCode code =
        ui::KeycodeConverter::NativeKeycodeToDomCode(entry->native_keycode);
    EXPECT_EQ(entry->native_keycode,
              ui::KeycodeConverter::DomCodeToNativeKeycode(code));
  }
}

TEST(KeycodeConverter, DomKey) {
  const struct {
    ui::DomKey::Base key;
    bool is_character;
    bool is_dead;
    bool test_to_string;
    const char* const string;
    bool is_named;
  } test_cases[] = {
      // Invalid arguments to KeyStringToDomKey().
      {ui::DomKey::NONE, false, false, true, "", false},
      {ui::DomKey::NONE, false, false, false, "?!?", false},
      {ui::DomKey::NONE, false, false, false, "\x61\xCC\x81", false},
      // Some single Unicode characters.
      {ui::DomKey::Constant<'-'>::Character, true, false, true, "-", false},
      {ui::DomKey::Constant<'A'>::Character, true, false, true, "A", false},
      {ui::DomKey::Constant<0xE1>::Character, true, false, true, "\xC3\xA1",
       false},
      {ui::DomKey::Constant<0x1F648>::Character, true, false, true,
       "\xF0\x9F\x99\x88", false},
      // Unicode-equivalent named values.
      {ui::DomKey::BACKSPACE, true, false, true, "Backspace", true},
      {ui::DomKey::TAB, true, false, true, "Tab", true},
      {ui::DomKey::ENTER, true, false, true, "Enter", true},
      {ui::DomKey::ESCAPE, true, false, true, "Escape", true},
      {ui::DomKey::DEL, true, false, true, "Delete", true},
      {ui::DomKey::BACKSPACE, true, false, false, "\b", true},
      {ui::DomKey::TAB, true, false, false, "\t", true},
      {ui::DomKey::ENTER, true, false, false, "\r", true},
      {ui::DomKey::ESCAPE, true, false, false, "\x1B", true},
      {ui::DomKey::DEL, true, false, false, "\x7F", true},
      {ui::DomKey::Constant<'\b'>::Character, true, false, true, "Backspace",
       true},
      {ui::DomKey::Constant<'\t'>::Character, true, false, true, "Tab", true},
      {ui::DomKey::Constant<'\r'>::Character, true, false, true, "Enter", true},
      {ui::DomKey::Constant<0x1B>::Character, true, false, true, "Escape",
       true},
      {ui::DomKey::Constant<0x7F>::Character, true, false, true, "Delete",
       true},
      // 'Dead' key.
      {ui::DomKey::Constant<0xFFFF>::Dead, false, true, true, "Dead", true},
      // Sample non-Unicode key names.
      {ui::DomKey::SHIFT, false, false, true, "Shift", true},
      {ui::DomKey::F16, false, false, true, "F16", true},
      {ui::DomKey::ZOOM_IN, false, false, true, "ZoomIn", true},
      {ui::DomKey::UNIDENTIFIED, false, false, true, "Unidentified", true},
  };
  for (const auto& test : test_cases) {
    // Check KeyStringToDomKey().
    ui::DomKey key = ui::KeycodeConverter::KeyStringToDomKey(test.string);
    EXPECT_EQ(test.is_character, key.IsCharacter());
    EXPECT_EQ(test.is_dead, key.IsDeadKey());
    EXPECT_EQ(test.key, key);
    // Check |DomKeyToKeyString()|.
    if (test.test_to_string) {
      std::string s(ui::KeycodeConverter::DomKeyToKeyString(test.key));
      EXPECT_STREQ(test.string, s.c_str());
    }
    EXPECT_EQ(ui::KeycodeConverter::IsDomKeyNamed(key), test.is_named);
  }
  // Round-trip test all UI Events KeyboardEvent.key strings, and check
  // that encodings are distinct.
  std::set<ui::DomKey::Base> keys;
  const char* s = nullptr;
  for (size_t i = 0;
       (s = ui::KeycodeConverter::DomKeyStringForTest(i)) != nullptr; ++i) {
    SCOPED_TRACE(i);
    ui::DomKey key = ui::KeycodeConverter::KeyStringToDomKey(s);
    if (s) {
      EXPECT_STREQ(s, ui::KeycodeConverter::DomKeyToKeyString(key).c_str());
      if (keys.count(key) == 0) {
        keys.insert(key);
      } else {
        ADD_FAILURE() << "duplicate encoding:" << key;
      }
    } else {
      EXPECT_EQ(ui::DomKey::NONE, key);
    }
  }
}

}  // namespace


text:
class FabricTable extends HTMLElement {

	constructor(){
		super();
		this._modifier = null;
		this._nodes = {};
		this._selected = [];
		this._rowId = null;
	}

	get modifier() { return this._modifier }
	get items(){ return this._items; }
	get columns() { return this._columns || []; }
	get itemheight() { return this._itemheight || 20; }
	get rowid() { return this._rowId; }
	get selected() { return this._selected || [] }

	set modifier( value ) { throw new RangeError('The modifier property is static.') }
	set items( value ) { value = [].concat(value); this._items = value; this.__onSizePropsChange(); this.setProperties('items') }
	set selected( value ) { console.log('set selected', value, value.sort().join(','), this._selected.sort().join(',')); value = [].concat(value); if(value.sort().join(',') === this._selected.sort().join(',')) return; this._selected = value; this.setProperties('selected') }
	set rowid( value ) { this._rowId = value; this.setProperties('rowid') }
	set columns( value ){

		if(value == null) return;

		// Check value to be numeric
		if(typeof value === 'string') value = JSON.parse(value);

		this._columns = value;

		this.setProperties('columns');

		this.__onSizePropsChange();

	}

	set itemheight( value ){

		if(value == null) return;

		// Check value to be numeric
		let ih = parseInt( value, 10 );
		if ( isNaN( ih ) ) {
			throw new TypeError( 'Value for item height has to be numeric' );
		}

		this._itemheight = ih;

		this.__onSizePropsChange();
	}

	connectedCallback(){

		this.getStaticAttributes();
		this.setupUI();

		this._items = [];
		if(this._columns == null) this._columns = [];
		this._ticking = false;
		this._lastRepaintY = null;
		this._visibleItems = 0;
		this.style.display = 'inline-block';

		// Calculate number of visible items
		// @TODO: ResizeObserver
		this._visibleItems = Math.ceil(this.clientHeight / this._itemheight ) * ((this._columns)?this._columns.length:1);

		// Add scroll handler
		this._onScroll = this.__scrollHandler.bind(this);
		this._nodes.container.addEventListener('scroll', this._onScroll);

		// Add click handler
		if(this._modifier === 'selectable'){
			this.__onToggleSelection = this.__toggleRowHandler.bind(this);
			this._nodes.table.addEventListener('click', this.__onToggleSelection);
		}

		this.setProperties();
		this.__onSizePropsChange();
		this.__render();

	}

	setupUI(){

		// Define static properties
		let modifier = (this._modifier)?'ms-Table--'+this._modifier:'';

		let markup = `

`;

		this.innerHTML = markup;

		this._nodes = {
			container: this.querySelector('.container'),
			scroller: this.querySelector('.scroller'),
			table: this.querySelector('.ms-Table'),
			head: this.querySelector('.ms-Table > thead'),
			displayHeader: this.querySelector('.displayHeader'),
			body: this.querySelector('.ms-Table > tbody')
		}
	}

	setProperties(property){

		//console.log('setProperties', property, this._nodes);

		if(!this._nodes.container) return;

		if(property == null || property === 'columns') {

			// Remove previous <col/> tags from table
			let cols = this._nodes.table.querySelectorAll('col');
			if(cols){
				[].forEach.call(cols, col => { this._nodes.table.removeChild(col) });
			}

			let headContent = ['
'],
				displayHeaderContent = [],
				rowCheck = 0;
			if(this._modifier === 'selectable'){
				headContent.push('	');
				displayHeaderContent.push('');
				let col = document.createElement('col');
				col.width = '20px';
				this._nodes.table.appendChild( col );
				this._nodes.displayHeader.style.paddingLeft = '20px'
			} else {
				this._nodes.displayHeader.style.paddingLeft = '0px';
			}

			this._columns.forEach( column => {
				let col = document.createElement('col');
				col.width = column.width
				this._nodes.table.appendChild( col );
			});

			let a = headContent.concat(this._columns.map( col => { return ' 	' })).join('') + '
';
			let b = displayHeaderContent.concat(this._columns.map( col => { return '' + (col.label||'') + '' })).join('');

			this._nodes.head.innerHTML = a;
			this._nodes.displayHeader.innerHTML = b;

		}

		if(property === 'items') { this.__render(); }
		if(property === 'rowid') { this.__render(); }

	}

	__onSizePropsChange(){

		const height = (this._itemheight || 0) * ( this._items || [] ).length;

		if(!this._nodes.container) return;
		const scroller = this._nodes.container.querySelector('[data-id="scroller"]');
		if(scroller) scroller.style.height = parseInt(height, 10) + 'px';

		this._visibleItems = Math.ceil(this.clientHeight / this._itemheight );

	}

	__toggleRowHandler(e){
		if(e.target.classList.contains('ms-Table-rowCheck')){
			let row = e.target.closest('TR');

			// Sync state to DOM
			row.classList.toggle('is-selected');

			// Sync state to selected property
			let rowId = row.dataset.id;
			if(rowId){
				if(row.classList.contains('is-selected') && this.selected.indexOf(rowId) === -1) { this._selected.push(rowId)}
				if(!row.classList.contains('is-selected') && this.selected.indexOf(rowId) !== -1) { this._selected.splice(this.selected.indexOf(rowId),1)}
			}

		}
	}

	__scrollHandler(e){

		var scrollTop = e.target.scrollTop;
		if (!this._ticking) {

			window.requestAnimationFrame(() => {

				// Determine whether a rerender is necessary based on the scrollTop and last render position
				if (this._lastRepaintY == null || Math.abs(scrollTop - this._lastRepaintY) > (Math.ceil(this._nodes.body.clientHeight * 0.3)) ) {

				  this.__renderChunk(scrollTop);

				  this._lastRepaintY = scrollTop;
				}

				e.preventDefault && e.preventDefault();
				this._ticking = false;

			});

			this._ticking = true;
		}
	}

	getStaticAttributes(){
		let modifier = this.getAttribute('modifier');
		if(modifier && ['fixed', 'selectable'].indexOf(modifier) !== -1) this._modifier = modifier;
	}

	static get observedAttributes(){
		return ['itemheight', 'columns', 'rowid', 'selected'];
	}

	attributeChangedCallback( attr, oldValue, newValue ){

		let val = (attr === 'columns')?JSON.parse(newValue):newValue;
		if(attr === 'selected') val = val.split(',');
		if(oldValue === val || val === this[attr]) return;
		this[attr] = val;
	}

	__render(){

		if(this._nodes.container){
			this.__renderChunk(this._nodes.container.scrollTop || 0);
		}
	}

	__template(item){

		let tr = 'tr';
		if(this.rowid && item.hasOwnProperty(this.rowid)){
			tr += ' data-id="'+item[this.rowid.toString()]+'"';
			if(this._modifier === 'selectable' && this.selected.indexOf(item[this.rowid].toString()) !== -1) tr += ' class="is-selected"';
		}

		var str = ['<'+tr+'>'];

		if(this._modifier === 'selectable'){
			str.push('	');
		}

		if(this._columns){
			this._columns.forEach( col => { str.push( '' + (( col.hasOwnProperty('id') && item.hasOwnProperty(col.id))?item[col.id].toString():'') + '	'); } );
		}
		str.push('
');
		return str.join('');
	}

	__renderChunk(scrollTop){

		// calculate first visible item from scrollTop
		let firstVisibleRow = Math.max((Math.ceil(scrollTop / this._itemheight) - 1), 0);
		let firstRenderedRow = Math.max( firstVisibleRow - this._visibleItems ,0);
		let firstRenderedItem = Math.max(firstRenderedRow - 1, 0);

		console.log('__renderChunk', firstVisibleRow, firstRenderedRow, firstRenderedItem, firstRenderedItem + (this._visibleItems * 3),this._items.length);

		if(this.__template && this._nodes.container){

			const chunkData = Object.assign( {}, { items: this._items.slice( firstRenderedItem, firstRenderedItem + (this._visibleItems * 3)) });

			// Create temporary DOM structure
			var chunkMarkup = '';
			chunkData.items.forEach( (item) => {
				let markup = this.__template(item);
				if(markup) chunkMarkup = chunkMarkup + markup;
			} );
			this._nodes.body.innerHTML = chunkMarkup;

			//Repositioning of table
			this._nodes.table.style.top = (firstRenderedItem * this._itemheight) + 'px';

		}

	}

}
window.customElements.define( 'fabric-table', FabricTable );

// Set styles
(function (w,d) {

let style = d.createElement('STYLE');
style.textContent = `
fabric-table .container {position:relative; overflow: auto; transform:scale(1);height:100%}
fabric-table .ms-Table { width:100%; position: absolute; top:0;}
fabric-table .ms-Table thead{ visibility: hidden}
fabric-table .displayHeader {position:sticky;left:0;right:0;top: 0;height: 30px;line-height: 30px;padding: 0 10px;font-size: 11px;color: #666;background: white;z-index: 10;border-bottom: 1px solid #eaeaea;font-weight: 400;}
.ms-Table, fabric-table .displayHeader {font-family:Segoe UI WestEuropean,Segoe UI,-apple-system,BlinkMacSystemFont,Roboto,Helvetica Neue,sans-serif;-webkit-font-smoothing:antialiased}
.ms-Table{display:table;width:100%;border-collapse:collapse}
.ms-Table--fixed{table-layout:fixed}
.ms-Table-row,.ms-Table tr{display:table-row;line-height:30px;font-weight:300;font-size:12px;color:#333}
.ms-Table-row.is-selected,.ms-Table tr.is-selected{background-color:#b3d6f2}
.ms-Table-row.is-selected .ms-Table-rowCheck,.ms-Table tr.is-selected .ms-Table-rowCheck{background-color:#0078d7}
.ms-Table-row.is-selected .ms-Table-rowCheck:before,.ms-Table tr.is-selected .ms-Table-rowCheck:before{display:none}
.ms-Table-row.is-selected .ms-Table-rowCheck:after,.ms-Table tr.is-selected .ms-Table-rowCheck:after{content:"☑";color:#fff; font-size:14px}
.ms-Table-cell,.ms-Table td,.ms-Table th{display:table-cell;padding:0 10px}
.ms-Table-head,.ms-Table thead th{font-weight:300;font-size:11px;color:#666}
.ms-Table-head .ms-Table-cell,.ms-Table-head .ms-Table-rowCheck,.ms-Table-head td,.ms-Table-head th,.ms-Table thead .ms-Table-cell,.ms-Table thead .ms-Table-rowCheck,.ms-Table thead td,.ms-Table thead th{font-weight:400;text-align:left;border-bottom:1px solid #eaeaea}
.ms-Table-rowCheck{display:table-cell;width:20px;position:relative;padding:0}
.ms-Table-rowCheck:after{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:inline-block;font-style:normal;font-weight:400;speak:none;content:"☐";color:#a6a6a6;font-size:14px;position:absolute;left:4px;top:1px}
.ms-Table--selectable .ms-Table-row:hover,.ms-Table--selectable tr:hover{background-color:#f4f4f4;cursor:pointer;outline:1px solid transparent}
@media screen and (-ms-high-contrast:active){.ms-Table-row.is-selected .ms-Table-rowCheck{background:none}
.ms-Table-row.is-selected .ms-Table-rowCheck:before{display:block}
}`;
d.head.appendChild(style);
})(window, document);


text:
package net.minecraft.block;

public class BlockDoubleWoodSlab extends BlockWoodSlab
{
    private static final String __OBFID = "CL_00002112";

    public boolean isDouble()
    {
        return true;
    }
}


text:
.. Metafunctions/Concepts//Lambda Expression |30

Lambda Expression
=================

Description
-----------

A |Lambda Expression| is a compile-time invocable entity in either of the following two
forms:

* |Metafunction Class|
* |Placeholder Expression|

Most of the MPL components accept either of those, and the concept
gives us a consice way to describe these requirements.

Expression requirements
-----------------------

See corresponding |Metafunction Class| and |Placeholder Expression| specifications.

Models
------

* |always|
* |unpack_args|
* ``plus<_, int_<2> >``
* ``if_< less<_1, int_<7> >, plus<_1,_2>, _1 >``

See also
--------

|Metafunctions|, |Placeholders|, |apply|, |lambda|

.. copyright:: Copyright ©  2001-2009 Aleksey Gurtovoy and David Abrahams
   Distributed under the Boost Software License, Version 1.0. (See accompanying
   file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)


text:
component for vue-component

### build
1. `npm install`
2. `npm run build`
3. `npm link`
4. `import XXX from '$component-name$'`


text:
require 'coppertone/record_evaluator'

module Coppertone
  class Mechanism
    # Implements the include mechanism.
    class IncludeMatcher
      # Evaluates records that are referenced via an include
      class IncludeRecordEvaluator < Coppertone::RecordEvaluator
        def evaluate_fail_result(result, _m, _r)
          result
        end

        def evaluate_none_result(result, m, r)
          new_result = super
          return new_result unless new_result.none?

          raise Coppertone::NoneIncludeResultError
        end
      end

      attr_reader :record

      def initialize(record)
        @record = record
      end

      def match?(macro_context, request_context)
        raise Coppertone::NoneIncludeResultError if record.nil?

        record_result =
          IncludeRecordEvaluator.new(record)
                                .evaluate(macro_context, request_context)
        record_result.pass?
      end
    end
  end
end


text:
title:  Á tómum tanki
date:  28/06/2021
---

Svefnleysi og magnþrot vegna líkamlegrar ofreynslu eru raunveruleg vandamál. Það sem veldur enn meiri ama er þegar okkur finnst við vera að "keyra áfram á tómum tanki." Þegar svo svefnleysi bætist við tilfinningaerfiðleika getum við fyllst sársaukafullu kjarkleysi.

Barúk, ritari Jeremía, hlýtur oft að hafa fundið til þess á síðustu ófriðarárum Jerúsalem, áður en glundroði, þjáningar og eyðilegging komu í kjölfar þess að Babýloníumenn lögðu borgina í eyði.

`Lestu Jer 45.1-5. Hvað segja þessi vers okkur um tilfinningar Barúks á þessum tíma?`

Getur þú ímyndað þér hvernig þér væri innanbrjósts ef Guð sendi þér persónuleg skilaboð? Barúk fékk skilaboð beint frá hásætissal Guðs (Jer 45.2). Okkur er sagt að það hafi gerst "á fjórða stjórnarári Jójakíms

Júdakonungs," u.þ.b. 605 eða 604 f.Kr. Við finnum síðan góða lýsingu á því hvernig fólki líður þegar það reynir að "keyra á tómum tanki" í Jer 45.3.

Á grundvelli þess sem við vitum um þetta tímabil Biblíunnar er ljóst að kvartanir Barúks voru ekki yfirborðskenndar tilfinningar. Hann hafði góða ástæðu til að vera kjarklaus og útkeyrður tilfinningalega. Margt slæmt var að gerast og meira var í aðsigi.

`Hvernig bregst Guð við þjáningum Barúks? Lestu Jer 45.4, 5.`

Viðbrögð Guðs við þrautum og þjáningum Barúks minna okkur á þá staðreynd að örvænting og þjáningar Guðs hljóta að hafa verið hlutfallslega margfalt meiri en þjáningar Barúks. Hann hafði reist Jerúsalem en var nú að því kominn að rífa hana niður. Hann hafðiplantað Ísrael sem víngarð (Jes 5.1-7) en var nú að því kominn að rífa hana upp og herleiða. Það var ekki það sem Drottinn vildi fyrir fólk sitt en það var afleiðing uppreisnar þess gegn honum.

En það var birta framundan fyrir Barúk. Guð hét því að varðveita líf Barúks, jafnvel mitt í eyðileggingu, útlegð og eignamissi.

`Lestu aftur orð Guðs til Barúks. Hvaða boðskap getum við tekið til okkar? Hvað segir hann okkur um það að þegar á reynir er Guð ávallt með okkur undir öllum kringumstæðum?`


text:
class PropositionConnection < ActiveRecord::Base
  belongs_to :issue
  belongs_to :proposition
  belongs_to :vote # optional

  attr_accessible :issue, :comment, :title, :proposition, :proposition_id, :vote_id

  validates_presence_of :issue, :proposition
  validates_uniqueness_of :proposition_id, scope: [:issue_id, :vote_id]

  validate :overrides_vote_if_proposition_has_several_votes

  def title_with_fallback
    title || proposition.simple_description || proposition.description
  end

  def html_comment
    if comment || proposition.simple_body
      Hdo::Utils::Markdown.render(comment || proposition.simple_body)
    else
      proposition.plain_body.truncate(200)
    end
  end

  def vote
    super || proposition.votes.first
  end

  def multiple_votes?
    proposition && proposition.votes.size > 1
  end

  def as_edit_view_json
    {
      vote_time: I18n.l(vote.time.localtime, format: :text_time_precise),
      vote_id: vote_id,
      multiple_votes: multiple_votes?,
      votes: proposition.votes.sort_by(&:time).map { |v| v.as_json(only: [:id, :subject]).merge(selected: v.id == vote_id) },
      hdo_title: title.present? || proposition.simple_description.present?,
      title: title_with_fallback,
      proposition_id: proposition.id,
      id: id,
      connected: true,
      comment: comment,
      connection_title: title
    }
  end

  private

  def overrides_vote_if_proposition_has_several_votes
    if vote_id.nil? && multiple_votes?
      errors.add :proposition, I18n.t('app.errors.proposition_connections.must_override_vote')
    end
  end

end


text:
#ifndef _COMMAND_H_
#define _COMMAND_H_

#include <stdbool.h>

#include "mud/util/muduuid.h"
/**
 * Typedefs
 **/
typedef struct player player_t;
typedef struct game game_t;
typedef struct linked_list linked_list_t;
typedef struct hash_table hash_table_t;

/**
 * Structs
 **/
typedef struct command {
  mud_uuid_t uuid;
  char* name;
  mud_uuid_t script;
} command_t;

typedef struct command_group {
  mud_uuid_t uuid;
  char* description;
  linked_list_t* commands; // contains command uuids
} command_group_t;

/**
 * Function prototypes
 **/
command_t* command_new_command_t(const char* uuid, const char* name, const char* script_uuid);
void command_free_command_t(command_t* command);
void command_deallocate_command_t(void* value);

command_group_t* command_new_command_group_t(const char* uuid, const char* description);
void command_free_command_group_t(command_group_t* group);
void command_deallocate_command_group_t(void* value);

int command_load_commands(game_t* game);
int command_load_command_groups(game_t* game);

command_group_t* command_get_command_group_by_id(game_t* game, const char* uuid);

#endif


text:
using System.Collections;
using System.Diagnostics;
using System.Reflection;
using System.Text;
using AppKit.Core.Logging.Technical.Helpers;
using PostSharp.Aspects;

namespace AppKit.Core.Logging.Technical.Extensions
{
    public static class TechnicalLogExtension
    {
        public static void AddTechnicalLogHeader(this StringBuilder builder, MethodExecutionArgs args, string eventName)
        {
            Debug.Assert(args.Method.ReflectedType != null);

            builder.Append(eventName);
            builder.Append(": ");
            builder.Append(args.Method.ReflectedType.FullName);
            builder.Append(".");
            builder.Append(args.Method.Name);
            builder.AppendLine();
        }

        public static void AddTechnicalLogParameters(this StringBuilder builder, MethodExecutionArgs args, bool isDetailedString)
        {
            ParameterInfo[] parameters = args.Method.GetParameters();
            for (int i = 0; i < parameters.Length; i++)
            {
                ParameterInfo parameter = parameters[i];
                string parameterValue = CalcParameterValue(args.Arguments[i], isDetailedString);
                AppentParameter(builder, parameter, parameterValue);
            }
        }

        public static void AddTechnicalLogReturnValue(this StringBuilder builder, MethodExecutionArgs args, bool isDetailedString)
        {
            MethodInfo method = args.Method as MethodInfo;
            if (method == null)
                return;

            ParameterInfo parameter = method.ReturnParameter;
            if (parameter == null)
            {
                AppentParameter(builder, parameter, "== No Return Value");
                return;
            }

            if (parameter.ParameterType == typeof(void))
            {
                AppentParameter(builder, parameter, "== Void Return Value");
                return;
            }

            string parameterValue = CalcParameterValue(args.ReturnValue, isDetailedString);

            AppentParameter(builder, parameter, parameterValue);
        }

        /// <summary>
        /// Convert string builder to string.
        /// Can add additional transformation.
        /// For example: trancate for appropriate length
        /// </summary>
        public static string GetTechnicalMessage(this StringBuilder builder)
        {
            return builder.ToString();
        }

        #region Private Members

        private static string CalcParameterValue(object argument, bool isDetailedString)
        {
            ITechnicalLogEntity technicalLogEntity = argument as ITechnicalLogEntity;

            if (technicalLogEntity != null)
            {
                if (isDetailedString)
                    return technicalLogEntity.TechnicalString;
                return technicalLogEntity.TechnicalDetailedString;
            }

            IList list = argument as IList;
            if (list != null)
            {
                if (!isDetailedString)
                    return list.TechnicalString();
                return list.TechnicalDetailedString();
            }

            IDictionary dict = argument as IDictionary;
            if (dict != null)
            {
                if (!isDetailedString)
                    return dict.TechnicalString();
                return dict.TechnicalDetailedString();
            }

            return argument.ToString();
        }

        private static void AppentParameter(StringBuilder builder, ParameterInfo parameter, string parameterValue)
        {
            builder.Append("== ");
            builder.Append(parameter.Name);
            builder.Append(": ");
            builder.Append(parameterValue);
            builder.AppendLine();
        }

        #endregion
    }
}


text:
module Shindig
  class HttpGadgetContext < GadgetContext
    def initialize(request)
      @request = request
      super()
    end

    def getParameter(name)
      @request.params[name]
    end

    def getUrl
      url = getParameter("url")
      return unless url
      Uri.parse(url)
    end

    def getContainter
      @request.params["container"] || @request.params["synd"]
    end

    def getHost
      @request.host
    end

    def getRenderingContext
      getParameter('c') == '1' ? org.apache.shindig.gadgets.RenderingContext::CONTAINER :
          org.apache.shindig.gadgets.RenderingContext::GADGET
    end

    def getModuleId
      getParameter('mid').to_i
    end

    def getUserIp
      @request.remote_ip
    end

    def getDebug
      return false if @request.params["debug"].blank?
      @request.params["debug"] != "0"
    end

    def getIgnoreCache
      return false if @request.params["nocache"].blank?
      @request.params["nocache"] != "0"
    end

    def getView
      getParameter('view')
    end

  end
end


text:
The purpose of this application is to enable researchers to perform a systematic review using PubMed.
A systematic review consists of a number of stages, which need to be recorded:
  1. Query Construction,
  2. Abstract Pool Evaluation and then
  3. Document Pool Evaluation.

The API to use is provided by E-Utilities which gives access to the PubMed api:

  - http://www.ncbi.nlm.nih.gov/home/api.shtml


text: <item-card-component [_ref]='this'></item-card-component>


text:
import { EventEmitter, Injectable } from '@angular/core';
import { ObservableWrapper } from '../src/facade/async';
export class SpyLocation {
    constructor() {
        this.urlChanges = [];
        /** @internal */
        this._history = [new LocationState('', '')];
        /** @internal */
        this._historyIndex = 0;
        /** @internal */
        this._subject = new EventEmitter();
        /** @internal */
        this._baseHref = '';
        /** @internal */
        this._platformStrategy = null;
    }
    setInitialPath(url) { this._history[this._historyIndex].path = url; }
    setBaseHref(url) { this._baseHref = url; }
    path() { return this._history[this._historyIndex].path; }
    isCurrentPathEqualTo(path, query = '') {
        var givenPath = path.endsWith('/') ? path.substring(0, path.length - 1) : path;
        var currPath = this.path().endsWith('/') ? this.path().substring(0, this.path().length - 1) : this.path();
        return currPath == givenPath + (query.length > 0 ? ('?' + query) : '');
    }
    simulateUrlPop(pathname) {
        ObservableWrapper.callEmit(this._subject, { 'url': pathname, 'pop': true });
    }
    simulateHashChange(pathname) {
        // Because we don't prevent the native event, the browser will independently update the path
        this.setInitialPath(pathname);
        this.urlChanges.push('hash: ' + pathname);
        ObservableWrapper.callEmit(this._subject, { 'url': pathname, 'pop': true, 'type': 'hashchange' });
    }
    prepareExternalUrl(url) {
        if (url.length > 0 && !url.startsWith('/')) {
            url = '/' + url;
        }
        return this._baseHref + url;
    }
    go(path, query = '') {
        path = this.prepareExternalUrl(path);
        if (this._historyIndex > 0) {
            this._history.splice(this._historyIndex + 1);
        }
        this._history.push(new LocationState(path, query));
        this._historyIndex = this._history.length - 1;
        var locationState = this._history[this._historyIndex - 1];
        if (locationState.path == path && locationState.query == query) {
            return;
        }
        var url = path + (query.length > 0 ? ('?' + query) : '');
        this.urlChanges.push(url);
    }
    replaceState(path, query = '') {
        path = this.prepareExternalUrl(path);
        var history = this._history[this._historyIndex];
        if (history.path == path && history.query == query) {
            return;
        }
        history.path = path;
        history.query = query;
        var url = path + (query.length > 0 ? ('?' + query) : '');
        this.urlChanges.push('replace: ' + url);
    }
    forward() {
        if (this._historyIndex < (this._history.length - 1)) {
            this._historyIndex++;
            ObservableWrapper.callEmit(this._subject, { 'url': this.path(), 'pop': true });
        }
    }
    back() {
        if (this._historyIndex > 0) {
            this._historyIndex--;
            ObservableWrapper.callEmit(this._subject, { 'url': this.path(), 'pop': true });
        }
    }
    subscribe(onNext, onThrow = null, onReturn = null) {
        return ObservableWrapper.subscribe(this._subject, onNext, onThrow, onReturn);
    }
    normalize(url) { return null; }
}
/** @nocollapse */
SpyLocation.decorators = [
    { type: Injectable },
];
class LocationState {
    constructor(path, query) {
        this.path = path;
        this.query = query;
    }
}
//# sourceMappingURL=location_mock.js.map


text:
import logging
import sys

import openerp
from openerp import tools
from openerp.modules import module

_logger = logging.getLogger(__name__)

commands = {}

class CommandType(type):
    def __init__(cls, name, bases, attrs):
        super(CommandType, cls).__init__(name, bases, attrs)
        name = getattr(cls, name, cls.__name__.lower())
        cls.name = name
        if name != 'command':
            commands[name] = cls

class Command(object):
    """Subclass this class to define new openerp subcommands """
    __metaclass__ = CommandType

    def run(self, args):
        pass

class Help(Command):
    def run(self, args):
        print "Available commands:\n"
        for k, v in commands.items():
            print "    %s" % k

import server

def main():
    args = sys.argv[1:]

    # The only shared option is '--addons-path=' needed to discover additional
    # commands from modules
    if len(args) > 1 and args[0].startswith('--addons-path=') and not args[1].startswith("-"):
        tools.config.parse_config([args[0]])
        args = args[1:]

    # Default legacy command
    command = "server"

    # Subcommand discovery
    if len(args) and not args[0].startswith("-"):
        for m in module.get_modules():
            m = 'openerp.addons.' + m
            __import__(m)
            #try:
            #except Exception, e:
            #    raise
            #    print e
        command = args[0]
        args = args[1:]

    if command in commands:
        o = commands[command]()
        o.run(args)

# vim:et:ts=4:sw=4:


text:
class Users::OmniauthCallbacksController < Devise::OmniauthCallbacksController
	def twitter
		@user = User.from_omniauth(request.env['omniauth.auth'])

		# This code is really ugly, but it works.
		# Somehow.
		# I don't understand why
		#
		# If the user already exists, the first sign_in works.
		# But if the user didn't exist until User.from_omniauth was called, it fails.
		# But then the second sign_in works.
		# But if we don't sign out the user first, it doesn't work!
		#
		# My beautiful logical codebase is ruined forever.

		sign_in @user
		sign_out @user
		sign_in_and_redirect @user
	end
end


text:
module LitmusReseller
  VERSION = "0.0.3"
end


text:
[class^="icon-"], [class*=" icon-"] {
  font-family: 'fontello';
  font-style: normal;
  font-weight: normal;

  /* fix buttons height */
  line-height: 1em;

  /* you can be more comfortable with increased icons size */
  /* font-size: 120%; */
}

.icon-star { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
.icon-play-circled2 { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
.icon-eye { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
.icon-eye-off { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
.icon-tags { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
.icon-pencil { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
.icon-cw { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
.icon-picture { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
.icon-info { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
.icon-group { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
.icon-video-alt { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
.icon-photo { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
.icon-download-alt { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
.icon-cog { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }
.icon-left { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = ' '); }


text:
/* Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.camunda.bpm.engine.cdi.annotation;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import javax.enterprise.context.ConversationScoped;
import javax.enterprise.context.RequestScoped;
import javax.enterprise.inject.spi.PassivationCapable;

/**
 * Declare a bean to be BusinessProcessScoped. Instances of
 * BusinessProcessScoped beans are stored as process variables in a
 * ProcessInstance.
 *

 * Note: BusinessProcessScoped beans need to be {@link PassivationCapable}.
 *

 * Note: BusinessProcessScoped is not capable of managing local process variables,
 * and there is currently also no respective other implementation for that. Please use
 * {@link org.camunda.bpm.engine.cdi.BusinessProcess#setVariableLocal(String, Object)}
 * and {@link org.camunda.bpm.engine.cdi.BusinessProcess#getVariableLocal(String)}
 * or an injected Map of local process variables instead.
 *

 * If no ProcessInstance is currently managed, instances of
 * {@link BusinessProcessScoped} beans are temporarily stored in a local scope
 * (I.e. the Conversation or the Request, depending on the context, see javadoc
 * on {@link ConversationScoped} and {@link RequestScoped} to find out when
 * either context is active). If this scope is later associated with a business
 * process instance, the bean instances are flushed to the ProcessInstance.
 *

 * Example:
 *

 * {@code @BusinessProcessScoped}
 * public class Authorization implements Serializable {
 *    ...
 * }
 *

 *
 * @author Daniel Meyer
 */
@Target({ ElementType.TYPE, ElementType.FIELD, ElementType.METHOD })
@Retention(value = RetentionPolicy.RUNTIME)
public @interface BusinessProcessScoped {

}


text:
//using System;
//using System.Collections.Generic;
//using System.Data.Entity.Infrastructure;
//using System.Linq;
//using System.Threading.Tasks;
//using Ninject;
//using NUnit.Framework;
//using TeachersDiary.Clients.Mvc;
//using TeachersDiary.Data.Ef;
//using TeachersDiary.Data.Ef.Extensions;
//using TeachersDiary.Data.Ef.GenericRepository;
//using TeachersDiary.Data.Entities;
//using TeachersDiary.Data.Services.Contracts;
//using TeachersDiary.Domain;
//using TeachersDiary.Services;
//using TeachersDiary.Services.Contracts;
//using TeachersDiary.Services.Mapping;

//namespace TeachersDiary.Data.Services.Tests.Services
//{
//    [TestFixture]
//    public class ClassServicesTests
//    {
//        private static string User1Id = Guid.NewGuid().ToString();
//        private static string User2Id = Guid.NewGuid().ToString();

//        private static SchoolEntity school = new SchoolEntity()
//        {
//            Name = "School"
//        };

//        private static List<ClassEntity> classes = new List<ClassEntity>()
//        {
//            new ClassEntity()
//            {
//                Name = "1a",
//                ClassTeacherId = User1Id
//            },
//            new ClassEntity()
//            {
//                Name = "2a",
//                ClassTeacherId = User2Id
//            }
//        };

//        private static List<StudentEntity> students = new List<StudentEntity>()
//        {
//            new StudentEntity()
//            {
//                FirstName = "FirstName1",
//                LastName = "LastName1"
//            },
//            new StudentEntity()
//            {
//                FirstName = "FirstName2",
//                LastName = "LastName2"
//            }
//        };

//        private static List<AbsenceEntity> absences = new List<AbsenceEntity>
//        {
//            new AbsenceEntity()
//            {
//                Excused = 1,
//                NotExcused = 2
//            },
//            new AbsenceEntity()
//            {
//                Excused = 11,
//                NotExcused = 22
//            },
//        };

//        private static IKernel kernel;

//        [OneTimeSetUp]
//        public void OnecSetUp()
//        {
//            AutoMapperConfig.RegisterAutomapper();
//        }

//        [SetUp]
//        public void SetUp()
//        {
//            kernel = NinjectConfig.CreateKernel();
//            var dbContext = kernel.Get<TeachersDiaryDbContext>();

//            dbContext.Schools.Add(school);
//            dbContext.SaveChanges();

//            classes[0].SchoolId = school.Id;
//            classes[1].SchoolId = school.Id;

//            dbContext.Classes.AddRange(classes);
//            dbContext.SaveChanges();

//            students[0].ClassId = classes[0].Id;
//            students[1].ClassId = classes[1].Id;

//            dbContext.Students.AddRange(students);
//            dbContext.SaveChanges();

//            absences[0].StudentId = students[0].Id;
//            absences[1].StudentId = students[1].Id;

//            dbContext.Absences.AddRange(absences);
//            dbContext.SaveChanges();

//        }

//        [TearDown]
//        public void TearDown()
//        {
//            //kernel = NinjectConfig.CreateKernel();

//            // Entity Framework Optimistic Concurrency Patterns
//            // https://msdn.microsoft.com/en-us/data/jj592904
//            var dbContext = kernel.Get<TeachersDiaryDbContext>();

//            dbContext.Schools.Attach(school);
//            dbContext.Schools.Remove(school);

//            bool saveFailed;
//            do
//            {
//                saveFailed = false;

//                try
//                {
//                    dbContext.SaveChanges();
//                }
//                catch (DbUpdateConcurrencyException ex)
//                {
//                    saveFailed = true;

//                    // Update the values of the entity that failed to save from the store
//                    ex.Entries.Single().Reload();
//                }

//            } while (saveFailed);

//        }

//        [Test]
//        public async Task GetClassWithStudentsByClassIdAsync_WithValidClassId_ReturnClass()
//        {
//            // Arrange
//            //var dbContext = new TeachersDiaryDbContext();
//            //var entityframeworkRepository = new EntityFrameworkGenericRepository<ClassEntity>(dbContext);
//            //var querySettings = new QuerySettings<ClassEntity>();
//            //var mappingService = new MappingService();
//            //var encryptingService = new EncryptingService();

//            //var claaService = new ClassService(
//            //    entityframeworkRepository,
//            //    querySettings,
//            //    dbContext,
//            //    mappingService,
//            //    encryptingService);

//            var claaService = kernel.Get<IClassService>();

//            var encoderId = kernel.Get<IEncryptingService>().EncodeId(classes[0].Id);

//            // Act
//            var @class = await claaService.GetClassByClassIdAsync(encoderId);

//            // Assert
//            Assert.IsInstanceOf<ClassDomain>(@class);
//            Assert.AreEqual("1a", @class.Name);
//            Assert.AreEqual("FirstName1", @class.Students[0].FirstName);
//            Assert.AreEqual("LastName1", @class.Students[0].LastName);
//            Assert.AreEqual(1, @class.Students[0].Absences[0].Excused);
//            Assert.AreEqual(2, @class.Students[0].Absences[0].NotExcused);
//        }

//        [Test]
//        public async Task GetAllAvailableClassesForUserAsync_WhenUserIdExist_ReturnAllClasses()
//        {
//            // Arrange
//            //var dbContext = new TeachersDiaryDbContext();
//            //var entityframeworkRepository = new EntityFrameworkGenericRepository<ClassEntity>(dbContext);
//            //var querySettings = new QuerySettings<ClassEntity>();
//            //var mappingService = new MappingService();
//            //var encryptingService = new EncryptingService();

//            //var claaService = new ClassService(
//            //    entityframeworkRepository,
//            //    querySettings,
//            //    dbContext,
//            //    mappingService,
//            //    encryptingService);
//            var claaService = kernel.Get<IClassService>();

//            // Act
//            var @class = await claaService.GetClassesBySchoolIdAsync(User2Id);

//            Assert.IsInstanceOf<IEnumerable<ClassDomain>>(@class);
//            Assert.AreEqual(1, @class.Count());
//            Assert.AreEqual("2a", @class.ToList()[0].Name);
//        }

//        [Test]
//        public void AddRange_WhenPassedCollectionIsValid_ShouldAddClasesToDb()
//        {
//            // Arrange
//            var dbContext = kernel.Get<TeachersDiaryDbContext>();
//            var entityframeworkRepository = new EntityFrameworkGenericRepository<ClassEntity>(dbContext);
//            var querySettings = new QuerySettings<ClassEntity>();
//            var mappingService = new MappingService();
//            var encryptingService = new EncryptingService();

//            var claaService = new ClassService(
//                entityframeworkRepository,
//                querySettings,
//                dbContext,
//                mappingService,
//                encryptingService);

//            //var claaService = kernel.Get<IClassService>();

//            var classeCollection = new List<ClassDomain>()
//            {
//                new ClassDomain()
//                {
//                    Name = "2b",
//                    SchoolId = school.Id
//                },
//                new ClassDomain()
//                {
//                    Name = "2v",
//                    SchoolId = school.Id
//                },
//            };

//            // Act
//            claaService.AddRange(classeCollection);

//            // Assert
//            var classesInDb = dbContext.Classes.ToList();

//            Assert.AreEqual(4, classesInDb.Count);
//        }

//        [Test]
//        public async Task DeleteByIdAsync_WhenClassIdExist_ShouldRemoveClassFromDb()
//        {
//            // Arrange
//            var dbContext = kernel.Get<TeachersDiaryDbContext>();

//            var entityframeworkRepository = new EntityFrameworkGenericRepository<ClassEntity>(dbContext);
//            var querySettings = new QuerySettings<ClassEntity>();
//            var mappingService = new MappingService();
//            var encryptingService = new EncryptingService();

//            var claaService = new ClassService(
//                entityframeworkRepository,
//                querySettings,
//                dbContext,
//                mappingService,
//                encryptingService);

//            var decodedClassId = encryptingService.EncodeId(classes[0].Id);

//            // Act
//            await claaService.DeleteByIdAsync(decodedClassId);

//            // Assert
//            var classesInDb = dbContext.Classes.ToList();

//            Assert.AreEqual(1, classesInDb.Count);
//            Assert.AreEqual("2a", classesInDb[0].Name);
//        }

//        [Test]
//        public async Task DeleteByIdAsync_WhenClassIdDoestExist_ShouldNotRemoveClassFromDb()
//        {
//            // Arrange
//            var dbContext = new TeachersDiaryDbContext();
//            var entityframeworkRepository = new EntityFrameworkGenericRepository<ClassEntity>(dbContext);
//            var querySettings = new QuerySettings<ClassEntity>();
//            var mappingService = new MappingService();
//            var encryptingService = new EncryptingService();

//            var claaService = new ClassService(
//                entityframeworkRepository,
//                querySettings,
//                dbContext,
//                mappingService,
//                encryptingService);

//            var decodedClassId = encryptingService.EncodeId(0);

//            // Act
//            await claaService.DeleteByIdAsync(decodedClassId);

//            // Assert
//            var classesInDb = dbContext.Classes.ToList();

//            Assert.AreEqual(2, classesInDb.Count);
//        }
//    }
//}


text:
/**
 * @file b2entity.h
 *
 * @brief The B2Entity header file.
 */

#ifndef B2ENTITY_H
#define B2ENTITY_H

#include "sprite.h"
#include "debugRenderer.h"
#include "resourceManager.h"

#include <Box2D/Box2D.h>

/// @brief Shape specifies a shape
enum Shape {
	box,
	circle
};

/**
 * @brief The B2Entity class
 */
class B2Entity : public Sprite {
friend class DebugRenderer;
public:
	/// @brief Constructor of the B2Entity
	/// @param width is the width of the sprite
	/// @param height is the height of the sprite
	/// @param textureID is the texture that will be used. If textureID = 0 then a color will be used instead
	/// @param world is a b2world
	B2Entity(int width, int height, unsigned int textureID, b2World* world);
	/// @brief Destructor of the B2Entity
	virtual ~B2Entity();

	/// @brief UpdateChilderen updates all of the childerens position, angle and scale of this B2Entity by a specified parent. UpdateChilderen will call first the Draw method then the Update Method and then it will call the UpdateChilderen function of that Entity
	/// @param parent the parent of the childeren which is in almost every case 'this'
	/// @param deltaTime is the deltaTime
	/// @return void
	virtual void UpdateChilderen(Entity* parent, double deltaTime);
	/// @brief DrawChilderen works the same as UpdateChilderen only difference is that the Update method is not called. This can be usefull for when pausing the game but still wanting to render everything
	/// @param parent the parent of the childeren which is in almsot every case 'this'
	/// @return void
	virtual void DrawChilderen(Entity* parent);

	/// @brief Draw submits this B2Entity to a simpleRenderer and also to the debugRenderer if this B2Entity has a body
	virtual void Draw();

	/// @brief CreateBoxCollider creates a body and a fixutre and adds it to the b2World
	/// @param w the width of the box2D body
	/// @param h the height of the box2D body
	/// @param pivot the pivot of the box2D body
	/// @param dynamic if true the body will be dynamic that means that it will be affected by physics if false it will be static and not affected by physics
	/// @param sensor if true the body can overlap with the other body's but still detects collision
	/// @return void
	virtual void CreateBoxCollider(int w, int h, glm::vec2 pivot, bool dynamic, bool sensor);

	/// @brief CreateCircleCollider creates a body and a fixutre and adds it to the b2World
	/// @param radius is the radius of the circle
	/// @param dynamic if true the body will be dynamic that means that it will be affected by physics if false it will be static and not affected by physics
	/// @param sensor if true the body can overlap with the other body's but still detects collision
	/// @return void
	virtual void CreateCircleCollider(int radius, bool dynamic, bool sensor);

	/// @brief SetDebugColor sets the debugColor of the collider
	/// @param color is the new color
	/// @return void
	void SetDebugColor(glm::vec3 color);
	/// @brief GetDebugColor return the current debug color
	/// @return glm::vec3
	glm::vec3 GetDebugColor() { return debugColor; };

	/// @brief AppllyVelocityB2body moves the B2Entity but it can not move through other colliders it also return the new position of the B2Entity
	/// @return glm::vec2
	glm::vec2 ApplyVelocityB2body(glm::vec2 velocity);

	/// @brief GetColliderWidth return the collider width
	/// @return int
	int GetColliderWidth();
	/// @brief GetColliderHeight returns the collider height
	/// @return int
	int GetColliderHeight();
	/// @brief GetColliderPivot returns the pivot of the collider
	/// @return glm::vec2
	glm::vec2 GetColliderPivot() { return colliderPivot; };

	/// @brief GetShape returns the shape of the collider
	/// @return Shape
	Shape GetShape() { return shape; };

	/// @brief SetFilter sets a filter for the B2Entity that can be used for detecting what kind of objects you are colliding with
	/// @param filter the filter you want to set
	/// @return void
	virtual void SetFilter(unsigned int filter) { this->filter = filter; };
	/// @brief GetFilter returns the filter
	/// @return unsigned int
	unsigned int GetFilter() { return filter; };

	/// @brief AddContact a B2Entity will be added whenever this b2Entity fixture collided with an other fixture
	/// @brief The ContactListener class takes care of adding the contacts to this class. You can access the contacts by the a vector named contacts that is protected for this class
	/// @return void
	void AddContact(B2Entity* contact);

	/// @brief RemoveContact a B2Entity will be removed whenever a collision between two fixtures stops. The ContacListener will take care of this function
	/// @return void
	void RemoveContact(B2Entity* contact);

	/// @brief Contact check if the contact is colliding with this B2Entity
	/// @return bool
	bool Contact(B2Entity* contact);

	/// @brief GetAllContacts returns all of the current contacts of this B2Entity
	/// @return vector<B2Entity*>
	std::vector<B2Entity*> GetAllContacts();

	/// @brief SetActive will set the b2Body active or not
	/// @param active If true the body will be active othterwise not
	/// @return void
	virtual void SetActive(bool active);

	static float m2p; ///< @brief m2p stands for meter to pixels because box2D works in meters
	static float p2m; ///< @brief p2m stands for pixel to meter because box2D works in meters

protected:
	unsigned int filter; ///< @brief filter the filter of this B2Entity
	Shape shape; ///< @brief shape the shape of the collider of this B2Entity
	int colliderWidth; ///< @brief colliderWidth is the width of the collider
	int colliderHeight; ///< @brief colliderHeight is the height of the collider
	glm::vec2 colliderPivot; ///< @brief colliderPivot is the pivot if the colliders
	glm::vec3 debugColor; ///< @brief debugColor is the color used by the DebugRenderer
	b2Body* body; ///< @brief body is the body of the collider
	b2World* world; ///< @brief world is the box2D world
	b2Fixture* fixture; ///< @brief fixture is the fixture of the body
	std::vector<B2Entity*> contacts; ///< @brief contacts is a vector with all of the contacts that this B2Entity(fixture) is colliding with

};
#endif // !B2ENTITY_H


text:
CXFA_ImageRenderer::CXFA_ImageRenderer(CFX_RenderDevice* pDevice,
                                       const RetainPtr<CFX_DIBBase>& pDIBBase,
                                       const CFX_Matrix* pImage2Device)
    : m_pDevice(pDevice), m_ImageMatrix(*pImage2Device), m_pDIBBase(pDIBBase) {}

CXFA_ImageRenderer::~CXFA_ImageRenderer() = default;

bool CXFA_ImageRenderer::Start() {
  FXDIB_ResampleOptions options;
  options.bInterpolateBilinear = true;
  if (m_pDevice->StartDIBits(m_pDIBBase, 255, 0, m_ImageMatrix, options,
                             &m_DeviceHandle)) {
    if (m_DeviceHandle) {
      m_Status = 3;
      return true;
    }
    return false;
  }
  CFX_FloatRect image_rect_f = m_ImageMatrix.GetUnitRect();
  FX_RECT image_rect = image_rect_f.GetOuterRect();
  int dest_width = image_rect.Width();
  int dest_height = image_rect.Height();
  if ((fabs(m_ImageMatrix.b) >= 0.5f || m_ImageMatrix.a == 0) ||
      (fabs(m_ImageMatrix.c) >= 0.5f || m_ImageMatrix.d == 0)) {
    RetainPtr<CFX_DIBBase> pDib = m_pDIBBase;
    if (m_pDIBBase->HasAlpha() &&
        !(m_pDevice->GetRenderCaps() & FXRC_ALPHA_IMAGE) &&
        !(m_pDevice->GetRenderCaps() & FXRC_GET_BITS)) {
      m_pCloneConvert = m_pDIBBase->CloneConvert(FXDIB_Rgb);
      if (!m_pCloneConvert)
        return false;

      pDib = m_pCloneConvert;
    }
    FX_RECT clip_box = m_pDevice->GetClipBox();
    clip_box.Intersect(image_rect);
    m_Status = 2;
    m_pTransformer = pdfium::MakeUnique<CFX_ImageTransformer>(
        pDib, m_ImageMatrix, options, &clip_box);
    return true;
  }
  if (m_ImageMatrix.a < 0)
    dest_width = -dest_width;
  if (m_ImageMatrix.d > 0)
    dest_height = -dest_height;
  int dest_left, dest_top;
  dest_left = dest_width > 0 ? image_rect.left : image_rect.right;
  dest_top = dest_height > 0 ? image_rect.top : image_rect.bottom;
  if (m_pDIBBase->IsOpaqueImage()) {
    if (m_pDevice->StretchDIBitsWithFlagsAndBlend(
            m_pDIBBase, dest_left, dest_top, dest_width, dest_height, options,
            BlendMode::kNormal)) {
      return false;
    }
  }
  if (m_pDIBBase->IsAlphaMask()) {
    if (m_pDevice->StretchBitMaskWithFlags(m_pDIBBase, dest_left, dest_top,
                                           dest_width, dest_height, 0,
                                           options)) {
      return false;
    }
  }

  FX_RECT clip_box = m_pDevice->GetClipBox();
  FX_RECT dest_rect = clip_box;
  dest_rect.Intersect(image_rect);
  FX_RECT dest_clip(
      dest_rect.left - image_rect.left, dest_rect.top - image_rect.top,
      dest_rect.right - image_rect.left, dest_rect.bottom - image_rect.top);
  RetainPtr<CFX_DIBitmap> pStretched =
      m_pDIBBase->StretchTo(dest_width, dest_height, options, &dest_clip);
  if (pStretched)
    CompositeDIBitmap(pStretched, dest_rect.left, dest_rect.top);

  return false;
}

bool CXFA_ImageRenderer::Continue() {
  if (m_Status == 2) {
    if (m_pTransformer->Continue(nullptr))
      return true;

    RetainPtr<CFX_DIBitmap> pBitmap = m_pTransformer->DetachBitmap();
    if (!pBitmap)
      return false;

    if (pBitmap->IsAlphaMask()) {
      m_pDevice->SetBitMask(pBitmap, m_pTransformer->result().left,
                            m_pTransformer->result().top, 0);
    } else {
      m_pDevice->SetDIBitsWithBlend(pBitmap, m_pTransformer->result().left,
                                    m_pTransformer->result().top,
                                    BlendMode::kNormal);
    }
    return false;
  }
  if (m_Status == 3)
    return m_pDevice->ContinueDIBits(m_DeviceHandle.get(), nullptr);

  return false;
}

void CXFA_ImageRenderer::CompositeDIBitmap(
    const RetainPtr<CFX_DIBitmap>& pDIBitmap,
    int left,
    int top) {
  if (!pDIBitmap)
    return;

  if (!pDIBitmap->IsAlphaMask()) {
    if (m_pDevice->SetDIBits(pDIBitmap, left, top))
      return;
  } else if (m_pDevice->SetBitMask(pDIBitmap, left, top, 0)) {
    return;
  }

  bool bGetBackGround = ((m_pDevice->GetRenderCaps() & FXRC_ALPHA_OUTPUT)) ||
                        (!(m_pDevice->GetRenderCaps() & FXRC_ALPHA_OUTPUT) &&
                         (m_pDevice->GetRenderCaps() & FXRC_GET_BITS));
  if (bGetBackGround) {
    if (pDIBitmap->IsAlphaMask())
      return;

    m_pDevice->SetDIBitsWithBlend(pDIBitmap, left, top, BlendMode::kNormal);
    return;
  }
  if (!pDIBitmap->HasAlpha() ||
      (m_pDevice->GetRenderCaps() & FXRC_ALPHA_IMAGE)) {
    return;
  }

  RetainPtr<CFX_DIBitmap> pCloneConvert = pDIBitmap->CloneConvert(FXDIB_Rgb);
  if (!pCloneConvert)
    return;

  CXFA_ImageRenderer imageRender(m_pDevice.Get(), pCloneConvert,
                                 &m_ImageMatrix);
  if (!imageRender.Start())
    return;

  while (imageRender.Continue())
    continue;
}


text:
__author__ = 'thor'

import pandas as pd
import os
import subprocess
from bs4 import BeautifulSoup
import copy
import itertools
import numpy as np
from hashlib import md5

import ut as ms
from ut.daf.manip import recursive_update
from ut.util.ulist import sort_as
from ut.daf.resources.disp_templates import inline_html_table_template

from collections import OrderedDict

def sr_to_ordered_dict(sr):
    return OrderedDict(iter(sr.items()))

def map_strings_to_their_mp5s(df, cols_to_map):
    if isinstance(cols_to_map, str):
        cols_to_map = [cols_to_map]

    def md5_of(s):
        m = md5()
        m.update(s)
        return m.hexdigest()

    df = df.copy()
    for c in cols_to_map:
        df[c] = df[c].apply(md5_of)

    return df

def map_vals_to_ints_inplace(df, cols_to_map):
    """
    map_vals_to_ints_inplace(df, cols_to_map) will map columns of df inplace
    If cols_to_map is a string, a single column will be mapped to consecutive integers from 0 onwards.
    Elif cols_to_map is a dict, the function will attempt to map the columns dict.keys() using the (list-like)
        maps specified in dict.values()
    Else assumed that cols_to_map is list-like specifying columns to be mapped

    Note: If no mapping is specified (i.e. cols_to_map is not a dict), the function will return the mapping dict,
    which is of the form mapping_dict[col][val] := mapped val for col.
    This can be used to reverse the operation, i.e.:
        mapping_dict = map_vals_to_ints_inplace(df, cols_to_map)
        map_vals_to_ints_inplace(df, mapping_dict)
        will leave df unchanged
    This can also be used to apply the same mapping to multiple columns. To apply the same mapping to A and B:
        mapping_dict = map_vals_to_ints_inplace(df, ['A'])
        map_vals_to_ints_inplace(df,
            cols_to_map={'B': dict(zip(mapping_dict['A'], range(len(mapping_dict['A']))))})

    """
    mapping_dict = dict()

    if isinstance(cols_to_map, str):  # mapping a single column
        mapping_dict, df[cols_to_map] = np.unique(df[cols_to_map], return_inverse=True)
        mapping_dict = {cols_to_map: mapping_dict}
    elif isinstance(cols_to_map, dict):  # mapping with a user specified map
        assert set(cols_to_map.keys()).issubset(
            df.columns
        ), 'cols_to_map keys must be a subset of df columns'
        for c in list(cols_to_map.keys()):
            this_map = cols_to_map[c]
            if isinstance(this_map, dict):
                assert all(
                    np.unique(list(this_map.values()))
                    == np.array(list(range(len(this_map))))
                ), 'you must map to consecutive integers starting at 0'
                df[c] = df[c].apply(lambda x: this_map[x])
                mapping_dict[c] = sort_as(
                    list(this_map.keys()), list(this_map.values())
                )
            else:
                df[c] = np.array(this_map)[list(df[c])]
                mapping_dict[c] = this_map
    else:  # mapping multiple columns
        for c in cols_to_map:
            mapping_dict.update(map_vals_to_ints_inplace(df, c))
    # return the mapping dict
    return mapping_dict

def to_html(df, template='hor-minimalist-b', template_overwrites=None, **kwargs):
    """
    enhancing pandas' to_html function to format html nicer
    """
    # getting the template
    if isinstance(template, str):
        template = copy.deepcopy(inline_html_table_template[template])
    # making some requested template changes
    recursive_update(template, template_overwrites)
    # serializing the styles
    for k in list(template.keys()):
        if 'style' in list(template[k].keys()):
            if not isinstance(template[k]['style'], str):
                template[k]['style'] = '; '.join(
                    [kk + ': ' + v for kk, v in list(template[k]['style'].items())]
                )
    # start with the pandas generated html (soup)
    b = BeautifulSoup(df.to_html(**kwargs))
    # update table formatting
    recursive_update(b.find('table').attrs, template['table'])
    # update thead.th formatting
    [
        recursive_update(x.attrs, template['thead'])
        for x in b.find('thead').find_all('th')
    ]
    # update tboday.tr.td formatting
    [
        recursive_update(x.attrs, template['tbody'])
        for x in list(
            itertools.chain.from_iterable(
                [
                    x.find_all('td')
                    for x in [xx for xx in b.find('tbody').find_all('tr')]
                ]
            )
        )
    ]
    return b.renderContents()

def insert_in_mongdb(df, collection, delete_previous_contents=False, **kwargs):
    """
    insert the rows of the dataframe df (as dicts) in the given collection.
    If you want to do it given a mongo_db and a collection_name:
        insert_in_mongdb(df, getattr(mongo_db, collection_name), **kwargs):
    If you want to do it given (a client, and...) a db name and collection name:
        insert_in_mongdb(df, getattr(getattr(client, db_name), collection_name), **kwargs):
    """
    if delete_previous_contents:
        collection_name = collection.name
        mother_db = collection.database
        mother_db.drop_collection(collection_name)
        mother_db.create_collection(collection_name)
    kwargs = dict(kwargs, **{'safe': True})  # default is safe=True
    collection.insert(dict_list_of_rows(df), **kwargs)

### Don't know where I was inspired by this version below, but anyway, I think my newer version is simpler and faster
# def insert_in_mongdb(df, mongo_db, collection_name, ubiquitous_dict=None, **kwargs):
#     kwargs = dict(kwargs, **{'safe': True})
#     mdb_collection = getattr(mongo_db, collection_name)
#     if ubiquitous_dict is None:
#         for i in range(len(df)):
#             mdb_collection.insert(df.iloc[i].to_dict(), **kwargs)
#     elif isinstance(ubiquitous_dict, dict):
#         for i in range(len(df)):
#             mdb_collection.insert(dict(ubiquitous_dict, **df.iloc[i].to_dict()), **kwargs)
#     else:
#         raise TypeError("I don't know this type of ubiquitous_dict!!")

def dict_list_of_rows(df, dropna=False):
    if dropna:
        return [
            {k: v for k, v in x.items() if not isinstance(v, float) or not np.isnan(v)}
            for x in df.transpose().to_dict().values()
        ]
    else:
        return [x for x in df.transpose().to_dict().values()]
    # is 1.62 times faster than [dict(row) for i, row in df.iterrows()] in case you were wondering

def dict_list_of_cols(df):
    DeprecationWarning('Come on! Use df.to_dict() directly would you?!')
    return df.to_dict()

def zip_pickle(df, filepath):
    df.to_pickle(filepath)
    zippath = ms.pfile.to.zip_file(filepath)
    os.remove(filepath)
    return zippath

def gzip_pickle(df, filepath):
    df.to_pickle(filepath)
    subprocess.check_call(['gzip', filepath])
    os.remove(filepath)
    return filepath + '.gzip'

def excel_multiple_sheets(
    df_enum, xls_filepath='excel_multiple_sheets.xlsx', sheet_names=None, **kwargs
):
    """
    Saves multiple dataframes (or one if you want) to multiple sheets of a same excel file
    Works with an enumeration (so could come from a generator) of dataframes.
    """

    if isinstance(df_enum, pd.DataFrame):
        df_enum = [df_enum]
    # choose different defaults than pd.to_excel
    kwargs = dict({'index': False}, **kwargs)
    # write the dataframes
    excel_writer = pd.ExcelWriter(xls_filepath)
    for n, df in enumerate(df_enum):
        if sheet_names is None:
            this_sheet_name = 'Sheet%s' % n
        else:
            this_sheet_name = sheet_names[n]
        df.to_excel(excel_writer=excel_writer, sheet_name=this_sheet_name, **kwargs)
    excel_writer.save()
    excel_writer.close()


text:
package com.navercorp.pinpoint.web.dao.hbase;

import com.navercorp.pinpoint.common.hbase.HbaseColumnFamily;
import com.navercorp.pinpoint.common.hbase.HbaseOperations2;
import com.navercorp.pinpoint.common.hbase.RowMapper;
import com.navercorp.pinpoint.common.hbase.TableDescriptor;
import com.navercorp.pinpoint.web.dao.ApplicationIndexDao;
import com.navercorp.pinpoint.web.vo.Application;

import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.collections.MapUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.hadoop.hbase.TableName;
import org.apache.hadoop.hbase.client.Delete;
import org.apache.hadoop.hbase.client.Get;
import org.apache.hadoop.hbase.client.Scan;
import org.apache.hadoop.hbase.util.Bytes;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Repository;

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

/**
 * @author netspider
 * @author emeroad
 */
@Repository
public class HbaseApplicationIndexDao implements ApplicationIndexDao {

    @Autowired
    private HbaseOperations2 hbaseOperations2;

    @Autowired
    @Qualifier("applicationNameMapper")
    private RowMapper<List<Application>> applicationNameMapper;

    @Autowired
    @Qualifier("agentIdMapper")
    private RowMapper<List<String>> agentIdMapper;

    @Autowired
    private TableDescriptor<HbaseColumnFamily.ApplicationIndex> descriptor;

    @Override
    public List<Application> selectAllApplicationNames() {
        Scan scan = new Scan();
        scan.setCaching(30);
        scan.addFamily(descriptor.getColumnFamilyName());

        TableName applicationIndexTableName = descriptor.getTableName();
        List<List<Application>> results = hbaseOperations2.find(applicationIndexTableName, scan, applicationNameMapper);
        List<Application> applications = new ArrayList<>();
        for (List<Application> result : results) {
            applications.addAll(result);
        }
        return applications;
    }

    @Override
    public List<String> selectAgentIds(String applicationName) {
        if (applicationName == null) {
            throw new NullPointerException("applicationName must not be null");
        }
        byte[] rowKey = Bytes.toBytes(applicationName);

        Get get = new Get(rowKey);
        get.addFamily(descriptor.getColumnFamilyName());

        TableName applicationIndexTableName = descriptor.getTableName();
        return hbaseOperations2.get(applicationIndexTableName, get, agentIdMapper);
    }

    @Override
    public void deleteApplicationName(String applicationName) {
        byte[] rowKey = Bytes.toBytes(applicationName);
        Delete delete = new Delete(rowKey);

        TableName applicationIndexTableName = descriptor.getTableName();
        hbaseOperations2.delete(applicationIndexTableName, delete);
    }

    @Override
    public void deleteAgentIds(Map<String, List<String>> applicationAgentIdMap) {
        if (MapUtils.isEmpty(applicationAgentIdMap)) {
            return;
        }

        List<Delete> deletes = new ArrayList<>(applicationAgentIdMap.size());

        for (Map.Entry<String, List<String>> entry : applicationAgentIdMap.entrySet()) {
            String applicationName = entry.getKey();
            List<String> agentIds = entry.getValue();
            if (StringUtils.isEmpty(applicationName) || CollectionUtils.isEmpty(agentIds)) {
                continue;
            }
            Delete delete = new Delete(Bytes.toBytes(applicationName));
            for (String agentId : agentIds) {
                if (!StringUtils.isEmpty(agentId)) {
                    delete.addColumns(descriptor.getColumnFamilyName(), Bytes.toBytes(agentId));
                }
            }
            // don't delete if nothing has been specified except row
            if (!delete.getFamilyCellMap().isEmpty()) {
                deletes.add(delete);
            }
        }

        TableName applicationIndexTableName = descriptor.getTableName();
        hbaseOperations2.delete(applicationIndexTableName, deletes);
    }

    @Override
    public void deleteAgentId(String applicationName, String agentId) {
        if (StringUtils.isEmpty(applicationName)) {
            throw new IllegalArgumentException("applicationName cannot be empty");
        }
        if (StringUtils.isEmpty(agentId)) {
            throw new IllegalArgumentException("agentId cannot be empty");
        }
        byte[] rowKey = Bytes.toBytes(applicationName);
        Delete delete = new Delete(rowKey);
        byte[] qualifier = Bytes.toBytes(agentId);
        delete.addColumns(descriptor.getColumnFamilyName(), qualifier);

        TableName applicationIndexTableName = descriptor.getTableName();
        hbaseOperations2.delete(applicationIndexTableName, delete);
    }

}


text:
package io.jboot.support.metric.interceptor;

import com.codahale.metrics.Counter;
import com.jfinal.aop.Interceptor;
import com.jfinal.aop.Invocation;
import io.jboot.Jboot;
import io.jboot.support.metric.annotation.EnableMetricConcurrency;
import io.jboot.utils.AnnotationUtil;
import io.jboot.utils.StrUtil;

public class MetricConcurrencyInterceptor implements Interceptor {

    @Override
    public void intercept(Invocation inv) {

        Counter concurrencyRecord = null;
        EnableMetricConcurrency concurrencyAnnotation = inv.getMethod().getAnnotation(EnableMetricConcurrency.class);
        if (concurrencyAnnotation != null) {
            String value = AnnotationUtil.get(concurrencyAnnotation.value());
            String name = StrUtil.isBlank(value)
                    ? inv.getController().getClass().getName() + "." + inv.getMethodName() + ".concurrency"
                    : value;

            concurrencyRecord = Jboot.getMetric().counter(name);
            concurrencyRecord.inc();
        }

        try {
            inv.invoke();
        } finally {
            if (concurrencyRecord != null) {
                concurrencyRecord.dec();
            }
        }
    }

}


text:
#ifndef IVW_RAYPLANEINTERSECTION_H
#define IVW_RAYPLANEINTERSECTION_H

#include <inviwo/core/common/inviwocoredefine.h>
#include <inviwo/core/common/inviwo.h>

namespace inviwo {

/**
 * \brief Intersection test of a ray with a plane. If intersecting, t1 is the point of intersection along the ray
 *
 *
 * @param planePos Point in the plane
 * @param planeNormal Plane normal
 * @param o Ray origin
 * @param d Ray direction
 * @param t0 Parameterized start position along ray
 * @param t1 Parameterized end position along ray
 * @return True if intersecting, otherwise false. t1 will contain the point of intersection along the ray if intersecting.
 */
IVW_CORE_API bool rayPlaneIntersection(const vec3& planePos, const vec3& planeNormal, const vec3& o, const vec3& d, float * __restrict t0, float* __restrict t1);

} // namespace

#endif // IVW_RAYPLANEINTERSECTION_H


text:
<doctrine-mapping
        xmlns="http://doctrine-project.org/schemas/phpcr-odm/phpcr-mapping"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://doctrine-project.org/schemas/phpcr-odm/phpcr-mapping
           https://github.com/doctrine/phpcr-odm/raw/master/doctrine-phpcr-odm-mapping.xsd">

    <document name="Valiton\Bundle\MultiSiteBundle\Document\MultiSiteRoute" />

</doctrine-mapping>


text:
namespace windy {
	namespace animation {
		class timeline;
	}

	namespace content {

		class edition;
		class project;
		class properties;

		class environment {

		public:
			environment();

			void trigger_recalculation();

		public:
			std::shared_ptr<class content::edition> edition();
			std::shared_ptr<class content::project> project();
			std::shared_ptr<class content::properties> properties();
			std::shared_ptr<class animation::timeline> timeline();

		private:
			std::shared_ptr<class content::edition>				_edition;
			std::shared_ptr<class content::project>				_project;
			std::shared_ptr<class content::properties>			_properties;
			std::shared_ptr<class animation::timeline>			_timeline;

		};
	}
}

#endif


text:
import mustSatisfy from '../checks/mustSatisfy';
import isUndefined from '../checks/isUndefined';

function beUndefined() {
    return "be 'undefined'"
}

export default function(name: string, value: any, contextBuilder?: () => string): any {
    mustSatisfy(name, isUndefined(value), beUndefined, contextBuilder);
    return value;
}


text:
<?xml version =	'1.0' encoding = 'ISO-8859-1'?>
<config>
	<boot locales="fr_FR">
		<plugin class="io.vertigo.core.plugins.resource.classpath.ClassPathResourceResolverPlugin" />
	</boot>

	<module name="vertigo-commons">
		<component api="ScriptManager" class="io.vertigo.commons.impl.script.ScriptManagerImpl">
			<plugin class="io.vertigo.commons.plugins.script.janino.JaninoExpressionEvaluatorPlugin" />
		</component>
		<component api="DaemonManager" class="io.vertigo.commons.impl.daemon.DaemonManagerImpl" />
		<component api="FileManager" class="io.vertigo.dynamo.impl.file.FileManagerImpl" />
	</module>

	<module name="vertigo-publisher">
		<component api="PublisherManager" class="io.vertigo.quarto.publisher.impl.PublisherManagerImpl">
			<plugin class="io.vertigo.quarto.plugins.publisher.odt.OpenOfficeMergerPlugin" />
		</component>
	</module>

	<module name="myApp">
		<definitions>
			<provider class="io.vertigo.dynamo.plugins.environment.DynamoDefinitionProvider">
				<resource type="kpr" path="io/vertigo/quarto/publisher/data/execution.kpr" />
			</provider>
			<provider class="io.vertigo.quarto.publisher.standard.TestStandardPublisherDefinitionProvider" />
		</definitions>
	</module>
</config>