text:
package mireka.address;

/**
 * RemotePart identifies the destination system in a mail address. For example
 * in the john@example.com address example.com is the remote part.
 */
public interface RemotePart {
    /**
     * Returns the raw remote part text, as it was supplied in the SMTP
     * transaction.
     */
    public String smtpText();

    public boolean equals(Object obj);

    public int hashCode();

}

redpajama_set_name: RedPajamaGithub


text:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
                             http://maven.apache.org/maven-v4_0_0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<groupId>concept</groupId>
	<artifactId>concept</artifactId>
	<version>1.0-SNAPSHOT</version>

	<packaging>jar</packaging>
	<name>concept</name>

	<url>https://github.com/Nachtfeuer/concept-java</url>

	<developers>
		<developer>
			<name>Thomas Lehmann</name>
			<email>thomas.lehmann.private@gmail.com</email>
		</developer>
	</developers>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.build.compiler>1.8</project.build.compiler>
	</properties>

	<dependencies>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.12</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>org.hamcrest</groupId>
			<artifactId>hamcrest-all</artifactId>
			<version>1.3</version>
		</dependency>

		<dependency>
			<groupId>log4j</groupId>
			<artifactId>log4j</artifactId>
			<version>1.2.17</version>
		</dependency>

		<dependency>
			<groupId>org.apache.commons</groupId>
			<artifactId>commons-lang3</artifactId>
			<version>3.4</version>
		</dependency>

		<dependency>
			<groupId>com.google.code.gson</groupId>
			<artifactId>gson</artifactId>
			<version>2.5</version>
		</dependency>

		<dependency>
			<groupId>com.thoughtworks.xstream</groupId>
			<artifactId>xstream</artifactId>
			<version>1.4.8</version>
		</dependency>
	</dependencies>

	<build>
		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-compiler-plugin</artifactId>
					<version>3.3</version>
					<configuration>
						<!-- put your configurations here -->
						<source>${project.build.compiler}</source>
						<target>${project.build.compiler}</target>
						<encoding>${project.build.sourceEncoding}</encoding>
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>

		<plugins>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>cobertura-maven-plugin</artifactId>
				<version>2.7</version>

				<configuration>
					<check>
						<packageLineRate>95</packageLineRate>
						<haltOnFailure>true</haltOnFailure>
					</check>
				</configuration>

				<executions>
					<execution>
						<id>clean-corbertura</id>
						<goals>
							<goal>clean</goal>
						</goals>
					</execution>
					<execution>
						<id>check-corbertura</id>
						<goals>
							<goal>check</goal>
						</goals>
					</execution>
					<execution>
						<id>run-corbertura</id>
						<goals>
							<goal>cobertura</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-checkstyle-plugin</artifactId>
				<version>2.9.1</version>
				<executions>
					<execution>
						<id>checkstyle</id>
						<phase>test</phase>
						<goals>
							<goal>check</goal>
						</goals>
						<configuration>
							<includeTestSourceDirectory>true</includeTestSourceDirectory>
							<configLocation>${project.basedir}/checkstyle.xml</configLocation>
							<failOnViolation>true</failOnViolation>
						</configuration>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>

	<reporting>
		<plugins>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>cobertura-maven-plugin</artifactId>
				<version>2.7</version>
				<configuration>
					<formats>
						<format>html</format>
						<format>xml</format>
					</formats>
				</configuration>
			</plugin>
		</plugins>
	</reporting>
</project>


text:
sudo rm /etc/apt/sources.list.d/webupd8team-ubuntu-java-*
sudo add-apt-repository ppa:webupd8team/java
sudo apt update

# appends to file
echo 'export PATH=$PATH:/usr/local/go/bin' >> ~/.profile
echo 'export PATH=$PATH:$HOME/.cabal/bin' >> ~/.profile

# needed for the next step
sudo apt install curl

# presents options
curl https://sh.rustup.rs -sSf | sh


text:
//
//  IRSendRecLooper.cpp
//
//
//  Created by Larry LeBron on 11/22/14.
//
//

#include "IRSendRecLooper.h"

IRSendRecLooper::IRSendRecLooper(){
	state = STOPPED;
}

// starts a send/rec loop, which pauses between phases, awaiting update - pass in message to send and message to listen for
// msg to send, how often to send (tracked from end of any send)
void IRSendRecLooper::start(IRMessage newSendMsg, long newSendFrequency) {
	sendMsg = newSendMsg;
	sendFrequency = newSendFrequency;
	// start the first send
	send();
	// Initial declaration, capped at size 10. Fixme: make sizing dynamic or import a dynamic container
	recMsgs = new IRMessage[10];
	numRecMsgs = 0;
	lastRecTime = 0;
}

void IRSendRecLooper::setSendMsg(IRMessage newSendMsg) {
	sendMsg = newSendMsg;
}

bool IRSendRecLooper::listeningForMsg(IRMessage msg) {
	for (int i = 0; i < numRecMsgs; i++) {
		if (recMsgs[i] == msg) {
			return true;
		}
	}
	return false;
}

// add a msg to listen to at end of array, if it's a unique addition
void IRSendRecLooper::addRecMsg(IRMessage msg) {
	if (!listeningForMsg(msg)) {
		recMsgs[numRecMsgs] = msg;
		numRecMsgs++;
		Serial.print("Adding rec msg "); Serial.println(msg);
	}
    	for (int i = 0; i < numRecMsgs; i++) {
    			Serial.print("Checking for "); Serial.println(recMsgs[i]);
    	}
}

// add a msg to listen to at end of array
void IRSendRecLooper::deleteRecMsg(IRMessage msg) {
	int indexToDel = -1;

	for (int i = 0; i < numRecMsgs; i++) {
		if (recMsgs[i] == msg) {
			indexToDel = i;
		}
	}

	// Only take action if the value is in the array
	if (indexToDel != -1) {
		// Don't need to do a copy if we're removing the last in the array
		if (indexToDel != (numRecMsgs-1)) {
			// We're removing a mid-array value, need to copy the end val into this slot
			recMsgs[indexToDel] = recMsgs[numRecMsgs-1];
		}

		// Decrement the tracking val
		numRecMsgs--;
	}
}

void IRSendRecLooper::send() {
	state = SENDING;
	Serial.print("sending"); Serial.println(sendMsg);
	//long beforeSend = millis();

	ir.send(sendMsg);

	//long afterSend = millis();
	//Serial.println(afterSend-beforeSend);

	// set end of send time & new state
	endOfSend = millis();

	state = POST_SEND;

	// Could be used to force a receiver re-enable right here. Not sure if this is a good idea.
	//ir.checkMessages();
}

void IRSendRecLooper::check() {
	Serial.println("check");
	state = CHECKING;
    receivedMsg = false;
    // A message has been received, so we'll check for a match
    if (ir.checkMessages()) {
    	long lastMsg = ir.getLastMessage();

		/*Serial.print("Got");
		Serial.println(ir.getLastMessage());
		Serial.print("Converted");Serial.println(lastMsg);
		Serial.print("Listening for num msgs: ");
		Serial.println(numRecMsgs);*/

    	for (int i = 0; i < numRecMsgs; i++) {
    		if (lastMsg == recMsgs[i]) {
    		    Serial.print("Received "); Serial.println(recMsgs[i]);
    		    Serial.print("Time since last "); Serial.println(millis()-lastRecTime);

    		    lastRecTime = millis();

            	receivedMsg = true;
            	lastMessageReceived = lastMsg;
            	break;
            } /*else {
            	Serial.print("It isn't "); Serial.println(recMsgs[i]);

            }*/
    	}
    }

	// set end of check time & new state
	endOfCheck = millis();
	state = POST_CHECK;
}

// update the send/rec loop, which will cause it to initiate the next phase in its progression if it's time
// return receivedMsg, true if a message was received this update
bool IRSendRecLooper::update() {
	// Always reset the msg state at update
	receivedMsg = false;

	// If enough time has passed since send, switch to checking
    if (state == POST_SEND) {
    	long timeSinceSend = millis()-endOfSend;
    	if( timeSinceSend >= POST_IR_SEND_DELAY) {
    		check();
    	}
    } else if (state == POST_CHECK) {
    	// If enough time has passed since last send, send again
    	long timeSinceSend = millis()-endOfSend;
    	if (timeSinceSend >= sendFrequency) {
    		send();
    	} else {
    		// If enough time has passed since last check, check again
    		long timeSinceCheck = millis()-endOfCheck;
			if (timeSinceCheck >= PER_IR_CHECK_DELAY) {
				check();
			}
    	}
    }
    return receivedMsg;
}

// was the message received this update?
bool IRSendRecLooper::wasLastReceivedMsg(IRMessage msg) {
    return lastMessageReceived == msg;
}


