text:
package solidstack.script.java;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.Reader;
import java.lang.reflect.Array;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.LinkedHashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Properties;
import java.util.Set;
import java.util.Vector;
import java.util.regex.Pattern;

import funny.Symbol;
import solidstack.script.Script;
import solidstack.script.ThreadContext;
import solidstack.script.ThrowException;
import solidstack.script.objects.Assoc;
import solidstack.script.objects.PString;
import solidstack.script.objects.Type;
import solidstack.script.scopes.DefaultScope;
import solidstack.script.scopes.MapScope;
import solidstack.script.scopes.Scope;
import solidstack.util.ObjectArrayListIterator;

/**
 * Default Java extensions.
 */
// TODO Move this out of the java package. May need plugin mechanism.
public class DefaultClassExtensions
{
	// TODO: count(), distinct(), filter(), filterNot(), find(), findIndexOf(), fold(), forall(), foreach(), groupBy(), intersect(), map(), partition(), reduce(), reverse(), reverseMap()

	// TODO Should be covered by the integer version
	static public Integer abs( Byte _byte )
	{
		return Math.abs( _byte );
	}

	// TODO Should be covered by the integer version
	static public Integer abs( Character _char )
	{
		return Math.abs( _char );
	}

	static public Double abs( Double _double )
	{
		return Math.abs( _double );
	}

	static public Float abs( Float _float )
	{
		return Math.abs( _float );
	}

	static public Integer abs( Integer _int )
	{
		return Math.abs( _int );
	}

	static public Long abs( Long _long )
	{
		return Math.abs( _long );
	}

	// TODO Should be covered by the integer version
	static public Integer abs( Short _short )
	{
		return Math.abs( _short );
	}

	static public StringBuilder addString( Iterable iterable, StringBuilder buf )
	{
		return addString( iterable.iterator(), buf, "", "", "" );
	}

	static public StringBuilder addString( Iterable iterable, StringBuilder buf, String separator )
	{
		return addString( iterable.iterator(), buf, "", separator, "" );
	}

	static public StringBuilder addString( Iterable iterable, StringBuilder buf, String start, String separator, String end )
	{
		return addString( iterable.iterator(), buf, start, separator, end );
	}

	static public StringBuilder addString( Iterator iterator, StringBuilder buf )
	{
		return addString( iterator, buf, "", "", "" );
	}

	static public StringBuilder addString( Iterator iterator, StringBuilder buf, String separator )
	{
		return addString( iterator, buf, "", separator, "" );
	}

	static public StringBuilder addString( Iterator iterator, StringBuilder buf, String start, String separator, String end )
	{
		buf.append( start );
		if( iterator.hasNext() )
			buf.append( iterator.next() );
		while( iterator.hasNext() )
		{
			buf.append( separator );
			buf.append( iterator.next() );
		}
		buf.append( end );
		return buf;
	}

	static public StringBuilder addString( Map map, StringBuilder buf )
	{
		return addString( map, buf, "", "", "" );
	}

	static public StringBuilder addString( Map map, StringBuilder buf, String separator )
	{
		return addString( map, buf, "", separator, "" );
	}

	static public StringBuilder addString( Map map, StringBuilder buf, String start, String separator, String end )
	{
		buf.append( start );
		Iterator<Entry> iterator = map.entrySet().iterator();
		boolean first = true;
		while( iterator.hasNext() )
		{
			if( first ) first = false; else buf.append( separator );
			Entry entry = iterator.next();
			buf.append( entry.getKey() );
			buf.append( " -> " );
			buf.append( entry.getValue() );
		}
		buf.append( end );
		return buf;
	}

	static public StringBuilder addString( Object[] array, StringBuilder buf )
	{
		return addString( array, buf, "", "", "" );
	}

	static public StringBuilder addString( Object[] array, StringBuilder buf, String separator )
	{
		return addString( array, buf, "", separator, "" );
	}

	static public StringBuilder addString( Object[] array, StringBuilder buf, String start, String separator, String end )
	{
		buf.append( start );
		int len = array.length;
		if( len > 0 )
			buf.append( array[ 0 ] );
		for( int i = 1; i < len; i++ )
		{
			buf.append( separator );
			buf.append( array[ i ] );
		}
		buf.append( end );
		return buf;
	}

	// TODO Can we remove the first parameter and replace it with an anotation?
	// TODO Don't like this returning a Type
	static public Type static_apply( Class cls, String type ) throws ClassNotFoundException
	{
		ClassLoader loader = Thread.currentThread().getContextClassLoader();
		return new Type( Java.forName( type, loader ) );
	}

	static public File static_apply( File file, String filePath )
	{
		return new File( filePath );
	}

	static public Object[] static_apply( Array array, Object... objects )
	{
		return objects;
	}

	static public LinkedHashMap static_apply( LinkedHashMap map, Assoc... entries )
	{
		LinkedHashMap result = new LinkedHashMap();
		for( Assoc labeled : entries )
			result.put( labeled.getLabel(), labeled.getValue() );
		return result;
	}

	static public LinkedHashSet static_apply( LinkedHashSet set, Object... objects )
	{
		return new LinkedHashSet( Arrays.asList( objects ) );
	}

	static public List static_apply( LinkedList list, Object... objects )
	{
		return new LinkedList( Arrays.asList( objects ) );
	}

	static public List static_apply( List list, Object... objects )
	{
		return new ArrayList( Arrays.asList( objects ) );
	}

	static public Map static_apply( Map map, Assoc... entries )
	{
		HashMap result = new HashMap();
		for( Assoc labeled : entries )
			result.put( labeled.getLabel(), labeled.getValue() );
		return result;
	}

	// TODO One with parent?
	static public Properties static_apply( Properties props, Assoc... entries )
	{
		Properties result = new Properties();
		for( Assoc labeled : entries )
			result.setProperty( (String)labeled.getLabel(), (String)labeled.getValue() );
		return result;
	}

	// TODO One with parent?
	static public Properties static_apply( Properties props, File file ) throws FileNotFoundException, IOException
	{
		Properties result = new Properties();
		result.load( new FileInputStream( file ) );
		return result;
	}

	static public Scope static_apply( Scope scope, Assoc... entries )
	{
		Scope result = new DefaultScope();
		for( Assoc labeled : entries )
		{
			Object label = labeled.getLabel();
			Symbol symbol;
			if( label instanceof String )
				symbol = Symbol.apply( (String)label );
			else if( label instanceof Symbol )
				symbol = (Symbol)label;
			else
				throw new ThrowException( "A Scope() constructor needs keys of type String or Symbol", ThreadContext.get().cloneStack() );
			result.var( symbol, labeled.getValue() );
		}
		return result;
	}

	static public Scope static_apply( Scope scope, Map map )
	{
		return new MapScope( map );
	}

	static public Set static_apply( Set set, Object... objects )
	{
		return new HashSet( Arrays.asList( objects ) );
	}

	static public Vector static_apply( Vector vector, Object... objects )
	{
		Vector result = new Vector();
		for( Object object : objects )
			result.addElement( object );
		return result;
	}

	static public Object apply( List list, int index )
	{
		return list.get( index );
	}

	static public Object apply( Map map, Object key )
	{
		return map.get( key );
	}

	static public Object apply( Object[] array, int index )
	{
		return array[ index ];
	}

	static public boolean apply( Set set, Object o )
	{
		return set.contains( o );
	}

	static public List distinct( Iterable iterable )
	{
		return distinct( iterable.iterator(), new ArrayList() );
	}

	static public List distinct( Iterator iterator )
	{
		return distinct( iterator, new ArrayList() );
	}

	static public LinkedList distinct( LinkedList list )
	{
		return (LinkedList)distinct( list.iterator(), new LinkedList() );
	}

	static private List distinct( Iterator iterator, List result )
	{
		HashSet temp = new HashSet();
		while( iterator.hasNext() )
			temp.add( iterator.next() );
		result.addAll( temp );
		return result;
	}

	static public Object[] distinct( Object[] array )
	{
		HashSet temp = new HashSet();
		int len = array.length;
		for( int i = 0; i < len; i++ )
			temp.add( array[ i ] );

		len = temp.size();
		Object[] result = new Object[ len ];
		int i = 0;
		for( Object object : temp )
			result[ i++ ] = object;

		return result;
	}

	static public List filter( Iterable iterable, Function function )
	{
		return filter( iterable.iterator(), function );
	}

	static public List filter( Iterator iterator, Function function )
	{
		List result = new ArrayList();
		while( iterator.hasNext() )
		{
			Object object = iterator.next();
			if( Script.isTrue( function.call( object ) ) )
				result.add( object );
		}
		return result;
	}

	static public Object find( Iterable iterable, Function function )
	{
		return find( iterable.iterator(), function );
	}

	static public Object find( Iterator iterator, Function function )
	{
		while( iterator.hasNext() )
		{
			Object object = iterator.next();
			if( Script.isTrue( function.call( object ) ) )
				return object;
		}
		return null;
	}

	static public Object fold( Iterable iterable, Object start, Function function )
	{
		return fold( iterable.iterator(), start, function );
	}

	static public Object fold( Iterator iterator, Object start, Function function )
	{
		while( iterator.hasNext() )
			start = function.call( start, iterator.next() );
		return start;
	}

	static public Object foldLeft( Iterable iterable, Object start, Function function )
	{
		return fold( iterable.iterator(), start, function );
	}

	static public Object foldLeft( Iterator iterator, Object start, Function function )
	{
		return fold( iterator, start, function );
	}

	static public Object foreach( Iterable iterable, Function function )
	{
		return foreach( iterable.iterator(), function );
	}

	static public Object foreach( Iterator iterator, Function function )
	{
		// TODO Or should the ThreadContext be a parameter too?
		int count = function.getParameters().length;
		if( count == 2 )
		{
			Object result = null;
			int index = 0;
			while( iterator.hasNext() )
				result = function.call( index++, iterator.next() );
			return result;
		}
		Object result = null;
		while( iterator.hasNext() )
			result = function.call( iterator.next() );
		return result;
	}

	static public Object foreach( Map<?,?> map, Function function )
	{
		Object result = null;
		for( Entry<?,?> entry : map.entrySet() )
			result = function.call( entry.getKey(), entry.getValue() );
		return result;
	}

	static public Object foreach( Object[] array, Function function )
	{
		return foreach( new ObjectArrayListIterator( array ), function );
	}

