text:
static NSString *S3OperationInfoAddObjectOperationObjectKey = @"S3OperationInfoAddObjectOperationObjectKey";

@implementation S3AddObjectOperation

- (id)initWithConnectionInfo:(S3ConnectionInfo *)c object:(S3Object *)o
{
    NSMutableDictionary *theOperationInfo = [[NSMutableDictionary alloc] init];
    if (o) {
        [theOperationInfo setObject:o forKey:S3OperationInfoAddObjectOperationObjectKey];
    }

    self = [super initWithConnectionInfo:c operationInfo:theOperationInfo];

    [theOperationInfo release];

    if (self != nil) {

    }

	return self;
}

- (S3Object *)object
{
    NSDictionary *theOperationInfo = [self operationInfo];
    return [theOperationInfo objectForKey:S3OperationInfoAddObjectOperationObjectKey];
}

- (NSString *)kind
{
	return @"Object upload";
}

- (NSString *)requestHTTPVerb
{
    return @"PUT";
}

- (NSDictionary *)additionalHTTPRequestHeaders
{
    S3Object *object = [self object];

    return [object metadata];
}

- (BOOL)virtuallyHostedCapable
{
	return [[[self object] bucket] virtuallyHostedCapable];
}

- (NSString *)bucketName
{
    S3Object *object = [self object];

    return [[object bucket] name];
}

- (NSString *)key
{
    S3Object *object = [self object];

    return [object key];
}

- (NSDictionary *)requestQueryItems
{
    return nil;
}

- (NSString *)requestBodyContentMD5
{
    S3Object *object = [self object];

    return [[object metadata] objectForKey:S3ObjectMetadataContentMD5Key];
}

- (NSData *)requestBodyContentData
{
    S3Object *object = [self object];

    return [[object dataSourceInfo] objectForKey:S3ObjectNSDataSourceKey];
}

- (NSString *)requestBodyContentFilePath
{
    S3Object *object = [self object];

    return [[object dataSourceInfo] objectForKey:S3ObjectFilePathDataSourceKey];
}

- (NSString *)requestBodyContentType
{
    S3Object *object = [self object];

    return [[object metadata] objectForKey:S3ObjectMetadataContentTypeKey];
}

- (NSUInteger)requestBodyContentLength
{
    S3Object *object = [self object];

    NSNumber *length = [[object metadata] objectForKey:S3ObjectMetadataContentLengthKey];
    if (length != nil) {
        return [length unsignedIntegerValue];
    }

    if ([self requestBodyContentData] != nil) {
        return [[self requestBodyContentData] length];
    } else if ([self requestBodyContentFilePath] != nil) {
        return [[[self requestBodyContentFilePath] fileSizeForPath] longLongValue];
    }

    return 0;
}

@end


text:
package org.apache.dubbo.metadata.tools;

import org.apache.dubbo.metadata.annotation.processing.model.Model;

import javax.ws.rs.DefaultValue;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.PUT;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import java.util.concurrent.TimeUnit;

/**
 * Test Service
 *
 * @since 2.7.6
 */
@Path("/echo")
public interface TestService {

    @GET
    <T> String echo(@PathParam("message") @DefaultValue("mercyblitz") String message);

    @POST
    Model model(@PathParam("model") Model model);

    // Test primitive
    @PUT
    String testPrimitive(boolean z, int i);

    // Test enumeration
    @PUT
    Model testEnum(TimeUnit timeUnit);

    // Test Array
    @GET
    String testArray(String[] strArray, int[] intArray, Model[] modelArray);
}

redpajama_set_name: RedPajamaGithub


text:
package org.datasand.model;

/**
 * Created by saichler on 6/7/16.
 */
public interface IObjectData extends IObject{
    public IObjectID getObjectID();
    public void setObjectID(IObjectID id);
}


text:
package com.sentenial.ws.client.paymentschedule;

import com.sentenial.ws.service.WsSettingsLoader;

import javax.xml.namespace.QName;
import javax.xml.ws.*;
import java.net.URL;

/**
 * This class was generated by the JAX-WS RI.
 * JAX-WS RI 2.2.5-b01
 * Generated source version: 2.2
 *
 */
@WebServiceClient(name = "PaymentScheduleWsService", targetNamespace = "urn:com:sentenial:origix:ws:paymentschedule-ws:wsdl", wsdlLocation = "file:/C:/Users/christian.reichel/AppData/Local/Temp/tempdir1083674983883943298.tmp/paymentschedule-ws_1.wsdl")
public class PaymentScheduleWsService
    extends Service
{

    private final static URL PAYMENTSCHEDULEWSSERVICE_WSDL_LOCATION;
    private final static WebServiceException PAYMENTSCHEDULEWSSERVICE_EXCEPTION;
    private final static QName PAYMENTSCHEDULEWSSERVICE_QNAME = new QName("urn:com:sentenial:origix:ws:paymentschedule-ws:wsdl", "PaymentScheduleWsService");

    static {
        URL url = null;
        WebServiceException e = null;
        try {
            url = WsSettingsLoader.getClassLoader().getResource("com/sentenial/origix/ws/paymentschedule/paymentschedule-ws.wsdl");
        } catch (Exception ex) {
            e = new WebServiceException(ex);
        }
        PAYMENTSCHEDULEWSSERVICE_WSDL_LOCATION = url;
        PAYMENTSCHEDULEWSSERVICE_EXCEPTION = e;
    }

    public PaymentScheduleWsService() {
        super(__getWsdlLocation(), PAYMENTSCHEDULEWSSERVICE_QNAME);
    }

    public PaymentScheduleWsService(WebServiceFeature... features) {
        super(__getWsdlLocation(), PAYMENTSCHEDULEWSSERVICE_QNAME, features);
    }

    public PaymentScheduleWsService(URL wsdlLocation) {
        super(wsdlLocation, PAYMENTSCHEDULEWSSERVICE_QNAME);
    }

    public PaymentScheduleWsService(URL wsdlLocation, WebServiceFeature... features) {
        super(wsdlLocation, PAYMENTSCHEDULEWSSERVICE_QNAME, features);
    }

    public PaymentScheduleWsService(URL wsdlLocation, QName serviceName) {
        super(wsdlLocation, serviceName);
    }

    public PaymentScheduleWsService(URL wsdlLocation, QName serviceName, WebServiceFeature... features) {
        super(wsdlLocation, serviceName, features);
    }

    /**
     *
     * @return
     *     returns PaymentScheduleWs
     */
    @WebEndpoint(name = "PaymentScheduleWsSoap11")
    public PaymentScheduleWs getPaymentScheduleWsSoap11() {
        return super.getPort(new QName("urn:com:sentenial:origix:ws:paymentschedule-ws:wsdl", "PaymentScheduleWsSoap11"), PaymentScheduleWs.class);
    }

    /**
     *
     * @param features
     *     A list of {@link javax.xml.ws.WebServiceFeature} to configure on the proxy.  Supported features not in the features parameter will have their default values.
     * @return
     *     returns PaymentScheduleWs
     */
    @WebEndpoint(name = "PaymentScheduleWsSoap11")
    public PaymentScheduleWs getPaymentScheduleWsSoap11(WebServiceFeature... features) {
        return super.getPort(new QName("urn:com:sentenial:origix:ws:paymentschedule-ws:wsdl", "PaymentScheduleWsSoap11"), PaymentScheduleWs.class, features);
    }

    private static URL __getWsdlLocation() {
        if (PAYMENTSCHEDULEWSSERVICE_EXCEPTION!= null) {
            throw PAYMENTSCHEDULEWSSERVICE_EXCEPTION;
        }
        return PAYMENTSCHEDULEWSSERVICE_WSDL_LOCATION;
    }

}


text:
package org.codehaus.groovy.classgen.asm;

import org.codehaus.groovy.classgen.ClassGeneratorException;
import org.objectweb.asm.MethodVisitor;
import org.objectweb.asm.Opcodes;
import org.objectweb.asm.Type;

import java.lang.reflect.Method;

/**
 * A helper class to invoke methods more easily in ASM
 *
 * @author James Strachan
 */
public class MethodCaller implements Opcodes {

    private int opcode;
    private String internalName;
    private String name;
    private Class theClass;
    private String methodDescriptor;

    public static MethodCaller newStatic(Class theClass, String name) {
        return new MethodCaller(INVOKESTATIC, theClass, name);
    }

    public static MethodCaller newInterface(Class theClass, String name) {
        return new MethodCaller(INVOKEINTERFACE, theClass, name);
    }

