text:
//engine: JScript
//uname: AnalizeEventSubscript
//dname: Анализ подписок на события
//help: inplace
//author: orefkov
//descr: Скрипт, показывающий отчет по подпискам на события объектов метаданных
//addin: global
//addin: stdlib
//addin: stdcommands

/*@
Небольшой скрипт, консолидированно показывающий подписки на события объектов метаданных.
Подписки группируются по объекту метаданных, виду подписки.
Позволяет быстро перейти к объектам метаданных и к обработчику подписки.
@*/

global.connectGlobals(SelfScript)

var form = loadScriptForm(SelfScript.fullPath.replace(/js$/, 'ssf'), SelfScript.self);
form.Результат.Columns.Add("mdobj");

function ТаблицаПодписок() {
    var vt = v8New("ТаблицаЗначений");
    vt.Колонки.Добавить("Метаданные");
    vt.Колонки.Добавить("Объект");
    vt.Колонки.Добавить("Имя");
    vt.Колонки.Добавить("Событие");
    vt.Колонки.Добавить("Обработчик");
    vt.Колонки.Добавить("mdobj");
    vt.Колонки.Добавить("event");

    var choice = v8New("СписокЗначений");
    for (var i = 0, c = metadata.openedCount; i < c; i++) {
        var container = metadata.getContainer(i);
        try {
            if (container.rootObject.childObjectsCount("ПодпискиНаСобытия") > 0)
                choice.Add(container, container.identifier, false, container.rootObject.picture);
        } catch (e) { }
    }
    if (choice.Count() == 0) {
        MessageBox("Нет конфигураций с подписками");
        return null;
    } else if (choice.Count() == 1)
        choice = choice.Get(0);
    else
        choice = choice.ChooseItem("Выберите конфигурацию для отчета");
    if (!choice)
        return null;
    var container = choice.Value;
    var mdObj = container.rootObject;
    //debugger
    for (var i = 0, c = mdObj.childObjectsCount("ПодпискиНаСобытия") ; i < c; i++) {
        var event = mdObj.childObject("ПодпискиНаСобытия", i)
        var typeString = ЗначениеВСтрокуВнутр(event.property("Источник"))
        var typesUUIDs = typeString.replace(/\n/g, "").replace(/\{"#",f5c65050-3bbb-11d5-b988-0050bae0a95d,\{"Pattern",|\}\}|"#",/g, '').split(',')
        for (var idx in typesUUIDs) {
            var obj = container.findByTypeUUID(typesUUIDs[idx])
            var mdClassName = obj.mdclass.name(1, true)
            if (!mdClassName.length) {
                obj = container.rootObject
                mdClassName = " Конфигурация"
            }
            if (obj) {
                var row = vt.Add()
                row.Имя = event.name
                row.Событие = toV8Value(event.property("Событие")).presentation()
                row.Обработчик = toV8Value(event.property("Обработчик")).presentation()
                row.Объект = obj.name
                row.Метаданные = mdClassName
                row.mdobj = obj
                row.event = event
            }
        }
    }
    vt.Sort("Метаданные,Объект,Имя")
    form.ЭлементыФормы.Конфигурация.Заголовок = container.identifier
    return vt
}

function makeReport() {
    var source = ТаблицаПодписок()
    if (!source)
        return
    var tree = form.Результат
    tree.Rows.Clear()
    var lastMdName, lastMdRow, lastObjName, lastObjRow

    for (var rows = new Enumerator(source) ; !rows.atEnd() ; rows.moveNext()) {
        var row = rows.item()
        if (row.Метаданные !== lastMdName) {
            lastMdName = row.Метаданные
            lastMdRow = tree.Rows.Add()
            lastMdRow.Событие = lastMdName
            lastMdRow.mdobj = row.mdobj
            lastObjName = undefined
        }
        if (row.Объект !== lastObjName) {
            lastObjName = row.Объект
            lastObjRow = lastMdRow.Rows.Add()
            lastObjRow.Событие = lastObjName
            lastObjRow.mdobj = row.mdobj
        }
        var tr = lastObjRow.Rows.Add()
        tr.Событие = row.Событие
        tr.Имя = row.Имя
        tr.Обработчик = row.Обработчик
        tr.mdobj = row.event
    }
    for (var rows = new Enumerator(tree.Rows) ; !rows.atEnd() ; rows.moveNext())
        form.ЭлементыФормы.Результат.Развернуть(rows.item(), false)
}

function macrosОткрытьОтчет() {
    form.Открыть()
}

function CmdPanelСформировать(Кнопка) {
    makeReport()
}

function РезультатПриВыводеСтроки(Элемент, ОформлениеСтроки, ДанныеСтроки) {
    if (ДанныеСтроки.val.mdobj)
        ОформлениеСтроки.val.Cells.Событие.УстановитьКартинку(ДанныеСтроки.val.mdobj.picture)
}

function openModuleProc(name, container) {
    var handler = name.split(".")
    // Попробуем получить объект метаданных - общий модуль с указанным именем
    try {
        var modulMdObj = container.rootObject.childObject("ОбщиеМодули", handler[0])
    } catch (e) { }
    if (modulMdObj) {
        // Откроем общий модуль
        var txtEdt = modulMdObj.openModule("Модуль")
        if (!txtEdt) {
            Message("no module");
            return
        }
        // Распарсим текст модуля
        var parser = snegopat.parseSources(txtEdt.text)
        var idxOfMethodName = parser.strNameIdx(handler[1])  // Найдем индекс названия метода в списке идентификаторов
        if (idxOfMethodName.length) {
            var found = parser.reStream.match(new RegExp("(Pc|Fu)" + idxOfMethodName + "Lp"))
            if (found) {
                var line = parser.lexem(parser.posToLexem(found.index + 2)).line
                txtEdt.setCaretPos(line + 1, 1) // Чтобы процедура по-любому развернулась и окно проскроллилось
                txtEdt.setSelection(line, 1, line, txtEdt.line(line).length + 1)
            }
        }
    }
}

function РезультатВыбор(Элемент, ВыбраннаяСтрока, Колонка, СтандартнаяОбработка) {
    СтандартнаяОбработка.val = false
    var mdobj = ВыбраннаяСтрока.val.mdobj

    if (Колонка.val.Имя == "Обработчик")
        openModuleProc(ВыбраннаяСтрока.val.Обработчик, mdobj.container)
    else {
        try {
            if (mdobj.container == metadata.ib && !mdobj.container.treeVisible)
                stdcommands.Config.OpenDBCfg.send()
            mdobj.activateInTree()
        } catch (e) { }
    }
}


text:
<?php

namespace Scraip\StudyBundle\Controller;

require __DIR__.'/../../../../Goutte/goutte.phar';

use Goutte\Client;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\DomCrawler\Crawler;
use Symfony\Component\HttpFoundation\Response;

use Scraip\StudyBundle\Entity\Event;
/**
 * AtndController
 * Atndのイベントを管理するクラス
 *
 */
class AtndController extends Controller
{

    public function indexAction()
    {
        $objClient = new Client();

        $eventId = '46288';

        //クロールしたいURLを指定
        $crawlUrl = 'http://atnd.org/events/'.$eventId;

        //初期化
        $crawler = $objClient->request('GET', $crawlUrl);

        $response = $objClient->getResponse();
        $status = $response->getStatus();
        var_dump($status);

        //タイトル
        $title = $crawler->filter('body > div#events > hgroup.title > h1 > a')->text();

        //URL
        $url = $crawler->filter('body > div#events > hgroup.title > h1 > a')->attr('href');

        $aryYouso = array();
        $date = null;
        $eventLocation = null;

        //ループで入ってくる要素を取得
        $aryYouso = $crawler->filter('body > div#events > div#events-show > div.main > div.events-show-info > dl.clearfix')->each(function($node) {
            //日時,会場など
            return $node->filter('dd')->text();

        });
//print_r($aryYouso);
        //イベントデータを分ける
        $date = $aryYouso[0];
        $eventAddress = $aryYouso[2];

        $aryDate = preg_split("[\/| ]", $date);
//print_r($aryDate);
        $eventYear = $aryDate[0];
        $eventMonth = $aryDate[1];
        $eventDay = $aryDate[2];

        // //データを登録する
        // $event = new Event();
//
//
        // $em = $this->getDoctrine()->getEntityManager();
//
        // //
        // $event->setEventId($eventId);
        // $event->setEventTitle($title);
        // $event->setUrl($url);
        // $event->setEventAddress($eventAddress);
        // $event->setEventYear($eventYear);
        // $event->setEventMonth($eventMonth);
        // $event->setEventDay($eventDay);
//
        // $em->persist($event);
        // $em->flush();

        $eventId = 0;
        $repository = $this->getDoctrine()->getRepository('ScraipStudyBundle:CrawlResult');

        $crawlResult = $repository->findOneBy(array('event_kind' => 1));
        if(!empty($crawlResult)){
            $eventId = $crawlResult->getEventId();
            echo $eventId;
        }

        return new Response("OK");

    }

}

redpajama_set_name: RedPajamaGithub


text:
#include "structures/vroom/time_window.h"
#include "utils/exception.h"
#include "utils/helpers.h"

namespace vroom {

constexpr Duration TimeWindow::default_length =
  std::numeric_limits<Duration>::max();

TimeWindow::TimeWindow()
  : start(0), end(std::numeric_limits<Duration>::max()), length(end - start) {
}

TimeWindow::TimeWindow(UserDuration start, UserDuration end)
  : start(utils::scale_from_user_duration(start)),
    end(utils::scale_from_user_duration(end)),
    length(end - start) {
  if (start > end) {
    throw InputException("Invalid time window: [" + std::to_string(start) +
                         ", " + std::to_string(end) + "]");
  }
}

bool TimeWindow::contains(Duration time) const {
  return (start <= time) and (time <= end);
}

bool TimeWindow::is_default() const {
  return end - start == default_length;
}

bool operator<(const TimeWindow& lhs, const TimeWindow& rhs) {
  return lhs.start < rhs.start or
         (lhs.start == rhs.start and lhs.end < rhs.end);
}

} // namespace vroom


text:
package org.continuity.api.entities.config.cobra;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonValue;

/**
 * Strategy how to append new sessions to the existing behavior model.
 *
 * @author Henning Schulz
 *
 */
public enum AppendStrategy {

	DBSCAN(false, true), KMEANS(false, true), MINIMUM_DISTANCE(false, false) {
		@Override
		public long getLookback(long configuredLookback) {
			return configuredLookback > 0 ? 1 : 0;
		}
	};

	private final boolean overwriteExisting;

	private final boolean includeOverlap;

	private AppendStrategy(boolean overwriteExisting, boolean includeOverlap) {
		this.overwriteExisting = overwriteExisting;
		this.includeOverlap = includeOverlap;
	}

	@JsonIgnore
	public boolean overwriteExisting() {
		return overwriteExisting;
	}

	@JsonIgnore
	public boolean includeOverlap() {
		return includeOverlap;
	}

	@JsonIgnore
	public long getLookback(long configuredLookback) {
		return configuredLookback;
	}

	@JsonCreator
	public static AppendStrategy fromPrettyString(String key) {
		return key == null ? null : valueOf(key.toUpperCase().replace("-", "_"));
	}

	@JsonValue
	public String toPrettyString() {
		return toString().toLowerCase().replace("_", "-");
	}

}


text:
package com.parseexception.actionbeans;

import javax.servlet.http.*;
import org.apache.struts.action.*;

import com.parseexception.displaybeans.*;
import com.parseexception.model.*;

import java.util.*;

public class ViewSolutionAction extends BaseAction {

	public ViewSolutionAction()
	{
		super();
	}

