text:
package org.ops4j.pax.wicket.spi;

/**
 * Interface for return values of {@link ProxyTargetLocator#locateProxyTarget()}.
 *
 */
public interface ReleasableProxyTarget extends ProxyTarget {

    /**
     * invoked when the target is released. <b>Implementation note:</b> This Method should never throw an
     * RuntimeException!
     *
     * @return the new target (might be a this pointer) or null if the target is no longer usable
     */
    public ProxyTarget releaseTarget();
}


text:
<?php

namespace Notadd\Foundation\Member\Events;

use Notadd\Foundation\Member\Abstracts\Driver;
use Notadd\Foundation\Member\Member;

/**
 * Class MemberStored.
 */
class MemberStored
{
    /**
     * @var \Notadd\Foundation\Member\Member
     */
    protected $member;

    /**
     * MemberUpdated constructor.
     *
     * @param \Notadd\Foundation\Member\Member $member
     *
     * @internal param \Illuminate\Container\Container $container
     */
    public function __construct(Member $member)
    {
        $this->member = $member;
    }
}

redpajama_set_name: RedPajamaGithub


text:
set -e

echo "set git environment"
git config user.email "iamstarkov+tachikombie@gmail.com"
git config user.name "Tachikoma Zombie"
git remote rm origin
git remote add origin https://<%= githubUser %>:${GITHUB_TOKEN}@github.com/<%= githubUser %>/<%= githubRepo %>.git
git checkout master

echo "run update"
babel-node update

echo "save dump"
git add --all dump
git commit -m $'save dump\n\n[ci skip]'
git push origin master &>/dev/null

echo "build'n'deploy"
npm run deploy


text:
import { get } from "lodash";
import isCustomPropertySet from "./isCustomPropertySet";
import isStandardSyntaxSelector from "./isStandardSelector";

/**
 * Check whether a Node is a standard rule
 *
 * @param {import('postcss').Rule} rule
 * @returns {boolean}
 */
