text:
<?php

namespace Encog\Neural\Pattern;

use \Encog\Engine\Network\Activation\ActivationFunction;
use \Encog\Engine\Network\Activation\ActivationLinear;
use \Encog\MathUtil\Randomize\RangeRandomizer;
use \Encog\ML\MLMethod;
use \Encog\Neural\Networks\BasicNetwork;
use \Encog\Neural\Networks\Layers\BasicLayer;
use \Encog\Neural\Networks\Layers\Layer;

require_once ("Neural\Pattern\NeuralNetworkPattern.php");
require_once ("Neural\Networks\BasicNetwork.php");
require_once ("MathUtil\Randomize\RangeRandomizer.php");

/**
 * Construct an ADALINE neural network.
 */
class ADALINEPattern implements NeuralNetworkPattern {

	/**
	 * The number of neurons in the input layer.
	 *
	 * @var int
	 */
	private $inputNeurons = 0;

	/**
	 * The number of neurons in the output layer.
	 *
	 * @var int
	 */
	private $outputNeurons = 0;

	/**
	 * Not used, the ADALINE has no hidden layers, this will throw an error.
	 *
	 * @param
	 *        	int count
	 *        	The neuron count.
	 */
	public function addHiddenLayer( $count ) {
		throw new PatternError( "An ADALINE network has no hidden layers." );
	}

	/**
	 * Clear out any parameters.
	 */
	public function clear() {
		$this->inputNeurons = 0;
		$this->outputNeurons = 0;
	}

	/**
	 * Generate the network.
	 *
	 * @return MLMethod The generated network.
	 */
	public function generate() {
		$network = new BasicNetwork();

		$inputLayer = new BasicLayer( new ActivationLinear(), true, $this->inputNeurons );
		$outputLayer = new BasicLayer( new ActivationLinear(), false, $this->outputNeurons );

		$network->addLayer( $inputLayer );
		$network->addLayer( $outputLayer );
		$network->getStructure()->finalizeStructure();

		(new RangeRandomizer( - 0.5, 0.5 ))->randomizeMLMethod( $network );

		return $network;
	}

	/**
	 * Not used, ADALINE does not use custom activation functions.
	 *
	 * @param
	 *        	ActivationFunction activation
	 *        	Not used.
	 */
	public function setActivationFunction( ActivationFunction $activation ) {
		throw new PatternError( "A ADALINE network can't specify a custom activation function." );
	}

	/**
	 * Set the input neurons.
	 *
	 * @param
	 *        	int count
	 *        	The number of neurons in the input layer.
	 */
	public function setInputNeurons( $count ) {
		$this->inputNeurons = $count;
	}

	/**
	 * Set the output neurons.
	 *
	 * @param
	 *        	int count
	 *        	The number of neurons in the output layer.
	 */
	public function setOutputNeurons( $count ) {
		$this->outputNeurons = $count;
	}
}


text:
import React, { Component, PropTypes } from 'react';
import { reduxForm } from 'redux-form';
import validations from './blitzFormValidation';
import { blitzCreateLead as create } from 'redux/modules/blitzCreateLead';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
// import { Row, Col } from 'react-bootstrap';

@connect(
  () => ({}),
  ( dispatch ) => bindActionCreators( { blitzCreateLead: create }, dispatch)
)

@reduxForm({
  form: 'blitzLeadForm',
  fields: [
    'name',
    'phone'
  ],
  validate: validations
})
export default class BlitzLeadForm extends Component {
  static propTypes = {
    fields: PropTypes.object.isRequired,
    values: PropTypes.object,
    valid: PropTypes.bool,
    title: PropTypes.string,
    buttonText: PropTypes.string,
    touchAll: PropTypes.func.isRequired,
    blitzCreateLead: PropTypes.func,
    captureLeadInfo: PropTypes.func
  }
  constructor(props) {
    super(props);
  }
  submitHander(event) {
    event.preventDefault();
    const { touchAll, valid, values } = this.props;
    // const that = this;
    touchAll();
    const formData = {};
    for (const prop in values) {
      if ( values.hasOwnProperty(prop)) {
        formData[prop] = values[prop];
      }
    }
    if (valid) {
      this.props.blitzCreateLead(formData).then(() => {
        this.props.captureLeadInfo(formData);
      });
    }
  }
  render() {
    const styles = require('./BlitzLeadForm.scss');
    const {
      fields: { name, phone },
      buttonText, title
    } = this.props;
    return (

        <form onSubmit={this.submitHander.bind(this)} className = {styles.form }>

{ title }

              <input type="text" className={styles.remove + ' form-control'} placeholder="Full Name" {...name}/>
              {name.touched && name.error &&
{name.error}
}

                +91
                <input type="text" className={styles.remove + ' form-control'} maxLength={10} placeholder="Enter your 10 digit phone number" {...phone}/>

              {phone.touched && phone.error &&
{phone.error}
}

              <button type="submit" onClick={this.submitHander.bind(this)} className={styles.butn + ' btn'}>{ buttonText }</button>

        </form>

    );
  }
}

redpajama_set_name: RedPajamaGithub


text:
#ifndef QNETWORKCOOKIE_P_H
#define QNETWORKCOOKIE_P_H

//
//  W A R N I N G
//  -------------
//
// This file is not part of the Qt API.  It exists for the convenience
// of the Network Access framework.  This header file may change from
// version to version without notice, or even be removed.
//
// We mean it.
//

#include "QtCore/qdatetime.h"

QT_BEGIN_NAMESPACE

class QNetworkCookiePrivate: public QSharedData
{
public:
    inline QNetworkCookiePrivate() : secure(false), httpOnly(false) { }
    static QList<QNetworkCookie> parseSetCookieHeaderLine(const QByteArray &cookieString);

    QDateTime expirationDate;
    QString domain;
    QString path;
    QString comment;
    QByteArray name;
    QByteArray value;
    bool secure;
    bool httpOnly;
};

static inline bool isLWS(char c)
{
    return c == ' ' || c == '\t' || c == '\r' || c == '\n';
}

static int nextNonWhitespace(const QByteArray &text, int from)
{
    // RFC 2616 defines linear whitespace as:
    //  LWS = [CRLF] 1*( SP | HT )
    // We ignore the fact that CRLF must come as a pair at this point
    // It's an invalid HTTP header if that happens.
    while (from < text.length()) {
        if (isLWS(text.at(from)))
            ++from;
        else
            return from;        // non-whitespace
    }

    // reached the end
    return text.length();
}

QT_END_NAMESPACE

#endif


text:
require 'celluloid'
require 'celluloid/autostart'
require 'celluloid/io'

require_relative 'kontena/backend_resolver'
require_relative 'kontena/haproxy_config_generator'
require_relative 'kontena/haproxy_config_writer'
require_relative 'kontena/haproxy_spawner'
require_relative 'kontena/acme_worker'


text:
import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import { Router, browserHistory } from 'react-router';
import es6promise from 'es6-promise';
import injectTapEventPlugin from 'react-tap-event-plugin';

import configureStore  from './ducks/';
import routes from './routes';

// const initialState = {};
const store = configureStore();
const rootElement = document.getElementById('app');

let ComponentEl;

es6promise.polyfill();
injectTapEventPlugin();

if (process.env.NODE_ENV !== 'production') {

  // If using routes
  ComponentEl = (

      <Router history={browserHistory} routes={routes} />

  );
} else {
  ComponentEl = (

      <Router history={browserHistory} routes={routes} />

  );
}

// Render the React application to the DOM
ReactDOM.render(
  <Provider store={store}>
    {ComponentEl}
  </Provider>,
  rootElement
);


text:
import React, { FC, memo, useContext } from 'react'
import { FieldContext, useWatch } from 'rc-field-form'
import { useUpdate } from 'ahooks'
import type { FormInstance } from 'rc-field-form'
import type { NamePath } from 'rc-field-form/es/interface'
import { useIsomorphicUpdateLayoutEffect } from '../../utils/use-isomorphic-update-layout-effect'

type RenderChildren<Values = any> = (
  changedValues: Record<string, any>,
  form: FormInstance<Values>
) => React.ReactNode
type ChildrenType<Values = any> = RenderChildren<Values>

export interface FormSubscribeProps {
  to: NamePath[]
  children: ChildrenType
}

export const FormSubscribe: FC<FormSubscribeProps> = props => {
  const update = useUpdate()
  const form = useContext(FieldContext)
  return (
    <>
      {props.children(form.getFieldsValue(props.to), form)}
      {props.to.map(namePath => (
        <Watcher
          key={namePath.toString()}
          form={form}
          namePath={namePath}
          onChange={update}
        />
      ))}
    </>
  )
}

export const Watcher = memo<{
  form: FormInstance
  namePath: NamePath
  onChange: () => void
}>(props => {
  const value = useWatch(props.namePath, props.form)
  useIsomorphicUpdateLayoutEffect(() => {
    props.onChange()
  }, [value])
  return null
})


text:
package org.carewebframework.shell.designer;

import org.carewebframework.shell.property.PropertyInfo;
import org.fujion.annotation.WiredComponent;
import org.fujion.component.Radiobutton;
import org.fujion.component.Radiogroup;
import org.fujion.event.ChangeEvent;

/**
 * Editor for boolean values.
 */
public class PropertyEditorBoolean extends PropertyEditorBase<Radiogroup> {

    @WiredComponent
    private Radiobutton rbTrue;

    @WiredComponent
    private Radiobutton rbFalse;

    /**
     * Create property editor.
     */
    public PropertyEditorBoolean() {
        super(DesignConstants.RESOURCE_PREFIX + "propertyEditorBoolean.fsp");
    }

    @Override
    protected void init(Object target, PropertyInfo propInfo, PropertyGrid propGrid) {
        super.init(target, propInfo, propGrid);
        rbTrue.addEventForward(ChangeEvent.TYPE, editor, null);

        for (Radiobutton radio : editor.getChildren(Radiobutton.class)) {
            String label = propInfo.getConfigValue(radio.getLabel().trim());

            if (label != null) {
                radio.setLabel(label);
            }
        }
    }

    /**
     * Sets focus to the selected radio button.
     */
    @Override
    public void setFocus() {
        Radiobutton radio = editor.getSelected();

        if (radio == null) {
            radio = (Radiobutton) editor.getChildren().get(0);
        }

        radio.setFocus(true);
    }

    @Override
    protected Boolean getValue() {
        return rbTrue.isChecked();
    }

    @Override
    protected void setValue(Object value) {
        boolean val = value instanceof Boolean && (Boolean) value;
        (val ? rbTrue : rbFalse).setChecked(true);
    }

}


text:
package gov.hhs.fha.nhinc.patientdiscovery.passthru.deferred.request.proxy;

import gov.hhs.fha.nhinc.common.nhinccommon.AssertionType;
import gov.hhs.fha.nhinc.common.nhinccommon.NhinTargetSystemType;

import org.hl7.v3.MCCIIN000002UV01;
import org.hl7.v3.PRPAIN201305UV02;

public class PassthruPatientDiscoveryDeferredRequestProxyNoOpImpl implements
        PassthruPatientDiscoveryDeferredRequestProxy {

    public MCCIIN000002UV01 processPatientDiscoveryAsyncReq(PRPAIN201305UV02 message, AssertionType assertion,
            NhinTargetSystemType target) {
        return new MCCIIN000002UV01();
    }

}


text:
This protocol is used to make streaming build results available for machines to
read and process.

See https://docs.bazel.build/versions/master/build-event-protocol.html

This directory contains an example program that parses a streaming JSON file
containing build events. It's useful for manually testing a program that emits
the build event protocol.

## Try it

First build the tool:

```sh
$ bazel build //tools/build_event_protocol:parse
```

Then produce a build event json file:

$ bazel test //... --build_event_json_file=bep.json

as soon as that process has started, you should be able to run in another window

$ bazel-bin/tools/build_event_protocol/parse bep.json


text:
package org.visallo.webster.handlers;

import org.visallo.webster.HandlerChain;
import org.visallo.webster.RequestResponseHandler;

import javax.servlet.RequestDispatcher;
import javax.servlet.ServletContext;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletRequestWrapper;
import javax.servlet.http.HttpServletResponse;

public class StaticFileHandler implements RequestResponseHandler {
    private final RequestDispatcher handler;
    private final String pathInfo;