	 /**
	  * Process the request and return an ActionForward instance
	  * describing where and how control should be forwarded, or
	  * nullif the response has already been completed.
	  *
	  * @param mapping The ActionMapping used to select this instance
	  * @param form The optional ActionForm bean for this request (if any)
	  * @param request The HTTP request we are processing
	  * @param response The HTTP response we are creating
	  *
	  * @exception Exception if the application logic throws an exception
	  *
	  * @return the ActionForward for the next view
	  */
	 public ActionForward execute (
	     ActionMapping mapping,
	     ActionForm form,
	     HttpServletRequest request,
	     HttpServletResponse response)
	     throws Exception
	 {
		 // Get login if user is logged in
		 verifyLogin(request, response, false);

		 // Check parameters
		 String sidString =  request.getParameter("sid");
		 int sid = 0;
		 try
		 {
			 if(sidString != null && sidString.compareTo("0") != 0)
			 {
				 sid = Integer.parseInt(sidString);
			 }else
			 {
				 Integer sidInt = (Integer) request.getAttribute("sid");
				 sid = sidInt.intValue();
			 }
		 }catch(Exception e)
		 {
			 ActionErrors errors = new ActionErrors();
			 errors.add("error", new ActionMessage("errors.badreq"));
			 saveErrors(request, errors);
			 return mapping.findForward("failure");
		 }

		 // Get display bean
		 SolutionBean sbean;
		 Solution s = Solution.getSolution(sid);
		 if(curUser != null)
		 {
			 sbean = new SolutionBean(s, curUser.getVote(sid));
		 }else{
			 sbean = new SolutionBean(s, 0);
		 }
		 request.setAttribute("solution", sbean);

		 // Get comment Thread
		 List<Comment> clist = s.getComments();
		 ArrayList<CommentBean> thread = new ArrayList<CommentBean>();
		 for(int i = 0; i < clist.size(); i++)
		 {
			 thread.add(new CommentBean(clist.get(i), curUser));
		 }
		 request.setAttribute("thread", thread);

		 // Set if user can edit
		 if(curUser != null && (curUser.getUid() == s.getSubmitter()))
		 {
			 request.setAttribute("edittable", Boolean.toString(true));
		 }else
		 {
			 request.setAttribute("edittable", Boolean.toString(false));
		 }

		 // Forward to success
		 return mapping.findForward("success");
	 }
}


text: phpunit --no-globals-backup ./tests


text:
import React from 'react'
import withSend from '../../src/addons/with-send'
import { mount } from 'enzyme'

it('exposes the wrapped component as a static property', function() {
  const Button = function({ send }) {
    return (
      <button type="button" onClick={() => send('action')}>Click me</button>
    )
  }

  const WrappedButton = withSend(Button)

  expect(WrappedButton.WrappedComponent).toEqual(Button)
})

it('extracts send from context', function() {
  const Button = withSend(function({ send }) {
    return (
      <button type="button" onClick={() => send('action')}>Click me</button>
    )
  })

  const send = jest.fn()

  const component = mount(<Button />, {
    context: { send },
    childContextTypes: {
      send: () => {}
    }
  })

  component.simulate('click')

  expect(send).toHaveBeenCalledWith('action')
})

it('allows send to be overridden by a prop', function() {
  const send = jest.fn()

  const Button = withSend(function({ send }) {
    return (
      <button type="button" onClick={() => send('action')}>
        Click me
      </button>
    )
  })

  mount(<Button send={send} />).simulate('click')

  expect(send).toHaveBeenCalledWith('action')
})

describe('Display name', function() {
  it('sets the correct display name for stateless components', function() {
    const Button = withSend(function Button() {
      return <button type="button" />
    })

    let wrapper = mount(
<Button />
)

    expect(wrapper.find('withSend(Button)')).toHaveLength(1)
  })

  it('sets the correct display name for stateful components', function() {
    const Button = withSend(
      class Button extends React.Component {
        render() {
          return <button type="button" />
        }
      }
    )

    let wrapper = mount(
<Button />
)

    expect(wrapper.find('withSend(Button)')).toHaveLength(1)
  })
})


text:
<resources>
    <string name="app_name">tomboy106</string>
    <string name="hello_round">Hello Round World!</string>
    <string name="hello_square">Hello Square World!</string>
</resources>


text: A metronome for the three main craniosacral frequncies


text:
Use strftime in twig

```twig
{{ now|date_modify("+3 day")|strftime('%A') }} //-> Monday (if today is thursday at least :) )

{{ date()|strftime('%I:%M:%S %p') }} //-> Display the current time

{{ '2017-12-01'|strftime('%d %B %Y') }} //-> Accept string filtering (compatible with strtotime)

```

# Installation
```bash
composer require teraone/twig-strftime-extension
```

Add the extension to your twig environment
```php
// set your locale
setlocale(LC_ALL, 'de_DE');
$twig->addExtension(new Teraone\Twig\Extension\StrftimeExtension());

// optional: set Timezone
$twig->getExtension('core')->setTimezone('Europe/Berlin');
```

For the full list of supported time formats have a look at the PHP strftime documentation


text:
> Deixarei entre vós um punhado

