text:
  <link rel="stylesheet" href="maven-theme.css">
  <title>AppSecInc. MSI Extensions</title>

Main Page

Related Pages

Namespaces

Classes

Files

Namespace List

Namespace Members

AppSecInc

Service

Classes

AppSecInc::Service Namespace Reference

Classes

struct  	ServiceConfig

 	service configuration  More...

class  	ServiceCreateInfo

 	service creation information  More...

class  	ServiceImpl

 	service implementation  More...

class  	ServiceInstance

 	a service instance  More...

class  	ServiceManager

 	Service manager.  More...

struct  	ServiceStatusProcess

 	service status information  More...

     © Application Security Inc. - All Rights Reserved

     http://msiext.codeplex.com

  <link href="tabs.css" rel="stylesheet" type="text/css">


text:
    *

    <input class="form-control"
           placeholder="{{content.hint}}"
           type="{{content.extras.type}}"
           ng-class="{'input-sm': content.size==='sm', 'input-lg':content.size==='lg'}"/>

redpajama_set_name: RedPajamaGithub


text:
/*
 * StringParameterDefinition.h
 *
 *
 */

#ifndef TINY_CPP_CLIENT_StringParameterDefinition_H_
#define TINY_CPP_CLIENT_StringParameterDefinition_H_

#include <string>
#include "bourne/json.hpp"
#include "Helpers.h"
#include "StringParameterValue.h"

namespace Tiny {

/*! \brief
 *
 *  \ingroup Models
 *
 */

class StringParameterDefinition{
public:

    /*! \brief Constructor.
	 */
    StringParameterDefinition();
    StringParameterDefinition(std::string jsonString);

    /*! \brief Destructor.
	 */
    virtual ~StringParameterDefinition();

    /*! \brief Retrieve a bourne JSON representation of this class.
	 */
    bourne::json toJson();

    /*! \brief Fills in members of this class from bourne JSON object representing it.
	 */
    void fromJson(std::string jsonObj);

	/*! \brief Get
	 */
	std::string getClass();

	/*! \brief Set
	 */
	void setClass(std::string  _class);
	/*! \brief Get
	 */
	StringParameterValue getDefaultParameterValue();

	/*! \brief Set
	 */
	void setDefaultParameterValue(StringParameterValue  defaultParameterValue);
	/*! \brief Get
	 */
	std::string getDescription();

	/*! \brief Set
	 */
	void setDescription(std::string  description);
	/*! \brief Get
	 */
	std::string getName();

	/*! \brief Set
	 */
	void setName(std::string  name);
	/*! \brief Get
	 */
	std::string getType();

	/*! \brief Set
	 */
	void setType(std::string  type);

    private:
    std::string _class{};
    StringParameterValue defaultParameterValue;
    std::string description{};
    std::string name{};
    std::string type{};
};
}

#endif /* TINY_CPP_CLIENT_StringParameterDefinition_H_ */


text:
#!/bin/bash
set -euxo pipefail

export BLAST_SRC_DIR="${SRC_DIR}/blast"
cd $BLAST_SRC_DIR/c++/

export CFLAGS="$CFLAGS -O2"
export CXXFLAGS="$CXXFLAGS -O2"
export CPPFLAGS="$CPPFLAGS -I$PREFIX/include"
export LDFLAGS="$LDFLAGS -L$PREFIX/lib"
export CC_FOR_BUILD=$CC

if test x"`uname`" = x"Linux"; then
    # only add things needed; not supported by OSX ld
    LDFLAGS="$LDFLAGS -Wl,-as-needed"
fi

if [ `uname` == Darwin ]; then
    export LDFLAGS="${LDFLAGS} -Wl,-rpath,$PREFIX/lib -lz -lbz2 -lomp"
else
    export CPP_FOR_BUILD=$CPP
fi

LIB_INSTALL_DIR=$PREFIX/lib/ncbi-blast+

# Get optional RpsbProc
# The rpsbproc command line utility is an addition to the standalone version of
# Reverse Position-Specific BLAST (RPS-BLAST), also known as CD-Search (Conserved
# Domain Search).
mkdir -p src/app/RpsbProc
cp -rf "${SRC_DIR}/RpsbProc/src/"* src/app/RpsbProc/

# with/without options:
#
# dll: enable dynamic linking
# mt: enable multi-threading
# -autodep: no automatic dependency build (one time build)
# -makefile-auto-update: no rebuild of makefile (one time build)
# flat-makefile: use single makefile
# -caution: disable configure script warnings
# -dbapi: don't build database connectivity libs <= configure: WARNING: --with(out)-dbapi is deprecated
# -lzo: don't add lzo support
# runpath: set runpath for installed $PREFIX location
# hard-runpath: disable new dtags (disallow LD_LIBRARY_PATH override on Linux)
# -debug: disable debug
# strip: remove debugging symbols (size!)
# -vdb: disable VDB/SRA toolkit
# z: set zlib
# bz2: set libbz2
# -openssl: disable openssl
# -gcrypt: disable gcrypt (needed on OSX)
# -krb5: disable kerberos (needed on OSX)

# Fixes building on unix (linux and osx)
export AR="${AR} rcs"

./configure \
    --with-dll \
    --with-mt \
    --with-openmp \
    --without-autodep \
    --without-makefile-auto-update \
    --with-flat-makefile \
    --without-caution \
    --without-lzo \
    --with-hard-runpath \
    --with-runpath=$LIB_INSTALL_DIR \
    --without-debug \
    --with-strip \
    --without-vdb \
    --with-z=$PREFIX \
    --with-bz2=$PREFIX \
    --without-krb5 \
    --without-openssl \
    --without-gnutls \
    --without-sse42 \
    --without-gcrypt

#list apps to build
apps="blastp.exe blastn.exe blastx.exe tblastn.exe tblastx.exe psiblast.exe"
apps="$apps rpsblast.exe rpstblastn.exe makembindex.exe segmasker.exe"
apps="$apps dustmasker.exe windowmasker.exe deltablast.exe makeblastdb.exe"
apps="$apps blastdbcmd.exe blastdb_aliastool.exe convert2blastmask.exe"
apps="$apps blastdbcheck.exe makeprofiledb.exe blast_formatter.exe rpsbproc.exe"
cd ReleaseMT

# The "datatool" binary needs the libs at build time, create
# link from final install path to lib build dir:
ln -s $BLAST_SRC_DIR/c++/ReleaseMT/lib $LIB_INSTALL_DIR

cd build
make -j${CPU_COUNT} -f Makefile.flat $apps

# remove temporary link
rm $LIB_INSTALL_DIR