	static public Object foreachKey( Map<?,?> map, Function function )
	{
		return foreach( map.keySet(), function );
	}

	static public Object foreachValue( Map<?,?> map, Function function )
	{
		return foreach( map.values(), function );
	}

	// TODO Use CharBuffer?
	static public String getText( File file, String encoding ) throws IOException
	{
		Reader in = new InputStreamReader( new FileInputStream( file ), encoding );
		try
		{
			StringBuilder builder = new StringBuilder();
			char[] buffer = new char[ 4096 ];
			int len;
			while( ( len = in.read( buffer ) ) != -1 )
				builder.append( buffer, 0, len );
			return builder.toString();
		}
		finally
		{
			in.close();
		}
	}

	static public List map( Iterable iterable, Function function )
	{
		return map( iterable.iterator(), function, new ArrayList() );
	}

	static public List map( Iterator iterator, Function function )
	{
		return map( iterator, function, new ArrayList() );
	}

	static public LinkedList map( LinkedList list, Function function )
	{
		return (LinkedList)map( list.iterator(), function, new LinkedList() );
	}

	static private List map( Iterator iterator, Function function, List result )
	{
		while( iterator.hasNext() )
			result.add( function.call( iterator.next() ) );
		return result;
	}

	static public Object[] map( Object[] array, Function function )
	{
		int len = array.length;
		Object[] result = new Object[ len ];
		for( int i = 0; i < len; i++ )
			result[ i ] = function.call( array[ i ] );
		return result;
	}

	static public String mkString( Iterable iterable )
	{
		return mkString( iterable.iterator(), "", "", "" );
	}

	static public String mkString( Iterable iterable, String separator )
	{
		return mkString( iterable.iterator(), "", separator, "" );
	}

	static public String mkString( Iterable iterable, String start, String separator, String end )
	{
		return mkString( iterable.iterator(), start, separator, end );
	}

	static public String mkString( Iterator iterator )
	{
		return mkString( iterator, "", "", "" );
	}

	static public String mkString( Iterator iterator, String separator )
	{
		return mkString( iterator, "", separator, "" );
	}

	static public String mkString( Iterator iterator, String start, String separator, String end )
	{
		return addString( iterator, new StringBuilder(), start, separator, end ).toString();
	}

	static public String mkString( Map map )
	{
		return mkString( map, "", "", "" );
	}

	static public String mkString( Map map, String separator )
	{
		return mkString( map, "", separator, "" );
	}

	static public String mkString( Map map, String start, String separator, String end )
	{
		return addString( map, new StringBuilder(), start, separator, end ).toString();
	}

	static public String mkString( Object[] array )
	{
		return mkString( array, "", "", "" );
	}

	static public String mkString( Object[] array, String separator )
	{
		return mkString( array, "", separator, "" );
	}

	static public String mkString( Object[] array, String start, String separator, String end )
	{
		StringBuilder buf = new StringBuilder();
		addString( array, buf, start, separator, end );
		return buf.toString();
	}

	static public int size( Object[] array )
	{
		return array.length;
	}

	static public int size( boolean[] array )
	{
		return array.length;
	}

	static public int size( char[] array )
	{
		return array.length;
	}

	static public int size( byte[] array )
	{
		return array.length;
	}

	static public int size( short[] array )
	{
		return array.length;
	}

	static public int size( int[] array )
	{
		return array.length;
	}

	static public int size( long[] array )
	{
		return array.length;
	}

	static public int size( float[] array )
	{
		return array.length;
	}

	static public int size( double[] array )
	{
		return array.length;
	}

	static public int size( String string )
	{
		return string.length();
	}

	static public <T extends Comparable<? super T>> void sort( List<T> list )
	{
		Collections.sort( list );
	}

	// TODO Java 8 has a List.sort
	static public <T> void sort( List<T> list, Comparator<? super T> comparator )
	{
		Collections.sort( list, comparator );
	}

	static public final Pattern STRIPMARGIN_PATTERN = Pattern.compile( "(?m)^[ \\t]*\\|" ); // TODO Why not \s for whitespace?

	static public String stripMargin( String string )
	{
		return STRIPMARGIN_PATTERN.matcher( string ).replaceAll( "" );
	}

	static public String stripMargin( PString string ) // TODO This method should not be needed
	{
		return stripMargin( string.toString() );
	}

	static public Object update( List list, Object value, int index )
	{
		if( index >= list.size() )
		{
			// TODO Is this what we want?
			while( index > list.size() )
				list.add( null );
			list.add( value );
			return value;
		}
		list.set( index, value );
		return value;
	}

	static public Object update( Map map, Object value, Object key )
	{
		map.put( key, value );
		return value;
	}

	static public Object update( Object[] array, Object value, int index )
	{
		array[ index ] = value;
		return value;
	}
}


text:
import {useMemo} from 'react'
import {Observable, of} from 'rxjs'
import {LoadableState, useLoadable} from '../../util/useLoadable'
import {observePaths} from '../../preview'

export function useDocumentValues<T = Record<string, unknown>>(
  documentId: string,
  paths: string[]
): LoadableState<T | undefined> {
  return useLoadable(
    useMemo(
      () => (documentId ? (observePaths(documentId, paths) as Observable<T>) : of(undefined)),
      [documentId, paths]
    )
  )
}

redpajama_set_name: RedPajamaGithub