Veja mais no [Liturgia Diária - CNBB](http://liturgiadiaria.cnbb.org.br/app/user/user/UserView.php?ano=2017&mes=1&dia=29)


text:
<?php

namespace Abstrus\RichModelBundle\ORM;

use Doctrine\ORM\Repository\RepositoryFactory,
    Doctrine\ORM\EntityManagerInterface,
    Doctrine\ORM\ObjectRepository;

/**
 * Implements a entity repository factory capable of retrieving custom repositories.
 * Inject in your entity manager to use transparently.
 */
class DIAwareRepositoryFactory
    implements RepositoryFactory
{
    protected $repositoryServices = [];

    protected $defaultFactory;

    /**
     * @param RepositoryFactory $default
     */
    public function __construct(RepositoryFactory $default)
    {
        $this->defaultFactory = $default;
    }

    /**
     * {@inheritDoc}
     *
     * Returns a custom tagged repository if exists, else it let the default factory do the job.
     */
    public function getRepository(EntityManagerInterface $entityManager, $entityName)
    {
        if (isset($this->repositoryServices[$entityName])) {
            return $this->repositoryServices[$entityName];
        }

        return $this->defaultFactory->getRepository($entityManager, $entityName);
    }

    /**
     * Handle to inject custom tagged repositories in a compiler pass.
     *
     * @param string           $entityName EntityManaged by the injected repository.  This does not
     *                                     need to be actually true.  It is only an identifier.
     * @param ObjectRepository $repository Custom tagged repository.
     */
    public function subscribeRepository($entityName, ObjectRepository $repository)
    {
        $this-repositoryServices[$entityName] = $repository;
    }
}


text:
package phases

import (
	"fmt"
	"html/template"
	"io/ioutil"
	"os"
	"path"
	"testing"

	"github.com/renstrom/dedent"
	"github.com/spf13/cobra"

	// required for triggering api machinery startup when running unit tests
	_ "k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/install"

	kubeadmconstants "k8s.io/kubernetes/cmd/kubeadm/app/constants"
	"k8s.io/kubernetes/cmd/kubeadm/app/phases/certs/pkiutil"
)

func TestSubCmdCertsCreateFiles(t *testing.T) {

	subCmds := newSubCmdCerts()

	var tests = []struct {
		subCmds       []string
		expectedFiles []string
	}{
		{
			subCmds: []string{"all"},
			expectedFiles: []string{
				kubeadmconstants.CACertName, kubeadmconstants.CAKeyName,
				kubeadmconstants.APIServerCertName, kubeadmconstants.APIServerKeyName,
				kubeadmconstants.APIServerKubeletClientCertName, kubeadmconstants.APIServerKubeletClientKeyName,
				kubeadmconstants.ServiceAccountPrivateKeyName, kubeadmconstants.ServiceAccountPublicKeyName,
				kubeadmconstants.FrontProxyCACertName, kubeadmconstants.FrontProxyCAKeyName,
				kubeadmconstants.FrontProxyClientCertName, kubeadmconstants.FrontProxyClientKeyName,
			},
		},
		{
			subCmds:       []string{"ca"},
			expectedFiles: []string{kubeadmconstants.CACertName, kubeadmconstants.CAKeyName},
		},
		{
			subCmds:       []string{"ca", "apiserver"},
			expectedFiles: []string{kubeadmconstants.CACertName, kubeadmconstants.CAKeyName, kubeadmconstants.APIServerCertName, kubeadmconstants.APIServerKeyName},
		},
		{
			subCmds:       []string{"ca", "apiserver-kubelet-client"},
			expectedFiles: []string{kubeadmconstants.CACertName, kubeadmconstants.CAKeyName, kubeadmconstants.APIServerKubeletClientCertName, kubeadmconstants.APIServerKubeletClientKeyName},
		},
		{
			subCmds:       []string{"sa"},
			expectedFiles: []string{kubeadmconstants.ServiceAccountPrivateKeyName, kubeadmconstants.ServiceAccountPublicKeyName},
		},
		{
			subCmds:       []string{"front-proxy-ca"},
			expectedFiles: []string{kubeadmconstants.FrontProxyCACertName, kubeadmconstants.FrontProxyCAKeyName},
		},
		{
			subCmds:       []string{"front-proxy-ca", "front-proxy-client"},
			expectedFiles: []string{kubeadmconstants.FrontProxyCACertName, kubeadmconstants.FrontProxyCAKeyName, kubeadmconstants.FrontProxyClientCertName, kubeadmconstants.FrontProxyClientKeyName},
		},
	}

	for _, test := range tests {
		// Temporary folder for the test case
		tmpdir, err := ioutil.TempDir("", "")
		if err != nil {
			t.Fatalf("Couldn't create tmpdir")
		}
		defer os.RemoveAll(tmpdir)

		// executes given sub commands
		for _, subCmdName := range test.subCmds {
			subCmd := getSubCmd(t, subCmdName, subCmds)
			subCmd.SetArgs([]string{fmt.Sprintf("--cert-dir=%s", tmpdir)})
			if err := subCmd.Execute(); err != nil {
				t.Fatalf("Could not execute subcommand: %s", subCmdName)
			}
		}

		// verify expected files are there
		assertFilesCount(t, tmpdir, len(test.expectedFiles))
		for _, file := range test.expectedFiles {
			assertFileExists(t, tmpdir, file)
		}
	}
}

func TestSubCmdApiServerFlags(t *testing.T) {

	subCmds := newSubCmdCerts()

	// Temporary folder for the test case
	tmpdir, err := ioutil.TempDir("", "")
	if err != nil {
		t.Fatalf("Couldn't create tmpdir")
	}
	defer os.RemoveAll(tmpdir)

	// creates ca cert
	subCmd := getSubCmd(t, "ca", subCmds)
	subCmd.SetArgs([]string{fmt.Sprintf("--cert-dir=%s", tmpdir)})
	if err := subCmd.Execute(); err != nil {
		t.Fatalf("Could not execute subcommand ca")
	}

	// creates apiserver cert
	subCmd = getSubCmd(t, "apiserver", subCmds)
	subCmd.SetArgs([]string{
		fmt.Sprintf("--cert-dir=%s", tmpdir),
		"--apiserver-cert-extra-sans=foo,boo",
		"--service-cidr=10.0.0.0/24",
		"--service-dns-domain=mycluster.local",
		"--apiserver-advertise-address=1.2.3.4",
	})
	if err := subCmd.Execute(); err != nil {
		t.Fatalf("Could not execute subcommand apiserver")
	}

	APIserverCert, err := pkiutil.TryLoadCertFromDisk(tmpdir, kubeadmconstants.APIServerCertAndKeyBaseName)
	if err != nil {
		t.Fatalf("Error loading API server certificate: %v", err)
	}

	hostname, err := os.Hostname()
	if err != nil {
		t.Errorf("couldn't get the hostname: %v", err)
	}
	for i, name := range []string{hostname, "kubernetes", "kubernetes.default", "kubernetes.default.svc", "kubernetes.default.svc.mycluster.local"} {
		if APIserverCert.DNSNames[i] != name {
			t.Errorf("APIserverCert.DNSNames[%d] is %s instead of %s", i, APIserverCert.DNSNames[i], name)
		}
	}
	for i, ip := range []string{"10.0.0.1", "1.2.3.4"} {
		if APIserverCert.IPAddresses[i].String() != ip {
			t.Errorf("APIserverCert.IPAddresses[%d] is %s instead of %s", i, APIserverCert.IPAddresses[i], ip)
		}
	}
}

func TestSubCmdReadsConfig(t *testing.T) {

	subCmds := newSubCmdCerts()

	var tests = []struct {
		subCmds           []string
		expectedFileCount int
	}{
		{
			subCmds:           []string{"sa"},
			expectedFileCount: 2,
		},
		{
			subCmds:           []string{"front-proxy-ca", "front-proxy-client"},
			expectedFileCount: 4,
		},
		{
			subCmds:           []string{"ca", "apiserver", "apiserver-kubelet-client"},
			expectedFileCount: 6,
		},
		{
			subCmds:           []string{"all"},
			expectedFileCount: 12,
		},
	}

	for _, test := range tests {
		// Temporary folder for the test case
		tmpdir, err := ioutil.TempDir("", "")
		if err != nil {
			t.Fatalf("Couldn't create tmpdir")
		}
		defer os.RemoveAll(tmpdir)

		configPath := saveDummyCfg(t, tmpdir)

		// executes given sub commands
		for _, subCmdName := range test.subCmds {
			subCmd := getSubCmd(t, subCmdName, subCmds)
			subCmd.SetArgs([]string{fmt.Sprintf("--config=%s", configPath)})
			if err := subCmd.Execute(); err != nil {
				t.Fatalf("Could not execute command: %s", subCmdName)
			}
		}

		// verify expected files are there
		// NB. test.expectedFileCount + 1 because in this test case the tempdir where key/certificates
		//     are saved contains also the dummy configuration file
		assertFilesCount(t, tmpdir, test.expectedFileCount+1)
	}
}

func getSubCmd(t *testing.T, name string, subCmds []*cobra.Command) *cobra.Command {
	for _, subCmd := range subCmds {
		if subCmd.Name() == name {
			return subCmd
		}
	}
	t.Fatalf("Unable to find sub command %s", name)

	return nil
}

func assertFilesCount(t *testing.T, dirName string, count int) {
	files, err := ioutil.ReadDir(dirName)
	if err != nil {
		t.Fatalf("Couldn't read files from tmpdir: %s", err)
	}

	if len(files) != count {
		t.Errorf("dir does contains %d, %d expected", len(files), count)
		for _, f := range files {
			t.Error(f.Name())
		}
	}
}

func assertFileExists(t *testing.T, dirName string, fileName string) {
	path := path.Join(dirName, fileName)
	if _, err := os.Stat(path); os.IsNotExist(err) {
		t.Errorf("file %s does not exist", fileName)
	}
}

func saveDummyCfg(t *testing.T, dirName string) string {

	path := path.Join(dirName, "dummyconfig.yaml")
	cfgTemplate := template.Must(template.New("init").Parse(dedent.Dedent(`
		apiVersion: kubeadm.k8s.io/v1alpha1
		kind: MasterConfiguration
		certificatesDir: {{.CertificatesDir}}
		`)))

	f, err := os.Create(path)
	if err != nil {
		t.Errorf("error creating dummyconfig file %s: %v", path, err)
	}

	templateData := struct {
		CertificatesDir string
	}{
		CertificatesDir: dirName,
	}

	err = cfgTemplate.Execute(f, templateData)
	if err != nil {
		t.Errorf("error generating dummyconfig file %s: %v", path, err)
	}
	f.Close()

	return path
}


text:
package org.lwjgl.openxr;

import javax.annotation.*;

import java.nio.*;

import org.lwjgl.*;
import org.lwjgl.system.*;

import static org.lwjgl.system.MemoryUtil.*;
import static org.lwjgl.system.MemoryStack.*;

/**
 * Deserialize Scene Fragment.
 *
 *
Valid Usage (Implicit)

 *
 *

 *
The {@link MSFTSceneUnderstandingSerialization XR_MSFT_scene_understanding_serialization} extension must be enabled prior to using {@link XrDeserializeSceneFragmentMSFT}

 *
If {@code bufferSize} is not 0, {@code buffer} must be a pointer to an array of {@code bufferSize} {@code uint8_t} values

 *

 *
 *
See Also

 *
 *
{@link XrSceneDeserializeInfoMSFT}

 *
 *
Layout

 *
 *

 * struct XrDeserializeSceneFragmentMSFT {
 *     uint32_t {@link #bufferSize};
 *     uint8_t const * {@link #buffer};
 * }

 */
public class XrDeserializeSceneFragmentMSFT extends Struct implements NativeResource {

    /** The struct size in bytes. */
    public static final int SIZEOF;

    /** The struct alignment in bytes. */
    public static final int ALIGNOF;

    /** The struct member offsets. */
    public static final int
        BUFFERSIZE,
        BUFFER;

    static {
        Layout layout = __struct(
            __member(4),
            __member(POINTER_SIZE)
        );

        SIZEOF = layout.getSize();
        ALIGNOF = layout.getAlignment();

        BUFFERSIZE = layout.offsetof(0);
        BUFFER = layout.offsetof(1);
    }

    /**
     * Creates a {@code XrDeserializeSceneFragmentMSFT} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be
     * visible to the struct instance and vice versa.
     *
     *
The created instance holds a strong reference to the container object.

     */
    public XrDeserializeSceneFragmentMSFT(ByteBuffer container) {
        super(memAddress(container), __checkContainer(container, SIZEOF));
    }

    @Override
    public int sizeof() { return SIZEOF; }

    /** the size of the {@code buffer} array. */
    @NativeType("uint32_t")
    public int bufferSize() { return nbufferSize(address()); }
    /** an array of {@code uint_8} data for the scene fragment to be deserialized. */
    @Nullable
    @NativeType("uint8_t const *")
    public ByteBuffer buffer() { return nbuffer(address()); }

    /** Sets the specified value to the {@link #bufferSize} field. */
    public XrDeserializeSceneFragmentMSFT bufferSize(@NativeType("uint32_t") int value) { nbufferSize(address(), value); return this; }
    /** Sets the address of the specified {@link ByteBuffer} to the {@link #buffer} field. */
    public XrDeserializeSceneFragmentMSFT buffer(@Nullable @NativeType("uint8_t const *") ByteBuffer value) { nbuffer(address(), value); return this; }

    /** Initializes this struct with the specified values. */
    public XrDeserializeSceneFragmentMSFT set(
        int bufferSize,
        @Nullable ByteBuffer buffer
    ) {
        bufferSize(bufferSize);
        buffer(buffer);

        return this;
    }

    /**
     * Copies the specified struct data to this struct.
     *
     * @param src the source struct
     *
     * @return this struct
     */
    public XrDeserializeSceneFragmentMSFT set(XrDeserializeSceneFragmentMSFT src) {
        memCopy(src.address(), address(), SIZEOF);
        return this;
    }

    // -----------------------------------

    /** Returns a new {@code XrDeserializeSceneFragmentMSFT} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */
    public static XrDeserializeSceneFragmentMSFT malloc() {
        return wrap(XrDeserializeSceneFragmentMSFT.class, nmemAllocChecked(SIZEOF));
    }

    /** Returns a new {@code XrDeserializeSceneFragmentMSFT} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */
    public static XrDeserializeSceneFragmentMSFT calloc() {
        return wrap(XrDeserializeSceneFragmentMSFT.class, nmemCallocChecked(1, SIZEOF));
    }

    /** Returns a new {@code XrDeserializeSceneFragmentMSFT} instance allocated with {@link BufferUtils}. */
    public static XrDeserializeSceneFragmentMSFT create() {
        ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF);
        return wrap(XrDeserializeSceneFragmentMSFT.class, memAddress(container), container);
    }

    /** Returns a new {@code XrDeserializeSceneFragmentMSFT} instance for the specified memory address. */
    public static XrDeserializeSceneFragmentMSFT create(long address) {
        return wrap(XrDeserializeSceneFragmentMSFT.class, address);
    }

    /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */
    @Nullable
    public static XrDeserializeSceneFragmentMSFT createSafe(long address) {
        return address == NULL ? null : wrap(XrDeserializeSceneFragmentMSFT.class, address);
    }

    /**
     * Returns a new {@link XrDeserializeSceneFragmentMSFT.Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed.
     *
     * @param capacity the buffer capacity
     */
    public static XrDeserializeSceneFragmentMSFT.Buffer malloc(int capacity) {
        return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity);
    }

    /**
     * Returns a new {@link XrDeserializeSceneFragmentMSFT.Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed.
     *
     * @param capacity the buffer capacity
     */
    public static XrDeserializeSceneFragmentMSFT.Buffer calloc(int capacity) {
        return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity);
    }

    /**
     * Returns a new {@link XrDeserializeSceneFragmentMSFT.Buffer} instance allocated with {@link BufferUtils}.
     *
     * @param capacity the buffer capacity
     */
    public static XrDeserializeSceneFragmentMSFT.Buffer create(int capacity) {
        ByteBuffer container = __create(capacity, SIZEOF);
        return wrap(Buffer.class, memAddress(container), capacity, container);
    }

    /**
     * Create a {@link XrDeserializeSceneFragmentMSFT.Buffer} instance at the specified memory.
     *
     * @param address  the memory address
     * @param capacity the buffer capacity
     */
    public static XrDeserializeSceneFragmentMSFT.Buffer create(long address, int capacity) {
        return wrap(Buffer.class, address, capacity);
    }

    /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */
    @Nullable
    public static XrDeserializeSceneFragmentMSFT.Buffer createSafe(long address, int capacity) {
        return address == NULL ? null : wrap(Buffer.class, address, capacity);
    }

    /**
     * Returns a new {@code XrDeserializeSceneFragmentMSFT} instance allocated on the specified {@link MemoryStack}.
     *
     * @param stack the stack from which to allocate
     */
    public static XrDeserializeSceneFragmentMSFT malloc(MemoryStack stack) {
        return wrap(XrDeserializeSceneFragmentMSFT.class, stack.nmalloc(ALIGNOF, SIZEOF));
    }

    /**
     * Returns a new {@code XrDeserializeSceneFragmentMSFT} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero.
     *
     * @param stack the stack from which to allocate
     */
    public static XrDeserializeSceneFragmentMSFT calloc(MemoryStack stack) {
        return wrap(XrDeserializeSceneFragmentMSFT.class, stack.ncalloc(ALIGNOF, 1, SIZEOF));
    }

    /**
     * Returns a new {@link XrDeserializeSceneFragmentMSFT.Buffer} instance allocated on the specified {@link MemoryStack}.
     *
     * @param stack    the stack from which to allocate
     * @param capacity the buffer capacity
     */
    public static XrDeserializeSceneFragmentMSFT.Buffer malloc(int capacity, MemoryStack stack) {
        return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity);
    }

    /**
     * Returns a new {@link XrDeserializeSceneFragmentMSFT.Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero.
     *
     * @param stack    the stack from which to allocate
     * @param capacity the buffer capacity
     */
    public static XrDeserializeSceneFragmentMSFT.Buffer calloc(int capacity, MemoryStack stack) {
        return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity);
    }

    // -----------------------------------

    /** Unsafe version of {@link #bufferSize}. */
    public static int nbufferSize(long struct) { return UNSAFE.getInt(null, struct + XrDeserializeSceneFragmentMSFT.BUFFERSIZE); }
    /** Unsafe version of {@link #buffer() buffer}. */
    @Nullable public static ByteBuffer nbuffer(long struct) { return memByteBufferSafe(memGetAddress(struct + XrDeserializeSceneFragmentMSFT.BUFFER), nbufferSize(struct)); }

    /** Sets the specified value to the {@code bufferSize} field of the specified {@code struct}. */
    public static void nbufferSize(long struct, int value) { UNSAFE.putInt(null, struct + XrDeserializeSceneFragmentMSFT.BUFFERSIZE, value); }
    /** Unsafe version of {@link #buffer(ByteBuffer) buffer}. */
    public static void nbuffer(long struct, @Nullable ByteBuffer value) { memPutAddress(struct + XrDeserializeSceneFragmentMSFT.BUFFER, memAddressSafe(value)); if (value != null) { nbufferSize(struct, value.remaining()); } }

    // -----------------------------------

    /** An array of {@link XrDeserializeSceneFragmentMSFT} structs. */
    public static class Buffer extends StructBuffer<XrDeserializeSceneFragmentMSFT, Buffer> implements NativeResource {

        private static final XrDeserializeSceneFragmentMSFT ELEMENT_FACTORY = XrDeserializeSceneFragmentMSFT.create(-1L);

        /**
         * Creates a new {@code XrDeserializeSceneFragmentMSFT.Buffer} instance backed by the specified container.
         *
         * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values
         * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided
         * by {@link XrDeserializeSceneFragmentMSFT#SIZEOF}, and its mark will be undefined.
         *
         *
The created buffer instance holds a strong reference to the container object.

         */
        public Buffer(ByteBuffer container) {
            super(container, container.remaining() / SIZEOF);
        }

        public Buffer(long address, int cap) {
            super(address, null, -1, 0, cap, cap);
        }

        Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) {
            super(address, container, mark, pos, lim, cap);
        }

        @Override
        protected Buffer self() {
            return this;
        }

        @Override
        protected XrDeserializeSceneFragmentMSFT getElementFactory() {
            return ELEMENT_FACTORY;
        }

        /** @return the value of the {@link XrDeserializeSceneFragmentMSFT#bufferSize} field. */
        @NativeType("uint32_t")
        public int bufferSize() { return XrDeserializeSceneFragmentMSFT.nbufferSize(address()); }
        /** @return a {@link ByteBuffer} view of the data pointed to by the {@link XrDeserializeSceneFragmentMSFT#buffer} field. */
        @Nullable
        @NativeType("uint8_t const *")
        public ByteBuffer buffer() { return XrDeserializeSceneFragmentMSFT.nbuffer(address()); }

        /** Sets the specified value to the {@link XrDeserializeSceneFragmentMSFT#bufferSize} field. */
        public XrDeserializeSceneFragmentMSFT.Buffer bufferSize(@NativeType("uint32_t") int value) { XrDeserializeSceneFragmentMSFT.nbufferSize(address(), value); return this; }
        /** Sets the address of the specified {@link ByteBuffer} to the {@link XrDeserializeSceneFragmentMSFT#buffer} field. */
        public XrDeserializeSceneFragmentMSFT.Buffer buffer(@Nullable @NativeType("uint8_t const *") ByteBuffer value) { XrDeserializeSceneFragmentMSFT.nbuffer(address(), value); return this; }

    }

}