    public StaticFileHandler(ServletContext servletContext) {
        this(servletContext, null);
    }

    public StaticFileHandler(ServletContext servletContext, String pathInfo) {
        this.handler = servletContext.getNamedDispatcher("default");
        this.pathInfo = pathInfo;
    }

    @Override
    public void handle(HttpServletRequest request, HttpServletResponse response, HandlerChain chain) throws Exception {
        HttpServletRequest wrapped = new HttpServletRequestWrapper(request) {
            @Override
            public String getServletPath() {
                return "";
            }

            @Override
            public String getPathInfo() {
                if (pathInfo == null) {
                    return super.getPathInfo();
                } else {
                    return pathInfo;
                }
            }
        };
        handler.forward(wrapped, response);
    }
}


text:
import { Namespace as NS } from 'xmpp-constants';

function proxy (child, field) {

    return {
        get: function () {

            if (this._extensions[child]) {
                return this[child][field];
            }
        },
        set: function (value) {

            this[child][field] = value;
        }
    };
}

export default function (JXT) {

    let Utils = JXT.utils;

    let UserItem = JXT.define({
        name: '_mucUserItem',
        namespace: NS.MUC_USER,
        element: 'item',
        fields: {
            affiliation: Utils.attribute('affiliation'),
            nick: Utils.attribute('nick'),
            jid: Utils.jidAttribute('jid'),
            role: Utils.attribute('role'),
            reason: Utils.textSub(NS.MUC_USER, 'reason')
        }
    });

    let UserActor = JXT.define({
        name: '_mucUserActor',
        namespace: NS.MUC_USER,
        element: 'actor',
        fields: {
            nick: Utils.attribute('nick'),
            jid: Utils.jidAttribute('jid')
        }
    });

    let Destroyed = JXT.define({
        name: 'destroyed',
        namespace: NS.MUC_USER,
        element: 'destroy',
        fields: {
            jid: Utils.jidAttribute('jid'),
            reason: Utils.textSub(NS.MUC_USER, 'reason')
        }
    });

    let Invite = JXT.define({
        name: 'invite',
        namespace: NS.MUC_USER,
        element: 'invite',
        fields: {
            to: Utils.jidAttribute('to'),
            from: Utils.jidAttribute('from'),
            reason: Utils.textSub(NS.MUC_USER, 'reason'),
            thread: Utils.subAttribute(NS.MUC_USER, 'continue', 'thread'),
            'continue': Utils.boolSub(NS.MUC_USER, 'continue')
        }
    });

    let Decline = JXT.define({
        name: 'decline',
        namespace: NS.MUC_USER,
        element: 'decline',
        fields: {
            to: Utils.jidAttribute('to'),
            from: Utils.jidAttribute('from'),
            reason: Utils.textSub(NS.MUC_USER, 'reason')
        }
    });

    let AdminItem = JXT.define({
        name: '_mucAdminItem',
        namespace: NS.MUC_ADMIN,
        element: 'item',
        fields: {
            affiliation: Utils.attribute('affiliation'),
            nick: Utils.attribute('nick'),
            jid: Utils.jidAttribute('jid'),
            role: Utils.attribute('role'),
            reason: Utils.textSub(NS.MUC_ADMIN, 'reason')
        }
    });

    let AdminActor = JXT.define({
        name: 'actor',
        namespace: NS.MUC_USER,
        element: 'actor',
        fields: {
            nick: Utils.attribute('nick'),
            jid: Utils.jidAttribute('jid')
        }
    });

    let Destroy = JXT.define({
        name: 'destroy',
        namespace: NS.MUC_OWNER,
        element: 'destroy',
        fields: {
            jid: Utils.jidAttribute('jid'),
            password: Utils.textSub(NS.MUC_OWNER, 'password'),
            reason: Utils.textSub(NS.MUC_OWNER, 'reason')
        }
    });

    let MUC = JXT.define({
        name: 'muc',
        namespace: NS.MUC_USER,
        element: 'x',
        fields: {
            affiliation: proxy('_mucUserItem', 'affiliation'),
            nick: proxy('_mucUserItem', 'nick'),
            jid: proxy('_mucUserItem', 'jid'),
            role: proxy('_mucUserItem', 'role'),
            actor: proxy('_mucUserItem', '_mucUserActor'),
            reason: proxy('_mucUserItem', 'reason'),
            password: Utils.textSub(NS.MUC_USER, 'password'),
            codes: {
                get: function () {

                    return Utils.getMultiSubText(this.xml, NS.MUC_USER, 'status', function (sub) {

                        return Utils.getAttribute(sub, 'code');
                    });
                },
                set: function (value) {

                    let self = this;
                    Utils.setMultiSubText(this.xml, NS.MUC_USER, 'status', value, function (val) {

                        let child = Utils.createElement(NS.MUC_USER, 'status', NS.MUC_USER);
                        Utils.setAttribute(child, 'code', val);
                        self.xml.appendChild(child);
                    });
                }
            }
        }
    });

    let MUCAdmin = JXT.define({
        name: 'mucAdmin',
        namespace: NS.MUC_ADMIN,
        element: 'query',
        fields: {
            affiliation: proxy('_mucAdminItem', 'affiliation'),
            nick: proxy('_mucAdminItem', 'nick'),
            jid: proxy('_mucAdminItem', 'jid'),
            role: proxy('_mucAdminItem', 'role'),
            actor: proxy('_mucAdminItem', '_mucAdminActor'),
            reason: proxy('_mucAdminItem', 'reason')
        }
    });

    let MUCOwner = JXT.define({
        name: 'mucOwner',
        namespace: NS.MUC_OWNER,
        element: 'query'
    });

    let MUCJoin = JXT.define({
        name: 'joinMuc',
        namespace: NS.MUC,
        element: 'x',
        fields: {
            password: Utils.textSub(NS.MUC, 'password'),
            history: {
                get: function () {

                    let result = {};
                    let hist = Utils.find(this.xml, NS.MUC, 'history');

                    if (!hist.length) {
                        return {};
                    }
                    hist = hist[0];

                    let maxchars = hist.getAttribute('maxchars') || '';
                    let maxstanzas = hist.getAttribute('maxstanzas') || '';
                    let seconds = hist.getAttribute('seconds') || '';
                    let since = hist.getAttribute('since') || '';

                    if (maxchars) {
                        result.maxchars = parseInt(maxchars, 10);
                    }
                    if (maxstanzas) {
                        result.maxstanzas = parseInt(maxstanzas, 10);
                    }
                    if (seconds) {
                        result.seconds = parseInt(seconds, 10);
                    }
                    if (since) {
                        result.since = new Date(since);
                    }
                },
                set: function (opts) {

                    let existing = Utils.find(this.xml, NS.MUC, 'history');
                    if (existing.length) {
                        for (let i = 0; i < existing.length; i++) {
                            this.xml.removeChild(existing[i]);
                        }
                    }

                    let hist = Utils.createElement(NS.MUC, 'history', NS.MUC);
                    this.xml.appendChild(hist);

                    if (opts.maxchars) {
                        hist.setAttribute('maxchars', '' + opts.maxchars);
                    }
                    if (opts.maxstanzas) {
                        hist.setAttribute('maxstanzas', '' + opts.maxstanzas);
                    }
                    if (opts.seconds) {
                        hist.setAttribute('seconds', '' + opts.seconds);
                    }
                    if (opts.since) {
                        hist.setAttribute('since', opts.since.toISOString());
                    }
                }
            }
        }
    });

    let DirectInvite = JXT.define({
        name: 'mucInvite',
        namespace: NS.MUC_DIRECT_INVITE,
        element: 'x',
        fields: {
            jid: Utils.jidAttribute('jid'),
            password: Utils.attribute('password'),
            reason: Utils.attribute('reason'),
            thread: Utils.attribute('thread'),
            'continue': Utils.boolAttribute('continue')
        }
    });

    JXT.extend(UserItem, UserActor);
    JXT.extend(MUC, UserItem);
    JXT.extend(MUC, Invite, 'invites');
    JXT.extend(MUC, Decline);
    JXT.extend(MUC, Destroyed);
    JXT.extend(AdminItem, AdminActor);
    JXT.extend(MUCAdmin, AdminItem, 'items');
    JXT.extend(MUCOwner, Destroy);

    JXT.extendPresence(MUC);
    JXT.extendPresence(MUCJoin);

    JXT.extendMessage(MUC);
    JXT.extendMessage(DirectInvite);

    JXT.withIQ(function (IQ) {

        JXT.add(IQ, 'mucUnique', Utils.textSub(NS.MUC_UNIQUE, 'unique'));
        JXT.extend(IQ, MUCAdmin);
        JXT.extend(IQ, MUCOwner);
    });

    JXT.withDataForm(function (DataForm) {

        JXT.extend(MUCOwner, DataForm);
    });
}


text:
NS_ASSUME_NONNULL_BEGIN

typedef NS_OPTIONS(NSInteger, ASScrollDirection) {
  ASScrollDirectionNone  = 0,
  ASScrollDirectionRight = 1 << 0,
  ASScrollDirectionLeft  = 1 << 1,
  ASScrollDirectionUp    = 1 << 2,
  ASScrollDirectionDown  = 1 << 3
};

extern const ASScrollDirection ASScrollDirectionHorizontalDirections;
extern const ASScrollDirection ASScrollDirectionVerticalDirections;

ASDISPLAYNODE_EXTERN_C_BEGIN

BOOL ASScrollDirectionContainsVerticalDirection(ASScrollDirection scrollDirection);
BOOL ASScrollDirectionContainsHorizontalDirection(ASScrollDirection scrollDirection);

BOOL ASScrollDirectionContainsRight(ASScrollDirection scrollDirection);
BOOL ASScrollDirectionContainsLeft(ASScrollDirection scrollDirection);
BOOL ASScrollDirectionContainsUp(ASScrollDirection scrollDirection);
BOOL ASScrollDirectionContainsDown(ASScrollDirection scrollDirection);
ASScrollDirection ASScrollDirectionApplyTransform(ASScrollDirection scrollDirection, CGAffineTransform transform);

ASDISPLAYNODE_EXTERN_C_END

NS_ASSUME_NONNULL_END


text:
<?php
  // determine which kana level to display
  $id = 0;
  if (isset($_GET['id']) && !empty($_GET['id'])) {
    $id = htmlspecialchars($_GET['id']);
  }

 ?>

<?php
echo '';


text:
<form method="post">
    <input type="text" name="champ" /><br />
    <input type="submit" />
</form>


text:
var CameraController = function(camera)
{
	this.camera = camera;
}

CameraController.prototype.update = function()
{
	var halfWidth = GameEngine.screenWidth / 2;
	var halfHeight = GameEngine.screenHeight / 2;

	this.camera.position.x = sampleGame.player.transform.position.x - halfWidth;
	this.camera.position.y = sampleGame.player.transform.position.y - halfHeight;

	this.camera.position.x = Math.clamp(this.camera.position.x,
		sampleGame.getWorldBoundsMinX(), sampleGame.getWorldBoundsMaxX() - GameEngine.screenWidth);
	this.camera.position.y = Math.clamp(this.camera.position.y,
		sampleGame.getWorldBoundsMinY(), sampleGame.getWorldBoundsMaxY() - GameEngine.screenHeight);
}

CameraController.prototype.getLeft = function()
{
	return this.camera.position.x;
}
CameraController.prototype.getTop = function()
{
	return this.camera.position.y;
}
CameraController.prototype.getRight = function()
{
	return this.camera.position.x + GameEngine.screenWidth;
}
CameraController.prototype.getBottom = function()
{
	return this.camera.position.y + GameEngine.screenHeight;
}


text:
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using ExtendedXmlSerializer.Core.Sources;

namespace ExtendedXmlSerializer.ContentModel.Identification
{
	sealed class Aliases : TableSource<string, string>, IAliases
	{
		public static Aliases Default { get; } = new Aliases();

		Aliases() : this(WellKnownIdentities.Default) {}

		public Aliases(IDictionary<Assembly, IIdentity> known)
			: base(known.Values.ToDictionary(x => x.Identifier, x => x.Name)) {}
	}
}


text:
using RealSenseWrapper.Core.Model;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Media.Imaging;
using System.Xml.Linq;

namespace RealSenseWrapper.Core.Model
{
    static class IOManager
    {