text:
<TITLE>Review for Blood Simple (1984)</TITLE>
<LINK REL="STYLESHEET" TYPE="text/css" HREF="/ramr.css">

Blood Simple (1984)

reviewed by
Kevin Patterson

Blood Simple  *** (out of four)
R, 1984
Directed by Joel Coen. Written by Joel and Ethan Coen.
Starring John Getz, Frances McDormand, Dan Hedaya, M. Emmet Walsh.

It might surprise some to know that Joel and Ethan Coen, who have brought such
unabated lunacy to our movie screens as "Raising Arizona"  and "The Hudsucker
Proxy," made their feature film debut with "Blood Simple," a grim and often
gruesome tale of revenge, murder, and literally fatal misconceptions in rural
Texas. It bears some resemblance, story-wise, to the Coens' recent "Fargo,"
but even the darkly satirical humor and the enjoyably quirky characterizations
that characterized that film are scarce here; "Blood Simple" is pretty much
cold and brutal from beginning to end.

The premise of "Blood Simple" is really just a slight variation on the
standard love-triangle/revenge scheme: sleazy bar owner Julian Marty (Dan
Hedaya) hires a shifty private detective (M. Emmet Walsh) to kill his wife
Abby (Frances McDormand) and her illicit lover Ray (John Getz). Things start
to go haywire when Walsh decides instead to fake the murder with photographic
trickery but, upon collecting the money, becomes uncertain as to whether or
not Marty is capable of keeping his mouth shut about the scheme.

To reveal any more details of the story would be to give away too much, but
what ensues is a series of bloody (and I do mean bloody) confrontations, each
triggered by one or more characters misunderstanding what is actually
happening. Every act of violence or deception in this film makes sense when
seen through the perpetrator's eyes, but we, the audience, are made privy to
the "big picture" and thus can recognize that each misdeed is somehow either
unnecessary or directed at the wrong person. This aspect of the story, along
with the intense atmosphere of repulsion and brutality - one gets the sense
that if guns and, in one case, shovels, were not available, some of these
characters would claw each other to death - are the most effective components
of the film. The Coens might have done well to title the film "Fear and
Loathing in Texas."

Some have labeled "Blood Simple  as a modern-day noir, but, while I am not an
expert on either genre, it seems more like a horror movie than anything else.
The Coens seem much more interested in the plot twists and the atmosphere of
confusion and paranoia than they do in the characters, and the final sequence
is nothing more than a showdown between the one (relatively) innocent
character and the only one of the murderers left alive. That said, "Blood
Simple" is a very good horror movie; the fear and suspense here are genuine.
The Coens also add plenty of quirky touches that nudge the weirdness meter
upwards, such as when a character enters an empty room and accidentally steps
on a gun, discharging it as it skitters across the floor, or when a murder
attempt unfolds in a way such that Abby mistakes her attacker for another
character who has in fact been killed earlier in the film.

That said, "Blood Simple" is not exactly flawless. For one thing, the
motivations for the killings are still a little thin at times; I can
understand that the characters had tracks to cover (or at least thought they
did), but I found it a little hard to accept that all of them would so quickly
resort to murder. And although they at least didnÕt have anyone get hacked to
death with a knife, the Coens also aren't quite immune to horror cliches; they
indulge in a prolonged
dead-guy-seems-to-have-come-back-to-life-but-then-we-find-out-it's-only-a-dream
scene that had me rolling my eyes. The film also ends so quickly after the
final confrontation that I found myself wondering if they had simply run out
of film.

"Blood Simple" is not quite the masterpiece of neo-noir that many seem to
think it is, but it's a decent movie and it showcases the Coens' ability to
handle suspense and violence in a visceral but non-exploitative manner. I
would firmly recommend it to all "Coen-heads" as well as anyone looking for
something original in a thriller.

- - - - - -
Visit my Film Reviews Page:
http://members.aol.com/KTPattersn/reviews.html

The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).

The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.

Please direct comments/criticisms of the review to relevant newsgroups.

Broken URLs inthe reviews are the responsibility of the author.

The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.

Related links: index of all rec.arts.movies.reviews reviews


text:
'use strict';

// Modules
var express       = require('express');
var path          = require('path');
var fs            = require('fs');
var favicon       = require('serve-favicon');
var logger        = require('morgan');
var cookie_parser = require('cookie-parser');
var body_parser   = require('body-parser');
var _s            = require('underscore.string');
var moment        = require('moment');
var marked        = require('marked');
var validator     = require('validator');
var extend        = require('extend');
var hogan         = require('hogan-express');
var basic_auth    = require('basic-auth-connect');
var session       = require('express-session');
var raneto        = require('raneto-core');

function initialize (config) {

  // New Express App
  var app = express();

  // Setup Port
  app.set('port', process.env.PORT || 3000);

  // Setup Views
  if (!config.theme_dir)  { config.theme_dir  = path.join(__dirname, '..', 'themes'); }
  if (!config.theme_name) { config.theme_name = 'default'; }
  app.set('views', path.join(config.theme_dir, config.theme_name, 'templates'));
  app.set('layout', 'layout');
  app.set('view engine', 'html');
  app.enable('view cache');
  app.engine('html', hogan);

  // Setup Express
  app.use(favicon(config.public_dir + '/favicon.ico'));
  app.use(logger('dev'));
  app.use(body_parser.json());
  app.use(body_parser.urlencoded({ extended : false }));
  app.use(cookie_parser());
  app.use(express.static(config.public_dir));

  // Setup config
  extend(raneto.config, config);

  // HTTP Basic Authentication
  if (config.authentication === true) {
    app.use(session(
      {
        secret: "changeme",
        name: "raneto.sid",
        resave: false,
        saveUninitialized: false
      }
    ));

    app.post('/rn-login', function (req, res, next) {
      if(req.param('username') === config.credentials.username
        && req.param('password') === config.credentials.password)
      {
        req.session.loggedIn = true;
        res.json({
          status  : 1,
          message : 'Login Successful'
        });
      } else {
        res.json({
          status  : 0,
          message : 'Invalid Username/Password Combination'
        });
      }
    });

    app.get("/login", function(req, res, next){
      return res.render('login', {
        layout : null
      });
    });
    app.get("/logout", function(req, res, next){
      req.session.loggedIn = false;
      res.redirect("/login");

    });
  }

  // Online Editor Routes
  if (config.allow_editing === true) {

    app.post('/rn-edit', function (req, res, next) {
      var filePath = path.normalize(raneto.config.content_dir + req.body.file);
      if (!fs.existsSync(filePath)) { filePath += '.md'; }
      fs.writeFile(filePath, req.body.content, function (err) {
        if (err) {
          console.log(err);
          return res.json({
            status  : 1,
            message : err
          });
        }
        res.json({
          status  : 0,
          message : 'Page Saved'
        });
      });
    });

    app.post('/rn-delete', function (req, res, next) {
      var filePath = path.normalize(raneto.config.content_dir + req.body.file);
      if (!fs.existsSync(filePath)) { filePath += '.md'; }
      fs.rename(filePath, filePath + '.del', function (err) {
        if (err) {
          console.log(err);
          return res.json({
            status: 1,
            message: err
          });
        }
        res.json({
          status: 0,
          message: 'Page Deleted'
        });
      });
    });

    app.post('/rn-add-category', function (req, res, next) {
      var filePath = path.normalize(raneto.config.content_dir + req.body.category);
      fs.mkdir(filePath, function (err) {
        if (err) {
          console.log(err);
          return res.json({
            status  : 1,
            message : err
          });
        }
        res.json({
          status  : 0,
          message : 'Category Created'
        });
      });
    });

    app.post('/rn-add-page', function (req, res, next) {
      var filePath = path.normalize(raneto.config.content_dir + (!!req.body.category ? req.body.category + '/' : '') + req.body.name + '.md');
      fs.open(filePath, 'a', function (err, fd) {
        fs.close(fd);
        if (err) {
          console.log(err);
          return res.json({
            status  : 1,
            message : err
          });
        }
        res.json({
          status  : 0,
          message : 'Page Created'
        });
      });
    });

  }

  // Router for / and /index with or without search parameter
  app.get("/:var(index)?", function(req, res, next){
    if (config.authentication === true && !req.session.loggedIn) {
      res.redirect("/login");
      return;
    }
    if (req.query.search) {

      var searchQuery    = validator.toString(validator.escape(_s.stripTags(req.query.search))).trim();
      var searchResults  = raneto.doSearch(searchQuery);
      var pageListSearch = raneto.getPages('');

      return res.render('search', {
        config: config,
        pages: pageListSearch,
        search: searchQuery,
        searchResults: searchResults,
        body_class: 'page-search'
      });

    } else {
      var suffix = 'edit';
      var slug = req.params[0];
      if (slug === '/') { slug = '/index'; }

      var pageList     = raneto.getPages(slug);
      var filePath     = path.normalize(raneto.config.content_dir + slug);
      var filePathOrig = filePath;

      if (filePath.indexOf(suffix, filePath.length - suffix.length) !== -1) {
        filePath = filePath.slice(0, - suffix.length - 1);
      }
      var stat = fs.lstatSync(path.join(config.theme_dir, config.theme_name, 'templates', 'home.html'));

      return res.render('home', {
        config        : config,
        pages         : pageList,
        body_class    : 'page-home',
        last_modified : moment(stat.mtime).format('Do MMM YYYY')
      });
    }
  });

  app.get(/^([^.]*)/, function (req, res, next) {
    if (config.authentication === true && !req.session.loggedIn) {
      res.redirect("/login");
      return;
    }
    var suffix = 'edit';

     if (req.params[0]) {

      var slug = req.params[0];

      var pageList     = raneto.getPages(slug);
      var filePath     = path.normalize(raneto.config.content_dir + slug);
      var filePathOrig = filePath;

      if (filePath.indexOf(suffix, filePath.length - suffix.length) !== -1) {
        filePath = filePath.slice(0, - suffix.length - 1);
      }
      if (!fs.existsSync(filePath)) { filePath += '.md'; }

      if (filePathOrig.indexOf(suffix, filePathOrig.length - suffix.length) !== -1) {

        fs.readFile(filePath, 'utf8', function (err, content) {
          if (err) {
            err.status = '404';
            err.message = 'Whoops. Looks like this page doesn\'t exist.';
            return next(err);
          }

          if (path.extname(filePath) === '.md') {

            // File info
            var stat = fs.lstatSync(filePath);
            // Meta
            var meta = raneto.processMeta(content);
            content = raneto.stripMeta(content);
            if (!meta.title) { meta.title = raneto.slugToTitle(filePath); }

            // Content
            content      = raneto.processVars(content);
            var html     = content;
            var template = meta.template || 'page';

            return res.render('edit', {
              config: config,
              pages: pageList,
              meta: meta,
              content: html,
              body_class: template + '-' + raneto.cleanString(slug),
              last_modified: moment(stat.mtime).format('Do MMM YYYY')
            });

          }
        });

      } else {

        fs.readFile(filePath, 'utf8', function (err, content) {

          if (err) {
            err.status = '404';
            err.message = 'Whoops. Looks like this page doesn\'t exist.';
            return next(err);
          }

          // Process Markdown files
          if (path.extname(filePath) === '.md') {

            // File info
            var stat = fs.lstatSync(filePath);

            // Meta
            var meta = raneto.processMeta(content);
            content = raneto.stripMeta(content);
            if (!meta.title) { meta.title = raneto.slugToTitle(filePath); }

            // Content
            content = raneto.processVars(content);
            // BEGIN: DISPLAY, NOT EDIT
            marked.setOptions({
              langPrefix: ''
            });
            var html = marked(content);
            // END: DISPLAY, NOT EDIT
            var template = meta.template || 'page';

            return res.render(template, {
              config: config,
              pages: pageList,
              meta: meta,
              content: html,
              body_class: template + '-' + raneto.cleanString(slug),
              last_modified: moment(stat.mtime).format('Do MMM YYYY')
            });

          }
        });
      }
    } else {
      next();
    }
  });

  // Error-Handling Middleware
  app.use(function (err, req, res, next) {
    res.status(err.status || 500);
    res.render('error', {
      config     : config,
      status     : err.status,
      message    : err.message,
      error      : {},
      body_class : 'page-error'
    });
  });

  return app;

}

