text:
<?xml version="1.0" encoding="UTF-8"?>
<!--

     Copyright (C) 2009 Progress Software, Inc. All rights reserved.
     http://fusesource.com

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

            http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.

-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <parent>
    <groupId>org.fusesource.meshkeeper</groupId>
    <artifactId>meshkeeper</artifactId>
    <version>1.0-SNAPSHOT</version>
  </parent>

  <groupId>org.fusesource.meshkeeper</groupId>
  <artifactId>meshkeeper-website</artifactId>
  <version>1.0-SNAPSHOT</version>

  <name>MeshKeeper :: Website</name>

  <build>

    <resources>
      <resource>
        <directory>${basedir}/out</directory>
      </resource>
    </resources>

    <plugins>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>exec-maven-plugin</artifactId>
        <version>1.1</version>
        <executions>
          <execution>
            <id>build-webgen</id>
            <phase>compile</phase>
            <goals>
              <goal>exec</goal>
            </goals>
            <configuration>
              <executable>webgen</executable>
              <workingDirectory>${basedir}</workingDirectory>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

</project>

redpajama_set_name: RedPajamaGithub


text:
// Copyright © 2010-2015 Firebrand Technologies

using System;
using System.Web;
using System.Web.Mvc;
using System.Web.Optimization;
using System.Web.Routing;
using Fcs;
using NLog;
using ServiceStack.Logging.NLogger;

namespace CredentialsMvcTests {
    public class MvcApplication : HttpApplication {
        private static readonly Logger Logger = LogManager.GetCurrentClassLogger();

        protected void Application_Start() {
            AreaRegistration.RegisterAllAreas();
            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
            RouteConfig.RegisterRoutes(RouteTable.Routes);
            BundleConfig.RegisterBundles(BundleTable.Bundles);
            FcsClient.LogFactory = new NLogFactory();
            Logger.Debug("Application_Start");
        }

        //private void Application_BeginRequest(object sender, EventArgs e) {
        //    Logger.Debug("Application_BeginRequest: {0}", HttpContext.Current.Request.Url);
        //}

        //private void Session_Start(object sender, EventArgs e) {
        //    Logger.Debug("Session_Start: {0}", HttpContext.Current.Request.Url);
        //}

        //private void Application_AuthenticateRequest(object sender, EventArgs e) {
        //    Logger.Debug(
        //        "Application_AuthenticateRequest: {0} : {1}",
        //        HttpContext.Current.Request.Url,
        //        (HttpContext.Current.User != null ? HttpContext.Current.User.Identity.Name : ""));

        //    //FcsClient.StartSession();
        //}

        private void Application_PreRequestHandlerExecute(object sender, EventArgs e) {
            FcsClient.EnsureAuthorized();
        }
    }
}


text:
using System;
using System.ComponentModel;

namespace Weakly
{
    internal sealed class WeakNotifyPropertyChangingHandler<TSubscriber> :
        WeakEventHandlerBase<INotifyPropertyChanging, TSubscriber, PropertyChangingEventArgs>
        where TSubscriber : class
    {
        public WeakNotifyPropertyChangingHandler(INotifyPropertyChanging source, TSubscriber subscriber,
            [EmptyCapture] Action<TSubscriber, object, PropertyChangingEventArgs> weakHandler)
            : base(source, subscriber, weakHandler)
        {
            source.PropertyChanging += OnEvent;
        }

        protected override void RemoveEventHandler(INotifyPropertyChanging source)
        {
            source.PropertyChanging -= OnEvent;
        }
    }
}

#endif


text:
angular.module('ui.bootstrap.pagination', [])

    .directive('pagination', function() {
        return {
            restrict: 'E',
            scope: {
                numPages: '=',
                currentPage: '=',
                onSelectPage: '&'
            },
            templateUrl: 'pagination.html',
            replace: true,
            link: function(scope) {
                scope.$watch('numPages', function(value) {
                    scope.pages = [];
                    for(var i=1;i<=value;i++) {
                        scope.pages.push(i);
                    }
                    if ( scope.currentPage > value ) {
                        scope.selectPage(value);
                    }
                });
                scope.noPrevious = function() {
                    return scope.currentPage === 1;
                };
                scope.noNext = function() {
                    return scope.currentPage === scope.numPages;
                };
                scope.isActive = function(page) {
                    return scope.currentPage === page;
                };

                scope.selectPage = function(page) {
                    if ( ! scope.isActive(page) ) {
                        scope.currentPage = page;
                        scope.onSelectPage({ page: page });
                    }
                };

                scope.selectPrevious = function() {
                    if ( !scope.noPrevious() ) {
                        scope.selectPage(scope.currentPage-1);
                    }
                };
                scope.selectNext = function() {
                    if ( !scope.noNext() ) {
                        scope.selectPage(scope.currentPage+1);
                    }
                };
            }
        };
    });


text:
var exec = require('child_process').exec;
var fs = require('fs');
var request = require('request');
var cheerio = require('cheerio');
var _ = require('underscore');
_.mixin( require('underscore.deferred') );
var inflection = require('inflection');
var Twit = require('twit');
var T = new Twit(require('./config.js'));
var wordfilter = require('wordfilter');
var ent = require('ent');
var conf = require('./config.js');
// need to use this OTHER twitter lib to post photos, sigh
var Twitter = require('node-twitter');
var twitterRestClient = new Twitter.RestClient(
  conf.consumer_key,
  conf.consumer_secret,
  conf.access_token,
  conf.access_token_secret
);
var Tumblr = require('tumblrwks');
var tumblr = new Tumblr(
  {
    consumerKey:    conf.tumblr_consumer_key,
    consumerSecret: conf.tumblr_consumer_secret,
    accessToken:    conf.tumblr_access_token,
    accessSecret:   conf.tumblr_access_token_secret
  }, "au-prompts.tumblr.com"
  // you can specify the blog url now or the time you want to use
);
var Bing = require('node-bing-api')({ accKey: conf.bingKey});

var debug = false;

Array.prototype.pick = function() {
  return this[Math.floor(Math.random()*this.length)];
};

Array.prototype.pickRemove = function() {
  var index = Math.floor(Math.random()*this.length);
  return this.splice(index,1)[0];
};

function getImages(first, second) {
  console.log(first, second);
  var dfd = _.Deferred();
  Bing.images(first, {skip: Math.floor(Math.random()*5)}, function(error, response, body){
    var url1 = body.d.results[Math.floor(Math.random()*3)].MediaUrl;
    ur1l = url1.replace(/\%3F.*/,'');
    Bing.images(second, {skip: Math.floor(Math.random()*5)}, function(error, response, body){
      var url2 = body.d.results[Math.floor(Math.random()*3)].MediaUrl;
      ur12 = url2.replace(/\%3F.*/,'');
      console.log(url1, url2);
      var filetype1 = '.png';//url1.match(/\.\w\w\w\w?$/)[0].toLowerCase();
      var filetype2 = '.png';//url2.match(/\.\w\w\w\w?$/)[0].toLowerCase();
      var stream1 = fs.createWriteStream('./1' + filetype1);
      var stream2 = fs.createWriteStream('./2' + filetype2);
      stream1.on('close', function() {
        var r = request(url2).pipe(stream2);
      });
      stream2.on('close', function() {
        console.log('done');
        dfd.resolve('./1' + filetype1, './2' + filetype2);
      });
      var r = request(url1).pipe(stream1);
    });
  });
  return dfd.promise();
}

