text:
require 'spec_helper'

describe Location do
  context '::id_where_case_insensitive_value, ::id_where_ILIKE_value' do
    context 'w 1 location' do
      before do
        @o0 = cr(name: 'Oxford', description: 'seaside')
        @id0 = @o0.id
      end
      it 'w search term length equal to value length' do
        expect(Location.id_where_case_insensitive_value 'name', 'Oxford').to match_array [@id0]
        expect(Location.id_where_case_insensitive_value 'name', 'oxford').to match_array [@id0]
        expect(Location.id_where_ILIKE_value 'name', 'Oxford').to match_array [@id0]
        expect(Location.id_where_ILIKE_value 'name', 'oxford').to match_array [@id0]
        expect(Location.id_where_case_insensitive_value 'description', 'Seaside').to match_array [@id0]
        expect(Location.id_where_case_insensitive_value 'description', 'Suburbs').to match_array []
        expect(Location.id_where_ILIKE_value 'description', 'Seaside').to match_array [@id0]
        expect(Location.id_where_ILIKE_value 'description', 'Suburbs').to match_array []
      end

      it 'w near search term' do
        expect(Location.id_where_case_insensitive_value 'name', 'xford').to match_array []
        expect(Location.id_where_case_insensitive_value 'name', 'Oxfor').to match_array []
        expect(Location.id_where_ILIKE_value 'name', 'xford').to match_array [@id0]
        expect(Location.id_where_ILIKE_value 'name', 'Oxfor').to match_array [@id0]
      end

      describe 'w 2 locations' do
        before do
          @o1 = cr(name: 'oxford', description: 'Seaside')
          @id1 = @o1.id
        end
        it do
          expect(Location.id_where_case_insensitive_value 'name', 'Oxford').to match_array [@id0, @id1]
          expect(Location.id_where_case_insensitive_value 'description', 'Seaside').to match_array [@id0, @id1]
          expect(Location.id_where_ILIKE_value 'name', 'Oxford').to match_array [@id0, @id1]
          expect(Location.id_where_ILIKE_value 'description', 'Seaside').to match_array [@id0, @id1]
        end
      end
    end
  end

  context '::name_where_ids_preserve_order' do
    before do
      @location0 = c_location_cr(name: 'Annapolis', description: 'seaport')
      @location1 = c_location_cr(name: 'Baltimore', description: 'industrial')
      @location2 = c_location_cr(name: 'Camden', description: 'seaport')
      @location3 = c_location_cr(name: 'Denver', description: 'mountains')
      @id0 = @location0.id
      @id1 = @location1.id
      @id2 = @location2.id
    end
    describe 'passing [0, 1, 2]' do
      subject { Location.name_where_ids_preserve_order(["#{@id0}","#{@id1}","#{@id2}"]) }
      it do
        expect(subject.length).to eql 3
        expect(subject[0].name).to eql 'Annapolis'
        expect(subject[1].name).to eql 'Baltimore'
        expect(subject[2].name).to eql 'Camden'
      end
    end

    describe 'passing [2, 0, 1]' do
      subject { Location.name_where_ids_preserve_order(["#{@id2}","#{@id0}","#{@id1}"]) }
      it do
        expect(subject.length).to eql 3
        expect(subject[0].name).to eql 'Camden'
        expect(subject[1].name).to eql 'Annapolis'
        expect(subject[2].name).to eql 'Baltimore'
      end
    end

    it 'passing []' do
      expect(Location.name_where_ids_preserve_order []).to eql []
    end
  end

private

  def cr(options = {})
    FactoryGirl.create(:location, options)
  end
end


text:
author: Sharad Verma
comments: true
date: 2012-12-29 22:58:35+00:00
layout: post
slug: pinterest-bow-best-of-web
title: Pinterest = BoW = Best of Web
wordpress_id: 699
image: /img/piqora_single_v3_header-img.jpg
categories:
- Industry Insights
---

