text:
published: true
title: Restaurant-Style Coleslaw I
layout: post
categories: [salads]
rating: 0
---
### Servings

### Ingredients
- 4 Servings:
-     * 1/2 (16 ounce) package coleslaw mix
-     * 1 tablespoon minced onion
-     * 2 tablespoons and 2 teaspoons white sugar
-     * 1/4 teaspoon salt
-     * 1/8 teaspoon ground black pepper
-     * 2 tablespoons milk
-     * 1/4 cup mayonnaise
-     * 2 tablespoons buttermilk
-     * 2-1/4 teaspoons white wine vinegar
-     * 1 tablespoon and 3/4 teaspoon lemon juice

- 8 Servings:
-     *   1 (16 ounce) package coleslaw mix
-     * 2 tablespoons minced onion
-     * 1/3 cup white sugar
-     * 1/2 teaspoon salt
-     * 1/8 teaspoon ground black pepper
-     * 1/4 cup milk
-     * 1/2 cup mayonnaise
-     * 1/4 cup buttermilk
-     * 1 1/2 tablespoons white wine vinegar
-     * 2 1/2 tablespoons lemon juice

### Directions
1. Combine the coleslaw and onion in a large bowl.
2. In a separate bowl, combine the sugar, salt, pepper, milk,   Mayonnaise, buttermilk, vinegar and lemon juice; mix until smooth. Pour mixture over the coleslaw and onion; stir well and chill for 1 hour.

### Source


text:
hosts
----------
/etc/hosts

nginx.conf
------------
Configuration file for Nginx. Used to serve/distinguish resources from PHP (via Apache) and Python/Django (via Nginx) at the same page, at the same time.
/usr/local/etc/nginx/nginx.conf

redpajama_set_name: RedPajamaGithub


text:
<body>
Classes to realize the configuration mechanism, i.e. to read the configuration
from the command line as well as from file formats.
</body>


text:
from primaires.connex.contextes.commun.choisir_pass import ChoisirPass

class ChoisirPassConnex(ChoisirPass):
    nom = "connex:connexion:choisir_pass"

    def __init__(self, pere):
        """Constructeur du contexte"""
        ChoisirPass.__init__(self, pere)
        self.opts.rci_ctx_prec = "connex:connexion:choix_personnages"
        self.suivant = "connex:connexion:confirmer_pass"


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace AvalancheAllerts.Web.Controllers
{
    using AvalancheAllerts.Data.Models;
    using AvalancheAllerts.Services.Data;
    using AvalancheAllerts.Web.Infrastructure.Mapping;
    using AvalancheAllerts.Web.ViewModels.Feedback;

    using Microsoft.AspNet.Identity;

    public class FeedbackController : BaseController
    {
        private readonly IFeedbackService feedback;

        public FeedbackController(IFeedbackService feedback)
        {
            this.feedback = feedback;
        }

        [HttpGet]
        public ActionResult Create()
        {
            return View();
        }

        [HttpPost]
        [ValidateAntiForgeryToken]
        public ActionResult Create(FeedbackInputModel model)
        {
            if (!this.ModelState.IsValid)
            {
                return View(model);
            }

            var feedback = new Feedback()
            {
                Content = model.Content,
                Title = model.Title
            };

            if (this.User.Identity.IsAuthenticated)
            {
                feedback.AuthorId = this.User.Identity.GetUserId();
            }

            this.feedback.Create(feedback);
            this.feedback.SaveChanges();

            this.TempData["Notification"] = "Thank you for your feedback!";
            return this.Redirect("/");
        }
    }
}


text:
@interface LORattingView : LOView
@property (strong, nonatomic) IBInspectable UIImage *defaultImage;
@property (strong, nonatomic) IBInspectable UIImage *rattingImage;

@property (assign, nonatomic) IBInspectable NSInteger ratting;
@end


text:
import hljs from 'highlight.js'
import cheerio from 'cheerio'
import markdownIt from 'markdown-it'

const md = markdownIt({
  html: true,
  linkify: true,
  typographer: true,
  highlight: function (str, lang) {
    if (lang && hljs.getLanguage(lang)) {
      try {
        return hljs.highlight(lang, str).value
      } catch (__) {}
    }

    return '' // use external default escaping
  }
})

module.exports = function (content) {
  this.cacheable()
  const markup = md.render(content)
  const $markup = cheerio.load(markup)
  this.value = {
    markup: $markup.html()
  }
  return `module.exports = ${JSON.stringify($markup.html())}`
}


text:
package org.drools.mvel.integrationtests;

import java.io.File;
import java.io.FileOutputStream;
import java.util.Collection;

import org.drools.core.common.DroolsObjectOutputStream;
import org.junit.Ignore;
import org.junit.Test;
import org.kie.api.definition.KiePackage;
import org.kie.api.io.ResourceType;
import org.kie.internal.builder.KnowledgeBuilder;
import org.kie.internal.builder.KnowledgeBuilderFactory;
import org.kie.internal.io.ResourceFactory;

public class SerializedPackageMergeTwoSteps1Test {

    // kpackage serialization is not supported. But leave it for standard-drl.

	public static final String[] BINPKG = { System.getProperty( "java.io.tmpdir" ) + File.separator + "SerializedPackageMergeTwoSteps_1.bin",
			System.getProperty( "java.io.tmpdir" ) + File.separator + "SerializedPackageMergeTwoSteps_2.bin" };

	@Test @Ignore("DROOLS-5620 - test failed randomly and it doesn't reproduce the original issue (DROOLS-2224) scenario on CI."+
			      "It can be tested manually")
	public void testBuildAndSerializePackagesInTwoSteps1() {
		String str1 =
				"package com.sample.packageA\n" +
						"import org.drools.mvel.compiler.Person\n" +
						"global java.util.List list\n" +
						"rule R1 when\n" +
						"  $p : Person( name == \"John\" )\n" +
						"then\n" +
						"  list.add($p);" +
						"end\n";

		String str2 =
				"package com.sample.packageB\n" +
						"import org.drools.mvel.compiler.Person\n" +
						"global java.util.List list\n" +
						"rule R2 when\n" +
						"  $p : Person()\n" +
						"then\n" +
						"  list.add($p);" +
						"end\n";

		// Create 2 knowledgePackages separately
		KnowledgeBuilder builder1 = KnowledgeBuilderFactory.newKnowledgeBuilder();
		builder1.add( ResourceFactory.newByteArrayResource( str1.getBytes() ), ResourceType.DRL );
		Collection<KiePackage> knowledgePackages1 = builder1.getKnowledgePackages();

		// serialize the first package to a file
		writeKnowledgePackage(knowledgePackages1, BINPKG[0]);

		KnowledgeBuilder builder2 = KnowledgeBuilderFactory.newKnowledgeBuilder();
		builder2.add( ResourceFactory.newByteArrayResource( str2.getBytes() ), ResourceType.DRL );
		Collection<KiePackage> knowledgePackages2 = builder2.getKnowledgePackages();

		// serialize the second package to a file
		writeKnowledgePackage(knowledgePackages2, BINPKG[1]);
	}

	public void writeKnowledgePackage(Collection<KiePackage> pkgs, String filePath)
	{
		FileOutputStream  fileOutStream = null;
		DroolsObjectOutputStream out = null;
		try {
			fileOutStream = new FileOutputStream(filePath);
			out = new DroolsObjectOutputStream(fileOutStream);
			out.writeObject(pkgs);
			out.flush();
		} catch(Exception ex){
			// TODO
		}finally {
			try{
				if(out != null)
					out.close();
				if(fileOutStream != null)
					fileOutStream.close();
			}catch(Exception e){}
		}
	}
}


text:
<?php

namespace Grav\Common\Page\Medium;

use Exception;
use Grav\Common\Config\Config;
use Grav\Common\Grav;
use Gregwar\Image\Exceptions\GenerationError;
use Gregwar\Image\Image;
use Gregwar\Image\Source;
use RocketTheme\Toolbox\Event\Event;
use RocketTheme\Toolbox\ResourceLocator\UniformResourceLocator;
use RuntimeException;
use function array_key_exists;
use function count;
use function extension_loaded;
use function in_array;

/**
 * Class ImageFile
 * @package Grav\Common\Page\Medium
 *
 * @method Image applyExifOrientation($exif_orienation)
 */
class ImageFile extends Image
{
    /**
     * Destruct also image object.
     */
    public function __destruct()
    {
        $adapter = $this->adapter;
        if ($adapter) {
            $adapter->deinit();
        }
    }

    /**
     * Clear previously applied operations
     *
     * @return void
     */
    public function clearOperations()
    {
        $this->operations = [];
    }

    /**
     * This is the same as the Gregwar Image class except this one fires a Grav Event on creation of new cached file
     *
     * @param string $type the image type
     * @param int $quality the quality (for JPEG)
     * @param bool $actual
     * @param array $extras
     * @return string
     */
    public function cacheFile($type = 'jpg', $quality = 80, $actual = false, $extras = [])
    {
        if ($type === 'guess') {
            $type = $this->guessType();
        }

        if (!$this->forceCache && !count($this->operations) && $type === $this->guessType()) {
            return $this->getFilename($this->getFilePath());
        }

        // Computes the hash
        $this->hash = $this->getHash($type, $quality, $extras);

        /** @var Config $config */
        $config = Grav::instance()['config'];

        // Seo friendly image names
        $seofriendly = $config->get('system.images.seofriendly', false);

        if ($seofriendly) {
            $mini_hash = substr($this->hash, 0, 4) . substr($this->hash, -4);
            $cacheFile = "{$this->prettyName}-{$mini_hash}";
        } else {
            $cacheFile = "{$this->hash}-{$this->prettyName}";
        }

        $cacheFile .= '.' . $type;

        // If the files does not exists, save it
        $image = $this;

        // Target file should be younger than all the current image
        // dependencies
        $conditions = array(
            'younger-than' => $this->getDependencies()
        );

        // The generating function
        $generate = function ($target) use ($image, $type, $quality) {
            $result = $image->save($target, $type, $quality);

            if ($result !== $target) {
                throw new GenerationError($result);
            }

            Grav::instance()->fireEvent('onImageMediumSaved', new Event(['image' => $target]));
        };

        // Asking the cache for the cacheFile
        try {
            $perms = $config->get('system.images.cache_perms', '0755');
            $perms = octdec($perms);
            $file = $this->getCacheSystem()->setDirectoryMode($perms)->getOrCreateFile($cacheFile, $conditions, $generate, $actual);
        } catch (GenerationError $e) {
            $file = $e->getNewFile();
        }

        // Nulling the resource
        $adapter = $this->getAdapter();
        $adapter->setSource(new Source\File($file));
        $adapter->deinit();

        if ($actual) {
            return $file;
        }

        return $this->getFilename($file);
    }

    /**
     * Gets the hash.
     *
     * @param string $type
     * @param int $quality
     * @param array $extras
     * @return string
     */
    public function getHash($type = 'guess', $quality = 80, $extras = [])
    {
        if (null === $this->hash) {
            $this->generateHash($type, $quality, $extras);
        }

        return $this->hash;
    }

    /**
     * Generates the hash.
     *
     * @param string $type
     * @param int $quality
     * @param array $extras
     */
    public function generateHash($type = 'guess', $quality = 80, $extras = [])
    {
        $inputInfos = $this->source->getInfos();

        $data = [
            $inputInfos,
            $this->serializeOperations(),
            $type,
            $quality,
            $extras
        ];

        $this->hash = sha1(serialize($data));
    }

