text:
package guest

import (
	"errors"
	"fmt"
	// "os"
	"sort"
	// "strconv"

	"github.com/dorzheh/deployer/builder/image"
	"github.com/dorzheh/deployer/config/xmlinput"
	"github.com/dorzheh/deployer/utils"
	"github.com/dorzheh/deployer/utils/hwinfo/host"
	"strings"
)

type NUMA struct {
	CellID   int
	MemoryMb int
	CPUPin   map[int][]int
	NICs     NICList
}

type Config struct {
	CPUs                      int
	RamMb                     int
	Storage                   *image.Config
	LargeHugePagesSupported   bool
	NUMAs                     []*NUMA
	HostNUMAIds               []int
	NICLists                  []NICList
	Networks                  []*xmlinput.Network
	OptimizationFailureMemory bool
	OptimizationFailureCPU    bool
	OptimizationFailureMsg    string
}

func NewConfig() *Config {
	c := new(Config)
	c.CPUs = 0
	c.RamMb = 0
	c.Storage = nil
	c.LargeHugePagesSupported = false
	c.NUMAs = make([]*NUMA, 0)
	c.HostNUMAIds = make([]int, 0)
	c.NICLists = make([]NICList, 0)
	c.Networks = make([]*xmlinput.Network, 0)
	c.OptimizationFailureMemory = false
	c.OptimizationFailureCPU = false
	return c
}

func (c *Config) SetTopologySingleVirtualNUMA(numas host.NUMANodes, singleNuma bool) error {
	// file, _ := os.Create("/tmp/1SetTopologyMultipleVirtualNUMAs.txt")
	// defer file.Close()
	// file.WriteString("SetTopologySingleVirtualNUMA\n")

	if c.CPUs == 0 {
		return errors.New("A data memeber (CPUs) is not initialized")
	}
	if c.RamMb == 0 {
		return errors.New("A data memeber (RamMb) is not initialized")
	}

	c.NUMAs = nil
	gn := new(NUMA)
	gn.CellID = 0
	gn.MemoryMb = c.RamMb
	gn.NICs = nil
	gn.CPUPin = make(map[int][]int, 0)
	nicNumaMapping, _ := numaNicsMapping(c, numas)

	for _, n := range numas {
		l, ok := nicNumaMapping[n.CellID]
		if ok {
			gn.NICs.AppendList(l)
		}
	}

	if singleNuma {
		// file.WriteString("SetTopologySingleVirtualNUMA singleNuma\n")
		cpusNuma0, err := numas.CpusOnNUMA(0)
		if err != nil {
			// file.WriteString("SetTopologySingleVirtualNUMA  cpusNuma0 err: " + err.Error() + "\n")
			return err
		}
		// file.WriteString("SetTopologySingleVirtualNUMA len(cpusNuma0): " + strconv.Itoa(len(cpusNuma0)) + "\n")
		// file.WriteString("SetTopologySingleVirtualNUMA c.CPUs: " + strconv.Itoa(c.CPUs) + "\n")
		if c.CPUs <= len(cpusNuma0) {
			// file.WriteString("c.CPUs <= len(cpusNuma0) \n")
			for i := 0; i < c.CPUs; i++ {
				gn.CPUPin[i] = append(gn.CPUPin[i], i)
			}

		} else {
			// file.WriteString("c.CPUs > len(cpusNuma0) \n")
			for i := 0; i < c.CPUs; i++ {
				gn.CPUPin[i] = append(gn.CPUPin[i], i)
			}
		}
		c.HostNUMAIds = []int{0}
	} else {
		// file.WriteString("SetTopologySingleVirtualNUMA not singleNuma\n")
		// file.WriteString("SetTopologySingleVirtualNUMA c.CPUs " + strconv.Itoa(c.CPUs) + "\n")
		for i := 0; i < c.CPUs; i++ {
			// file.WriteString("SetTopologySingleVirtualNUMA i: " + strconv.Itoa(i) + "\n")
			for _, n := range numas {
				gn.CPUPin[i] = append(gn.CPUPin[i], n.CPUs...)
				c.HostNUMAIds = append(c.HostNUMAIds, n.CellID)
			}
		}
	}

	c.NUMAs = append(c.NUMAs, gn)
	return nil
}