// Exports
module.exports = initialize;


text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Dila</title>
    <link href="{{ static_url('vendor/css/bootstrap.min.css') }}" rel="stylesheet">

          <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
            Toggle navigation

          </button>

                    {{ current_user.first_name }} {{ current_user.last_name }}

                  <form method="post" action="{{ url_for('authenticate.logout') }}">
                    <input type="submit" id="logout" class="btn btn-info btn-lg center-block" value="Logout">
                  </form>

                    {% if not languages_links %}
                        There are no languages.
                    {% elif current_language %}
                        Language: {{ current_language }}.
                    {% else %}
                        Select language.
                    {% endif %}

                        {% for name, link in languages_links %}
                            {{ name }}
                        {% endfor %}
                        <button id="addLanguageButton" class="btn btn-info btn-lg center-block" data-toggle="modal" data-target="#addLanguage">
                            Add language
                        </button>

                    Select resource

                    <button type="button" class="close" data-dismiss="modal">×</button>

New language.

                    <form method="POST" action="{{ url_for('main.add_language') }}" enctype=multipart/form-data>
                        {{ languages_form.csrf_token }}
                        {{ languages_form.next }}

                            {{ languages_form.new_language_name.label }} {{ languages_form.new_language_name(class_="form-control") }}

                            {{ languages_form.new_language_short.label }} {{ languages_form.new_language_short(class_="form-control") }}

                        <input id="add_new_language" value="Add" type="submit">
                    </form>

      {% with messages = get_flashed_messages() %}
        {% if messages %}

          {% for message in messages %}

{{ message }}

          {% endfor %}

        {% endif %}
      {% endwith %}

      {% block body %}{% endblock %}


text:
<?php

/* BundleProjectBundle:Places:infoPlaces.html.twig */
class __TwigTemplate_ee44a970987c24bdb9b03a052efe237a extends Twig_Template
{
    public function __construct(Twig_Environment $env)
    {
        parent::__construct($env);

        $this->parent = $this->env->loadTemplate("BundleProjectBundle::layout.html.twig");

        $this->blocks = array(
            'title' => array($this, 'block_title'),
            'body' => array($this, 'block_body'),
            'sidebar' => array($this, 'block_sidebar'),
            'javascript' => array($this, 'block_javascript'),
        );
    }

    protected function doGetParent(array $context)
    {
        return "BundleProjectBundle::layout.html.twig";
    }

    protected function doDisplay(array $context, array $blocks = array())
    {
        $this->parent->display($context, array_merge($this->blocks, $blocks));
    }

    // line 4
    public function block_title($context, array $blocks = array())
    {
        echo " InfoStore ";
    }

    // line 6
    public function block_body($context, array $blocks = array())
    {
        // line 7
        echo "

        <hgroup>

Info store

<big>Coffe, Restaurants, Gym, etc. places near Cluj-N.</big>

Query found ";
        // line 11
        echo twig_escape_filter($this->env, (isset($context["placesCount"]) ? $context["placesCount"] : $this->getContext($context, "placesCount")), "html", null, true);
        echo " places.

        </hgroup>

        ";
        // line 15
        $context['_parent'] = (array) $context;
        $context['_seq'] = twig_ensure_traversable((isset($context["places"]) ? $context["places"] : $this->getContext($context, "places")));
        foreach ($context['_seq'] as $context["_key"] => $context["place"]) {
            // line 16
            echo "

Place id: ";
            // line 17
            echo twig_escape_filter($this->env, $this->getAttribute((isset($context["place"]) ? $context["place"] : $this->getContext($context, "place")), "id"), "html", null, true);
            echo "

            env, $this->env->getExtension('routing')->getPath("BundleProjectBundle_places_showPlace", array("id" => $this->getAttribute((isset($context["place"]) ? $context["place"] : $this->getContext($context, "place")), "id"))), "html", null, true);
            echo "\"/>";
            echo twig_escape_filter($this->env, $this->getAttribute((isset($context["place"]) ? $context["place"] : $this->getContext($context, "place")), "name"), "html", null, true);
            echo "

                env, $this->getAttribute((isset($context["place"]) ? $context["place"] : $this->getContext($context, "place")), "icon"), "html", null, true);
            echo "\" target=\"_blank\" title=\"";
            echo twig_escape_filter($this->env, $this->getAttribute((isset($context["place"]) ? $context["place"] : $this->getContext($context, "place")), "name"), "html", null, true);
            echo "\">
                    env, $this->getAttribute((isset($context["place"]) ? $context["place"] : $this->getContext($context, "place")), "icon"), "html", null, true);
            echo "\"/>

";
            // line 24
            echo twig_escape_filter($this->env, $this->getAttribute((isset($context["place"]) ? $context["place"] : $this->getContext($context, "place")), "name"), "html", null, true);
            echo "

Type:  ";
            // line 25
            echo twig_escape_filter($this->env, $this->getAttribute((isset($context["place"]) ? $context["place"] : $this->getContext($context, "place")), "type"), "html", null, true);
            echo "

