text:
// Copyright (C) Pash Contributors. License: GPL/BSD. See https://github.com/Pash-Project/Pash/
using System;

namespace System.Management.Automation.Runspaces
{
    public sealed class RunspaceStateEventArgs : EventArgs
    {
        //public RunspaceStateInfo RunspaceStateInfo { get; }

        // internals
        //internal RunspaceStateEventArgs(System.Management.Automation.Runspaces.RunspaceStateInfo runspaceStateInfo);
    }
}

redpajama_set_name: RedPajamaGithub


text:
<?php

namespace Core\Testing;

use Core\Application;
use Core\Services\DI;

class Environment
{
    /**
     * Load the test environment.
     */
    public static function load()
    {
        Application::init();

        /*
         * Override configuration with the environment entry of phpunit.xml.
         */
        DI::getInstance()->get('config')->set('app.env', env('APP_ENV'));
    }
}


text:
//-----------------------------------------------------------------------
// <copyright file="ICanTell.cs" company="Akka.NET Project">
//     Copyright (C) 2009-2015 Typesafe Inc. <http://www.typesafe.com>
//     Copyright (C) 2013-2015 Akka.NET project <https://github.com/akkadotnet/akka.net>
// </copyright>
//-----------------------------------------------------------------------

namespace Akka.Actor
{
    public interface ICanTell
    {
        void Tell(object message, IActorRef sender);
    }
}


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

namespace ExtraLinq
{
    public static partial class EnumerableExtensions
    {
        /// <summary>
        /// Enumerates the specified input sequence and returns a new sequence
        /// which contains all input elements in random order.
        /// </summary>
        /// <typeparam name="TSource">The type of the elements of <paramref name="source"/>.</typeparam>
        /// <param name="source">The sequence to shuffle.</param>
        /// <returns>A shuffled sequence containing the elements of <paramref name="source"/>.</returns>
        /// <remarks>
        /// This method uses the Fisher-Yates shuffle.
        /// For more information, see http://en.wikipedia.org/wiki/Fisher-Yates.
        /// </remarks>
        public static IEnumerable<TSource> Shuffle<TSource>(this IEnumerable<TSource> source)
        {
            ThrowIf.Argument.IsNull(source, "source");

            return ShuffleIterator(source, _random);
        }

        /// <summary>
        /// Enumerates the specified input sequence and returns a new sequence
        /// which contains all input elements in random order.
        /// </summary>
        /// <typeparam name="TSource">The type of the elements of <paramref name="source"/>.</typeparam>
        /// <param name="source">The sequence to shuffle.</param>
        /// <param name="random">The random number generator used for shuffling.</param>
        /// <returns>A shuffled sequence containing the elements of <paramref name="source"/>.</returns>
        /// <remarks>
        /// This method uses the Fisher-Yates shuffle.
        /// For more information, see http://en.wikipedia.org/wiki/Fisher-Yates.
        /// </remarks>
        public static IEnumerable<TSource> Shuffle<TSource>(this IEnumerable<TSource> source, Random random)
        {
            ThrowIf.Argument.IsNull(source, "source");
            ThrowIf.Argument.IsNull(random, "random");

            return ShuffleIterator(source, random);
        }

        private static IEnumerable<TSource> ShuffleIterator<TSource>(IEnumerable<TSource> source, Random random)
        {
            TSource[] elements = source.ToArray();

            for (int n = 0; n < elements.Length; n++)
            {
                int k = random.Next(n, elements.Length);
                yield return elements[k];

                elements[k] = elements[n];
            }
        }
    }
}


text:
package cn.aezo.zookeeper.distributed_config_center_service_discover;

import org.apache.zookeeper.AsyncCallback;
import org.apache.zookeeper.WatchedEvent;
import org.apache.zookeeper.Watcher;
import org.apache.zookeeper.ZooKeeper;
import org.apache.zookeeper.data.Stat;

import java.util.concurrent.CountDownLatch;

/**
 * @author smalle
 * @date 2020-07-26 09:20
 */
public class WatchCallback implements Watcher, AsyncCallback.StatCallback, AsyncCallback.DataCallback {

    private CountDownLatch countDownLatch = new CountDownLatch(1);
    private Config config;
    private ZooKeeper zk;

    private WatchCallback() {}