    public static MethodCaller newVirtual(Class theClass, String name) {
        return new MethodCaller(INVOKEVIRTUAL, theClass, name);
    }

    /**
     * @since 2.5.0
     */
    protected MethodCaller() {}

    public MethodCaller(int opcode, Class theClass, String name) {
        this.opcode = opcode;
        this.internalName = Type.getInternalName(theClass);
        this.theClass = theClass;
        this.name = name;

    }

    public void call(MethodVisitor methodVisitor) {
        methodVisitor.visitMethodInsn(opcode, internalName, name, getMethodDescriptor(), opcode == Opcodes.INVOKEINTERFACE);
    }

    public String getMethodDescriptor() {
        if (methodDescriptor == null) {
            Method method = getMethod();
            methodDescriptor = Type.getMethodDescriptor(method);
        }
        return methodDescriptor;
    }

    protected Method getMethod() {
        Method[] methods = theClass.getMethods();
        for (int i = 0; i < methods.length; i++) {
            Method method = methods[i];
            if (method.getName().equals(name)) {
                return method;
            }
        }
        throw new ClassGeneratorException("Could not find method: " + name + " on class: " + theClass);
    }
}


text:
import * as test from 'tape';

import {reducer as session, ISession} from '../src/ts/redux/Session';
import {ISessionAction} from '../src/ts/redux/Actions';

test('reducer should return proper session after login', (t) => {
    const initialSession: ISession = {
        jid: 'foo',
        password: 'x'
    };
    const action: ISessionAction = {
        type: 'CONNECTING',
        session: initialSession
    };

    const result = session(initialSession, action);
    t.deepEqual(result, {
        jid: `foo@${KAIWA_CONFIG.domain}`,
        password: 'x'
    });

    t.end();
});


text:
layout: post
title: "CSS Classes vs. ID's: Best Practices"
date: 2015-11-07T00:00:00-06:00
---
CSS offers a number of options for designating web page sections that will receive formatting from a CSS stylesheet. These options are known as "selectors" in the parlance of CSS. Two popular selector options are classes and ID's. These allow the user to apply formatting to specific sections of the page that differ from the default settings that may exist elsewhere in the stylesheet. This blog post will review some best practices for using class and ID selectors.

An ID selector designates one section of an HTML document that will receive formatting from the CSS stylesheet. ID's must be unique to that section of the document; they cannot be reused elsewhere in the file. An ID can be designated in HTML as follows:

{% highlight html %}
 ID content
{% endhighlight %}
The ID is then selected in the CSS stylesheet as follows:
{% highlight css %}
#id-name {
insert formatting here
}
{% endhighlight %}
ID's may seem unappealing compared to classes, which can be reused across multiple elements of the page. Classes are designated very similarly to ID's:
{% highlight html %}
 Class content
{% endhighlight %}

The class is then selected in the CSS stylesheet as follows:
{% highlight css %}
.class-name {
insert formatting here
}
{% endhighlight %}

Because classes can be reused, it is tempting to utilize them wherever possible, as they make code much more efficient. There are several cases, however, where ID's might be preferred. ID's are useful when you know that only one section of the page will receive certain formatting - for example, a title heading. ID's also trump classes when a browser decides how to render conflicting CSS, so they are useful in very complex CSS stylesheets when you want to be certain particular formatting will be applied. In fact, you can even combine an ID with a class to utilize most of the formatting rules from a class while overriding some with an ID. ID's can also improve accessiblity in some cases.

So what is best practice for using a class versus an ID? If there is even a chance that one might want to reuse a particular set of formatting, a class is likely the best choice since it will provide for reuse. Thus, a class is likely the best choice in most cases. If, however, you want to make certain that a particular section will receive a certain set of formatting, and you don't plan on reusing it, then an ID is likely the best option.


text:
import * as _ESTree from 'estree';
export as namespace ESTree;
export = _ESTree;


text:
import os
import time
import glob
import re
import hashlib
import traceback

GAMESTARTED_FILENAME = "gamestarted"
GAMEPREPARE_FILENAME = "gameprepare"
TEXT_FILENAME = "text.txt"

def main():
    text_hash = hashlib.sha256(open(TEXT_FILENAME, "rb").read()).hexdigest()
    strings_in_file = len(open(TEXT_FILENAME).readlines())
    bytes_in_file = os.path.getsize(TEXT_FILENAME)

    if bytes_in_file == 0:
        return

    gamestart_time = os.path.getmtime(GAMESTARTED_FILENAME)

    for path in glob.glob("./progress/*"):
        try:
            name = os.path.basename(path)

            if not re.fullmatch(r"[0-9a-zA-Z_]{1,20}", name):
                continue

            progress = int(open(path).readline().strip())

            if progress != strings_in_file:
                continue

            result = os.path.getmtime("./progress/" + name) - gamestart_time
            if result == 0:
                break  # wtf?

            chars_in_min = int((bytes_in_file / result) * 60)

            with open("results.txt", "a") as f:
                f.write(str(int(time.time())) + " " + text_hash + " " + name + " " + str(chars_in_min) + "\n")
        except Exception:
            traceback.print_exc()
            continue

if __name__ == "__main__":
    main()


text:
package ar.org.fitc.test.rmi.integration.fase2.serverExecutor.test;

import java.net.MalformedURLException;
import java.rmi.AccessException;
import java.rmi.AlreadyBoundException;
import java.rmi.NotBoundException;
import java.rmi.RemoteException;
import java.rmi.ServerException;
import java.rmi.registry.LocateRegistry;
import java.rmi.registry.Registry;

import ar.org.fitc.test.rmi.integration.fase2.clientExecutor.ITCRemoteUnicast;
import ar.org.fitc.test.rmi.integration.fase2.clientExecutor.Net;
import ar.org.fitc.test.rmi.integration.fase2.clientExecutor.executor.ReportIPServer;
import ar.org.fitc.test.rmi.integration.fase2.clientExecutor.interfaces.ITCRemote;
import ar.org.fitc.test.rmi.integration.fase2.serverExecutor.AutoBindITCRemoteUnicast;

/**
 * Testing class for a remote Registry.
 *
 * @author Jorge Rafael
 * @author Marcelo Arcidiacono
 *
 * @version 1.0
 */
public class RemoteRegistryTestCase extends ITCTestCase {

	/**
	 * A simple Registry.
	 */
	public Registry reg;

	/**
	 * An ITCRemote for exporting.
	 */
	public ITCRemote exportObj;

	/**
	 * Default constructor.
	 *
	 */
	public RemoteRegistryTestCase() {
		super();
	}

	/**
	 * Constructs a RemoteRegistryTestCase with a name.
	 *
	 * @param arg0 a name.
	 */
	public RemoteRegistryTestCase(String arg0) {
		super(arg0);
	}

	/**
	 * Assigns a Registry for each reported server and
	 * exports an object on them.
	 *
	 * @throws Exception if a failure occurs during exportation
	 */
	protected void setUp() throws Exception {
		String[] hosts = ReportIPServer.getit();
		reg = LocateRegistry.getRegistry(hosts[0], Net.getRegistryPort());
		exportObj = new ITCRemoteUnicast();
		super.setUp();
	}

	/**
	 * Tries to bind a remote object in a Registry of a
	 * non-local host.
	 *
	 * @throws RemoteException if remote communication with the
	 * registry failed
	 * @throws AlreadyBoundException if the name is already bound
	 */
	public void testBind001() throws RemoteException, AlreadyBoundException {

		try {
			reg.bind("echo", exportObj);
			fail("Stub of registry can't chanch registry");
		} catch (ServerException e) {
		}
	}

	/**
	 * This test verifies that all elements in a non-local
	 * Registry are functional.
	 *
	 * @throws AccessException if this registry is local and it
	 * denies the caller access to perform this operation
	 * @throws RemoteException if remote communication with the
	 * registry failed
	 * @throws NotBoundException if the name is not currently bound
	 */
	public void testLookup001() throws AccessException, RemoteException,
			NotBoundException {
		for (String bindName : reg.list() ) {
			ITCRemote o =(ITCRemote) reg.lookup(bindName);
			o.getString();
		}
	}

	/**
	 * This test tries lookup a non-bounded remote object.
	 *
	 * @throws RemoteException if remote communication with the
	 * registry failed
	 * @throws MalformedURLException if the name is not an
	 * appropriately formatted URL
	 * @throws NotBoundException if the name is not currently bound
	 */
	public void testLookup002() throws RemoteException, MalformedURLException,
			NotBoundException {
		try {
			reg.lookup("echo123413");
			fail("Mal formed URL");
		} catch (NotBoundException e) {
		} catch (Throwable e) {
			fail("Failed with:" + e);
		}
	}