func (c *Config) SetTopologyMultipleVirtualNUMAs(numas host.NUMANodes) error {
	// file, _ := os.Create("/tmp/1SetTopologyMultipleVirtualNUMAs.txt")
	// defer file.Close()
	if c.CPUs == 0 {
		return errors.New("A data memeber (CPUs) is not initialized")
	}
	if c.RamMb == 0 {
		return errors.New("A data memeber (RamMb) is not initialized")
	}
	if len(c.NICLists) == 0 {
		return errors.New("A data memeber (NICLists) is not initialized")
	}
	// file.WriteString("SetTopologyMultipleVirtualNUMAs(): \n")

	if c.CPUs > numas.TotalCPUs() {
		// file.WriteString("c.CPUs > numas.TotalCPUs() \n")
		c.OptimizationFailureCPU = true
		c.OptimizationFailureMemory = true
		c.OptimizationFailureMsg = fmt.Sprintf("Amount of requested CPUs (%d) is greater than installed(%d).", c.CPUs, numas.TotalCPUs())
		return c.SetTopologySingleVirtualNUMA(numas, false)
	}

	nicNumaMapping, totalAmountOfPorts := numaNicsMapping(c, numas)
	if totalAmountOfPorts == 0 {
		// file.WriteString("totalAmountOfPorts == 0 \n")
		return c.SetTopologySingleVirtualNUMA(numas, true)
	}

	cellID := 0
	vcpuID := 0
	allocatedCpus := 0
	for _, n := range numas {
		// file.WriteString("n.CellID: (" + strconv.Itoa(n.CellID) + ") \n")
		if portsList, ok := nicNumaMapping[n.CellID]; ok {
			percentage, err := utils.FloatStringsSliceToInt(strings.Split(fmt.Sprintf("%0.1f", float32(len(portsList))*float32(100)/float32(totalAmountOfPorts)), "."))
			if err != nil {
				// file.WriteString("percentage, err " + err.Error() + " \n")
				return nil
			}

			amountOfMemoryMb, err := utils.FloatStringsSliceToInt(strings.Split(fmt.Sprintf("%0.1f", float32(c.RamMb)/float32(100)*float32(percentage)), "."))
			if err != nil {
				// file.WriteString("amountOfMemoryMb, err " + err.Error() + " \n")
				return err
			}

			amountOfCpus, err := utils.FloatStringsSliceToInt(strings.Split(fmt.Sprintf("%0.1f", float32(c.CPUs)/float32(100)*float32(percentage)), "."))
			if err != nil {
				// file.WriteString("amountOfCpus, err " + err.Error() + " \n")
				return err
			}
			// fmt.Printf("total amount of ports = %d\n", totalAmountOfPorts)
			// fmt.Printf("amount of ports on NUMA %d = %d\n", n.CellID, len(portsList))
			// fmt.Printf("percentage = %d\n", percentage)
			// fmt.Printf("amount of MemoryMb = %d\n", amountOfMemoryMb)
			// fmt.Printf("amount of CPUS = %d\n", amountOfCpus)
			// fmt.Printf("required CPUS = %d\n", c.CPUs)

			cpusOnNuma := len(n.CPUs)
			switch {
			case amountOfCpus > cpusOnNuma && amountOfMemoryMb > n.TotalRAM:
				c.OptimizationFailureCPU = true
				c.OptimizationFailureMemory = true
				c.OptimizationFailureMsg = fmt.Sprintf("Not enough CPUs and memory on NUMA %d (requested CPUs %d, installed CPUs %d\nrequested memory %dMB , installed %dMB).", n.CellID, amountOfCpus, cpusOnNuma, amountOfMemoryMb, n.TotalRAM)
				return c.SetTopologySingleVirtualNUMA(numas, false)
			case amountOfCpus > cpusOnNuma && amountOfMemoryMb <= n.TotalRAM:
				c.OptimizationFailureCPU = true
				c.OptimizationFailureMsg = fmt.Sprintf("%d CPUs are required on NUMA %d, but just %d CPUs are available.", amountOfCpus, n.CellID, cpusOnNuma)
				return c.SetTopologySingleVirtualNUMA(numas, false)
			case amountOfMemoryMb > n.TotalRAM && amountOfCpus <= cpusOnNuma:
				c.OptimizationFailureMemory = true
				c.OptimizationFailureMsg = fmt.Sprintf("Not enough memory on NUMA %d (requested memory %dMB , installed %dMB).", n.CellID, amountOfMemoryMb, n.TotalRAM)
				return c.SetTopologySingleVirtualNUMA(numas, true)
			case amountOfCpus == 0:
				c.OptimizationFailureCPU = true
				c.OptimizationFailureMsg = "The Virtual Machine is configured with a single vCPU."
				if amountOfMemoryMb > n.TotalRAM {
					c.OptimizationFailureMemory = true
				}
				return c.SetTopologySingleVirtualNUMA(numas, true)
			}

			gn := new(NUMA)
			gn.CellID = cellID
			gn.CPUPin = make(map[int][]int, 0)
			gn.NICs = portsList

			sort.Ints(n.CPUs)
			vcpusPerNUMA := len(n.CPUs[0:amountOfCpus])
			gn.MemoryMb = amountOfMemoryMb

			for x := 0; x < vcpusPerNUMA; x++ {
				gn.CPUPin[vcpuID] = append(gn.CPUPin[vcpuID], n.CPUs[x])
				vcpuID++
			}

			allocatedCpus += amountOfCpus
			c.NUMAs = append(c.NUMAs, gn)
			c.HostNUMAIds = append(c.HostNUMAIds, n.CellID)
			cellID++
		}
	}

	if allocatedCpus != c.CPUs {
		// file.WriteString("allocatedCpus != c.CPUs\n")
		c.OptimizationFailureCPU = true
		c.OptimizationFailureMsg = "Cannot distribute vCPUs among the vNUMAS."
		return c.SetTopologySingleVirtualNUMA(numas, false)
	}
	// file.WriteString("return nil\n")
	return nil
}

func (c *Config) ReconfigureMultipleVirtualNUMAs(numas host.NUMANodes) error {
	isZeroCPUPin := false

	if c.OptimizationFailureCPU != true && c.OptimizationFailureMemory != true {

		CellIDZeroCPUPin := 0
		for i, n := range c.NUMAs {
			if i > 2 {
				c.OptimizationFailureCPU = true
				c.OptimizationFailureMemory = true
				return c.SetTopologySingleVirtualNUMA(numas, false)
			} else if len(n.CPUPin) == 0 {
				// file.WriteString("SetTopologySingleVirtualNUMA n.CPUPin\n")
				isZeroCPUPin = true
				CellIDZeroCPUPin = n.CellID

			}
			// implement the memory reconfigure
		}

		if isZeroCPUPin {
			c.NUMAs[1].MemoryMb += c.NUMAs[0].MemoryMb
			c.NUMAs[0].MemoryMb = c.NUMAs[1].MemoryMb
			temp := c.NUMAs
			temp = append(temp[:CellIDZeroCPUPin], temp[CellIDZeroCPUPin+1:]...)
			c.NUMAs = temp
			c.NUMAs[0].CellID = 0
			c.HostNUMAIds = []int{0}

		}

	}
	return nil
}

func numaNicsMapping(c *Config, numas host.NUMANodes) (map[int][]*NIC, int) {
	nicNumaMapping := make(map[int][]*NIC)
	totalAmountOfPorts := 0

	for _, l := range c.NICLists {
		for _, n := range numas {
			pList := l.NicsByNUMAId(n.CellID)
			if pList.Length() > 0 {
				totalAmountOfPorts += pList.Length()
				nicNumaMapping[n.CellID] = append(nicNumaMapping[n.CellID], pList...)
			}
		}
	}
	return nicNumaMapping, totalAmountOfPorts
}


text:
import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;

public class tut11OyenteTeclado implements KeyListener {

	tut11JFrame juego;

	tut11OyenteTeclado(tut11JFrame passjuego){
		juego=passjuego;
	}

	@Override
	public void keyPressed(KeyEvent evento) {
		if(evento.getKeyCode()==KeyEvent.VK_LEFT){
			juego.mover_izquierda();
		}
		if(evento.getKeyCode()==KeyEvent.VK_RIGHT){
			juego.mover_derecha();
		}
		if(evento.getKeyCode()==KeyEvent.VK_UP){
			juego.mover_arriba();
		}
		if(evento.getKeyCode()==KeyEvent.VK_DOWN){
			juego.mover_abajo();
		}

	}

	@Override
	public void keyReleased(KeyEvent evento) {

	}

	@Override
	public void keyTyped(KeyEvent evento) {

	}

}

redpajama_set_name: RedPajamaGithub


text:
<?php

namespace Site\Controller;

use Api\Model\Shared\Rights\Domain;
use Api\Model\Shared\Rights\Operation;
use Api\Model\Shared\Dto\RightsHelper;
use Silex\Application;

class Script extends Base
{
    public function view(Application $app, $folder = '', $scriptName = '', $runType = 'test') {
        if (! file_exists("Api/Library/Shared/Script/$folder/$scriptName.php")) {
            $app->abort(404, $this->website->base); // this terminates PHP
        } else {
            $userId = (string) $app['session']->get('user_id');
            if (! RightsHelper::hasSiteRight($userId, Domain::PROJECTS + Operation::DELETE)) {
                $app->abort(403, 'You have insufficient privileges to run scripts'); // this terminates PHP
            } else {
                try {
                    $className = "Api\\Library\\Shared\\Script\\$folder\\$scriptName";
                    $script = new $className();

                    $this->data['scriptname'] = $className.'->run()';
                    $this->data['insert'] = '';
                    $this->data['output'] = '';
                    if (strtolower($folder) == 'control' and strtolower($scriptName) == 'panel') {
                        $this->data['insert'] .= $script->run($userId, $runType);
                    } else {
                        if ($runType != 'run') {
                            $this->data['output'] .= "--------------- THIS IS A TEST RUN - The database should not be modified ----------------\n\n";
                        }
                        $this->data['output'] .= $script->run($userId, $runType);
                    }

                    return $this->renderPage($app, 'textoutput');
                } catch (\Exception $e) {
                    $app->abort(500, "Looks like there was a problem with the script $className"); // this terminates PHP
                }
            }
        }
    }
}