    public WatchCallback(Config config, ZooKeeper zk) {
        this.config = config;
        this.zk = zk;
    }

    public void await() throws InterruptedException {
        // 第一次不能使用getData而要用exists判断。因为如果节点不存在,此时监听事件将创建不成功,之后创建节点后就不会调用process处理
        // zk.getData("/config", this, this, "hello");
        zk.exists("/config", this, this, "hello");
        countDownLatch.await();
    }

    // zk.exists、zk.getData: Watcher
    @Override
    public void process(WatchedEvent watchedEvent) {
        System.out.println("process..." + watchedEvent);
        Event.EventType type = watchedEvent.getType();
        switch (type) {
            case None:
                break;
            case NodeCreated:
                zk.getData("/config", this, this, "hello");
                break;
            case NodeDeleted:
                config.setData(null);
                countDownLatch = new CountDownLatch(1);
                break;
            case NodeDataChanged:
                zk.getData("/config", this, this, "hello");
                break;
            case NodeChildrenChanged:
                break;
            case DataWatchRemoved:
                break;
            case ChildWatchRemoved:
                break;
            case PersistentWatchRemoved:
                break;
        }
    }

    // zk.exists: AsyncCallback.StatCallback
    @Override
    public void processResult(int i, String s, Object o, Stat stat) {
        if(stat != null) {
            zk.getData("/config", this, this, "hello");
        }
    }

    // zk.getData: AsyncCallback.DataCallback
    @Override
    public void processResult(int i, String s, Object o, byte[] bytes, Stat stat) {
        System.out.println("processResult..." + bytes);
        if(bytes != null) {
            System.out.println("new String(bytes):" + new String(bytes));
            config.setData(new String(bytes));
            countDownLatch.countDown();
        }
    }
}


text:
<?php

namespace Zend\I18n\Exception;

interface ExceptionInterface
{}


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

<feed xml:base="http://localhost:80/defects/1/history" xmlns="http://www.w3.org/2005/Atom">
    <id>urn:com:hp:qadefects:defects</id>
    <updated>2008-08-14T14:32:57.520+03:00</updated>
    <title type="text">Defects</title>
    <link href="http://localhost:80/defects/1/history" rel="self"/>
    <link href="http://localhost:80/defects/1/history?alt=application%2Fatom%2Bxml" type="application/atom+xml" rel="alternate"/>
    <link href="http://localhost:80/defects/1/history?alt=application%2Fjson" type="application/json" rel="alternate"/>
    <author>
        <name>admin</name>
    </author>
    <entry>
        <id>urn:com:hp:qadefects:defect:1</id>
        <title type="text">Cannot perform payment</title>
        <link href="http://localhost:80/defects/1" rel="edit"/>
        <link href="http://localhost:80/defects/1;rev=0" rel="self"/>
        <link href="http://localhost:80/defects/1;rev=0?alt=application%2Fatom%2Bxml" type="application/atom+xml" rel="alternate"/>
        <link href="http://localhost:80/defects/1;rev=0?alt=application%2Fjson" type="application/json" rel="alternate"/>
        <link href="http://localhost:80/defects/1;rev=0?alt=application%2Fxml" type="application/xml" rel="alternate"/>
        <category scheme="urn:com:hp:qadefects:categories:severity" term="1-critical"/>
        <category scheme="urn:com:hp:qadefects:categories:status" term="New"/>
        <author>
            <name>tester1</name>
        </author>
        <published>1970-01-01T16:01:45.050+02:00</published>
        In Payment Services page, error message appears when trying to perform payment with valid credit card.
    </entry>
    <entry>
        <id>urn:com:hp:qadefects:defect:1</id>
        <title type="text">Missing asterisk for mandatory fields</title>
        <link href="http://localhost:80/defects/1" rel="edit"/>
        <link href="http://localhost:80/defects/1;rev=1" rel="self"/>
        <link href="http://localhost:80/defects/1;rev=1?alt=application%2Fatom%2Bxml" type="application/atom+xml" rel="alternate"/>
        <link href="http://localhost:80/defects/1;rev=1?alt=application%2Fjson" type="application/json" rel="alternate"/>
        <link href="http://localhost:80/defects/1;rev=1?alt=application%2Fxml" type="application/xml" rel="alternate"/>
        <category scheme="urn:com:hp:qadefects:categories:severity" term="4-minor"/>
        <category scheme="urn:com:hp:qadefects:categories:status" term="Assigned"/>
        <author>
            <name>tester2</name>
        </author>
        <published>1970-01-01T16:01:45.052+02:00</published>
        In Payment Services page, there is no indication for mandatory fields.
    </entry>
    <entry>
        <id>urn:com:hp:qadefects:defect:1</id>
        <title type="text">Id field is disabled in Edit Profile page</title>
        <link href="http://localhost:80/defects/1" rel="edit"/>
        <link href="http://localhost:80/defects/1;rev=2" rel="self"/>
        <link href="http://localhost:80/defects/1;rev=2?alt=application%2Fatom%2Bxml" type="application/atom+xml" rel="alternate"/>
        <link href="http://localhost:80/defects/1;rev=2?alt=application%2Fjson" type="application/json" rel="alternate"/>
        <link href="http://localhost:80/defects/1;rev=2?alt=application%2Fxml" type="application/xml" rel="alternate"/>
        <category scheme="urn:com:hp:qadefects:categories:severity" term="2-high"/>
        <category scheme="urn:com:hp:qadefects:categories:status" term="New"/>
        <author>
            <name>tester1</name>
        </author>
        <published>1970-01-01T16:01:45.052+02:00</published>
        Cannot change the Id in Edit Profile page, it is disabled.
    </entry>
