text:
package org.eclipse.cdt.internal.index.tests;

import java.util.Arrays;

import junit.framework.TestSuite;

import org.eclipse.cdt.core.CCorePlugin;
import org.eclipse.cdt.core.dom.IPDOMManager;
import org.eclipse.cdt.core.dom.ast.ASTTypeUtil;
import org.eclipse.cdt.core.dom.ast.DOMException;
import org.eclipse.cdt.core.dom.ast.IBinding;
import org.eclipse.cdt.core.dom.ast.ICompositeType;
import org.eclipse.cdt.core.dom.ast.IEnumeration;
import org.eclipse.cdt.core.dom.ast.IEnumerator;
import org.eclipse.cdt.core.dom.ast.IFunction;
import org.eclipse.cdt.core.dom.ast.IParameter;
import org.eclipse.cdt.core.dom.ast.IType;
import org.eclipse.cdt.core.dom.ast.ITypedef;
import org.eclipse.cdt.core.dom.ast.IValue;
import org.eclipse.cdt.core.dom.ast.IVariable;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPBase;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassTemplate;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPConstructor;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPEnumeration;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPField;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPFunction;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPMember;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPMethod;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPNamespace;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPNamespaceAlias;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPReferenceType;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateNonTypeParameter;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateParameter;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateTemplateParameter;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateTypeParameter;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPVariable;
import org.eclipse.cdt.core.index.IIndex;
import org.eclipse.cdt.core.index.IIndexBinding;
import org.eclipse.cdt.core.index.IndexFilter;
import org.eclipse.cdt.core.model.ICProject;
import org.eclipse.cdt.core.testplugin.CProjectHelper;
import org.eclipse.cdt.core.testplugin.util.TestSourceReader;
import org.eclipse.cdt.internal.core.pdom.CModelListener;
import org.eclipse.cdt.internal.core.pdom.dom.PDOMFile;
import org.eclipse.cdt.internal.core.pdom.dom.PDOMNode;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IAdaptable;

public class IndexUpdateTests extends IndexTestBase {
	private static final String EXPLICIT = "explicit";
	private static final String VIRTUAL = "virtual";
	private static final String PURE_VIRTUAL= "pure-virtual";
	private static final String PROTECTED = "protected";
	private static final String PUBLIC = "public";
	private static final String PRIVATE = "private";
	private static final String CHAR = "char";
	private static final String INLINE = "inline";
	private static final String MUTABLE = "mutable";
	private static final String STATIC = "static";
	private static final String REGISTER = "register";
	private static final String AUTO = "auto";
	private static final String SHORT = "short int";
	private static final String INT = "int";
	private static final String IMPLICIT= "implicit";

	public static TestSuite suite() {
		TestSuite suite= suite(IndexUpdateTests.class, "_");
		suite.addTest(new IndexUpdateTests("deleteProject"));
		return suite;
	}

	private ICProject fCppProject;
	private ICProject fCProject;
	private IIndex fIndex;
	private CharSequence[] fContents;
	private IFile fFile;
	private IFile fHeader;
	private int fContentUsed;

	public IndexUpdateTests(String name) {
		super(name);
	}

	@Override
	public void setUp() throws Exception {
		super.setUp();
		if (fCppProject == null) {
			fCppProject= CProjectHelper.createCCProject("indexUpdateTestsCpp", null, IPDOMManager.ID_FAST_INDEXER);
		}
		if (fCProject == null) {
			fCProject= CProjectHelper.createCProject("indexUpdateTestsC", null, IPDOMManager.ID_FAST_INDEXER);
		}
		waitForIndexer(fCppProject);
		waitForIndexer(fCProject);
		fIndex= CCorePlugin.getIndexManager().getIndex(new ICProject[] {fCProject, fCppProject});
	}

	private void setupHeader(int totalFileVersions, boolean cpp) throws Exception {
		if (fContents == null) {
			fContents= getContentsForTest(totalFileVersions);
			fContentUsed= -1;
		}
		IProject project= cpp ? fCppProject.getProject() : fCProject.getProject();
		fHeader= TestSourceReader.createFile(project, "header.h", fContents[++fContentUsed].toString());
		waitForIndexer(fCppProject);
		waitForIndexer(fCProject);
	}

	private void updateHeader() throws Exception {
		// Append variable comment to the end of the file to change its contents.
		// Indexer would not reindex the file if its contents remain the same.
		IProject project= fHeader.getProject();
		fHeader= TestSourceReader.createFile(project, "header.h",
				fContents[++fContentUsed].toString() + "\n// " + fContentUsed);
		waitUntilFileIsIndexed(fIndex, fHeader);
	}

	private void setupFile(int totalFileVersions, boolean cpp) throws Exception {
		if (fContents == null) {
			fContents= getContentsForTest(totalFileVersions);
			fContentUsed= -1;
		}
		ICProject cproject= cpp ? fCppProject : fCProject;
		fFile= TestSourceReader.createFile(cproject.getProject(), "file" + (cpp ? ".cpp" : ".c"), fContents[++fContentUsed].toString());
		TestSourceReader.waitUntilFileIsIndexed(fIndex, fFile, INDEXER_TIMEOUT_MILLISEC);
		waitForIndexer(cproject);
	}

	private void updateFile() throws Exception {
		// Append variable comment to the end of the file to change its contents.
		// Indexer would not reindex the file if its contents remain the same.
		fFile= TestSourceReader.createFile(fFile.getParent(), fFile.getName(),
				fContents[++fContentUsed].toString() + "\n// " + fContentUsed);
		waitUntilFileIsIndexed(fIndex, fFile);
	}

	@Override
	public void tearDown() throws Exception {
		fIndex= null;
		if (fFile != null) {
			fFile.delete(true, npm());
		}
		if (fHeader != null) {
			fHeader.delete(true, npm());
		}
		super.tearDown();
	}

	public void deleteProject() {
		if (fCProject != null) {
			CProjectHelper.delete(fCProject);
			fCProject= null;
		}
		if (fCppProject != null) {
			CProjectHelper.delete(fCppProject);
			fCppProject= null;
		}
	}

	// int globalVar;

	// short globalVar;

	// auto int globalVar;

	// register int globalVar;
	public void testGlobalCVariable() throws Exception {
		setupFile(4, false);
		checkVariable("globalVar", INT, new String[] {});
		updateFile();
		checkVariable("globalVar", SHORT, new String[] {});
		updateFile();
		checkVariable("globalVar", INT, new String[] {AUTO});
		updateFile();
		checkVariable("globalVar", INT, new String[] {REGISTER});
	}

	private void checkVariable(String name, String type, String[] modifiers) throws Exception {
		fIndex.acquireReadLock();
		try {
			IVariable var = (IVariable) findBinding(name);
			checkVariable(var, type, modifiers);
		} finally {
			fIndex.releaseReadLock();
		}
	}

	private void checkValue(String name, Long value) throws Exception {
		fIndex.acquireReadLock();
		try {
			IBinding b = findBinding(name);
			IValue v= null;
			if (b instanceof IVariable)
				v= ((IVariable) b).getInitialValue();
			else if (b instanceof IEnumerator)
				v= ((IEnumerator) b).getValue();
			else
				fail();

			if (value == null)
				assertNull(v);
			else
				assertEquals(value, v.numericalValue());
		} finally {
			fIndex.releaseReadLock();
		}
	}

	private void checkVariable(IVariable var, String type, String[] modifiers) throws DOMException {
		assertEquals(msg(), type, ASTTypeUtil.getType(var.getType()));
		checkModifier(modifiers, AUTO, var.isAuto());
		checkModifier(modifiers, REGISTER, var.isRegister());
		checkModifier(modifiers, STATIC, var.isStatic());
	}

	private void checkModifier(String[] modifiers, String modifier, boolean actual) throws DOMException {
		assertEquals(msg(modifier), hasMod(modifiers, modifier), actual);
	}

	private boolean hasMod(String[] modifiers, String mod) {
		return Arrays.asList(modifiers).contains(mod);
	}

	private IIndexBinding findBinding(String name) throws CoreException {
		String[] names= name.split("::");
		char[][] nchars= new char[names.length][];
		for (int i = 0; i < nchars.length; i++) {
			nchars[i]= names[i].toCharArray();
		}
		IIndexBinding[] bindings = fIndex.findBindings(nchars, IndexFilter.ALL_DECLARED, npm());
		return bindings.length > 0 ? bindings[0] : null;
	}

	private String msg() {
		return "Update #" + fContentUsed;
	}

	private String msg(String modifier) {
		return msg() + "; " + modifier + ":";
	}

	// int globalVar;

	// short globalVar;

	// register int globalVar;
	public void testGlobalCppVariable() throws Exception {
		setupFile(3, true);
		checkCppVariable("globalVar", INT, new String[]{});
		updateFile();
		checkCppVariable("globalVar", SHORT, new String[]{});
		updateFile();
		checkCppVariable("globalVar", INT, new String[]{REGISTER});
	}

	private void checkCppVariable(String name, String type, String[] modifiers) throws Exception {
		fIndex.acquireReadLock();
		try {
			ICPPVariable var = (ICPPVariable) findBinding(name);
			checkCppVariable(var, type, modifiers);
		} finally {
			fIndex.releaseReadLock();
		}
	}

	private void checkCppVariable(ICPPVariable var, String type, String[] modifiers) throws Exception {
		checkVariable(var, type, modifiers);
		checkModifier(modifiers, MUTABLE, var.isMutable());
	}

	// int globalFunction(int a, int b){};

	// short globalFunction(int a, int b){};

	// int globalFunction(char a){};

	// inline int globalFunction(char a){};
	public void testCFunction() throws Exception {
		setupFile(4, false);
		checkFunction("globalFunction", new String[] {INT, INT, INT}, new String[]{});
		updateFile();
		checkFunction("globalFunction", new String[] {SHORT, INT, INT}, new String[]{});
		updateFile();
		checkFunction("globalFunction", new String[] {INT, CHAR}, new String[]{});
		updateFile();
		checkFunction("globalFunction", new String[] {INT, CHAR}, new String[]{INLINE});
	}

	private void checkFunction(String name, String[] types, String[] modifiers) throws Exception {
		fIndex.acquireReadLock();
		try {
			IFunction func = (IFunction) findBinding(name);
			checkFunction(func, types, modifiers);
		} finally {
			fIndex.releaseReadLock();
		}
	}

	private void checkFunction(IFunction func, String[] types, String[] modifiers)
			throws DOMException {
		assertEquals(msg(), types[0], ASTTypeUtil.getType(func.getType().getReturnType()));
		IParameter[] params= func.getParameters();
		assertEquals(msg(), types.length - 1, params.length);
		for (int i = 0; i < params.length; i++) {
			IParameter parameter = params[i];
			assertEquals(msg(), types[i + 1], ASTTypeUtil.getType(parameter.getType()));
		}
		checkModifier(modifiers, INLINE, func.isInline());
		checkModifier(modifiers, STATIC, func.isStatic());
	}

	// int globalFunction(int a, int b){};

	// short globalFunction(int a, int b){};

	// int globalFunction(char a){};

	// inline int globalFunction(char a){};
	public void testCppFunction() throws Exception {
		setupFile(4, true);
		checkFunction("globalFunction", new String[] {INT, INT, INT}, new String[]{});
		updateFile();
		checkFunction("globalFunction", new String[] {SHORT, INT, INT}, new String[]{});
		updateFile();
		checkFunction("globalFunction", new String[] {INT, CHAR}, new String[]{});
		updateFile();
		checkFunction("globalFunction", new String[] {INT, CHAR}, new String[]{INLINE});
	}

	// struct my_struct {int fField;};

	// struct my_struct {short fField;};
	public void testCField() throws Exception {
		setupFile(2, false);
		checkVariable("my_struct::fField", INT, new String[]{});
		updateFile();
		checkVariable("my_struct::fField", SHORT, new String[]{});
	}

	// class MyClass {int fField;};

	// class MyClass {short fField;};

	// class MyClass {mutable int fField;};

	// class MyClass {public: int fField;};

	// class MyClass {protected: int fField;};

	// class MyClass {private: int fField;};

	// class MyClass {private: static int fField;};
	public void testCppField() throws Exception {
		setupFile(7, true);
		checkCppField("MyClass::fField", INT, new String[]{PRIVATE});
		updateFile();
		checkCppField("MyClass::fField", SHORT, new String[]{PRIVATE});
		updateFile();
		checkCppField("MyClass::fField", INT, new String[]{PRIVATE, MUTABLE});
		updateFile();
		checkCppField("MyClass::fField", INT, new String[]{PUBLIC});
		updateFile();
		checkCppField("MyClass::fField", INT, new String[]{PROTECTED});
		updateFile();
		checkCppField("MyClass::fField", INT, new String[]{PRIVATE});
		updateFile();
		checkCppField("MyClass::fField", INT, new String[]{PRIVATE, STATIC});
	}

	private void checkCppField(String name, String type, String[] modifiers) throws Exception {
		fIndex.acquireReadLock();
		try {
			ICPPField field = (ICPPField) findBinding(name);
			checkCppVariable(field, type, modifiers);
			checkCppMember(field, modifiers);
		} finally {
			fIndex.releaseReadLock();
		}
	}

	private void checkCppMember(ICPPMember member, String[] modifiers) throws Exception {
		int visibility= member.getVisibility();
		checkModifier(modifiers, PUBLIC, visibility == ICPPMember.v_public);
		checkModifier(modifiers, PROTECTED, visibility == ICPPMember.v_protected);
		checkModifier(modifiers, PRIVATE, visibility == ICPPMember.v_private);
	}

	// class MyClass {int method(int a, int b);};

	// class MyClass {short method(int a, int b);};

	// class MyClass {int method(char a);};

	// class MyClass {inline int method(char a);};

	// class MyClass {virtual int method(char a);};

	// class MyClass {public: int method(char a);};

	// class MyClass {protected: int method(char a);};

	// class MyClass {private: int method(char a);};

	// class MyClass {int method(char a){};};