function generate() {
  var dfd = new _.Deferred();
  var urls = ['http://archiveofourown.org/tags/Harry%20Potter%20-%20J*d*%20K*d*%20Rowling/works',
  'http://archiveofourown.org/tags/Sherlock%20Holmes%20*a*%20Related%20Fandoms/works',
  'http://archiveofourown.org/tags/Lost/works',
  'http://archiveofourown.org/tags/Scandal%20(TV)/works',
  'http://archiveofourown.org/tags/Marvel/works',
  'http://archiveofourown.org/tags/One%20Direction%20(Band)/works',
  'http://archiveofourown.org/tags/DCU/works',
  'http://archiveofourown.org/tags/Supernatural/works',
  'http://archiveofourown.org/tags/Dragon%20Age%20-%20All%20Media%20Types/works',
  'http://archiveofourown.org/tags/Final%20Fantasy/works',
  'http://archiveofourown.org/tags/Mass%20Effect/works',
  'http://archiveofourown.org/tags/Star%20Wars%20-%20All%20Media%20Types/works',
  'http://archiveofourown.org/tags/Teen%20Wolf%20(TV)/works',
  'http://archiveofourown.org/tags/Star%20Trek:%20The%20Original%20Series/works',
  'http://archiveofourown.org/tags/Star%20Trek:%20The%20Next%20Generation/works',
  'http://archiveofourown.org/tags/Game%20of%20Thrones%20(TV)/works',
  'http://archiveofourown.org/tags/Doctor%20Who%20*a*%20Related%20Fandoms/works',
  'http://archiveofourown.org/tags/The%20Lord%20of%20the%20Rings%20(Movies)/works',
  'http://archiveofourown.org/tags/Battlestar%20Galactica%20(2003)/works',
  'http://archiveofourown.org/tags/Buffy%20the%20Vampire%20Slayer/works',
  'http://archiveofourown.org/tags/Friday%20Night%20Lights/works',
  'http://archiveofourown.org/tags/The%20X-Files/works',
  'http://archiveofourown.org/tags/due%20South/works',
  'http://archiveofourown.org/tags/Community%20(TV)/works',
  'http://archiveofourown.org/tags/Gilmore%20Girls/works',
  'http://archiveofourown.org/tags/Once%20Upon%20a%20Time%20(TV)/works',
  'http://archiveofourown.org/tags/Parks%20and%20Recreation/works',
  'http://archiveofourown.org/tags/Sailor%20Moon%20-%20All%20Media%20Types/works',
  'http://archiveofourown.org/tags/Vampire%20Diaries%20(TV)/works',
  'http://archiveofourown.org/tags/Veronica%20Mars%20(TV)/works',
  'http://archiveofourown.org/tags/Twilight%20Series%20-%20All%20Media%20Types/works',
  'http://archiveofourown.org/tags/The%20West%20Wing/works',
  'http://archiveofourown.org/tags/Xena:%20Warrior%20Princess/works',
  'http://archiveofourown.org/tags/Hetalia:%20Axis%20Powers/works',
  'http://archiveofourown.org/tags/%E5%BC%B1%E8%99%AB%E3%83%9A%E3%83%80%E3%83%AB%20%7C%20Yowamushi%20Pedal/works',
  'http://archiveofourown.org/tags/Haikyuu!!/works'
  ];

  var result = [],
      resultCount = 0;
  _.each(urls, function (url) {
    request(url, function (error, response, body) {
      if (!error && response.statusCode == 200) {
        var $ = cheerio.load(body);
        // parse stuff and resolve
        var fandom = $('h2.heading > a').text();
        fandom = fandom.replace(/[\-\(\:\&\|].*$/,'');
        // "DCU" gets you a toy line, "DC" gets better results
        if (fandom === 'DCU') {
          fandom = 'DC';
        }
//        console.log(fandom);
        var names = $('#tag_category_character > ul > li').map(function(ind, el) { return($(el).text().replace(/\(.*\)/,'').trim())});
        names = _.map(names, function(name) {
          return {
            name: name,
            fandom: fandom
          };
        });
        result.push(names);
        resultCount++;
        // if we've gathered all the results
        if (result.length === urls.length) {
          // Grab potential settings from twitter
          _.when(
              search('"wish I was in"'),
              search('"pretend we\'re in"')
            )
            .done(function() {
              var res = _.flatten(arguments);
              console.log(res);
              var settings = _.chain(res)
                .map(function(el) {
                  return inflection.titleize(el.replace(/(\.|,|!|\?).*/,'').trim());
                })
                .reject(function(el) {
                  return el.match(/\si\s/i) !== null || el.length > 25 || el.length <= 2;
                })
                .value();
              //console.log(settings);

              result = _.flatten(result);
              var first = result.pick();
              var second = result.pick();
              getImages('"' + first.name + '" ' + first.fandom, '"' + second.name + '" ' + second.fandom)
                .done(function(file1, file2) {
                  console.log(file1, file2);
                  exec('mogrify -resize 200x200^ -gravity center -extent 200x200 ' + file1 + '[0]').on('close', function() {
                    exec('mogrify -resize 200x200^ -gravity center -extent 200x200 ' + file2 + '[0]').on('close', function() {
                      exec('convert ' + file1 + ' ' + file2 + ' +append out.png').on('close', function() {
                        var image = [
                          'heart.gif',
                          'broken_heart.gif'
                        ].pick();
                        exec('composite -gravity center ' + image + ' out.png out2.png').on('close', function() {
                          exec('rm 1* && rm 2* && cp out2.png ~/Downloads');
                          var myTweet = first.name + ' and ' + second.name + ' in ' + settings.pick();
                          console.log(myTweet);
                          if (first.fandom === 'Doctor Who') {
                            first.fandom = 'Doctor Who Universe';
                          }
                          if (second.fandom === 'Doctor Who') {
                            second.fandom = 'Doctor Who Universe';
                          }
                          if (!wordfilter.blacklisted(myTweet) && !debug) {
                            // Tweet it
                            twitterRestClient.statusesUpdateWithMedia({
                                'status': myTweet,
                                'media[]': 'out2.png'
                              },
                              function(error, result) {
                                if (error) {
                                  console.log('Error: ' + (error.code ? error.code + ' ' + error.message : error.message));
                                }
                                if (result) {
                                  console.log(result);
                                  // Tumblr it
                                  tumblr.post('/post', {
                                    type: 'photo',
                                    source: result.entities.media[0].media_url,
                                    caption: myTweet,
                                    tags: ['AU Prompts',first.name,second.name,first.fandom,second.fandom,first.name+'/'+second.name].join(',')
                                    }, function(err, json){
                                    console.log(json, err);
                                  });
                                }
                            });

                          }
                          console.log('done');
                        });
                      });
                    });
                  });

                });
            });
        }
      }
      else {
        dfd.reject();
      }
    });
  });
  return dfd.promise();
}

function search(term) {
  var dfd = new _.Deferred();
  T.get('search/tweets', { q: term, count: 100 }, function(err, reply) {
    var tweets = reply.statuses;
    tweets = _.chain(tweets)
      .map(function(el) {
        if (el.retweeted_status) {
          return ent.decode(el.retweeted_status.text);
        }
        else {
          return ent.decode(el.text);
        }
      })
      .map(function(el) {
        var reg = new RegExp('.*'+term.replace(/"/g,''),'i');
        return el.replace(reg,'');
      })
      .reject(function(el) {
        // filtering out substring of "Antarctica" because of a stupid song lyric
        return (el.indexOf('#') > -1 || el.indexOf('http') > -1 || el.indexOf('@') > -1 || el.indexOf('"') > -1 || el.indexOf(':') > -1 || el.toLowerCase().indexOf('antar') > -1);
      })
      .uniq()
      .value();
    dfd.resolve(tweets);
  });
  return dfd.promise();
}

// tweet once, this is meant to be run on a cron job
generate();


text:
package com.sixt.service.framework.kafka.messaging;

public interface RetryDelayer {

    // returns true if we should still retrying
    boolean delay();

    // reset the previous attempt if we have a new retry-case
    void reset();
}


text:
package main

import (
	"errors"
	"net/http"
	"sync"
	"time"

	"github.com/go-kit/kit/log"
	"github.com/go-kit/kit/metrics"
	"github.com/xmidt-org/webpa-common/webhook"
	"github.com/xmidt-org/wrp-go/v2"
)

// SenderWrapperFactory configures the CaduceusSenderWrapper for creation
type SenderWrapperFactory struct {
	// The number of workers to assign to each OutboundSender created.
	NumWorkersPerSender int

	// The queue size to assign to each OutboundSender created.
	QueueSizePerSender int

	// The cut off time to assign to each OutboundSender created.
	CutOffPeriod time.Duration

	// Number of delivery retries before giving up
	DeliveryRetries int

	// Time in between delivery retries
	DeliveryInterval time.Duration

	// The amount of time to let expired OutboundSenders linger before
	// shutting them down and cleaning up the resources associated with them.
	Linger time.Duration

	// Metrics registry.
	MetricsRegistry CaduceusMetricsRegistry

	// The metrics counter for dropped messages due to invalid payloads
	DroppedMsgCounter metrics.Counter

	EventType metrics.Counter

	// The logger implementation to share with OutboundSenders.
	Logger log.Logger

	// The http client Do() function to share with OutboundSenders.
	Sender func(*http.Request) (*http.Response, error)
}

type SenderWrapper interface {
	Update([]webhook.W)
	Queue(*wrp.Message)
	Shutdown(bool)
}

// CaduceusSenderWrapper contains no external parameters.
type CaduceusSenderWrapper struct {
	sender              func(*http.Request) (*http.Response, error)
	numWorkersPerSender int
	queueSizePerSender  int
	deliveryRetries     int
	deliveryInterval    time.Duration
	cutOffPeriod        time.Duration
	linger              time.Duration
	logger              log.Logger
	mutex               sync.RWMutex
	senders             map[string]OutboundSender
	metricsRegistry     CaduceusMetricsRegistry
	eventType           metrics.Counter
	wg                  sync.WaitGroup
	shutdown            chan struct{}
}

// New produces a new SenderWrapper implemented by CaduceusSenderWrapper
// based on the factory configuration.
func (swf SenderWrapperFactory) New() (sw SenderWrapper, err error) {
	caduceusSenderWrapper := &CaduceusSenderWrapper{
		sender:              swf.Sender,
		numWorkersPerSender: swf.NumWorkersPerSender,
		queueSizePerSender:  swf.QueueSizePerSender,
		deliveryRetries:     swf.DeliveryRetries,
		deliveryInterval:    swf.DeliveryInterval,
		cutOffPeriod:        swf.CutOffPeriod,
		linger:              swf.Linger,
		logger:              swf.Logger,
		metricsRegistry:     swf.MetricsRegistry,
	}

	if swf.Linger <= 0 {
		err = errors.New("Linger must be positive.")
		sw = nil
		return
	}

	caduceusSenderWrapper.eventType = swf.MetricsRegistry.NewCounter(IncomingEventTypeCounter)

	caduceusSenderWrapper.senders = make(map[string]OutboundSender)
	caduceusSenderWrapper.shutdown = make(chan struct{})

	caduceusSenderWrapper.wg.Add(1)
	go undertaker(caduceusSenderWrapper)

	sw = caduceusSenderWrapper
	return
}

// Update is called when we get changes to our webhook listeners with either
// additions, or updates.  This code takes care of building new OutboundSenders
// and maintaining the existing OutboundSenders.
func (sw *CaduceusSenderWrapper) Update(list []webhook.W) {
	// We'll like need this, so let's get one ready
	osf := OutboundSenderFactory{
		Sender:           sw.sender,
		CutOffPeriod:     sw.cutOffPeriod,
		NumWorkers:       sw.numWorkersPerSender,
		QueueSize:        sw.queueSizePerSender,
		MetricsRegistry:  sw.metricsRegistry,
		DeliveryRetries:  sw.deliveryRetries,
		DeliveryInterval: sw.deliveryInterval,
		Logger:           sw.logger,
	}

	ids := make([]struct {
		Listener webhook.W
		ID       string
	}, len(list))

	for i, v := range list {
		ids[i].Listener = v
		ids[i].ID = v.ID()
	}

	sw.mutex.Lock()
	for _, inValue := range ids {
		sender, ok := sw.senders[inValue.ID]
		if !ok {
			osf.Listener = inValue.Listener
			obs, err := osf.New()
			if nil == err {
				sw.senders[inValue.ID] = obs
			}
			continue
		}
		sender.Update(inValue.Listener)
	}
	sw.mutex.Unlock()
}

// Queue is used to send all the possible outbound senders a request.  This
// function performs the fan-out and filtering to multiple possible endpoints.
func (sw *CaduceusSenderWrapper) Queue(msg *wrp.Message) {
	sw.mutex.RLock()

	sw.eventType.With("event", msg.FindEventStringSubMatch())

	for _, v := range sw.senders {
		v.Queue(msg)
	}
	sw.mutex.RUnlock()
}

// Shutdown closes down the delivery mechanisms and cleans up the underlying
// OutboundSenders either gently (waiting for delivery queues to empty) or not
// (dropping enqueued messages)
func (sw *CaduceusSenderWrapper) Shutdown(gentle bool) {
	sw.mutex.Lock()
	for k, v := range sw.senders {
		v.Shutdown(gentle)
		delete(sw.senders, k)
	}
	sw.mutex.Unlock()
	close(sw.shutdown)
}

// undertaker looks at the OutboundSenders periodically and prunes the ones
// that have been retired for too long, freeing up resources.
func undertaker(sw *CaduceusSenderWrapper) {
	defer sw.wg.Done()
	// Collecting unused OutboundSenders isn't a huge priority, so do it
	// slowly.
	ticker := time.NewTicker(2 * sw.linger)
	for {
		select {
		case <-ticker.C:
			threshold := time.Now().Add(-1 * sw.linger)
			deadList := make(map[string]OutboundSender)

			// Actually shutting these down could take longer then we
			// want to lock the mutex, so just remove them from the active
			// list & shut them down afterwards.
			sw.mutex.Lock()
			for k, v := range sw.senders {
				retired := v.RetiredSince()
				if threshold.After(retired) {
					deadList[k] = v
					delete(sw.senders, k)
				}
			}
			sw.mutex.Unlock()

			// Shut them down
			for _, v := range deadList {
				v.Shutdown(false)
			}
		case <-sw.shutdown:
			ticker.Stop()
			return
		}
	}
}


text:
.. image:: https://rawgit.com/ticki/tfs/master/icon.svg
    :alt: The TFS icon.
    :align: center

================================
TFS: Next-generation file system
================================

TFS is a modular, fast, and feature rich next-gen file system, employing
modern techniques for high performance, high space efficiency, and high
scalability.

TFS was created out of the need for a modern file system for Redox OS, as a
replacement for ZFS, which proved to be slow to implement because of its
monolithic design.

TFS is inspired by the ideas behind ZFS, but at the same time it aims to be
modular and easier to implement.

TFS is not related to the file system of the same name by *terminalcloud*.

*While many components are complete, TFS itself is not ready for use.*

.. image:: https://img.shields.io/github/license/ticki/tfs.svg
    :target: https://en.wikipedia.org/wiki/MIT_License
    :alt: MIT/X11 permissive license.
.. image:: https://img.shields.io/github/stars/ticki/tfs.svg?style=social&label=Star
    :alt: GitHub Stars

Design goals
------------

TFS is designed with the following goals in mind:

Concurrent
    TFS contains very few locks and aims to be as suitable for multithreaded
    systems as possible. It makes use of multiple truly concurrent structures
    to manage the data, and scales linearly by the number of cores. **This is
    perhaps the most important feature of TFS.**
Asynchronous
    TFS is asynchronous: operations can happen independently; writes and
    reads from the disk need not block.
Full-disk compression
    TFS is the first file system to incorporate complete full-disk compression
    through a scheme we call RACC (random-access cluster compression). This
    means that every cluster is compressed only affecting performance slightly.
    It is estimated that you get 60-120% more usable space.
Revision history
    TFS stores a revision history of every file without imposing extra
    overhead. This means that you can revert any file into an earlier version,
    backing up the system automatically and without imposed overhead from
    copying.
Data integrity
    TFS, like ZFS, stores full checksums of the file (not just metadata), and
    on top of that, it is done in the parent block. That means that almost all
    data corruption will be detected upon read.
Copy-on-write semantics
    Similarly to Btrfs and ZFS, TFS uses CoW semantics, meaning that no cluster
    is ever overwritten directly, but instead it is copied and written to a new
    cluster.
O(1) recursive copies
    Like some other file systems, TFS can do recursive copies in constant time,
    but there is an unique addition: TFS doesn't copy even after it is mutated.
    How? It maintains segments of the file individually, such that only the
    updated segment needs copying.
Guaranteed atomicity
    The system will never enter an inconsistent state (unless there is hardware
    failure), meaning that unexpected power-off won't ever damage the system.
Improved caching
    TFS puts a lot of effort into caching the disk to speed up disk accesses.
    It uses machine learning to learn patterns and predict future uses to
    reduce the number of cache misses. TFS also compresses the in-memory cache,
    reducing the amount of memory needed.
Better file monitoring
    CoW is very suitable for high-performance, scalable file monitoring, but
    unfortunately only few file systems incorporate that. TFS is one of those.
All memory safe
    TFS uses only components written in Rust. As such, memory unsafety is only
    possible in code marked `unsafe`, which is checked extra carefully.
Full coverage testing
    TFS aims to be full coverage with respect to testing. This gives relatively
    strong guarantees on correctness by instantly revealing large classes of
    bugs.
SSD friendly
    TFS tries to avoid the write limitation in SSD by repositioning dead sectors.
Improved garbage collection
    TFS uses Bloom filters for space-efficient and fast garbage collection. TFS
    allows the FS garbage collector to run in the background without blocking
    the rest of the file system.

FAQ
---

Why do you use SPECK as the default cipher?
    SPECK is a relatively young cipher, yet it has been subject to a lot of
    (ineffective) cryptanalysis, so it is relatively secure. It has really
    good performance and a simple implementation. Portability is an important
    part of the TFS design, and truly portable AES implementations without
    side-channel attacks is harder than many think (particularly, there are
    issues with `SubBytes` in most portable implementations). SPECK does not
    have this issue, and can thus be securely implemented portably with minimal
    effort.
How similar is TFS and ZFS?
    Not that similar, actually. They share many of the basic ideas, but
    otherwise they are essentially unconnected. But ZFS' design has shaped TFS'
    a lot.
Is TFS Redox-only?
    No, and it was never planned to be Redox-only.
How does whole-disk compression work?
    Whole-disk compression is -- to my knowledge -- exclusive to TFS. It works
    by collecting as many "pages" (virtual data blocks) into a "cluster"
    (allocation unit). By doing this, the pages can be read by simply
    decompressing the respective cluster.
Why is ZMicro so slow? Will it affect the performance of TFS?
    The reason ZMicro is so slow is because it works on a bit level, giving
    excellent compression ratio on the cost of performance. This horribly slow
    performance is paid back by the reduced number of writes. In fact, more
    than 50% of the allocations with ZMicro will only write one sector, as
    opposed to 3. Secondly, no matter how fast your disk is, it will not get
    anywhere near the performance of ZMicro because disk operations are
    inherently slow, and when put in perspective, the performance of the
    compression is really unimportant.
Extendible hashing or B+ trees?
    Neither. TFS uses a combination of trees and hash tables: Nested hash
    tables, a form of hash trees. The idea is that instead of reallocating, a
    new subtable is created in the bucket.

Resources on design
-------------------

I've written a number of pieces on the design of TFS:

- `SeaHash: Explained <http://ticki.github.io/blog/seahash-explained/>`_. This
  describes the default checksum algorithm designed for TFS.
- `On Random-Access Compression <http://ticki.github.io/blog/on-random-access-compression/>`_.
  This post describes the algorithm used for random-access compression.
- `Ternary as a prediction residue code <http://ticki.github.io/blog/ternary-as-a-prediction-residue-code/>`_. The
  use of this is related to creating a good adaptive (headerless) entropy
  compressor.
- `How LZ4 works <http://ticki.github.io/blog/how-lz4-works/>`_. This describes
  how the LZ4 compression algorithm works.
- `Collision Resolution with Nested Hash Tables <https://ticki.github.io/blog/collision-resolution-with-nested-hash-tables/>`_.
  This describes the method of nested hash tables we use for the directory
  structure.
- `An Atomic Hash Table <https://ticki.github.io/blog/an-atomic-hash-table/>`_.
  This describes the concurrent, in-memory hash table/key-value store.

Specification
-------------

The full specification can be found in `specification.tex`. To render it,
install `texlive` or another distribution with XeTeX, and run

.. code:: bash

    xelatex --shell-escape specification.tex

Then open the file named `specification.pdf`.


text:
#ifndef PCL_FPFH_OMP_H_
#define PCL_FPFH_OMP_H_

#include <pcl/features/feature.h>
#include <pcl/features/fpfh.h>

namespace pcl
{
  /** \brief FPFHEstimationOMP estimates the Fast Point Feature Histogram (FPFH) descriptor for a given point cloud
    * dataset containing points and normals, in parallel, using the OpenMP standard.
    *
    * \note If you use this code in any academic work, please cite:
    *
    *   - R.B. Rusu, N. Blodow, M. Beetz.
    *     Fast Point Feature Histograms (FPFH) for 3D Registration.
    *     In Proceedings of the IEEE International Conference on Robotics and Automation (ICRA),
    *     Kobe, Japan, May 12-17 2009.
    *   - R.B. Rusu, A. Holzbach, N. Blodow, M. Beetz.
    *     Fast Geometric Point Labeling using Conditional Random Fields.
    *     In Proceedings of the 22nd IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS),
    *     St. Louis, MO, USA, October 11-15 2009.
    *
    * \attention
    * The convention for FPFH features is:
    *   - if a query point's nearest neighbors cannot be estimated, the FPFH feature will be set to NaN
    *     (not a number)
    *   - it is impossible to estimate a FPFH descriptor for a point that
    *     doesn't have finite 3D coordinates. Therefore, any point that contains
    *     NaN data on x, y, or z, will have its FPFH feature property set to NaN.
    *
    * \author Radu B. Rusu
    * \ingroup features
    */
  template <typename PointInT, typename PointNT, typename PointOutT>
  class FPFHEstimationOMP : public FPFHEstimation<PointInT, PointNT, PointOutT>
  {
    public:
      typedef boost::shared_ptr<FPFHEstimationOMP<PointInT, PointNT, PointOutT> > Ptr;
      typedef boost::shared_ptr<const FPFHEstimationOMP<PointInT, PointNT, PointOutT> > ConstPtr;
      using Feature<PointInT, PointOutT>::feature_name_;
      using Feature<PointInT, PointOutT>::getClassName;
      using Feature<PointInT, PointOutT>::indices_;
      using Feature<PointInT, PointOutT>::k_;
      using Feature<PointInT, PointOutT>::search_parameter_;
      using Feature<PointInT, PointOutT>::input_;
      using Feature<PointInT, PointOutT>::surface_;
      using FeatureFromNormals<PointInT, PointNT, PointOutT>::normals_;
      using FPFHEstimation<PointInT, PointNT, PointOutT>::hist_f1_;
      using FPFHEstimation<PointInT, PointNT, PointOutT>::hist_f2_;
      using FPFHEstimation<PointInT, PointNT, PointOutT>::hist_f3_;
      using FPFHEstimation<PointInT, PointNT, PointOutT>::weightPointSPFHSignature;

      typedef typename Feature<PointInT, PointOutT>::PointCloudOut PointCloudOut;

      /** \brief Initialize the scheduler and set the number of threads to use.
        * \param[in] nr_threads the number of hardware threads to use (0 sets the value back to automatic)
        */
      FPFHEstimationOMP (unsigned int nr_threads = 0) : nr_bins_f1_ (11), nr_bins_f2_ (11), nr_bins_f3_ (11), threads_ (nr_threads)
      {
        feature_name_ = "FPFHEstimationOMP";
      }

      /** \brief Initialize the scheduler and set the number of threads to use.
        * \param[in] nr_threads the number of hardware threads to use (0 sets the value back to automatic)
        */
      inline void
      setNumberOfThreads (unsigned int nr_threads = 0) { threads_ = nr_threads; }

    private:
      /** \brief Estimate the Fast Point Feature Histograms (FPFH) descriptors at a set of points given by
        * <setInputCloud (), setIndices ()> using the surface in setSearchSurface () and the spatial locator in
        * setSearchMethod ()
        * \param[out] output the resultant point cloud model dataset that contains the FPFH feature estimates
        */
      void
      computeFeature (PointCloudOut &output);

    public:
      /** \brief The number of subdivisions for each angular feature interval. */
      int nr_bins_f1_, nr_bins_f2_, nr_bins_f3_;
    private:
      /** \brief The number of threads the scheduler should use. */
      unsigned int threads_;
  };
}

#ifdef PCL_NO_PRECOMPILE
#include <pcl/features/impl/fpfh_omp.hpp>
#endif

#endif  //#ifndef PCL_FPFH_OMP_H_


text:
//
//  Generated by the J2ObjC translator.  DO NOT EDIT!
//  source: android/libcore/luni/src/main/java/java/text/AttributedString.java
//

#ifndef _JavaTextAttributedString_H_
#define _JavaTextAttributedString_H_

#include "J2ObjC_header.h"
#include "java/text/AttributedCharacterIterator.h"

@class IOSObjectArray;
@class JavaTextAttributedCharacterIterator_Attribute;
@protocol JavaTextAttributedCharacterIterator;
@protocol JavaUtilMap;
@protocol JavaUtilSet;

/*!
 @brief Holds a string with attributes describing the characters of
 this string.
 */
@interface JavaTextAttributedString : NSObject {
 @public
  NSString *text_;
  id<JavaUtilMap> attributeMap_;
}

#pragma mark Public

/*!
 @brief Constructs an AttributedString from an AttributedCharacterIterator
 , which represents attributed text.
 @param iterator
 the AttributedCharacterIterator that contains the text
 for this attributed string.
 */
- (instancetype)initWithJavaTextAttributedCharacterIterator:(id<JavaTextAttributedCharacterIterator>)iterator;

/*!
 @brief Constructs an AttributedString from a range of the text contained
 in the specified AttributedCharacterIterator, starting at start
  and ending at end.
 All attributes will be copied to this
 attributed string.
 @param iterator
 the AttributedCharacterIterator that contains the text
 for this attributed string.
 @param start
 the start index of the range of the copied text.
 @param end
 the end index of the range of the copied text.
 @throws IllegalArgumentException
 if start is less than first index of
 iterator, end is greater than the last
 index + 1 in iterator or if start > end.
 */
- (instancetype)initWithJavaTextAttributedCharacterIterator:(id<JavaTextAttributedCharacterIterator>)iterator
                                                    withInt:(jint)start
                                                    withInt:(jint)end;

/*!
 @brief Constructs an AttributedString from a range of the text contained
 in the specified AttributedCharacterIterator, starting at start
 , ending at end and it will copy the attributes defined in
 the specified set.
 If the set is null then all attributes are
 copied.
 @param iterator
 the AttributedCharacterIterator that contains the text
 for this attributed string.
 @param start
 the start index of the range of the copied text.
 @param end
 the end index of the range of the copied text.
 @param attributes
 the set of attributes that will be copied, or all if it is
 null.
 @throws IllegalArgumentException
 if start is less than first index of
 iterator, end is greater than the last index +
 1 in iterator or if start > end.
 */
- (instancetype)initWithJavaTextAttributedCharacterIterator:(id<JavaTextAttributedCharacterIterator>)iterator
                                                    withInt:(jint)start
                                                    withInt:(jint)end
     withJavaTextAttributedCharacterIterator_AttributeArray:(IOSObjectArray *)attributes;

/*!
 @brief Creates an AttributedString from the given text.
 @param value
 the text to take as base for this attributed string.
 */
- (instancetype)initWithNSString:(NSString *)value;

/*!
 @brief Creates an AttributedString from the given text and the
 attributes.
 The whole text has the given attributes applied.
 @param value
 the text to take as base for this attributed string.
 @param attributes
 the attributes that the text is associated with.
 @throws IllegalArgumentException
 if the length of value is 0 but the size of attributes
  is greater than 0.
 @throws NullPointerException
 if value is null.
 */
- (instancetype)initWithNSString:(NSString *)value
                 withJavaUtilMap:(id<JavaUtilMap>)attributes;

/*!
 @brief Applies a given attribute to this string.
 @param attribute
 the attribute that will be applied to this string.
 @param value
 the value of the attribute that will be applied to this
 string.
 @throws IllegalArgumentException
 if the length of this attributed string is 0.
 @throws NullPointerException
 if attribute is null.
 */
- (void)addAttributeWithJavaTextAttributedCharacterIterator_Attribute:(JavaTextAttributedCharacterIterator_Attribute *)attribute
                                                               withId:(id)value;

/*!
 @brief Applies a given attribute to the given range of this string.
 @param attribute
 the attribute that will be applied to this string.
 @param value
 the value of the attribute that will be applied to this
 string.
 @param start
 the start of the range where the attribute will be applied.
 @param end
 the end of the range where the attribute will be applied.
 @throws IllegalArgumentException
 if start < 0, end is greater than the length
 of this string, or if start >= end.
 @throws NullPointerException
 if attribute is null.
 */
- (void)addAttributeWithJavaTextAttributedCharacterIterator_Attribute:(JavaTextAttributedCharacterIterator_Attribute *)attribute
                                                               withId:(id)value
                                                              withInt:(jint)start
                                                              withInt:(jint)end;

/*!
 @brief Applies a given set of attributes to the given range of the string.
 @param attributes
 the set of attributes that will be applied to this string.
 @param start
 the start of the range where the attribute will be applied.
 @param end
 the end of the range where the attribute will be applied.
 @throws IllegalArgumentException
 if start < 0, end is greater than the length
 of this string, or if start >= end.
 */
- (void)addAttributesWithJavaUtilMap:(id<JavaUtilMap>)attributes
                             withInt:(jint)start
                             withInt:(jint)end;

/*!
 @brief Returns an AttributedCharacterIterator that gives access to the
 complete content of this attributed string.
 @return the newly created AttributedCharacterIterator.
 */
- (id<JavaTextAttributedCharacterIterator>)getIterator;

/*!
 @brief Returns an AttributedCharacterIterator that gives access to the
 complete content of this attributed string.
 Only attributes contained in
 attributes are available from this iterator if they are defined
 for this text.
 @param attributes
 the array containing attributes that will be in the new
 iterator if they are defined for this text.
 @return the newly created AttributedCharacterIterator.
 */
- (id<JavaTextAttributedCharacterIterator>)getIteratorWithJavaTextAttributedCharacterIterator_AttributeArray:(IOSObjectArray *)attributes;

/*!
 @brief Returns an AttributedCharacterIterator that gives access to the
 contents of this attributed string starting at index start up to
 index end.
 Only attributes contained in attributes are
 available from this iterator if they are defined for this text.
 @param attributes
 the array containing attributes that will be in the new
 iterator if they are defined for this text.
 @param start
 the start index of the iterator on the underlying text.
 @param end
 the end index of the iterator on the underlying text.
 @return the newly created AttributedCharacterIterator.
 */
- (id<JavaTextAttributedCharacterIterator>)getIteratorWithJavaTextAttributedCharacterIterator_AttributeArray:(IOSObjectArray *)attributes
                                                                                withInt:(jint)start
                                                                                withInt:(jint)end;

@end

J2OBJC_EMPTY_STATIC_INIT(JavaTextAttributedString)

J2OBJC_FIELD_SETTER(JavaTextAttributedString, text_, NSString *)
J2OBJC_FIELD_SETTER(JavaTextAttributedString, attributeMap_, id<JavaUtilMap>)

FOUNDATION_EXPORT void JavaTextAttributedString_initWithJavaTextAttributedCharacterIterator_(JavaTextAttributedString *self, id<JavaTextAttributedCharacterIterator> iterator);

FOUNDATION_EXPORT JavaTextAttributedString *new_JavaTextAttributedString_initWithJavaTextAttributedCharacterIterator_(id<JavaTextAttributedCharacterIterator> iterator) NS_RETURNS_RETAINED;

FOUNDATION_EXPORT void JavaTextAttributedString_initWithJavaTextAttributedCharacterIterator_withInt_withInt_(JavaTextAttributedString *self, id<JavaTextAttributedCharacterIterator> iterator, jint start, jint end);

FOUNDATION_EXPORT JavaTextAttributedString *new_JavaTextAttributedString_initWithJavaTextAttributedCharacterIterator_withInt_withInt_(id<JavaTextAttributedCharacterIterator> iterator, jint start, jint end) NS_RETURNS_RETAINED;

FOUNDATION_EXPORT void JavaTextAttributedString_initWithJavaTextAttributedCharacterIterator_withInt_withInt_withJavaTextAttributedCharacterIterator_AttributeArray_(JavaTextAttributedString *self, id<JavaTextAttributedCharacterIterator> iterator, jint start, jint end, IOSObjectArray *attributes);

FOUNDATION_EXPORT JavaTextAttributedString *new_JavaTextAttributedString_initWithJavaTextAttributedCharacterIterator_withInt_withInt_withJavaTextAttributedCharacterIterator_AttributeArray_(id<JavaTextAttributedCharacterIterator> iterator, jint start, jint end, IOSObjectArray *attributes) NS_RETURNS_RETAINED;

FOUNDATION_EXPORT void JavaTextAttributedString_initWithNSString_(JavaTextAttributedString *self, NSString *value);

FOUNDATION_EXPORT JavaTextAttributedString *new_JavaTextAttributedString_initWithNSString_(NSString *value) NS_RETURNS_RETAINED;

FOUNDATION_EXPORT void JavaTextAttributedString_initWithNSString_withJavaUtilMap_(JavaTextAttributedString *self, NSString *value, id<JavaUtilMap> attributes);

FOUNDATION_EXPORT JavaTextAttributedString *new_JavaTextAttributedString_initWithNSString_withJavaUtilMap_(NSString *value, id<JavaUtilMap> attributes) NS_RETURNS_RETAINED;

J2OBJC_TYPE_LITERAL_HEADER(JavaTextAttributedString)

@interface JavaTextAttributedString_Range : NSObject {
 @public
  jint start_;
  jint end_;
  id value_;
}

#pragma mark Package-Private

- (instancetype)initWithInt:(jint)s
                    withInt:(jint)e
                     withId:(id)v;

@end

J2OBJC_EMPTY_STATIC_INIT(JavaTextAttributedString_Range)

J2OBJC_FIELD_SETTER(JavaTextAttributedString_Range, value_, id)

FOUNDATION_EXPORT void JavaTextAttributedString_Range_initWithInt_withInt_withId_(JavaTextAttributedString_Range *self, jint s, jint e, id v);

FOUNDATION_EXPORT JavaTextAttributedString_Range *new_JavaTextAttributedString_Range_initWithInt_withInt_withId_(jint s, jint e, id v) NS_RETURNS_RETAINED;

J2OBJC_TYPE_LITERAL_HEADER(JavaTextAttributedString_Range)

@interface JavaTextAttributedString_AttributedIterator : NSObject < JavaTextAttributedCharacterIterator >

#pragma mark Public

/*!
 @brief Returns a new AttributedIterator with the same source string,
 begin, end, and current index as this attributed iterator.
 @return a shallow copy of this attributed iterator.
 */
- (id)clone;

- (jchar)current;

- (jchar)first;

/*!
 @brief Returns a set of attributes present in the AttributedString.
 An empty set returned indicates that no attributes where defined.
 @return a set of attribute keys that may be empty.
 */
- (id<JavaUtilSet>)getAllAttributeKeys;

- (id)getAttributeWithJavaTextAttributedCharacterIterator_Attribute:(JavaTextAttributedCharacterIterator_Attribute *)attribute;

- (id<JavaUtilMap>)getAttributes;

/*!
 @brief Returns the begin index in the source string.
 @return the index of the first character to iterate.
 */
- (jint)getBeginIndex;

/*!
 @brief Returns the end index in the source String.
 @return the index one past the last character to iterate.
 */
- (jint)getEndIndex;

/*!
 @brief Returns the current index in the source String.
 @return the current index.
 */
- (jint)getIndex;

- (jint)getRunLimit;

- (jint)getRunLimitWithJavaTextAttributedCharacterIterator_Attribute:(JavaTextAttributedCharacterIterator_Attribute *)attribute;

- (jint)getRunLimitWithJavaUtilSet:(id<JavaUtilSet>)attributes;

- (jint)getRunStart;

- (jint)getRunStartWithJavaTextAttributedCharacterIterator_Attribute:(JavaTextAttributedCharacterIterator_Attribute *)attribute;

- (jint)getRunStartWithJavaUtilSet:(id<JavaUtilSet>)attributes;

- (jchar)last;

- (jchar)next;

- (jchar)previous;

- (jchar)setIndexWithInt:(jint)location;

#pragma mark Package-Private

- (instancetype)initWithJavaTextAttributedString:(JavaTextAttributedString *)attrString;

- (instancetype)initWithJavaTextAttributedString:(JavaTextAttributedString *)attrString
withJavaTextAttributedCharacterIterator_AttributeArray:(IOSObjectArray *)attributes
                                         withInt:(jint)begin
                                         withInt:(jint)end;

@end

J2OBJC_EMPTY_STATIC_INIT(JavaTextAttributedString_AttributedIterator)

FOUNDATION_EXPORT void JavaTextAttributedString_AttributedIterator_initWithJavaTextAttributedString_(JavaTextAttributedString_AttributedIterator *self, JavaTextAttributedString *attrString);

FOUNDATION_EXPORT JavaTextAttributedString_AttributedIterator *new_JavaTextAttributedString_AttributedIterator_initWithJavaTextAttributedString_(JavaTextAttributedString *attrString) NS_RETURNS_RETAINED;

FOUNDATION_EXPORT void JavaTextAttributedString_AttributedIterator_initWithJavaTextAttributedString_withJavaTextAttributedCharacterIterator_AttributeArray_withInt_withInt_(JavaTextAttributedString_AttributedIterator *self, JavaTextAttributedString *attrString, IOSObjectArray *attributes, jint begin, jint end);

FOUNDATION_EXPORT JavaTextAttributedString_AttributedIterator *new_JavaTextAttributedString_AttributedIterator_initWithJavaTextAttributedString_withJavaTextAttributedCharacterIterator_AttributeArray_withInt_withInt_(JavaTextAttributedString *attrString, IOSObjectArray *attributes, jint begin, jint end) NS_RETURNS_RETAINED;

J2OBJC_TYPE_LITERAL_HEADER(JavaTextAttributedString_AttributedIterator)

#endif // _JavaTextAttributedString_H_


text:
export const ADD_POST = 'ADD_POST';
export const CHANGE_SELECTED_POST = 'CHANGE_SELECTED_POST';
export const ADD_POST_REQUEST = 'ADD_POST_REQUEST';
export const ADD_POSTS = 'ADD_POSTS';
export const ADD_SELECTED_POST = 'ADD_SELECTED_POST';
export const DELETE_POST = 'DELETE_POST';


text:
/*

package com.portal.telemetrix;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
public class PortalApplication {

	public static void main(String[] args) {
		SpringApplication.run(PortalApplication.class, args);
	}
}

*/


text:
<?php

namespace anli\metronic\assets;

use yii\web\AssetBundle;

/**
 * This is the main asset bundle.
 * @author Su Anli <anli@euqol.com>
 * @since 1.0.0
 */
class MainAsset extends AssetBundle
{

    /**
     * @inheritdoc
     */
    public $basePath = '@webroot/metronic/theme/';

    /**
     * @inheritdoc
     */
    public $baseUrl = '@web/metronic/theme/';

    /**
     * @inheritdoc
     */
    public $css = [
        //'css/site.css',
        'https://fonts.googleapis.com/css?family=Open+Sans:400,200,600,700&subset=all',
        'assets/global/plugins/font-awesome/css/font-awesome.min.css',
        'assets/global/plugins/simple-line-icons/simple-line-icons.min.css',
        'assets/global/plugins/bootstrap/css/bootstrap.min.css',
        'assets/global/plugins/uniform/css/uniform.default.css',
        'assets/global/plugins/bootstrap-switch/css/bootstrap-switch.min.css',
        /* BEGIN THEME STYLES */

        //'assets/global/css/components.css',
        'assets/global/css/components-rounded.css',
        'assets/global/css/plugins.css',
        'assets/admin/layout2/css/layout.css',

        //'assets/admin/layout2/css/themes/default.css',
        'assets/admin/layout2/css/themes/blue.css',
        'assets/admin/layout2/css/custom.css',
        /* END THEME STYLES */
    ];

    /**
     * @inheritdoc
     */
    public $js = [
        'assets/global/plugins/jquery-slimscroll/jquery.slimscroll.min.js',	//
        'assets/global/plugins/jquery.sparkline.min.js',
        'assets/global/scripts/metronic.js',
        'assets/admin/layout2/scripts/layout.js',
        'assets/admin/layout2/scripts/demo.js',	//
        'assets/admin/pages/scripts/index.js',
    ];

    /**
     * @inheritdoc
     */
    public $depends = [
        'yii\web\YiiAsset',
        'yii\bootstrap\BootstrapAsset',
    ];
}


text:
#ifndef __CONFIG_H
#define __CONFIG_H

#include <asm/arch/imx-regs.h>

/* High Level Configuration Options */
#define CONFIG_ARM1136			/* This is an arm1136 CPU core */
#define CONFIG_MX31			/* in a mx31 */
#define CONFIG_MX31_HCLK_FREQ	26000000
#define CONFIG_MX31_CLK32	32768

#define CONFIG_DISPLAY_CPUINFO
#define CONFIG_DISPLAY_BOARDINFO

#define CONFIG_CMDLINE_TAG			/* enable passing of ATAGs */
#define CONFIG_SETUP_MEMORY_TAGS
#define CONFIG_INITRD_TAG

#if defined(CONFIG_NAND_U_BOOT) && !defined(CONFIG_NAND_SPL)
#define CONFIG_SKIP_LOWLEVEL_INIT
#endif

/*
 * Size of malloc() pool
 */
#define CONFIG_SYS_MALLOC_LEN		(2*CONFIG_ENV_SIZE + 2 * 128 * 1024)

/*
 * Hardware drivers
 */

#define CONFIG_MXC_UART
#define CONFIG_SYS_MX31_UART1
#define CONFIG_HW_WATCHDOG
#define CONFIG_MXC_GPIO

#define CONFIG_HARD_SPI
#define CONFIG_MXC_SPI
#define CONFIG_DEFAULT_SPI_BUS	1
#define CONFIG_DEFAULT_SPI_MODE	(SPI_MODE_0 | SPI_CS_HIGH)

#define CONFIG_FSL_PMIC
#define CONFIG_FSL_PMIC_BUS	1
#define CONFIG_FSL_PMIC_CS	2
#define CONFIG_FSL_PMIC_CLK	1000000
#define CONFIG_FSL_PMIC_MODE	(SPI_MODE_0 | SPI_CS_HIGH)
#define CONFIG_RTC_MC13783

/* allow to overwrite serial and ethaddr */
#define CONFIG_ENV_OVERWRITE
#define CONFIG_CONS_INDEX		1
#define CONFIG_BAUDRATE			115200
#define CONFIG_SYS_BAUDRATE_TABLE	{9600, 19200, 38400, 57600, 115200}

/***********************************************************
 * Command definition
 ***********************************************************/

#include <config_cmd_default.h>

#define CONFIG_CMD_MII
#define CONFIG_CMD_PING
#define CONFIG_CMD_DHCP
#define CONFIG_CMD_SPI
#define CONFIG_CMD_DATE
#define CONFIG_CMD_NAND

/*
 * Disabled due to compilation errors in cmd_bootm.c (IMLS seems to require
 * that CFG_NO_FLASH is undefined).
 */
#undef CONFIG_CMD_IMLS

#define BOARD_LATE_INIT

#define CONFIG_BOOTDELAY	3

#define	CONFIG_EXTRA_ENV_SETTINGS					\
	"bootargs_base=setenv bootargs console=ttymxc0,115200\0"	\
	"bootargs_nfs=setenv bootargs $(bootargs) root=/dev/nfs "	\
		"ip=dhcp nfsroot=$(serverip):$(nfsrootfs),v3,tcp\0"	\
	"bootcmd=run bootcmd_net\0"					\
	"bootcmd_net=run bootargs_base bootargs_mtd bootargs_nfs; "	\
		"tftpboot 0x81000000 uImage-mx31; bootm\0"		\
	"prg_uboot=tftpboot 0x81000000 u-boot-nand.bin; "		\
		"nand erase 0x0 0x40000; "				\
		"nand write 0x81000000 0x0 0x40000\0"

#define CONFIG_NET_MULTI
#define CONFIG_SMC911X
#define CONFIG_SMC911X_BASE	0xB6000000
#define CONFIG_SMC911X_32_BIT

/*
 * Miscellaneous configurable options
 */
#define CONFIG_SYS_LONGHELP	/* undef to save memory */
#define CONFIG_SYS_PROMPT	"uboot> "
#define CONFIG_SYS_CBSIZE	256	/* Console I/O Buffer Size */
/* Print Buffer Size */
#define CONFIG_SYS_PBSIZE	(CONFIG_SYS_CBSIZE + \
				sizeof(CONFIG_SYS_PROMPT)+16)
/* max number of command args */
#define CONFIG_SYS_MAXARGS	16
/* Boot Argument Buffer Size */
#define CONFIG_SYS_BARGSIZE	CONFIG_SYS_CBSIZE

/* memtest works on */
#define CONFIG_SYS_MEMTEST_START	0x80000000
#define CONFIG_SYS_MEMTEST_END		0x10000

/* default load address */
#define CONFIG_SYS_LOAD_ADDR		0x81000000

#define CONFIG_SYS_HZ			1000

#define CONFIG_CMDLINE_EDITING

/*-----------------------------------------------------------------------
 * Stack sizes
 *
 * The stack sizes are set up in start.S using the settings below
 */
#define CONFIG_STACKSIZE	(128 * 1024) /* regular stack */

/*-----------------------------------------------------------------------
 * Physical Memory Map
 */
#define CONFIG_NR_DRAM_BANKS	1
#define PHYS_SDRAM_1		CSD0_BASE
#define PHYS_SDRAM_1_SIZE	(128 * 1024 * 1024)
#define CONFIG_BOARD_EARLY_INIT_F

#define CONFIG_SYS_SDRAM_BASE		PHYS_SDRAM_1
#define CONFIG_SYS_INIT_RAM_ADDR	IRAM_BASE_ADDR
#define CONFIG_SYS_INIT_RAM_SIZE	IRAM_SIZE
#define CONFIG_SYS_GBL_DATA_OFFSET	(CONFIG_SYS_INIT_RAM_SIZE - \
						GENERATED_GBL_DATA_SIZE)
#define CONFIG_SYS_INIT_SP_ADDR	(CONFIG_SYS_INIT_RAM_ADDR + \
						CONFIG_SYS_GBL_DATA_OFFSET)