[![bow](http://blog.pinfluencer.com/wp-content/uploads/2012/12/bow1-300x121.png)](http://blog.pinfluencer.com/pinterest-bow-best-of-web/bow-2/)Pinfluencer constantly studies and examines the psychological reasons why users are increasingly excited and engaged on Pinterest. **We believe that Pinterest makes web browsing extremely efficient.** When users are planning their wedding, re-modeling their kitchen, looking for a recipie or getting ready for a DIY inspiration -- they can either spend hours and hours hopping from site to site that are surrounded with text, ads and spammy links or they can browse curated, high quality, carefully selected collections on Pinterest. Which do you think is easier?<!-- more -->

Pinterest is the BoW layer between the Web and Humans making discovery and web browsing easy by:

  1. **Being visual**. Human beings process visuals **60,000 times faster than text**. (research from 3M corporation). Images increase our comprehension, recollection, and retention.

  2. **Removing click barriers to exploration**. On Pinterest users can keep scrolling to discover new content.

  3. Allowing **easy navigation** so users can drive straight into categories such as wedding or home decor.

  4. Helping users **remember and express taste via repinning**. Repins create the collaborative quality signal that sends higher quality content to the top of your Pinterest feed, making discovery that much more efficient.

And that's why Pinterest is the fastest growing social network driving more traffic than Linkedin, Yahoo and Google+ combined.

redpajama_set_name: RedPajamaGithub


text:
package com.maulingmonkey.debug.stack.nvidiaCodeworksTest;

import android.app.Activity;
import android.text.method.ScrollingMovementMethod;
import android.os.Bundle;
import android.widget.ScrollView;
import android.widget.TextView;

public class DisplayStackActivity extends Activity {
	static {
		System.loadLibrary("mmkNvidiaCodeworksTest");
	}

	private ScrollView sv;
	private TextView tv;

	@Override
	public void onCreate(Bundle savedInstanceState)
	{
		super.onCreate(savedInstanceState);
		mmkDebugStackSearchPaths(getApplicationInfo().nativeLibraryDir);
		//mmkDebugStackSearchPaths(ActivityThread.systemMain().getSystemContext().getApplicationInfo().nativeLibraryDir); // Requires higher android api level than I'm setting?

		StringBuilder sb = new StringBuilder();
		sb.append("Trace:\n");
		sb.append(traceDemo());
		sb.append("\nModules:\n");
		sb.append(getModules());
		//sb.append("\n\n");
		//sb.append(inspectElf(getApplicationInfo().nativeLibraryDir, System.mapLibraryName("mmkNvidiaCodeworksTest")));

		tv = new TextView(this);
		tv.setText(sb.toString());

		sv = new ScrollView(this);
		sv.addView(tv);
		setContentView(sv);
	}

	public native void mmkDebugStackSearchPaths(String elfDir);
	public native String getModules();
	public native String traceDemo();
	public native String inspectElf(String elfDir, String elfName);
}


text:
class CreatePlacements < ActiveRecord::Migration
  def change
    create_table :placements do |t|
      t.references :order, index: true, foreign_key: true
      t.references :product, index: true, foreign_key: true

      t.timestamps null: false
    end
  end
end


text:
<?xml version='1.0' encoding='UTF-8'?>
<hudson>
  <disabledAdministrativeMonitors/>
  <version>1.642</version>
  <numExecutors>4</numExecutors>
  <mode>NORMAL</mode>
  <useSecurity>true</useSecurity>
  <authorizationStrategy class="hudson.security.ProjectMatrixAuthorizationStrategy">
    <permission>com.cloudbees.plugins.credentials.CredentialsProvider.Create:clydeliu</permission>
    <permission>com.cloudbees.plugins.credentials.CredentialsProvider.Create:katte</permission>
    <permission>com.cloudbees.plugins.credentials.CredentialsProvider.Create:kevin</permission>
    <permission>com.cloudbees.plugins.credentials.CredentialsProvider.Create:zen</permission>
    <permission>com.cloudbees.plugins.credentials.CredentialsProvider.Delete:clydeliu</permission>
    <permission>com.cloudbees.plugins.credentials.CredentialsProvider.Delete:katte</permission>
    <permission>com.cloudbees.plugins.credentials.CredentialsProvider.Delete:kevin</permission>
    <permission>com.cloudbees.plugins.credentials.CredentialsProvider.Delete:zen</permission>
    <permission>com.cloudbees.plugins.credentials.CredentialsProvider.ManageDomains:clydeliu</permission>
    <permission>com.cloudbees.plugins.credentials.CredentialsProvider.ManageDomains:katte</permission>
    <permission>com.cloudbees.plugins.credentials.CredentialsProvider.ManageDomains:kevin</permission>
    <permission>com.cloudbees.plugins.credentials.CredentialsProvider.ManageDomains:zen</permission>
    <permission>com.cloudbees.plugins.credentials.CredentialsProvider.Update:clydeliu</permission>
    <permission>com.cloudbees.plugins.credentials.CredentialsProvider.Update:katte</permission>
    <permission>com.cloudbees.plugins.credentials.CredentialsProvider.Update:kevin</permission>
    <permission>com.cloudbees.plugins.credentials.CredentialsProvider.Update:zen</permission>
    <permission>com.cloudbees.plugins.credentials.CredentialsProvider.View:clydeliu</permission>
    <permission>com.cloudbees.plugins.credentials.CredentialsProvider.View:katte</permission>
    <permission>com.cloudbees.plugins.credentials.CredentialsProvider.View:kevin</permission>
    <permission>com.cloudbees.plugins.credentials.CredentialsProvider.View:zen</permission>
    <permission>hudson.model.Computer.Build:authenticated</permission>
    <permission>hudson.model.Computer.Build:clydeliu</permission>
    <permission>hudson.model.Computer.Build:katte</permission>
    <permission>hudson.model.Computer.Build:kevin</permission>
    <permission>hudson.model.Computer.Build:zen</permission>
    <permission>hudson.model.Computer.Configure:clydeliu</permission>
    <permission>hudson.model.Computer.Configure:katte</permission>
    <permission>hudson.model.Computer.Configure:kevin</permission>
    <permission>hudson.model.Computer.Configure:zen</permission>
    <permission>hudson.model.Computer.Connect:clydeliu</permission>
    <permission>hudson.model.Computer.Connect:katte</permission>
    <permission>hudson.model.Computer.Connect:kevin</permission>
    <permission>hudson.model.Computer.Connect:zen</permission>
    <permission>hudson.model.Computer.Create:clydeliu</permission>
    <permission>hudson.model.Computer.Create:katte</permission>
    <permission>hudson.model.Computer.Create:kevin</permission>
    <permission>hudson.model.Computer.Create:zen</permission>
    <permission>hudson.model.Computer.Delete:clydeliu</permission>
    <permission>hudson.model.Computer.Delete:katte</permission>
    <permission>hudson.model.Computer.Delete:kevin</permission>
    <permission>hudson.model.Computer.Delete:zen</permission>
    <permission>hudson.model.Computer.Disconnect:clydeliu</permission>
    <permission>hudson.model.Computer.Disconnect:katte</permission>
    <permission>hudson.model.Computer.Disconnect:kevin</permission>
    <permission>hudson.model.Computer.Disconnect:zen</permission>
    <permission>hudson.model.Hudson.Administer:clydeliu</permission>
    <permission>hudson.model.Hudson.Administer:katte</permission>
    <permission>hudson.model.Hudson.Administer:kevin</permission>
    <permission>hudson.model.Hudson.Administer:zen</permission>
    <permission>hudson.model.Hudson.ConfigureUpdateCenter:clydeliu</permission>
    <permission>hudson.model.Hudson.ConfigureUpdateCenter:katte</permission>
    <permission>hudson.model.Hudson.ConfigureUpdateCenter:kevin</permission>
    <permission>hudson.model.Hudson.ConfigureUpdateCenter:zen</permission>
    <permission>hudson.model.Hudson.Read:authenticated</permission>
    <permission>hudson.model.Hudson.Read:clydeliu</permission>
    <permission>hudson.model.Hudson.Read:katte</permission>
    <permission>hudson.model.Hudson.Read:kevin</permission>
    <permission>hudson.model.Hudson.Read:zen</permission>
    <permission>hudson.model.Hudson.RunScripts:clydeliu</permission>
    <permission>hudson.model.Hudson.RunScripts:katte</permission>
    <permission>hudson.model.Hudson.RunScripts:kevin</permission>
    <permission>hudson.model.Hudson.RunScripts:zen</permission>
    <permission>hudson.model.Hudson.UploadPlugins:clydeliu</permission>
    <permission>hudson.model.Hudson.UploadPlugins:katte</permission>
    <permission>hudson.model.Hudson.UploadPlugins:kevin</permission>
    <permission>hudson.model.Hudson.UploadPlugins:zen</permission>
    <permission>hudson.model.Item.Build:authenticated</permission>
    <permission>hudson.model.Item.Build:clydeliu</permission>
    <permission>hudson.model.Item.Build:katte</permission>
    <permission>hudson.model.Item.Build:kevin</permission>
    <permission>hudson.model.Item.Build:zen</permission>
    <permission>hudson.model.Item.Cancel:authenticated</permission>
    <permission>hudson.model.Item.Cancel:clydeliu</permission>
    <permission>hudson.model.Item.Cancel:katte</permission>
    <permission>hudson.model.Item.Cancel:kevin</permission>
    <permission>hudson.model.Item.Cancel:zen</permission>
    <permission>hudson.model.Item.Configure:clydeliu</permission>
    <permission>hudson.model.Item.Configure:katte</permission>
    <permission>hudson.model.Item.Configure:kevin</permission>
    <permission>hudson.model.Item.Configure:zen</permission>
    <permission>hudson.model.Item.Create:authenticated</permission>
    <permission>hudson.model.Item.Create:clydeliu</permission>
    <permission>hudson.model.Item.Create:katte</permission>
    <permission>hudson.model.Item.Create:kevin</permission>
    <permission>hudson.model.Item.Create:zen</permission>
    <permission>hudson.model.Item.Delete:clydeliu</permission>
    <permission>hudson.model.Item.Delete:katte</permission>
    <permission>hudson.model.Item.Delete:kevin</permission>
    <permission>hudson.model.Item.Delete:zen</permission>
    <permission>hudson.model.Item.Discover:authenticated</permission>
    <permission>hudson.model.Item.Discover:clydeliu</permission>
    <permission>hudson.model.Item.Discover:katte</permission>
    <permission>hudson.model.Item.Discover:kevin</permission>
    <permission>hudson.model.Item.Discover:zen</permission>
    <permission>hudson.model.Item.ExtendedRead:authenticated</permission>
    <permission>hudson.model.Item.ExtendedRead:clydeliu</permission>
    <permission>hudson.model.Item.ExtendedRead:katte</permission>
    <permission>hudson.model.Item.ExtendedRead:kevin</permission>
    <permission>hudson.model.Item.ExtendedRead:zen</permission>
    <permission>hudson.model.Item.Read:authenticated</permission>
    <permission>hudson.model.Item.Read:clydeliu</permission>
    <permission>hudson.model.Item.Read:katte</permission>
    <permission>hudson.model.Item.Read:kevin</permission>
    <permission>hudson.model.Item.Read:zen</permission>
    <permission>hudson.model.Item.Workspace:authenticated</permission>
    <permission>hudson.model.Item.Workspace:clydeliu</permission>
    <permission>hudson.model.Item.Workspace:katte</permission>
    <permission>hudson.model.Item.Workspace:kevin</permission>
    <permission>hudson.model.Item.Workspace:zen</permission>
    <permission>hudson.model.Run.Delete:clydeliu</permission>
    <permission>hudson.model.Run.Delete:katte</permission>
    <permission>hudson.model.Run.Delete:kevin</permission>
    <permission>hudson.model.Run.Delete:zen</permission>
    <permission>hudson.model.Run.Update:clydeliu</permission>
    <permission>hudson.model.Run.Update:katte</permission>
    <permission>hudson.model.Run.Update:kevin</permission>
    <permission>hudson.model.Run.Update:zen</permission>
    <permission>hudson.model.View.Configure:clydeliu</permission>
    <permission>hudson.model.View.Configure:katte</permission>
    <permission>hudson.model.View.Configure:kevin</permission>
    <permission>hudson.model.View.Configure:zen</permission>
    <permission>hudson.model.View.Create:clydeliu</permission>
    <permission>hudson.model.View.Create:katte</permission>
    <permission>hudson.model.View.Create:kevin</permission>
    <permission>hudson.model.View.Create:zen</permission>
    <permission>hudson.model.View.Delete:clydeliu</permission>
    <permission>hudson.model.View.Delete:katte</permission>
    <permission>hudson.model.View.Delete:kevin</permission>
    <permission>hudson.model.View.Delete:zen</permission>
    <permission>hudson.model.View.Read:authenticated</permission>
    <permission>hudson.model.View.Read:clydeliu</permission>
    <permission>hudson.model.View.Read:katte</permission>
    <permission>hudson.model.View.Read:kevin</permission>
    <permission>hudson.model.View.Read:zen</permission>
    <permission>hudson.scm.SCM.Tag:clydeliu</permission>
    <permission>hudson.scm.SCM.Tag:katte</permission>
    <permission>hudson.scm.SCM.Tag:kevin</permission>
    <permission>hudson.scm.SCM.Tag:zen</permission>
  </authorizationStrategy>
  <securityRealm class="hudson.security.HudsonPrivateSecurityRealm">
    <disableSignup>false</disableSignup>
    <enableCaptcha>false</enableCaptcha>
  </securityRealm>
  <disableRememberMe>false</disableRememberMe>
  <projectNamingStrategy class="jenkins.model.ProjectNamingStrategy$DefaultProjectNamingStrategy"/>
  <workspaceDir>${ITEM_ROOTDIR}/workspace</workspaceDir>
  <buildsDir>${ITEM_ROOTDIR}/builds</buildsDir>
  <markupFormatter class="hudson.markup.EscapedMarkupFormatter"/>
  <jdks/>
  <viewsTabBar class="hudson.views.DefaultViewsTabBar"/>
  <myViewsTabBar class="hudson.views.DefaultMyViewsTabBar"/>
  <clouds/>
  <quietPeriod>5</quietPeriod>
  <scmCheckoutRetryCount>0</scmCheckoutRetryCount>
  <views>
    <hudson.model.AllView>
      <owner class="hudson" reference="../../.."/>
      <name>All</name>
      <description></description>
      <filterExecutors>false</filterExecutors>
      <filterQueue>false</filterQueue>
      <properties class="hudson.model.View$PropertyList"/>
    </hudson.model.AllView>
    <au.com.centrumsystems.hudson.plugin.buildpipeline.BuildPipelineView plugin="build-pipeline-plugin@1.4.9">
      <owner class="hudson" reference="../../.."/>
      <name>dev</name>
      <filterExecutors>false</filterExecutors>
      <filterQueue>false</filterQueue>
      <properties class="hudson.model.View$PropertyList"/>
      <gridBuilder class="au.com.centrumsystems.hudson.plugin.buildpipeline.DownstreamProjectGridBuilder">
        <firstJob>libweintek_dev</firstJob>
        <firstJobLink>job/libweintek_dev/</firstJobLink>
      </gridBuilder>
      <noOfDisplayedBuilds>10</noOfDisplayedBuilds>
      <buildViewTitle>dev</buildViewTitle>
      <consoleOutputLinkStyle>Lightbox</consoleOutputLinkStyle>
      <cssUrl></cssUrl>
      <triggerOnlyLatestJob>false</triggerOnlyLatestJob>
      <alwaysAllowManualTrigger>true</alwaysAllowManualTrigger>
      <showPipelineParameters>true</showPipelineParameters>
      <showPipelineParametersInHeaders>true</showPipelineParametersInHeaders>
      <startsWithParameters>false</startsWithParameters>
      <refreshFrequency>3</refreshFrequency>
      <showPipelineDefinitionHeader>true</showPipelineDefinitionHeader>
    </au.com.centrumsystems.hudson.plugin.buildpipeline.BuildPipelineView>
    <se.diabol.jenkins.pipeline.DeliveryPipelineView plugin="delivery-pipeline-plugin@0.9.8">
      <owner class="hudson" reference="../../.."/>
      <name>Overview</name>
      <filterExecutors>false</filterExecutors>
      <filterQueue>false</filterQueue>
      <properties class="hudson.model.View$PropertyList"/>
      <componentSpecs>
        <se.diabol.jenkins.pipeline.DeliveryPipelineView_-ComponentSpec>
          <name>dev_Ubuntu</name>
          <firstJob>cMT_dev_Ubuntu</firstJob>
          <lastJob></lastJob>
        </se.diabol.jenkins.pipeline.DeliveryPipelineView_-ComponentSpec>
        <se.diabol.jenkins.pipeline.DeliveryPipelineView_-ComponentSpec>
          <name>dev</name>
          <firstJob>libweintek_dev</firstJob>
          <lastJob></lastJob>
        </se.diabol.jenkins.pipeline.DeliveryPipelineView_-ComponentSpec>
        <se.diabol.jenkins.pipeline.DeliveryPipelineView_-ComponentSpec>
          <name>stable</name>
          <firstJob>libweintek_stable</firstJob>
          <lastJob></lastJob>
        </se.diabol.jenkins.pipeline.DeliveryPipelineView_-ComponentSpec>
      </componentSpecs>
      <noOfPipelines>0</noOfPipelines>
      <showAggregatedPipeline>true</showAggregatedPipeline>
      <noOfColumns>1</noOfColumns>
      <sorting>none</sorting>
      <showAvatars>true</showAvatars>
      <updateInterval>2</updateInterval>
      <showChanges>true</showChanges>
      <allowManualTriggers>true</allowManualTriggers>
      <showTotalBuildTime>true</showTotalBuildTime>
      <allowRebuild>true</allowRebuild>
      <allowPipelineStart>true</allowPipelineStart>
      <showDescription>true</showDescription>
      <showPromotions>true</showPromotions>
      <showTestResults>true</showTestResults>
      <showStaticAnalysisResults>true</showStaticAnalysisResults>
      <regexpFirstJobs/>
    </se.diabol.jenkins.pipeline.DeliveryPipelineView>
    <listView>
      <owner class="hudson" reference="../../.."/>
      <name>Active</name>
      <filterExecutors>false</filterExecutors>
      <filterQueue>false</filterQueue>
      <properties class="hudson.model.View$PropertyList"/>
      <jobNames>
        <comparator class="hudson.util.CaseInsensitiveComparator"/>
        <string>auth-server_stable</string>
        <string>cMT-static-analysis_dev</string>
        <string>cMT-static-analysis_stable</string>
        <string>cMT_debug-electric-meter_cMT3000</string>
        <string>cMT_dev-label-performance_cMT3000</string>
        <string>cMT_dev-lite-line-series_cMT3000</string>
        <string>cMT_dev-mqtt-sub_cMT-SVR</string>
        <string>cMT_dev-mqtt-sub_Ubuntu</string>
        <string>cMT_dev-quick-scene-graph_cMT3000</string>
        <string>cMT_dev_Ubuntu</string>
        <string>cMT_opcua</string>
        <string>cMT_opcua-server_SVR</string>
        <string>cMT_stable_android-arm-Qt5.6</string>
        <string>cMT_stable_android-arm-Qt5.6-multimedia-debug</string>
        <string>com_5.03.02</string>
        <string>com_5.04.01</string>
        <string>driver_master</string>
        <string>dserver_dev</string>
        <string>dserver_stable</string>
        <string>dserver_stable_opcua-sdk-svr</string>
        <string>easy-access-apps_stable</string>
        <string>easy-access-client_stable</string>
        <string>easy-access-master_stable</string>
        <string>gui_dev</string>
        <string>gui_stable</string>
        <string>libopcua</string>
        <string>libopcua-shared</string>
        <string>libQt5Charts</string>
        <string>libweintek_dev</string>
        <string>libweintek_stable</string>
        <string>matrix-test</string>
        <string>opcserver_dev</string>
        <string>slave-healthy-monitoring</string>
        <string>viewer_debug-android-keyboard</string>
        <string>viewer_dev</string>
        <string>viewer_stable</string>
      </jobNames>
      <jobFilters/>
      <columns>
        <hudson.views.StatusColumn/>
        <hudson.views.WeatherColumn/>
        <hudson.views.JobColumn/>
        <hudson.views.LastSuccessColumn/>
        <hudson.views.LastFailureColumn/>
        <hudson.views.LastDurationColumn/>
        <hudson.views.BuildButtonColumn/>
      </columns>
      <recurse>false</recurse>
      <statusFilter>true</statusFilter>
    </listView>
    <au.com.centrumsystems.hudson.plugin.buildpipeline.BuildPipelineView plugin="build-pipeline-plugin@1.4.9">
      <owner class="hudson" reference="../../.."/>
      <name>stable</name>
      <filterExecutors>false</filterExecutors>
      <filterQueue>false</filterQueue>
      <properties class="hudson.model.View$PropertyList"/>
      <gridBuilder class="au.com.centrumsystems.hudson.plugin.buildpipeline.DownstreamProjectGridBuilder">
        <firstJob>libweintek_stable</firstJob>
        <firstJobLink>job/libweintek_stable/</firstJobLink>
      </gridBuilder>
      <noOfDisplayedBuilds>10</noOfDisplayedBuilds>
      <buildViewTitle>stable</buildViewTitle>
      <consoleOutputLinkStyle>Lightbox</consoleOutputLinkStyle>
      <cssUrl></cssUrl>
      <triggerOnlyLatestJob>false</triggerOnlyLatestJob>
      <alwaysAllowManualTrigger>true</alwaysAllowManualTrigger>
      <showPipelineParameters>true</showPipelineParameters>
      <showPipelineParametersInHeaders>true</showPipelineParametersInHeaders>
      <startsWithParameters>false</startsWithParameters>
      <refreshFrequency>3</refreshFrequency>
      <showPipelineDefinitionHeader>true</showPipelineDefinitionHeader>
    </au.com.centrumsystems.hudson.plugin.buildpipeline.BuildPipelineView>
  </views>
  <primaryView>Active</primaryView>
  <slaveAgentPort>0</slaveAgentPort>
  <label>linux</label>
  <nodeProperties/>
  <globalNodeProperties/>
</hudson>


text:
package org.trustedanalytics.sparktk.models.clustering.lda

import org.apache.spark.rdd.RDD
import org.apache.spark.sql.Row
import org.apache.spark.sql.catalyst.expressions.GenericRow
import org.trustedanalytics.sparktk.frame.{ DataTypes, Column, FrameSchema }
import org.trustedanalytics.sparktk.frame.internal.rdd.FrameRdd

/**
 * Assigns unique long Ids to words
 *
 * @param edgeFrame Frame of edges between documents and words
 * @param wordColumnName Word column name
 * @param wordCountColumnName Word count column name
 */
case class LdaWordIdAssigner(edgeFrame: FrameRdd,
                             wordColumnName: String,
                             wordCountColumnName: String) {
  require(edgeFrame != null, "edge frame is required")
  require(wordColumnName != null, "word column is required")
  require(wordCountColumnName != null, "word count column is required")

  val ldaWordPrefix: String = "_lda_word_"
  val ldaWordIdColumnName: String = ldaWordPrefix + "id_" + wordColumnName
  val ldaWordColumnName: String = ldaWordPrefix + wordColumnName
  val ldaWordCountColumnName: String = ldaWordPrefix + "total_" + wordCountColumnName

  /**
   * Assign unique Ids to words, and count total occurrences of each word in documents.
   *
   * @return Frame with word Id, word, and total count
   */
  def assignUniqueIds(): FrameRdd = {

    val wordsWithIndex: RDD[Row] = edgeFrame.mapRows(row => {
      (row.stringValue(wordColumnName), row.longValue(wordCountColumnName))
    }).reduceByKey(_ + _)
      .zipWithIndex()
      .map {
        case ((word, count), index) =>
          new GenericRow(Array[Any](index, word, count))
      }

    val schema = FrameSchema(List(
      Column(ldaWordIdColumnName, DataTypes.int64),
      Column(ldaWordColumnName, DataTypes.string),
      Column(ldaWordCountColumnName, DataTypes.int64))
    )

    new FrameRdd(schema, wordsWithIndex)
  }
}


text:
  set (HDF5_REFERENCE_TXT_FILES
      u10.txt
      u511.txt
      u512.txt
      u513.txt
      h5jam-help.txt
      h5unjam-help.txt
      h5jam-ub-nohdf5.txt
  )
  set (HDF5_REFERENCE_TEST_FILES
      tall.h5
      twithub.h5
      twithub513.h5
  )

  file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
  foreach (h5_file ${HDF5_REFERENCE_TEST_FILES})
    set (dest "${PROJECT_BINARY_DIR}/testfiles/${h5_file}")
    #message (STATUS " Copying ${h5_file}")
    add_custom_command (
        TARGET     h5jam
        POST_BUILD
        COMMAND    ${CMAKE_COMMAND}
        ARGS       -E copy_if_different ${HDF5_TOOLS_H5JAM_SOURCE_DIR}/testfiles/${h5_file} ${dest}
    )
  endforeach (h5_file ${HDF5_REFERENCE_TEST_FILES})

  foreach (txt_file ${HDF5_REFERENCE_TXT_FILES})
    set (dest "${PROJECT_BINARY_DIR}/testfiles/${txt_file}")
    #message (STATUS " Copying ${txt_file}")
    add_custom_command (
        TARGET     h5jam
        POST_BUILD
        COMMAND    ${CMAKE_COMMAND}
        ARGS       -E copy_if_different ${HDF5_TOOLS_H5JAM_SOURCE_DIR}/testfiles/${txt_file} ${dest}
    )
  endforeach (txt_file ${HDF5_REFERENCE_TXT_FILES})

##############################################################################
##############################################################################
###           T H E   T E S T S  M A C R O S                               ###
##############################################################################
##############################################################################

  # ============================================================
  # TEST_H5JAM_OUTPUT
  # For the purpose to verify only output & exitcode from h5jam
  #
  MACRO (TEST_H5JAM_OUTPUT expectfile resultcode)
    # If using memchecker add tests without using scripts
    if (HDF5_ENABLE_USING_MEMCHECKER)
      add_test (NAME H5JAM-${expectfile} COMMAND $<TARGET_FILE:h5jam> ${ARGN})
      if (NOT "${resultcode}" STREQUAL "0")
        set_tests_properties (H5JAM-${expectfile} PROPERTIES WILL_FAIL "true")
      endif (NOT "${resultcode}" STREQUAL "0")
    else (HDF5_ENABLE_USING_MEMCHECKER)
      add_test (
          NAME H5JAM-${expectfile}-clear-objects
          COMMAND    ${CMAKE_COMMAND}
              -E remove
              ${expectfile}.out
              ${expectfile}.out.err
      )
      add_test (
          NAME H5JAM-${expectfile}
          COMMAND "${CMAKE_COMMAND}"
              -D "TEST_PROGRAM=$<TARGET_FILE:h5jam>"
              -D "TEST_ARGS:STRING=${ARGN}"
              -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
              -D "TEST_OUTPUT=${expectfile}.out"
              -D "TEST_EXPECT=${resultcode}"
              -D "TEST_REFERENCE=testfiles/${expectfile}.txt"
              -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
      )
      set_tests_properties (H5JAM-${expectfile} PROPERTIES DEPENDS H5JAM-${expectfile}-clear-objects)
    endif (HDF5_ENABLE_USING_MEMCHECKER)
  ENDMACRO (TEST_H5JAM_OUTPUT)

  # ============================================================
  # TEST_H5UNJAM_OUTPUT
  # For the purpose to verify only output & exitcode from h5unjam
  #
  MACRO (TEST_H5UNJAM_OUTPUT expectfile resultcode)
    # If using memchecker add tests without using scripts
    if (HDF5_ENABLE_USING_MEMCHECKER)
      add_test (NAME H5JAM-UNJAM-${expectfile} COMMAND $<TARGET_FILE:h5unjam> ${ARGN})
      if (NOT "${resultcode}" STREQUAL "0")
        set_tests_properties (H5JAM-UNJAM-${expectfile} PROPERTIES WILL_FAIL "true")
      endif (NOT "${resultcode}" STREQUAL "0")
    else (HDF5_ENABLE_USING_MEMCHECKER)
      add_test (
          NAME H5JAM-UNJAM-${expectfile}-clear-objects
          COMMAND    ${CMAKE_COMMAND}
              -E remove
              ${expectfile}.out
              ${expectfile}.out.err
      )
      add_test (
          NAME H5JAM-UNJAM-${expectfile}
          COMMAND "${CMAKE_COMMAND}"
              -D "TEST_PROGRAM=$<TARGET_FILE:h5unjam>"
              -D "TEST_ARGS=${ARGN}"
              -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
              -D "TEST_OUTPUT=${expectfile}.out"
              -D "TEST_EXPECT=${resultcode}"
              -D "TEST_REFERENCE=testfiles/${expectfile}.txt"
              -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
      )
      set_tests_properties (H5JAM-UNJAM-${expectfile} PROPERTIES DEPENDS H5JAM-UNJAM-${expectfile}-clear-objects)
    endif (HDF5_ENABLE_USING_MEMCHECKER)
  ENDMACRO (TEST_H5UNJAM_OUTPUT)

  MACRO (CHECKFILE testname testdepends expected actual)
    # If using memchecker add tests without using scripts
    if (NOT HDF5_ENABLE_USING_MEMCHECKER)
      add_test (
          NAME H5JAM-${testname}-CHECKFILE-clear-objects
          COMMAND    ${CMAKE_COMMAND}
              -E remove
              ${actual}.new
              ${actual}.new.err
              ${actual}.out
              ${actual}.out.err
      )
      set_tests_properties (H5JAM-${testname}-CHECKFILE-clear-objects PROPERTIES DEPENDS ${testdepends})
      add_test (
          NAME H5JAM-${testname}-CHECKFILE-H5DMP
          COMMAND "${CMAKE_COMMAND}"
              -D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
              -D "TEST_ARGS:STRING=testfiles/${expected}"
              -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
              -D "TEST_OUTPUT=${actual}.new"
              -D "TEST_EXPECT=0"
              -D "TEST_FILTER=(^(HDF5)[^\n]*)"
              -D "TEST_SKIP_COMPARE=TRUE"
              -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
      )
      set_tests_properties (H5JAM-${testname}-CHECKFILE-H5DMP PROPERTIES DEPENDS H5JAM-${testname}-CHECKFILE-clear-objects)
      add_test (
          NAME H5JAM-${testname}-CHECKFILE-H5DMP_CMP
          COMMAND "${CMAKE_COMMAND}"
              -D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
              -D "TEST_ARGS:STRING=${actual}"
              -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
              -D "TEST_OUTPUT=${actual}.out"
              -D "TEST_EXPECT=0"
              -D "TEST_FILTER=(^(HDF5)[^\n]*)"
              -D "TEST_REFERENCE=${actual}.new"
              -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
      )
      set_tests_properties (H5JAM-${testname}-CHECKFILE-H5DMP_CMP PROPERTIES DEPENDS H5JAM-${testname}-CHECKFILE-H5DMP)
    endif (NOT HDF5_ENABLE_USING_MEMCHECKER)
  ENDMACRO(CHECKFILE testname testdepends expected actual)

  MACRO (UNJAMTEST testname setfile infile ufile chkfile outfile)
    if (NOT HDF5_ENABLE_USING_MEMCHECKER)
      add_test (
          NAME H5JAM-${testname}-UNJAM-SETUP-clear-objects
          COMMAND ${CMAKE_COMMAND} -E remove ${infile}
      )
      add_test (
          NAME H5JAM-${testname}-UNJAM-SETUP
          COMMAND ${CMAKE_COMMAND} -E copy_if_different ${HDF5_TOOLS_H5JAM_SOURCE_DIR}/testfiles/${setfile} ${PROJECT_BINARY_DIR}/${infile}
      )
      set_tests_properties (H5JAM-${testname}-UNJAM-SETUP PROPERTIES DEPENDS H5JAM-${testname}-UNJAM-SETUP-clear-objects)
      add_test (
          NAME H5JAM-${testname}-UNJAM-clear-objects
          COMMAND ${CMAKE_COMMAND} -E remove ${outfile}
      )
      set_tests_properties (H5JAM-${testname}-UNJAM-clear-objects PROPERTIES DEPENDS H5JAM-${testname}-UNJAM-SETUP)
      if (NOT "${ufile}" STREQUAL "NONE")
        add_test (
            NAME H5JAM-${testname}-UNJAM_D-clear-objects
            COMMAND ${CMAKE_COMMAND} -E remove ${ufile}
        )
        set_tests_properties (H5JAM-${testname}-UNJAM_D-clear-objects PROPERTIES DEPENDS H5JAM-${testname}-UNJAM-clear-objects)
        add_test (NAME H5JAM-${testname}-UNJAM COMMAND $<TARGET_FILE:h5unjam> -i ${infile} -u ${ufile} -o ${outfile})
        set_tests_properties (H5JAM-${testname}-UNJAM PROPERTIES DEPENDS H5JAM-${testname}-UNJAM_D-clear-objects)
        set (compare_test ${ufile})
      else (NOT "${ufile}" STREQUAL "NONE")
        if (NOT "${ARGN}" STREQUAL "--delete")
          add_test (
              NAME H5JAM-${testname}-UNJAM_D-clear-objects
              COMMAND ${CMAKE_COMMAND} -E remove ${outfile}.ufile.txt ${outfile}.ufile.txt.err
          )
          set_tests_properties (H5JAM-${testname}-UNJAM_D-clear-objects PROPERTIES DEPENDS H5JAM-${testname}-UNJAM-clear-objects)
          add_test (
              NAME H5JAM-${testname}-UNJAM
              COMMAND "${CMAKE_COMMAND}"
                  -D "TEST_PROGRAM=$<TARGET_FILE:h5unjam>"
                  -D "TEST_ARGS:STRING=-i;${infile};-o;${outfile}"
                  -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
                  -D "TEST_OUTPUT=${outfile}.ufile.txt"
                  -D "TEST_EXPECT=0"
                  -D "TEST_SKIP_COMPARE=TRUE"
                  -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
          )
          set_tests_properties (H5JAM-${testname}-UNJAM PROPERTIES DEPENDS H5JAM-${testname}-UNJAM_D-clear-objects)
          set (compare_test "${outfile}.ufile.txt")
        else (NOT "${ARGN}" STREQUAL "--delete")
          add_test (NAME H5JAM-${testname}-UNJAM COMMAND $<TARGET_FILE:h5unjam> -i ${infile} -o ${outfile})
          set_tests_properties (H5JAM-${testname}-UNJAM PROPERTIES DEPENDS H5JAM-${testname}-UNJAM-clear-objects)
          set (compare_test "")
        endif (NOT "${ARGN}" STREQUAL "--delete")
      endif (NOT "${ufile}" STREQUAL "NONE")
      if (NOT "${compare_test}" STREQUAL "")
        add_test (
            NAME H5JAM-${testname}-UNJAM-CHECK_UB_1-clear-objects
            COMMAND    ${CMAKE_COMMAND}
                -E remove
                ${infile}.len.txt
                ${infile}.cmp
                ${infile}-ub.cmp
        )
        set_tests_properties (H5JAM-${testname}-UNJAM-CHECK_UB_1-clear-objects PROPERTIES DEPENDS "H5JAM-${testname}-UNJAM")
        add_test (
            NAME H5JAM-${testname}-UNJAM-CHECK_UB_1
            COMMAND "${CMAKE_COMMAND}"
                -D "TEST_PROGRAM=$<TARGET_FILE:tellub>"
                -D "TEST_GET_PROGRAM=$<TARGET_FILE:getub>"
                -D "TEST_CHECKUB=YES"
                -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
                -D "TEST_HFILE=${infile}"
                -D "TEST_UFILE=${compare_test}"
                -D "TEST_EXPECT=0"
                -D "TEST_OFILE="
                -P "${HDF_RESOURCES_DIR}/userblockTest.cmake"
        )
        set_tests_properties (H5JAM-${testname}-UNJAM-CHECK_UB_1 PROPERTIES DEPENDS H5JAM-${testname}-UNJAM-CHECK_UB_1-clear-objects)
      endif (NOT "${compare_test}" STREQUAL "")

      add_test (
          NAME H5JAM-${testname}-UNJAM-CHECK_NOUB
          COMMAND "${CMAKE_COMMAND}"
              -D "TEST_PROGRAM=$<TARGET_FILE:tellub>"
              -D "TEST_GET_PROGRAM=$<TARGET_FILE:getub>"
              -D "TEST_CHECKUB=NO"
              -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
              -D "TEST_HFILE=${outfile}"
              -D "TEST_EXPECT=0"
              -D "TEST_UFILE=NULL"
              -D "TEST_OFILE=NULL"
              -P "${HDF_RESOURCES_DIR}/userblockTest.cmake"
      )
      if (NOT "${compare_test}" STREQUAL "")
        set_tests_properties (H5JAM-${testname}-UNJAM-CHECK_NOUB PROPERTIES DEPENDS H5JAM-${testname}-UNJAM-CHECK_UB_1)
      else (NOT "${compare_test}" STREQUAL "")
        set_tests_properties (H5JAM-${testname}-UNJAM-CHECK_NOUB PROPERTIES DEPENDS H5JAM-${testname}-UNJAM)
      endif (NOT "${compare_test}" STREQUAL "")

      CHECKFILE (${testname} "H5JAM-${testname}-UNJAM-CHECK_NOUB" ${chkfile} ${outfile})
    endif (NOT HDF5_ENABLE_USING_MEMCHECKER)
  ENDMACRO(UNJAMTEST testname infile ufile outfile)

  MACRO (JAMTEST testname jamfile infile chkfile outfile)
    if (NOT HDF5_ENABLE_USING_MEMCHECKER)
      add_test (
          NAME H5JAM-${testname}-clear-objects
          COMMAND ${CMAKE_COMMAND} -E remove ${outfile} ${infile}.cpy.h5
      )
    endif (NOT HDF5_ENABLE_USING_MEMCHECKER)
    add_test (NAME H5JAM-${testname} COMMAND $<TARGET_FILE:h5jam> -u testfiles/${jamfile} -i testfiles/${infile} -o ${outfile} ${ARGN})
    if (NOT HDF5_ENABLE_USING_MEMCHECKER)
      set_tests_properties (H5JAM-${testname} PROPERTIES DEPENDS H5JAM-${testname}-clear-objects)
      set (compare_test ${outfile})
      set (compare_orig testfiles/${infile})
      if ("${ARGN}" STREQUAL "--clobber")
        set (compare_orig "")
      endif ("${ARGN}" STREQUAL "--clobber")

      add_test (
          NAME H5JAM-${testname}-CHECK_UB_1-clear-objects
          COMMAND    ${CMAKE_COMMAND}
              -E remove
              ${compare_test}.len.txt
              ${compare_test}.cmp
              ${compare_test}-ub.cmp
      )
      set_tests_properties (H5JAM-${testname}-CHECK_UB_1-clear-objects PROPERTIES DEPENDS "H5JAM-${testname}")
      add_test (
          NAME H5JAM-${testname}-CHECK_UB_1
          COMMAND "${CMAKE_COMMAND}"
              -D "TEST_PROGRAM=$<TARGET_FILE:tellub>"
              -D "TEST_GET_PROGRAM=$<TARGET_FILE:getub>"
              -D "TEST_CHECKUB=YES"
              -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
              -D "TEST_HFILE=${compare_test}"
              -D "TEST_UFILE=testfiles/${jamfile}"
              -D "TEST_EXPECT=0"
              -D "TEST_OFILE=${compare_orig}"
              -P "${HDF_RESOURCES_DIR}/userblockTest.cmake"
      )
      set_tests_properties (H5JAM-${testname}-CHECK_UB_1 PROPERTIES DEPENDS H5JAM-${testname}-CHECK_UB_1-clear-objects)
      CHECKFILE (${testname} "H5JAM-${testname}-CHECK_UB_1" ${chkfile} ${outfile})
    endif (NOT HDF5_ENABLE_USING_MEMCHECKER)
  ENDMACRO (JAMTEST testname jamfile infile outfile)

  MACRO (JAMTEST_NONE testname jamfile infile setfile chkfile)
    if (NOT HDF5_ENABLE_USING_MEMCHECKER)
      add_test (
          NAME H5JAM-${testname}_NONE-clear-objects
          COMMAND ${CMAKE_COMMAND} -E remove
              ${chkfile} ${chkfile}.cpy.h5
      )
      add_test (
          NAME H5JAM-${testname}_NONE-SETUP
          COMMAND ${CMAKE_COMMAND} -E copy_if_different testfiles/${setfile} ${chkfile}
      )
      set_tests_properties (H5JAM-${testname}_NONE-SETUP PROPERTIES DEPENDS H5JAM-${testname}_NONE-clear-objects)

      add_test (
          NAME H5JAM-${testname}_NONE_COPY
          COMMAND ${CMAKE_COMMAND} -E copy_if_different ${chkfile} ${chkfile}.cpy.h5
      )
      set_tests_properties (H5JAM-${testname}_NONE_COPY PROPERTIES DEPENDS H5JAM-${testname}_NONE-SETUP)

      add_test (NAME H5JAM-${testname}_NONE COMMAND $<TARGET_FILE:h5jam> -u testfiles/${jamfile} -i ${chkfile} ${ARGN})
      set_tests_properties (H5JAM-${testname}_NONE PROPERTIES DEPENDS H5JAM-${testname}_NONE_COPY)

      set (compare_test ${chkfile})
      set (compare_orig ${chkfile}.cpy.h5)
      if ("${ARGN}" STREQUAL "--clobber")
        set (compare_orig "")
      endif ("${ARGN}" STREQUAL "--clobber")

      add_test (
          NAME H5JAM-${testname}_NONE-CHECK_UB_1-clear-objects
          COMMAND    ${CMAKE_COMMAND}
              -E remove
              ${compare_test}.len.txt
              ${compare_test}.cmp
              ${compare_test}-ub.cmp
      )
      set_tests_properties (H5JAM-${testname}_NONE-CHECK_UB_1-clear-objects PROPERTIES DEPENDS "H5JAM-${testname}_NONE")
      add_test (
          NAME H5JAM-${testname}_NONE-CHECK_UB_1
          COMMAND "${CMAKE_COMMAND}"
              -D "TEST_PROGRAM=$<TARGET_FILE:tellub>"
              -D "TEST_GET_PROGRAM=$<TARGET_FILE:getub>"
              -D "TEST_CHECKUB=YES"
              -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
              -D "TEST_HFILE=${compare_test}"
              -D "TEST_UFILE=testfiles/${jamfile}"
              -D "TEST_EXPECT=0"
              -D "TEST_OFILE=${compare_orig}"
              -P "${HDF_RESOURCES_DIR}/userblockTest.cmake"
      )
      set_tests_properties (H5JAM-${testname}_NONE-CHECK_UB_1 PROPERTIES DEPENDS H5JAM-${testname}_NONE-CHECK_UB_1-clear-objects)
      CHECKFILE (${testname} "H5JAM-${testname}_NONE-CHECK_UB_1" ${infile} ${chkfile})
    endif (NOT HDF5_ENABLE_USING_MEMCHECKER)
  ENDMACRO (JAMTEST_NONE testname jamfile infile setfile chkfile)

##############################################################################
##############################################################################
###           T H E   T E S T S                                            ###
##############################################################################
##############################################################################

#-------------------------------
# Testing h5jam
#-------------------------------
  # help page
  TEST_H5JAM_OUTPUT(h5jam-help 0 -h)

  # don't allow HDF5 format file as an user block file
  TEST_H5JAM_OUTPUT(h5jam-ub-nohdf5 1 -i testfiles/tall.h5 -u testfiles/tall.h5 -o tall-tmp.h5)

  JAMTEST (tall_u10 u10.txt tall.h5 tall.h5 ta2.h5)
  JAMTEST (tall_u511 u511.txt tall.h5 tall.h5 ta3.h5)
  JAMTEST (tall_u512 u512.txt tall.h5 tall.h5 ta4.h5)
  JAMTEST (tall_u513 u513.txt tall.h5 tall.h5 ta5.h5)

  JAMTEST_NONE (N_ta_u10 u10.txt tall.h5 tall.h5 ta6.h5)
  JAMTEST_NONE (N_ta_u511 u511.txt tall.h5 tall.h5 ta7.h5)
  JAMTEST_NONE (N_ta_u512 u512.txt tall.h5 tall.h5 ta8.h5)
  JAMTEST_NONE (N_ta_u513 u513.txt tall.h5 tall.h5 ta9.h5)

  JAMTEST (twithub_u10 u10.txt twithub.h5 tall.h5 tax2.h5)
  JAMTEST (twithub_u511 u511.txt twithub.h5 tall.h5 tax3.h5)
  JAMTEST (twithub_u512 u512.txt twithub.h5 tall.h5 tax4.h5)
  JAMTEST (twithub_u513 u513.txt twithub.h5 tall.h5 tax5.h5)

  JAMTEST (twithub513_u10 u10.txt twithub513.h5 tall.h5 tax6.h5)
  JAMTEST (twithub513_u511 u511.txt twithub513.h5 tall.h5 tax7.h5)
  JAMTEST (twithub513_u512 u512.txt twithub513.h5 tall.h5 tax8.h5)
  JAMTEST (twithub513_u513 u513.txt twithub513.h5 tall.h5 tax9.h5)

  JAMTEST (twithub_u10_c u10.txt twithub.h5 tall.h5 taz2.h5 --clobber)
  JAMTEST (twithub_u511_c u511.txt twithub.h5 tall.h5 taz3.h5 --clobber)
  JAMTEST (twithub_u512_c u512.txt twithub.h5 tall.h5 taz4.h5 --clobber)
  JAMTEST (twithub_u513_c u513.txt twithub.h5 tall.h5 taz5.h5 --clobber)

  JAMTEST (twithub513_u10_c u10.txt twithub513.h5 tall.h5 taz6.h5 --clobber)
  JAMTEST (twithub513_u511_c u511.txt twithub513.h5 tall.h5 taz7.h5 --clobber)
  JAMTEST (twithub513_u512_c u512.txt twithub513.h5 tall.h5 taz8.h5 --clobber)
  JAMTEST (twithub513_u513_c u513.txt twithub513.h5 tall.h5 taz9.h5 --clobber)

  JAMTEST_NONE (N_twithub_u10_c u10.txt tall.h5 twithub.h5 tay2.h5 --clobber)
  JAMTEST_NONE (N_twithub_u511_c u511.txt tall.h5 twithub.h5 tay3.h5 --clobber)
  JAMTEST_NONE (N_twithub_u512_c u512.txt tall.h5 twithub.h5 tay4.h5 --clobber)
  JAMTEST_NONE (N_twithub_u513_c u513.txt tall.h5 twithub.h5 tay5.h5 --clobber)

  JAMTEST_NONE (N_twithub513_u10_c u10.txt tall.h5 twithub513.h5 tay6.h5 --clobber)
  JAMTEST_NONE (N_twithub513_u511_c u511.txt tall.h5 twithub513.h5 tay7.h5 --clobber)
  JAMTEST_NONE (N_twithub513_u512_c u512.txt tall.h5 twithub513.h5 tay8.h5 --clobber)
  JAMTEST_NONE (N_twithub513_u513_c u513.txt tall.h5 twithub513.h5 tay9.h5 --clobber)

#-------------------------------
# Testing h5unjam
#-------------------------------
  # help page
  TEST_H5UNJAM_OUTPUT(h5unjam-help 0 -h)

  UNJAMTEST (twithub_tall twithub.h5 tai1.h5 o10.txt tall.h5 taa1.h5)
  UNJAMTEST (twithub513_tall twithub513.h5 tai2.h5 o512.txt tall.h5 taa2.h5)

  UNJAMTEST (N_twithub_tall twithub.h5 tai3.h5 NONE tall.h5 taa3.h5)
  UNJAMTEST (N_twithub513_tall twithub513.h5 tai4.h5 NONE tall.h5 taa4.h5)

  UNJAMTEST (D_twithub_tall twithub.h5 taj2.h5 NONE tall.h5 tac2.h5 --delete)
  UNJAMTEST (D_twithub513_tall twithub513.h5 taj3.h5 NONE tall.h5 tac3.h5 --delete)


text:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="68dp"
    android:background="@drawable/list_item_selector">

    <ImageView
        android:id="@+id/notifications_list_item_iv_profile"
        android:layout_width="36dp"
        android:layout_height="36dp"
        android:layout_centerVertical="true"
        android:layout_marginBottom="8dp"
        android:layout_marginLeft="8dp"
        android:layout_marginRight="8dp"
        android:layout_marginTop="8dp" />

    <TextView
        android:id="@+id/notifications_list_item_tv_type"
        android:layout_width="match_parent"
        android:layout_height="15dp"
        android:layout_marginTop="8dp"
        android:layout_toRightOf="@id/notifications_list_item_iv_profile"
        android:textColor="@android:color/black"
        android:textSize="13sp" />

    <TextView
        android:id="@+id/notifications_list_item_tv_title"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_below="@id/notifications_list_item_tv_type"
        android:layout_marginRight="8dp"
        android:layout_marginTop="4dp"
        android:layout_toRightOf="@id/notifications_list_item_iv_profile"
        android:ellipsize="end"
        android:maxLines="1"
        android:textColor="@android:color/black"
        android:textSize="13sp" />

    <TextView
        android:id="@+id/notifications_list_item_tv_ts"
        android:layout_width="match_parent"
        android:layout_height="12dp"
        android:layout_below="@id/notifications_list_item_tv_title"
        android:layout_marginRight="8dp"
        android:layout_marginTop="4dp"
        android:layout_toRightOf="@id/notifications_list_item_iv_profile"
        android:textColor="@color/colorWhiteGray"
        android:textSize="9sp" />
</RelativeLayout>


text:
using System;
using System.Collections.Generic;

namespace LionFire.Messaging.Queues
{

    public interface IMessageCollectionReader
    {

    }

    //public interface IHasObservable<T>
    //{
    //    IObservable<T> Observable { get; }
    //}
    public interface IQueueReader
        //: IHasObservable<MessageEnvelope>
        //: IObservable<MessageEnvelope>
    {
        QueueReaderFlags QueueFlags { get; set; }

        /// <summary>
        /// Return true if handled
        /// </summary>
        event Action<MessageEnvelope> MessageReceived;

        ///// <summary>
        ///// Returns true if there is another message to be handled
        ///// </summary>
        ///// <param name="handler"></param>
        ///// <returns></returns>
        //bool TryHandleNext(Action<MessageEnvelope> handler);

        //int UnhandledMessages { get; set; }
        //void Peek(Func<IQueue, MessageEnvelope, bool /* handled */> handler);

        //event Action<IQueue> ItemsRemoved;
        //event Action<IQueue, string, object> ItemRemoved;

        //IEnumerable<object> Items { get; }

    }

    public interface IUnhandledQueueReader
    {
        IEnumerable<MessageEnvelope> UnhandledMessages { get; }
    }
}


text:
package be.thalarion.android.powerampd.command.commands;

import android.preference.PreferenceManager;

import com.maxmpz.poweramp.player.PowerampAPI;

import java.util.List;

import be.thalarion.android.powerampd.R;
import be.thalarion.android.powerampd.command.Command;
import be.thalarion.android.powerampd.protocol.*;
import be.thalarion.android.powerampd.protocol.Connection;

public class PlaybackOptions {

    public static class Random extends Command {
        public Random(List<String> cmdline) { super(cmdline, Permission.PERMISSION_CONTROL); }

        @Override
        public void executeCommand(Connection conn) throws ProtocolException {
            checkArguments(1, 1);
            boolean random = getBoolean(1);

            if (random) {
                String mode = PreferenceManager.getDefaultSharedPreferences(conn.getContext())
                        .getString("pref_shuffle", conn.getContext().getString(R.string.pref_shuffle_default));

                if (mode.equals("SHUFFLE_ALL")) {
                    be.thalarion.android.powerampd.state.PlaybackOptions.setRandom(conn.getContext(), PowerampAPI.ShuffleMode.SHUFFLE_ALL);
                } else if (mode.equals("SHUFFLE_SONGS")) {
                    be.thalarion.android.powerampd.state.PlaybackOptions.setRandom(conn.getContext(), PowerampAPI.ShuffleMode.SHUFFLE_SONGS);
                } else if (mode.equals("SHUFFLE_CATS")) {
                    be.thalarion.android.powerampd.state.PlaybackOptions.setRandom(conn.getContext(), PowerampAPI.ShuffleMode.SHUFFLE_CATS);
                } else {
                    be.thalarion.android.powerampd.state.PlaybackOptions.setRandom(conn.getContext(), PowerampAPI.ShuffleMode.SHUFFLE_SONGS_AND_CATS);
                }
            } else {
                be.thalarion.android.powerampd.state.PlaybackOptions.setRandom(conn.getContext(), PowerampAPI.ShuffleMode.SHUFFLE_NONE);
            }
        }
    }

    public static class Repeat extends Command {
        public Repeat(List<String> cmdline) { super(cmdline, Permission.PERMISSION_CONTROL); }

        @Override
        public void executeCommand(Connection conn) throws ProtocolException {
            checkArguments(1, 1);
            boolean repeat = getBoolean(1);
            boolean single = be.thalarion.android.powerampd.state.PlaybackOptions.getSingle();

            if (repeat) {
                if (single) {
                    // Repeat, single -> repeat single song
                    be.thalarion.android.powerampd.state.PlaybackOptions.setRepeat(conn.getContext(), PowerampAPI.RepeatMode.REPEAT_SONG);
                } else {
                    // Repeat, no single -> user defined repeat mode
                    String repeatPreference = PreferenceManager.getDefaultSharedPreferences(conn.getContext())
                            .getString("pref_repeat", conn.getContext().getString(R.string.pref_repeat_default));
                    if (repeatPreference.equals("REPEAT_ON")) {
                        be.thalarion.android.powerampd.state.PlaybackOptions.setRepeat(conn.getContext(), PowerampAPI.RepeatMode.REPEAT_ON);
                    } else be.thalarion.android.powerampd.state.PlaybackOptions.setRepeat(conn.getContext(), PowerampAPI.RepeatMode.REPEAT_ADVANCE);
                }
            } else {
                // No repeat, no single -> no repeat
                be.thalarion.android.powerampd.state.PlaybackOptions.setRepeat(conn.getContext(), PowerampAPI.RepeatMode.REPEAT_NONE);
                // No repeat, single -> play single song and stop
                be.thalarion.android.powerampd.state.PlaybackOptions.setSingle(conn.getContext(), single);
            }
        }
    }

    public static class Single extends Command {
        public Single(List<String> cmdline) { super(cmdline, Permission.PERMISSION_CONTROL); }

        @Override
        public void executeCommand(be.thalarion.android.powerampd.protocol.Connection conn) throws ProtocolException {
            checkArguments(1, 1);
            boolean repeat = be.thalarion.android.powerampd.state.PlaybackOptions.getRepeat();
            boolean single = getBoolean(1);

            if (repeat) {
                be.thalarion.android.powerampd.state.PlaybackOptions.setSingle(conn.getContext(), false);
                if (single) {
                    // Repeat, single -> repeat single song
                    be.thalarion.android.powerampd.state.PlaybackOptions.setRepeat(conn.getContext(), PowerampAPI.RepeatMode.REPEAT_SONG);
                } else {
                    // Repeat, no single -> user defined repeat mode
                    String repeatPreference = PreferenceManager.getDefaultSharedPreferences(conn.getContext())
                            .getString("pref_repeat", conn.getContext().getString(R.string.pref_repeat_default));
                    if (repeatPreference.equals("REPEAT_ON")) {
                        be.thalarion.android.powerampd.state.PlaybackOptions.setRepeat(conn.getContext(), PowerampAPI.RepeatMode.REPEAT_ON);
                    } else be.thalarion.android.powerampd.state.PlaybackOptions.setRepeat(conn.getContext(), PowerampAPI.RepeatMode.REPEAT_ADVANCE);
                }
            } else {
                // No repeat, no single -> no repeat
                be.thalarion.android.powerampd.state.PlaybackOptions.setRepeat(conn.getContext(), PowerampAPI.RepeatMode.REPEAT_NONE);
                // No repeat, single -> play single song and stop
                be.thalarion.android.powerampd.state.PlaybackOptions.setSingle(conn.getContext(), single);
            }
        }
    }

    public static class Volume extends Command {
        public Volume(List<String> cmdline) { super(cmdline, Permission.PERMISSION_NONE); }

        @Override
        public void executeCommand(Connection conn) throws ProtocolException {
            checkArguments(1, 1);
            try {
                int volume = Integer.parseInt(cmdline.get(1));
                if (volume > 100)
                    throw new ProtocolException(ProtocolException.ACK_ERROR_ARG, cmdline.get(0),
                            conn.getContext().getString(R.string.proto_error_volume_invalid));

                if (volume < 0)
                    throw new ProtocolException(ProtocolException.ACK_ERROR_ARG, cmdline.get(0),
                            conn.getContext().getString(R.string.proto_error_volume_integer, cmdline.get(1)));
                be.thalarion.android.powerampd.state.PlaybackOptions.setVolume(conn.getContext(), volume);
            } catch (NumberFormatException e) {
                throw new ProtocolException(ProtocolException.ACK_ERROR_ARG, cmdline.get(0),
                        conn.getContext().getString(R.string.proto_error_volume_integer, cmdline.get(1)));
            }
        }
    }
}


text:
<!doctype html>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <title>WebSlides Tutorial: Classes</title>
    <meta name="description" content="WebSlides Cheat Sheet. A quick reference guide for beginners. This tutorial contains hundreds of HTML/CSS examples.">

    <link href="https://fonts.googleapis.com/css?family=Roboto:100,100i,300,300i,400,400i,700,700i%7CMaitree:200,300,400,600,700&subset=latin-ext" rel="stylesheet">

    <link rel="stylesheet" type="text/css" media="all" href="../static/css/base.css">

    <link rel="stylesheet" type="text/css" media="all" href="../static/css/colors.css">

    <link rel="stylesheet" type="text/css" media="all" href="../static/css/svg-icons.css">

    <meta property="og:url" content="http://your-url.com/permalink" />
    <meta property="og:type" content="article" />
    <meta property="og:title" content="WebSlides Documentation: Classes" />
    <meta property="og:description" content="A quick reference guide. This tutorial contains hundreds of HTML/CSS examples.">
    <meta property="og:updated_time" content="2017-01-04T17:23:46">
    <meta property="og:image" content="../static/images/share-webslides.jpg" >

    <meta name="twitter:card" content="summary_large_image">
    <meta name="twitter:site" content="@webslides">
    <meta name="twitter:creator" content="@jlantunez">
    <meta name="twitter:title" content="WebSlides Documentation: Classes">
    <meta name="twitter:description" content="WebSlides Cheat Sheet.This tutorial contains hundreds of HTML/CSS examples.">
    <meta name="twitter:image" content="../static/images/share-webslides.jpg">

    <link rel="shortcut icon" sizes="16x16" href="../static/images/favicons/favicon.png">
    <link rel="shortcut icon" sizes="32x32" href="../static/images/favicons/favicon-32.png">
    <link rel="apple-touch-icon icon" sizes="76x76" href="../static/images/favicons/favicon-76.png">
    <link rel="apple-touch-icon icon" sizes="120x120" href="../static/images/favicons/favicon-120.png">
    <link rel="apple-touch-icon icon" sizes="152x152" href="../static/images/favicons/favicon-152.png">
    <link rel="apple-touch-icon icon" sizes="180x180" href="../static/images/favicons/favicon-180.png">
    <link rel="apple-touch-icon icon" sizes="192x192" href="../static/images/favicons/favicon-192.png">

    <meta name="mobile-web-app-capable" content="yes">
    <meta name="theme-color" content="#333333">

WebSlides

              <svg class="fa-github">
                <use xlink:href="#fa-github"></use>
              </svg>
              WebSlides

              <svg class="fa-twitter">
                <use xlink:href="#fa-twitter"></use>
              </svg>
              @WebSlides

WebSlides Tutorial

Classes

* * *

                <svg class="fa-github">
                  <use xlink:href="#fa-github"></use>
                </svg>
                Free Download

WebSlides Classes

Friendly naming conventions.

Layout

CSS Syntax

.alignleft

.alignright

.aligncenter

.slide-top

.content- (left, center, right)

.slide-bottom

.grid > .column

.grid.vertical-align

.card- (50,60,70...)

Backgrounds

.bg-primary...(Corp Colors)

.bg-black...(General Colors)

.bg-gradient-(position)

.background-video

                      Background Images:

.background (fullscreen)

.background-(position)

.background.dark

.background.light

.background.anim

Flexible Blocks

.flexblock

.flexblock.clients

.flexblock.features

.flexblock.gallery

.flexblock.metrics

.flexblock.plans

.flexblock.specs

.flexblock.reasons

.flexblock.steps

.flexblock.activity

Typography (Roboto)

.text-landing

.text-intro

.text-subtitle

.text-shadow

.text-data

.text-context

.text-cols

.text-label

.text-serif (Maitree)

.text-pull (-right/-left)

              <svg class="fa-heart-o">
                <use xlink:href="#fa-heart-o"></use>
              </svg>
              CSS Syntax

WebSlides is so easy to understand and love. Baseline: 8.

Typography: .text-landing, .text-subtitle, .text-data, .text-intro...

BG Colors: .bg-primary, .bg-blue,.bg-apple...

BG Images: .background, .background-center-bottom...

Cards: .card-60, .card-50, .card-40...

Sizes: .size-50, .size-40...

Flex Blocks: .flexblock.clients, .flexblock.gallery, .flexblock.metrics...

WebSlides is really easy

Each parent <section> in the #webslides element is an individual slide.

Code is neat, scalable, and well documented. It uses intuitive markup with popular naming conventions. There's no need to overuse classes or nesting. Based on SimpleSlides, by Jenn Schiffer :)

<article id="webslides">
  <!-- Slide 1 -->
  <section>
    <h1>Design for trust</h1>
  </section>
  <!-- Slide 2 -->
  <section class="bg-primary">
    <div class="wrap">
      <h2>.wrap = container (width: 90%) with fadein</h2>
    </div>
  </section>
</article>

Vertical sliding? <article id="webslides" class="vertical">

Header (logo) .alignright

Simple CSS Alignments

Put content wherever you want.

                Footer: logo, credits... (.alignleft)

                    <svg class="fa-twitter">
                      <use xlink:href="#fa-twitter"></use>
                    </svg>
                    @username .alignright

img.alignleft

img.alignleft.size-50

Jobs unveiled the iPhone to the public on January 9, 2007, at the Macworld 2007 convention at the Moscone Center in San Francisco.  Apple sold 6.1 million first generation iPhone units over five quarters.

Image size recommended:
 800x600px / 600x450px.

img.alignright

img.alignright.size-50

Jobs unveiled the iPhone to the public on January 9, 2007, at the Macworld 2007 convention at the Moscone Center in San Francisco.  Apple sold 6.1 million first generation iPhone units over five quarters.

Image size recommended:
 800x600px / 600x450px.

img.aligncenter.size-40

1/9 left top

Put content wherever you want. Have less. Do more. Create beautiful solutions.

.slide-top and .content-left

2/9 center top

In a village of La Mancha, the name of which I have no desire to call to mind,

.slide-top and .content-center

3/9 right top

there lived not long since one of those gentlemen that keep a lance in the lance-rack, an old buckler, a lean hack, and a greyhound for coursing.

.slide-top and .content-right

4/9 left center

An olla of rather more beef than mutton, a salad on most nights, scraps on Saturdays,

.content-left

5/9 center

lentils on Fridays, and a pigeon or so extra on Sundays, made away with three-quarters of his income.

.content-center

6/9 right center

he rest of it went in a doublet of fine cloth and velvet breeches and shoes to match for holidays,

.content-right

7/9 left bottom

while on week-days he made a brave figure in his best homespun.

.slide-bottom and .content-left

8/9 center bottom

He had in his house a housekeeper past forty, a niece under twenty, and a lad for the field and market-place,

.slide-bottom and .content-center

9/9 right bottom

who used to saddle the hack as well as handle the bill-hook.

.slide-bottom and .content-right

.grid + .column

Basic Grid (auto-fill and equal height).

Why WebSlides?

There're excellent presentation tools out there. WebSlides is about good karma and sharing content. Hypertext, clean code, and beauty as narrative elements.

* * *

How easy is WebSlides?

You can create your own presentation instantly. Just a basic knowledge of HTML and CSS is required. Simply choose a demo and customize it.

* * *

.grid.vertical-align + .column

Basic Grid (auto-fill and equal height).

Why WebSlides?

There're excellent presentation tools out there. WebSlides is about good karma and sharing content. Hypertext, clean code, and beauty as narrative elements.

* * *

How easy is WebSlides?

You can create your own presentation instantly. Just a basic knowledge of HTML and CSS is required. Simply choose a demo and customize it.

* * *

.grid.sm (sidebar + main)

.column 1

Stendhal syndrome is a psychosomatic disorder that causes rapid heartbeat, dizziness, fainting, confusion and even hallucinations when an individual is exposed to an experience of great personal significance, particularly viewing art.

.column 2

The illness is named after the 19th-century French author Stendhal (pseudonym of Marie-Henri Beyle), who described his experience with the phenomenon during his 1817 visit to Florence in his book Naples and Florence: A Journey from Milan to Reggio.

When he visited the Basilica of Santa Croce, where Niccolò Machiavelli, Michelangelo and Galileo Galilei are buried, he saw Giotto's frescoes for the first time and was overcome with emotion.

.grid.ms (main +  sidebar)

.column 1

Beauty is a characteristic of an animal, idea, object, person or place that provides a perceptual experience of pleasure or satisfaction. Beauty is studied as part of aesthetics, culture, social psychology and sociology.

An "ideal beauty" is an entity which is admired, or possesses features widely attributed to beauty in a particular culture, for perfection.

.column 2

The experience of "beauty" often involves an interpretation of some entity as being in balance and harmony with nature, which may lead to feelings of attraction and emotional well-being.

.grid.sms (sidebar + main +  sidebar)

.column 1

Information architecture is considered to have been founded by Richard Saul Wurman.

.column 2

Information architecture (IA) is the structural design of shared information environments; the art and science of organizing and labelling websites, intranets, online communities and software to support usability and findability; and an emerging community of practice focused on bringing principles of design and architecture to the digital landscape.

.column 3

The difficulty in establishing a common definition for "information architecture" arises partly from the term's existence in multiple fields.

Unsplash

.card-50.bg-white

Unsplash is a really cool resource. It is a collection of Creative Commons Zero licensed photos that are really great.

                  Role: Frontend

Client: Acme

Year: 2018

                    <svg class="fa-camera">
                      <use xlink:href="#fa-camera"></use>
                    </svg>
                    Crew (Unsplash)

                    <svg class="fa-maps">
                      <use xlink:href="#fa-maps"></use>
                    </svg>
                    Google Maps

                  Discover London

.card-50.bg-white

                    Density: 5,518/km2

Population: 8,673,713

Website: visitlondon.com

                  There are many reasons to visit London. London has a diverse range of people and cultures, and more than 300 languages are spoken in the region.

                  <svg class="fa-camera">
                    <use xlink:href="#fa-camera"></use>
                  </svg>
                  Chad Madden (Unsplash)

                What is inspiration?

                In Greek thought, inspiration meant that the poet or artist would go into ecstasy or furor poeticus, the divine frenzy or poetic madness. The Muses are the inspirational goddesses of literature, science, and the arts in Greek mythology.

Backgrounds

<section class="bg-apple">

Corporate Backgrounds

.bg-primary

                #44d

.bg-secondary

                #67d

.bg-light

                #edf2f7

body

                #f7f9fb

General Colors

.bg-black

                #111

.bg-black-blue

                #123

.bg-gray

                #d5d9e2

.bg-white

                #fff

.bg-red

                #c23

.bg-green

                #077

.bg-blue

                #346

.bg-purple

                #b6d

Transparent Backgrounds

.bg-trans-dark

                rgba(0,0,0 , 0.5)

.bg-trans-light

                rgba(255,255,255 , 0.2)

Gradients

Horizontal .bg-gradient-h

Radial .bg-gradient-r

Vertical .bg-gradient-v

Horizontal Gradient

section.bg-gradient-h

Radial Gradient

section.bg-gradient-r

Vertical Gradient

section.bg-gradient-v

Background Videos

<video class="background-video" autoplay muted loop poster="image.jpg">
  <source src="video.mp4" type="video/mp4">
</video>

.background-video

          <video class="background-video" autoplay muted loop poster="https://webslides.tv/static/images/working.jpg">
            <source src="https://webslides.tv/static/videos/working.mp4" type="video/mp4">
          </video>

.background-video

WebSlides is the easiest way to make HTML presentations. Inspire and engage.

          <video class="background-video dark" autoplay muted loop poster="https://webslides.tv/static/images/working.jpg">
            <source src="https://webslides.tv/static/videos/working.mp4" type="video/mp4">
          </video>

BG Video with Overlay

section.bg-blue > .background-video.dark or .light

Fullscreen Background Images

<section>
  <span class="background" style="background-image:url('https://source.unsplash.com/UJbHNoVPZW0/')"></span>
  <div class="wrap">
    <h1>Slide</h1>
  </div>
</section>

How to embed Unsplash photos?

16 Different Backgrounds

.background (cover)

.background-top (cover)

.background-bottom (cover)

.background.light (opacity)

.background.dark (opacity)

.background-center

.background-center-top

.background-center-bottom

.background-left

.background-left-top

.background-left-bottom

.background-right

.background-right-top

.background-right-bottom

.background-anim (animated)

.background-video (fullscreen)

.background-(position)

.background-right-bottom

                    <svg class="fa-wifi">
                      <use xlink:href="#fa-wifi"></use>
                    </svg>

Ultra-Fast WiFi

                    Simple and secure file sharing.

                    <svg class="fa-battery-full">
                      <use xlink:href="#fa-battery-full"></use>
                    </svg>

All day battery life

                    Your battery worries may be over.

                    <svg class="fa-life-ring">
                      <use xlink:href="#fa-life-ring"></use>
                    </svg>

Lifetime Warranty

                    We'll fix it or if we can't, we'll replace it.

Iceland

section[class*="bg-"] > .background.dark

Iceland

section[class*="bg-"] > .background.light

.background.anim

Flexible blocks

ul.flexblock = Flexible blocks with auto-fill and equal height.

                  <svg class="fa-bar-chart">
                    <use xlink:href="#fa-bar-chart"></use>
                  </svg>
                  .flexblock li 1

                Multipurpose: services, features, specs...

                  <svg class="fa-balance-scale">
                    <use xlink:href="#fa-balance-scale"></use>
                  </svg>
                  .flexblock li 2

                Multipurpose: benefits, clients, work...

                  <svg class="fa-cog">
                    <use xlink:href="#fa-cog"></use>
                  </svg>
                  .flexblock li 3

                Multipurpose: news, metrics, plans...

Flexible Block = .flexblock

Auto-fill & Equal height columns:

<ul class="flexblock">
  <li>
    Item 1
  </li>
  <li>
    Item 2
  </li>
  <li>
    Item 3
  </li>
  <li>
    Item 4
  </li>
</ul>

Block Link = .flexblock.blink

Make the whole block clickable:

<ul class="flexblock blink">
  <li>
    <a href="#">
      Item 1
    </a>
  </li>
  <li>
    <a href="">
      Item 2
    </a>
  </li>
</ul>

ul.flexblock

                  <svg class="fa-bar-chart">
                    <use xlink:href="#fa-bar-chart"></use>
                  </svg>
                  Purpose

                Businesses that people love

                  <svg class="fa-balance-scale">
                    <use xlink:href="#fa-balance-scale"></use>
                  </svg>
                  Principles

                Ethics of openness and good taste

                  <svg class="fa-cog">
                    <use xlink:href="#fa-cog"></use>
                  </svg>
                  Process

                Useful → Easy → Fast → Beautiful

ul.flexblock.blink

                    <svg class="fa-bar-chart">
                      <use xlink:href="#fa-bar-chart"></use>
                    </svg>
                    Purpose

                  Businesses that people love

                    <svg class="fa-balance-scale">
                      <use xlink:href="#fa-balance-scale"></use>
                    </svg>
                    Principles

                  Ethics of openness and good taste

                    <svg class="fa-cog">
                      <use xlink:href="#fa-cog"></use>
                    </svg>
                    Process

                  Useful → Easy → Fast → Beautiful

ul.flexblock.blink.border

Google

                  2016.- Google Drive

Facebook 2016.- F8 Conference

Airbnb2015.- Creative Direction

Microsoft 2015.- Content Strategy

The New York Times2015.- Recruitment

Netflix 2014.- Mobile Apps

Instagram2014.- Identity

Spotify 2013.- TV Commercials

Clients

ul.flexblock.clients

Interfaces

Collaboration with the Acme team to design their mobile apps. img.blacklogo

Interfaces

Collaboration with the Acme team to design their mobile apps. img.blacklogo

Interfaces

Collaboration with the Acme team to design their mobile apps. img.blacklogo

Interfaces

Collaboration with the Acme team to design their mobile apps. img.blacklogo

Clients

ul.flexblock.clients.border

Interfaces

Collaboration with the Acme team to design their mobile apps. img.blacklogo

Interfaces

Collaboration with the Acme team to design their mobile apps. img.blacklogo

Interfaces

Collaboration with the Acme team to design their mobile apps. img.blacklogo

Interfaces

Collaboration with the Acme team to design their mobile apps. img.blacklogo

ul.flexblock.features

 100% customizable

                  Well documented.

                  $48

Extra virgin olive oil

                  The Spanish caviar.

                    <svg class="fa-wifi">
                      <use xlink:href="#fa-wifi"></use>
                    </svg>
                    Ultra-fast Wifi

                  Simple file sharing.

ul.flexblock.features.blink

                    $48

Extra virgin olive oil

                    The Spanish caviar.

                      <svg class="fa-wifi">
                        <use xlink:href="#fa-wifi"></use>
                      </svg>
                      Ultra-fast Wifi

                    Simple and secure file sharing.

ul.flexblock.gallery

uWatch

By Jane Doe

Ellen Daniels

CEO

New York

3,456 rooms

ul.flexblock.gallery + .overlay

New York

1,234 rooms

uWatch

                    <time datetime="2017-12-17T21:23:34-05:00">December 2017</time>

Ellen Daniels

CEO

ul.flexblock.metrics

 Founded
                2016

                  <svg class="fa-users">
                    <use xlink:href="#fa-users"></use>
                  </svg>

                24M Subscribers

                  <svg class="fa-line-chart">
                    <use xlink:href="#fa-line-chart"></use>
                  </svg>

                Revenue: $16M

                Monthly Growth
                64%

                  <svg class="fa-building-o">
                    <use xlink:href="#fa-building-o"></use>
                  </svg>

                8 Offices

                  <svg class="fa-smile-o">
                    <use xlink:href="#fa-smile-o"></use>
                  </svg>

                48 Employees

                  <svg class="fa-usd">
                    <use xlink:href="#fa-usd"></use>
                  </svg>

                Benefits: $2,4M

                  <svg class="fa-university">
                    <use xlink:href="#fa-university"></use>
                  </svg>

                Bank: $32M

ul.flexblock.metrics.border

 Founded
                2016

                  <svg class="fa-users">
                    <use xlink:href="#fa-users"></use>
                  </svg>

                24M Subscribers

                  <svg class="fa-line-chart">
                    <use xlink:href="#fa-line-chart"></use>
                  </svg>

                Revenue: $16M

                Monthly Growth
                64%

                  <svg class="fa-building-o">
                    <use xlink:href="#fa-building-o"></use>
                  </svg>

                8 Offices

                  <svg class="fa-smile-o">
                    <use xlink:href="#fa-smile-o"></use>
                  </svg>

                48 Employees

                  <svg class="fa-usd">
                    <use xlink:href="#fa-usd"></use>
                  </svg>

                Benefits: $2,4M

                  <svg class="fa-university">
                    <use xlink:href="#fa-university"></use>
                  </svg>

                Bank: $32M

.flexblock.plans.blink

All content is for demo purposes only.

Basic

                    Free

Good karma. Just the essential features. 100% customizable. Make it yours.

                    Select

Medium

                    $4,99 /month

Clean markup with popular naming conventions. Minimum effort.

                    Buy Now

Premium (save 20%)

                    $40 /year

Prototype faster. Create landings and portfolios. Unlimited projects.

                    Select

Basic

                    Free

                        <svg class="fa-check">
                          <use xlink:href="#fa-check"></use>
                        </svg>
                        Free forever

                        <svg class="fa-check">
                          <use xlink:href="#fa-check"></use>
                        </svg>
                        Eternal sunshine

                        <svg class="fa-check">
                          <use xlink:href="#fa-check"></use>
                        </svg>
                        Ads

                    Select

Good Karma

                    $40 /year

                        <svg class="fa-check">
                          <use xlink:href="#fa-check"></use>
                        </svg>
                        Exclusive content

                        <svg class="fa-check">
                          <use xlink:href="#fa-check"></use>
                        </svg>
                        Unlimited projects

                        <svg class="fa-check">
                          <use xlink:href="#fa-check"></use>
                        </svg>
                        Unlimited users

                    Select

ul.flexblock.specs

                    <svg class="fa-wifi">
                      <use xlink:href="#fa-wifi"></use>
                    </svg>

Ultra-Fast WiFi

                    Simple and secure file sharing.

                    <svg class="fa-battery-full">
                      <use xlink:href="#fa-battery-full"></use>
                    </svg>

All day battery life

                    Your battery worries may be over.

                    <svg class="fa-life-ring">
                      <use xlink:href="#fa-life-ring"></use>
                    </svg>

Lifetime Warranty

                    We'll fix it or if we can't, we'll replace it.

.flexblock.reasons

Why WebSlides? Work better, faster.

Designers and marketers can now focus on the content. Simply choose a demo and customize it in minutes. Be memorable!

 Good karma. Just the essentials and using lovely CSS.

WebSlides is about telling the story, and sharing it in a beautiful way. Hypertext and clean code as narrative elements.

ul.flexblock.steps

                  <svg class="fa-heartbeat">
                    <use xlink:href="#fa-heartbeat"></use>
                  </svg>

01. Passion

When you're really passionate about your job, you can change the world.

                  <svg class="fa-magic">
                    <use xlink:href="#fa-magic"></use>
                  </svg>

02. Purpose

Why does this business exist? How are you different? Why matters?

                  <svg class="fa-balance-scale">
                    <use xlink:href="#fa-balance-scale"></use>
                  </svg>

03. Principles

Leadership through usefulness, openness, empathy, and good taste.

                  <svg class="fa-cog">
                    <use xlink:href="#fa-cog"></use>
                  </svg>

04. Process

Useful

Easy

Fast

Beautiful

ul.flexblock.activity

                      2016

                      UX Designer at ACME

                      This is a job description for the UX Designer role at ACME. Be concise. Content like a tweet: 2-3 lines recommended.

                    2 mins ago

                    14 world famous buildings to inspire you

                    From the Colosseum to the Chrysler building, get a dose of inspiration from 14 of the world's most famous buildings.

                    2013

                    Co-Founder of GAMMA

                    The culture within an organization is an essential part for success. This is a job description. Be concise. 2-3 lines recommended.

Ag

Roboto in Google Fonts.

The quick brown fox jumps over the lazy dog.

ABCDEFGHIJKLMNOPQRSTUVWXYZ

abcdefghijklmnopqrstuvwxyz

1234567890(,.;:?!$&*)

Landings

.text-landing

Landings

Create a simple web presence.

.text-intro

Powered by #WebSlides .text-subtitle

Landings

Create a simple web presence.

Landings

.text-shadow

4,235,678

.text-data

Why WebSlides? .text-context

WebSlides is incredibly easy and versatile. The easiest way to make HTML presentations.

.text-cols (2 columns)

Why WebSlides? There are excellent presentation tools out there. WebSlides is about sharing content, essential features, and clean markup. Each parent <section> in the #webslides element is an individual slide.

WebSlides help you build a culture of innovation and excellence. When you're really passionate about your job, you can change the world. How to manage a design-driven organization? Leadership through usefulness, openness, empathy, and good taste.

                  <svg class="fa-phone">
                    <use xlink:href="#fa-phone"></use>
                  </svg>
                  Call us at 555.345.6789

                  <svg class="fa-twitter">
                    <use xlink:href="#fa-twitter"></use>
                  </svg>
                  @username

                  <svg class="fa-envelope">
                    <use xlink:href="#fa-envelope"></use>
                  </svg>
                  Send us an email

                  A Phone by Google

Pixel's camera lets you take brilliant photos in low light, bright light or any light.

                    .text-label:

                    Google (2016).

                    Services:

                    Industrial Design.

                    Website:

                    madeby.google.com/phone/

Ag

Maitree in Google Fonts.

The quick brown fox jumps over the lazy dog.

ABCDEFGHIJKLMNOPQRSTUVWXYZ

abcdefghijklmnopqrstuvwxyz

1234567890(,.;:?!$&*)

WebSlides is incredibly easy and versatile.

.text-serif (Maitree)

Each parent <section> in the #webslides element is an individual slide.

Clean markup with popular naming conventions. Minimum effort. Just focus on your content.

What is Stendhal Syndrome?

Beauty overdose. .text-pull-right

Imagine that you are in Florence. If you suddenly start to feel that you literally cannot breathe, you may be experiencing Stendhal Syndrome.

Psychiatrists have long debated whether it really exists.

The syndrome is not only associated with viewing a beautiful place, but also good art.

The beauty of Italian art has a concentrated perfection and transcendent sensuality that is incredibly addictive.

* * *

One more thing...

.text-apple / .bg-apple

Why WebSlides?

Landings

Portfolios

Apple Keynote

Start in seconds

Create your own presentation instantly.
120+ prebuilt slides ready to use.

                <svg class="fa-cloud-download">
                  <use xlink:href="#fa-cloud-download"></use>
                </svg>
                Free Download

                  <svg class="fa-paypal">
                    <use xlink:href="#fa-paypal"></use>
                  </svg>
                  Pay what you want.


text:
.class public Lcom/sec/ims/profile/ProfileIntent$Extras;
.super Ljava/lang/Object;
.source "ProfileIntent.java"

# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/sec/ims/profile/ProfileIntent;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x9
    name = "Extras"
.end annotation

# static fields
.field public static final DATA_ID:Ljava/lang/String; = "data_id"

.field public static final PROFILE_INFO:Ljava/lang/String; = "profile_info"

.field public static final PROFILE_TYPE:Ljava/lang/String; = "profile_type"

.field public static final REQUEST_ID:Ljava/lang/String; = "request_id"

.field public static final RESULT_CODE:Ljava/lang/String; = "result_code"

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

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN">
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>Impulse</title>
<frameset cols="250,*">
  <frame src="tree.html" name="treefrm">
  <frame src="main.html" name="basefrm">
  <noframes>
    Frames are disabled. Click here to go to the main page.
  </noframes>
</frameset>


text:
layout: page
title: Sail Media Executive Retreat
date: 2016-05-24
author: Benjamin Waller
tags: weekly links, java
status: published
summary: Aliquam turpis mi, scelerisque in tincidunt.
banner: images/banner/people.jpg
booking:
  startDate: 07/11/2016
  endDate: 07/14/2016
  ctyhocn: BUFWSHX
  groupCode: SMER
published: true
---
Nullam dictum feugiat massa, id scelerisque magna ornare vel. Nunc congue pellentesque tortor, vel sodales enim ornare nec. Nulla a ultrices elit, eu ultricies urna. In imperdiet mauris at orci ultrices pharetra. Nunc ut interdum sapien. Curabitur ornare nisi velit, vel vulputate dui vehicula vitae. Aenean elementum lacus a est vulputate suscipit.

* Nullam hendrerit leo vitae mauris sollicitudin, eget sodales lectus tempor
* Morbi sed ex ut elit aliquam elementum
* Fusce a tellus tincidunt, ornare nunc a, mollis risus.

Nullam orci dui, rutrum id aliquam quis, sodales vulputate dui. Etiam orci orci, vehicula nec placerat id, euismod at ex. Nunc luctus semper libero, ut imperdiet quam imperdiet eu. Praesent ipsum massa, accumsan vitae varius eget, placerat sed mi. Phasellus eleifend, arcu et venenatis congue, tellus felis imperdiet leo, non dictum ante quam ac sapien. Maecenas interdum vestibulum purus. Curabitur risus urna, venenatis nec sagittis sit amet, venenatis non est. Morbi accumsan maximus semper. Pellentesque vehicula vel purus ut posuere. Aenean id nulla porta libero convallis bibendum. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Maecenas varius mattis nisi sed pulvinar. Mauris sed imperdiet mauris, nec tristique tellus. Fusce ultrices at mi vel dignissim. Aliquam eget augue congue, commodo sapien et, accumsan ante.


text:
package bio.terra.workspace.service.resource.controlled.exception;

import bio.terra.common.exception.InternalServerErrorException;

public class AzureNetworkInterfaceNameNotFoundException extends InternalServerErrorException {
  public AzureNetworkInterfaceNameNotFoundException(String message) {
    super(message);
  }
}


text:
package com.bluesnap.androidapi.services;

/**
 * An interface to run async callbacks from service (when token expired) to merchant.
 */

public interface TokenProvider {

    void getNewToken(TokenServiceCallback tokenServiceCallback);
}


text:
/**
 * Watch Dog to prune unwanted files
 *
 * Alessio Peternelli <alessio.peternelli@gmail.com>
 */

#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <string.h>
#include <time.h>
#include <sys/types.h>
#include <sys/inotify.h>
#include <limits.h>
#include <dirent.h>
#include <unistd.h>
#include <signal.h>
#include <iso646.h>                                               /* OPTIONAL HEADER for using lessical logical operator */
#include "wdlib.h"

int   fd_main;                                                    /* Main inotify's file descriptor */
int   wd_poll[MAX_EVENTS];                                        /* All watchers poll */
char* wd_path[MAX_EVENTS];                                        /* All watchers paths */
int   wd_index = -1;                                              /* Watch counter */

int dog_init()
{
    /**
     * Initialize Inotify
     */
    fd_main = inotify_init();
    if (fd_main < 0) {
        perror("inotify init error");
        clean_garbage();
        exit(EXIT_FAILURE);
    }

    /**
     * Initialize wd stacks
     */
    for (int i = 0; i <= MAX_EVENTS; i++) {
        wd_poll[i] = -1;
        wd_path[i] = NULL;
    }

    return fd_main;
}

/**
 * Add a inotify watch to path
 * return the watch descriptor
 */
int bark_at(int file_descriptor, char* door)
{
    if (wd_index == (MAX_EVENTS-1)) {
        perror("MAX_EVENTS reached, can't add more watch descriptors");

        return -1;
    }

    int watch_descriptor;
    watch_descriptor = inotify_add_watch(file_descriptor, door, IN_CREATE bitor IN_DELETE);
    if (watch_descriptor == -1) {
        printf("[%s] Couldn't add watch to %s\n", getcurrenttime(), door);
    }
    else
    {
        printf("[%s] Watching path %s\n", getcurrenttime(), door);
        memorize_wd(watch_descriptor, door);
    }

    return watch_descriptor;
}

/**
 * Add to stack: watch descriptor and path
 * Increment index
 */
void memorize_wd(int wd, char* path)
{
    wd_index += 1;

    if (wd_index < MAX_EVENTS) {
        wd_poll[wd_index] = wd;
        wd_path[wd_index] = strdup(path);
    }
    else {
        perror("MAX_EVENTS reached, can't add more watch descriptors");
    }
}

/**
 * Traverse all subdirectories and add a inotify watch to every sub directory
 * return the list of all watch descriptors
 */
void pin_subdirectories(int file_descriptor, char* root)
{
    int watch_descriptor;
    char* abs_dir;
    struct dirent *entry;
    DIR *dp;

    dp = opendir(root);
    if (dp == NULL)
    {
        printf("[%s] Could not open dir %s\n", getcurrenttime(), root);
        clean_garbage();
        exit(EXIT_FAILURE);
    }

    watch_descriptor = bark_at(file_descriptor, root);
    if (watch_descriptor == -1) {
        perror("Unable to add watch");
        clean_garbage();
        exit(EXIT_FAILURE);
    }

    while ((entry = readdir(dp)))
    {
        if ((entry->d_type & DT_DIR) and (0 != strcmp(entry->d_name, ".") and 0 != strcmp(entry->d_name, "..")))
        {
            /* Add watches to the level 1 subdirs */
            abs_dir = pathdup_addsubdir(root, entry->d_name);
            pin_subdirectories(file_descriptor, abs_dir);
            free(abs_dir);
        }
    }

    closedir(dp);
}

/**
 * Given path, verify for separator, append subidr, return pointer to new allocated memory
 */
char* pathdup_addsubdir(char* path, char* subdir)
{
    int addslash = (path[strlen(path)-1] != '/');
    char* newpath = NULL;
    int k = addslash ? 2 : 1;

    newpath = malloc(strlen(path) + strlen(subdir) + k);

    strcpy(newpath, path);
    if (addslash) {
        strcat(newpath, "/");
    }

    strcat(newpath, subdir);

    return newpath;
}

/**
 * Find watcher's index from descriptor
 */
int find_wd_index(int wd)
{
    for (int j = 0; j <= wd_index; j++) {
        if (wd_poll[j] == wd) {
            return j;
        }
    }

    return -1;
}

/**
 * Proxy to wd_path
 */
char* get_barking_path(int wd)
{
    int index = find_wd_index(wd);

    return wd_path[index];
}

/**
 * Remove inotify watcher, free path's memory, reduce index and reorder stacks
 */
void forget_wd(int wd)
{
    int descriptor_index;

    descriptor_index = find_wd_index(wd);
    inotify_rm_watch(fd_main, wd);
    free(wd_path[descriptor_index]);

    for (; descriptor_index <= wd_index; ++descriptor_index)
    {
        wd_poll[descriptor_index - 1] = wd_poll[descriptor_index];
        wd_path[descriptor_index - 1] = wd_path[descriptor_index];
    }
    wd_poll[descriptor_index] = -1;
    wd_path[descriptor_index] = NULL;

    wd_index -= 1;
}

/**
 * Remove inotidy watchers and free allocated memory
 */
void clean_garbage()
{
    if (wd_index >= 0)                                 // if we have at least one watcher ...
    {
        for (int i = 0; i <= wd_index; i++) {
            if (wd_poll[i] >= 0) {
                inotify_rm_watch(fd_main, wd_poll[i]); // remove watcher
            }
            if (wd_path[i] != NULL) {
                free(wd_path[i]);                      // free path
            }
        }
    }

    close(fd_main);
}

char* getcurrenttime()
{
    time_t curtime;
    char* buffer;

    time (&curtime);
    buffer = ctime(&curtime);
    buffer[strlen(buffer)-1] = ';';

    return buffer;
}


text:
//
//  subject.cpp
//  cnnet
//
//  Created by Mingkai Chen on 2016-11-08
//  Copyright © 2016 Mingkai Chen. All rights reserved.
//

#include "graph/react/iobserver.hpp"

#ifdef TENNCOR_SUBJECT_HPP

#ifdef EDGE_RCD

#include "edgeinfo/grpc_vis_record.hpp"

#endif /* EDGE_RCD */

namespace nnet
{

subject::~subject (void)
{
	std::unordered_set<iobserver*> killers = killers_;
	for (iobserver* killer : killers)
	{
		killer->remove_ondeath_dependent(this);
	}

	notify(UNSUBSCRIBE); // unsubscribe all audiences

#ifdef EDGE_RCD

// record subject-object edge
if (rocnnet_record::record_status::rec_good)
{
	rocnnet_record::record_status::rec->node_release(this);
}

#endif /* EDGE_RCD */
}

subject& subject::operator = (const subject&) { return *this; }

subject& subject::operator = (subject&& other)
{
	if (this != &other)
	{
		std::unordered_map<iobserver*, std::unordered_set<size_t> > temp = other.audience_;
		for (auto& audpair : temp)
		{
			iobserver* aud = audpair.first;
			for (size_t idx : audpair.second)
			{
				aud->replace_dependency(this, idx);
			}
		}
		other.audience_.clear();
	}
	return *this;
}

void subject::notify (notification msg) const
{
#ifdef RPC_RCD
if (rocnnet_record::record_status::rec_good && UPDATE == msg)
{
	if (rocnnet_record::rpc_record* grpc =
		dynamic_cast<rocnnet_record::rpc_record*>(
		rocnnet_record::record_status::rec.get()))
	{
		grpc->data_update(this);
	}
}
#endif /* RPC_RCD */
	std::vector<iobserver*> obs;
	for (auto it = audience_.begin(), et = audience_.end(); it != et; it++)
	{
		obs.push_back(it->first);
	}

	for (iobserver* viewer : obs)
	{
		auto it = audience_.find(viewer);
		if (it != audience_.end())
		{
			viewer->update(it->second, msg);
		}
	}
}

bool subject::no_audience (void) const
{
	return audience_.empty();
}

size_t subject::n_audience (void) const { return audience_.size(); }

void subject::steal_observers (subject* other)
{
	std::unordered_map<iobserver*, std::unordered_set<size_t> > aud_cpy = other->audience_;
	for (auto aud_pair : aud_cpy)
	{
		iobserver* aud = aud_pair.first;
		for (size_t i : aud_pair.second)
		{
			aud->replace_dependency(this, i);
		}
	}
}

subject::subject (void) {}

void subject::death_on_noparent (void) {}

void subject::attach_killer (iobserver* killer)
{
	if (killer && killers_.end() == killers_.find(killer))
	{
		killers_.insert(killer);
		killer->add_ondeath_dependent(this);
	}
}

void subject::detach_killer (iobserver* killer)
{
	if (killer && killers_.end() != killers_.find(killer))
	{
		killers_.erase(killer);
		killer->remove_ondeath_dependent(this);
	}
}

subject::subject (const subject&) {}

subject::subject (subject&& other)
{
	std::unordered_map<iobserver*, std::unordered_set<size_t> > temp = other.audience_;
	for (auto& audpair : temp)
	{
		iobserver* aud = audpair.first;
		for (size_t idx : audpair.second)
		{
			aud->replace_dependency(this, idx);
		}
	}
	other.audience_.clear();
}

void subject::attach (iobserver* viewer, size_t idx)
{
#ifdef EDGE_RCD

// record subject-object edge
if (rocnnet_record::record_status::rec_good)
{
	rocnnet_record::record_status::rec->edge_capture(viewer, this, idx);
}

#endif /* EDGE_RCD */

	audience_[viewer].emplace(idx);
}

void subject::detach (iobserver* viewer)
{
#ifdef EDGE_RCD

if (rocnnet_record::record_status::rec_good)
{
	// record subject-object edge
	for (size_t idx : audience_[viewer])
	{
		rocnnet_record::record_status::rec->edge_release(viewer, this, idx);
	}
}

#endif /* EDGE_RCD */

	audience_.erase(viewer);
	if (audience_.empty())
	{
		death_on_noparent();
	}
}

void subject::detach (iobserver* viewer, size_t idx)
{
#ifdef EDGE_RCD

// record subject-object edge
if (rocnnet_record::record_status::rec_good)
{
	rocnnet_record::record_status::rec->edge_release(viewer, this, idx);
}

#endif /* EDGE_RCD */

	auto it = audience_.find(viewer);
	if (audience_.end() != it)
	{
		it->second.erase(idx);
		if (it->second.empty())
		{
			audience_.erase(viewer);
		}
	}
	if (audience_.empty())
	{
		death_on_noparent();
	}
}

}

#endif


text:
package com.ning.metrics.collector.events.parsing;

import com.ning.metrics.collector.endpoint.extractors.EventParsingException;

import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;

class UrlDecodingTokenizer implements Tokenizer
{
    private final Tokenizer baseTokenizer;

    public UrlDecodingTokenizer(final Tokenizer baseTokenizer)
    {
        this.baseTokenizer = baseTokenizer;
    }

    @Override
    public boolean hasNext()
    {
        return baseTokenizer.hasNext();
    }

    public Token next() throws EventParsingException
    {
        try {
            final Token baseToken = baseTokenizer.next();
            if (baseToken.isEmpty()) {
                return baseToken;
            }
            else {
                final String value = URLDecoder.decode(baseToken.getValue(), "UTF-8");

                return new Token(value, baseToken.getType());
            }
        }
        catch (UnsupportedEncodingException e) {
            throw new EventParsingException("error URL decoding token", e);
        }
    }
}