    /**
     * Read exif rotation from file and apply it.
     */
    public function fixOrientation()
    {
        if (!extension_loaded('exif')) {
            throw new RuntimeException('You need to EXIF PHP Extension to use this function');
        }

        if (!in_array(exif_imagetype($this->source->getInfos()), [IMAGETYPE_JPEG, IMAGETYPE_TIFF_II, IMAGETYPE_TIFF_MM], true)) {
            return $this;
        }

        // resolve any streams
        /** @var UniformResourceLocator $locator */
        $locator = Grav::instance()['locator'];
        $filepath = $this->source->getInfos();
        if ($locator->isStream($filepath)) {
            $filepath = $locator->findResource($this->source->getInfos(), true, true);
        }

        // Make sure file exists
        if (!file_exists($filepath)) {
            return $this;
        }

        try {
            $exif = @exif_read_data($filepath);
        } catch (Exception $e) {
            Grav::instance()['log']->error($filepath . ' - ' . $e->getMessage());
            return $this;
        }

        if ($exif === false || !array_key_exists('Orientation', $exif)) {
            return $this;
        }

        return $this->applyExifOrientation($exif['Orientation']);
    }
}


text:
/** This namespace contains the move member action */
apogee.movemember = {};

/** Move member action name
 * Action Data format:
 * {
 *  "action": apogee.movemember.ACTION_NAME,
 *  "member": (member to move),
 *
 *  "eventInfo": (OUTPUT - event info for the associated delete event)
 * }
 */
apogee.movemember.ACTION_NAME = "moveMember";

/** Move member action function */
apogee.movemember.moveMember = function(actionData,optionalContext,processedActions) {

    var member = actionData.member;

    var movedMemberList = [];
    apogee.movemember.loadMovedList(member,movedMemberList);
    member.move(actionData.name,actionData.owner);

    //add the individual moves
    for(var i = 0; i < movedMemberList.length; i++) {
        var moveMember = movedMemberList[i];

        //we are adding multiple delete events here
        var actionDataEntry;
        if(moveMember === member) {
            actionDataEntry = actionData;
        }
        else {
            actionDataEntry = {};
            actionDataEntry.action = "moveMember";
            actionDataEntry.member = member;
            actionDataEntry.name = member.getName();
            actionDataEntry.owner = member.getOwner();
            actionDataEntry.actionInfo = actionData.actionInfo;
        }

        processedActions.push(actionDataEntry);
    }

}

/** this creates the moved info list, including the member and the old name, but not the new name
 * @private */
apogee.movemember.loadMovedList = function(member,movedMemberList) {
    movedMemberList.push(member);

    if(member.isParent) {
        var childMap = member.getChildMap();
        for(var key in childMap) {
            var child = childMap[key];
            apogee.movemember.loadMovedList(child,movedMemberList);
        }
    }
    else if(member.isRootHolder) {
        var root = member.getRoot();
        apogee.movemember.loadMovedList(root,movedMemberList);
    }
}

/** Action info */
apogee.movemember.ACTION_INFO= {
    "actionFunction": apogee.movemember.moveMember,
    "checkUpdateAll": true,
    "updateDependencies": true,
    "addToRecalc": true,
    "event": apogee.updatemember.MEMBER_UPDATED_EVENT
};

//This line of code registers the action
apogee.action.addActionInfo(apogee.movemember.ACTION_NAME,apogee.movemember.ACTION_INFO);


text:
/*
 * File:   MySQLDBase.h
 * Author: root
 *
 * Created on September 26, 2012, 11:33 AM
 */

#ifndef MYSQLDBASE_H
#define	MYSQLDBASE_H

#ifdef USE_MYSQL

#include "DBase.h"
#include "mysql++.h"
#include <memory>

namespace util {

class MySQLDBase : public DBase {
public:
    MySQLDBase();
    MySQLDBase(const MySQLDBase& orig);
    virtual ~MySQLDBase();

    virtual void connect(const char *server, DBase::conntype ctype, const char *user=NULL,
        const char *password=NULL, unsigned int port=3306, const char *db=NULL);
    virtual void reconnect();

    virtual bool isConnected();

    virtual std::unique_ptr<Query> getQueryObj();
    virtual void disconnect();

    std::unique_ptr<mysqlpp::Query> getMySQLQueryObj();

protected:
    virtual void verifyConnection();

private:
    mysqlpp::Connection _conn;
};

class MySQLQuery : public Query {
public:
    MySQLQuery(mysqlpp::Connection &conn);
    MySQLQuery(const MySQLQuery &orig) { assert(0); };  // no copy yet
    virtual ~MySQLQuery();

    virtual MySQLQuery& operator << (const std::string &val);
    virtual MySQLQuery& operator << (const char *val);
    virtual MySQLQuery& operator << (int val);
    virtual MySQLQuery& operator << (unsigned int val);
    virtual MySQLQuery& operator << (long val);
    virtual MySQLQuery& operator << (unsigned long val);
    virtual MySQLQuery& operator << (double val);
    virtual MySQLQuery& operator << (float val);

    virtual std::unique_ptr<StoreQueryResults> execStoreQuery(const char *stmt=NULL);
    virtual std::unique_ptr<UseQueryResults> execUseQuery(const char *stmt=NULL);
    virtual bool execUpdate(const char *stmt=NULL);

    virtual void reset();

private:
    MySQLQuery() { assert(0); };

    mysqlpp::Query *_qobj;
};

class MySQLUseQueryResults : public UseQueryResults {
public:
    MySQLUseQueryResults(mysqlpp::UseQueryResult &uqr);
    MySQLUseQueryResults(const MySQLUseQueryResults &orig);
    virtual ~MySQLUseQueryResults();

    virtual bool fetch_row();
    virtual void clear() { while (fetch_row()); } ;

    virtual std::string &getString(int idx, std::string &dst);
    virtual std::string &getString(const char *idx, std::string &dst);
    virtual int getInt(int idx);
    virtual int getInt(const char *idx);
    virtual unsigned int getUInt(int idx);
    virtual unsigned int getUInt(const char *idx);
    virtual long getLong(int idx);
    virtual long getLong(const char *idx);
    virtual unsigned long getULong(int idx);
    virtual unsigned long getULong(const char *idx);
    virtual bool getBool(int idx);
    virtual bool getBool(const char *idx);
    virtual float getFloat(int idx);
    virtual float getFloat(const char *idx);
    virtual void getBlob(int idx, void *buf, unsigned int bufsize);
    virtual void getBlob(const char *idx, void *buf, unsigned int bufsize);

    virtual bool hasField(const char *fieldname);

    virtual unsigned int getDataLength(int idx);
    virtual unsigned int getDataLength(const char *idx);

private:
    mysqlpp::UseQueryResult _uqr;
    mysqlpp::Row _cur_row;
};

class MySQLStoreQueryResults : public StoreQueryResults {
public:
    virtual ~MySQLStoreQueryResults();

    MySQLStoreQueryResults(mysqlpp::StoreQueryResult &sqr);
    MySQLStoreQueryResults(const MySQLStoreQueryResults &orig);
    virtual unsigned int num_rows() { return _sqr.num_rows(); };

    virtual std::string &getString(int row, int idx, std::string &dst);
    virtual std::string &getString(int row, const char *idx, std::string &dst);
    virtual int getInt(int row, int idx);
    virtual int getInt(int row, const char *idx);
    virtual unsigned int getUInt(int row, int idx);
    virtual unsigned int getUInt(int row, const char *idx);
    virtual long getLong(int row, int idx);
    virtual long getLong(int row, const char *idx);
    virtual unsigned long getULong(int row, int idx);
    virtual unsigned long getULong(int row, const char *idx);
    virtual bool getBool(int row, int idx);
    virtual bool getBool(int row, const char *idx);
    virtual float getFloat(int row, int idx);
    virtual float getFloat(int row, const char *idx);
    virtual void getBlob(int row, int idx, void *buf, unsigned int bufsize);
    virtual void getBlob(int row, const char *idx, void *buf, unsigned int bufsize);
    virtual unsigned int getDataLength(int row, int idx);
    virtual unsigned int getDataLength(int row, const char *idx);

    virtual bool hasField(const char *fieldname);

private:
    mysqlpp::StoreQueryResult _sqr;
};

} // namespace util

#endif // USE_MYSQL

#endif	/* MYSQLDBASE_H */


text:
#include <dlfcn.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>

static uintptr_t g_flag = 0;

static void __attribute__((constructor)) init_flag() {
  g_flag = reinterpret_cast<uintptr_t>(dlsym(RTLD_DEFAULT, "dlsym"));
}

static const char* is_ctor_called() __attribute__ ((ifunc("is_ctor_called_ifun")));

extern "C" const char* foo() __attribute__ ((ifunc ("foo_ifunc")));

// Static linker creates GLOBAL/IFUNC symbol and JUMP_SLOT relocation type for plt segment
extern "C" const char* is_ctor_called_jump_slot() __attribute__ ((ifunc("is_ctor_called_ifun")));

extern "C" const char* is_ctor_called_irelative() {
  // Call internal ifunc-resolved function with IRELATIVE reloc
  return is_ctor_called();
}

extern "C" const char* return_true() {
  return "true";
}

extern "C" const char* return_false() {
  return "false";
}

extern "C" const char* f1() {
  return "unset";
}

extern "C" const char* f2() {
  return "set";
}

typedef const char* (*fn_ptr)();

extern "C" fn_ptr is_ctor_called_ifun() {
  return g_flag == 0 ? return_false : return_true;
}

extern "C" fn_ptr foo_ifunc() {
   char* choice = getenv("IFUNC_CHOICE");
   return choice == nullptr ? f1 : f2;
}

extern "C" const char* foo_library() {
   return foo();
}


text:
package client

import (
	"encoding/json"
	"fmt"
	"io"
	"sort"
	"strings"
	"sync"
	"time"

	"golang.org/x/net/context"

	"github.com/Sirupsen/logrus"
	Cli "github.com/docker/docker/cli"
	"github.com/docker/docker/opts"
	"github.com/docker/docker/pkg/jsonlog"
	flag "github.com/docker/docker/pkg/mflag"
	"github.com/docker/engine-api/types"
	eventtypes "github.com/docker/engine-api/types/events"
	"github.com/docker/engine-api/types/filters"
)

// CmdEvents prints a live stream of real time events from the server.
//
// Usage: docker events [OPTIONS]
func (cli *DockerCli) CmdEvents(args ...string) error {
	cmd := Cli.Subcmd("events", nil, Cli.DockerCommands["events"].Description, true)
	since := cmd.String([]string{"-since"}, "", "Show all events created since timestamp")
	until := cmd.String([]string{"-until"}, "", "Stream events until this timestamp")
	flFilter := opts.NewListOpts(nil)
	cmd.Var(&flFilter, []string{"f", "-filter"}, "Filter output based on conditions provided")
	cmd.Require(flag.Exact, 0)

	cmd.ParseFlags(args, true)

	eventFilterArgs := filters.NewArgs()

	// Consolidate all filter flags, and sanity check them early.
	// They'll get process in the daemon/server.
	for _, f := range flFilter.GetAll() {
		var err error
		eventFilterArgs, err = filters.ParseFlag(f, eventFilterArgs)
		if err != nil {
			return err
		}
	}

	options := types.EventsOptions{
		Since:   *since,
		Until:   *until,
		Filters: eventFilterArgs,
	}

	responseBody, err := cli.client.Events(context.Background(), options)
	if err != nil {
		return err
	}
	defer responseBody.Close()

	return streamEvents(responseBody, cli.out)
}

// streamEvents decodes prints the incoming events in the provided output.
func streamEvents(input io.Reader, output io.Writer) error {
	return decodeEvents(input, func(event eventtypes.Message, err error) error {
		if err != nil {
			return err
		}
		printOutput(event, output)
		return nil
	})
}

type eventProcessor func(event eventtypes.Message, err error) error

func decodeEvents(input io.Reader, ep eventProcessor) error {
	dec := json.NewDecoder(input)
	for {
		var event eventtypes.Message
		err := dec.Decode(&event)
		if err != nil && err == io.EOF {
			break
		}

		if procErr := ep(event, err); procErr != nil {
			return procErr
		}
	}
	return nil
}