/*-----------------------------------------------------------------------
 * FLASH and environment organization
 */
/* No NOR flash present */
#define CONFIG_SYS_NO_FLASH

#define CONFIG_ENV_IS_IN_NAND
#define CONFIG_ENV_OFFSET		0x40000
#define CONFIG_ENV_OFFSET_REDUND	0x60000
#define CONFIG_ENV_SIZE			(128 * 1024)

/*
 * NAND driver
 */
#define CONFIG_NAND_MXC
#define CONFIG_MXC_NAND_REGS_BASE      NFC_BASE_ADDR
#define CONFIG_SYS_MAX_NAND_DEVICE     1
#define CONFIG_SYS_NAND_BASE           NFC_BASE_ADDR
#define CONFIG_MXC_NAND_HWECC
#define CONFIG_SYS_NAND_LARGEPAGE

/* NAND configuration for the NAND_SPL */

/* Start copying real U-boot from the second page */
#define CONFIG_SYS_NAND_U_BOOT_OFFS	0x800
#define CONFIG_SYS_NAND_U_BOOT_SIZE	0x30000
/* Load U-Boot to this address */
#define CONFIG_SYS_NAND_U_BOOT_DST	0x87f00000
#define CONFIG_SYS_NAND_U_BOOT_START	CONFIG_SYS_NAND_U_BOOT_DST

