text:
.. only:: text

   This document file was automatically generated.  If you want to edit
   the documentation, DON'T do it here--do it in the docstring of the
   appropriate plugin.  Plugins are located in ``Pyblosxom/plugins/``.

================================================
 pycategories - Builds a list of categories....
================================================

Summary
=======

Walks through your blog root figuring out all the categories you have
and how many entries are in each category.  It generates html with
this information and stores it in the ``$(categorylinks)`` variable
which you can use in your head or foot templates.

Install
=======

This plugin comes with Pyblosxom.  To install, do the following:

1. Add ``Pyblosxom.plugins.pycategories`` to the ``load_plugins`` list
   in your ``config.py`` file.

2. Add ``$(categorylinks)`` to your head and/or foot templates.

Configuration
=============

You can format the output by setting ``category_begin``,
``category_item``, and ``category_end`` properties.

Categories exist in a hierarchy.  ``category_start`` starts the
category listing and is only used at the very beginning.  The
``category_begin`` property begins a new category group and the
``category_end`` property ends that category group.  The
``category_item`` property is the template for each category item.
Then after all the categories are printed, ``category_finish`` ends
the category listing.

For example, the following properties will use ``
`` to open a
category, ``
`` to close a category and ``
`` for each item::

    py["category_start"] = "
"
    py["category_begin"] = "