text:
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="ChangeListManager">
    <list default="true" id="9b385e36-6081-4c51-bea4-2c12ed1eff4f" name="Default" comment="">
      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/index.php" afterPath="$PROJECT_DIR$/index.php" />
    </list>
    <ignored path="laptopshop.iws" />
    <ignored path=".idea/workspace.xml" />
    <ignored path=".idea/dataSources.local.xml" />
    <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
    <option name="TRACKING_ENABLED" value="true" />
    <option name="SHOW_DIALOG" value="false" />
    <option name="HIGHLIGHT_CONFLICTS" value="true" />
    <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
    <option name="LAST_RESOLUTION" value="IGNORE" />
  </component>
  <component name="ChangesViewManager" flattened_view="true" show_ignored="false" />
  <component name="CreatePatchCommitExecutor">
    <option name="PATCH_PATH" value="" />
  </component>
  <component name="ExecutionTargetManager" SELECTED_TARGET="default_target" />
  <component name="FavoritesManager">
    <favorites_list name="laptopshop" />
  </component>
  <component name="FileEditorManager">
    <leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
      <file leaf-file-name="index.php" pinned="false" current-in-tab="true">
        <entry file="file://$PROJECT_DIR$/index.php">
          <provider selected="true" editor-type-id="text-editor">
            <state relative-caret-position="848">
              <caret line="99" column="145" selection-start-line="99" selection-start-column="145" selection-end-line="99" selection-end-column="145" />
              <folding />
            </state>
          </provider>
        </entry>
      </file>
      <file leaf-file-name="class.LaptopList.php" pinned="false" current-in-tab="false">
        <entry file="file://$PROJECT_DIR$/class.LaptopList.php">
          <provider selected="true" editor-type-id="text-editor">
            <state relative-caret-position="0">
              <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
              <folding />
            </state>
          </provider>
        </entry>
      </file>
      <file leaf-file-name="class.Laptop.php" pinned="false" current-in-tab="false">
        <entry file="file://$PROJECT_DIR$/class.Laptop.php">
          <provider selected="true" editor-type-id="text-editor">
            <state relative-caret-position="364">
              <caret line="13" column="17" selection-start-line="13" selection-start-column="17" selection-end-line="13" selection-end-column="17" />
              <folding />
            </state>
          </provider>
        </entry>
      </file>
    </leaf>
  </component>
  <component name="Git.Settings">
    <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
  </component>
  <component name="IdeDocumentHistory">
    <option name="CHANGED_PATHS">
      <list>
        <option value="$PROJECT_DIR$/css/shop-homepage.css" />
        <option value="$PROJECT_DIR$/class.Laptop.php" />
        <option value="$PROJECT_DIR$/index.php" />
      </list>
    </option>
  </component>
  <component name="JsBuildToolGruntFileManager" detection-done="true" />
  <component name="JsBuildToolPackageJson" detection-done="true" />
  <component name="JsGulpfileManager">
    <detection-done>true</detection-done>
  </component>
  <component name="PhpServers">
    <servers />
  </component>
  <component name="PhpWorkspaceProjectConfiguration" backward_compatibility_performed="true" />
  <component name="ProjectFrameBounds">
    <option name="y" value="-5" />
    <option name="width" value="1600" />
    <option name="height" value="905" />
  </component>
  <component name="ProjectLevelVcsManager" settingsEditedManually="false">
    <OptionsSetting value="true" id="Add" />
    <OptionsSetting value="true" id="Remove" />
    <OptionsSetting value="true" id="Checkout" />
    <OptionsSetting value="true" id="Update" />
    <OptionsSetting value="true" id="Status" />
    <OptionsSetting value="true" id="Edit" />
    <ConfirmationsSetting value="0" id="Add" />
    <ConfirmationsSetting value="0" id="Remove" />
  </component>
  <component name="ProjectView">
    <navigator currentView="ProjectPane" proportions="" version="1">
      <flattenPackages />
      <showMembers />
      <showModules />
      <showLibraryContents />
      <hideEmptyPackages />
      <abbreviatePackageNames />
      <autoscrollToSource />
      <autoscrollFromSource />
      <sortByType />
      <manualOrder />
      <foldersAlwaysOnTop value="true" />
    </navigator>
    <panes>
      <pane id="ProjectPane">
        <subPane>
          <PATH>
            <PATH_ELEMENT>
              <option name="myItemId" value="laptopshop" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
            </PATH_ELEMENT>
          </PATH>
          <PATH>
            <PATH_ELEMENT>
              <option name="myItemId" value="laptopshop" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="laptopshop" />
              <option name="myItemType" value="com.jetbrains.php.projectView.PhpTreeStructureProvider$1" />
            </PATH_ELEMENT>
          </PATH>
          <PATH>
            <PATH_ELEMENT>
              <option name="myItemId" value="laptopshop" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="laptopshop" />
              <option name="myItemType" value="com.jetbrains.php.projectView.PhpTreeStructureProvider$1" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="css" />
              <option name="myItemType" value="com.jetbrains.php.projectView.PhpTreeStructureProvider$1" />
            </PATH_ELEMENT>
          </PATH>
        </subPane>
      </pane>
      <pane id="Scope" />
      <pane id="Scratches" />
    </panes>
  </component>
  <component name="PropertiesComponent">
    <property name="last_opened_file_path" value="$PROJECT_DIR$" />
    <property name="WebServerToolWindowFactoryState" value="false" />
  </component>
  <component name="RunManager">
    <configuration default="true" type="JavascriptDebugType" factoryName="JavaScript Debug">
      <method />
    </configuration>
    <configuration default="true" type="PHPUnitRunConfigurationType" factoryName="PHPUnit">
      <TestRunner />
      <method />
    </configuration>
    <configuration default="true" type="PhpBehatConfigurationType" factoryName="Behat">
      <BehatRunner />
      <method />
    </configuration>
    <configuration default="true" type="PhpLocalRunConfigurationType" factoryName="PHP Console">
      <method />
    </configuration>
    <configuration default="true" type="js.build_tools.gulp" factoryName="Gulp.js">
      <node-interpreter>project</node-interpreter>
      <node-options />
      <gulpfile />
      <tasks />
      <arguments />
      <envs />
      <method />
    </configuration>
    <configuration default="true" type="js.build_tools.npm" factoryName="npm">
      <command value="run-script" />
      <scripts />
      <node-interpreter value="project" />
      <envs />
      <method />
    </configuration>
  </component>
  <component name="ShelveChangesManager" show_recycled="false">
    <option name="remove_strategy" value="false" />
  </component>
  <component name="SvnConfiguration">
    <configuration />
  </component>
  <component name="TaskManager">
    <task active="true" id="Default" summary="Default task">
      <changelist id="9b385e36-6081-4c51-bea4-2c12ed1eff4f" name="Default" comment="" />
      <created>1460916906376</created>
      <option name="number" value="Default" />
      <option name="presentableId" value="Default" />
      <updated>1460916906376</updated>
      <workItem from="1460916907499" duration="7235000" />
      <workItem from="1460960495533" duration="6076000" />
      <workItem from="1460980105128" duration="133000" />
      <workItem from="1460980783190" duration="1131000" />
      <workItem from="1460993782859" duration="259000" />
      <workItem from="1461007989869" duration="831000" />
      <workItem from="1461048488993" duration="1391000" />
    </task>
    <servers />
  </component>
  <component name="TimeTrackingManager">
    <option name="totallyTimeSpent" value="17056000" />
  </component>
  <component name="ToolWindowManager">
    <frame x="0" y="-5" width="1600" height="905" extended-state="6" />
    <editor active="true" />
    <layout>
      <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.21625" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
      <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
      <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="11" side_tool="true" content_ui="tabs" />
      <window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
      <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="8" side_tool="false" content_ui="tabs" />
      <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
      <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="10" side_tool="false" content_ui="tabs" />
      <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
      <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
      <window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="9" side_tool="false" content_ui="tabs" />
      <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
      <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
      <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
      <window_info id="File Transfer" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.016971279" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
      <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
      <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
      <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.0" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
      <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
      <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
    </layout>
  </component>
  <component name="Vcs.Log.UiProperties">
    <option name="RECENTLY_FILTERED_USER_GROUPS">
      <collection />
    </option>
    <option name="RECENTLY_FILTERED_BRANCH_GROUPS">
      <collection />
    </option>
  </component>
  <component name="VcsContentAnnotationSettings">
    <option name="myLimit" value="2678400000" />
  </component>
  <component name="XDebuggerManager">
    <breakpoint-manager>
      <option name="time" value="1" />
    </breakpoint-manager>
    <watches-manager />
  </component>
  <component name="editorHistoryManager">
    <entry file="file://$PROJECT_DIR$/index.php">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="2772">
          <caret line="99" column="145" selection-start-line="99" selection-start-column="145" selection-end-line="99" selection-end-column="145" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/class.LaptopList.php">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="0">
          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/class.Laptop.php">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="364">
          <caret line="13" column="17" selection-start-line="13" selection-start-column="17" selection-end-line="13" selection-end-column="17" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/index.php">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="2772">
          <caret line="99" column="145" selection-start-line="99" selection-start-column="145" selection-end-line="99" selection-end-column="145" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/class.LaptopList.php">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="0">
          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/class.Laptop.php">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="364">
          <caret line="13" column="17" selection-start-line="13" selection-start-column="17" selection-end-line="13" selection-end-column="17" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/index.php">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="2772">
          <caret line="99" column="145" selection-start-line="99" selection-start-column="145" selection-end-line="99" selection-end-column="145" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/class.LaptopList.php">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="0">
          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/class.Laptop.php">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="364">
          <caret line="13" column="17" selection-start-line="13" selection-start-column="17" selection-end-line="13" selection-end-column="17" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/index.php">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="2772">
          <caret line="99" column="145" selection-start-line="99" selection-start-column="145" selection-end-line="99" selection-end-column="145" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/class.LaptopList.php">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="0">
          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/class.Laptop.php">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="364">
          <caret line="13" column="17" selection-start-line="13" selection-start-column="17" selection-end-line="13" selection-end-column="17" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/index.php">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="2772">
          <caret line="99" column="145" selection-start-line="99" selection-start-column="145" selection-end-line="99" selection-end-column="145" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/class.LaptopList.php">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="0">
          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/class.Laptop.php">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="364">
          <caret line="13" column="17" selection-start-line="13" selection-start-column="17" selection-end-line="13" selection-end-column="17" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/index.php">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="0">
          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/class.LaptopList.php">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="0">
          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/class.Laptop.php">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="364">
          <caret line="13" column="17" selection-start-line="13" selection-start-column="17" selection-end-line="13" selection-end-column="17" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/css/shop-homepage.css">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="2044">
          <caret line="73" column="14" selection-start-line="73" selection-start-column="14" selection-end-line="73" selection-end-column="14" />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/css/shop-homepage.css">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="678">
          <caret line="73" column="14" selection-start-line="73" selection-start-column="14" selection-end-line="73" selection-end-column="14" />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/class.Laptop.php">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="364">
          <caret line="13" column="17" selection-start-line="13" selection-start-column="17" selection-end-line="13" selection-end-column="17" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/class.LaptopList.php">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="0">
          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/index.php">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="848">
          <caret line="99" column="145" selection-start-line="99" selection-start-column="145" selection-end-line="99" selection-end-column="145" />
          <folding />
        </state>
      </provider>
    </entry>
  </component>
</project>


text:
label {
  cursor: default; /* IE, Edge */
}


text:
package org.apache.hadoop.hbase.snapshot;

import org.apache.hadoop.hbase.HBaseClassTestRule;
import org.apache.hadoop.hbase.security.HadoopSecurityEnabledUserProviderForTesting;
import org.apache.hadoop.hbase.security.UserProvider;
import org.apache.hadoop.hbase.security.access.PermissionStorage;
import org.apache.hadoop.hbase.security.access.SecureTestUtil;
import org.apache.hadoop.hbase.testclassification.LargeTests;
import org.apache.hadoop.hbase.testclassification.VerySlowRegionServerTests;
import org.junit.BeforeClass;
import org.junit.ClassRule;
import org.junit.experimental.categories.Category;

/**
 * Reruns TestMobExportSnapshot using MobExportSnapshot in secure mode.
 */
@Category({VerySlowRegionServerTests.class, LargeTests.class})
public class TestMobSecureExportSnapshot extends TestMobExportSnapshot {

  @ClassRule
  public static final HBaseClassTestRule CLASS_RULE =
      HBaseClassTestRule.forClass(TestMobSecureExportSnapshot.class);

  @BeforeClass
  public static void setUpBeforeClass() throws Exception {
    setUpBaseConf(TEST_UTIL.getConfiguration());
    // Setup separate test-data directory for MR cluster and set corresponding configurations.
    // Otherwise, different test classes running MR cluster can step on each other.
    TEST_UTIL.getDataTestDir();

    // set the always on security provider
    UserProvider.setUserProviderForTesting(TEST_UTIL.getConfiguration(),
      HadoopSecurityEnabledUserProviderForTesting.class);

    // setup configuration
    SecureTestUtil.enableSecurity(TEST_UTIL.getConfiguration());

    TEST_UTIL.startMiniCluster(3);
    TEST_UTIL.startMiniMapReduceCluster();

    // Wait for the ACL table to become available
    TEST_UTIL.waitTableEnabled(PermissionStorage.ACL_TABLE_NAME);
  }
}


text:
#include <gtest/gtest.h>

#include "ABI43_0_0TestComponent.h"

using namespace ABI43_0_0facebook::ABI43_0_0React;

TEST(ComponentDescriptorTest, createShadowNode) {
  auto eventDispatcher = std::shared_ptr<EventDispatcher const>();
  SharedComponentDescriptor descriptor =
      std::make_shared<TestComponentDescriptor>(
          ComponentDescriptorParameters{eventDispatcher, nullptr, nullptr});

  ABI43_0_0EXPECT_EQ(descriptor->getComponentHandle(), TestShadowNode::Handle());
  ABI43_0_0EXPECT_STREQ(descriptor->getComponentName(), TestShadowNode::Name());
  ABI43_0_0EXPECT_STREQ(descriptor->getComponentName(), "Test");

  const auto &raw = RawProps(folly::dynamic::object("nativeID", "abc"));
  SharedProps props = descriptor->cloneProps(nullptr, raw);

  auto family = descriptor->createFamily(
      ShadowNodeFamilyFragment{
          /* .tag = */ 9,
          /* .surfaceId = */ 1,
          /* .eventEmitter = */ nullptr,
      },
      nullptr);

  SharedShadowNode node = descriptor->createShadowNode(
      ShadowNodeFragment{
          /* .props = */ props,
      },
      family);

  ABI43_0_0EXPECT_EQ(node->getComponentHandle(), TestShadowNode::Handle());
  ABI43_0_0EXPECT_STREQ(node->getComponentName(), TestShadowNode::Name());
  ABI43_0_0EXPECT_STREQ(node->getComponentName(), "Test");
  ABI43_0_0EXPECT_EQ(node->getTag(), 9);
  ABI43_0_0EXPECT_EQ(node->getSurfaceId(), 1);
  ABI43_0_0EXPECT_STREQ(node->getProps()->nativeId.c_str(), "abc");
}