mkdir -p $PREFIX/bin $LIB_INSTALL_DIR
cp $BLAST_SRC_DIR/c++/ReleaseMT/bin/* $PREFIX/bin/
cp $BLAST_SRC_DIR/c++/ReleaseMT/lib/* $LIB_INSTALL_DIR

chmod +x $PREFIX/bin/*
sed -i.bak '1 s|^.*$|#!/usr/bin/env perl|g' $PREFIX/bin/update_blastdb.pl
# Patches to enable this script to work better in bioconda
sed -i.bak 's/mktemp.*/mktemp`/; s/exit 1/exit 0/; s/^export PATH=\/bin:\/usr\/bin:/\#export PATH=\/bin:\/usr\/bin:/g' $PREFIX/bin/get_species_taxids.sh


text:
import {
    ChangeDetectionStrategy,
    ChangeDetectorRef,
    Component,
    ElementRef,
    Input,
    OnDestroy, OnInit,
    ViewChild
} from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { Select, Store } from '@ngxs/store';
import { PipelineStatus } from 'app/model/pipeline.model';
import { Project } from 'app/model/project.model';
import { Workflow } from 'app/model/workflow.model';
import { WorkflowRun, WorkflowRunSummary, WorkflowRunTags } from 'app/model/workflow.run.model';
import { WorkflowRunService } from 'app/service/workflow/run/workflow.run.service';
import { AutoUnsubscribe } from 'app/shared/decorator/autoUnsubscribe';
import { DurationService } from 'app/shared/duration/duration.service';
import { ToastService } from 'app/shared/toast/ToastService';
import { ProjectState } from 'app/store/project.state';
import { CleanWorkflowRun, ClearListRuns, SetWorkflowRuns } from 'app/store/workflow.action';
import { WorkflowState } from 'app/store/workflow.state';
import { Observable, Subscription } from 'rxjs';
import { finalize, first } from 'rxjs/operators';

const limitWorkflowRun = 30;

@Component({
    selector: 'app-workflow-sidebar-run-list',
    templateUrl: './workflow.sidebar.run.component.html',
    styleUrls: ['./workflow.sidebar.run.component.scss'],
    changeDetection: ChangeDetectionStrategy.OnPush
})
@AutoUnsubscribe()
export class WorkflowSidebarRunListComponent implements OnDestroy {
    @ViewChild('tagsList') tagsList: ElementRef;

    _workflow: Workflow;
    @Input()
    set workflow(data: Workflow) {
        if (data) {
            if (!this._workflow || this._workflow.id !== data.id) {
                this.filteredTags = {};
                this._workflow = data;
                this.deleteInterval();
                this.initSelectableTags();
                this.offset = 0;
                this._store.dispatch(new ClearListRuns()).subscribe(() => {
                    this.getRuns();
                });
            }
            this._workflow = data;
        }
    }
    get workflow() {
        return this._workflow;
    }

    @Select(WorkflowState.getSelectedWorkflowRun()) wrun$: Observable<WorkflowRun>
    wrunSub: Subscription;
    @Select(WorkflowState.getListRuns()) listRuns$: Observable<Array<WorkflowRunSummary>>;
    listRunSubs: Subscription;
    @Select(WorkflowState.getRunSidebarFilters()) filters$: Observable<{}>;
    filtersSubs: Subscription;

    project: Project;
    workflowRuns = new Array<WorkflowRunSummary>();

    // search part
    selectedTags: Array<string>;
    tagsSelectable: Array<string>;
    tagToDisplay: Array<string>;
    pipelineStatusEnum = PipelineStatus;
    ready = false;
    filteredTags: { [key: number]: WorkflowRunTags[] } = {};
    durationMap: { [key: number]: string } = {};

    durationIntervalID: number;
    currentWorkflowRunNumber: number;
    offset = 0;

    constructor(
        private _workflowRunService: WorkflowRunService,
        private _router: Router,
        private _toast: ToastService,
        private _store: Store,
        private _cd: ChangeDetectorRef
    ) {
        this.project = this._store.selectSnapshot(ProjectState.projectSnapshot);

        this.wrunSub = this.wrun$.subscribe(wr => {
            if (!wr && !this.currentWorkflowRunNumber) {
                return;
            }
            if (wr?.num === this.currentWorkflowRunNumber) {
                return;
            }
            this.currentWorkflowRunNumber = wr?.num;
            this._cd.markForCheck();
        });

        this.listRunSubs = this.listRuns$.subscribe(runs => {
            if (runs.length === 0 && this.workflowRuns.length === 0) {
                return;
            }
            this.workflowRuns = runs;
            if (this.workflowRuns && this.workflow && this.workflowRuns.length > 0) {
                this.refreshRun();
            }
            this._cd.markForCheck();
        });
        this.filtersSubs = this.filters$.subscribe(fs => {
            this.selectedTags = new Array<string>();
            for (const key in fs) {
                if (fs.hasOwnProperty(key)) {
                    this.selectedTags.push(key + ':' + fs[key]);
                }
            }
            this._cd.markForCheck();
            return;
        });
    }

    getRuns(filter?: any): void {
        this._workflowRunService.runs(this.project.key, this.workflow.name, limitWorkflowRun.toString(), this.offset.toString(), filter)
            .pipe(finalize(() => {
                this.ready = true;
                this._cd.markForCheck();
            }))
            .subscribe((runs) => {
                this._store.dispatch(new SetWorkflowRuns(
                    { projectKey: this.project.key, workflowName: this.workflow.name, runs, filters: filter }));
            });
    }

    scroll() {
        if (!Array.isArray(this.selectedTags) || !this.selectedTags.length) {
            this.offset = this.workflowRuns.length;
            this.getRuns();
        }
    }

    initSelectableTags(): void {
        this.tagToDisplay = new Array<string>();
        if (this.workflow.metadata && this.workflow.metadata['default_tags']) {
            this.tagToDisplay = this.workflow.metadata['default_tags'].split(',');
        }
        this._workflowRunService.getTags(this.project.key, this.workflow.name)
            .pipe(first(), finalize(() => this._cd.markForCheck()))
            .subscribe(tags => {
                this.tagsSelectable = new Array<string>();
                Object.keys(tags).forEach(k => {
                    if (tags.hasOwnProperty(k)) {
                        tags[k].forEach(v => {
                            if (v !== '') {
                                let newEntry = k + ':' + v;
                                if (this.tagsSelectable.indexOf(newEntry) === -1) {
                                    this.tagsSelectable.push(newEntry);
                                }
                            }
                        });
                    }
                });
            });
        if (!this.durationIntervalID && this.workflowRuns && this.workflow && this.workflowRuns.length > 0) {
            this.refreshRun();
        }
        this._cd.detectChanges();
    }

    getFilteredTags(tags: WorkflowRunTags[]): WorkflowRunTags[] {
        if (!Array.isArray(tags) || !this.tagToDisplay) {
            return [];
        }
        return tags
            .filter((tg) => this.tagToDisplay.indexOf(tg.tag) !== -1)
            .sort((tga, tgb) => this.tagToDisplay.indexOf(tga.tag) - this.tagToDisplay.indexOf(tgb.tag));
    }

    getDuration(status: string, start: string, done: string): string {
        if (status === PipelineStatus.BUILDING || status === PipelineStatus.WAITING) {
            return DurationService.duration(new Date(start), new Date());
        }
        if (!done) {
            done = new Date().toString();
        }
        return DurationService.duration(new Date(start), new Date(done));
    }

    filterRuns(): void {
        this.offset = 0;
        let filters;

        if (Array.isArray(this.selectedTags) && this.selectedTags.length) {
            filters = this.selectedTags.reduce((prev, cur) => {
                let splitted = cur.split(':');
                if (splitted.length === 2) {
                    prev[splitted[0]] = splitted[1];
                }

                return prev;
            }, {});
        }
        this.offset = 0;
        this.getRuns(filters);
    }

    refreshRun(): void {
        if (this.durationIntervalID) {
            this.deleteInterval();
        }
        this.refreshDuration();
        this.durationIntervalID = window.setInterval(() => {
            this.refreshDuration();
            this._cd.markForCheck();
        }, 5000);
    }

    refreshDuration(): void {
        let stillWorking = false;
        if (this.workflow && this.workflow.metadata && this.workflow.metadata['default_tags']) {
            this.tagToDisplay = this.workflow.metadata['default_tags'].split(',');
        }
        this.workflowRuns.forEach((r) => {
            if (PipelineStatus.isActive(r.status)) {
                stillWorking = true;
            }
            this.filteredTags[r.id] = this.getFilteredTags(r.tags);
            this.durationMap[r.id] = this.getDuration(r.status, r.start, r.last_execution);
        });
        if (!stillWorking) {
            this.deleteInterval();
        }
    }

    changeRun(num: number) {
        if (this.currentWorkflowRunNumber === num) {
            return;
        }
        this._store.dispatch(new CleanWorkflowRun({}));
        this._router.navigate(['/project', this.project.key, 'workflow', this.workflow.name, 'run', num]);
    }

    ngOnDestroy(): void {
        this.deleteInterval();
    }

    deleteInterval(): void {
        if (this.durationIntervalID) {
            clearInterval(this.durationIntervalID);
            this.durationIntervalID = 0;
        }
    }

    confirmCopy() {
        this._toast.success('', 'Workflow run version copied!');
    }
}


text:
namespace {

struct Physics_Settings {
	u32  frequency = 50;
	vec2 gravity   = {0, -9.81f};
};

}

static Physics_Settings settings;

static void ecs_update_physics_iteration(r32 dt);

//
//
//

namespace sandbox {

static custom::Asset_RefT<custom::Config_Asset> config_ref = {custom::empty_ref, custom::empty_index};
void ecs_init_physics_clean(void) {
	u32 config_id = custom::Asset::get_id("assets/configs/client.cfg", custom::empty_index);
	config_ref = custom::Asset::add<custom::Config_Asset>(config_id);
}

static void consume_config(void) {
	u32 version = custom::empty_index;

	custom::Config_Asset const * config = config_ref.ref.get_safe();
	CUSTOM_ASSERT(config, "no config");

	if (version == config->version) { return; }
	version = config->version;

	settings.frequency = config->get_value<u32>("physics_frequency", 50);
	settings.gravity   = {
		config->get_value<r32>("physics_gravity_x", 0),
		config->get_value<r32>("physics_gravity_y", -9.81f),
	};
}

void ecs_update_physics_clean(r32 dt) {
	consume_config();

	CUSTOM_ASSERT(settings.frequency, "zero frequency");
	r32 period = 1.0f / settings.frequency;

	//
	static r32 elapsed = 0; elapsed += dt;
	while (elapsed >= period) {
		elapsed -= period;
		ecs_update_physics_iteration(period);
	}
}

}

//
//
//

static void ecs_update_physics_iteration(r32 dt) {

}


text:
function PlayerP5(options) {

    var defaults = {
        parent: document.body,
        channels: 3,
        min_frequency: 100,
        max_frequency: 8000,
        width: 400,
        height: 400,
        visualize_wave: true,
        visualize_bars: true,
        visualization_fps: 20,
        visualization_smoothing: 0.3,
        visualization_resolution: 64, // Must be a power of two between 16 and 1024.
        visualization_stroke_color: '#333333',
        visualization_fill_color: '#990000',
        filesRepository: null
    }

    var options = (function() {
        var res = {}
        for(var k in defaults) {
            res[k] = k in options ? options[k] : defaults[k]
        }
        return res
    })()

    // play waveforms or noise
    function SignalChannel() {

        function createGenerator(type, frequency, amplitude) {
            var generator;
            if(type == 'noise') {
                generator = new p5.Noise('white');
                generator.freq = function() {}
            } else {
                generator = new p5.Oscillator();
                generator.setType(type);
            }
            return generator;
        }

        function realFrequency(frequency, rate) {
            return Math.min(24000, frequency * rate);
        }

        this.init = function(type, frequency, amplitude) {
            if(amplitude < 0 || amplitude > 1) {
                throw new Error('Amplitude is out of range [0..1]');
            }
            if(frequency < options.min_frequency || frequency > options.max_frequency) {
                throw new Error('Frequency is out of range [' + options.min_frequency + '..' + options.max_frequency + ']');
            }
            if(type !== this.type) {
                this.reset();
                this.generator = createGenerator(type);
                this.type = type;
            }
            if(amplitude !== this.amplitude) {
                this.generator.amp(amplitude);
                this.amplitude = amplitude;
            }
            this.frequency = frequency;
        }

        this.setRate = function(rate) {
            if(this.generator && rate > 0) {
                this.generator.freq(realFrequency(this.frequency, rate));
            }
        }

        this.play = function() {
            if(this.playing || !this.generator) return;
            this.generator.start();
            this.playing = true;
        }

        this.pause = function() {
            this.generator && this.generator.stop();
            this.playing = false;
        }

        this.reset = function() {
            this.playing = false;
            this.generator && this.generator.stop();
            this.generator = null;
            this.type = null;
            this.frequency = null;
            this.amplitude = null;
        }

        this.reset();
    }

    // play file
    function FileChannel() {

        this.init = function(url, frequency, onLoadEnd, onLoadError, onLoadProgress) {
            if(frequency < options.min_frequency || frequency > options.max_frequency) {
                throw new Error('Frequency is out of range [' + options.min_frequency + '..' + options.max_frequency + ']');
            }

            if(url !== this.url) {
                var file_path = parseInt(url, 10) == url && options.filesRepository ? options.filesRepository(url - 1) : url;
                if(!file_path) {
                    throw new Error('Wrong file param');
                }
                this.reset();

                this.url = url;
                this.file = new p5.SoundFile(
                    file_path,
                    onLoadEnd,
                    onLoadError,
                    onLoadProgress
                );
                this.file.disconnect();
                this.filter = new p5.LowPass()
                this.filter.freq(frequency);
                this.frequency = frequency;
                this.file.connect(this.filter);
                this.file.playMode('restart');
            } else {
                if(frequency !== this.frequency) {
                    this.filter.freq(frequency);
                    this.frequency = frequency;
                }
                onLoadEnd();
            }
        }

        this.play = function() {
            if(this.playing || !this.file) return;
            this.playing = true;
            this.file.play();
        }

        this.setRate = function(rate) {
            if(!this.file || !rate) return;
            this.file.rate(rate);
        }

        this.pause = function() {
            this.playing = false;
            this.file && this.file.pause();
        }

        this.reset = function() {
            this.file && this.file.stop();
            this.playing = false;
            this.url = null;
            this.frequency = null;
            this.file = null;
            this.filter = null;
        }

        this.reset();
    }

    function Visualizator() {

        var canvas = document.createElement('canvas');
        canvas.width = options.width;
        canvas.height = options.height;
        options.parent.appendChild(canvas);

        var context = canvas.getContext('2d');
        context.strokeStyle = options.visualization_stroke_color;

        var fft = new p5.FFT(options.visualization_smoothing, options.visualization_resolution);

        var microphone = null;
        var microphone_enabled = false;
        var playback_render = false;

        function getFFT() {
            return !playback_render && microphone_fft ? microphone_fft : fft;
        }

        // waveform
        function renderWave(y, height) {
            var waveform = fft.waveform();
            var dx = Math.round(options.width / waveform.length);
            var wave_amp = height * 0.5;
            var wave_y = y + wave_amp;

            function dy(i) {
                return wave_y + wave_amp * waveform[i];
            }
            context.beginPath();
            context.moveTo(0, dy(0))
            for(var i=1; i<waveform.length; i++) {
                context.lineTo(i*dx, dy(i))
            }
            context.stroke();
        }

        // spectrum bars
        function getSpectrum() {
            var spectrum = fft.analyze();
            for(var i=0; i<spectrum.length; i++) {
                spectrum[i] = spectrum[i]/255;
            }
            return spectrum;
        }

        function renderBars(y, height) {
            var spectrum = getSpectrum();
            context.fillStyle = options.visualization_fill_color;
            context.lineWidth = 1;
            var bar_width = Math.round(options.width / spectrum.length);
            var bar_height, bar_x, bar_y;
            for(var i=0; i<spectrum.length; i++) {
                bar_height = height * spectrum[i];
                bar_x = i * bar_width;
                bar_y = y + height - bar_height;
                context.fillRect(bar_x, bar_y, bar_width, bar_height);
                context.strokeRect(bar_x, bar_y, bar_width, bar_height);
            }
        }

        var rendering = false;
        var div_y = Math.round(options.height * 0.5);
        var wave_height = options.visualize_bars ? div_y  : options.height;
        var bars_y = (options.visualize_wave ? div_y : 0) + 1;  // +1 to hide border
        var bars_height = options.visualize_wave ? options.height - bars_y  : options.height;

        function render() {
            if(rendering) return;
            if(playback_render || microphone) {
                rendering = true;
                context.clearRect(0, 0, options.width, options.height);
                options.visualize_wave && renderWave(0, wave_height);
                options.visualize_bars && renderBars(bars_y, bars_height);
                rendering = false;
            }
        }

        var interval = setInterval(
            render,
            options.visualization_fps ? 1000/options.visualization_fps : 100
        );

        this.start = function() {
            playback_render = true;
            fft.setInput();
        }

        this.stop = function() {
            playback_render = false;
            this.refreshMicrophoneInput();
        }

        this.refreshMicrophoneInput = function() {
            if(microphone_enabled) {
                if(!microphone) {
                    microphone = new p5.AudioIn()
                    microphone.start();
                }
                fft.setInput(microphone);
            } else {
                microphone = null;
                fft.setInput();
            }
        }

        this.toggleMicrophone = function(enabled) {
            microphone_enabled = enabled;
            this.refreshMicrophoneInput();
        }

        this.destroy = function() {
            clearInterval(interval);
            this.toggleMicrophone(false);
            options.parent.removeChild(canvas)
            context = null
            canvas = null
            fft = null;
        }
    }

    // init channels
    var channels = [];
    for(var i=0; i<options.channels; i++) {
        channels[i] = new SignalChannel();
    }
    // and last channel for file
    channels[i] = new FileChannel();
    // init visualization
    var visualizator = new Visualizator();

    // interface
    this.initSignal = function(channel, type, frequency, amplitude) {
        channel = channel - 1;
        if(channel < 0 || channel > options.channels) {
            throw new Error('Channel is out of range [1..' + options.channels + ']');
        }
        channels[channel].init(type, frequency, amplitude);
    }

    this.initRecord = function(url, frequency, onLoadProgress, onLoadEnd) {
        channels[channels.length - 1].init(url, frequency, onLoadProgress, onLoadEnd);
    }

    this.setRate = function(rate) {
        for(var i=0, channel; channel=channels[i]; i++) {
            channel.setRate(rate);
        }
    }

    this.play = function() {
        visualizator.start();
        for(var i=0, channel; channel=channels[i]; i++) {
            channel.play();
        }
    }

    this.pause = function() {
        visualizator.stop();
        for(var i=0, channel; channel=channels[i]; i++) {
            channel.pause();
        }
    }

    this.toggleMicrophone = function(enabled) {
        visualizator.toggleMicrophone(enabled);
    }

    this.resetChannels = function() {
        for(var i=0, channel; channel=channels[i]; i++) {
            channel.reset();
        }
    }

    this.destroy = function() {
        this.resetChannels();
        channels = null;
        visualizator.destroy();
        visualizator = null;
    }

}


text:
<?php
namespace Kr\OAuthClientBundle\Model;

class Client implements ClientInterface
{
    /** @var string */
    protected $clientId;

    /** @var string */
    protected $clientSecret;

    /** @var array */
    protected $allowedGrantTypes;

    /** @var string */
    protected $redirectUri;

    /** @var string */
    protected $resourceUrl;

    /** @var string */
    protected $tokenUrl;

    /** @var string */
    protected $authUrl;

    /**
     * @return string
     */
    public function getClientId()
    {
        return $this->clientId;
    }

    /**
     * @param string $clientId
     */
    public function setClientId($clientId)
    {
        $this->clientId = $clientId;
    }

    /**
     * @return string
     */
    public function getClientSecret()
    {
        return $this->clientSecret;
    }

    /**
     * @param string $clientSecret
     */
    public function setClientSecret($clientSecret)
    {
        $this->clientSecret = $clientSecret;
    }

    /**
     * @return array
     */
    public function getAllowedGrantTypes()
    {
        return $this->allowedGrantTypes;
    }

    /**
     * @inheritdoc
     */
    public function allowGrantType($grantType)
    {
        if(!in_array($grantType, $this->getAllowedGrantTypes())) {
            $this->allowedGrantTypes[] = $grantType;
        }
        return $this;
    }

    /**
     * @inheritdoc
     */
    public function disallowGrantType($grantType)
    {
        $this->allowedGrantTypes = array_diff($this->getAllowedGrantTypes(), [$grantType]);
    }

    /**
     * @param array $allowedGrantTypes
     */
    public function setAllowedGrantTypes($allowedGrantTypes)
    {
        $this->allowedGrantTypes = $allowedGrantTypes;
    }

    /**
     * @return string
     */
    public function getRedirectUri()
    {
        return $this->redirectUri;
    }

    /**
     * @param string $redirectUri
     */
    public function setRedirectUri($redirectUri)
    {
        $this->redirectUri = $redirectUri;
    }

    /**
     * @return string
     */
    public function getResourceUrl()
    {
        return $this->resourceUrl;
    }

    /**
     * @param string $resourceUrl
     */
    public function setResourceUrl($resourceUrl)
    {
        $this->resourceUrl = $resourceUrl;
    }

    /**
     * @return string
     */
    public function getTokenUrl()
    {
        return $this->tokenUrl;
    }

    /**
     * @param string $tokenUrl
     */
    public function setTokenUrl($tokenUrl)
    {
        $this->tokenUrl = $tokenUrl;
    }

    /**
     * @return string
     */
    public function getAuthUrl()
    {
        return $this->authUrl;
    }

    /**
     * @param string $authUrl
     */
    public function setAuthUrl($authUrl)
    {
        $this->authUrl = $authUrl;
    }

}


text:
package org.wso2.andes.messageStore;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.wso2.andes.kernel.AndesException;
import org.wso2.andes.kernel.DurableStoreConnection;
import org.wso2.andes.kernel.MessageStore;

import java.util.ArrayList;
import java.util.SortedMap;
import java.util.concurrent.ConcurrentSkipListMap;

public class MessageContentRemoverTask implements Runnable {

    private int waitInterval = 5000;
    private boolean running = true;
    private long timeOutPerMessage = 10000000000L; //10s
    private SortedMap<Long, Long> contentDeletionTasks;
    private MessageStore messageStore;
    private DurableStoreConnection connectionToMessageStore;
    private static Log log = LogFactory.getLog(MessageContentRemoverTask.class);

    public MessageContentRemoverTask(int waitInterval, ConcurrentSkipListMap<Long, Long> contentDeletionTasks, MessageStore messageStore, DurableStoreConnection connection) {
        this.waitInterval = waitInterval;
        this.contentDeletionTasks = contentDeletionTasks;
        this.messageStore = messageStore;
        this.connectionToMessageStore = connection;
    }

    public void start() {
        this.setRunning(true);
        Thread t = new Thread(this);
        t.setName(this.getClass().getSimpleName() + "-Thread");
        t.start();
    }

    public void run() {
        while (running) {
            try {
                while (!contentDeletionTasks.isEmpty() && connectionToMessageStore.isLive()) {
                    long currentTime = System.nanoTime();

                    //remove content for timeout messages
                    SortedMap<Long, Long> timedOutContentList = contentDeletionTasks.headMap(currentTime - timeOutPerMessage);
                    try {
                        messageStore.deleteMessageParts(new ArrayList<Long>(timedOutContentList.values()));
                        for (Long key : timedOutContentList.keySet()) {
                            contentDeletionTasks.remove(key);
                        }
                    } catch (AndesException e) {
                        log.error("Error while deleting message contents", e);
                    }
                }
                try {
                    Thread.sleep(waitInterval);
                } catch (InterruptedException e) {
                    log.error(e);
                }

            } catch (Throwable e) {
                log.error("Erring in removing message content details ", e);
            }
        }
    }

    public boolean isRunning() {
        return running;
    }

    public void setRunning(boolean running) {
        this.running = running;
    }
}


text:
"""

@author: Adam Reinhold Von Fisher - https://www.linkedin.com/in/adamrvfisher/

"""

#This is part of a kth fold optimization tool
#pandas_datareader is deprecated, use YahooGrabber

#Import modules
from DefModADXControlledStrategyOptimizer import DefModADXControlledStrategyOptimizer
import numpy as np
import pandas as pd
import random as rand
#from pandas_datareader import data

#Assign ticker / variable assignment
ticker = '^RUT'
multiplier = 400
ranger1 = range(0,multiplier)
iterations = 5000
ranger2 = range(0,iterations) #Pass ranger
#Empty data structures
empty = []
counter = 0
dataset = pd.DataFrame()

#Read in data
Aggregate = pd.read_pickle('RUTModADXAGGSHARPE065')
Aggregate = Aggregate.loc[:,~Aggregate.columns.duplicated()]
#s = data.DataReader(ticker, 'yahoo', start='04/01/2017', end='01/01/2050')
s = pd.read_pickle('RUTModADXAGGAdvice07_50') # this is just for testing with a graph

#For number of iterations
for r in ranger1:
    #Iteration trackking
    print(counter)
    counter = counter + 1
    #Get optimal params
    DSW = DefModADXControlledStrategyOptimizer(ranger2, s)
    #Add params to dataset
    dataset = pd.concat([dataset,DSW], axis = 1)
#Metric of choice
zz = dataset.iloc[7]
#Top metric
yy = max(zz)
#Find column ID of top param set
xx = dataset.columns[(dataset == yy).iloc[7]]
#Display top param set
print(dataset[xx])


text:
package main

import (
	"flag"
	"fmt"
	"net"
	"os"
	"strconv"
	"strings"
	"time"

	corev1 "k8s.io/api/core/v1"
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
	clientset "k8s.io/client-go/kubernetes"
	restclient "k8s.io/client-go/rest"
	"k8s.io/client-go/tools/clientcmd"
	clientapi "k8s.io/client-go/tools/clientcmd/api"
	"k8s.io/klog"
	utilnet "k8s.io/utils/net"
)

func buildConfigFromEnvs(masterURL, kubeconfigPath string) (*restclient.Config, error) {
	if kubeconfigPath == "" && masterURL == "" {
		kubeconfig, err := restclient.InClusterConfig()
		if err != nil {
			return nil, err
		}

		return kubeconfig, nil
	}

	return clientcmd.NewNonInteractiveDeferredLoadingClientConfig(
		&clientcmd.ClientConfigLoadingRules{ExplicitPath: kubeconfigPath},
		&clientcmd.ConfigOverrides{ClusterInfo: clientapi.Cluster{Server: masterURL}}).ClientConfig()
}

func flattenSubsets(subsets []corev1.EndpointSubset) []string {
	ips := []string{}
	for _, ss := range subsets {
		for _, addr := range ss.Addresses {
			if utilnet.IsIPv6String(addr.IP) {
				ips = append(ips, fmt.Sprintf(`"[%s]"`, addr.IP))
			} else {
				ips = append(ips, fmt.Sprintf(`"%s"`, addr.IP))
			}
		}
	}
	return ips
}

func getAdvertiseAddress() (string, error) {
	addrs, err := net.InterfaceAddrs()
	if err != nil {
		return "", err
	}

	for _, addr := range addrs {
		if ipnet, ok := addr.(*net.IPNet); ok && !ipnet.IP.IsLoopback() {
			return ipnet.IP.String(), nil
		}
	}

	return "", fmt.Errorf("no non-loopback address is available")
}

func main() {
	flag.Parse()

	klog.Info("Kubernetes Elasticsearch logging discovery")

	advertiseAddress, err := getAdvertiseAddress()
	if err != nil {
		klog.Fatalf("Failed to get valid advertise address: %v", err)
	}
	fmt.Printf("network.host: \"%s\"\n\n", advertiseAddress)

	cc, err := buildConfigFromEnvs(os.Getenv("APISERVER_HOST"), os.Getenv("KUBE_CONFIG_FILE"))
	if err != nil {
		klog.Fatalf("Failed to make client: %v", err)
	}
	client, err := clientset.NewForConfig(cc)

	if err != nil {
		klog.Fatalf("Failed to make client: %v", err)
	}
	namespace := metav1.NamespaceSystem
	envNamespace := os.Getenv("NAMESPACE")
	if envNamespace != "" {
		if _, err := client.CoreV1().Namespaces().Get(envNamespace, metav1.GetOptions{}); err != nil {
			klog.Fatalf("%s namespace doesn't exist: %v", envNamespace, err)
		}
		namespace = envNamespace
	}

	var elasticsearch *corev1.Service
	serviceName := os.Getenv("ELASTICSEARCH_SERVICE_NAME")
	if serviceName == "" {
		serviceName = "elasticsearch-logging"
	}

	// Look for endpoints associated with the Elasticsearch logging service.
	// First wait for the service to become available.
	for t := time.Now(); time.Since(t) < 5*time.Minute; time.Sleep(10 * time.Second) {
		elasticsearch, err = client.CoreV1().Services(namespace).Get(serviceName, metav1.GetOptions{})
		if err == nil {
			break
		}
	}
	// If we did not find an elasticsearch logging service then log a warning
	// and return without adding any unicast hosts.
	if elasticsearch == nil {
		klog.Warningf("Failed to find the elasticsearch-logging service: %v", err)
		return
	}

	var endpoints *corev1.Endpoints
	addrs := []string{}
	// Wait for some endpoints.
	count, _ := strconv.Atoi(os.Getenv("MINIMUM_MASTER_NODES"))
	for t := time.Now(); time.Since(t) < 5*time.Minute; time.Sleep(10 * time.Second) {
		endpoints, err = client.CoreV1().Endpoints(namespace).Get(serviceName, metav1.GetOptions{})
		if err != nil {
			continue
		}
		addrs = flattenSubsets(endpoints.Subsets)
		klog.Infof("Found %s", addrs)
		if len(addrs) > 0 && len(addrs) >= count {
			break
		}
	}
	// If there was an error finding endpoints then log a warning and quit.
	if err != nil {
		klog.Warningf("Error finding endpoints: %v", err)
		return
	}

	klog.Infof("Endpoints = %s", addrs)
	fmt.Printf("discovery.seed_hosts: [%s]\n", strings.Join(addrs, ", "))
	fmt.Printf("cluster.initial_master_nodes: [%s]\n", strings.Join(addrs, ", "))
}


text:
<!DOCTYPE html>

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">
<meta charset="utf-8">
<title>Zend Framework Extras API Documentation » ZendX_Console</title>
<meta name="author" content="Mike van Riel">
<meta name="description" content="">
<link href="../css/template.css" rel="stylesheet" media="all">
<link rel="shortcut icon" href="../img/favicon.ico">
<link rel="apple-touch-icon" href="../img/apple-touch-icon.png">
<link rel="apple-touch-icon" sizes="72x72" href="../img/apple-touch-icon-72x72.png">
<link rel="apple-touch-icon" sizes="114x114" href="../img/apple-touch-icon-114x114.png">

Zend Framework Extras API Documentation

                                    API Documentation

Packages

 Default

 ZendX

 ZendX_Application

 ZendX_Console

 ZendX_Db

 ZendX_JQuery

                                    Reports

 Errors
                38

 Markers

 Deprecated elements
                4

Back to top

                            Javascript is disabled; several features are only available
                            if Javascript is enabled.

<button class="btn details" title="Show descriptions and method names"></button><button class="btn simple" title="Show only method names"></button>

 Packages

ZendX_Console

 Classes

ZendX_Console_Exception

ZendX_Console_Process_Exception

ZendX_Console_Process_Unix

\
ZendX_Console

 Classes, interfaces, and traits

ZendX_Console_Exception¶

Exception class for ZendX_Console

« More »

ZendX_Console_Process_Exception¶

Exception class for ZendX_Console_Process

« More »

ZendX_Console_Process_Unix¶

ZendX_Console_Process_Unix allows you to spawn a class as a separated process

« More »

            Template is built using Twitter Bootstrap 2 and icons provided by Glyphicons.

            Documentation is powered by phpDocumentor 2.8.5 and

            generated on 2016-09-08T10:35:38-05:00.


text:
SceneItems

SceneRenderer

* SceneWireframeRenderer
* SceneShadedRenderer

SceneView

* SceneWireframeView
* SceneShadedView

SceneView.draw(scene, 'wireframe')

    items = scene.items()
    renderer = scene.getRenderer('wireframe')

    for item in items:
        Renderer.draw(item)


text:
package org.basex.query.func.user;

import java.util.*;

import org.basex.core.users.*;
import org.basex.query.*;
import org.basex.query.iter.*;
import org.basex.query.value.*;
import org.basex.query.value.seq.*;
import org.basex.util.list.*;

/**
 * Function implementation.
 *
 * @author BaseX Team 2005-16, BSD License
 * @author Christian Gruen
 */
public class UserList extends UserFn {
  @Override
  public Iter iter(final QueryContext qc) throws QueryException {
    return value(qc).iter();
  }

  @Override
  public Value value(final QueryContext qc) throws QueryException {
    checkAdmin(qc);
    final ArrayList<User> users = qc.context.users.users(null);
    final TokenList tl = new TokenList(users.size());
    for(final User user : users) tl.add(user.name());
    return StrSeq.get(tl);
  }
}


text:
using System;
using System.IO;
using System.Net;
using System.Net.Sockets;
using System.Text;

namespace xNet
{
    /// <summary>
    /// Представляет клиент для Socks4 прокси-сервера.
    /// </summary>
    public class Socks4ProxyClient : ProxyClient
    {
        #region Константы (защищённые)

        internal protected const int DefaultPort = 1080;

        internal protected const byte VersionNumber = 4;
        internal protected const byte CommandConnect = 0x01;
        internal protected const byte CommandBind = 0x02;
        internal protected const byte CommandReplyRequestGranted = 0x5a;
        internal protected const byte CommandReplyRequestRejectedOrFailed = 0x5b;
        internal protected const byte CommandReplyRequestRejectedCannotConnectToIdentd = 0x5c;
        internal protected const byte CommandReplyRequestRejectedDifferentIdentd = 0x5d;

        #endregion

        #region Конструкторы (открытые)

        /// <summary>
        /// Инициализирует новый экземпляр класса <see cref="Socks4ProxyClient"/>.
        /// </summary>
        public Socks4ProxyClient()
            : this(null) { }

        /// <summary>
        /// Инициализирует новый экземпляр класса <see cref="Socks4ProxyClient"/> заданным хостом прокси-сервера, и устанавливает порт равным - 1080.
        /// </summary>
        /// <param name="host">Хост прокси-сервера.</param>
        public Socks4ProxyClient(string host)
            : this(host, DefaultPort) { }

        /// <summary>
        /// Инициализирует новый экземпляр класса <see cref="Socks4ProxyClient"/> заданными данными о прокси-сервере.
        /// </summary>
        /// <param name="host">Хост прокси-сервера.</param>
        /// <param name="port">Порт прокси-сервера.</param>
        public Socks4ProxyClient(string host, int port)
            : this(host, port, string.Empty) { }

        /// <summary>
        /// Инициализирует новый экземпляр класса <see cref="Socks4ProxyClient"/> заданными данными о прокси-сервере.
        /// </summary>
        /// <param name="host">Хост прокси-сервера.</param>
        /// <param name="port">Порт прокси-сервера.</param>
        /// <param name="username">Имя пользователя для авторизации на прокси-сервере.</param>
        public Socks4ProxyClient(string host, int port, string username)
            : base(ProxyType.Socks4, host, port, username, null) { }

        #endregion

        #region Статические методы (закрытые)

        /// <summary>
        /// Преобразует строку в экземпляр класса <see cref="Socks4ProxyClient"/>.
        /// </summary>
        /// <param name="proxyAddress">Строка вида - хост:порт:имя_пользователя:пароль. Три последних параметра являются необязательными.</param>
        /// <returns>Экземпляр класса <see cref="Socks4ProxyClient"/>.</returns>
        /// <exception cref="System.ArgumentNullException">Значение параметра <paramref name="proxyAddress"/> равно <see langword="null"/>.</exception>
        /// <exception cref="System.ArgumentException">Значение параметра <paramref name="proxyAddress"/> является пустой строкой.</exception>
        /// <exception cref="System.FormatException">Формат порта является неправильным.</exception>
        public static Socks4ProxyClient Parse(string proxyAddress)
        {
            return ProxyClient.Parse(ProxyType.Socks4, proxyAddress) as Socks4ProxyClient;
        }

        /// <summary>
        /// Преобразует строку в экземпляр класса <see cref="Socks4ProxyClient"/>. Возвращает значение, указывающее, успешно ли выполнено преобразование.
        /// </summary>
        /// <param name="proxyAddress">Строка вида - хост:порт:имя_пользователя:пароль. Три последних параметра являются необязательными.</param>
        /// <param name="result">Если преобразование выполнено успешно, то содержит экземпляр класса <see cref="Socks4ProxyClient"/>, иначе <see langword="null"/>.</param>
        /// <returns>Значение <see langword="true"/>, если параметр <paramref name="proxyAddress"/> преобразован успешно, иначе <see langword="false"/>.</returns>
        public static bool TryParse(string proxyAddress, out Socks4ProxyClient result)
        {
            ProxyClient proxy;

            if (ProxyClient.TryParse(ProxyType.Socks4, proxyAddress, out proxy))
            {
                result = proxy as Socks4ProxyClient;
                return true;
            }
            else
            {
                result = null;
                return false;
            }
        }

        #endregion

        /// <summary>
        /// Создаёт соединение с сервером через прокси-сервер.
        /// </summary>
        /// <param name="destinationHost">Хост сервера, с которым нужно связаться через прокси-сервер.</param>
        /// <param name="destinationPort">Порт сервера, с которым нужно связаться через прокси-сервер.</param>
        /// <param name="tcpClient">Соединение, через которое нужно работать, или значение <see langword="null"/>.</param>
        /// <returns>Соединение с сервером через прокси-сервер.</returns>
        /// <exception cref="System.InvalidOperationException">
        /// Значение свойства <see cref="Host"/> равно <see langword="null"/> или имеет нулевую длину.
        /// -или-
        /// Значение свойства <see cref="Port"/> меньше 1 или больше 65535.
        /// -или-
        /// Значение свойства <see cref="Username"/> имеет длину более 255 символов.
        /// -или-
        /// Значение свойства <see cref="Password"/> имеет длину более 255 символов.
        /// </exception>
        /// <exception cref="System.ArgumentNullException">Значение параметра <paramref name="destinationHost"/> равно <see langword="null"/>.</exception>
        /// <exception cref="System.ArgumentException">Значение параметра <paramref name="destinationHost"/> является пустой строкой.</exception>
        /// <exception cref="System.ArgumentOutOfRangeException">Значение параметра <paramref name="destinationPort"/> меньше 1 или больше 65535.</exception>
        /// <exception cref="xNet.Net.ProxyException">Ошибка при работе с прокси-сервером.</exception>
        public override TcpClient CreateConnection(string destinationHost, int destinationPort, TcpClient tcpClient = null)
        {
            CheckState();

            #region Проверка параметров

            if (destinationHost == null)
            {
                throw new ArgumentNullException("destinationHost");
            }

            if (destinationHost.Length == 0)
            {
                throw ExceptionHelper.EmptyString("destinationHost");
            }

            if (!ExceptionHelper.ValidateTcpPort(destinationPort))
            {
                throw ExceptionHelper.WrongTcpPort("destinationPort");
            }

            #endregion

            TcpClient curTcpClient = tcpClient;

            if (curTcpClient == null)
            {
                curTcpClient = CreateConnectionToProxy();
            }

            try
            {
                SendCommand(curTcpClient.GetStream(), CommandConnect, destinationHost, destinationPort);
            }
            catch (Exception ex)
            {
                curTcpClient.Close();

                if (ex is IOException || ex is SocketException)
                {
                    throw NewProxyException(Resources.ProxyException_Error, ex);
                }

                throw;
            }

            return curTcpClient;
        }

        #region Методы (внутренние защищённые)

        internal protected virtual void SendCommand(NetworkStream nStream, byte command, string destinationHost, int destinationPort)
        {
            byte[] dstPort = GetIPAddressBytes(destinationHost);
            byte[] dstIp = GetPortBytes(destinationPort);

            byte[] userId = string.IsNullOrEmpty(_username) ?
                new byte[0] : Encoding.ASCII.GetBytes(_username);

            // +----+----+----+----+----+----+----+----+----+----+....+----+
            // | VN | CD | DSTPORT |      DSTIP        | USERID       |NULL|
            // +----+----+----+----+----+----+----+----+----+----+....+----+
            //    1    1      2              4           variable       1
            byte[] request = new byte[9 + userId.Length];

            request[0] = VersionNumber;
            request[1] = command;
            dstIp.CopyTo(request, 2);
            dstPort.CopyTo(request, 4);
            userId.CopyTo(request, 8);
            request[8 + userId.Length] = 0x00;

            nStream.Write(request, 0, request.Length);

            // +----+----+----+----+----+----+----+----+
            // | VN | CD | DSTPORT |      DSTIP        |
            // +----+----+----+----+----+----+----+----+
            //   1    1       2              4
            byte[] response = new byte[8];

            nStream.Read(response, 0, response.Length);

            byte reply = response[1];

            // Если запрос не выполнен.
            if (reply != CommandReplyRequestGranted)
            {
                HandleCommandError(reply);
            }
        }

        internal protected byte[] GetIPAddressBytes(string destinationHost)
        {
            IPAddress ipAddr = null;

            if (!IPAddress.TryParse(destinationHost, out ipAddr))
            {
                try
                {
                    IPAddress[] ips = Dns.GetHostAddresses(destinationHost);

                    if (ips.Length > 0)
                    {
                        ipAddr = ips[0];
                    }
                }
                catch (Exception ex)
                {
                    if (ex is SocketException || ex is ArgumentException)
                    {
                        throw new ProxyException(string.Format(
                            Resources.ProxyException_FailedGetHostAddresses, destinationHost), this, ex);
                    }

                    throw;
                }
            }

            return ipAddr.GetAddressBytes();
        }

        internal protected byte[] GetPortBytes(int port)
        {
            byte[] array = new byte[2];

            array[0] = (byte)(port / 256);
            array[1] = (byte)(port % 256);

            return array;
        }

        internal protected void HandleCommandError(byte command)
        {
            string errorMessage;

            switch (command)
            {
                case CommandReplyRequestRejectedOrFailed:
                    errorMessage = Resources.Socks4_CommandReplyRequestRejectedOrFailed;
                    break;

                case CommandReplyRequestRejectedCannotConnectToIdentd:
                    errorMessage = Resources.Socks4_CommandReplyRequestRejectedCannotConnectToIdentd;
                    break;

                case CommandReplyRequestRejectedDifferentIdentd:
                    errorMessage = Resources.Socks4_CommandReplyRequestRejectedDifferentIdentd;
                    break;

                default:
                    errorMessage = Resources.Socks_UnknownError;
                    break;
            }

            string exceptionMsg = string.Format(
                Resources.ProxyException_CommandError, errorMessage, ToString());

            throw new ProxyException(exceptionMsg, this);
        }

        #endregion
    }
}


text:
#include <aws/iotfleetwise/model/Compression.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>

using namespace Aws::Utils;

namespace Aws
{
  namespace IoTFleetWise
  {
    namespace Model
    {
      namespace CompressionMapper
      {

        static const int OFF_HASH = HashingUtils::HashString("OFF");
        static const int SNAPPY_HASH = HashingUtils::HashString("SNAPPY");

        Compression GetCompressionForName(const Aws::String& name)
        {
          int hashCode = HashingUtils::HashString(name.c_str());
          if (hashCode == OFF_HASH)
          {
            return Compression::OFF;
          }
          else if (hashCode == SNAPPY_HASH)
          {
            return Compression::SNAPPY;
          }
          EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
          if(overflowContainer)
          {
            overflowContainer->StoreOverflow(hashCode, name);
            return static_cast<Compression>(hashCode);
          }

          return Compression::NOT_SET;
        }

        Aws::String GetNameForCompression(Compression enumValue)
        {
          switch(enumValue)
          {
          case Compression::OFF:
            return "OFF";
          case Compression::SNAPPY:
            return "SNAPPY";
          default:
            EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
            if(overflowContainer)
            {
              return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
            }

            return {};
          }
        }

      } // namespace CompressionMapper
    } // namespace Model
  } // namespace IoTFleetWise
} // namespace Aws


text:
using BookFast.SeedWork;

namespace BookFast.Booking.Domain.Exceptions
{
    public class AccommodationNotFoundException : BusinessException
    {
        public int AccommodationId { get; }

        public AccommodationNotFoundException(int accommodationId)
            : base(ErrorCodes.AccommodationNotFound, $"Accommodation {accommodationId} not found.")
        {
            AccommodationId = accommodationId;
        }
    }
}


text:
__author__ = 'pcer'

'''
async web application.
'''

import logging; logging.basicConfig(level=logging.INFO)

import asyncio, os, json, time
from datetime import datetime

from aiohttp import web
from jinja2 import Environment, FileSystemLoader

from config import configs

import orm
from coroweb import add_routes, add_static

from handlers import cookie2user, COOKIE_NAME

def init_jinja2(app, **kw):
    '''
    初始化模板环境对象Environment的实例, 用来存储配置和全局对象,并且从文件系统装载模板文件.
    '''
    logging.info('init jinja2...')
    options = dict(
        autoescape = kw.get('autoescape', True),
        block_start_string = kw.get('block_start_string', '{%'),
        block_end_string = kw.get('block_end_string', '%}'),
        variable_start_string = kw.get('variable_start_string', '{{'),
        variable_end_string = kw.get('variable_end_string', '}}'),
        auto_reload = kw.get('auto_reload', True)
    )
    path = kw.get('path', None)
    if path is None:
        path = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'templates')

    logging.info('set jinja2 template path: %s' % path)
    # The core component of Jinja is the Environment. It contains important shared variables like configuration, filters, tests, globals and others
    # FileSystemLoader: Loads templates from the file system. This loader can find templates in folders on the file system and is the preferred way to load them.
    env = Environment(loader = FileSystemLoader(path), **options)
    filters = kw.get('filters', None)
    if filters is not None:
        for name, f in filters.items():
            env.filters[name] = f
    app['__templating__'] = env

async def logger_factory(app, handler):
    '''
    middleware(中间件),用来打印日志.
    '''
    async def logger(request):
        # 记录日志:
        logging.info('Request: %s %s' % (request.method, request.path))
        # 继续处理请求:
        return (await handler(request))
    return logger

async def auth_factory(app, handler):
    '''
    middleware(中间件),根据cookie识别用户是否已登录
    '''
    async def auth(request):
        logging.info('check user: %s %s' % (request.method, request.path))
        request.__user__ = None
        cookie_str = request.cookies.get(COOKIE_NAME)
        if cookie_str:
            # 根据cookie从数据库中查取用户信息
            user = await cookie2user(cookie_str)
            if user:
                logging.info('set current user:%s' % user.email)
                request.__user__ = user
        if request.path.startswith('/manage/') and (request.__user__ is None or not request.__user__.admin):
            # HTTPFound: Exception->HTTPRedirection->302
            return web.HTTPFound('/signin')
        return (await handler(request))
    return auth

async def data_factory(app, handler):
    async def parse_data(request):
        if request.method == 'POST':
            if request.content_type.startswith('application/json'):
                request.__data__ = await request.json()
                logging.info('request json: %s' % str(request.__data__))
            elif request.content_type.startswith('application/x-www-form-urlencoded'):
                request.__data__ = await request.post()
                logging.info('request form: %s' % str(request.__data__))
        return (await handler(request))
    return parse_data

async def response_factory(app, handler):
    '''
    middleware(中间件),对url处理函数返回的结果进行加工,返回web.Response
    '''
    async def response(request):
        logging.info('Response handler...')
        r = await handler(request)
        if isinstance(r, web.StreamResponse):
            return r
        if isinstance(r, bytes):
            resp = web.Response(body = r)
            resp.content_type = 'application/octet-stream'
            return resp
        if isinstance(r, str):
            if r.startswith('redirect:'):
                return web.HTTPFound(r[9:])
            resp = web.Response(body = r.encode('utf-8'))
            resp.content_type = 'text/html;charset=utf-8'
            return resp
        if isinstance(r, dict):
            template = r.get('__template__')
            if template is None:
                # __dict__:  包含对象所有属性和值的对
                # default参数指定转化函数
                resp = web.Response(body = json.dumps(r, ensure_ascii = False, default = lambda o: o.__dict__).encode('utf-8'))
                resp.content_type = 'application/json;charset=utf-8'
                return resp
            else:
                r['__user__'] = request.__user__
                resp = web.Response(body = app['__templating__'].get_template(template).render(**r).encode('utf-8'))
                resp.content_type = 'text/html;charset=utf-8'
                return resp
        if isinstance(r, int) and r >= 100 and r < 600:
            # status = r
            return web.Response(r)
        if isinstance(r, tuple) and len(r) == 2:
            t, m = r
            if isinstance(t, int) and t >= 100 and t < 600:
                return web.Response(t, str(m))
        # default:
        resp = web.Response(body = str(r).encode('utf-8'))
        resp.content_type = 'text/plain;charset=utf-8'
        return resp
    return response

def datetime_filter(t):
    '''
    在模板文件中使用,显示时间.
    '''
    delta = int(time.time() - t)
    if delta < 60:
        return u'1分钟前'
    if delta < 3600:
        return u'%s分钟前' % (delta // 60)
    if delta < 86400:
        return u'%s小时前' % (delta // 3600)
    if delta < 604800:
        return u'%s天前' % (delta // 86400)
    dt = datetime.fromtimestamp(t)
    return u'%s年%s月%s日' % (dt.year, dt.month, dt.day)

async def init(loop):
    '''
    初始化web服务器.
    '''
    await orm.create_pool(loop = loop, **configs.db)
    app = web.Application(loop = loop, middlewares = [
        logger_factory, auth_factory, response_factory
    ])
    # filters的函数可以在jinja2模板中使用
    init_jinja2(app, filters = dict(datetime = datetime_filter))
    add_routes(app, 'handlers')
    add_static(app)
    srv = await loop.create_server(app.make_handler(), '0.0.0.0', 9000)
    logging.info('server start at http://127.0.0.1:9000...')
    return srv

loop = asyncio.get_event_loop()
loop.run_until_complete(init(loop))
loop.run_forever()


text:
import { DataGrid } from "@phosphor/datagrid";

export default class BeakerXThemeHelper {

  public static get isDark(): boolean {
    return document.body.classList.contains('bx-dark-theme');
  }

  public static getStyle(): DataGrid.IStyle {
      return this.isDark ?
        this.getDarkStyle() :
        this.getLightStyle();
  }

  public static get DEFAULT_DATA_FONT_COLOR(): string {
    return this.isDark ? '#ffffff': '#000000';
  }

  public static get DEFAULT_HEADER_FONT_COLOR(): string {
    return this.isDark ? '#ffffff': '#515A5A';
  }

  public static get DEFAULT_HIGHLIGHT_COLOR(): string {
    return this.isDark ? '#dfdfdf': '#6ba2c7';
  }

  public static get DEFAULT_CELL_BACKGROUND(): string {
    return '';
  }

  public static get FOCUSED_CELL_BACKGROUND(): string {
    return this.isDark ? '#66bb6a' : '#c8c8c8';
  }

  public static get SELECTED_CELL_BACKGROUND(): string {
    return this.isDark ? '#2196F3' : '#B0BED9';
  }

  public static get HIGHLIGHTED_CELL_BACKGROUND_EVEN(): string {
    return this.isDark ? 'rgb(34, 34, 34)' : 'rgb(241, 241, 241)';
  }

  public  static get HIGHLIGHTED_CELL_BACKGROUND_ODD(): string {
    return this.isDark ? 'rgb(26, 26, 26)' : 'rgb(249, 249, 249)';
  }

  public  static get MIN_LIGHTNESS_VALUE(): number {
    return this.isDark ? 15 : 35;
  }

  public  static get MIN_SATURATION_VALUE(): number {
    return this.isDark ? 15 : 35;
  }

  private static getDarkStyle(): DataGrid.IStyle {
    return {
    ...DataGrid.defaultStyle,
      voidColor: '#636363',
      backgroundColor: '#212121',
      headerBackgroundColor: '#252525',
      rowBackgroundColor: i => i % 2 === 0 ? '#424242' : '',
      gridLineColor: '#626262',
      headerGridLineColor: '#626262',
    };
  }

  private static getLightStyle(): DataGrid.IStyle {
    return {
      ...DataGrid.defaultStyle,
      voidColor: '#ffffff',
      headerBackgroundColor: '#E6E6E6',
      rowBackgroundColor: i => i % 2 === 0 ? '#f9f9f9' : '',
      gridLineColor: '#D4D0D0'
    };
  }
}


text:
using System.Html;
using System.Html.Media;
using System.Runtime.CompilerServices;

namespace System.Net.WebRTC {
	[IgnoreNamespace, Imported(ObeysTypeSystem = true), ScriptName("mozRTCPeerConnection")]
	public partial class RTCPeerConnection : EventTarget {
		public void AddEventListener(RTCPeerConnectionEvents type, Action listener) {
		}

		public void AddEventListener(RTCPeerConnectionEvents type, Action listener, bool capture) {
		}

		public void AddEventListener(RTCPeerConnectionEvents type, HtmlEventHandler listener) {
		}

		public void AddEventListener(RTCPeerConnectionEvents type, HtmlEventHandler listener, bool capture) {
		}

		public void AddEventListener(RTCPeerConnectionEvents type, HtmlEventHandlerWithTarget<RTCPeerConnection> listener) {
		}

		public void AddEventListener(RTCPeerConnectionEvents type, HtmlEventHandlerWithTarget<RTCPeerConnection> listener, bool capture) {
		}

		public void AddEventListener(RTCPeerConnectionEvents type, IEventListener listener) {
		}

		public void AddEventListener(RTCPeerConnectionEvents type, IEventListener listener, bool capture) {
		}

		public void AddEventListener(string type, HtmlEventHandlerWithTarget<RTCPeerConnection> listener) {
		}

		public void AddEventListener(string type, HtmlEventHandlerWithTarget<RTCPeerConnection> listener, bool capture) {
		}

		public void AddIceCandidate(RTCIceCandidate candidate) {
		}

		public void AddIceCandidate(RTCIceCandidate candidate, Action successCallback) {
		}

		public void AddIceCandidate(RTCIceCandidate candidate, Action successCallback, RTCPeerConnectionErrorCallback failureCallback) {
		}

		public void AddStream(MediaStream stream) {
		}

		public void AddStream(MediaStream stream, MediaConstraints constraints) {
		}

		public void Close() {
		}

		public void CreateAnswer(RTCSessionDescriptionCallback successCallback, RTCPeerConnectionErrorCallback failureCallback) {
		}

		public void CreateAnswer(RTCSessionDescriptionCallback successCallback, RTCPeerConnectionErrorCallback failureCallback, MediaConstraints constraints) {
		}

		public RTCDataChannel CreateDataChannel(string label) {
			return default(RTCDataChannel);
		}

		public RTCDataChannel CreateDataChannel(string label, RTCDataChannelInit dataChannelDict) {
			return default(RTCDataChannel);
		}

		public void CreateOffer(RTCSessionDescriptionCallback successCallback, RTCPeerConnectionErrorCallback failureCallback) {
		}

		public void CreateOffer(RTCSessionDescriptionCallback successCallback, RTCPeerConnectionErrorCallback failureCallback, MediaConstraints constraints) {
		}

		public void GetIdentityAssertion() {
		}

		public void GetIdentityAssertion(RTCPeerConnectionErrorCallback failureCallback) {
		}

		public MediaStream[] GetLocalStreams() {
			return null;
		}

		public MediaStream[] GetRemoteStreams() {
			return null;
		}

		public void GetStats(MediaStreamTrack selector, RTCStatsCallback successCallback, RTCPeerConnectionErrorCallback failureCallback) {
		}

		public MediaStream GetStreamById(string streamId) {
			return default(MediaStream);
		}

		[IntrinsicProperty]
		public RTCIceConnectionState IceConnectionState {
			get {
				return default(RTCIceConnectionState);
			}
		}

		[IntrinsicProperty]
		public RTCIceGatheringState IceGatheringState {
			get {
				return default(RTCIceGatheringState);
			}
		}

		[IntrinsicProperty]
		public RTCSessionDescription LocalDescription {
			get {
				return default(RTCSessionDescription);
			}
		}

		[IntrinsicProperty, ScriptName("onaddstream")]
		public HtmlEventHandler OnAddstream {
			get {
				return default(HtmlEventHandler);
			}
			set {
			}
		}

		[IntrinsicProperty, ScriptName("onclosedconnection")]
		public HtmlEventHandler OnClosedconnection {
			get {
				return default(HtmlEventHandler);
			}
			set {
			}
		}

		[IntrinsicProperty, ScriptName("onconnection")]
		public HtmlEventHandler OnConnection {
			get {
				return default(HtmlEventHandler);
			}
			set {
			}
		}

		[IntrinsicProperty, ScriptName("ondatachannel")]
		public HtmlEventHandler OnDatachannel {
			get {
				return default(HtmlEventHandler);
			}
			set {
			}
		}

		[IntrinsicProperty, ScriptName("onicecandidate")]
		public HtmlEventHandler OnIcecandidate {
			get {
				return default(HtmlEventHandler);
			}
			set {
			}
		}

		[IntrinsicProperty, ScriptName("oniceconnectionstatechange")]
		public HtmlEventHandler OnIceconnectionstatechange {
			get {
				return default(HtmlEventHandler);
			}
			set {
			}
		}

		[IntrinsicProperty, ScriptName("onidentityresult")]
		public HtmlEventHandler OnIdentityresult {
			get {
				return default(HtmlEventHandler);
			}
			set {
			}
		}

		[IntrinsicProperty, ScriptName("onnegotiationneeded")]
		public HtmlEventHandler OnNegotiationneeded {
			get {
				return default(HtmlEventHandler);
			}
			set {
			}
		}

		[IntrinsicProperty, ScriptName("onpeeridentity")]
		public HtmlEventHandler OnPeeridentity {
			get {
				return default(HtmlEventHandler);
			}
			set {
			}
		}

		[IntrinsicProperty, ScriptName("onremovestream")]
		public HtmlEventHandler OnRemovestream {
			get {
				return default(HtmlEventHandler);
			}
			set {
			}
		}

		[IntrinsicProperty, ScriptName("onsignalingstatechange")]
		public HtmlEventHandler OnSignalingstatechange {
			get {
				return default(HtmlEventHandler);
			}
			set {
			}
		}

		[IntrinsicProperty]
		public RTCIdentityAssertion PeerIdentity {
			get {
				return default(RTCIdentityAssertion);
			}
		}

		[IntrinsicProperty]
		public RTCSessionDescription RemoteDescription {
			get {
				return default(RTCSessionDescription);
			}
		}

		public void RemoveEventListener(RTCPeerConnectionEvents type, Action listener) {
		}

		public void RemoveEventListener(RTCPeerConnectionEvents type, Action listener, bool capture) {
		}

		public void RemoveEventListener(RTCPeerConnectionEvents type, HtmlEventHandler listener) {
		}

		public void RemoveEventListener(RTCPeerConnectionEvents type, HtmlEventHandler listener, bool capture) {
		}

		public void RemoveEventListener(RTCPeerConnectionEvents type, HtmlEventHandlerWithTarget<RTCPeerConnection> listener) {
		}

		public void RemoveEventListener(RTCPeerConnectionEvents type, HtmlEventHandlerWithTarget<RTCPeerConnection> listener, bool capture) {
		}

		public void RemoveEventListener(RTCPeerConnectionEvents type, IEventListener listener) {
		}

		public void RemoveEventListener(RTCPeerConnectionEvents type, IEventListener listener, bool capture) {
		}

		public void RemoveEventListener(string type, HtmlEventHandlerWithTarget<RTCPeerConnection> listener) {
		}

		public void RemoveEventListener(string type, HtmlEventHandlerWithTarget<RTCPeerConnection> listener, bool capture) {
		}

		public void RemoveStream(MediaStream stream) {
		}

		public void SetIdentityProvider(string provider) {
		}

		public void SetIdentityProvider(string provider, string protocol) {
		}

		public void SetIdentityProvider(string provider, string protocol, string username) {
		}

		public void SetLocalDescription(RTCSessionDescription description) {
		}

		public void SetLocalDescription(RTCSessionDescription description, Action successCallback) {
		}

		public void SetLocalDescription(RTCSessionDescription description, Action successCallback, RTCPeerConnectionErrorCallback failureCallback) {
		}

		public void SetRemoteDescription(RTCSessionDescription description) {
		}

		public void SetRemoteDescription(RTCSessionDescription description, Action successCallback) {
		}

		public void SetRemoteDescription(RTCSessionDescription description, Action successCallback, RTCPeerConnectionErrorCallback failureCallback) {
		}

		[IntrinsicProperty]
		public RTCSignalingState SignalingState {
			get {
				return default(RTCSignalingState);
			}
		}

		public void UpdateIce() {
		}

		public void UpdateIce(RTCConfiguration configuration) {
		}

		public void UpdateIce(RTCConfiguration configuration, MediaConstraints constraints) {
		}
	}
}


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
Danish species of Alternaria & Stemphylium 194 (1945)

#### Original name
Macrosporium congestum Bres.

### Remarks
null


text:
package com.zephyr.ventum;

import com.badlogic.gdx.Game;
import com.zephyr.ventum.screens.MenuScreen;
import com.zephyr.ventum.utils.AssetsManager;
import com.zephyr.ventum.utils.AudioManager;
import com.zephyr.ventum.interfaces.GameEventListener;
import com.zephyr.ventum.utils.GameManager;
import com.zephyr.ventum.utils.GamePreferences;

public class FlappySpinner extends Game {

	public static GameManager gameManager;

	public FlappySpinner(GameEventListener gameEventListener) {
		gameManager = new GameManager();
		gameManager.setGameEventListener(gameEventListener);
	}

	@Override
	public void create () {
		gameManager.setPreferences(new GamePreferences());
		AssetsManager.initAssets();
		AudioManager.getInstance().init();

		startMusic();

		this.setScreen(new MenuScreen(this));
	}

	@Override
	public void render () {
		super.render();
	}

	private void startMusic() {
		AudioManager.getInstance().playMusic();
	}

	@Override
	public void dispose () {
		AssetsManager.dispose();
		AudioManager.getInstance().dispose();
	}
}


text:
/**
 * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components
 * @version v25.0.1
 * @link http://www.ag-grid.com/
 * @license MIT
 */
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var ChartType;
(function (ChartType) {
    ChartType["Column"] = "column";
    ChartType["GroupedColumn"] = "groupedColumn";
    ChartType["StackedColumn"] = "stackedColumn";
    ChartType["NormalizedColumn"] = "normalizedColumn";
    ChartType["Bar"] = "bar";
    ChartType["GroupedBar"] = "groupedBar";
    ChartType["StackedBar"] = "stackedBar";
    ChartType["NormalizedBar"] = "normalizedBar";
    ChartType["Line"] = "line";
    ChartType["Scatter"] = "scatter";
    ChartType["Bubble"] = "bubble";
    ChartType["Pie"] = "pie";
    ChartType["Doughnut"] = "doughnut";
    ChartType["Area"] = "area";
    ChartType["StackedArea"] = "stackedArea";
    ChartType["NormalizedArea"] = "normalizedArea";
    ChartType["Histogram"] = "histogram";
})(ChartType = exports.ChartType || (exports.ChartType = {}));
var LegendPosition;
(function (LegendPosition) {
    LegendPosition["Top"] = "top";
    LegendPosition["Right"] = "right";
    LegendPosition["Bottom"] = "bottom";
    LegendPosition["Left"] = "left";
})(LegendPosition = exports.LegendPosition || (exports.LegendPosition = {}));

//# sourceMappingURL=iChartOptions.js.map


text:
<textarea rows="6" cols="50" name="answers[<?php echo $questionKey; ?>][]"><?php if (!empty($givenAnswer)) { echo stripcslashes(current($givenAnswer)); }?></textarea>

<?php if ( isset($question['hint']) && $question['hint'] != "" ) : ?>

- <?php _e('Show/Hide Hint', 'wp-survey-and-quiz-tool'); ?>

<?php _e('Hint', 'wp-survey-and-quiz-tool'); ?>

<?php echo nl2br(esc_html(stripslashes($question['hint']))); ?>

<?php endif;?>


text:
#ifndef __PDF_H__
#define __PDF_H__

/*--------------------------------------------------------------------------*\
 * dll functions
\*--------------------------------------------------------------------------*/
#include "pldll.h"

/* Some unsigned types */

#ifndef U_CHAR
#define U_CHAR unsigned char
#endif

#ifndef U_SHORT
#define U_SHORT unsigned short
#endif

#ifndef U_INT
#define U_INT unsigned int
#endif

#ifndef U_LONG
#define U_LONG unsigned long
#endif

#ifdef PLPLOT_USE_TCL_CHANNELS
#include <tcl.h>
#endif

/* PDFstrm definition */
/* The low level PDF i/o routines use the transfer method appropriate for */
/* the first non-null type below */

typedef struct {
    FILE *file;				/* Filesystem */
    unsigned char *buffer;		/* Memory buffer */
#ifdef PLPLOT_USE_TCL_CHANNELS
    Tcl_Channel tclChan;	        /* Tcl channel */
#endif
    long bp, bufmax;			/* Buffer pointer and max size */
} PDFstrm;

/* Info for the i/o device.  Only used by Tcl/TK/dp drivers for now */

typedef struct {
    FILE  *file;			/* File handle */
    char  *fileName;			/* Fifo or socket name (if needed) */
    char  *fileHandle;			/* Handle for use from interpreter */
    int   fd;				/* I/O device file descriptor */
    int   type;				/* Communication channel type */
    char  *typeName;			/* As above, but in string form */
} PLiodev;

/* Error numbers */

#define PDF_ERROR		1	/* Unknown error	*/
#define PDF_FNOPEN		2	/* File not open	*/
#define PDF_FAOPEN		3	/* File already open	*/
#define PDF_BADUN		4	/* Bad unit number	*/
#define PDF_BADNBITS		5	/* Invalid # of bits	*/
#define PDF_RDERR		6	/* Read error		*/
#define PDF_WRERR		7	/* Write error		*/
#define PDF_NOTPDF		8	/* Not a valid PDF file */

/* Prototypes */
/* Use a wrapper for the prototypes for use from K&R C */

void pdf_set		PLARGS((char *option, int value));
PDFstrm *pdf_fopen	PLARGS((const char *fileName, const char *mode));
PDFstrm *pdf_bopen	PLARGS((U_CHAR *buffer, long bufmax));
PLDLLIMPEXP PDFstrm *pdf_finit	PLARGS((FILE *file));
PDFstrm *plLibOpenPdfstrm PLARGS((const char *fn)); /* pmr: const */
PLDLLIMPEXP int  pdf_close		PLARGS((PDFstrm *pdfs));

int  pdf_putc		PLARGS((int c, PDFstrm *pdfs));
int  pdf_getc		PLARGS((PDFstrm *pdfs));
int  pdf_ungetc		PLARGS((int c, PDFstrm *pdfs));
int  pdf_rdx	        PLARGS((U_CHAR *x, long nitems, PDFstrm *pdfs));

PLDLLIMPEXP int  pdf_rd_header	PLARGS((PDFstrm *pdfs, char *header));
int  pdf_wr_header	PLARGS((PDFstrm *pdfs, const char *header));
int  pdf_wr_string	PLARGS((PDFstrm *pdfs, const char *string));
int  pdf_rd_string	PLARGS((PDFstrm *pdfs, char *string, int nmax));
int  pdf_wr_1byte	PLARGS((PDFstrm *pdfs, U_CHAR s));
PLDLLIMPEXP int  pdf_rd_1byte	PLARGS((PDFstrm *pdfs, U_CHAR *ps));
int  pdf_wr_2bytes	PLARGS((PDFstrm *pdfs, U_SHORT s));
PLDLLIMPEXP int  pdf_rd_2bytes 	PLARGS((PDFstrm *pdfs, U_SHORT *ps));
int  pdf_wr_2nbytes	PLARGS((PDFstrm *pdfs, U_SHORT *s, PLINT n));
PLDLLIMPEXP int  pdf_rd_2nbytes 	PLARGS((PDFstrm *pdfs, U_SHORT *s, PLINT n));
int  pdf_wr_4bytes	PLARGS((PDFstrm *pdfs, U_LONG s));
PLDLLIMPEXP int  pdf_rd_4bytes 	PLARGS((PDFstrm *pdfs, U_LONG *ps));
int  pdf_wr_ieeef	PLARGS((PDFstrm *pdfs, float f));
PLDLLIMPEXP int  pdf_rd_ieeef	PLARGS((PDFstrm *pdfs, float *pf));

#endif	/* __PDF_H__ */