text:
package org.apache.flink.runtime.rest.handler.job;

import org.apache.flink.api.common.time.Time;
import org.apache.flink.runtime.executiongraph.AccessExecution;
import org.apache.flink.runtime.executiongraph.AccessExecutionVertex;
import org.apache.flink.runtime.rest.handler.HandlerRequest;
import org.apache.flink.runtime.rest.handler.RestHandlerException;
import org.apache.flink.runtime.rest.handler.legacy.ExecutionGraphCache;
import org.apache.flink.runtime.rest.messages.EmptyRequestBody;
import org.apache.flink.runtime.rest.messages.JobIDPathParameter;
import org.apache.flink.runtime.rest.messages.JobVertexIdPathParameter;
import org.apache.flink.runtime.rest.messages.MessageHeaders;
import org.apache.flink.runtime.rest.messages.ResponseBody;
import org.apache.flink.runtime.rest.messages.SubtaskIndexPathParameter;
import org.apache.flink.runtime.rest.messages.job.SubtaskAttemptMessageParameters;
import org.apache.flink.runtime.rest.messages.job.SubtaskAttemptPathParameter;
import org.apache.flink.runtime.webmonitor.RestfulGateway;
import org.apache.flink.runtime.webmonitor.retriever.GatewayRetriever;

import org.apache.flink.shaded.netty4.io.netty.handler.codec.http.HttpResponseStatus;

import java.util.Map;
import java.util.concurrent.Executor;

/**
 * Base class for request handlers whose response depends on a specific attempt (defined via the
 * "{@link SubtaskAttemptPathParameter#KEY}" of a specific subtask (defined via the "{@link
 * SubtaskIndexPathParameter#KEY}" in a specific job vertex, (defined via the "{@link
 * JobVertexIdPathParameter#KEY}" parameter) in a specific job, defined via (defined via the "{@link
 * JobIDPathParameter#KEY}" parameter).
 *
 * @param <R> the response type
 * @param <M> the message parameters type
 */
public abstract class AbstractSubtaskAttemptHandler<
                R extends ResponseBody, M extends SubtaskAttemptMessageParameters>
        extends AbstractSubtaskHandler<R, M> {
    /**
     * Instantiates a new Abstract job vertex handler.
     *
     * @param leaderRetriever the leader retriever
     * @param timeout the timeout
     * @param responseHeaders the response headers
     * @param messageHeaders the message headers
     * @param executionGraphCache the execution graph cache
     * @param executor the executor
     */
    protected AbstractSubtaskAttemptHandler(
            GatewayRetriever<? extends RestfulGateway> leaderRetriever,
            Time timeout,
            Map<String, String> responseHeaders,
            MessageHeaders<EmptyRequestBody, R, M> messageHeaders,
            ExecutionGraphCache executionGraphCache,
            Executor executor) {

        super(
                leaderRetriever,
                timeout,
                responseHeaders,
                messageHeaders,
                executionGraphCache,
                executor);
    }

    @Override
    protected R handleRequest(
            HandlerRequest<EmptyRequestBody> request, AccessExecutionVertex executionVertex)
            throws RestHandlerException {
        final Integer attemptNumber = request.getPathParameter(SubtaskAttemptPathParameter.class);

        final AccessExecution currentAttempt = executionVertex.getCurrentExecutionAttempt();
        if (attemptNumber == currentAttempt.getAttemptNumber()) {
            return handleRequest(request, currentAttempt);
        } else if (attemptNumber >= 0 && attemptNumber < currentAttempt.getAttemptNumber()) {
            final AccessExecution execution =
                    executionVertex.getPriorExecutionAttempt(attemptNumber);

            if (execution != null) {
                return handleRequest(request, execution);
            } else {
                throw new RestHandlerException(
                        "Attempt "
                                + attemptNumber
                                + " not found in subtask "
                                + executionVertex.getTaskNameWithSubtaskIndex(),
                        HttpResponseStatus.NOT_FOUND);
            }
        } else {
            throw new RestHandlerException(
                    "Invalid attempt num " + attemptNumber, HttpResponseStatus.NOT_FOUND);
        }
    }

    /**
     * Called for each request after the corresponding {@link AccessExecution} has been retrieved
     * from the {@link AccessExecutionVertex}.
     *
     * @param request the request
     * @param execution the execution
     * @return the response
     * @throws RestHandlerException the rest handler exception
     */
    protected abstract R handleRequest(
            HandlerRequest<EmptyRequestBody> request, AccessExecution execution)
            throws RestHandlerException;
}


text:
<!doctype html>
<title>WebSockets: getting readyState in closing</title>