TEST(ComponentDescriptorTest, cloneShadowNode) {
  auto eventDispatcher = std::shared_ptr<EventDispatcher const>();
  SharedComponentDescriptor descriptor =
      std::make_shared<TestComponentDescriptor>(
          ComponentDescriptorParameters{eventDispatcher, nullptr, nullptr});

  const auto &raw = RawProps(folly::dynamic::object("nativeID", "abc"));
  SharedProps props = descriptor->cloneProps(nullptr, raw);
  auto family = descriptor->createFamily(
      ShadowNodeFamilyFragment{
          /* .tag = */ 9,
          /* .surfaceId = */ 1,
          /* .eventEmitter = */ nullptr,
      },
      nullptr);
  SharedShadowNode node = descriptor->createShadowNode(
      ShadowNodeFragment{
          /* .props = */ props,
      },
      family);
  SharedShadowNode cloned = descriptor->cloneShadowNode(*node, {});

  ABI43_0_0EXPECT_STREQ(cloned->getComponentName(), "Test");
  ABI43_0_0EXPECT_EQ(cloned->getTag(), 9);
  ABI43_0_0EXPECT_EQ(cloned->getSurfaceId(), 1);
  ABI43_0_0EXPECT_STREQ(cloned->getProps()->nativeId.c_str(), "abc");

  auto clonedButSameProps = descriptor->cloneProps(props, RawProps());
  ABI43_0_0EXPECT_NE(clonedButSameProps, props);
}

TEST(ComponentDescriptorTest, appendChild) {
  auto eventDispatcher = std::shared_ptr<EventDispatcher const>();
  SharedComponentDescriptor descriptor =
      std::make_shared<TestComponentDescriptor>(
          ComponentDescriptorParameters{eventDispatcher, nullptr, nullptr});

  const auto &raw = RawProps(folly::dynamic::object("nativeID", "abc"));
  SharedProps props = descriptor->cloneProps(nullptr, raw);
  auto family1 = descriptor->createFamily(
      ShadowNodeFamilyFragment{
          /* .tag = */ 1,
          /* .surfaceId = */ 1,
          /* .eventEmitter = */ nullptr,
      },
      nullptr);
  SharedShadowNode node1 = descriptor->createShadowNode(
      ShadowNodeFragment{
          /* .props = */ props,
      },
      family1);
  auto family2 = descriptor->createFamily(
      ShadowNodeFamilyFragment{
          /* .tag = */ 2,
          /* .surfaceId = */ 1,
          /* .eventEmitter = */ nullptr,
      },
      nullptr);
  SharedShadowNode node2 = descriptor->createShadowNode(
      ShadowNodeFragment{
          /* .props = */ props,
      },
      family2);
  auto family3 = descriptor->createFamily(
      ShadowNodeFamilyFragment{
          /* .tag = */ 3,
          /* .surfaceId = */ 1,
          /* .eventEmitter = */ nullptr,
      },
      nullptr);
  SharedShadowNode node3 = descriptor->createShadowNode(
      ShadowNodeFragment{
          /* .props = */ props,
      },
      family3);

  descriptor->appendChild(node1, node2);
  descriptor->appendChild(node1, node3);

  auto node1Children = node1->getChildren();
  ABI43_0_0EXPECT_EQ(node1Children.size(), 2);
  ABI43_0_0EXPECT_EQ(node1Children.at(0), node2);
  ABI43_0_0EXPECT_EQ(node1Children.at(1), node3);
}


text:
<?php

namespace Mike42\Escpos;

use Mike42\Escpos\EscposImage;

/**
 * Implementation of EscposImage using only native PHP.
 * TODO: wbmp, pbm, bmp files.
 */
class NativeEscposImage extends EscposImage
{

}


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

<title>Q-Index</title>
<meta name="date" content="2015-10-23">
<link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Skip navigation links

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev Letter

Next Letter

Frames

No Frames

All Classes

C D E F G I L M P Q R S T U W

Q

queryCorpus(String, Index) - Method in class terrier.DJM

Perform a query on the corpus using the DJM method.

queryExpansion - package queryExpansion

C D E F G I L M P Q R S T U W

Skip navigation links

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev Letter

Next Letter

Frames

No Frames

All Classes


text:
<entity-mappings
  xmlns="http://java.sun.com/xml/ns/persistence/orm"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm http://java.sun.com/xml/ns/persistence/orm_1_0.xsd"
  version="1.0">

  <sequence-generator name="bpel_sequence" sequence-name="bpel_sequence"/>

  <!-- ode-bpel persistence unit -->
  <entity class="org.apache.ode.dao.jpa.bpel.ActivityRecoveryDAOImpl">
    <attributes>
      <id name="_id" >
        <column name="ID"/>
        <generated-value generator="bpel_sequence" strategy="AUTO"/>
      </id>
    </attributes>
  </entity>

  <entity class="org.apache.ode.dao.jpa.bpel.CorrelationSetDAOImpl">
    <attributes>
      <id name="_correlationSetId">
      	<column name="CORRELATION_SET_ID"/>
        <generated-value generator="bpel_sequence" strategy="AUTO"/>
      </id>
    </attributes>
  </entity>

   <entity class="org.apache.ode.dao.jpa.bpel.CorrelatorDAOImpl">
    <attributes>
      <id name="_correlatorId">
      	<column name="CORRELATOR_ID"/>
        <generated-value generator="bpel_sequence" strategy="AUTO"/>
      </id>
    </attributes>
  </entity>

  <entity class="org.apache.ode.dao.jpa.bpel.EventDAOImpl">
    <attributes>
      <id name="_id">
      	<column name="EVENT_ID"/>
        <generated-value generator="bpel_sequence" strategy="AUTO"/>
      </id>
    </attributes>
  </entity>

  <entity class="org.apache.ode.dao.jpa.bpel.FaultDAOImpl">
    <attributes>
      <id name="_id">
      	<column name="FAULT_ID"/>
        <generated-value generator="bpel_sequence" strategy="AUTO"/>
      </id>
    </attributes>
  </entity>

  <entity class="org.apache.ode.dao.jpa.bpel.MessageDAOImpl">
    <attributes>
      <id name="_id">
      	<column name="MESSAGE_ID"/>
        <generated-value generator="bpel_sequence" strategy="AUTO"/>
      </id>
    </attributes>
  </entity>

  <entity class="org.apache.ode.dao.jpa.bpel.MessageRouteDAOImpl">
    <attributes>
      <id name="_id">
      	<column name="MESSAGE_ROUTE_ID"/>
        <generated-value generator="bpel_sequence" strategy="AUTO"/>
      </id>
    </attributes>
  </entity>

  <entity class="org.apache.ode.dao.jpa.bpel.PartnerLinkDAOImpl">
    <attributes>
      <id name="_id">
      	<column name="PARTNER_LINK_ID"/>
        <generated-value generator="bpel_sequence" strategy="AUTO"/>
      </id>
    </attributes>
  </entity>

  <entity class="org.apache.ode.dao.jpa.bpel.ProcessDAOImpl">
    <attributes>
      <id name="_id">
      	<column name="ID"/>
        <generated-value generator="bpel_sequence" strategy="AUTO"/>
      </id>
    </attributes>
  </entity>

  <entity class="org.apache.ode.dao.jpa.bpel.ProcessInstanceDAOImpl">
    <attributes>
      <id name="_instanceId">
      	<column name="ID"/>
        <generated-value generator="bpel_sequence" strategy="AUTO"/>
      </id>
    </attributes>
  </entity>

  <entity class="org.apache.ode.dao.jpa.bpel.ScopeDAOImpl">
    <attributes>
      <id name="_scopeInstanceId">
      	<column name="SCOPE_ID"/>
        <generated-value generator="bpel_sequence" strategy="AUTO"/>
      </id>
    </attributes>
  </entity>

  <entity class="org.apache.ode.dao.jpa.bpel.XmlDataDAOImpl">
    <attributes>
      <id name="_id">
      	<column name="XML_DATA_ID"/>
        <generated-value generator="bpel_sequence" strategy="AUTO"/>
      </id>
    </attributes>
  </entity>

  <entity class="org.apache.ode.dao.jpa.bpel.CorrSetProperty">
    <attributes>
      <id name="_id">
      	<column name="ID"/>
        <generated-value generator="bpel_sequence" strategy="AUTO"/>
      </id>
    </attributes>
  </entity>

  <entity class="org.apache.ode.dao.jpa.bpel.MexProperty">
    <attributes>
      <id name="_id">
      	<column name="ID"/>
        <generated-value generator="bpel_sequence" strategy="AUTO"/>
      </id>
    </attributes>
  </entity>

  <entity class="org.apache.ode.dao.jpa.bpel.XmlDataProperty">
    <attributes>
      <id name="_id">
      	<column name="ID"/>
        <generated-value generator="bpel_sequence" strategy="AUTO"/>
      </id>
    </attributes>
  </entity>

  <!-- ode-store persistence unit -->
  <entity class="org.apache.ode.dao.jpa.store.ProcessConfPropertyDaoImpl">
    <attributes>
      <id name="_id">
      	<column name="ID"/>
        <generated-value generator="bpel_sequence" strategy="AUTO"/>
      </id>
    </attributes>
  </entity>

  <entity class="org.apache.ode.dao.jpa.store.VersionTrackerDAOImpl">
    <attributes>
      <id name="_id">
      	<column name="ID"/>
        <generated-value generator="bpel_sequence" strategy="AUTO"/>
      </id>
    </attributes>
  </entity>

</entity-mappings>


text:
package com.google.errorprone.bugpatterns.apidiff;

import static com.google.common.truth.Truth.assertWithMessage;
import static java.nio.charset.StandardCharsets.UTF_8;

import com.google.auto.value.AutoValue;
import com.google.common.base.Joiner;
import com.google.common.collect.ImmutableList;
import com.sun.tools.javac.file.JavacFileManager;
import java.io.File;
import java.io.IOException;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.nio.file.FileVisitResult;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.nio.file.SimpleFileVisitor;
import java.nio.file.StandardOpenOption;
import java.nio.file.attribute.BasicFileAttributes;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.jar.JarEntry;
import java.util.jar.JarOutputStream;
import javax.tools.Diagnostic;
import javax.tools.DiagnosticCollector;
import javax.tools.JavaCompiler;
import javax.tools.JavaFileObject;
import javax.tools.StandardLocation;