// printOutput prints all types of event information.
// Each output includes the event type, actor id, name and action.
// Actor attributes are printed at the end if the actor has any.
func printOutput(event eventtypes.Message, output io.Writer) {
	if event.TimeNano != 0 {
		fmt.Fprintf(output, "%s ", time.Unix(0, event.TimeNano).Format(jsonlog.RFC3339NanoFixed))
	} else if event.Time != 0 {
		fmt.Fprintf(output, "%s ", time.Unix(event.Time, 0).Format(jsonlog.RFC3339NanoFixed))
	}

	fmt.Fprintf(output, "%s %s %s", event.Type, event.Action, event.Actor.ID)

	if len(event.Actor.Attributes) > 0 {
		var attrs []string
		var keys []string
		for k := range event.Actor.Attributes {
			keys = append(keys, k)
		}
		sort.Strings(keys)
		for _, k := range keys {
			v := event.Actor.Attributes[k]
			attrs = append(attrs, fmt.Sprintf("%s=%s", k, v))
		}
		fmt.Fprintf(output, " (%s)", strings.Join(attrs, ", "))
	}
	fmt.Fprint(output, "\n")
}

type eventHandler struct {
	handlers map[string]func(eventtypes.Message)
	mu       sync.Mutex
	closed   bool
}

func (w *eventHandler) Handle(action string, h func(eventtypes.Message)) {
	w.mu.Lock()
	w.handlers[action] = h
	w.mu.Unlock()
}

// Watch ranges over the passed in event chan and processes the events based on the
// handlers created for a given action.
// To stop watching, close the event chan.
func (w *eventHandler) Watch(c <-chan eventtypes.Message) {
	for e := range c {
		w.mu.Lock()
		h, exists := w.handlers[e.Action]
		w.mu.Unlock()
		if !exists {
			continue
		}
		logrus.Debugf("event handler: received event: %v", e)
		go h(e)
	}
}


text:
namespace dart {

class IrregexpInterpreter : public AllStatic {
 public:
  // Returns True in case of a success, False in case of a failure,
  // Null in case of internal exception,
  // Error in case VM error has to propagated up to the caller.
  static ObjectPtr Match(const TypedData& bytecode,
                         const String& subject,
                         int32_t* captures,
                         intptr_t start_position);
};

}  // namespace dart

#endif  // RUNTIME_VM_REGEXP_INTERPRETER_H_


text:
author: chipoglesby
comments: true
date: 2006-03-02 17:23:00+00:00
layout: post
slug: weaverville
title: weaverville
wordpress_id: 39
categories:
- Photojournalism
---