	/**
	 * This test tries lookup a remote object with a non-existing name.
	 *
	 * @throws RemoteException if remote communication with the
	 * registry failed
	 * @throws MalformedURLException if the name is not an
	 * appropriately formatted URL
	 * @throws NotBoundException if the name is not currently bound
	 */
	public void testLookup003() {
		try {
			reg.lookup("#$%$%echo");
			fail("Mal formed URL");
		} catch (NotBoundException e) {
		} catch (Throwable e) {
			fail("Failed with:" + e);
		}
	}

	/**
	 * This test tries to re-bind a remote object with a same name
	 * in a Registry.
	 *
	 * @throws RemoteException if remote communication with the
	 * registry failed
	 * @throws AlreadyBoundException if the name is already bound
	 */
	public void testRebind001() throws RemoteException, MalformedURLException,
			NotBoundException {
		try {
			reg.rebind("echo", exportObj);
			fail("Stub of registry can't chanch registry");
		} catch (ServerException e) {
		}
	}

	/**
	 * This test tries to un-bind remote objects from a non-local
	 * Registry. The object must to be registred.
	 *
	 * @throws AccessException if this registry is local and it
	 * denies the caller access to perform this operation
	 * @throws RemoteException if remote communication with the
	 * registry failed
	 * @throws NotBoundException if the name is not currently bound
	 */
	@SuppressWarnings("unchecked")
	public void testUnbind() throws AccessException, RemoteException,
			NotBoundException {
		for (String bindName : reg.list() ) {
			try {
				reg.unbind(bindName);
				fail("Stub of registry can't chanch registry");
			} catch (ServerException e) {
				ITCRemote o =(ITCRemote) reg.lookup(bindName);
				o.getString();
			}
		}
	}

	/**
	 * This case makes a test on a non-exported object. If this
	 * object is deserialized, it is exported and bounded. This object
	 * is sent as parameter to a non-local Registry. The
	 * binding fails. However the object will be bounded because
	 * will be deserialized.
	 *
	 * @throws RemoteException if remote communication with the
	 * registry failed
	 */
	public void testAutoBindAndExportionUsingRemoteRegistry() throws RemoteException {
		exportObj = new AutoBindITCRemoteUnicast();
		exportObj.clean(true);

		try {
			reg.rebind(AutoBindITCRemoteUnicast.BIND_NAME, exportObj);
			fail("can't bind remotelly");
		} catch (ServerException e) {
		}

		try {
			reg.lookup(AutoBindITCRemoteUnicast.BIND_NAME);
			fail("Object binded");
		} catch (NotBoundException e) {
		}
	}
}


text:
<!doctype html>

  <meta charset="utf-8">
  <title ng-bind-template="Google Phone Gallery: {{query}}">Google Phone Gallery: {{query}}</title>
  <link rel="stylesheet" href="css/app.css">
  <link rel="stylesheet" href="css/bootstrap.css">

        Search: <input ng-model="query">
        Sort by:
          <select ng-model="orderProp">
            <option value="name">Alphabetical</option>
            <option value="age">Newest</option>
          </select>

            {{phone.name}}

{{phone.snippet}}


text:
/**
*============================================================================
*  The Ohio State University Research Foundation, Emory University,
*  the University of Minnesota Supercomputing Institute
*
*  Distributed under the OSI-approved BSD 3-Clause License.
*  See http://ncip.github.com/cagrid-grid-incubation/LICENSE.txt for details.
*============================================================================
**/
/**
*============================================================================
*============================================================================
**/
package org.cagrid.iso21090.sdkquery.processor.cql2;

import gov.nih.nci.cagrid.common.Utils;
import gov.nih.nci.cagrid.data.InitializationException;
import gov.nih.nci.cagrid.data.MalformedQueryException;
import gov.nih.nci.cagrid.data.QueryProcessingException;
import gov.nih.nci.cagrid.data.cql2.CQL2QueryProcessor;
import gov.nih.nci.system.applicationservice.ApplicationService;
import gov.nih.nci.system.client.ApplicationServiceProvider;
import gov.nih.nci.system.client.util.xml.XMLUtility;
import gov.nih.nci.system.client.util.xml.XMLUtilityException;
import gov.nih.nci.system.query.hibernate.HQLCriteria;

import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.StringWriter;
import java.net.MalformedURLException;
import java.net.URL;
import java.text.DateFormat;
import java.util.Date;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.NoSuchElementException;
import java.util.Properties;

import javax.xml.namespace.QName;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.cagrid.cql.utilities.AnyNodeHelper;
import org.cagrid.cql.utilities.CQL2SerializationUtil;
import org.cagrid.cql2.Aggregation;
import org.cagrid.cql2.CQLQuery;
import org.cagrid.cql2.CQLQueryModifier;
import org.cagrid.cql2.NamedAttribute;
import org.cagrid.cql2.results.CQLAggregateResult;
import org.cagrid.cql2.results.CQLAttributeResult;
import org.cagrid.cql2.results.CQLObjectResult;
import org.cagrid.cql2.results.CQLQueryResults;
import org.cagrid.cql2.results.CQLResult;
import org.cagrid.cql2.results.TargetAttribute;
import org.cagrid.iso21090.sdkquery.translator.ConstantValueResolver;
import org.cagrid.iso21090.sdkquery.translator.IsoDatatypesConstantValueResolver;
import org.cagrid.iso21090.sdkquery.translator.ParameterizedHqlQuery;
import org.cagrid.iso21090.sdkquery.translator.cql2.CQL2ToParameterizedHQL;
import org.cagrid.iso21090.sdkquery.translator.cql2.Cql2TypesInformationResolver;
import org.cagrid.iso21090.sdkquery.translator.cql2.HibernateConfigCql2TypesInformationResolver;
import org.exolab.castor.types.AnyNode;
import org.globus.wsrf.security.SecurityManager;
import org.hibernate.cfg.Configuration;

/**
 * SDK43CQL2QueryProcessor
 * CQL 2 Query processor for caCORE SDK 4.3 with ISO 21090 data types
 *
 * @author David W. Ervin
 */
public class SDK43CQL2QueryProcessor extends CQL2QueryProcessor {

    private static Log LOG = LogFactory.getLog(SDK43CQL2QueryProcessor.class);

    // general configuration options
    public static final String PROPERTY_APPLICATION_NAME = "applicationName";
    public static final String PROPERTY_USE_LOCAL_API = "useLocalApiFlag";

    // remote service configuration properties
    public static final String PROPERTY_HOST_NAME = "applicationHostName";
    public static final String PROPERTY_HOST_PORT = "applicationHostPort";
    public static final String PROPERTY_HOST_HTTPS = "useHttpsUrl";

    // security configuration properties
    public static final String PROPERTY_USE_GRID_IDENTITY_LOGIN = "useGridIdentityLogin";
    public static final String PROPERTY_USE_STATIC_LOGIN = "useStaticLogin";
    public static final String PROPERTY_STATIC_LOGIN_USER = "staticLoginUser";
    public static final String PROPERTY_STATIC_LOGIN_PASS = "staticLoginPass";

    // default values for properties
    public static final String DEFAULT_USE_LOCAL_API = String.valueOf(false);
    public static final String DEFAULT_HOST_HTTPS = String.valueOf(false);
    public static final String DEFAULT_USE_GRID_IDENTITY_LOGIN = String.valueOf(false);
    public static final String DEFAULT_USE_STATIC_LOGIN = String.valueOf(false);

    private CQL2ToParameterizedHQL cqlTranslator = null;
    private QNameResolver qnameResolver = null;
    private byte[] wsddBytes = null;

    public SDK43CQL2QueryProcessor() {
        super();
    }

    public Properties getRequiredParameters() {
        Properties props = super.getRequiredParameters();
        props.setProperty(PROPERTY_APPLICATION_NAME, "");
        props.setProperty(PROPERTY_USE_LOCAL_API, DEFAULT_USE_LOCAL_API);
        props.setProperty(PROPERTY_HOST_NAME, "");
        props.setProperty(PROPERTY_HOST_PORT, "");
        props.setProperty(PROPERTY_HOST_HTTPS, DEFAULT_HOST_HTTPS);
        props.setProperty(PROPERTY_USE_GRID_IDENTITY_LOGIN, DEFAULT_USE_GRID_IDENTITY_LOGIN);
        props.setProperty(PROPERTY_USE_STATIC_LOGIN, DEFAULT_USE_STATIC_LOGIN);
        props.setProperty(PROPERTY_STATIC_LOGIN_USER, "");
        props.setProperty(PROPERTY_STATIC_LOGIN_PASS, "");
        return props;
    }

