text:
<bill session="111" type="s" number="315" updated="2009-03-07T14:11:13-05:00">
	<status><introduced date="1232946000" datetime="2009-01-26"/></status>

	<introduced date="1232946000" datetime="2009-01-26"/>
	<titles>
		<title type="short" as="introduced">Veterans Outreach Improvement Act of 2009</title>
		<title type="official" as="introduced">A bill to amend title 38, United States Code, to improve the outreach activities of the Department of Veterans Affairs, and for other purposes.</title>
	</titles>
	<sponsor id="300042"/>
	<cosponsors>
		<cosponsor id="400357" joined="2009-01-26"/>
	</cosponsors>
	<actions>
		<action date="1232946000" datetime="2009-01-26"><text>Sponsor introductory remarks on measure. (CR S833-834)</text></action>
		<action date="1232946000" datetime="2009-01-26"><text>Read twice and referred to the Committee on Veterans' Affairs.</text></action>
	</actions>
	<committees>
		<committee name="Senate Veterans' Affairs" subcommittee="" activity="Referral, In Committee" />
	</committees>
	<relatedbills>

	</relatedbills>
	<subjects>
		<term name="Armed forces and national security"/>
		<term name="Department of Veterans Affairs"/>
		<term name="Military cemeteries and funerals"/>
		<term name="Veterans' education, employment, rehabilitation"/>
		<term name="Veterans' loans, housing, homeless programs"/>
		<term name="Veterans' medical care"/>
		<term name="Veterans' pensions and compensation"/>
	</subjects>
	<amendments>

	</amendments>

	1/26/2009--Introduced.
Veterans Outreach Improvement Act of 2009 - Directs the Secretary of Veterans to establish a separate account for the funding of outreach activities of the Department of Veterans Affairs (VA) and a separate subaccount for the funding of outreach activities of the Veterans Health Administration, the Veterans Benefits Administration, and the National Cemetery Administration. Directs the Secretary to establish and maintain procedures for ensuring the effective coordination of VA outreach activities between and among such elements, the Office of the Secretary, and the Office of Public Affairs. Authorizes the Secretary to award grants to: (1) state and local governments and nonprofit community-based organizations to carry out programs that offer a high probability of improving veterans' outreach and assistance; and (2) appropriate state veterans agencies for such purpose.

</bill>


text:
<!DOCTYPE HTML>

    <meta http-equiv="Content-type" content="text/html; charset=utf-8">
    <title>Hovercards2</title>

    @Anywhereの最新情報は@Anywhereで!

redpajama_set_name: RedPajamaGithub


text:
package main.java.utils.graph;

import edu.uci.ics.jung.graph.UndirectedGraph;

public interface ISimpleGraph<V extends SimpleVertex, E extends SimpleEdge>
	extends UndirectedGraph<V, E> {

	void addGraphEdge(E e, V v1, V v2);
	E getEdge(int id);
	V getVertex(int id);
}


text:
package com.consol.citrus.rmi.config.annotation;

import com.consol.citrus.TestActor;
import com.consol.citrus.config.annotation.AbstractAnnotationConfigParser;
import com.consol.citrus.context.ReferenceResolver;
import com.consol.citrus.message.MessageCorrelator;
import com.consol.citrus.rmi.client.RmiClient;
import com.consol.citrus.rmi.client.RmiClientBuilder;
import com.consol.citrus.rmi.message.RmiMessageConverter;
import org.springframework.util.StringUtils;

/**
 * @author Christoph Deppisch
 * @since 2.5
 */
public class RmiClientConfigParser extends AbstractAnnotationConfigParser<RmiClientConfig, RmiClient> {

    /**
     * Constructor matching super.
     * @param referenceResolver
     */
    public RmiClientConfigParser(ReferenceResolver referenceResolver) {
        super(referenceResolver);
    }

    @Override
    public RmiClient parse(RmiClientConfig annotation) {
        RmiClientBuilder builder = new RmiClientBuilder();

        if (StringUtils.hasText(annotation.serverUrl())) {
            builder.serverUrl(annotation.serverUrl());
        }

        if (StringUtils.hasText(annotation.host())) {
            builder.host(annotation.host());
        }

        builder.port(annotation.port());

        if (StringUtils.hasText(annotation.binding())) {
            builder.binding(annotation.binding());
        }

        if (StringUtils.hasText(annotation.method())) {
            builder.method(annotation.method());
        }

        if (StringUtils.hasText(annotation.messageConverter())) {
            builder.messageConverter(getReferenceResolver().resolve(annotation.messageConverter(), RmiMessageConverter.class));
        }

        if (StringUtils.hasText(annotation.correlator())) {
            builder.correlator(getReferenceResolver().resolve(annotation.correlator(), MessageCorrelator.class));
        }

        builder.pollingInterval(annotation.pollingInterval());

        builder.timeout(annotation.timeout());

        if (StringUtils.hasText(annotation.actor())) {
            builder.actor(getReferenceResolver().resolve(annotation.actor(), TestActor.class));
        }

        return builder.build();
    }
}


text:
package com.datatorrent.lib.appdata.query.serde;

import java.io.IOException;

import org.junit.Assert;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.datatorrent.lib.appdata.schemas.Message;
import com.datatorrent.lib.appdata.schemas.SchemaQuery;

public class MessageDeserializerFactoryTest
{
  @Test
  public void testMalformedQuery()
  {
    @SuppressWarnings("unchecked")
    MessageDeserializerFactory qdf = new MessageDeserializerFactory(SchemaQuery.class);

    String malformed = "{\"}";
    boolean exception = false;

    try {
      qdf.deserialize(malformed);
    }
    catch(IOException e) {
      exception = true;
    }

    Assert.assertTrue("Resulting query should throw IOException.", exception);
  }

  @Test
  public void testUnregisteredQueryType()
  {
    @SuppressWarnings("unchecked")
    MessageDeserializerFactory qdf = new MessageDeserializerFactory(SchemaQuery.class);

    String unsupportedQuery = "{\"id\":\"1\",\"type\":\"Invalid type\"}";
    boolean exception = false;

    Message data = null;

    try {
      data = qdf.deserialize(unsupportedQuery);
    }
    catch(IOException e) {
      exception = true;
    }

    Assert.assertTrue("Resulting query should be null.", exception);
  }

  private static final Logger LOG = LoggerFactory.getLogger(MessageDeserializerFactoryTest.class);
}


text:
iono/console
========
php console application package(beta)