#define CONFIG_SYS_NAND_PAGE_SIZE	0x800
#define CONFIG_SYS_NAND_BLOCK_SIZE	(128 * 1024)
#define CONFIG_SYS_NAND_PAGE_COUNT	64
#define CONFIG_SYS_NAND_SIZE		(256 * 1024 * 1024)
#define CONFIG_SYS_NAND_BAD_BLOCK_POS	0

/* Configuration of lowlevel_init.S (clocks and SDRAM) */
#define CCM_CCMR_SETUP		0x074B0BF5
#define CCM_PDR0_SETUP_532MHZ	(PDR0_CSI_PODF(0x1ff) | PDR0_PER_PODF(7) | \
				 PDR0_HSP_PODF(3) | PDR0_NFC_PODF(5) |     \
				 PDR0_IPG_PODF(1) | PDR0_MAX_PODF(3) |     \
				 PDR0_MCU_PODF(0))
#define CCM_MPCTL_SETUP_532MHZ	(PLL_PD(0) | PLL_MFD(51) | PLL_MFI(10) |   \
				 PLL_MFN(12))

#define ESDMISC_MDDR_SETUP	0x00000004
#define ESDMISC_MDDR_RESET_DL	0x0000000c
#define ESDCFG0_MDDR_SETUP	0x006ac73a