    public void initialize() throws InitializationException {
        // verify that if we're using grid identity login, we're also using the Local API
        if (isUseGridIdentLogin() && !isUseLocalApi()) {
            throw new InitializationException("Grid identity + CSM authentication can only be used with the local API!");
        }
        // verify we have a URL for the remote API
        if (!isUseLocalApi()) {
            try {
                new URL(getRemoteApplicationUrl());
            } catch (MalformedURLException ex) {
                throw new InitializationException("Could not determine a remote API url: " + ex.getMessage(), ex);
            }
        }
    }

    public CQLQueryResults processQuery(CQLQuery cqlQuery) throws MalformedQueryException, QueryProcessingException {
        LOG.debug("Starting process query");
        Iterator<CQLResult> resultIter = processQueryAndIterate(cqlQuery);
        LOG.debug("Converting iterated results to static results");
        CQLQueryResults results = new CQLQueryResults();
        results.setTargetClassname(cqlQuery.getCQLTargetObject().getClassName());
        List<CQLObjectResult> objectResults = new LinkedList<CQLObjectResult>();
        List<CQLAttributeResult> attributeResults = new LinkedList<CQLAttributeResult>();
        CQLAggregateResult aggregateResult = null;
        while (resultIter.hasNext()) {
            CQLResult result = resultIter.next();
            if (result instanceof CQLObjectResult) {
                objectResults.add((CQLObjectResult) result);
            } else if (result instanceof CQLAttributeResult) {
                attributeResults.add((CQLAttributeResult) result);
            } else if (result instanceof CQLAggregateResult) {
                aggregateResult = (CQLAggregateResult) result;
            }
        }
        if (objectResults.size() != 0) {
            results.setObjectResult(objectResults.toArray(new CQLObjectResult[0]));
        } else if (attributeResults.size() != 0) {
            results.setAttributeResult(attributeResults.toArray(new CQLAttributeResult[0]));
        } else {
            results.setAggregationResult(aggregateResult);
        }
        return results;
    }

    public Iterator<CQLResult> processQueryAndIterate(CQLQuery query) throws QueryProcessingException {
        LOG.debug("Starting process query and iterate results");
        CQLQuery runQuery = query;
        if (runQuery.getCQLQueryModifier() != null && runQuery.getCQLQueryModifier().getNamedAttribute() != null) {
            LOG.debug("Cloning query and editing modifier for unique result tuples");
            // HQL will return distinct tuples of attribute names, so we need to include
            // the id attribute in those tuples to get a 1:1 correspondence with
            // actual data instances in the database
            try {
                runQuery = CQL2SerializationUtil.cloneQueryBean(query);
                NamedAttribute[] namedAttributes = runQuery.getCQLQueryModifier().getNamedAttribute();
                NamedAttribute idAttribute = new NamedAttribute("id");
                namedAttributes = (NamedAttribute[]) Utils.appendToArray(namedAttributes, idAttribute);
                runQuery.getCQLQueryModifier().setNamedAttribute(namedAttributes);
            } catch (Exception ex) {
                String message = "Error pre-processing query modifier attribute names: " + ex.getMessage();
                LOG.error(message, ex);
                throw new QueryProcessingException(message, ex);
            }
        }
        // get an instance of the caCORE SDK ApplicationService
        ApplicationService sdkService = getApplicationService();

        // empty results object
        CQLQueryResults queryResults = new CQLQueryResults();
        queryResults.setTargetClassname(query.getCQLTargetObject().getClassName());

        // convert the CQL to HQL
        LOG.debug("Converting CQL query to HQL");
        ParameterizedHqlQuery hql = null;
        try {
            hql = getCqlTranslator().convertToHql(runQuery);
            LOG.debug("Created HQL: " + hql.toString());
        } catch (QueryProcessingException ex) {
            throw ex;
        } catch (Exception ex) {
            throw new QueryProcessingException("Error processing query: " + ex.getMessage(), ex);
        }

        HQLCriteria criteria = new HQLCriteria(hql.getHql(), hql.getParameters());

        // query the SDK
        LOG.debug("Querying application service");
        List<Object> rawResults = null;
        try {
            rawResults = sdkService.query(criteria);
        } catch (Exception ex) {
            String message = "Error querying caCORE service: " + ex.getMessage();
            LOG.error(message, ex);
            throw new QueryProcessingException(message, ex);
        }
        LOG.debug("Results obtained from application service");

        Iterator<CQLResult> cqlResultsIter = null;
        // see if there is further processing to be done
        if (runQuery.getCQLQueryModifier() != null) {
            LOG.debug("Post-processing query modifiers");
            CQLQueryModifier mods = runQuery.getCQLQueryModifier();
            if (mods.getNamedAttribute() != null) {
                LOG.debug("Detected named attribute results");
                // trim off the extra id attribute we added earlier
                String[] attributeNames = new String[mods.getNamedAttribute().length - 1];
                for (int i = 0; i < attributeNames.length; i++) {
                    attributeNames[i] = mods.getNamedAttribute(i).getAttributeName();
                }
                // this will happily ignore the last value which is the extra ID attribute
                cqlResultsIter = wrapAttributeResult(attributeNames, rawResults);
            } else if (mods.getCountOnly() != null && mods.getCountOnly().booleanValue()) {
                LOG.debug("Detected count-only aggregate results");
                Object resultValue = rawResults.size() != 0 ? rawResults.get(0) : null;
                String valueAsString = attributeValueAsString(resultValue);
                cqlResultsIter = wrapAggregateResult(Aggregation.COUNT, "id", valueAsString);
            } else if (mods.getDistinctAttribute() != null) {
                LOG.debug("Detected distinct attribute results");
                if (mods.getDistinctAttribute().getAggregation() != null) {
                    LOG.debug("Detected aggregate results");
                    Aggregation agg = mods.getDistinctAttribute().getAggregation();
                    Object resultValue = rawResults.size() != 0 ? rawResults.get(0) : null;
                    String valueAsString = attributeValueAsString(resultValue);
                    cqlResultsIter = wrapAggregateResult(agg, mods.getDistinctAttribute().getAttributeName(), valueAsString);
                } else {
                    // standard attribute name / value pairs
                    cqlResultsIter = wrapAttributeResult(
                        new String[]{mods.getDistinctAttribute().getAttributeName()}, rawResults);
                }
            }
        } else {
            LOG.debug("Detected object results");
            QName targetQName = null;
            try {
                targetQName = getQNameResolver().getQName(query.getCQLTargetObject().getClassName());
            } catch (Exception ex) {
                throw new QueryProcessingException("Error obtaining QName for target data type: " + ex.getMessage(), ex);
            }
            cqlResultsIter = wrapObjectResults(rawResults, targetQName);
        }

        return cqlResultsIter;
    }

    private Iterator<CQLResult> wrapObjectResults(List<Object> rawObjects, final QName targetQName) {
        final Iterator<Object> rawObjectIter = rawObjects.iterator();
        Iterator<CQLResult> objectIter = new Iterator<CQLResult>() {
            public boolean hasNext() {
                return rawObjectIter.hasNext();
            }

            public CQLResult next() {
                CQLObjectResult obj = new CQLObjectResult();
                Object rawObject = rawObjectIter.next();
                LOG.debug("Stripping proxy impl from result instance");
                try {
                    // TODO: should the association flag be false / true?
                    rawObject = XMLUtility.convertFromProxy(rawObject, false);
                } catch (XMLUtilityException ex) {
                    LOG.error("Error stripping proxy from result instance: " + ex.getMessage(), ex);
                    throw new NoSuchElementException("Error stripping proxy from result instance: " + ex.getMessage());
                }
                StringWriter writer = new StringWriter();
                try {
                    InputStream wsdd = getDisposableWsdd();
                    Utils.serializeObject(rawObject, targetQName, writer, wsdd);
                } catch (Exception ex) {
                    String message = "Error pre-serializing object result: " + ex.getMessage();
                    LOG.error(message, ex);
                    NoSuchElementException nse = new NoSuchElementException(message);
                    nse.initCause(ex);
                    throw nse;
                }
                AnyNode node = null;
                try {
                    node = AnyNodeHelper.convertStringToAnyNode(
                        writer.getBuffer().toString());
                } catch (Exception ex) {
                    String message = "Error creating AnyNode for object results: " + ex.getMessage();
                    LOG.error(message, ex);
                    NoSuchElementException nse = new NoSuchElementException(message);
                    nse.initCause(ex);
                    throw nse;
                }
                obj.set_any(node);
                return obj;
            }

            public void remove() {
                throw new UnsupportedOperationException("remove() is not supported");
            }
        };
        return objectIter;
    }