export default function(rule) {
  // Get full selector
  const selector = get(rule, "raws.selector.raw", rule.selector);

  if (!isStandardSyntaxSelector(rule.selector)) {
    return false;
  }

  // Custom property set (e.g. --custom-property-set: {})
  if (isCustomPropertySet(rule)) {
    return false;
  }

  // Called Less mixin (e.g. a { .mixin() })
  // @ts-ignore TODO TYPES support LESS and SASS types somehow
  if (rule.mixin) {
    return false;
  }

  // Less detached rulesets
  if (selector.startsWith("@") && selector.endsWith(":")) {
    return false;
  }

  // Ignore Less &:extend rule
  // @ts-ignore TODO TYPES support LESS and SASS types somehow
  if (rule.extend) {
    return false;
  }

  // Ignore mixin or &:extend rule
  // https://github.com/shellscape/postcss-less/blob/master/lib/less-parser.js#L52
  // @ts-ignore TODO TYPES support LESS and SASS types somehow
  if (rule.params && rule.params[0]) {
    return false;
  }

  // Non-outputting Less mixin definition (e.g. .mixin() {})
  if (selector.endsWith(")") && !selector.includes(":")) {
    return false;
  }

  // Less guards
  if (/when\s+(not\s+)*\(/.test(selector)) {
    return false;
  }

  // Ignore Scss nested properties
  if (selector.endsWith(":")) {
    return false;
  }

  return true;
}


text:
import React from 'react'
import expect from 'expect'
import TestUtils from 'react-addons-test-utils'

import Footer from './Footer'
import {VISIBILITY_FILERS} from '../actions'

describe('footer component', () => {
  const setup = () => {
    let props = {
    }
    let renderer = TestUtils.createRenderer()
    renderer.render(<Footer/>)
    let output = renderer.getRenderOutput()
    return {
      props,
      output,
      renderer
    }
  }

  it('should render a footer', () => {
    const {output} = setup()

    let links = output.props.children
    expect(links[0].props.text).toEqual('All')
    expect(links[0].props.filter).toEqual(VISIBILITY_FILERS.SHOW_ALL)
    expect(links[1].props.text).toEqual('Active')
    expect(links[1].props.filter).toEqual(VISIBILITY_FILERS.SHOW_ACTIVE)
    expect(links[2].props.text).toEqual('Completed')
    expect(links[2].props.filter).toEqual(VISIBILITY_FILERS.SHOW_COMPLETED)
  })
})


text:
package ua.kiev.icyb.bio;

import ua.kiev.icyb.bio.res.Messages;

/**
 * Реализация интерфейса {@link Launchable} с использованием механизма сериализации
 * Java. Соответственно, все данные о ходе выполнения алгоритма должны содержаться
 * в его сериализуемых полях. Если среди сериализуемых полей есть итерабельные контейнеры
 * (например, List), необходимы меры предосторожности, чтобы во время сохранения
 * в них не добавлялись и не удалялись объекты.
 *
 *
Пример. Класс, выводящий все числа от единицы до n.
 *

 * public class NumberAlgorithm extends AbstractLaunchable {
 *     private int n;
 *     private int index;
 *
 *     public NumberAlgorithm(int n) {
 *         this.n = n;
 *         this.index = 0;
 *     }
 *
 *     protected void doRun() {
 *         for (int i = this.index; i < this.n; this.index = ++i) {
 *             System.out.println(i + 1);
 *         }
 *     }
 * }
 *

 */
public abstract class AbstractLaunchable implements Launchable {

	private static final long serialVersionUID = 1L;

	private transient Env env;

	@Override
	public Env getEnv() {
		return env;
	}

	@Override
	public synchronized void run(Env env) {
		this.env = env;
		doRun();
	}

	/**
	 * Выполняет алгоритм.
	 */
	protected abstract void doRun();

	/**
	 * Сохраняет данные алгоритма.
	 */
	protected void save() {
		String dest = getEnv().saveProgress();
		if (dest != null) {
			env.debug(1, Messages.format("misc.save", dest));
		}
	}
}


text:
.class Lcom/htc/app/mf/MfLog;
.super Ljava/lang/Object;
.source "MfLog.java"

# static fields
.field public static final TAG:Ljava/lang/String; = "MfLog"

# direct methods
.method constructor <init>()V
    .locals 0

    .prologue
    .line 10
    invoke-direct/range {p0 .. p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method

.method public static final d(Ljava/lang/String;)V
    .locals 1
    .parameter "str"

    .prologue
    .line 22
    const-string v0, "MfLog"

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

    .line 23
    return-void
.end method

.method public static final e(Ljava/lang/String;)V
    .locals 1
    .parameter "str"

    .prologue
    .line 46
    const-string v0, "MfLog"

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

    .line 47
    return-void
.end method

.method public static final stackTrace()V
    .locals 3

    .prologue
    .line 54
    const-string v0, "MfLog"

    new-instance v1, Ljava/lang/RuntimeException;

    const-string v2, "MF stack trace"

    invoke-direct {v1, v2}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/String;)V

    invoke-static {v1}, Landroid/util/Log;->getStackTraceString(Ljava/lang/Throwable;)Ljava/lang/String;

    move-result-object v1

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

    .line 56
    return-void
.end method

.method public static final v(Ljava/lang/String;)V
    .locals 1
    .parameter "str"

    .prologue
    .line 30
    const-string v0, "MfLog"

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

    .line 31
    return-void
.end method

.method public static final w(Ljava/lang/String;)V
    .locals 1
    .parameter "str"

    .prologue
    .line 38
    const-string v0, "MfLog"

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

    .line 39
    return-void
.end method


text:
"use strict";
const config = require("../config");
const utils = require("./utils");

let unknownCommand = {
  pattern: /!.*/,
  execute: function(bot, channelID, userTag, userID, command, msg) {
    let isRightChannel = channelID === config.channels.queueChannel || channelID === config.channels.iosChannel || channelID === config.channels.linuxChannel || channelID === config.channels.androidChannel || channelID === config.channels.canaryChannel;
    if(isRightChannel) {
      utils.botReply(bot, userID, channelID, "unknown command, please review #bot-help for commands.", command, msg.id, false);
    }
  },
  roles: [
    config.roles.everybodyRole
  ],
  channels: [
    config.channels.allChannels
  ]
}

function CommandList() {
  if(!(this instanceof CommandList)) return new CommandList();
  this._commands = [unknownCommand];
}

CommandList.prototype.add = function(commandName) {
  this._commands.unshift(require("../commands/" + commandName));
}

CommandList.prototype.find = function(commandName) {
  return this._commands.find(com => com.pattern.test(commandName));
}

module.exports = CommandList;


text:
package org.collprod.bicingbcn.ingestion;

import java.io.IOException;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;

import junit.framework.Assert;

import org.apache.avro.file.DataFileReader;
import org.apache.avro.file.DataFileWriter;
import org.apache.avro.generic.GenericData;
import org.apache.avro.generic.GenericDatumReader;
import org.apache.avro.generic.GenericRecord;
import org.apache.avro.mapred.FsInput;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
import org.collprod.bicingbcn.ingestion.attic.AvroWriterBolt;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;

import backtype.storm.Config;

public class AvroWriterBoltTest {
	private AvroWriterBolt avroWriterBolt;
	private Path targetPath;
	private FileSystem hdfs;
	private AvroWriterBolt.DatasourceMonth datasourceMonth;
	private org.apache.hadoop.conf.Configuration hadoopConf;

	@Before
	public void setup() throws SecurityException, NoSuchMethodException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException, InvocationTargetException, IOException {
		avroWriterBolt = new AvroWriterBolt();

		Config conf = IngestionTopology.loadConfiguration();
		// enough for now, but not very nice
		avroWriterBolt.prepare(conf, null, null);
		Field hdfsField = avroWriterBolt.getClass().getDeclaredField("hdfs");
		hdfsField.setAccessible(true);
		hdfs = (FileSystem) hdfsField.get(avroWriterBolt);

		Field hadoopConfField = avroWriterBolt.getClass().getDeclaredField("hadoopConf");
		hadoopConfField.setAccessible(true);
		hadoopConf = (org.apache.hadoop.conf.Configuration) hadoopConfField.get(avroWriterBolt);

		// Delete target path
		Method buildTargetPath = avroWriterBolt.getClass()
				.getDeclaredMethod("buildTargetPath", AvroWriterBolt.DatasourceMonth.class);
		buildTargetPath.setAccessible(true);

		// Define target path
		// pass future month so the month is not present
		datasourceMonth = AvroWriterBolt.DatasourceMonth.create("bicing_station_data", "3014-06-22");
		targetPath = (Path) buildTargetPath.invoke(avroWriterBolt, datasourceMonth);
		if (hdfs.exists(targetPath)) {
			hdfs.delete(targetPath);
		}
	}

	@After
	public void tearDown() throws IOException {
		if (hdfs.exists(targetPath)) {
			hdfs.delete(targetPath);
		}
	}

	@Test
	public void createMonthTest() throws SecurityException, NoSuchMethodException, IllegalArgumentException, IllegalAccessException, InvocationTargetException  {
		// http://stackoverflow.com/questions/34571/whats-the-proper-way-to-test-a-class-with-private-methods-using-junit
		long timestamp = 1403452626L * 1000L;
		Method timestampToMonth = avroWriterBolt.getClass().getDeclaredMethod("timestampToMonth", long.class);
		timestampToMonth.setAccessible(true);
		Assert.assertEquals("2014-06-22", timestampToMonth.invoke(avroWriterBolt, timestamp));
	}

	private void writeNRecords(DataFileWriter<GenericRecord> writer, int numRecords, int startIndex) throws IOException {
		GenericRecord newDataRecord = new GenericData.Record(AvroWriterBolt.AVRO_SCHEMA);
		for (int i = startIndex; i < numRecords + startIndex; i++) {
			// FIXME: this code is repeated in checkReadNRecords
			newDataRecord.put(AvroWriterBolt.AVRO_TIMESTAMP_FIELD, new Long(10 + i));
			newDataRecord.put(AvroWriterBolt.AVRO_CONTENT_FIELD, "test content " + i);
			writer.append(newDataRecord);
			System.out.println("Wrote record " + newDataRecord);
		}
		writer.close();
	}

	private void checkReadNRecords(int numRecords) throws IOException {
		DataFileReader<GenericRecord> dataFileReader =
				new DataFileReader<GenericRecord>(new FsInput(targetPath, hadoopConf),
						new GenericDatumReader<GenericRecord>(AvroWriterBolt.AVRO_SCHEMA));
		GenericRecord readDataRecord = null;
		int numRecordsRead = 0;
		while (dataFileReader.hasNext()) {
			readDataRecord = dataFileReader.next(readDataRecord);
			Assert.assertEquals(new Long(10 + numRecordsRead), readDataRecord.get(AvroWriterBolt.AVRO_TIMESTAMP_FIELD));
			Assert.assertEquals("test content "  + numRecordsRead, readDataRecord.get(AvroWriterBolt.AVRO_CONTENT_FIELD).toString());
			numRecordsRead++;
			System.out.println("Read record " + readDataRecord);
		}
		Assert.assertEquals(numRecords, numRecordsRead);
		dataFileReader.close();
	}

	@Test
	public void createHDFSFileTest() throws SecurityException, NoSuchMethodException, IllegalArgumentException, IllegalAccessException, InvocationTargetException, IOException, NoSuchFieldException {
		// Check create file
			// Create
		Method openHDFSFile = avroWriterBolt.getClass()
									.getDeclaredMethod("openHDFSFile", AvroWriterBolt.DatasourceMonth.class);
		openHDFSFile.setAccessible(true);
		DataFileWriter<GenericRecord> writer =
				(DataFileWriter<GenericRecord>) openHDFSFile.invoke(avroWriterBolt, datasourceMonth);

		writeNRecords(writer, 10, 0);
		checkReadNRecords(10);

		// Check append to file
			// The file should still exists
		Assert.assertTrue(hdfs.exists(targetPath));
			// this should be open in append mode
		writer = (DataFileWriter<GenericRecord>) openHDFSFile.invoke(avroWriterBolt, datasourceMonth);
			// hence there should be 20 records after writing 10 more
		writeNRecords(writer, 10, 10);
		checkReadNRecords(20);
	}

}


text:
var mongoose = require('mongoose'),
    Schema = mongoose.Schema;

var activitySchema = new Schema({
  // NOTE: I had to remove the ObjectId keyword from the array to make this work for
  // testing my routes properly, bc req.params.id comes back as string
  // Revert after REVIEW!
  creator: {type: Schema.Types.ObjectId, ref: 'User', required: true},
  title: {type: String, required: true},
  description: {type: String, required: true},
  typeOfExercise: String,
  weather: {type: String, required: true},
  minAge: {type: Number , required: true},
  date: {type: Date, default: Date.now}
  // outdoor: {type: Boolean, required: true} ,
  // tags: [String]
});

var Activity = mongoose.model('Activity', activitySchema);

module.exports = Activity;


text:
======================
 FNCS VOLTTRON Bridge
======================
----------
 Overview
----------
FNCS_Volttron_Bridge.py is a standalone VOLTTRON agent. It is meant to run on a system where the VOLTTRON platform is installed and run. It has a configuration associated with it called FNCS_VOLTTRON_Bridge.config. This repository provides a stub of what this configuration must contain.

--------------
 How it works
--------------
The FNCS VOLTTRON Bridge acts purely as a bi-directional message forwarder between the FNCS message bus and the VOLTTRON message bus.

Executing the FNCS_Volttron_Bridge
==================================
The agent is executed by typeing::

	python FNCS_Volttron_Bridge.py

Where ever the agent is run from that directory must contain the configuration file entitle FNCS_VOLTTRON_Bridge.config.

The FNCS_VOLTTRON_Bridge.config File
====================================
The configuration file for the agent must contain the following keys with:
	* "simulation_run_time": a string containing the amount of time the FNCS simulation will run. valid entries are strings like "60s" and "4d".
	* "heartbeat_period": The heartbeat period for the agent should always be 1.
	* "heartbeat_multiplier": This determine how long a heartbeat period is for the fncs simulation in seconds. for example if the heartbeat period is 1 second and the heartbeat multiplier is 300 seconds then each 1 second heartbeat represents 5 simulated minutes.
	* "fncs_zpl": This key contains a nested object that represents a FNCS federate configuration information. For information on creating a FNCS federate configuration please see `The FNCS Documentation Page <https://github.com/FNCS/fncs/wiki>`_.
	* "remote_platform_params": This contains all the key value pairs for creating the agents vip address.

.. note:: Both VOLTTRON and FNCS use the ZeroMQ library. In order for the agent to run successfully, the version of zeromq packaged with VOLTTRON and the version compiled with FNCS must be the same. VOLTTRON 4.1 packages 4.1.5 of ZeroMQ. So when Installing FNCS you must download and install version 4.1.5 of ZeroMQ. Version 4.1.5 of ZeroMQ can downloaded from `here <https://github.com/zeromq/zeromq4-1/releases>`_.

How to forward messages to the FNCS bus from the VOLTTRON bus?
==============================================================
The FNCS_Volttron_Bridge agent listens to the fncs/input/* topic on the VOLTTRON bus so if you wish to forward subtopics to the FNCS message bus you must preface your subtopic with fncs/input/. All messages forwarded to FNCS have the topic of the FNCS_Volttron_Bridge/subtopic.

How to forward messages to the VOLTTRON bus from the FNCS bus?
==============================================================
As previously stated you list FNCS message topics you wish to subscribe to in the FNCS_VOLTTRON_Bridge.config file. The FNCS_Volttron_Bridge agent will forward messages from these topics to the VOLTTRON bus on the topic fncs/output/devices/subtopic. The subtopic is the fncs topic you suscribed to.


text:
Array Operations
================

.. _chainerx_routines:

.. module:: chainerx

Array creation routines
-----------------------

.. autosummary::
   :toctree: generated/
   :nosignatures:

   chainerx.empty
   chainerx.empty_like
   chainerx.eye
   chainerx.identity
   chainerx.ones
   chainerx.ones_like
   chainerx.zeros
   chainerx.zeros_like
   chainerx.full
   chainerx.full_like
   chainerx.array
   chainerx.asarray
   chainerx.asanyarray
   chainerx.ascontiguousarray
   chainerx.copy
   chainerx.frombuffer
   chainerx.fromfile
   chainerx.fromfunction
   chainerx.fromiter
   chainerx.fromstring
   chainerx.loadtxt
   chainerx.arange
   chainerx.linspace
   chainerx.diag
   chainerx.diagflat

Activation functions
--------------------

.. autosummary::
   :toctree: generated/
   :nosignatures:

   chainerx.log_softmax
   chainerx.tanh
   chainerx.relu
   chainerx.sigmoid

Array manipulation routines
---------------------------

.. autosummary::
   :toctree: generated/
   :nosignatures:

   chainerx.reshape
   chainerx.ravel
   chainerx.transpose
   chainerx.broadcast_to
   chainerx.squeeze
   chainerx.asarray
   chainerx.ascontiguousarray
   chainerx.asscalar
   chainerx.concatenate
   chainerx.stack
   chainerx.split

Indexing routines
-----------------

.. autosummary::
   :toctree: generated/
   :nosignatures:

   chainerx.take

Linear algebra
--------------

.. autosummary::
   :toctree: generated/
   :nosignatures:

   chainerx.dot

Logic functions
---------------

.. autosummary::
   :toctree: generated/
   :nosignatures:

   chainerx.isinf
   chainerx.isnan

   chainerx.logical_not

   chainerx.greater
   chainerx.greater_equal
   chainerx.less
   chainerx.less_equal
   chainerx.equal
   chainerx.not_equal

Mathematical functions
----------------------

.. autosummary::
   :toctree: generated/
   :nosignatures:

   chainerx.negative
   chainerx.add
   chainerx.subtract
   chainerx.multiply
   chainerx.divide
   chainerx.sum
   chainerx.maximum
   chainerx.exp
   chainerx.log
   chainerx.logsumexp
   chainerx.log_softmax
   chainerx.sqrt
   chainerx.tanh
   chainerx.square
   chainerx.clip

Random sampling
---------------

.. autosummary::
   :toctree: generated/
   :nosignatures:

   chainerx.random.normal
   chainerx.random.uniform

Sorting, searching, and counting
--------------------------------

.. autosummary::
   :toctree: generated/
   :nosignatures:

   chainerx.argmax

Statistics
----------

.. autosummary::
   :toctree: generated/
   :nosignatures:

   chainerx.amax

Connection
----------

.. autosummary::
   :toctree: generated/
   :nosignatures:

   chainerx.conv
   chainerx.conv_transpose
   chainerx.linear

Normalization
-------------

.. autosummary::
   :toctree: generated/
   :nosignatures:

   chainerx.batch_norm
   chainerx.fixed_batch_norm

Pooling
-------

.. autosummary::
   :toctree: generated/
   :nosignatures:

   chainerx.max_pool
   chainerx.average_pool


text:
<html>
<body bgcolor="#ffffff">
Classes for dealing Syntax for Binding Documents with Time-Stamps - RFC 5544.
</body>
</html>


text:
"""
models.py

App Engine datastore models

request comes from house, we find it by api key
request comes in from glass, we find it by ___

* Always get device listing from house
* track notification by device address
*

"""

from google.appengine.ext import ndb

# class ExampleModel(ndb.Model):
#     """Example Model"""
#     example_name = ndb.StringProperty(required=True)
#     example_description = ndb.TextProperty(required=True)
#     added_by = ndb.UserProperty()
#     timestamp = ndb.DateTimeProperty(auto_now_add=True)

class SmartHome(ndb.Model):
    """
    This represents a 'client' of smarthome.  Intended to be home automation
    control software, but it could be anything that controls Devices, Variables
    and Actions

    Key ID: apikey
    """
    owner = ndb.StringProperty()
    host = ndb.StringProperty()
    apikey = ndb.StringProperty()

class Devices(ndb.Model):
    """
    This contains all the information about devices
    Key ID:
    """
    dev_id = ndb.StringProperty()

class Variables(ndb.Model):
    pass

class Actions(ndb.Model):
    pass


text:
<?php

namespace Chamilo\Core\Repository\ContentObject\LearningPath\Display\Preview\Storage\Repository;

use Chamilo\Core\Repository\ContentObject\LearningPath\Display\Attempt\TreeNodeAttempt;
use Chamilo\Core\Repository\ContentObject\LearningPath\Display\Attempt\TreeNodeQuestionAttempt;
use Chamilo\Core\Repository\ContentObject\LearningPath\Display\Preview\DummyQuestionAttempt;
use Chamilo\Core\Repository\ContentObject\LearningPath\Display\Preview\DummyTreeNodeAttempt;
use Chamilo\Core\Repository\ContentObject\LearningPath\Domain\TreeNode;
use Chamilo\Core\Repository\ContentObject\LearningPath\Storage\DataClass\LearningPath;
use Chamilo\Core\Repository\ContentObject\LearningPath\Storage\Repository\TrackingRepositoryInterface;
use Chamilo\Core\User\Storage\DataClass\User;
use Chamilo\Libraries\Platform\Session\Session;
use Chamilo\Libraries\Storage\DataClass\DataClass;
use Chamilo\Libraries\Storage\Iterator\RecordIterator;
use Chamilo\Libraries\Storage\Query\Condition\Condition;
use Chamilo\Libraries\Utilities\UUID;

/**
 * @author Sven Vanpoucke - Hogeschool Gent
 */
class TrackingRepository implements TrackingRepositoryInterface
{
    /**
     * TrackingRepository constructor.
     */
    public function __construct()
    {
        $storage = $this->getStorage();

        if (!isset($storage) || empty($storage))
        {
            $this->setStorage(array());
        }
    }

    /**
     * Empties the storage
     */
    public function resetStorage()
    {
        $this->setStorage(array());
    }

    /**
     * Returns the stored data from the session
     *
     * @return array
     */
    protected function getStorage()
    {
        return unserialize(Session::retrieve(__NAMESPACE__));
    }

    /**
     * Sets the stored data
     *
     * @param array $data
     */
    protected function setStorage($data)
    {
        Session::register(__NAMESPACE__, serialize($data));
    }

    /**
     * Stores data in the storage
     *
     * @param string $property
     * @param mixed $value
     */
    protected function setInStorage($property, $value)
    {
        $data = $this->getStorage();
        $data[$property] = $value;
        $this->setStorage($data);
    }

    /**
     * Returns data from the storage
     *
     * @param string $property
     *
     * @return mixed
     */
    protected function getFromStorage($property)
    {
        $data = $this->getStorage();

        return $data[$property];
    }

    /**
     * Finds the learning path child attempts for a given learning path attempt
     *
     * @param LearningPath $learningPath
     * @param User $user
     *
     * @return TreeNodeAttempt[]|\Chamilo\Libraries\Storage\Iterator\DataClassIterator
     */
    public function findTreeNodeAttempts(LearningPath $learningPath, User $user)
    {
        $treeNodeAttempts = $this->getFromStorage(DummyTreeNodeAttempt::class);

        return $treeNodeAttempts[$learningPath->getId()][$user->getId()];
    }

    /**
     * Finds all the TreeNodeAttempt objects for a given LearningPath
     *
     * @param LearningPath $learningPath
     *
     * @return \Chamilo\Libraries\Storage\Iterator\DataClassIterator | TreeNodeAttempt[]
     */
    public function findTreeNodeAttemptsForLearningPath(LearningPath $learningPath)
    {
        $treeNodeAttempts = $this->getFromStorage(DummyTreeNodeAttempt::class);
        $allTreeNodeAttempts = array();

        $treeNodeAttemptsForLearningPath = $treeNodeAttempts[$learningPath->getId()];

        foreach ($treeNodeAttemptsForLearningPath as $treeNodeAttempts)
        {
            if (is_array($treeNodeAttempts))
            {
                $allTreeNodeAttempts += $treeNodeAttempts;
            }
        }

        return $allTreeNodeAttempts;
    }

    /**
     * Finds a TreeNodeAttempt by a given LearningPathAttempt and TreeNode
     *
     * @param LearningPath $learningPath
     * @param TreeNode $treeNode
     * @param User $user
     *
     * @return TreeNodeAttempt|DataClass
     */
    public function findActiveTreeNodeAttempt(
        LearningPath $learningPath, TreeNode $treeNode, User $user
    )
    {
        /** @var DummyTreeNodeAttempt[][][] $treeNodeAttempts */
        $treeNodeAttempts = $this->getFromStorage(DummyTreeNodeAttempt::class);
        $treeNodeAttemptsForUser = $treeNodeAttempts[$learningPath->getId()][$user->getId()];

        foreach ($treeNodeAttemptsForUser as $treeNodeAttempt)
        {
            if ($treeNodeAttempt->getTreeNodeDataId() == $treeNode->getId() &&
                !$treeNodeAttempt->isCompleted()
            )
            {
                return $treeNodeAttempt;
            }
        }

        return null;
    }

    /**
     * Finds a TreeNodeAttempt by a given ID
     *
     * @param int $treeNodeAttemptId
     *
     * @return DataClass | TreeNodeAttempt
     */
    public function findTreeNodeAttemptById($treeNodeAttemptId)
    {
        /** @var DummyTreeNodeAttempt[][][] $treeNodeAttempts */
        $treeNodeAttempts = $this->getFromStorage(DummyTreeNodeAttempt::class);

        foreach($treeNodeAttempts as $learningPathId => $learningPathTreeNodeAttempts)
        {
            foreach($learningPathTreeNodeAttempts as $userId => $userTreeNodeAttempts)
            {
                if (array_key_exists($treeNodeAttemptId, $userTreeNodeAttempts))
                {
                    return $userTreeNodeAttempts[$treeNodeAttemptId];
                }
            }
        }

        return null;
    }

    /**
     * Finds the TreeNodeQuestionAttempt objects for a given TreeNodeAttempt
     *
     * @param TreeNodeAttempt $treeNodeAttempt
     *
     * @return TreeNodeQuestionAttempt[] | \Chamilo\Libraries\Storage\Iterator\DataClassIterator
     */
    public function findTreeNodeQuestionAttempts(TreeNodeAttempt $treeNodeAttempt)
    {
        /** @var DummyQuestionAttempt[][] $questionAttempts */
        $questionAttempts = $this->getFromStorage(DummyQuestionAttempt::class);

        return $questionAttempts[$treeNodeAttempt->getId()];
    }

    /**
     * @param DataClass $dataClass
     *
     * @return bool
     */
    public function create(DataClass $dataClass)
    {
        switch (get_class($dataClass))
        {
            case DummyTreeNodeAttempt::class:
                return $this->createDummyTreeNodeAttempt($dataClass);
            case DummyQuestionAttempt::class:
                return $this->createDummyQuestionAttempt($dataClass);
        }

        return false;
    }

    /**
     * @param DataClass $dataClass
     *
     * @return bool
     */
    public function update(DataClass $dataClass)
    {
        switch (get_class($dataClass))
        {
            case DummyTreeNodeAttempt::class:
                return $this->createDummyTreeNodeAttempt($dataClass);
            case DummyQuestionAttempt::class:
                return $this->createDummyQuestionAttempt($dataClass);
        }

        return false;
    }

    /**
     * @param DataClass $dataClass
     *
     * @return bool
     */
    public function delete(DataClass $dataClass)
    {
        switch (get_class($dataClass))
        {
            case DummyTreeNodeAttempt::class:
                return $this->deleteDummyTreeNodeAttempt($dataClass);
            case DummyQuestionAttempt::class:
                return $this->deleteDummyQuestionAttempt($dataClass);
        }

        return false;
    }

    /**
     * Creates a DummyTreeNodeAttempt
     *
     * @param DummyTreeNodeAttempt $dummyTreeNodeAttempt
     *
     * @return bool
     */
    protected function createDummyTreeNodeAttempt(DummyTreeNodeAttempt $dummyTreeNodeAttempt)
    {
        if (!$dummyTreeNodeAttempt->is_identified())
        {
            $dummyTreeNodeAttempt->setId(UUID::v4());
        }

        $treeNodeAttempts = $this->getFromStorage(DummyTreeNodeAttempt::class);
        $treeNodeAttempts[$dummyTreeNodeAttempt->getLearningPathId()][$dummyTreeNodeAttempt->getUserId()]
            [$dummyTreeNodeAttempt->getId()] = $dummyTreeNodeAttempt;

        $this->setInStorage(DummyTreeNodeAttempt::class, $treeNodeAttempts);

        return true;
    }

    /**
     * Deletes a DummyTreeNodeAttempt
     *
     * @param DummyTreeNodeAttempt $dummyTreeNodeAttempt
     *
     * @return bool
     */
    protected function deleteDummyTreeNodeAttempt(DummyTreeNodeAttempt $dummyTreeNodeAttempt)
    {
        $itemAttempts = $this->getFromStorage(DummyTreeNodeAttempt::class);
        unset(
            $itemAttempts[$dummyTreeNodeAttempt->getLearningPathId()]
                [$dummyTreeNodeAttempt->getUserId()][$dummyTreeNodeAttempt->getId()]
        );

        $this->setInStorage(DummyTreeNodeAttempt::class, $itemAttempts);

        return true;
    }

    /**
     * Creates a DummyQuestionAttempt
     *
     * @param DummyQuestionAttempt $dummyQuestionAttempt
     *
     * @return bool
     */
    protected function createDummyQuestionAttempt(DummyQuestionAttempt $dummyQuestionAttempt)
    {
        if (!$dummyQuestionAttempt->is_identified())
        {
            $dummyQuestionAttempt->setId(UUID::v4());
        }

        $questionAttempts = $this->getFromStorage(DummyQuestionAttempt::class);
        $questionAttempts[$dummyQuestionAttempt->getTreeNodeAttemptId()][$dummyQuestionAttempt->getId()] =
            $dummyQuestionAttempt;

        $this->setInStorage(DummyQuestionAttempt::class, $questionAttempts);

        return true;
    }

    /**
     * Deletes a DummyQuestionAttempt
     *
     * @param DummyQuestionAttempt $dummyQuestionAttempt
     *
     * @return bool
     */
    protected function deleteDummyQuestionAttempt(DummyQuestionAttempt $dummyQuestionAttempt)
    {
        $questionAttempts = $this->getFromStorage(DummyQuestionAttempt::class);
        unset($questionAttempts[$dummyQuestionAttempt->getTreeNodeAttemptId()][$dummyQuestionAttempt->getId()]);

        $this->setInStorage(DummyQuestionAttempt::class, $questionAttempts);

        return true;
    }

    /**
     * Retrieves all the LearningPathAttempt objects with the TreeNodeAttempt objects and
     * TreeNodeQuestionAttempt objects for a given learning path
     *
     * @param LearningPath $learningPath
     *
     * @return RecordIterator
     */
    public function findLearningPathAttemptsWithTreeNodeAttemptsAndTreeNodeQuestionAttempts(
        LearningPath $learningPath
    )
    {
        /** @var TreeNodeAttempt[][][] $treeNodeAttempts */
        $treeNodeAttempts = $this->getFromStorage(DummyTreeNodeAttempt::class);

        /** @var TreeNodeQuestionAttempt[][] $questionAttempts */
        $questionAttempts = $this->getFromStorage(DummyQuestionAttempt::class);

        $allData = array();

        foreach ($treeNodeAttempts as $learningPathId => $learningPathTreeNodeAttempts)
        {
            foreach ($learningPathTreeNodeAttempts as $userTreeNodeAttempts)
            {
                foreach($userTreeNodeAttempts as $treeNodeAttempt)
                {
                    $childQuestionAttempts = $questionAttempts[$treeNodeAttempt->getId()];
                    foreach ($childQuestionAttempts as $questionAttempt)
                    {
                        $allData[] = array(
                            TreeNodeAttempt::PROPERTY_USER_ID => $treeNodeAttempt->getUserId(),
                            TreeNodeAttempt::PROPERTY_LEARNING_PATH_ID => $treeNodeAttempt->getLearningPathId(),
                            'tree_node_attempt_id' => $treeNodeAttempt->getId(),
                            TreeNodeAttempt::PROPERTY_TREE_NODE_DATA_ID =>
                                $treeNodeAttempt->getTreeNodeDataId(),
                            TreeNodeAttempt::PROPERTY_START_TIME => $treeNodeAttempt->get_start_time(),
                            TreeNodeAttempt::PROPERTY_TOTAL_TIME => $treeNodeAttempt->get_total_time(),
                            TreeNodeAttempt::PROPERTY_SCORE => $treeNodeAttempt->get_score(),
                            TreeNodeAttempt::PROPERTY_COMPLETED => $treeNodeAttempt->isCompleted(),
                            'tree_node_question_attempt_id' => $questionAttempt->getId(),
                            TreeNodeQuestionAttempt::PROPERTY_QUESTION_COMPLEX_ID => $questionAttempt->get_question_complex_id(
                            ),
                            TreeNodeQuestionAttempt::PROPERTY_ANSWER => $questionAttempt->get_answer(),
                            TreeNodeQuestionAttempt::PROPERTY_FEEDBACK => $questionAttempt->get_feedback(),
                            TreeNodeQuestionAttempt::PROPERTY_SCORE => $questionAttempt->get_score(),
                            TreeNodeQuestionAttempt::PROPERTY_HINT => $questionAttempt->get_hint()
                        );
                    }
                }
            }
        }

        return new RecordIterator(TreeNodeAttempt::class_name(), $allData);
    }

    /**
     * Clears the cache for the LearningPathAttempt data class
     */
    public function clearTreeNodeAttemptCache()
    {
    }

    /**
     * Finds the LearningPathAttempt objects for a given LearningPath with a given condition, offset, count and orderBy
     * Joined with users for searching and sorting
     *
     * @param LearningPath $learningPath
     * @param int[] $treeNodeDataIds
     * @param Condition|null $condition
     * @param int $offset
     * @param int $count
     * @param array $orderBy
     *
     * @return RecordIterator
     */
    public function findLearningPathAttemptsWithUser(
        LearningPath $learningPath, $treeNodeDataIds = array(),
        Condition $condition = null, $offset = 0, $count = 0, $orderBy = array()
    )
    {
        return new RecordIterator(DummyTreeNodeAttempt::class, array());
    }

    /**
     * Counts the learning path attempts joined with users for searching
     *
     * @param LearningPath $learningPath
     * @param int[] $treeNodeDataIds
     * @param Condition $condition
     *
     * @return int
     */
    public function countLearningPathAttemptsWithUser(
        LearningPath $learningPath, $treeNodeDataIds = array(), Condition $condition = null
    )
    {
        return 0;
    }

    /**
     * Finds the targeted users (left) joined with the learning path attempts
     *
     * @param LearningPath $learningPath
     * @param array $treeNodeDataIds
     * @param Condition $condition
     * @param int $offset
     * @param int $count
     * @param array $orderBy
     *
     * @return RecordIterator
     */
    public function findTargetUsersWithLearningPathAttempts(
        LearningPath $learningPath, $treeNodeDataIds = array(),
        Condition $condition = null, $offset = 0, $count = 0, $orderBy = array()
    )
    {
        return new RecordIterator(User::class_name(), array());
    }

    /**
     * Counts the targeted users (left) joined with the learning path attempts
     *
     * @param LearningPath $learningPath
     * @param Condition $condition
     *
     * @return int
     */
    public function countTargetUsersForLearningPath(LearningPath $learningPath, Condition $condition = null)
    {
        return 0;
    }

}


text:
package com.slugterra.dimension;

import java.util.Random;

import net.minecraft.entity.Entity;
import net.minecraft.world.Teleporter;
import net.minecraft.world.WorldServer;

public class TeleporterSlugterra extends Teleporter {

	private final WorldServer worldServerInstance;
	private final Random random;

	public TeleporterSlugterra(WorldServer world) {
		super(world);

		worldServerInstance = world;
		random = new Random(world.getSeed());
	}

	@Override
	public boolean makePortal(Entity ent)
	{
		return false;
	}
}


text:
<?php

namespace common\models\settlement;

use Decimal\Decimal;

interface PayInterface extends TransferType, PayedInterface {

	public function getValue(): Decimal;

	public function getVAT(): ?Decimal;

	public function getStatus(): ?int;

}


text:
#include <graphlab/util/event_log.hpp>
#include <graphlab/util/timer.hpp>
#include <graphlab/logger/assertions.hpp>

#define EVENT_BAR_WIDTH 40
#define BAR_CHARACTER '#'

namespace graphlab {

static std::ofstream eventlog_file;
static mutex eventlog_file_mutex;
static bool eventlog_file_open = false;

static timer event_timer;
static bool event_timer_started = false;
static mutex event_timer_mutex;

void event_log::initialize(std::ostream &ostrm,
                           size_t flush_interval_ms,
                           event_print_type event_print) {
  m.lock();
  out = &ostrm;
  flush_interval = flush_interval_ms;
  print_method = event_print;

  event_timer_mutex.lock();
  if (event_timer_started == false) {
    event_timer_started = true;
    event_timer.start();
  }
  event_timer_mutex.unlock();
  prevtime = event_timer.current_time_millis();

  cond.signal();
  m.unlock();

  if (event_print == LOG_FILE) {
    eventlog_file_mutex.lock();
    if (!eventlog_file_open) {
      eventlog_file_open = true;
      eventlog_file.open("eventlog.txt");
    }
    out = &eventlog_file;
    eventlog_file_mutex.unlock();
  }

}

event_log::~event_log() {
  finished = true;
  m.lock();
  cond.signal();
  m.unlock();
  printing_thread.join();
  if (print_method != LOG_FILE) {
    size_t pos;
    if (hascounter.first_bit(pos)) {
      do {
        (*out) << descriptions[pos]  << ":\t" << totalcounter[pos].value << " Events\n";
      } while(hascounter.next_bit(pos));
    }
  }
  else{
    size_t pos;
    if (hascounter.first_bit(pos)) {
      do {
        std::cout << descriptions[pos]  << ":\t" << totalcounter[pos].value << " Events\n";
      } while(hascounter.next_bit(pos));
    }
  }
}

void event_log::immediate_event(unsigned char eventid) {
  m.lock();
  immediate_events.push_back(std::make_pair(eventid, event_timer.current_time_millis()));
  m.unlock();
}

void event_log::close() {
  out = NULL;
  m.lock();
  flush_interval = 0;
  m.unlock();
}

void event_log::add_event_type(unsigned char eventid,
                               std::string description) {
  descriptions[eventid] = description;
  max_desc_length = std::max(max_desc_length, description.length());
  ASSERT_MSG(max_desc_length <= 30, "Event Description length must be <= 30 characters");
  counters[eventid].value = 0;
  hascounter.set_bit(eventid);
}

void event_log::add_immediate_event_type(unsigned char eventid, std::string description) {
  descriptions[eventid] = description;
  max_desc_length = std::max(max_desc_length, description.length());
  ASSERT_MSG(max_desc_length <= 30, "Event Description length must be <= 30 characters");
  counters[eventid].value = 0;
}

void event_log::flush() {
  size_t pos;
  if (!hascounter.first_bit(pos)) return;
  double curtime = event_timer.current_time_millis();
  double timegap = curtime - prevtime;
  prevtime = curtime;

  if (hasevents == false && noeventctr == 1) return;

  bool found_events = false;
  if (print_method == NUMBER) {
    do {
      size_t ctrval = counters[pos].exchange(0);
      found_events = found_events || ctrval > 0;
      (*out) << pos  << ":\t" << curtime << "\t" << ctrval << "\t" << 1000 * ctrval / timegap << " /s\n";
    } while(hascounter.next_bit(pos));
    // flush immediate events
    if (!immediate_events.empty()) {
      std::vector<std::pair<unsigned char, size_t> > cur;
      cur.swap(immediate_events);
      for (size_t i = 0;i < cur.size(); ++i) {
        (*out) << (size_t)cur[i].first << ":\t" << cur[i].second << "\t" << -1 << "\t" << 0 << " /s\n";
      }
    }
    out->flush();
  }
  else if (print_method == DESCRIPTION) {
    do {
      size_t ctrval = counters[pos].exchange(0);
      found_events = found_events || ctrval > 0;
      (*out) << descriptions[pos]  << ":\t" << curtime << "\t" << ctrval << "\t" << 1000 * ctrval / timegap << " /s\n";
    } while(hascounter.next_bit(pos));
    if (!immediate_events.empty()) {
      std::vector<std::pair<unsigned char, size_t> > cur;
      cur.swap(immediate_events);
      for (size_t i = 0;i < cur.size(); ++i) {
        (*out) << descriptions[cur[i].first] << ":\t" << cur[i].second << "\t" << -1 << "\t" << 0 << " /s\n";
      }
    }
    out->flush();
  }
  else if (print_method == LOG_FILE) {
    eventlog_file_mutex.lock();
    do {
      size_t ctrval = counters[pos].exchange(0);
      found_events = found_events || ctrval > 0;
      (*out) << descriptions[pos]  << ":\t" << curtime << "\t" << ctrval << "\t" << 1000 * ctrval / timegap << "\n";
    } while(hascounter.next_bit(pos));
    if (!immediate_events.empty()) {
      std::vector<std::pair<unsigned char, size_t> > cur;
      cur.swap(immediate_events);
      for (size_t i = 0;i < cur.size(); ++i) {
        (*out) << descriptions[cur[i].first] << ":\t" << cur[i].second << "\t" << -1 << "\t" << 0 << " /s\n";
      }
    }
    eventlog_file_mutex.unlock();
    out->flush();
  }
  else if (print_method == RATE_BAR) {
    (*out) << "Time: " << "+"<<timegap << "\t" << curtime << "\n";
    char spacebuf[60];
    char pbuf[61];
    memset(spacebuf, ' ', EVENT_BAR_WIDTH);
    memset(pbuf, BAR_CHARACTER, 60);
    do {
      size_t ctrval = counters[pos].exchange(0);
      found_events = found_events || ctrval > 0;
      maxcounter[pos] = std::max(maxcounter[pos], ctrval);
      size_t barlen = 0;
      size_t mc = maxcounter[pos];
      if (mc > 0) barlen = ctrval * EVENT_BAR_WIDTH / mc;
      if (barlen > EVENT_BAR_WIDTH) barlen = EVENT_BAR_WIDTH;

      pbuf[barlen] = '\0';
      spacebuf[max_desc_length - descriptions[pos].length() + 1] = 0;
      (*out) << descriptions[pos]  << spacebuf << "|" << pbuf;
      spacebuf[max_desc_length - descriptions[pos].length() + 1] =' ';
      pbuf[barlen] = BAR_CHARACTER;
      // now print the remaining spaces
      spacebuf[EVENT_BAR_WIDTH - barlen] = '\0';
      (*out) << spacebuf << "| " << ctrval << " : " << mc << " \n";
      spacebuf[EVENT_BAR_WIDTH - barlen] = ' ';

    } while(hascounter.next_bit(pos));
    out->flush();
  }
  if (found_events == false) {
      ++noeventctr;
  }
  else {
      noeventctr = 0;
  }
  hasevents = false;

}

void event_log::thread_loop() {
  m.lock();
  while(!finished) {
    if (flush_interval == 0) {
      cond.wait(m);
    }
    else {
      m.unlock();
      my_sleep_ms(flush_interval);
      m.lock();
      if (flush_interval > 0) flush();
    }
  }
  m.unlock();
}

} // namespace


text:
require "middleman-neat/version"

module MiddlemanNeat

  class << self
    def registered(app)
      require "neat"
      gem_dir = Gem::Specification.find_by_name("neat").gem_dir
      Sass.load_paths << File.expand_path("./app/assets/stylesheets", gem_dir)
    end
    alias :included :registered
  end
end

::Middleman::Extensions.register(:neat, MiddlemanNeat)


text:
package liquibase.change.core;

import liquibase.change.*;
import liquibase.database.Database;
import liquibase.database.core.DB2Database;
import liquibase.snapshot.SnapshotGeneratorFactory;
import liquibase.statement.SqlStatement;
import liquibase.statement.core.RenameTableStatement;
import liquibase.statement.core.ReorganizeTableStatement;
import liquibase.structure.core.Table;

import java.util.ArrayList;
import java.util.List;

/**
 * Renames an existing table.
 */
@DatabaseChange(name="renameTable", description = "Renames an existing table", priority = ChangeMetaData.PRIORITY_DEFAULT, appliesTo = "table")
public class RenameTableChange extends AbstractChange {

    private String catalogName;
    private String schemaName;
    private String oldTableName;

    private String newTableName;

    public RenameTableChange() {
    }

    @DatabaseChangeProperty(mustEqualExisting ="table.catalog")
    public String getCatalogName() {
        return catalogName;
    }

    public void setCatalogName(String catalogName) {
        this.catalogName = catalogName;
    }

    @DatabaseChangeProperty(mustEqualExisting ="table.schema")
    public String getSchemaName() {
        return schemaName;
    }

    public void setSchemaName(String schemaName) {
        this.schemaName = schemaName;
    }

    @DatabaseChangeProperty(mustEqualExisting = "table", description = "Name of the table to rename", exampleValue = "person")
    public String getOldTableName() {
        return oldTableName;
    }

    public void setOldTableName(String oldTableName) {
        this.oldTableName = oldTableName;
    }

    @DatabaseChangeProperty(description = "New name for the table", exampleValue = "employee")
    public String getNewTableName() {
        return newTableName;
    }

    public void setNewTableName(String newTableName) {
        this.newTableName = newTableName;
    }

    @Override
    public SqlStatement[] generateStatements(Database database) {
        List<SqlStatement> statements = new ArrayList<>();
        statements.add(new RenameTableStatement(getCatalogName(), getSchemaName(), getOldTableName(), getNewTableName()));
        if (database instanceof DB2Database) {
            statements.add(new ReorganizeTableStatement(getCatalogName(), getSchemaName(), getNewTableName()));
        }

        return statements.toArray(new SqlStatement[statements.size()]);
    }

    @Override
    public ChangeStatus checkStatus(Database database) {
        try {
            ChangeStatus changeStatus = new ChangeStatus();
            Table newTable = SnapshotGeneratorFactory.getInstance().createSnapshot(new Table(getCatalogName(), getSchemaName(), getNewTableName()), database);
            Table oldTable = SnapshotGeneratorFactory.getInstance().createSnapshot(new Table(getCatalogName(), getSchemaName(), getOldTableName()), database);

            if ((newTable == null) && (oldTable == null)) {
                return changeStatus.unknown("Neither table exists");
            }
            if ((newTable != null) && (oldTable != null)) {
                return changeStatus.unknown("Both tables exist");
            }
            changeStatus.assertComplete(newTable != null, "New table does not exist");

            return changeStatus;
        } catch (Exception e) {
            return new ChangeStatus().unknown(e);
        }

    }

    @Override
    protected Change[] createInverses() {
        RenameTableChange inverse = new RenameTableChange();
        inverse.setSchemaName(getSchemaName());
        inverse.setOldTableName(getNewTableName());
        inverse.setNewTableName(getOldTableName());

        return new Change[]{
                inverse
        };
    }

    @Override
    public String getConfirmationMessage() {
        return "Table " + oldTableName + " renamed to " + newTableName;
    }

    @Override
    public String getSerializedObjectNamespace() {
        return STANDARD_CHANGELOG_NAMESPACE;
    }
}


text:
package org.dasein.cloud.joyent.compute;

import org.dasein.cloud.*;
import org.dasein.cloud.compute.*;
import org.dasein.cloud.joyent.SmartDataCenter;

import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import java.util.Collections;
import java.util.Locale;

/**
 * Describes the capabilities of Joyent with respect to Dasein image operations.
 *
Created by Stas Maksimov: 10/03/2014 10:18

 *
 * @author Stas Maksimov
 * @version 2014.03 initial version
 * @since 2014.03
 */
public class DatasetCapabilities extends AbstractCapabilities<SmartDataCenter> implements ImageCapabilities {
    public DatasetCapabilities(SmartDataCenter provider) {
        super(provider);
    }

    @Override
    public boolean canBundle(@Nonnull VmState fromState) throws CloudException, InternalException {
        return false;
    }

    @Override
    public boolean canImage(@Nonnull VmState fromState) throws CloudException, InternalException {
        return VmState.RUNNING.equals(fromState) || VmState.STOPPED.equals(fromState);
    }

    @Nonnull
    @Override
    public String getProviderTermForImage(@Nonnull Locale locale, @Nonnull ImageClass cls) {
        return "image";
    }

    @Nonnull
    @Override
    public String getProviderTermForCustomImage(@Nonnull Locale locale, @Nonnull ImageClass cls) {
        return getProviderTermForImage(locale, cls);
    }

    @Nullable @Override
    public VisibleScope getImageVisibleScope() {
        return null;
    }

    @Nonnull
    @Override
    public Requirement identifyLocalBundlingRequirement() throws CloudException, InternalException {
        return Requirement.NONE;
    }

    @Nonnull
    @Override
    public Iterable<MachineImageFormat> listSupportedFormats() throws CloudException, InternalException {
        return Collections.emptyList();
    }

    @Nonnull
    @Override
    public Iterable<MachineImageFormat> listSupportedFormatsForBundling() throws CloudException, InternalException {
        return Collections.emptyList();
    }

    @Nonnull
    @Override
    public Iterable<ImageClass> listSupportedImageClasses() throws CloudException, InternalException {
        return Collections.singletonList(ImageClass.MACHINE);
    }

    @Nonnull
    @Override
    public Iterable<MachineImageType> listSupportedImageTypes() throws CloudException, InternalException {
        return Collections.singletonList(MachineImageType.VOLUME);
    }

    @Override
    public boolean supportsDirectImageUpload() throws CloudException, InternalException {
        return false;
    }

    @Override
    public boolean supportsImageCapture(@Nonnull MachineImageType type) throws CloudException, InternalException {
        return true;
    }

    @Override
    public boolean supportsImageCopy(){return false;}

    @Override
    public boolean supportsImageSharing() throws CloudException, InternalException {
        return false;
    }

    @Override
    public boolean supportsImageSharingWithPublic() throws CloudException, InternalException {
        return false;
    }

    @Override
    public boolean supportsPublicLibrary(@Nonnull ImageClass cls) throws CloudException, InternalException {
        return ImageClass.MACHINE.equals(cls);
    }

    @Override
    public boolean supportsListingAllRegions(){return false;}
}


text:
package org.jclouds.openstack.nova.ec2.features;

import static com.google.common.collect.Sets.newTreeSet;
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertNotNull;
import static org.testng.Assert.fail;

import java.io.IOException;
import java.util.Map;
import java.util.Set;
import java.util.SortedSet;

import org.jclouds.compute.ComputeTestUtils;
import org.jclouds.compute.internal.BaseComputeServiceContextLiveTest;
import org.jclouds.ec2.domain.KeyPair;
import org.jclouds.openstack.nova.ec2.NovaEC2Api;
import org.jclouds.ssh.SshKeys;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;

/**
 * Tests behavior of {@code NovaKeyPairApi}
 */
@Test(groups = "live", singleThreaded = true)
public class NovaEC2KeyPairApiLiveTest extends BaseComputeServiceContextLiveTest {

   public static final String PREFIX = System.getProperty("user.name") + "-nova-ec2";

   public NovaEC2KeyPairApiLiveTest() {
      provider = "openstack-nova-ec2";
   }

   private NovaEC2KeyPairApi client;
   private Set<String> regions;

   @Override
   @BeforeClass(groups = { "integration", "live" })
   public void setupContext() {
      super.setupContext();
      client = view.unwrapApi(NovaEC2Api.class).getKeyPairApi().get();
      regions = view.unwrapApi(NovaEC2Api.class).getAvailabilityZoneAndRegionApi().get().describeRegions().keySet();
   }

   @Test
   void testDescribeKeyPairs() {
      for (String region : regions) {
         SortedSet<KeyPair> allResults = newTreeSet(client.describeKeyPairsInRegion(region));
         assertNotNull(allResults);
         if (allResults.size() >= 1) {
            KeyPair pair = allResults.last();
            SortedSet<KeyPair> result = newTreeSet(client.describeKeyPairsInRegion(region, pair.getKeyName()));
            assertNotNull(result);
            KeyPair compare = result.last();
            assertEquals(compare, pair);
         }
      }
   }

   @Test
   void testCreateKeyPair() {
      String keyName = PREFIX + "1";
      cleanupKeyPair(keyName);
      try {
         KeyPair keyPair = client.createKeyPairInRegion(null, keyName);
         checkKeyPair(keyName, keyPair);
         assertNotNull(keyPair.getKeyMaterial());
      } finally {
         cleanupKeyPair(keyName);
      }
   }

   protected void cleanupKeyPair(String keyName) {
      try {
         client.deleteKeyPairInRegion(null, keyName);
      } catch (Exception e) {

      }
      client.deleteKeyPairInRegion(null, keyName);
   }

   @Test
   void testImportKeyPair() throws IOException {
      String keyName = PREFIX + "2";
      cleanupKeyPair(keyName);
      Map<String, String> myKey = ComputeTestUtils.setupKeyPair();
      try {
         KeyPair keyPair = client.importKeyPairInRegion(null, keyName, myKey.get("public"));
         checkKeyPair(keyName, keyPair);

         // check the fingerprint of public key (in the sha10OfPrivateKey field)
         assertEquals(keyPair.getSha1OfPrivateKey(), SshKeys.fingerprintPublicKey(myKey.get("public")));

         // try again to see if there's an error
         try {
            client.importKeyPairInRegion(null, keyName, myKey.get("public"));
            fail("Duplicate call importKeyPairInRegion should have failed!");
         } catch (IllegalStateException e) {
         }
      } finally {
         cleanupKeyPair(keyName);
      }
   }

   protected void checkKeyPair(String keyName, KeyPair keyPair) {
      assertNotNull(keyPair);
      assertNotNull(keyPair.getSha1OfPrivateKey());
      assertEquals(keyPair.getKeyName(), keyName);

      Set<KeyPair> twoResults = client.describeKeyPairsInRegion(null, keyName);
      assertNotNull(twoResults);
      assertEquals(twoResults.size(), 1);
      KeyPair listPair = twoResults.iterator().next();
      assertEquals(listPair.getKeyName(), keyPair.getKeyName());
      assertEquals(listPair.getSha1OfPrivateKey(), keyPair.getSha1OfPrivateKey());
   }
}


text:
In Linux, there is a lot of choice in how you configure your system. The desktop environment is one area of choice.

GNOME and KDE are popular ones.

I frequently use XFCE as part of Xubuntu.

I'm interested in learning more about i3.

https://www.google.com/search?q=linux+rearrange+order+of+workspaces
linux rearrange order of workspaces - Google Search
https://unix.stackexchange.com/questions/145278/changing-the-order-of-workspaces-in-gnome-shell
gnome3 - Changing the order of workspaces in Gnome Shell - Unix & Linux Stack Exchange
https://extensions.gnome.org/extension/484/workspace-grid/
Workspace Grid - GNOME Shell Extensions
https://extensions.gnome.org/extension/1485/workspace-matrix/
Workspace Matrix - GNOME Shell Extensions
https://www.google.com/search?q=gnome3+workspace+order
gnome3 workspace order - Google Search
https://www.google.com/search?q=GNOME+Shell
GNOME Shell - Google Search
https://en.wikipedia.org/wiki/GNOME_Shell
GNOME Shell - Wikipedia
https://github.com/mzur/gnome-shell-wsmatrix
mzur/gnome-shell-wsmatrix: GNOME shell extension to arrange workspaces in a two dimensional grid with workspace thumbnails
https://github.com/linuxmint/Cinnamon/issues/1422
Option to move(drag to reorder) workspaces. · Issue #1422 · linuxmint/cinnamon
https://askubuntu.com/questions/135058/is-it-possible-to-reorder-my-workspaces
compiz - Is it possible to reorder my workspaces? - Ask Ubuntu
https://www.google.com/search?q=cairo-dock&oq=Cairo-dock&aqs=chrome.0.0l6.703j0j7&client=ubuntu&sourceid=chrome&ie=UTF-8
cairo-dock - Google Search
http://glx-dock.org/
Glx-Dock / Cairo-Dock - Home


text:
<?php
defined('BASEPATH') OR exit('No direct script access allowed');

// default controller for this module
$route['advertiser'] = 'home';


text:
<?php
/**
 * Created by PhpStorm.
 * User: ryanfrank
 * Date: 10/2/17
 * Time: 5:50 PM
 */
?>
<?php $data = json_encode($rehabbers->result()); ?>

Search for Rehabber

            <table id="rehabberTable"
                   data-search="true"
                <?php if ( $this->ion_auth->logged_in() ) { echo "data-detail-view=\"true\""; } ?>
                <?php if ( $this->ion_auth->logged_in() ) { echo "data-detail-formatter=\"detailFormatter\""; } ?>
                   data-striped="true"
                   data-show-refresh="true"
                   data-show-toggle="true"
                   data-show-columns="true"
                   data-show-export="false"
                   data-minimum-count-columns="2"
                   data-show-pagination-switch="true"
                   data-pagination="true"
                   data-id-field="rehabber_name"
                   data-page-list="[10, 25, 50, 100, ALL]"
                   data-show-footer="false" >


text:
package mx.com.gapsi.eventos.model;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.Lob;
import javax.persistence.ManyToMany;
import javax.persistence.OneToMany;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

//ID_EVENTO 	INT  NOT NULL PRIMARY  KEY,
//NOMBRE 	    VARCHAR(100) NOT NULL,
//DESCRIPCION	VARCHAR(100),
//LLAVE_EVENTO	VARCHAR(50),
//LLAVE_SECRETO	VARCHAR(50),
//TOTAL_ASIENTOS INT

@Entity
@Table(name="EVENTO")
public class Evento implements Serializable {
	/**
	 *
	 */
	private static final long serialVersionUID = 3988898104477742767L;

	@Id
	@SequenceGenerator(name="EVENTO_IDEVENTO_GENERATOR", sequenceName="EVENTO_SEQ")
	@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="EVENTO_IDEVENTO_GENERATOR")
	@Column(name="ID_EVENTO")
	private Integer id;

	private String nombre;
	private String descripcion;
	private String lugar;
	private Date fecha;

	@Column(name = "SUBJECT_EMAIL")
	private String subjectEmail;

	@Column(name = "LLAVE_EVENTO")
	private String llaveEvento;

	@Column(name = "LLAVE_SECRETA")
	private String llaveSecreta;

	@Column(name= "LLAVE_PUBLICA")
	private String llavePublica;

	@Column(name = "TOTAL_ASIENTOS")
	private int totalAsientos;

	@Lob
    @Basic(fetch = FetchType.LAZY)
	@Column(name = "IMAGEN_INVITACION")
	private byte[] imagenInvitacion;

	@Column(name="IMAGEN_QR_X")
	private int imagenQRX;

	@Column(name="IMAGEN_QR_y")
	private int imagenQRY;

	//bi-directional many-to-one association to EventoInvitado
	@OneToMany(mappedBy="evento")
	private List<EventoInvitado> eventoInvitados;

	@ManyToMany(fetch=FetchType.LAZY)
    @JoinTable(name="EVENTO_INVITADO",
            joinColumns=
            @JoinColumn(name="ID_EVENTO", referencedColumnName="ID_EVENTO"),
      inverseJoinColumns=
            @JoinColumn(name="ID_INVITADO", referencedColumnName="ID_INVITADO")
    )
    private List<Invitado> invitados;

	public Evento() {
		// TODO Auto-generated constructor stub
	}

	public Evento(Integer id, String nombre) {
		super();
		this.id = id;
		this.nombre = nombre;
	}

	public Evento(Integer id, String nombre, String descripcion, String llaveEvento, String llaveSecreta,
			int totalAsientos) {
		super();
		this.id = id;
		this.nombre = nombre;
		this.descripcion = descripcion;
		this.llaveEvento = llaveEvento;
		this.llaveSecreta = llaveSecreta;
		this.totalAsientos = totalAsientos;
	}

	/**
	 * @return the id
	 */
	public Integer getId() {
		return id;
	}

	/**
	 * @param id the id to set
	 */
	public void setId(Integer id) {
		this.id = id;
	}

	/**
	 * @return the nombre
	 */
	public String getNombre() {
		return nombre;
	}

	/**
	 * @param nombre the nombre to set
	 */
	public void setNombre(String nombre) {
		this.nombre = nombre;
	}

	/**
	 * @return the descripcion
	 */
	public String getDescripcion() {
		return descripcion;
	}

	/**
	 * @param descripcion the descripcion to set
	 */
	public void setDescripcion(String descripcion) {
		this.descripcion = descripcion;
	}

	/**
	 * @return the llaveEvento
	 */
	public String getLlaveEvento() {
		return llaveEvento;
	}

	/**
	 * @param llaveEvento the llaveEvento to set
	 */
	public void setLlaveEvento(String llaveEvento) {
		this.llaveEvento = llaveEvento;
	}

	/**
	 * @return the llaveSecreta
	 */
	public String getLlaveSecreta() {
		return llaveSecreta;
	}

	/**
	 * @param llaveSecreta the llaveSecreta to set
	 */
	public void setLlaveSecreta(String llaveSecreta) {
		this.llaveSecreta = llaveSecreta;
	}

	/**
	 * @return the totalAsientos
	 */
	public int getTotalAsientos() {
		return totalAsientos;
	}

	/**
	 * @param totalAsientos the totalAsientos to set
	 */
	public void setTotalAsientos(int totalAsientos) {
		this.totalAsientos = totalAsientos;
	}

	/* (non-Javadoc)
	 * @see java.lang.Object#hashCode()
	 */
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((id == null) ? 0 : id.hashCode());
		return result;
	}

	/* (non-Javadoc)
	 * @see java.lang.Object#equals(java.lang.Object)
	 */
	@Override
	public boolean equals(Object obj) {
		if (this == obj) {
			return true;
		}
		if (obj == null) {
			return false;
		}
		if (!(obj instanceof Evento)) {
			return false;
		}
		Evento other = (Evento) obj;
		if (id == null) {
			if (other.id != null) {
				return false;
			}
		} else if (!id.equals(other.id)) {
			return false;
		}
		return true;
	}

	/**
	 * @return the invitados
	 */
	public List<Invitado> getInvitados() {
		return invitados;
	}

	/**
	 * @param invitados the invitados to set
	 */
	public void setInvitados(List<Invitado> invitados) {
		this.invitados = invitados;
	}

	public EventoInvitado addEventoInvitado(EventoInvitado eventoInvitado) {
		getEventoInvitados().add(eventoInvitado);
		eventoInvitado.setEvento(this);

		return eventoInvitado;
	}

	public EventoInvitado removeEventoInvitado(EventoInvitado eventoInvitado) {
		getEventoInvitados().remove(eventoInvitado);
		eventoInvitado.setEvento(null);

		return eventoInvitado;
	}
	public List<EventoInvitado> getEventoInvitados() {
		return this.eventoInvitados;
	}

	public void setEventoInvitados(List<EventoInvitado> eventoInvitados) {
		this.eventoInvitados = eventoInvitados;
	}

	public String getLugar() {
		return lugar;
	}

	public void setLugar(String lugar) {
		this.lugar = lugar;
	}

	public Date getFecha() {
		return fecha;
	}

	public void setFecha(Date fecha) {
		this.fecha = fecha;
	}

	public String getSubjectEmail() {
		return subjectEmail;
	}

	public void setSubjectEmail(String subjectEmail) {
		this.subjectEmail = subjectEmail;
	}

	public String getLlavePublica() {
		return llavePublica;
	}

	public void setLlavePublica(String llavePublica) {
		this.llavePublica = llavePublica;
	}

	public byte[] getImagenInvitacion() {
		return imagenInvitacion;
	}

	public void setImagenInvitacion(byte[] imagenInvitacion) {
		this.imagenInvitacion = imagenInvitacion;
	}

	public int getImagenQRX() {
		return imagenQRX;
	}

	public void setImagenQRX(int imagenQRX) {
		this.imagenQRX = imagenQRX;
	}

	public int getImagenQRY() {
		return imagenQRY;
	}

	public void setImagenQRY(int imagenQRY) {
		this.imagenQRY = imagenQRY;
	}

	public boolean isHasSeatsMaps() {
		return  this.getLlaveEvento() != null && !this.getLlaveEvento().isEmpty() &&
				this.getLlavePublica() != null && !this.getLlavePublica().isEmpty() &&
				this.getLlaveSecreta() != null && !this.getLlaveSecreta().isEmpty();
	}

	/* (non-Javadoc)
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString() {
		return "Evento [id=" + id + ", nombre=" + nombre + ", descripcion=" + descripcion
				+ ", fecha=" + fecha + ", lugar=" + lugar + ", subject_email=" + subjectEmail
				+ ", llaveEvento=" + llaveEvento + ", llaveSecreta=" + llaveSecreta + ", llavePublica=" + llavePublica
				+ ", totalAsientos=" + totalAsientos + ", invitados="
				+ invitados + "]";
	}

}


text:
package org.apache.kylin.storage.hbase.ii.coprocessor.endpoint;

import static org.junit.Assert.assertEquals;

import java.io.IOException;

import org.apache.kylin.common.util.LocalFileMetadataTestCase;
import org.apache.kylin.invertedindex.IIInstance;
import org.apache.kylin.invertedindex.IIManager;
import org.apache.kylin.invertedindex.IISegment;
import org.apache.kylin.invertedindex.index.TableRecordInfo;
import org.apache.kylin.invertedindex.index.TableRecordInfoDigest;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;

/**
 */