        /// <summary>
        /// Store into the compiled folder the user photo used to retrieve user information
        /// </summary>
        /// <param name="faceImageSource">face image source</param>
        /// <param name="imageFileName">face image name</param>
        /// <returns>1 if store success, 0 otherwise</returns>
        public static int SaveUserImage(BitmapSource faceImageSource, string imageFileName)
        {
            int resultCode = 1;

            if (File.Exists(imageFileName))
            {
                File.Delete(imageFileName);
            }

            using (FileStream saveSnapshotStream = new FileStream(imageFileName, FileMode.CreateNew))
            {
                try
                {
                    JpegBitmapEncoder jpgEncoder = new JpegBitmapEncoder();
                    jpgEncoder.QualityLevel = 100;
                    jpgEncoder.Frames.Add(BitmapFrame.Create(faceImageSource));
                    jpgEncoder.Save(saveSnapshotStream);

                    saveSnapshotStream.Flush();
                    saveSnapshotStream.Close();
                    saveSnapshotStream.Dispose();
                }
                catch (Exception e)
                {
                     resultCode = 0;
                }
            }

            return resultCode;
        }
    }
}


text:
package moe.pine.bottler;

import org.junit.Assert;
import org.junit.Test;

import java.net.HttpCookie;

/**
 * Test for SerializableHttpCookie
 * Created by pine on 2017/04/08
 */
public class SerializableHttpCookieTest {
    @Test
    public void testOf() {
        HttpCookie cookie = new HttpCookie("name", "value");
        cookie.setComment("comment");
        cookie.setCommentURL("commentURL");
        cookie.setDiscard(true);
        cookie.setDomain("example.com");
        cookie.setMaxAge(12345L);
        cookie.setPath("/");
        cookie.setPortlist("443");
        cookie.setSecure(true);
        cookie.setHttpOnly(true);
        cookie.setVersion(1);

        SerializableHttpCookie newCookie = SerializableHttpCookie.of(cookie);
        Assert.assertEquals(cookie.getName(), newCookie.getName());
        Assert.assertEquals(cookie.getValue(), newCookie.getValue());
        Assert.assertEquals(cookie.getComment(), newCookie.getComment());
        Assert.assertEquals(cookie.getCommentURL(), newCookie.getCommentURL());
        Assert.assertEquals(cookie.getDiscard(), newCookie.getDiscard());
        Assert.assertEquals(cookie.getDomain(), newCookie.getDomain());
        Assert.assertEquals(cookie.getMaxAge(), newCookie.getMaxAge());
        Assert.assertEquals(cookie.getPath(), newCookie.getPath());
        Assert.assertEquals(cookie.getPortlist(), newCookie.getPortlist());
        Assert.assertEquals(cookie.getSecure(), newCookie.getSecure());
        Assert.assertEquals(cookie.isHttpOnly(), newCookie.isHttpOnly());
        Assert.assertEquals(cookie.getVersion(), newCookie.getVersion());
    }

    @Test
    public void testToHttpCookie() {
        SerializableHttpCookie cookie = new SerializableHttpCookie();
        cookie.setName("name");
        cookie.setValue("value");
        cookie.setComment("comment");
        cookie.setDiscard(true);
        cookie.setDomain("example.com");
        cookie.setMaxAge(12345L);
        cookie.setPath("/");
        cookie.setPortlist("443");
        cookie.setSecure(true);
        cookie.setHttpOnly(true);
        cookie.setVersion(1);

        HttpCookie newCookie = cookie.toHttpCookie();
        Assert.assertEquals(newCookie.getName(), cookie.getName());
        Assert.assertEquals(newCookie.getValue(), cookie.getValue());
        Assert.assertEquals(newCookie.getComment(), cookie.getComment());
        Assert.assertEquals(newCookie.getCommentURL(), cookie.getCommentURL());
        Assert.assertEquals(newCookie.getDiscard(), cookie.getDiscard());
        Assert.assertEquals(newCookie.getDomain(), cookie.getDomain());
        Assert.assertEquals(newCookie.getMaxAge(), cookie.getMaxAge());
        Assert.assertEquals(newCookie.getPath(), cookie.getPath());
        Assert.assertEquals(newCookie.getPortlist(), cookie.getPortlist());
        Assert.assertEquals(newCookie.getSecure(), cookie.getSecure());
        Assert.assertEquals(newCookie.isHttpOnly(), cookie.isHttpOnly());
        Assert.assertEquals(newCookie.getVersion(), cookie.getVersion());
    }

    @Test(expected = IllegalStateException.class)
    public void testToHttpCookie_IllegalStateException() {
        SerializableHttpCookie cookie = new SerializableHttpCookie();
        cookie.toHttpCookie();
    }

    @Test
    public void testSetName() {
        SerializableHttpCookie cookie = new SerializableHttpCookie();
        Assert.assertNull(cookie.getName());

        cookie.setName("name");
        Assert.assertEquals("name", cookie.getName());
    }

    @Test
    public void testSetValue() {
        SerializableHttpCookie cookie = new SerializableHttpCookie();
        Assert.assertNull(cookie.getValue());

        cookie.setValue("value");
        Assert.assertEquals("value", cookie.getValue());
    }

    @Test
    public void testSetComment() {
        SerializableHttpCookie cookie = new SerializableHttpCookie();
        Assert.assertNull(cookie.getComment());

        cookie.setComment("comment");
        Assert.assertEquals("comment", cookie.getComment());
    }

    @Test
    public void testSetCommentURL() {
        SerializableHttpCookie cookie = new SerializableHttpCookie();
        Assert.assertNull(cookie.getCommentURL());

        cookie.setCommentURL("commentURL");
        Assert.assertEquals("commentURL", cookie.getCommentURL());
    }

    @Test
    public void testSetDiscard() {
        SerializableHttpCookie cookie = new SerializableHttpCookie();
        Assert.assertFalse(cookie.getDiscard());

        cookie.setDiscard(true);
        Assert.assertEquals(true, cookie.getDiscard());
    }

    @Test
    public void testSetMaxAge() {
        SerializableHttpCookie cookie = new SerializableHttpCookie();
        Assert.assertEquals(-1, cookie.getMaxAge());

        cookie.setMaxAge(12345L);
        Assert.assertEquals(12345L, cookie.getMaxAge());
    }
}


text:
package net.spy.memcached.protocol.binary;

import net.spy.memcached.ops.CASOperation;
import net.spy.memcached.ops.ConcatenationOperation;
import net.spy.memcached.ops.OperationCallback;
import net.spy.memcached.ops.OperationStatus;
import net.spy.memcached.ops.StoreOperation;
import net.spy.memcached.ops.StoreType;

class StoreOperationImpl extends OperationImpl
	implements StoreOperation, CASOperation, ConcatenationOperation {

	private static final int SET=1;
	private static final int ADD=2;
	private static final int REPLACE=3;

	private final String key;
	private final int flags;
	private final int exp;
	private final long cas;
	private final byte[] data;

	private static int cmdMap(StoreType t) {
		int rv=-1;
		switch(t) {
			case set: rv=SET; break;
			case add: rv=ADD; break;
			case replace: rv=REPLACE; break;
		}
		// Check fall-through.
		assert rv != -1 : "Unhandled store type:  " + t;
		return rv;
	}

	public StoreOperationImpl(StoreType t, String k, int f, int e,
			byte[] d, long c, OperationCallback cb) {
		super(cmdMap(t), generateOpaque(), cb);
		key=k;
		flags=f;
		exp=e;
		data=d;
		cas=c;
	}

	@Override
	public void initialize() {
		prepareBuffer(key, cas, data, flags, exp);
	}

	@Override
	protected OperationStatus getStatusForErrorCode(int errCode, byte[] errPl) {
		OperationStatus rv=null;
		switch(errCode) {
			case ERR_EXISTS:
				rv=EXISTS_STATUS;
				break;
			case ERR_NOT_FOUND:
				rv=NOT_FOUND_STATUS;
				break;
		}
		return rv;
	}

}


text:
<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright 2019 The Android Open Source Project
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~     http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
-->
<androidx.coordinatorlayout.widget.CoordinatorLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/root"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">

    <com.google.android.material.appbar.AppBarLayout
        android:id="@+id/app_bar"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="?attr/colorPrimaryVariant"
        android:theme="@style/ThemeOverlay.MaterialComponents.Dark.ActionBar">

        <com.google.android.material.appbar.MaterialToolbar
            android:id="@+id/toolbar"
            android:layout_width="match_parent"
            android:layout_height="?attr/actionBarSize"
            android:background="?attr/colorPrimary" />

    </com.google.android.material.appbar.AppBarLayout>

    <androidx.core.widget.NestedScrollView
        android:id="@+id/scroll"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        app:layout_behavior="@string/appbar_scrolling_view_behavior">

        <FrameLayout
            android:id="@+id/content"
            android:layout_width="match_parent"
            android:layout_height="wrap_content">

            <TextView
                android:id="@+id/message"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_margin="@dimen/spacing_medium"
                android:text="@string/tap_fab"
                android:textAppearance="?attr/textAppearanceHeadline6" />

        </FrameLayout>

    </androidx.core.widget.NestedScrollView>

    <!-- A scrim that appears when the FAB is expanded. -->
    <View
        android:id="@+id/scrim"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@color/dark_scrim"
        android:visibility="invisible"
        app:layout_behavior="@string/fab_transformation_scrim_behavior" />

    <!-- A FAB that expands into a sheet. -->
    <com.google.android.material.floatingactionbutton.FloatingActionButton
        android:id="@+id/fab"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="end|bottom"
        android:layout_margin="@dimen/spacing_medium"
        app:elevation="@dimen/fab_elevation"
        android:contentDescription="@string/add"
        app:srcCompat="@drawable/ic_add" />

    <!--
        A sheet that the FAB expands into.
        Use CircularRevealCardView to apply circular reveal effect.
    -->
    <com.google.android.material.circularreveal.cardview.CircularRevealCardView
        android:id="@+id/sheet"
        android:layout_width="256dp"
        android:layout_height="wrap_content"
        android:layout_gravity="end|bottom"
        android:layout_margin="@dimen/spacing_medium"
        android:background="?attr/colorSurface"
        android:visibility="invisible"
        app:elevation="@dimen/fab_elevation"
        app:layout_behavior="@string/fab_transformation_sheet_behavior"
        tools:visibility="visible">

        <LinearLayout
            android:id="@+id/sheet_content"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical"
            android:paddingTop="@dimen/spacing_small"
            android:paddingBottom="@dimen/spacing_small">

            <include
                android:id="@+id/cheese_1"
                layout="@layout/cheese_list_item" />

            <include
                android:id="@+id/cheese_2"
                layout="@layout/cheese_list_item" />

            <include
                android:id="@+id/cheese_3"
                layout="@layout/cheese_list_item" />

            <include
                android:id="@+id/cheese_4"
                layout="@layout/cheese_list_item" />

        </LinearLayout>

    </com.google.android.material.circularreveal.cardview.CircularRevealCardView>

</androidx.coordinatorlayout.widget.CoordinatorLayout>


text:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>hoge</groupId>
    <artifactId>hoge</artifactId>
    <version>1.0-SNAPSHOT</version>
    <repositories>
        <repository>
            <id>twitter4j.org</id>
            <name>twitter4j.org Repository</name>
            <url>http://twitter4j.org/maven2</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>
    </repositories>
    <dependencies>
        <dependency>
            <groupId>org.twitter4j</groupId>
            <artifactId>twitter4j-core</artifactId>
            <version>4.0.2-SNAPSHOT</version>
        </dependency>
    </dependencies>

</project>


text:
// src\Inventor\Win\widgets\SoAnyThumbWheel.cpp.  Generated from SoAnyThumbWheel.cpp.in by configure.

#ifdef HAVE_CONFIG_H
#include <config.h>
#endif // HAVE_CONFIG_H

#include <assert.h>
#include <math.h>
#include <stdio.h>

#include <sowindefs.h>
#include <Inventor/Win/SoWinObject.h> // for __COIN_SOQT__
#include <Inventor/Win/widgets/SoAnyThumbWheel.h>

#ifdef __COIN_SOQT__
#include <qglobal.h> // for Q_OS_MAC
#endif

#ifndef M_PI
#define M_PI 3.14159265358979323846f
#endif // ! M_PI