	// class MyClass {virtual int method(char a) = 0;};
	public void testCppMethod() throws Exception {
		setupFile(10, true);
		checkCppMethod("MyClass::method", new String[] {INT, INT, INT}, new String[]{PRIVATE});
		updateFile();
		checkCppMethod("MyClass::method", new String[] {SHORT, INT, INT}, new String[]{PRIVATE});
		updateFile();
		checkCppMethod("MyClass::method", new String[] {INT, CHAR}, new String[]{PRIVATE});
		updateFile();
		checkCppMethod("MyClass::method", new String[] {INT, CHAR}, new String[]{PRIVATE, INLINE});
		updateFile();
		checkCppMethod("MyClass::method", new String[] {INT, CHAR}, new String[]{PRIVATE, VIRTUAL});
		updateFile();
		checkCppMethod("MyClass::method", new String[] {INT, CHAR}, new String[]{PUBLIC});
		updateFile();
		checkCppMethod("MyClass::method", new String[] {INT, CHAR}, new String[]{PROTECTED});
		updateFile();
		checkCppMethod("MyClass::method", new String[] {INT, CHAR}, new String[]{PRIVATE});
		updateFile();
		checkCppMethod("MyClass::method", new String[] {INT, CHAR}, new String[]{PRIVATE, INLINE});
		updateFile();
		checkCppMethod("MyClass::method", new String[] {INT, CHAR}, new String[]{PRIVATE, VIRTUAL, PURE_VIRTUAL});
	}

	// class MyClass {protected: int method(int a, int b);};

	// #include "header.h"
	// int MyClass::method(int a, int b);

	// #include "header.h"
	// char MyClass::method(int a, int b);
	public void testFixedCppMethod() throws Exception {
		setupHeader(3, true);
		checkCppMethod("MyClass::method", new String[] {INT, INT, INT}, new String[]{PROTECTED});
		setupFile(0, true);
		checkCppMethod("MyClass::method", new String[] {INT, INT, INT}, new String[]{PROTECTED});
		updateFile();
		checkCppMethod("MyClass::method", new String[] {INT, INT, INT}, new String[]{PROTECTED});
	}

	private void checkCppMethod(String name, String[] types, String[] modifiers) throws Exception {
		fIndex.acquireReadLock();
		try {
			ICPPMethod method = (ICPPMethod) findBinding(name);
			checkCppMethod(method, types, modifiers);
		} finally {
			fIndex.releaseReadLock();
		}
	}

	private void checkCppMethod(ICPPMethod method, String[] types, String[] modifiers)
			throws DOMException, Exception {
		checkFunction(method, types, modifiers);
		checkCppMember(method, modifiers);
		checkModifier(modifiers, VIRTUAL, method.isVirtual());
		checkModifier(modifiers, PURE_VIRTUAL, method.isPureVirtual());
		checkModifier(modifiers, IMPLICIT, method.isImplicit());
	}

	// class MyClass {MyClass(int a, int b);};

	// class MyClass {MyClass(char a, int b);};

	// class MyClass {explicit MyClass(char a, int b);};

	// class MyClass {public: MyClass(char a, int b);};

	// class MyClass {protected: MyClass(char a, int b);};

	// class MyClass {private: MyClass(char a, int b);};
	public void testCppConstructor() throws Exception {
		setupFile(6, true);
		checkCppConstructor("MyClass::MyClass", new String[] {"", INT, INT}, new String[]{PRIVATE});
		updateFile();
		checkCppConstructor("MyClass::MyClass", new String[] {"", CHAR, INT}, new String[]{PRIVATE});
		updateFile();
		checkCppConstructor("MyClass::MyClass", new String[] {"", CHAR, INT}, new String[]{PRIVATE,EXPLICIT});
		updateFile();
		checkCppConstructor("MyClass::MyClass", new String[] {"", CHAR, INT}, new String[]{PUBLIC});
		updateFile();
		checkCppConstructor("MyClass::MyClass", new String[] {"", CHAR, INT}, new String[]{PROTECTED});
		updateFile();
		checkCppConstructor("MyClass::MyClass", new String[] {"", CHAR, INT}, new String[]{PRIVATE});
	}

	private void checkCppConstructor(String name, String[] types, String[] modifiers) throws Exception {
		fIndex.acquireReadLock();
		try {
			ICPPConstructor ctor = (ICPPConstructor) findBinding(name);
			checkCppConstructor(ctor, types, modifiers);
		} finally {
			fIndex.releaseReadLock();
		}
	}

	private void checkCppConstructor(ICPPConstructor ctor, String[] types, String[] modifiers) throws Exception {
		checkFunction(ctor, types, modifiers);
		checkCppMember(ctor, modifiers);
		checkModifier(modifiers, EXPLICIT, ctor.isExplicit());
	}

	// class MyClass {};

	// class MyClass {protected: MyClass(void);};

	// class MyClass {explicit MyClass(const MyClass& rhs);};

	// class MyClass {public: MyClass& operator=(const MyClass& rhs) {}};

	// class MyClass {};
	public void testImplicitMethods() throws Exception {
		setupFile(5, true);
		checkImplicitMethods("MyClass",
				new String[] {IMPLICIT, PUBLIC},
				new String[] {IMPLICIT, PUBLIC},
				new String[] {IMPLICIT, PUBLIC});
		updateFile();
		checkImplicitMethods("MyClass",
				new String[] {PROTECTED},
				new String[] {IMPLICIT, PUBLIC},
				new String[] {IMPLICIT, PUBLIC});
		updateFile();
		checkImplicitMethods("MyClass",
				null, // no default constructor, because we declared the copy constructor.
				new String[] {EXPLICIT, PRIVATE},
				new String[] {IMPLICIT, PUBLIC});
		updateFile();
		checkImplicitMethods("MyClass",
				new String[] {IMPLICIT, PUBLIC},
				new String[] {IMPLICIT, PUBLIC},
				new String[] {INLINE, PUBLIC});
		updateFile();
		checkImplicitMethods("MyClass",
				new String[] {IMPLICIT, PUBLIC},
				new String[] {IMPLICIT, PUBLIC},
				new String[] {IMPLICIT, PUBLIC});
	}

	private void checkImplicitMethods(String name, String[] m1, String[] m2, String[] m3) throws Exception {
		fIndex.acquireReadLock();
		try {
			final char[] nchars = name.toCharArray();
			final String refType = name + " &";
			final String constRefType = "const " + refType;
			IIndexBinding[] ctors= fIndex.findBindings(new char[][] {nchars, nchars}, IndexFilter.ALL_DECLARED_OR_IMPLICIT, npm());

			int count= 0;
			for (int i = 0; i < ctors.length; i++) {
				IIndexBinding ctor= ctors[i];
				if (ctor.isFileLocal()) {
					ctors[count++]= ctor;
				}
			}
			assertEquals(m1 == null ? 1 : 2, count);
			final IType[] parameterTypes = ((ICPPConstructor) ctors[0]).getType().getParameterTypes();
			if (parameterTypes.length != 1 || !(parameterTypes[0] instanceof ICPPReferenceType)) {
				IIndexBinding h= ctors[0]; ctors[0]= ctors[1]; ctors[1]= h;
			}
			if (m1 != null) {
				checkCppConstructor((ICPPConstructor) ctors[1], new String[] {""}, m1);
			}
			checkCppConstructor((ICPPConstructor) ctors[0], new String[] {"", constRefType}, m2);

			IIndexBinding[] assignmentOps= fIndex.findBindings(
					new char[][] {nchars, "operator =".toCharArray() }, IndexFilter.ALL_DECLARED_OR_IMPLICIT, npm());
			count= 0;
			for (int i = 0; i < assignmentOps.length; i++) {
				IIndexBinding assignmentOp= assignmentOps[i];
				if (assignmentOp.isFileLocal()) {
					assignmentOps[count++]= assignmentOp;
				}
			}
			assertEquals(1, count);
			checkCppMethod((ICPPMethod) assignmentOps[0], new String[]{refType, constRefType}, m3);
		} finally {
			fIndex.releaseReadLock();
		}
	}

	// typedef int myType;

	// typedef short myType;
	public void testCTypedef() throws Exception {
		setupFile(2, false);
		checkTypedef("myType", INT);
		updateFile();
		checkTypedef("myType", SHORT);
	}

	private void checkTypedef(String name, String type) throws Exception {
		fIndex.acquireReadLock();
		try {
			ITypedef var = (ITypedef) findBinding(name);
			checkTypedef(var, type);
		} finally {
			fIndex.releaseReadLock();
		}
	}

	private void checkTypedef(ITypedef var, String type) throws DOMException {
		assertEquals(msg(), type, ASTTypeUtil.getType(var.getType()));
	}

	// typedef int myType;

	// typedef short myType;
	public void testCppTypedef() throws Exception {
		setupFile(2, true);
		checkTypedef("myType", INT);
		updateFile();
		checkTypedef("myType", SHORT);
	}

	// namespace aNs {
	// }
	// namespace nsAlias= aNs;

	// namespace bNs {
	// }
	// namespace nsAlias= bNs;
	public void testNamespaceAlias() throws Exception {
		setupFile(2, true);
		checkNamespaceAlias("nsAlias", "aNs");
		updateFile();
		checkNamespaceAlias("nsAlias", "bNs");
	}

	private void checkNamespaceAlias(String name, String target) throws Exception {
		fIndex.acquireReadLock();
		try {
			ICPPNamespaceAlias nsalias = (ICPPNamespaceAlias) findBinding(name);
			assertEquals(msg(), target, nsalias.getBinding().getName());
		} finally {
			fIndex.releaseReadLock();
		}
	}

	// struct myType {
	//    int a;
	// };

	// union myType {
	//    int a;
	// };

	// typedef int myType;

	// enum myType {};
	public void testChangingTypePlainC() throws Exception {
		setupFile(4, false);
		IBinding binding;
		ICompositeType ct;
		fIndex.acquireReadLock();
		try {
			binding = findBinding("myType");
			assertTrue(binding instanceof ICompositeType);
			ct = (ICompositeType) binding;
			assertTrue(ct.getKey() == ICompositeType.k_struct);
		} finally {
			fIndex.releaseReadLock();
		}

		updateFile();
		fIndex.acquireReadLock();
		try {
			binding = findBinding("myType");
			assertTrue(binding instanceof ICompositeType);
			ct = (ICompositeType) binding;
			assertTrue(ct.getKey() == ICompositeType.k_union);
		} finally {
			fIndex.releaseReadLock();
		}

		updateFile();
		fIndex.acquireReadLock();
		try {
			binding = findBinding("myType");
			assertTrue(binding instanceof ITypedef);
			ITypedef td = (ITypedef) binding;
			assertEquals(INT, ASTTypeUtil.getType(td.getType()));
		} finally {
			fIndex.releaseReadLock();
		}

		updateFile();
		fIndex.acquireReadLock();
		try {
			binding = findBinding("myType");
			assertTrue(binding instanceof IEnumeration);
		} finally {
			fIndex.releaseReadLock();
		}
	}

	// class myType {
	//    int a;
	// };

	// struct myType {
	//    int a;
	// };

	// union myType {
	//    int a;
	// };

	// typedef int myType;

	// enum myType {};
	public void testChangingTypeCPP() throws Exception {
		setupFile(4, true);
		IBinding binding;
		ICompositeType ct;
		fIndex.acquireReadLock();
		try {
			binding = findBinding("myType");
			assertTrue(binding instanceof ICompositeType);
			ct = (ICompositeType) binding;
			assertTrue(ct.getKey() == ICompositeType.k_struct);
		} finally {
			fIndex.releaseReadLock();
		}

		updateFile();
		fIndex.acquireReadLock();
		try {
			binding = findBinding("myType");
			assertTrue(binding instanceof ICompositeType);
			ct = (ICompositeType) binding;
			assertTrue(ct.getKey() == ICompositeType.k_union);
		} finally {
			fIndex.releaseReadLock();
		}

		updateFile();
		fIndex.acquireReadLock();
		try {
			binding = findBinding("myType");
			assertTrue(binding instanceof ITypedef);
			ITypedef td = (ITypedef) binding;
			assertEquals(INT, ASTTypeUtil.getType(td.getType()));
		} finally {
			fIndex.releaseReadLock();
		}

		updateFile();
		fIndex.acquireReadLock();
		try {
			binding = findBinding("myType");
			assertTrue(binding instanceof IEnumeration);
		} finally {
			fIndex.releaseReadLock();
		}
	}

	// template<typename T> class CT {};

	// template<typename T=int> class CT {};

	// template<typename T=char> class CT {};

	// template<int U, typename T> struct CT {};

	// template<template<typename T> class V> class CT {};

	// template<template<template<typename I> class T> class V> class CT {};