"
    py["category_item"] = (
        r'
'
        r'%(category)s
')
    py["category_end"] = "

"
    py["category_finish"] = "
"

Another example, the following properties don't have a begin or an end
but instead use indentation for links and displays the number of
entries in that category::

    py["category_start"] = ""
    py["category_begin"] = ""
    py["category_item"] = (
        r'%(indent)s'
        r'%(category)s (%(count)d)
')
    py["category_end"] = ""
    py["category_finish"] = ""

There are no variables available in the ``category_begin`` or
``category_end`` templates.

Available variables in the category_item template:

=======================  ==========================  ====================
variable                 example                     datatype
=======================  ==========================  ====================
base_url                 http://joe.com/blog/        string
fullcategory_urlencoded  'dev/pyblosxom/status/'     string
fullcategory             'dev/pyblosxom/status/'     string (urlencoded)
category                 'status/'                   string
category_urlencoded      'status/'                   string (urlencoed)
flavour                  'html'                      string
count                    70                          int
indent                   '    '  string
=======================  ==========================  ====================

License
=======

Plugin is distributed under license: MIT


text:
export class UserLoginInfo {

    userName: string;

    password: string;

}

redpajama_set_name: RedPajamaGithub


text:
SYNONYM

#### According to
The Catalogue of Life, 3rd January 2011

#### Published in
Symb. bot. upsal. 12(no. 1): 340 (1952)

#### Original name
Thelotrema conspersum Stirt.

### Remarks
null


text:
layout: page
title: "Rita Catherine Tracy"
comments: true
description: "blanks"
keywords: "Rita Catherine Tracy,CU,Boulder"
---
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script src="https://dl.dropboxusercontent.com/s/pc42nxpaw1ea4o9/highcharts.js?dl=0"></script>
<!-- <script src="../assets/js/highcharts.js"></script> -->
<style type="text/css">@font-face {
	font-family: "Bebas Neue";
	src: url(https://www.filehosting.org/file/details/544349/BebasNeue Regular.otf) format("opentype");
	}
	h1.Bebas {
		font-family: "Bebas Neue", Verdana, Tahoma;
	}
</style>
</head>

#### TEACHING INFORMATION

**College**: School of Education

**Classes taught**: EDUC 4112, EDUC 4411

#### EDUC 4112: Educational Psychology and Adolescent Development

**Terms taught**: Fall 2010

**Instructor rating**: 5.44

**Standard deviation in instructor rating**: 0.0

**Average grade** (4.0 scale): 3.7

**Standard deviation in grades** (4.0 scale): 0.0

**Average workload** (raw): 2.5

**Standard deviation in workload** (raw): 0.0

#### EDUC 4411: ED PSYC FOR ELEM SCHOOLS

**Terms taught**: Fall 2009, Spring 2010

**Instructor rating**: 4.95

**Standard deviation in instructor rating**: 0.68

**Average grade** (4.0 scale): 3.71

**Standard deviation in grades** (4.0 scale): 0.24

**Average workload** (raw): 2.33

**Standard deviation in workload** (raw): 0.17


text:
layout: post
title: Details on the 2020 fieldcourse's information session coming soon
subtitle: please check back often for more details...
date: 2020-02-02
---


text:
#ifndef _WMISTR_
#define _WMISTR_

typedef struct _WNODE_HEADER {
  ULONG BufferSize;
  ULONG ProviderId;
  __C89_NAMELESS union {
    ULONG64 HistoricalContext;
    __C89_NAMELESS struct {
      ULONG Version;
      ULONG Linkage;
    };
  };
  __C89_NAMELESS union {
    ULONG CountLost;
    HANDLE KernelHandle;
    LARGE_INTEGER TimeStamp;
  };
  GUID Guid;
  ULONG ClientContext;
  ULONG Flags;
} WNODE_HEADER,*PWNODE_HEADER;

#define WNODE_FLAG_ALL_DATA 0x00000001
#define WNODE_FLAG_SINGLE_INSTANCE 0x00000002
#define WNODE_FLAG_SINGLE_ITEM 0x00000004
#define WNODE_FLAG_EVENT_ITEM 0x00000008
#define WNODE_FLAG_FIXED_INSTANCE_SIZE 0x00000010
#define WNODE_FLAG_TOO_SMALL 0x00000020
#define WNODE_FLAG_INSTANCES_SAME 0x00000040
#define WNODE_FLAG_STATIC_INSTANCE_NAMES 0x00000080
#define WNODE_FLAG_INTERNAL 0x00000100
#define WNODE_FLAG_USE_TIMESTAMP 0x00000200
#define WNODE_FLAG_PERSIST_EVENT 0x00000400
#define WNODE_FLAG_EVENT_REFERENCE 0x00002000
#define WNODE_FLAG_ANSI_INSTANCENAMES 0x00004000
#define WNODE_FLAG_METHOD_ITEM 0x00008000
#define WNODE_FLAG_PDO_INSTANCE_NAMES 0x00010000
#define WNODE_FLAG_TRACED_GUID 0x00020000
#define WNODE_FLAG_LOG_WNODE 0x00040000
#define WNODE_FLAG_USE_GUID_PTR 0x00080000
#define WNODE_FLAG_USE_MOF_PTR 0x00100000
#define WNODE_FLAG_NO_HEADER 0x00200000
#define WNODE_FLAG_SEVERITY_MASK 0xff000000

typedef struct {
  ULONG OffsetInstanceData;
  ULONG LengthInstanceData;
} OFFSETINSTANCEDATAANDLENGTH,*POFFSETINSTANCEDATAANDLENGTH;

typedef struct tagWNODE_ALL_DATA {
  struct _WNODE_HEADER WnodeHeader;
  ULONG DataBlockOffset;
  ULONG InstanceCount;
  ULONG OffsetInstanceNameOffsets;
  __C89_NAMELESS union {
    ULONG FixedInstanceSize;
    OFFSETINSTANCEDATAANDLENGTH OffsetInstanceDataAndLength[1];
  };
} WNODE_ALL_DATA,*PWNODE_ALL_DATA;

typedef struct tagWNODE_SINGLE_INSTANCE {
  struct _WNODE_HEADER WnodeHeader;
  ULONG OffsetInstanceName;
  ULONG InstanceIndex;
  ULONG DataBlockOffset;
  ULONG SizeDataBlock;
  UCHAR VariableData[];
} WNODE_SINGLE_INSTANCE,*PWNODE_SINGLE_INSTANCE;

typedef struct tagWNODE_SINGLE_ITEM {
  struct _WNODE_HEADER WnodeHeader;
  ULONG OffsetInstanceName;
  ULONG InstanceIndex;
  ULONG ItemId;
  ULONG DataBlockOffset;
  ULONG SizeDataItem;
  UCHAR VariableData[];
} WNODE_SINGLE_ITEM,*PWNODE_SINGLE_ITEM;

typedef struct tagWNODE_METHOD_ITEM {
  struct _WNODE_HEADER WnodeHeader;
  ULONG OffsetInstanceName;
  ULONG InstanceIndex;
  ULONG MethodId;
  ULONG DataBlockOffset;
  ULONG SizeDataBlock;
  UCHAR VariableData[];
} WNODE_METHOD_ITEM,*PWNODE_METHOD_ITEM;

typedef struct tagWNODE_EVENT_ITEM {
  struct _WNODE_HEADER WnodeHeader;
} WNODE_EVENT_ITEM,*PWNODE_EVENT_ITEM;

typedef struct tagWNODE_EVENT_REFERENCE {
  struct _WNODE_HEADER WnodeHeader;
  GUID TargetGuid;
  ULONG TargetDataBlockSize;
  __C89_NAMELESS union {
    ULONG TargetInstanceIndex;
    WCHAR TargetInstanceName[1];
  };
} WNODE_EVENT_REFERENCE,*PWNODE_EVENT_REFERENCE;

typedef struct tagWNODE_TOO_SMALL {
  struct _WNODE_HEADER WnodeHeader;
  ULONG SizeNeeded;
} WNODE_TOO_SMALL,*PWNODE_TOO_SMALL;

typedef struct {
  GUID Guid;
  ULONG Flags;
  ULONG InstanceCount;
  __C89_NAMELESS union {
    ULONG InstanceNameList;
    ULONG BaseNameOffset;
    ULONG_PTR Pdo;
    ULONG_PTR InstanceInfo;
  };
} WMIREGGUIDW,*PWMIREGGUIDW;

typedef WMIREGGUIDW WMIREGGUID;
typedef PWMIREGGUIDW PWMIREGGUID;

#define WMIREG_FLAG_EXPENSIVE 0x00000001
#define WMIREG_FLAG_INSTANCE_LIST 0x00000004
#define WMIREG_FLAG_INSTANCE_BASENAME 0x00000008
#define WMIREG_FLAG_INSTANCE_PDO 0x00000020
#define WMIREG_FLAG_REMOVE_GUID 0x00010000
#define WMIREG_FLAG_RESERVED1 0x00020000
#define WMIREG_FLAG_RESERVED2 0x00040000
#define WMIREG_FLAG_TRACED_GUID 0x00080000
#define WMIREG_FLAG_TRACE_CONTROL_GUID 0x00001000
#define WMIREG_FLAG_EVENT_ONLY_GUID 0x00000040

typedef struct {
  ULONG BufferSize;
  ULONG NextWmiRegInfo;
  ULONG RegistryPath;
  ULONG MofResourceName;
  ULONG GuidCount;
  WMIREGGUIDW WmiRegGuid[];
} WMIREGINFOW,*PWMIREGINFOW;

typedef WMIREGINFOW WMIREGINFO;
typedef PWMIREGINFOW PWMIREGINFO;

typedef enum {
  WMI_GET_ALL_DATA = 0,WMI_GET_SINGLE_INSTANCE = 1,WMI_SET_SINGLE_INSTANCE = 2,WMI_SET_SINGLE_ITEM = 3,WMI_ENABLE_EVENTS = 4,WMI_DISABLE_EVENTS = 5,
  WMI_ENABLE_COLLECTION = 6,WMI_DISABLE_COLLECTION = 7,WMI_REGINFO = 8,WMI_EXECUTE_METHOD = 9
} WMIDPREQUESTCODE;

#if defined(_WINNT_) || defined(WINNT)

#define WMI_GUIDTYPE_TRACECONTROL 0
#define WMI_GUIDTYPE_TRACE 1
#define WMI_GUIDTYPE_DATA 2
#define WMI_GUIDTYPE_EVENT 3

#define WMIGUID_QUERY 0x0001
#define WMIGUID_SET 0x0002
#define WMIGUID_NOTIFICATION 0x0004
#define WMIGUID_READ_DESCRIPTION 0x0008
#define WMIGUID_EXECUTE 0x0010
#define TRACELOG_CREATE_REALTIME 0x0020
#define TRACELOG_CREATE_ONDISK 0x0040
#define TRACELOG_GUID_ENABLE 0x0080
#define TRACELOG_ACCESS_KERNEL_LOGGER 0x0100
#define TRACELOG_CREATE_INPROC 0x0200
#define TRACELOG_ACCESS_REALTIME 0x0400
#define TRACELOG_REGISTER_GUIDS 0x0800

#define WMIGUID_ALL_ACCESS (STANDARD_RIGHTS_READ | SYNCHRONIZE | WMIGUID_QUERY | WMIGUID_SET | WMIGUID_NOTIFICATION | WMIGUID_READ_DESCRIPTION | WMIGUID_EXECUTE | TRACELOG_CREATE_REALTIME | TRACELOG_CREATE_ONDISK | TRACELOG_GUID_ENABLE | TRACELOG_ACCESS_KERNEL_LOGGER | TRACELOG_CREATE_INPROC | TRACELOG_ACCESS_REALTIME | TRACELOG_REGISTER_GUIDS)

#define WMI_GLOBAL_LOGGER_ID 0x0001
#endif
#endif


text:
package io.hops.exception;

/**
 * Created by salman on 6/12/17.
 */
public class HDFSClientAppendToDBFileException extends HopsException {
  public HDFSClientAppendToDBFileException(String msg){super(msg);}
}


text:
package tech.aroma.service.operations;

import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
import tech.aroma.data.MediaRepository;
import tech.aroma.service.operations.thumbnails.ThumbnailCreator;
import tech.aroma.thrift.Dimension;
import tech.aroma.thrift.Image;
import tech.aroma.thrift.exceptions.*;
import tech.aroma.thrift.service.GetMediaRequest;
import tech.aroma.thrift.service.GetMediaResponse;
import tech.sirwellington.alchemy.test.junit.runners.*;

import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.notNullValue;
import static org.junit.Assert.assertThat;
import static org.mockito.Mockito.*;
import static tech.sirwellington.alchemy.generator.AlchemyGenerator.Get.one;
import static tech.sirwellington.alchemy.generator.NumberGenerators.negativeIntegers;
import static tech.sirwellington.alchemy.test.junit.ThrowableAssertion.*;
import static tech.sirwellington.alchemy.test.junit.runners.GenerateString.Type.ALPHABETIC;
import static tech.sirwellington.alchemy.test.junit.runners.GenerateString.Type.UUID;

/**
 * @author SirWellington
 */
@Repeat(50)
@RunWith(AlchemyTestRunner.class)
public class GetMediaOperationTest
{

    @Mock
    private MediaRepository mediaRepo;

    @Mock
    private ThumbnailCreator thumbnailCreator;

    @GenerateString(UUID)
    private String mediaId;

    @GenerateString(ALPHABETIC)
    private String badId;

    @GeneratePojo
    private Image image;

    @GeneratePojo
    private Image thumbnail;

    @GeneratePojo
    private GetMediaRequest request;

    @GeneratePojo
    private Dimension thumbnailSize;

    private GetMediaOperation instance;

    @Before
    public void setUp() throws Exception
    {

        setupData();
        setupMocks();

        instance = new GetMediaOperation(mediaRepo, thumbnailCreator);
        verifyZeroInteractions(mediaRepo);
    }

    private void setupData() throws Exception
    {
        request.mediaId = mediaId;
        request.unsetDesiredThumbnailSize();
    }

    private void setupMocks() throws Exception
    {
        when(mediaRepo.getMedia(mediaId))
                .thenReturn(image);

        when(mediaRepo.getThumbnail(mediaId, thumbnailSize))
                .thenReturn(thumbnail);
        when(mediaRepo.containsThumbnail(mediaId, thumbnailSize))
                .thenReturn(true);

        when(thumbnailCreator.createThumbnail(image, thumbnailSize))
                .thenReturn(thumbnail);
    }

    @DontRepeat
    @Test
    public void testConstructor() throws Exception
    {
        assertThrows(() -> new GetMediaOperation(null, thumbnailCreator));
        assertThrows(() -> new GetMediaOperation(mediaRepo, null));
    }

    @Test
    public void testProcess() throws Exception
    {
        GetMediaResponse response = instance.process(request);
        assertThat(response, notNullValue());

        assertThat(response.image, is(image));

        verify(mediaRepo).getMedia(mediaId);
    }

    @DontRepeat
    @Test
    public void testWhenMediaDoesNotExist() throws Exception
    {
        when(mediaRepo.getMedia(mediaId))
                .thenThrow(new DoesNotExistException());

        assertThrows(() -> instance.process(request))
                .isInstanceOf(DoesNotExistException.class);
    }

    @Test
    public void testWithBadArgs() throws Exception
    {
        assertThrows(() -> instance.process(null))
                .isInstanceOf(InvalidArgumentException.class);

        GetMediaRequest emptyRequest = new GetMediaRequest();

        assertThrows(() -> instance.process(emptyRequest))
                .isInstanceOf(InvalidArgumentException.class);

        GetMediaRequest requestWithBadId = new GetMediaRequest(request)
                .setMediaId(badId);

        assertThrows(() -> instance.process(requestWithBadId))
                .isInstanceOf(InvalidArgumentException.class);
    }

    @Test
    public void testWithBadThumbnailRequest() throws Exception
    {
        Dimension dimension = new Dimension();
        dimension.setHeight(one(negativeIntegers()))
                 .setWidth(one(negativeIntegers()));

        request.setDesiredThumbnailSize(dimension);

        assertThrows(() -> instance.process(request))
                .isInstanceOf(InvalidArgumentException.class);
    }

    @Test
    public void testWhenThumbnailExists() throws Exception
    {
        request.setDesiredThumbnailSize(thumbnailSize);

        GetMediaResponse response = instance.process(request);
        assertThat(response.image, is(thumbnail));

        verify(mediaRepo).getThumbnail(mediaId, thumbnailSize);
    }

    @Test
    public void testWhenThumbnailDoesNotExist() throws Exception
    {
        request.setDesiredThumbnailSize(thumbnailSize);

        when(mediaRepo.containsThumbnail(mediaId, thumbnailSize)).thenReturn(false);
        when(mediaRepo.getThumbnail(mediaId, thumbnailSize))
                .thenThrow(new DoesNotExistException());

        GetMediaResponse response = instance.process(request);
        assertThat(response.image, is(thumbnail));
    }

    @Test
    public void testWhenThumbnailCreationFails() throws Exception
    {
        request.setDesiredThumbnailSize(thumbnailSize);

        when(mediaRepo.getThumbnail(mediaId, thumbnailSize))
                .thenThrow(new DoesNotExistException());
        when(thumbnailCreator.createThumbnail(image, thumbnailSize))
                .thenThrow(new OperationFailedException());

        GetMediaResponse response = instance.process(request);
        assertThat(response.image, is(image));
    }

    @Test
    public void testWhenSavingThumbnailFails() throws Exception
    {
        doThrow(new OperationFailedException())
                .when(mediaRepo)
                .saveThumbnail(mediaId, thumbnailSize, thumbnail);

        request.setDesiredThumbnailSize(thumbnailSize);

        GetMediaResponse response = instance.process(request);
        assertThat(response.image, is(thumbnail));
    }
}


text:
using namespace Qt;

namespace swri_console {

ConsoleWindow::ConsoleWindow(LogDatabase *db)
  :
  QMainWindow(),
  db_(db),
  db_proxy_(new LogDatabaseProxyModel(db)),
  node_list_model_(new NodeListModel(db))
{
  ui.setupUi(this);

  QObject::connect(ui.action_NewWindow, SIGNAL(triggered(bool)),
                   this, SIGNAL(createNewWindow()));

  QObject::connect(ui.action_Copy, SIGNAL(triggered()),
                   this, SLOT(copyLogs()));

  QObject::connect(ui.action_CopyExtended, SIGNAL(triggered()),
                   this, SLOT(copyExtendedLogs()));

  QObject::connect(ui.action_SelectAll, SIGNAL(triggered()),
                   this, SLOT(selectAllLogs()));

  QObject::connect(ui.action_ReadBagFile, SIGNAL(triggered(bool)),
                   this, SLOT(promptForBagFile()));

  QObject::connect(ui.action_SaveLogs, SIGNAL(triggered(bool)),
                   this, SLOT(saveLogs()));

  QObject::connect(ui.action_AbsoluteTimestamps, SIGNAL(toggled(bool)),
                   db_proxy_, SLOT(setAbsoluteTime(bool)));

  QObject::connect(ui.action_ShowTimestamps, SIGNAL(toggled(bool)),
                   db_proxy_, SLOT(setDisplayTime(bool)));

  QObject::connect(ui.action_RegularExpressions, SIGNAL(toggled(bool)),
                   db_proxy_, SLOT(setUseRegularExpressions(bool)));

  QObject::connect(ui.action_RegularExpressions, SIGNAL(toggled(bool)),
                   this, SLOT(updateIncludeLabel()));

  QObject::connect(ui.action_RegularExpressions, SIGNAL(toggled(bool)),
                   this, SLOT(updateExcludeLabel()));

  QObject::connect(ui.action_SelectFont, SIGNAL(triggered(bool)),
                   this, SIGNAL(selectFont()));

  QObject::connect(ui.action_ColorizeLogs, SIGNAL(toggled(bool)),
                   db_proxy_, SLOT(setColorizeLogs(bool)));

  QObject::connect(ui.debugColorWidget, SIGNAL(clicked(bool)),
                   this, SLOT(setDebugColor()));
  QObject::connect(ui.infoColorWidget, SIGNAL(clicked(bool)),
                   this, SLOT(setInfoColor()));
  QObject::connect(ui.warnColorWidget, SIGNAL(clicked(bool)),
                   this, SLOT(setWarnColor()));
  QObject::connect(ui.errorColorWidget, SIGNAL(clicked(bool)),
                   this, SLOT(setErrorColor()));
  QObject::connect(ui.fatalColorWidget, SIGNAL(clicked(bool)),
                   this, SLOT(setFatalColor()));

  ui.nodeList->setModel(node_list_model_);
  ui.messageList->setModel(db_proxy_);
  ui.messageList->setUniformItemSizes(true);

  QObject::connect(
    ui.nodeList->selectionModel(),
    SIGNAL(selectionChanged(const QItemSelection &,
                                const QItemSelection &)),
    this,
    SLOT(nodeSelectionChanged()));

  QObject::connect(
    ui.checkDebug, SIGNAL(toggled(bool)),
    this, SLOT(setSeverityFilter()));
  QObject::connect(
    ui.checkInfo, SIGNAL(toggled(bool)),
    this, SLOT(setSeverityFilter()));
  QObject::connect(
    ui.checkWarn, SIGNAL(toggled(bool)),
    this, SLOT(setSeverityFilter()));
  QObject::connect(
    ui.checkError, SIGNAL(toggled(bool)),
    this, SLOT(setSeverityFilter()));
  QObject::connect(
    ui.checkFatal, SIGNAL(toggled(bool)),
    this, SLOT(setSeverityFilter()));
  QObject::connect(
    db_proxy_, SIGNAL(messagesAdded()),
    this, SLOT(messagesAdded()));
  QObject::connect(ui.checkFollowNewest, SIGNAL(toggled(bool)),
                   this, SLOT(setFollowNewest(bool)));

  // Right-click menu for the message list
  QObject::connect(ui.messageList, SIGNAL(customContextMenuRequested(const QPoint&)),
                    this, SLOT(showLogContextMenu(const QPoint&)));

  QObject::connect(ui.clearAllButton, SIGNAL(clicked()),
                    this, SLOT(clearAll()));
  QObject::connect(ui.clearMessagesButton, SIGNAL(clicked()),
                    this, SLOT(clearMessages()));

  QObject::connect(
    ui.messageList->verticalScrollBar(), SIGNAL(valueChanged(int)),
    this, SLOT(userScrolled(int)));

  QObject::connect(
    ui.includeText, SIGNAL(textChanged(const QString &)),
    this, SLOT(includeFilterUpdated(const QString &)));

  QObject::connect(
    ui.excludeText, SIGNAL(textChanged(const QString &)),
    this, SLOT(excludeFilterUpdated(const QString &)));

  QList<int> sizes;
  sizes.append(100);
  sizes.append(1000);
  ui.splitter->setSizes(sizes);

  statusBar()->setSizeGripEnabled(false);
  connection_status_ = new QLabel("Not connected");
  connection_status_->setFrameStyle(QFrame::Panel | QFrame::Sunken);
  statusBar()->addPermanentWidget(connection_status_);

  loadSettings();
}

ConsoleWindow::~ConsoleWindow()
{
  delete db_proxy_;
}

void ConsoleWindow::clearAll()
{
  db_->clear();
  node_list_model_->clear();
}

void ConsoleWindow::clearMessages()
{
  db_->clear();
}

void ConsoleWindow::saveLogs()
{
  QString defaultname = QDateTime::currentDateTime().toString(Qt::ISODate) + ".bag";
  QString filename = QFileDialog::getSaveFileName(this,
                                                  "Save Logs",
                                                  QDir::homePath() + QDir::separator() + defaultname,
                                                  tr("Bag Files (*.bag);;Text Files (*.txt)"));
  if (filename != NULL && !filename.isEmpty()) {
    db_proxy_->saveToFile(filename);
  }
}

void ConsoleWindow::rosConnected(bool connected, const QString &master_uri)
{
  if (connected) {
    connection_status_->setText(master_uri);
  } else {
    connection_status_->setText("Not connected");
  }
}

void ConsoleWindow::closeEvent(QCloseEvent *event)
{
  QMainWindow::closeEvent(event);
}

void ConsoleWindow::nodeSelectionChanged()
{
  QModelIndexList selection = ui.nodeList->selectionModel()->selectedIndexes();
  std::set<std::string> nodes;
  QStringList node_names;

  for (size_t i = 0; i < selection.size(); i++) {
    std::string name = node_list_model_->nodeName(selection[i]);
    nodes.insert(name);
    node_names.append(name.c_str());
  }

  db_proxy_->setNodeFilter(nodes);

  for (size_t i = 0; i < node_names.size(); i++) {
    node_names[i] = node_names[i].split("/", QString::SkipEmptyParts).last();
  }

  setWindowTitle(QString("SWRI Console (") + node_names.join(", ") + ")");
}

void ConsoleWindow::setSeverityFilter()
{
  uint8_t mask = 0;

  if (ui.checkDebug->isChecked()) {
    mask |= rosgraph_msgs::Log::DEBUG;
  }
  if (ui.checkInfo->isChecked()) {
    mask |= rosgraph_msgs::Log::INFO;
  }
  if (ui.checkWarn->isChecked()) {
    mask |= rosgraph_msgs::Log::WARN;
  }
  if (ui.checkError->isChecked()) {
    mask |= rosgraph_msgs::Log::ERROR;
  }
  if (ui.checkFatal->isChecked()) {
    mask |= rosgraph_msgs::Log::FATAL;
  }

  QSettings settings;
  settings.setValue(SettingsKeys::SHOW_DEBUG, ui.checkDebug->isChecked());
  settings.setValue(SettingsKeys::SHOW_INFO, ui.checkInfo->isChecked());
  settings.setValue(SettingsKeys::SHOW_WARN, ui.checkWarn->isChecked());
  settings.setValue(SettingsKeys::SHOW_ERROR, ui.checkError->isChecked());
  settings.setValue(SettingsKeys::SHOW_FATAL, ui.checkFatal->isChecked());

  db_proxy_->setSeverityFilter(mask);
}

void ConsoleWindow::messagesAdded()
{
  if (ui.checkFollowNewest->isChecked()) {
    ui.messageList->scrollToBottom();
  }
}

void ConsoleWindow::showLogContextMenu(const QPoint& point)
{
  QMenu contextMenu(tr("Context menu"), ui.messageList);

  QAction select_all(tr("Select All"), ui.messageList);
  connect(&select_all, SIGNAL(triggered()), this, SLOT(selectAllLogs()));

  QAction copy(tr("Copy"), ui.messageList);
  connect(&copy, SIGNAL(triggered()), this, SLOT(copyLogs()));

  QAction copy_extended(tr("Copy Extended"), ui.messageList);
  connect(&copy_extended, SIGNAL(triggered()), this, SLOT(copyExtendedLogs()));

  QAction alternate_row_colors(tr("Alternate Row Colors"), ui.messageList);
  alternate_row_colors.setCheckable(true);
  alternate_row_colors.setChecked(ui.messageList->alternatingRowColors());
  connect(&alternate_row_colors, SIGNAL(toggled(bool)),
          this, SLOT(toggleAlternateRowColors(bool)));

  contextMenu.addAction(&select_all);
  contextMenu.addAction(&copy);
  contextMenu.addAction(&copy_extended);
  contextMenu.addAction(&alternate_row_colors);

  contextMenu.exec(ui.messageList->mapToGlobal(point));
}

void ConsoleWindow::userScrolled(int value)
{
  if (value != ui.messageList->verticalScrollBar()->maximum()) {
    ui.checkFollowNewest->setChecked(false);
  } else {
    ui.checkFollowNewest->setChecked(true);
  }
}

void ConsoleWindow::selectAllLogs()
{
  if (ui.nodeList->hasFocus()) {
    ui.nodeList->selectAll();
  } else {
    ui.messageList->selectAll();
  }
}

void ConsoleWindow::copyLogs()
{
  QStringList buffer;
  foreach(const QModelIndex &index, ui.messageList->selectionModel()->selectedIndexes())
  {
    buffer << db_proxy_->data(index, Qt::DisplayRole).toString();
  }
  QApplication::clipboard()->setText(buffer.join(tr("\n")));
}

void ConsoleWindow::copyExtendedLogs()
{
  QStringList buffer;
  foreach(const QModelIndex &index, ui.messageList->selectionModel()->selectedIndexes())
  {
    buffer << db_proxy_->data(index, LogDatabaseProxyModel::ExtendedLogRole).toString();
  }
  QApplication::clipboard()->setText(buffer.join(tr("\n\n")));
}

void ConsoleWindow::setFollowNewest(bool follow)
{
  QSettings settings;
  settings.setValue(SettingsKeys::FOLLOW_NEWEST, follow);
}

void ConsoleWindow::includeFilterUpdated(const QString &text)
{
  QStringList items = text.split(";", QString::SkipEmptyParts);
  QStringList filtered;

  for (int i = 0; i < items.size(); i++) {
    QString x = items[i].trimmed();
    if (!x.isEmpty()) {
      filtered.append(x);
    }
  }

  db_proxy_->setIncludeFilters(filtered);
  db_proxy_->setIncludeRegexpPattern(text);
  updateIncludeLabel();
}

void ConsoleWindow::excludeFilterUpdated(const QString &text)
{
  QStringList items = text.split(";", QString::SkipEmptyParts);
  QStringList filtered;

  for (int i = 0; i < items.size(); i++) {
    QString x = items[i].trimmed();
    if (!x.isEmpty()) {
      filtered.append(x);
    }
  }

  db_proxy_->setExcludeFilters(filtered);
  db_proxy_->setExcludeRegexpPattern(text);
  updateExcludeLabel();
}

void ConsoleWindow::updateIncludeLabel()
{
  if (db_proxy_->isIncludeValid()) {
    ui.includeLabel->setText("Include");
  } else {
    ui.includeLabel->setText("Include");
  }
}

void ConsoleWindow::updateExcludeLabel()
{
  if (db_proxy_->isExcludeValid()) {
    ui.excludeLabel->setText("Exclude");
  } else {
    ui.excludeLabel->setText("Exclude");
  }
}

void ConsoleWindow::setFont(const QFont &font)
{
  ui.messageList->setFont(font);
  ui.nodeList->setFont(font);
}

void ConsoleWindow::setDebugColor()
{
  chooseButtonColor(ui.debugColorWidget);
}

void ConsoleWindow::setInfoColor()
{
  chooseButtonColor(ui.infoColorWidget);
}

void ConsoleWindow::setWarnColor()
{
  chooseButtonColor(ui.warnColorWidget);
}

void ConsoleWindow::setErrorColor()
{
  chooseButtonColor(ui.errorColorWidget);
}

void ConsoleWindow::setFatalColor()
{
  chooseButtonColor(ui.fatalColorWidget);
}

void ConsoleWindow::chooseButtonColor(QPushButton* widget)
{
  QColor old_color = getButtonColor(widget);
  QColor color = QColorDialog::getColor(old_color, this);
  if (color.isValid()) {
    updateButtonColor(widget, color);
  }
}

QColor ConsoleWindow::getButtonColor(const QPushButton* button) const
{
  QString ss = button->styleSheet();
  QRegExp re("background: (#\\w*);");
  QColor old_color;
  if (re.indexIn(ss) >= 0) {
    old_color = QColor(re.cap(1));
  }
  return old_color;
}

void ConsoleWindow::updateButtonColor(QPushButton* widget, const QColor& color)
{
  QString s("background: #"
            + QString(color.red() < 16? "0" : "") + QString::number(color.red(),16)
            + QString(color.green() < 16? "0" : "") + QString::number(color.green(),16)
            + QString(color.blue() < 16? "0" : "") + QString::number(color.blue(),16) + ";");
  widget->setStyleSheet(s);
  widget->update();

  if (widget == ui.debugColorWidget) {
    db_proxy_->setDebugColor(color);
  }
  else if (widget == ui.infoColorWidget) {
    db_proxy_->setInfoColor(color);
  }
  else if (widget == ui.warnColorWidget) {
    db_proxy_->setWarnColor(color);
  }
  else if (widget == ui.errorColorWidget) {
    db_proxy_->setErrorColor(color);
  }
  else if (widget == ui.fatalColorWidget) {
    db_proxy_->setFatalColor(color);
  }
  else {
    qWarning("Unexpected widget passed to ConsoleWindow::updateButtonColor.");
  }
}

void ConsoleWindow::loadColorButtonSetting(const QString& key, QPushButton* button)
{
  QSettings settings;
  QColor defaultColor;
  // The color buttons don't have a default value set in the .ui file, so we need to
  // supply defaults for them here in case the appropriate setting isn't found.
  if (button == ui.debugColorWidget) {
    defaultColor = Qt::gray;
  }
  else if (button == ui.infoColorWidget) {
    defaultColor = Qt::black;
  }
  else if (button == ui.warnColorWidget) {
    defaultColor = QColor(255, 127, 0);
  }
  else if (button == ui.errorColorWidget) {
    defaultColor = Qt::red;
  }
  else if (button == ui.fatalColorWidget) {
    defaultColor = Qt::magenta;
  }
  QColor color = settings.value(key, defaultColor).value<QColor>();
  updateButtonColor(button, color);
}

void ConsoleWindow::toggleAlternateRowColors(bool checked)
{
  ui.messageList->setAlternatingRowColors(checked);

  QSettings settings;
  settings.setValue(SettingsKeys::ALTERNATE_LOG_ROW_COLORS, checked);
}

void ConsoleWindow::loadSettings()
{
  // First, load all the boolean settings...
  loadBooleanSetting(SettingsKeys::DISPLAY_TIMESTAMPS, ui.action_ShowTimestamps);
  loadBooleanSetting(SettingsKeys::ABSOLUTE_TIMESTAMPS, ui.action_AbsoluteTimestamps);
  loadBooleanSetting(SettingsKeys::USE_REGEXPS, ui.action_RegularExpressions);
  loadBooleanSetting(SettingsKeys::COLORIZE_LOGS, ui.action_ColorizeLogs);
  loadBooleanSetting(SettingsKeys::FOLLOW_NEWEST, ui.checkFollowNewest);

  // The severity level has to be handled a little differently, since they're all combined
  // into a single integer mask under the hood.  First they have to be loaded from the settings,
  // then set in the UI, then the mask has to actually be applied.
  QSettings settings;
  bool showDebug = settings.value(SettingsKeys::SHOW_DEBUG, true).toBool();
  bool showInfo = settings.value(SettingsKeys::SHOW_INFO, true).toBool();
  bool showWarn = settings.value(SettingsKeys::SHOW_WARN, true).toBool();
  bool showError = settings.value(SettingsKeys::SHOW_ERROR, true).toBool();
  bool showFatal = settings.value(SettingsKeys::SHOW_FATAL, true).toBool();
  ui.checkDebug->setChecked(showDebug);
  ui.checkInfo->setChecked(showInfo);
  ui.checkWarn->setChecked(showWarn);
  ui.checkError->setChecked(showError);
  ui.checkFatal->setChecked(showFatal);
  setSeverityFilter();

  // Load button colors.
  loadColorButtonSetting(SettingsKeys::DEBUG_COLOR, ui.debugColorWidget);
  loadColorButtonSetting(SettingsKeys::INFO_COLOR, ui.infoColorWidget);
  loadColorButtonSetting(SettingsKeys::WARN_COLOR, ui.warnColorWidget);
  loadColorButtonSetting(SettingsKeys::ERROR_COLOR, ui.errorColorWidget);
  loadColorButtonSetting(SettingsKeys::FATAL_COLOR, ui.fatalColorWidget);

  // Finally, load the filter contents.
  QString includeFilter = settings.value(SettingsKeys::INCLUDE_FILTER, "").toString();
  ui.includeText->setText(includeFilter);
  QString excludeFilter = settings.value(SettingsKeys::EXCLUDE_FILTER, "").toString();
  ui.excludeText->setText(excludeFilter);

  bool alternate_row_colors = settings.value(SettingsKeys::ALTERNATE_LOG_ROW_COLORS, true).toBool();
  ui.messageList->setAlternatingRowColors(alternate_row_colors);
}

void ConsoleWindow::promptForBagFile()
{
  QString filename = QFileDialog::getOpenFileName(
    NULL,
    tr("Open Bag File"),
    QDir::homePath(),
    tr("Bag Files (*.bag)"));

  if (filename != NULL) {
    Q_EMIT readBagFile(filename);
  }
}
}  // namespace swri_console


text:
import time
from watchdog.observers import Observer
from watchdog.events import FileModifiedEvent, FileSystemEventHandler
import sys
from subprocess import call

class MdCompileHandler(FileSystemEventHandler):
    def on_modified(self, event):
        if isinstance(event, FileModifiedEvent) and event.src_path.endswith('.md'):
            print 'Change in %s detected... Recompiling markdown' % event.src_path.split('/')[-1]
            call(['landslide', sys.argv[1]])

if __name__ == "__main__":
    event_handler = MdCompileHandler()
    observer = Observer()
    observer.schedule(event_handler, path='.', recursive=True)
    observer.start()
    try:
        while True:
            time.sleep(1)
    except KeyboardInterrupt:
        observer.stop()
    observer.join()


text:
#include <stdlib.h>
#include <math.h>
#ifdef PROFILER
#include <gperftools/profiler.h>
#endif
#include <vector>
#include <limits>

#include "FGlib.h"
#include "matrix/FG_sparse_matrix.h"
#include "matrix/FG_dense_matrix.h"
#include "matrix/matrix_eigensolver.h"

vsize_t g_MAX_ITERS = std::numeric_limits<vsize_t>::max();
std::vector<eigen_pair_t> g_eigen_pairs;
vsize_t K = 1;
vsize_t g_NV;
float g_MIN_EIGV = std::numeric_limits<float>::max();
float g_MAX_EIGV = std::numeric_limits<float>::min();

/**
 * \brief Get Euclidean distance given two vectors.
 */
ev_float_t L2Norm(FG_vector<ev_float_t>::ptr v1, FG_vector<ev_float_t>::ptr v2)
{
	assert(v1->get_size() == v2->get_size());
	ev_float_t sum = 0;
	for (size_t idx = 0; idx < v1->get_size(); idx++) {
		ev_float_t diff = v1->get(idx) - v2->get(idx);
		sum += diff*diff;
	}
	if (sum == 0) { return 0; }
	return sqrt(sum);
}

float gen_random_float()
{
	float random = ((float) rand()) / (float) RAND_MAX;
	float diff = g_MAX_EIGV - g_MIN_EIGV;
	float r = random * diff;
	return g_MIN_EIGV + r;
}

std::vector<ev_float_t> dist_vector; // For memoization
// Serial
size_t phi(ev_float_t c) {
	ev_float_t min_dist = std::numeric_limits<ev_float_t>::max();
	for(size_t i = 0; i < g_eigen_pairs.size(); i++) {
		for (size_t j = 0; j < g_eigen_pairs[i].second->get_size(); j++) {
			ev_float_t eucl_dist = fabs(g_eigen_pairs[i].second->get(j) - c);
			if (eucl_dist < min_dist) {
				min_dist = eucl_dist;
			}
		}
	}
	return min_dist;
}

// FIXME DM: Complete me
float get_prob(FG_vector<ev_float_t>::ptr C) {
	return 0.5;
}

// \param prob The probability of selection
// FIXME: Complete me
ev_float_t get_indep_sample(float prob) {
	return 0.0;
}

ev_float_t get_random_sample()
{
	// Sample a point at random from eigs
	size_t eigs_size = g_eigen_pairs.size(); // To ensure compiler optimization for / and %
	size_t sample_size = eigs_size * (g_eigen_pairs[0].second->get_size() - 1);
	size_t rand_sample = rand() % sample_size;

	// g_eigen_pairs[row][col]
	return g_eigen_pairs[rand_sample / eigs_size].second->get(rand_sample % eigs_size);
}

void k_means_bar_bar_init_clusters(float oversampling_factor, FG_row_wise_matrix<ev_float_t>::ptr & clusters)
{
	std::vector<ev_float_t> C;
	for (size_t clusterID = 0; clusterID < clusters->get_num_rows(); clusterID++) {
		// Sample a point at random from eigs
		C.push_back(get_random_sample());
		dist_vector.push_back(phi(C.back()));

		size_t iters = (size_t) ceil(log2(dist_vector.back()));

		for (size_t i = 0; i < iters; i++) {
			C.push_back(get_indep_sample(get_prob(clusters->get_row_ref(clusterID)))); // Line 4
			// FIXME: Complete me
		}
	}
}

// Begin Helpers
	template <typename T>
void print_vector(typename std::vector<T> v)
{
	std::cout << "[";

	typename std::vector<T>::iterator itr = v.begin();
	for (; itr != v.end(); itr++) {
		std::cout << " "<< *itr;
	}
	std::cout <<  " ]\n";
}

void print_usage()
{
	fprintf(stderr,
			"k-means [options] conf_file graph_file index_file K\n");
	fprintf(stderr, "-c confs: add more configurations to the system\n");
	fprintf(stderr, "-m type: the type of matrix\n");
	fprintf(stderr, "-p num: the number of potential eigenvalues\n");
	fprintf(stderr, "-k num: the number of real eigenvalues\n");
	fprintf(stderr, "-w which: which side of eigenvalues\n");
	fprintf(stderr, "-t type: the type of eigenvlaues\n");
	fprintf(stderr, "-i iters: maximum number of iterations\n");

	graph_conf.print_help();
	params.print_help();
}

int main(int argc, char *argv[])
{
	int opt;
	std::string confs;
	std::string matrix_type = "adj";
	g_NV = 1;
	int m = 2; m = m;
	std::string which = "LA";

	int num_opts = 0;

	while ((opt = getopt(argc, argv, "c:m:k:p:w:i:")) != -1) {
		num_opts++;
		switch (opt) {
			case 'c':
				confs = optarg;
				num_opts++;
				break;
			case 'm':
				matrix_type = optarg;
				num_opts++;
				break;
			case 'k': /**/
				g_NV = atoi(optarg);
				num_opts++;
				break;
			case 'p': /**/
				m = atoi(optarg);
				num_opts++;
				break;
			case 'w':
				which = optarg;
				num_opts++;
				break;
			case 'i':
				g_MAX_ITERS = atol(optarg);
				num_opts++;
				break;
			default:
				print_usage();
		}
	}
	argv += 1 + num_opts;
	argc -= 1 + num_opts;

	if (argc < 3) {
		print_usage();
		exit(-1);
	}

	std::string conf_file = argv[0];
	std::string graph_file = argv[1];
	std::string index_file = argv[2];
	K = atol(argv[3]);

	config_map configs(conf_file);
	configs.add_options(confs);

	FG_graph::ptr _graph = FG_graph::create(graph_file, index_file, configs);

#if 1
	if (matrix_type == "adj") {
		FG_adj_matrix::ptr matrix = FG_adj_matrix::create(_graph);
		compute_eigen<FG_adj_matrix>(matrix, m, g_NV, which, g_eigen_pairs);
	}
	else
		assert (0);
#endif

# if 0
	// Fake eigen computation for WIKI
	std::cout << "Creating Fake eigs ..." << std::endl;
	for (vsize_t i = 0; i < g_NV; i++) {
		ev_float_t eigval = (ev_float_t) rand() / (ev_float_t)RAND_MAX;
		FG_vector<ev_float_t>::ptr eigvect = FG_vector<ev_float_t>::create(8298);

		for (vertex_id_t ii = 0; ii < 8298; ii++) {
			eigvect->set(ii, (ev_float_t) rand() / (ev_float_t)RAND_MAX);
		}

		eigen_pair_t ep(eigval, eigvect);
		g_eigen_pairs.push_back(ep);
	}
# endif

	// Create row-wise dense matrix to hold eigs
	FG_row_wise_matrix<ev_float_t>::ptr eigs =
		FG_row_wise_matrix<ev_float_t>::create(g_eigen_pairs[0].second->get_size(), g_NV); // (n, x)
	eigs->resize(g_eigen_pairs[0].second->get_size(), g_NV);

	// Make vector for cluster assignments
	FG_vector<vsize_t>::ptr cluster_assignments =
		FG_vector<vsize_t>::create(eigs->get_num_rows());
	cluster_assignments->init(INVALID_VERTEX_ID);

	FG_vector<vsize_t>::ptr prev_cluster_assignments =
		FG_vector<vsize_t>::create(eigs->get_num_rows());
	cluster_assignments->init(INVALID_VERTEX_ID);

#ifdef PROFILER
	ProfilerStart("/home/disa/graph-engine/flash-graph/clustering/profile_out.log");
#endif

	// Insert eigs into `eig matrix` and discard eigenvalues
	// FIXME: Slow .. I assume ...
	vsize_t col = 0;

	BOOST_FOREACH(eigen_pair_t &v, g_eigen_pairs) {
		for (vsize_t row = 0; row < v.second->get_size(); row++) {
			eigs->set(row, col, v.second->get(row));

			// For random init we need a baseline
			ev_float_t tmp = v.second->min();
			if (tmp < g_MIN_EIGV) { g_MIN_EIGV = tmp; }
			tmp = v.second->max();
			if (tmp > g_MAX_EIGV) { g_MAX_EIGV = tmp; }
		}
		col++;
	}

	// Create `clusters` dense matrix
	FG_row_wise_matrix<ev_float_t>::ptr clusters =
		FG_row_wise_matrix<ev_float_t>::create(K, g_NV); // (K, x)
	clusters->resize(K, g_NV);

	// Figure out max and min so we can use it to evenly distribute cluster init
	printf("\nNew g_MAX_EIGV is %f ...\n", g_MAX_EIGV);
	printf("New g_MIN_EIGV is %f ...\n", g_MIN_EIGV);

	// Randomly initialize cluster centers
	for (vsize_t clusterID = 0; clusterID < K; clusterID++) {
		FG_vector<ev_float_t>::ptr fgv = FG_vector<ev_float_t>::create(g_NV);

#pragma omp parallel for
		for (vsize_t j = 0; j < g_NV; j++) {
			fgv->set(j, gen_random_float());
		}

		clusters->set_row(clusterID, fgv);
	}

	// Create matrix to hold distances
	FG_row_wise_matrix<ev_float_t>::ptr distance_matrix =
		FG_row_wise_matrix<ev_float_t>::create(eigs->get_num_rows(), K); // (n, K)
	distance_matrix->resize(eigs->get_num_rows(), K);

	printf("Matrix K-means starting ... \n");

	struct timeval start, end;
	gettimeofday(&start, NULL);

	std::cout << "Computing " << g_MAX_ITERS << " iterations\n";
	for (vsize_t iter = 0; iter < g_MAX_ITERS; iter++) {
		// Hold cluster assignment counter
		std::vector<vsize_t> cluster_assignment_counts;
		cluster_assignment_counts.assign(K, 0);

		printf("E-step Iteration %d ... Computing distance matrix ...\n", iter);
		// Compute distances.
		// TODO: Make coalesced OMP loop

		for (vsize_t vertexID = 0; vertexID < eigs->get_num_rows(); vertexID++) {
			for (vsize_t clusterID = 0; clusterID < clusters->get_num_rows(); clusterID++) {

				// printf("Cluster ID: %u has mean ", clusterID);
				// clusters->get_row_ref(clusterID)->print();

				distance_matrix->set(vertexID, clusterID,
						L2Norm(eigs->get_row_ref(vertexID), clusters->get_row_ref(clusterID)));
			}

			// printf("Vertex %u has distance vector: ", vertexID);
			// distance_matrix->get_row_ref(vertexID)->print();

			size_t assigned_cluster = distance_matrix->get_row_ref(vertexID)->argmin();

			// printf("Vertex %u with eig: %f, is assigned cluster %lu\n", vertexID, eigs->get(vertexID, 0), assigned_cluster);

			cluster_assignments->set(vertexID, assigned_cluster);
			cluster_assignment_counts[assigned_cluster]++;
		}

		// printf("Previous clusters: "); prev_cluster_assignments->print();
		// printf("\nNew clusters: "); cluster_assignments->print();

		if (cluster_assignments->eq_all(prev_cluster_assignments)) { // eq_all is not ||
			printf("K-means converged in %u iterations\n", iter);
			break;
		}

		printf("Cluster assignment counts: \n");
		print_vector(cluster_assignment_counts);

		// I clear the cluster mean matrix because I don't want to use more memory
		printf("Clearing cluster means ...\n");
		clusters->assign_all(0.0); // Not ||

		printf("M-step Updating cluster means ...\n");
		for (vsize_t vertexID = 0; vertexID < cluster_assignments->get_size(); vertexID++) {
			// printf("Vertex %u ...\n", vertexID);
			// plus_eq is ||
			(clusters->get_row_ref(cluster_assignments->get(vertexID)))->plus_eq( eigs->get_row_ref(vertexID) );
		}
		// Take the mean of all added means
		printf("Div by in place ...\n");
		for (vsize_t clusterID = 0; clusterID < clusters->get_num_rows(); clusterID++) {
			// div_by_in_place is ||
			clusters->get_row_ref(clusterID)->div_by_in_place
				(cluster_assignment_counts[clusterID]);
		}

		// Set prev to current
		prev_cluster_assignments->shallow_copy(cluster_assignments); // shallow_copy is ||
	}

#ifdef PROFILER
	ProfilerStop();
#endif
	gettimeofday(&end, NULL);

	printf("\n******************************************\n"
			"K-means complete in %f seconds\n"
			"\n******************************************\n",
			time_diff(start, end));

	// printf("Printing clusters: \n");
	// cluster_assignments->print();
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="ChangeListManager">
    <list default="true" id="0c9faf1c-68c8-4b1e-9961-273881adda86" name="Default" comment="">
      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/index.js" afterPath="$PROJECT_DIR$/index.js" />
      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/package.json" afterPath="$PROJECT_DIR$/package.json" />
    </list>
    <ignored path="npm-text-parser.iws" />
    <ignored path=".idea/workspace.xml" />
    <ignored path=".idea/dataSources.local.xml" />
    <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
    <option name="TRACKING_ENABLED" value="true" />
    <option name="SHOW_DIALOG" value="false" />
    <option name="HIGHLIGHT_CONFLICTS" value="true" />
    <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
    <option name="LAST_RESOLUTION" value="IGNORE" />
  </component>
  <component name="CreatePatchCommitExecutor">
    <option name="PATCH_PATH" value="" />
  </component>
  <component name="ExecutionTargetManager" SELECTED_TARGET="default_target" />
  <component name="FavoritesManager">
    <favorites_list name="npm-text-parser" />
  </component>
  <component name="FileEditorManager">
    <leaf>
      <file leaf-file-name="index.js" pinned="false" current-in-tab="false">
        <entry file="file://$PROJECT_DIR$/index.js">
          <provider selected="true" editor-type-id="text-editor">
            <state relative-caret-position="700">
              <caret line="239" column="26" selection-start-line="239" selection-start-column="26" selection-end-line="239" selection-end-column="26" />
              <folding />
            </state>
          </provider>
        </entry>
      </file>
      <file leaf-file-name="LICENSE" pinned="false" current-in-tab="false">
        <entry file="file://$PROJECT_DIR$/LICENSE">
          <provider selected="true" editor-type-id="text-editor">
            <state relative-caret-position="102">
              <caret line="6" column="24" selection-start-line="6" selection-start-column="24" selection-end-line="6" selection-end-column="24" />
              <folding />
            </state>
          </provider>
        </entry>
      </file>
      <file leaf-file-name="README.md" pinned="false" current-in-tab="false">
        <entry file="file://$PROJECT_DIR$/README.md">
          <provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
            <state split_layout="SPLIT">
              <first_editor relative-caret-position="361">
                <caret line="112" column="14" selection-start-line="112" selection-start-column="14" selection-end-line="112" selection-end-column="14" />
                <folding>
                  <marker date="1473469207000" expanded="true" signature="599:733" ph="//..." />
                  <marker date="1473469207000" expanded="true" signature="1013:1139" ph="//..." />
                  <marker date="1473469207000" expanded="true" signature="1943:2238" ph="//..." />
                  <marker date="1473469207000" expanded="true" signature="3587:4105" ph="//..." />
                  <marker date="1473469207000" expanded="true" signature="3590:4105" ph="{...}" />
                </folding>
              </first_editor>
              <second_editor />
            </state>
          </provider>
        </entry>
      </file>
      <file leaf-file-name="package.json" pinned="false" current-in-tab="true">
        <entry file="file://$PROJECT_DIR$/package.json">
          <provider selected="true" editor-type-id="text-editor">
            <state relative-caret-position="238">
              <caret line="14" column="18" selection-start-line="14" selection-start-column="18" selection-end-line="14" selection-end-column="18" />
              <folding />
            </state>
          </provider>
        </entry>
      </file>
    </leaf>
  </component>
  <component name="FileTemplateManagerImpl">
    <option name="RECENT_TEMPLATES">
      <list>
        <option value="JavaScript File" />
      </list>
    </option>
  </component>
  <component name="Git.Settings">
    <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
  </component>
  <component name="IdeDocumentHistory">
    <option name="CHANGED_PATHS">
      <list>
        <option value="$PROJECT_DIR$/README.md" />
        <option value="$PROJECT_DIR$/index.js" />
        <option value="$PROJECT_DIR$/package.json" />
      </list>
    </option>
  </component>
  <component name="JsBuildToolGruntFileManager" detection-done="true" sorting="DEFINITION_ORDER" />
  <component name="JsBuildToolPackageJson" detection-done="true" sorting="DEFINITION_ORDER" />
  <component name="JsGulpfileManager">
    <detection-done>true</detection-done>
    <sorting>DEFINITION_ORDER</sorting>
  </component>
  <component name="PhpWorkspaceProjectConfiguration" backward_compatibility_performed="true" />
  <component name="ProjectFrameBounds">
    <option name="x" value="446" />
    <option name="y" value="56" />
    <option name="width" value="1308" />
    <option name="height" value="1070" />
  </component>
  <component name="ProjectLevelVcsManager" settingsEditedManually="false">
    <OptionsSetting value="true" id="Add" />
    <OptionsSetting value="true" id="Remove" />
    <OptionsSetting value="true" id="Checkout" />
    <OptionsSetting value="true" id="Update" />
    <OptionsSetting value="true" id="Status" />
    <OptionsSetting value="true" id="Edit" />
    <ConfirmationsSetting value="0" id="Add" />
    <ConfirmationsSetting value="0" id="Remove" />
  </component>
  <component name="ProjectView">
    <navigator currentView="ProjectPane" proportions="" version="1">
      <flattenPackages />
      <showMembers />
      <showModules />
      <showLibraryContents />
      <hideEmptyPackages />
      <abbreviatePackageNames />
      <autoscrollToSource />
      <autoscrollFromSource />
      <sortByType />
      <manualOrder />
      <foldersAlwaysOnTop value="true" />
    </navigator>
    <panes>
      <pane id="Scope" />
      <pane id="Scratches" />
      <pane id="ProjectPane">
        <subPane />
      </pane>
    </panes>
  </component>
  <component name="PropertiesComponent">
    <property name="settings.editor.selected.configurable" value="copyright" />
    <property name="settings.editor.splitter.proportion" value="0.2" />
    <property name="last_opened_file_path" value="$PROJECT_DIR$" />
    <property name="WebServerToolWindowFactoryState" value="false" />
    <property name="js-jscs-nodeInterpreter" value="/usr/local/bin/node" />
    <property name="nodejs_interpreter_path" value="/usr/local/bin/node" />
  </component>
  <component name="RunManager">
    <configuration default="true" type="JavascriptDebugType" factoryName="JavaScript Debug">
      <method />
    </configuration>
    <configuration default="true" type="NodeJSConfigurationType" factoryName="Node.js" path-to-node="project" working-dir="">
      <method />
    </configuration>
    <configuration default="true" type="PHPUnitRunConfigurationType" factoryName="PHPUnit">
      <TestRunner />
      <method />
    </configuration>
    <configuration default="true" type="PhpBehatConfigurationType" factoryName="Behat">
      <BehatRunner />
      <method />
    </configuration>
    <configuration default="true" type="PhpLocalRunConfigurationType" factoryName="PHP Console">
      <method />
    </configuration>
    <configuration default="true" type="js.build_tools.gulp" factoryName="Gulp.js">
      <method />
    </configuration>
    <configuration default="true" type="js.build_tools.npm" factoryName="npm">
      <command value="run-script" />
      <scripts />
      <node-interpreter value="project" />
      <envs />
      <method />
    </configuration>
    <configuration default="true" type="mocha-javascript-test-runner" factoryName="Mocha">
      <node-interpreter>project</node-interpreter>
      <node-options />
      <working-directory />
      <pass-parent-env>true</pass-parent-env>
      <envs />
      <ui />
      <extra-mocha-options />
      <test-kind>DIRECTORY</test-kind>
      <test-directory />
      <recursive>false</recursive>
      <method />
    </configuration>
  </component>
  <component name="ShelveChangesManager" show_recycled="false">
    <option name="remove_strategy" value="false" />
  </component>
  <component name="TaskManager">
    <task active="true" id="Default" summary="Default task">
      <changelist id="0c9faf1c-68c8-4b1e-9961-273881adda86" name="Default" comment="" />
      <created>1473451610936</created>
      <option name="number" value="Default" />
      <option name="presentableId" value="Default" />
      <updated>1473451610936</updated>
      <workItem from="1473451613357" duration="11354000" />
    </task>
    <servers />
  </component>
  <component name="TimeTrackingManager">
    <option name="totallyTimeSpent" value="11354000" />
  </component>
  <component name="ToolWindowManager">
    <frame x="446" y="56" width="1308" height="1070" extended-state="0" />
    <editor active="true" />
    <layout>
      <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.5064795" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
      <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
      <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="true" content_ui="tabs" />
      <window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
      <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32971016" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
      <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.3296371" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
      <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
      <window_info id="Terminal" active="true" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.36659664" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
      <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="true" content_ui="tabs" />
      <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
      <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
      <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
      <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
      <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
      <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
      <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
      <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
    </layout>
    <layout-to-restore>
      <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="9" side_tool="false" content_ui="tabs" />
      <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
      <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
      <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
      <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="true" content_ui="tabs" />
      <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="8" side_tool="false" content_ui="tabs" />
      <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
      <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
      <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.3669355" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
      <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.5064795" sideWeight="0.5" order="1" side_tool="false" content_ui="combo" />
      <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="3" side_tool="false" content_ui="combo" />
      <window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
      <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32971016" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
      <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
      <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
      <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="true" content_ui="tabs" />
      <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
    </layout-to-restore>
  </component>
  <component name="Vcs.Log.UiProperties">
    <option name="RECENTLY_FILTERED_USER_GROUPS">
      <collection />
    </option>
    <option name="RECENTLY_FILTERED_BRANCH_GROUPS">
      <collection />
    </option>
  </component>
  <component name="VcsContentAnnotationSettings">
    <option name="myLimit" value="2678400000" />
  </component>
  <component name="XDebuggerManager">
    <breakpoint-manager />
    <watches-manager />
  </component>
  <component name="editorHistoryManager">
    <entry file="file://$PROJECT_DIR$/LICENSE">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="102">
          <caret line="6" column="24" selection-start-line="6" selection-start-column="24" selection-end-line="6" selection-end-column="24" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/README.md">
      <provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
        <state split_layout="SPLIT">
          <first_editor relative-caret-position="361">
            <caret line="112" column="14" selection-start-line="112" selection-start-column="14" selection-end-line="112" selection-end-column="14" />
            <folding>
              <marker date="1473469207000" expanded="true" signature="599:733" ph="//..." />
              <marker date="1473469207000" expanded="true" signature="1013:1139" ph="//..." />
              <marker date="1473469207000" expanded="true" signature="1943:2238" ph="//..." />
              <marker date="1473469207000" expanded="true" signature="3587:4105" ph="//..." />
              <marker date="1473469207000" expanded="true" signature="3590:4105" ph="{...}" />
            </folding>
          </first_editor>
          <second_editor />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/index.js">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="700">
          <caret line="239" column="26" selection-start-line="239" selection-start-column="26" selection-end-line="239" selection-end-column="26" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/package.json">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="238">
          <caret line="14" column="18" selection-start-line="14" selection-start-column="18" selection-end-line="14" selection-end-column="18" />
          <folding />
        </state>
      </provider>
    </entry>
  </component>
</project>


text:
namespace Diadoc.Api.Proto.Docflow
{
  [global::System.Serializable, global::ProtoBuf.ProtoContract(Name=@"RoamingNotification")]
  public partial class RoamingNotification : global::ProtoBuf.IExtensible
  {
    public RoamingNotification() {}

    private Diadoc.Api.Proto.Docflow.Entity _Notification;
    [global::ProtoBuf.ProtoMember(1, IsRequired = true, Name=@"Notification", DataFormat = global::ProtoBuf.DataFormat.Default)]
    public Diadoc.Api.Proto.Docflow.Entity Notification
    {
      get { return _Notification; }
      set { _Notification = value; }
    }
    private bool _IsSuccess;
    [global::ProtoBuf.ProtoMember(2, IsRequired = true, Name=@"IsSuccess", DataFormat = global::ProtoBuf.DataFormat.Default)]
    public bool IsSuccess
    {
      get { return _IsSuccess; }
      set { _IsSuccess = value; }
    }
    private global::ProtoBuf.IExtension extensionObject;
    global::ProtoBuf.IExtension global::ProtoBuf.IExtensible.GetExtensionObject(bool createIfMissing)
      { return global::ProtoBuf.Extensible.GetExtensionObject(ref extensionObject, createIfMissing); }
  }

}


text:
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="chrome://liberator/content/help.xsl"?>

<!DOCTYPE document SYSTEM "chrome://liberator/content/liberator.dtd">

<document
    name="intro"
    title="&liberator.appname; Introduction"
    xmlns="http://vimperator.org/namespaces/liberator"
    xmlns:html="http://www.w3.org/1999/xhtml">

First there was a Navigator, then there was an Explorer.
Later it was time for a Konqueror. Now it's time for an Imperator, the
VIMperator :)

Introduction

<link topic="http://vimperator.org">&liberator.appname;</link> is a
<link topic="http://www.mozilla.com/firefox/">Firefox</link>
browser extension with strong inspiration from the Vim text editor,
with a mind towards faster and more efficient browsing. It has similar key
bindings and you could call it a modal web browser, as key bindings differ
according to which mode you are in. For example, it has a special Hint mode,
where you can follow links easily with the keyboard only. Also most
functionality is available as commands, typing <ex>:back</ex> will go back
within the current page history, just like hitting the back button in the
toolbar.

    However, &liberator.appname; does not try to be a 100% Vim clone, it rather brings Vim's
    ideas to the 21st century. This means making use of new graphical capabilities
    but also of faster computers. Furthermore, great care is taken into making
    its command line interface more consistent and easier to use, while still
    being a powerful extension for advanced users.

    But &liberator.appname; is more than just a simple command interface to Firefox — it is a
    complete development environment as well. If you are a web developer, you can
    enjoy an interactive JavaScript shell — even with completion support. Or if you
    want to extend &liberator.appname;, you can easily do that by just dropping a JavaScript
    file in its plugin directory.

<tags>author donation sponsor</tags>
<strut/>

    &liberator.appname; was initially written by
    <link topic="mailto:stubenschrott@vimperator.org">Martin
    Stubenschrott</link> but has found many other
    <link topic="http://vimperator-labs.googlecode.com/hg/vimperator/AUTHORS/">invaluable contributors</link>
    who helped out fixing bugs and adding new features.

    If you appreciate the work on &liberator.appname; and want to
    encourage us working on it more, you can send us greetings, patches, or
    donations:

<pan><handle/></pan>

    If you prefer getting some nice products for your money, you can also support
    us by buying some cool
    <link topic="http://www.zazzle.com/maxauthority*">merchandise</link> like
    t-shirts or mugs. Of course, as we believe in free, open source software, only
    support us financially if you really like &liberator.appname; and the money doesn't hurt
    — otherwise just use it, recommend it, and like it :)

Help topics

        <link topic="tutorial">Quick-start tutorial</link>:
        A quick-start tutorial for new users.

        <link topic="starting">Starting &liberator.appname;</link>:
        How &liberator.appname; starts up, where it reads the config file…

        <link topic="browsing">Browsing</link>:
        Basic mappings and commands needed for a browsing session (how to open
        a web page or go back in history).

        <link topic="buffer">Buffer</link>:
        Operations on the current document like scrolling or copying text.

        <link topic="cmdline">Command-line mode</link>:
        Command-line editing.

        <link topic="insert">Insert mode</link>:
        Insert-mode editing.

        <link topic="options">Options</link>:
        A description of all options.

        <link topic="pattern">Text search commands</link>:
        Searching for text in the current buffer.

        <link topic="tabs">Tabs</link>:
        Managing your tabbed browsing session.

        <link topic="hints">Hints</link>:
        Selecting hyperlinks and other page elements.

        <link topic="map">Key mappings, abbreviations, and user-defined commands</link>:
        Defining new key mappings, abbreviations and user commands.

        <link topic="eval">Expression evaluation</link>:
        Executing JavaScript.

        <link topic="marks">Marks</link>:
        Using bookmarks, QuickMarks, history and local marks.

        <link topic="repeat">Repeating commands</link>:
        Using macros to repeat recurring workflows.

        <link topic="autocommands">Automatic commands</link>:
        Automatically executing code on certain events.

        <link topic="print">Printing</link>:
        Printing pages.

        <link topic="gui">&liberator.appname;'s GUI</link>:
        Accessing &liberator.host; menus, dialogs and the sidebar.

        <link topic="styling">Styling the GUI and web pages</link>:
        Changing the styling of content pages and &liberator.appname; itself.

        <link topic="message">Error and informational messages</link>:
        A description of messages and error messages.

        <link topic="developer">Developer information</link>:
        How to write docs or plugins.

        <link topic="various">Various commands</link>:
        Other help which didn't fit into any other category.

        <link topic="plugins">Plugins</link>:
        Documentation for any plugins you may have installed.

You can also jump directly to the help of a specific command with <ex>:help o</ex>
or <ex>:help :set</ex>.

Features

Vim-like keybindings (<k>h</k>, <k>j</k>, <k>k</k>, <k>l</k>, <k>gg</k>, <k>G</k>, <k>0</k>, <k>$</k>, <k>ZZ</k>, <k name="C-f"/>, etc.)

Ex commands (<ex>:quit</ex>, <ex>:open www.foo.com</ex>, …) with a proper command line

Tab completion available for all commands, showing suggestions while you type

Hint mode (start with <k>f</k> to follow a link)

Extensions! Yes, you can extend Vimperator's functionality with <link href="http://ticket.vimperator.org/Vimperator/plugin/">scripts</link> just like you can extend Firefox with extensions

Explore JavaScript objects with <ex>:echo window</ex> and even context-sensitive tab completion

Easily customizable GUI (easily hide all GUI elements with <ex>:set gui=none</ex>)

Ability to <ex>:source</ex> JavaScript files, and to use a ~/.vimperatorrc file with syntax highlighting if you install vimperator.vim

Easy quick searches (<ex>:open foo</ex> will search for "foo" in google, <ex>:open ebay terminator</ex> will search for "terminator" on ebay) with support for &liberator.host; keyword bookmarks and search engines

Count supported for many commands (3<k name="C-o"/> will go back 3 pages)

Beep on errors

Marks support (<k>m</k>a to set mark a on a web page, <k>'</k>a to go there)

QuickMarks support (quickly go to previously marked web pages with <k>go</k>a-zA-Z0-9)

<ex>:map</ex> and <ex>:command</ex> support (and feedkeys() for script writers)

<ex>:time</ex> support for profiling

Move the text cursor and select text with Vim keys and a Visual mode

External editor support

Macros to replay key strokes

AutoCommands to execute actions on certain events

A comprehensive help system, explaining all commands, mappings and options

ChangeLog

We keep a list of changes between versions <link topic="http://vimperator-labs.googlecode.com/hg/vimperator/NEWS">here</link>.

Contact

    Please report any bugs/feature requests using the project's <link topic="http://code.google.com/p/vimperator-labs/issues/list">bug tracker</link>.
    You can also attach patches there.
    Another way is to use the <link topic="https://groups.google.com/forum/?fromgroups=#%21forum/vimperator-labs">mailing list</link>.
    You will also find us on the <link topic="irc://irc.freenode.net/vimperator">#vimperator</link> IRC channel
    on <link topic="http://www.freenode.net/">Freenode</link>.
    Some more info and tips can be found in the <link topic="http://code.google.com/p/vimperator-labs/wiki/&liberator.appname;FAQ">
    frequently asked questions (FAQ)</link> on the <link topic="http://code.google.com/p/vimperator-labs/w/list?q=label%3Aproject-vimperator">Wiki</link>.

    Make sure you have read the <link topic="http://vimperator-labs.googlecode.com/hg/vimperator/TODO">TODO</link> file first, as we are aware of many
    things which can be improved when we find time for it or receive patches.

</document>


text:
'use strict';
module.exports = {
  up: function(queryInterface, Sequelize) {
    return queryInterface.createTable('accessLevels', {
      id: {
        allowNull: false,
        autoIncrement: true,
        primaryKey: true,
        type: Sequelize.INTEGER
      },
      projectId: {
        allowNull: false,
        type: Sequelize.STRING
      },
      name: {
        allowNull: false,
        type: Sequelize.STRING
      },
      canReadReports: {
        allowNull: false,
        type: Sequelize.BOOLEAN
      },
      canWriteOwnTasks: {
        allowNull: false,
        type: Sequelize.BOOLEAN
      },
      canWriteTasks: {
        allowNull: false,
        type: Sequelize.BOOLEAN
      },
      canWriteLabels: {
        allowNull: false,
        type: Sequelize.BOOLEAN
      },
      canWriteProject: {
        allowNull: false,
        type: Sequelize.BOOLEAN
      },
      createdAt: {
        allowNull: false,
        type: Sequelize.DATE
      },
      updatedAt: {
        allowNull: false,
        type: Sequelize.DATE
      }
    },
        {
          engine: process.env.NODE_ENV === 'test' ? 'MYISAM' : 'InnoDB',
        });
  },
  down: function(queryInterface, Sequelize) {
    return queryInterface.dropTable('accessLevels');
  }
};


text:
#ifndef _glfw3_native_h_
#define _glfw3_native_h_

#ifdef __cplusplus
extern "C" {
#endif

/*************************************************************************
 * Doxygen documentation
 *************************************************************************/

/*! @file glfw3native.h
 *  @brief The header of the native access functions.
 *
 *  This is the header file of the native access functions.  See @ref native for
 *  more information.
 */
/*! @defgroup native Native access
 *
 *  **By using the native access functions you assert that you know what you're
 *  doing and how to fix problems caused by using them.  If you don't, you
 *  shouldn't be using them.**
 *
 *  Before the inclusion of @ref glfw3native.h, you may define exactly one
 *  window system API macro and zero or more context creation API macros.
 *
 *  The chosen backends must match those the library was compiled for.  Failure
 *  to do this will cause a link-time error.
 *
 *  The available window API macros are:
 *  * `GLFW_EXPOSE_NATIVE_WIN32`
 *  * `GLFW_EXPOSE_NATIVE_COCOA`
 *  * `GLFW_EXPOSE_NATIVE_X11`
 *  * `GLFW_EXPOSE_NATIVE_WAYLAND`
 *  * `GLFW_EXPOSE_NATIVE_MIR`
 *
 *  The available context API macros are:
 *  * `GLFW_EXPOSE_NATIVE_WGL`
 *  * `GLFW_EXPOSE_NATIVE_NSGL`
 *  * `GLFW_EXPOSE_NATIVE_GLX`
 *  * `GLFW_EXPOSE_NATIVE_EGL`
 *
 *  These macros select which of the native access functions that are declared
 *  and which platform-specific headers to include.  It is then up your (by
 *  definition platform-specific) code to handle which of these should be
 *  defined.
 */

//-----------------------------------------------
//
//  [Siv3D]
//
# define GLFW_EXPOSE_NATIVE_X11
//
//-----------------------------------------------

/*************************************************************************
 * System headers and types
 *************************************************************************/

#if defined(GLFW_EXPOSE_NATIVE_WIN32)
 // This is a workaround for the fact that glfw3.h needs to export APIENTRY (for
 // example to allow applications to correctly declare a GL_ARB_debug_output
 // callback) but windows.h assumes no one will define APIENTRY before it does
 #undef APIENTRY
 #include <windows.h>
#elif defined(GLFW_EXPOSE_NATIVE_COCOA)
 #include <ApplicationServices/ApplicationServices.h>
 #if defined(__OBJC__)
  #import <Cocoa/Cocoa.h>
 #else
  typedef void* id;
 #endif
#elif defined(GLFW_EXPOSE_NATIVE_X11)
 #include <X11/Xlib.h>
 #include <X11/extensions/Xrandr.h>
#elif defined(GLFW_EXPOSE_NATIVE_WAYLAND)
 #include <wayland-client.h>
#elif defined(GLFW_EXPOSE_NATIVE_MIR)
 #include <mir_toolkit/mir_client_library.h>
#endif

#if defined(GLFW_EXPOSE_NATIVE_WGL)
 /* WGL is declared by windows.h */
#endif
#if defined(GLFW_EXPOSE_NATIVE_NSGL)
 /* NSGL is declared by Cocoa.h */
#endif
#if defined(GLFW_EXPOSE_NATIVE_GLX)
 #include <GL/glx.h>
#endif
#if defined(GLFW_EXPOSE_NATIVE_EGL)
 #include <EGL/egl.h>
#endif

/*************************************************************************
 * Functions
 *************************************************************************/

#if defined(GLFW_EXPOSE_NATIVE_WIN32)
/*! @brief Returns the adapter device name of the specified monitor.
 *
 *  @return The UTF-8 encoded adapter device name (for example `\\.\DISPLAY1`)
 *  of the specified monitor, or `NULL` if an [error](@ref error_handling)
 *  occurred.
 *
 *  @thread_safety This function may be called from any thread.  Access is not
 *  synchronized.
 *
 *  @since Added in version 3.1.
 *
 *  @ingroup native
 */
GLFWAPI const char* glfwGetWin32Adapter(GLFWmonitor* monitor);

/*! @brief Returns the display device name of the specified monitor.
 *
 *  @return The UTF-8 encoded display device name (for example
 *  `\\.\DISPLAY1\Monitor0`) of the specified monitor, or `NULL` if an
 *  [error](@ref error_handling) occurred.
 *
 *  @thread_safety This function may be called from any thread.  Access is not
 *  synchronized.
 *
 *  @since Added in version 3.1.
 *
 *  @ingroup native
 */
GLFWAPI const char* glfwGetWin32Monitor(GLFWmonitor* monitor);

/*! @brief Returns the `HWND` of the specified window.
 *
 *  @return The `HWND` of the specified window, or `NULL` if an
 *  [error](@ref error_handling) occurred.
 *
 *  @thread_safety This function may be called from any thread.  Access is not
 *  synchronized.
 *
 *  @since Added in version 3.0.
 *
 *  @ingroup native
 */
GLFWAPI HWND glfwGetWin32Window(GLFWwindow* window);
#endif

#if defined(GLFW_EXPOSE_NATIVE_WGL)
/*! @brief Returns the `HGLRC` of the specified window.
 *
 *  @return The `HGLRC` of the specified window, or `NULL` if an
 *  [error](@ref error_handling) occurred.
 *
 *  @thread_safety This function may be called from any thread.  Access is not
 *  synchronized.
 *
 *  @since Added in version 3.0.
 *
 *  @ingroup native
 */
GLFWAPI HGLRC glfwGetWGLContext(GLFWwindow* window);
#endif

#if defined(GLFW_EXPOSE_NATIVE_COCOA)
/*! @brief Returns the `CGDirectDisplayID` of the specified monitor.
 *
 *  @return The `CGDirectDisplayID` of the specified monitor, or
 *  `kCGNullDirectDisplay` if an [error](@ref error_handling) occurred.
 *
 *  @thread_safety This function may be called from any thread.  Access is not
 *  synchronized.
 *
 *  @since Added in version 3.1.
 *
 *  @ingroup native
 */
GLFWAPI CGDirectDisplayID glfwGetCocoaMonitor(GLFWmonitor* monitor);

/*! @brief Returns the `NSWindow` of the specified window.
 *
 *  @return The `NSWindow` of the specified window, or `nil` if an
 *  [error](@ref error_handling) occurred.
 *
 *  @thread_safety This function may be called from any thread.  Access is not
 *  synchronized.
 *
 *  @since Added in version 3.0.
 *
 *  @ingroup native
 */
GLFWAPI id glfwGetCocoaWindow(GLFWwindow* window);
#endif

#if defined(GLFW_EXPOSE_NATIVE_NSGL)
/*! @brief Returns the `NSOpenGLContext` of the specified window.
 *
 *  @return The `NSOpenGLContext` of the specified window, or `nil` if an
 *  [error](@ref error_handling) occurred.
 *
 *  @thread_safety This function may be called from any thread.  Access is not
 *  synchronized.
 *
 *  @since Added in version 3.0.
 *
 *  @ingroup native
 */
GLFWAPI id glfwGetNSGLContext(GLFWwindow* window);
#endif

#if defined(GLFW_EXPOSE_NATIVE_X11)
/*! @brief Returns the `Display` used by GLFW.
 *
 *  @return The `Display` used by GLFW, or `NULL` if an
 *  [error](@ref error_handling) occurred.
 *
 *  @thread_safety This function may be called from any thread.  Access is not
 *  synchronized.
 *
 *  @since Added in version 3.0.
 *
 *  @ingroup native
 */
GLFWAPI Display* glfwGetX11Display(void);

/*! @brief Returns the `RRCrtc` of the specified monitor.
 *
 *  @return The `RRCrtc` of the specified monitor, or `None` if an
 *  [error](@ref error_handling) occurred.
 *
 *  @thread_safety This function may be called from any thread.  Access is not
 *  synchronized.
 *
 *  @since Added in version 3.1.
 *
 *  @ingroup native
 */
GLFWAPI RRCrtc glfwGetX11Adapter(GLFWmonitor* monitor);

/*! @brief Returns the `RROutput` of the specified monitor.
 *
 *  @return The `RROutput` of the specified monitor, or `None` if an
 *  [error](@ref error_handling) occurred.
 *
 *  @thread_safety This function may be called from any thread.  Access is not
 *  synchronized.
 *
 *  @since Added in version 3.1.
 *
 *  @ingroup native
 */
GLFWAPI RROutput glfwGetX11Monitor(GLFWmonitor* monitor);

/*! @brief Returns the `Window` of the specified window.
 *
 *  @return The `Window` of the specified window, or `None` if an
 *  [error](@ref error_handling) occurred.
 *
 *  @thread_safety This function may be called from any thread.  Access is not
 *  synchronized.
 *
 *  @since Added in version 3.0.
 *
 *  @ingroup native
 */
GLFWAPI Window glfwGetX11Window(GLFWwindow* window);
#endif

#if defined(GLFW_EXPOSE_NATIVE_GLX)
/*! @brief Returns the `GLXContext` of the specified window.
 *
 *  @return The `GLXContext` of the specified window, or `NULL` if an
 *  [error](@ref error_handling) occurred.
 *
 *  @thread_safety This function may be called from any thread.  Access is not
 *  synchronized.
 *
 *  @since Added in version 3.0.
 *
 *  @ingroup native
 */
GLFWAPI GLXContext glfwGetGLXContext(GLFWwindow* window);

/*! @brief Returns the `GLXWindow` of the specified window.
 *
 *  @return The `GLXWindow` of the specified window, or `None` if an
 *  [error](@ref error_handling) occurred.
 *
 *  @thread_safety This function may be called from any thread.  Access is not
 *  synchronized.
 *
 *  @since Added in version 3.2.
 *
 *  @ingroup native
 */
GLFWAPI GLXWindow glfwGetGLXWindow(GLFWwindow* window);
#endif

#if defined(GLFW_EXPOSE_NATIVE_WAYLAND)
/*! @brief Returns the `struct wl_display*` used by GLFW.
 *
 *  @return The `struct wl_display*` used by GLFW, or `NULL` if an
 *  [error](@ref error_handling) occurred.
 *
 *  @thread_safety This function may be called from any thread.  Access is not
 *  synchronized.
 *
 *  @since Added in version 3.2.
 *
 *  @ingroup native
 */
GLFWAPI struct wl_display* glfwGetWaylandDisplay(void);

/*! @brief Returns the `struct wl_output*` of the specified monitor.
 *
 *  @return The `struct wl_output*` of the specified monitor, or `NULL` if an
 *  [error](@ref error_handling) occurred.
 *
 *  @thread_safety This function may be called from any thread.  Access is not
 *  synchronized.
 *
 *  @since Added in version 3.2.
 *
 *  @ingroup native
 */
GLFWAPI struct wl_output* glfwGetWaylandMonitor(GLFWmonitor* monitor);

/*! @brief Returns the main `struct wl_surface*` of the specified window.
 *
 *  @return The main `struct wl_surface*` of the specified window, or `NULL` if
 *  an [error](@ref error_handling) occurred.
 *
 *  @thread_safety This function may be called from any thread.  Access is not
 *  synchronized.
 *
 *  @since Added in version 3.2.
 *
 *  @ingroup native
 */
GLFWAPI struct wl_surface* glfwGetWaylandWindow(GLFWwindow* window);
#endif

#if defined(GLFW_EXPOSE_NATIVE_MIR)
/*! @brief Returns the `MirConnection*` used by GLFW.
 *
 *  @return The `MirConnection*` used by GLFW, or `NULL` if an
 *  [error](@ref error_handling) occurred.
 *
 *  @thread_safety This function may be called from any thread.  Access is not
 *  synchronized.
 *
 *  @since Added in version 3.2.
 *
 *  @ingroup native
 */
GLFWAPI MirConnection* glfwGetMirDisplay(void);

/*! @brief Returns the Mir output ID of the specified monitor.
 *
 *  @return The Mir output ID of the specified monitor, or zero if an
 *  [error](@ref error_handling) occurred.
 *
 *  @thread_safety This function may be called from any thread.  Access is not
 *  synchronized.
 *
 *  @since Added in version 3.2.
 *
 *  @ingroup native
 */
GLFWAPI int glfwGetMirMonitor(GLFWmonitor* monitor);

/*! @brief Returns the `MirSurface*` of the specified window.
 *
 *  @return The `MirSurface*` of the specified window, or `NULL` if an
 *  [error](@ref error_handling) occurred.
 *
 *  @thread_safety This function may be called from any thread.  Access is not
 *  synchronized.
 *
 *  @since Added in version 3.2.
 *
 *  @ingroup native
 */
GLFWAPI MirSurface* glfwGetMirWindow(GLFWwindow* window);
#endif

#if defined(GLFW_EXPOSE_NATIVE_EGL)
/*! @brief Returns the `EGLDisplay` used by GLFW.
 *
 *  @return The `EGLDisplay` used by GLFW, or `EGL_NO_DISPLAY` if an
 *  [error](@ref error_handling) occurred.
 *
 *  @thread_safety This function may be called from any thread.  Access is not
 *  synchronized.
 *
 *  @since Added in version 3.0.
 *
 *  @ingroup native
 */
GLFWAPI EGLDisplay glfwGetEGLDisplay(void);

/*! @brief Returns the `EGLContext` of the specified window.
 *
 *  @return The `EGLContext` of the specified window, or `EGL_NO_CONTEXT` if an
 *  [error](@ref error_handling) occurred.
 *
 *  @thread_safety This function may be called from any thread.  Access is not
 *  synchronized.
 *
 *  @since Added in version 3.0.
 *
 *  @ingroup native
 */
GLFWAPI EGLContext glfwGetEGLContext(GLFWwindow* window);

/*! @brief Returns the `EGLSurface` of the specified window.
 *
 *  @return The `EGLSurface` of the specified window, or `EGL_NO_SURFACE` if an
 *  [error](@ref error_handling) occurred.
 *
 *  @thread_safety This function may be called from any thread.  Access is not
 *  synchronized.
 *
 *  @since Added in version 3.0.
 *
 *  @ingroup native
 */
GLFWAPI EGLSurface glfwGetEGLSurface(GLFWwindow* window);
#endif

#ifdef __cplusplus
}
#endif

#endif /* _glfw3_native_h_ */


text:
The `private` keyword in Ruby is a great way to limit the scope of your methods; to limit the number of ways in which they can be invoked.

By making `#transfer_completed` a private method, we can still call it within `#transfer`, but we cannot invoke it directly:
```ruby
gabes_account.transfer_completed(100)
# private method `transfer_completed' called for #<BankAccount:0x007f77f8682eb0> (repl):1:in `<main>'

gabes_account.transfer(alis_account, 100)
# Congratulations! Your transfer of 100 IQD was completed!
# => nil
```

```ruby
class BankAccount
    attr_accessor :balance
    attr_reader :account_number, :name

    def initialize(account_number, name, balance = 0) # default argument
        @account_number = account_number
        @name = name
        @balance = balance
    end

    def transfer(target_account, amount)
        # verify_personal_details

        self.balance -= amount
        target_account.balance += amount
        transfer_completed(amount) # CALLED HERE
    end

    private

    def transfer_completed(amount) # DEFINED HERE
        puts "Congratulations! Your transfer of #{amount} IQD was completed!"
    end

    def verify_personal_details
        # Return all the personal banking details for an account
        # We want the #transfer method to be able to rely on this information
        # behind the scenes, but we do NOT want to give users the ability to
        # directly call gabes_account.verify_personal_details

        puts "Secrets!"
    end
end

gabes_account = BankAccount.new(1234, "Gabe")
fatimas_account = BankAccount.new(2345, "Fatima", 100)
novens_account = BankAccount.new(3456, "Noven", 500)
alis_account = BankAccount.new(4567, "Ali", 10000000)
```


text:
package org.ovirt.engine.core.bll.adbroker;

import java.io.File;

import org.ovirt.engine.core.common.config.ConfigValues;
import org.ovirt.engine.core.utils.log.Log;
import org.ovirt.engine.core.utils.log.LogFactory;

import sun.security.krb5.Config;
import sun.security.krb5.KrbException;

import javax.annotation.PostConstruct;
import javax.ejb.Singleton;
import javax.ejb.DependsOn;
import javax.ejb.Startup;
import javax.ejb.ConcurrencyManagement;
import javax.ejb.ConcurrencyManagementType;

/**
 * Manage the container's Kerberos initialization.
 *
 */
// Here we use a Singleton bean
// The @Startup annotation is to make sure the bean is initialized on startup.
// @ConcurrencyManagement - we use bean managed concurrency:
// Singletons that use bean-managed concurrency allow full concurrent access to all the
// business and timeout methods in the singleton.
// The developer of the singleton is responsible for ensuring that the state of the singleton is synchronized across all clients.
// The @DependsOn annotation is in order to make sure it is started after the Backend bean is initialized
@SuppressWarnings("restriction")
@Singleton
@Startup
@DependsOn("Backend")
@ConcurrencyManagement(ConcurrencyManagementType.BEAN)
public class KerberosManager implements KerberosManagerSericeManagmentMBean {

    private static Log log = LogFactory.getLog(KerberosManager.class);

    private boolean isKerberosAuth() {
        boolean isKerberosAuth = false;
        String authMethod = org.ovirt.engine.core.common.config.Config.<String> GetValue(ConfigValues.AuthenticationMethod);
        String domainName = org.ovirt.engine.core.common.config.Config.<String> GetValue(ConfigValues.DomainName);
        String ldapSecurityAuthentication = org.ovirt.engine.core.common.config.Config.<String> GetValue(ConfigValues.LDAPSecurityAuthentication);

        if (authMethod.equalsIgnoreCase("LDAP")) {
            // If there are domains then we need to load the Kerberos configuration in case the LDAP security
            // authentication entry contains
            // GSSAPI explicitly, or implicitly (if empty)
            if (!domainName.isEmpty()) {
                if (ldapSecurityAuthentication.isEmpty() || ldapSecurityAuthentication.toUpperCase().contains("GSSAPI")) {
                    isKerberosAuth = true;
                }
            }
        }
        return isKerberosAuth;
    }

    @PostConstruct
    public void postConstruct() {
        create();
    }

    /**
     * This method is called upon the bean creation as part
     * of the management Service bean lifecycle.
     */
    public void create() {
        if (!isKerberosAuth()) {
            return;
        }
        String engineEtc = System.getenv("ENGINE_ETC");
        if (engineEtc == null) {
            engineEtc = "/etc/ovirt-engine";
        }
        File krb5File = new File(engineEtc, "krb5.conf");
        if (krb5File.exists()) {
            if (log.isDebugEnabled()) {
                log.debug("Loading kerberos settings from " + krb5File.getAbsolutePath());
            }
            System.setProperty("java.security.krb5.conf",
                    krb5File.getAbsolutePath());
        } else {
            log.error("Failed loading kerberos setting. File " + krb5File + " not found.");
        }

    }

    @SuppressWarnings("restriction")
    @Override
    public void refresh() throws KrbException {
        if (!isKerberosAuth()) {
            return;
        }
        log.info("Refreshing kerberos configuration");
        Config.refresh();

    }

}


text:
<?php

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

namespace AppBundle\Metier;
use Doctrine\ORM\EntityManager;
use AppBundle\Entity\Utilisateur;

/**
 * Description of UtilisateurMetier
 *
 * @author fd
 */

class UtilisateurMetier {
    private $em;

    public function __construct(EntityManager $em) {
        $this->em = $em;
    }

    public function getRepository() {
        return $this->em->getRepository("UserBundle:Utilisateur");
    }

    public function create(Utilisateur $utilisateur) {
        $this->em->persist($utilisateur);
        $this->em->flush();
        return $utilisateur;
    }

    public function delete($id) {
        $utilisateur = $this->getRepository()->find($id);
        if ($utilisateur) {
            $this->em->remove($utilisateur);
            $this->em->flush();
        }
    }

    public function update(Utilisateur $utilisateur) {
        $this->em->update($utilisateur);
        $this->em->flush();
		return $utilisateur;
    }

    public function findAll() {
        return $this->getRepository()->findAll();
    }

	public function find($id) {
        return $this->getRepository()->find($id);
    }
}