public class TableRecordInfoTest extends LocalFileMetadataTestCase {
    IIInstance ii;
    TableRecordInfo tableRecordInfo;

    @Before
    public void setup() throws IOException {
        this.createTestMetadata();
        this.ii = IIManager.getInstance(getTestConfig()).getII("test_kylin_ii_left_join");
        if (ii.getFirstSegment() == null) {
            IISegment segment = IIManager.getInstance(getTestConfig()).buildSegment(ii, 0, System.currentTimeMillis());
            ii.getSegments().add(segment);
        }
        this.tableRecordInfo = new TableRecordInfo(ii.getFirstSegment());
    }

    @Test
    public void testSerialize() {
        byte[] x = TableRecordInfoDigest.serialize(this.tableRecordInfo.getDigest());
        TableRecordInfoDigest d = TableRecordInfoDigest.deserialize(x);
        assertEquals(d.getColumnCount(), 25);
    }

    @After
    public void cleanUp() {
        cleanupTestMetadata();
    }
}


text:
#include "tensorflow/contrib/util/convert_graphdef_memmapped_format_lib.h"

#include <unordered_set>
#include "tensorflow/core/framework/attr_value.pb.h"
#include "tensorflow/core/framework/graph.pb.h"
#include "tensorflow/core/framework/node_def.pb.h"
#include "tensorflow/core/framework/register_types.h"
#include "tensorflow/core/framework/tensor.h"
#include "tensorflow/core/framework/tensor.pb.h"
#include "tensorflow/core/framework/tensor_shape.pb.h"
#include "tensorflow/core/framework/types.pb.h"
#include "tensorflow/core/kernels/immutable_constant_op.h"
#include "tensorflow/core/platform/env.h"
#include "tensorflow/core/platform/logging.h"
#include "tensorflow/core/util/memmapped_file_system_writer.h"