</feed>


text:
package com.arjuna.dbplugins.tests.filesystem.directory;

import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.junit.Test;
import static org.junit.Assert.*;
import com.arjuna.databroker.data.connector.ObservableDataProvider;
import com.arjuna.databroker.data.connector.ObserverDataConsumer;
import com.arjuna.databroker.data.core.DataFlowNodeLifeCycleControl;
import com.arjuna.dbplugins.filesystem.directory.DirectoryChangeDataSource;
import com.arjuna.dbutils.testsupport.dataflownodes.dummy.DummyDataSink;
import com.arjuna.dbutils.testsupport.dataflownodes.lifecycle.TestJEEDataFlowNodeLifeCycleControl;

public class DirectoryChangeDataSourceTest
{
    private static final Logger logger = Logger.getLogger(DirectoryChangeDataSourceTest.class.getName());

    @Test
    public void directoryScanner01()
    {
        try
        {
            DataFlowNodeLifeCycleControl dataFlowNodeLifeCycleControl = new TestJEEDataFlowNodeLifeCycleControl();

            File testDirectory = createTemporaryDirectory("Scanner01");

            String              name       = "Directory Change Data Source";
            Map<String, String> properties = new HashMap<String, String>();
            properties.put(DirectoryChangeDataSource.DIRECTORYNAME_PROPERYNAME, testDirectory.toString());

            DirectoryChangeDataSource directoryChangeDataSource = new DirectoryChangeDataSource(name, properties);
            DummyDataSink             dummyDataSink             = new DummyDataSink("Dummy Data Sink", Collections.<String, String>emptyMap());

            dataFlowNodeLifeCycleControl.completeCreationAndActivateDataFlowNode(UUID.randomUUID().toString(), directoryChangeDataSource, null);
            dataFlowNodeLifeCycleControl.completeCreationAndActivateDataFlowNode(UUID.randomUUID().toString(), dummyDataSink, null);

            ((ObservableDataProvider<File>) directoryChangeDataSource.getDataProvider(File.class)).addDataConsumer((ObserverDataConsumer<File>) dummyDataSink.getDataConsumer(File.class));

            Thread.sleep(1000);

            File testFile1 = new File(testDirectory, "Test01");
            testFile1.createNewFile();
            Thread.sleep(1000);

            File testFile2 = new File(testDirectory, "Test02");
            testFile2.createNewFile();
            Thread.sleep(1000);

            File testFile3 = new File(testDirectory, "Test03");
            testFile3.createNewFile();
            Thread.sleep(1000);

            dataFlowNodeLifeCycleControl.removeDataFlowNode(directoryChangeDataSource);
            dataFlowNodeLifeCycleControl.removeDataFlowNode(dummyDataSink);

            assertEquals("Incorrect message number", 3, dummyDataSink.receivedData().size());
        }
        catch (Throwable throwable)
        {
            logger.log(Level.WARNING, "Problem in 'directoryScanner01'", throwable);
            fail("Problem in 'directoryScanner01': " + throwable);
        }
    }