	// template<typename U> class CT {};
	public void testClassTemplates() throws Exception {
		setupFile(7, true);
		ICPPClassTemplate binding;
		ICompositeType ct;
		fIndex.acquireReadLock();
		long pdomid;
		try {
			binding = (ICPPClassTemplate) findBinding("CT");
			assertEquals(ICPPClassType.k_class , binding.getKey());
			ICPPTemplateParameter[] tpars = binding.getTemplateParameters();
			assertEquals(1, tpars.length);
			assertTrue(tpars[0] instanceof ICPPTemplateTypeParameter);
			assertEquals(0, tpars[0].getParameterID());
			assertEquals("T", tpars[0].getName());
			assertNull(tpars[0].getDefaultValue());
		} finally {
			fIndex.releaseReadLock();
		}

		updateFile();
		fIndex.acquireReadLock();
		try {
			binding = (ICPPClassTemplate) findBinding("CT");
			assertEquals(ICPPClassType.k_class , binding.getKey());
			ICPPTemplateParameter[] tpars = binding.getTemplateParameters();
			assertEquals(1, tpars.length);
			assertTrue(tpars[0] instanceof ICPPTemplateTypeParameter);
			assertEquals(0, tpars[0].getParameterID());
			assertEquals("T", tpars[0].getName());
			assertEquals("int", ASTTypeUtil.getType(tpars[0].getDefaultValue().getTypeValue()));
		} finally {
			fIndex.releaseReadLock();
		}

		updateFile();
		fIndex.acquireReadLock();
		try {
			binding = (ICPPClassTemplate) findBinding("CT");
			assertEquals(ICPPClassType.k_class , binding.getKey());
			ICPPTemplateParameter[] tpars = binding.getTemplateParameters();
			assertEquals(1, tpars.length);
			assertTrue(tpars[0] instanceof ICPPTemplateTypeParameter);
			assertEquals(0, tpars[0].getParameterID());
			assertEquals("T", tpars[0].getName());
			assertEquals("char", ASTTypeUtil.getType(tpars[0].getDefaultValue().getTypeValue()));
		} finally {
			fIndex.releaseReadLock();
		}

		updateFile();
		fIndex.acquireReadLock();
		try {
			binding = (ICPPClassTemplate) findBinding("CT");
			assertEquals(ICompositeType.k_struct , binding.getKey());
			ICPPTemplateParameter[] tpars = binding.getTemplateParameters();
			assertEquals(2, tpars.length);
			assertTrue(tpars[0] instanceof ICPPTemplateNonTypeParameter);
			assertEquals("U", tpars[0].getName());
			assertEquals(0, tpars[0].getParameterID());
			assertTrue(tpars[1] instanceof ICPPTemplateTypeParameter);
			assertEquals("T", tpars[1].getName());
			assertEquals(1, tpars[1].getParameterID());
		} finally {
			fIndex.releaseReadLock();
		}

		updateFile();
		fIndex.acquireReadLock();
		try {
			binding = (ICPPClassTemplate) findBinding("CT");
			assertEquals(ICPPClassType.k_class , binding.getKey());
			ICPPTemplateParameter[] tpars = binding.getTemplateParameters();
			assertEquals(1, tpars.length);
			assertTrue(tpars[0] instanceof ICPPTemplateTemplateParameter);
			assertEquals("V", tpars[0].getName());
			assertEquals(0, tpars[0].getParameterID());
			tpars= ((ICPPTemplateTemplateParameter) tpars[0]).getTemplateParameters();
			assertEquals(1, tpars.length);
			assertTrue(tpars[0] instanceof ICPPTemplateTypeParameter);
			assertEquals(0x10000, tpars[0].getParameterID());
			assertEquals("T", tpars[0].getName());
		} finally {
			fIndex.releaseReadLock();
		}

		updateFile();
		fIndex.acquireReadLock();
		try {
			binding = (ICPPClassTemplate) findBinding("CT");
			assertEquals(ICPPClassType.k_class , binding.getKey());
			ICPPTemplateParameter[] tpars = binding.getTemplateParameters();
			assertEquals(1, tpars.length);
			assertTrue(tpars[0] instanceof ICPPTemplateTemplateParameter);
			assertEquals("V", tpars[0].getName());
			assertEquals(0, tpars[0].getParameterID());
			tpars= ((ICPPTemplateTemplateParameter) tpars[0]).getTemplateParameters();
			assertEquals(1, tpars.length);
			assertTrue(tpars[0] instanceof ICPPTemplateTemplateParameter);
			assertEquals(0x10000, tpars[0].getParameterID());
			assertEquals("T", tpars[0].getName());
		} finally {
			fIndex.releaseReadLock();
		}

		updateFile();
		fIndex.acquireReadLock();
		try {
			binding = (ICPPClassTemplate) findBinding("CT");
			assertEquals(ICPPClassType.k_class , binding.getKey());
			ICPPTemplateParameter[] tpars = binding.getTemplateParameters();
			assertEquals(1, tpars.length);
			assertTrue(tpars[0] instanceof ICPPTemplateTypeParameter);
			assertEquals(0, tpars[0].getParameterID());
			assertEquals("U", tpars[0].getName());

		} finally {
			fIndex.releaseReadLock();
		}
	}

	// int globalVar;

	// #include "header.h"
	// void test() {
	//    globalVar= 1;
	// }
	public void testChangingSourceBeforeHeader_Bug171834() throws Exception {
		CModelListener.sSuppressUpdateOfLastRecentlyUsed= false;
		setupHeader(2, true);
		setupFile(0, true);
		IBinding binding;
		ICompositeType ct;
		fIndex.acquireReadLock();
		try {
			binding = findBinding("globalVar");
			assertTrue(binding instanceof IVariable);
			assertEquals(2, fIndex.findNames(binding, IIndex.FIND_ALL_OCCURRENCES).length);
		} finally {
			fIndex.releaseReadLock();
		}

		fFile= TestSourceReader.createFile(fFile.getParent(), fFile.getName(), fContents[1].toString().replaceAll("globalVar", "newVar"));
		TestSourceReader.waitUntilFileIsIndexed(fIndex, fFile, INDEXER_TIMEOUT_MILLISEC);

		fIndex.acquireReadLock();
		try {
			binding = findBinding("globalVar");
			assertTrue(binding instanceof IVariable);
			assertEquals(1, fIndex.findNames(binding, IIndex.FIND_ALL_OCCURRENCES).length);
		} finally {
			fIndex.releaseReadLock();
		}

		fHeader= TestSourceReader.createFile(fHeader.getParent(), fHeader.getName(), fContents[0].toString().replaceAll("globalVar", "newVar"));
		waitUntilFileIsIndexed(fIndex, fHeader);

		fIndex.acquireReadLock();
		try {
			binding = findBinding("newVar");
			assertTrue(binding instanceof IVariable);
			assertEquals(2, fIndex.findNames(binding, IIndex.FIND_ALL_OCCURRENCES).length);
		} finally {
			fIndex.releaseReadLock();
		}
	}

	// int globalVar;
	// void func();

	// extern "C" {
	//    int globalVar;
	//    void func();
	// }

	// int globalVar;
	// void func();

	// extern "C" int globalVar;
	// extern "C" void func();

	// int globalVar;
	// void func();
	public void testExternC() throws Exception {
		setupFile(5, true);
		checkExternC(false);
		updateFile();
		checkExternC(true);
		updateFile();
		checkExternC(false);
		updateFile();
		checkExternC(true);
		updateFile();
		checkExternC(false);
	}

	private void checkExternC(boolean value) throws Exception {
		fIndex.acquireReadLock();
		try {
			ICPPVariable var = (ICPPVariable) findBinding("globalVar");
			assertEquals(value, var.isExternC());
			ICPPFunction func = (ICPPFunction) findBinding("func");
			assertEquals(value, func.isExternC());
		} finally {
			fIndex.releaseReadLock();
		}
	}

	// int global;
	// struct C {int mem;};
	// enum E {e0};

	// int global=1;
	// struct C {int mem=1;};
	// enum E {e0=1};

	// int global;
	// struct C {int mem;};
	// enum E {e0};
	public void testValuesC() throws Exception {
		setupFile(3, false);
		checkValue("global", null);
		checkValue("C::mem", null);
		checkValue("e0", 0L);
		updateFile();
		checkValue("global", 1L);
		checkValue("C::mem", 1L);
		checkValue("e0", 1L);
		updateFile();
		checkValue("global", null);
		checkValue("C::mem", null);
		checkValue("e0", 0L);
	}

	// class A {
	//    public: void foo();
	// };

	// class A {
	//    public: void foo() throw();
	// };

	// class A {
	//    public: void foo() throw(int, double);
	// };

	// class A {
	//    public: void foo() throw();
	// };

	// class A {
	//    public: void foo();
	// };
	public void testExceptionSpecification() throws Exception {
		ICPPMethod method;
		IType[] exceptionSpec;
		setupFile(5, true);
		fIndex.acquireReadLock();
		try {
			method = (ICPPMethod) findBinding("A::foo");
			exceptionSpec = method.getExceptionSpecification();
			assertNull(exceptionSpec);
		} finally {
			fIndex.releaseReadLock();
		}

		updateFile();
		fIndex.acquireReadLock();
		try {
			method = (ICPPMethod) findBinding("A::foo");
			exceptionSpec = method.getExceptionSpecification();
			assertEquals(0, exceptionSpec.length);
		} finally {
			fIndex.releaseReadLock();
		}

		updateFile();
		fIndex.acquireReadLock();
		try {
			method = (ICPPMethod) findBinding("A::foo");
			exceptionSpec = method.getExceptionSpecification();
			assertNotNull(exceptionSpec);
			assertEquals(2, exceptionSpec.length);
			assertEquals("int", ASTTypeUtil.getType(exceptionSpec[0]));
			assertEquals("double", ASTTypeUtil.getType(exceptionSpec[1]));
		} finally {
			fIndex.releaseReadLock();
		}

		updateFile();
		fIndex.acquireReadLock();
		try {
			method = (ICPPMethod) findBinding("A::foo");
			exceptionSpec = method.getExceptionSpecification();
			assertEquals(0, exceptionSpec.length);
		} finally {
			fIndex.releaseReadLock();
		}

		updateFile();
		fIndex.acquireReadLock();
		try {
			method = (ICPPMethod) findBinding("A::foo");
			exceptionSpec = method.getExceptionSpecification();
			assertNull(exceptionSpec);
		} finally {
			fIndex.releaseReadLock();
		}
	}

	// int global;
	// struct C {int mem;};
	// enum E {e0};

	// int global=1;
	// struct C {int mem=1;};
	// enum E {e0=1};

	// int global;
	// struct C {int mem;};
	// enum E {e0};
	public void testValuesCPP() throws Exception {
		setupFile(3, true);
		checkValue("global", null);
		checkValue("C::mem", null);
		checkValue("e0", 0L);
		updateFile();
		checkValue("global", 1L);
		checkValue("C::mem", 1L);
		checkValue("e0", 1L);
		updateFile();
		checkValue("global", null);
		checkValue("C::mem", null);
		checkValue("e0", 0L);
	}

	//class A {};
	//class B {friend class A;};

	//class B {};
	public void testFriendClass() throws Exception {
		setupFile(2, true);
		assertFriendRemoval("B", "A");
	}

	// class X {public: char* foo(int);};
	// class Y {friend char* X::foo(int);};

	// class Y {};
	public void testFriendMethod() throws Exception {
		setupFile(2, true);
		assertFriendRemoval("Y", "X::foo");
	}

	// class X {friend void friend_set(X*, int);};
	// void friend_set(X* p, int i) {}

	// class X {};
	public void testFriendFunction() throws Exception {
		setupFile(2, true);
		assertFriendRemoval("X", "friend_set");
	}

	private void assertFriendRemoval(String clientClassBinding, String supplierBinding) throws Exception {
		fIndex.acquireReadLock();
		try {
			IBinding client = findBinding(clientClassBinding);
			IBinding supplier = findBinding(supplierBinding);
			assertNotNull("Unable to find binding with name \""+clientClassBinding+"\"", client);
			assertTrue("Unable to find binding with name \""+clientClassBinding+"\"", client instanceof ICPPClassType);
			assertNotNull("Unable to find binding with name \""+supplierBinding+"\"", supplier);
			assertTrue(((ICPPClassType)client).getFriends().length == 1);
			assertTrue(((ICPPClassType)client).getFriends()[0].equals(supplier));
		} finally {
			fIndex.releaseReadLock();
		}

		updateFile();

		fIndex.acquireReadLock();
		try {
			IBinding client = findBinding(clientClassBinding);
			assertNotNull("Unable to find binding with name \""+clientClassBinding+"\"", client);
			assertTrue("Unable to find binding with name \""+clientClassBinding+"\"", client instanceof ICPPClassType);
			assertTrue(((ICPPClassType)client).getFriends().length == 0);
		} finally {
			fIndex.releaseReadLock();
		}
	}

	// void funcTypeDeletion(int);

	// #include "header.h"
	// typeof(funcTypeDeletion) storeRef;
	// char funcTypeDeletion(int);		// delete type
	// typeof(storeRef) useRef;         // use reference
	public void testTypedeletion_Bug294306() throws Exception {
		setupHeader(2, true);
		setupFile(2, true);
		checkFunction("useRef", new String[]{"void", "int"}, new String[]{});
		fContentUsed--;
		updateFile();
		checkFunction("useRef", new String[]{"char", "int"}, new String[]{});
	}

	// void f(int a, int b=0);

	// #include "header.h"
	// void f(int a, int b) {}
	// void ref() {
	//   f(1);
	// }

	// #include "header.h"
	// void f(int a, int b) {}
	// void ref() {
	//   f(1);
	// }
	public void testDefaultParam_Bug297438() throws Exception {
		setupHeader(3, true);
		setupFile(3, true);
		checkReferenceCount("f", 1);
		updateFile();
		checkReferenceCount("f", 1);
	}

	private void checkReferenceCount(String name, int count) throws InterruptedException, CoreException {
		fIndex.acquireReadLock();
		try {
			IBinding func = findBinding(name);
			assertEquals(count, fIndex.findReferences(func).length);
		} finally {
			fIndex.releaseReadLock();
		}
	}

	// enum E {e0};

	// enum class E;

	// enum E : short {e1};

	// enum class E {e2};

	// enum class E : short {e1};

	// enum E : int;
	public void testEnumCPP() throws Exception {
		setupFile(6, true);
		checkEnum(false, null, "e0");
		updateFile();
		checkEnum(true, "int", null);
		updateFile();
		checkEnum(false, "short int", "e1");
		updateFile();
		checkEnum(true, "int", "e2");
		updateFile();
		checkEnum(true, "short int", "e1");
		updateFile();
		checkEnum(false, "int", null);
	}

	private void checkEnum(boolean scoped, String fixedType, String enumItem) throws Exception {
		fIndex.acquireReadLock();
		try {
			ICPPEnumeration enumType = (ICPPEnumeration) findBinding("E");
			assertEquals(scoped, enumType.isScoped());
			if (fixedType == null) {
				assertNull(enumType.getFixedType());
			} else {
				assertEquals(fixedType, ASTTypeUtil.getType(enumType.getFixedType()));
			}
			final IEnumerator[] enumItems = enumType.getEnumerators();
			if (enumItem == null) {
				assertEquals(0, enumItems.length);
			} else {
				assertEquals(1, enumItems.length);
				assertEquals(enumItem, enumItems[0].getName());
			}
		} finally {
			fIndex.releaseReadLock();
		}
	}

	// class X {};

	// class X {};
	public void testFileLocalBinding() throws Exception {
		setupFile(2, true);
		long id1, id2;
		fIndex.acquireReadLock();
		try {
			final IIndexBinding binding = findBinding("X");
			id1= ((PDOMFile) binding.getLocalToFile()).getRecord();
		} finally {
			fIndex.releaseReadLock();
		}

		updateFile();
		fIndex.acquireReadLock();
		try {
			final IIndexBinding binding = findBinding("X");
			id2= ((PDOMFile) binding.getLocalToFile()).getRecord();
		} finally {
			fIndex.releaseReadLock();
		}
		assertEquals(id1, id2);
	}

	// namespace ns {
	//    namespace m {}
	// }

	// inline namespace ns {
	//    inline namespace m {}
	// }