namespace tensorflow {
namespace {
class NodeConverter {
 public:
  // Converts one node. In-place updates node_def, writes the tensor in
  // memmapped
  // format, using writer. If the conversion has been done, convert_counter is
  // increased.
  Status ConvertConstantsToImmutable(NodeDef* node_def,
                                     MemmappedFileSystemWriter* writer,
                                     int* convert_counter,
                                     int min_conversion_size_bytes) {
    // Check the size.
    const AttrValue& value = node_def->attr().at("value");
    const TensorProto& tensor_proto = value.tensor();

    // Create copies of tensor datatype and shape, to put into the operator
    // after
    // the tensor is destroyed.
    const DataType tensor_data_type = tensor_proto.dtype();
    const TensorShapeProto tensor_shape = tensor_proto.tensor_shape();

    // Check that the tensor type is POD, only these types are supported for
    // memmapping.
    // DataType enum is explicitly converted to int to avoid errors with passing
    // enum type are a parameter type to std::unordered_set.
    static std::unordered_set<int> supported_types{
#define TYPE_FOR_SET(type) static_cast<int>(DataTypeToEnum<type>::value),
        TF_CALL_POD_TYPES(TYPE_FOR_SET)
#undef ADD_TYPE
    };

    if (supported_types.count(static_cast<int>(tensor_data_type)) == 0) {
      return Status::OK();
    }

    // Create Tensor from value and write it in memmapped format.
    Tensor parsed(tensor_proto.dtype());
    if (!parsed.FromProto(cpu_allocator(), tensor_proto)) {
      return errors::InvalidArgument("Cannot parse tensor from proto: ",
                                     tensor_proto.DebugString());
    }
    if (parsed.TotalBytes() < static_cast<size_t>(min_conversion_size_bytes)) {
      return Status::OK();
    }

    const string memmapped_region_name =
        MemmappedFileSystem::kMemmappedPackagePrefix +
        ConvertVariableNameToUniqueRegionName(node_def->name());

    TF_RETURN_IF_ERROR(writer->SaveTensor(parsed, memmapped_region_name));

    node_def->set_op("ImmutableConst");

    // Erase all attributes and leave only attributes that can be understood by
    // ImmutableConst.
    auto* mutable_attr = node_def->mutable_attr();
    mutable_attr->clear();

    {
      AttrValue attr_value;
      attr_value.set_type(tensor_data_type);
      mutable_attr->insert({ImmutableConstantOp::kDTypeAttr, attr_value});
    }
    {
      AttrValue attr_value;
      *(attr_value.mutable_shape()) = tensor_shape;
      mutable_attr->insert({ImmutableConstantOp::kShapeAttr, attr_value});
    }
    {
      AttrValue attr_value;
      attr_value.set_s(memmapped_region_name);
      mutable_attr->insert(
          {ImmutableConstantOp::kMemoryRegionNameAttr, attr_value});
    }
    ++*convert_counter;
    return Status::OK();
  }