#define ESDCTL_ROW_COL		(ESDCTL_SDE | ESDCTL_ROW(2) | ESDCTL_COL(2))
#define ESDCTL_SETTINGS		(ESDCTL_ROW_COL | ESDCTL_SREFR(3) | \
				 ESDCTL_DSIZ(2) | ESDCTL_BL(1))
#define ESDCTL_PRECHARGE	(ESDCTL_ROW_COL | ESDCTL_CMD_PRECHARGE)
#define ESDCTL_AUTOREFRESH	(ESDCTL_ROW_COL | ESDCTL_CMD_AUTOREFRESH)
#define ESDCTL_LOADMODEREG	(ESDCTL_ROW_COL | ESDCTL_CMD_LOADMODEREG)
#define ESDCTL_RW		ESDCTL_SETTINGS

#endif /* __CONFIG_H */


text:
package org.gluu.oxtrust.action;

import java.io.Serializable;

import javax.ejb.Stateless;
import javax.inject.Inject;
import javax.inject.Named;

import org.gluu.jsf2.service.ConversationService;
import org.gluu.jsf2.service.FacesService;

/**
 * Action class for helping with menu
 *
 * @author Yuriy Movchan Date: 12/18/2012
 */
@Stateless
@Named
public class MenuAction implements Serializable {

	private static final long serialVersionUID = -172441515451149801L;

	@Inject
	private ConversationService conversationService;

	@Inject
	private FacesService facesService;

	public String endConversation(final String viewId) {
		conversationService.endConversation();

		facesService.redirect(viewId + "?faces-redirect=true");

		return viewId;
	}
}