	// namespace ns {
	//    namespace m {}
	// }
	public void testInlineNamespaces_305980() throws Exception {
		setupFile(3, true);
		fIndex.acquireReadLock();
		try {
			final ICPPNamespace ns = (ICPPNamespace) findBinding("ns");
			assertFalse(ns.isInline());
			final ICPPNamespace m = (ICPPNamespace) findBinding("ns::m");
			assertFalse(ns.isInline());
		} finally {
			fIndex.releaseReadLock();
		}

		updateFile();
		fIndex.acquireReadLock();
		try {
			final ICPPNamespace ns = (ICPPNamespace) findBinding("ns");
			assertTrue(ns.isInline());
			final ICPPNamespace m = (ICPPNamespace) findBinding("ns::m");
			assertTrue(ns.isInline());
		} finally {
			fIndex.releaseReadLock();
		}

		updateFile();
		fIndex.acquireReadLock();
		try {
			final ICPPNamespace ns = (ICPPNamespace) findBinding("ns");
			assertFalse(ns.isInline());
			final ICPPNamespace m = (ICPPNamespace) findBinding("ns::m");
			assertFalse(ns.isInline());
		} finally {
			fIndex.releaseReadLock();
		}
	}

	//	typedef enum {
	//		AE_ON = 0
	//	} Adaptiv_T;
	//	struct mystruct {
	//		Adaptiv_T       eAdapt;
	//	};

	// int main() {
	//    mystruct ms;
	//    ms.eAdapt = AE_ON;
	// }

	//  // insert line
	//	typedef enum {
	//		AE_ON = 0
	//	} Adaptiv_T;
	//	struct mystruct {
	//		Adaptiv_T       eAdapt;
	//	};
	public void testAnonymousEnum_Bug356057cpp() throws Exception {
		setupHeader(3, true);
		setupFile(3, true);
		String name1;
		fIndex.acquireReadLock();
		try {
			final IEnumerator e = (IEnumerator) findBinding("AE_ON");
			assertNotNull(e);
			name1= e.getOwner().getName();
		} finally {
			fIndex.releaseReadLock();
		}
		updateHeader();
		fIndex.acquireReadLock();
		try {
			final IEnumerator e = (IEnumerator) findBinding("AE_ON");
			assertNotNull(e);
			assertFalse(name1.equals(e.getOwner().getName()));
		} finally {
			fIndex.releaseReadLock();
		}
	}

	//	typedef enum {
	//		AE_ON = 0
	//	} Adaptiv_T;
	//	struct mystruct {
	//		Adaptiv_T       eAdapt;
	//	};

	// int main() {
	//    mystruct ms;
	//    ms.eAdapt = AE_ON;
	// }

	//  // insert line
	//	typedef enum {
	//		AE_ON = 0
	//	} Adaptiv_T;
	//	struct mystruct {
	//		Adaptiv_T       eAdapt;
	//	};
	public void testAnonymousEnum_Bug356057c() throws Exception {
		setupHeader(3, false);
		setupFile(3, false);
		String name1;
		fIndex.acquireReadLock();
		try {
			final IEnumerator e = (IEnumerator) findBinding("AE_ON");
			assertNotNull(e);
			name1= e.getOwner().getName();
		} finally {
			fIndex.releaseReadLock();
		}
		updateHeader();
		fIndex.acquireReadLock();
		try {
			final IEnumerator e = (IEnumerator) findBinding("AE_ON");
			assertNotNull(e);
			assertFalse(name1.equals(e.getOwner().getName()));
		} finally {
			fIndex.releaseReadLock();
		}
	}

	// struct S {};

	// struct S {S(int){}};
	public void testImplicitDefaultCtor_Bug359376() throws Exception {
		setupFile(2, true);
		fIndex.acquireReadLock();
		try {
			final ICPPClassType s = (ICPPClassType) findBinding("S");
			assertNotNull(s);
			final ICPPConstructor[] ctors = s.getConstructors();
			assertEquals(2, ctors.length); // 2 implicit ctors
			assertTrue(ctors[0].isImplicit());
			assertTrue(ctors[1].isImplicit());
		} finally {
			fIndex.releaseReadLock();
		}
		updateFile();

		fIndex.acquireReadLock();
		try {
			final ICPPClassType s = (ICPPClassType) findBinding("S");
			assertNotNull(s);
			final ICPPConstructor[] ctors = s.getConstructors();
			assertEquals(2, ctors.length); // 1 explicit and one implicit ctor
			assertTrue(ctors[0].isImplicit() != ctors[1].isImplicit());
		} finally {
			fIndex.releaseReadLock();
		}
	}

	//	struct Base {
	//	    void foo() {}
	//	};
	//	struct Derived: Base {
	//		Derived();
	//	};

	//	struct Base {
	//	    void foo() {}
	//	};
	//	struct Derived: Base {
	//		Derived();
	//	};
	public void testBaseClass_Bug391284() throws Exception {
		setupFile(2, true);
		fIndex.acquireReadLock();
		try {
			final ICPPClassType s = (ICPPClassType) findBinding("Derived");
			assertNotNull(s);
			final ICPPBase[] bases = s.getBases();
			assertEquals(1, bases.length);
			assertEquals("Base", bases[0].getBaseClass().getName());
		} finally {
			fIndex.releaseReadLock();
		}
		updateFile();

		fIndex.acquireReadLock();
		try {
			final ICPPClassType s = (ICPPClassType) findBinding("Derived");
			assertNotNull(s);
			final ICPPBase[] bases = s.getBases();
			assertEquals(1, bases.length);
			assertEquals("Base", bases[0].getBaseClass().getName());
		} finally {
			fIndex.releaseReadLock();
		}
	}
}


text:
package org.kuali.kra.award.contacts;

import org.kuali.rice.krad.rules.rule.BusinessRule;

/**
 * This defines the rules for AwardProjectPerson
 */
public interface AwardProjectPersonsSaveRule extends BusinessRule {
    public static final String AWARD_PROJECT_PERSON_LIST_ERROR_KEY = "projectPersons";
    public static final String ERROR_AWARD_PROJECT_PERSON_NO_PI = "error.awardProjectPerson.no.pi.exists";
    public static final String ERROR_AWARD_PROJECT_PERSON_MULTIPLE_PI_EXISTS = "error.awardProjectPerson.pi.exists";
    public static final String ERROR_AWARD_PROJECT_KEY_PERSON_ROLE_REQUIRED = "error.awardProjectPerson.keyperson.role.required";
    public static final String ERROR_AWARD_PROJECT_PERSON_UNIT_DETAILS_REQUIRED = "error.awardProjectPerson.unit.details.required";
    public static final String ERROR_AWARD_PROJECT_PERSON_LEAD_UNIT_REQUIRED = "error.awardProjectPerson.lead.unit.required";
    public static final String ERROR_AWARD_PROJECT_PERSON_DUPLICATE_UNITS = "error.awardProjectPerson.duplicate.units";

    /**
     * This method should be called before adding a new Project Person
     * @param event
     * @return
     */
    boolean processSaveAwardProjectPersonsBusinessRules(SaveAwardProjectPersonsRuleEvent event);

}

redpajama_set_name: RedPajamaGithub


text:
namespace lles {

TernaryOperation::TernaryOperation(sourceLocation& sl,
                                   std::unique_ptr<ValueNode> cond,
                                   std::unique_ptr<ValueNode> tval,
                                   std::unique_ptr<ValueNode> fval)
                                   : ValueNode(sl, ValueTypeTernaryOperator) {
    condition = std::move(cond);
    trueVal = std::move(tval);
    falseVal = std::move(fval);

}

ValueNode* TernaryOperation::getCondition() {
    return condition.get();
}

ValueNode* TernaryOperation::getTrueVal() {
    return trueVal.get();
}

ValueNode* TernaryOperation::getFalseVal() {
    return falseVal.get();
}

nodeType TernaryOperation::getNodeType() const {
	return NodeTypeValue;
}

ValueType TernaryOperation::getValueType() const {
	return ValueTypeTernaryOperator;
}

boost::property_tree::ptree TernaryOperation::dump() const {
	boost::property_tree::ptree pt;
	pt.put("node-type", "Ternary Operation");
	PUT_IF_DEFINED(pt, "condition", condition);
	PUT_IF_DEFINED(pt, "true value", trueVal);
	PUT_IF_DEFINED(pt, "false value", falseVal);
	return pt;
}

} // end namespace lles


text:
CREATE TABLE country (id VARCHAR(2) NOT NULL, name VARCHAR(64) NOT NULL, PRIMARY KEY(id));