/*!
  \class SoAnyThumbWheel SoAnyThumbWheel.h
  \brief The ThumbWheel class is a helper class for managing thumb wheel
  GUI widgets.
  \internal
*/

/*!
  \var int SoAnyThumbWheel::dirtyTables
  If this flag is set, the internal tables needs to be recalculated.
*/

/*!
  \var int SoAnyThumbWheel::dirtyVariables
  If this flag is set, the internal variables that are calculated from the
  tables and wheel settings need to be recalculated.
*/

static unsigned int
int8clamp(float f) {
  assert(f >= 0.0f);
  if (f >= 255.0f)
    return 255;
  return (unsigned int) floor(f);
} // int8clamp()

// ************************************************************************

/*!
  Constructor.
*/

SoAnyThumbWheel::SoAnyThumbWheel(
  void)
: diameter(0)
, width(0)
, byteorder(ABGR)
, boundaryhandling(ACCUMULATE)
, movement(AUTHENTIC)
, dirtyTables(1)
, dirtyVariables(1)
{
  assert(sizeof(int) == 4 && "FIXME: use int32 datatype instead");

//  this->disabledred = 1.0f;
//  this->disabledgreen = 1.0f;
//  this->disabledblue = 1.0f;

  this->red = 220.0f / 255.0f;
  this->green = 180.0f / 255.0f;
  this->blue = 180.0f / 255.0f;

  this->light = 1.3f;
  this->front = 1.2f;
  this->normal = 1.0f;
  this->shade = 0.8f;

  for (int i = 0; i < NUMTABLES; i++)
    this->tables[i] = NULL;
} // SoAnyThumbWheel()

/*!
  Destructor.
*/

SoAnyThumbWheel::~SoAnyThumbWheel(
  void)
{
  for (int i = 0; i < NUMTABLES; i++)
    delete [] this->tables[i];
} // ~ThumbWheel()

// ************************************************************************

/*!
*/

void
SoAnyThumbWheel::setSize(
  const int diameterarg,
  const int widtharg)
{
  if (this->diameter != diameterarg) {
    this->dirtyTables = 1;
    this->dirtyVariables = 1;
  } else if (this->width != widtharg) {
    this->dirtyVariables = 1; // embossed squares grows...
  } else {
    return;
  }
  this->diameter = diameterarg;
  this->width = widtharg;
} // setSize()

/*!
*/

void
SoAnyThumbWheel::getSize(
  int & diameterref,
  int & widthref) const
{
  diameterref = this->diameter;
  widthref = this->width;
} // getSize()

// ************************************************************************

/*!
*/

void
SoAnyThumbWheel::setColor(
  const float redval,
  const float greenval,
  const float blueval)
{
  this->red = redval;
  this->green = greenval;
  this->blue = blueval;
} // setColor()

/*!
*/

void
SoAnyThumbWheel::getColor(
  float & redref,
  float & greenref,
  float & blueref) const
{
  redref = this->red;
  greenref = this->green;
  blueref = this->blue;
} // GetColor()

// ************************************************************************

/*!
*/

void
SoAnyThumbWheel::setColorFactors(
  const float lightval,
  const float frontval,
  const float normalval,
  const float shadeval)
{
  this->light = lightval;
  this->front = frontval;
  this->normal = normalval;
  this->shade = shadeval;
} // setColorFactors()

/*!
*/

void
SoAnyThumbWheel::getColorFactors(
  float & lightref,
  float & frontref,
  float & normalref,
  float & shaderef) const
{
  lightref = this->light;
  frontref = this->front;
  normalref = this->normal;
  shaderef = this->shade;
} // getColorFactors()

// ************************************************************************

/*!
  This method returns the number of bitmaps required to represent all the
  possible rotations of the thumb wheel.
*/

int
SoAnyThumbWheel::getNumBitmaps(
  void) const
{
  return this->width - 4 + 2 + 1;
} // getNumBitmaps()

// ************************************************************************

/*!
  This method draws thumb wheel bitmap \a number. \a direction decides
  if it should be rendered in the vertical or horizontal position.
*/

void
SoAnyThumbWheel::drawBitmap(
  const int number,
  void * bitmap,
  Alignment alignment) const
{
  if (number == 0) {
    drawDisabledWheel(number, bitmap, alignment);
  } else {
    drawEnabledWheel(number, bitmap, alignment);
  }
}

// ************************************************************************

/*!
  This method calculates the thumb wheel value based on the users mouse
  interaction.  origpos and origval is the mouseposition at the moment of
  pressing the button, and origval is the thumbwheels original value at
  that point.  deltapos is the number of pixels the mouse has moved since
  pressing the button.

  The point in doing it this way is that the thumbwheel can easily be made
  to behave like an authentic wheel when all of these parameters are known.

  After doing a CalculateValue, you should redraw the wheel if the value has
  changed (since last time, not compared to origval).
*/

float
SoAnyThumbWheel::calculateValue(
  const float origval,
  const int origpos,
  const int deltapos) const
{
  this->validate();

//  fprintf(stderr, "calc(%8.4f, %d, %d)\n", origval, origpos, deltapos);

  float diff = 0.0f;
  switch (this->movement) {
  case UNIFORM:
    diff = this->unistep * deltapos;
    break;
  case AUTHENTIC:
    int newpos = origpos + deltapos;
    if (newpos < 0) newpos = 0;
    if (newpos >= diameter) newpos = diameter - 1;
    diff = this->tables[RAD][newpos] - this->tables[RAD][origpos];
    break;
  } // switch (this->movement)

  switch (this->boundaryhandling) {
  case MODULATE:
    while ((origval + diff) < 0.0f         ) diff += 2.0f * float(M_PI);
    while ((origval + diff) > (2.0f * float(M_PI))) diff -= 2.0f * float(M_PI);
    break;
  case CLAMP:
    if    ((origval + diff) < 0.0f         ) diff = 0.0f - origval;
    if    ((origval + diff) > (2.0f * float(M_PI))) diff = (2.0f * float(M_PI)) - origval;
    break;
  case ACCUMULATE:
    // nothing - just add the difference on top of original value
    break;
  } // switch (this->boundaryhandling)

  return origval + diff;
} // calculateValue()

// ************************************************************************

/*!
  This method returns the bitmap you need to display to represent a thumb
  wheel with the given value and active state.
*/

int
SoAnyThumbWheel::getBitmapForValue(
  const float value,
  const State state) const
{
  this->validate();

  if (state == DISABLED)
    return 0; // only one disabled bitmap in this implementation

  double squarerange = (2.0 * M_PI) / this->numsquares;
  double normalizedmodval = fmod((double) value, squarerange) / squarerange;
  if (normalizedmodval < 0.0) normalizedmodval += 1.0;
  int bitmap = 1 + (int) (normalizedmodval * (this->width - 4 + 2));
  return bitmap;
} // getBitmapForValue()

// ************************************************************************

/*!
  This method sets whether to set up uints in ARGB or BGRA mode before
  storing them in the 32-bit frame buffer.
*/

void
SoAnyThumbWheel::setGraphicsByteOrder(
  const GraphicsByteOrder byteorderval)
{
  this->byteorder = byteorderval;
} // setGraphicsByteOrder()

/*!
*/

SoAnyThumbWheel::GraphicsByteOrder
SoAnyThumbWheel::getGraphicsByteOrder(
  void) const
{
  return this->byteorder;
} // getGraphicsByteOrder()

// ************************************************************************

/*!
*/

void
SoAnyThumbWheel::setMovement(
  const Movement movementval)
{
  this->movement = movementval;
} // setMovement()

/*!
*/

SoAnyThumbWheel::Movement
SoAnyThumbWheel::getMovement(
  void) const
{
  return this->movement;
} // getMovement()

// ************************************************************************

void
SoAnyThumbWheel::setBoundaryHandling(
  const BoundaryHandling handling)
{
  this->boundaryhandling = handling;
} // setBoundaryHandling()

/*!
*/

SoAnyThumbWheel::BoundaryHandling
SoAnyThumbWheel::getBoundaryHandling(
  void) const
{
  return this->boundaryhandling;
} // getBoundaryHandling()

// ************************************************************************

/*!
  This method validates the ThumbWheel object, recalculating the tables and
  state variables if necessary.  If object is already valid, no calculations
  are performed.
*/

void
SoAnyThumbWheel::validate(// private
  void) const
{
  int i;

  if (this->dirtyTables) {
    assert(this->dirtyVariables);
    for (i = 0; i < NUMTABLES; i++) {
      if (this->tables[i]) delete [] this->tables[i];
      this->tables[i] = new float [ this->diameter ];
    }

    float radius = ((float) this->diameter + 1.0f) / 2.0f;
//    float range = 2.0f * M_PI;
    float acos0times2 = 2.0f * (float)acos(0.0);

    for (i = 0; i < this->diameter; i++) {
      if ((float) i <= radius) {
        this->tables[COS][i] = (radius - (float) i) / radius;
        this->tables[RAD][i] = (float)acos(this->tables[COS][i]);
      } else {
        this->tables[COS][i] = ((float) i - radius) / radius;
        this->tables[RAD][i] = acos0times2 - (float)acos(this->tables[COS][i]);
      }
      this->tables[SIN][i] = (float)sqrt(1.0f - this->tables[COS][i] * this->tables[COS][i]);
    }

    this->dirtyTables = 0;
  }

  if (this->dirtyVariables) {
    assert(this->dirtyTables == 0);
    if ((this->diameter % 2) == 0)
      this->unistep = this->tables[RAD][this->diameter/2] -
                      this->tables[RAD][(this->diameter/2)-1];
    else
      this->unistep = (this->tables[RAD][(this->diameter/2)+1] -
                       this->tables[RAD][(this->diameter/2)-1]) / 2.0f;

    this->squarespacing = 2.0f * this->unistep;
    this->shadelength = this->unistep; // remove?

    int squares = (int) floor(((2.0f * M_PI) /
                         ((((float) width - 4.0f) * this->unistep) + this->squarespacing)) + 0.5f);
    this->numsquares = (float)squares;
    this->squarelength = (float(2.0 * M_PI) / (float) squares) - this->squarespacing;

    this->dirtyVariables = 0;
  }
} // validate()

// ************************************************************************

inline unsigned int
SoAnyThumbWheel::swapWord(
  unsigned int orig) const
{
  // orig is RGBA
  unsigned int copy;
  if (this->byteorder == ABGR) {
    copy = (orig & 0x000000ff) <<  24;
    copy |= (orig & 0x0000ff00) << 8;
    copy |= (orig & 0x00ff0000) >> 8;
    copy |= (orig & 0xff000000) >> 24;
  } else if (this->byteorder == ARGB) {
    copy = orig >> 8;             // RGB
    // FIXME: QImage::hasAlphaBuffer() is ignored on Qt4 on Mac OS X,
    // thus we must explicitly set the alpha component to 0xff (opaque).
    // Bug reported to Trolltech. 20050805 kyrah.
#if (defined(Q_OS_MAC) && (QT_VERSION >= 0x040000))
    copy |= 0xff << 24;  // A
#else
    copy |= (orig & 0xff) << 24;  // A
#endif
  } else if (this->byteorder == BGRA) {
    copy = orig & 0x00ff00ff;          // G & A
    copy |= (orig & 0x0000ff00) << 16; // B
    copy |= (orig & 0xff000000) >> 16; // R
  } else {
    copy = orig; // ?
  }
  return copy;
} // swapWord()

/*!
  This method draws a wheel that has been disabled from being rotated.
*/