    private File createTemporaryDirectory(String uName)
        throws IOException
    {
        File temporaryDirectory = Files.createTempDirectory(uName).toFile();

        temporaryDirectory.deleteOnExit();

        return temporaryDirectory;
    }
}


text:
layout: page
title: "HADDOCK Tutorials for version 2.2"
tags: [HADDOCK, docking, complexes, proteins, ligands, interactions]
image:
  feature: pages/banner_education-thin.jpg
---
In this page you can find links to tutorials on the usage of our software and webportal [HADDOCK 2.2](http://alcazar.science.uu.nl/enmr/services/HADDOCK2.2/).

* [**HADDOCK basic protein-protein docking tutorial**](/education/HADDOCK/HADDOCK-protein-protein-basic):
  A tutorial demonstrating the use of the HADDOCK web server to model a protein-protein complex using interface information derived from NMR chemical shift perturbation data.
  This tutorial does not require any Linux expertise and only makes use of our web server and [PyMol](http://www.pymol.org) for visualisation/analysis.

* [**HADDOCK MS cross-links tutorial**](/education/HADDOCK/HADDOCK-Xlinks):
  A tutorial demonstrating the use of cross-linking data from mass spectrometry to guide the docking in HADDOCK.
  This tutorial builds on our [DisVis tutorial](/education/Others/disvis-webserver/) and illustrates various scenarios of using
  cross-linking data in HADDOCK.
  This tutorial does not require any Linux expertise and only makes use of our web server and [PyMol](http://www.pymol.org) for visualisation/analysis.

* [**DISVIS/HADDOCK oligomer puzzle**](/education/HADDOCK/XL-MS-oligomer):
  In this tutorial you will have to solve an oligomer puzzle, namely predicting the correct oligomeric state
  of a symmetrical homomer complex based on a few (artificial) cross-links.
  The tutorial does not require any Linux expertise and only makes use of the DISVIS and HADDOCK web servers and [PyMol](http://www.pymol.org) for visualisation/analysis.

* [**HADDOCK CA-CA restraints guided docking tutorial**](/education/HADDOCK/HADDOCK-CACA-guided):
  A tutorial demonstrating a template-based approach to model protein-protein complexes. It combines the PS-HomPPI web server to find suitable templates and generate CA-CA distance restraints and HADDOCK for the CA-CA guided modelling.
  This tutorial does not require any Linux expertise and only makes use of the PS-HomPPI and HADDOCK web servers and [PyMol](http://www.pymol.org) for visualisation/analysis.

* [**HADDOCK ab-initio, multi-body symmetrical docking tutorial**](/education/HADDOCK/HADDOCK-CASP-CAPRI-T70):
  A tutorial demonstrating multi-body docking with HADDOCK using its ab-initio mode with symmetry restraints.
  It is based on a former CASP-CAPRI target (T70).

* [**HADDOCK ligand binding site tutorial**](/education/HADDOCK/HADDOCK-binding-sites):
  A tutorial demonstrating the use of HADDOCK in ab-initio mode to screen for potential ligand binding sites.
  The information from the ab-initio run is then used to setup a binding pocket-targetet protein-ligand docking run.
  We use as example the multidrug exporter AcrB.


text:
<!DOCTYPE html>
<html>
<head>
<script>
function validateForm() {
  var x = document.forms["myForm"]["fname"].value;
  if (x == "") {
    alert("Name must be filled out");
    return false;
  }
}
</script>
</head>
<body>

<form name="musicForm" action="/addMusic" onsubmit="return validateForm()" method="post">
  Name: <input type="text" name="name" required>
  <input type="submit" value="Submit">
</form>

</body>
</html>


text:
namespace detail {
    enum class polarity {
        VTRUE,
        VFALSE,
        VUNDEF,
    };

    inline bool sign(int lit) {
        return lit & 1;
    }

    inline int var(int lit) {
        return lit >> 1;
    }

    inline int neg(int lit) {
        return lit ^ 1;
    }

    inline int lit(int var, bool sign) {
        return var + var + (sign ? 1 : 0);
    }

    inline polarity polarity_lit(const assignment & a, int lit) {
        auto var_polarity = a[var(lit)].pol;
        if (var_polarity == polarity::VUNDEF)
            return polarity::VUNDEF;
        else if (sign(lit))
            return var_polarity;
        else
            return var_polarity == polarity::VTRUE ? polarity::VFALSE : polarity::VTRUE;
    }
}

#endif


text:
@implementation NSDate (MDExtension)

- (NSInteger)mdYear {
  NSCalendar *calendar = [NSCalendarHelper mdSharedCalendar];
  NSDateComponents *component =
      [calendar components:NSCalendarUnitYear fromDate:self];
  return component.year;
}

- (NSInteger)mdMonth {
  NSCalendar *calendar = [NSCalendarHelper mdSharedCalendar];
  NSDateComponents *component =
      [calendar components:NSCalendarUnitMonth fromDate:self];
  return component.month;
}

- (NSInteger)mdDay {
  NSCalendar *calendar = [NSCalendarHelper mdSharedCalendar];
  NSDateComponents *component =
      [calendar components:NSCalendarUnitDay fromDate:self];
  return component.day;
}

- (NSInteger)mdWeekday {
  NSCalendar *calendar = [NSCalendarHelper mdSharedCalendar];
  NSDateComponents *component =
      [calendar components:NSCalendarUnitWeekday fromDate:self];
  return component.weekday;
}

- (NSInteger)mdHour {
  NSCalendar *calendar = [NSCalendarHelper mdSharedCalendar];
  NSDateComponents *component =
      [calendar components:NSCalendarUnitHour fromDate:self];
  return component.hour;
}

- (NSInteger)mdMinute {
  NSCalendar *calendar = [NSCalendarHelper mdSharedCalendar];
  NSDateComponents *component =
      [calendar components:NSCalendarUnitMinute fromDate:self];
  return component.minute;
}

- (NSInteger)mdSecond {
  NSCalendar *calendar = [NSCalendarHelper mdSharedCalendar];
  NSDateComponents *component =
      [calendar components:NSCalendarUnitSecond fromDate:self];
  return component.second;
}

- (NSInteger)mdNumberOfDaysInMonth {
  NSCalendar *c = [NSCalendarHelper mdSharedCalendar];
  NSRange days =
      [c rangeOfUnit:NSCalendarUnitDay inUnit:NSCalendarUnitMonth forDate:self];
  return days.length;
}

- (NSString *)mdStringWithFormat:(NSString *)format {
  NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
  formatter.dateFormat = format;
  return [formatter stringFromDate:self];
}

- (NSDate *)mdDateByAddingMonths:(NSInteger)months {
  NSCalendar *calendar = [NSCalendarHelper mdSharedCalendar];
  NSDateComponents *components = [[NSDateComponents alloc] init];
  [components setMonth:months];

  return [calendar dateByAddingComponents:components toDate:self options:0];
}

- (NSDate *)mdDateBySubtractingMonths:(NSInteger)months {
  return [self mdDateByAddingMonths:-months];
}

- (NSDate *)mdDateByAddingDays:(NSInteger)days {
  NSCalendar *calendar = [NSCalendarHelper mdSharedCalendar];
  NSDateComponents *components = [[NSDateComponents alloc] init];
  [components setDay:days];
  return [calendar dateByAddingComponents:components toDate:self options:0];
}

- (NSDate *)mdDateBySubtractingDays:(NSInteger)days {
  return [self mdDateByAddingDays:-days];
}

- (NSInteger)mdYearsFrom:(NSDate *)date {
  NSCalendar *calendar = [NSCalendarHelper mdSharedCalendar];
  NSDateComponents *components = [calendar components:NSCalendarUnitYear
                                             fromDate:date
                                               toDate:self
                                              options:0];
  return components.year;
}

- (NSInteger)mdMonthsFrom:(NSDate *)date {
  NSCalendar *calendar = [NSCalendarHelper mdSharedCalendar];
  NSDateComponents *components = [calendar components:NSCalendarUnitMonth
                                             fromDate:date
                                               toDate:self
                                              options:0];
  return components.month;
}

- (NSInteger)mdDaysFrom:(NSDate *)date {
  NSCalendar *calendar = [NSCalendarHelper mdSharedCalendar];
  NSDateComponents *components = [calendar components:NSCalendarUnitDay
                                             fromDate:date
                                               toDate:self
                                              options:0];
  return components.day;
}

- (BOOL)mdIsEqualToDateForMonth:(NSDate *)date {
  return self.mdYear == date.mdYear && self.mdMonth == date.mdMonth;
}

- (BOOL)mdIsEqualToDateForDay:(NSDate *)date {
  return self.mdYear == date.mdYear && self.mdMonth == date.mdMonth &&
         self.mdDay == date.mdDay;
}

@end


text:
package ca.carleton.gcrc.couch.onUpload.conversion;

import org.json.JSONObject;
import ca.carleton.gcrc.couch.onUpload.UploadConstants;
import ca.carleton.gcrc.json.JSONSupport;

public class WorkDescriptor extends AbstractDescriptor {

	private AttachmentDescriptor attDescription;

	public WorkDescriptor(AttachmentDescriptor attDescription){
		this.attDescription = attDescription;
	}

	public boolean isKeyAvailable(String key) throws Exception {
		JSONObject descriptionObj = getJson();
		return JSONSupport.containsKey(descriptionObj, key);
	}

	public String getStringAttribute(String key) throws Exception {
		String value = null;

		JSONObject descriptionObj = getJson();
		if( JSONSupport.containsKey(descriptionObj, key) ) {
			value = descriptionObj.getString(key);
		}

		return value;
	}

	public void setStringAttribute(String key, String value) throws Exception {
		JSONObject descriptionObj = getJson();
		descriptionObj.put(key,value);
	}

	public void removeAttribute(String key) throws Exception {
		JSONObject descriptionObj = getJson();
		if( JSONSupport.containsKey(descriptionObj, key) ) {
			descriptionObj.remove(key);
		}
	}

	@Override
	protected JSONObject getJson() throws Exception {
		JSONObject attachmentDescription = attDescription.getJson();

		return attachmentDescription.getJSONObject(UploadConstants.WORK_KEY);
	}
}


text:
"use strict";
var fs = require('fs')
    , stream
    , debug = require('../debug')('BaseRollingFileStream')
    , util = require('util')
    , semver = require('semver');

if (semver.satisfies(process.version, '>=0.10.0')) {
    stream = require('stream');
} else {
    stream = require('readable-stream');
}

module.exports = BaseRollingFileStream;

function BaseRollingFileStream(filename, options) {
    debug("In BaseRollingFileStream");
    this.filename = filename;
    this.options = options || {};
    this.options.encoding = this.options.encoding || 'utf8';
    this.options.mode = this.options.mode || parseInt('0644', 8);
    this.options.flags = this.options.flags || 'a';

    this.currentSize = 0;

    function currentFileSize(file) {
        var fileSize = 0;
        try {
            fileSize = fs.statSync(file).size;
        } catch (e) {
            // file does not exist
        }
        return fileSize;
    }

    function throwErrorIfArgumentsAreNotValid() {
        if (!filename) {
            throw new Error("You must specify a filename");
        }
    }

    throwErrorIfArgumentsAreNotValid();
    debug("Calling BaseRollingFileStream.super");
    BaseRollingFileStream.super_.call(this);
    this.openTheStream();
    this.currentSize = currentFileSize(this.filename);
}
util.inherits(BaseRollingFileStream, stream.Writable);

BaseRollingFileStream.prototype._write = function (chunk, encoding, callback) {
    var that = this;

    function writeTheChunk() {
        debug("writing the chunk to the underlying stream");
        that.currentSize += chunk.length;
        try {
            that.theStream.write(chunk, encoding, callback);
        }
        catch (err) {
            debug(err);
            callback();
        }
    }

    debug("in _write");

    if (this.shouldRoll()) {
        this.currentSize = 0;
        this.roll(this.filename, writeTheChunk);
    } else {
        writeTheChunk();
    }
};

BaseRollingFileStream.prototype.openTheStream = function (cb) {
    debug("opening the underlying stream");
    this.theStream = fs.createWriteStream(this.filename, this.options);
    if (cb) {
        this.theStream.on("open", cb);
    }
};

BaseRollingFileStream.prototype.closeTheStream = function (cb) {
    debug("closing the underlying stream");
    this.theStream.end(cb);
};

BaseRollingFileStream.prototype.shouldRoll = function () {
    return false; // default behaviour is never to roll
};

BaseRollingFileStream.prototype.roll = function (filename, callback) {
    callback(); // default behaviour is not to do anything
};