 private:
  string ConvertVariableNameToUniqueRegionName(const string& variable_name) {
    string region_name = SanitizeVariableName(variable_name);
    while (!used_names_.insert(region_name).second) {
      region_name += '_';
    }
    return region_name;
  }

  static string SanitizeVariableName(const string& variable_name) {
    string result;
    for (char c : variable_name) {
      if ((c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z') ||
          (c >= '0' && c <= '9') || c == '_' || c == '.') {
        result += c;
      } else {
        result += '_';
      }
    }
    return result;
  }
  std::unordered_set<string> used_names_;
};

}  // namespace

// Loads the graph, replaces operators, and writes it out.
Status ConvertConstantsToImmutable(const string& in_graph_filename,
                                   const string& out_graph_filename,
                                   int min_conversion_size_bytes) {
  Env* default_env = Env::Default();
  GraphDef graph_def;
  const auto load_graph_status =
      ReadBinaryProto(default_env, in_graph_filename, &graph_def);
  if (!load_graph_status.ok()) {
    return tensorflow::errors::NotFound("Failed to load graph at '",
                                        in_graph_filename, "' : ",
                                        load_graph_status.error_message());
  }

  NodeConverter node_converter;

  // Create output writer.
  MemmappedFileSystemWriter writer;
  TF_RETURN_IF_ERROR(writer.InitializeToFile(default_env, out_graph_filename));

  // Iterate over graph nodes, looking for Const and replacing it with
  // ImmutableConst.
  int convert_counter = 0;
  for (int i = 0; i < graph_def.node_size(); ++i) {
    const NodeDef& node = graph_def.node(i);
    if (node.op() == "Const") {
      // Try to convert to ImmutableConst
      TF_RETURN_IF_ERROR(node_converter.ConvertConstantsToImmutable(
          graph_def.mutable_node(i), &writer, &convert_counter,
          min_conversion_size_bytes));
    }
  }
  TF_RETURN_IF_ERROR(writer.SaveProtobuf(
      graph_def, MemmappedFileSystem::kMemmappedPackageDefaultGraphDef));
  TF_RETURN_IF_ERROR(writer.FlushAndClose());
  LOG(INFO) << "Converted " << convert_counter << " nodes";
  return Status::OK();
}

}  // namespace tensorflow


text:
var memberships = document.getElementsByClassName("membership");
var first = memberships[0];
first.classList.add("no-top-border");


text:
<?xml version="1.0" encoding="utf-8"?>
<ImageView xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="80dp"
    android:layout_height="match_parent"
    android:orientation="vertical"
    android:src="@mipmap/add">

</ImageView>


text:
<?php
/*
Template Name: Frequently Asked Questions Template
*/
?>