void
SoAnyThumbWheel::drawDisabledWheel(// private
  const int number,
  void * bitmap,
  Alignment alignment) const
{
  assert(number == 0);

  this->validate();

  unsigned int * buffer = (unsigned int *) bitmap;

  for (int j = 0; j < this->diameter; j++) {
    unsigned int lightval, frontval, normalval, shadeval;
    lightval = int8clamp(255.0f * this->tables[SIN][j] * 1.15f);
    frontval = 0;
    normalval = int8clamp(255.0f * this->tables[SIN][j]);
    shadeval = int8clamp(255.0f * this->tables[SIN][j] * 0.85f);

    // rgbx
    lightval = (lightval << 24) | (lightval << 16) | (lightval << 8);
    frontval = (frontval << 24) | (frontval << 16) | (frontval << 8);
    normalval = (normalval << 24) | (normalval << 16) | (normalval << 8);
    shadeval = (shadeval << 24) | (shadeval << 16) | (shadeval << 8);

    if (this->byteorder != RGBA) {
      lightval = this->swapWord(lightval);
      frontval = this->swapWord(frontval);
      normalval = this->swapWord(normalval);
      shadeval = this->swapWord(shadeval);
    }

    if (alignment == VERTICAL) {
      buffer[j*this->width] = lightval;
      for (int i = 1; i < (width - 1); i++)
        buffer[(j*this->width)+i] = normalval;
      buffer[(j*this->width)+(this->width-1)] = shadeval;
    } else {
      buffer[j] = lightval;
      for (int i = 1; i < (this->width-1); i++)
        buffer[j+(i*this->diameter)] = normalval;
      buffer[j+((this->width-1)*this->diameter)] = shadeval;
    }
  }
} // drawDisabledWheel()

// ************************************************************************

/*
  This method draws the thumb wheel.
  Shading/lighting aliasing can still be done better...
  Can also optimize the drawing to use less computing power...
*/

void
SoAnyThumbWheel::drawEnabledWheel(
  const int number,
  void * bitmap,
  Alignment alignment) const
{
  this->validate();

  int numEnabledBitmaps = this->width - 4 + 2;
  assert(number > 0 && number <= numEnabledBitmaps);

  float modulo = (2.0f * (float)M_PI) / this->numsquares;
  float radian = modulo - (((2.0f * (float)M_PI) / this->numsquares) * (((float) (number - 1)) / (float) numEnabledBitmaps));

  int newsquare = 1;
  int flag = 1;
  unsigned int * buffer = (unsigned int *) bitmap;
  for (int j = 0; j < this->diameter; j++) {
    unsigned int lightval, frontval, normalval, shadeval, color;

    lightval  = (int8clamp(255.0f * this->red * this->tables[SIN][j] * this->light) << 24) +
             (int8clamp(255.0f * this->green * this->tables[SIN][j] * this->light) << 16) +
             (int8clamp(255.0f * this->blue * this->tables[SIN][j] * this->light) << 8);
    frontval  = (int8clamp(255.0f * this->red * this->tables[SIN][j] * this->front) << 24) +
             (int8clamp(255.0f * this->green * this->tables[SIN][j] * this->front) << 16) +
             (int8clamp(255.0f * this->blue * this->tables[SIN][j] * this->front) << 8);
    normalval = (int8clamp(255.0f * this->red * this->tables[SIN][j] * this->normal) << 24) +
             (int8clamp(255.0f * this->green * this->tables[SIN][j] * this->normal) << 16) +
             (int8clamp(255.0f * this->blue * this->tables[SIN][j] * this->normal) << 8);
    shadeval  = (int8clamp(255.0f * this->red * this->tables[SIN][j] * this->shade) << 24) +
             (int8clamp(255.0f * this->green * this->tables[SIN][j] * this->shade) << 16) +
             (int8clamp(255.0f * this->blue * this->tables[SIN][j] * this->shade) << 8);

    if (this->byteorder != RGBA) {
      lightval = this->swapWord(lightval);
      normalval = this->swapWord(normalval);
      frontval = this->swapWord(frontval);
      shadeval = this->swapWord(shadeval);
    }

    if (newsquare) {
      color=frontval;
      newsquare = 0;
      flag = 1;
    } else {
      if (flag == 1) {
        if (j < (this->diameter * 2 / 3))
          color = shadeval;
        else
          color = normalval;
        flag = 0;
      } else {
        color = normalval;
      }
    }

    if (alignment == VERTICAL) {
      buffer[(this->width*j)] = frontval;
      buffer[(this->width*j)+1] = frontval;
      if (flag == 1) buffer[(this->width*j)+2] = frontval;
      else           buffer[(this->width*j)+2] = shadeval;

      for (int i = 3; i < (this->width-2); i++)
        buffer[(j*this->width)+i] = color;

      if (flag == 1) buffer[(this->width*j)+this->width-3] = frontval;
      else           buffer[(this->width*j)+this->width-3] = normalval;
      buffer[(this->width*j)+this->width-2] = frontval;
      buffer[(this->width*j)+this->width-1] = frontval;
    } else {

      buffer[j] = frontval;
      buffer[j+this->diameter] = frontval;
      if (flag == 1) buffer[j+(this->diameter*2)] = frontval;
      else           buffer[j+(this->diameter*2)] = shadeval;

      for (int i = 2; i < (this->width-2); i++)
        buffer[j+(i*this->diameter)] = color;

      if (flag == 1) buffer[j+(this->diameter*(this->width-3))] = frontval;
      else           buffer[j+(this->diameter*(this->width-3))] = normalval;
      buffer[j+(this->diameter*(this->width-2))] = frontval;
      buffer[j+(this->diameter*(this->width-1))] = frontval;
    }

    if (j < (this->diameter - 1)) {
      radian += this->tables[RAD][j+1] - this->tables[RAD][j];
      if (radian > modulo) {
        if (alignment == VERTICAL) {
          int color = 0;
          if (j > (this->diameter * 2 / 3))
            color = lightval;
          else if (j > (this->diameter / 3))
            color = frontval;
          if (color != 0)
            for (int i = 3; i < (this->width-2); i++)
              buffer[(j*this->width)+i] = color;
        } else {
          int color = 0;
          if (j > (this->diameter * 2 / 3))
            color = lightval;
          else if (j > (this->diameter / 3))
            color = frontval;
          if (color != 0)
            for (int i = 3; i < (this->width-2); i++)
              buffer[j+(this->diameter*i)] = color;
        }
        radian = (float) fmod(radian, modulo);
        newsquare = 1;
      }
    }
  }
} // drawEnabledWheel()

// ************************************************************************


text:
%% -*- coding:utf-8 -*-
\input preamble.tex

\begin{document}
\Russian
\input title.tex

\section{Цели изучения дисциплины}
Целью данного курса является ознакомление студентов с теоретическими и
экспериментальными исследованиями в ряде областей современной
квантовой оптики.  На основе полученных сведений студенты смогут более
углубленно  изучать интересующие их разделы квантовой оптики и
заниматься исследовательской работой.

\section{Место дисциплины в учебном плане}
Квантовая оптика изучает оптические явления, в которых проявляется
квантовая сущность света. Можно сказать, что квантовая оптика
рассматривает оптические явления, при которых свет и взаимодействующую
с ним систему необходимо описывать квантовыми уравнениями.

В квантовой оптике рассматривается область частот примерно от
\(f_1 \simeq 10^{13} \mbox{Гц}\) до \(f_2 \simeq 10^{18}
\mbox{Гц}\), т. е. от инфракрасного диапазона до
рентгеновского. Нижний предел определяется условием превышения
энергией кванта энергии теплового движения:
\(\omega_1 \hbar > k T\). Верхний предел
устанавливается исходя из того, что в квантовой оптике
рассматриваются, как правило, нерелятивистские энергии электронов и,
следовательно, энергия кванта должна быть заметно меньше, чем энергия
покоя электрона: \(\omega_2 \hbar \ll m c^2\).

\section{Объем дисциплины по видам учебной работы и формы контроля}
\subsection{Распределение времени по видам занятий}
\begin{longtable}{|l|c|c|}
\hline
Разделы программы & Семестр & Лекции (часы) \\ \hline
Квантовая электродинамика & 1 & 16 \\
Взаимодействие света с атомом & 1 & 16\\
Квантовая теория лазера & 2 & 8 \\
Оптика фотонов & 2  & 24 \\ \hline
Итого & & 64 \\ \hline
\end{longtable}

\subsection{Виды занятий и форма контроля}
\begin{longtable}{|l|c|}
\hline
Лекции (кол./нед.) & 2 \\
Экзамены (кол./сем.)& 1 \\
Зачет (кол./сем.)& нет \\ \hline
\end{longtable}

\section{Содержание дисциплины}
Курс состоит из четырех частей
\begin{itemize}
\item Квантовая электродинамика
\item Взаимодействие света с атомом
\item Квантовая теория лазера
\item Оптика фотонов (квантовые явления в оптике)
\end{itemize}

Ниже представленны краткие аннотации и содержание для каждой из
четырех частей курса.

\subsection{Квантовая электродинамика}
Квантовая электродинамика служит основой квантовой оптики. В первой
части курса излагаются положения квантовой теории электромагнитного поля,
необходимые для изучения и понимания квантовой оптики. Подробно
освещаются следующие вопросы
\begin{itemize}
\item Разложение электромагнитного поля по модам (типам колебаний)
\item Гамильтонова форма уравнений электромагнитного поля
\item Квантование электромагнитного поля
\item Разложение поля по плоским волнам в свободном пространстве
\item Плотность состояний
\item Гамильтонова форма уравнений поля при разложении по плоским
  волнам
\item Квантование электромагнитного поля при разложении его по
  плоским волнам
\item Свойства операторов $ \hat a $ и $ \hat a ^\dag $
\item Квантовое состояние электромагнитного поля  с определенной
  энергией
\item Многомодовые состояния
\item Когерентные состояния
\item Смешанные состояния электромагнитного поля
\item Представление оператора плотности через когерентные
  состояния
\end{itemize}

\subsection{Взаимодействие света с атомом}
Рассматриваются вопросы, связанные с взаимодействием квантованного
электромагнитного поля с атомом. Используется упрощенная модель атома
двухуровневый атом. Такое упрощение оправдано при резонансном
взаимодействии и широко используется в задачах квантовой электроники и
квантовой оптики. Большое внимание уделено рассмотрению
взаимодействия атома, моды резонатора (динамической системы) с
термостатом (диссипативной системой), которое ответственно за
релаксацию динамической системы.

В данной части курса подробно раскрываются следующие вопросы
\begin{itemize}
\item Излучение и поглощение атомом света
\item Гамильтониан системы атом-поле
\item Взаимодействие атома с модой электромагнитного поля
\item Взаимодействие атома с многомодовым полем. Вынужденные и
  спонтанные переходы
\item Релаксация динамической системы. Метод матрицы плотности
\item Взаимодействие электромагнитного поля резонатора
  (гармонического осциллятора) с резервуаром атомов, находящихся при
  температуре $T$
\item Уравнение для матрицы плотности поля в представлении чисел
  заполнения
\item Уравнение движения статистического оператора поля моды в
  представлении когерентных состояний
\item Общая теория взаимодействия динамической системы с
  термостатом (диссипативной системой, резервуаром)
\item Затухание (релаксация) поля и атома в случае простейшего
  резервуара, состоящего из гармонических осцилляторов
\end{itemize}

\subsection{Квантовая теория лазера}
Полуклассическая теория лазера не может ответить на все вопросы,
возникающие в связи с его работой. По этой теории лазер до достижения
порога  не генерирует вообще, а при превышении порога начинает
генерировать классическое электромагнитное поле (свет).

В действительности же заметно ниже порога лазер генерирует хаотический
свет, а значительно выше порога его излучение близко к
классическому. На пороге и вблизи него находится переходная область от
хаотического света к упорядоченному излучению. Адекватно описать это
может только полностью квантовая теория.

Другая задача, также требующая квантования электромагнитного поля, -
это определение предельной (естественной) ширины линии излучения
лазера, когда ширина линии определяется квантовыми флуктуациями поля,
а различные внешние воздействия, принципиально устранимые, не
принимаются во внимание.

В данной части курса подробно раскрываются следующие вопросы
\begin{itemize}
\item Модель лазера
\item Теория лазерной генерации
\item Статистика лазерных фотонов
\item Теория лазера. Представление когерентных состояний
\end{itemize}

\subsection{Оптика фотонов (квантовые явления в оптике)}
В данной части курса рассматриваются те оптические явления, в которых
в той или иной степени проявляются квантовые свойства света.

Несмотря на то, что большое число оптических явлений можно
рассматривать с классических позиций, многие явления могут быть до
конца поняты и описаны только в рамках полностью квантового описания.

Квантовое рассмотрение позволяет более полно понять суть
интерференционных опытов и на этой основе понять связь между
классическим и квантовым описаниями. Кроме того, квантовый подход
позволяет рассматривать эксперименты нового типа, в которых изучается
статистика фотонов в световых пучках и ее связь со спектральными
свойствами света.