Addr:  ";
            // line 26
            echo twig_escape_filter($this->env, $this->getAttribute((isset($context["place"]) ? $context["place"] : $this->getContext($context, "place")), "vicinity"), "html", null, true);
            echo "

Geo Location: Lat. ";
            // line 27
            echo twig_escape_filter($this->env, $this->getAttribute((isset($context["place"]) ? $context["place"] : $this->getContext($context, "place")), "lat"), "html", null, true);
            echo ". Lng.";
            echo twig_escape_filter($this->env, $this->getAttribute((isset($context["place"]) ? $context["place"] : $this->getContext($context, "place")), "lng"), "html", null, true);
            echo ".

            ";
            // line 28
            if ((twig_length_filter($this->env, $this->getAttribute((isset($context["place"]) ? $context["place"] : $this->getContext($context, "place")), "rating")) != 0)) {
                // line 29
                echo "
Ratings: ";
                echo twig_escape_filter($this->env, $this->getAttribute((isset($context["place"]) ? $context["place"] : $this->getContext($context, "place")), "rating"), "html", null, true);
                echo " / 5 points.

            ";
            } else {
                // line 31
                echo "
Ratings:  No ratings available for this store.

            ";
            }
            // line 33
            echo "

        ";
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_iterated'], $context['_key'], $context['place'], $context['_parent'], $context['loop']);
        $context = array_intersect_key($context, $_parent) + $_parent;
        // line 35
        echo "            <button id=\"loadmore\" style=\"padding:10px; border: 2px solid black; border-radius: 5px; background: #6d6; font-weight: bold; width:450px; margin-bottom: 10px\">Load more stores</button>

End of page !

";
    }

    // line 41
    public function block_sidebar($context, array $blocks = array())
    {
        // line 42
        echo "

    <hgroup>

Search by rating or type

Enter a rating. For example: 4.5

Enter a type. For example: cafe

    </hgroup>
        ";
        // line 54
        echo "
    <form action=\"";
        // line 55
        echo $this->env->getExtension('routing')->getPath("BundleProjectBundle_search");
        echo "\" method=\"post\">
        <input type=\"text\" name=\"input\" style=\"padding:3px; width:80px\" />
        ";
        // line 58
        echo "        <button class=\"button\" type=\"submit\" style=\"padding: 5px; border-radius:5px; width:80px\">Search</button>
    </form>

    <hgroup>

Side bar title

Side bar subtitle

    </hgroup>

Side bar content

";
    }

    // line 71
    public function block_javascript($context, array $blocks = array())
    {
        // line 72
        echo "
";
    }

    public function getTemplateName()
    {
        return "BundleProjectBundle:Places:infoPlaces.html.twig";
    }

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  165 => 72,  162 => 71,  147 => 58,  142 => 55,  139 => 54,  131 => 42,  128 => 41,  120 => 35,  113 => 33,  109 => 31,  103 => 29,  101 => 28,  95 => 27,  91 => 26,  87 => 25,  83 => 24,  77 => 21,  71 => 20,  64 => 18,  60 => 17,  57 => 16,  53 => 15,  46 => 11,  40 => 7,  37 => 6,  31 => 4,);
    }
}


text: module.exports = require('../../es/array/includes');


text:
layout: relation
title: 'advmod:mmod'
shortdef: 'advmod with modal modality'
udver: '2'
---

The _advmod:mmod_ relation is used for adverbal modal modifiers.

~~~ sdparse
Лётчикне, улема, кядьса токсесазь коволнятнень. \n The pilots, it would seem, touch the little clouds with their hands.
advmod:mmod(токсесазь, улема)

~~~

<!-- Interlanguage links updated Po lis 14 15:35:07 CET 2022 -->


text:
package me.riddhimanadib.formmaster.model;

import java.text.SimpleDateFormat;
import java.util.Locale;

/**
 * Created by Riddhi - Rudra on 28-Jul-17.
 */

public class FormElementPickerTime extends BaseFormElement {

    private String timeFormat; // custom format for date

    public FormElementPickerTime() {
    }

    public static FormElementPickerTime createInstance() {
        FormElementPickerTime formElementPickerTime = new FormElementPickerTime();
        formElementPickerTime.setType(BaseFormElement.TYPE_PICKER_TIME);
        formElementPickerTime.setTimeFormat("KK:mm a");
        return formElementPickerTime;
    }

    public FormElementPickerTime setTag(int mTag) {
        return (FormElementPickerTime)  super.setTag(mTag);
    }

    public FormElementPickerTime setType(int mType) {
        return (FormElementPickerTime)  super.setType(mType);
    }

    public FormElementPickerTime setTitle(String mTitle) {
        return (FormElementPickerTime)  super.setTitle(mTitle);
    }

    public FormElementPickerTime setValue(String mValue) {
        return (FormElementPickerTime)  super.setValue(mValue);
    }

    public FormElementPickerTime setHint(String mHint) {
        return (FormElementPickerTime)  super.setHint(mHint);
    }

    public FormElementPickerTime setRequired(boolean required) {
        return (FormElementPickerTime)  super.setRequired(required);
    }

    // custom setter
    public FormElementPickerTime setTimeFormat(String format) {
        checkValidTimeFormat(format);
        this.timeFormat = format;
        return this;
    }

    // custom getter
    public String getTimeFormat() {
        return this.timeFormat;
    }

    private void checkValidTimeFormat(String format) {
        try {
            new SimpleDateFormat(format, Locale.US);
        } catch (IllegalArgumentException e) {
            throw new RuntimeException("Time format is not correct: " + e.getMessage());
        }
    }

}


text:
These are some slides for teaching a beginner's class on Hackety Hack.