  <?php if ( function_exists('yoast_breadcrumb') ) {
yoast_breadcrumb('
','
');
} ?>

<?php while (have_posts()) : the_post(); ?>
<?php get_template_part('templates/page', 'header'); ?>
<?php get_template_part('templates/featured', 'image'); ?>
<?php get_template_part('templates/content', 'page'); ?>
<?php get_template_part('templates/content', 'faq'); ?>
<?php $callout = get_field('office_information');
if ($callout){
	include(locate_template('templates/callout.php'));
}
?>
<?php endwhile; ?>


text:
layout: post
microblog: true
audio:
photo:
date: 2017-04-30 21:18:04 -0700
guid: http://curt.micro.blog/2017/05/01/first-recognize-juice.html
---
"First, recognize juice for what it is: a treat. It doesn't belong at your breakfast table or in your post-workout routine. " [https://www.washingtonpost.com/posteverything/wp/2017/04/26/people-think-juice-is-good-for-them-theyre-wrong/](https://www.washingtonpost.com/posteverything/wp/2017/04/26/people-think-juice-is-good-for-them-theyre-wrong/)


text: default_app_config = 'tests.apps.TestsConfig'


text:
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) > [puppeteer](./puppeteer.md) > [Protocol](./puppeteer.protocol.md) > [Profiler](./puppeteer.protocol.profiler.md) > [CoverageRange](./puppeteer.protocol.profiler.coveragerange.md)

## Protocol.Profiler.CoverageRange interface

Coverage data for a source range.

<b>Signature:</b>

```typescript
export interface CoverageRange
```

## Properties

|  Property | Type | Description |
|  --- | --- | --- |
|  [count](./puppeteer.protocol.profiler.coveragerange.count.md) | [integer](./puppeteer.protocol.integer.md) | Collected execution count of the source range. |
|  [endOffset](./puppeteer.protocol.profiler.coveragerange.endoffset.md) | [integer](./puppeteer.protocol.integer.md) | JavaScript script source offset for the range end. |
|  [startOffset](./puppeteer.protocol.profiler.coveragerange.startoffset.md) | [integer](./puppeteer.protocol.integer.md) | JavaScript script source offset for the range start. |


text:
const assert = require('assert');
const { expect } = require('chai');
const jws = require('jws');
const idToken = require('../src/auth/idToken');

const secretHMAC = 'secret';
//openssl genrsa -out private.pem 2048
//openssl rsa -in private.pem -pubout -out public.pem
const privateKeyRSA = `-----BEGIN PRIVATE KEY-----
MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQC4ZtdaIrd1BPIJ
tfnF0TjIK5inQAXZ3XlCrUlJdP+XHwIRxdv1FsN12XyMYO/6ymLmo9ryoQeIrsXB
XYqlET3zfAY+diwCb0HEsVvhisthwMU4gZQu6TYW2s9LnXZB5rVtcBK69hcSlA2k
ZudMZWxZcj0L7KMfO2rIvaHw/qaVOE9j0T257Z8Kp2CLF9MUgX0ObhIsdumFRLaL
DvDUmBPr2zuh/34j2XmWwn1yjN/WvGtdfhXW79Ki1S40HcWnygHgLV8sESFKUxxQ
mKvPUTwDOIwLFL5WtE8Mz7N++kgmDcmWMCHc8kcOIu73Ta/3D4imW7VbKgHZo9+K
3ESFE3RjAgMBAAECggEBAJTEIyjMqUT24G2FKiS1TiHvShBkTlQdoR5xvpZMlYbN
tVWxUmrAGqCQ/TIjYnfpnzCDMLhdwT48Ab6mQJw69MfiXwc1PvwX1e9hRscGul36
ryGPKIVQEBsQG/zc4/L2tZe8ut+qeaK7XuYrPp8bk/X1e9qK5m7j+JpKosNSLgJj
NIbYsBkG2Mlq671irKYj2hVZeaBQmWmZxK4fw0Istz2WfN5nUKUeJhTwpR+JLUg4
ELYYoB7EO0Cej9UBG30hbgu4RyXA+VbptJ+H042K5QJROUbtnLWuuWosZ5ATldwO
u03dIXL0SH0ao5NcWBzxU4F2sBXZRGP2x/jiSLHcqoECgYEA4qD7mXQpu1b8XO8U
6abpKloJCatSAHzjgdR2eRDRx5PMvloipfwqA77pnbjTUFajqWQgOXsDTCjcdQui
wf5XAaWu+TeAVTytLQbSiTsBhrnoqVrr3RoyDQmdnwHT8aCMouOgcC5thP9vQ8Us
rVdjvRRbnJpg3BeSNimH+u9AHgsCgYEA0EzcbOltCWPHRAY7B3Ge/AKBjBQr86Kv
TdpTlxePBDVIlH+BM6oct2gaSZZoHbqPjbq5v7yf0fKVcXE4bSVgqfDJ/sZQu9Lp
PTeV7wkk0OsAMKk7QukEpPno5q6tOTNnFecpUhVLLlqbfqkB2baYYwLJR3IRzboJ
FQbLY93E8gkCgYB+zlC5VlQbbNqcLXJoImqItgQkkuW5PCgYdwcrSov2ve5r/Acz
FNt1aRdSlx4176R3nXyibQA1Vw+ztiUFowiP9WLoM3PtPZwwe4bGHmwGNHPIfwVG
m+exf9XgKKespYbLhc45tuC08DATnXoYK7O1EnUINSFJRS8cezSI5eHcbQKBgQDC
PgqHXZ2aVftqCc1eAaxaIRQhRmY+CgUjumaczRFGwVFveP9I6Gdi+Kca3DE3F9Pq
PKgejo0SwP5vDT+rOGHN14bmGJUMsX9i4MTmZUZ5s8s3lXh3ysfT+GAhTd6nKrIE
kM3Nh6HWFhROptfc6BNusRh1kX/cspDplK5x8EpJ0QKBgQDWFg6S2je0KtbV5PYe
RultUEe2C0jYMDQx+JYxbPmtcopvZQrFEur3WKVuLy5UAy7EBvwMnZwIG7OOohJb
vkSpADK6VPn9lbqq7O8cTedEHttm6otmLt8ZyEl3hZMaL3hbuRj6ysjmoFKx6CrX
rK0/Ikt5ybqUzKCMJZg2VKGTxg==
-----END PRIVATE KEY-----`;

//base date expressed in MS
//expected values for a good id token payload
const expectations = {
  clientId: 'tokens-test-123',
  clientIdAlt: 'external-test-999',
  issuer: 'https://tokens-test.auth0.com/',
  nonce: 'a1b2c3d4e5',
  clock: Date.now(),
};

//date helpers
const TODAY_IN_SECONDS = Math.floor(expectations.clock / 1000);
const ONE_DAY_IN_SECONDS = 3600 * 24;
function yesterday() {
  return TODAY_IN_SECONDS - ONE_DAY_IN_SECONDS;
}
function tomorrow() {
  return TODAY_IN_SECONDS + ONE_DAY_IN_SECONDS;
}
//good id token payload
const payload = {
  iss: expectations.issuer,
  sub: 'auth0|123456789',
  aud: [expectations.clientId, expectations.clientIdAlt],
  exp: tomorrow(),
  iat: yesterday(),
  nonce: expectations.nonce,
  azp: expectations.clientId,
  org_id: 'test|org',
  auth_time: TODAY_IN_SECONDS,
};

const defaultOptions = {
  issuer: expectations.issuer,
  audience: [expectations.clientId, expectations.clientIdAlt],
  nonce: expectations.nonce,
};

function generateJWT(bodyOverrides, alg) {
  const body = Object.assign({}, payload, bodyOverrides || {});
  alg = alg || 'RS256';
  const options = {
    header: { alg },
    payload: body,
  };
  if (alg === 'RS256') {
    options.privateKey = privateKeyRSA;
  } else if (alg === 'HS256') {
    options.secret = secretHMAC;
  }
  return jws.sign(options);
}

describe('idToken.decode', () => {
  it('should decode a valid token', () => {
    const alg = 'RS256';
    const token = generateJWT({ name: 'ÁÁutf8' }, alg);
    const decoded = idToken.decode(token);

    assert.equal(decoded._raw, token);
    assert.equal(decoded.header.alg, alg);

    Object.keys(payload).forEach((key) => {
      assert.deepEqual(payload[key], decoded.payload[key]);
    });
  });

  it('throws errors on invalid tokens', () => {
    const IDTOKEN_ERROR_MESSAGE = 'ID token could not be decoded';

    it('throws when there is more or less than 3 parts', () => {
      assert.throws(idToken.decode('test'), IDTOKEN_ERROR_MESSAGE);
      assert.throws(idToken.decode('test.'), IDTOKEN_ERROR_MESSAGE);
      assert.throws(idToken.decode('test.test'), IDTOKEN_ERROR_MESSAGE);
      assert.throws(idToken.decode('test.test.test.test'), IDTOKEN_ERROR_MESSAGE);
    });
    it('throws when there is no header', () => {
      assert.throws(idToken.decode('.test.test'), IDTOKEN_ERROR_MESSAGE);
    });
    it('throws when there is no payload', () => {
      assert.throws(idToken.decode('test..test'), IDTOKEN_ERROR_MESSAGE);
    });
    it('throws when there is no signature', () => {
      assert.throws(idToken.decode('test.test.'), IDTOKEN_ERROR_MESSAGE);
    });
  });
});

describe('idToken.validate', () => {
  let expectedOptions;

  beforeEach(() => {
    expectedOptions = Object.assign({}, defaultOptions);
    expectedOptions.audience = expectations.clientId;
    expectedOptions.maxAge = 123;
  });

  it('should throw when no id token is present', () => {
    expect(() => {
      idToken.validate();
    }).to.throw('ID token is required but missing');
  });
  it('should throw when no Issuer is present in the claim', () => {
    expect(() => {
      idToken.validate(generateJWT({ iss: undefined }));
    }).to.throw('Issuer (iss) claim must be a string present in the ID token');
  });
  it('should throw when the expected issuer is not in the claim', () => {
    expect(() => {
      idToken.validate(generateJWT({}), { issuer: 'ExpectedIssuer' });
    }).to.throw(
      'Issuer (iss) claim mismatch in the ID token; expected "ExpectedIssuer", found "https://tokens-test.auth0.com/"'
    );
  });
  it('should throw when the claim has no Subject', () => {
    expect(() => {
      idToken.validate(generateJWT({ sub: undefined }), defaultOptions);
    }).to.throw('Subject (sub) claim must be a string present in the ID token');
  });
  it('should throw when the alg is neither rs256 or hs256', () => {
    const token =
      'eyJhbGciOiJIUzUxMiJ9.eyJpc3MiOiJodHRwczovL3Rva2Vucy10ZXN0LmF1dGgwLmNvbS8iLCJzdWIiOiJhdXRoMHwxMjM0NTY3ODkiLCJhdWQiOiJ0b2tlbnMtdGVzdC0xMjMifQ.cZ4qDwoKdKQx8DtD-F-xVKCxd3rz58wSJh3k28z5qnpzm4x3xRiyHCuUvtxmL2aPdBQ37Zt8Mt5drd9hZhNzFQ';

    expect(() => {
      idToken.validate(token, defaultOptions);
    }).to.throw(
      'Signature algorithm of "HS512" is not supported. Expected the ID token to be signed with "RS256" or "HS256".'
    );
  });
  it('should throw when the audience is not a string or array', () => {
    expect(() => {
      idToken.validate(generateJWT({ aud: undefined }), defaultOptions);
    }).to.throw(
      'Audience (aud) claim must be a string or array of strings present in the ID token'
    );
  });
  it('should throw when claim audience is a String and not expected audience', () => {
    expect(() => {
      idToken.validate(generateJWT({ aud: 'notExpected' }), expectedOptions);
    }).to.throw(
      'Audience (aud) claim mismatch in the ID token; expected "tokens-test-123" but found "notExpected"'
    );
  });
  it('should throw when claim audience is an Array and not expected audience', () => {
    expect(() => {
      idToken.validate(generateJWT({ aud: ['notExpected'] }), expectedOptions);
    }).to.throw(
      'Audience (aud) claim mismatch in the ID token; expected "tokens-test-123" but was not one of "notExpected"'
    );
  });
  it('should throw when expected audience is not a String or Array', () => {
    expect(() => {
      idToken.validate(generateJWT({ aud: 10000 }), expectedOptions);
    }).to.throw(
      'Audience (aud) claim must be a string or array of strings present in the ID token'
    );
    expect(() => {
      idToken.validate(generateJWT({ aud: {} }), expectedOptions);
    }).to.throw(
      'Audience (aud) claim must be a string or array of strings present in the ID token'
    );
  });
  it('should throw when azp claim not found when aud has multiple values', () => {
    expect(() => {
      idToken.validate(generateJWT({ azp: undefined }), expectedOptions);
    }).to.throw(
      'Authorized Party (azp) claim must be a string present in the ID token when Audience (aud) claim has multiple values'
    );
  });
  it('should throw when azp claim doesnt match the expected aud', () => {
    expectedOptions.audience = expectations.clientIdAlt;

    expect(() => {
      idToken.validate(generateJWT({}), expectedOptions);
    }).to.throw(
      'Authorized Party (azp) claim mismatch in the ID token; expected "external-test-999", found "tokens-test-123"'
    );
  });
  it('should throw when nonce is in options, but missing from claim', () => {
    expect(() => {
      idToken.validate(generateJWT({ nonce: undefined }), expectedOptions);
    }).to.throw('Nonce (nonce) claim must be a string present in the ID token');
  });
  it('should throw when nonce claim doesnt match nonce expected', () => {
    expectedOptions.nonce = 'noncey';

    expect(() => {
      idToken.validate(generateJWT({ nonce: 'notExpectedNonce' }), expectedOptions);
    }).to.throw(
      'Nonce (nonce) claim mismatch in the ID token; expected "noncey", found "notExpectedNonce"'
    );
  });
  it('should throw when nonce claim is not a string', () => {
    expect(() => {
      idToken.validate(generateJWT({ nonce: 10000 }), expectedOptions);
    }).to.throw('Nonce (nonce) claim must be a string present in the ID token');
    expect(() => {
      idToken.validate(generateJWT({ nonce: {} }), expectedOptions);
    }).to.throw('Nonce (nonce) claim must be a string present in the ID token');
  });
  it('should throw when auth_time is not a number', () => {
    expect(() => {
      idToken.validate(generateJWT({ auth_time: undefined }), expectedOptions);
    }).to.throw(
      'Authentication Time (auth_time) claim must be a number present in the ID token when Max Age (max_age) is specified'
    );
  });
  it('should throw when exp is not a number', () => {
    expect(() => {
      idToken.validate(generateJWT({ exp: 'not a number' }), expectedOptions);
    }).to.throw('Expiration Time (exp) claim must be a number present in the ID token');
  });
  it('should throw when exp has passed', () => {
    expect(() => {
      idToken.validate(generateJWT({ exp: yesterday() }), expectedOptions);
    }).to.throw('is after expiration time');
  });
  it('should throw when idtoken indicates too much time has passed', () => {
    expect(() => {
      idToken.validate(generateJWT({ auth_time: yesterday() }), expectedOptions);
    }).to.throw(
      'Authentication Time (auth_time) claim in the ID token indicates that too much time has passed since the last end-user authentication.'
    );
  });
  it('should throw when organization is in options, but org_id missing from claim', () => {
    expectedOptions.organization = 'testorg';

    expect(() => {
      idToken.validate(generateJWT({ org_id: undefined }), expectedOptions);
    }).to.throw('Organization Id (org_id) claim must be a string present in the ID token');
  });
  it('should throw when org claim doesnt match org expected', () => {
    expectedOptions.organization = 'testorg';

    expect(() => {
      idToken.validate(generateJWT({ org_id: 'notExpectedOrg' }), expectedOptions);
    }).to.throw(
      'Organization Id (org_id) claim value mismatch in the ID token; expected "testorg", found "notExpectedOrg'
    );
  });
  it('should NOT throw when org_id matches expected organization', () => {
    expectedOptions.organization = 'testorg';

    expect(() => {
      idToken.validate(generateJWT({ org_id: 'testorg' }), expectedOptions);
    }).not.to.throw();
  });
});


text:
<?php

use yii\helpers\Html;
use yii\widgets\ActiveForm;

/* @var $this yii\web\View */
/* @var $model common\models\OrderSearch */
/* @var $form yii\widgets\ActiveForm */
?>

    <?php $form = ActiveForm::begin([
        'action' => ['index'],
        'method' => 'get',
    ]); ?>

    <?= $form->field($model, 'id') ?>

    <?= $form->field($model, 'user_id') ?>

    <?= $form->field($model, 'status') ?>

    <?= $form->field($model, 'name_buyer') ?>

    <?= $form->field($model, 'phone_buyer') ?>

    <?php // echo $form->field($model, 'address_buyer') ?>

    <?php // echo $form->field($model, 'email_buyer') ?>

    <?php // echo $form->field($model, 'email_receiver') ?>

    <?php // echo $form->field($model, 'name_receiver') ?>

    <?php // echo $form->field($model, 'phone_receiver') ?>

    <?php // echo $form->field($model, 'address_receiver') ?>

    <?php // echo $form->field($model, 'total') ?>

    <?php // echo $form->field($model, 'total_number') ?>

    <?php // echo $form->field($model, 'created_at') ?>

    <?php // echo $form->field($model, 'note') ?>

    <?php // echo $form->field($model, 'updated_at') ?>

        <?= Html::submitButton('Search', ['class' => 'btn btn-primary']) ?>
        <?= Html::resetButton('Reset', ['class' => 'btn btn-default']) ?>

    <?php ActiveForm::end(); ?>


text:
package continuum.tree;

/**
 * Created by zack on 3/13/16.
 */

public interface Consumer<V> {
    boolean visitTree(int level, Tree<V> tree);
    boolean visitNode(int level, Tree<V> parent, V data);
}