Подробно освещаются следующие вопросы
\begin{itemize}
\item Фотоэффект
\item Когерентные свойства света
\item Когерентность второго порядка
\item Когерентность высших порядков
\item Счет и статистика фотонов
\item Связь статистики фотонов со статистикой фотоотсчетов
\item Распределение фотоотсчетов для когерентного и хаотического
  света
\item Определение статистики фотонов через распределение
  фотоотсчетов
\item Квантовое выражение для распределения фотоотсчетов
\item Эксперименты по счету фотонов. Применение техники счета
  фотонов для спектральных измерений
\end{itemize}

\section{Учебно-методическое обеспечение дисциплины}
\begin{enumerate}
\item В. Ю. Петрунькин, О. И. Котов Квантовая оптика -
  С. Петербург: Изд. СПбГПУ, 2003.
\item Л.Мандель, Э.Вольф. Оптическая когерентность и
  квантовая оптика. Пер. с англ./Под ред. В.В.Самарцева - М.:
  Наука. ФИЗМАТЛИТ, 2000.- 896с.
\item В.В.Белокуров, О.Д.Тимофеевская,
  О.А.Хрусталев. Квантовая телепортация - обыкновенное чудо. - Ижевск:
  НИЦ ``Регулярная и хаотическая динамика''. 2000. - 256с.
\itemС.Я.Килин. Квантовая информация. - УФН, 1999, т.169,
  - N 5, с.507-526.
\item Д.Н.Клышко. Квантовая оптика: квантовые,
  классические и метафизические аспекты. - УФН, 1994, т.164, N 11,
  с.1187-1214.
\item Д.Н.Клышко. Неклассический свет. - УФН, 1996,
  т.166, N 6, с.613-638.
\item Ю.И.Воронцов. Фаза осциллятора в квантовой
  теории. Что это такое на самом деле? - УФН, 2002, т.172, N 8,
  с.907-929.
\item M.O.Scully, M.S.Zubuiry. Quantum Optics. 1997,
  Cambridge University Press, UK, 635p.
\item R.Loudon. The Quantum Theory of Light. Third
  Edition. Oxford University Press, 2000, 438.
\item Y.Yamamoto, A.Imamoglu.  Mesoscopic quantum
  optics. 1999, USA, J.Wiley \& Sons, 301p.
\end{enumerate}

Программу разработали: профессор, д. т. н. Петрунькин В. Ю. и
к.ф.м. Мурашко И. В.

\end{document}


text:
import { autoinject } from 'aurelia-framework';
import { EventAggregator } from 'aurelia-event-aggregator';
import { Router, RouteConfig } from 'aurelia-router';
import { RiotApi } from '../api';
import { MatchApiEvents } from '../match-api';
import { MatchReference } from '../data/models/match/match-reference';
import { Champion } from './data/models/static/champion/model';

@autoinject
export class ChampionResults {

    // ----------------------------------------
    //
    //  Public Properties
    //
    // ----------------------------------------
    public summonerName: string;

    public matchesByChampion: Map<Champion, MatchReference[]>;

    // ----------------------------------------
    //
    //  Internal Properties
    //
    // ----------------------------------------

    // ----------------------------------------
    //
    //  Constructor
    //
    // ----------------------------------------
    constructor(protected _api: RiotApi, protected _router: Router, protected _ea: EventAggregator) {
        _ea.subscribe(MatchApiEvents.MATCHES_BY_CHAMPION_CALCULATED, (matchesByChampion) => this.onMatchesByChampion(matchesByChampion));
    }

    // ----------------------------------------
    //
    //  Aurelia Lifecycle Functions
    //
    // ----------------------------------------
    activate(routeParams: any, routeConfig: RouteConfig) {
        return this._api.getSummoners([routeParams.summonerName]).then(summonerList => {
            this.summonerName = summonerList[0].name;
            routeConfig.navModel.setTitle(this.summonerName);
            this._api.getMatchList(summonerList[0].id);
        }).catch(err => {
            this._router.navigateToRoute('search');
        });
    }

    // ----------------------------------------
    //
    //  Public Methods
    //
    // ----------------------------------------
    showChampionMatches(champion: Champion) {
        this._router.navigateToRoute("summoner-matches-by-champ", { summonerName: this.summonerName, championName: champion.name }, { trigger: true });
    }

    getChampionSquareImage(champion: Champion): string {
        return this._api.getChampionImageSquare(champion.image)
    }

    // ----------------------------------------
    //
    //  Internal Methods
    //
    // ----------------------------------------
    protected onMatchesByChampion(matchesByChampion: Map<Champion, MatchReference[]>) {
        this.matchesByChampion = matchesByChampion;
    }
}


text:
// -----------------------------------------------------------------------
// <copyright file="SessionTemplatesWindow.xaml.cs" company="">
// Copyright 2013 Alexander Soffronow Pagonidis
// </copyright>
// -----------------------------------------------------------------------

using MahApps.Metro.Controls;
using MahApps.Metro.Controls.Dialogs;
using QDMS;
using QDMSApp.ViewModels;
using System.Reactive.Linq;

namespace QDMSApp
{
    /// <summary>
    /// Interaction logic for SessionTemplatesWindow.xaml
    /// </summary>
    public partial class ScheduledJobsWindow : MetroWindow
    {
        public SchedulerViewModel ViewModel { get; }

        public ScheduledJobsWindow(IDataClient client)
        {
            InitializeComponent();
            ViewModel = new SchedulerViewModel(client, DialogCoordinator.Instance);
            DataContext = ViewModel;
        }

        private async void MetroWindow_Loaded(object sender, System.Windows.RoutedEventArgs e)
        {
            await ViewModel.Load.Execute();
        }
    }
}


text:
import { MessageType } from './message.type';

export interface Message {
  type: MessageType,
  message: string,
  detail?: string
}


text:
<?xml version='1.0' encoding='UTF-8'?>
<extensions xmlns:atom="http://www.w3.org/2005/Atom"
    xmlns="http://docs.openstack.org/common/api/v1.0">
    <extension alias="OS-SCH-HNT" updated="2013-04-18T00:00:00+00:00"
        namespace="http://docs.openstack.org/block-service/ext/scheduler-hints/api/v2"
        name="SchedulerHints">
        <description>Pass arbitrary key/value pairs to the
            scheduler.</description>
    </extension>
    <extension alias="os-hosts" updated="2011-06-29T00:00:00+00:00"
        namespace="http://docs.openstack.org/volume/ext/hosts/api/v1.1"
        name="Hosts">
        <description>Admin-only host administration.</description>
    </extension>
    <extension alias="os-vol-tenant-attr"
        updated="2011-11-03T00:00:00+00:00"
        namespace="http://docs.openstack.org/volume/ext/volume_tenant_attribute/api/v1"
        name="VolumeTenantAttribute">
        <description>Expose the internal project_id as an attribute of
            a volume.</description>
    </extension>
    <extension alias="os-quota-sets"
        updated="2011-08-08T00:00:00+00:00"
        namespace="http://docs.openstack.org/volume/ext/quotas-sets/api/v1.1"
        name="Quotas">
        <description>Quota management support.</description>
    </extension>
    <extension alias="os-types-manage"
        updated="2011-08-24T00:00:00+00:00"
        namespace="http://docs.openstack.org/volume/ext/types-manage/api/v1"
        name="TypesManage">
        <description>Types manage support.</description>
    </extension>
    <extension alias="os-volume-encryption-metadata"
        updated="2013-07-10T00:00:00+00:00"
        namespace="http://docs.openstack.org/volume/ext/os-volume-encryption-metadata/api/v1"
        name="VolumeEncryptionMetadata">
        <description>Volume encryption metadata retrieval
            support.</description>
    </extension>
    <extension alias="backups" updated="2012-12-12T00:00:00+00:00"
        namespace="http://docs.openstack.org/volume/ext/backups/api/v1"
        name="Backups">
        <description>Backups support.</description>
    </extension>
    <extension alias="os-snapshot-actions"
        updated="2013-07-16T00:00:00+00:00"
        namespace="http://docs.openstack.org/volume/ext/snapshot-actions/api/v1.1"
        name="SnapshotActions">
        <description>Enable snapshot manager actions.</description>
    </extension>
    <extension alias="os-volume-actions"
        updated="2012-05-31T00:00:00+00:00"
        namespace="http://docs.openstack.org/volume/ext/volume-actions/api/v1.1"
        name="VolumeActions">
        <description>Enable volume actions </description>
    </extension>
    <extension alias="os-used-limits"
        updated="2013-10-03T00:00:00+00:00"
        namespace="http://docs.openstack.org/volume/ext/used-limits/api/v1.1"
        name="UsedLimits">
        <description>Provide data on limited resources that are being
            used.</description>
    </extension>
    <extension alias="os-volume-unmanage"
        updated="2012-05-31T00:00:00+00:00"
        namespace="http://docs.openstack.org/volume/ext/volume-unmanage/api/v1.1"
        name="VolumeUnmanage">
        <description>Enable volume unmanage operation.</description>
    </extension>
    <extension alias="os-vol-host-attr"
        updated="2011-11-03T00:00:00+00:00"
        namespace="http://docs.openstack.org/volume/ext/volume_host_attribute/api/v1"
        name="VolumeHostAttribute">
        <description>Expose host as an attribute of a
            volume.</description>
    </extension>
    <extension alias="encryption" updated="2013-07-01T00:00:00+00:00"
        namespace="http://docs.openstack.org/volume/ext/volume-type-encryption/api/v1"
        name="VolumeTypeEncryption">
        <description>Encryption support for volume
            types.</description>
    </extension>
    <extension alias="os-availability-zone"
        updated="2013-06-27T00:00:00+00:00"
        namespace="http://docs.openstack.org/volume/ext/os-availability-zone/api/v1"
        name="AvailabilityZones">
        <description>Describe Availability Zones.</description>
    </extension>
    <extension alias="qos-specs" updated="2013-08-02T00:00:00+00:00"
        namespace="http://docs.openstack.org/volume/ext/qos-specs/api/v1"
        name="Qos_specs_manage">
        <description>QoS specs support.</description>
    </extension>
    <extension alias="os-types-extra-specs"
        updated="2011-08-24T00:00:00+00:00"
        namespace="http://docs.openstack.org/volume/ext/types-extra-specs/api/v1"
        name="TypesExtraSpecs">
        <description>Type extra specs support.</description>
    </extension>
    <extension alias="os-vol-mig-status-attr"
        updated="2013-08-08T00:00:00+00:00"
        namespace="http://docs.openstack.org/volume/ext/volume_mig_status_attribute/api/v1"
        name="VolumeMigStatusAttribute">
        <description>Expose migration_status as an attribute of a
            volume.</description>
    </extension>
    <extension alias="os-image-create"
        updated="2012-08-13T00:00:00+00:00"
        namespace="http://docs.openstack.org/volume/ext/image-create/api/v1"
        name="CreateVolumeExtension">
        <description>Allow creating a volume from an image in the
            Create Volume v1 API.</description>
    </extension>
    <extension alias="os-extended-services"
        updated="2014-01-10T00:00:00-00:00"
        namespace="http://docs.openstack.org/volume/ext/extended_services/api/v2"
        name="ExtendedServices">
        <description>Extended services support.</description>
    </extension>
    <extension alias="os-extended-snapshot-attributes"
        updated="2012-06-19T00:00:00+00:00"
        namespace="http://docs.openstack.org/volume/ext/extended_snapshot_attributes/api/v1"
        name="ExtendedSnapshotAttributes">
        <description>Extended SnapshotAttributes
            support.</description>
    </extension>
    <extension alias="os-vol-image-meta"
        updated="2012-12-07T00:00:00+00:00"
        namespace="http://docs.openstack.org/volume/ext/volume_image_metadata/api/v1"
        name="VolumeImageMetadata">
        <description>Show image metadata associated with the
            volume.</description>
    </extension>
    <extension alias="os-quota-class-sets"
        updated="2012-03-12T00:00:00+00:00"
        namespace="http://docs.openstack.org/volume/ext/quota-classes-sets/api/v1.1"
        name="QuotaClasses">
        <description>Quota classes management support.</description>
    </extension>
    <extension alias="os-volume-transfer"
        updated="2013-05-29T00:00:00+00:00"
        namespace="http://docs.openstack.org/volume/ext/volume-transfer/api/v1.1"
        name="VolumeTransfer">
        <description>Volume transfer management support.</description>
    </extension>
    <extension alias="os-volume-manage"
        updated="2014-02-10T00:00:00+00:00"
        namespace="http://docs.openstack.org/volume/ext/os-volume-manage/api/v1"
        name="VolumeManage">
        <description>Allows existing backend storage to be 'managed'
            by Cinder.</description>
    </extension>
    <extension alias="os-admin-actions"
        updated="2012-08-25T00:00:00+00:00"
        namespace="http://docs.openstack.org/volume/ext/admin-actions/api/v1.1"
        name="AdminActions">
        <description>Enable admin actions.</description>
    </extension>
    <extension alias="os-services" updated="2012-10-28T00:00:00-00:00"
        namespace="http://docs.openstack.org/volume/ext/services/api/v2"
        name="Services">
        <description>Services support.</description>
    </extension>