    private Iterator<CQLResult> wrapAggregateResult(Aggregation agg, String attributeName, String value) {
        final CQLAggregateResult result = new CQLAggregateResult();
        result.setAggregation(agg);
        result.setAttributeName(attributeName);
        result.setValue(value);

        Iterator<CQLResult> iter = new Iterator<CQLResult>() {
            boolean hasBeenReturned = false;

            public boolean hasNext() {
                return !hasBeenReturned;
            }

            public synchronized CQLResult next() {
                if (!hasNext()) {
                    throw new NoSuchElementException();
                }
                hasBeenReturned = true;
                return result;
            }

            public void remove() {
                throw new UnsupportedOperationException("remove() is not supported");
            }
        };

        return iter;
    }

    private Iterator<CQLResult> wrapAttributeResult(final String[] attributeNames, List<Object> attributeValues) {
        final Iterator<Object> rawValueIter = attributeValues.iterator();

        Iterator<CQLResult> iter = new Iterator<CQLResult>() {
            public boolean hasNext() {
                return rawValueIter.hasNext();
            }

            public synchronized CQLResult next() {
                Object[] values = arrayify(rawValueIter.next());
                CQLAttributeResult result = new CQLAttributeResult();
                TargetAttribute[] ta = new TargetAttribute[attributeNames.length];
                for (int i = 0; i < attributeNames.length; i++) {
                    Object val = values[i];
                    ta[i] = new TargetAttribute(attributeNames[i], attributeValueAsString(val));
                }
                result.setAttribute(ta);
                return result;
            }

            public void remove() {
                throw new UnsupportedOperationException("remove() is not supported");
            }

            private Object[] arrayify(Object o) {
                if (o != null && o.getClass().isArray()) {
                    return (Object[]) o;
                }
                return new Object[] {o};
            }
        };
        return iter;
    }

    private String attributeValueAsString(Object val) {
        String valAsString = null;
        if (val != null) {
            if (val instanceof Date) {
                valAsString = DateFormat.getDateTimeInstance().format((Date) val);
            } else {
                valAsString = String.valueOf(val);
            }
        }
        return valAsString;
    }

    private CQL2ToParameterizedHQL getCqlTranslator() throws Exception {
        if (cqlTranslator == null) {
            LOG.debug("Locating Hibernate configuration");
            InputStream configStream = getClass().getResourceAsStream("/hibernate.cfg.xml");
            Configuration config = new Configuration();
            config.addInputStream(configStream);
            config.configure();
            configStream.close();
            LOG.debug("Initializing types information resolver");
            Cql2TypesInformationResolver typesInfoResolver = new HibernateConfigCql2TypesInformationResolver(config, true);
            LOG.debug("Loading ISO constant resolver");
            ConstantValueResolver constantResolver = new IsoDatatypesConstantValueResolver();
            LOG.debug("Initializing CQL 2 to HQL translator");
            cqlTranslator = new CQL2ToParameterizedHQL(typesInfoResolver, constantResolver, false);
        }
        return cqlTranslator;
    }

    private boolean isUseLocalApi() {
        boolean useLocal = Boolean.parseBoolean(DEFAULT_USE_LOCAL_API);
        String useLocalApiValue = getConfiguredParameters().getProperty(PROPERTY_USE_LOCAL_API);
        try {
            useLocal = Boolean.parseBoolean(useLocalApiValue);
        } catch (Exception ex) {
            LOG.error("Error parsing property " + PROPERTY_USE_LOCAL_API
                + ".  Value was " + useLocalApiValue, ex);
        }
        return useLocal;
    }

    private boolean isUseGridIdentLogin() {
        boolean useGridIdent = Boolean.parseBoolean(DEFAULT_USE_GRID_IDENTITY_LOGIN);
        String useGridIdentValue = getConfiguredParameters().getProperty(PROPERTY_USE_GRID_IDENTITY_LOGIN);
        try {
            useGridIdent = Boolean.parseBoolean(useGridIdentValue);
        } catch (Exception ex) {
            LOG.error("Error parsing property " + PROPERTY_USE_GRID_IDENTITY_LOGIN
                + ".  Value was " + useGridIdentValue, ex);
        }
        return useGridIdent;
    }

    private boolean isUseStaticLogin() {
        boolean useStatic = false;
        String useStaticValue = getConfiguredParameters().getProperty(PROPERTY_USE_STATIC_LOGIN);
        try {
            useStatic = Boolean.parseBoolean(useStaticValue);
        } catch (Exception ex) {
            LOG.error("Error parsing property " + PROPERTY_USE_STATIC_LOGIN
                + ".  Value was " + useStaticValue, ex);
        }
        return useStatic;
    }

    private boolean isUseHttps() {
        boolean useHttps = Boolean.parseBoolean(DEFAULT_HOST_HTTPS);
        String useHttpsValue = getConfiguredParameters().getProperty(PROPERTY_HOST_HTTPS);
        try {
            useHttps = Boolean.parseBoolean(useHttpsValue);
        } catch (Exception ex) {
            LOG.error("Error parsing property " + PROPERTY_HOST_HTTPS
                + ".  Value was " + useHttpsValue, ex);
        }
        return useHttps;
    }

    private String getStaticLoginUser() {
        return getConfiguredParameters().getProperty(PROPERTY_STATIC_LOGIN_USER);
    }

    private String getStaticLoginPass() {
        return getConfiguredParameters().getProperty(PROPERTY_STATIC_LOGIN_PASS);
    }

    private String getRemoteApplicationUrl() {
        StringBuffer url = new StringBuffer();
        if (isUseHttps()) {
            url.append("https://");
        } else {
            url.append("http://");
        }
        url.append(getConfiguredParameters().getProperty(PROPERTY_HOST_NAME));
        url.append(":");
        url.append(getConfiguredParameters().getProperty(PROPERTY_HOST_PORT));
        url.append("/");
        url.append(getConfiguredParameters().getProperty(PROPERTY_APPLICATION_NAME));
        String completedUrl = url.toString();
        LOG.debug("Application Service remote URL determined to be: " + completedUrl);
        return completedUrl;
    }

    private ApplicationService getApplicationService() throws QueryProcessingException {
        LOG.debug("Getting caCORE SDK application service instance");
        ApplicationService service = null;
        try {
            if (isUseLocalApi()) {
                LOG.debug("Using Local API");
                if (isUseGridIdentLogin()) {
                    LOG.debug("Using grid identity login");
                    SecurityManager securityManager = SecurityManager.getManager();
                    String username = securityManager.getCaller();
                    LOG.trace("Identity determined to be " + username);
                    service = ApplicationServiceProvider.getApplicationServiceForUser(username);
                } else {
                    service = ApplicationServiceProvider.getApplicationService();
                }
            } else {
                LOG.debug("Using Remote API");
                String url = getRemoteApplicationUrl();
                if (isUseStaticLogin()) {
                    LOG.debug("Using static login");
                    String username = getStaticLoginUser();
                    String password = getStaticLoginPass();
                    service = ApplicationServiceProvider.getApplicationServiceFromUrl(url, username, password);
                } else {
                    service = ApplicationServiceProvider.getApplicationServiceFromUrl(url);
                }
            }
        } catch (Exception ex) {
            throw new QueryProcessingException("Error obtaining application service: " + ex.getMessage(), ex);
        }
        return service;
    }

    private QNameResolver getQNameResolver() throws Exception {
        if (qnameResolver == null) {
            qnameResolver = new MappingFileQNameResolver(getClassToQnameMappings());
        }
        return qnameResolver;
    }

    private InputStream getDisposableWsdd() throws IOException {
        if (wsddBytes == null) {
            wsddBytes = Utils.inputStreamToByteArray(getConfiguredWsddStream());
        }
        return new ByteArrayInputStream(wsddBytes);
    }
}


text:
 #include <windows.h>
#else
 #define SOCKET    int
#endif

#include "ConceptTypes.h"