You can show the presentation
[online](http://wasnotrice.github.com/class-hh-1/), or locally:

    $ open slides/slides.html

## Hacking

Here's what you need to know to hack on this presentation.

1. It is written in Markdown
2. You compile it with Pandoc
3. It compiles to a DZSlides presentation


text:
if Rails.env.production?
  CarrierWave.configure do |config|
    config.storage = :s3
    config.s3_access_key_id = ENV["S3_ACCESS_KEY_ID"]
    config.s3_secret_access_key = ENV["S3_SECRET_ACCESS_KEY"]
    config.s3_bucket = ENV["S3_BUCKET"]
    config.cache_dir = File.join(Rails.root, "tmp/uploads")
  end
else
  CarrierWave.configure do |config|
    config.storage = :file
    config.enable_processing = false
  end
end


text:
<?php

namespace OpenCFP\Console\Command;

use OpenCFP\Console\BaseCommand;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;

class ClearCacheCommand extends BaseCommand
{
    protected function configure()
    {
        $this
            ->setName('cache:clear')
            ->setDescription('Clears the caches');
    }

    public function execute(InputInterface $input, OutputInterface $output)
    {
        $output->writeln('Clearing all caches...');

        $paths = [
            $this->app->cachePurifierPath(),
            $this->app->cacheTwigPath(),
        ];

        array_walk($paths, function ($path) use ($output) {
            $output->writeln(sprintf('  <info>✓</info> %s', $path));
            passthru(sprintf('rm -rf %s/*', $path));
        });

        $output->writeln('Done!');
    }
}


text:
package com.intellij.featureStatistics;

public final class ProductivityFeatureNames {
  public static final String CODEASSISTS_HIGHLIGHT_RETURN = "codeassists.highlight.return";
  public static final String REFACTORING_INTRODUCE_VARIABLE = "refactoring.introduceVariable";
  public static final String CODEASSISTS_OVERRIDE_IMPLEMENT = "codeassists.overrideimplement";

  private ProductivityFeatureNames() {
  }
}


text:
license: Licensed to the Apache Software Foundation (ASF) under one
         or more contributor license agreements.  See the NOTICE file
         distributed with this work for additional information
         regarding copyright ownership.  The ASF licenses this file
         to you 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.
---

# globalization.stringToNumber

Parses a number formatted as a string according to the client's user
preferences and returns the corresponding number.

    navigator.globalization.stringToNumber(string, successCallback, errorCallback, options);

## Description

Returns the number to the `successCallback` with a `properties` object
as a parameter. That object should have a `value` property with a
`Number` value.

If there is an error parsing the number string, then the
`errorCallback` executes with a `GlobalizationError` object as a
parameter. The error's expected code is
`GlobalizationError.PARSING\_ERROR`.

The `options` parameter is optional, and defaults to the following
values:

    {type:'decimal'}

The `options.type` can be `decimal`, `percent`, or `currency`.

## Supported Platforms

- Amazon Fire OS
- Android
- iOS
- Windows Phone 8

## Quick Example

When the browser is set to the `en\_US` locale, this should display a
popup dialog with text similar to `number: 1234.56`:

    navigator.globalization.stringToNumber(
        '1234.56',
        function (number) {alert('number: ' + number.value + '\n');},
        function () {alert('Error getting number\n');},
        {type:'decimal'}
    );

## Full Example

    <!DOCTYPE HTML>
    <html>
      <head>
        <title>stringToNumber Example</title>
        <script type="text/javascript" charset="utf-8" src="cordova.js"></script>
        <script type="text/javascript" charset="utf-8">

        function checkNumber() {
          navigator.globalization.stringToNumber(
            '1234.56',
            function (number) {alert('number: ' + number.value + '\n');},
            function () {alert('Error getting number\n');},
            {type:'decimal'}
          );
        }

        </script>
      </head>
      <body>
        <button onclick="checkNumber()">Click for parsed number</button>
      </body>
    </html>


text:
class dtkWindowingFilterNodePrivate
{
public:
    dtkComposerTransmitterReceiver<double>     minimumIntensityValueRecv;
    dtkComposerTransmitterReceiver<double>     maximumIntensityValueRecv;
    dtkComposerTransmitterReceiver<double>     minimumOutputIntensityValueRecv;
    dtkComposerTransmitterReceiver<double>     maximumOutputIntensityValue;
    dtkComposerTransmitterReceiver<dtkImage *> imgRecv;

    dtkComposerTransmitterEmitter<dtkImage *>  imgEmt;
};

// /////////////////////////////////////////////////////////////////
// dtkWindowingFilterNode
// /////////////////////////////////////////////////////////////////

dtkWindowingFilterNode::dtkWindowingFilterNode(void) : dtkComposerNodeObject<dtkAbstractWindowingFilter>(), d(new dtkWindowingFilterNodePrivate())
{
    this->setFactory(dtkImaging::filters::windowing::pluginFactory());

    this->appendReceiver(&d->minimumIntensityValueRecv);
    this->appendReceiver(&d->maximumIntensityValueRecv);
    this->appendReceiver(&d->minimumOutputIntensityValueRecv);
    this->appendReceiver(&d->maximumOutputIntensityValue);
    this->appendReceiver(&d->imgRecv);

    this->appendEmitter (&d->imgEmt);
}

dtkWindowingFilterNode::~dtkWindowingFilterNode(void)
{
    delete d;
}

void dtkWindowingFilterNode::run(void)
{
    if (d->imgRecv.isEmpty() || d->minimumIntensityValueRecv.isEmpty()
                             || d->maximumIntensityValueRecv.isEmpty()
                             || d->minimumOutputIntensityValueRecv.isEmpty()
                             || d->maximumOutputIntensityValue.isEmpty()) {
        dtkError() << Q_FUNC_INFO << "The input is not set. Aborting.";
        return;

    } else {

        dtkAbstractWindowingFilter *filter = this->object();
        if (!filter) {
            dtkError() << Q_FUNC_INFO << "No Windowing filter found. Aborting.";
            return;
        }

        filter->setMinimumIntensityValue(d->minimumIntensityValueRecv.data());
        filter->setMaximumIntensityValue(d->maximumIntensityValueRecv.data());
        filter->setMaximumOutputIntensityValue(d->minimumOutputIntensityValueRecv.data());
        filter->setMinimumOutputIntensityValue(d->maximumOutputIntensityValue.data());

        filter->setImage(d->imgRecv.data());
        filter->run();
        d->imgEmt.setData(filter->filteredImage());
    }
}

//
// dtkWindowingFilterNode.cpp ends here


text:
.class Lcom/mediatek/bluetooth/pan/BluetoothPanService$2;
.super Lcom/mediatek/bluetooth/pan/IBluetoothPanAction$Stub;
.source "BluetoothPanService.java"

# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/mediatek/bluetooth/pan/BluetoothPanService;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation

# instance fields
.field final synthetic this$0:Lcom/mediatek/bluetooth/pan/BluetoothPanService;

# direct methods
.method constructor <init>(Lcom/mediatek/bluetooth/pan/BluetoothPanService;)V
    .locals 0
    .parameter

    .prologue
    .line 384
    iput-object p1, p0, Lcom/mediatek/bluetooth/pan/BluetoothPanService$2;->this$0:Lcom/mediatek/bluetooth/pan/BluetoothPanService;

    invoke-direct {p0}, Lcom/mediatek/bluetooth/pan/IBluetoothPanAction$Stub;-><init>()V

    return-void
.end method

# virtual methods
.method public authorizeRspAction(Ljava/lang/String;Z)V
    .locals 2
    .parameter "btAddr"
    .parameter "result"

    .prologue
    .line 396
    const-string v0, "[BT][PAN][BluetoothPANService]"

    const-string v1, "authorizeRspAction"

    invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 398
    iget-object v0, p0, Lcom/mediatek/bluetooth/pan/BluetoothPanService$2;->this$0:Lcom/mediatek/bluetooth/pan/BluetoothPanService;

    invoke-virtual {v0, p1, p2}, Lcom/mediatek/bluetooth/pan/BluetoothPanService;->authorizeRsp(Ljava/lang/String;Z)V

    .line 399
    return-void
.end method

.method public disconnectPanDeviceAction(Ljava/lang/String;)V
    .locals 2
    .parameter "btAddr"

    .prologue
    .line 388
    const-string v0, "[BT][PAN][BluetoothPANService]"

    const-string v1, "disconnectPanDeviceAction: "

    invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 390
    iget-object v0, p0, Lcom/mediatek/bluetooth/pan/BluetoothPanService$2;->this$0:Lcom/mediatek/bluetooth/pan/BluetoothPanService;

    invoke-virtual {v0, p1}, Lcom/mediatek/bluetooth/pan/BluetoothPanService;->disconnectPanDevice(Ljava/lang/String;)V

    .line 391
    return-void
.end method


text:
"use strict";
function __export(m) {
    for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
__export(require("./resolvers/active-context.resolver"));


text:
FROM ubuntu-upstart

MAINTAINER "Duc Anh Babim" <ducanh.babim@yahoo.com>

RUN rm -f /etc/motd && \
    echo "---" > /etc/motd && \
    echo "Support by Duc Anh Babim. Contact: ducanh.babim@yahoo.com" >> /etc/motd && \
    echo "---" >> /etc/motd && \
    touch "/(C) Babim"

## Enable Ubuntu Universe and Multiverse.
RUN sed -i 's/^#\s*\(deb.*universe\)$/\1/g' /etc/apt/sources.list
RUN sed -i 's/^#\s*\(deb.*multiverse\)$/\1/g' /etc/apt/sources.list

RUN apt-get clean && \
    apt-get update && \
    apt-get install locales wget nano -y

    ## Fix locale.
RUN dpkg-reconfigure locales && \
    locale-gen en_US.UTF-8 && \
	update-locale LANG=en_US.UTF-8 LC_CTYPE=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8

RUN apt-get clean && \
    apt-get autoclean && \
    apt-get autoremove

# Set environment variables.
ENV HOME /root
ENV LC_ALL en_US.UTF-8
ENV TZ Asia/Ho_Chi_Minh
# Define working directory.
WORKDIR /root


text:
#ifndef _LINUX_NCP_FS_H
#define _LINUX_NCP_FS_H
#include <linux/fs.h>
#include <linux/in.h>
#include <linux/types.h>
#include <linux/magic.h>
#include <linux/ipx.h>
#include <linux/ncp_no.h>
struct ncp_ioctl_request {
  unsigned int function;
  unsigned int size;
  char __user * data;
};
struct ncp_fs_info {
  int version;
  struct sockaddr_ipx addr;
  __kernel_uid_t mounted_uid;
  int connection;
  int buffer_size;
  int volume_number;
  __le32 directory_id;
};
struct ncp_fs_info_v2 {
  int version;
  unsigned long mounted_uid;
  unsigned int connection;
  unsigned int buffer_size;
  unsigned int volume_number;
  __le32 directory_id;
  __u32 dummy1;
  __u32 dummy2;
  __u32 dummy3;
};
struct ncp_sign_init {
  char sign_root[8];
  char sign_last[16];
};
struct ncp_lock_ioctl {
#define NCP_LOCK_LOG 0
#define NCP_LOCK_SH 1
#define NCP_LOCK_EX 2
#define NCP_LOCK_CLEAR 256
  int cmd;
  int origin;
  unsigned int offset;
  unsigned int length;
#define NCP_LOCK_DEFAULT_TIMEOUT 18
#define NCP_LOCK_MAX_TIMEOUT 180
  int timeout;
};
struct ncp_setroot_ioctl {
  int volNumber;
  int namespace;
  __le32 dirEntNum;
};
struct ncp_objectname_ioctl {
#define NCP_AUTH_NONE 0x00
#define NCP_AUTH_BIND 0x31
#define NCP_AUTH_NDS 0x32
  int auth_type;
  size_t object_name_len;
  void __user * object_name;
};
struct ncp_privatedata_ioctl {
  size_t len;
  void __user * data;
};
#define NCP_IOCSNAME_LEN 20
struct ncp_nls_ioctl {
  unsigned char codepage[NCP_IOCSNAME_LEN + 1];
  unsigned char iocharset[NCP_IOCSNAME_LEN + 1];
};
#define NCP_IOC_NCPREQUEST _IOR('n', 1, struct ncp_ioctl_request)
#define NCP_IOC_GETMOUNTUID _IOW('n', 2, __kernel_old_uid_t)
#define NCP_IOC_GETMOUNTUID2 _IOW('n', 2, unsigned long)
#define NCP_IOC_CONN_LOGGED_IN _IO('n', 3)
#define NCP_GET_FS_INFO_VERSION (1)
#define NCP_IOC_GET_FS_INFO _IOWR('n', 4, struct ncp_fs_info)
#define NCP_GET_FS_INFO_VERSION_V2 (2)
#define NCP_IOC_GET_FS_INFO_V2 _IOWR('n', 4, struct ncp_fs_info_v2)
#define NCP_IOC_SIGN_INIT _IOR('n', 5, struct ncp_sign_init)
#define NCP_IOC_SIGN_WANTED _IOR('n', 6, int)
#define NCP_IOC_SET_SIGN_WANTED _IOW('n', 6, int)
#define NCP_IOC_LOCKUNLOCK _IOR('n', 7, struct ncp_lock_ioctl)
#define NCP_IOC_GETROOT _IOW('n', 8, struct ncp_setroot_ioctl)
#define NCP_IOC_SETROOT _IOR('n', 8, struct ncp_setroot_ioctl)
#define NCP_IOC_GETOBJECTNAME _IOWR('n', 9, struct ncp_objectname_ioctl)
#define NCP_IOC_SETOBJECTNAME _IOR('n', 9, struct ncp_objectname_ioctl)
#define NCP_IOC_GETPRIVATEDATA _IOWR('n', 10, struct ncp_privatedata_ioctl)
#define NCP_IOC_SETPRIVATEDATA _IOR('n', 10, struct ncp_privatedata_ioctl)
#define NCP_IOC_GETCHARSETS _IOWR('n', 11, struct ncp_nls_ioctl)
#define NCP_IOC_SETCHARSETS _IOR('n', 11, struct ncp_nls_ioctl)
#define NCP_IOC_GETDENTRYTTL _IOW('n', 12, __u32)
#define NCP_IOC_SETDENTRYTTL _IOR('n', 12, __u32)
#define NCP_PACKET_SIZE 4070
#define NCP_MAXPATHLEN 255
#define NCP_MAXNAMELEN 14
#endif


text:
var reconnect = require('../../tls')
var tls       = require('tls')
var fs        = require('fs')

var port = 6789
var sOpts = {
  key               : fs.readFileSync('certs/agent1-key.pem'),
  cert              : fs.readFileSync('certs/agent1-cert.pem'),
  ca                : fs.readFileSync('certs/ca1-cert.pem'),
  requestCert       : true,
  rejectUnauthorized: false
}
var server = tls.createServer(sOpts, function (stream) {

  console.log('server connected', stream.authorized ? 'authorized' : 'unauthorized');
  console.log(stream.authorizationError);
  //console.log('request from: ' + stream.getPeerCertificate().subject.CN);
  console.dir(stream.getPeerCertificate());

  stream.write(new Date() + '\n')

    var i = 0
    stream
      .on('data', function (data) {
        console.log('ping', data.toString())
        stream.write(new Date() + '\n')
        if(i++ > 3) stream.destroy(), console.log('hang up on client')
      })

}).listen(port)

server.on('clientError', function (err) {
  console.log(err)
})

var cOpts = {
  host: 'localhost',
  port: '6789',
  path: '/test',
  method: 'GET',
  key               : fs.readFileSync('certs/agent3-key.pem'),
  cert              : fs.readFileSync('certs/agent3-cert.pem'),
  ca                : fs.readFileSync('certs/ca2-cert.pem'),
  requestCert: true,
  rejectUnauthorized: false
};

reconnect(function (stream) {

  console.log('client connected',
              stream.authorized ? 'authorized' : 'unauthorized');
  console.log(stream.authorizationError);
  console.dir(stream.getPeerCertificate());

  var int = setInterval(function () {
    stream.write(new Date() + '\n')
  }, 1000)

  stream
    .on('data', function (data) {
      console.log('pong', data.toString())
    })
    .on('close', function () {
      console.log('disconnect')
      clearInterval(int)
    })
}).connect(cOpts);


text:
namespace IronFoundry.Warden.Protocol
{
    public partial class StreamRequest : Request, IContainerRequest
    {
    }
}


text:
val* NEW_standard__Sys(const struct type* type);
extern const struct type type_standard__Sys;
#define COLOR_standard__kernel__Object__init 7
#define COLOR_standard__kernel__Sys__run 33
#define COLOR_standard__gc__Finalizable__finalize 32


text:
*NOTE: Riak 2.1.1 has replaced Riak 2.1.0*

## Fixes
Riak 2.1.0 introduced a bug that has been fixed in Riak 2.1.1. The default configuration for handoff.ip caused vnodes marked for transfer during handoff to be removed without transferring data to their new destination nodes. A mandatory change to configuration (riak.conf) mitigates this issue for 2.1.0 users. While not all users were impacted by this issue, we recommend that all 2.1.0 users upgrade to 2.1.1.

Detailed information on the issue is available in the Basho Documentation [Product Advisories](http://docs.basho.com/riak/latest/community/product-advisories/210-dataloss/).

* Make default `handoff_ip` value 0.0.0.0 in vars.config.
  * [riak/pull/734](https://github.com/basho/riak/pull/734)

# Riak 2.1.0 Release Notes

## New Features

### Performance Improvements

The introduction of write-once buckets allows users to experience up to a 2x performance improvement for write-heavy, write-once workloads.  More details on implementing write-once buckets are available below.

### Write-Once Bucket Type

Riak 2.1.0 introduces the concept of write-once buckets, buckets whose entries are intended to be written exactly once and never updated or overwritten. Since objects are intended to only be written once, Riak does not perform the usual "get, merge, update" cycle which reduces IOPs and improves throughput and latency.

It is still possible for multiple entries to be written to a single key -- through mis-use of the API, network partitions, simultaneous writes, etc.. In these cases, Riak will always resolve siblings using an algorithm based on the SHA-1 hashes of the conflicting objects. While this algorithm is repeatable and deterministic at the database level, it will have the appearance to the user of "random write wins".

The `write_once` property is a boolean value applied to a bucket type and may only be set at bucket creation time. Once a bucket type has been set and activated with the `write_once` property, the property may not be modified

Limitations:

 * Pre/Post-commit hooks are not supported.
 * Large object warnings and limits are not enforced.
 * All nodes must be upgraded before enabling `write_once` - usage in mixed clusters will crash vnodes.

## Changes

* [Issue kv679](https://github.com/basho/riak_kv/issues/679) - Applies fix to most causes of data loss from repeated causal history. A monotonic counter is fsynced to disk when the vnode starts. Thus starting/re-starting a vnode has a cost associated that was not there before.
  * [riak_kv/pull/1070](https://github.com/basho/riak_kv/pull/1070)

* Update API to retrieve active preflist based on particular bucket/key.
Updates the Riak API with an operation to GET, e.g. `/types/Type/buckets/Bucket/keys/Key/preflist`, an annotated (nodes being primary or fallback) preflist of which nodes host a particular bucket/key combination is returned.
  * [riak-erlang-http-client/pull/50](https://github.com/basho/riak-erlang-http-client/pull/50)
  * [riak_core/pull/705](https://github.com/basho/riak_core/pull/705)
  * [riak_pb/pull/105](https://github.com/basho/riak_pb/pull/105)
  * [riak-erlang-client/pull/204](https://github.com/basho/riak-erlang-client/pull/204)
  * [riak_kv/pull/1083](https://github.com/basho/riak_kv/pull/1083)
  * [riak_api/pull/81](https://github.com/basho/riak_api/pull/81)
  * [riak_api/pull/75](https://github.com/basho/riak_api/pull/75)

* Add a JSON writer for several riak-admin commands, including cluster status, cluster partition[s], cluster partition-count, any of the riak-admin handoff commands, and riak-admin set/show/describe.
  * [clique/pull/47](https://github.com/basho/clique/pull/47)

* Integrate performance patches into Erlang R16 VM used by Riak.
  * [opt/pull/10](https://github.com/basho/otp/pull/10)

* Add riak_core_ring_manager:is_stable_ring/0 to public API. Allows clients to ensure that the ring has not changed in X seconds (currently 90).
  * [riak_core/pull/716](https://github.com/basho/riak_core/pull/716)

* [yokozuna/issues/468](https://github.com/basho/yokozuna/issues/468) - Add `search_query_latency_mean` and `search_index_latency_mean` metrics.
  * [yokozuna/pull/473](https://github.com/basho/yokozuna/pull/473)

## Fixes

* [yokozuna/issues/437](https://github.com/basho/yokozuna/issues/437): Timeouts during bulk data load, possible tie in to yz_events crash and a bad state on core create.
  * [yokozuna/pull/458](https://github.com/basho/yokozuna/pull/458)

* [yokozuna/issues/452](https://github.com/basho/yokozuna/issues/452):  Don't delete siblings in YZ when using SC or CRDTs.
  * [yokozuna/pull/457](https://github.com/basho/yokozuna/pull/457)

* [yokozuna/issues/402](https://github.com/basho/yokozuna/issues/402): Creating a new search index via HTTP responds before the index is available.
  * [riak_test/pull/745](https://github.com/basho/riak_test/pull/745)
  * [riak_pb/pull/112](https://github.com/basho/riak_pb/pull/112)
  * [riak_pb/pull/111](https://github.com/basho/riak_pb/pull/111)
  * [riak-erlang-client/pull/207](https://github.com/basho/riak-erlang-client/pull/207)
  * [yokozuna/pull/463](https://github.com/basho/yokozuna/pull/463)

* [yokozuna/issues/450](https://github.com/basho/yokozuna/issues/450): AAE Failing hourly, with exit value {badarg,46}, [{base64,decode_binary[{base64.erl…
  * [yokozuna/pull/459](https://github.com/basho/yokozuna/pull/459)

* [yokozuna/issues/437](https://github.com/basho/yokozuna/issues/437): yz_events:handle_info called with bad arguments.
  * [yokozuna/pull/458](https://github.com/basho/yokozuna/pull/458)
  * [yokozuna/pull/42](https://github.com/basho/yokozuna/pull/42)

* [yokozuna/issues/469](https://github.com/basho/yokozuna/issues/469): Fix YZ stats name typo from throughput to throughput.
  * [yokozuna/pull/470](https://github.com/basho/yokozuna/pull/470)

* [riak_core/issues/698](https://github.com/basho/riak_core/issues/698): SSL connections from peers with matching wildcard name are always rejected.
  * [riak_core/pull/718](https://github.com/basho/riak_core/pull/718)

## Known Issues

* [yokozuna/issues/481](https://github.com/basho/yokozuna/issues/481) - Search loses entries when Search AAE trees expire. We are currently investigating this issue.
* [riak/issues/727](https://github.com/basho/riak/issues/727) - Users upgrading from 1.4.x to 2.1.x that choose to use the traditional `app.config` for configuration should be aware that the default settings for `allow_mult` and `dvv_enabled` have changed from `false` to `true` between these versions.  If your application depends on these being set to 'false', you must explicitly define this by adding `{default_bucket_props, [{allow_mult, false}, {dvv_enabled, false}]},` to the `riak_core` section of your `app.config` file to maintain backwards compatibility.

## Notes on upgrading

* Write-Once Buckets
  * If you make use of write-once buckets, you must upgrade all of your Riak nodes in a cluster to 2.1.0.  There is no support for write-once buckets in a cluster with mixed Riak versions.
  * Pre/Post-commit hooks are not supported.
  * Large object warnings and limits are not enforced


text:
/**
 *     This code was auto-generated by a Codezu.
 *
 *     Changes to this file may cause incorrect behavior and will be lost if
 *     the code is regenerated.
 */
package com.mozu.api.clients.commerce;

import java.util.List;
import java.util.ArrayList;
import com.mozu.api.MozuClient;
import com.mozu.api.MozuClientFactory;
import com.mozu.api.MozuUrl;
import com.mozu.api.Headers;
import org.joda.time.DateTime;
import com.mozu.api.AsyncCallback;
import java.util.concurrent.CountDownLatch;
import com.mozu.api.security.AuthTicket;
import org.apache.commons.lang.StringUtils;

/**
 * commerce/targetrules related resources. DOCUMENT_HERE
 *
 */
public class TargetRuleClient {

	/**
	 * Retrieves a list of TargetRules according to any specified filter criteria and sort options.
	 *

	 * MozuClient<com.mozu.api.contracts.shippingadmin.TargetRuleCollection> mozuClient=GetTargetRulesClient();
	 * client.setBaseAddress(url);
	 * client.executeRequest();
	 * TargetRuleCollection targetRuleCollection = client.Result();
	 *

	 * @param dataViewMode DataViewMode
	 * @return Mozu.Api.MozuClient <com.mozu.api.contracts.shippingadmin.TargetRuleCollection>
	 * @see com.mozu.api.contracts.shippingadmin.TargetRuleCollection
	 */
	public static MozuClient<com.mozu.api.contracts.shippingadmin.TargetRuleCollection> getTargetRulesClient() throws Exception
	{
		return getTargetRulesClient( null,  null,  null,  null,  null);
	}

	/**
	 * Retrieves a list of TargetRules according to any specified filter criteria and sort options.
	 *

	 * MozuClient<com.mozu.api.contracts.shippingadmin.TargetRuleCollection> mozuClient=GetTargetRulesClient( startIndex,  pageSize,  sortBy,  filter,  responseFields);
	 * client.setBaseAddress(url);
	 * client.executeRequest();
	 * TargetRuleCollection targetRuleCollection = client.Result();
	 *

	 * @param filter A set of filter expressions representing the search parameters for a query. This parameter is optional. Refer to [Sorting and Filtering](../../../../Developer/applications/sorting-filtering.htm) for a list of supported filters.
	 * @param pageSize When creating paged results from a query, this value indicates the zero-based offset in the complete result set where the returned entities begin. For example, with this parameter set to 25, to get the 51st through the 75th items, set startIndex to 50.
	 * @param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may cause data loss.
	 * @param sortBy The element to sort the results by and the channel in which the results appear. Either ascending (a-z) or descending (z-a) channel. Optional. Refer to [Sorting and Filtering](../../../../Developer/applications/sorting-filtering.htm) for more information.
	 * @param startIndex When creating paged results from a query, this value indicates the zero-based offset in the complete result set where the returned entities begin. For example, with pageSize set to 25, to get the 51st through the 75th items, set this parameter to 50.
	 * @param dataViewMode DataViewMode
	 * @return Mozu.Api.MozuClient <com.mozu.api.contracts.shippingadmin.TargetRuleCollection>
	 * @see com.mozu.api.contracts.shippingadmin.TargetRuleCollection
	 */
	public static MozuClient<com.mozu.api.contracts.shippingadmin.TargetRuleCollection> getTargetRulesClient(Integer startIndex, Integer pageSize, String sortBy, String filter, String responseFields) throws Exception
	{
		MozuUrl url = com.mozu.api.urls.commerce.TargetRuleUrl.getTargetRulesUrl(filter, pageSize, responseFields, sortBy, startIndex);
		String verb = "GET";
		Class<?> clz = com.mozu.api.contracts.shippingadmin.TargetRuleCollection.class;
		MozuClient<com.mozu.api.contracts.shippingadmin.TargetRuleCollection> mozuClient = (MozuClient<com.mozu.api.contracts.shippingadmin.TargetRuleCollection>) MozuClientFactory.getInstance(clz);
		mozuClient.setVerb(verb);
		mozuClient.setResourceUrl(url);
		return mozuClient;

	}

	/**
	 * Get Target Rule
	 *

	 * MozuClient<com.mozu.api.contracts.shippingadmin.TargetRule> mozuClient=GetTargetRuleClient( code);
	 * client.setBaseAddress(url);
	 * client.executeRequest();
	 * TargetRule targetRule = client.Result();
	 *

	 * @param code User-defined code that uniqely identifies the channel group.
	 * @param dataViewMode DataViewMode
	 * @return Mozu.Api.MozuClient <com.mozu.api.contracts.shippingadmin.TargetRule>
	 * @see com.mozu.api.contracts.shippingadmin.TargetRule
	 */
	public static MozuClient<com.mozu.api.contracts.shippingadmin.TargetRule> getTargetRuleClient(String code) throws Exception
	{
		return getTargetRuleClient( code,  null);
	}

	/**
	 * Get Target Rule
	 *

	 * MozuClient<com.mozu.api.contracts.shippingadmin.TargetRule> mozuClient=GetTargetRuleClient( code,  responseFields);
	 * client.setBaseAddress(url);
	 * client.executeRequest();
	 * TargetRule targetRule = client.Result();
	 *

	 * @param code User-defined code that uniqely identifies the channel group.
	 * @param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may cause data loss.
	 * @param dataViewMode DataViewMode
	 * @return Mozu.Api.MozuClient <com.mozu.api.contracts.shippingadmin.TargetRule>
	 * @see com.mozu.api.contracts.shippingadmin.TargetRule
	 */
	public static MozuClient<com.mozu.api.contracts.shippingadmin.TargetRule> getTargetRuleClient(String code, String responseFields) throws Exception
	{
		MozuUrl url = com.mozu.api.urls.commerce.TargetRuleUrl.getTargetRuleUrl(code, responseFields);
		String verb = "GET";
		Class<?> clz = com.mozu.api.contracts.shippingadmin.TargetRule.class;
		MozuClient<com.mozu.api.contracts.shippingadmin.TargetRule> mozuClient = (MozuClient<com.mozu.api.contracts.shippingadmin.TargetRule>) MozuClientFactory.getInstance(clz);
		mozuClient.setVerb(verb);
		mozuClient.setResourceUrl(url);
		return mozuClient;

	}

	/**
	 * commerce-targetrules Post CreateTargetRule description DOCUMENT_HERE
	 *

	 * MozuClient<com.mozu.api.contracts.shippingadmin.TargetRule> mozuClient=CreateTargetRuleClient( targetRule);
	 * client.setBaseAddress(url);
	 * client.executeRequest();
	 * TargetRule targetRule = client.Result();
	 *

	 * @param dataViewMode DataViewMode
	 * @param targetRule Mozu.ShippingAdmin.Contracts.TargetRule ApiType DOCUMENT_HERE
	 * @return Mozu.Api.MozuClient <com.mozu.api.contracts.shippingadmin.TargetRule>
	 * @see com.mozu.api.contracts.shippingadmin.TargetRule
	 * @see com.mozu.api.contracts.shippingadmin.TargetRule
	 */
	public static MozuClient<com.mozu.api.contracts.shippingadmin.TargetRule> createTargetRuleClient(com.mozu.api.contracts.shippingadmin.TargetRule targetRule) throws Exception
	{
		return createTargetRuleClient( targetRule,  null);
	}

	/**
	 * commerce-targetrules Post CreateTargetRule description DOCUMENT_HERE
	 *

	 * MozuClient<com.mozu.api.contracts.shippingadmin.TargetRule> mozuClient=CreateTargetRuleClient( targetRule,  responseFields);
	 * client.setBaseAddress(url);
	 * client.executeRequest();
	 * TargetRule targetRule = client.Result();
	 *

	 * @param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may cause data loss.
	 * @param dataViewMode DataViewMode
	 * @param targetRule Mozu.ShippingAdmin.Contracts.TargetRule ApiType DOCUMENT_HERE
	 * @return Mozu.Api.MozuClient <com.mozu.api.contracts.shippingadmin.TargetRule>
	 * @see com.mozu.api.contracts.shippingadmin.TargetRule
	 * @see com.mozu.api.contracts.shippingadmin.TargetRule
	 */
	public static MozuClient<com.mozu.api.contracts.shippingadmin.TargetRule> createTargetRuleClient(com.mozu.api.contracts.shippingadmin.TargetRule targetRule, String responseFields) throws Exception
	{
		MozuUrl url = com.mozu.api.urls.commerce.TargetRuleUrl.createTargetRuleUrl(responseFields);
		String verb = "POST";
		Class<?> clz = com.mozu.api.contracts.shippingadmin.TargetRule.class;
		MozuClient<com.mozu.api.contracts.shippingadmin.TargetRule> mozuClient = (MozuClient<com.mozu.api.contracts.shippingadmin.TargetRule>) MozuClientFactory.getInstance(clz);
		mozuClient.setVerb(verb);
		mozuClient.setResourceUrl(url);
		mozuClient.setBody(targetRule);
		return mozuClient;

	}

	/**
	 * commerce-targetrules Post ValidateTargetRule description DOCUMENT_HERE
	 *

	 * MozuClient mozuClient=ValidateTargetRuleClient( targetRule);
	 * client.setBaseAddress(url);
	 * client.executeRequest();
	 *

	 * @param dataViewMode DataViewMode
	 * @param targetRule Mozu.ShippingAdmin.Contracts.TargetRule ApiType DOCUMENT_HERE
	 * @return Mozu.Api.MozuClient
	 * @see com.mozu.api.contracts.shippingadmin.TargetRule
	 */
	public static MozuClient validateTargetRuleClient(com.mozu.api.contracts.shippingadmin.TargetRule targetRule) throws Exception
	{
		MozuUrl url = com.mozu.api.urls.commerce.TargetRuleUrl.validateTargetRuleUrl();
		String verb = "POST";
				MozuClient mozuClient = (MozuClient) MozuClientFactory.getInstance();
		mozuClient.setVerb(verb);
		mozuClient.setResourceUrl(url);
		mozuClient.setBody(targetRule);
		return mozuClient;

	}

	/**
	 * commerce-targetrules Put UpdateTargetRule description DOCUMENT_HERE
	 *

	 * MozuClient<com.mozu.api.contracts.shippingadmin.TargetRule> mozuClient=UpdateTargetRuleClient( targetRule,  code);
	 * client.setBaseAddress(url);
	 * client.executeRequest();
	 * TargetRule targetRule = client.Result();
	 *

	 * @param code User-defined code that uniqely identifies the channel group.
	 * @param dataViewMode DataViewMode
	 * @param targetRule Mozu.ShippingAdmin.Contracts.TargetRule ApiType DOCUMENT_HERE
	 * @return Mozu.Api.MozuClient <com.mozu.api.contracts.shippingadmin.TargetRule>
	 * @see com.mozu.api.contracts.shippingadmin.TargetRule
	 * @see com.mozu.api.contracts.shippingadmin.TargetRule
	 */
	public static MozuClient<com.mozu.api.contracts.shippingadmin.TargetRule> updateTargetRuleClient(com.mozu.api.contracts.shippingadmin.TargetRule targetRule, String code) throws Exception
	{
		return updateTargetRuleClient( targetRule,  code,  null);
	}

	/**
	 * commerce-targetrules Put UpdateTargetRule description DOCUMENT_HERE
	 *

	 * MozuClient<com.mozu.api.contracts.shippingadmin.TargetRule> mozuClient=UpdateTargetRuleClient( targetRule,  code,  responseFields);
	 * client.setBaseAddress(url);
	 * client.executeRequest();
	 * TargetRule targetRule = client.Result();
	 *

	 * @param code User-defined code that uniqely identifies the channel group.
	 * @param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may cause data loss.
	 * @param dataViewMode DataViewMode
	 * @param targetRule Mozu.ShippingAdmin.Contracts.TargetRule ApiType DOCUMENT_HERE
	 * @return Mozu.Api.MozuClient <com.mozu.api.contracts.shippingadmin.TargetRule>
	 * @see com.mozu.api.contracts.shippingadmin.TargetRule
	 * @see com.mozu.api.contracts.shippingadmin.TargetRule
	 */
	public static MozuClient<com.mozu.api.contracts.shippingadmin.TargetRule> updateTargetRuleClient(com.mozu.api.contracts.shippingadmin.TargetRule targetRule, String code, String responseFields) throws Exception
	{
		MozuUrl url = com.mozu.api.urls.commerce.TargetRuleUrl.updateTargetRuleUrl(code, responseFields);
		String verb = "PUT";
		Class<?> clz = com.mozu.api.contracts.shippingadmin.TargetRule.class;
		MozuClient<com.mozu.api.contracts.shippingadmin.TargetRule> mozuClient = (MozuClient<com.mozu.api.contracts.shippingadmin.TargetRule>) MozuClientFactory.getInstance(clz);
		mozuClient.setVerb(verb);
		mozuClient.setResourceUrl(url);
		mozuClient.setBody(targetRule);
		return mozuClient;

	}

	/**
	 * commerce-targetrules Delete DeleteTargetRule description DOCUMENT_HERE
	 *

	 * MozuClient mozuClient=DeleteTargetRuleClient( code);
	 * client.setBaseAddress(url);
	 * client.executeRequest();
	 *

	 * @param code User-defined code that uniqely identifies the channel group.
	 * @param dataViewMode DataViewMode
	 * @return Mozu.Api.MozuClient
	 */
	public static MozuClient deleteTargetRuleClient(String code) throws Exception
	{
		MozuUrl url = com.mozu.api.urls.commerce.TargetRuleUrl.deleteTargetRuleUrl(code);
		String verb = "DELETE";
				MozuClient mozuClient = (MozuClient) MozuClientFactory.getInstance();
		mozuClient.setVerb(verb);
		mozuClient.setResourceUrl(url);
		return mozuClient;

	}

}