</extensions>


text:
knockout-array-enhancements
============

Add a couple more options to the knockout observable array: sorting and grouping. Inspired and strongly influenced by [knockout-projections](https://github.com/SteveSanderson/knockout-projections), which should work just fine in concert with this. Though I haven't actually tested that (yet).

Usage
============

Something like:

    var items = ko.observableArray([5, 1, 42, 3]);

    var sorted = items.sort(function(a, b) {
        if (parseInt(a) > parseInt(b)) return 1;
        if (parseInt(a) < parseInt(b)) return -1;
        return 0;
    });

    console.log(sorted());
    // Output
    // [1, 3, 5, 42]

    var grouped = items.group(function(item) {
        return item % 2 === 0 ? "even" : "odd";
    });

    grouped().forEach(function(group) {
        console.log(group.key);
        group.values().forEach(function(value) {
            console.log('\t' + value());
        });
    });
    // Output
    // odd
    //     5
    //     1
    //     3
    // even
    //     42

That's about it.

How the Magic Happens
============

Using the new array change subscriptions in [knockout 3](http://blog.stevensanderson.com/2013/10/08/knockout-3-0-release-candidate-available/)

Warning
============

I am relatively new to javascript, and this has undergone little to no testing. Enjoy!


text:
FROM biocontainers/biocontainers:debian-stretch-backports_cv2
MAINTAINER biocontainers <biodocker@gmail.com>
LABEL    software="bedops" \
    base_image="biocontainers/biocontainers:debian-stretch-backports_cv2" \
    container="bedops" \
    about.summary="high-performance genomic feature operations" \
    about.home="https://github.com/bedops/bedops" \
    software.version="2.4.35dfsg-1bpo91-deb" \
    upstream.version="2.4.35" \
    version="1" \
    extra.identifiers.biotools="bedops" \
    about.license="custom, see /usr/share/doc/bedops/copyright" \
    about.license_file="/usr/share/doc/bedops/copyright" \
    extra.binaries="/usr/bin/bam2bed,/usr/bin/bam2bed_gnuParallel,/usr/bin/bam2bed_sge,/usr/bin/bam2bed_slurm,/usr/bin/bam2starch,/usr/bin/bam2starch_gnuParallel,/usr/bin/bam2starch_sge,/usr/bin/bam2starch_slurm,/usr/bin/bedextract,/usr/bin/bedmap,/usr/bin/bedops,/usr/bin/bedops-starch,/usr/bin/closest-features,/usr/bin/convert2bed,/usr/bin/gff2bed,/usr/bin/gff2starch,/usr/bin/gtf2bed,/usr/bin/gtf2starch,/usr/bin/gvf2bed,/usr/bin/gvf2starch,/usr/bin/psl2bed,/usr/bin/psl2starch,/usr/bin/rmsk2bed,/usr/bin/rmsk2starch,/usr/bin/sam2bed,/usr/bin/sam2starch,/usr/bin/sort-bed,/usr/bin/starch-diff,/usr/bin/starchcat,/usr/bin/starchcluster_gnuParallel,/usr/bin/starchcluster_sge,/usr/bin/starchcluster_slurm,/usr/bin/starchstrip,/usr/bin/unstarch,/usr/bin/update-sort-bed-migrate-candidates,/usr/bin/update-sort-bed-slurm,/usr/bin/update-sort-bed-starch-slurm,/usr/bin/vcf2bed,/usr/bin/vcf2starch,/usr/bin/wig2bed,/usr/bin/wig2starch" \
    about.tags=""

USER root
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && apt-get install -y bedops && apt-get clean && apt-get purge && rm -rf /var/lib/apt/lists/* /tmp/*
USER biodocker


text:
using System;
using System.Collections.Generic;
using System.Linq;
using JetBrains.Annotations;
using JoinRpg.DataModel;
using JoinRpg.Services.Interfaces;
using JoinRpg.Web.Models;

namespace JoinRpg.Web.Helpers
{

    public static class ObjectLinkHelper
    {
        public static IEnumerable<GameObjectLinkViewModel> AsObjectLinks(
            [NotNull] [ItemNotNull] this IEnumerable<IWorldObject> objects,
            IUriService uriService)
        {
            if (objects == null) throw new ArgumentNullException(nameof(objects));
            return objects.Select(t => new GameObjectLinkViewModel(uriService, t));
        }
    }
}


text:
package hu.advancedweb.scott.instrumentation.transformation.param;

import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

import hu.advancedweb.scott.instrumentation.transformation.config.Configuration;
import org.objectweb.asm.AnnotationVisitor;
import org.objectweb.asm.Label;
import org.objectweb.asm.MethodVisitor;
import org.objectweb.asm.Opcodes;
import org.objectweb.asm.Type;

/**
 * Determines the instrumentation rules based on method properties.
 *
 * @author David Csakvari
 */
public class DiscoveryMethodVisitor extends MethodVisitor {

	private InstrumentationActions.Builder instrumentationActions;
	private Configuration configuration;
	private String methodName;
	private String methodDesc;
	private String methodSignature;

	private List<String> methodAnnotationFqns = new ArrayList<>();
	private List<String> classAnnotationFqns;
	private Set<Integer> lineNumbers = new HashSet<>();

	DiscoveryMethodVisitor(MethodVisitor mv, InstrumentationActions.Builder instrumentationActions,
			Configuration configuration, String name, String desc, String signature, List<String> classAnnotationFqns) {
		super(Opcodes.ASM7, mv);
		this.instrumentationActions = instrumentationActions;
		this.configuration = configuration;
		this.methodName = name;
		this.methodDesc = desc;
		this.methodSignature = signature;
		this.classAnnotationFqns = classAnnotationFqns;
	}

	@Override
	public void visitLineNumber(int line, Label start) {
		lineNumbers.add(line);
		super.visitLineNumber(line, start);
	}

	@Override
	public AnnotationVisitor visitAnnotation(String descriptor, boolean visible) {
		methodAnnotationFqns.add(Type.getType(descriptor).getClassName());
		return super.visitAnnotation(descriptor, visible);
	}

	@Override
	public void visitMethodInsn(int opcode, String owner, String name, String descriptor, boolean isInterface) {
		if (isScottInstrumentedTrackMethodInst(opcode, owner, name)) {
			instrumentationActions.alreadyInstrumented(true);
		}
		super.visitMethodInsn(opcode, owner, name, descriptor, isInterface);
	}

	private boolean isScottInstrumentedTrackMethodInst(int opcode, String owner, String name) {
		return Opcodes.INVOKESTATIC == opcode &&
				configuration.getTrackerClass().replace('.', '/').equals(owner) &&
				name.startsWith("track");
	}

	@Override
	public void visitEnd() {
		boolean isLambda = methodName.startsWith("lambda$");
		if (isLambda) {
			if (configuration.isLambdaInstrumentationAllowed(getMethodLoc())) {
				instrumentationActions.markLambdaForTracking(methodName, methodDesc, methodSignature);
			}
		} else if (configuration.isMethodInstrumentationAllowed(methodName, getMethodLoc(), methodAnnotationFqns, classAnnotationFqns)) {
			instrumentationActions.markMethodForTracking(methodName, methodDesc, methodSignature);
		}

		if (configuration.isJUnit4RuleInjectionRequired(methodAnnotationFqns)) {
			instrumentationActions.markClassForJUnit4RuleInjection();
		}

		if (configuration.isJUnit5ExtensionInjectionRequired(methodAnnotationFqns)) {
			instrumentationActions.markClassForJUnit5ExtensionInjection();
		}

		super.visitEnd();
	}

	private int getMethodLoc() {
		if (lineNumbers.isEmpty()) {
			return 0;
		}

		int firstLine = Integer.MAX_VALUE;
		int lastLine = 0;

		for (int lineNumber: lineNumbers) {
			if (lineNumber < firstLine) {
				firstLine = lineNumber;
			}
			if (lastLine < lineNumber) {
				lastLine = lineNumber;
			}
		}

		return lastLine - firstLine + 1;
	}

}


text:
1. Clone this repo
    1. **Automatic Clone**: Click below\
       [![Open in Cloud Shell](http://gstatic.com/cloudssh/images/open-btn.svg)](https://console.cloud.google.com/cloudshell/editor?cloudshell_git_repo=https%3A%2F%2Fgithub.com%2FGoogleCloudPlatform%2Fbigquery-utils.git&cloudshell_workspace=dataform/examples/dataform_udf_unit_test&cloudshell_tutorial=tutorial.md&cloudshell_open_in_editor=definitions/test_cases.js) \
       (clicking will automatically clone this repo in your Cloud Shell, open
       the dataform udf testing example directory, and launch a tutorial)

    1. **Manual Clone**: If you are not using the above link and instead
       manually cloning, make sure to change into the correct directory as shown
       below:
       ```bash
        git clone https://github.com/GoogleCloudPlatform/bigquery-utils.git
        cd bigquery-utils/dataform/examples/dataform_udf_unit_test
       ```
1. Install Dataform CLI tool
    ```bash
    npm i -g @dataform/cli && dataform install
    ```
1. Generate the Dataform credentials file by running the following:
   ```bash
   dataform init-creds bigquery
   ```
1. Execute the unit tests by running the following:
    ```bash
    dataform test
    ```

## How to modify the example for your own UDFs

1. From within the [`dataform_udf_unit_test/`](/dataform/examples/dataform_udf_unit_test) directory, create environment variables for your new Dataform directory and the
   BigQuery project ID in which your UDFs are stored; then create your \
   Dataform project using these environment variables:
   ```bash
   DATAFORM_DIR=<name-of-your-Dataform-project>
   PROJECT_ID=<your-bigquery-project-id>
   dataform init bigquery $DATAFORM_DIR --default-database $PROJECT_ID
   ```
1. Copy the [unit_test_utils.js](includes/unit_test_utils.js) file
   to your Dataform project directory. Then, \
   change into your newly created Dataform project directory and create your
   credentials file (.df-credentials.json):
   ```bash
   cp includes/unit_test_utils.js $DATAFORM_DIR/includes/
   cd $DATAFORM_DIR
   dataform init-creds bigquery
   ```
1. Create a new test_cases.js file:
   ```bash
   echo "const {generate_udf_test} = unit_test_utils;" > definitions/test_cases.js
   ```
1. Add a new invocation of the generate_udf_test() function for the UDF you want
   to test. The `generate_udf_test()` function takes the following two positional arguments:

   1. The first argument is a string representing the name of the UDF you will
   test. You can either use the fully qualified UDF name (ex:
   `bqutil.fn.url_parse`) or just the UDF name (ex: `url_parse`). If you provide
   just the UDF name, the function will use the `defaultDatabase` and
   `defaultSchema` values from your `dataform.json` file.

   1. The second argument is an array of Javascript objects where each object holds
   the UDF positional inputs and expected output for a test case.
   ```bash
   generate_udf_test()("YOUR_UDF_NAME", [
      { // JS Object for test case #1
         inputs: [
            `TEST1_POSITIONAL_ARGUMENT_0`,
            `TEST1_POSITIONAL_ARGUMENT_1`],
         expected_output: `TEST1_EXPECTED_OUTPUT`
      },
      { // JS Object for test case #2
         inputs: [`TEST2_POSITIONAL_ARGUMENT_0`],
         expected_output: `TEST2_EXPECTED_OUTPUT`
      }
   ]);

   ```
1. Run your tests to see if your UDF behaves as expected:
    ```bash
    dataform test
    ```


text:
.oo-ui-icon-image {
	background-image: url("themes/mediawiki/images/icons/image-ltr.png");
	background-image: -webkit-linear-gradient(transparent, transparent), /* @embed */ url("themes/mediawiki/images/icons/image-ltr.svg");
	background-image:         linear-gradient(transparent, transparent), /* @embed */ url("themes/mediawiki/images/icons/image-ltr.svg");
	background-image:      -o-linear-gradient(transparent, transparent), url("themes/mediawiki/images/icons/image-ltr.png");
}
.oo-ui-icon-imageAdd {
	background-image: url("themes/mediawiki/images/icons/imageAdd-ltr.png");
	background-image: -webkit-linear-gradient(transparent, transparent), /* @embed */ url("themes/mediawiki/images/icons/imageAdd-ltr.svg");
	background-image:         linear-gradient(transparent, transparent), /* @embed */ url("themes/mediawiki/images/icons/imageAdd-ltr.svg");
	background-image:      -o-linear-gradient(transparent, transparent), url("themes/mediawiki/images/icons/imageAdd-ltr.png");
}
.oo-ui-icon-imageLock {
	background-image: url("themes/mediawiki/images/icons/imageLock-ltr.png");
	background-image: -webkit-linear-gradient(transparent, transparent), /* @embed */ url("themes/mediawiki/images/icons/imageLock-ltr.svg");
	background-image:         linear-gradient(transparent, transparent), /* @embed */ url("themes/mediawiki/images/icons/imageLock-ltr.svg");
	background-image:      -o-linear-gradient(transparent, transparent), url("themes/mediawiki/images/icons/imageLock-ltr.png");
}
.oo-ui-icon-photoGallery {
	background-image: url("themes/mediawiki/images/icons/photoGallery-ltr.png");
	background-image: -webkit-linear-gradient(transparent, transparent), /* @embed */ url("themes/mediawiki/images/icons/photoGallery-ltr.svg");
	background-image:         linear-gradient(transparent, transparent), /* @embed */ url("themes/mediawiki/images/icons/photoGallery-ltr.svg");
	background-image:      -o-linear-gradient(transparent, transparent), url("themes/mediawiki/images/icons/photoGallery-ltr.png");
}
.oo-ui-icon-play {
	background-image: url("themes/mediawiki/images/icons/play-ltr.png");
	background-image: -webkit-linear-gradient(transparent, transparent), /* @embed */ url("themes/mediawiki/images/icons/play-ltr.svg");
	background-image:         linear-gradient(transparent, transparent), /* @embed */ url("themes/mediawiki/images/icons/play-ltr.svg");
	background-image:      -o-linear-gradient(transparent, transparent), url("themes/mediawiki/images/icons/play-ltr.png");
}
.oo-ui-icon-stop {
	background-image: url("themes/mediawiki/images/icons/stop.png");
	background-image: -webkit-linear-gradient(transparent, transparent), /* @embed */ url("themes/mediawiki/images/icons/stop.svg");
	background-image:         linear-gradient(transparent, transparent), /* @embed */ url("themes/mediawiki/images/icons/stop.svg");
	background-image:      -o-linear-gradient(transparent, transparent), url("themes/mediawiki/images/icons/stop.png");
}


text:
from scipy.sparse import lil_matrix, hstack
from sklearn.preprocessing import normalize
from nltk import Tree
from nltk.draw.util import CanvasFrame
from nltk.draw import TreeWidget

def label2action(label):
    """ Transform label to action
    """
    items = label.split('-')
    if len(items) == 1:
        action = (items[0], None, None)
    elif len(items) == 3:
        action = tuple(items)
    elif len(items) > 3:
        relalabel = '-'.join(items[2:])
        action = tuple((items[0], items[1], relalabel))
    else:
        raise ValueError("Unrecognized label: {}".format(label))
    return action

def action2label(action):
    """ Transform action into label
    """
    if action[0] == 'Shift':
        label = action[0]
    elif action[0] == 'Reduce':
        label = '-'.join(list(action))
    else:
        raise ValueError("Unrecognized parsing action: {}".format(action))
    return label

def vectorize(features, vocab, dpvocab=None, projmat=None):
    """ Transform a feature list into a numeric vector
        with a given vocab

    :type dpvocab: dict
    :param dpvocab: vocab for distributional representation

    :type projmat: scipy.lil_matrix
    :param projmat: projection matrix for disrep
    """
    vec = lil_matrix((1, len(vocab)))
    if (dpvocab is not None) and (projmat is not None):
        withdp = True
        ndpvocab = len(dpvocab)
        dpvec1 = lil_matrix((1, ndpvocab))
        dpvec2 = lil_matrix((1, ndpvocab))
        dpvec3 = lil_matrix((1, ndpvocab))
    else:
        withdp = False
    for feat in features:
        try:
            fidx = vocab[feat]
            vec[0, fidx] += 1.0
        except KeyError:
            pass
        if (withdp == True) and (feat[0] == 'DisRep'):
            tag, word = feat[1], feat[2]
            try:
                widx = dpvocab[word]
                if tag == 'Top1Span':
                    dpvec1[0, widx] += 1.0
                elif tag == 'Top2Span':
                    dpvec2[0, widx] += 1.0
                elif tag == 'FirstSpan':
                    dpvec3[0, widx] += 1.0
                else:
                    raise ValueError("Error")
            except KeyError:
                widx = None
    # Normalization
    vec = normalize(vec)
    # Projection
    if withdp:
        nlat = projmat.shape[1]
        vec_dense = lil_matrix((1, 3*nlat))
        v1 = dpvec1.dot(projmat)
        v2 = dpvec2.dot(projmat)
        v3 = dpvec3.dot(projmat)
        vec_dense[0, 0:nlat] = normalize(v1)
        vec_dense[0, nlat:(2*nlat)] = normalize(v2)
        vec_dense[0, (2*nlat):(3*nlat)] = normalize(v3)
        vec = hstack([vec, vec_dense])
    return vec

def extractrelation(s, level=0):
    """ Extract discourse relation on different level
    """
    items = s.lower().split('-')
    if items[0] == 'same':
        rela = '_'.join(items[:2])
    else:
        rela = items[0]
    return rela

def reversedict(dct):
    """ Reverse the {key:val} in dct to
        {val:key}
    """
    # print labelmap
    newmap = {}
    for (key, val) in dct.iteritems():
        newmap[val] = key
    return newmap

def getgrams(text, tokendict):
    """ Generate first one, two words from the token list

    :type text: list of int
    :param text: indices of words with the text span

    :type tokendict: dict of Token (data structure)
    :param tokendict: all tokens in the doc, indexing by the
                      document-level index
    """
    n = len(text)
    grams = []
    # Get lower-case of words
    if n >= 1:
        grams.append(tokendict[text[0]].word.lower())
        grams.append(tokendict[text[-1]].word.lower())
        grams.append(tokendict[text[0]].pos)
        grams.append(tokendict[text[-1]].pos)
    if n >= 2:
        token = tokendict[text[0]].word.lower() + ' ' + tokendict[text[1]].word.lower()
        grams.append(token)
        token = tokendict[text[-2]].word.lower() + ' ' + tokendict[text[-1]].word.lower()
        grams.append(token)
    return grams

def getbc(eduidx, edudict, tokendict, bcvocab, nprefix=5):
    """ Get brown cluster features for tokens

    :type eduidx: int
    :param eduidx: index of one EDU

    :type edudict: dict
    :param edudict: All EDUs in one dict

    :type tokendict: dict of Token (data structure)
    :param tokendict: all tokens in the doc, indexing by the
                      document-level index

    :type bcvocab: dict {word : braown-cluster-index}
    :param bcvocab: brown clusters

    :type nprefix: int
    :param nprefix: number of prefix we want to keep from
                    cluster indices
    """
    text = edudict[eduidx]
    bcfeatures = []
    for gidx in text:
        tok = tokendict[gidx].word.lower()
        try:
            bcidx = bcvocab[tok][:nprefix]
            bcfeatures.append(bcidx)
        except KeyError:
            pass
    return bcfeatures

def drawrst(strtree, fname):
    """ Draw RST tree into a file
    """
    if not fname.endswith(".ps"):
        fname += ".ps"
    cf = CanvasFrame()
    t = Tree.fromstring(strtree)
    tc = TreeWidget(cf.canvas(), t)
    cf.add_widget(tc,10,10) # (10,10) offsets
    cf.print_to_file(fname)
    cf.destroy()


text:
(function(root){

  // Create a server, and expose this directory
  var Connect = require('connect'),
      Static = Connect['static'](__dirname),
      Path = require('path'),
      FS = require('fs');

  // Load all probes found in the ./probe directory
  // This is synchronous because require() is synchronous
  try {
    FS.readdirSync(Path.join(__dirname, 'probe')).forEach(function(fileName) {
      if (fileName.substr(-3) === '.js') {
        require('./probe/' + fileName);
      }
    });
  } catch(e) {}

  // Export a middleware component for AJAX endpoints
  var app = module.exports = function(request, response, next) {

    // Process dynamic app endpoints here
    if (request.url === '/status') {
      response.writeHead(200, {'Content-Type': 'text/plan'});
      return response.end('ok');
    }

    // Forward to the static endpoint, then to the next step
    // if the file isn't there.  The next step is a monitor page.
    return Static(request, response, next);
  }

}(this));


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Principal;
using System.Text;
using System.Threading.Tasks;

namespace EnvironmentVariablesWPF.BLL
{
    /// <summary>
    /// Mangager of Admin right.
    /// Can determine if currennt user have admin right.
    /// </summary>
    public static class AdminRigthManager
    {
        /// <summary>
        /// Return true if the current user of program have admin right.
        /// </summary>
        /// <returns>True if the current user of program have admin right.</returns>
        public static bool IsAdmin()
        {
            WindowsIdentity user = WindowsIdentity.GetCurrent();
            WindowsPrincipal principal = new WindowsPrincipal(user);
            return principal.IsInRole(WindowsBuiltInRole.Administrator);
        }
    }
}


text:
 File.open(File.join(RAILS_ROOT, '/vendor/plugins/acts_as_linked/', 'README')).each do |f|
   print f.gets
 end

`rake linked:migrate_up`


text:
`toWords()` returns the value of the BigArith object in English words using the [Short Scale](https://osofem.github.io/bigarith.js/documentation/short_scales.html) naming system.

#### Syntax
##### method function
```javascript
ba.toWords();
```

### Parameters
#### method function
*none*

### Return value
#### method function - {string}
Returns the value of the BigArith object in English words using the [Short Scale](https://osofem.github.io/bigarith.js/documentation/short_scales.html) naming system.

### Description
If the value of the BigArith object evaluate to NaN, NaN is returned.

>This function has a limit of (±1x10^1,005)-0.0000{insert 195 more zeroes}01 (i.e. nine hundred and ninety nine trecentretrigintillion point nine nine nine nine nine {insert 195 more "nine"'s}).

That is 1,005 length of characteristic (parts before the decimal point) and 200 length of mantissa (parts after the decimal point). If the limit is exceeded, a RangeError is thrown.

### Examples
> In the server-side, always remember to add the line `var BigArith = require('bigarith.js');` however every other thing remains the same in both server-side and client-side code.

#### Using method function
```javascript
var ba = new BigArith(1000);
console.log(ba.toWords()); //logs "one thousand" to console

ba = new BigArith(1e3);
console.log(ba.toWords()); //logs "one thousand" to console

ba = new BigArith("1000");
console.log(ba.toWords()); //logs "one thousand" to console

ba = new BigArith("one thousand");
console.log(ba.toWords()); //logs "one thousand" to console

ba = new BigArith("-1002.789");
console.log(ba.toWords()); //logs "negative one thousand two point seven eight nine" to console

ba = new BigArith();
console.log(ba.toWords()); //logs "zero" to console

ba = new BigArith(NaN);
console.log(ba.toWords()); //logs NaN to console
```

More examples [here](https://github.com/osofem/bigarith.js/tree/master/examples/). Full documentation [here](https://github.com/osofem/bigarith.js/tree/master/documentation)

### See also
* [toFixed()](https://osofem.github.io/bigarith.js/documentation/tofixed.html)
* [valueOf()](https://osofem.github.io/bigarith.js/documentation/valueof.html)
* [toString()](https://osofem.github.io/bigarith.js/documentation/tostring.html)