[![](http://photos1.blogger.com/blogger/3124/2183/400/weaverville.jpg)](http://photos1.blogger.com/blogger/3124/2183/1600/weaverville.jpg)


text:
import gordon_lib_v2 as lib
import sys
import os

def main(argv=None):
    """
    Usage is:
    submit.py [--account <chargecode>] [--url <url>] -- <commandline>
    Run from the working dir of the job which must contain (in addition
    to the job files) a file named scheduler.conf with scheduler properties for the job.

    <chargecode>, if present, gives the project to charge the job to.
    Url is the url of the submitting website including the taskid parameter.

    Returns 0 with "jobid=<jobid>" on stdout if job submitted ok
    Returns 1 with multiline error message on stdout if error.
    Returns 2 for the specific error of queue limit exceeded.
    """

    #COMMAND LINE PARSING
    import argparse
    parser = argparse.ArgumentParser()

    parser.add_argument('--account', metavar="ACCOUNT", type=str, default=lib.account,
                    help="The account string to use when submitting jobs. Default is read from config files.")

    parser.add_argument('--url', metavar="URL", dest="URL", type=str,
                    help="Notification URL")

    try:
        cmdline_options, cmdline = parser.parse_known_args(argv)
        cmdline = cmdline[1:] if not ('--' in cmdline) else cmdline[cmdline.index('--')+1:]
    except Exception as e:
        print "There was a problem submitting your job"
        print e
        sys.exit(1)

    account = cmdline_options.account
    url     = cmdline_options.URL
    #cmdline as an array (and already set)

    tooltype = lib.getToolType(cmdline)

    # On gordon for the time being we need to ignore the chargecode
    account = lib.account

    scheduler_properties = lib.getProperties("scheduler.conf")
    # print scheduler_properties
    scheduler_info = lib.schedulerInfo(scheduler_properties, tooltype)
    # print scheduler_info

    # If this is a "direct" run type job we don't need to create a qsub script, we'll just run batch_ommand.cmdline.
    if scheduler_info["is_direct"]:
        return lib.submitDirectJob(account, url, lib.email, lib.jobname, cmdline)

    runtime = int(scheduler_info["runtime"])
    useLocalDisk = False

    """
    Workaround for problems with file io on oasis and longer mrbayes runs.  Instead of running on
    oasis, we'll copy the working dir to the compute nodes local storage and copy the results back
    when the job completes.  Since many mrbayes jobs timeout we need a special trick to copy results
    of jobs that timeout: Right before we launch mrbayes we launch a shell script in the background
    that sleeps a few min less than the job's runtime and then copies the results.  If mrbayes terminates
    normally the background sleep is killed automatically.
    """
    if (tooltype == "mrbayes" and runtime > 60):
        useLocalDisk = True

    # I'm backing out the workaround by setting useLocalDisk to false.
    useLocalDisk = False

    # Write the command line to a file, batch_command.cmdline.
    rfile = open(lib.cmdfile, "w")

    # On Gordon we have to use bash, not sh
    rfile.write("#!/bin/bash\n")

    rfile.writelines((" ".join(cmdline), "\n"))
    rfile.close()
    os.chmod(lib.cmdfile, 0744);

    # Create the qsub script
    rfile = open(lib.runfile, "w")

    # On Gordon we have to use bash, not sh
    text = """#!/bin/bash
#PBS -q %s
#PBS -N %s
#PBS -l walltime=00:%d:00
#PBS -o scheduler_stdout.txt
#PBS -e scheduler_stderr.txt
#PBS -W umask=0007

##PBS -V

#PBS -v QOS=%d

#PBS -M  %s
#PBS -m ae
#PBS -A %s
""" % (scheduler_info["queue"], lib.jobname,  scheduler_info["runtime"], scheduler_info["qos"], lib.email, account)
    rfile.write(text)

    text = "#PBS -l nodes=%d:ppn=%d:native\n" % (scheduler_info["nodes"], scheduler_info["ppn"])
    rfile.write(text)

    rfile.write("cd %s\n" % (lib.jobdir, lib.local_jobdir)[useLocalDisk])
    if useLocalDisk == True:

        # Note that it's critical that newlines in the text string are all within the double
        # quotes; otherwise the echo command line would be split across lines and make no sense.
        text = """"Due to filesystem problems intermediate results for longer mrbayes runs
will not be available while the job is running.  The result files will be
available when mrbayes finishes.

We're working to find a solution." """
        rfile.write("echo  %s > %s/INTERMEDIATE_RESULTS_README.TXT\n" % (text, lib.jobdir))

        rfile.write("cp -r %s/* .\n" % lib.jobdir);
        sleepTime = int(scheduler_info["runtime"]) - 10
        rfile.write("sleep_cp.sh %s %s &\n" % (sleepTime, lib.jobdir))
    text = """
source /etc/profile.d/modules.sh
export MODULEPATH=/home/diag/jpg/modulefiles/gordon/applications:$MODULEPATH
echo Job starting at `date` > start.txt
curl %s\&status=START
export CIPRES_THREADSPP=%d
export CIPRES_NP=%d
%s 1>stdout.txt 2>stderr.txt
echo Job finished at `date` > done.txt
qstat -f $PBS_JOBID | grep Job
qstat -f $PBS_JOBID | grep resources
""" % (url,
        int(scheduler_info["threads_per_process"]),
        int(scheduler_info["mpi_processes"]),
        lib.cmdfile)
    rfile.write(text)

    if (useLocalDisk):
        text = """
echo "Job completed, starting to copy working directory."
echo "mkdir %s.complete"
mkdir %s.complete

echo "cp -r * %s.complete"
cp -r * %s.complete

echo "mv %s %s.sleep"
mv %s %s.sleep

echo "mv %s.complete %s"
mv %s.complete %s

echo "rm -rf %s.sleep"
rm -rf %s.sleep

echo "Finished copying working directory."
""" % (lib.jobdir, lib.jobdir, lib.jobdir, lib.jobdir, lib.jobdir, lib.jobdir, lib.jobdir, lib.jobdir, lib.jobdir, lib.jobdir, lib.jobdir, lib.jobdir, lib.jobdir, lib.jobdir)
        rfile.write(text)

    rfile.write("curl %s\&status=DONE\n" %  url)
    rfile.close()

    return lib.submitJob()
    return 0

if __name__ == "__main__":
    sys.exit(main())


text:
using Signum.Engine.Maps;

namespace Signum.Test;

public class ObjectNameTest
{
    bool isPostgres;
    public ObjectNameTest()
    {
        MusicStarter.StartAndLoad();
        Connector.CurrentLogger = new DebugTextWriter();
        this.isPostgres = Signum.Engine.Connector.Current.Schema.Settings.IsPostgres;
    }

    [Fact]
    public void ParseDbo()
    {
        var simple = ObjectName.Parse("MyTable", isPostgres);
        Assert.Equal("MyTable", simple.Name);
        Assert.Equal(isPostgres? "\"public\"" : "dbo", simple.Schema.ToString());
    }

    [Fact]
    public void ParseSchema()
    {
        if (isPostgres)
        {
            var simple = ObjectName.Parse("my_schema.my_table", isPostgres);
            Assert.Equal("my_table", simple.Name);
            Assert.Equal("my_schema", simple.Schema.ToString());
        }
        else
        {
            var simple = ObjectName.Parse("MySchema.MyTable", isPostgres);
            Assert.Equal("MyTable", simple.Name);
            Assert.Equal("MySchema", simple.Schema.ToString());
        }
    }

    [Fact]
    public void ParseNameEscaped()
    {
        if (isPostgres)
        {
            var simple = ObjectName.Parse("\"MySchema\".\"Select\"", isPostgres);
            Assert.Equal("Select", simple.Name);
            Assert.Equal("\"MySchema\"", simple.Schema.ToString());
            Assert.Equal("\"MySchema\".\"Select\"", simple.ToString());
        }
        else
        {
            var simple = ObjectName.Parse("MySchema.[Select]", isPostgres);
            Assert.Equal("Select", simple.Name);
            Assert.Equal("MySchema", simple.Schema.ToString());
            Assert.Equal("MySchema.[Select]", simple.ToString());
        }
    }

    [Fact]
    public void ParseSchemaNameEscaped()
    {
        if (isPostgres)
        {
            var simple = ObjectName.Parse("\"Select\".mytable", isPostgres);
            Assert.Equal("mytable", simple.Name);
            Assert.Equal("Select", simple.Schema.Name);
            Assert.Equal("\"Select\".mytable", simple.ToString());
        }
        else
        {
            var simple = ObjectName.Parse("[Select].MyTable", isPostgres);
            Assert.Equal("MyTable", simple.Name);
            Assert.Equal("Select", simple.Schema.Name);
            Assert.Equal("[Select].MyTable", simple.ToString());
        }
    }

    [Fact]
    public void ParseServerName()
    {
        var simple = ObjectName.Parse(isPostgres ?
            "\"FROM\".\"SELECT\".\"WHERE\".\"TOP\"" :
            "[FROM].[SELECT].[WHERE].[TOP]",
            isPostgres);
        Assert.Equal("TOP", simple.Name);
        Assert.Equal("WHERE", simple.Schema.Name);
        Assert.Equal("SELECT", simple.Schema.Database!.Name);
        Assert.Equal("FROM", simple.Schema.Database!.Server!.Name);
    }

    [Fact]
    public void ParseServerNameSuperComplex()
    {
        var simple = ObjectName.Parse(isPostgres ?
            "\"FROM\".\"SELECT\".\"WHERE\".\"TOP.DISTINCT\"" :
            "[FROM].[SELECT].[WHERE].[TOP.DISTINCT]",
            isPostgres);
        Assert.Equal("TOP.DISTINCT", simple.Name);
        Assert.Equal("WHERE", simple.Schema.Name);
        Assert.Equal("SELECT", simple.Schema.Database!.Name);
        Assert.Equal("FROM", simple.Schema.Database!.Server!.Name);
    }
}


text:
void blink(int);
#endif


text:
/*
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
 * in compliance with the License. You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software distributed under the License
 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 * or implied. See the License for the specific language governing permissions and limitations under
 * the License.
 */
/*
 * This code was generated by https://github.com/googleapis/google-api-java-client-services/
 * Modify at your own risk.
 */

package com.google.api.services.datacatalog.v1beta1.model;

/**
 * Describes a BigQuery table.
 *
 *
 This is the Java data model class that specifies how to parse/serialize into the JSON that is
 * transmitted over HTTP when working with the Google Cloud Data Catalog API. For a detailed
 * explanation see:
 * https://developers.google.com/api-client-library/java/google-http-java-client/json
 *

 *
 * @author Google, Inc.
 */
@SuppressWarnings("javadoc")
public final class GoogleCloudDatacatalogV1beta1BigQueryTableSpec extends com.google.api.client.json.GenericJson {

  /**
   * Output only. The table source type.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String tableSourceType;

  /**
   * Spec of a BigQuery table. This field should only be populated if `table_source_type` is
   * `BIGQUERY_TABLE`.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private GoogleCloudDatacatalogV1beta1TableSpec tableSpec;

  /**
   * Table view specification. This field should only be populated if `table_source_type` is
   * `BIGQUERY_VIEW`.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private GoogleCloudDatacatalogV1beta1ViewSpec viewSpec;

  /**
   * Output only. The table source type.
   * @return value or {@code null} for none
   */
  public java.lang.String getTableSourceType() {
    return tableSourceType;
  }

  /**
   * Output only. The table source type.
   * @param tableSourceType tableSourceType or {@code null} for none
   */
  public GoogleCloudDatacatalogV1beta1BigQueryTableSpec setTableSourceType(java.lang.String tableSourceType) {
    this.tableSourceType = tableSourceType;
    return this;
  }

  /**
   * Spec of a BigQuery table. This field should only be populated if `table_source_type` is
   * `BIGQUERY_TABLE`.
   * @return value or {@code null} for none
   */
  public GoogleCloudDatacatalogV1beta1TableSpec getTableSpec() {
    return tableSpec;
  }

  /**
   * Spec of a BigQuery table. This field should only be populated if `table_source_type` is
   * `BIGQUERY_TABLE`.
   * @param tableSpec tableSpec or {@code null} for none
   */
  public GoogleCloudDatacatalogV1beta1BigQueryTableSpec setTableSpec(GoogleCloudDatacatalogV1beta1TableSpec tableSpec) {
    this.tableSpec = tableSpec;
    return this;
  }

  /**
   * Table view specification. This field should only be populated if `table_source_type` is
   * `BIGQUERY_VIEW`.
   * @return value or {@code null} for none
   */
  public GoogleCloudDatacatalogV1beta1ViewSpec getViewSpec() {
    return viewSpec;
  }

  /**
   * Table view specification. This field should only be populated if `table_source_type` is
   * `BIGQUERY_VIEW`.
   * @param viewSpec viewSpec or {@code null} for none
   */
  public GoogleCloudDatacatalogV1beta1BigQueryTableSpec setViewSpec(GoogleCloudDatacatalogV1beta1ViewSpec viewSpec) {
    this.viewSpec = viewSpec;
    return this;
  }

  @Override
  public GoogleCloudDatacatalogV1beta1BigQueryTableSpec set(String fieldName, Object value) {
    return (GoogleCloudDatacatalogV1beta1BigQueryTableSpec) super.set(fieldName, value);
  }

  @Override
  public GoogleCloudDatacatalogV1beta1BigQueryTableSpec clone() {
    return (GoogleCloudDatacatalogV1beta1BigQueryTableSpec) super.clone();
  }

}


text:
import { test, module } from 'qunit';
import { setupTest } from 'ember-qunit';
import require from 'require';

if (require.has('@ember/test-helpers')) {
  module('Unit | is rfc268 test', function(hooks) {
    function isRfc268Test() {
      window.require.unsee('ember-cli-page-object/test-support/-private/execution_context');
      return require('ember-cli-page-object/test-support/-private/execution_context').isRfc268Test();
    }

    hooks.afterEach(function() {
      // Make sure we don't leave this module in a mutated state
      window.require.unsee('ember-cli-page-object/test-support/-private/execution_context');
    });

    module('with context', function(hooks) {
      setupTest(hooks);

      let compatModule;
      let originalVisit;

      hooks.beforeEach(function() {
        compatModule = require('ember-cli-page-object/test-support/-private/compatibility');
        originalVisit = compatModule.visit;
      });

      hooks.afterEach(function() {
        compatModule.visit = originalVisit;
      });

      test('works', function(assert) {
        assert.ok(isRfc268Test());
      });

      test('throws without visit() present', function(assert) {
        compatModule.visit = undefined;
        assert.throws(isRfc268Test);
      });
    });

    module('without context', function() {
      test('works', function(assert) {
        assert.notOk(isRfc268Test());
      });
    });
  });
}


text:
package main

import (
	"flag"
	"fmt"
	"io/ioutil"
	"log"
	"os"
	"os/user"
	"path/filepath"
	"regexp"
	"runtime"
	"strings"

	"github.com/jangler/edit"
	"github.com/veandco/go-sdl2/sdl"
	"github.com/veandco/go-sdl2/sdl_ttf"
)

const version = "0.3.0"

const (
	insMark = iota // ID of the cursor/insertion mark
	selMark        // ID of the selection anchor mark
)

var (
	darkFlag      = false
	expandtabFlag = false
	fontFlag      = ""
	ptsizeFlag    = 12
	tabstopFlag   = 8
	versionFlag   = false
)

var sectionFlags = make(map[string]map[string]string)
var shebangRegexp = regexp.MustCompile(`^#!(/usr/bin/env |/.+/)(.+)( |$)`)

// readIni reads option defaults from the .ini file, if one exists.
func readIni() {
	if curUser, err := user.Current(); err == nil {
		paths := []string{
			filepath.Join(curUser.HomeDir, "fervor.ini"),
			filepath.Join(curUser.HomeDir, ".config", "fervor.ini"),
		}
		for _, path := range paths {
			contents, err := ioutil.ReadFile(path)
			if err != nil {
				continue
			}
			section := ""
			sectionFlags[""] = make(map[string]string)
			for _, line := range strings.Split(string(contents), "\n") {
				// ignore comment lines
				if strings.HasPrefix(line, ";") {
					continue
				}

				if match, _ := regexp.MatchString(`^\[.+\]$`, line); match {
					section = line
					sectionFlags[section] = make(map[string]string)
				} else {
					tokens := strings.SplitN(line, "=", 2)
					if len(tokens) == 2 {
						if section == "" {
							flag.Set(tokens[0], tokens[1]) // ignore errors
						}
						sectionFlags[section][tokens[0]] = tokens[1]
					}
				}
			}
			break // successfully read .ini file
		}
	} else {
		log.Print(err)
	}
}

// setFileFlags sets flags based on INI settings, the current file path, and
// the first line of the buffer, and returns syntax rules to be used for the
// file.
func setFileFlags(path, line string) []edit.Rule {
	fn := filepath.Base(path)
	var sb string
	if subs := shebangRegexp.FindStringSubmatch(line); subs != nil {
		sb = subs[2]
	}

	// first, reset flags to defaults
	for k, v := range sectionFlags[""] {
		flag.Set(k, v) // ignore errors
	}

	for section, flags := range sectionFlags {
		match := false
		if globs, ok := flags["filename"]; ok {
			for _, glob := range strings.Split(globs, ";") {
				if match, _ = filepath.Match(glob, fn); match {
					break
				}
			}
		}
		if shebangs, ok := flags["shebang"]; ok && !match && sb != "" {
			for _, shebang := range strings.Split(shebangs, ";") {
				if shebang == sb {
					match = true
					break
				}
			}
		}
		if match {
			for k, v := range flags {
				flag.Set(k, v) // ignore errors
			}
			clampFlags()
			if syntaxFunc, ok := syntaxMap[section]; ok {
				return syntaxFunc()
			}
			break
		}
	}

	return []edit.Rule{}
}

// clampFlags keeps flags within reasonable bounds.
func clampFlags() {
	if ptsizeFlag < 8 {
		ptsizeFlag = 8
	}
	if tabstopFlag < 1 {
		tabstopFlag = 1
	}
}

// initFlags initializes the flag package.
func initFlags() {
	flag.Usage = func() {
		fmt.Fprintf(os.Stderr, "Usage: %s [<option> ...] [<file> ...]\n",
			os.Args[0])
		fmt.Fprintln(os.Stderr, "\nOptions:")
		flag.PrintDefaults()
		fmt.Fprintln(os.Stderr, `
Global and file-specific default options can be specified in either
~/fervor.ini or ~/.config/fervor.ini.`)
	}
	flag.BoolVar(&darkFlag, "dark", darkFlag, "use dark color scheme")
	flag.BoolVar(&expandtabFlag, "expandtab", expandtabFlag,
		"insert spaces using the Tab key")
	flag.StringVar(&fontFlag, "font", fontFlag,
		"use the font at the given path")
	flag.IntVar(&ptsizeFlag, "ptsize", ptsizeFlag, "set point size of font")
	flag.IntVar(&tabstopFlag, "tabstop", tabstopFlag,
		"set width of tab stops, in columns")
	flag.BoolVar(&versionFlag, "version", versionFlag,
		"print version information and exit")
}

// parseFlags processes command-line flags.
func parseFlags() {
	flag.Parse()
	clampFlags()

	if versionFlag {
		fmt.Printf("%s version %s %s/%s\n", os.Args[0], version, runtime.GOOS,
			runtime.GOARCH)
		os.Exit(0)
	}

	sectionFlags[""] = map[string]string{
		"dark":      fmt.Sprintf("%v", darkFlag),
		"expandtab": fmt.Sprintf("%v", expandtabFlag),
		"font":      fmt.Sprintf("%v", fontFlag),
		"ptsize":    fmt.Sprintf("%v", ptsizeFlag),
		"tabstop":   fmt.Sprintf("%v", tabstopFlag),
	}
}

// openFile attempts to open the file given by path and return a new buffer
// containing the contents of that file. If an error is encountered, it returns
// a nil buffer and the error instead.
func openFile(path string) (*edit.Buffer, error) {
	contents, err := ioutil.ReadFile(path)
	if err != nil {
		return nil, err
	}
	buf := edit.NewBuffer()
	buf.Insert(buf.End(), string(contents))
	if buf.Get(buf.ShiftIndex(buf.End(), -1), buf.End()) == "\n" {
		buf.Delete(buf.ShiftIndex(buf.End(), -1), buf.End())
	}
	buf.ResetModified()
	buf.ResetUndo()
	syntaxRules := setFileFlags(path,
		buf.Get(edit.Index{1, 0}, edit.Index{1, 1 << 30}))
	buf.SetSyntax(syntaxRules)
	return buf, nil
}

// lineEnding returns the line ending string used for a buffer, and converts
// the buffer to Unix line endings if it uses DOS line endings.
func lineEnding(b *edit.Buffer) string {
	if strings.Contains(b.Get(edit.Index{1, 0}, edit.Index{2, 0}), "\r\n") {
		text := b.Get(edit.Index{1, 0}, b.End())
		b.Delete(edit.Index{1, 0}, b.End())
		b.Insert(edit.Index{1, 0}, strings.Replace(text, "\r", "", -1))
		return "\r\n"
	}
	return "\n"
}

func main() {
	log.SetFlags(log.Lshortfile)
	initFlags()
	readIni()
	parseFlags()
	setColorScheme()

	// init SDL
	runtime.LockOSThread()
	sdl.Init(sdl.INIT_VIDEO)
	defer sdl.Quit()
	if err := ttf.Init(); err != nil {
		log.Fatal(err)
	}
	defer ttf.Quit()

	// open new instances for other file args
	if flag.NArg() > 1 {
		for _, arg := range flag.Args()[1:] {
			newInstance(arg, "")
		}
	}

	// init buffer
	var arg, status string
	if flag.NArg() == 0 || flag.Arg(0) == "" {
		arg = os.DevNull
	} else {
		arg = flag.Arg(0)
	}
	var buf *edit.Buffer
	var err error
	if buf, err = openFile(arg); err == nil {
		status = fmt.Sprintf(`Opened "%s".`, minPath(arg))
	} else {
		status = fmt.Sprintf(`New file: "%s".`, minPath(arg))
		buf = edit.NewBuffer()
		buf.SetSyntax(setFileFlags(arg, ""))
	}
	pane := &Pane{buf, minPath(arg), tabstopFlag, 80, 25, lineEnding(buf)}
	if pane.LineEnding == "\r\n" {
		status += " [DOS]"
	}
	pane.SetTabWidth(tabstopFlag)
	pane.Mark(edit.Index{1, 0}, selMark, insMark)
	font := getFont()
	win := createWindow(minPath(arg), font)
	defer win.Destroy()
	w, h := win.GetSize()
	resize(pane, w, h)

	eventLoop(pane, status, font, win)
}


text:
package EDU.purdue.cs.bloat.tree;

import EDU.purdue.cs.bloat.editor.Type;

/**
 * RCExpr represents a residency check.
 */
public class RCExpr extends CheckExpr {
	/**
	 * Constructor.
	 *
	 * @param expr
	 *            The expression whose residency is to be checked.
	 * @param type
	 *            The type of this expression.
	 */
	public RCExpr(final Expr expr, final Type type) {
		super(expr, type);
	}

	public void visit(final TreeVisitor visitor) {
		visitor.visitRCExpr(this);
	}

	public boolean equalsExpr(final Expr other) {
		return (other instanceof RCExpr) && super.equalsExpr(other);
	}

	public Object clone() {
		return copyInto(new RCExpr((Expr) expr.clone(), type));
	}
}


text:
declare var require;
var fsModule = require("fs");
var pathModule = require("path");
var osModule = require('os');

const ws = "[\\t ]*";
const wsAndLine = "[\\r]?[\\n]?";

const expConsts = {
    name: "([a-z][a-zA-Z0-9-_]*)",
    hide: "\\(hide\\)" + ws,
    start: ">>" + ws,
    end: "<<" + ws
}

interface FormatSpec {
    commentStart: string;
    commentEnd: string;
    postProcess?: (string) => string;
}

const jsSpec: FormatSpec = {
    commentStart: ws + "\\/\\/" + ws,
    commentEnd: wsAndLine
}

const cssSpec: FormatSpec = {
    commentStart: ws + "\\/\\*" + ws,
    commentEnd: ws + "\\*\\/" + wsAndLine
}

const xmlSpec: FormatSpec = {
    commentStart: ws + "<!--" + ws,
    commentEnd: ws + "-->" + wsAndLine,
    postProcess: function (snippet: string) {
        var bindingRegEx = new RegExp("\{\{.*\}\}");
        var newLineChar = '\n';
        var linesOfSnippet = snippet.split(newLineChar);
        var newSnippet = linesOfSnippet.length > 0 ? "" : snippet;

        for (var i = 0; i < linesOfSnippet.length; i++) {
            var currentLine = linesOfSnippet[i];
            var match = bindingRegEx.exec(currentLine);

            if (match) {
                currentLine = "\{\% raw \%\}" + currentLine + "\{\% endraw \%\}";
            }

            newSnippet += currentLine;

            if (i < linesOfSnippet.length - 1) {
                newSnippet += newLineChar;
            }
        }

        return newSnippet;
    }
}

const htmlSpec: FormatSpec = xmlSpec;

export class SnippetInjector {
    private _storedSnippets;
    private _snippetTitles: string;
    private _sourceFileExtensionFilter: string = "";
    private _targetFileExtensionFilter: string = "";
    private _storedSourceTypes: Array<string>;
    private _storedTargetTypes: Array<string>;
    private _storedSourceTitles: any;
    private _toWrap: boolean;

    private _fileFormatSpecs = {};

    constructor() {
        this._storedSnippets = {};
    }

    get toWrap(): boolean {
        return this._toWrap;
    }

    set toWrap(value: boolean){
        this._toWrap = value;
    }

    get targetFileExtensionFilter(): string {
        return this._targetFileExtensionFilter;
    }

    set targetFileExtensionFilter(value: string) {
        this._targetFileExtensionFilter = value;
    }

    get sourceFileExtensionFilter(): string {
        return this._sourceFileExtensionFilter;
    }

    set sourceFileExtensionFilter(value: string) {
        this._sourceFileExtensionFilter = value;
    }

    get snippetTitles(): string {
        return this._snippetTitles;
    }

    set snippetTitles(value: string) {
        this._snippetTitles = value;
    }

    private init() {
        this._storedSourceTypes = this._sourceFileExtensionFilter.split('|');
        this._storedTargetTypes = this._targetFileExtensionFilter.split('|');

        if (this.snippetTitles === undefined) {
            this._storedSourceTitles = { '.js': 'JavaScript', '.ts': 'TypeScript' };
        } else {
            this._storedSourceTitles = {};
            var currentTitles = this.snippetTitles.split('|');
            for (var i = 0; i < this._storedSourceTypes.length; i++) {
                this._storedSourceTitles[this._storedSourceTypes[i]] = (currentTitles[i] || "")
            }
        }

        this._fileFormatSpecs['.cs'] = jsSpec;
        this._fileFormatSpecs['.swift'] = jsSpec;
        this._fileFormatSpecs['.h'] = jsSpec;
        this._fileFormatSpecs['.m'] = jsSpec;
        this._fileFormatSpecs['.js'] = jsSpec;
        this._fileFormatSpecs['.ts'] = jsSpec;
        this._fileFormatSpecs['.java'] = jsSpec;
        this._fileFormatSpecs['.cs'] = jsSpec;
        this._fileFormatSpecs['.xml'] = xmlSpec;
        this._fileFormatSpecs['.xaml'] = xmlSpec;
        this._fileFormatSpecs['.css'] = cssSpec;
        this._fileFormatSpecs['.html'] = htmlSpec;
    }

    /**
    * Loads the code snippets from the source-tree at the specified location.
    * @param root The root of the source-tree to load the snippets from.
    */
    public process(root: string) {
        var lStat = fsModule.lstatSync(root);

        this.init();

        for (var i = 0; i < this._storedSourceTypes.length; i++ ) {
            if (lStat.isDirectory()) {
                this.processDirectory(root, this._storedSourceTypes[i]);
            } else if (lStat.isFile()) {
                this.processFile(root, this._storedSourceTypes[i]);
            }
        }
    }

    public injectSnippets(docsRoot: string) {
        if (Object.keys(this._storedSnippets).length > 0) {
            var lStat = fsModule.lstatSync(docsRoot);
            for (var i = 0; i < this._storedTargetTypes.length; i++ ) {
                if (lStat.isDirectory()) {
                    this.processDocsDirectory(docsRoot, this._storedTargetTypes[i]);
                } else if (lStat.isFile()) {
                    this.processDocsFile(docsRoot, this._storedTargetTypes[i]);
                }
            }
        }
    }

    private processDirectory(path: string, extensionFilter: string) {
        var files = fsModule.readdirSync(path);
        for (var i = 0; i < files.length; i++) {
            var currentFile = files[i];
            var fullPath = path + '/' + currentFile;
            var fileStat = fsModule.lstatSync(fullPath);
            if (fileStat.isDirectory()) {
                this.processDirectory(path + '/' + currentFile, extensionFilter);
            } else if (fileStat.isFile() && pathModule.extname(fullPath) === extensionFilter) {
                this.processFile(fullPath, extensionFilter);
            }
        }
    }

    private replaceWrappedSnippetsWithCorespondingTags(fileContent): string {
        var content = "";
        content = fileContent.replace(/\<snippet id=['"]([a-zA-Z0-9\-]+)[\S\s]>[\S\s]*?<\/snippet>/g, "<snippet id='$1'/>");
        return content;
    }

    private wrapSnippetWithComments(snippetTag, snippetId): string {
        var wrappedSnippetTag = "";
        wrappedSnippetTag += "\n<snippet id='" + snippetId + "'>\n"
        wrappedSnippetTag += snippetTag
        wrappedSnippetTag += "\n</snippet>\n"

        return wrappedSnippetTag;
    }

    private processDocsFile(path: string, extensionFilter: string) {
        console.log("Processing docs file: " + path);
        var fileContents = fsModule.readFileSync(path, 'utf8');
        fileContents = this.replaceWrappedSnippetsWithCorespondingTags(fileContents);
        var regExpOpen = /\<\s*snippet\s+id=\'((?:[a-z]+\-)*[a-z]+)\'\s*\/\s*\>/g;
        var match = regExpOpen.exec(fileContents);
        var hadMatches: boolean = false;
        while (match) {
            var matchedString = match[0];
            var placeholderId = match[1];
            var finalSnippet = "";
            console.log("Placeholder resolved: " + matchedString);
            for (var i = 0; i < this._storedSourceTypes.length; i++) {
                var currentSourceType = this._storedSourceTypes[i];
                var snippetForSourceType = this._storedSnippets[currentSourceType + placeholderId]
                if (snippetForSourceType !== undefined) {
                    hadMatches = true;
                    if (finalSnippet.length > 0) {
                        finalSnippet += osModule.EOL;
                    }
                    var currentSnippetTitle = this._storedSourceTitles[currentSourceType] || "";
                    finalSnippet += "```" + currentSnippetTitle + osModule.EOL + snippetForSourceType + osModule.EOL + "```";
                }
            }

            if (finalSnippet.length > 0) {
                /*
                    Check whether it should be wrapped or replaced.
                    If the tag is closed it will be replaced by the snippet.

                    From:
                    <snippet id="snippetId"/>
                    To:
                    {your_snippet}

                    If there is open and closed tag the snippet will be wrapped around snippet tag.

                    From:
                    <snippet id="snippetId"></snippet>
                    To:
                    <snippet id="snippetId">
                    {your_snippet}
                    </snippet>

                */
                if (this.toWrap) {
                    var tmpMatchedString = this.wrapSnippetWithComments(matchedString, placeholderId);
                    fileContents = fileContents.replace(matchedString, tmpMatchedString);
                }
                fileContents = fileContents.replace(matchedString, finalSnippet);
                console.log("Token replaced: " + matchedString);
            }

            match = regExpOpen.exec(fileContents);
        }

        if (hadMatches === true) {
            fsModule.writeFileSync(path, fileContents, "utf8");
        }
    }

    private processDocsDirectory(path: string, extensionFilter: string) {
        var files = fsModule.readdirSync(path);
        for (var i = 0; i < files.length; i++) {
            var currentFile = files[i];
            var fullPath = path + '/' + currentFile;
            var fileStat = fsModule.lstatSync(fullPath);
            if (fileStat.isDirectory()) {
                this.processDocsDirectory(fullPath, extensionFilter);
            } else if (fileStat.isFile() && pathModule.extname(fullPath) === extensionFilter) {
                this.processDocsFile(fullPath, extensionFilter);
            }
        }
    }

    private processFile(path: string, extensionFilter: string) {
        console.log("Processing source file: " + path);

        var spec: FormatSpec = this._fileFormatSpecs[extensionFilter];
        var regExpOpen = new RegExp(spec.commentStart + expConsts.start + expConsts.name + spec.commentEnd, "g");
        var regExpOpenReplacer = new RegExp(spec.commentStart + expConsts.start + expConsts.name + spec.commentEnd, "g");
        var regExpCloseReplacer = new RegExp(spec.commentStart + expConsts.end + expConsts.name + spec.commentEnd, "g");

        var fileContents = fsModule.readFileSync(path, 'utf8');
        var match = regExpOpen.exec(fileContents);
        while (match) {
            var matchIndex = match.index;
            var matchLength = match[0].length;
            var idOfSnippet = match[1];
            if (this.hasSnippet(extensionFilter, idOfSnippet)) {
                match = regExpOpen.exec(fileContents);
                continue;
            }

            var regExpCurrentClosingEOF = new RegExp(spec.commentStart + expConsts.end + idOfSnippet + "$");
            var closingTagMatchEOF = regExpCurrentClosingEOF.exec(fileContents);
            var indexOfClosingTag;

            if (!closingTagMatchEOF) {
                var regExpCurrentClosing = new RegExp(spec.commentStart + expConsts.end + idOfSnippet + "([^-])" + spec.commentEnd);
                var closingTagMatch = regExpCurrentClosing.exec(fileContents);

                if (!closingTagMatch) {
                    throw new Error("Closing tag not found for: " + idOfSnippet);
                }
                indexOfClosingTag = closingTagMatch.index;
            } else {
                indexOfClosingTag = closingTagMatchEOF.index;
            }

            var snippet = fileContents.substr(matchIndex + matchLength, indexOfClosingTag - matchIndex - matchLength);
            snippet = snippet.replace(regExpOpenReplacer, "");
            snippet = snippet.replace(regExpCloseReplacer, "");
            snippet = this.trimWhiteSpaces(snippet);

            if (spec.postProcess) {
                snippet = spec.postProcess(snippet);
            }

            snippet = this.removeHiddenBlocks(snippet, spec);

            console.log("Snippet resolved: " + idOfSnippet);
            this.addSnippet(extensionFilter, idOfSnippet, snippet);
            match = regExpOpen.exec(fileContents);
        }
    }

    protected hasSnippet(fileExtension: string, id: string): boolean {
        return this._storedSnippets[fileExtension + id] !== undefined
    }

    protected addSnippet(fileExtension: string, id: string, snippet: string): void {
        this._storedSnippets[fileExtension + id] = snippet;
    }

    private lineHasText(line: string): boolean {
        return /\S/.test(line);
    }
    private trimWhiteSpaces(snippet: string): string {
        const hasText = (str: string) => /\S/;
        snippet = snippet.replace(/\t/g, "    "); // replace tabs with 4 spaces
        var lines = snippet.split(/\r?\n/);

        // Remove lines that has no text at start of snippet
        while (lines.length && !this.lineHasText(lines[0])) {
            lines.shift();
        }

        // Remove lines that has no text at end of snippet
        while (lines.length && !this.lineHasText(lines[lines.length - 1])) {
            lines.pop();
        }

        // Get starting spaces
        var minStartingSpaces = Number.POSITIVE_INFINITY;
        lines.forEach((line) => {
            if (/\S/.test(line)) {
                var spacesOnLeft = line.match(/^ */)[0].length;
                minStartingSpaces = Math.min(minStartingSpaces, spacesOnLeft);
            }
        })

        // Remove starting spaces
        if (minStartingSpaces !== Number.POSITIVE_INFINITY && minStartingSpaces > 0) {
            for (let i = 0; i < lines.length; i++) {
                if (/\S/.test(lines[i])) {
                    lines[i] = lines[i].substr(minStartingSpaces);
                }
            }
        }

        return lines.join(osModule.EOL);
    }

    private removeHiddenBlocks(snippet: string, spec: FormatSpec) {
        const startExp = new RegExp(spec.commentStart + expConsts.start + expConsts.hide + spec.commentEnd, "g");
        const endExp = new RegExp(spec.commentStart + expConsts.end + expConsts.hide + spec.commentEnd, "g");

        var match: RegExpMatchArray;
        var startMatches = new Array<RegExpMatchArray>();
        var endMatches = new Array<RegExpMatchArray>();

        while (match = startExp.exec(snippet)) {
            startMatches.push(match);
        }

        while (match = endExp.exec(snippet)) {
            endMatches.push(match);
        }

        // Validate
        if (startMatches.length !== endMatches.length) {
            throw new Error("Start and end match blockes don't match for snippet: " + snippet);
        }

        for (var i = startMatches.length - 1; i >= 0; i--) {
            let start = startMatches[i];
            let end = endMatches[i];
            snippet = snippet.substr(0, start.index) + snippet.substr(end.index + end[0].length);
        }

        return snippet;
    }
}


text:
/**
 * The type of the Redux action which signals that the prompt for media
 * permission is visible or not.
 *
 * {
 *     type: MEDIA_PERMISSION_PROMPT_VISIBILITY_CHANGED,
 *     isVisible: {boolean},
 *     browser: {string}
 * }
 * @public
 */
export const MEDIA_PERMISSION_PROMPT_VISIBILITY_CHANGED
    = Symbol('MEDIA_PERMISSION_PROMPT_VISIBILITY_CHANGED');

/**
 * The type of the Redux action which signals that a suspend was detected.
 *
 * {
 *     type: SUSPEND_DETECTED
 * }
 * @public
 */
export const SUSPEND_DETECTED = Symbol('SUSPEND_DETECTED');


text:
<menu xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools" tools:context=".NavigationDrawerActivity">

    <item
        android:id="@+id/action_federal_deputies"
        android:title="@string/action_federal_deputies"
        app:showAsAction="withText|ifRoom" />
<!--
    <item
        android:id="@+id/action_senators"
        android:title="@string/action_senators"
        app:showAsAction="withText|ifRoom" />

    <item
        android:id="@+id/action_settings"
        android:title="@string/action_settings"
        app:showAsAction="withText|ifRoom" />
-->
</menu>


text:
import React from 'react';
import { assert } from 'chai';
import { createShallow, createMount } from '../test-utils';
import StepConnector from './StepConnector';

describe('<StepConnector />', () => {
  let shallow;
  let mount;

  before(() => {
    shallow = createShallow({ dive: true });
    mount = createMount();
  });

  after(() => {
    mount.cleanUp();
  });

  describe('rendering', () => {
    it('renders a div containing a span', () => {
      const wrapper = shallow(<StepConnector orientation="horizontal" />);
      assert.strictEqual(wrapper.type(), 'div');
      const line = wrapper.find('span');
      assert.strictEqual(line.length, 1);
    });

    it('has the class lineHorizontal when horizontal', () => {
      const wrapper = shallow(<StepConnector orientation="horizontal" />);
      const line = wrapper.find('span');
      assert.include(line.props().className, 'StepConnector-lineHorizontal');
    });

    it('has the class lineVertical when vertical', () => {
      const wrapper = shallow(<StepConnector orientation="vertical" />);
      const line = wrapper.find('span');
      assert.include(line.props().className, 'StepConnector-lineVertical');
    });
  });
});


text:
if isintance(True, bool) and\
    isinstance(1, int):
    pass


text:
layout: post
date: 2016-09-17
title: "Johanna Johnson Johanna Johnsonthe kennedy Sleeveless Court Train Aline/Princess"
category: Johanna Johnson
tags: [Johanna Johnson ,Johanna Johnson,Aline/Princess ,Straps,Court Train,Sleeveless]
---
### Johanna Johnson Johanna Johnsonthe kennedy
Just **$419.99**
###   Sleeveless Court Train Aline/Princess

BRANDS	Johanna Johnson

Silhouette	Aline/Princess

Neckline	Straps

Hemline/Train	Court Train

Sleeve	Sleeveless

Buy it: [https://www.readybrides.com/en/johanna-johnson-/34974-johanna-johnsonthe-kennedy.html](https://www.readybrides.com/en/johanna-johnson-/34974-johanna-johnsonthe-kennedy.html)


text:
layout: page
title: Vision Silicon Global Trade Fair
date: 2016-05-24
author: Anna Gates
tags: weekly links, java
status: published
summary: Nulla semper eros turpis, eu euismod lorem dignissim ut.
banner: images/banner/wedding.jpg
booking:
  startDate: 02/05/2019
  endDate: 02/08/2019
  ctyhocn: SGUZIHX
  groupCode: VSGTF
published: true
---
Ut commodo fringilla urna. Praesent a maximus turpis. Donec arcu sapien, gravida a nunc vitae, scelerisque pellentesque arcu. Nulla dui sem, elementum id condimentum nec, finibus at quam. Sed rhoncus consectetur elit, sed suscipit orci vehicula id. Fusce eu vestibulum sem. Curabitur id bibendum magna. Praesent id posuere eros, a maximus lectus. Etiam rutrum justo egestas, tincidunt metus a, posuere turpis. Praesent at maximus felis. Quisque maximus, leo id aliquet accumsan, enim nulla consequat nibh, euismod pulvinar libero lacus in ante. Nunc vel mauris vel sapien vestibulum malesuada. Fusce eleifend lobortis tristique.

* Integer efficitur massa et neque scelerisque viverra
* Vivamus non nulla mollis, tempus ante eu, ornare diam
* Cras in arcu tempus, venenatis sem eu, auctor turpis.

Proin lacus eros, condimentum eu mauris nec, tristique iaculis nibh. Donec consectetur turpis nunc, aliquam egestas sem congue et. In at consectetur mi. Fusce neque urna, interdum eu iaculis et, volutpat et nibh. Nam et faucibus nulla. Quisque faucibus odio vitae purus sollicitudin, at tristique nulla luctus. Donec nisl turpis, dignissim congue vestibulum vitae, laoreet vel nisi. Maecenas tempus ac nulla non laoreet. Nulla a risus vel lorem bibendum dapibus nec id quam. Donec sollicitudin ac erat hendrerit laoreet. Donec placerat, orci quis semper sodales, dolor libero venenatis enim, at accumsan augue eros a justo. Proin tempor rutrum nunc quis accumsan. Ut in lacus mattis, aliquet justo mollis, dapibus elit. Aliquam erat volutpat.


text:
// Copyright (c) MOSA Project. Licensed under the New BSD License.

namespace Mosa.Utility.BootImage
{
	public enum ImageFormat
	{
		NotSpecified,
		IMG,
		VHD,
		VDI,
		ISO,
		VMDK
	};
}


text:
This directory contains extra files which are of use to people checking out the
repository but are not directly required by geoview itself.


text:
<div [formGroup]="getFormGroup()" [matTooltip]="tooltip" [matTooltipClass]="tooltipClass"
  [matTooltipPosition]="tooltipPosition" [matTooltipShowDelay]="tooltipShowDelay"
  [matTooltipHideDelay]="tooltipHideDelay">
  <mat-form-field [appearance]="appearance" [floatLabel]="floatLabel" [hideRequiredMarker]="hideRequiredMarker"
    [class.custom-width]="hasCustomWidth" [class.icon-field]="showClearButton" fxFlexFill>
    <mat-label *ngIf="labelVisible">{{ olabel | oTranslate }}</mat-label>
    <input matInput type="text" [id]="getAttribute()" [formControlName]="getAttribute()" [placeholder]="placeHolder"
      (focus)="innerOnFocus($event)" (blur)="innerOnBlur($event)" [readonly]="isReadOnly"
      (change)="onChangeEvent($event)" [required]="isRequired" />
    <button type="button" *ngIf="showClearButton" matSuffix mat-icon-button (click)="onClickClearValue($event)">
      <mat-icon svgIcon="ontimize:close"></mat-icon>
    </button>
    <mat-error *ngIf="hasError('required')" text="{{ 'FORM_VALIDATION.REQUIRED' | oTranslate }}"></mat-error>
    <mat-error *ngIf="hasError('minlength')"
      text="{{ 'FORM_VALIDATION.MIN_LENGTH' | oTranslate }}: {{ getErrorValue('minlength', 'requiredLength') }}">
    </mat-error>
    <mat-error *ngIf="hasError('maxlength')"
      text="{{ 'FORM_VALIDATION.MAX_LENGTH' | oTranslate }}: {{ getErrorValue('maxlength', 'requiredLength') }}">
    </mat-error>
    <mat-error *ngFor="let oError of getActiveOErrors()" text="{{ oError.text | oTranslate }}"></mat-error>
  </mat-form-field>
</div>


text: export { default } from 'ember-moltin-adapter/models/category';


text:
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="ChangeListManager">
    <list default="true" id="aa14cbb6-91b8-4509-99b7-c927246c4676" name="Default" comment="" />
    <ignored path="jumbleSort.iws" />
    <ignored path=".idea/workspace.xml" />
    <option name="TRACKING_ENABLED" value="true" />
    <option name="SHOW_DIALOG" value="false" />
    <option name="HIGHLIGHT_CONFLICTS" value="true" />
    <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
    <option name="LAST_RESOLUTION" value="IGNORE" />
  </component>
  <component name="ChangesViewManager" flattened_view="true" show_ignored="false" />
  <component name="CreatePatchCommitExecutor">
    <option name="PATCH_PATH" value="" />
  </component>
  <component name="DaemonCodeAnalyzer">
    <disable_hints />
  </component>
  <component name="DebuggerManager">
    <breakpoint_any default_suspend_policy="SuspendAll" default_condition_enabled="true">
      <breakpoint>
        <option name="NOTIFY_CAUGHT" value="true" />
        <option name="NOTIFY_UNCAUGHT" value="true" />
        <option name="ENABLED" value="false" />
        <option name="LOG_ENABLED" value="false" />
        <option name="LOG_EXPRESSION_ENABLED" value="false" />
        <option name="REMOVE_AFTER_HIT" value="false" />
        <option name="SUSPEND_POLICY" value="SuspendAll" />
        <option name="SUSPEND" value="true" />
        <option name="COUNT_FILTER_ENABLED" value="false" />
        <option name="COUNT_FILTER" value="0" />
        <option name="CONDITION_ENABLED" value="true" />
        <option name="CLASS_FILTERS_ENABLED" value="false" />
        <option name="INSTANCE_FILTERS_ENABLED" value="false" />
        <option name="CONDITION" value="" />
        <option name="LOG_MESSAGE" value="" />
      </breakpoint>
      <breakpoint>
        <option name="NOTIFY_CAUGHT" value="true" />
        <option name="NOTIFY_UNCAUGHT" value="true" />
        <option name="ENABLED" value="false" />
        <option name="LOG_ENABLED" value="false" />
        <option name="LOG_EXPRESSION_ENABLED" value="false" />
        <option name="REMOVE_AFTER_HIT" value="false" />
        <option name="SUSPEND_POLICY" value="SuspendAll" />
        <option name="SUSPEND" value="true" />
        <option name="COUNT_FILTER_ENABLED" value="false" />
        <option name="COUNT_FILTER" value="0" />
        <option name="CONDITION_ENABLED" value="true" />
        <option name="CLASS_FILTERS_ENABLED" value="false" />
        <option name="INSTANCE_FILTERS_ENABLED" value="false" />
        <option name="CONDITION" value="" />
        <option name="LOG_MESSAGE" value="" />
      </breakpoint>
    </breakpoint_any>
    <ui_properties default_suspend_policy="SuspendAll" default_condition_enabled="true" />
    <breakpoint_rules />
    <ui_properties />
  </component>
  <component name="ExecutionTargetManager" SELECTED_TARGET="default_target" />
  <component name="FavoritesManager">
    <favorites_list name="jumbleSort" />
  </component>
  <component name="FileEditorManager">
    <leaf>
      <file leaf-file-name="Solution.java" pinned="false" current="true" current-in-tab="true">
        <entry file="file://$PROJECT_DIR$/src/Solution.java">
          <provider selected="true" editor-type-id="text-editor">
            <state line="44" column="5" selection-start="1347" selection-end="1347" vertical-scroll-proportion="0.8370044" vertical-offset="90" max-vertical-offset="1380">
              <folding>
                <element signature="n#!!doc" expanded="true" />
                <element signature="imports" expanded="true" />
              </folding>
            </state>
          </provider>
        </entry>
      </file>
    </leaf>
  </component>
  <component name="FindManager">
    <FindUsagesManager>
      <setting name="OPEN_NEW_TAB" value="false" />
    </FindUsagesManager>
  </component>
  <component name="IdeDocumentHistory">
    <option name="changedFiles">
      <list>
        <option value="$PROJECT_DIR$/src/SolutionBack" />
        <option value="$PROJECT_DIR$/src/Solution.java" />
      </list>
    </option>
  </component>
  <component name="ProjectFrameBounds">
    <option name="x" value="4" />
    <option name="y" value="22" />
    <option name="width" value="1276" />
    <option name="height" value="778" />
  </component>
  <component name="ProjectLevelVcsManager" settingsEditedManually="false">
    <OptionsSetting value="true" id="Add" />
    <OptionsSetting value="true" id="Remove" />
    <OptionsSetting value="true" id="Checkout" />
    <OptionsSetting value="true" id="Update" />
    <OptionsSetting value="true" id="Status" />
    <OptionsSetting value="true" id="Edit" />
    <ConfirmationsSetting value="0" id="Add" />
    <ConfirmationsSetting value="0" id="Remove" />
  </component>
  <component name="ProjectReloadState">
    <option name="STATE" value="0" />
  </component>
  <component name="ProjectView">
    <navigator currentView="ProjectPane" proportions="" version="1" splitterProportion="0.5">
      <flattenPackages />
      <showMembers />
      <showModules />
      <showLibraryContents />
      <hideEmptyPackages />
      <abbreviatePackageNames />
      <autoscrollToSource />
      <autoscrollFromSource />
      <sortByType />
    </navigator>
    <panes>
      <pane id="Scope" />
      <pane id="ProjectPane">
        <subPane>
          <PATH>
            <PATH_ELEMENT>
              <option name="myItemId" value="jumbleSort" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
            </PATH_ELEMENT>
          </PATH>
          <PATH>
            <PATH_ELEMENT>
              <option name="myItemId" value="jumbleSort" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="jumbleSort" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
            </PATH_ELEMENT>
          </PATH>
          <PATH>
            <PATH_ELEMENT>
              <option name="myItemId" value="jumbleSort" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="jumbleSort" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="src" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
            </PATH_ELEMENT>
          </PATH>
        </subPane>
      </pane>
      <pane id="PackagesPane" />
    </panes>
  </component>
  <component name="PropertiesComponent">
    <property name="GoToClass.includeLibraries" value="false" />
    <property name="GoToClass.toSaveIncludeLibraries" value="false" />
    <property name="GoToFile.includeJavaFiles" value="false" />
    <property name="MemberChooser.sorted" value="false" />
    <property name="MemberChooser.showClasses" value="true" />
    <property name="MemberChooser.copyJavadoc" value="false" />
    <property name="recentsLimit" value="5" />
    <property name="dynamic.classpath" value="false" />
    <property name="FullScreen" value="false" />
  </component>
  <component name="RunManager" selected="Application.Solution">
    <configuration default="false" name="Solution" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
      <option name="MAIN_CLASS_NAME" value="Solution" />
      <option name="VM_PARAMETERS" />
      <option name="PROGRAM_PARAMETERS" />
      <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
      <option name="ALTERNATIVE_JRE_PATH" />
      <option name="ENABLE_SWING_INSPECTOR" value="false" />
      <option name="ENV_VARIABLES" />
      <option name="PASS_PARENT_ENVS" value="true" />
      <module name="jumbleSort" />
      <envs />
      <RunnerSettings RunnerId="Debug">
        <option name="DEBUG_PORT" value="" />
        <option name="TRANSPORT" value="0" />
        <option name="LOCAL" value="true" />
      </RunnerSettings>
      <RunnerSettings RunnerId="Run" />
      <ConfigurationWrapper RunnerId="Debug" />
      <ConfigurationWrapper RunnerId="Run" />
      <method />
    </configuration>
    <configuration default="true" type="#org.jetbrains.idea.devkit.run.PluginConfigurationType" factoryName="Plugin" singleton="true">
      <module name="" />
      <option name="VM_PARAMETERS" value="-Xmx512m -Xms256m -XX:MaxPermSize=250m -ea" />
      <option name="PROGRAM_PARAMETERS" />
      <method />
    </configuration>
    <configuration default="true" type="AndroidTestRunConfigurationType" factoryName="Android Tests">
      <module name="" />
      <option name="TESTING_TYPE" value="0" />
      <option name="INSTRUMENTATION_RUNNER_CLASS" value="" />
      <option name="METHOD_NAME" value="" />
      <option name="CLASS_NAME" value="" />
      <option name="PACKAGE_NAME" value="" />
      <option name="TARGET_SELECTION_MODE" value="EMULATOR" />
      <option name="USE_LAST_SELECTED_DEVICE" value="false" />
      <option name="PREFERRED_AVD" value="" />
      <option name="USE_COMMAND_LINE" value="true" />
      <option name="COMMAND_LINE" value="" />
      <option name="WIPE_USER_DATA" value="false" />
      <option name="DISABLE_BOOT_ANIMATION" value="false" />
      <option name="NETWORK_SPEED" value="full" />
      <option name="NETWORK_LATENCY" value="none" />
      <option name="CLEAR_LOGCAT" value="false" />
      <option name="SHOW_LOGCAT_AUTOMATICALLY" value="true" />
      <method />
    </configuration>
    <configuration default="true" type="Remote" factoryName="Remote">
      <option name="USE_SOCKET_TRANSPORT" value="true" />
      <option name="SERVER_MODE" value="false" />
      <option name="SHMEM_ADDRESS" value="javadebug" />
      <option name="HOST" value="localhost" />
      <option name="PORT" value="5005" />
      <method />
    </configuration>
    <configuration default="true" type="TestNG" factoryName="TestNG">
      <module name="" />
      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
      <option name="ALTERNATIVE_JRE_PATH" />
      <option name="SUITE_NAME" />
      <option name="PACKAGE_NAME" />
      <option name="MAIN_CLASS_NAME" />
      <option name="METHOD_NAME" />
      <option name="GROUP_NAME" />
      <option name="TEST_OBJECT" value="CLASS" />
      <option name="VM_PARAMETERS" value="-ea" />
      <option name="PARAMETERS" />
      <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
      <option name="OUTPUT_DIRECTORY" />
      <option name="ANNOTATION_TYPE" />
      <option name="ENV_VARIABLES" />
      <option name="PASS_PARENT_ENVS" value="true" />
      <option name="TEST_SEARCH_SCOPE">
        <value defaultName="moduleWithDependencies" />
      </option>
      <option name="USE_DEFAULT_REPORTERS" value="false" />
      <option name="PROPERTIES_FILE" />
      <envs />
      <properties />
      <listeners />
      <method />
    </configuration>
    <configuration default="true" type="Applet" factoryName="Applet">
      <module name="" />
      <option name="MAIN_CLASS_NAME" />
      <option name="HTML_FILE_NAME" />
      <option name="HTML_USED" value="false" />
      <option name="WIDTH" value="400" />
      <option name="HEIGHT" value="300" />
      <option name="POLICY_FILE" value="$APPLICATION_HOME_DIR$/bin/appletviewer.policy" />
      <option name="VM_PARAMETERS" />
      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
      <option name="ALTERNATIVE_JRE_PATH" />
      <method />
    </configuration>
    <configuration default="true" type="Application" factoryName="Application">
      <option name="MAIN_CLASS_NAME" />
      <option name="VM_PARAMETERS" />
      <option name="PROGRAM_PARAMETERS" />
      <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
      <option name="ALTERNATIVE_JRE_PATH" />
      <option name="ENABLE_SWING_INSPECTOR" value="false" />
      <option name="ENV_VARIABLES" />
      <option name="PASS_PARENT_ENVS" value="true" />
      <module name="" />
      <envs />
      <method />
    </configuration>
    <configuration default="true" type="JUnit" factoryName="JUnit">
      <module name="" />
      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
      <option name="ALTERNATIVE_JRE_PATH" />
      <option name="PACKAGE_NAME" />
      <option name="MAIN_CLASS_NAME" />
      <option name="METHOD_NAME" />
      <option name="TEST_OBJECT" value="class" />
      <option name="VM_PARAMETERS" value="-ea" />
      <option name="PARAMETERS" />
      <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
      <option name="ENV_VARIABLES" />
      <option name="PASS_PARENT_ENVS" value="true" />
      <option name="TEST_SEARCH_SCOPE">
        <value defaultName="moduleWithDependencies" />
      </option>
      <envs />
      <patterns />
      <method />
    </configuration>
    <configuration default="true" type="AndroidRunConfigurationType" factoryName="Android Application">
      <module name="" />
      <option name="ACTIVITY_CLASS" value="" />
      <option name="MODE" value="default_activity" />
      <option name="DEPLOY" value="true" />
      <option name="ARTIFACT_NAME" value="" />
      <option name="TARGET_SELECTION_MODE" value="EMULATOR" />
      <option name="USE_LAST_SELECTED_DEVICE" value="false" />
      <option name="PREFERRED_AVD" value="" />
      <option name="USE_COMMAND_LINE" value="true" />
      <option name="COMMAND_LINE" value="" />
      <option name="WIPE_USER_DATA" value="false" />
      <option name="DISABLE_BOOT_ANIMATION" value="false" />
      <option name="NETWORK_SPEED" value="full" />
      <option name="NETWORK_LATENCY" value="none" />
      <option name="CLEAR_LOGCAT" value="false" />
      <option name="SHOW_LOGCAT_AUTOMATICALLY" value="true" />
      <method />
    </configuration>
    <list size="1">
      <item index="0" class="java.lang.String" itemvalue="Application.Solution" />
    </list>
    <recent_temporary>
      <list size="1">
        <item index="0" class="java.lang.String" itemvalue="Application.Solution" />
      </list>
    </recent_temporary>
    <configuration name="<template>" type="WebApp" default="true" selected="false">
      <Host>localhost</Host>
      <Port>5050</Port>
    </configuration>
  </component>
  <component name="ShelveChangesManager" show_recycled="false" />
  <component name="TaskManager">
    <task active="true" id="Default" summary="Default task">
      <changelist id="aa14cbb6-91b8-4509-99b7-c927246c4676" name="Default" comment="" />
      <created>1393181197513</created>
      <updated>1393181197513</updated>
    </task>
    <servers />
  </component>
  <component name="ToolWindowManager">
    <frame x="4" y="22" width="1276" height="778" extended-state="6" />
    <editor active="false" />
    <layout>
      <window_info id="Palette	" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
      <window_info id="Changes" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
      <window_info id="Designer" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
      <window_info id="Palette" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
      <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
      <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
      <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.39915374" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
      <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
      <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
      <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
      <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
      <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
      <window_info id="Maven Projects" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
      <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="SLIDING" type="SLIDING" visible="false" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
      <window_info id="Application Servers" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
      <window_info id="Project" active="true" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.25" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
      <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32863188" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
      <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
      <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
      <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
      <window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32863188" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
      <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
      <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
    </layout>
  </component>
  <component name="Vcs.Log.UiProperties">
    <option name="RECENTLY_FILTERED_USER_GROUPS">
      <collection />
    </option>
  </component>
  <component name="VcsContentAnnotationSettings">
    <option name="myLimit" value="2678400000" />
  </component>
  <component name="VcsManagerConfiguration">
    <option name="myTodoPanelSettings">
      <TodoPanelSettings />
    </option>
  </component>
  <component name="XDebuggerManager">
    <breakpoint-manager />
  </component>
  <component name="antWorkspaceConfiguration">
    <option name="IS_AUTOSCROLL_TO_SOURCE" value="false" />
    <option name="FILTER_TARGETS" value="false" />
  </component>
  <component name="editorHistoryManager">
    <entry file="file://$PROJECT_DIR$/src/Solution.java">
      <provider selected="true" editor-type-id="text-editor">
        <state line="44" column="5" selection-start="1347" selection-end="1347" vertical-scroll-proportion="0.0" vertical-offset="90" max-vertical-offset="1380">
          <folding>
            <element signature="n#!!doc" expanded="true" />
            <element signature="imports" expanded="true" />
          </folding>
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/Solution.java">
      <provider selected="true" editor-type-id="text-editor">
        <state line="29" column="16" selection-start="902" selection-end="902" vertical-scroll-proportion="0.0" vertical-offset="90" max-vertical-offset="1380">
          <folding>
            <element signature="n#!!doc" expanded="true" />
            <element signature="imports" expanded="true" />
          </folding>
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/Solution.java">
      <provider selected="true" editor-type-id="text-editor">
        <state line="33" column="19" selection-start="1029" selection-end="1029" vertical-scroll-proportion="0.0" vertical-offset="257" max-vertical-offset="1320">
          <folding>
            <element signature="n#!!doc" expanded="true" />
            <element signature="imports" expanded="true" />
          </folding>
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/SolutionBack">
      <provider selected="true" editor-type-id="text-editor">
        <state line="26" column="22" selection-start="762" selection-end="762" vertical-scroll-proportion="-0.21145375" vertical-offset="534" max-vertical-offset="1290" />
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/Solution.java">
      <provider selected="true" editor-type-id="text-editor">
        <state line="44" column="5" selection-start="1347" selection-end="1347" vertical-scroll-proportion="0.8370044" vertical-offset="90" max-vertical-offset="1380">
          <folding>
            <element signature="n#!!doc" expanded="true" />
            <element signature="imports" expanded="true" />
          </folding>
        </state>
      </provider>
    </entry>
  </component>
</project>


text:
package jscover.server;

import jscover.instrument.InstrumenterService;
import jscover.instrument.UnloadedSourceProcessor;
import jscover.report.JSONDataSaver;
import jscover.report.ScriptLinesAndSource;
import jscover.util.IoService;

import java.io.File;
import java.io.IOException;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.net.Socket;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

import static java.lang.String.format;

public class InstrumentingRequestHandler extends HttpServer {
    public static final String JSCOVERAGE_STORE = "/jscoverage-store";
    static Set<String> uris = new HashSet<String>();
    private ConfigurationForServer configuration;
    private IoService ioService = new IoService();
    private JSONDataSaver jsonDataSaver = new JSONDataSaver();
    private InstrumenterService instrumenterService = new InstrumenterService();
    private ProxyService proxyService = new ProxyService();
    private UnloadedSourceProcessor unloadedSourceProcessor;

    public InstrumentingRequestHandler(Socket socket, ConfigurationForServer configuration) {
        super(socket, configuration.getDocumentRoot(), configuration.getVersion());
        this.configuration = configuration;
        this.unloadedSourceProcessor = new UnloadedSourceProcessor(configuration);
    }

    @Override
    protected void handlePost(HttpRequest request, String data) {
        String uri = request.getPath();
        if (uri.startsWith(JSCOVERAGE_STORE)) {
            File reportDir = configuration.getReportDir();
            if (uri.length() > JSCOVERAGE_STORE.length()) {
                reportDir = new File(reportDir, uri.substring(JSCOVERAGE_STORE.length()));
            }
            try {
                List<ScriptLinesAndSource> unloadJSData = null;
                if (configuration.isIncludeUnloadedJS())
                    unloadJSData = unloadedSourceProcessor.getEmptyCoverageData(uris);
                jsonDataSaver.saveJSONData(reportDir, data, unloadJSData);
                ioService.generateJSCoverFilesForWebServer(reportDir, configuration.getVersion());
                sendResponse(HTTP_STATUS.HTTP_OK, MIME.TEXT_PLAIN, "Coverage data stored at " + reportDir);
            } catch(Throwable t) {
                t.printStackTrace();
                String message = format("Error saving coverage data. Try deleting JSON file at %s\n",reportDir);
                sendResponse(HTTP_STATUS.HTTP_OK, MIME.TEXT_PLAIN, message);
            }
        } else {
            if (configuration.isProxy())
                proxyService.handleProxyPost(request, data, os);
            else
                super.handlePost(request, data);
        }
    }

    @Override
    protected void handleGet(HttpRequest request) throws IOException {
        String uri = request.getPath();
        try {
            if (uri.equals("/jscoverage.js")) {
                sendResponse(HTTP_STATUS.HTTP_OK, request.getMime(), ioService.generateJSCoverageServerJS());
            } else if (uri.startsWith("/jscoverage.html")) {
                String reportHTML = ioService.generateJSCoverageHtml(configuration.getVersion());
                sendResponse(HTTP_STATUS.HTTP_OK, request.getMime(), reportHTML);
            } else if (uri.startsWith("/jscoverage")) {
                sendResponse(HTTP_STATUS.HTTP_OK, request.getMime(), ioService.getResourceAsStream(uri));
            } else if (uri.endsWith(".js") && !configuration.skipInstrumentation(uri.substring(1))) {
                String jsInstrumented;
                if (configuration.isProxy()) {
                    String originalJS = proxyService.getUrl(request.getUrl());
                    jsInstrumented = instrumenterService.instrumentJSForWebServer(configuration.getCompilerEnvirons(), originalJS, uri, configuration.isIncludeBranch());
                } else {
                    if (configuration.isIncludeUnloadedJS())
                        uris.add(uri.substring(1));
                    jsInstrumented = instrumenterService.instrumentJSForWebServer(configuration.getCompilerEnvirons(), new File(wwwRoot, uri), uri, configuration.isIncludeBranch());
                }
                sendResponse(HTTP_STATUS.HTTP_OK, MIME.JS, jsInstrumented);
            } else {
                if (configuration.isProxy())
                    proxyService.handleProxyGet(request, os);
                else
                    super.handleGet(request);
            }
        } catch (Throwable e) {
            StringWriter stringWriter = new StringWriter();
            e.printStackTrace(new PrintWriter(stringWriter));
            sendResponse(HTTP_STATUS.HTTP_INTERNAL_SERVER_ERROR, MIME.TEXT_PLAIN, stringWriter.toString());
        }
    }

    @Override
    protected void handleHead(HttpRequest request) {
        if (configuration.isProxy())
            proxyService.handleProxyHead(request, os);
        else
            super.handleHead(request);
    }
}


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
Grevillea 9(no. 49): 7 (1880)

#### Original name
Trichaegum opacum Cooke & Harkn.

### Remarks
null


text:
package gov.hhs.onc.dcdt.web.tags.impl;

import com.fasterxml.jackson.databind.ObjectMapper;
import gov.hhs.onc.dcdt.beans.utils.ToolBeanFactoryUtils;
import gov.hhs.onc.dcdt.json.utils.ToolJsonUtils;

@SuppressWarnings({ "serial" })
public class JsonTag extends AbstractToolTag {
    private ObjectMapper objMapper;
    private Object target;

    @Override
    protected int doEndTagInternal() throws Exception {
        this.pageContext.getOut().println(ToolJsonUtils.toJson(this.objMapper, this.target));

        return super.doEndTagInternal();
    }

    @Override
    protected int doStartTagInternalWrapped() throws Exception {
        this.objMapper = ToolBeanFactoryUtils.getBeanOfType(this.appContext, ObjectMapper.class);

        return super.doStartTagInternalWrapped();
    }

    public void setTarget(Object target) {
        this.target = target;
    }
}