text:
module data_wrangler
  use net_rates

  implicit none

contains

  subroutine store_solution(ysol, net_history, k, t)
    double precision, dimension(:), intent(in)   :: ysol
    double precision, dimension(:,:), intent(inout) :: net_history
    integer, intent(in) :: k
    double precision, intent(in) :: t
    integer :: i

    do i = 1, number_equations
       net_history(i, k) = ysol(i)
    end do
    net_history(number_equations+1, k) = t
  end subroutine store_solution

  subroutine write_solution(net_history, KFIN)
    double precision, dimension(:,:), intent(in) :: net_history
    integer, intent(in) :: KFIN
    integer :: K, J, NPROFILE

    ! Output Profile Misc
    character(len=50) :: rfmt
    character(len=50) :: hfmt
    character(len=*), parameter  :: profile_file_name = 'net_history.dat'

    NPROFILE = number_equations + 1
    write(*,*) 'NPROFILE: ', NPROFILE
    write(*,*) 'size(net_history, 1): ', size(net_history,1)
    write(*,*) 'size(net_history, 2): ', size(net_history,2)
    !! Save profile to file
    ! Set format for writing column entries
    write(hfmt,'(A,I5,A)') '(', NPROFILE, '(A18))'
    write(rfmt,'(A,I5,A)') '(', NPROFILE, '(ES25.14))'
    open(unit=2, file=profile_file_name, recl=(25*NPROFILE+10), form='formatted')
    write(2, fmt=hfmt) 'Y_p', 'Y_he4', 'Y_c12', 'Y_c13', 'Y_n13', 'Y_n14', 'Y_n15', 'Y_o14', 'Y_o15', 'E_nuc', 'Time'
    do K = 1, KFIN
       write(2, fmt=rfmt) (net_history(J, K), J=1, NPROFILE)
    end do
    close(unit=2)
  end subroutine write_solution

end module data_wrangler


text:
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">

<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">

	<appender name="console" class="org.apache.log4j.ConsoleAppender">
		<param name="Target" value="System.out" />
		<layout class="org.apache.log4j.PatternLayout">
			<param name="ConversionPattern" value="%-5p %c{1} - %m%n" />
		</layout>
	</appender>
	<appender name="fileAppender" class="org.apache.log4j.RollingFileAppender">
		<param name="Threshold" value="INFO" />
		<param name="MaxBackupIndex" value="100" />
		<param name="File" value="/tmp/agna-LogFile.log" />
		<layout class="org.apache.log4j.PatternLayout">
			<param name="ConversionPattern" value="%d  %-5p  [%c{1}] %m %n" />
		</layout>
	</appender>
	<appender name="kafkaAppender" class="kafka.producer.KafkaLog4jAppender">
		<param name="Topic" value="kafkatopic" />
		<param name="BrokerList" value="localhost:9092" />
		<param name="syncSend" value="true" />
	<!-- 	<layout class="org.apache.log4j.PatternLayout">
			<param name="ConversionPattern" value="%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L %% - %m%n" />
		</layout> -->
		<layout class="com.example.SimpleJsonLayout">
		      <param name="MinimumLevelForSlowLogging" value="INFO"></param>
		      <param name="MdcFieldsToLog" value=" asdf , , thread"></param>
		</layout>
	</appender>

	 <appender name="rabbitmq" class="org.springframework.amqp.rabbit.log4j.AmqpAppender">
	     <param name="threshold" value="info" />
	     <param name="declareExchange" value="true"/>
        <param name="exchangeName" value="logs"/>
        <param name="exchangeType" value="direct"/>
        <param name="durable" value="false"/>
       <layout class="com.example.SimpleJsonLayout">
              <param name="MinimumLevelForSlowLogging" value="INFO"></param>
              <param name="MdcFieldsToLog" value=" asdf , , thread"></param>
        </layout>
    </appender>

	<logger name="kafkaLogger">
		<level value="debug" />
		<appender-ref ref="kafkaAppender" />
	</logger>

	<logger name="rabbitmqLogger">
        <level value="debug" />
        <appender-ref ref="rabbitmq" />
    </logger>

	<root>
		<priority value="debug" />
		<appender-ref ref="console" />
	</root>
</log4j:configuration>


text:
package com.vikingbrain.dmt.view.asynctaks.util;

import java.util.List;

import com.vikingbrain.nmt.responses.system.ResponseGetDeviceInfo;
import com.vikingbrain.nmt.util.exceptions.TheDavidBoxClientException;

/**
 * Response object for async task GetDeviceInfo.
 *
 * @author Rafael Iñigo
 */
public class TaskResultDavidboxGetDevicesInfo {

	private List<ResponseGetDeviceInfo> listDeviceInfo = null;
	private TheDavidBoxClientException theDavidBoxClientException = null;

	public final List<ResponseGetDeviceInfo> getListDeviceInfo() {
		return listDeviceInfo;
	}

	public final void setListDeviceInfo(List<ResponseGetDeviceInfo> listDeviceInfo) {
		this.listDeviceInfo = listDeviceInfo;
	}

	public final TheDavidBoxClientException getTheDavidBoxClientException() {
		return theDavidBoxClientException;
	}

	public final void setTheDavidBoxClientException(TheDavidBoxClientException theDavidBoxClientException) {
		this.theDavidBoxClientException = theDavidBoxClientException;
	}

}


text: <!DOCTYPE html>