[![License](http://img.shields.io/packagist/l/iono/console-kernel.svg?style=flat)](https://packagist.org/packages/iono/console-kernel)
[![Latest Version](http://img.shields.io/packagist/v/iono/console-kernel.svg?style=flat)](https://packagist.org/packages/iono/console-kernel)
[![Total Downloads](http://img.shields.io/packagist/dt/iono/console-kernel.svg?style=flat)](https://packagist.org/packages/iono/console-kernel)
[![Dependency Status](https://www.versioneye.com/user/projects/544cdb179fc4d5b70e000037/badge.svg?style=flat)](https://www.versioneye.com/user/projects/544cdb179fc4d5b70e000037)
[![Scrutinizer Code Quality](http://img.shields.io/scrutinizer/g/ytake/Iono.ConsoleKernel.svg?style=flat)](https://scrutinizer-ci.com/g/ytake/Iono.ConsoleKernel/?branch=master)

#Installation
**require php >= 5.4**
```bash
$ composer create-project iono/console your-projectName dev-master --prefer-dist
```

#Usage
##Ioc Container
[illuminate/container](https://github.com/illuminate/container)

###auto provider
**use @Component annotation**
```php
namespace App\Providers;

use Iono\Console\Application\Provider;
use Iono\Console\Application\Annotation\Component;

/**
 * Class ApplicationProvider
 * @package App\Console\Providers
 * @Component
 */
class ApplicationProvider extends Provider
{

    /**
     * register application container binding
     * @return void
     */
    public function register()
    {
        $this->container->bind("App\Repositories\RepositoryInterface", "App\Repositories\User");
    }

}
```
##component trait
default component
```php
// database component
'db' => "\\Iono\\Console\\Application\\Component\\DataStorage\\Db",
// cache component
'cache' => "\\Iono\\Console\\Application\\Component\\Cache\\Factory",
// redis component
'redis' => "\\Iono\\Console\\Application\\Component\\DataStorage\\Redis",
```

###usage your class
```php
namespace App\Repositories;

use Iono\Console\Application\Traits\Component;

/**
 * Class User
 * @package App\Repositories
 */
class User
{

    use Component;

    /**
     * @return mixed
     */
    public function getDbComponent()
    {
        // use db component
        return $this->db->connection();
    }
}

```
component auto inject

##perform console
###console action
basic
```bash
$ php iono console:action sample
```
arguments
```bash
$ php iono console:action sample?value=1$key=2
```
###action command list
```bash
$ php iono console:list
```
show command list(command name, class name, file path, description)

and more


text:
package example.services;

import example.SpikeMessage;
import example.SpikeMessageRepository;
import org.apache.commons.collections.Buffer;
import org.apache.commons.collections.buffer.CircularFifoBuffer;
import org.springframework.stereotype.Repository;

import java.util.Collection;

import static com.google.common.collect.Lists.newArrayList;
import static org.apache.commons.collections.BufferUtils.synchronizedBuffer;

@Repository
@SuppressWarnings({"unchecked"})
public class BufferedSpikeMessageRepository implements SpikeMessageRepository {

    private final Buffer buffer = synchronizedBuffer(new CircularFifoBuffer(100));

    @Override
    public void add(SpikeMessage message) {
        buffer.add(message);
    }

    @Override
    public Collection<SpikeMessage> list() {
        Collection<SpikeMessage> messages = newArrayList();
        messages.addAll(buffer);
        return messages;
    }
}


text:
package com.planet_ink.siplet.support;

import java.util.*;

@SuppressWarnings({"unchecked","rawtypes"})
public class Util
{
	public final static String SPACES="                                                                     ";

	public static String toSemicolonList(byte[] bytes)
	{
		final StringBuffer str=new StringBuffer("");
		for(int b=0;b<bytes.length;b++)
			str.append(Byte.toString(bytes[b])+(b<(bytes.length-1)?";":""));
		return str.toString();
	}

	public static String toSemicolonList(String[] bytes)
	{
		final StringBuffer str=new StringBuffer("");
		for(int b=0;b<bytes.length;b++)
			str.append(bytes[b]+(b<(bytes.length-1)?";":""));
		return str.toString();
	}

	public static String toSemicolonList(Vector bytes)
	{
		final StringBuffer str=new StringBuffer("");
		for(int b=0;b<bytes.size();b++)
			str.append(bytes.elementAt(b)+(b<(bytes.size()-1)?";":""));
		return str.toString();
	}

	public static byte[] fromByteList(String str)
	{
		final Vector V=parseSemicolons(str,true);
		if(V.size()>0)
		{
			final byte[] bytes=new byte[V.size()];
			for(int b=0;b<V.size();b++)
				bytes[b]=Byte.parseByte((String)V.elementAt(b));
			return bytes;
		}
		return new byte[0];
	}

	public static long absDiff(long x, long y)
	{
		final long d=x-y;
		if(d<0) return d*-1;
		return d;
	}

	public static String repeat(String str1, int times)
	{
		if(times<=0) return "";
		final StringBuffer str=new StringBuffer("");
		for(int i=0;i<times;i++)
			str.append(str1);
		return str.toString();
	}

	public static String endWithAPeriod(String str)
	{
		if(str.length()==0) return str;
		int x=str.length()-1;
		while((x>=0)
		&&((Character.isWhitespace(str.charAt(x)))
			||((x>0)&&((str.charAt(x)!='^')&&(str.charAt(x-1)=='^')&&((--x)>=0)))))
				x--;
		if(x<0) return str;
		if((str.charAt(x)=='.')||(str.charAt(x)=='!')||(str.charAt(x)=='?'))
			return str.trim()+" ";
		return str.substring(0,x+1)+". "+str.substring(x+1).trim();
	}

	public static String startWithAorAn(String str)
	{
		if(str.length()==0)
			return str;
		if((!str.toUpperCase().startsWith("A "))
		&&(!str.toUpperCase().startsWith("AN "))
		&&(!str.toUpperCase().startsWith("THE "))
		&&(!str.toUpperCase().startsWith("SOME ")))
		{
			if("aeiouAEIOU".indexOf(str.charAt(0))>=0)
				return "an "+str;
			return "a "+str;
		}
		return str;
	}

	public static int getParmInt(String text, String key, int defaultValue)
	{
		int x=text.toUpperCase().indexOf(key.toUpperCase());
		while(x>=0)
		{
			if((x==0)||(!Character.isLetter(text.charAt(x-1))))
			{
				while((x<text.length())&&(text.charAt(x)!='=')&&(!Character.isDigit(text.charAt(x))))
				{
					if((text.charAt(x)=='+')||(text.charAt(x)=='-'))
						return defaultValue;
					x++;
				}
				if((x<text.length())&&(text.charAt(x)=='='))
				{
					while((x<text.length())&&(!Character.isDigit(text.charAt(x))))
						x++;
					if(x<text.length())
					{
						text=text.substring(x);
						x=0;
						while((x<text.length())&&(Character.isDigit(text.charAt(x))))
							x++;
						return Util.s_int(text.substring(0,x));
					}
				}
				x=-1;
			}
			else
				x=text.toUpperCase().indexOf(key.toUpperCase(),x+1);
		}
		return defaultValue;
	}

	public static boolean isVowel(char c)
	{ return (("aeiou").indexOf(Character.toLowerCase(c))>=0);}

	public static int getParmPlus(String text, String key)
	{
		int x=text.toUpperCase().indexOf(key.toUpperCase());
		while(x>=0)
		{
			if((x==0)||(!Character.isLetter(text.charAt(x-1))))
			{
				while((x<text.length())&&(text.charAt(x)!='+')&&(text.charAt(x)!='-'))
				{
					if(text.charAt(x)=='=')
						return 0;
					x++;
				}
				if(x<text.length())
				{
					final char pm=text.charAt(x);
					while((x<text.length())&&(!Character.isDigit(text.charAt(x))))
						x++;
					if(x<text.length())
					{
						text=text.substring(x);
						x=0;
						while((x<text.length())&&(Character.isDigit(text.charAt(x))))
							x++;
						if(pm=='+')
							return Util.s_int(text.substring(0,x));
						return -Util.s_int(text.substring(0,x));
					}
				}
				x=-1;
			}
			else
				x=text.toUpperCase().indexOf(key.toUpperCase(),x+1);
		}
		return 0;
	}

	public static double getParmDoublePlus(String text, String key)
	{
		int x=text.toUpperCase().indexOf(key.toUpperCase());
		while(x>=0)
		{
			if((x==0)||(!Character.isLetter(text.charAt(x-1))))
			{
				while((x<text.length())&&(text.charAt(x)!='+')&&(text.charAt(x)!='-'))
				{
					if(text.charAt(x)=='=')
						return 0.0;
					x++;
				}
				if(x<text.length())
				{
					final char pm=text.charAt(x);
					while((x<text.length())
					&&(!Character.isDigit(text.charAt(x)))
					&&(text.charAt(x)!='.'))
						x++;
					if(x<text.length())
					{
						text=text.substring(x);
						x=0;
						while((x<text.length())
						&&((Character.isDigit(text.charAt(x)))||(text.charAt(x)=='.')))
							x++;
						if(text.substring(0,x).indexOf('.')<0)
						{
							if(pm=='+')
								return Util.s_int(text.substring(0,x));
							return -Util.s_int(text.substring(0,x));
						}
						if(pm=='+')
							return Util.s_double(text.substring(0,x));
						return -Util.s_double(text.substring(0,x));
					}
				}
				x=-1;
			}
			else
				x=text.toUpperCase().indexOf(key.toUpperCase(),x+1);
		}
		return 0.0;
	}

	public static double getParmDouble(String text, String key, double defaultValue)
	{
		int x=text.toUpperCase().indexOf(key.toUpperCase());
		while(x>=0)
		{
			if((x==0)||(!Character.isLetter(text.charAt(x-1))))
			{
				while((x<text.length())&&(text.charAt(x)!='='))
					x++;
				if(x<text.length())
				{
					while((x<text.length())
					&&(!Character.isDigit(text.charAt(x)))
					&&(text.charAt(x)!='.'))
						x++;
					if(x<text.length())
					{
						text=text.substring(x);
						x=0;
						while((x<text.length())
						&&((Character.isDigit(text.charAt(x)))||(text.charAt(x)=='.')))
							x++;
						if(text.substring(0,x).indexOf('.')<0)
							return Util.s_long(text.substring(0,x));
						return Util.s_double(text.substring(0,x));
					}
				}
				x=-1;
			}
			else
				x=text.toUpperCase().indexOf(key.toUpperCase(),x+1);
		}
		return defaultValue;
	}

	public static String getParmStr(String text, String key, String defaultVal)
	{
		int x=text.toUpperCase().indexOf(key.toUpperCase());
		while(x>=0)
		{
			if((x==0)||(!Character.isLetter(text.charAt(x-1))))
			{
				while((x<text.length())&&(text.charAt(x)!='='))
				{
					if((text.charAt(x)=='+')||(text.charAt(x)=='-'))
						return defaultVal;
					x++;
				}
				if(x<text.length())
				{
					boolean endWithQuote=false;
					while((x<text.length())&&(!Character.isLetterOrDigit(text.charAt(x))))
					{
						if(text.charAt(x)=='\"')
						{
							endWithQuote=true;
							x++;
							break;
						}
						x++;
					}
					if(x<text.length())
					{
						text=text.substring(x);
						x=0;
						while((x<text.length())
							&&((Character.isLetterOrDigit(text.charAt(x)))
							||((endWithQuote)&&(text.charAt(x)!='\"'))))
							x++;
						return text.substring(0,x).trim();
					}

				}
				x=-1;
			}
			else
				x=text.toUpperCase().indexOf(key.toUpperCase(),x+1);
		}
		return defaultVal;
	}

	public static String[] toStringArray(Vector V)
	{
		if((V==null)||(V.size()==0))
		{
			final String[] s=new String[0];
			return s;
		}
		final String[] s=new String[V.size()];
		for(int v=0;v<V.size();v++)
			s[v]=V.elementAt(v).toString();
		return s;
	}

	public static long[] toLongArray(Vector V)
	{
		if((V==null)||(V.size()==0))
		{
			final long[] s=new long[0];
			return s;
		}
		final long[] s=new long[V.size()];
		for(int v=0;v<V.size();v++)
			s[v]=Util.s_long(V.elementAt(v).toString());
		return s;
	}
	public static int[] toIntArray(Vector V)
	{
		if((V==null)||(V.size()==0))
		{
			final int[] s=new int[0];
			return s;
		}
		final int[] s=new int[V.size()];
		for(int v=0;v<V.size();v++)
			s[v]=Util.s_int(V.elementAt(v).toString());
		return s;
	}

	public static String[] toStringArray(HashSet V)
	{
		if((V==null)||(V.size()==0))
		{
			final String[] s=new String[0];
			return s;
		}
		final String[] s=new String[V.size()];
		int v=0;
		for(final Iterator i=V.iterator();i.hasNext();)
			s[v++]=(i.next()).toString();
		return s;
	}

	public static String toStringList(String[] V)
	{
		if((V==null)||(V.length==0))
		{
			return "";
		}
		final StringBuffer s=new StringBuffer("");
		for (final String element : V)
			s.append(", "+element);
		if(s.length()==0) return "";
		return s.toString().substring(2);
	}

	public static String toStringList(long[] V)
	{
		if((V==null)||(V.length==0))
		{
			return "";
		}
		final StringBuffer s=new StringBuffer("");
		for (final long element : V)
			s.append(", "+element);
		if(s.length()==0) return "";
		return s.toString().substring(2);
	}

	public static String toStringList(int[] V)
	{
		if((V==null)||(V.length==0))
		{
			return "";
		}
		final StringBuffer s=new StringBuffer("");
		for (final int element : V)
			s.append(", "+element);
		if(s.length()==0) return "";
		return s.toString().substring(2);
	}

	public static String toStringList(Vector V)
	{
		if((V==null)||(V.size()==0))
		{
			return "";
		}
		final StringBuffer s=new StringBuffer("");
		for(int v=0;v<V.size();v++)
			s.append(", "+V.elementAt(v).toString());
		if(s.length()==0) return "";
		return s.toString().substring(2);
	}

	public static String toStringList(HashSet V)
	{
		if((V==null)||(V.size()==0))
		{
			return "";
		}
		final StringBuffer s=new StringBuffer("");
		for(final Iterator i=V.iterator();i.hasNext();)
			s.append(", "+i.next().toString());
		if(s.length()==0) return "";
		return s.toString().substring(2);
	}

	public static Vector makeVector(String[] O)
	{
		final Vector V=new Vector();
		if(O!=null)
			for (final String element : O)
				V.addElement(element);
		return V;
	}
	public static Vector makeVector()
	{ return new Vector();}
	public static Vector makeVector(Object O)
	{ final Vector V=new Vector(); V.addElement(O); return V;}
	public static Vector makeVector(Object O, Object O2)
	{ final Vector V=new Vector(); V.addElement(O); V.addElement(O2); return V;}
	public static Vector makeVector(Object O, Object O2, Object O3)
	{ final Vector V=new Vector(); V.addElement(O); V.addElement(O2); V.addElement(O3); return V;}
	public static Vector makeVector(Object O, Object O2, Object O3, Object O4)
	{ final Vector V=new Vector(); V.addElement(O); V.addElement(O2); V.addElement(O3); V.addElement(O4); return V;}

	public static HashSet makeHashSet(){return new HashSet();}
	public static HashSet makeHashSet(Object O)
	{final HashSet H=new HashSet(); H.add(O); return H;}
	public static HashSet makeHashSet(Object O, Object O2)
	{final HashSet H=new HashSet(); H.add(O); H.add(O2); return H;}
	public static HashSet makeHashSet(Object O, Object O2, Object O3)
	{final HashSet H=new HashSet(); H.add(O); H.add(O2); H.add(O3); return H;}
	public static HashSet makeHashSet(Object O, Object O2, Object O3, Object O4)
	{final HashSet H=new HashSet(); H.add(O); H.add(O2); H.add(O3); H.add(O4); return H;}

	public static String[] toStringArray(Hashtable V)
	{
		if((V==null)||(V.size()==0))
		{
			final String[] s=new String[0];
			return s;
		}
		final String[] s=new String[V.size()];
		int v=0;
		for(final Enumeration e=V.keys();e.hasMoreElements();)
		{
			final String KEY=(String)e.nextElement();
			s[v]=(String)V.get(KEY);
			v++;
		}
		return s;
	}

	public static void addToVector(Vector from, Vector to)
	{
		if(from!=null)
		for(int i=0;i<from.size();i++)
			to.addElement(from.elementAt(i));
	}

	public static String toStringList(Hashtable V)
	{
		if((V==null)||(V.size()==0))
		{
			return "";
		}
		final StringBuffer s=new StringBuffer("");
		for(final Enumeration e=V.keys();e.hasMoreElements();)
		{
			final String KEY=(String)e.nextElement();
			s.append(KEY+"="+((String)V.get(KEY))+"/");
		}
		return s.toString();
	}

	public static String replaceAll(String str, String thisStr, String withThisStr)
	{
		if((str==null)
		||(thisStr==null)
		||(withThisStr==null)
		||(str.length()==0)
		||(thisStr.length()==0))
			return str;
		for(int i=str.length()-1;i>=0;i--)
		{
			if(str.charAt(i)==thisStr.charAt(0))
				if(str.substring(i).startsWith(thisStr))
					str=str.substring(0,i)+withThisStr+str.substring(i+thisStr.length());
		}
		return str;
	}

	public static String replaceAllIgnoreCase(String str, String thisStr, String withThisStr)
	{
		if((str==null)
		||(thisStr==null)
		||(withThisStr==null)
		||(str.length()==0)
		||(thisStr.length()==0))
			return str;
		for(int i=str.length()-1;i>=0;i--)
		{
			if(Character.toUpperCase(str.charAt(i))==Character.toUpperCase(thisStr.charAt(0)))
				if(str.substring(i).toUpperCase().startsWith(thisStr.toUpperCase()))
				{
					final boolean isUpperCase=Character.isUpperCase(str.charAt(i));
					if(withThisStr.length()>0)
						withThisStr=(isUpperCase?Character.toUpperCase(withThisStr.charAt(0)):Character.toLowerCase(withThisStr.charAt(0)))+withThisStr.substring(1);
					str=str.substring(0,i)+withThisStr+str.substring(i+thisStr.length());
				}
		}
		return str;
	}
	public static String replaceFirst(String str, String thisStr, String withThisStr)
	{
		if((str==null)
		||(thisStr==null)
		||(withThisStr==null)
		||(str.length()==0)
		||(thisStr.length()==0))
			return str;
		for(int i=str.length()-1;i>=0;i--)
		{
			if(str.charAt(i)==thisStr.charAt(0))
				if(str.substring(i).startsWith(thisStr))
				{
					str=str.substring(0,i)+withThisStr+str.substring(i+thisStr.length());
					return str;
				}
		}
		return str;
	}

	public static boolean isInteger(String INT)
	{
		if(INT.length()==0) return false;
		if(INT.startsWith("-")&&(INT.length()>1))
			INT=INT.substring(1);
		for(int i=0;i<INT.length();i++)
			if(!Character.isDigit(INT.charAt(i)))
				return false;
		return true;
	}

	public static boolean isDouble(String DBL)
	{
		if(DBL.length()==0) return false;
		if(DBL.startsWith("-")&&(DBL.length()>1))
			DBL=DBL.substring(1);
		boolean alreadyDot=false;
		for(int i=0;i<DBL.length();i++)
			if(!Character.isDigit(DBL.charAt(i)))
			{
				if(DBL.charAt(i)=='.')
				{
					if(alreadyDot)
						return false;
					alreadyDot=true;
				}
				else
					return false;
			}
		return alreadyDot;
	}

	public static String capitalizeAndLower(String name)
	{
		return (Character.toUpperCase(name.charAt(0))+name.substring(1).toLowerCase()).trim();
	}
	public static String capitalizeFirstLetter(String name)
	{
		return (Character.toUpperCase(name.charAt(0))+name.substring(1)).trim();
	}

	/**
	 * Returns the boolean value of a string without crashing
	  *
	 *

Usage: int num=s_bool(CMD.substring(14));
	 * @param INT Boolean value of string
	 * @return int Boolean value of the string
	 */
	public static boolean s_bool(String BOOL)
	{
		return Boolean.valueOf(BOOL).booleanValue();
	}

	/**
	 * Returns the integer value of a string without crashing
	  *
	 *

Usage: int num=s_int(CMD.substring(14));
	 * @param INT Integer value of string
	 * @return int Integer value of the string
	 */
	public static int s_int(String INT)
	{
		int sint=0;
		try{ sint=Integer.parseInt(INT); }
		catch(final Exception e){ return 0;}
		return sint;
	}

	/**
	 * Returns the integer value of a string without crashing
	 *
	 *

Usage: int num=s0_int(CMD.substring(14));
	 * @param INT Integer value of string
	 * @return int Integer value of the string
	 */
	public static int s0_int(String INT)
	{
		int sint=0;
		while((INT.length()>0)&&(INT.startsWith("0")))
				INT=INT.substring(1);
		try{ sint=Integer.parseInt(INT); }
		catch(final Exception e){ return 0;}
		return sint;
	}

	public static String lastWordIn(String thisStr)
	{
		final int x=thisStr.lastIndexOf(' ');
		if(x>=0)
			return thisStr.substring(x+1);
		return thisStr;
	}

	public static String removeColors(String s)
	{
		final StringBuffer str=new StringBuffer(s);
		int colorStart=-1;
		for(int i=0;i<str.length();i++)
		{
			switch(str.charAt(i))
			{
			case 'm':
				if(colorStart>=0)
				{
					str.delete(colorStart,i+1);
					colorStart=-1;
				}
				break;
			case (char)27: colorStart=i; break;
			case '^':
				if((i+1)<str.length())
				{
					final int tagStart=i;
					final char c=str.charAt(i+1);
					if((c=='<')||(c=='&'))
					{
						i+=2;
						while(i<(str.length()-1))
						{
							if(((c=='<')&&((str.charAt(i)!='^')||(str.charAt(i+1)!='>')))
							||((c=='&')&&(str.charAt(i)!=';')))
							{
								i++;
								if(i>=(str.length()-1))
								{
									i=tagStart;
									str.delete(i,i+2);
									i--;
									break;
								}
							}
							else
							{
								if(c=='<')
									str.delete(tagStart,i+2);
								else
									str.delete(tagStart,i+1);
								i=tagStart-1;
								break;
							}
						}
					}
					else
					{
						str.delete(i,i+2);
						i--;
					}
				}
				else
				{
					str.delete(i,i+2);
					i--;
				}
				break;
			}
		}
		return str.toString();
	}

	public static String returnTime(long millis, long ticks)
	{
		String avg="";
		if(ticks>0)
			avg=", Average="+(millis/ticks)+"ms";
		if(millis<1000) return millis+"ms"+avg;
		long seconds=millis/1000;
		millis-=(seconds*1000);
		if(seconds<60) return seconds+"s "+millis+"ms"+avg;
		long minutes=seconds/60;
		seconds-=(minutes*60);
		if(minutes<60) return minutes+"m "+seconds+"s "+millis+"ms"+avg;
		long hours=minutes/60;
		minutes-=(hours*60);
		if(hours<24) return hours+"h "+minutes+"m "+seconds+"s "+millis+"ms"+avg;
		final long days=hours/24;
		hours-=(days*24);
		return days+"d "+hours+"h "+minutes+"m "+seconds+"s "+millis+"ms"+avg;

	}

	public static Vector copyVector(Vector V)
	{
		final Vector V2=new Vector();
		for(int v=0;v<V.size();v++)
		{
			final Object h=V.elementAt(v);
			if(h instanceof Vector)
				V2.addElement(copyVector((Vector)h));
			else
				V2.addElement(h);
		}
		return V2;
	}

	public static int numBits(String s)
	{
		int i=0;
		int num=0;
		boolean in=false;
		char c=(char)0;
		char fc=(char)0;
		char lc=(char)0;
		s=s.trim();
		while(i<s.length())
		{
			c=s.charAt(i);
			boolean white=(Character.isWhitespace(c)||(c==' ')||(c=='	')||(c=='\t'));
			if(white&&in&&(((fc=='\'')&&(lc!='\''))||((fc=='`')&&(lc!='`'))))
				white=false;
			if(white&&in)
			{
				num++;
				c=(char)0;
				lc=(char)0;
				fc=(char)0;
				in=false;
			}
			else
			if(!white)
			{
				if(!in)
				{
					in=true;
					fc=c;
					lc=(char)0;
				}
				else
					lc=c;
			}
			i++;
		}
		if(in)
			return num+1;
		return num;
	}

	public static String cleanBit(String s)
	{
		while(s.startsWith(" "))
			s=s.substring(1);
		while(s.endsWith(" "))
			s=s.substring(0,s.length()-1);
		if((s.startsWith("'"))||(s.startsWith("`")))
		{
			s=s.substring(1);
			if((s.endsWith("'"))||(s.endsWith("`")))
				s=s.substring(0,s.length()-1);
		}
		return s;
	}
	public static String getCleanBit(String s, int which)
	{ return cleanBit(getBit(s,which));}

	public static String getPastBitClean(String s, int which)
	{ return cleanBit(getPastBit(s,which));}

	public static String getPastBit(String s, int which)
	{
		int i=0;
		int w=0;
		boolean in=false;
		s=s.trim();
		char c=(char)0;
		char lc=(char)0;
		char fc=(char)0;
		while(i<s.length())
		{
			c=s.charAt(i);
			boolean white=(Character.isWhitespace(c)||(c==' ')||(c=='	')||(c=='\t'));
			if(white&&in&&(((fc=='\'')&&(lc!='\''))||((fc=='`')&&(lc!='`'))))
				white=false;
			if(white&&in)
			{
				if(w==which)
				{
					s=s.substring(i+1);
					if(((s.trim().startsWith("'"))||(s.trim().startsWith("`")))
					&&((s.trim().startsWith("'"))||(s.trim().startsWith("`"))))
						s=s.trim().substring(1,s.length()-1);
					return s;
				}
				w++;
				in=false;
				c=(char)0;
				lc=(char)0;
				fc=(char)0;
			}
			else
			if(!white)
			{
				if(!in)
				{
					fc=c;
					lc=(char)0;
					in=true;
				}
				else
					lc=c;
			}
			i++;
		}
		return "";
	}

	public static String getBit(String s, int which)
	{
		int i=0;
		int w=0;
		boolean in=false;
		s=s.trim();
		String t="";
		char c=(char)0;
		char lc=(char)0;
		char fc=(char)0;
		while(i<s.length())
		{
			c=s.charAt(i);
			boolean white=(Character.isWhitespace(c)||(c==' ')||(c=='	')||(c=='\t'));
			if(white&&in&&(((fc=='\'')&&(lc!='\''))||((fc=='`')&&(lc!='`'))))
				white=false;
			if(white&&in)
			{
				if(w==which)
					return t;
				w++;
				in=false;
				c=(char)0;
				lc=(char)0;
				fc=(char)0;
			}
			else
			if(!white)
			{
				if(!in)
				{
					t="";
					fc=c;
					lc=(char)0;
					in=true;
				}
				else
					lc=c;
				t+=c;
			}
			i++;
		}
		if(in)
			return t;
		return "";
	}

	/**
	 * Returns the long value of a string without crashing
	  *
	 *

Usage: lSize = WebIQBase.s_long(WebIQBase.getRes(AttStatsRes,"BlobSize"));
	 * @param long String to convert
	 * @return long Long value of the string
	 */
	public static long s_long(String LONG)
	{
		long slong=0;
		try{ slong=Long.parseLong(LONG); }
		catch(final Exception e){ return 0;}
		return slong;
	}

	/**
	 * Returns the double value of a string without crashing
	  *
	 *

Usage: dSize = WebIQBase.s_double(WebIQBase.getRes(AttStatsRes,"BlobSize"));
	 * @param double String to convert
	 * @return double Double value of the string
	 */
	public static double s_double(String DOUBLE)
	{
		double sdouble=0;
		try{ sdouble=Double.parseDouble(DOUBLE); }
		catch(final Exception e){ return 0;}
		return sdouble;
	}

	public static String combine(Vector commands, int startAt, int endAt)
	{
		final StringBuffer Combined=new StringBuffer("");
		if(commands!=null)
		for(int commandIndex=startAt;commandIndex<endAt;commandIndex++)
			Combined.append((String)commands.elementAt(commandIndex)+" ");
		return Combined.toString().trim();
	}

	public static String combineWithQuotes(Vector commands, int startAt, int endAt)
	{
		final StringBuffer Combined=new StringBuffer("");
		if(commands!=null)
		for(int commandIndex=startAt;commandIndex<endAt;commandIndex++)
		{
			String s=(String)commands.elementAt(commandIndex);
			if(s.indexOf(' ')>=0) s="\""+s+"\"";
			Combined.append(s+" ");
		}
		return Combined.toString().trim();
	}

	public static String combineAfterIndexWithQuotes(Vector commands, String match)
	{
		final StringBuffer Combined=new StringBuffer("");
		if(commands!=null)
		for(int commandIndex=0;commandIndex<0;commandIndex++)
		{
			String s=(String)commands.elementAt(commandIndex);
			if(s.indexOf(' ')>=0) s="\""+s+"\"";
			Combined.append(s+" ");
		}
		return Combined.toString().trim();
	}

	public static String combineWithQuotes(Vector commands, int startAt)
	{
		final StringBuffer Combined=new StringBuffer("");
		if(commands!=null)
		for(int commandIndex=startAt;commandIndex<commands.size();commandIndex++)
		{
			String s=(String)commands.elementAt(commandIndex);
			if(s.indexOf(' ')>=0) s="\""+s+"\"";
			Combined.append(s+" ");
		}
		return Combined.toString().trim();
	}

	public static String combine(Vector commands, int startAt)
	{
		final StringBuffer Combined=new StringBuffer("");
		if(commands!=null)
		for(int commandIndex=startAt;commandIndex<commands.size();commandIndex++)
			Combined.append((String)commands.elementAt(commandIndex)+" ");
		return Combined.toString().trim();
	}

	public static Vector parse(String str)
	{    return parse(str,-1);    }

	public static Vector paramParse(String str)
	{
		final Vector commands=parse(str);
		for(int i=0;i<commands.size();i++)
		{
			final String s=(String)commands.elementAt(i);
			if(s.startsWith("=")&&(s.length()>1)&&(i>0))
			{
				final String prev=(String)commands.elementAt(i-1);
				commands.setElementAt(prev+s,i-1);
				commands.removeElementAt(i);
				i--;
			}
			else
			if(s.endsWith("=")&&(s.length()>1)&&(i<(commands.size()-1)))
			{
				final String next=(String)commands.elementAt(i+1);
				commands.setElementAt(s+next,i);
				commands.removeElementAt(i+1);
			}
			else
			if(s.equals("=")&&((i>0)&&(i<(commands.size()-1))))
			{
				final String prev=(String)commands.elementAt(i-1);
				final String next=(String)commands.elementAt(i+1);
				commands.setElementAt(prev+"="+next,i-1);
				commands.removeElementAt(i);
				commands.removeElementAt(i+1);
				i--;
			}
		}
		return commands;
	}

	public static Vector parse(String str, int upTo)
	{
		final Vector commands=new Vector();
		if(str==null) return commands;
		str=str.trim();
		while(!str.equals(""))
		{
			final int spaceIndex=str.indexOf(' ');
			final int strIndex=str.indexOf("\"");
			String CMD="";
			if((strIndex>=0)&&((strIndex<spaceIndex)||(spaceIndex<0)))
			{
				final int endStrIndex=str.indexOf("\"",strIndex+1);
				if(endStrIndex>strIndex)
				{
					CMD=str.substring(strIndex+1,endStrIndex).trim();
					str=str.substring(endStrIndex+1).trim();
				}
				else
				{
					CMD=str.substring(strIndex+1).trim();
					str="";
				}
			}
			else
			if(spaceIndex>=0)
			{
				CMD=str.substring(0,spaceIndex).trim();
				str=str.substring(spaceIndex+1).trim();
			}
			else
			{
				CMD=str.trim();
				str="";
			}
			if(!CMD.equals(""))
			{
				commands.addElement(CMD);
				if((upTo>=0)&&(commands.size()>=upTo))
				{
					if(str.length()>0)
						commands.addElement(str);
					break;
				}

			}
		}
		return commands;
	}

	public static String stripBadHTMLTags(String s)
	{
		final StringBuffer buf=new StringBuffer(s);
		final Vector quotes=new Vector();
		int i=-1;
		int start=-1;
		StringBuffer bit=null;
		String lastTag=null;
		while((++i)<buf.length())
		{
			switch(buf.charAt(i))
			{
			case '<':
				if(quotes.size()>0)
					break;
				bit=new StringBuffer("");
				lastTag=null;
				start=i;
				break;
			case '>':
				if(bit!=null) lastTag=bit.toString();
				if((quotes.size()==0)
				&&(start>=0)
				&&(i-start>0)
				&&(lastTag!=null)
				&&(lastTag.trim().equalsIgnoreCase("FONT")))
				{
					final int distance=(i-start)+1;
					buf.delete(start,i+1);
					i=i-distance;
				}
				bit=null;
				lastTag=null;
				start=-1;
				break;
			case ' ':
				if(bit!=null)
				{
					lastTag=bit.toString();
					bit=null;
				}
				break;
			case '"':
			case '\'':
				if(start<0) break;
				if((quotes.size()>0)&&(((Character)quotes.lastElement()).charValue()==buf.charAt(i)))
					quotes.removeElementAt(quotes.size()-1);
				else
					quotes.addElement(new Character(buf.charAt(i)));
				break;
			default:
				if(bit!=null) bit.append(buf.charAt(i));
				break;
			}
		}
		return buf.toString();
	}

	public static Vector parseCommas(String s, boolean ignoreNulls)
	{
		final Vector V=new Vector();
		if((s==null)||(s.length()==0)) return V;
		int x=s.indexOf(',');
		while(x>=0)
		{
			final String s2=s.substring(0,x).trim();
			s=s.substring(x+1).trim();
			if((!ignoreNulls)||(s2.length()>0))
				V.addElement(s2);
			x=s.indexOf(',');
		}
		if((!ignoreNulls)||(s.trim().length()>0))
			V.addElement(s.trim());
		return V;
	}

	public static Vector parsePipes(String s, boolean ignoreNulls)
	{
		final Vector V=new Vector();
		if((s==null)||(s.length()==0)) return V;
		int x=s.indexOf('|');
		while(x>=0)
		{
			final String s2=s.substring(0,x).trim();
			s=s.substring(x+1).trim();
			if((!ignoreNulls)||(s2.length()>0))
				V.addElement(s2);
			x=s.indexOf('|');
		}
		if((!ignoreNulls)||(s.trim().length()>0))
			V.addElement(s.trim());
		return V;
	}

	public static Vector parseSquiggles(String s)
	{
		final Vector V=new Vector();
		if((s==null)||(s.length()==0)) return V;
		int x=s.indexOf('~');
		while(x>=0)
		{
			final String s2=s.substring(0,x).trim();
			s=s.substring(x+1).trim();
			V.addElement(s2);
			x=s.indexOf('~');
		}
		return V;
	}

	public static Vector parseSentences(String s)
	{
		final Vector V=new Vector();
		if((s==null)||(s.length()==0)) return V;
		int x=s.indexOf('.');
		while(x>=0)
		{
			final String s2=s.substring(0,x+1);
			s=s.substring(x+1);
			V.addElement(s2);
			x=s.indexOf('.');
		}
		return V;
	}

	public static Vector parseSquiggleDelimited(String s, boolean ignoreNulls)
	{
		final Vector V=new Vector();
		if((s==null)||(s.length()==0)) return V;
		int x=s.indexOf('~');
		while(x>=0)
		{
			final String s2=s.substring(0,x).trim();
			s=s.substring(x+1).trim();
			if((s2.length()>0)||(!ignoreNulls))
				V.addElement(s2);
			x=s.indexOf('~');
		}
		if((s.length()>0)||(!ignoreNulls))
			V.addElement(s);
		return V;
	}

	public static Vector parseSemicolons(String s, boolean ignoreNulls)
	{
		final Vector V=new Vector();
		if((s==null)||(s.length()==0)) return V;
		int x=s.indexOf(';');
		while(x>=0)
		{
			final String s2=s.substring(0,x).trim();
			s=s.substring(x+1).trim();
			if((!ignoreNulls)||(s2.length()>0))
				V.addElement(s2);
			x=s.indexOf(';');
		}
		if((!ignoreNulls)||(s.trim().length()>0))
			V.addElement(s.trim());
		return V;
	}

	public static int abs(int val)
	{
		if(val>=0) return val;
		return val*-1;
	}

	public static long abs(long val)
	{
		if(val>=0) return val;
		return val*-1;
	}

	public static Vector parseSpaces(String s, boolean ignoreNulls)
	{
		final Vector V=new Vector();
		if((s==null)||(s.length()==0)) return V;
		int x=s.indexOf(' ');
		while(x>=0)
		{
			final String s2=s.substring(0,x).trim();
			s=s.substring(x+1).trim();
			if((!ignoreNulls)||(s2.length()>0))
				V.addElement(s2);
			x=s.indexOf(' ');
		}
		if((!ignoreNulls)||(s.trim().length()>0))
			V.addElement(s.trim());
		return V;
	}

	public static int lengthMinusColors(String thisStr)
	{
		int size=0;
		for(int i=0;i<thisStr.length();i++)
		{
			if(thisStr.charAt(i)=='^')
			{
				i++;
				if((i+1)<thisStr.length())
				{
					final int tagStart=i;
					final char c=thisStr.charAt(i);
					if((c=='<')||(c=='&'))
					while(i<(thisStr.length()-1))
					{
						if(((c=='<')&&((thisStr.charAt(i)!='^')||(thisStr.charAt(i+1)!='>')))
						||((c=='&')&&(thisStr.charAt(i)!=';')))
						{
							i++;
							if(i>=(thisStr.length()-1))
							{
								i=tagStart+1;
								break;
							}
						}
						else
						{
							i++;
							break;
						}
					}
				}
			}
			else
				size++;
		}
		return size;
	}

	/** Convert an integer to its Roman Numeral equivalent
	 *
	 *

Usage: Return=MiscFunc.convertToRoman(Number)+".";
	 * @param i Integer to convert
	 *
	 * @return String Converted integer
	 */
	public static String convertToRoman(int i)
	{
		String Roman="";
		final String Hundreds[]={"C","CC","CCC","CD","D","DC","DCC","DCCC","CM","P"};
		final String Tens[]={"X","XX","XXX","XL","L","LX","LXX","LXXX","XC","C"};
		final String Ones[]={"I","II","III","IV","V","VI","VII","VIII","IX","X"};
		if(i>1000)
		{
			Roman="Y";
			i=i%1000;
		}
		if(i>=100)
		{
			final int x=i%100;
			final int y=(i-x)/100;
			if(y>0)
				Roman+=Hundreds[y-1];
			i=x;
		}
		if(i>=10)
		{
			final int x=i%10;
			final int y=(i-x)/10;
			if(y>0)
				Roman+=Tens[y-1];
		}
		i=i%10;
		if(i>0)
			Roman+=Ones[i-1];
		return Roman;
	}

	public static String padLeft(String thisStr, int thisMuch)
	{
		final int lenMinusColors=lengthMinusColors(thisStr);
		if(lenMinusColors>thisMuch)
			return removeColors(thisStr).substring(0,thisMuch);
		return SPACES.substring(0,thisMuch-lenMinusColors)+thisStr;
	}
	public static String padLeft(String thisStr, String colorPrefix, int thisMuch)
	{
		final int lenMinusColors=lengthMinusColors(thisStr);
		if(lenMinusColors>thisMuch)
			return colorPrefix+removeColors(thisStr).substring(0,thisMuch);
		return SPACES.substring(0,thisMuch-lenMinusColors)+colorPrefix+thisStr;
	}
	public static String padRight(String thisStr, int thisMuch)
	{
		final int lenMinusColors=lengthMinusColors(thisStr);
		if(lenMinusColors>thisMuch)
			return removeColors(thisStr).substring(0,thisMuch);
		return thisStr+SPACES.substring(0,thisMuch-lenMinusColors);
	}
	public static String limit(String thisStr, int thisMuch)
	{
		final int lenMinusColors=lengthMinusColors(thisStr);
		if(lenMinusColors>thisMuch)
			return removeColors(thisStr).substring(0,thisMuch);
		return thisStr;
	}
	public static String padRight(String thisStr, String colorSuffix, int thisMuch)
	{
		final int lenMinusColors=lengthMinusColors(thisStr);
		if(lenMinusColors>thisMuch)
			return removeColors(thisStr).substring(0,thisMuch)+colorSuffix;
		return thisStr+colorSuffix+SPACES.substring(0,thisMuch-lenMinusColors);
	}
	public static String padRightPreserve(String thisStr, int thisMuch)
	{
		final int lenMinusColors=lengthMinusColors(thisStr);
		if(lenMinusColors>thisMuch)
			return removeColors(thisStr);
		return thisStr+SPACES.substring(0,thisMuch-lenMinusColors);
	}
	public static String centerPreserve(String thisStr, int thisMuch)
	{
		final int lenMinusColors=lengthMinusColors(thisStr);
		if(lenMinusColors>thisMuch)
			return removeColors(thisStr);
		final int left=(thisMuch-lenMinusColors)/2;
		final int right=((left+left+lenMinusColors)<thisMuch)?left+1:left;
		return SPACES.substring(0,left)+thisStr+SPACES.substring(0,right);
	}
	public static String padLeftPreserve(String thisStr, int thisMuch)
	{
		final int lenMinusColors=lengthMinusColors(thisStr);
		if(lenMinusColors>thisMuch)
			return removeColors(thisStr);
		return SPACES.substring(0,thisMuch-lenMinusColors)+thisStr;
	}

	public static boolean isNumber(String s)
	{
		if(s==null) return false;
		s=s.trim();
		if(s.length()==0) return false;
		if((s.length()>1)&&(s.startsWith("-")))
			s=s.substring(1);
		for(int i=0;i<s.length();i++)
			if("0123456789.,".indexOf(s.charAt(i))<0)
				return false;
		return true;
	}

	public static double div(double a, double b)
	{
		return a/b;
	}
	public static double div(double a, int b)
	{
		return a/b;
	}
	public static double div(int a, double b)
	{
		return (a)/b;
	}
	public static double div(double a, long b)
	{
		return a/b;
	}
	public static double div(long a, double b)
	{
		return (a)/b;
	}

	public static double mul(double a, double b)
	{
		return a*b;
	}
	public static double mul(double a, int b)
	{
		return a*(b);
	}
	public static double mul(int a, double b)
	{
		return (a)*b;
	}
	public static double mul(double a, long b)
	{
		return a*(b);
	}
	public static double mul(long a, double b)
	{
		return (a)*b;
	}
	public static long mul(long a, long b)
	{
		return a*b;
	}
	public static int mul(int a, int b)
	{
		return a*b;
	}
	public static double div(long a, long b)
	{
		return ((double)a)/((double)b);
	}
	public static double div(int a, int b)
	{
		return ((double)a)/((double)b);
	}
	public static int pow(int x, int y)
	{
		return (int)Math.round(Math.pow(x,y));
	}
	public static int squared(int x)
	{
		return (int)Math.round(Math.pow(x,x));
	}
	public static boolean bset(int num, int bitmask)
	{
		return ((num&bitmask)==bitmask);
	}
	public static boolean bset(long num, long bitmask)
	{
		return ((num&bitmask)==bitmask);
	}
	public static boolean bset(long num, int bitmask)
	{
		return ((num&bitmask)==bitmask);
	}
	public static int setb(int num, int bitmask)
	{
		return num|bitmask;
	}
	public static boolean banyset(int num, int bitmask)
	{
		return ((num&bitmask)>0);
	}
	public static boolean banyset(long num, long bitmask)
	{
		return ((num&bitmask)>0);
	}
	public static boolean banyset(long num, int bitmask)
	{
		return ((num&bitmask)>0);
	}
	public static long setb(long num, int bitmask)
	{
		return num|bitmask;
	}
	public static long setb(long num, long bitmask)
	{
		return num|bitmask;
	}
	public static int unsetb(int num, int bitmask)
	{
		if(bset(num,bitmask))
			num-=bitmask;
		return num;
	}
	public static long unsetb(long num, long bitmask)
	{
		if(bset(num,bitmask))
			num-=bitmask;
		return num;
	}
	public static long unsetb(long num, int bitmask)
	{
		if(bset(num,bitmask))
			num-=bitmask;
		return num;
	}
	public static boolean isSet(int number, int bitnumber)
	{
		if((number&(pow(2,bitnumber)))==(pow(2,bitnumber)))
			return true;
		return false;
	}
	public static boolean isSet(long number, int bitnumber)
	{
		if((number&(pow(2,bitnumber)))==(pow(2,bitnumber)))
			return true;
		return false;
	}

	public static String sameCase(String str, char c)
	{
		if(Character.isUpperCase(c))
			return str.toUpperCase();
		return str.toLowerCase();
	}

	public static Vector denumerate(Enumeration e)
	{
		final Vector V=new Vector();
		for(;e.hasMoreElements();)
			V.addElement(e.nextElement());
		return V;
	}
}


text:
"""
Holds package_subscriptions table model.
"""

__author__ = 'Jonny Lamb'
__copyright__ = 'Copyright © 2008 Jonny Lamb'
__license__ = 'MIT'

import sqlalchemy as sa
from sqlalchemy import orm

from debexpo.model import meta, OrmObject
from debexpo.model.users import User

t_package_subscriptions = sa.Table('package_subscriptions', meta.metadata,
    sa.Column('id', sa.types.Integer, primary_key=True),
    sa.Column('user_id', sa.types.Integer, sa.ForeignKey('users.id')),
    sa.Column('package', sa.types.String(200), nullable=False),
    sa.Column('level', sa.types.Integer, nullable=False),
    )

class PackageSubscription(OrmObject):
    foreign = ['user']

orm.mapper(PackageSubscription, t_package_subscriptions, properties={
    'user' : orm.relation(User, backref='package_subscriptions')
})


text:
package msdns

func (client *msdnsProvider) ListZones() ([]string, error) {
	zones, err := client.shell.GetDNSServerZoneAll(client.dnsserver)
	if err != nil {
		return nil, err
	}
	return zones, err
}


text:
require 'ffaker/lorem'

module FFaker
  # Thanks to http://baconipsum.com/
  module BaconIpsum
    include Lorem

    extend ModuleUtils
    extend self

    def word
      fetch_sample(BACON_WORDS)
    end

    def words(num = 3)
      fetch_sample(BACON_WORDS, count: num)
    end
  end
end


text:
using System;
using System.IO;

namespace SlxFileBrowser.FileSystem
{
    public class DiskDriveInfo : IDriveInfo
    {
        private readonly DriveInfo _driveInfo;
        private IDirectoryInfo _rootDirectory;

        public DiskDriveInfo(DriveInfo driveInfo)
        {
            _driveInfo = driveInfo;
        }

        public override string ToString()
        {
            return Name;
        }

        #region IDriveInfo Members

        public string Name
        {
            get { return _driveInfo.Name; }
        }

        public IDirectoryInfo RootDirectory
        {
            get { return _rootDirectory ?? (_rootDirectory = new DiskDirectoryInfo(this, _driveInfo.RootDirectory)); }
        }

        public IFileInfo GetFileInfo(string path)
        {
            path = Environment.ExpandEnvironmentVariables(path);
            try
            {
                return new DiskFileInfo(this, new FileInfo(path));
            }
            catch (PathTooLongException ex)
            {
                ex.Data["path"] = path;
                throw;
            }
        }

        public IDirectoryInfo GetDirectoryInfo(string path)
        {
            path = Environment.ExpandEnvironmentVariables(path);
            return new DiskDirectoryInfo(this, new DirectoryInfo(path));
        }

        #endregion
    }
}


text:
An EDDN listener, storing data into a postgresql database.

# Notes
If the relay is not receiving, and thus not sending, any data for a
while then you may see messages like:

2017-07-11 11:21:55.666 - eddnlistener - ERROR - eddnlistener.main: ZMQSocketException: Resource temporarily unavailable
2017-07-11 11:21:55.666 - eddnlistener - WARNING - eddnlistener.main: Disconnect from tcp://eddn.edcd.io:9500
2017-07-11 11:22:00.672 - eddnlistener - INFO - eddnlistener.main: Connect to tcp://eddn.edcd.io:9500

The frequency of these will be as per __timeoutEDDN.

The most common cause of this is the game servers being down for a
patch.


text:
package snippets

import (
	"fmt"
	"io"
	"io/ioutil"
	"strings"

	// [START imports]
	"context"

	speech "cloud.google.com/go/speech/apiv1"
	"cloud.google.com/go/speech/apiv1/speechpb"
	// [END imports]
)

// [START speech_transcribe_auto_punctuation]

func autoPunctuation(w io.Writer, path string) error {
	ctx := context.Background()

	client, err := speech.NewClient(ctx)
	if err != nil {
		return fmt.Errorf("NewClient: %v", err)
	}
	defer client.Close()

	// path = "../testdata/commercial_mono.wav"
	data, err := ioutil.ReadFile(path)
	if err != nil {
		return fmt.Errorf("ReadFile: %v", err)
	}

	resp, err := client.Recognize(ctx, &speechpb.RecognizeRequest{
		Config: &speechpb.RecognitionConfig{
			Encoding:        speechpb.RecognitionConfig_LINEAR16,
			SampleRateHertz: 8000,
			LanguageCode:    "en-US",
			// Enable automatic punctuation.
			EnableAutomaticPunctuation: true,
		},
		Audio: &speechpb.RecognitionAudio{
			AudioSource: &speechpb.RecognitionAudio_Content{Content: data},
		},
	})
	if err != nil {
		return fmt.Errorf("Recognize: %v", err)
	}

	for i, result := range resp.Results {
		fmt.Fprintf(w, "%s\n", strings.Repeat("-", 20))
		fmt.Fprintf(w, "Result %d\n", i+1)
		for j, alternative := range result.Alternatives {
			fmt.Fprintf(w, "Alternative %d: %s\n", j+1, alternative.Transcript)
		}
	}
	return nil
}

// [END speech_transcribe_auto_punctuation]


text:
package io.opentelemetry.opentracingshim;

import io.opentelemetry.context.Context;
import io.opentelemetry.context.propagation.TextMapGetter;
import io.opentelemetry.context.propagation.TextMapPropagator;
import io.opentelemetry.context.propagation.TextMapSetter;
import java.util.Collection;
import java.util.Collections;
import javax.annotation.Nullable;

class CustomTextMapPropagator implements TextMapPropagator {
  private boolean extracted;
  private boolean injected;

  @Override
  public Collection<String> fields() {
    return Collections.emptyList();
  }

  @Override
  public <C> void inject(Context context, @Nullable C carrier, TextMapSetter<C> setter) {
    injected = true;
  }

  @Override
  public <C> Context extract(Context context, @Nullable C carrier, TextMapGetter<C> getter) {
    extracted = true;
    return context;
  }

  public boolean isExtracted() {
    return extracted;
  }

  public boolean isInjected() {
    return injected;
  }
}


text:
Psalm supports the ability to check various PHPish files by extending the `FileChecker` class. For example, if you have a template where the variables are set elsewhere, Psalm can scrape those variables and check the template with those variables pre-populated.

An example TemplateChecker is provided [here](https://github.com/vimeo/psalm/blob/master/examples/TemplateChecker.php).

## Using `psalm.xml`

To ensure your custom `FileChecker` is used, you must update the Psalm `fileExtensions` config in psalm.xml:
```xml
<fileExtensions>
    <extension name=".php" />
    <extension name=".phpt" checker="path/to/TemplateChecker.php" />
</fileExtensions>
```

## Using custom plugin

Plugins can register their own custom scanner  and analyzer implementations for particular file extensions.

```php
<?php
namespace Psalm\Example;

use Psalm\Plugin\PluginEntryPointInterface;
use Psalm\Plugin\PluginFileExtensionsInterface;
use Psalm\Plugin\FileExtensionsInterface;
use Psalm\Plugin\RegistrationInterface;

class CustomPlugin implements PluginEntryPointInterface, PluginFileExtensionsInterface
{
    public function __invoke(RegistrationInterface $registration, ?\SimpleXMLElement $config = null): void
    {
        // ... regular plugin processes, stub registration, hook registration
    }

    public function processFileExtensions(FileExtensionsInterface $fileExtensions, ?SimpleXMLElement $config = null): void
    {
        $fileExtensions->addFileTypeScanner('phpt', TemplateScanner::class);
        $fileExtensions->addFileTypeAnalyzer('phpt', TemplateAnalyzer::class);
    }
}
```


text:
<?php

/**
 * This page serves as a dummy login page.
 *
 * Note that we don't actually validate the user in this example. This page
 * just serves to make the example work out of the box.
 *
 * @package simpleSAMLphp
 * @version $Id$
 */

if (!isset($_REQUEST['ReturnTo'])) {
	die('Missing ReturnTo parameter.');
}

$returnTo = $_REQUEST['ReturnTo'];

/*
 * The following piece of code would never be found in a real authentication page. Its
 * purpose in this example is to make this example safer in the case where the
 * administrator of * the IdP leaves the exampleauth-module enabled in a production
 * environment.
 *
 * What we do here is to extract the $state-array identifier, and check that it belongs to
 * the exampleauth:External process.
 */

if (!preg_match('@State=(.*)@', $returnTo, $matches)) {
	die('Invalid ReturnTo URL for this example.');
}
$stateId = urldecode($matches[1]);
SimpleSAML_Auth_State::loadState($stateId, 'exampleauth:External');

/*
 * The loadState-function will not return if the second parameter does not
 * match the parameter passed to saveState, so by now we know that we arrived here
 * through the exampleauth:External authentication page.
 */

/*
 * Our list of users.
 */
$users = array(
	'student' => array(
		'password' => 'student',
		'uid' => 'student',
		'name' => 'Student Name',
		'mail' => 'somestudent@example.org',
		'type' => 'student',
	),
	'admin' => array(
		'password' => 'admin',
		'uid' => 'admin',
		'name' => 'Admin Name',
		'mail' => 'someadmin@example.org',
		'type' => 'employee',
	),
);

/*
 * Time to handle login responses.
 * Since this is a dummy example, we accept any data.
 */

$badUserPass = FALSE;
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
	$username = (string)$_REQUEST['username'];
	$password = (string)$_REQUEST['password'];

	if (!isset($users[$username]) || $users[$username]['password'] !== $password) {
		$badUserPass = TRUE;
	} else {

		$user = $users[$username];

		if (!session_id()) {
			/* session_start not called before. Do it here. */
			session_start();
		}

		$_SESSION['uid'] = $user['uid'];
		$_SESSION['name'] = $user['name'];
		$_SESSION['mail'] = $user['mail'];
		$_SESSION['type'] = $user['type'];

		header('Location: ' . $returnTo);
		exit();
	}
}

/*
 * If we get this far, we need to show the login page to the user.
 */
?><!DOCTYPE html>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>exampleauth login page</title>

exampleauth login page

In this example you can log in with two accounts: student and admin. In both cases, the password is the same as the username.

<?php if ($badUserPass) { ?>

Bad username or password.

<?php } ?>
<form method="post" action="?">

Username:
<input type="text" name="username">

Password:
<input type="text" name="password">

<input type="hidden" name="ReturnTo" value="<?php echo htmlspecialchars($returnTo); ?>">

<input type="submit" value="Log in">

</form>


text:
package com.tevinjeffrey.vapor.ui.base;

public interface View {
    enum LayoutType {
        EMPTY, ERROR, LIST, LOADING
    }
}


text:
// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

#include "CoreMinimal.h"
#include "GameFramework/NavMovementComponent.h"
#include "TankMovementComponent.generated.h"

class UTankTrack;

/**
 * Responsible for driving the tank tracks
 */
UCLASS(ClassGroup = (Setup), meta = (BlueprintSpawnableComponent))
class BATTLETANKPROJECT_API UTankMovementComponent : public UNavMovementComponent
{
	GENERATED_BODY()

public:

	UFUNCTION(BlueprintCallable, Category = "Setup")
	void Initialise(UTankTrack* LeftTrackToSet, UTankTrack* RightTrackToSet);

	UFUNCTION(BlueprintCallable, Category = "Input")
	void IntendMoveForward(float Throw);

	UFUNCTION(BlueprintCallable, Category = "Input")
	void IntendTurnRight(float Throw);

private:
	// Called from the pathfinding logic by yhe AI Controllers
	virtual void RequestDirectMove(const FVector& MoveVelocity, bool bForceMaxSpeed) override;

	UTankTrack* LeftTrack = nullptr;
	UTankTrack* RightTrack = nullptr;

};


text:
package org.apache.lucene.geo3d;

/**
 * Base extended shape object.
 *
 * @lucene.internal
 */
public abstract class GeoBaseShape extends BasePlanetObject implements GeoShape {

  /** Constructor.
   *@param planetModel is the planet model to use.
   */
  public GeoBaseShape(final PlanetModel planetModel) {
    super(planetModel);
  }

  @Override
  public Bounds getBounds(Bounds bounds) {
    if (bounds == null)
      bounds = new Bounds();
    if (isWithin(planetModel.NORTH_POLE)) {
      bounds.noTopLatitudeBound().noLongitudeBound();
    }
    if (isWithin(planetModel.SOUTH_POLE)) {
      bounds.noBottomLatitudeBound().noLongitudeBound();
    }
    return bounds;
  }

}


text:
define(function(require, exports, module) {
	// author:
	// 		aaron.xiao<admin@veryos.com>
	var ajax = require("jquery").ajax;
	exports.load = function(url, req, cb) {
		return ajax({
			url: req.toUrl(url),
			type: "GET",
			dataType: "text"
		}).then(cb)
	}
});


text:
using System;
using System.Collections.Generic;
using System.Net.Http.Headers;
using Plugin.GoogleAnalytics.Abstractions;
using Plugin.GoogleAnalytics.Abstractions.Model;
#if ANDROID
using Android.Runtime;
#endif

#if __IOS__ || __MACOS__
using Foundation;
#endif

namespace Plugin.GoogleAnalytics
{
#if !WINDOWS_UWP
    [Preserve(AllMembers = true)]
#endif
    public sealed class Tracker : ITracker
    {
        private readonly PayloadFactory engine;
        private readonly TokenBucket hitTokenBucket;
        private readonly IPlatformInfoProvider platformInfoProvider;
        private readonly IServiceManager serviceManager;
        private bool endSession;
        private bool startSession;

        public Tracker(string propertyId, IPlatformInfoProvider platformInfoProvider, IServiceManager serviceManager)
        {
            this.serviceManager = serviceManager;

            if(string.IsNullOrEmpty(serviceManager.UserAgent))
            {
                serviceManager.UserAgent = platformInfoProvider.UserAgent;
            }

            this.platformInfoProvider = platformInfoProvider;

            engine = new PayloadFactory
            {
                PropertyId = propertyId,
                AnonymousClientId = platformInfoProvider.AnonymousClientId,
                ScreenColorDepthBits = platformInfoProvider.ScreenColorDepthBits,
                ScreenResolution = platformInfoProvider.ScreenResolution,
                UserAgentOverride = platformInfoProvider.UserAgent,
                UserLanguage = platformInfoProvider.UserLanguage,
                ViewportSize = platformInfoProvider.ViewPortResolution,
                //DocumentEncoding = platformInfoProvider.DocumentEncoding,
            };

            SampleRate = 100.0F;
            hitTokenBucket = new TokenBucket(60, .5);
        }

        public string TrackingId
        {
            get { return engine.PropertyId; }
        }

        public bool IsAnonymizeIpEnabled
        {
            get { return engine.AnonymizeIP; }
            set { engine.AnonymizeIP = value; }
        }

        public string AppName
        {
            get { return engine.AppName; }
            set { engine.AppName = value; }
        }

        public string AppVersion
        {
            get { return engine.AppVersion; }
            set { engine.AppVersion = value; }
        }

        public string AppId
        {
            get { return engine.AppId; }
            set { engine.AppId = value; }
        }

        public string AppInstallerId
        {
            get { return engine.AppInstallerId; }
            set { engine.AppInstallerId = value; }
        }

        public Dimensions AppScreen
        {
            get { return engine.ViewportSize; }
            set { engine.ViewportSize = value; }
        }

        public string CampaignName
        {
            get { return engine.CampaignName; }
            set { engine.CampaignName = value; }
        }

        public string CampaignSource
        {
            get { return engine.CampaignSource; }
            set { engine.CampaignSource = value; }
        }

        public string CampaignMedium
        {
            get { return engine.CampaignMedium; }
            set { engine.CampaignMedium = value; }
        }

        public string CampaignKeyword
        {
            get { return engine.CampaignKeyword; }
            set { engine.CampaignKeyword = value; }
        }

        public string CampaignContent
        {
            get { return engine.CampaignContent; }
            set { engine.CampaignContent = value; }
        }

        public string CampaignId
        {
            get { return engine.CampaignId; }
            set { engine.CampaignId = value; }
        }

        public string Referrer
        {
            get { return engine.Referrer; }
            set { engine.Referrer = value; }
        }

        public string DocumentEncoding
        {
            get { return engine.DocumentEncoding; }
            set { engine.DocumentEncoding = value; }
        }

        public string GoogleAdWordsId
        {
            get { return engine.GoogleAdWordsId; }
            set { engine.GoogleAdWordsId = value; }
        }

        public string GoogleDisplayAdsId
        {
            get { return engine.GoogleDisplayAdsId; }
            set { engine.GoogleDisplayAdsId = value; }
        }

        public string IpOverride
        {
            get { return engine.IpOverride; }
            set { engine.IpOverride = value; }
        }

        public string UserAgentOverride
        {
            get { return engine.UserAgentOverride; }
            set { engine.UserAgentOverride = value; }
        }

        public string DocumentLocationUrl
        {
            get { return engine.DocumentLocationUrl; }
            set { engine.DocumentLocationUrl = value; }
        }

        public string DocumentHostName
        {
            get { return engine.DocumentHostName; }
            set { engine.DocumentHostName = value; }
        }

        public string DocumentPath
        {
            get { return engine.DocumentPath; }
            set { engine.DocumentPath = value; }
        }

        public string DocumentTitle
        {
            get { return engine.DocumentTitle; }
            set { engine.DocumentTitle = value; }
        }

        public string LinkId
        {
            get { return engine.LinkId; }
            set { engine.LinkId = value; }
        }

        public string ExperimentId
        {
            get { return engine.ExperimentId; }
            set { engine.ExperimentId = value; }
        }

        public string ExperimentVariant
        {
            get { return engine.ExperimentVariant; }
            set { engine.ExperimentVariant = value; }
        }

        /// <summary>
        ///     Optional. Indicates the data source of the hit. Hits sent from analytics.js will have data source set to 'web';
        ///     hits sent from one of the mobile SDKs will have data source set to 'app'.
        /// </summary>
        public string DataSource
        {
            get { return engine.DataSource; }
            set { engine.DataSource = value; }
        }

        /// <summary>
        ///     Optional. This is intended to be a known identifier for a user provided by the site owner/tracking library user. It
        ///     may not itself be PII (personally identifiable information). The value should never be persisted in GA cookies or
        ///     other Analytics provided storage.
        /// </summary>
        public string UserId
        {
            get { return engine.UserId; }
            set { engine.UserId = value; }
        }

        /// <summary>
        ///     Optional. The geographical location of the user. The geographical ID should be a two letter country code or a
        ///     criteria ID representing a city or region (see
        ///     http://developers.google.com/analytics/devguides/collection/protocol/v1/geoid). This parameter takes precedent over
        ///     any location derived from IP address, including the IP Override parameter. An invalid code will result in
        ///     geographical dimensions to be set to '(not set)'.
        /// </summary>
        public string GeographicalId
        {
            get { return engine.GeographicalId; }
            set { engine.GeographicalId = value; }
        }

        public float SampleRate { get; set; }
        public bool IsUseSecure { get; set; }
        public bool IsDebug { get; set; }
        public bool ThrottlingEnabled { get; set; }

        private SessionControl SessionControl
        {
            get
            {
                if(endSession)
                {
                    endSession = false;
                    return SessionControl.End;
                }
                if(startSession)
                {
                    startSession = false;
                    return SessionControl.Start;
                }
                return SessionControl.None;
            }
        }

        public void SetCustomDimension(int index, string value)
        {
            engine.CustomDimensions[index] = value;
        }

        public void SetCustomMetric(int index, long value)
        {
            engine.CustomMetrics[index] = value;
        }

        private void platformTrackingInfo_ViewPortResolutionChanged(object sender, EventArgs args)
        {
            engine.ViewportSize = platformInfoProvider.ViewPortResolution;
        }

        private void platformTrackingInfo_ScreenResolutionChanged(object sender, EventArgs args)

        {
            engine.ScreenResolution = platformInfoProvider.ScreenResolution;
        }

        public void SendView(string screenName)
        {
            platformInfoProvider.OnTracking(); // give platform info provider a chance to refresh.
            var payload = engine.TrackView(screenName, SessionControl);
            SendPayload(payload);
        }

        public void SendException(string description, bool isFatal)
        {
            platformInfoProvider.OnTracking(); // give platform info provider a chance to refresh.
            var payload = engine.TrackException(description, isFatal, SessionControl);
            SendPayload(payload);
        }

        public void SendException(Exception exception, bool isFatal)
        {
            if(exception is AggregateException aggregateException)
            {
                foreach(var item in aggregateException.InnerExceptions)
                {
                    SendException(item, isFatal);
                }
            }
            else
            {
                SendException("Exception: " + GetExceptionMessage(exception), isFatal);
            }

        }

        private string GetInnerMessage(Exception exception, int depth = 0)
        {
            return GetExceptionMessage(exception);
        }

        private string GetExceptionMessage(Exception exception)
        {
            string exceptionMessage = Environment.NewLine + "  Message: " + exception.Message + "; ";

            if (!string.IsNullOrEmpty(exception.StackTrace))
            {
                exceptionMessage += Environment.NewLine + "  StackTrace: " + exception.StackTrace + "; ";
            }

            if (!string.IsNullOrEmpty(exception.Source))
            {
                exceptionMessage += Environment.NewLine + "  Source: " + exception.Source + "; ";
            }

            if (exception.InnerException != null)
            {
                exceptionMessage += Environment.NewLine + "  InnerException: " + GetInnerMessage(exception.InnerException) + "; ";
            }

            return exceptionMessage;
        }

        public void SendSocial(string network, string action, string target)
        {
            platformInfoProvider.OnTracking(); // give platform info provider a chance to refresh.
            var payload = engine.TrackSocialInteraction(network, action, target, SessionControl);
            SendPayload(payload);
        }

        public void SendTiming(TimeSpan time, string category, string variable, string label)
        {
            platformInfoProvider.OnTracking(); // give platform info provider a chance to refresh.
            var payload = engine.TrackUserTiming(category, variable, time, label, null, null, null, null, null, null, SessionControl);
            SendPayload(payload);
        }

        public void SendEvent(string category, string action, string label, long value)
        {
            platformInfoProvider.OnTracking(); // give platform info provider a chance to refresh.
            var payload = engine.TrackEvent(category, action, label, value, SessionControl);
            SendPayload(payload);
        }

        public void SendEvent(string category, string action, string label, int value)
        {
            platformInfoProvider.OnTracking(); // give platform info provider a chance to refresh.
            var payload = engine.TrackEvent(category, action, label, value, SessionControl);
            SendPayload(payload);
        }

        public void SendEvent(string category, string action, string label)
        {
            platformInfoProvider.OnTracking(); // give platform info provider a chance to refresh.
            var payload = engine.TrackEvent(category, action, label, null, SessionControl);
            SendPayload(payload);
        }

        public void SendEvent(string category, string action)
        {
            platformInfoProvider.OnTracking(); // give platform info provider a chance to refresh.
            var payload = engine.TrackEvent(category, action, string.Empty, null, SessionControl);
            SendPayload(payload);
        }

        public void SendTransaction(Transaction transaction)
        {
            platformInfoProvider.OnTracking(); // give platform info provider a chance to refresh.
            foreach(var payload in TrackTransaction(transaction, SessionControl))
            {
                SendPayload(payload);
            }
        }

        public void SendTransactionItem(TransactionItem transactionItem)
        {
            platformInfoProvider.OnTracking(); // give platform info provider a chance to refresh.
            var payload = engine.TrackTransactionItem(transactionItem.TransactionId, transactionItem.Name, (double)transactionItem.PriceInMicros/1000000, transactionItem.Quantity,
                transactionItem.SKU, transactionItem.Category, transactionItem.CurrencyCode, SessionControl);
            SendPayload(payload);
        }

        private IEnumerable<Payload> TrackTransaction(Transaction transaction, SessionControl sessionControl = SessionControl.None, bool isNonInteractive = false)
        {
            yield return
                engine.TrackTransaction(transaction.TransactionId, transaction.Affiliation, (double)transaction.TotalCostInMicros/1000000,
                    (double)transaction.ShippingCostInMicros/1000000, (double)transaction.TotalTaxInMicros/1000000, transaction.CurrencyCode, sessionControl,
                    isNonInteractive);

            foreach(var item in transaction.Items)
            {
                yield return
                    engine.TrackTransactionItem(transaction.TransactionId, item.Name, (double)item.PriceInMicros/1000000, item.Quantity, item.SKU, item.Category,
                        transaction.CurrencyCode, sessionControl, isNonInteractive);
            }
        }

        public void SetStartSession(bool value)
        {
            startSession = value;
        }

        public void SetEndSession(bool value)
        {
            endSession = value;
        }

        private void SendPayload(Payload payload)
        {
            if(string.IsNullOrEmpty(TrackingId))
            {
                System.Diagnostics.Debug.WriteLine("Error: TrackingId not set.");
                return;
            }

            if(!IsSampledOut())
            {
                if(!ThrottlingEnabled || hitTokenBucket.Consume())
                {
                    payload.IsUseSecure = IsUseSecure;
                    payload.IsDebug = IsDebug;
                    serviceManager.SendPayload(payload);
                }
            }
        }

        private bool IsSampledOut()
        {
            if(SampleRate <= 0.0F)
            {
                return true;
            }
            if(SampleRate < 100.0F)
            {
                var clientId = platformInfoProvider.AnonymousClientId;
                return ((clientId != null) && (Math.Abs(clientId.GetHashCode())%10000 >= SampleRate*100.0F));
            }
            return false;
        }
    }
}


text:
From https://www.npmjs.com/package/restana:

> Blazing fast, tiny and minimalist connect-like web framework for building REST micro-services.

### Test Type Implementation Source Code

* [JSON](app.js)
* [PLAINTEXT](app.js)

## Important Libraries
The tests were run with:
* [restana](https://www.npmjs.com/package/restana)
* [NodeJS](https://nodejs.org/en/)

## Test URLs
### JSON

http://localhost:8080/json

### PLAINTEXT

http://localhost:8080/plaintext


text:
package main

import (
	"fmt"
	"io/ioutil"
	_ "time"
	certcenter "certcenter.com/go"
)

// Set your valid OAuth2 Bearer
// (see https://developers.certcenter.com/docs/authentication)

func init() {
	certcenter.Bearer = "AValidToken.oauth2.certcenter.com"
}

func main() {

	// Order a certificate
	csr, _ := ioutil.ReadFile("csr")
	res, _ := certcenter.Order(&certcenter.OrderRequest{
			OrderParameters: &certcenter.OrderParameters{
				ProductCode: "Comodo.InstantSSL",
				CSR: string(csr),
				ValidityPeriod: 24,
				ServerCount: 1,
				DomainApprovers: &certcenter.DomainApprovers{
					DomainApprover: []certcenter.DomainApproverItem{certcenter.DomainApproverItem{
						Domain: "certcenter.com",
						Approvers: []certcenter.Approver{certcenter.Approver{
							ApproverEmail: "domains@certcenter.com",
						}},
					}},
				},
			},
			OrganizationInfo: &certcenter.OrganizationInfo{
				OrganizationName: "CertCenter AG",
				OrganizationAddress: &certcenter.OrganizationAddress{
					AddressLine1: "Bleichstraße 8a",
					PostalCode: "35390",
					City: "Gießen",
					Region: "Hessen",
					Country: "DE",
					Phone: "+49 641 80899520",
					Fax: "+49 641 80899521",
				},
			},
			AdminContact: &certcenter.Contact{
				FirstName: "John",
				LastName: "Doe",
				Title: "CTO",
				Phone: "+49 641 80899520",
				Fax: "+49 641 80899521",
				Email: "john.doe@example.com",
				OrganizationName: "CertCenter AG",
				OrganizationAddress: &certcenter.OrganizationAddress{
					AddressLine1: "Bleichstraße 8a",
					PostalCode: "35390",
					City: "Gießen",
					Region: "Hessen",
					Country: "DE",
					Phone: "+49 641 80899520",
					Fax: "+49 641 80899521",
				},
			},
			TechContact: &certcenter.Contact{
				FirstName: "John",
				LastName: "Doe",
				Title: "CTO",
				Phone: "+49 641 80899520",
				Fax: "+49 641 80899521",
				Email: "john.doe@example.com",
				OrganizationName: "CertCenter AG",
				OrganizationAddress: &certcenter.OrganizationAddress{
					AddressLine1: "Bleichstraße 8a",
					PostalCode: "35390",
					City: "Gießen",
					Region: "Hessen",
					Country: "DE",
					Phone: "+49 641 80899520",
					Fax: "+49 641 80899521",
				},
			},
		},
	)
	fmt.Println(res)
	return
}


text:
package org.gitter.fwc.endpoints;

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

import org.gitter.fwc.exception.FwcServiceException;
import org.gitter.fwc.services.InstitutionRestController;
import org.gitter.fwc.services.InstitutionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/institution")
public class InstitutionRestControllerImpl implements InstitutionRestController {

	@Autowired
	private InstitutionService service;

	@Override
	@RequestMapping(value = "/{keyword}", method = RequestMethod.GET)
	public @ResponseBody List<Map<String, String>> findInstitutions(
			@PathVariable("keyword") String keyword) throws FwcServiceException {
		return service.findByKeyword(keyword);
	}
}


text:
import { expect } from 'chai';
import sinon from 'sinon';
import proxyquire from 'proxyquire';

require('../../../../imports/helpers/date');

class MeteorError {}
let Meteor = {
    call: sinon.stub(),
    Error: MeteorError
};

let MeetingSeriesSchema = {};

let GlobalSettings = {};

const {
        MigrateV8
    } = proxyquire('../../../../server/migrations/migrate_v8', {
        'meteor/meteor': { Meteor, '@noCallThru': true},
        '/imports/collections/meetingseries.schema': { MeetingSeriesSchema, '@noCallThru': true},
        '/imports/config/GlobalSettings': { GlobalSettings, '@noCallThru': true}
    });


text:
/**
 * Navigation.
 */

.nav-sticky {
  min-height: 60px;
  background-color: var(--color-grey_lighter);
}

.navbar-container {
  padding: 10px 0;
}

.navbar-floating {
  position: fixed;
  z-index: 200;
  top: 0;
  left: 0;
  right: 0;
  background-color: var(--color-blue_base);
  transition: background-color var(--duration_fast) var(--easing_smooth);
}

.navbar-container.navbar-floating {
  background-color: var(--color-blue_base);
}

.navbar {
  margin-top: 16px;
  padding: 0;
}

.navbar li {
  display: inline;
  margin-top: 0;
}

.navbar-item {
  margin-right: 15px;
  color: var(--color-blue_light);
  font-size: var(--fontSize_base);
  font-weight: var(--fontWeight_light);
  line-height: 4px;
  text-decoration: none;
  float: left;
}

.navbar-item:hover {
  color: var(--color-blue_base);
}

.navbar-item_right {
  float: right;
}

.navbar-floating .navbar-item {
  color: var(--color-white);
}

.navbar-item_active {
  font-weight: var(--fontWeight_bold);
  opacity: 1;
}

.navbar-logo {
  display: block;
  float: left;
  margin-right: 25px;
  margin-top: 2px;
}

.logo-full {
  display: inherit;
}

.logo-small {
  display: none;
}

@media screen and (max-width: 768px) {
  .navbar-signup {
    position: absolute;
    top: 13px;
    right: 20px;
  }

  .navbar-item_right {
    display: none;
  }

  .navbar-logo {
    margin-right: 15px;
  }

  .logo-full {
    display: none;
  }

  .logo-small {
    display: inherit;
  }
}

.logo-group path {
  fill: var(--color-blue_base);
}

.navbar-floating .logo-group path {
  fill: var(--color-white);
}

/**
 * Navbar button.
 */

.button-nav_signup {
  float: right;
  border-radius: 2px;
  padding: 10px 14px;
  background-color: var(--color-green_base);
  color: var(--color-grey_lighter);
  font-size: var(--fontSize_small);
  font-weight: var(--fontWeight_base);
  text-decoration: none;
  box-shadow: inset 0 0 0 2px var(--color-green_base);
  transition: all var(--duration_fastest) var(--easing_smooth);
}

.button-nav_signup:hover {
  color: var(--color-green_base);
  background-color: transparent;
}


text:
var express = require('express');
var mongo = require('mongodb');
var MongoClient = require('mongodb').MongoClient;
var assert= require('assert');
var crypto = require('crypto-js');
var engines = require('consolidate');
var validator = require('validator');
var bodyParser = require('body-parser');

var app = express();
app.engine('html', engines.mustache);
app.set('view engine', 'html');
app.use(express.static("public"));
app.use(bodyParser.json());

//Enviroment Variables
var dbuser = "heroku_jprck61g";
var dbpassword = "3gjm35k3i2j81s8pcsd3mada05";
var keyValue = dbuser + dbpassword;

app.get('/', function (request,response) {
  response.redirect("/apidoc/");
});

MongoClient.connect(
  "mongodb://heroku_jprck61g:3gjm35k3i2j81s8pcsd3mada05@ds155192.mlab.com:55192/heroku_jprck61g",
  function(error, db)
  {
    assert.equal(error,null);
    console.log("Succes Conection Server MongoDB");

    /**
     * @api {get} /kiwibot-simulation/id/:id User
     * @apiExample {curl} Succes User
     *  curl -i https://afternoon-sea-50972.herokuapp.com/kiwibot-simulation/id/596517c9f071bd0fc843c869
     * @apiGroup USER
     * @apiParam {String} id idUser
     * @apiSuccess {Object} user Object user
     * @apiSuccess {String} user.name personal name of the user
     * @apiSuccess {String} user.nickname nickname of the user
     * @apiSuccessExample {json} Success
     *    HTTP/1.1 200 OK
     *    {
     *      "user":{
     *          "name":"Carlos Zubieta",
     *          "nickname":"zubcarz"
     *      }}
     * @apiErrorExample {json} List error
     *    HTTP/1.1 500 Internal Server Error
     */
    app.get('/kiwibot-simulation/id/:id', function (request,response) {
      var objectId = new mongo.ObjectID(request.params.id);
      var projection = {"_id":0,"user.email":0,"user.password":0,"scores":0,"total_score":0};
      var querry = {"_id": objectId};
      var cursor = db.collection('Users').find(querry,projection).limit(1);

      cursor.forEach(
        function(doc){
          response.send(doc);
        },
        function (error) {
          assert.equal(error,null);
        }
       );
    });

    /**
     * @api {get} /kiwibot-simulation/user/id/:id/scores User list Scores
     * @apiExample {curl} Succes User scores
     *  curl -i https://afternoon-sea-50972.herokuapp.com/kiwibot-simulation/user/id/596517c9f071bd0fc843c869/scores
     * @apiGroup USER
     * @apiParam {String} id idUser
     * @apiSuccess {scores[]} scores list of scores user
     * @apiSuccess {String} score score user
     * @apiSuccess {String} level level score
     * @apiSuccess {String} total_score Sum all scores
     * @apiSuccessExample {json} Success
     *    HTTP/1.1 200 OK
     *   {"scores":
            [{"score":100,"level":1},
            {"score":200,"level":2}],
         "total_score":300}
     * @apiErrorExample {json} List error
     *    HTTP/1.1 500 Internal Server Error
     */
    app.get('/kiwibot-simulation/user/id/:id/scores', function (request,response) {
      var objectId = new mongo.ObjectID(request.params.id);
      var projection = {"_id":0,"user":0};
      var querry = {"_id": objectId};
      var cursor = db.collection('Users').find(querry,projection).limit(1);

      cursor.forEach(
        function(doc){
          response.send(doc);
        },
        function (error) {
          assert.equal(error,null);
        }
       );

    });

    /**
     * @api {get} /kiwibot-simulation/users User List
     * @apiExample {curl} Succes User list
     *  curl -i https://afternoon-sea-50972.herokuapp.com/kiwibot-simulation/users
     * @apiGroup USER
     * @apiSuccess {users[]} user list user
     * @apiSuccess {String} user.name personal name of the user
     * @apiSuccess {String} user.nickname nickname of the user
     * @apiSuccessExample {json} Success
     *    HTTP/1.1 200 OK
     *    [
     *      "user":{
     *          "name":"Carlos Zubieta",
     *          "nickname":"zubcarz"
     *      }]
     * @apiErrorExample {json} List error
     *    HTTP/1.1 500 Internal Server Error
     */
    app.get('/kiwibot-simulation/users/', function (request,response) {
      var projection = {"_id":0,"user.email":0,"user.password":0,"scores":0,"total_score":0};
      var cursor =  db.collection('Users').find({},projection);

       cursor.toArray(function(err, docs) {
              assert.equal(null,err);
              response.send(docs);
        });
    });

    /**
     * @api {get} /kiwibot-simulation/scores/top Scores top
     * @apiExample {curl} Succes Score Top
     *  curl -i https://afternoon-sea-50972.herokuapp.com/kiwibot-simulation/scores/top
     * @apiGroup SCORES
     * @apiSuccess {users[]} user list user
     * @apiSuccess {String} user.name personal name of the user
     * @apiSuccess {String} user.nickname nickname of the user
     * @apiSuccess {int} total_score nickname of the user
     * @apiSuccessExample {json} Success
     *    HTTP/1.1 200 OK
     *    {
     *      "userList" :[{
     *      "user":{
     *          "name":"Carlos Zubieta",
     *          "nickname":"zubcarz"
     *      },
     *      "total_score":300
     *      }]
     *    }
     * @apiErrorExample {json} List error
     *    HTTP/1.1 500 Internal Server Error
     */
    app.get('/kiwibot-simulation/scores/top', function (request,response) {
      var projection = {"_id":0,"user.nickname":1,"total_score":1};
      var sort = {"total_score":-1};
      var cursor =  db.collection('Users').find({},projection).sort(sort).limit(20);

       cursor.toArray(function(err, docs) {
              assert.equal(null,err);
              response.send({"userList" : docs});
        });
    });

    /**
     * @api {post} /kiwibot-simulation/user Create User
     * @apiExample {curl} Succes Create User
     *  curl -i https://afternoon-sea-50972.herokuapp.com/kiwibot-simulation/user
     * @apiGroup USER
     * @apiParam {String} name name
     * @apiParam {String} nickname nickname
     * @apiParam {String} email email
     * @apiParam {String} password password
     * @apiParam {String} confirmPassword Confirm password
     * @apiSuccess {string} _id id
     * @apiSuccess {users[]} user list user
     * @apiSuccess {String} user.name personal name of the user
     * @apiSuccess {String} user.nickname nickname of the user
     * @apiSuccessExample {json} Success
     *    HTTP/1.1 200 OK
     *    {
     *      "_id":"2342341231da12313",
     *      "user":{
     *          "name":"Carlos Zubieta",
     *          "nickname":"zubcarz",
     *          "email":"zubcarz@gmail.com"
     *      }
     *     }
     * @apiErrorExample {json} List error
     *    HTTP/1.1 500 Internal Server Error
     */
    app.post('/kiwibot-simulation/user', function (request,response) {
        var name = request.body.name;
        var email = request.body.email;
        var nickname = request.body.nickname;
        var password = crypto.HmacSHA1(request.body.password, keyValue);
        var confirmPassword = crypto.HmacSHA1(request.body.confirmPassword, keyValue);

        if(name != null){
          if(nickname != null && nickname.trim() != ""){
            if(email != null && email.trim() != ""){
              if(password != null){
                if(confirmPassword != null){
                  if(password.toString() == confirmPassword.toString()){
                    if(validator.isEmail(email.toString())){
                      var insert = {"user": {
                                      "name": name,
                                      "nickname": nickname,
                                      "email": email,
                                      "password" : password.toString()
                                    },
                                    "scores" :[],
                                    "total_score":0
                                  };

                      db.collection('Users').insertOne(insert,function(error,responseInsert){
                          if(error!=null){
                            if (error.name === 'MongoError') {
                              response.status(500).send({"error":"DB Error","message":error.message});
                            }
                          }else{
                              var projection = {"_id":1,"user.name":1,"user.nickname":1,"user.email":1};
                              var querry =  {"user.email": insert.user.email};
                              var cursor =  db.collection('Users').find(querry,projection).limit(1);
                              cursor.toArray(function(err, doc) {
                                     assert.equal(null,err);
                                     response.send(doc[0]);
                               });
                          }
                      });
                    }else{
                      response.status(400).send({"error":"is not email valid"});
                    }
                  }else{
                    response.status(400).send({"error":"Invalid credentials"});
                  }
                }else{
                  response.status(400).send({"error":"Confirm password is empty"});
                }
              }else{
                response.status(400).send({"error":"Password is empty"});
              }
            }else{
              response.status(400).send({"error":"Email is empty"});
            }
          }else{
            response.status(400).send({"error":"Nickname is empty"});
          }
        }else{
          response.status(400).send({"error":"Name is empty"});
          //response.send({"error":"Name is empty"});
        }
    });
    /**

     * @api {post} /kiwibot-simulation/user/id/:id/score Insert score
     * @apiExample {curl} Succes Score Top
     *  curl -i https://afternoon-sea-50972.herokuapp.com/kiwibot-simulation/kiwibot-simulation/user/id/:id/score
     * @apiGroup SCORES
     * @apiParam {String} score score
     * @apiParam {String} level level
     * @apiSuccess {message} message message
     * @apiSuccessExample {json} Success
     *    HTTP/1.1 200 OK
     *    {
     *      "message":"Update Score"
     *     }
     * @apiErrorExample {json} List error
     *    HTTP/1.1 500 Internal Server Error
     */
    app.post('/kiwibot-simulation/user/id/:id/score', function (request,response) {
      var score = request.body.score;
      var level = request.body.level;
      var objectID = new mongo.ObjectID(request.params.id);
      var insert = { $addToSet: {"scores": {"score":score, "level":level}}};
      db.collection('Users').update({ "_id":  objectID},insert,function(error,responseInsert){
          if(error!=null){
              response.status(500).send({"error":"DB Error","message":error.message});
          }else{
              response.send({"message":"Succes Score Update"});
          }
      });
    });

    /**
     * @api {get} /kiwibot-simulation/user/login User Login
     * @apiExample {curl} Succes User Login
     *  curl -i https://afternoon-sea-50972.herokuapp.com/kiwibot-simulation/user/login
     * @apiGroup USER
     * @apiParam {String} password password
     * @apiParam {String} email email
     * @apiSuccess {string} _id id
     * @apiSuccess {users[]} user list user
     * @apiSuccess {String} user.name personal name of the user
     * @apiSuccess {String} user.nickname nickname of the user
     * @apiSuccessExample {json} Success
     *    HTTP/1.1 200 OK
     *    {
     *      "_id":"2342341231da12313",
     *      "user":{
     *          "name":"Carlos Zubieta",
     *          "nickname":"zubcarz",
     *          "email":"zubcarz@gmail.com"
     *      }
     *     }
     * @apiErrorExample {json} List error
     *    HTTP/1.1 500 Internal Server Error
     */
    app.post('/kiwibot-simulation/user/login', function (request,response) {
        var email = request.body.email;
        var password = crypto.HmacSHA1(request.body.password, keyValue).toString();
        var projection = {"_id":1,"user.email":1,"user.nickname":1,"user.name":1};
        var querry = {"user.email":email,"user.password" :password };
        var cursor =  db.collection('Users').find(querry,projection);

        if(email != null){
          if(validator.isEmail(email.toString())){
            if(password != null){
                cursor.toArray(function(err, docs) {
                      if (docs.length == 0){
                          response.status(400).send({"error":"Invalid credentials"});
                      }else{
                         response.send(docs[0]);
                      }
                 });
            }else{
                response.status(400).send({"error":"Password is Empty"});
            }
          }else{
            response.status(400).send({"error":"Email is Invalid"});
          }
        }else{
          response.status(400).send({"error":"Email is Empty"});
        }
    });

    app.use(function(request,response){
      response.sendStatus(404);
    });

    app.listen(process.env.PORT || 3000, function(){
       console.log('Kiwibot api up and running...');
    });

  });


text:
/**
 * Quick fixes or hacks to be refactored / added to minified css file
 * at a later date
 */


text:
/*
 * Created on 16-Jun-2004
 *
 * Clase implementada funciones para el manejo de ficheros de datos
 *
 */

/**
 * @author Jesus Alcala Fernandez
 *
 *
 */

package org.core;

import java.io.*;
import java.util.*;

public class File {
    public static String readFile(String nombreFichero) {
        String cadena = "";
        try {
            FileInputStream fis = new FileInputStream(nombreFichero);
            byte[] leido = new byte[4096];
            int bytesLeidos = 0;
            while (bytesLeidos != -1) {
                bytesLeidos = fis.read(leido);
                if (bytesLeidos != -1) {
                    cadena += new String(leido, 0, bytesLeidos);
                }
            }
            fis.close();
        }
        catch (IOException e) {
            e.printStackTrace();
            System.exit( -1);
        }
        return cadena;
    }

    public static void writeFile(String nombreFichero, String cadena) {
        try {
            FileOutputStream f = new FileOutputStream(nombreFichero);
            DataOutputStream fis = new DataOutputStream((OutputStream) f);
            fis.writeBytes(cadena);
            fis.close();
        }
        catch (IOException e) {
            e.printStackTrace();
            System.exit( -1);
        }
    }

    public static void AddtoFile(String nombreFichero, String cadena) {
        try {
            RandomAccessFile fis = new RandomAccessFile(nombreFichero, "rw");
            fis.seek(fis.length());
            fis.writeBytes(cadena);
            fis.close();
        }
        catch (IOException e) {
            e.printStackTrace();
            System.exit( -1);
        }
    }
}


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

<title>edu.rpi.tw.data.csv.impl Class Hierarchy</title>
<meta name="date" content="2013-04-03">
<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Overview

Package

Class

Tree

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes

Hierarchy For Package edu.rpi.tw.data.csv.impl

Package Hierarchies:

All Packages

Class Hierarchy

java.lang.Object

edu.rpi.tw.data.csv.impl.DefaultEnhancementParameters (implements edu.rpi.tw.data.csv.EnhancementParameters, edu.rpi.tw.data.csv.NamespaceCalculator, edu.rpi.tw.data.csv.TemplateFiller, edu.rpi.tw.data.csv.Useful)

edu.rpi.tw.data.csv.impl.PropertyNameFactory

edu.rpi.tw.data.csv.impl.RowBasedCrawler

edu.rpi.tw.data.csv.impl.TemplateFillerColumnContext (implements edu.rpi.tw.data.csv.TemplateFiller)

edu.rpi.tw.data.csv.impl.CSVRecordTemplateFiller

edu.rpi.tw.data.csv.impl.TemplateFillerRowContext (implements edu.rpi.tw.data.csv.TemplateFiller)

edu.rpi.tw.data.csv.impl.UsefulEnhancements

edu.rpi.tw.data.csv.impl.ValueHandlerFactory

Overview

Package

Class

Tree

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes


text:
BOOST_HEADER_DEPRECATED("<boost/integer/integer_log2.hpp>");

#endif


text:
import Component from '@ember/component';
import TableCommon from '../../mixins/table-common';
import { computed } from '@ember/object';

export default Component.extend(TableCommon, {
  columns: computed(function() {
    return [{
      label: 'User Details',
      sortable: false,
      align: 'center',

      subColumns: [{
        label: 'Avatar',
        valuePath: 'avatar',
        width: '60px',
        sortable: false,
        cellComponent: 'user-avatar'
      }, {
        label: 'First',
        resizable: true,
        valuePath: 'firstName',
        width: '150px',
        minResizeWidth: 75
      }, {
        label: 'Last',
        resizable: true,
        valuePath: 'lastName',
        width: '150px',
        minResizeWidth: 75
      }]
    }, {
      label: 'Contact Information',
      sortable: false,
      align: 'center',

      subColumns: [{
        label: 'Address',
        resizable: true,
        valuePath: 'address',
        minResizeWidth: 100
      }, {
        label: 'State',
        resizable: true,
        valuePath: 'state',
        minResizeWidth: 100
      }, {
        label: 'Country',
        resizable: true,
        valuePath: 'country',
        minResizeWidth: 100
      }]
    }];
  })
});
// END-SNIPPET