INSERT INTO "country" ("id", "name") VALUES ('to', 'Тонга');
INSERT INTO "country" ("id", "name") VALUES ('ab', 'абхазька');
INSERT INTO "country" ("id", "name") VALUES ('awa', 'авадхі');
INSERT INTO "country" ("id", "name") VALUES ('av', 'аварська');
INSERT INTO "country" ("id", "name") VALUES ('ae', 'авестійська');
INSERT INTO "country" ("id", "name") VALUES ('aus', 'австралійські мови');
INSERT INTO "country" ("id", "name") VALUES ('map', 'австронезійська мова');
INSERT INTO "country" ("id", "name") VALUES ('ada', 'адангме');
INSERT INTO "country" ("id", "name") VALUES ('ady', 'адигейська');
INSERT INTO "country" ("id", "name") VALUES ('az', 'азербайджанська');
INSERT INTO "country" ("id", "name") VALUES ('ay', 'аймара');
INSERT INTO "country" ("id", "name") VALUES ('ain', 'айнська');
INSERT INTO "country" ("id", "name") VALUES ('ak', 'акан');
INSERT INTO "country" ("id", "name") VALUES ('akk', 'аккадська');
INSERT INTO "country" ("id", "name") VALUES ('sq', 'албанська');
INSERT INTO "country" ("id", "name") VALUES ('alg', 'алгонкінські мови');
INSERT INTO "country" ("id", "name") VALUES ('ale', 'алеутська');
INSERT INTO "country" ("id", "name") VALUES ('tut', 'алтайська мова');
INSERT INTO "country" ("id", "name") VALUES ('am', 'амхарська');
INSERT INTO "country" ("id", "name") VALUES ('cpe', 'англо-креольські та піджінізовані англійські мови');
INSERT INTO "country" ("id", "name") VALUES ('en', 'англійська');
INSERT INTO "country" ("id", "name") VALUES ('en_US', 'англійська США');
INSERT INTO "country" ("id", "name") VALUES ('en_AU', 'англійська австралійська');
INSERT INTO "country" ("id", "name") VALUES ('en_GB', 'англійська британська');
INSERT INTO "country" ("id", "name") VALUES ('en_CA', 'англійська канадська');
INSERT INTO "country" ("id", "name") VALUES ('anp', 'ангіка');
INSERT INTO "country" ("id", "name") VALUES ('apa', 'апачі мови');
INSERT INTO "country" ("id", "name") VALUES ('ar', 'арабська');
INSERT INTO "country" ("id", "name") VALUES ('arw', 'аравакська');
INSERT INTO "country" ("id", "name") VALUES ('an', 'арагонська');
INSERT INTO "country" ("id", "name") VALUES ('arc', 'арамейська');
INSERT INTO "country" ("id", "name") VALUES ('arp', 'арапахо');
INSERT INTO "country" ("id", "name") VALUES ('arn', 'арауканська');
INSERT INTO "country" ("id", "name") VALUES ('rup', 'арумунська');
INSERT INTO "country" ("id", "name") VALUES ('as', 'ассамська');
INSERT INTO "country" ("id", "name") VALUES ('ast', 'астурська');
INSERT INTO "country" ("id", "name") VALUES ('ath', 'атапаскські мови');
INSERT INTO "country" ("id", "name") VALUES ('cch', 'атсам');
INSERT INTO "country" ("id", "name") VALUES ('aa', 'афарська');
INSERT INTO "country" ("id", "name") VALUES ('af', 'африкаанс');
INSERT INTO "country" ("id", "name") VALUES ('afh', 'африхілі');
INSERT INTO "country" ("id", "name") VALUES ('afa', 'афро-азійська мова');
INSERT INTO "country" ("id", "name") VALUES ('ace', 'ачехська');
INSERT INTO "country" ("id", "name") VALUES ('ach', 'ачолі');
INSERT INTO "country" ("id", "name") VALUES ('bat', 'балтійська мова');
INSERT INTO "country" ("id", "name") VALUES ('bal', 'балучі');
INSERT INTO "country" ("id", "name") VALUES ('ban', 'балійська');
INSERT INTO "country" ("id", "name") VALUES ('bm', 'бамбара');
INSERT INTO "country" ("id", "name") VALUES ('bai', 'бамілеке мови');
INSERT INTO "country" ("id", "name") VALUES ('bad', 'банда');
INSERT INTO "country" ("id", "name") VALUES ('bnt', 'банту');
INSERT INTO "country" ("id", "name") VALUES ('bas', 'баса');
INSERT INTO "country" ("id", "name") VALUES ('eu', 'басків');
INSERT INTO "country" ("id", "name") VALUES ('btk', 'батак');
INSERT INTO "country" ("id", "name") VALUES ('ba', 'башкирська');
INSERT INTO "country" ("id", "name") VALUES ('bej', 'беджа');
INSERT INTO "country" ("id", "name") VALUES ('bem', 'бемба');
INSERT INTO "country" ("id", "name") VALUES ('bn', 'бенгальська');
INSERT INTO "country" ("id", "name") VALUES ('ber', 'берберська');
INSERT INTO "country" ("id", "name") VALUES ('byn', 'блін');
INSERT INTO "country" ("id", "name") VALUES ('zbl', 'блісса мова');
INSERT INTO "country" ("id", "name") VALUES ('bg', 'болгарська');
INSERT INTO "country" ("id", "name") VALUES ('bs', 'боснійська');
INSERT INTO "country" ("id", "name") VALUES ('bra', 'брадж');
INSERT INTO "country" ("id", "name") VALUES ('br', 'бретонська');
INSERT INTO "country" ("id", "name") VALUES ('bug', 'бугійська');
INSERT INTO "country" ("id", "name") VALUES ('bua', 'бурятська');
INSERT INTO "country" ("id", "name") VALUES ('bho', 'бходжпурі');
INSERT INTO "country" ("id", "name") VALUES ('bik', 'бікольська');
INSERT INTO "country" ("id", "name") VALUES ('be', 'білоруська');
INSERT INTO "country" ("id", "name") VALUES ('bin', 'біні');
INSERT INTO "country" ("id", "name") VALUES ('my', 'бірманська');
INSERT INTO "country" ("id", "name") VALUES ('bi', 'біслама');
INSERT INTO "country" ("id", "name") VALUES ('bh', 'біхарі');
INSERT INTO "country" ("id", "name") VALUES ('vi', 'в'єтнамська');
INSERT INTO "country" ("id", "name") VALUES ('wak', 'вакашські мови');
INSERT INTO "country" ("id", "name") VALUES ('wal', 'валамо');
INSERT INTO "country" ("id", "name") VALUES ('wa', 'валлонська');
INSERT INTO "country" ("id", "name") VALUES ('cy', 'валлійська');
INSERT INTO "country" ("id", "name") VALUES ('war', 'варай');
INSERT INTO "country" ("id", "name") VALUES ('was', 'вашо');
INSERT INTO "country" ("id", "name") VALUES ('vai', 'ваї');
INSERT INTO "country" ("id", "name") VALUES ('ve', 'венда');
INSERT INTO "country" ("id", "name") VALUES ('hsb', 'верхньолужицька');
INSERT INTO "country" ("id", "name") VALUES ('de_CH', 'верхньонімецька швейцарська');
INSERT INTO "country" ("id", "name") VALUES ('vot', 'водська');
INSERT INTO "country" ("id", "name") VALUES ('vo', 'волап'юк');
INSERT INTO "country" ("id", "name") VALUES ('wo', 'волоф');
INSERT INTO "country" ("id", "name") VALUES ('hy', 'вірменська');
INSERT INTO "country" ("id", "name") VALUES ('gaa', 'га');
INSERT INTO "country" ("id", "name") VALUES ('haw', 'гавайська');
INSERT INTO "country" ("id", "name") VALUES ('gd', 'гаельська');
INSERT INTO "country" ("id", "name") VALUES ('gay', 'гайо');
INSERT INTO "country" ("id", "name") VALUES ('gl', 'галісійська');
INSERT INTO "country" ("id", "name") VALUES ('lg', 'ганда');
INSERT INTO "country" ("id", "name") VALUES ('ht', 'гаїтянська');
INSERT INTO "country" ("id", "name") VALUES ('gba', 'гбайя');
INSERT INTO "country" ("id", "name") VALUES ('hz', 'гереро');
INSERT INTO "country" ("id", "name") VALUES ('gem', 'германська мова');
INSERT INTO "country" ("id", "name") VALUES ('nl', 'голландська');
INSERT INTO "country" ("id", "name") VALUES ('gon', 'гонді');
INSERT INTO "country" ("id", "name") VALUES ('gor', 'горонтало');
INSERT INTO "country" ("id", "name") VALUES ('got', 'готська');
INSERT INTO "country" ("id", "name") VALUES ('grb', 'гребо');
INSERT INTO "country" ("id", "name") VALUES ('el', 'грецька');
INSERT INTO "country" ("id", "name") VALUES ('ka', 'грузинська');
INSERT INTO "country" ("id", "name") VALUES ('gn', 'гуарані');
INSERT INTO "country" ("id", "name") VALUES ('gu', 'гуджараті');
INSERT INTO "country" ("id", "name") VALUES ('gez', 'гєез');
INSERT INTO "country" ("id", "name") VALUES ('gil', 'гільбертська');
INSERT INTO "country" ("id", "name") VALUES ('hi', 'гінді');
INSERT INTO "country" ("id", "name") VALUES ('ang', 'давньоанглійська');
INSERT INTO "country" ("id", "name") VALUES ('goh', 'давньоверхньонімецька');
INSERT INTO "country" ("id", "name") VALUES ('grc', 'давньогрецька');
INSERT INTO "country" ("id", "name") VALUES ('non', 'давньонорвезька');
INSERT INTO "country" ("id", "name") VALUES ('peo', 'давньоперська');
INSERT INTO "country" ("id", "name") VALUES ('pro', 'давньопровансальська');
INSERT INTO "country" ("id", "name") VALUES ('fro', 'давньофранцузька');
INSERT INTO "country" ("id", "name") VALUES ('egy', 'давньоєгипетська');
INSERT INTO "country" ("id", "name") VALUES ('sga', 'давньоірландська');
INSERT INTO "country" ("id", "name") VALUES ('dak', 'дакота');
INSERT INTO "country" ("id", "name") VALUES ('da', 'данська');
INSERT INTO "country" ("id", "name") VALUES ('dar', 'даргінська');
INSERT INTO "country" ("id", "name") VALUES ('day', 'даяк');
INSERT INTO "country" ("id", "name") VALUES ('mul', 'декілька мов');
INSERT INTO "country" ("id", "name") VALUES ('del', 'делаварська');
INSERT INTO "country" ("id", "name") VALUES ('dz', 'дзонг-ке');
INSERT INTO "country" ("id", "name") VALUES ('dgr', 'догрибська');
INSERT INTO "country" ("id", "name") VALUES ('doi', 'догрі');
INSERT INTO "country" ("id", "name") VALUES ('dra', 'дравідійська мова');
INSERT INTO "country" ("id", "name") VALUES ('dua', 'дуала');
INSERT INTO "country" ("id", "name") VALUES ('dv', 'дівехі');
INSERT INTO "country" ("id", "name") VALUES ('din', 'дінка');
INSERT INTO "country" ("id", "name") VALUES ('dyu', 'діула');
INSERT INTO "country" ("id", "name") VALUES ('ee', 'еве');
INSERT INTO "country" ("id", "name") VALUES ('ewo', 'евондо');
INSERT INTO "country" ("id", "name") VALUES ('eka', 'екаджук');
INSERT INTO "country" ("id", "name") VALUES ('elx', 'еламська');
INSERT INTO "country" ("id", "name") VALUES ('myv', 'ерзя');
INSERT INTO "country" ("id", "name") VALUES ('eo', 'есперанто');
INSERT INTO "country" ("id", "name") VALUES ('et', 'естонська');
INSERT INTO "country" ("id", "name") VALUES ('efi', 'ефік');
INSERT INTO "country" ("id", "name") VALUES ('zza', 'зазакі');
INSERT INTO "country" ("id", "name") VALUES ('znd', 'занде');
INSERT INTO "country" ("id", "name") VALUES ('zen', 'зенага');
INSERT INTO "country" ("id", "name") VALUES ('sgn', 'знакові мови');
INSERT INTO "country" ("id", "name") VALUES ('zu', 'зулуська');
INSERT INTO "country" ("id", "name") VALUES ('zun', 'зуньї');
INSERT INTO "country" ("id", "name") VALUES ('yo', 'йоруба');
INSERT INTO "country" ("id", "name") VALUES ('kaj', 'йю');
INSERT INTO "country" ("id", "name") VALUES ('kbd', 'кабардинська');
INSERT INTO "country" ("id", "name") VALUES ('kab', 'кабильська');
INSERT INTO "country" ("id", "name") VALUES ('cau', 'кавказька мова');
INSERT INTO "country" ("id", "name") VALUES ('kaw', 'каві');
INSERT INTO "country" ("id", "name") VALUES ('cad', 'каддо');
INSERT INTO "country" ("id", "name") VALUES ('kk', 'казахська');
INSERT INTO "country" ("id", "name") VALUES ('kl', 'калааллісут');
INSERT INTO "country" ("id", "name") VALUES ('xal', 'калмицька');
INSERT INTO "country" ("id", "name") VALUES ('kam', 'камба');
INSERT INTO "country" ("id", "name") VALUES ('kn', 'каннада');
INSERT INTO "country" ("id", "name") VALUES ('kr', 'канурі');
INSERT INTO "country" ("id", "name") VALUES ('kaa', 'каракалпацька');
INSERT INTO "country" ("id", "name") VALUES ('krc', 'карачаєво-балкарська');
INSERT INTO "country" ("id", "name") VALUES ('krl', 'карельська');
INSERT INTO "country" ("id", "name") VALUES ('kar', 'каренська');
INSERT INTO "country" ("id", "name") VALUES ('car', 'карібська');
INSERT INTO "country" ("id", "name") VALUES ('ca', 'каталонська');
INSERT INTO "country" ("id", "name") VALUES ('kac', 'качін');
INSERT INTO "country" ("id", "name") VALUES ('ks', 'кашмірська');
INSERT INTO "country" ("id", "name") VALUES ('csb', 'кашубська');
INSERT INTO "country" ("id", "name") VALUES ('cel', 'кельтська мова');
INSERT INTO "country" ("id", "name") VALUES ('qu', 'кечуа');
INSERT INTO "country" ("id", "name") VALUES ('ky', 'киргизька');
INSERT INTO "country" ("id", "name") VALUES ('zh', 'китайська');
INSERT INTO "country" ("id", "name") VALUES ('zh_Hans', 'китайська спрощена');
INSERT INTO "country" ("id", "name") VALUES ('zh_Hant', 'китайська традиційна');
INSERT INTO "country" ("id", "name") VALUES ('sit', 'китайсько-тибетські мови');
INSERT INTO "country" ("id", "name") VALUES ('tlh', 'клінгон');
INSERT INTO "country" ("id", "name") VALUES ('khi', 'койсанські мови');
INSERT INTO "country" ("id", "name") VALUES ('kv', 'комі');
INSERT INTO "country" ("id", "name") VALUES ('kok', 'конкані');
INSERT INTO "country" ("id", "name") VALUES ('kg', 'конґолезька');
INSERT INTO "country" ("id", "name") VALUES ('cop', 'коптська');
INSERT INTO "country" ("id", "name") VALUES ('ko', 'корейська');
INSERT INTO "country" ("id", "name") VALUES ('kw', 'корнійська');
INSERT INTO "country" ("id", "name") VALUES ('kfo', 'коро');
INSERT INTO "country" ("id", "name") VALUES ('co', 'корсиканська');
INSERT INTO "country" ("id", "name") VALUES ('root', 'корінь');
INSERT INTO "country" ("id", "name") VALUES ('kos', 'косрае');
INSERT INTO "country" ("id", "name") VALUES ('kpe', 'кпеллє');
INSERT INTO "country" ("id", "name") VALUES ('crp', 'креольські та піджінізовані мови');
INSERT INTO "country" ("id", "name") VALUES ('crh', 'кримськотатарська');
INSERT INTO "country" ("id", "name") VALUES ('kro', 'кру');
INSERT INTO "country" ("id", "name") VALUES ('cr', 'крі');
INSERT INTO "country" ("id", "name") VALUES ('mus', 'крік');
INSERT INTO "country" ("id", "name") VALUES ('kum', 'кумицька');
INSERT INTO "country" ("id", "name") VALUES ('kj', 'кунама');
INSERT INTO "country" ("id", "name") VALUES ('ku', 'курдська');
INSERT INTO "country" ("id", "name") VALUES ('kru', 'курукх');
INSERT INTO "country" ("id", "name") VALUES ('kut', 'кутенаї');
INSERT INTO "country" ("id", "name") VALUES ('gwi', 'кучін');
INSERT INTO "country" ("id", "name") VALUES ('cus', 'кушітська мова');
INSERT INTO "country" ("id", "name") VALUES ('kha', 'кхасі');
INSERT INTO "country" ("id", "name") VALUES ('km', 'кхмерська');
INSERT INTO "country" ("id", "name") VALUES ('xh', 'кхоса');
INSERT INTO "country" ("id", "name") VALUES ('ki', 'кікуйю');
INSERT INTO "country" ("id", "name") VALUES ('kmb', 'кімбунду');
INSERT INTO "country" ("id", "name") VALUES ('rw', 'кіньяруанда');
INSERT INTO "country" ("id", "name") VALUES ('lad', 'ладіно');
INSERT INTO "country" ("id", "name") VALUES ('lam', 'ламба');
INSERT INTO "country" ("id", "name") VALUES ('lah', 'ланда');
INSERT INTO "country" ("id", "name") VALUES ('lo', 'лаоська');
INSERT INTO "country" ("id", "name") VALUES ('lv', 'латвійська');
INSERT INTO "country" ("id", "name") VALUES ('es_419', 'латиноамериканська іспанська');
INSERT INTO "country" ("id", "name") VALUES ('la', 'латинська');
INSERT INTO "country" ("id", "name") VALUES ('lez', 'лезгінська');
INSERT INTO "country" ("id", "name") VALUES ('lt', 'литовська');
INSERT INTO "country" ("id", "name") VALUES ('jbo', 'ложбан');
INSERT INTO "country" ("id", "name") VALUES ('loz', 'лозі');
INSERT INTO "country" ("id", "name") VALUES ('lu', 'луба-катанга');
INSERT INTO "country" ("id", "name") VALUES ('lua', 'луба-лулуа');
INSERT INTO "country" ("id", "name") VALUES ('wen', 'лужицькі мови');
INSERT INTO "country" ("id", "name") VALUES ('lun', 'лунда');
INSERT INTO "country" ("id", "name") VALUES ('luo', 'луо');
INSERT INTO "country" ("id", "name") VALUES ('lus', 'лушей');
INSERT INTO "country" ("id", "name") VALUES ('lui', 'луїсеньо');
INSERT INTO "country" ("id", "name") VALUES ('lb', 'люксембурзька');
INSERT INTO "country" ("id", "name") VALUES ('li', 'лімбургійська');
INSERT INTO "country" ("id", "name") VALUES ('ln', 'лінгала');
INSERT INTO "country" ("id", "name") VALUES ('moh', 'магавк');
INSERT INTO "country" ("id", "name") VALUES ('mag', 'магадхі');
INSERT INTO "country" ("id", "name") VALUES ('mad', 'мадурська');
INSERT INTO "country" ("id", "name") VALUES ('mai', 'майтхілі');
INSERT INTO "country" ("id", "name") VALUES ('myn', 'майя мови');
INSERT INTO "country" ("id", "name") VALUES ('mak', 'макасарська');
INSERT INTO "country" ("id", "name") VALUES ('mk', 'македонська');
INSERT INTO "country" ("id", "name") VALUES ('mg', 'малагасійська');
INSERT INTO "country" ("id", "name") VALUES ('ms', 'малайська');
INSERT INTO "country" ("id", "name") VALUES ('ml', 'малайялам');
INSERT INTO "country" ("id", "name") VALUES ('mt', 'мальтійська');
INSERT INTO "country" ("id", "name") VALUES ('mdr', 'мандарська');
INSERT INTO "country" ("id", "name") VALUES ('man', 'мандінго');
INSERT INTO "country" ("id", "name") VALUES ('mno', 'манобо мови');
INSERT INTO "country" ("id", "name") VALUES ('mnc', 'манчжурська');
INSERT INTO "country" ("id", "name") VALUES ('mni', 'маніпурі');
INSERT INTO "country" ("id", "name") VALUES ('mi', 'маорі');
INSERT INTO "country" ("id", "name") VALUES ('mr', 'маратхі');
INSERT INTO "country" ("id", "name") VALUES ('mwr', 'марварі');
INSERT INTO "country" ("id", "name") VALUES ('mh', 'маршалльська');
INSERT INTO "country" ("id", "name") VALUES ('chm', 'марійська');
INSERT INTO "country" ("id", "name") VALUES ('mas', 'масаї');
INSERT INTO "country" ("id", "name") VALUES ('men', 'менде');
INSERT INTO "country" ("id", "name") VALUES ('gv', 'менкська');
INSERT INTO "country" ("id", "name") VALUES ('mdf', 'мокша');
INSERT INTO "country" ("id", "name") VALUES ('mo', 'молдавська');
INSERT INTO "country" ("id", "name") VALUES ('mkh', 'мон-кхмерські мови');
INSERT INTO "country" ("id", "name") VALUES ('lol', 'монго');
INSERT INTO "country" ("id", "name") VALUES ('mn', 'монгольська');
INSERT INTO "country" ("id", "name") VALUES ('mos', 'моссі');
INSERT INTO "country" ("id", "name") VALUES ('mun', 'мунда мови');
INSERT INTO "country" ("id", "name") VALUES ('mic', 'мікмак');
INSERT INTO "country" ("id", "name") VALUES ('min', 'мінангкабау');
INSERT INTO "country" ("id", "name") VALUES ('mwl', 'мірандська');
INSERT INTO "country" ("id", "name") VALUES ('nv', 'навахо');
INSERT INTO "country" ("id", "name") VALUES ('na', 'науру');
INSERT INTO "country" ("id", "name") VALUES ('nah', 'нахуатль');
INSERT INTO "country" ("id", "name") VALUES ('nr', 'ндебелє південна');
INSERT INTO "country" ("id", "name") VALUES ('nd', 'ндебелє північна');
INSERT INTO "country" ("id", "name") VALUES ('ng', 'ндонга');
INSERT INTO "country" ("id", "name") VALUES ('nap', 'неаполітанська');
INSERT INTO "country" ("id", "name") VALUES ('new', 'неварі');
INSERT INTO "country" ("id", "name") VALUES ('nwc', 'неварі класична');
INSERT INTO "country" ("id", "name") VALUES ('und', 'невизначена мова');
INSERT INTO "country" ("id", "name") VALUES ('zxx', 'немає мовного вмісту');
INSERT INTO "country" ("id", "name") VALUES ('ne', 'непальська');
INSERT INTO "country" ("id", "name") VALUES ('nzi', 'нзіма');
INSERT INTO "country" ("id", "name") VALUES ('dsb', 'нижньолужицька');
INSERT INTO "country" ("id", "name") VALUES ('nds', 'нижньонімецька');
INSERT INTO "country" ("id", "name") VALUES ('nqo', 'нко');
INSERT INTO "country" ("id", "name") VALUES ('nog', 'ногайська');
INSERT INTO "country" ("id", "name") VALUES ('no', 'норвезька');
INSERT INTO "country" ("id", "name") VALUES ('nb', 'норвезька букмол');
INSERT INTO "country" ("id", "name") VALUES ('nn', 'норвезька нюнорськ');
INSERT INTO "country" ("id", "name") VALUES ('nub', 'нубійські мови');
INSERT INTO "country" ("id", "name") VALUES ('nyo', 'ньоро');
INSERT INTO "country" ("id", "name") VALUES ('nym', 'ньямвезі');
INSERT INTO "country" ("id", "name") VALUES ('ny', 'ньянджа');
INSERT INTO "country" ("id", "name") VALUES ('nyn', 'ньянколе');
INSERT INTO "country" ("id", "name") VALUES ('tog', 'ньяса тонга');
INSERT INTO "country" ("id", "name") VALUES ('nia', 'ніаська');
INSERT INTO "country" ("id", "name") VALUES ('ssa', 'ніло-сахарські мови');
INSERT INTO "country" ("id", "name") VALUES ('de', 'німецька');
INSERT INTO "country" ("id", "name") VALUES ('de_AT', 'німецька австрійська');
INSERT INTO "country" ("id", "name") VALUES ('gsw', 'німецька швейцарська');
INSERT INTO "country" ("id", "name") VALUES ('niu', 'ніуе');
INSERT INTO "country" ("id", "name") VALUES ('nic', 'ніґеро-кордофанські мови');
INSERT INTO "country" ("id", "name") VALUES ('oj', 'оджібва');
INSERT INTO "country" ("id", "name") VALUES ('oc', 'окитан');
INSERT INTO "country" ("id", "name") VALUES ('om', 'оромо');
INSERT INTO "country" ("id", "name") VALUES ('or', 'орія');
INSERT INTO "country" ("id", "name") VALUES ('osa', 'осейдж');
INSERT INTO "country" ("id", "name") VALUES ('os', 'осетинська');
INSERT INTO "country" ("id", "name") VALUES ('ota', 'османська');
INSERT INTO "country" ("id", "name") VALUES ('oto', 'отомі мови');
INSERT INTO "country" ("id", "name") VALUES ('pau', 'палауанська');
INSERT INTO "country" ("id", "name") VALUES ('pi', 'палі');
INSERT INTO "country" ("id", "name") VALUES ('pam', 'пампанга');
INSERT INTO "country" ("id", "name") VALUES ('pag', 'пангасінанська');
INSERT INTO "country" ("id", "name") VALUES ('pa', 'панджабі');
INSERT INTO "country" ("id", "name") VALUES ('paa', 'папуаські мови');
INSERT INTO "country" ("id", "name") VALUES ('pap', 'пап'яменто');
INSERT INTO "country" ("id", "name") VALUES ('fa', 'перська');
INSERT INTO "country" ("id", "name") VALUES ('pal', 'пехлеві');
INSERT INTO "country" ("id", "name") VALUES ('pl', 'польська');
INSERT INTO "country" ("id", "name") VALUES ('pon', 'понапе');
INSERT INTO "country" ("id", "name") VALUES ('pt', 'португальська');
INSERT INTO "country" ("id", "name") VALUES ('pt_BR', 'португальська бразильська');
INSERT INTO "country" ("id", "name") VALUES ('pt_PT', 'португальська іберійська');
INSERT INTO "country" ("id", "name") VALUES ('cpp', 'португальсько-креольські та піджінізовані португальські мови');
INSERT INTO "country" ("id", "name") VALUES ('pra', 'пракріті мови');
INSERT INTO "country" ("id", "name") VALUES ('ps', 'пушту');
INSERT INTO "country" ("id", "name") VALUES ('alt', 'південноалтайська');
INSERT INTO "country" ("id", "name") VALUES ('sai', 'південноамериканських індіанців мови');
INSERT INTO "country" ("id", "name") VALUES ('nai', 'північноамериканських індіанців мови');
INSERT INTO "country" ("id", "name") VALUES ('raj', 'раджастхані');
INSERT INTO "country" ("id", "name") VALUES ('rap', 'рапануї');
INSERT INTO "country" ("id", "name") VALUES ('rar', 'раротонга');
INSERT INTO "country" ("id", "name") VALUES ('rm', 'ретороманська');
INSERT INTO "country" ("id", "name") VALUES ('roa', 'романські мови');
INSERT INTO "country" ("id", "name") VALUES ('ru', 'російська');
INSERT INTO "country" ("id", "name") VALUES ('ro', 'румунська');
INSERT INTO "country" ("id", "name") VALUES ('rn', 'рунді');
INSERT INTO "country" ("id", "name") VALUES ('smj', 'саамська луле');
INSERT INTO "country" ("id", "name") VALUES ('sma', 'саамська південна');
INSERT INTO "country" ("id", "name") VALUES ('se', 'саамська північна');
INSERT INTO "country" ("id", "name") VALUES ('sms', 'саамська скольт');
INSERT INTO "country" ("id", "name") VALUES ('smn', 'саамська інарі');
INSERT INTO "country" ("id", "name") VALUES ('smi', 'саамські мови');
INSERT INTO "country" ("id", "name") VALUES ('sal', 'салішські мови');
INSERT INTO "country" ("id", "name") VALUES ('sam', 'самаритянська арамейська');
INSERT INTO "country" ("id", "name") VALUES ('sm', 'самоанська');
INSERT INTO "country" ("id", "name") VALUES ('sg', 'санго');
INSERT INTO "country" ("id", "name") VALUES ('sad', 'сандаве');
INSERT INTO "country" ("id", "name") VALUES ('sa', 'санскрит');
INSERT INTO "country" ("id", "name") VALUES ('sat', 'сантальська');
INSERT INTO "country" ("id", "name") VALUES ('zap', 'сапотекська');
INSERT INTO "country" ("id", "name") VALUES ('sc', 'сардинська');
INSERT INTO "country" ("id", "name") VALUES ('sas', 'сасакська');
INSERT INTO "country" ("id", "name") VALUES ('ceb', 'себуанська');
INSERT INTO "country" ("id", "name") VALUES ('sel', 'селькупська');
INSERT INTO "country" ("id", "name") VALUES ('sem', 'семітські мови');
INSERT INTO "country" ("id", "name") VALUES ('sr', 'сербська');
INSERT INTO "country" ("id", "name") VALUES ('sh', 'сербсько-хорватська');
INSERT INTO "country" ("id", "name") VALUES ('enm', 'середньоанглійська');
INSERT INTO "country" ("id", "name") VALUES ('gmh', 'середньоверхньонімецька');
INSERT INTO "country" ("id", "name") VALUES ('dum', 'середньонідерландська');
INSERT INTO "country" ("id", "name") VALUES ('frm', 'середньофранцузька');
INSERT INTO "country" ("id", "name") VALUES ('mga', 'середньоірландська');
INSERT INTO "country" ("id", "name") VALUES ('srr', 'серер');
INSERT INTO "country" ("id", "name") VALUES ('si', 'сингальська');
INSERT INTO "country" ("id", "name") VALUES ('syr', 'сирійська');
INSERT INTO "country" ("id", "name") VALUES ('syc', 'сирійська класична');
INSERT INTO "country" ("id", "name") VALUES ('scn', 'сицилійська');
INSERT INTO "country" ("id", "name") VALUES ('ii', 'сичуань');
INSERT INTO "country" ("id", "name") VALUES ('den', 'слейв');
INSERT INTO "country" ("id", "name") VALUES ('sk', 'словацька');
INSERT INTO "country" ("id", "name") VALUES ('sl', 'словенська');
INSERT INTO "country" ("id", "name") VALUES ('sla', 'слов'янські мови');
INSERT INTO "country" ("id", "name") VALUES ('sog', 'согдійська');
INSERT INTO "country" ("id", "name") VALUES ('so', 'сомалі');
INSERT INTO "country" ("id", "name") VALUES ('son', 'сонгай');
INSERT INTO "country" ("id", "name") VALUES ('snk', 'сонінке');
INSERT INTO "country" ("id", "name") VALUES ('st', 'сото південна');
INSERT INTO "country" ("id", "name") VALUES ('nso', 'сото північна');
INSERT INTO "country" ("id", "name") VALUES ('srn', 'сранан тонго');
INSERT INTO "country" ("id", "name") VALUES ('sw', 'суахілі');
INSERT INTO "country" ("id", "name") VALUES ('suk', 'сукума');
INSERT INTO "country" ("id", "name") VALUES ('su', 'сунданська');
INSERT INTO "country" ("id", "name") VALUES ('sus', 'сусу');
INSERT INTO "country" ("id", "name") VALUES ('sid', 'сідамо');
INSERT INTO "country" ("id", "name") VALUES ('bla', 'сіксіка');
INSERT INTO "country" ("id", "name") VALUES ('sd', 'сіндхі');
INSERT INTO "country" ("id", "name") VALUES ('ss', 'сісваті');
INSERT INTO "country" ("id", "name") VALUES ('sio', 'сіу мови');
INSERT INTO "country" ("id", "name") VALUES ('tl', 'тагальська');
INSERT INTO "country" ("id", "name") VALUES ('tg', 'таджицька');
INSERT INTO "country" ("id", "name") VALUES ('th', 'тайська');
INSERT INTO "country" ("id", "name") VALUES ('tai', 'тайські мови');
INSERT INTO "country" ("id", "name") VALUES ('tmh', 'тамашек');
INSERT INTO "country" ("id", "name") VALUES ('ta', 'тамільська');
INSERT INTO "country" ("id", "name") VALUES ('tt', 'татарська');
INSERT INTO "country" ("id", "name") VALUES ('ty', 'таїтянська');
INSERT INTO "country" ("id", "name") VALUES ('tw', 'тві');
INSERT INTO "country" ("id", "name") VALUES ('te', 'телугу');
INSERT INTO "country" ("id", "name") VALUES ('tem', 'темне');
INSERT INTO "country" ("id", "name") VALUES ('ter', 'терено');
INSERT INTO "country" ("id", "name") VALUES ('tet', 'тетум');
INSERT INTO "country" ("id", "name") VALUES ('bo', 'тибетська');
INSERT INTO "country" ("id", "name") VALUES ('tig', 'тигре');
INSERT INTO "country" ("id", "name") VALUES ('ti', 'тигріні');
INSERT INTO "country" ("id", "name") VALUES ('tli', 'тлінгіт');
INSERT INTO "country" ("id", "name") VALUES ('tpi', 'ток-пісін');
INSERT INTO "country" ("id", "name") VALUES ('tkl', 'токелау');
INSERT INTO "country" ("id", "name") VALUES ('tn', 'тсвана');
INSERT INTO "country" ("id", "name") VALUES ('ts', 'тсонга');
INSERT INTO "country" ("id", "name") VALUES ('tvl', 'тувалу');
INSERT INTO "country" ("id", "name") VALUES ('tyv', 'тувинська');
INSERT INTO "country" ("id", "name") VALUES ('tum', 'тумбука');
INSERT INTO "country" ("id", "name") VALUES ('tup', 'тупі');
INSERT INTO "country" ("id", "name") VALUES ('tr', 'турецька');
INSERT INTO "country" ("id", "name") VALUES ('tk', 'туркменська');
INSERT INTO "country" ("id", "name") VALUES ('kcg', 'тіап');
INSERT INTO "country" ("id", "name") VALUES ('tiv', 'тів');
INSERT INTO "country" ("id", "name") VALUES ('uga', 'угаритська');
INSERT INTO "country" ("id", "name") VALUES ('hu', 'угорська');
INSERT INTO "country" ("id", "name") VALUES ('udm', 'удмуртська');
INSERT INTO "country" ("id", "name") VALUES ('uz', 'узбецька');
INSERT INTO "country" ("id", "name") VALUES ('ug', 'уйгурська');
INSERT INTO "country" ("id", "name") VALUES ('uk', 'українська');
INSERT INTO "country" ("id", "name") VALUES ('umb', 'умбунду');
INSERT INTO "country" ("id", "name") VALUES ('ur', 'урду');
INSERT INTO "country" ("id", "name") VALUES ('fan', 'фанг');
INSERT INTO "country" ("id", "name") VALUES ('fat', 'фанті');
INSERT INTO "country" ("id", "name") VALUES ('fo', 'фарерська');
INSERT INTO "country" ("id", "name") VALUES ('nl_BE', 'фламандська');
INSERT INTO "country" ("id", "name") VALUES ('fon', 'фон');
INSERT INTO "country" ("id", "name") VALUES ('cpf', 'франко-креольські та піджінізовані франкофонні мови');
INSERT INTO "country" ("id", "name") VALUES ('fr', 'французька');
INSERT INTO "country" ("id", "name") VALUES ('fr_CA', 'французька канадська');
INSERT INTO "country" ("id", "name") VALUES ('fr_CH', 'французька швейцарська');
INSERT INTO "country" ("id", "name") VALUES ('fy', 'фризька');
INSERT INTO "country" ("id", "name") VALUES ('frr', 'фризька північна');
INSERT INTO "country" ("id", "name") VALUES ('frs', 'фризька східна');
INSERT INTO "country" ("id", "name") VALUES ('fur', 'фріульська');
INSERT INTO "country" ("id", "name") VALUES ('ff', 'фула');
INSERT INTO "country" ("id", "name") VALUES ('fj', 'фіджі');
INSERT INTO "country" ("id", "name") VALUES ('fil', 'філіппінська');
INSERT INTO "country" ("id", "name") VALUES ('phi', 'філіппінські мови');
INSERT INTO "country" ("id", "name") VALUES ('fiu', 'фінно-угорські мови');
INSERT INTO "country" ("id", "name") VALUES ('fi', 'фінська');
INSERT INTO "country" ("id", "name") VALUES ('phn', 'фінікійсько-пунічна');
INSERT INTO "country" ("id", "name") VALUES ('hai', 'хайда');
INSERT INTO "country" ("id", "name") VALUES ('cmc', 'хамітські мови');
INSERT INTO "country" ("id", "name") VALUES ('ha', 'хауса');
INSERT INTO "country" ("id", "name") VALUES ('hmn', 'хмонг');
INSERT INTO "country" ("id", "name") VALUES ('hr', 'хорватська');
INSERT INTO "country" ("id", "name") VALUES ('kho', 'хотаносакська');
INSERT INTO "country" ("id", "name") VALUES ('hup', 'хупа');
INSERT INTO "country" ("id", "name") VALUES ('hil', 'хілігайнон');
INSERT INTO "country" ("id", "name") VALUES ('him', 'хімачалі');
INSERT INTO "country" ("id", "name") VALUES ('ho', 'хірі-моту');
INSERT INTO "country" ("id", "name") VALUES ('hit', 'хітіті');
INSERT INTO "country" ("id", "name") VALUES ('cai', 'центральноамериканьских індіанців мова');
INSERT INTO "country" ("id", "name") VALUES ('cu', 'церковнослов'янська');
INSERT INTO "country" ("id", "name") VALUES ('rom', 'циганська');
INSERT INTO "country" ("id", "name") VALUES ('tsi', 'цимшиан');
INSERT INTO "country" ("id", "name") VALUES ('chg', 'чагатайська');
INSERT INTO "country" ("id", "name") VALUES ('ch', 'чаморро');
INSERT INTO "country" ("id", "name") VALUES ('chy', 'чейєнн');
INSERT INTO "country" ("id", "name") VALUES ('chr', 'черокі');
INSERT INTO "country" ("id", "name") VALUES ('cs', 'чеська');
INSERT INTO "country" ("id", "name") VALUES ('ce', 'чеченська');
INSERT INTO "country" ("id", "name") VALUES ('za', 'чжуан');
INSERT INTO "country" ("id", "name") VALUES ('chn', 'чинук жаргон');
INSERT INTO "country" ("id", "name") VALUES ('cho', 'чокто');
INSERT INTO "country" ("id", "name") VALUES ('cv', 'чуваська');
INSERT INTO "country" ("id", "name") VALUES ('chk', 'чуукська');
INSERT INTO "country" ("id", "name") VALUES ('chb', 'чібча');
INSERT INTO "country" ("id", "name") VALUES ('chp', 'чіпев'ян');
INSERT INTO "country" ("id", "name") VALUES ('shn', 'шанська');
INSERT INTO "country" ("id", "name") VALUES ('sv', 'шведська');
INSERT INTO "country" ("id", "name") VALUES ('sn', 'шона');
INSERT INTO "country" ("id", "name") VALUES ('sco', 'шотландська');
INSERT INTO "country" ("id", "name") VALUES ('art', 'штучна мова');
INSERT INTO "country" ("id", "name") VALUES ('sux', 'шумерська');
INSERT INTO "country" ("id", "name") VALUES ('ypk', 'юпік мови');
INSERT INTO "country" ("id", "name") VALUES ('jv', 'яванська');
INSERT INTO "country" ("id", "name") VALUES ('sah', 'якутська');
INSERT INTO "country" ("id", "name") VALUES ('yao', 'яо');
INSERT INTO "country" ("id", "name") VALUES ('yap', 'яп');
INSERT INTO "country" ("id", "name") VALUES ('ja', 'японська');
INSERT INTO "country" ("id", "name") VALUES ('iba', 'ібанська');
INSERT INTO "country" ("id", "name") VALUES ('es_ES', 'іберійська іспанська');
INSERT INTO "country" ("id", "name") VALUES ('he', 'іврит');
INSERT INTO "country" ("id", "name") VALUES ('ig', 'ігбо');
INSERT INTO "country" ("id", "name") VALUES ('ijo', 'іджо');
INSERT INTO "country" ("id", "name") VALUES ('yi', 'ідиш');
INSERT INTO "country" ("id", "name") VALUES ('io', 'ідо');
INSERT INTO "country" ("id", "name") VALUES ('ilo', 'ілоканська');
INSERT INTO "country" ("id", "name") VALUES ('inh', 'інгуська');
INSERT INTO "country" ("id", "name") VALUES ('id', 'індонезійська');
INSERT INTO "country" ("id", "name") VALUES ('ine', 'індоєвропейські мови');
INSERT INTO "country" ("id", "name") VALUES ('inc', 'індійські мови');
INSERT INTO "country" ("id", "name") VALUES ('ia', 'інтерлінгва');
INSERT INTO "country" ("id", "name") VALUES ('ie', 'інтерлінгве');
INSERT INTO "country" ("id", "name") VALUES ('iu', 'інуктітут');
INSERT INTO "country" ("id", "name") VALUES ('ik', 'інупіак');
INSERT INTO "country" ("id", "name") VALUES ('mis', 'інші мови');
INSERT INTO "country" ("id", "name") VALUES ('ira', 'іранська');
INSERT INTO "country" ("id", "name") VALUES ('ga', 'ірландська');
INSERT INTO "country" ("id", "name") VALUES ('iro', 'ірокезькі мови');
INSERT INTO "country" ("id", "name") VALUES ('is', 'ісландська');
INSERT INTO "country" ("id", "name") VALUES ('es', 'іспанська');
INSERT INTO "country" ("id", "name") VALUES ('it', 'італійська');
INSERT INTO "country" ("id", "name") VALUES ('jrb', 'іудео-арабська');
INSERT INTO "country" ("id", "name") VALUES ('jpr', 'іудео-перська');


text:
<?php

namespace Bio\ExamBundle\Form;

use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;

class ExamType extends AbstractType
{
        /**
     * @param FormBuilderInterface $builder
     * @param array $options
     */
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder
            ->add('title', 'text', array('label'=>'Exam name'))
            ->add('section', 'text', array(
                'label'=>'Section name',
                'required' => false,
                'empty_data' => '',
                'attr' => array(
                    'pattern' => '(\A\Z)|(^[A-Z][A-Z0-9]?$)',
                    'title' => 'One or two letter capitalized section name.'
                    )
                )
            )
            ->add('tDate', 'date',        array('label' => 'Test Date:'))
            ->add('tStart', 'time',       array('label'=>'Test Start:'))
            ->add('tEnd', 'time',         array('label'=>'Test End:'))
            ->add('tDuration', 'integer', array('label'=>'Test length (m)'))
            ->add('gDate', 'date',        array('label' => 'Grading Date:'))
            ->add('gStart', 'time',       array('label'=>'Grade Start:'))
            ->add('gEnd', 'time',         array('label'=>'Grade End:'))
            ->add('gDuration', 'integer', array('label'=>'Grade length (m)'))
        ;
    }

    /**
     * @param OptionsResolverInterface $resolver
     */
    public function setDefaultOptions(OptionsResolverInterface $resolver)
    {
        $resolver->setDefaults(array(
            'data_class' => 'Bio\ExamBundle\Entity\Exam'
        ));
    }

    /**
     * @return string
     */
    public function getName()
    {
        return 'form';
    }
}


text:
ALTER TABLE meta ADD UNIQUE key_value (meta_key, meta_value);

# patch identifier
INSERT INTO meta (meta_key, meta_value) VALUES ('patch', 'patch_45_46_d.sql|meta_unique_key');


text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>dblib: 40 s 🏆</title>
    <link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
    <link href="../../../../../bootstrap.min.css" rel="stylesheet">
    <link href="../../../../../bootstrap-custom.css" rel="stylesheet">
    <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">

             Coq bench

clean / released

8.7.1 / dblib - 8.7.0

            « Up

              dblib

                8.7.0
                40 s 🏆

📅  (2022-10-04 09:52:02 UTC)

Context

# Packages matching: installed
# Name              # Installed # Synopsis
base-bigarray       base
base-num            base        Num library distributed with the OCaml compiler
base-ocamlbuild     base        OCamlbuild binary and libraries distributed with the OCaml compiler
base-threads        base
base-unix           base
camlp5              7.14        Preprocessor-pretty-printer of OCaml
conf-findutils      1           Virtual package relying on findutils
conf-perl           2           Virtual package relying on perl
coq                 8.7.1       Formal proof management system
num                 0           The Num library for arbitrary-precision integer and rational arithmetic
ocaml               4.02.3      The OCaml compiler (virtual package)
ocaml-base-compiler 4.02.3      Official 4.02.3 release
ocaml-config        1           OCaml Switch Configuration
ocamlfind           1.9.5       A library manager for OCaml
# opam file:
opam-version: "2.0"
maintainer: "Hugo.Herbelin@inria.fr"
homepage: "https://github.com/coq-contribs/dblib"
license: "GPL"
build: [make "-j%{jobs}%"]
install: [make "install"]
remove: ["rm" "-R" "%{lib}%/coq/user-contrib/Dblib"]
depends: [
  "ocaml"
  "coq" {>= "8.7" & < "8.8~"}
]
tags: [ "keyword: abstract syntax" "keyword: binders" "keyword: de Bruijn indices" "keyword: shift" "keyword: lift" "keyword: substitution" "category: Computer Science/Lambda Calculi" ]
authors: [ "Francois Pottier <francois.pottier@inria.fr> [http://gallium.inria.fr/~fpottier/]" ]
bug-reports: "https://github.com/coq-contribs/dblib/issues"
dev-repo: "git+https://github.com/coq-contribs/dblib.git"
synopsis: "Dblib"
description: """
http://gallium.inria.fr/~fpottier/dblib/README
The dblib library offers facilities for working with de Bruijn indices."""
flags: light-uninstall
url {
  src: "https://github.com/coq-contribs/dblib/archive/v8.7.0.tar.gz"
  checksum: "md5=9b872142011b72c077524ed05cd935da"
}

Lint

Command

true

Return code

0

Dry install 🏜

Dry install with the current Coq version:

Command

opam install -y --show-action coq-dblib.8.7.0 coq.8.7.1

Return code

0

Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:

Command

true

Return code

0

Install dependencies

Command

opam list; echo; ulimit -Sv 4000000; timeout 4h opam install -y --deps-only coq-dblib.8.7.0 coq.8.7.1

Return code

0

Duration

14 s

Install 🚀

Command

opam list; echo; ulimit -Sv 16000000; timeout 4h opam install -y -v coq-dblib.8.7.0 coq.8.7.1

Return code

0

Duration

40 s

Installation size

Total: 2 M

556 K ../ocaml-base-compiler.4.02.3/lib/coq/user-contrib/Dblib/DeBruijn.vo

256 K ../ocaml-base-compiler.4.02.3/lib/coq/user-contrib/Dblib/Environments.vo

134 K ../ocaml-base-compiler.4.02.3/lib/coq/user-contrib/Dblib/DemoImplicitSystemF.vo

123 K ../ocaml-base-compiler.4.02.3/lib/coq/user-contrib/Dblib/DemoExplicitSystemF.vo

102 K ../ocaml-base-compiler.4.02.3/lib/coq/user-contrib/Dblib/DemoLambda.vo

94 K ../ocaml-base-compiler.4.02.3/lib/coq/user-contrib/Dblib/DeBruijn.glob

79 K ../ocaml-base-compiler.4.02.3/lib/coq/user-contrib/Dblib/Environments.glob

57 K ../ocaml-base-compiler.4.02.3/lib/coq/user-contrib/Dblib/DemoValueTerm.vo

55 K ../ocaml-base-compiler.4.02.3/lib/coq/user-contrib/Dblib/DeBruijn.v

31 K ../ocaml-base-compiler.4.02.3/lib/coq/user-contrib/Dblib/Environments.v

29 K ../ocaml-base-compiler.4.02.3/lib/coq/user-contrib/Dblib/DblibTactics.vo

29 K ../ocaml-base-compiler.4.02.3/lib/coq/user-contrib/Dblib/DemoImplicitSystemF.glob

23 K ../ocaml-base-compiler.4.02.3/lib/coq/user-contrib/Dblib/DemoExplicitSystemF.glob

18 K ../ocaml-base-compiler.4.02.3/lib/coq/user-contrib/Dblib/DemoLambda.glob

15 K ../ocaml-base-compiler.4.02.3/lib/coq/user-contrib/Dblib/DemoValueTerm.glob

9 K ../ocaml-base-compiler.4.02.3/lib/coq/user-contrib/Dblib/DemoImplicitSystemF.v

8 K ../ocaml-base-compiler.4.02.3/lib/coq/user-contrib/Dblib/DemoLambda.v

7 K ../ocaml-base-compiler.4.02.3/lib/coq/user-contrib/Dblib/DemoExplicitSystemF.v

5 K ../ocaml-base-compiler.4.02.3/lib/coq/user-contrib/Dblib/DemoValueTerm.v

2 K ../ocaml-base-compiler.4.02.3/lib/coq/user-contrib/Dblib/DblibTactics.glob

1 K ../ocaml-base-compiler.4.02.3/lib/coq/user-contrib/Dblib/DblibTactics.v

Uninstall 🧹

Command

opam remove -y coq-dblib.8.7.0

Return code

0

Missing removes

                none

Wrong removes

                none

          Sources are on GitHub © Guillaume Claret 🐣


text:
package cloud

import (
	"context"
	"net/http"
	"testing"
)

func TestBasicAuthTransport(t *testing.T) {
	setup()
	defer teardown()

	username, apiToken := "username", "api_token"

	testMux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
		u, p, ok := r.BasicAuth()
		if !ok {
			t.Errorf("request does not contain basic auth credentials")
		}
		if u != username {
			t.Errorf("request contained basic auth username %q, want %q", u, username)
		}
		if p != apiToken {
			t.Errorf("request contained basic auth password %q, want %q", p, apiToken)
		}
	})

	tp := &BasicAuthTransport{
		Username: username,
		APIToken: apiToken,
	}

	basicAuthClient, _ := NewClient(testServer.URL, tp.Client())
	req, _ := basicAuthClient.NewRequest(context.Background(), http.MethodGet, ".", nil)
	basicAuthClient.Do(req, nil)
}

func TestBasicAuthTransport_transport(t *testing.T) {
	// default transport
	tp := &BasicAuthTransport{}
	if tp.transport() != http.DefaultTransport {
		t.Errorf("Expected http.DefaultTransport to be used.")
	}

	// custom transport
	tp = &BasicAuthTransport{
		Transport: &http.Transport{},
	}
	if tp.transport() == http.DefaultTransport {
		t.Errorf("Expected custom transport to be used.")
	}
}


text:
define("ace/snippets/gherkin",["require","exports","module"], function(require, exports, module) {
"use strict";

exports.snippetText =undefined;
exports.scope = "gherkin";

});


text:
<!DOCTYPE html>

<meta charset="utf-8" />

Simple Marker Example

Run the following commands in the terminal then refresh this page.

<tt>roscore</tt>

<tt>rosrun visualization_marker_tutorials basic_shapes</tt>

<tt>rosrun tf2_web_republisher tf2_web_republisher</tt>

<tt>roslaunch rosbridge_server rosbridge_websocket.launch</tt>


text:
#ifndef __LINUX_SERIAL_SCI_H
#define __LINUX_SERIAL_SCI_H

#include <linux/bitops.h>
#include <linux/serial_core.h>
#include <linux/sh_dma.h>

/*
 * Generic header for SuperH (H)SCI(F) (used by sh/sh64 and related parts)
 */

#define SCIx_NOT_SUPPORTED	(-1)

/* Serial Control Register (@ = not supported by all parts) */
#define SCSCR_TIE	BIT(7)	/* Transmit Interrupt Enable */
#define SCSCR_RIE	BIT(6)	/* Receive Interrupt Enable */
#define SCSCR_TE	BIT(5)	/* Transmit Enable */
#define SCSCR_RE	BIT(4)	/* Receive Enable */
#define SCSCR_REIE	BIT(3)	/* Receive Error Interrupt Enable @ */
#define SCSCR_TOIE	BIT(2)	/* Timeout Interrupt Enable @ */
#define SCSCR_CKE1	BIT(1)	/* Clock Enable 1 */
#define SCSCR_CKE0	BIT(0)	/* Clock Enable 0 */

enum {
	SCIx_PROBE_REGTYPE,

	SCIx_SCI_REGTYPE,
	SCIx_IRDA_REGTYPE,
	SCIx_SCIFA_REGTYPE,
	SCIx_SCIFB_REGTYPE,
	SCIx_SH2_SCIF_FIFODATA_REGTYPE,
	SCIx_SH3_SCIF_REGTYPE,
	SCIx_SH4_SCIF_REGTYPE,
	SCIx_SH4_SCIF_BRG_REGTYPE,
	SCIx_SH4_SCIF_NO_SCSPTR_REGTYPE,
	SCIx_SH4_SCIF_FIFODATA_REGTYPE,
	SCIx_SH7705_SCIF_REGTYPE,
	SCIx_HSCIF_REGTYPE,

	SCIx_NR_REGTYPES,
};

struct device;

struct plat_sci_port_ops {
	void (*init_pins)(struct uart_port *, unsigned int cflag);
};

/*
 * Port-specific capabilities
 */
#define SCIx_HAVE_RTSCTS	BIT(0)

/*
 * Platform device specific platform_data struct
 */
struct plat_sci_port {
	unsigned int	type;			/* SCI / SCIF / IRDA / HSCIF */
	upf_t		flags;			/* UPF_* flags */
	unsigned long	capabilities;		/* Port features/capabilities */

	unsigned int	sampling_rate;
	unsigned int	scscr;			/* SCSCR initialization */

	/*
	 * Platform overrides if necessary, defaults otherwise.
	 */
	int		port_reg;
	unsigned char	regshift;
	unsigned char	regtype;

	struct plat_sci_port_ops	*ops;

	unsigned int	dma_slave_tx;
	unsigned int	dma_slave_rx;
};

#endif /* __LINUX_SERIAL_SCI_H */


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.container.impl.jboss.deployment.processor;

import static org.jboss.as.server.deployment.Attachments.DEPLOYMENT_ROOT;

import java.util.logging.Level;
import java.util.logging.Logger;

import javax.ejb.ConcurrencyManagementType;
import javax.ejb.TransactionAttributeType;
import javax.ejb.TransactionManagementType;

import org.camunda.bpm.application.ProcessApplication;
import org.camunda.bpm.application.ProcessApplicationExecutionException;
import org.camunda.bpm.application.impl.EjbProcessApplication;
import org.camunda.bpm.container.impl.jboss.deployment.marker.ProcessApplicationAttachments;
import org.jboss.as.ee.component.Attachments;
import org.jboss.as.ee.component.EEApplicationClasses;
import org.jboss.as.ee.component.EEModuleDescription;
import org.jboss.as.ejb3.component.singleton.SingletonComponentDescription;
import org.jboss.as.ejb3.deployment.ApplicationExceptionDescriptions;
import org.jboss.as.ejb3.deployment.EjbDeploymentAttachmentKeys;
import org.jboss.as.ejb3.deployment.EjbDeploymentMarker;
import org.jboss.as.ejb3.deployment.EjbJarDescription;
import org.jboss.as.server.deployment.DeploymentPhaseContext;
import org.jboss.as.server.deployment.DeploymentUnit;
import org.jboss.as.server.deployment.DeploymentUnitProcessingException;
import org.jboss.as.server.deployment.DeploymentUnitProcessor;
import org.jboss.as.server.deployment.module.ResourceRoot;
import org.jboss.metadata.ejb.jboss.ejb3.JBossEnterpriseBeansMetaData;
import org.jboss.metadata.ejb.spec.ContainerTransactionMetaData;
import org.jboss.metadata.ejb.spec.EjbJarMetaData;
import org.jboss.metadata.ejb.spec.EjbJarVersion;
import org.jboss.metadata.ejb.spec.EjbType;
import org.jboss.metadata.ejb.spec.GenericBeanMetaData;
import org.jboss.metadata.ejb.spec.SessionType;
import org.jboss.vfs.VirtualFile;

/**
 *
This processor synthesizes a Singleton Session Bean {@link EjbProcessApplication} component, if
 *

 *
the deployment unit itself carries a META-INF/processes.xml file
 *      (This means that if the META-INF/processes.xml is an Application library
 *      packaged inside an EAR, we DO NOT synthesize a component because we
 *      would not know which EE module to add the component to.)

 *
there is no user-provided ProcessApplication component present in the deployment.
 *      (This restriction takes into account composite EAR deployments. In an EAR deployment,
 *      we only synthesize a component if ).

 *

 *
 * @author Daniel Meyer
 *
 */
public class ProcessApplicationComponentAddProcessor implements DeploymentUnitProcessor {

  private final static Logger LOGGER = Logger.getLogger(ProcessApplicationComponentAddProcessor.class.getName());

  // this must happen after we looked through the whole deployment for user-provided components.
  public static final int PRIORITY = 0x1152;

  // indicates whether this step should be skipped.
  protected boolean skip;

  public ProcessApplicationComponentAddProcessor(boolean skip) {
    this.skip = skip;
  }

  public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {

    final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();

    // do not proceed if this is already detected to be a Process Application
    // (=>component exists either in this deployment unit or in a sibling)
    if(skip || ProcessApplicationAttachments.isPartOfProcessApplication(deploymentUnit)) {
      return;
    }

    if(processesXmlPresent(deploymentUnit)){
      LOGGER.log(Level.INFO, "Could not detect @"+ProcessApplication.class.getSimpleName()+" component in deployment unit "+deploymentUnit.getName()+". Adding singleton session bean with default configuration.");
      SingletonComponentDescription clientComponent = synthesizeComponent(deploymentUnit);

      // mark this to be a process application
      ProcessApplicationAttachments.mark(deploymentUnit);
      // attach description to the deployment unit
      ProcessApplicationAttachments.attachProcessApplicationComponent(deploymentUnit, clientComponent);
    }

  }

  /**
   * TODO: should we really do this?
   */
  protected SingletonComponentDescription synthesizeComponent(final DeploymentUnit deploymentUnit) {
    // create a synthetic ProcessApplication component.
    EEModuleDescription eeModuleDescription = deploymentUnit.getAttachment(Attachments.EE_MODULE_DESCRIPTION);
    EEApplicationClasses applicationClassesDescription = deploymentUnit.getAttachment(Attachments.EE_APPLICATION_CLASSES_DESCRIPTION);
    EjbJarMetaData ejbJarMetaData = deploymentUnit.getAttachment(EjbDeploymentAttachmentKeys.EJB_JAR_METADATA);
    EjbJarDescription ejbJarDescription = deploymentUnit.getAttachment(EjbDeploymentAttachmentKeys.EJB_JAR_DESCRIPTION);
    ApplicationExceptionDescriptions applicationExceptionDescriptions = deploymentUnit.getAttachment(EjbDeploymentAttachmentKeys.APPLICATION_EXCEPTION_DESCRIPTIONS);

    if(ejbJarMetaData == null) {
      ejbJarMetaData = new EjbJarMetaData(EjbJarVersion.EJB_3_1);
      deploymentUnit.putAttachment(EjbDeploymentAttachmentKeys.EJB_JAR_METADATA, ejbJarMetaData);
    }

    // turn this into an EJB Jar!
    if(ejbJarDescription == null) {
      ejbJarDescription = new EjbJarDescription(eeModuleDescription, applicationClassesDescription, deploymentUnit.getName().endsWith(".war"));
      deploymentUnit.putAttachment(EjbDeploymentAttachmentKeys.EJB_JAR_DESCRIPTION, ejbJarDescription);
      EjbDeploymentMarker.mark(deploymentUnit);
    }

    if(applicationExceptionDescriptions == null) {
      applicationExceptionDescriptions = new ApplicationExceptionDescriptions();
      deploymentUnit.putAttachment(EjbDeploymentAttachmentKeys.APPLICATION_EXCEPTION_DESCRIPTIONS, applicationExceptionDescriptions);
    }

    GenericBeanMetaData sessionBean = new GenericBeanMetaData(EjbType.SESSION);

    JBossEnterpriseBeansMetaData enterpriseBeansMetaData = new JBossEnterpriseBeansMetaData();
    enterpriseBeansMetaData.setEjbJarMetaData(ejbJarMetaData);
    sessionBean.setEnterpriseBeansMetaData(enterpriseBeansMetaData);

    sessionBean.setConcurrencyManagementType(ConcurrencyManagementType.BEAN);
    sessionBean.setSessionType(SessionType.Singleton);
    sessionBean.setEjbClass(EjbProcessApplication.class.getName());
    // transactions (TransactionAttribute.SUPPORTS)
    sessionBean.setTransactionType(TransactionManagementType.CONTAINER);
    ContainerTransactionMetaData containerTransactionMetaData = new ContainerTransactionMetaData();
    containerTransactionMetaData.setTransAttribute(TransactionAttributeType.SUPPORTS);

    SingletonComponentDescription processApplicationComponent = new SingletonComponentDescription("EjbProcessApplication",
        EjbProcessApplication.class.getName(),
        ejbJarDescription, deploymentUnit.getServiceName(), sessionBean);

    // add the process application component
    eeModuleDescription.addComponent(processApplicationComponent);

    // turn ProcessApplicationExecutionException into an EJB ApplicationExection
    // to make sure the container does not rollback the transaction prematurely
    applicationExceptionDescriptions.addApplicationException(ProcessApplicationExecutionException.class.getName(), false, true);

    return processApplicationComponent;
  }

  protected boolean processesXmlPresent(DeploymentUnit deploymentUnit) {
    ResourceRoot resourceRoot = deploymentUnit.getAttachment(DEPLOYMENT_ROOT);
    VirtualFile rootFile = resourceRoot.getRoot();

    // check jar
    VirtualFile processesXml = rootFile.getChild("META-INF/processes.xml");
    if(processesXml != null && processesXml.exists()) {
      return true;
    }

    // check war
    processesXml = rootFile.getChild("WEB-INF/classes/META-INF/processes.xml");
    return processesXml != null && processesXml.exists();
  }

  public void undeploy(DeploymentUnit context) {
    // TODO Auto-generated method stub

  }

}