text:
<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui" onLoad="OnGeoToolsRibbonLoad">
  <!-- ACHTUNG: "commands" muss vor "ribbon" stehen!!! -->

  <!--<commands>
    <command idMso="FileNewDefault" onAction="FromFileNewDefault"/>
  </commands>-->

  <ribbon>
    <tabs>
      <tab id="GeoToolsTab"
           label="GeoTools"
           insertAfterMso="TabView"
           keytip="g" >

        <group id="GeneralGroup" label="Allgemein" imageMso="GroupTaskListTags" >

          <button id="NoConfigButton"
                  label="Keine Konfig."
                  size="large"
                  screentip="Keine Konfiguration verfügbar!"
                  getSupertip="GetSupertipNoConfigButton"
                  getVisible="GetVisibleNoConfigButton"
                  onAction="NoConfigButtonAction"
                  imageMso="MacroSecurity" />

          <separator id="NoConfigSeparator" getVisible="GetVisibleNoConfigButton" />

          <box id="GeneralBox" boxStyle="vertical">

            <button id="ManualButton"
                    label=" Handbuch"
                    size="normal"
                    screentip="GeoTools-Handbuch"
                    onAction="GeoToolsButtonAction"
                    keytip="m"
                    imageMso="About" />

            <button id="HelpButton"
                    label=" Hilfe"
                    size="normal"
                    screentip="GeoTools-Hilfe"
                    onAction="GeoToolsButtonAction"
                    keytip="y"
                    imageMso="Help" />

            <button id="InfoButton"
                    label="Info"
                    size="normal"
                    screentip="Über GeoTools"
                    onAction="GeoToolsButtonAction"
                    keytip="o"
                    imageMso="TaskSuggestionsShow" />
          </box>

          <button id="LogButton"
                  label="Protokoll"
                  size="large"
                  screentip="GeoTools-Protokoll"
                  onAction="GeoToolsButtonAction"
                  getEnabled="GetEnabledMacrosExecutable"
                  keytip="k"
                  imageMso="GroupCreateOther" />

          <separator id="GeneralSeparator" />

          <button id="ImportExportButton"
                  label="Import Export"
                  size="large"
                  screentip="Import / Export von Tabellendaten"
                  supertip="Es wird eine neue Datei anhand einer Vorlage erzeugt. Die dorthin geschriebenen Daten stammen aus einer Spezial-ASCII/CSV-Datei oder aus der aktiven Tabelle"
                  onAction="GeoToolsButtonAction"
                  getEnabled="GetEnabledMacrosExecutable"
                  keytip="x"
                  imageMso="SyncTool" />

          <button id="TableStructureButton"
                  label="Tabellen- Struktur"
                  size="large"
                  screentip="Verwaltung der GeoTools-Tabellenstruktur"
                  supertip="Für die Nutzung der meisten GeoTools-Funktionen wird eine GeoTools-interne Strukturierung der Tabelle benötigt. Diese kann hiermit erzeugt und verwaltet werden."
                  onAction="GeoToolsButtonAction"
                  getEnabled="GetEnabledTable"
                  keytip="t"
                  imageMso="CatalogMergeCreateList" />
        </group>

        <group id="DataRegionGroup" label="Datenbereich" imageMso="TableStyleClear" >

          <button id="FormatButton"
                  label="Format"
                  size="large"
                  screentip="Datenbereich formatieren"
                  supertip="Das Format der ersten Zeile des Datenbereiches (laut Tabellenstruktur) wird auf alle weiteren Zeilen übertragen. Dabei werden die Optionen berücksichtigt."
                  onAction="GeoToolsButtonAction"
                  getEnabled="GetEnabledGeoToolsTable"
                  keytip="f"
                  imageMso="FormatPainter" />

          <toggleButton id="FmtOptStripesButton"
                  label="Mit Streifen"
                  showLabel="false"
                  size="normal"
                  screentip="Formatierungsoption: Mit Streifen"
                  supertip="Wenn aktiviert, wird jede zweite Zeile grau eingefärbt. Eventuell vorhandene Hintergrundfarben der ersten Datenzeile werden gelöscht."
                  onAction="GeoToolsToggleButtonAction"
                  getEnabled="GetEnabledGeoToolsTable"
                  getPressed="GeoToolsToggleButtonGetPressed"
                  keytip="s"
                  imageMso="AlignJustify" />

          <toggleButton id="FmtOptBackgroundButton"
                  label="Ohne Hintergrundfarbe"
                  showLabel="false"
                  size="normal"
                  screentip="Formatierungsoption: Ohne Hintergrundfarbe"
                  supertip="Wenn aktiviert, werden eventuell vorhandene Hintergrundfarben der ersten Datenzeile gelöscht, bevor deren Format auf alle anderen Zeilen übertragen wird."
                  onAction="GeoToolsToggleButtonAction"
                  getEnabled="GetEnabledGeoToolsTable"
                  getPressed="GeoToolsToggleButtonGetPressed"
                  keytip="h"
                  imageMso="BlackAndWhiteDontShow" />

          <box id="FmtOptPrecisionBox" boxStyle="horizontal">

            <toggleButton id="FmtOptPrecisionButton"
                    label="Änderung der NK-Stellen"
                    showLabel="false"
                    size="normal"
                    screentip="Formatierungsoption: Änderung der NK-Stellen"
                    supertip="Wenn aktiviert, werden die laut Tabellenstruktur dafür vorgesehenen Spalten mit der angegebenen Anzahl Nachkommastellen formatiert."
                    onAction="GeoToolsToggleButtonAction"
                    getEnabled="GetEnabledFloatingPoint"
                    getPressed="GeoToolsToggleButtonGetPressed"
                    keytip="n"
                    imageMso="CalculatedNumber" />

            <comboBox id="FmtOptPrecisionNumber"
                    label="Anzahl der NK-Stellen"
                    showLabel="false"
                    sizeString="auto"
                    screentip="Formatierungsoption: Anzahl der NK-Stellen"
                    supertip="Einstellung für Formatierungsoption 'Änderung der NK-Stellen'."
                    onChange="FmtOptPrecisionNumberChange"
                    getText="GetTextFmtOptPrecisionNumber"
                    getEnabled="GetEnabledFloatingPoint"
                    >
                      <item id="FmtOptPrecision0" label="0"/>
                      <item id="FmtOptPrecision1" label="1"/>
                      <item id="FmtOptPrecision2" label="2"/>
                      <item id="FmtOptPrecision3" label="3"/>
                      <item id="FmtOptPrecision4" label="4"/>
                      <item id="FmtOptPrecision5" label="5"/>
                      <item id="FmtOptPrecision6" label="6"/>
                      <item id="FmtOptPrecision7" label="7"/>
                      <item id="FmtOptPrecision8" label="8"/>
                      <item id="FmtOptPrecision9" label="9"/>
            </comboBox>
          </box>

          <separator id="DataRegionSeparator1" />

          <menu id="CalcMenu"
                  label="Berechnung"
                  size="large"
                  screentip="verschiedene Berechnungen"
                  supertip="Funktionsprinzip: Falls die gewählte Berechnung erfolgreich war, werden die Ergebnisse in die dafür vorgesehenen Spalten (falls vorhanden) eingetragen. Dabei werden die aktiven Optionen berücksichtigt. Es werden keine Fehlermeldungen angezeigt (evtl. enthält das Protokoll Hinweise)."
                  getEnabled="GetEnabledGeoToolsTable"
                  keytip="b"
                  imageMso="EquationEdit"
                  >
                  <button id="CalcParseInfoTextButton"
                          label="InfoText auswerten"
                          screentip="Punktart und Ist-Überhöhung aus InfoText extrahieren"
                          supertip="Der InfoText (Punktinfo') wird nach iTrassen-Codierung und Überhöhungsangaben ('u=xxx', 'ueb=xxx') durchsucht. Gefundene Werte werden in die entsprechenden Spalten eingetragen. Ist 'Überschreiben' aktiviert, werden sie aus der Bemerkung entfernt."
                          onAction="GeoToolsButtonAction"
                          getEnabled="GetEnabledGeoToolsTable"
                          />
                  <button id="CalcHorizontalToCantedButton"
                          label="Trassenkoo' => Gleissystem"
                          screentip="Transformation: Trassensystem => Gleissystem (gedreht)"
                          supertip="Trassenkoordinaten (Q, HSOK) werden ins Gleissystem (QG, HG) transformiert."
                          onAction="GeoToolsButtonAction"
                          getEnabled="GetEnabledGeoToolsTable"
                          />
                  <button id="CalcCantedToHorizontalButton"
                          label="Gleissystem => Trassenkoo'"
                          screentip="Transformation: Gleissystem (gedreht) => Trassensystem"
                          supertip="Koordinaten im Gleissystem (QG, HG) werden ins Trassensystem (Q, HSOK) transformiert."
                          onAction="GeoToolsButtonAction"
                          getEnabled="GetEnabledGeoToolsTable"
                          />
                  <button id="CalcDiffsButton"
                          label="Fehler und Verbesserungen"
                          screentip="Fehler und Verbesserungen berechnen"
                          supertip="Für Größen, die mit Soll- und Istwerten in der Tabelle vertreten sind, werden Fehler und Verbesserungen berechnet."
                          onAction="GeoToolsButtonAction"
                          getEnabled="GetEnabledGeoToolsTable"
                          />
          </menu>

          <box id="CalcOptionsBox" boxStyle="vertical">

            <toggleButton id="CalcOptOverrideButton"
                    label="Überschreiben"
                    showLabel="false"
                    size="normal"
                    screentip="Berechnungsoption: Überschreiben"
                    supertip="Wenn aktiviert, werden vorhandene Werte überschrieben, andernfalls bleiben sie erhalten."
                    onAction="GeoToolsToggleButtonAction"
                    getEnabled="GetEnabledGeoToolsTable"
                    getPressed="GeoToolsToggleButtonGetPressed"
                    keytip="u"
                    imageMso="Delete" />

            <toggleButton id="CalcOptKeepFormulasButton"
                    label="Formeln erhalten"
                    showLabel="false"
                    size="normal"
                    screentip="Berechnungsoption: Formeln erhalten"
                    supertip="Wenn aktiviert, werden vorhandene Formeln durch komplexere Formeln ersetzt, andernfalls durch Werte."
                    onAction="GeoToolsToggleButtonAction"
                    getEnabled="GetEnabledGeoToolsTable"
                    getPressed="GeoToolsToggleButtonGetPressed"
                    keytip="e"
                    imageMso="FunctionLookup" />
          </box>

          <separator id="DataRegionSeparator2" />

          <button id="FormulaButton"
                  label="Formeln ausfüllen"
                  size="large"
                  screentip="Formeln übertragen"
                  supertip="Die Formeln des 'Formelbereiches' der ersten Datenzeile (laut Tabellenstruktur) werden auf alle weiteren Zeilen übertragen."
                  onAction="GeoToolsButtonAction"
                  getEnabled="GetEnabledFormula"
                  keytip="a"
                  imageMso="Formula" />

          <button id="DeleteButton"
                  label="Löschen"
                  size="large"
                  screentip="Datenbereich löschen"
                  supertip="Die Inhalte der ersten Zeile des Datenbereiches (laut Tabellenstruktur) werden gelöscht. Alle weiteren Zeilen werden komplett entfernt."
                  onAction="GeoToolsButtonAction"
                  getEnabled="GetEnabledGeoToolsTable"
                  keytip="l"
                  imageMso="DeleteTable" />

        </group>

        <group id="ToolsGroup" label="Werkzeuge" imageMso="ToolboxGallery" >

          <button id="InterpolButton"
                  label="Inter- polation"
                  size="large"
                  screentip="Interpolationsformel erstellen"
                  supertip="Wenn 3 Zellen markiert sind, zwei davon in der gleichen Spalte (x-Werte), dann wird in die dritte Zelle die Interpolationsformel eingetragen (Spalte mit Funktionswerten)."
                  onAction="GeoToolsButtonAction"
                  getEnabled="GetEnabledTable"
                  keytip="i"
                  imageMso="ZIndex" />

          <button id="DuplicatesButton"
                  label="Duplikate"
                  size="large"
                  screentip="Duplikate markieren"
                  supertip="Ab der markierten Zelle werden alle wiederholt auftretenden Werte hervorgehoben (mit Hilfe der Bedingten Formatierung)."
                  onAction="GeoToolsButtonAction"
                  getEnabled="GetEnabledTable"
                  keytip="d"
                  imageMso="QuickStylesSets" />

          <button id="BlankLinesButton"
                  label="Leer- zeilen"
                  size="large"
                  screentip="Leerzeilen im Intervall einfügen"
                  supertip="In einem per Dialog festzulegenden Intervall werden Leerzeilen eingefügt."
                  onAction="GeoToolsButtonAction"
                  getEnabled="GetEnabledTable"
                  keytip="z"
                  imageMso="SpacingDouble" />

          <separator id="ToolsSeparator1" />

          <button id="EditFileButton"
                  label="Editor"
                  size="normal"
                  screentip="Datei editieren"
                  supertip="Wenn die aktive Zelle einen vollständigen Dateinamen enthält, wird diese Datei im Editor geöffnet."
                  onAction="GeoToolsButtonAction"
                  getEnabled="GetEnabledTable"
                  keytip="r"
                  imageMso="EditDocument" />

          <button id="SetFooterButton"
                  label="Fußzeile"
                  size="normal"
                  screentip="Fußzeile einrichten"
                  supertip="Die Fußzeile wird neu belegt: Links = Kontaktdaten, Mitte = leer, Rechts = Seitennummer. Die Kontaktdaten werden aus dem Eintrag "FUSSZEILE_EXCEL_1" aus der Ini-Datei mit Ortsdaten gelesen (siehe Konfiguration)."
                  onAction="GeoToolsButtonAction"
                  getEnabled="GetEnabledTable"
                  keytip="ß"
                  imageMso="FooterInsertGallery" />

          <separator id="ToolsSeparator2" />

          <button id="BatchPDFButton"
                  label="Batch PDF"
                  size="large"
                  screentip="Dialog-gesteuerter PDF-Stapel-Export von Excel-Dateien"
                  supertip="Für jede im Dialog gewählte Excel-Datei wird eine PDF-Datei gleichen Namens erzeugt (im Ordner der Excel-Datei)."
                  onAction="GeoToolsButtonAction"
                  getEnabled="GetEnabledMacrosExecutable"
                  keytip="p"
                  imageMso="SendPdf" />

         </group>
      </tab>
    </tabs>
  </ribbon>

  <contextMenus>
    <contextMenu idMso="ContextMenuCell">
      <menuSeparator id="GeoToolsContextMenuSeparator" />
      <button id="FormatContextMenuButton"
              label="Format (GeoTools-Tabelle)"
              screentip="Datenbereich formatieren"
              supertip="Das Format der ersten Zeile des Datenbereiches (laut Tabellenstruktur) wird auf alle weiteren Zeilen übertragen. Dabei werden die Optionen berücksichtigt."
              onAction="GeoToolsButtonAction"
              getEnabled="GetEnabledGeoToolsTable"
              imageMso="FormatPainter" />
    </contextMenu>
  </contextMenus>

</customUI>


text:
package com.amazonaws.ant;

import java.io.File;
import java.io.IOException;

import org.apache.commons.io.FileUtils;
import org.apache.tools.ant.BuildException;

import com.amazonaws.ant.AWSAntTask;

public class AssertFileEqualsTask extends AWSAntTask {

    private String firstFile;

    public void setFirstFile(String firstFile) {
        this.firstFile = firstFile;
    }

    private String secondFile;

    public void setSecondFile(String secondFile) {
        this.secondFile = secondFile;
    }

    private void checkParams() {
        if (firstFile == null) {
            throw new BuildException("First file must be specified");
        }
        if (secondFile == null) {
            throw new BuildException("Second file must be specified");
        }

    }

    public void execute() {
        checkParams();
        File file1 = new File(firstFile);
        if (!file1.exists()) {
            throw new BuildException("The file " + firstFile + "does not exist");
        }
        File file2 = new File(secondFile);
        if (!file2.exists()) {
            throw new BuildException("The file " + secondFile
                    + "does not exist");
        }

        try {
            if (!FileUtils.contentEquals(file1, file2)) {
                throw new BuildException(
                        "The two input files are not equal in content");
            }
        } catch (IOException e) {
            throw new BuildException(
                    "IOException while trying to compare content of files: "
                            + e.getMessage());
        }
    }
}


text:
import os
import re
import csv
import tempfile
import logging
from datetime import datetime
from collections import defaultdict
from itertools import izip_longest

from wlauto import Instrument, Parameter
from wlauto import ApkFile
from wlauto.exceptions import DeviceError, HostError
from wlauto.utils.android import ApkInfo
from wlauto.utils.types import list_of_strings

THIS_DIR = os.path.dirname(__file__)

NETSTAT_REGEX = re.compile(r'I/(?P<tag>netstats-\d+)\(\s*\d*\): (?P<ts>\d+) '
                           r'"(?P<package>[^"]+)" TX: (?P<tx>\S+) RX: (?P<rx>\S+)')

def extract_netstats(filepath, tag=None):
    netstats = []
    with open(filepath) as fh:
        for line in fh:
            match = NETSTAT_REGEX.search(line)
            if not match:
                continue
            if tag and match.group('tag') != tag:
                continue
            netstats.append((match.group('tag'),
                             match.group('ts'),
                             match.group('package'),
                             match.group('tx'),
                             match.group('rx')))
    return netstats

def netstats_to_measurements(netstats):
    measurements = defaultdict(list)
    for row in netstats:
        tag, ts, package, tx, rx = row  # pylint: disable=unused-variable
        measurements[package + '_tx'].append(tx)
        measurements[package + '_rx'].append(rx)
    return measurements