/** Compilation test helpers for ApiDiff tools. */
public final class CompilationBuilderHelpers {

  /** A collection of sources to compile. */
  public static class SourceBuilder {
    final File tempFolder;
    final List<Path> sources = new ArrayList<>();

    public SourceBuilder(File tempFolder) {
      this.tempFolder = tempFolder;
    }

    public SourceBuilder addSourceLines(String name, String... lines) throws IOException {
      Path filePath = Paths.get(tempFolder.getAbsolutePath(), name);
      sources.add(filePath);
      Files.write(filePath, Arrays.asList(lines), UTF_8, StandardOpenOption.CREATE);
      return this;
    }

    public List<Path> build() {
      return ImmutableList.copyOf(sources);
    }
  }

  /** A wrapper around {@link JavaCompiler}. */
  public static class CompilationBuilder {

    final JavaCompiler compiler;
    final File tempFolder;
    final JavacFileManager fileManager;

    private Collection<Path> sources = Collections.emptyList();
    private Collection<Path> classpath = Collections.emptyList();
    private Iterable<String> javacopts = Collections.emptyList();

    public CompilationBuilder(
        JavaCompiler compiler, File tempFolder, JavacFileManager fileManager) {
      this.compiler = compiler;
      this.tempFolder = tempFolder;
      this.fileManager = fileManager;
    }

    public CompilationBuilder setSources(Collection<Path> sources) {
      this.sources = sources;
      return this;
    }

    public CompilationBuilder setClasspath(Collection<Path> classpath) {
      this.classpath = classpath;
      return this;
    }

    CompilationBuilder setJavacopts(Iterable<String> javacopts) {
      this.javacopts = javacopts;
      return this;
    }

    CompilationResult compile() throws IOException {
      Path output = tempFolder.toPath();
      DiagnosticCollector<JavaFileObject> diagnosticCollector = new DiagnosticCollector<>();
      StringWriter errorOutput = new StringWriter();

      fileManager.setLocationFromPaths(StandardLocation.CLASS_PATH, classpath);
      fileManager.setLocationFromPaths(StandardLocation.SOURCE_PATH, Collections.<Path>emptyList());
      fileManager.setLocationFromPaths(
          StandardLocation.ANNOTATION_PROCESSOR_PATH, Collections.<Path>emptyList());

      fileManager.setLocationFromPaths(
          StandardLocation.CLASS_OUTPUT, Collections.singleton(output));

      boolean ok =
          compiler
              .getTask(
                  new PrintWriter(errorOutput, true),
                  fileManager,
                  diagnosticCollector,
                  javacopts,
                  /*classes=*/ Collections.<String>emptyList(),
                  fileManager.getJavaFileObjectsFromPaths(sources))
              .call();

      return CompilationResult.create(
          ok, diagnosticCollector.getDiagnostics(), errorOutput.toString(), output);
    }

    CompilationResult compileOrDie() throws IOException {
      CompilationResult result = compile();
      assertWithMessage("Compilation failed unexpectedly")
          .withMessage(Joiner.on('\n').join(result.diagnostics()))
          .that(result.ok())
          .isTrue();
      return result;
    }

    public Path compileOutputToJarOrDie() throws IOException {
      final Path outputDir = compileOrDie().classOutput();
      final Path outputJar = outputDir.resolve("output.jar");
      try (OutputStream os = Files.newOutputStream(outputJar);
          final JarOutputStream jos = new JarOutputStream(os)) {
        Files.walkFileTree(
            outputDir,
            new SimpleFileVisitor<Path>() {
              @Override
              public FileVisitResult visitFile(Path path, BasicFileAttributes attrs)
                  throws IOException {
                if (path.toString().endsWith(".class")) {
                  // Manually join so that we use / instead of the platform default.
                  jos.putNextEntry(new JarEntry(Joiner.on('/').join(outputDir.relativize(path))));
                  Files.copy(path, jos);
                }
                return FileVisitResult.CONTINUE;
              }
            });
      }
      return outputJar;
    }
  }

  /** The output from a compilation. */
  @AutoValue
  abstract static class CompilationResult {
    abstract boolean ok();

    abstract ImmutableList<Diagnostic<? extends JavaFileObject>> diagnostics();

    abstract String errorOutput();

    abstract Path classOutput();

    static CompilationResult create(
        boolean ok,
        Iterable<Diagnostic<? extends JavaFileObject>> diagnostics,
        String errorOutput,
        Path classOutput) {
      return new AutoValue_CompilationBuilderHelpers_CompilationResult(
          ok, ImmutableList.copyOf(diagnostics), errorOutput, classOutput);
    }
  }

  private CompilationBuilderHelpers() {}
}


text:
<?xml version="1.0" encoding="utf-8"?>
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping http://doctrine-project.org/schemas/orm/doctrine-mapping.xsd">
  <entity name="SsPeriodo" table="ss_periodo">
    <unique-constraints>
      <unique-constraint name="ss_periodo_pk" columns="id"/>
    </unique-constraints>
    <id name="id" type="integer" column="id">
      <generator strategy="SEQUENCE"/>
    </id>
    <field name="descripcion" type="string" column="descripcion" length="75" nullable="true"/>
    <field name="anio" type="integer" column="anio" nullable="true"/>
    <field name="activo" type="boolean" column="activo" nullable="true"/>
  </entity>
</doctrine-mapping>


text:
If you're looking contribute to [Fig](http://orchardup.github.io/fig/)
but you're new to the project or maybe even to Python, here are the steps
that should get you started.

1. Fork [https://github.com/orchardup/fig](https://github.com/orchardup/fig) to your username. kvz in this example.
1. Clone your forked repository locally `git clone git@github.com:kvz/fig.git`.
1. Enter the local directory `cd fig`.
1. Set up a development environment `python setup.py develop`. That will install the dependencies and set up a symlink from your `fig` executable to the checkout of the repo. So from any of your fig projects, `fig` now refers to your development project. Time to start hacking : )
1. Works for you? Run the test suite via `./script/test` to verify it won't break other usecases.
1. All good? Commit and push to GitHub, and submit a pull request.

## Running the test suite

    $ script/test

## Building binaries

Linux:

    $ script/build-linux

OS X:

    $ script/build-osx