void *GetStaticData();
void SetStaticData(void *data);

#ifdef _WIN32
 #define CONCEPT_DLL_API            __declspec(dllexport) int _cdecl
 #define CONCEPT_DLL_API_HANDLER    __declspec(dllexport) void *_cdecl
#else
 #define CONCEPT_DLL_API            int
 #define CONCEPT_DLL_API_HANDLER    void *
#endif

extern "C" {
typedef int (*NOTIFY_PARENT)(int pipe_out, int apid, int msg_id, int len, const char *data);

// other functions declared here
CONCEPT_DLL_API SetArguments(int argc, char **argv);
CONCEPT_DLL_API LastResult();
CONCEPT_DLL_API Concept_Execute(char *filename, char *inc_dir, char *lib_dir, ForeignPrint fp, SOCKET sock, int debug, DEBUGGER_CALLBACK DEBUGGER_TRAP, void *DEBUGGER_RESERVED, char *SERVER_PUBLIC_KEY, char *SERVER_PRIVATE_KEY, char *CLIENT_PUBLIC_KEY, int pipe_in, int pipe_out, int apid, int parent, void *userdata);
CONCEPT_DLL_API Concept_Compile(char *filename, char *inc_dir, char *lib_dir, ForeignPrint fp, SOCKET sock, int debug, DEBUGGER_CALLBACK DEBUGGER_TRAP, void *DEBUGGER_RESERVED, char *SERVER_PUBLIC_KEY, char *SERVER_PRIVATE_KEY, char *CLIENT_PUBLIC_KEY, int pipe_in, int pipe_out, int apid, int parent);
CONCEPT_DLL_API Concept_Execute2(char *filename, char *inc_dir, char *lib_dir, ForeignPrint fp, SOCKET sock, int debug, DEBUGGER_CALLBACK DEBUGGER_TRAP, void *DEBUGGER_RESERVED, char *SERVER_PUBLIC_KEY, char *SERVER_PRIVATE_KEY, char *CLIENT_PUBLIC_KEY, int pipe_in, int pipe_out, int apid, int parent, CHECK_POINT cp, void *userdata);

CONCEPT_DLL_API Concept_ExecuteBuffer(char *buffer, int len, char *inc_dir, char *lib_dir, ForeignPrint fp, SOCKET sock, int debug, DEBUGGER_CALLBACK DEBUGGER_TRAP, void *DEBUGGER_RESERVED, char *SERVER_PUBLIC_KEY, char *SERVER_PRIVATE_KEY, char *CLIENT_PUBLIC_KEY, int pipe_in, int pipe_out, int apid, int parent, CHECK_POINT cp, void *result, void *module_list, void *owner, void *userdata);
CONCEPT_DLL_API Concept_GetSocket();

CONCEPT_DLL_API Concept_CachedInit(char *filename);
CONCEPT_DLL_API Concept_CachedDone(char *filename);

CONCEPT_DLL_API SetNotifyParent(NOTIFY_PARENT np);
CONCEPT_DLL_API SetDirectPipe(int direct_pipe);
CONCEPT_DLL_API SetCheckpointFunction(CHECK_POINT cp);

CONCEPT_DLL_API_HANDLER Concept_Execute3_Init(char *filename, char *inc_dir, char *lib_dir, ForeignPrint fp, SOCKET sock, int debug, DEBUGGER_CALLBACK DEBUGGER_TRAP, void *DEBUGGER_RESERVED, char *SERVER_PUBLIC_KEY, char *SERVER_PRIVATE_KEY, char *CLIENT_PUBLIC_KEY, int pipe_in, int pipe_out, int apid, int parent, void *userdata);
CONCEPT_DLL_API Concept_Execute3_Run(void *PTR, SOCKET sock, int debug, DEBUGGER_CALLBACK DEBUGGER_TRAP, void *DEBUGGER_RESERVED, char *SERVER_PUBLIC_KEY, char *SERVER_PRIVATE_KEY, char *CLIENT_PUBLIC_KEY, int pipe_in, int pipe_out, int apid, int parent);
CONCEPT_DLL_API Concept_Execute3_RunClone(void *PTR, SOCKET sock, int debug, DEBUGGER_CALLBACK DEBUGGER_TRAP, void *DEBUGGER_RESERVED, char *SERVER_PUBLIC_KEY, char *SERVER_PRIVATE_KEY, char *CLIENT_PUBLIC_KEY, int pipe_in, int pipe_out, int apid, int parent, int direct_pipe);
CONCEPT_DLL_API Concept_Execute3_Done(void *PTR);
}
#endif // __LIBRARY_H


text:
<!DOCTYPE html>

    <title></title>

    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.0/css/font-awesome.min.css">

    <link href="/libs/mdb4/css/bootstrap.css" rel="stylesheet">

    <link href="/libs/mdb4/css/mdb.min.css" rel="stylesheet">

    <link href="/libs/mdb4/css/compiled.min.css" rel="stylesheet">

    <link href="/libs/mdb4/css/style.css" rel="stylesheet">

@include('includes.navbar')

@foreach($errors->all() as $error)
    {{ $error }}
@endforeach

                {{$ad->title}}

  {{$ad->title}}

                image}}" class="img img-responsive" style="max-height: 320px;">

{{$ad->description}}

                    user->id }}">
                        {{$ad->user->first_name}}

            {{--
--}}
            {{--
{{$ad->texture}}
--}}

            {{--
--}}

 {{ \Carbon\Carbon::parse($ad->created_at)->format('Y M d g:i A')}}

{{--{{ \Carbon\Carbon::parse($ad->created_at)->format('Y M d g:i A')}}--}}

{{----}}


text:
<?php

namespace SclZfCartTests\View\Helper;

use SclZfCart\View\Helper\Cart;

/**
 * Generated by PHPUnit_SkeletonGenerator 1.2.0 on 2013-02-16 at 14:18:26.
 */
class CartTest extends \PHPUnit_Framework_TestCase
{
    /**
     * @var Cart
     */
    protected $object;

    /**
     * @var \Zend\ServiceManager\ServiceLocatorInterface
     */
    protected $serviceLocator;

    /**
     * @var \Zend\View\HelperPluginManager
     */
    protected $helperPluginManager;

    /**
     * Sets up the fixture, for example, opens a network connection.
     * This method is called before a test is executed.
     */
    protected function setUp()
    {
        $this->serviceLocator = $this->getMock('Zend\ServiceManager\ServiceLocatorInterface');
        $this->helperPluginManager = $this->getMockBuilder('Zend\View\HelperPluginManager')
            ->disableOriginalConstructor()
            ->getMock();

        $this->object = new Cart;
    }

    /**
     * @covers SclZfCart\View\Helper\Cart::setServiceLocator
     * @covers SclZfCart\View\Helper\Cart::getServiceLocator
     * @covers SclZfCart\View\Helper\Cart::__invoke
     * @todo   Implement test__invoke().
     */
    public function test__invoke()
    {
        $cart = 'TestCartObject';

        $this->helperPluginManager->expects($this->once())
            ->method('getServiceLocator')
            ->will($this->returnValue($this->serviceLocator));

        $this->serviceLocator->expects($this->once())
            ->method('get')
            ->with($this->equalTo('SclZfCart\Cart'))
            ->will($this->returnValue($cart));

        $this->object->setServiceLocator($this->helperPluginManager);

        $this->assertEquals($cart, $this->object->__invoke(), 'Expected cart value does not match returned value');
    }
}


text:
import { Component, ElementRef, Input, ViewChild } from '@angular/core';
import {
  ISprkFooterGlobalLink,
  ISprkFooterLocalLinkColumn,
  ISprkFooterSocialLink,
  ISprkFooterAward,
  ISprkFooterBadgeLink,
  ISprkDisclaimerText,
  ISprkDisclaimerToggle,
} from './sprk-footer.interfaces';