def write_measurements_csv(measurements, filepath):
    headers = sorted(measurements.keys())
    columns = [measurements[h] for h in headers]
    with open(filepath, 'wb') as wfh:
        writer = csv.writer(wfh)
        writer.writerow(headers)
        writer.writerows(izip_longest(*columns))

class NetstatsCollector(object):

    def __init__(self, target, apk, service='.TrafficMetricsService'):
        """
        Additional paramerter:

        :apk: Path to the APK file that contains ``com.arm.devlab.netstats``
              package. If not specified, it will be assumed that an APK with
              name "netstats.apk" is located in the same directory as the
              Python module for the instrument.
        :service: Name of the service to be launched. This service must be
                  present in the APK.

        """
        self.target = target
        self.apk = apk
        self.logger = logging.getLogger('netstat')
        self.package = ApkInfo(self.apk).package
        self.service = service
        self.tag = None
        self.command = None
        self.stop_command = 'am kill {}'.format(self.package)

    def setup(self, force=False):
        if self.target.package_is_installed(self.package):
            if force:
                self.logger.debug('Re-installing {} (forced)'.format(self.package))
                self.target.uninstall(self.package)
                self.target.install(self.apk, timeout=300)
            else:
                self.logger.debug('{} already present on target'.format(self.package))
        else:
            self.logger.debug('Deploying {} to target'.format(self.package))
            self.target.install(self.apk)

    def reset(self, sites=None, period=None):
        period_arg, packages_arg = '', ''
        self.tag = 'netstats-{}'.format(datetime.now().strftime('%Y%m%d%H%M%s'))
        tag_arg = ' --es tag {}'.format(self.tag)
        if sites:
            packages_arg = ' --es packages {}'.format(','.join(sites))
        if period:
            period_arg = ' --ei period {}'.format(period)
        self.command = 'am startservice{}{}{} {}/{}'.format(tag_arg,
                                                            period_arg,
                                                            packages_arg,
                                                            self.package,
                                                            self.service)
        self.target.execute(self.stop_command)  # ensure the service is not running.

    def start(self):
        if self.command is None:
            raise RuntimeError('reset() must be called before start()')
        self.target.execute(self.command)

    def stop(self):
        self.target.execute(self.stop_command)

    def get_data(self, outfile):
        raw_log_file = tempfile.mktemp()
        self.target.dump_logcat(raw_log_file)
        data = extract_netstats(raw_log_file)
        measurements = netstats_to_measurements(data)
        write_measurements_csv(measurements, outfile)
        os.remove(raw_log_file)

    def teardown(self):
        self.target.uninstall(self.package)

class NetstatsInstrument(Instrument):
    # pylint: disable=unused-argument

    name = 'netstats'
    description = """
    Measures transmit/receive network traffic on an Android divice on per-package
    basis.

    """

    parameters = [
        Parameter('packages', kind=list_of_strings,
                  description="""
                  List of Android packages who's traffic will be monitored. If
                  unspecified, all packages in the device will be monitorred.
                  """),
        Parameter('period', kind=int, default=5,
                  description="""
                  Polling period for instrumentation on the device. Traffic statistics
                  will be updated every ``period`` seconds.
                  """),
        Parameter('force_reinstall', kind=bool, default=False,
                  description="""
                  If ``True``, instrumentation APK will always be re-installed even if
                  it already installed on the device.
                  """),
        Parameter('uninstall_on_completion', kind=bool, default=False,
                  global_alias='cleanup',
                  description="""
                  If ``True``, instrumentation will be uninstalled upon run completion.
                  """),
    ]

    def initialize(self, context):
        if self.device.platform != 'android':
            raise DeviceError('nestats instrument only supports on Android devices.')
        apk = context.resolver.get(ApkFile(self))
        self.collector = NetstatsCollector(self.device, apk)  # pylint: disable=attribute-defined-outside-init
        self.collector.setup(force=self.force_reinstall)

    def setup(self, context):
        self.collector.reset(sites=self.packages, period=self.period)

    def start(self, context):
        self.collector.start()

    def stop(self, context):
        self.collector.stop()

    def update_result(self, context):
        outfile = os.path.join(context.output_directory, 'netstats.csv')
        self.collector.get_data(outfile)
        context.add_artifact('netstats', outfile, kind='data')
        with open(outfile, 'rb') as fh:
            reader = csv.reader(fh)
            metrics = reader.next()
            data = [c for c in izip_longest(*list(reader))]
            for name, values in zip(metrics, data):
                value = sum(map(int, [v for v in values if v]))
                context.add_metric(name, value, units='bytes')

    def finalize(self, context):
        if self.uninstall_on_completion:
            self.collector.teardown()


text:
/**
 * @function findContours_Demo.cpp
 * @brief Demo code to find contours in an image
 * @author OpenCV team
 */

#include "opencv2/imgcodecs.hpp"
#include "opencv2/highgui.hpp"
#include "opencv2/imgproc.hpp"
#include <iostream>

using namespace cv;
using namespace std;

Mat src_gray;
int thresh = 100;
RNG rng(12345);

/// Function header
void thresh_callback(int, void* );

/**
 * @function main
 */
int main( int argc, char** argv )
{
    /// Load source image
    CommandLineParser parser( argc, argv, "{@input | HappyFish.jpg | input image}" );
    Mat src = imread( samples::findFile( parser.get<String>( "@input" ) ) );
    if( src.empty() )
    {
      cout << "Could not open or find the image!\n" << endl;
      cout << "Usage: " << argv[0] << " <Input image>" << endl;
      return -1;
    }

    /// Convert image to gray and blur it
    cvtColor( src, src_gray, COLOR_BGR2GRAY );
    blur( src_gray, src_gray, Size(3,3) );

    /// Create Window
    const char* source_window = "Source";
    namedWindow( source_window );
    imshow( source_window, src );

    const int max_thresh = 255;
    createTrackbar( "Canny thresh:", source_window, &thresh, max_thresh, thresh_callback );
    thresh_callback( 0, 0 );

    waitKey();
    return 0;
}

/**
 * @function thresh_callback
 */
void thresh_callback(int, void* )
{
    /// Detect edges using Canny
    Mat canny_output;
    Canny( src_gray, canny_output, thresh, thresh*2 );

    /// Find contours
    vector<vector<Point> > contours;
    vector<Vec4i> hierarchy;
    findContours( canny_output, contours, hierarchy, RETR_TREE, CHAIN_APPROX_SIMPLE );

    /// Draw contours
    Mat drawing = Mat::zeros( canny_output.size(), CV_8UC3 );
    for( size_t i = 0; i< contours.size(); i++ )
    {
        Scalar color = Scalar( rng.uniform(0, 256), rng.uniform(0,256), rng.uniform(0,256) );
        drawContours( drawing, contours, (int)i, color, 2, LINE_8, hierarchy, 0 );
    }

    /// Show in a window
    imshow( "Contours", drawing );
}


text:
CollectionViewPageFlowLayout is a _paged_ collection view flow layout in Swift

## Usage

In any `UICollectionViewController` (or any `UIViewController` with a `UICollectionView`) create a `CollectionViewPageFlowLayout` instance and assign it to the `collectionViewLayout` property of the `UICollectionView`.

``` swift
let pagedLayout = CollectionViewPageFlowLayout()
self.collectionView.collectionViewLayout = pagedLayout
```

That's it. Now you don't have to worry about the size changes of your collection view or the interface orientation of your view controller. The layout will always make sure it's _paged_.

![A paged collection view](Screenshot/page.gif)

### Page separators

Out of the box, the layout will make it look like your collection view's _pages_ are stuck together. There are no margins between them. You can change this by setting the `minimumLineSpacing` property to a non-zero value. This will add spaces before and after the collection view items. Of course, you don't have to worry about the item size. The layout will take care of that for you. Just make sure you resize your collection view beyond it's superview so that the spaces are only visible while scrolling.

``` swift
self.collectionView.frame = CGRectInset(self.view.bounds, -2, 0)
let pageLayout = self.collectionView.collectionViewLayout as CollectionViewPageFlowLayout
pageLayout.minimumLineSpacing = 4
```
![A paged collection view with separator margins](Screenshot/pagemargin.gif)


text:
<?php

namespace libfajr\data;

use PHPUnit_Framework_TestCase;
use libfajr\data\InformacnyListDataImpl;
use libfajr\data\InformacnyListAttributeEnum as Attr;

/**
 * @ignore
 */
class InformacnyListDataImplTest extends PHPUnit_Framework_TestCase {

    public $informacnyList;

    public function setUp() {

        $list = array(
            array(
              'id' => Attr::NAZOV,
              'values' => array("Kryptologia (2)"),
              ),
            array(
              'id' => Attr::STUDIJNY_PROGRAM,
              'values' => array("mINF, mINF/k"),
              ),
            array(
              'id' => Attr::POCET_KREDITOV,
              'values' => array("6"),
              ),
            );
        $this->informacnyList = new InformacnyListDataImpl($list);

    }

    public function testExistenciaAtributov() {
        $this->assertTrue($this->informacnyList->hasAttribute(Attr::NAZOV));
        $this->assertTrue($this->informacnyList->hasAttribute(Attr::STUDIJNY_PROGRAM));
        $this->assertFalse($this->informacnyList->hasAttribute('b34gh'));
    }

    public function testExistenciaAtributov2() {
        foreach ($this->informacnyList->getListOfAttributes() as $attribute) {
            $this->assertTrue($this->informacnyList->hasAttribute($attribute));
        }
    }

    public function testHodnotyAtributov() {
        $studProgram = $this->informacnyList->getAttribute(Attr::STUDIJNY_PROGRAM);
        $this->assertEquals('mINF, mINF/k', $studProgram['values'][0]);

        $pocetKreditov = $this->informacnyList->getAttribute(Attr::POCET_KREDITOV);
        $this->assertEquals('6', $pocetKreditov['values'][0]);

        $this->assertFalse($this->informacnyList->getAttribute('b34gh'));
    }

    public function testKonzistenciaGetAllAttributes() {
        $attributes = $this->informacnyList->getAllAttributes();
        foreach ($attributes as $attr) {
            $this->assertEquals($attr, $this->informacnyList->getAttribute($attr['id']));
        }
    }

}


text:
//-----------------------------------------------------------------------------

#ifndef TRAIN_HPP
#define TRAIN_HPP

#include "options/train.hpp"
#include "train+/tree.hpp"
#include "train+/leaf.hpp"
#include "train+/node.hpp"
#include "train+/root.hpp"

#endif  // TRAIN_HPP


text:
Template.navBar.onCreated(function(){

});

Template.navBar.onRendered(function(){

});

Template.navBar.events({
  'click #logout': function (e) {
    e.preventDefault();
    Meteor.logout();
    //FlowRouter.go('/login');
    Tracker.autorun(function(){
      if(!Meteor.user()) {
        //console.log('triger entered');
        FlowRouter.go('login');
      }
    });

  }
});

Template.navBar.helpers({
  homeUrl: function () {
    if (Meteor.userId()) {
        return '/home';
    }
    return '/';
  }
});


text:
Pattern: Use of `t()` for second `watchdog()` argument

Issue: -

## Description

Checks that the second argument to `watchdog()` is not enclosed with `t()`.

## Further Reading