text:
function varargout = plotframe(varargin)
% VL_PLOTFRAME  Plot a geometric frame
%  VL_PLOTFRAME(FRAME) plots the feature frame FRAME. The frame can be
%  either a 2D point, a circle, an oriented circle, an ellipse, or an
%  oriented ellipse, as follows:
%
%  Point::
%    FRAME has 2 components. FRAME(1:2) are the x,y coordinates of the
%    point.
%
%  Circle::
%    FRAME has 3 components. FRAME(1:2) are the x,y coordinates of the
%    center and FRAME(3) is its radius.
%
%  Oriented circle::
%    FRAME has 4 components. FRAME(1:2) are the x,y coordiantes of the
%    center of the circle, FRAME(3) is the radius, and FRAME(4) is the
%    orientation, expressed as a rotation in radians of the standard
%    oriented frame (see below). Positive rotations appear clockwise
%    since the image coordiante system is left-handed.
%
%  Ellipse::
%    FRAME has 5 components. FRAME(1:2) are the x,y coordiantes of the
%    center and FRAME(3:5) are the elements S11, S12, S22 of a 2x2
%    covariance matrix S (a positive semidefinite matrix) defining the
%    ellipse shape. The ellipse is the set of points {x + T: x' inv(S)
%    x = 1}, where T is the ellipse center.
%
%  Oriented ellipse::
%    FAME has 6 components. FRAME(1:2) are the coordiantes T=[x;y] of
%    the center. FRAME(3:6) is the column-wise stacking of a 2x2
%    matrix A. The oriented ellipse is obtained by applying the affine
%    transformation (A,T) to the standard oriented frame (see below).
%
%  A standard unoriented frame is a circle of unit radius centered at
%  the origin; a standard oriented frame is the same, but marked with
%  a radius pointing towards the positive Y axis (downwards) to
%  represent the frame orientation. All other frames can be obtained
%  as affine transformations of these two. In the case of unoriented
%  frames, this transformation is ambiguous up to a rotation.
%
%  VL_PLOTFRAME(FRAMES), where FRAMES is a D x N matrix, plots N
%  frames, one per column. This is significantly more efficient than
%  looping over frames explicitly.
%
%  H = VL_PLOTFRAME(...) returns the handle H of the graphical object
%  representing the frames.
%
%  VL_PLOTFRAME(FRAMES,...) passes any extra argument to the
%  underlying plotting function. The first optional argument, in
%  particular, can be a line specification string such as the one used
%  by PLOT().
%
%  See also: SIFT,
%  covariant detectors,
%  VL_FRAME2OELL(), VL_HELP().
[varargout{1:nargout}] = vl_plotframe(varargin{:});


text:
layout: index
title: female
---

The "female" type is defined in CoreTypes.aslx. It sets the [gender](gender.html) and [article](article.html) as appropriate for a female character, and sets the [displayverbs](displayverbs.html) to "Look at" and "Speak to".