@Component({
  selector: 'sprk-footer',
  template: `

              {{ globalHeading }}

                  <sprk-icon
                    *ngIf="item.icon"
                    iconType="{{ item.icon }}"
                    additionalClasses="{{ item.iconCSS }} sprk-c-Footer__icon"
                  ></sprk-icon>
                  {{
                    item.iconScreenReaderText
                  }}

                  <sprk-icon
                    *ngIf="item.icon"
                    iconType="{{ item.icon }}"
                    additionalClasses="{{ item.iconCSS }} sprk-c-Footer__icon"
                  ></sprk-icon>
                  {{
                    item.iconScreenReaderText
                  }}

                {{ item.text }}

                  {{ item.heading }}

                      {{ link.text }}

                      {{ link.text }}

                {{ connectHeading }}

                      <sprk-icon
                        *ngIf="item.icon"
                        iconType="{{ item.icon }}"
                        additionalClasses="{{
                          item.iconCSS
                        }} sprk-c-Footer__icon"
                      ></sprk-icon>
                      {{
                        item.iconScreenReaderText
                      }}

                      <sprk-icon
                        *ngIf="item.icon"
                        iconType="{{ item.icon }}"
                        additionalClasses="{{
                          item.iconCSS
                        }} sprk-c-Footer__icon"
                      ></sprk-icon>
                      {{
                        item.iconScreenReaderText
                      }}

                <ng-content select="[app-slot]"></ng-content>

              {{ awardsHeading }}

            <ng-content select="[additional-award-slot]"></ng-content>

              <sprk-toggle
                title="{{ toggle.title }}"
                analyticsString="{{
                  toggle.analytics || toggle.analyticsString
                }}"
                iconClass="sprk-c-Footer__icon"
                titleFontClass="sprk-b-TypeBodyFour sprk-c-Footer__trigger"
              >

                  {{ toggle.body }}

              </sprk-toggle>

              {{ disclaimer.text }}

            <ng-content select="[additional-disclaimer-slot]"></ng-content>

                <sprk-icon
                  *ngIf="item.icon"
                  iconType="{{ item.icon }}"
                  additionalClasses="{{ item.iconCSS }} sprk-c-Footer__icon"
                ></sprk-icon>
                {{
                  item.iconScreenReaderText
                }}

                <sprk-icon
                  *ngIf="item.icon"
                  iconType="{{ item.icon }}"
                  additionalClasses="{{ item.iconCSS }} sprk-c-Footer__icon"
                ></sprk-icon>
                {{
                  item.iconScreenReaderText
                }}

  `,
})
export class SprkFooterComponent {
  /**
   * Expects a space separated string
   * of classes to be added to the
   * component.
   */
  @Input()
  additionalClasses: string;
  /**
   * The value supplied will be assigned
   * to the `data-id` attribute on the
   * component. This is intended to be
   * used as a selector for automated
   * tools. This value should be unique
   * per page.
   */
  @Input()
  idString: string;
  /**
   * The heading for the "Global" section.
   */
  @Input()
  globalHeading: string;
  /**
   * The heading for the "Awards" section.
   */
  @Input()
  awardsHeading: string;
  /**
   * The heading for the "Connect With Us" section.
   */
  @Input()
  connectHeading: string;
  /**
   * Array of
   * [ISprkFooterGlobalLink](https://github.com/sparkdesignsystem/spark-design-system/blob/main/angular/projects/spark-angular/src/lib/components/sprk-footer/sprk-footer.interfaces.ts)
   *  used to build the
   * links in the "Global" section.
   */
  @Input()
  globalLinks: ISprkFooterGlobalLink[];
  /**
   * Array of
   * [ISprkFooterLocalLinkColumn](https://github.com/sparkdesignsystem/spark-design-system/blob/main/angular/projects/spark-angular/src/lib/components/sprk-footer/sprk-footer.interfaces.ts)
   *  used to build
   * the columns of links
   * in the "Site Links" section.
   */
  @Input()
  localLinks: ISprkFooterLocalLinkColumn[];
  /**
   * Array of
   * [ISprkFooterSocialLink](https://github.com/sparkdesignsystem/spark-design-system/blob/main/angular/projects/spark-angular/src/lib/components/sprk-footer/sprk-footer.interfaces.ts)
   *  used to build the
   * icon links in the "Connect With Us section".
   */
  @Input()
  socialLinks: ISprkFooterSocialLink[];
  /**
   * Array of
   * [ISprkFooterAward](https://github.com/sparkdesignsystem/spark-design-system/blob/main/angular/projects/spark-angular/src/lib/components/sprk-footer/sprk-footer.interfaces.ts)
   *  used to build the
   * awards in the "Awards" section.
   */
  @Input()
  awards: ISprkFooterAward[];
  /**
   * Array of
   * [ISprkFooterBadgeLink](https://github.com/sparkdesignsystem/spark-design-system/blob/main/angular/projects/spark-angular/src/lib/components/sprk-footer/sprk-footer.interfaces.ts)
   *  used to build the
   * icon links in the icon
   * section in the bottom
   * of the Footer.
   */
  @Input()
  badgeLinks: ISprkFooterBadgeLink[];
  /**
   * Array of
   * [ISprkDisclaimerText](https://github.com/sparkdesignsystem/spark-design-system/blob/main/angular/projects/spark-angular/src/lib/components/sprk-footer/sprk-footer.interfaces.ts)
   *  used to build disclaimer text in the
   * of the Footer.
   */
  @Input()
  disclaimerText: ISprkDisclaimerText[];
  /**
   * Array of
   * [ISprkDisclaimerToggle](https://github.com/sparkdesignsystem/spark-design-system/blob/main/angular/projects/spark-angular/src/lib/components/sprk-footer/sprk-footer.interfaces.ts)
   *  used to build
   * the disclamer toggle(s) in
   * the the Footer.
   */
  @Input()
  disclaimerToggle: ISprkDisclaimerToggle[];

  @ViewChild('app-slot', { static: false })
  appSlot: ElementRef;

  /**
   * @ignore
   */
  getClasses(): string {
    const classArray: string[] = [
      'sprk-o-CenteredColumn sprk-o-Stack sprk-o-Stack--misc-b sprk-c-Footer',
    ];

    if (this.additionalClasses) {
      this.additionalClasses.split(' ').forEach((className) => {
        classArray.push(className);
      });
    }

    return classArray.join(' ');
  }
}


text:
"""

    OpenAPI spec version:

    Generated by: https://github.com/swagger-api/swagger-codegen.git

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

        http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
"""

from pprint import pformat
from six import iteritems
import re