* [PHP_CodeSniffer - Drupal.Semantics.FunctionWatchdog](https://git.drupalcode.org/project/coder/-/tree/8.3.x/coder_sniffer/Drupal/Sniffs/Semantics/FunctionWatchdogSniff.php)


text:
valueref_spec =
[
	(:value, Any, nothing),
	(:field, String, nothing),
	(:group, Union(String, Bool), nothing),
	(:scale, String, nothing),
	(:mult, Number, nothing),
	(:offset, Number, nothing),
	(:band, Bool, nothing)
]

primitivefactory(:VegaValueRef, valueref_spec)


text:
#include <aws/clouddirectory/model/BatchReadExceptionType.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>

using namespace Aws::Utils;

namespace Aws
{
  namespace CloudDirectory
  {
    namespace Model
    {
      namespace BatchReadExceptionTypeMapper
      {

        static const int ValidationException_HASH = HashingUtils::HashString("ValidationException");
        static const int InvalidArnException_HASH = HashingUtils::HashString("InvalidArnException");
        static const int ResourceNotFoundException_HASH = HashingUtils::HashString("ResourceNotFoundException");
        static const int InvalidNextTokenException_HASH = HashingUtils::HashString("InvalidNextTokenException");
        static const int AccessDeniedException_HASH = HashingUtils::HashString("AccessDeniedException");
        static const int NotNodeException_HASH = HashingUtils::HashString("NotNodeException");

        BatchReadExceptionType GetBatchReadExceptionTypeForName(const Aws::String& name)
        {
          int hashCode = HashingUtils::HashString(name.c_str());
          if (hashCode == ValidationException_HASH)
          {
            return BatchReadExceptionType::ValidationException;
          }
          else if (hashCode == InvalidArnException_HASH)
          {
            return BatchReadExceptionType::InvalidArnException;
          }
          else if (hashCode == ResourceNotFoundException_HASH)
          {
            return BatchReadExceptionType::ResourceNotFoundException;
          }
          else if (hashCode == InvalidNextTokenException_HASH)
          {
            return BatchReadExceptionType::InvalidNextTokenException;
          }
          else if (hashCode == AccessDeniedException_HASH)
          {
            return BatchReadExceptionType::AccessDeniedException;
          }
          else if (hashCode == NotNodeException_HASH)
          {
            return BatchReadExceptionType::NotNodeException;
          }
          EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
          if(overflowContainer)
          {
            overflowContainer->StoreOverflow(hashCode, name);
            return static_cast<BatchReadExceptionType>(hashCode);
          }

          return BatchReadExceptionType::NOT_SET;
        }

        Aws::String GetNameForBatchReadExceptionType(BatchReadExceptionType enumValue)
        {
          switch(enumValue)
          {
          case BatchReadExceptionType::ValidationException:
            return "ValidationException";
          case BatchReadExceptionType::InvalidArnException:
            return "InvalidArnException";
          case BatchReadExceptionType::ResourceNotFoundException:
            return "ResourceNotFoundException";
          case BatchReadExceptionType::InvalidNextTokenException:
            return "InvalidNextTokenException";
          case BatchReadExceptionType::AccessDeniedException:
            return "AccessDeniedException";
          case BatchReadExceptionType::NotNodeException:
            return "NotNodeException";
          default:
            EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
            if(overflowContainer)
            {
              return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
            }

            return "";
          }
        }

      } // namespace BatchReadExceptionTypeMapper
    } // namespace Model
  } // namespace CloudDirectory
} // namespace Aws


text:
These formulae were games.

All formulae were migrated to [Homebrew/homebrew-core](https://github.com/Homebrew/homebrew-core) or deleted.


text:
class ChangeWikititleIndexOnPages < ActiveRecord::Migration
  def change
    remove_index :pages, :wikititle
    add_index :pages, :wikititle, unique: true
  end
end


text:
import logging
import re

from .mqtt import mqtt
from ..helpers import get_kwargs
from ..helpers import key_wanted

log = logging.getLogger("domoticz_autodiscover")

class domoticz_autodiscover(mqtt):
    def __str__(self):
        return """outputs the to the supplied mqtt broker in hass format: eg "homeassistant/sensor/mpp_{tag}_{key}/state" """

    def __init__(self, *args, **kwargs) -> None:
        log.debug(f"__init__: kwargs {kwargs}")

    def build_msgs(self, *args, **kwargs):
        data = get_kwargs(kwargs, "data")
        tag = get_kwargs(kwargs, "tag")
        keep_case = get_kwargs(kwargs, "keep_case")

        filter = get_kwargs(kwargs, "filter")
        if filter is not None:
            filter = re.compile(filter)
        excl_filter = get_kwargs(kwargs, "excl_filter")
        if excl_filter is not None:
            excl_filter = re.compile(excl_filter)

        # Build array of mqtt messages with hass update format
        # assumes hass_config has been run
        # or hass updated manually
        msgs = []
        # Remove command and _command_description
        data.pop("_command", None)
        data.pop("_command_description", None)
        data.pop("raw_response", None)

        # Loop through responses
        for _key in data:
            # value = data[_key][0]
            unit = data[_key][1]
            # remove spaces
            key = _key.replace(" ", "_")
            if not keep_case:
                # make lowercase
                key = key.lower()
            if key_wanted(key, filter, excl_filter):
                #
                # CONFIG / AUTODISCOVER
                #
                # <discovery_prefix>/<component>/[<node_id>/]<object_id>/config
                # topic "homeassistant/binary_sensor/garden/config"
                # msg '{"name": "garden", "device_class": "motion", "state_topic": "homeassistant/binary_sensor/garden/state", "unit_of_measurement": "°C"}'
                topic = f"homeassistant/sensor/mpp_{tag}_{key}/config"
                topic = topic.replace(" ", "_")
                state_topic = f"domoticz/sensor/mpp_{tag}_{key}/state"
                state_topic = state_topic.replace(" ", "_")

                name = f"{tag} {_key}"
                if unit == "W":
                    payload = f'{{"name": "{name}", "stat_t": "{state_topic}", "unit_of_meas": "{unit}", "uniq_id": "mpp_{tag}_{key}", "stat_cla": "measurement", "device_class": "power"  }}'
                else:
                    payload = f'{{"name": "{name}", "stat_t": "{state_topic}", "unit_of_meas": "{unit}", "uniq_id": "mpp_{tag}_{key}"  }}'
                # msg = {"topic": topic, "payload": payload, "retain": True}
                msg = {"topic": topic, "payload": payload}
                msgs.append(msg)
                #
                # VALUE SETTING
                #
                # payload = value
                # msg = {"topic": state_topic, "payload": payload}
                # msgs.append(msg)
        return msgs


text:
require 'sys-uname'
require 'sys/proctable'
require 'util/runcmd'
require 'util/win32/miq-wmi'
require 'util/miq-system'

class MiqProcess
  def self.get_active_process_by_name(process_name)
    pids = []

    case Sys::Platform::IMPL
    when :mswin, :mingw
      WMIHelper.connectServer.run_query("select Handle,Name from Win32_Process where Name = '#{process_name}.exe'") { |p| pids << p.Handle.to_i }
    when :linux, :macosx
      pids = `ps -e | grep #{process_name} | grep -v grep `.split("\n").collect(&:to_i)
    else
      raise "Method MiqProcess.get_active_process_by_name not implemented on this platform [#{Sys::Platform::IMPL}]"
    end
    pids
  end

  def self.linux_process_stat(pid = nil)
    pid ||= Process.pid

    filename = "/proc/#{pid}/stat"
    raise Errno::ESRCH.new(pid.to_s) unless File.exist?(filename)

    result = {:pid => pid}
    raw_stats = MiqSystem.readfile_async(filename)
    unless raw_stats.nil?
      stats = raw_stats.split(" ")
      if pid.to_s == stats.shift
        result[:name]                  = stats.shift.gsub(/(^\(|\)$)/, '')
        result[:state]                 = stats.shift
        result[:ppid]                  = stats.shift.to_i
        result[:pgrp]                  = stats.shift.to_i
        result[:session]               = stats.shift.to_i
        result[:tty_nr]                = stats.shift.to_i
        result[:tpgid]                 = stats.shift.to_i
        result[:flags]                 = stats.shift
        result[:minflt]                = stats.shift.to_i
        result[:cminflt]               = stats.shift.to_i
        result[:majflt]                = stats.shift.to_i
        result[:cmajflt]               = stats.shift.to_i
        result[:utime]                 = stats.shift.to_i
        result[:stime]                 = stats.shift.to_i
        result[:cutime]                = stats.shift.to_i
        result[:cstime]                = stats.shift.to_i
        result[:priority]              = stats.shift.to_i
        result[:nice]                  = stats.shift.to_i
        result[:num_threads]           = stats.shift.to_i
        result[:itrealvalue]           = stats.shift.to_i
        result[:starttime]             = stats.shift.to_i
        result[:vsize]                 = stats.shift.to_i
        result[:rss]                   = stats.shift.to_i
        result[:rsslim]                = stats.shift.to_i
        result[:startcode]             = stats.shift.to_i
        result[:endcode]               = stats.shift.to_i
        result[:startstack]            = stats.shift.to_i
        result[:kstkesp]               = stats.shift.to_i
        result[:kstkeip]               = stats.shift.to_i
        result[:signal]                = stats.shift
        result[:blocked]               = stats.shift
        result[:sigignore]             = stats.shift
        result[:sigcatch]              = stats.shift
        result[:wchan]                 = stats.shift.to_i
        result[:nswap]                 = stats.shift.to_i
        result[:cnswap]                = stats.shift.to_i
        result[:exit_signal]           = stats.shift.to_i
        result[:processor]             = stats.shift.to_i
        result[:rt_priority]           = stats.shift.to_i
        result[:policy]                = stats.shift.to_i
        result[:delayacct_blkio_ticks] = stats.shift.to_i
        result[:guest_time]            = stats.shift.to_i
        result[:cguest_time]           = stats.shift.to_i
      end
    end

    result
  end

  def self.processInfo(pid = nil)
    pid ||= Process.pid

    result = {:pid => pid}

    case Sys::Platform::IMPL
    when :mswin, :mingw
      # WorkingSetSize: The amount of memory in bytes that a process needs to execute efficiently, for an operating system that uses
      #                 page-based memory management. If an insufficient amount of memory is available (< working set size), thrashing will occur.
      # KernelModeTime: Time in kernel mode, in 100 nanoseconds
      # UserModeTime  : Time in user mode, in 100 nanoseconds.
      wmi = WMIHelper.connectServer
      process_list_wmi(wmi, pid).each_pair { |_k, v| result = v }
      wmi.release
    when :linux
      x = MiqProcess.linux_process_stat(pid)
      result[:name]           = x[:name]
      result[:priority]       = x[:priority]
      result[:memory_usage]   = x[:rss] * 4096
      result[:memory_size]    = x[:vsize]
      percent_memory          = (1.0 * result[:memory_usage]) / MiqSystem.total_memory
      result[:percent_memory] = round_to(percent_memory * 100.0, 2)
      result[:cpu_time]       = x[:stime] + x[:utime]
      cpu_status              = MiqSystem.status[:cpu]
      cpu_total               = (0..3).inject(0) { |sum, x| sum + cpu_status[x].to_i }
      cpu_total /= MiqSystem.num_cpus
      percent_cpu             = (1.0 * result[:cpu_time]) / cpu_total
      result[:percent_cpu]    = round_to(percent_cpu * 100.0, 2)
      result[:proportional_set_size] = Sys::ProcTable.ps(pid).smaps.pss
    when :macosx
      h = nil
      begin
        h = process_list_linux("ps -p #{pid} -o pid,rss,vsize,%mem,%cpu,time,pri,ucomm", true)
      rescue
        raise Errno::ESRCH.new(pid.to_s)
      end
      result = h[pid]
    end

    result
  end

  def self.command_line(pid)
    # Already exited pids, or permission errors cause ps or ps.cmdline to be nil,
    # so the best we can do is return an empty string.
    Sys::ProcTable.ps(pid).try(:cmdline) || ""
  end

  def self.alive?(pid)
    raise NotImplementedError, "Method MiqProcess.alive? not implemented on this platform [#{Sys::Platform::IMPL}]" unless Sys::Platform::OS == :unix

    begin
      Process.kill(0, pid)
      true
    rescue Errno::ESRCH
      false
    end
  end

  def self.is_worker?(pid)
    command_line = self.command_line(pid)
    command_line.include?(MiqWorker::PROCESS_TITLE_PREFIX)
  end

  def self.process_list_all(wmi = nil)
    pl = {}
    return process_list_wmi(wmi) unless wmi.nil?

    case Sys::Platform::IMPL
    when :mswin, :mingw
      pl = process_list_wmi(wmi)
    when :linux
      pl = process_list_linux("ps -e -o pid,rss,vsize,%mem,%cpu,time,priority,ucomm --no-headers")
    when :macosx
      pl = process_list_linux("ps -e -o pid,rss,vsize,%mem,%cpu,time,pri,ucomm", true)
    end
    pl
  end

  def self.process_list_wmi(wmi = nil, pid = nil)
    pl = {}
    wmi = WMIHelper.connectServer if wmi.nil?
    os_data = wmi.get_instance('select TotalVisibleMemorySize from Win32_OperatingSystem')
    proc_query = 'select PageFileUsage,Name,Handle,WorkingSetSize,Priority,UserModeTime,KernelModeTime from Win32_Process'
    proc_query += " where Handle = '#{pid}'" unless pid.nil?
    proc_data = wmi.run_query(proc_query)

    # Calculate the CPU % from a 2 second sampling of the raw perf counters.
    perf_query = 'Select IDProcess,PercentProcessorTime,Timestamp_Sys100NS from Win32_PerfRawData_PerfProc_Process'
    perf_query += " where IDProcess = '#{pid}'" unless pid.nil?
    fh = {}; perf = {}
    wmi.run_query(perf_query).each { |p| fh[p.IDProcess] = {:ppt => p.PercentProcessorTime.to_i, :ts => p.Timestamp_Sys100NS.to_i} }
    sleep(2)
    wmi.run_query(perf_query).each do |p|
      m1 = fh[p.IDProcess]
      if m1
        n = p.PercentProcessorTime.to_i - m1[:ppt]
        d = p.Timestamp_Sys100NS.to_i - m1[:ts]
        perf[p.IDProcess.to_i] = 100 * n / d
      end
    end

    proc_data.each { |p| next if p.Handle.to_i <= 4; pl[p.Handle.to_i] = parse_process_data(:wmi, p, perf, os_data) }
    pl
  end

  def self.process_list_linux(cmd_str, skip_header = false)
    pl, i = {}, 0
    rc = MiqUtil.runcmd(cmd_str)
    rc.each_line do |ps_str|
      i += 1
      next if i == 1 && skip_header == true
      pinfo = ps_str.strip.split(' ')
      nh = parse_process_data(:linux, pinfo, perf = nil, os = nil)
      pl[nh[:pid]] = nh
      pl
    end
    pl
  end

  def self.parse_process_data(data_type, pinfo, perf = nil, os = nil)
    nh = {}
    if data_type == :wmi
      nh[:pid]            = pinfo.Handle.to_i
      nh[:name]           = pinfo.Name
      nh[:memory_size]    = pinfo.WorkingSetSize.to_i
      nh[:memory_usage]   = nh[:memory_size] - pinfo.PageFileUsage.to_i * 1024
      # Keep the percent format to 2 decimal places
      nh[:percent_memory] = sprintf("%.2f", pinfo.WorkingSetSize.to_f / (os.TotalVisibleMemorySize.to_i * 1024) * 100)
      nh[:cpu_time]       = (pinfo.UserModeTime.to_i + pinfo.KernelModeTime.to_i) / 10000000    # in seconds
      nh[:priority]       = pinfo.Priority.to_i
      nh[:percent_cpu]    = perf[nh[:pid]]
    else
      nh[:pid]            = pinfo[0].to_i
      nh[:memory_usage]   = pinfo[1].to_i * 1024   # Memory in RAM
      nh[:memory_size]    = pinfo[2].to_i * 1024   # Memory in RAM and swap
      nh[:percent_memory] = pinfo[3]
      nh[:percent_cpu]    = pinfo[4]
      nh[:cpu_time]       = str_time_to_sec(pinfo[5])
      nh[:priority]       = pinfo[6]
      nh[:name]           = pinfo[7..-1].join(' ')
    end
    nh
  end

  def self.str_time_to_sec(time_str)
    # Convert format 00:00:00 to seconds
    t = time_str.split(':')
    (t[0].to_i * 3600) + (t[1].to_i * 60) + t[2].to_i
  end

  def self.suspend_process(pid)
    case Sys::Platform::OS
    when :windows then Process.process_thread_list[pid].each { |tid| Process.suspend_resume_thread(tid, false) }
    else
      raise "Method MiqProcess.suspend_process not implemented on this platform [#{Sys::Platform::IMPL}]"
    end
  end

  def self.resume_process(pid)
    case Sys::Platform::OS
    when :windows then Process.process_thread_list[pid].each { |tid| Process.suspend_resume_thread(tid, true) }
    else
      raise "Method MiqProcess.resume_process not implemented on this platform [#{Sys::Platform::IMPL}]"
    end
  end

  def self.round_to(number, precision)
    mult = 10**precision
    (number * mult).round.to_f / mult
  end
end

# Examples:
# puts MiqProcess.processInfo().inspect
# puts MiqProcess.process_list_all().inspect
# MiqProcess.process_list_all().each_pair do |k,v|
#  puts v.inspect
# end


text:
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package estrategias.jigsawASHYI.Servicios.DiscusionGrupo;

import co.edu.javeriana.ayllu.agents.communitymanageragent.CommunityManagerAgentState;
import estrategias.jigsawASHYI.Servicios.Discusion.DatosDiscusion;

/**
 *
 * @author yolima
 */
public class Estado_JigSaw_DiscusionGrupo extends CommunityManagerAgentState{

    private DatosDiscusion datos;
    private DatosEstudiarOvaGrupo datosEstudio;
    private int numEstudiantesPregListas;

    public Estado_JigSaw_DiscusionGrupo(DatosDiscusion data, int numEstudiantes) {
        super(null, null);
        datos = data;
        this.setCourseID("SIST_INT");
        numEstudiantesPregListas = 0;
        datosEstudio = new DatosEstudiarOvaGrupo(numEstudiantes);
    }

    public DatosDiscusion getDatos() {
        return datos;
    }

    public void setDatos(DatosDiscusion datos) {
        this.datos = datos;
    }

    public int getNumEstudiantesPregListas() {
        return numEstudiantesPregListas;
    }

    public void setNumEstudiantesPregListas(int numEstudiantesPregListas) {
        this.numEstudiantesPregListas = numEstudiantesPregListas;
    }

    public void aumentarNumEstudiantesPregListas() {
        this.numEstudiantesPregListas += 1;
    }

    public DatosEstudiarOvaGrupo getDatosEstudio() {
        return datosEstudio;
    }

    public void setDatosEstudio(DatosEstudiarOvaGrupo datosEstudio) {
        this.datosEstudio = datosEstudio;
    }

}


text:
title: "HTML Basics 2"
description: "Description of the assignment"
type: "challenge"
points: 4
layout: assignment
date: 2018-09-19 12:00:00
semester: fall-2018
status: assignment-completed

---

You've been tasked with creating a landing page for Kent State's Destination Kent State program.  Using the content and instructions below, create this webpage on CodePen using semantic markup.  Do not worry about presentation for this assignment.

This is an individual assignment, and it will be turned in via Blackboard Learn.

**Do not copy and paste another student's code.  If I catch you doing so, you'll receive a 0 for the assignment.**

## What To Do

1. Create a new **public pen** and name it using this structure: "Your Last Name - HTML Basics 2".
2. Take the plain text content (provided below) and structure it into HTML in your pen.   Pay attention to the client notes - they're important.

### Submitting the Assignment
1. Remember that CodePen automatically inserts all of the required code for the HEAD of the document.
2. Copy the public CodePen URL.
3. Log in to Blackboard Learn to submit your assignment.  Go to Assignments > Assignment Name.  Under Write Submission, Paste the URL of the Pen (Editor Mode).  Click Submit.

Your assignment should look something like this.

## The Content

***Client Note - Add the Welcome Weekend logo at the top*** https://du1ux2871uqvu.cloudfront.net/sites/default/files/file/DKS%2015.png

**Welcome Weekend**

**What Is Welcome Weekend?**

Welcome Weekend 2015 is a weekend packed full of fun activities and events starting Thursday, August 27th through Sunday, August 30th. Students will move into their residence halls and attend their first hall meeting. Throughout the weekend, students will have the opportunity to meet fellow classmates in their FYE class, and get to know their way around Kent's campus. This year's events include a comedian, Convocation, FYE Common Reading, Discover Downtown Kent, and Blastoff! Other events include: bingo, movies, broomball, ice skating, and karaoke.

***Client Note: Quotations should be marked up in proper blockquote (the quote text) and cite tags (the author's name).***

"Welcome Weekend is a great time to meet new friends and get acclimated with Kent State's magnificent campus." - President Warren

***Client Note: Add this image between the text and the header.  Don't forget alt text for the image.  Add a caption below it that says: "Students Attend Back to School Blastoff on the Student Green."  When creating an image with a caption, use the figure and figcaption tags.***

Image URL: https://s3-us-west-2.amazonaws.com/s.cdpn.io/259273/DKSPage_WWImage.jpg

**Welcome Weekend Schedule**

***Client Note:  Set this up in a 3 column table please.  The markup for the header row of the table is slightly different than everything else.***

Table Headings: Time, Event, Location

**8:00 A.M. - 7:00 P.M.**

Event: RESIDENCE HALL MOVE IN.  Follow your assigned move-in times from Residence Services mailing.

Location: YOUR RESIDENCE HALL

**9:00 A.M. - 10:00 A.M.**

Event: Air Force ROTC New Cadet Orientation Program (NCOP) and Parent reception.  New Air Force ROTC cadets and their families are encouraged to attend an
exposition presenting scholarship opportunities, AFROTC requirements, cadet life and possible future careers in the United States Air Force.

Location:  TERRACE HALL

**10:00 A.M. - 8:00 P.M.**

Event: WELCOME WEEKEND CHECK-IN.  Pick up your Welcome Weekend schedule and work with Welcome Weekend staff to learn about all events for Welcome Weekend 2015.

Location: KENT STUDENT CENTER BALLROOM

**6:00 - 7:30 P.M.**

Event: PARENTS & FAMILIES EVENING RECEPTION WITH THE ALUMNI ASSOCIATION.  Relax and network with other KSU parents at this informal reception. Brief program at 6:30. Complimentary refreshments, soft drinks and cash bar. (Beer and wine only)

Location: KENT MARKET II or KENT STUDENT CENTER

**7:30 - 8:30 P.M.**

Event: HILLEL'S KOSHER ICE CREAM SOCIAL.  Unpacked and not sure what to do next? Hillel at Kent State invites students to our house for delicious kosher ice cream creations! Come mix-in toppings and mix with new friends at this laid back social event that includes summer's perfect dessert.

Location: COHN JEWISH STUDENT CENTER, 613 EAST SUMMIT STREET

**9:00 - 10:00 P.M.**

Event: RESIDENCE HALL MEETINGS.  Residence Hall staff members will cover important hall and safety information and introduce you to resources available to assist you in enjoying a safe and fun living environment.

Location: VARIOUS LOCATIONS

**9:00 - 11:00 P.M.**

Event: KARAOKE.  Show off your vocal skills or just cheer on your friends while music from Taylor Swift, Rihanna, and Maroon 5 play! Sponsored by Kent Student Center Programming.

Location: RATHSKELLER, KENT STUDENT CENTER

**10:00 - 11:30 P.M.**

Event: KENT STATE SHUFFLE.  So you think you can dance? Show off your moves or just stop by to meet other KSU students.

Location: STUDENT GREEN

***Client Note: Before the YouTube video, add an HTML comment that has the link to the YouTube video so that you can find it later if you need to.  Use proper HTML comment syntax.  Remember that HTML comments are only there for you, the developer, and do not display to the end-user.***

**Welcome Weekend Video**

***Client Note: YouTube videos should be embedded using the embed code provided by YouTube (under Share > Embed - which will give you an iframe).***

Embed this video so that it plays directly on the page https://www.youtube.com/watch?v=tQmdT99jiYY

**Student Success Programs**

***Use definition lists to mark up this content. Definition lists connect the labels (for example, Phone) to the corresponding content (for example, Phone Number).***

Address: Center for Undergraduate Excellence - Suite 135; 975 Lefton Esplanade Kent, OH 44242
Phone:330-672-9292
Email:newatKSU@kent.edu **make this a clickable email address**

## Rubric

Use the following rubric to ensure you receive the highest possible grade for the assignment:

* **3 - 4**: HTML is structured appropriately and with proper indentation.  Headings show hierarchy, links are functional, paragraphs are tagged appropriately, image and tables are marked up properly.  The client's notes were followed along with the 11 steps and the appropriate links were posted to Learn.
* **2**: The HTML is mostly structured correctly, but there are some syntax errors (tags are not closed or inappropriate tags are used).  Images are not appropriate size.  Some of the client's notes were missed.
* **0 - 1**: HTML does not use appropriate tags for the types of content.  Few tags are formatted appropriately, client notes were missed and the pen was not set up or submitted according to instructions.