text:
<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wikidot="http://www.wikidot.com/rss-namespace">

	<channel>
		<title>themes</title>
		<link>http://bvs.wikidot.com/forum/t-136869/themes</link>
		<description>Posts in the discussion thread "themes" - found one not archived</description>
				<copyright></copyright>
		<lastBuildDate>Sun, 10 Jul 2022 04:38:40 +0000</lastBuildDate>

					<item>
				<guid>http://bvs.wikidot.com/forum/t-136869#post-410401</guid>
				<title>Re: themes</title>
				<link>http://bvs.wikidot.com/forum/t-136869/themes#post-410401</link>
				<description></description>
				<pubDate>Tue, 10 Mar 2009 17:11:02 +0000</pubDate>
				<wikidot:authorName>Moare</wikidot:authorName>				<wikidot:authorUserId>79546</wikidot:authorUserId>				<content:encoded>
					<![CDATA[

It is found under Ending Themes on the Theme page

				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://bvs.wikidot.com/forum/t-136869#post-408640</guid>
				<title>themes</title>
				<link>http://bvs.wikidot.com/forum/t-136869/themes#post-408640</link>
				<description></description>
				<pubDate>Mon, 09 Mar 2009 08:26:07 +0000</pubDate>
				<wikidot:authorName>kelumhi</wikidot:authorName>								<content:encoded>
					<![CDATA[

ending theme

Write it Down +20 Stamina the next day

				 	]]>
				</content:encoded>							</item>
				</channel>
</rss>


text:
const path = require('path');
const execa = require('execa');
const rollup = require('rollup');
const resolve = require('rollup-plugin-node-resolve');
const commonjs = require('rollup-plugin-commonjs');

import { inlineResources } from '../helpers/inline-resources';
import ROLLUP_GLOBALS from '../models/rollup.globals';

const bundlesDir = 'bundles';

export async function bundleEs2015(config) {
  await inlineResources(config.tmp);
  await execa('ngc', ['-p', config.tmp], { preferLocal: true });
  return rollup.rollup({
    input: path.resolve(config.tmp, 'dist-es2015', config.input.replace('.ts', '')),
    external: Object.keys(ROLLUP_GLOBALS),
    plugins: [
      resolve({
        module: true,
        main: true
      }),
      commonjs({
        include: 'node_modules/**',
      })
    ],
    onwarn: warning => {
      const skip_codes = [
        'THIS_IS_UNDEFINED',
        'MISSING_GLOBAL_NAME'
      ];
      if (skip_codes.indexOf(warning.code) != -1) return;
      console.error(warning);
    }
  }).then(bundle => bundle.write({
    file: path.resolve(config.dist, bundlesDir, config.name + '.es2015.js'),
    name: config.name,
    format: 'es',
    sourcemap: true
  }));

}


text:
$PYTHON -m pip install . -vv

# https://docs.conda.io/projects/conda-build/en/latest/resources/activate-scripts.html
for CHANGE in "activate" "deactivate"
do
    mkdir -p "${PREFIX}/etc/conda/${CHANGE}.d"
    cp "${RECIPE_DIR}/${CHANGE}.sh" "${PREFIX}/etc/conda/${CHANGE}.d/${PKG_NAME}_${CHANGE}.sh"
done


text:
@class ZDetailTableViewController;
@class ZDetailViewSection;

typedef BOOL (^ZDetailTableViewBuildContentHandler)(ZDetailTableViewController *aController);
typedef void (^ZDetailTableViewCellIterationHandler)(ZDetailTableViewController *aController, UITableViewCell *aCell, NSInteger aSectionNo);
typedef void (^ZDetailTableViewDetailViewCellIterationHandler)(ZDetailTableViewController *aController, UITableViewCell<ZDetailViewCell> *aCell, NSInteger aSectionNo);
typedef void (^ZDetailTableViewDetailBaseCellIterationHandler)(ZDetailTableViewController *aController, ZDetailViewBaseCell *aCell, NSInteger aSectionNo);

/// ZDetailTableViewController is a view controller managing a UITableView for displaying detail editors
/// consisting of ZDetailViewBaseCell objects. It can be used as a base class for custom detail editor
/// classes, but its design is such that full hierarchies of highly customized detail editing can be
/// set up without needing any subclassing, just by parametrizing the controller and its cells.
///
/// ZDetailTableViewController includes features such as
///
/// - different displayMode settings: basic/detail and viewing/editing which allow showing some
///   options/fields only in certain modes.
/// - cell grouping to expand/collapse subsections of a table depending on other settings, like a
///   switch.
/// - Managing the keyboard and smoothly moving editors in view when the keyboard appears
///
/// Simplest usage of ZDetailTableViewController is setting the buildDetailContentHandler property
/// with a block which creates some detail editing fields (cells) using the detailCell:withStyle: family of
/// methods, and then presenting the controller either by pushing it onto a UINavigationController, or
/// presenting it modally making use of viewControllerForModalPresentation from ZDetailViewBaseController.
///
/// @note ZDetailTableViewController is _not_ a subclass of UITableViewController (but of UIViewController
///   via ZDetailViewBaseController).
@interface ZDetailTableViewController : ZDetailViewBaseController <ZDetailCellOwner>

/// convenience method to create a detail table view controller with a given title
+ (id)controllerWithTitle:(NSString *)aTitle;

/// @name building content

/// Outlet property for connecting the actual detail table view.
///
/// This can be used if the UITableView showing the detail editing cells is not the root view of the
/// controller (for example in subclasses that load other UI outside the table view from a nib, or
/// create other controls programmatically)
/// @note just leave this unassigned to have ZDetailTableViewController
@property (strong, nonatomic) IBOutlet UITableView *detailTableView;

/// This block is called (if detailTableView method is not implemented and returning YES) to create
/// the contents (cells) of the detail table view.
///
/// This is the place to use startSection, startSectionWithText:asTitle: and endSection to create sections, and
/// detailCell:withStyle variants to create cells.
@property (copy,nonatomic) ZDetailTableViewBuildContentHandler buildDetailContentHandler;
- (void)setBuildDetailContentHandler:(ZDetailTableViewBuildContentHandler)buildDetailContentHandler; // declaration needed only for XCode autocompletion of block

/// for subclasses, this method can be overridden to build the content (instead of
/// assigning a block to buildDetailContentHandler.
/// Must return YES to signal content could be built.
- (BOOL)buildDetailContent;

/// @name adding editing sections and cells

/// Add a new section with a section header containing a text.
/// @param aText the text
/// @param aAsTitle if YES, the text is shown in a large font as a section title
- (void)startSectionWithText:(NSString *)aText asTitle:(BOOL)aAsTitle;

/// start a section without a header
- (void)startSection;

/// end the current section
- (void)endSection;

/// sort cells within a section by a property of the cells addressed by keyPath
- (void)sortSectionBy:(NSString *)aKeyPath ascending:(BOOL)aAscending;

/// sort cells within a section by a property of the cells addressed by keyPath
/// and also end the section
- (void)endSectionAndSortBy:(NSString *)aKeyPath ascending:(BOOL)aAscending;

/// create a detail cell of the given class and adds it to the current section
/// @param aClass class of the cell to be created
/// @param aStyle UITableViewCellStyle plus possibly some ZDetailViewCellStyleXXX flags
/// @param aNeededGroups a ORed mask of group bitmasks (see newGroupFlag) which must be enabled
///  in order to make the cell appear in the table view.
/// @param aNowEnabled set to YES if cell should be initially enabled (for cells where no other conditions
///  predetermined visibility anyway)
/// @note a section must be opened with startSection or startSectionWithText:asTitle: before
- (id)detailCell:(Class)aClass withStyle:(ZDetailViewCellStyle)aStyle neededGroups:(NSUInteger)aNeededGroups nowEnabled:(BOOL)aNowEnabled;

/// convenience method: create and add a detail cell using the defaultCellStyle
/// @note see detailCell:withStyle:neededGroups:nowEnabled: for details
- (id)detailCell:(Class)aClass neededGroups:(NSUInteger)aNeededGroups;

/// convenience method: create and add a detail cell using the defaultCellStyle and set enabled flag
/// @note see detailCell:withStyle:neededGroups:nowEnabled: for details
- (id)detailCell:(Class)aClass enabled:(BOOL)aEnabled;

/// convenience method: create and add a detail cell with given style which is always visible
/// @note see detailCell:withStyle:neededGroups:nowEnabled: for details
- (id)detailCell:(Class)aClass withStyle:(ZDetailViewCellStyle)aStyle;

/// convenience method: create and add a detail cell with defaultCellStyle which is always visible
/// @note see detailCell:withStyle:neededGroups:nowEnabled: for details
- (id)detailCell:(Class)aClass;

/// add a already created cell (must be a UITableViewCell, but use ZDetailViewBaseCell or at least
/// cells conforming to ZDetailViewCell protocol for full functionality)
/// @param the cell
/// @param aNeededGroups a ORed mask of group bitmasks (see newGroupFlag) which must be enabled
///  in order to make the cell appear in the table view.
/// @param aNowEnabled set to YES if cell should be initially enabled (for cells where no other conditions
///  predetermined visibility anyway)
/// @note a section must be opened with startSection or startSectionWithText:asTitle: before
- (void)addDetailCell:(UITableViewCell *)aCell neededGroups:(NSUInteger)aNeededGroups nowEnabled:(BOOL)aNowEnabled;
/// convenience method: add existing cell and set enabled flag
- (void)addDetailCell:(UITableViewCell *)aCell enabled:(BOOL)aEnabled;
/// convenience method: add existing cell which is always visible
- (void)addDetailCell:(UITableViewCell *)aCell;

/// @name apply common styling and setting to all cells

/// This can be set to a ZDetailViewCellStyle to define the default cell style used when
/// creating cells with detailCell: methods that don't have a withStyle parameter.
/// ZDetailViewCellStyle consists of one of the standard UITableViewCellStyle values, plus
/// optionally some ZDetailViewCellStyleXXX flags for extended style options for ZDetailViewBaseCell
/// (such as automatic label layout etc.)
/// @note if defaultCellStyle has the ZDetailViewCellStyleFlagInherit set, actual style will
/// be inherited from the parent (master) ZDetailTableViewController
@property (assign, nonatomic) ZDetailViewCellStyle defaultCellStyle; // style to be used to create default cells

/// This can be set to define the relative amount (0...1.0) of horizontal space the value part of the
/// cells will occupy.
/// @note if defaultCellStyle has the ZDetailViewCellStyleFlagInherit set, defaultValueCellShare will
/// be inherited from the parent (master) ZDetailTableViewController
@property (assign, nonatomic) double defaultValueCellShare;

/// This block is called for every cell added to the view. This can be used to set common properties
/// to all cells of a detail view, like special background, different font etc.
/// @note if defaultCellStyle has the ZDetailViewCellStyleFlagInherit set, cellSetupHandler will
/// be inherited from the parent (master) ZDetailTableViewController
@property (copy, nonatomic) ZDetailTableViewCellIterationHandler cellSetupHandler; // called on every cell added by detailCell:... method
- (void)setCellSetupHandler:(ZDetailTableViewCellIterationHandler)cellSetupHandler; // declaration needed only for XCode autocompletion of block

/// convenience iterator to iterate over all cells (UITableViewCell and subclasses)
- (void)forEachCell:(ZDetailTableViewCellIterationHandler)aIterationBlock;
/// convenience iterator to iterate over all cells conforming to the ZDetailViewCell protocol
/// (which are not necessarily ZDetailViewBaseCell s)
- (void)forEachDetailViewCell:(ZDetailTableViewDetailViewCellIterationHandler)aIterationBlock;
/// convenience iterator to iterate over all ZDetailViewBaseCell (and subclasses thereof)
/// (but no regular UITableViewCell that may also be part of the table)
- (void)forEachDetailViewBaseCell:(ZDetailTableViewDetailBaseCellIterationHandler)aIterationBlock;

/// returns parent (master) detail table view controller (if any)
- (ZDetailTableViewController *)parentDetailTableViewController;

/// @name cell groups

/// convenience method to generate group bitmasks
///
/// returns a new bit mask (starting with Bit 0) every time it is called. The generator is reset
/// before buildDetailContent method or the buildDetailContentHandler block is called.
/// @note group bitmasks can be used with detailCell:neededGroups: to add serveral cells
/// in a group, which can then be expanded/collapsed depending on other settings by changeGroups:toVisible:
- (NSUInteger)newGroupFlag;

/// bitmask of currently enabled groups
/// @note the integer values used for representing groups must be single bits (i.e. integer values 1,2,4,8...)
/// The newGroupFlag convenience method can be used to generate these bitmasks.
/// @note just setting this property does not automatically cause the changes to be applied to the table
/// use applyGroupChangesAnimated: for that.
@property (assign, nonatomic) NSUInteger enabledGroups;

/// apply current enabledGroups to the table, which will cause cells to animate in and out according
/// to their visibility
- (void)applyGroupChangesAnimated:(BOOL)aAnimated;

/// convenience method to make one or multiple groups visible or invisible
/// @param aGroupMask single group mask ORed combination of multiple groups
/// @param aVisible set YES to make the groups(s) visible, NO to make them invisible
- (void)changeGroups:(NSUInteger)aGroupMask toVisible:(BOOL)aVisible;

/// convenience method to make one or multiple groups visible or invisible and then apply it to the table
/// @param aGroupMask single group mask ORed combination of multiple groups
/// @param aVisible set YES to make the groups(s) visible, NO to make them invisible
- (void)changeDisplayedGroups:(NSUInteger)aGroupMask toVisible:(BOOL)aVisible animated:(BOOL)aAnimated;

/// @name appearance and behaviour properties

/// Set this to NO to prevent scrolling in the detail view (e.g. when it only contains a few fields). Default is YES.
@property (assign, nonatomic) BOOL scrollEnabled;

/// if set, first editable field will receive eding focus when detailview appears. Default is NO.
@property (assign, nonatomic) BOOL autoStartEditing;

/// @name utilities for subclasses

/// returns the cell currently at given index path. All types of UITableViewCell are returned.
- (UITableViewCell *)cellForRowAtIndexPath:(NSIndexPath *)aIndexPath;

/// returns the ZDetailViewBaseCell currently at given index path, or nil if none. Only ZDetailViewBaseCell and subclasses are returned.
- (ZDetailViewBaseCell *)detailCellForRowAtIndexPath:(NSIndexPath *)aIndexPath;

/// moves a cell from one index to another (only within same section)
/// @note this is a utility method to help implementing tableView:moveRowAtIndexPath:toIndexPath: UITableViewDelegate method
///  in subclasses (like ZChoiceListeController)
- (BOOL)moveRowFromIndexPath:(NSIndexPath *)aFromIndexPath toIndexPath:(NSIndexPath *)aToIndexPath;

@end

#pragma mark - ZDetailViewBaseCell (ZDetailTableViewControllerUtils)

// category on ZDetailViewBaseCell providing ZDetailTableViewController related methods
@interface ZDetailViewBaseCell (ZDetailTableViewControllerUtils)

/// returns the owning ZDetailTableViewController (if not owned by another type of UIViewController)
- (ZDetailTableViewController *)detailTableViewController;

@end


text:
package org.carlspring.strongbox.controllers.layout.maven;

import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.security.NoSuchAlgorithmException;
import java.util.List;

import javax.inject.Inject;

import io.restassured.http.Header;
import org.carlspring.strongbox.config.IntegrationTest;
import org.carlspring.strongbox.providers.io.RepositoryPath;
import org.carlspring.strongbox.rest.common.MavenRestAssuredBaseTest;
import org.carlspring.strongbox.storage.indexing.IndexTypeEnum;
import org.carlspring.strongbox.storage.indexing.RepositoryIndexCreator;
import org.carlspring.strongbox.storage.indexing.RepositoryIndexCreator.RepositoryIndexCreatorQualifier;
import org.carlspring.strongbox.storage.indexing.RepositoryIndexDirectoryPathResolver;
import org.carlspring.strongbox.storage.indexing.RepositoryIndexDirectoryPathResolver.RepositoryIndexDirectoryPathResolverQualifier;
import org.carlspring.strongbox.storage.repository.Repository;
import org.carlspring.strongbox.storage.repository.RepositoryTypeEnum;
import org.carlspring.strongbox.testing.MavenIndexedRepositorySetup;
import org.carlspring.strongbox.testing.artifact.ArtifactManagementTestExecutionListener;
import org.carlspring.strongbox.testing.artifact.MavenTestArtifact;
import org.carlspring.strongbox.testing.repository.MavenRepository;
import org.carlspring.strongbox.testing.storage.repository.RepositoryManagementTestExecutionListener;
import org.carlspring.strongbox.testing.storage.repository.TestRepository.Group;
import org.carlspring.strongbox.testing.storage.repository.TestRepository.Remote;
import org.carlspring.strongbox.util.MessageDigestUtils;
import org.hamcrest.CoreMatchers;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;

import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;

import static com.google.common.base.Predicates.not;
import static org.assertj.core.api.Assertions.assertThat;
import static org.carlspring.strongbox.net.MediaType.APPLICATION_X_GZIP_VALUE;
import static org.hamcrest.CoreMatchers.equalTo;

/**
 * @author Kate Novik
 * @author Martin Todorov
 */
@IntegrationTest
public class MavenIndexControllerTest
        extends MavenRestAssuredBaseTest
{

    private static final String REPOSITORY_RELEASES_1 = "aict-releases-1";

    private static final String REPOSITORY_RELEASES_2 = "aict-releases-2";

    private static final String REPOSITORY_RELEASES_3 = "aict-releases-3";

    private static final String REPOSITORY_RELEASES_4 = "aict-releases-4";

    private static final String REPOSITORY_RELEASES_5 = "aict-releases-5";

    private static final String REPOSITORY_RELEASES_6 = "aict-releases-6";

    private static final String REPOSITORY_RELEASES_6_1 = "aict-releases-6_1";

    private static final String REPOSITORY_RELEASES_6_GROUP = "aict-releases-6-group";

    private static final String REPOSITORY_PROXY_1 = "aict-proxy-1";

    private static final String PROXY_1_REPOSITORY_URL =
            "http://localhost:48080/storages/" + STORAGE0 + "/" + REPOSITORY_RELEASES_1 + "/";

    private static final String REPOSITORY_PROXY_3 = "aict-proxy-3";

    private static final String PROXY_3_REPOSITORY_URL =
            "http://localhost:48080/storages/" + STORAGE0 + "/" + REPOSITORY_RELEASES_3 + "/";

    private static final String REPOSITORY_PROXY_4 = "aict-proxy-4";

    private static final String PROXY_4_REPOSITORY_URL =
            "http://localhost:48080/storages/" + STORAGE0 + "/" + REPOSITORY_RELEASES_4 + "/";

    private static final String REPOSITORY_PROXY_5 = "aict-proxy-5";

    private static final String PROXY_5_REPOSITORY_URL =
            "http://localhost:48080/storages/" + STORAGE0 + "/" + REPOSITORY_RELEASES_5 + "/";

    private static final String PROPERTIES_INJECTOR_GROUP_ID = "org.carlspring";

    private static final String PROPERTIES_INJECTOR_ARTIFACT_ID = "properties-injector";

    private static final String SLF4J_GROUP_ID = "org.slf4j";

    private static final String SLF4J_ARTIFACT_ID = "slf4j-log4j12";

    @Inject
    @RepositoryIndexDirectoryPathResolverQualifier(IndexTypeEnum.LOCAL)
    private RepositoryIndexDirectoryPathResolver repositoryLocalIndexDirectoryPathResolver;

    @Inject
    @RepositoryIndexDirectoryPathResolverQualifier(IndexTypeEnum.REMOTE)
    private RepositoryIndexDirectoryPathResolver repositoryRemoteIndexDirectoryPathResolver;

    @Inject
    @RepositoryIndexCreatorQualifier(RepositoryTypeEnum.HOSTED)
    private RepositoryIndexCreator hostedRepositoryIndexCreator;

    @Inject
    @RepositoryIndexCreatorQualifier(RepositoryTypeEnum.PROXY)
    private RepositoryIndexCreator proxyRepositoryIndexCreator;

    @Inject
    @RepositoryIndexCreatorQualifier(RepositoryTypeEnum.GROUP)
    private RepositoryIndexCreator groupRepositoryIndexCreator;

    @Override
    @BeforeEach
    public void init()
            throws Exception
    {
        super.init();
    }

    @ExtendWith({ RepositoryManagementTestExecutionListener.class,
                  ArtifactManagementTestExecutionListener.class })
    @Test
    public void hostedRepositoryIndexShouldBeRegeneratedOnDemand(@MavenRepository(repositoryId = REPOSITORY_RELEASES_1,
                                                                                setup = MavenIndexedRepositorySetup.class)
                                                                 Repository repository,
                                                                 @MavenTestArtifact(repositoryId = REPOSITORY_RELEASES_1,
                                                                                id = "org.carlspring.strongbox.indexes:strongbox-test",
                                                                                versions = { "1.0",
                                                                                "1.1" },
                                                                                classifiers = { "javadoc",
                                                                                "sources" })
                                                                 List<Path> artifactPaths)
            throws IOException, NoSuchAlgorithmException
    {
        hostedRepositoryIndexCreator.apply(repository);

        RepositoryPath indexPath = repositoryLocalIndexDirectoryPathResolver.resolve(repository)
                                                                            .resolve("nexus-maven-repository-index.gz");
        String beforeChecksum = MessageDigestUtils.calculateChecksum(indexPath, "SHA-1");

        String url = getContextBaseUrl() + "/api/maven/index/{storageId}/{repositoryId}";

        mockMvc.contentType(MediaType.APPLICATION_JSON_VALUE)
               .accept(MediaType.APPLICATION_JSON_VALUE)
               .when()
               .post(url, repository.getStorage().getId(), repository.getId())
               .peek()
               .then()
               .statusCode(HttpStatus.OK.value());

        indexPath = repositoryLocalIndexDirectoryPathResolver.resolve(repository).resolve(
                "nexus-maven-repository-index.gz");

        String afterChecksum = MessageDigestUtils.calculateChecksum(indexPath, "SHA-1");

        assertThat(beforeChecksum).isNotEqualTo(afterChecksum);
    }

    @ExtendWith({ RepositoryManagementTestExecutionListener.class,
                  ArtifactManagementTestExecutionListener.class })
    @Test
    public void shouldNotAllowToRebuildTheIndex(@MavenRepository(repositoryId = REPOSITORY_RELEASES_2)
                                                Repository repository,
                                                @MavenTestArtifact(repositoryId = REPOSITORY_RELEASES_2,
                                                                   id = "org.carlspring.strongbox.indexes:strongbox-test",
                                                                   versions = { "1.0",
                                                                                "1.1" },
                                                                   classifiers = { "javadoc",
                                                                                "sources" })
                                                List<Path> artifactPaths)
    {
        RepositoryPath indexPath = repositoryLocalIndexDirectoryPathResolver.resolve(repository)
                                                                            .resolve("nexus-maven-repository-index.gz");

        assertThat(indexPath).matches(not(Files::exists));

        String url = getContextBaseUrl() + "/api/maven/index/{storageId}/{repositoryId}";

        mockMvc.contentType(MediaType.APPLICATION_JSON_VALUE)
               .accept(MediaType.APPLICATION_JSON_VALUE)
               .when()
               .post(url, repository.getStorage().getId(), repository.getId())
               .peek()
               .then()
               .statusCode(HttpStatus.BAD_REQUEST.value())
               .content(equalTo("Indexing is disabled on this repository."));
    }

    @ExtendWith({ RepositoryManagementTestExecutionListener.class,
                  ArtifactManagementTestExecutionListener.class })
    @Test
    public void proxyRepositoryIndexShouldBeReFetchedOnDemand(@MavenRepository(repositoryId = REPOSITORY_RELEASES_1,
                                                                               setup = MavenIndexedRepositorySetup.class)
                                                              Repository repository,
                                                              @MavenTestArtifact(repositoryId = REPOSITORY_RELEASES_1,
                                                                                id = "org.carlspring.strongbox.indexes:strongbox-test",
                                                                                versions = { "1.0",
                                                                                "1.1" },
                                                                                classifiers = { "javadoc",
                                                                                "sources" })
                                                              List<Path> artifactPaths,
                                                              @MavenRepository(repositoryId = REPOSITORY_PROXY_1,
                                                                               setup = MavenIndexedRepositorySetup.class)
                                                              @Remote(url = PROXY_1_REPOSITORY_URL)
                                                              Repository proxyRepository)
            throws IOException
    {
        hostedRepositoryIndexCreator.apply(repository);

        RepositoryPath indexPath = repositoryRemoteIndexDirectoryPathResolver.resolve(proxyRepository)
                                                                             .resolve("nexus-maven-repository-index.gz");

        assertThat(indexPath).matches(not(Files::exists));

        String url = getContextBaseUrl() + "/api/maven/index/{storageId}/{repositoryId}";

        mockMvc.contentType(MediaType.APPLICATION_JSON_VALUE)
               .accept(MediaType.APPLICATION_JSON_VALUE)
               .when()
               .post(url, proxyRepository.getStorage().getId(), proxyRepository.getId())
               .peek()
               .then()
               .statusCode(HttpStatus.OK.value());

        indexPath = repositoryRemoteIndexDirectoryPathResolver.resolve(proxyRepository)
                                                              .resolve("nexus-maven-repository-index.gz");

        assertThat(indexPath).matches(Files::exists);
    }

    @ExtendWith({ RepositoryManagementTestExecutionListener.class,
                  ArtifactManagementTestExecutionListener.class })
    @Test
    public void shouldNotAllowToReFetchTheIndex(@MavenRepository(repositoryId = REPOSITORY_RELEASES_3,
                                                                 setup = MavenIndexedRepositorySetup.class)
                                                Repository repository,
                                                @MavenTestArtifact(repositoryId = REPOSITORY_RELEASES_3,
                                                                   id = "org.carlspring.strongbox.indexes" + ":" + "strongbox-test",
                                                                   versions = { "1.0",
                                                                                "1.1" },
                                                                   classifiers = { "javadoc",
                                                                                "sources" })
                                                List<Path> artifactPaths,
                                                @MavenRepository(repositoryId = REPOSITORY_PROXY_3)
                                                @Remote(url = PROXY_3_REPOSITORY_URL)
                                                Repository proxyRepository)
    {
        RepositoryPath indexPath = repositoryRemoteIndexDirectoryPathResolver.resolve(repository)
                                                                             .resolve("nexus-maven-repository-index.gz");

        assertThat(indexPath).matches(not(Files::exists));

        String url = getContextBaseUrl() + "/api/maven/index/{storageId}/{repositoryId}";

        mockMvc.contentType(MediaType.APPLICATION_JSON_VALUE)
               .accept(MediaType.APPLICATION_JSON_VALUE)
               .when()
               .post(url, proxyRepository.getStorage().getId(), proxyRepository.getId())
               .peek()
               .then()
               .statusCode(HttpStatus.BAD_REQUEST.value())
               .content(equalTo("Indexing is disabled on this repository."));
    }

    @ExtendWith({ RepositoryManagementTestExecutionListener.class,
                  ArtifactManagementTestExecutionListener.class })
    @Test
    public void shouldDownloadProxyRepositoryIndex(@MavenRepository(repositoryId = REPOSITORY_RELEASES_4,
                                                                    setup = MavenIndexedRepositorySetup.class)
                                                   Repository repository,
                                                   @MavenTestArtifact(repositoryId = REPOSITORY_RELEASES_4,
                                                                      id = "org.carlspring.strongbox.indexes:strongbox-test",
                                                                      versions = { "1.0",
                                                                                "1.1" },
                                                                      classifiers = { "javadoc",
                                                                                "sources" })
                                                   List<Path> artifactPaths,
                                                   @MavenRepository(repositoryId = REPOSITORY_PROXY_4)
                                                   @Remote(url = PROXY_4_REPOSITORY_URL)
                                                   Repository proxyRepository)
            throws IOException
    {
        hostedRepositoryIndexCreator.apply(repository);
        proxyRepositoryIndexCreator.apply(proxyRepository);

        String url = getContextBaseUrl() + "/storages/" + STORAGE0 + "/" + REPOSITORY_PROXY_4 +
                     "/.index/nexus-maven-repository-index.gz";

        mockMvc.header(new Header("User-Agent", "Maven/*"))
               .get(url)
               .then()
               .log().status()
               .log().headers()
               .statusCode(HttpStatus.OK.value())
               .contentType(APPLICATION_X_GZIP_VALUE)
               .body(CoreMatchers.notNullValue());
    }

    @ExtendWith({ RepositoryManagementTestExecutionListener.class,
                  ArtifactManagementTestExecutionListener.class })
    @Test
    public void shouldDownloadProxyRepositoryIndexPropertiesFile(@MavenRepository(repositoryId = REPOSITORY_RELEASES_5,
                                                                                setup = MavenIndexedRepositorySetup.class)
                                                                 Repository repository,
                                                                 @MavenTestArtifact(repositoryId = REPOSITORY_RELEASES_5,
                                                                                id = "org.carlspring.strongbox.indexes:strongbox-test",
                                                                                versions = { "1.0",
                                                                                "1.1" },
                                                                                classifiers = { "javadoc",
                                                                                "sources" })
                                                                 List<Path> artifactPaths,
                                                                 @MavenRepository(repositoryId = REPOSITORY_PROXY_5)
                                                                 @Remote(url = PROXY_5_REPOSITORY_URL)
                                                                 Repository proxyRepository)
            throws IOException
    {
        hostedRepositoryIndexCreator.apply(repository);
        proxyRepositoryIndexCreator.apply(proxyRepository);

        String url = getContextBaseUrl() + "/storages/" + STORAGE0 + "/" + REPOSITORY_PROXY_5 +
                     "/.index/nexus-maven-repository-index.properties";

        mockMvc.header(new Header("User-Agent", "Maven/*"))
               .get(url)
               .then()
               .log().status()
               .log().headers()
               .statusCode(HttpStatus.OK.value())
               .contentType(MediaType.TEXT_PLAIN_VALUE)
               .body(CoreMatchers.notNullValue());
    }

    @ExtendWith({ RepositoryManagementTestExecutionListener.class,
                  ArtifactManagementTestExecutionListener.class })
    @Test
    public void groupRepositoryIndexShouldBeMergedOnDemand(@MavenRepository(repositoryId = REPOSITORY_RELEASES_6,
                                                                            setup = MavenIndexedRepositorySetup.class)
                                                           Repository repository,
                                                           @MavenTestArtifact(repositoryId = REPOSITORY_RELEASES_6,
                                                                              id = PROPERTIES_INJECTOR_GROUP_ID + ":" +
                                                                                PROPERTIES_INJECTOR_ARTIFACT_ID,
                                                                              versions = { "1.8" },
                                                                              classifiers = { "javadoc",
                                                                                "sources" })
                                                           Path artifactPathPropertiesInjector,
                                                           @MavenRepository(repositoryId = REPOSITORY_RELEASES_6_1,
                                                                            setup = MavenIndexedRepositorySetup.class)
                                                           Repository repository61,
                                                           @MavenTestArtifact(repositoryId = REPOSITORY_RELEASES_6_1,
                                                                              id = SLF4J_GROUP_ID + ":" + SLF4J_ARTIFACT_ID,
                                                                              versions = { "1.9" },
                                                                              classifiers = { "javadoc",
                                                                                "sources" })
                                                           Path artifactPathSlf4j,
                                                           @Group(repositories = { REPOSITORY_RELEASES_6,
                                                                                REPOSITORY_RELEASES_6_1 })
                                                           @MavenRepository(repositoryId = REPOSITORY_RELEASES_6_GROUP,
                                                                            setup = MavenIndexedRepositorySetup.class)
                                                           Repository groupRepository)
            throws Exception
    {
        hostedRepositoryIndexCreator.apply(repository);
        hostedRepositoryIndexCreator.apply(repository61);

        RepositoryPath indexPath = repositoryLocalIndexDirectoryPathResolver.resolve(groupRepository).resolve(
                "nexus-maven-repository-index.gz");

        assertThat(indexPath).matches(not(Files::exists));

        String url = getContextBaseUrl() + "/api/maven/index/{storageId}/{repositoryId}";

        mockMvc.contentType(MediaType.APPLICATION_JSON_VALUE)
               .accept(MediaType.APPLICATION_JSON_VALUE)
               .when()
               .post(url, groupRepository.getStorage().getId(), groupRepository.getId())
               .peek()
               .then()
               .statusCode(HttpStatus.OK.value());

        indexPath = repositoryLocalIndexDirectoryPathResolver.resolve(groupRepository).resolve(
                "nexus-maven-repository-index.gz");

        assertThat(indexPath).matches(Files::exists);
    }

}


text:
var data = require('../maintenance.json');

exports.viewMaintenance = function(req, res) {
    console.log(data);
    res.render('maintenance', data);
};