Note that this only works on Mountain Lion, not Mavericks, due to a [bug in PyInstaller](http://www.pyinstaller.org/ticket/807).

## Sign your work

The sign-off is a simple line at the end of the explanation for the
patch, which certifies that you wrote it or otherwise have the right to
pass it on as an open-source patch.  The rules are pretty simple: if you
can certify the below (from [developercertificate.org](http://developercertificate.org/)):

    Developer's Certificate of Origin 1.1

    By making a contribution to this project, I certify that:

    (a) The contribution was created in whole or in part by me and I
        have the right to submit it under the open source license
        indicated in the file; or

    (b) The contribution is based upon previous work that, to the best
        of my knowledge, is covered under an appropriate open source
        license and I have the right under that license to submit that
        work with modifications, whether created in whole or in part
        by me, under the same open source license (unless I am
        permitted to submit under a different license), as indicated
        in the file; or

    (c) The contribution was provided directly to me by some other
        person who certified (a), (b) or (c) and I have not modified
        it.

    (d) I understand and agree that this project and the contribution
        are public and that a record of the contribution (including all
        personal information I submit with it, including my sign-off) is
        maintained indefinitely and may be redistributed consistent with
        this project or the open source license(s) involved.

then you just add a line saying

    Signed-off-by: Random J Developer <random@developer.example.org>

using your real name (sorry, no pseudonyms or anonymous contributions.)

The easiest way to do this is to use the `--signoff` flag when committing. E.g.:

    $ git commit --signoff

## Release process

1. Open pull request that:

 - Updates version in `fig/__init__.py`
 - Updates version in `docs/install.md`
 - Adds release notes to `CHANGES.md`

2. Create unpublished GitHub release with release notes

3. Build Linux version on any Docker host with `script/build-linux` and attach to release

4. Build OS X version on Mountain Lion with `script/build-osx` and attach to release

5. Publish GitHub release, creating tag


text:
layout: post
title: Recruitment of Professionals in Indian Oil last date 23rd March-2016
date: 2016-02-24 04:53
comments: true
tags:  Engineer IOC Manager Online Professional Public-Sector
archive: false
---
Indian Oil is offering a rare opportunity to experienced professionals rom Exploration & Production (E&P), Petrochemicals and Gas Sourcing to join the Corporation in Mid Level  :

- Sr. Manager : 02 posts in Geologist   discipline
- Sr. Manager : 01 post in Geophysicist  discipline
- Sr. Manager : 01 post in Drilling Engineer  discipline
- Sr. Manager : 01 post in Reservoir Engineer  discipline
- Sr. Manager : 01 post in Petro-Physicist   discipline
- Dy. Manager : 02 posts in Technical Services (Polymer)  discipline
- Manager : 02 posts in Product Application and Development Centre  (PADC)  discipline
- Manager : 02 posts in Gas Sourcing discipline

Age : 42 years for Sr. Managers, 39 years for Manager and 36 years for Deputy Managers

**How to Apply** : Apply Online at IOCL website on or before 23/03/015 only.

Please visit <https://www.iocl.com/PeopleCareers/job.aspx> for details and online application format.


text:
<?php

namespace Application\Migrations;

use Doctrine\DBAL\Migrations\AbstractMigration;
use Doctrine\DBAL\Schema\Schema;

/**
 * Auto-generated Migration: Please modify to your needs!
 */
class Version20170124195213 extends AbstractMigration
{
    /**
     * @param Schema $schema
     */
    public function up(Schema $schema)
    {
        // this up() migration is auto-generated, please modify it to your needs
        $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');

        $this->addSql('CREATE TABLE movie (id INT AUTO_INCREMENT NOT NULL, title VARCHAR(255) NOT NULL, synopsis TEXT NOT NULL, duration INT NOT NULL, released_at DATE NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB');
        $this->addSql('CREATE TABLE movie_directed_by (movie_id INT NOT NULL, person_id INT NOT NULL, INDEX IDX_19299A618F93B6FC (movie_id), INDEX IDX_19299A61217BBB47 (person_id), PRIMARY KEY(movie_id, person_id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB');
        $this->addSql('CREATE TABLE movie_written_by (movie_id INT NOT NULL, person_id INT NOT NULL, INDEX IDX_1453BCBA8F93B6FC (movie_id), INDEX IDX_1453BCBA217BBB47 (person_id), PRIMARY KEY(movie_id, person_id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB');
        $this->addSql('CREATE TABLE movie_acted_by (movie_id INT NOT NULL, person_id INT NOT NULL, INDEX IDX_731CCC378F93B6FC (movie_id), INDEX IDX_731CCC37217BBB47 (person_id), PRIMARY KEY(movie_id, person_id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB');
        $this->addSql('CREATE TABLE person (id INT AUTO_INCREMENT NOT NULL, first_name VARCHAR(255) NOT NULL, last_name VARCHAR(255) NOT NULL, date_of_birth DATE NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB');
        $this->addSql('ALTER TABLE movie_directed_by ADD CONSTRAINT FK_19299A618F93B6FC FOREIGN KEY (movie_id) REFERENCES movie (id) ON DELETE CASCADE');
        $this->addSql('ALTER TABLE movie_directed_by ADD CONSTRAINT FK_19299A61217BBB47 FOREIGN KEY (person_id) REFERENCES person (id) ON DELETE CASCADE');
        $this->addSql('ALTER TABLE movie_written_by ADD CONSTRAINT FK_1453BCBA8F93B6FC FOREIGN KEY (movie_id) REFERENCES movie (id) ON DELETE CASCADE');
        $this->addSql('ALTER TABLE movie_written_by ADD CONSTRAINT FK_1453BCBA217BBB47 FOREIGN KEY (person_id) REFERENCES person (id) ON DELETE CASCADE');
        $this->addSql('ALTER TABLE movie_acted_by ADD CONSTRAINT FK_731CCC378F93B6FC FOREIGN KEY (movie_id) REFERENCES movie (id) ON DELETE CASCADE');
        $this->addSql('ALTER TABLE movie_acted_by ADD CONSTRAINT FK_731CCC37217BBB47 FOREIGN KEY (person_id) REFERENCES person (id) ON DELETE CASCADE');
    }

    /**
     * @param Schema $schema
     */
    public function down(Schema $schema)
    {
        // this down() migration is auto-generated, please modify it to your needs
        $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');

        $this->addSql('ALTER TABLE movie_directed_by DROP FOREIGN KEY FK_19299A618F93B6FC');
        $this->addSql('ALTER TABLE movie_written_by DROP FOREIGN KEY FK_1453BCBA8F93B6FC');
        $this->addSql('ALTER TABLE movie_acted_by DROP FOREIGN KEY FK_731CCC378F93B6FC');
        $this->addSql('ALTER TABLE movie_directed_by DROP FOREIGN KEY FK_19299A61217BBB47');
        $this->addSql('ALTER TABLE movie_written_by DROP FOREIGN KEY FK_1453BCBA217BBB47');
        $this->addSql('ALTER TABLE movie_acted_by DROP FOREIGN KEY FK_731CCC37217BBB47');
        $this->addSql('DROP TABLE movie');
        $this->addSql('DROP TABLE movie_directed_by');
        $this->addSql('DROP TABLE movie_written_by');
        $this->addSql('DROP TABLE movie_acted_by');
        $this->addSql('DROP TABLE person');
    }
}


text:
package com.codeabovelab.dm.common.json;

import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;
import org.springframework.util.MimeType;

import java.io.IOException;

/**
 * Allow to create human readable view of MimeType
 */
class MimeTypeSerializer extends JsonSerializer<MimeType> {

    @Override
    public void serialize(MimeType value, JsonGenerator gen, SerializerProvider serializers) throws IOException {
        gen.writeString(value.toString());
    }
}


text:
require('./bootstrap.js')

require('./mixins/_http-interceptor')
require('./mixins/_get-auth-user')
require('./mixins/_logout')
require('./mixins/_quick-search')

// validators
require('./mixins/validators/_post-validator')
require('./mixins/validators/_poll-validator')
require('./mixins/validators/_suggestion-validator')

// helpers
require('./mixins/helpers/_focus')
require('./mixins/helpers/_clear-post')
require('./mixins/helpers/_clear-posts')
require('./mixins/helpers/_clear-poll')
require('./mixins/helpers/_clear-polls')
require('./mixins/helpers/_clear-suggestion')
require('./mixins/helpers/_clear-suggestions')

require('./mixins/helpers/_post-photos')

Vue.mixin({

  data() {

    return {

      // init
      user:           null,
      active:         'post',
      action:         '',
      skip:           0,
      take:           10,
      full:           false,
      disabled:       true,

      // view data handlers
      posts:          [],
      polls:          [],
      suggestions:    [],

      // post modification handler
      post: {
        id:           null,
        title:        '',
        desc:         '',

        photos: {

          data:       [],
          uploading:  false,
          loaded:     null

        },

        errors: {

          title: {

            dirty:    false,
            status:   false,
            text:     ''

          },

          desc: {

            dirty:    false,
            status:   false,
            text:     ''

          },

          photos: {

            status:   false,
            text:     ''

          }

        }

      },

      // poll modification handler
      poll: {
        id:           null,
        title:        '',
        desc:         '',
        start:        '',
        end:          '',
        type:         '',
        answer:       '',
        answers:      [],
        errors: {

          title: {

            dirty:    false,
            status:   false,
            text:     ''

          },

          desc: {

            dirty:    false,
            status:   false,
            text:     ''

          },

          start: {

            dirty:    false,
            status:   false,
            text:     ''

          },

          end: {

            dirty:    false,
            status:   false,
            text:     ''

          },

          type: {

            dirty:    false,
            status:   false,
            text:     ''

          },

          answer: {

            dirty:    false,
            status:   false,
            text:     ''

          },

        }

      },

      // suggestion modification handler
      suggestion: {
        id:           null,
        title:        '',
        direct:       '',
        message:      '',
        errors: {

          title: {

            dirty:    false,
            status:   false,
            text:     ''

          },

          direct: {

            dirty:    false,
            status:   false,
            text:     ''

          },

          message: {

            dirty:    false,
            status:   false,
            text:     ''

          }

        }

      }

    }

  }, // data

  mounted() {

    this.getAct()

  }, // mounted

  methods: {

    enableFieldset() {

      this.disabled = false

    }, // enableFieldset

    disableFieldset() {

      this.disabled = true

    }, // disableFieldset

    showModal(selector, action = '', id = null, data = {}) {

      var vm = this

      vm.action = action
      vm.enableFieldset()

      if (selector == '#post-modal') {
        vm.post.id       =  id
        vm.post.title    =  data.title    == undefined ? '' : data.title
        vm.post.desc     =  data.desc     == undefined ? '' : data.desc

      } else if (selector == '#poll-modal') {
        vm.poll.id       =  id
        vm.poll.title    =  data.title    == undefined ? '' : data.title
        vm.poll.desc     =  data.desc     == undefined ? '' : data.desc
        vm.poll.type     =  data.type     == undefined ? '' : data.type
        vm.poll.answer   =  data.answer   == undefined ? '' : data.answer
        vm.poll.answers  =  data.answers  == undefined ? [] : data.answers

        // init datetime picker
        if (data.start == undefined && data.end == undefined) {
          $('#poll-start').datetimepicker({
            format: 'MMM D, YYYY h:mm a'
          })

          $('#poll-end').datetimepicker({
            format: 'MMM D, YYYY h:mm a'
          })

          vm.poll.start  = ''
          vm.poll.end    = ''

        } else {
          $('#poll-start').datetimepicker({
            format:       'MMM D, YYYY h:mm a',
            defaultDate:  moment(data.start, 'YYYY-MM-DD HH:mm:ss')
          })

          $('#poll-end').datetimepicker({
            format:       'MMM D, YYYY h:mm a',
            defaultDate:  moment(data.end, 'YYYY-MM-DD HH:mm:ss')
          })

          vm.poll.start  = moment(data.start, 'YYYY-MM-DD HH:mm:ss').format('MMM D, YYYY h:mm a')
          vm.poll.end    = moment(data.end, 'YYYY-MM-DD HH:mm:ss').format('MMM D, YYYY h:mm a')
        }

        // change event on datetime picker
        $("#poll-start").on("dp.change", function (e) {
          vm.poll.start  = e.date.format('MMM D, YYYY h:mm a')
        })

        $("#poll-end").on("dp.change", function (e) {
          vm.poll.end    = e.date.format('MMM D, YYYY h:mm a')
        })

      } else if (selector == '#suggestion-modal') {
        vm.suggestion.id       =  id
        vm.suggestion.title    =  data.title    == undefined ? '' : data.title
        vm.suggestion.direct   =  data.direct   == undefined ? '' : data.direct
        vm.suggestion.message  =  data.message  == undefined ? '' : data.message

      } else if (selector == '#confirm-post-modal') {
        vm.post.id = id

      } else if (selector == '#confirm-poll-modal') {
        vm.poll.id = id

      } else if (selector == '#confirm-suggestion-modal') {
        vm.suggestion.id = id

      }

      $(selector).modal('show')

    }, // showModal

    hideModal(selector) {

      var vm = this

      $(selector).modal('hide')

      $(selector).on('hidden.bs.modal', function () {
        vm.clearPost()
        vm.clearPostPhotos()
        vm.clearPoll()
        vm.clearSuggestion()
        vm.disableFieldset()
        vm.action = ''

      })

    }, // hideModal

    clearPostPhotos() {

      this.post.photos.data = []
      this.post.errors.photos.status = false
      this.post.errors.photos.text = ''

    }, // clearPostPhotos

    switchActivity(activity) {

      this.active = activity

      this.clearPost()
      this.clearPostPhotos()
      this.clearPosts()
      this.clearPoll()
      this.clearPolls()
      this.clearSuggestion()
      this.clearSuggestions()

      if (this.active == 'post') {
        this.getAct()

      } else if (this.active == 'poll') {
        this.getAct()

      } else if (this.active == 'suggestion') {
        this.getAct()

      }

    }, // switchActivity

    getAct() {

      this.full = 'loading'

      this.$http
        .get(window.location.origin + '/api/' + this.active + '?skip=' + this.skip + '&take=' + this.take)

        .then((response) => {

          this.skip += 10

          if      (this.active == 'post')         for (var i = 0; i <= response.data.length - 1; i++)     this.posts.push(response.data[i])
          else if (this.active == 'poll')         for (var i = 0; i <= response.data.length - 1; i++)     this.polls.push(response.data[i])
          else if (this.active == 'suggestion')   for (var i = 0; i <= response.data.length - 1; i++)     this.suggestions.push(response.data[i])

          if (response.data.length == 0 || response.data.length < 10)  this.full = true
          else                                                        this.full = false

        })

        .catch((response) => {
          console.error(response.error)

          this.full = false

        })

    }, // getAct

    storeAct(data) {

      this.$http
        .post(window.location.origin + '/api/' + this.active, data)

        .then((response) => {

          this.skip++

          if (this.active == 'post') {
            this.hideModal('#post-modal')
            this.posts.splice(0, 0, response.data)

          } else if (this.active == 'poll') {
            this.hideModal('#poll-modal')
            this.polls.splice(0, 0, response.data)

          } else if (this.active == 'suggestion') {
            this.hideModal('#suggestion-modal')
            this.suggestions.splice(0, 0, response.data)

          }

        })

        .catch((response) => {
          console.error(response.error)

        })

    }, // storeAct

    edit(id) {

      this.touch()

      this.$http
        .get(window.location.origin + '/api/' + this.active + '/' + id + '/edit')

        .then((response) => {

          if (this.active == 'post') {
            this.showModal('#post-modal', 'Update', response.data.id,
              {
                title:    response.data.title,
                desc:     response.data.desc
              }
            )

          } else if (this.active == 'poll') {
            this.showModal('#poll-modal', 'Update', response.data.id,
              {
                title:    response.data.title,
                desc:     response.data.desc,
                start:    response.data.start,
                end:      response.data.end,
                status:   response.data.status,
                type:     response.data.type,
                answers:  response.data.answers
              }
            )

          } else if (this.active == 'suggestion') {
            this.showModal('#suggestion-modal', 'Update', response.data.id,
              {
                title:    response.data.title,
                direct:   response.data.direct,
                message:  response.data.message
              }
            )

          }

        })

        .catch((response) => {
          console.error(response.error)

        })

    }, // edit

    touch() {

      if (this.active == 'post') {
        this.post.errors.title.dirty            = true
        this.post.errors.title.status           = true

        this.post.errors.desc.dirty             = true
        this.post.errors.desc.status            = true

      } else if (this.active == 'poll') {
        this.poll.errors.title.dirty            = true
        this.poll.errors.title.status           = true

        this.poll.errors.desc.dirty             = true
        this.poll.errors.desc.status            = true

        this.poll.errors.start.dirty            = true
        this.poll.errors.start.status           = true

        this.poll.errors.end.dirty              = true
        this.poll.errors.end.status             = true

        this.poll.errors.type.dirty             = true
        this.poll.errors.type.status            = true

        this.poll.errors.answer.dirty           = true
        this.poll.errors.answer.status          = true

      } else if (this.active == 'suggestion') {
        this.suggestion.errors.title.dirty      = true
        this.suggestion.errors.title.status     = true

        this.suggestion.errors.direct.dirty     = true
        this.suggestion.errors.direct.status    = true

        this.suggestion.errors.message.dirty    = true
        this.suggestion.errors.message.status   = true

      }

    }, // touch

    updateAct(id, data) {

      this.$http
        .put(window.location.origin + '/api/' + this.active + '/' + id, data)

        .then((response) => {
          if (this.active == 'post') {
            this.hideModal('#post-modal')

            var i = _.indexOf(this.posts, _.find(this.posts, {id: response.data.id}))

            this.posts.splice(i, 1, response.data)

          } else if (this.active == 'poll') {
            this.hideModal('#poll-modal')

            var i = _.indexOf(this.polls, _.find(this.polls, {id: response.data.id}))

            this.polls.splice(i, 1, response.data)

          } else if (this.active == 'suggestion') {
            this.hideModal('#suggestion-modal')

            var i = _.indexOf(this.suggestions, _.find(this.suggestions, {id: response.data.id}))

            this.suggestions.splice(i, 1, response.data)

          }

        })

        .catch((response) => {
          console.error(response.error)
        })

    }, // updateAct

    destroy() {

      if      (this.active == 'post')         var id = this.post.id
      else if (this.active == 'poll')         var id = this.poll.id
      else if (this.active == 'suggestion')   var id = this.suggestion.id

      this.$http
        .delete(window.location.origin + '/api/' + this.active + '/' + id)

        .then((response) => {
          this.skip--

          if (this.active == 'post') {
            var i = _.indexOf(this.posts, _.find(this.posts, {id: response.data.id}))

            this.posts.splice(i, 1)

          } else if (this.active == 'poll') {
            var i = _.indexOf(this.polls, _.find(this.polls, {id: response.data.id}))

            this.polls.splice(i, 1)

          } else if (this.active == 'suggestion') {
            var i = _.indexOf(this.suggestions, _.find(this.suggestions, {id: response.data.id}))

            this.suggestions.splice(i, 1)

          }

          this.hideModal('#confirm-' + this.active + '-modal')

        })
        .catch((response) => {
          console.error(response.error)

        })

    }, // destroy

    submitAct() {

      var vm = this

      vm.disableFieldset()

      if (vm.active == 'post') {

        if (vm.post.photos.data.length > 0) {

          vm.post.photos.uploading = true

          vm.$http
            .post(window.location.origin + '/api/image/post/upload',
            {
              photos: vm.post.photos.data
            },
            {

              progress(e) {

                if (e.lengthComputable)
                  vm.post.photos.loaded = (e.loaded / e.total) * 100

              }

            })

            .then(response => {

              vm.post.photos.uploading = false

              var id = vm.post.id

              var data    = {
                title:    vm.post.title,
                desc:     vm.post.desc,
                photos:   response.data
              }

              vm.$nextTick(function () {
                if (vm.action == 'Update')
                  vm.updateAct(id, data)
                else
                  vm.storeAct(data)
              })

            })

            .catch(response => {

              vm.post.photos.uploading = false
              vm.post.photos.loaded = null
              vm.post.errors.photos.status = true
              vm.post.errors.photos.text = response.statusText
              vm.enableFieldset()

              return false;

            })

        } else {

          var id = vm.post.id

          var data    = {
            title:    vm.post.title,
            desc:     vm.post.desc,
            photos:   []
          }

          if (vm.action == 'Update')
            vm.updateAct(id, data)
          else
            vm.storeAct(data)

        }

      } else if (vm.active == 'poll') {
        var id = vm.poll.id

        var data    = {
          title:    vm.poll.title,
          desc:     vm.poll.desc,
          start:    vm.poll.start,
          end:      vm.poll.end,
          type:     vm.poll.type,
          answers:  vm.poll.answers
        }

        if (vm.action == 'Update')
          vm.updateAct(id, data)
        else
          vm.storeAct(data)

      } else if (vm.active == 'suggestion') {
        var id = vm.suggestion.id

        var data    = {
          title:    vm.suggestion.title,
          direct:   vm.suggestion.direct,
          message:  vm.suggestion.message
        }

        if (vm.action == 'Update')
          vm.updateAct(id, data)
        else
          vm.storeAct(data)

      }

    }, // submitAct

    addAnswer(answer) {

      if (answer == '') return

      if (typeof(answer) == 'object') {
        this.poll.answers.push(answer)
        this.poll.answer = ''

      } else {
        this.poll.answers.push({id: null, answer: answer})
        this.poll.answer = ''

      }

    }, // addAnswer

    removeAnswer(key) {

      this.poll.answers.splice(key, 1)

    }, // removeAnswer

    onFileChange(e) {

      var files = e.target.files || e.dataTransfer.files

      if (files.length == 0) {
        this.post.errors.photos.status = true
        this.post.errors.photos.text = 'No image selected'

      } else {
        var vm = this

        for (var i = 0; i < files.length; i++) {
          if (['image/gif', 'image/jpeg', 'image/png'].indexOf(files[i]['type']) == -1) {
            vm.post.errors.photos.status = true
            vm.post.errors.photos.text = 'File is not an image'

          } else {
            vm.post.errors.photos.status = false

            var reader = new FileReader()

            reader.onload = e => {

              if (vm.post.photos.data.length < 15)
                vm.post.photos.data.push(e.target.result)
              else {
                vm.post.errors.photos.status = true
                vm.post.errors.photos.text = 'Maximum of 15 photos only'
              }

            } // e

            reader.readAsDataURL(files[i])

          } // else

        } // for

      } // else

    }, // onFileChange

    removePhoto(key) {

      this.post.photos.data.splice(key, 1)

    } // removePhoto

  } //methods

})

require('./app.js')


text:
package org.synyx.urlaubsverwaltung.application.application;

import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.Mock;
import org.mockito.junit.jupiter.MockitoExtension;
import org.synyx.urlaubsverwaltung.application.application.Application;
import org.synyx.urlaubsverwaltung.application.application.ApplicationForLeave;
import org.synyx.urlaubsverwaltung.period.DayLength;
import org.synyx.urlaubsverwaltung.person.Person;
import org.synyx.urlaubsverwaltung.workingtime.WorkDaysCountService;

import java.math.BigDecimal;
import java.time.LocalDate;

import static java.math.BigDecimal.TEN;
import static java.time.DayOfWeek.FRIDAY;
import static java.time.DayOfWeek.TUESDAY;
import static java.time.LocalDate.of;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
import static org.synyx.urlaubsverwaltung.TestDataCreator.createApplication;
import static org.synyx.urlaubsverwaltung.period.DayLength.FULL;

@ExtendWith(MockitoExtension.class)
class ApplicationForLeaveTest {

    @Mock
    private WorkDaysCountService workDaysCountService;

    @Test
    void ensureCreatesCorrectApplicationForLeave() {

        final Person person = new Person("muster", "Muster", "Marlene", "muster@example.org");

        final Application application = createApplication(person, of(2015, 3, 3), of(2015, 3, 6), FULL);

        when(workDaysCountService.getWorkDaysCount(any(DayLength.class), any(LocalDate.class), any(LocalDate.class), any(Person.class)))
            .thenReturn(TEN);

        final ApplicationForLeave sut = new ApplicationForLeave(application, workDaysCountService);
        assertThat(sut.getStartDate()).isEqualTo(application.getStartDate());
        assertThat(sut.getEndDate()).isEqualTo(application.getEndDate());
        assertThat(sut.getDayLength()).isEqualTo(application.getDayLength());
        assertThat(sut.getWorkDays()).isEqualTo(TEN);

        verify(workDaysCountService).getWorkDaysCount(application.getDayLength(), application.getStartDate(), application.getEndDate(), person);
    }

    @Test
    void ensureApplicationForLeaveHasInformationAboutDayOfWeek() {

        final Person person = new Person("muster", "Muster", "Marlene", "muster@example.org");

        final Application application = createApplication(person, of(2016, 3, 1), of(2016, 3, 4), FULL);

        when(workDaysCountService.getWorkDaysCount(any(DayLength.class), any(LocalDate.class), any(LocalDate.class), any(Person.class)))
            .thenReturn(BigDecimal.valueOf(4));

        final ApplicationForLeave sut = new ApplicationForLeave(application, workDaysCountService);
        assertThat(sut.getWeekDayOfStartDate()).isEqualTo(TUESDAY);
        assertThat(sut.getWeekDayOfEndDate()).isEqualTo(FRIDAY);
    }
}


text:
module Dedalus
  module PatternLibrary
    class LibrarySectionTab < Dedalus::Molecule
      attr_accessor :icon, :name, :description, :scale, :highlight, :section_color

      def show
        Container.new(
          [[icon_element, [ title_element, description_element ]]],
          padding: 16,
          scale: scale
        )
      end

      def hover
        self.scale = 1.05
      end

      def background_color
        bg = Palette.decode_color(section_color)
        self.highlight ? bg.lighten : bg
      end

      def click
        view.route_to(name)
      end

      def scale
        @scale ||= 1.0
      end

      def height
        @height ||= 80
      end

      def icon_element
        Elements::Icon.for(icon, padding: 10)
      end

      def title_element
        Elements::Heading.new(text: name, scale: scale)
      end

      def description_element
        TinyText.new(text: description)
      end

      def self.description
        "navigational tab"
      end

      def self.example_data
        {
          icon: :house,
          name: "Welcome",
          description: "Hello world (links to Welcome)",
          highlight: false,
          section_color: 'gray'
        }
      end
    end
  end
end


text:
import Chart from './Chart';
import SvgStrategyParallelCoordinates from '../svg/strategies/SvgStrategyParallelCoordinates';
import { defaults } from '../utils/defaults/parallelCoordinates';

class ParallelCoordinates extends Chart {

    constructor(data: any, userConfig: any = {}) {
        super(
            SvgStrategyParallelCoordinates,
            data,
            userConfig,
            defaults
        );
    }

    public keepDrawing(datum: any) {
        let pause: boolean = this.config.get('pause');

        if (!Array.isArray(datum)) {
            this.data = [datum];
        } else {
            this.data = datum;
        }

        this.streamDrawing();

        if (pause) {
            this.pauseDrawing();
        } else {
            this.resumeDrawing();
        }
    }

}

export default ParallelCoordinates;


text:
require 'spec_helper'

describe Puppet::Type.type(:dsc_xexchclientaccessserver) do

  let :dsc_xexchclientaccessserver do
    Puppet::Type.type(:dsc_xexchclientaccessserver).new(
      :name     => 'foo',
      :dsc_identity => 'foo',
    )
  end

  it 'should allow all properties to be specified' do
    expect { Puppet::Type.type(:dsc_xexchclientaccessserver).new(
      :name     => 'foo',
      :dsc_identity => 'foo',
      :dsc_credential => {"user"=>"user", "password"=>"password"},
      :dsc_autodiscoverserviceinternaluri => 'foo',
      :dsc_autodiscoversitescope => ["foo", "bar", "spec"],
      :dsc_domaincontroller => 'foo',
    )}.to_not raise_error
  end

  it "should stringify normally" do
    expect(dsc_xexchclientaccessserver.to_s).to eq("Dsc_xexchclientaccessserver[foo]")
  end

  it 'should require that dsc_identity is specified' do
    #dsc_xexchclientaccessserver[:dsc_identity]
    expect { Puppet::Type.type(:dsc_xexchclientaccessserver).new(
      :name     => 'foo',
    )}.to raise_error(Puppet::Error, /dsc_identity is a required attribute/)
  end

  it 'should not accept array for dsc_identity' do
    expect{dsc_xexchclientaccessserver[:dsc_identity] = ["foo", "bar", "spec"]}.to raise_error(Puppet::ResourceError)
  end

  it 'should not accept boolean for dsc_identity' do
    expect{dsc_xexchclientaccessserver[:dsc_identity] = true}.to raise_error(Puppet::ResourceError)
  end

  it 'should not accept int for dsc_identity' do
    expect{dsc_xexchclientaccessserver[:dsc_identity] = -16}.to raise_error(Puppet::ResourceError)
  end

  it 'should not accept uint for dsc_identity' do
    expect{dsc_xexchclientaccessserver[:dsc_identity] = 16}.to raise_error(Puppet::ResourceError)
  end

  it "should not accept empty password for dsc_credential" do
    expect{dsc_xexchclientaccessserver[:dsc_credential] = {"user"=>"user", "password"=>""}}.to raise_error(Puppet::ResourceError)
  end

  it 'should not accept array for dsc_credential' do
    expect{dsc_xexchclientaccessserver[:dsc_credential] = ["foo", "bar", "spec"]}.to raise_error(Puppet::ResourceError)
  end

  it 'should not accept boolean for dsc_credential' do
    expect{dsc_xexchclientaccessserver[:dsc_credential] = true}.to raise_error(Puppet::ResourceError)
  end

  it 'should not accept int for dsc_credential' do
    expect{dsc_xexchclientaccessserver[:dsc_credential] = -16}.to raise_error(Puppet::ResourceError)
  end

  it 'should not accept uint for dsc_credential' do
    expect{dsc_xexchclientaccessserver[:dsc_credential] = 16}.to raise_error(Puppet::ResourceError)
  end

  it 'should not accept array for dsc_autodiscoverserviceinternaluri' do
    expect{dsc_xexchclientaccessserver[:dsc_autodiscoverserviceinternaluri] = ["foo", "bar", "spec"]}.to raise_error(Puppet::ResourceError)
  end

  it 'should not accept boolean for dsc_autodiscoverserviceinternaluri' do
    expect{dsc_xexchclientaccessserver[:dsc_autodiscoverserviceinternaluri] = true}.to raise_error(Puppet::ResourceError)
  end

  it 'should not accept int for dsc_autodiscoverserviceinternaluri' do
    expect{dsc_xexchclientaccessserver[:dsc_autodiscoverserviceinternaluri] = -16}.to raise_error(Puppet::ResourceError)
  end

  it 'should not accept uint for dsc_autodiscoverserviceinternaluri' do
    expect{dsc_xexchclientaccessserver[:dsc_autodiscoverserviceinternaluri] = 16}.to raise_error(Puppet::ResourceError)
  end

  it 'should accept array for dsc_autodiscoversitescope' do
    dsc_xexchclientaccessserver[:dsc_autodiscoversitescope] = ["foo", "bar", "spec"]
    expect(dsc_xexchclientaccessserver[:dsc_autodiscoversitescope]).to eq(["foo", "bar", "spec"])
  end

  it 'should not accept boolean for dsc_autodiscoversitescope' do
    expect{dsc_xexchclientaccessserver[:dsc_autodiscoversitescope] = true}.to raise_error(Puppet::ResourceError)
  end

  it 'should not accept int for dsc_autodiscoversitescope' do
    expect{dsc_xexchclientaccessserver[:dsc_autodiscoversitescope] = -16}.to raise_error(Puppet::ResourceError)
  end

  it 'should not accept uint for dsc_autodiscoversitescope' do
    expect{dsc_xexchclientaccessserver[:dsc_autodiscoversitescope] = 16}.to raise_error(Puppet::ResourceError)
  end

  it 'should not accept array for dsc_domaincontroller' do
    expect{dsc_xexchclientaccessserver[:dsc_domaincontroller] = ["foo", "bar", "spec"]}.to raise_error(Puppet::ResourceError)
  end

  it 'should not accept boolean for dsc_domaincontroller' do
    expect{dsc_xexchclientaccessserver[:dsc_domaincontroller] = true}.to raise_error(Puppet::ResourceError)
  end

  it 'should not accept int for dsc_domaincontroller' do
    expect{dsc_xexchclientaccessserver[:dsc_domaincontroller] = -16}.to raise_error(Puppet::ResourceError)
  end

  it 'should not accept uint for dsc_domaincontroller' do
    expect{dsc_xexchclientaccessserver[:dsc_domaincontroller] = 16}.to raise_error(Puppet::ResourceError)
  end

  # Configuration PROVIDER TESTS

  describe "powershell provider tests" do

    it "should successfully instanciate the provider" do
      described_class.provider(:powershell).new(dsc_xexchclientaccessserver)
    end

    before(:each) do
      @provider = described_class.provider(:powershell).new(dsc_xexchclientaccessserver)
    end

    describe "when dscmeta_module_name existing/is defined " do

      it "should compute powershell dsc test script with Invoke-DscResource" do
        expect(@provider.ps_script_content('test')).to match(/Invoke-DscResource/)
      end

      it "should compute powershell dsc test script with method Test" do
        expect(@provider.ps_script_content('test')).to match(/Method\s+=\s*'test'/)
      end

      it "should compute powershell dsc set script with Invoke-DscResource" do
        expect(@provider.ps_script_content('set')).to match(/Invoke-DscResource/)
      end

      it "should compute powershell dsc test script with method Set" do
        expect(@provider.ps_script_content('set')).to match(/Method\s+=\s*'set'/)
      end

    end

    describe "when dsc_resource has credentials" do

      it "should convert credential hash to a pscredential object" do
        expect(@provider.ps_script_content('test')).to match(/| new-pscredential'/)
      end

    end

  end
end


text:
Cool tricks to be a bytemark badass
===============================

* Output the uptime for all your machines in the "critical" group:
  `for i in $(bytemark list servers critical); do echo "${i%%.*}:"; ssh $i uptime; done`

* Add 10GB of space to each archive grade disk in your "storage" server:
  `for disc in $(bytemark list discs storage | grep "archive grade"); do bytemark resize disc --size +10G $machine $(awk '{print $2}'); done`