class V1Template(object):
    """
    NOTE: This class is auto generated by the swagger code generator program.
    Do not edit the class manually.
    """

    operations = [
        {
            'class': 'OapiV1',
            'type': 'create',
            'method': 'create_namespaced_template',
            'namespaced': True
        },
        {
            'class': 'OapiV1',
            'type': 'create',
            'method': 'create_template',
            'namespaced': False
        },
        {
            'class': 'OapiV1',
            'type': 'update',
            'method': 'replace_namespaced_template',
            'namespaced': True
        },
        {
            'class': 'OapiV1',
            'type': 'delete',
            'method': 'delete_namespaced_template',
            'namespaced': True
        },
        {
            'class': 'OapiV1',
            'type': 'read',
            'method': 'get_namespaced_template',
            'namespaced': True
        },
    ]

    # The key is attribute name
    # and the value is attribute type.
    swagger_types = {
        'kind': 'str',
        'api_version': 'str',
        'metadata': 'V1ObjectMeta',
        'objects': 'list[RuntimeRawExtension]',
        'parameters': 'list[V1Parameter]',
        'labels': 'object'
    }

    # The key is attribute name
    # and the value is json key in definition.
    attribute_map = {
        'kind': 'kind',
        'api_version': 'apiVersion',
        'metadata': 'metadata',
        'objects': 'objects',
        'parameters': 'parameters',
        'labels': 'labels'
    }

    def __init__(self, kind=None, api_version=None, metadata=None, objects=None, parameters=None, labels=None):
        """
        V1Template - a model defined in Swagger

        """

        self._kind = kind
        self._api_version = api_version
        self._metadata = metadata
        self._objects = objects
        self._parameters = parameters
        self._labels = labels

    @property
    def kind(self):
        """
        Gets the kind of this V1Template.
        Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/release-1.2/docs/devel/api-conventions.md#types-kinds

        :return: The kind of this V1Template.
        :rtype: str
        """
        return self._kind

    @kind.setter
    def kind(self, kind):
        """
        Sets the kind of this V1Template.
        Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/release-1.2/docs/devel/api-conventions.md#types-kinds

        :param kind: The kind of this V1Template.
        :type: str
        """

        self._kind = kind

    @property
    def api_version(self):
        """
        Gets the api_version of this V1Template.
        APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/release-1.2/docs/devel/api-conventions.md#resources

        :return: The api_version of this V1Template.
        :rtype: str
        """
        return self._api_version

    @api_version.setter
    def api_version(self, api_version):
        """
        Sets the api_version of this V1Template.
        APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/release-1.2/docs/devel/api-conventions.md#resources

        :param api_version: The api_version of this V1Template.
        :type: str
        """

        self._api_version = api_version

    @property
    def metadata(self):
        """
        Gets the metadata of this V1Template.
        Standard object's metadata.

        :return: The metadata of this V1Template.
        :rtype: V1ObjectMeta
        """
        return self._metadata

    @metadata.setter
    def metadata(self, metadata):
        """
        Sets the metadata of this V1Template.
        Standard object's metadata.

        :param metadata: The metadata of this V1Template.
        :type: V1ObjectMeta
        """

        self._metadata = metadata

    @property
    def objects(self):
        """
        Gets the objects of this V1Template.
        Objects is an array of objects to include in this template. Required.

        :return: The objects of this V1Template.
        :rtype: list[RuntimeRawExtension]
        """
        return self._objects

    @objects.setter
    def objects(self, objects):
        """
        Sets the objects of this V1Template.
        Objects is an array of objects to include in this template. Required.

        :param objects: The objects of this V1Template.
        :type: list[RuntimeRawExtension]
        """

        self._objects = objects

    @property
    def parameters(self):
        """
        Gets the parameters of this V1Template.
        Optional: Parameters is an array of Parameters used during the Template to Config transformation.

        :return: The parameters of this V1Template.
        :rtype: list[V1Parameter]
        """
        return self._parameters

    @parameters.setter
    def parameters(self, parameters):
        """
        Sets the parameters of this V1Template.
        Optional: Parameters is an array of Parameters used during the Template to Config transformation.

        :param parameters: The parameters of this V1Template.
        :type: list[V1Parameter]
        """

        self._parameters = parameters

    @property
    def labels(self):
        """
        Gets the labels of this V1Template.
        Labels is a set of labels that are applied to every object during the Template to Config transformation. Optional

        :return: The labels of this V1Template.
        :rtype: object
        """
        return self._labels

    @labels.setter
    def labels(self, labels):
        """
        Sets the labels of this V1Template.
        Labels is a set of labels that are applied to every object during the Template to Config transformation. Optional

        :param labels: The labels of this V1Template.
        :type: object
        """

        self._labels = labels

    def to_dict(self):
        """
        Returns the model properties as a dict
        """
        result = {}

        for attr, _ in iteritems(V1Template.swagger_types):
            value = getattr(self, attr)
            if isinstance(value, list):
                result[attr] = list(map(
                    lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
                    value
                ))
            elif hasattr(value, "to_dict"):
                result[attr] = value.to_dict()
            elif isinstance(value, dict):
                result[attr] = dict(map(
                    lambda item: (item[0], item[1].to_dict())
                    if hasattr(item[1], "to_dict") else item,
                    value.items()
                ))
            else:
                result[attr] = value

        return result

    def to_str(self):
        """
        Returns the string representation of the model
        """
        return pformat(self.to_dict())

    def __repr__(self):
        """
        For `print` and `pprint`
        """
        return self.to_str()

    def __eq__(self, other):
        """
        Returns true if both objects are equal
        """
        return self.__dict__ == other.__dict__

    def __ne__(self, other):
        """
        Returns true if both objects are not equal
        """
        return not self == other


text:
<?php

namespace Nette\Application\UI;

use Nette;

/**
 * Control is renderable Presenter component.
 *
 * @author     David Grudl
 *
 * @property-read Nette\Templating\ITemplate $template
 * @property-read string $snippetId
 */
abstract class Control extends PresenterComponent implements IRenderable
{
	/** @var Nette\Templating\ITemplate */
	private $template;

	/** @var array */
	private $invalidSnippets = array();

	/** @var bool */
	public $snippetMode;

	/********************* template factory ****************d*g**/

	/**
	 * @return Nette\Templating\ITemplate
	 */
	final public function getTemplate()
	{
		if ($this->template === NULL) {
			$value = $this->createTemplate();
			if (!$value instanceof Nette\Templating\ITemplate && $value !== NULL) {
				$class2 = get_class($value); $class = get_class($this);
				throw new Nette\UnexpectedValueException("Object returned by $class::createTemplate() must be instance of Nette\\Templating\\ITemplate, '$class2' given.");
			}
			$this->template = $value;
		}
		return $this->template;
	}

	/**
	 * @param  string|NULL
	 * @return Nette\Templating\ITemplate
	 */
	protected function createTemplate($class = NULL)
	{
		$template = $class ? new $class : new Nette\Templating\FileTemplate;
		$presenter = $this->getPresenter(FALSE);
		$template->onPrepareFilters[] = $this->templatePrepareFilters;
		$template->registerHelperLoader('Nette\Templating\Helpers::loader');

		// default parameters
		$template->control = $template->_control = $this;
		$template->presenter = $template->_presenter = $presenter;
		if ($presenter instanceof Presenter) {
			$template->setCacheStorage($presenter->getContext()->getService('nette.templateCacheStorage'));
			$template->user = $presenter->getUser();
			$template->netteHttpResponse = $presenter->getHttpResponse();
			$template->netteCacheStorage = $presenter->getContext()->getByType('Nette\Caching\IStorage');
			$template->baseUri = $template->baseUrl = rtrim($presenter->getHttpRequest()->getUrl()->getBaseUrl(), '/');
			$template->basePath = preg_replace('#https?://[^/]+#A', '', $template->baseUrl);

			// flash message
			if ($presenter->hasFlashSession()) {
				$id = $this->getParameterId('flash');
				$template->flashes = $presenter->getFlashSession()->$id;
			}
		}
		if (!isset($template->flashes) || !is_array($template->flashes)) {
			$template->flashes = array();
		}

		return $template;
	}

	/**
	 * Descendant can override this method to customize template compile-time filters.
	 * @param  Nette\Templating\Template
	 * @return void
	 */
	public function templatePrepareFilters($template)
	{
		$template->registerFilter($this->getPresenter()->getContext()->nette->createLatte());
	}

	/**
	 * Returns widget component specified by name.
	 * @param  string
	 * @return Nette\ComponentModel\IComponent
	 */
	public function getWidget($name)
	{
		trigger_error(__METHOD__ . '() is deprecated, use getComponent() instead.', E_USER_WARNING);
		return $this->getComponent($name);
	}

	/**
	 * Saves the message to template, that can be displayed after redirect.
	 * @param  string
	 * @param  string
	 * @return \stdClass
	 */
	public function flashMessage($message, $type = 'info')
	{
		$id = $this->getParameterId('flash');
		$messages = $this->getPresenter()->getFlashSession()->$id;
		$messages[] = $flash = (object) array(
			'message' => $message,
			'type' => $type,
		);
		$this->getTemplate()->flashes = $messages;
		$this->getPresenter()->getFlashSession()->$id = $messages;
		return $flash;
	}

	/********************* rendering ****************d*g**/

	/**
	 * Forces control or its snippet to repaint.
	 * @param  string
	 * @return void
	 */
	public function invalidateControl($snippet = NULL)
	{
		$this->invalidSnippets[$snippet] = TRUE;
	}

	/**
	 * Allows control or its snippet to not repaint.
	 * @param  string
	 * @return void
	 */
	public function validateControl($snippet = NULL)
	{
		if ($snippet === NULL) {
			$this->invalidSnippets = array();

		} else {
			unset($this->invalidSnippets[$snippet]);
		}
	}

	/**
	 * Is required to repaint the control or its snippet?
	 * @param  string  snippet name
	 * @return bool
	 */
	public function isControlInvalid($snippet = NULL)
	{
		if ($snippet === NULL) {
			if (count($this->invalidSnippets) > 0) {
				return TRUE;

			} else {
				$queue = array($this);
				do {
					foreach (array_shift($queue)->getComponents() as $component) {
						if ($component instanceof IRenderable) {
							if ($component->isControlInvalid()) {
								// $this->invalidSnippets['__child'] = TRUE; // as cache
								return TRUE;
							}

						} elseif ($component instanceof Nette\ComponentModel\IContainer) {
							$queue[] = $component;
						}
					}
				} while ($queue);

				return FALSE;
			}

		} else {
			return isset($this->invalidSnippets[NULL]) || isset($this->invalidSnippets[$snippet]);
		}
	}

	/**
	 * Returns snippet HTML ID.
	 * @param  string  snippet name
	 * @return string
	 */
	public function getSnippetId($name = NULL)
	{
		// HTML 4 ID & NAME: [A-Za-z][A-Za-z0-9:_.-]*
		return 'snippet-' . $this->getUniqueId() . '-' . $name;
	}

}