FAIL (script didn't run)


text:
package com.hp.autonomy.aci.content.fieldtext;

/**
 * An abstract base-class that partially implements the {@link FieldText} interface using sensible defaults. Under
 * specific circumstances, alternatives exist to subclassing {@code AbstractFieldText} directly:
 *
 *

 *
Subclassing {@link Specifier} for an individual fieldtext specifier.
 *
Making an immutable singleton, wrapped by {@link FieldTextWrapper}, if the expression is a constant.
 *

 *
 */
public abstract class AbstractFieldText implements FieldText {

    /**
     * Appends another fieldtext expression onto the end of this expression using the AND operator. The returned
     * {@link FieldText} object is equivalent to:
     *
     *
(this) AND (fieldText)

     *
     * @param fieldText A fieldtext expression or specifier.
     * @return The combined expression.
     */
    @Override
    public FieldText AND(final FieldText fieldText) {
        return new FieldTextBuilder(this).AND(fieldText);
    }

    /**
     * Appends another fieldtext expression onto the end of this expression using the OR operator. The returned
     * {@link FieldText} object is equivalent to:
     *
     *
(this) OR (fieldText)

     *
     * @param fieldText A fieldtext expression or specifier.
     * @return The combined expression.
     */
    @Override
    public FieldText OR(final FieldText fieldText) {
        return new FieldTextBuilder(this).OR(fieldText);
    }

    /**
     * Applies a NOT operator to this fieldtext. The returned {@link FieldText} object is equivalent to:
     *
     *
NOT (this)

     *
     * @return The negated fieldtext.
     */
    @Override
    public FieldText NOT() {
        return new FieldTextBuilder(this).NOT();
    }

    /**
     * Appends another fieldtext expression onto the end of this expression using the XOR operator. The returned
     * {@link FieldText} object is equivalent to:
     *
     *
(this) XOR (fieldText)

     *
     * @param fieldText A fieldtext expression or specifier.
     * @return The combined expression.
     */
    @Override
    public FieldText XOR(final FieldText fieldText) {
        return new FieldTextBuilder(this).XOR(fieldText);
    }

    /**
     * Appends another fieldtext expression onto the end of this expression using the WHEN operator. The returned
     * {@link FieldText} object is equivalent to:
     *
     *
(this) WHEN (fieldText)

     *
     * @param fieldText A fieldtext expression or specifier.
     * @return The combined expression.
     */
    @Override
    public FieldText WHEN(final FieldText fieldText) {
        return new FieldTextBuilder(this).WHEN(fieldText);
    }

    /**
     * Appends another fieldtext expression onto the end of this expression using the WHENn operator. The
     * returned {@link FieldText} object is equivalent to:
     *
     *
(this) WHENn (fieldText)

     *
     * @param depth The n in WHENn
     * @param fieldText A fieldtext expression or specifier.
     * @return The combined expression.
     */
    @Override
    public FieldText WHEN(final int depth, final FieldText fieldText) {
        return new FieldTextBuilder(this).WHEN(depth, fieldText);
    }

    /**
     * Simple implementation that tests for emptiness using {@code size() == 0}. In most cases this should be
     * overridden with a better implementation.
     *
     * @return {@code true} if and only if size is {@code 0}.
     */
    @Override
    public boolean isEmpty() {
        return size() == 0;
    }

    /**
     * Tests for equality of this object with another {@link FieldText} object.
     *
     * @param obj An object to test for equality.
     * @return {@code true} if and only if <tt>obj</tt> is a {@link FieldText} object with the same <tt>toString()</tt>
     * value as this object.
     */
    @Override
    public boolean equals(final Object obj) {
        return this == obj || obj instanceof FieldText && toString().equals(obj.toString());
    }

    /**
     * A suitable hash code based on the toString() method.
     *
     * @return A hash code.
     */
    @Override
    public int hashCode() {
        return toString().hashCode();
    }

    /**
     * Should return the {@code String} representation of the FieldText expression, exactly as it should be sent to
     * IDOL.
     *
     * @return The {@code String} representation.
     */
    @Override
    public abstract String toString();
}


text:
@import url('https://fonts.googleapis.com/css?family=Roboto:300,400,500&subset=latin-ext');

body{
  font-family: 'Roboto', sans-serif;
}


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

<meta http-equiv="Content-Type" content="text/html" charset="UTF-8">
<title>Uses of Class com.hazelcast.multimap.impl.MultiMapContainer (Hazelcast Root 3.3.3 API)</title>
<meta name="date" content="2014-11-12">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes

Uses of Class
com.hazelcast.multimap.impl.MultiMapContainer

Packages that use MultiMapContainer

Package
Description

com.hazelcast.multimap.impl

Contains classes for Hazelcast MultiMap module.

com.hazelcast.multimap.impl.operations

Contains operations for Hazelcast MultiMap module.

Uses of MultiMapContainer in com.hazelcast.multimap.impl

Methods in com.hazelcast.multimap.impl that return MultiMapContainer

Modifier and Type
Method and Description

MultiMapContainer
MultiMapPartitionContainer.getCollectionContainer(String name)

MultiMapContainer
MultiMapService.getOrCreateCollectionContainer(int partitionId,
                              String name)

MultiMapContainer
MultiMapPartitionContainer.getOrCreateMultiMapContainer(String name)

Uses of MultiMapContainer in com.hazelcast.multimap.impl.operations

Methods in com.hazelcast.multimap.impl.operations that return MultiMapContainer

Modifier and Type
Method and Description

MultiMapContainer
MultiMapOperation.getOrCreateContainer()

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes

Copyright © 2014 Hazelcast, Inc.. All Rights Reserved.


text:
package com.communote.server.core.common.velocity;

import java.io.IOException;
import java.util.Collection;

import org.codehaus.jackson.JsonGenerationException;
import org.codehaus.jackson.map.JsonMappingException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.communote.common.converter.CollectionConverter;
import com.communote.common.converter.Converter;
import com.communote.common.converter.IdentityConverter;
import com.communote.server.api.ServiceLocator;
import com.communote.server.api.core.application.CommunoteRuntime;
import com.communote.server.api.core.blog.BlogAccessException;
import com.communote.server.api.core.blog.BlogData;
import com.communote.server.api.core.blog.BlogManagement;
import com.communote.server.api.core.blog.BlogNotFoundException;
import com.communote.server.api.core.blog.BlogRightsManagement;
import com.communote.server.api.core.blog.MinimalBlogData;
import com.communote.server.api.core.blog.TopicPermissionManagement;
import com.communote.server.api.util.JsonHelper;
import com.communote.server.core.blog.BlogManagementException;
import com.communote.server.core.converter.blog.BlogToBlogDataConverter;
import com.communote.server.core.external.ExternalObjectManagement;
import com.communote.server.core.user.UserManagement;
import com.communote.server.core.user.helper.UserNameHelper;
import com.communote.server.model.blog.Blog;
import com.communote.server.model.blog.BlogRole;
import com.communote.server.model.blog.UserToBlogRoleMapping;
import com.communote.server.model.user.User;

/**
 * Topic specific tools.
 *
 * @author Communote GmbH - http://www.communote.com/
 */
public class TopicTool {

    /** Logger. */
    private static final Logger LOGGER = LoggerFactory.getLogger(TopicTool.class);

    /**
     * Return the details of a topic, the properties will not be contained.
     *
     * @param blogId
     *            the ID of the topic
     * @return a list item with details or null if the blog does not exist or the user is not
     *         allowed to read it
     */
    public BlogData getBlog(Number blogId) {
        BlogToBlogDataConverter<BlogData> converter = new BlogToBlogDataConverter<BlogData>(
                BlogData.class, false);
        try {
            // with the Number we are flexible towards IDs that were extracted from a JSON
            // object
            BlogData blog = ServiceLocator.findService(BlogManagement.class).getBlogById(
                    blogId.longValue(), converter);
            return blog;
        } catch (BlogManagementException e) {
            // silently ignore and treat as not found
            LOGGER.debug("Retrieving blog {} failed with exception: {}", blogId, e.getMessage());
        } catch (BlogAccessException e) {
            // silently ignore and treat as not found
            LOGGER.debug("Retrieving blog {} failed because current user has no access", blogId);
        }
        return null;
    }

    /**
     * @param blogId
     *            The id of the blog to test.
     * @return The role of the current user for the given blog, will be "NONE" if the blog does not
     *         exist or the user has no access.
     */
    public String getBlogRole(Long blogId) {
        if (blogId == null || blogId < 0) {
            return "NONE";
        }
        BlogRole roleOfCurrentUser = ServiceLocator.findService(BlogRightsManagement.class)
                .getRoleOfCurrentUser(blogId, false);
        if (roleOfCurrentUser != null) {
            return roleOfCurrentUser.getValue();
        }
        return "NONE";
    }

    /**
     * @return The default topic.
     */
    public Blog getDefaultBlog() {
        Long defaultBlogId = CommunoteRuntime.getInstance().getConfigurationManager()
                .getClientConfigurationProperties().getDefaultBlogId();
        if (defaultBlogId != null) {
            BlogManagement blogManagement = ServiceLocator.findService(BlogManagement.class);
            try {
                return blogManagement.getBlogById(defaultBlogId, true);
            } catch (BlogNotFoundException e) {
                // ignore
            } catch (BlogAccessException e) {
                // ignore
            }
        }
        return null;
    }

    /**
     * @return The id of the default blog, or empty string if there is none.
     */
    public Long getDefaultBlogId() {
        // TODO directly get the ID (without access check)?
        Blog defaultBlog = getDefaultBlog();
        if (defaultBlog == null) {
            return null;
        }
        return defaultBlog.getId();
    }

    /**
     * @return The role of the current user for the default blog. Result will be "NONE" if the user
     *         has no access to that topic.
     */
    public String getDefaultBlogRole() {
        Long defaultBlogId = getDefaultBlogId();
        return getBlogRole(defaultBlogId);
    }

    /**
     * Return the minimal set of information on a topic, even if the current user has no access to
     * the topic.
     *
     * @param blogId
     *            the ID of the topic
     * @return the blog details or null if the topic does not exist
     */
    public MinimalBlogData getMinimalBlogInfo(Number blogId) {
        return ServiceLocator.findService(BlogManagement.class).getMinimalBlogInfo(
                blogId.longValue());
    }

    /**
     * Method to get a list of users with the given role from the given topic.
     *
     * @param topicId
     *            The topics id.
     * @param role
     *            The role to get.
     * @return Collection of user names encapsulated in '
     *
     */
    public String getUsersWithRoleAsJson(long topicId, String role) {
        BlogRole topicRole = BlogRole.fromString(role);
        final UserManagement userManagement = ServiceLocator.findService(UserManagement.class);
        Collection<String> users = ServiceLocator.findService(BlogRightsManagement.class)
                .getMappedUsers(topicId, new CollectionConverter<UserToBlogRoleMapping, String>() {
                    @Override
                    public String convert(UserToBlogRoleMapping source) {
                        return UserNameHelper.getSimpleDefaultUserSignature(userManagement
                                .getUserById(source.getUserId(), new IdentityConverter<User>()));
                    }
                }, topicRole);
        try {
            return JsonHelper.getSharedObjectMapper().writeValueAsString(users).replace("\"", "'");
        } catch (JsonGenerationException e) {
            LOGGER.error(e.getMessage());
        } catch (JsonMappingException e) {
            LOGGER.error(e.getMessage());
        } catch (IOException e) {
            LOGGER.error(e.getMessage());
        }
        return "[]";
    }

    /**
     * @param topicId
     *            The topics id.
     * @return True, if the topic has children, else false.
     */
    public boolean hasChildren(Long topicId) {
        Boolean result = null;
        if (topicId != null) {
            try {
                result = ServiceLocator.findService(BlogManagement.class).getBlogById(topicId,
                        new Converter<Blog, Boolean>() {
                            @Override
                            public Boolean convert(Blog source) {
                                return !source.getChildren().isEmpty();
                            }
                        });
            } catch (BlogAccessException e) {
                // silently ignore
                LOGGER.debug("Current user has no access to topic {}", topicId);
            }
        }
        return result != null && result;
    }

    /**
     * Set the external objects for this blog.
     *
     * @param blogId
     *            The blogs id.
     * @return List of external objects.
     */
    public boolean hasExternalObjects(Long blogId) {
        try {
            if (blogId != null) {
                return ServiceLocator.findService(ExternalObjectManagement.class)
                        .hasExternalObjects(blogId);
            }
        } catch (BlogNotFoundException e) {
            // not implemented
        } catch (BlogAccessException e) {
            // not implemented
        }
        return false;
    }

    /**
     * Can be used to check if the current user has a specific permission on a given blog.
     *
     * @param topicId
     *            The topics id.
     * @param permissionIdentifier
     *            The permission as String.
     * @return True, if the current user has the given permission on the given blog.
     */
    public boolean hasPermission(long topicId, String permissionIdentifier) {
        return ServiceLocator.findService(TopicPermissionManagement.class).hasPermission(topicId,
                permissionIdentifier);
    }

    /**
     * @param readAccessRequired
     *            if true the default blog will only be enabled if the current user has read access
     *            to that blog
     * @param writeAccessRequired
     *            if true the default blog will only be enabled if the current user has write access
     *            to that blog
     * @return whether the default blog is enabled and the given access is granted for the current
     *         user
     */
    public boolean isDefaultBlogEnabled(boolean readAccessRequired, boolean writeAccessRequired) {
        boolean enabled = CommunoteRuntime.getInstance().getConfigurationManager()
                .getClientConfigurationProperties().isDefaultBlogEnabled();
        if (enabled && (readAccessRequired || writeAccessRequired)) {
            Blog defaultBlog = getDefaultBlog();
            // if null, current user no read access
            if (defaultBlog == null) {
                enabled = false;
            } else if (writeAccessRequired) {
                enabled = ServiceLocator.findService(BlogRightsManagement.class)
                        .currentUserHasWriteAccess(defaultBlog.getId(), false);
            }
        }
        return enabled;
    }
}


text:
static RenderList *s_instance = NULL;

RenderList::RenderList(){

}

RenderList *RenderList::Instance(){
	if(s_instance == NULL)
		s_instance = new RenderList();

	return s_instance;
}

void RenderList::update(){

}

void RenderList::renderList(Camera camera){
	for(int i = 0; i < m_objects.size(); ++i){
		RenderObject obj = m_objects[i];
		RenderManager::drawModel(*obj.model, *obj.material, camera, obj.transform);
		//std::cout<<"Rendered an object\n";
	}

	m_objects.clear();
}

void RenderList::add(Model *model, Material *material, glm::mat4 transform){
	RenderObject obj;
	obj.model = model;
	obj.material = material;
	obj.transform = transform;

	//std::cout<<"Added to list\n";

	m_objects.push_back(obj);
}


text:
/************************************************************************/
/*                                                                      */
/*  SPI.h	--	Interface Declarations for SPI.cpp                      */
/*                                                                      */
/************************************************************************/
/*  Author: Oliver Jones                                                */
/*  Copyright (c) 2011, Digilent. All rights reserved.                  */
/*                                                                      */
/*	Based on original work Copyright (c) 2010 by Cristian Maglie        */
/************************************************************************/
/*  File Description:													*/
/*                                                                      */
/*  This file contains declarations need to use the chipKIT standard    */
/*  SPI library in SPI.CPP.                                             */
/*                                                                      */
/************************************************************************/
/*  Revision History:													*/
/*                                                                      */
/*  08/20/2011(GeneApperson): revised to fix build problems introduced  */
/*      by the initial port of the original Arduino library. Changed    */
/*       all use of the types BYTE and WORD to uint8_t and uint16_t.    */
/*	10/28/2011(GeneApperson): revised for new board variant scheme, and	*/
/*		fixed bug in clock divider values so that they produce the same	*/
/*		SPI clock frequency on PIC32 as they do on AVR.					*/
/*	05/27/2013(ClaudiaGoga): added PPS support for PIC32MX1 and PIC32MX2*/
/*                                                                      */
/************************************************************************/
/*
  This library is free software; you can redistribute it and/or
  modify it under the terms of the GNU Lesser General Public
  License as published by the Free Software Foundation; either
  version 2.1 of the License, or (at your option) any later version.

  This library is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  Lesser General Public License for more details.

  You should have received a copy of the GNU Lesser General Public
  License along with this library; if not, write to the Free Software
  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA

*/
/************************************************************************/

#if !defined(_SPI_H_INCLUDED)
#define _SPI_H_INCLUDED

#define __LANGUAGE_C__

#include <stdio.h>
#include <WProgram.h>

#include <p32_defs.h>

/*	SPIxCON
*/
#define _SPICON_ON		15
#define _SPICON_SMP		9
#define	_SPICON_CKE		8
#define _SPICON_CKP		6
#define _SPICON_MSTEN	5

/*	SPIxSTAT
*/
#define	_SPISTAT_SPIROV	6
#define	_SPISTAT_SPITBE	3
#define _SPISTAT_SPIRBF	0

/********************************/
/* The following values produce the same SPI clock rate that is
** obtained on a 16Mhz AVR assuming that the PIC32 peripheral
** bus clock is operating at 80Mhz
*/
#define SPI_CLOCK_DIV2		4		// 8 Mhz
#define SPI_CLOCK_DIV4		9		// 4 Mhz
#define SPI_CLOCK_DIV8		19		// 2 Mhz
#define SPI_CLOCK_DIV16		39		// 1 Mhz
#define SPI_CLOCK_DIV32		79		// 500 Khz
#define SPI_CLOCK_DIV64		159		// 250 Khz
#define SPI_CLOCK_DIV128	319		// 125 Khz

/* The following produce an equivlalent operating mode as these
** symbols specify on the AVR part in Arduino
*/
#define SPI_MODE0 0x100		// CKP = 0 CKE = 1
#define SPI_MODE1 0x00		// CKP = 0 CKE = 0
#define SPI_MODE2 0x140		// CKP = 1 CKE = 1
#define SPI_MODE3 0x40		// CKP = 1 CKE = 0

class SPIClass {
private:
	static p32_spi *	spi;
	static p32_regset *	iec;
	static p32_regset *	ifs;
	static int			irq;
	static int			vec;

// Code for PPS support
#if defined(__PIC32MX1XX__) || defined(__PIC32MX2XX__) || defined(__PIC32MZXX__)
	static uint8_t			pinMISO;		//digital pin number for MISO
	static uint8_t			pinMOSI;		//digital pin number for MOSI
	static ppsFunctionType	ppsMISO;		//PPS select for SPI MISO
	static ppsFunctionType	ppsMOSI;		//PPS select for SPI MOSI
#endif

public:
// Code for PPS support
#if defined(__PIC32MX1XX__) || defined(__PIC32MX2XX__) || defined(__PIC32MZXX__)
	SPIClass(p32_spi * spiP, int irgP, int vecP, int pinMI, int pinMO, ppsFunctionType ppsMI, ppsFunctionType ppsMO);
#else
	SPIClass(p32_spi * spiP, int irqP, int vecP);
#endif

  inline static uint8_t transfer(uint8_t _data);

  // SPI Configuration methods

  inline static void attachInterrupt();
  inline static void detachInterrupt(); // Default

  static void begin();					// Default
  static void end();

  static void setBitOrder(uint8_t);
  static void setDataMode(uint16_t);
  static void setClockDivider(uint16_t);
};

extern SPIClass SPI;

/* SPIClass inline functions definitions
*/
uint8_t SPIClass::transfer(uint8_t _data)
{
	while ((spi->sxStat.reg & (1 << _SPISTAT_SPITBE)) == 0 );
	spi->sxBuf.reg = _data;

	while ((spi->sxStat.reg & (1 << _SPISTAT_SPIRBF)) == 0 );
	return spi->sxBuf.reg;
}

void SPIClass::attachInterrupt()
{
	/* Enable transmit and receive interrupts
	*/
	iec->set = ((1 << ((irq+1) % 32)) | (1 << ((irq+2) % 32)));
}

void SPIClass::detachInterrupt()
{
	/* Disable transmit and receive interrupts
	*/
	iec->clr = ((1 << ((irq+1) % 32)) | (1 << ((irq+2) % 32)));
}

#endif


text:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>io.preuss</groupId>
    <artifactId>pay4day</artifactId>
    <version>5.0-SNAPSHOT</version>

    <name>Pay4Day</name>

    <properties>
        <spigot.version>1.12-R0.1-SNAPSHOT</spigot.version>
    </properties>

    <repositories>
        <repository>
            <id>spigot-repo</id>
            <url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
        </repository>
        <repository>
            <id>vault-repo</id>
            <url>http://nexus.hc.to/content/repositories/pub_releases</url>
        </repository>
    </repositories>

    <dependencies>
        <!-- Spigot API -->
        <dependency>
            <groupId>org.spigotmc</groupId>
            <artifactId>spigot-api</artifactId>
            <version>${spigot.version}</version>
            <scope>provided</scope>
        </dependency>
        <!-- VaultAPI -->
        <dependency>
            <groupId>net.milkbowl.vault</groupId>
            <artifactId>VaultAPI</artifactId>
            <version>1.6</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>

    <build>
        <finalName>${project.name}-${project.version}-without-dependencies</finalName>
        <sourceDirectory>src/main/java</sourceDirectory>
        <resources>
            <resource>
                <targetPath>.</targetPath>
                <filtering>true</filtering>
                <directory>${basedir}/src/main/resources/</directory>
                <includes>
                    <include>plugin.yml</include>
                </includes>
            </resource>
        </resources>
        <plugins>
            <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <version>2.2-beta-4</version>
                <executions>
                    <execution>
                        <id>jar-with-dependencies</id>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                        <configuration>
                            <descriptorRefs>
                                <descriptorRef>jar-with-dependencies</descriptorRef>
                            </descriptorRefs>
                            <finalName>${project.name}-${project.version}</finalName>
                            <appendAssemblyId>false</appendAssemblyId>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                </configuration>
            </plugin>
        </plugins>
        <extensions>
            <extension>
                <groupId>org.apache.maven.wagon</groupId>
                <artifactId>wagon-ftp</artifactId>
                <version>1.0-alpha-6</version>
            </extension>
        </extensions>
    </build>
</project>


text:
import os
from setuptools import setup
from pystatsd import VERSION

def read(fname):
    return open(os.path.join(os.path.dirname(__file__), fname)).read()

setup(
    name = "pystatsd",
    version=".".join(map(str, VERSION)),
    author = "Steve Ivy",
    author_email = "steveivy@gmail.com",
    description = ("pystatsd is a client for Etsy's statsd server, a front end/proxy for the Graphite stats collection and graphing server."),
    url='https://github.com/sivy/py-statsd',
    license = "BSD",
    packages=['pystatsd'],
    long_description=read('README.md'),
    classifiers=[
        "License :: OSI Approved :: BSD License",
    ],
    scripts=['bin/pystatsd-server']
)


text:
<?php

namespace MerciKI;

class Config {

    /**
     * Active ou non le debug de l'application
     */
    public static $debug = false;

    /**
     * Information de connexion à la base de données.
     */
    public static $databases = [];

    /**
     * Encode type of the page.
     */
    public static $encoding = 'utf8';

    /**
     * Caractère de séparation des vars de type argument
     */
    public static $arg_separateur = '=';

    /**
     * Root adresse for the website. ex : /mywebsite
     */
    public static $root = "/";

    /**
     * Configuration of the Authentification.
     */
    public static $auth_model = [
        //'model' => 'User',
        //'DAO'   => 'PDO'
    ];

    /**
     * Configuration of the application
     */
    public static $app = [
        /**
         * Directory of the application
         */
        'directory' => 'src',

        /**
         * Namespace of the application
         */
        'namespace' => 'MerciKI\\App\\'
    ];

}


text:
<?xml version="1.0" encoding="UTF-8"?>
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
    <test name="ImageTypesSettingsTest">
        <annotations>
            <features value="Dotdigital module"/>
            <stories value="Test dotdigital image types settings"/>
            <title value="Test images types settings page"/>
            <description value="The dotdigital image types section can be viewed, and values stored."/>
            <severity value="MINOR"/>
            <group value="dotmailer"/>
            <testCaseId value="BUNDLE-2859"/>
        </annotations>

        <before>
            <actionGroup ref="AdminLoginActionGroup" stepKey="AdminLoginActionGroup1"/>
            <actionGroup ref="SetDotmailerAccountData" stepKey="SetDotmailerAccountData"/>
        </before>

        <after>
            <actionGroup ref="ResetImageTypeSettings" stepKey="ResetImageTypeSettings"/>
            <actionGroup ref="ResetDotmailerAccountData" stepKey="resetAccountData"/>
            <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
        </after>

        <amOnPage url="{{AdminDotmailerConfigurationPage.url}}" stepKey="amOnConfigurationPage"/>
        <waitForPageLoad stepKey="waitForPageLoad"/>

        <conditionalClick stepKey="expandImageTypesTab" selector="{{AdminConfigurationImageTypesSection.fieldsetToggle}}" dependentSelector="{{AdminConfigurationImageTypesSection.fieldset}}" visible="false"/>

        <!-- Confirm That Fields Exist -->
        <seeElement selector="{{AdminConfigurationImageTypesSection.catalogSyncSelect}}" stepKey="seeCatalogSyncSelect"/>
        <seeElement selector="{{AdminConfigurationImageTypesSection.abandonedCartSelect}}" stepKey="seeAbandonedCartSelect"/>
        <seeElement selector="{{AdminConfigurationImageTypesSection.abandonedBrowseSelect}}" stepKey="seeAbandonedBrowseSelect"/>
        <seeElement selector="{{AdminConfigurationImageTypesSection.dynamicContentSelect}}" stepKey="seeDynamicContentSelect"/>

        <!-- Confirm that values are Default -->
        <seeOptionIsSelected selector="{{AdminConfigurationImageTypesSection.catalogSyncSelect}}" userInput="Default" stepKey="seeDefaultForCatalogSyncSelect"/>
        <seeOptionIsSelected selector="{{AdminConfigurationImageTypesSection.abandonedCartSelect}}" userInput="Default" stepKey="seeDefaultForAbandonedCartSelect"/>
        <seeOptionIsSelected selector="{{AdminConfigurationImageTypesSection.abandonedBrowseSelect}}" userInput="Default" stepKey="seeDefaultForAbandonedBrowseSelect"/>
        <seeOptionIsSelected selector="{{AdminConfigurationImageTypesSection.dynamicContentSelect}}" userInput="Default" stepKey="seeDefaultForDynamicContentSelect"/>

        <!-- Change some values -->
        <selectOption selector="{{AdminConfigurationImageTypesSection.catalogSyncSelect}}" userInput="{{ImageType.imageId}}" stepKey="setProductSmallImageForCatalogSync"/>
        <selectOption selector="{{AdminConfigurationImageTypesSection.abandonedCartSelect}}" userInput="{{ImageType.imageId}}" stepKey="setProductSmallImageForAbandonedCartSelect"/>
        <selectOption selector="{{AdminConfigurationImageTypesSection.abandonedBrowseSelect}}" userInput="{{ImageType.imageId}}" stepKey="setProductSmallImageForAbandonedBrowseSelect"/>
        <selectOption selector="{{AdminConfigurationImageTypesSection.dynamicContentSelect}}" userInput="{{ImageType.imageId}}" stepKey="setProductSmallImageForDynamicContentSelect"/>

        <!-- Save options -->
        <click selector="{{AdminConfigurationImageTypesSection.configurationSectionSaveButton}}" stepKey="clickSave"/>

        <!-- Confirm values are updated -->
        <seeOptionIsSelected selector="{{AdminConfigurationImageTypesSection.catalogSyncSelect}}" userInput="{{ImageType.imageId}}" stepKey="seeUpdatedSelectionForCatalogSyncSelect"/>
        <seeOptionIsSelected selector="{{AdminConfigurationImageTypesSection.abandonedCartSelect}}" userInput="{{ImageType.imageId}}" stepKey="seeUpdatedSelectionForAbandonedCartSelect"/>
        <seeOptionIsSelected selector="{{AdminConfigurationImageTypesSection.abandonedBrowseSelect}}" userInput="{{ImageType.imageId}}" stepKey="seeUpdatedSelectionForAbandonedBrowseSelect"/>
        <seeOptionIsSelected selector="{{AdminConfigurationImageTypesSection.dynamicContentSelect}}" userInput="{{ImageType.imageId}}" stepKey="seeUpdatedSelectionForDynamicContentSelect"/>
    </test>
</tests>


text:
Replica of [GeoNet iOS app](https://itunes.apple.com/nz/app/geonet-quake/id533054360?mt=8), without scaling up on iPhone 6 and later device.

## Features

- [x] Notification center extension - _Additional feature_
- [x] Quakes
- [x] Volcanoes
- [x] News
- [ ] Shaking map
- [ ] Report shaking

## Data

All data used in this application are from the awesome [GeoNet](https://www.geonet.org.nz/).

## License

This application is released under [MIT License](LICENSE).


text:
<!DOCTYPE html>

	<title>Raffle Winners - MD Laser Skin Clinic</title>
	<meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">

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

    <link href="css/winners-page.css" rel="stylesheet">

   <link href="https://fonts.googleapis.com/css?family=Alegreya+Sans+SC|Open+Sans" rel="stylesheet">

 Congratulations to our 4 Grand Prize Winners of our 2016 Open House Raffle. The winners have a choice of either FREE 50 units of Botox Cosemetic, or a syringe of Juvederm! Here's what they have to say...

Renee J.

				"I have been a client for many years and have referred 4 of my friends. We are all thrilled with the results!"

Jacqualyn S.

				"I'm very pleased at the work I've had done at this clinic since coming for the last two years."

Renee E.

				"I've always had excellent experiences at MD Laser Skin Clinic.  Not only is Dr. Lo professional, helpful and thorough, the staff is always efficient and friendly.  I am a loyal and satisfied client."

Layla J. H.

				"The best experience. Never had a problem with the service. Very satisfied with everything. Dr. Lo is the best."


text:
// ----------------------------------------------------------------------------------
//
// Copyright Microsoft Corporation
// 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.
// ----------------------------------------------------------------------------------

namespace Microsoft.Azure.Commands.StorageSync.Evaluation.Interfaces
{
    public interface IProgressReporter
    {
        void AddSteps(long count);
        void ReserveSteps(long count);
        void ResetSteps(long count);
        void Show();
        void CompleteStep();
        void Complete();
    }
}


text:
import React from 'react';

//There are some limitations to hot-reloading, stateless function components don't
//hot-reload unless they have a parent class based component
//which is why HomePage is a class based component

class HomePage extends React.Component {
    render() {
        return (

Welcome!

This is the React Redux Starter kit,
                            you can use this starter kit to begin
                            your adventures with React, Redux, Bootstrap 4, Webpack 2, and React-Router!

        );
    }
}

export default HomePage;


text:
[![Stories in Ready](https://badge.waffle.io/universityofderby/chef-autofs.png?label=ready&title=Ready)](https://waffle.io/universityofderby/chef-autofs)
AutoFS Cookbook
===============

[![Join the chat at https://gitter.im/universityofderby/chef-autofs](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/universityofderby/chef-autofs?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Build
Status](https://travis-ci.org/universityofderby/chef-autofs.svg?branch=master)](https://travis-ci.org/universityofderby/chef-autofs)

The AutoFS cookbook is a library cookbook that provides resource primitives for
use in recipes.

Scope
-----
This cookbook configures clients that use autofs
See: http://linux.die.net/man/8/automount

This cookbook does not concern itself with managing an NFS server.

Requirements
------------
- Chef 12.0.3 or higher
- Ruby 1.9 or higher (preferably from the Chef full-stack installer)
- Network accessible package repositories

 Platform
---------
* Debian, Ubuntu
* CentOS, Red Hat

Usage
=====

Resources
=========

Add entries directly to auto.master
```
automaster_entry '/smb' do
  map '/etc/auto.smb'
  options '--timeout 600'
end
```

Add entries to custom autofs map file
```
map_entry 'homes' do
  location '://smb-server:directory'
  fstype 'smb'
  options 'rw'
  map '/etc/auto.smb'
end
```

Nfs resource with default entries for map & auto.master
```
nfs '/mnt/nfs' do
  server 'nfsserver'
  export '/example/remote_path/'
  options 'sync'
end
```

License and Author
==================

* Author: Dan Webb (<dan.webb@damacus.io>)
* Author: Luke Bradbury (<luke@nqyr.io>)
* Author: Richard Lock (<r.j.lock@derby.ac.uk>)
* Author: James E. Flemer (<james.flemer@ndpgroup.com>)

Copyright: 2016, University of Derby

Copyright: 2018, NDP, LLC

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.


text:
package edu.emich.honors.emuhonorscollege.datatypes;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.LinkedList;

public class Requirement implements Serializable {
    private String name;
    private String description;
    private ArrayList<Requirement> components;
    private boolean completed;
    private int numberOfCompleted;
    private int numberRequiredForCompletion;
    private int hierarchyLevel;
    private LinkedList<String> coachingSteps;
    private LinkedList<String> persistentCoachingSteps;
    private boolean isInProgress = false;
    private Requirement parentRequirement;

    public Requirement() {
        this.name = "";
        this.description = "";
        this.components = new ArrayList<>();
        this.completed = false;
        this.numberOfCompleted = 0;
        this.numberRequiredForCompletion = 1;
        this.hierarchyLevel = 0;
        this.coachingSteps = new LinkedList<>();
        this.persistentCoachingSteps = new LinkedList<>();
        this.parentRequirement = null;
    }

    public Requirement(String requirementName,
                       int numberRequiredForCompletion,
                       LinkedList<String> coachingSteps) {
        this();
        this.name = requirementName;
        this.numberRequiredForCompletion = numberRequiredForCompletion;
        this.coachingSteps = coachingSteps;
        this.persistentCoachingSteps = new LinkedList<>(coachingSteps);
    }

    public String getName() {
        return name;
    }

    public String getDescription() {
        return description;
    }

    public int getNumberOfCompleted() {
        return numberOfCompleted;
    }

    public void setNumberOfCompleted(int numberOfCompleted) {
        this.numberOfCompleted = numberOfCompleted;
        completed = (this.getNumberOfCompleted() >= this.getNumberRequiredForCompletion());
    }

    public int getNumberRequiredForCompletion() {
        return numberRequiredForCompletion;
    }

    public boolean hasComponent() {
        return !this.getComponents().isEmpty();
    }

    public ArrayList<Requirement> getComponents() {
        return components;
    }

    public boolean isCompleted() {
        boolean isCompleteFlag = true;

        if (this.hasComponent()) {
            for (Requirement component : components) {
                if (!component.isCompleted()) {
                    isCompleteFlag = false;
                    break;
                }
            }
        } else {
            isCompleteFlag = completed;
        }

        return isCompleteFlag;
    }

    public void setCompleted(boolean completed) {
        this.completed = completed;
        if (this.hasParentRequirement()) {
            this.getParentRequirement().isInProgress();
        }
    }

    public void addComponent(Requirement componentToAdd) {
        componentToAdd.setParentRequirement(this);
        componentToAdd.hierarchyLevel++;
        components.add(componentToAdd);
    }

    public LinkedList<String> getCoachingSteps() {
//        LinkedList<String> coachingStepsCopy = new LinkedList<>(coachingSteps);
        return coachingSteps;
    }

    public int getHierarchyLevel() {
        return hierarchyLevel;
    }

    public boolean isInProgress() {
        if (this.isCompleted())
            return false;

        if (this.hasComponent()) {
            for (Requirement component : components) {
                if (component.isCompleted()) {
                    return true;
                }
            }
        }

        return false;  // Can't be in progress if no components

    }

    public void setInProgress(boolean isInProgress) {
        this.isInProgress = isInProgress;
    }

    public boolean hasParentRequirement() {
        return parentRequirement != null;
    }

    public Requirement getParentRequirement() {
        return parentRequirement;
    }

    private void setParentRequirement(Requirement parentRequirement) {
        this.parentRequirement = parentRequirement;
    }

    public void resetCoachingSteps() {
        this.coachingSteps = new LinkedList<>(persistentCoachingSteps);
    }

    public void resetProgress() {
        this.completed = false;
        this.isInProgress = false;
        this.numberOfCompleted = 0;
        resetCoachingSteps();
    }
}