text:
/*
 * Position.h
 *
 *
 */

#ifndef _Position_H_
#define _Position_H_

#include <string>
#include "Position_data_inner.h"
#include <list>
#include "Object.h"

/** \defgroup Models Data Structures for API
 *  Classes containing all the Data Structures needed for calling/returned by API endpoints
 *
 */

namespace Tizen {
namespace ArtikCloud {

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

class Position : public Object {
public:
	/*! \brief Constructor.
	 */
	Position();
	Position(char* str);

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

	/*! \brief Retrieve a string JSON representation of this class.
	 */
	char* toJson();

	/*! \brief Fills in members of this class from JSON string representing it.
	 */
	void fromJson(char* jsonStr);

	/*! \brief Get Exchange identifier used to identify the routing destination.
	 */
	std::string getExchangeId();

	/*! \brief Set Exchange identifier used to identify the routing destination.
	 */
	void setExchangeId(std::string  exchange_id);
	/*! \brief Get
	 */
	std::list<Position_data_inner> getData();

	/*! \brief Set
	 */
	void setData(std::list <Position_data_inner> data);

private:
	std::string exchange_id;
	std::list <Position_data_inner>data;
	void __init();
	void __cleanup();

};
}
}

#endif /* _Position_H_ */


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<title>Source code</title>
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">

001
002
007
008package org.jsimpledb.core;
009
010import com.google.common.reflect.TypeToken;
011
012import java.util.Collection;
013import java.util.Collections;
014import java.util.Iterator;
015import java.util.List;
016import java.util.SortedSet;
017
018/**
019 * Superclass of fields with types assignable to {@link Collection}.
020 *
021 * @param <C> Java collection type
022 * @param <E> Java collection element type
023 */
024public abstract class CollectionField<C extends Collection<E>, E> extends ComplexField<C> {
025
026    public static final String ELEMENT_FIELD_NAME = "element";
027
028    final SimpleField<E> elementField;
029
030    /**
031     * Constructor.
032     *
033     * @param name the name of the field
034     * @param storageId field content storage ID
035     * @param typeToken Java type for the field's values
036     * @param schema schema version
037     * @param elementField this field's element sub-field
038     * @throws IllegalArgumentException if any parameter is null
039     * @throws IllegalArgumentException if {@code storageId} is non-positive
040     */
041    CollectionField(String name, int storageId, Schema schema, TypeToken<C> typeToken, SimpleField<E> elementField) {
042        super(name, storageId, schema, typeToken);
043        if (elementField == null)
044            throw new IllegalArgumentException("null elementField");
045        this.elementField = elementField;
046        assert this.elementField.parent == null;
047        this.elementField.parent = this;
048    }
049
050// Public methods
051
052    /**
053     * Get the element field.
054     *
055     * @return collection element field
056     */
057    public SimpleField<E> getElementField() {
058        return this.elementField;
059    }
060
061    @Override
062    public final List<SimpleField<E>> getSubFields() {
063        return Collections.<SimpleField<E>>singletonList(this.elementField);
064    }
065
066    @Override
067    public boolean hasDefaultValue(Transaction tx, ObjId id) {
068        return this.getValue(tx, id).isEmpty();
069    }
070
071    @Override
072    public abstract C getValue(Transaction tx, ObjId id);
073
074// Non-public methods
075
076    @Override
077    @SuppressWarnings("unchecked")
078    <F> Iterable<F> iterateSubField(Transaction tx, ObjId id, SimpleField<F> subField) {
079        if (subField == this.elementField)
080            return (Iterable<F>)this.getValue(tx, id);
081        throw new IllegalArgumentException("unknown sub-field");
082    }
083
084    @Override
085    abstract CollectionFieldStorageInfo<C, E> toStorageInfo();
086
087    @Override
088    void unreferenceRemovedObjectTypes(Transaction tx, ObjId id, ReferenceField subField, SortedSet<Integer> removedStorageIds) {
089        assert subField == this.elementField;
090        for (Iterator<?> i = this.getValueInternal(tx, id).iterator(); i.hasNext(); ) {
091            final ObjId ref = (ObjId)i.next();
092            if (ref != null && removedStorageIds.contains(ref.getStorageId()))
093                i.remove();
094        }
095    }
096}
097

redpajama_set_name: RedPajamaGithub


text:
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-}
module GHCJS.DOM.JSFFI.Generated.SVGFEColorMatrixElement
       (pattern SVG_FECOLORMATRIX_TYPE_UNKNOWN,
        pattern SVG_FECOLORMATRIX_TYPE_MATRIX,
        pattern SVG_FECOLORMATRIX_TYPE_SATURATE,
        pattern SVG_FECOLORMATRIX_TYPE_HUEROTATE,
        pattern SVG_FECOLORMATRIX_TYPE_LUMINANCETOALPHA, js_getIn1, getIn1,
        js_getType, getType, js_getValues, getValues,
        SVGFEColorMatrixElement, castToSVGFEColorMatrixElement,
        gTypeSVGFEColorMatrixElement)
       where
import Prelude ((.), (==), (>>=), return, IO, Int, Float, Double, Bool(..), Maybe, maybe, fromIntegral, round, fmap, Show, Read, Eq, Ord)
import Data.Typeable (Typeable)
import GHCJS.Types (JSVal(..), JSString)
import GHCJS.Foreign (jsNull)
import GHCJS.Foreign.Callback (syncCallback, asyncCallback, syncCallback1, asyncCallback1, syncCallback2, asyncCallback2, OnBlocked(..))
import GHCJS.Marshal (ToJSVal(..), FromJSVal(..))
import GHCJS.Marshal.Pure (PToJSVal(..), PFromJSVal(..))
import Control.Monad.IO.Class (MonadIO(..))
import Data.Int (Int64)
import Data.Word (Word, Word64)
import GHCJS.DOM.Types
import Control.Applicative ((<$>))
import GHCJS.DOM.EventTargetClosures (EventName, unsafeEventName)
import GHCJS.DOM.JSFFI.Generated.Enums
pattern SVG_FECOLORMATRIX_TYPE_UNKNOWN = 0
pattern SVG_FECOLORMATRIX_TYPE_MATRIX = 1
pattern SVG_FECOLORMATRIX_TYPE_SATURATE = 2
pattern SVG_FECOLORMATRIX_TYPE_HUEROTATE = 3
pattern SVG_FECOLORMATRIX_TYPE_LUMINANCETOALPHA = 4

foreign import javascript unsafe "$1[\"in1\"]" js_getIn1 ::
        SVGFEColorMatrixElement -> IO (Nullable SVGAnimatedString)

-- | <https://developer.mozilla.org/en-US/docs/Web/API/SVGFEColorMatrixElement.in1 Mozilla SVGFEColorMatrixElement.in1 documentation>
getIn1 ::
       (MonadIO m) =>
         SVGFEColorMatrixElement -> m (Maybe SVGAnimatedString)
getIn1 self = liftIO (nullableToMaybe <$> (js_getIn1 (self)))

foreign import javascript unsafe "$1[\"type\"]" js_getType ::
        SVGFEColorMatrixElement -> IO (Nullable SVGAnimatedEnumeration)

-- | <https://developer.mozilla.org/en-US/docs/Web/API/SVGFEColorMatrixElement.type Mozilla SVGFEColorMatrixElement.type documentation>
getType ::
        (MonadIO m) =>
          SVGFEColorMatrixElement -> m (Maybe SVGAnimatedEnumeration)
getType self = liftIO (nullableToMaybe <$> (js_getType (self)))

foreign import javascript unsafe "$1[\"values\"]" js_getValues ::
        SVGFEColorMatrixElement -> IO (Nullable SVGAnimatedNumberList)

-- | <https://developer.mozilla.org/en-US/docs/Web/API/SVGFEColorMatrixElement.values Mozilla SVGFEColorMatrixElement.values documentation>
getValues ::
          (MonadIO m) =>
            SVGFEColorMatrixElement -> m (Maybe SVGAnimatedNumberList)
getValues self = liftIO (nullableToMaybe <$> (js_getValues (self)))


text:
package ru.job4j.dsagai.lesson3.food;

import java.util.Date;

/**
 * Abstract class Food
 * @author dsagai
 * @version 1.01
 * @since 12.01.2017
 */
public abstract class Food {

    //Brand or name
    private final String name;
    //Date of creation
    private final Date createDate;
    //Final date when food unqualified
    private final Date expireDate;
    //base price for one item
    private final double price;
    private final int minTemp;
    private final int maxTemp;

    //discount
    private double discount;

    /**
     * Default constructor.
     * @param name String.
     * @param createDate Date.
     * @param expireDate Date.
     * @param price double.
     * @param minTemp int.
     * @param maxTemp int.
     */
    public Food(String name, Date createDate, Date expireDate, double price, int minTemp, int maxTemp) {
        this.name = name;
        this.createDate = createDate;
        this.expireDate = expireDate;
        this.price = price;
        this.discount = 0d;
        this.minTemp = minTemp;
        this.maxTemp = maxTemp;
    }

    /**
     * getter name.
     * @return String product name
     */
    public String getName() {
        return name;
    }

    /**
     * getter createDate.
     * @return Date createDate.
     */
    public Date getCreateDate() {
        return createDate;
    }

    /**
     * gettet expireDate.
     * @return Date expireDate.
     */
    public Date getExpireDate() {
        return expireDate;
    }

    /**
     * getter price.
     * @return double price.
     */
    public double getPrice() {
        return price;
    }

    /**
     * getter discount.
     * @return double discount.
     */
    public double getDiscount() {
        return discount;
    }

    /**
     * setter discount.
     * @param discount double.
     */
    public void setDiscount(double discount) {
        this.discount = discount;
    }

    /**
     * method returns product expiration progress.
     * @param curDate Date.
     * @return double.
     */
    public double getExpireProgress(Date curDate){
        long fullPeriod = this.expireDate.getTime() - this.createDate.getTime();
        long timeLeft = curDate.getTime() - this.createDate.getTime();
        return (double)timeLeft / fullPeriod;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        Food food = (Food) o;

        if (!name.equals(food.name)) return false;
        return createDate.equals(food.createDate);
    }

    @Override
    public int hashCode() {
        int result = name.hashCode();
        result = 31 * result + createDate.hashCode();
        return result;
    }

    @Override
    public String toString() {
        return "Food{" +
                "name='" + name + '\'' +
                ", createDate=" + createDate +
                '}';
    }

    /**
     * getter minTemp.
     * @return int degree.
     */
    public int getMinTemp() {
        return minTemp;
    }

    /**
     * getter maxTemp.
     * @return int degree.
     */
    public int getMaxTemp() {
        return maxTemp;
    }

    /**
     *
     * @param temp int.
     * @return true if temperature is appropriate for storing food item
     */
    public boolean isAppropriateTemperature(int temp) {
        return temp >= this.minTemp && temp <= this.maxTemp;
    }
}


text:
import os
from unittest import TestCase
from xmlrpclib import loads, dumps

import pylons
from paste.wsgiwrappers import WSGIRequest, WSGIResponse
from pylons.util import ContextObj
from routes import request_config

data_dir = os.path.dirname(os.path.abspath(__file__))

try:
    shutil.rmtree(data_dir)
except:
    pass

class TestWSGIController(TestCase):
    def setUp(self):
        self.environ = {'pylons.routes_dict':dict(action='index'),
                        'paste.config':dict(global_conf=dict(debug=True))}
        pylons.c._push_object(ContextObj())

    def tearDown(self):
        pylons.c._pop_object()

    def get_response(self, **kargs):
        url = kargs.pop('_url', '/')
        self.environ['pylons.routes_dict'].update(kargs)
        return self.app.get(url, extra_environ=self.environ)

    def post_response(self, **kargs):
        url = kargs.pop('_url', '/')
        self.environ['pylons.routes_dict'].update(kargs)
        return self.app.post(url, extra_environ=self.environ, params=kargs)

    def xmlreq(self, method, args=None):
        if args is None:
            args = ()
        ee = dict(CONTENT_TYPE='text/xml')
        data = dumps(args, methodname=method)
        self.response = response = self.app.post('/', params = data, extra_environ=ee)
        return loads(response.body)[0][0]

class ControllerWrap(object):
    def __init__(self, controller):
        self.controller = controller

    def __call__(self, environ, start_response):
        app = self.controller()
        app.start_response = None
        return app(environ, start_response)

class SetupCacheGlobal(object):
    def __init__(self, app, environ, setup_g=True, setup_cache=False,
                 setup_session=False):
        if setup_g:
            g = type('G object', (object,), {})
            g.message = 'Hello'
            g.counter = 0
            g.pylons_config = type('App conf', (object,), {})
            g.pylons_config.app_conf = dict(cache_enabled='True')
            self.g = g
        self.app = app
        self.environ = environ
        self.setup_cache = setup_cache
        self.setup_session = setup_session
        self.setup_g = setup_g

    def __call__(self, environ, start_response):
        registry = environ['paste.registry']
        environ_config = environ.setdefault('pylons.environ_config', {})
        if self.setup_cache:
            registry.register(pylons.cache, environ['beaker.cache'])
            environ_config['cache'] = 'beaker.cache'
        if self.setup_session:
            registry.register(pylons.session, environ['beaker.session'])
            environ_config['session'] = 'beaker.session'
        if self.setup_g:
            registry.register(pylons.g, self.g)

        # Update the environ
        environ.update(self.environ)
        registry.register(pylons.request, WSGIRequest(environ))
        registry.register(pylons.response, WSGIResponse())
        return self.app(environ, start_response)


text:
package org.asynchttpclient.oauth;

import org.asynchttpclient.FluentStringsMap;
import org.asynchttpclient.Request;
import org.asynchttpclient.RequestBuilderBase;
import org.asynchttpclient.SignatureCalculator;
import org.asynchttpclient.util.Base64;
import org.asynchttpclient.util.UTF8Codec;
import org.asynchttpclient.util.UTF8UrlEncoder;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.Random;

/**
 * Simple OAuth signature calculator that can used for constructing client signatures
 * for accessing services that use OAuth for authorization.
 * <p/>
 * Supports most common signature inclusion and calculation methods: HMAC-SHA1 for
 * calculation, and Header inclusion as inclusion method. Nonce generation uses
 * simple random numbers with base64 encoding.
 *
 * @author tatu (tatu.saloranta@iki.fi)
 */
public class OAuthSignatureCalculator
        implements SignatureCalculator {
    public final static String HEADER_AUTHORIZATION = "Authorization";

    private static final String KEY_OAUTH_CONSUMER_KEY = "oauth_consumer_key";
    private static final String KEY_OAUTH_NONCE = "oauth_nonce";
    private static final String KEY_OAUTH_SIGNATURE = "oauth_signature";
    private static final String KEY_OAUTH_SIGNATURE_METHOD = "oauth_signature_method";
    private static final String KEY_OAUTH_TIMESTAMP = "oauth_timestamp";
    private static final String KEY_OAUTH_TOKEN = "oauth_token";
    private static final String KEY_OAUTH_VERSION = "oauth_version";

    private static final String OAUTH_VERSION_1_0 = "1.0";
    private static final String OAUTH_SIGNATURE_METHOD = "HMAC-SHA1";

    /**
     * To generate Nonce, need some (pseudo)randomness; no need for
     * secure variant here.
     */
    protected final Random random;

    protected final byte[] nonceBuffer = new byte[16];

    protected final ThreadSafeHMAC mac;

    protected final ConsumerKey consumerAuth;

    protected final RequestToken userAuth;

    /**
     * @param consumerAuth Consumer key to use for signature calculation
     * @param userAuth     Request/access token to use for signature calculation
     */
    public OAuthSignatureCalculator(ConsumerKey consumerAuth, RequestToken userAuth) {
        mac = new ThreadSafeHMAC(consumerAuth, userAuth);
        this.consumerAuth = consumerAuth;
        this.userAuth = userAuth;
        random = new Random(System.identityHashCode(this) + System.currentTimeMillis());
    }

    //@Override // silly 1.5; doesn't allow this for interfaces

    public void calculateAndAddSignature(String baseURL, Request request, RequestBuilderBase<?> requestBuilder) {
        String method = request.getMethod(); // POST etc
        String nonce = generateNonce();
        long timestamp = System.currentTimeMillis() / 1000L;
        String signature = calculateSignature(method, baseURL, timestamp, nonce, request.getParams(), request.getQueryParams());
        String headerValue = constructAuthHeader(signature, nonce, timestamp);
        requestBuilder.setHeader(HEADER_AUTHORIZATION, headerValue);
    }

    /**
     * Method for calculating OAuth signature using HMAC/SHA-1 method.
     */
    public String calculateSignature(String method, String baseURL, long oauthTimestamp, String nonce,
                                     FluentStringsMap formParams, FluentStringsMap queryParams) {
        StringBuilder signedText = new StringBuilder(100);
        signedText.append(method); // POST / GET etc (nothing to URL encode)
        signedText.append('&');

        /* 07-Oct-2010, tatu: URL may contain default port number; if so, need to extract
         *   from base URL.
         */
        if (baseURL.startsWith("http:")) {
            int i = baseURL.indexOf(":80/", 4);
            if (i > 0) {
                baseURL = baseURL.substring(0, i) + baseURL.substring(i + 3);
            }
        } else if (baseURL.startsWith("https:")) {
            int i = baseURL.indexOf(":443/", 5);
            if (i > 0) {
                baseURL = baseURL.substring(0, i) + baseURL.substring(i + 4);
            }
        }
        signedText.append(UTF8UrlEncoder.encode(baseURL));

        /**
         * List of all query and form parameters added to this request; needed
         * for calculating request signature
         */
        OAuthParameterSet allParameters = new OAuthParameterSet();

        // start with standard OAuth parameters we need
        allParameters.add(KEY_OAUTH_CONSUMER_KEY, consumerAuth.getKey());
        allParameters.add(KEY_OAUTH_NONCE, nonce);
        allParameters.add(KEY_OAUTH_SIGNATURE_METHOD, OAUTH_SIGNATURE_METHOD);
        allParameters.add(KEY_OAUTH_TIMESTAMP, String.valueOf(oauthTimestamp));
        allParameters.add(KEY_OAUTH_TOKEN, userAuth.getKey());
        allParameters.add(KEY_OAUTH_VERSION, OAUTH_VERSION_1_0);

        if (formParams != null) {
            for (Map.Entry<String, List<String>> entry : formParams) {
                String key = entry.getKey();
                for (String value : entry.getValue()) {
                    allParameters.add(key, value);
                }
            }
        }
        if (queryParams != null) {
            for (Map.Entry<String, List<String>> entry : queryParams) {
                String key = entry.getKey();
                for (String value : entry.getValue()) {
                    allParameters.add(key, value);
                }
            }
        }
        String encodedParams = allParameters.sortAndConcat();

        // and all that needs to be URL encoded (... again!)
        signedText.append('&');
        UTF8UrlEncoder.appendEncoded(signedText, encodedParams);

        byte[] rawBase = UTF8Codec.toUTF8(signedText.toString());
        byte[] rawSignature = mac.digest(rawBase);
        // and finally, base64 encoded... phew!
        return Base64.encode(rawSignature);
    }

    /**
     * Method used for constructing
     */
    public String constructAuthHeader(String signature, String nonce, long oauthTimestamp) {
        StringBuilder sb = new StringBuilder(200);
        sb.append("OAuth ");
        sb.append(KEY_OAUTH_CONSUMER_KEY).append("=\"").append(consumerAuth.getKey()).append("\", ");
        sb.append(KEY_OAUTH_TOKEN).append("=\"").append(userAuth.getKey()).append("\", ");
        sb.append(KEY_OAUTH_SIGNATURE_METHOD).append("=\"").append(OAUTH_SIGNATURE_METHOD).append("\", ");

        // careful: base64 has chars that need URL encoding:
        sb.append(KEY_OAUTH_SIGNATURE).append("=\"");
        UTF8UrlEncoder.appendEncoded(sb, signature).append("\", ");
        sb.append(KEY_OAUTH_TIMESTAMP).append("=\"").append(oauthTimestamp).append("\", ");

        // also: nonce may contain things that need URL encoding (esp. when using base64):
        sb.append(KEY_OAUTH_NONCE).append("=\"");
        UTF8UrlEncoder.appendEncoded(sb, nonce);
        sb.append("\", ");

        sb.append(KEY_OAUTH_VERSION).append("=\"").append(OAUTH_VERSION_1_0).append("\"");
        return sb.toString();
    }

    private synchronized String generateNonce() {
        random.nextBytes(nonceBuffer);
        // let's use base64 encoding over hex, slightly more compact than hex or decimals
        return Base64.encode(nonceBuffer);
//      return String.valueOf(Math.abs(random.nextLong()));
    }

    /**
     * Container for parameters used for calculating OAuth signature.
     * About the only confusing aspect is that of whether entries are to be sorted
     * before encoded or vice versa: if my reading is correct, encoding is to occur
     * first, then sorting; although this should rarely matter (since sorting is primary
     * by key, which usually has nothing to encode)... of course, rarely means that
     * when it would occur it'd be harder to track down.
     */
    final static class OAuthParameterSet {
        final private ArrayList<Parameter> allParameters = new ArrayList<Parameter>();

        public OAuthParameterSet() {
        }

        public OAuthParameterSet add(String key, String value) {
            Parameter p = new Parameter(UTF8UrlEncoder.encode(key), UTF8UrlEncoder.encode(value));
            allParameters.add(p);
            return this;
        }

        public String sortAndConcat() {
            // then sort them (AFTER encoding, important)
            Parameter[] params = allParameters.toArray(new Parameter[allParameters.size()]);
            Arrays.sort(params);

            // and build parameter section using pre-encoded pieces:
            StringBuilder encodedParams = new StringBuilder(100);
            for (Parameter param : params) {
                if (encodedParams.length() > 0) {
                    encodedParams.append('&');
                }
                encodedParams.append(param.key()).append('=').append(param.value());
            }
            return encodedParams.toString();
        }
    }

    /**
     * Helper class for sorting query and form parameters that we need
     */
    final static class Parameter implements Comparable<Parameter> {
        private final String key, value;

        public Parameter(String key, String value) {
            this.key = key;
            this.value = value;
        }

        public String key() {
            return key;
        }

        public String value() {
            return value;
        }

        //@Override // silly 1.5; doesn't allow this for interfaces

        public int compareTo(Parameter other) {
            int diff = key.compareTo(other.key);
            if (diff == 0) {
                diff = value.compareTo(other.value);
            }
            return diff;
        }

        @Override
        public String toString() {
            return key + "=" + value;
        }

        @Override
        public boolean equals(Object o) {
            if (this == o) return true;
            if (o == null || getClass() != o.getClass()) return false;

            Parameter parameter = (Parameter) o;

            if (!key.equals(parameter.key)) return false;
            if (!value.equals(parameter.value)) return false;

            return true;
        }

        @Override
        public int hashCode() {
            int result = key.hashCode();
            result = 31 * result + value.hashCode();
            return result;
        }
    }
}


text:
Here you'll find some example
content to show Aloha's possibilities
regarding any kind of formatting.<o:p></o:p>

Headline 1<o:p></o:p>

Headline 2<o:p></o:p>

Headline 3<o:p></o:p>

Headline 4<o:p></o:p>

Headline 5<o:p></o:p>

Headline 6<o:p></o:p>

<o:p> </o:p>

Here we test, a link
and other formattings such as bold, italic or <s>deleted text</s>. You may also
use formattings for maths 22 = 4 or chemical formulas like CO2.
Or you may edit tables as you do in office products.<o:p></o:p>

<o:p> </o:p>

This<o:p></o:p>

is<o:p></o:p>

a<o:p></o:p>

demo<o:p></o:p>

table<o:p></o:p>

with<o:p></o:p>

an<o:p></o:p>

awesome<o:p></o:p>

column<o:p></o:p>

and<o:p></o:p>

row<o:p></o:p>

span<o:p></o:p>

!<o:p></o:p>

<o:p> </o:p>

·
List entry<o:p></o:p>

o
List entry<o:p></o:p>

o
List entry<o:p></o:p>

§
List entry<o:p></o:p>

§
List entry<o:p></o:p>

·
List entry<o:p></o:p>

·
List entry<o:p></o:p>

·
List entry<o:p></o:p>

a.
List entry<o:p></o:p>

a.
List entry<o:p></o:p>

b.
List entry<o:p></o:p>

i.     List
entry<o:p></o:p>

ii.     List
entry<o:p></o:p>

b.
List entry<o:p></o:p>

c.
List entry<o:p></o:p>

d.
List entry<o:p></o:p>

<o:p> </o:p>

For better sematical understanding and WAI compatibility you
can describe abbreviations like HTML and CSS.<o:p></o:p>


text:
package com.boundary.metrics.vmware.client.subaccount;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import org.hibernate.validator.constraints.NotEmpty;

@JsonIgnoreProperties(ignoreUnknown = true)
public class SubAccountInfo {

    @JsonProperty
    @NotEmpty
    private String email;

    @JsonProperty
    @NotEmpty
    private String apiToken;

    public String getCredentials() {
        return email + ":" + apiToken;
    }
}


text:
package ligueBaseball.exceptions;

public class MatchAlreadyHaveTheMaximumNumberOfOfficialsException extends Exception
{
    private static final long serialVersionUID = -8594418341439367495L;

    public MatchAlreadyHaveTheMaximumNumberOfOfficialsException() {
        super("Le match a déjà le nombre maximal d'arbitres (4).");
    }
}


text:
<?php

/**
 *
 * @package Yasc
 * @subpackage Yasc_Autoloader
 * @copyright Copyright (c) 2010 - 2014 Juan Felipe Alvarez Sadarriaga. (http://juan.im)
 * @license http://github.com/nebiros/yasc/raw/master/LICENSE New BSD License
 * @author nebiros
 */
class Yasc_Autoloader_Manager {
    const PATH_TYPE_VIEW = 1;
    const PATH_TYPE_VIEW_HELPER = 2;
    const PATH_TYPE_FUNCTION_HELPER = 3;
    const PATH_TYPE_MODEL = 4;
    const PATH_TYPE_NS = 5;

    /**
     *
     * @var Yasc_Autoloader_Manager
     */
    protected static $_instance = null;

    /**
     *
     * @var array
     */
    protected $_paths = array(
        self::PATH_TYPE_VIEW => array(),
        self::PATH_TYPE_VIEW_HELPER => array(),
        self::PATH_TYPE_FUNCTION_HELPER => array(),
        self::PATH_TYPE_MODEL => array(),
        self::PATH_TYPE_NS => array()
    );

    /**
     *
     * @return Yasc_Autoloader_Manager
     */
    public static function getInstance() {
        if (null === self::$_instance) {
            self::$_instance = new self();
        }

        return self::$_instance;
    }

    protected function __construct() {}
    protected function __clone() {}

    /**
     *
     * @param int $type
     * @param string $path
     * @param string $classPrefix
     * @return Yasc_Autoloader_Manager
     */
    public function setIncludePath($type, $path, $classPrefix = null) {
        if (false === is_numeric($type)) {
            throw new Yasc_App_Exception("Path type must be a number");
        }

        if (false === ($path = self::$_instance->_setupPath($path, $classPrefix))) {
            return false;
        }

        self::$_instance->clearIncludePaths($type)->addIncludePath($type, $path, $classPrefix);
        return self::$_instance;
    }

    /**
     *
     * @param int $type
     * @param string $path
     * @param string|null $classPrefix
     * @return Yasc_Autoloader_Manager
     */
    public function addIncludePath($type, $path, $classPrefix = null) {
        if (false === is_numeric($type)) {
            throw new Yasc_App_Exception("Path type must be a number");
        }

        $classPrefix = self::$_instance->_setupClassPrefix($classPrefix);

        if (false === ($path = self::$_instance->_setupPath($path, $classPrefix))) {
            return false;
        }

        self::$_instance->_paths[$type][$classPrefix] = $path;

        if (false === array_search($path, explode(PATH_SEPARATOR, get_include_path()))) {
            set_include_path(implode(PATH_SEPARATOR, array(
                $path,
                get_include_path()
            )));
        }

        return self::$_instance;
    }

    /**
     *
     * @param int $type
     * @param string|null $classPrefix
     * @return Yasc_Autoloader_Manager
     */
    public function clearIncludePath($type, $classPrefix = null) {
        if (false === is_numeric($type)) {
            throw new Yasc_App_Exception("Path type must be a number");
        }

        $classPrefix = self::$_instance->_setupClassPrefix($classPrefix);
        $includePaths = array_flip(explode(PATH_SEPARATOR, get_include_path()));
        unset($includePaths[self::$_instance->_paths[$type][$classPrefix]],
            self::$_instance->_paths[$type][$classPrefix]);
        set_include_path(implode(PATH_SEPARATOR, array_keys($includePaths)));

        switch ((int) $type) {
            case self::PATH_TYPE_FUNCTION_HELPER:
                self::$_instance->addPath(
                    self::PATH_TYPE_FUNCTION_HELPER,
                    realpath(dirname(__FILE__) . "/../Function/Helper"),
                    "Yasc_Function_Helper"
                );

                break;

            case self::PATH_TYPE_VIEW_HELPER:
            default:
                self::$_instance->addPath(
                    self::PATH_TYPE_VIEW_HELPER,
                    realpath(dirname(__FILE__) . "/../View/Helper"),
                    "Yasc_View_Helper"
                );

                break;
        }

        return self::$_instance;
    }

    /**
     *
     * @param type $type
     * @return Yasc_Autoloader_Manager
     */
    public function clearIncludePaths($type) {
        if (false === is_numeric($type)) {
            throw new Yasc_App_Exception("Path type must be a number");
        }

        $includePaths = explode(PATH_SEPARATOR, get_include_path());
        $paths = array_diff($includePaths, self::$_instance->_paths[$type]);
        self::$_instance->_paths[$type] = array();
        set_include_path(implode(PATH_SEPARATOR, $paths));
        return self::$_instance;
    }

    /**
     *
     * @param int $type
     * @param string|null $classPrefix
     * @return string
     */
    public function getPath($type, $classPrefix = null) {
        if (false === is_numeric($type)) {
            throw new Yasc_App_Exception("Path type must be a number");
        }

        $classPrefix = self::$_instance->_setupClassPrefix($classPrefix);
        return self::$_instance->_paths[$type][$classPrefix];
    }

    /**
     *
     * @param string $type
     * @param string $path
     * @param string|null $classPrefix
     * @return Yasc_Autoloader_Manager
     */
    public function setPath($type, $path, $classPrefix = null) {
        if (false === is_numeric($type)) {
            throw new Yasc_App_Exception("Path type must be a number");
        }

        self::$_instance->clearIncludePaths($type)
            ->addPath($type, $path, $classPrefix);
        return self::$_instance;
    }

    /**
     *
     * @param string $type
     * @param string $path
     * @param string|null $classPrefix
     * @return Yasc_Autoloader_Manager
     */
    public function addPath($type, $path, $classPrefix = null) {
        if (false === is_numeric($type)) {
            throw new Yasc_App_Exception("Path type must be a number");
        }

        if (false === ($path = self::$_instance->_setupPath($path))) {
            return false;
        }

        if (null !== $classPrefix) {
            $classPrefix = self::$_instance->_setupClassPrefix($classPrefix);
            self::$_instance->_paths[$type] = array_reverse(self::$_instance->_paths[$type], true);
            self::$_instance->_paths[$type][$classPrefix] = $path;
            self::$_instance->_paths[$type] = array_reverse(self::$_instance->_paths[$type], true);
        } else {
            if (true === in_array($path, self::$_instance->_paths[$type])) {
                return self::$_instance;
            }

            array_unshift(self::$_instance->_paths[$type], $path);
        }

        return self::$_instance;
    }

    /**
     *
     * @param int $type
     * @return array
     */
    public function getPaths($type) {
        if (false === is_numeric($type)) {
            throw new Yasc_App_Exception("Path type must be a number");
        }

        return self::$_instance->_paths[$type];
    }

    /**
     *
     * @return array
     */
    public function getAllPaths() {
        return self::$_instance->_paths;
    }

    /**
     *
     * @param string $classPrefix
     * @return string
     */
    protected function _setupClassPrefix($classPrefix = null) {
        if ("_" != substr($classPrefix, -1) && false === empty($classPrefix)) {
            $classPrefix .= "_";
        }

        return $classPrefix;
    }

    /**
     *
     * @param string $path
     * @return string|bool
     */
    protected function _setupPath($path, $classPrefix = null) {
        if (false === is_string($path)) {
            return false;
        }

        $tmp = $path;
        $path = realpath($tmp);

        if (null !== $classPrefix) {
            $prefixFolder = str_replace("_", DIRECTORY_SEPARATOR, $classPrefix);
            $tmp = str_replace($prefixFolder, "", $path);
            $path = realpath($tmp);
        }

        if (false === is_dir($path)) {
            throw new Yasc_App_Exception("Path '{$tmp}' not found");
        }

        return $path;
    }

    /**
     *
     * @param mixed $filename
     * @return string
     */
    public function getNs($filename) {
        return self::$_instance->_normalizePrefix($filename, true);
    }

    /**
     *
     * @param mixed $filename
     * @return string
     */
    public function getPrefix($filename) {
        return self::$_instance->_normalizePrefix($filename);
    }

    /**
     *
     * @param mixed $filename
     * @param bool $ns
     * @return string
     */
    protected function _normalizePrefix($filename, $ns = false) {
        if (false === is_string($filename)) {
            $filename = get_class($filename);
        }

        $parts = explode(".", $filename);

        if (false === empty($parts)) {
            array_pop($parts);
            $filename = $parts[0];
        }

        if (strpos($filename, DIRECTORY_SEPARATOR)) {
            $className = str_replace(DIRECTORY_SEPARATOR, "_", $filename);
        }

        $tmp = array();
        if (isset($className) && strpos($className, "_")) {
            $tmp = explode("_", $className);
        }

        if (true === empty($tmp)) {
            return  "";
        }

        if (true === $ns) {
            $prefix = array_shift($tmp);
        } else {
            array_pop($tmp);
            $prefix = implode("_", $tmp);
        }

        if ("_" != substr($prefix, -1) && false === empty($prefix)) {
            $prefix .= "_";
        }

        return $prefix;
    }
}


text:
function solve(minimumAge, firstPersonName, firstPersonAge, secondPersonName, secondPersonAge) {
    let firstPerson = {
        'name': firstPersonName,
        'age': firstPersonAge
    }

    let secondPerson = {
        'name': secondPersonName,
        'age': secondPersonAge
    }

    if (minimumAge <= firstPersonAge)
        console.log(firstPerson)

    if (minimumAge <= secondPersonAge)
        console.log(secondPerson)
}


text:
package org.apache.commons.imaging.formats.tiff.datareaders;

import java.io.IOException;
import java.io.InputStream;
import java.nio.ByteOrder;

/**
 * Input stream reading 1-8, 16, 24 or 32 bits, starting from the most
 * significant bit, but incapable of reading non-aligned and
 * < 8 bit fields across byte boundaries.
 */
class BitInputStream extends InputStream {
    private final InputStream is;
    private final ByteOrder byteOrder;
    private int cache;
    private int cacheBitsRemaining;
    private long bytesRead;

    BitInputStream(final InputStream is, final ByteOrder byteOrder) {
        this.is = is;
        this.byteOrder = byteOrder;
    }

    @Override
    public int read() throws IOException {
        if (cacheBitsRemaining > 0) {
            throw new IOException("BitInputStream: incomplete bit read");
        }
        return is.read();
    }

    public final int readBits(final int count) throws IOException {
        if (count < 8) {
            if (cacheBitsRemaining == 0) {
                // fill cache
                cache = is.read();
                cacheBitsRemaining = 8;
                bytesRead++;
            }
            if (count > cacheBitsRemaining) {
                throw new IOException(
                        "BitInputStream: can't read bit fields across bytes");
            }

            // int bits_to_shift = cache_bits_remaining - count;
            cacheBitsRemaining -= count;
            final int bits = cache >> cacheBitsRemaining;

            switch (count) {
            case 1:
                return bits & 1;
            case 2:
                return bits & 3;
            case 3:
                return bits & 7;
            case 4:
                return bits & 15;
            case 5:
                return bits & 31;
            case 6:
                return bits & 63;
            case 7:
                return bits & 127;
            }

        }
        if (cacheBitsRemaining > 0) {
            throw new IOException("BitInputStream: incomplete bit read");
        }

        if (count == 8) {
            bytesRead++;
            return is.read();
        }

        /**
         * Taking default order of the Tiff to be Little Endian and reversing
         * the bytes in the end if its Big Endian.This is done because majority
         * (may be all) of the files will be of Little Endian.
         */
        if (byteOrder == ByteOrder.BIG_ENDIAN) {
            switch (count) {
            case 16:
                bytesRead += 2;
                return (is.read() << 8) | (is.read() << 0);
            case 24:
                bytesRead += 3;
                return (is.read() << 16) | (is.read() << 8) | (is.read() << 0);
            case 32:
                bytesRead += 4;
                return (is.read() << 24) | (is.read() << 16) | (is.read() << 8)
                        | (is.read() << 0);
            default:
                break;
            }
        } else {
            switch (count) {
            case 16:
                bytesRead += 2;
                return ((is.read() << 0) | (is.read() << 8));
            case 24:
                bytesRead += 3;
                return ((is.read() << 0) | (is.read() << 8) | (is.read() << 16));
            case 32:
                bytesRead += 4;
                return ((is.read() << 0) | (is.read() << 8) | (is.read() << 16) | (is.read() << 24));
            default:
                break;
            }
        }

        throw new IOException("BitInputStream: unknown error");
    }

    public void flushCache() {
        cacheBitsRemaining = 0;
    }

    public long getBytesRead() {
        return bytesRead;
    }
}


text:
/*
 * 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.
 */

package de.fuberlin.wiwiss.silk.workbench.lift.util

import de.fuberlin.wiwiss.silk.config.Prefixes
import de.fuberlin.wiwiss.silk.linkagerule.{Operator, LinkageRule}
import xml.Elem
import de.fuberlin.wiwiss.silk.linkagerule.similarity.{Comparison, Aggregation}
import de.fuberlin.wiwiss.silk.util.DPair
import de.fuberlin.wiwiss.silk.linkagerule.input.{PathInput, TransformInput}

/**
 * Renders a linkage rule as a tree.
 * jQuery.treeview.js and linkageRuleTree.css must be in the header.
 */
object LinkageRuleTree {

  def render(rule: LinkageRule) = {

    { for(aggregation <- rule.operator.toList) yield renderOperator(aggregation) }

  }

  /**
   * Renders a linkage rule operator.
   */
  private def renderOperator(op: Operator): Elem = op match  {
    case Aggregation(id, required, weight, aggregator, operators) => {

        Aggregation: {aggregator.pluginId}

        { operators.map(renderOperator) }

    }
    case Comparison(id, required, weight, threshold, indexing, metric, DPair(input1, input2)) => {

        Comparison: {metric.pluginId} ({threshold.toString})

          { renderOperator(input1) }
          { renderOperator(input2) }

    }
    case TransformInput(id, transformer, inputs) => {

        Transformation: {transformer.pluginId}

          { inputs.map(renderOperator) }

    }
    case PathInput(id, path) => {

        Input: {path.serialize}

    }
  }
}


text:
/*global require, process, describe, it, xit, before, beforeEach, after, afterEach */
"use strict";

/***********************************************************************************************************************
 * General Test Dependencies
 **/
var expect = require('expect.js');
var _ = require('underscore');
var async = require('async');

/***********************************************************************************************************************
 * Unit-Under-Test Dependencies
 **/
var bayes = require('../lib/naiveBayes');

/***********************************************************************************************************************
 * The Tests!
 **/
describe('Naive Bayes Classifier', function () {
    var colorsAndAnimals = {
        trains: 2,
        classifies: 0,
        cnt: 14,
        fudgeFactor: 0.1,
        classes: {color: 7, animal: 7},
        tokens: {
            red: {_cnt: 1, color: 1},
            orange: {_cnt: 1, color: 1},
            yellow: {_cnt: 1, color: 1},
            green: {_cnt: 1, color: 1},
            blue: {_cnt: 1, color: 1},
            indigo: {_cnt: 1, color: 1},
            violet: {_cnt: 1, color: 1},
            dog: {_cnt: 1, animal: 1},
            cat: {_cnt: 1, animal: 1},
            bird: {_cnt: 1, animal: 1},
            fish: {_cnt: 1, animal: 1},
            rabbit: {_cnt: 1, animal: 1},
            snake: {_cnt: 1, animal: 1},
            hamster: {_cnt: 1, animal: 1}
        }
    };

    describe('train', function () {
        it('should be a function', function (done) {
            expect((new bayes()).train).to.be.a('function');
            return done();
        });

        it('should work on a basic example', function (done) {
            var b = new bayes();

            b.train('color', 'red orange yellow green blue indigo violet');
            b.train('animal', 'dog cat bird fish rabbit snake hamster');

            expect(b.dump()).to.eql(colorsAndAnimals);

            return done();
        });
    }); // describe('train')

    describe('classify', function () {
        it('should be a function', function (done) {
            expect((new bayes()).train).to.be.a('function');
            return done();
        });

        it('should work on a basic example', function (done) {
            var b = new bayes();

            b.restore(colorsAndAnimals);
            expect(b.dump()).to.eql(colorsAndAnimals);

            expect(b.classify('cat dog')).to.eql({class: 'animal', p: 0.01020408163265306});
            expect(b.classify('red green bird')).to.eql({class: 'color', p: 0.0001457725947521866});

            return done();
        });
    }); // describe('classify')
}); // describe('Naive Bayes Classifier')


text:
/**
 * TraceLog.java
 * 2014-4-14
 */
package com.mtools.core.plugin.entity;

import java.sql.Timestamp;

/**
 * @author zhang
 *
 *         2014-4-14
 */
public class TraceLog  extends BaseDbStruct{

	/**
	 *
	 */
	private static final long serialVersionUID = 6033205800212075344L;
	public static final String TABLE_ALIAS = "tl";
	public static final String TABLE_NAME = "TRACELOG";
	public static final String[] TABLE_KEYS = { "optid" };

	private String optid;// 操作编号
	private String loginuser;// 操作用户
	private String optUrl;// 功能url
	private String optName;// 操作功能
	private String orgParams;// 原参数
	private Timestamp optTime;// 操作时间
	private String optResult;// 0操作失败 1操作成功
	private String fromIp;//访问者ip

	public String getOptid() {
		return optid;
	}

	public void setOptid(String optid) {
		this.optid = optid;
	}

	public String getFromIp() {
		return fromIp;
	}

	public void setFromIp(String fromIp) {
		this.fromIp = fromIp;
	}

	public String getLoginuser() {
		return loginuser;
	}

	public void setLoginuser(String loginuser) {
		this.loginuser = loginuser;
	}

	public String getOptUrl() {
		return optUrl;
	}

	public void setOptUrl(String optUrl) {
		this.optUrl = optUrl;
	}

	public String getOptName() {
		return optName;
	}

	public void setOptName(String optName) {
		this.optName = optName;
	}

	public String getOrgParams() {
		return orgParams;
	}

	public void setOrgParams(String orgParams) {
		this.orgParams = orgParams;
	}

	public Timestamp getOptTime() {
		return optTime;
	}

	public void setOptTime(Timestamp optTime) {
		this.optTime = optTime;
	}

	public String getOptResult() {
		return optResult;
	}

	public void setOptResult(String optResult) {
		this.optResult = optResult;
	}

}


text:
{-# LANGUAGE OverloadedStrings #-}
module YaLedger.Parser.HTML where

import Control.Applicative
import Control.Monad
import qualified Data.ByteString.Lazy as L
import Data.Tree.NTree.TypeDefs
import Text.XML.HXT.Core
import Text.HandsomeSoup
import Data.Yaml

import YaLedger.Types
import YaLedger.Parser.Common (loadParserConfig, readUrlLBS)
import YaLedger.Parser.Tables

data ParserConfig = ParserConfig {
    pcEncoding      :: Maybe String,
    pcTableSelector :: String,
    pcGeneric       :: GenericParserConfig
    }
  deriving (Eq, Show)

instance FromJSON ParserConfig where
  parseJSON (Object v) =
    ParserConfig
      <$> v .:? "encoding"
      <*> v .:? "selector" .!= "table"
      <*> parseGenericConfig ["encoding", "selector"] v
  parseJSON x = fail $ "HTML parser config: invalid object: " ++ show x

readHTML :: ParserConfig -> FilePath -> IO [[String]]
readHTML pc path = do
  bstr <- readUrlLBS path
  string <- convertToUtf8 path (pcEncoding pc) bstr
  let doc = readString [withParseHTML yes, withWarnings no] string
  table <- runX $ getTable (pcTableSelector pc) doc
  return $ map (map clean) table

clean :: String -> String
clean str = filter (`notElem` "\r\n") str

-- | Get needed <table> tag from HTML document.
-- Here all magic goes :)
getTable :: String -> IOSArrow a (NTree XNode) -> IOSArrow a [String]
getTable selector doc =
  doc >>> css selector >>> css "tr" >>> listA (css "td" >>> deep getText >. concat)

parseHTML :: LedgerOptions
          -> ParserConfig
          -> FilePath
          -> Currencies
          -> ChartOfAccounts
          -> [[String]]
          -> IO [Ext Record]
parseHTML opts pc path currs coa table =
  zipWithM (convertRow opts (pcGeneric pc) currs coa path) [1..] table

loadHTML :: LedgerOptions -> FilePath -> Currencies -> ChartOfAccounts -> FilePath -> IO [Ext Record]
loadHTML opts configPath currs coa htmlPath = do
  config <- loadParserConfig configPath
  table <- readHTML config htmlPath
  let goodRows = filterRows (pcRowsFilter $ pcGeneric config) table
  parseHTML opts config htmlPath currs coa goodRows


text:
Bug #28147 (Crash with anti-aliased line)
--SKIPIF--
<?php
	if (!extension_loaded('gd')) die("skip gd extension not available\n");
	if (!function_exists("imageantialias")) die("skip requires bundled GD library\n");
?>
--FILE--
<?php
//
// This script will generate a Seg Fault on Linux
//
$im  = imagecreatetruecolor(300, 300);
$w  = imagecolorallocate($im, 255, 255, 255);
$red = imagecolorallocate($im, 255, 0, 0);

imagefilledrectangle($im,0,0,299,299,$w);

imageantialias($im,true);
imageline($im, 299, 299, 0, 299, $red);

imagedestroy($im);

echo "Alive\n";
?>
--EXPECT--
Alive


text:
Clazz.declarePackage ("J.render");
Clazz.load (null, "J.render.TextRenderer", ["java.lang.Float", "JM.Text"], function () {
c$ = Clazz.declareType (J.render, "TextRenderer");
c$.render = Clazz.defineMethod (c$, "render",
function (text, vwr, g3d, scalePixelsPerMicron, imageFontScaling, isExact, boxXY, temp) {
if (text == null || text.image == null && !text.doFormatText && text.lines == null) return;
var showText = g3d.setC (text.colix);
if (!showText && (text.image == null && (text.bgcolix == 0 || !g3d.setC (text.bgcolix)))) return;
text.setPosition (vwr, g3d.getRenderWidth (), g3d.getRenderHeight (), scalePixelsPerMicron, imageFontScaling, isExact, boxXY);
if (text.image == null && text.bgcolix != 0) {
if (g3d.setC (text.bgcolix)) J.render.TextRenderer.showBox (g3d, text.colix, Clazz.floatToInt (text.boxX), Clazz.floatToInt (text.boxY) + text.boxYoff2 * 2, text.z + 2, text.zSlab, Clazz.floatToInt (text.boxWidth), Clazz.floatToInt (text.boxHeight), text.fontScale, text.isLabelOrHover);
if (!showText) return;
}if (text.image == null) {
for (var i = 0; i < text.lines.length; i++) {
text.setXYA (temp, i);
g3d.drawString (text.lines[i], text.font, Clazz.floatToInt (temp[0]), Clazz.floatToInt (temp[1]), text.z, text.zSlab, text.bgcolix);
}
} else {
g3d.drawImage (text.image, Clazz.floatToInt (text.boxX), Clazz.floatToInt (text.boxY), text.z, text.zSlab, text.bgcolix, Clazz.floatToInt (text.boxWidth), Clazz.floatToInt (text.boxHeight));
}J.render.TextRenderer.drawPointer (text, g3d);
return;
}, "JM.Text,JV.Viewer,J.api.JmolRendererInterface,~N,~N,~B,~A,~A");
c$.drawPointer = Clazz.defineMethod (c$, "drawPointer",
function (text, g3d) {
if ((text.pointer & 1) == 0 || !g3d.setC ((text.pointer & 2) != 0 && text.bgcolix != 0 ? text.bgcolix : text.colix)) return;
var w = text.boxWidth;
var h = text.boxHeight;
var pt = NaN;
var x = text.boxX + (text.boxX > text.atomX + w ? 0 : text.boxX + w < text.atomX - w ? w : (pt = w / 2));
var setY = !Float.isNaN (pt);
var y = text.boxY + (setY && text.boxY > text.atomY ? 0 : setY && text.boxY + h < text.atomY ? h : h / 2);
g3d.drawLineXYZ (text.atomX, text.atomY, text.atomZ, Clazz.floatToInt (x), Clazz.floatToInt (y), text.zSlab);
}, "JM.Text,J.api.JmolRendererInterface");
c$.renderSimpleLabel = Clazz.defineMethod (c$, "renderSimpleLabel",
function (g3d, font, strLabel, colix, bgcolix, boxXY, z, zSlab, xOffset, yOffset, ascent, descent, doPointer, pointerColix, isExact) {
var boxWidth = font.stringWidth (strLabel) + 8;
var boxHeight = ascent + descent + 8;
var x0 = Clazz.floatToInt (boxXY[0]);
var y0 = Clazz.floatToInt (boxXY[1]);
JM.Text.setBoxXY (boxWidth, boxHeight, xOffset, yOffset, boxXY, isExact);
var x = boxXY[0];
var y = boxXY[1];
if (bgcolix != 0 && g3d.setC (bgcolix)) J.render.TextRenderer.showBox (g3d, colix, Clazz.floatToInt (x), Clazz.floatToInt (y), z, zSlab, Clazz.floatToInt (boxWidth), Clazz.floatToInt (boxHeight), 1, true);
 else g3d.setC (colix);
g3d.drawString (strLabel, font, Clazz.floatToInt (x + 4), Clazz.floatToInt (y + 4 + ascent), z - 1, zSlab, bgcolix);
if (doPointer) {
g3d.setC (pointerColix);
if (xOffset > 0) g3d.drawLineXYZ (x0, y0, zSlab, Clazz.floatToInt (x), Clazz.floatToInt (y + boxHeight / 2), zSlab);
 else if (xOffset < 0) g3d.drawLineXYZ (x0, y0, zSlab, Clazz.floatToInt (x + boxWidth), Clazz.floatToInt (y + boxHeight / 2), zSlab);
}}, "J.api.JmolRendererInterface,javajs.awt.Font,~S,~N,~N,~A,~N,~N,~N,~N,~N,~N,~B,~N,~B");
c$.showBox = Clazz.defineMethod (c$, "showBox",
 function (g3d, colix, x, y, z, zSlab, boxWidth, boxHeight, imageFontScaling, atomBased) {
g3d.fillRect (x, y, z, zSlab, boxWidth, boxHeight);
g3d.setC (colix);
if (!atomBased) return;
if (imageFontScaling >= 2) {
g3d.drawRect (x + 3, y + 3, z - 1, zSlab, boxWidth - 6, boxHeight - 6);
} else {
g3d.drawRect (x + 1, y + 1, z - 1, zSlab, boxWidth - 2, boxHeight - 2);
}}, "J.api.JmolRendererInterface,~N,~N,~N,~N,~N,~N,~N,~N,~B");
});


text:
"""Tests for the base context.

"""
import pytest

from exopy_pulses.testing.context import DummyContext

@pytest.fixture
def context():
    """BaseContext instance for testing.

    """
    return DummyContext(sampling=0.1)

def test_len_sample(context):
    """Test the computation of the len_sample.

    """
    assert context.len_sample(1) == 10

def test_check_time(context):
    """Test validating a time.

    """
    assert context.check_time(0) == 0
    assert context.check_time(None) is None
    assert context.check_time(0.101) == 0.1

    context.rectify_time = False

    with pytest.raises(ValueError):
        context.check_time(0.101)

    context.tolerance = 0.01

    assert context.check_time(0.101) == 0.101

def test_getting_error_and_gloabl_vars_ids(context):
    """Test getting the id used for variables.

    """
    assert context.format_error_id('value') == 'context_value'
    with pytest.raises(RuntimeError):
        context.format_global_vars_id('value')

def test_context_id(context):
    """Test getting the context id.

    """
    assert context.context_id == 'exopy_pulses.DummyContext'


text:
package zzb.db.entites

import org.squeryl.KeyedEntity
import java.sql.Timestamp

//
//case class Company (var name: String, var address: String) extends KeyedEntity[Long]  {
//
//  val id:Long = 0
//  var lastModified = new Timestamp(System.currentTimeMillis)
//
//  def this() = this("", "")
//
//}

class Company(var name: String, var address: String) extends BaseEntity {

  def this() = this("", "")

}


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

    <string name="app_name">XueBa</string>
    <string name="hello_world">Hello world!</string>
    <string name="copyright">Copyright© YP 2013</string>
    <string name="menu_settings">Settings</string>
	<string name="lremind">请输入终极密码</string>
</resources>


text:
const services = [
  {
    id: 0,
    title: 'Progressive Web',
    description: 'A Progressive Web App uses modern web capabilities to deliver an app-like user experience.  We can work together to implement offline-first capabilities using Service Worker, advanced sensor device access, web accessibility best practices and many other cutting edge web APIs.'
  },
  {
    id: 1,
    title: 'Mobile',
    description: 'With certification in native iOS development and experience building cross-platform mobile apps with React Native, we can work together on mobile apps of all shapes and sizes.'
  },
  {
    id: 2,
    title: 'Machine Learning',
    description: 'Machine learning is the science of getting computers to act without being explicitly programmed.  With experience working with machine learning teams, we can work together to apply the latest web technologies to build training datasets, or to build an interface to your product.'
  },
  {
    id: 3,
    title: 'Data Architecture',
    description: 'Data architecture provides a formal approach to creating and managing the flow of data and how it is processed across an organization.  Employing nearly seven years of experience in data systems architecture we can work together to build a scalable distributed system for your web application.'
  },
  {
    id: 4,
    title: 'Agile',
    description: 'Agile development methodologies provide opportunities to assess the direction of a project throughout the development lifecycle.  Using agile and scrum means keeping your project on schedule and delivering it to your customers sooner.'
  },
  {
    id: 5,
    title: 'Consulting',
    description: 'Through the Hacksmiths.io platform, I offer Pro Bono software engineering and consulting services to charitable and philanthrophic organizations. Please contact me if your charitable organization can use the help of a talented group of professional software engineers!'
  }
];

export default services;


text:
\documentclass[12pt,letterpaper]{article}
\usepackage{cv}

\begin{document}

\begin{center}
{\Large \textbf{TALON CHANDLER}}\\
{\textbf{CURRICULUM VIT\AE}}\\
\end{center}

\vspace{-1em}

\subsection*{Biographical Information}
\begin{itemize}[noitemsep]
\item[] \itab{Born:} \tab{June 24, 1993 in Calgary, Alberta}
\item[] \itab{Citizenship:} \tab{Canada}
\item[] \itab{Address:} \tab{2N-1003 East 53rd Street}
\item[] \itab{} \tab{Chicago, Illinois}
\item[] \itab{} \tab{60615}
\item[] \itab{Phone:} \tab{(312) 978-1901}
\item[] \itab{Email:} \tab{\texttt{talonchandler@uchicago.edu}}
\item[] \itab{Website:} \tab{\texttt{talonchandler.com}}
\end{itemize}

\mysubsection{Education}
\begin{benumerate}{2}
\item
  \textbf{Ph.D. Medical Physics} \hfill Expected June 2020\\
  Dissertation: ``Spatio-angular fluorescence microscopy''\\
  Advisor: Patrick La Rivi\`ere \\
  University of Chicago
\item
  \textbf{B.A.Sc. Engineering Physics} \hfill 2015\\
  with Electrical Engineering Minor, with Distinction\\
  GPA: 3.93/4.00\\
  University of British Columbia
\end{benumerate}

\mysubsection{Publications}
\nocite{*}
\setlength\biblabelsep{0.035\textwidth}
\printbibliography[heading=none, type=article, sorting=ynt, resetnumbers=true]

% \mysubsection{In Review}
% \nocite{*}
% \setlength\biblabelsep{0.035\textwidth}
% \printbibliography[heading=none, type=misc, sorting=ynt, resetnumbers=true]

\mysubsection{Abstracts/Presentations}
\begin{benumerate}{11}
\item {\textbf{Chandler, T.}, Guo, M., Kumar, A., Mehta, S., Shroff, H., Oldenbourg, R.,\hfill 09/2019\\ La Rivi\`ere, P.J.,``3D and 4D computational imaging of molecular orientation\\ with multiview polarized fluorescence microscopy,'' Electronic Imaging Conference,\\ Burlingame, CA. 20 minute invited talk presented by La Rivi\`ere, P.J.}

\item {Oldenbourg, R., \textbf{Chandler, T.}, Tran, M., Guo, M., Shroff, H., La Rivi\`ere, P.J., \hfill 10/2019 ``Fast and comprehensive mapping of molecular orientation using multi-view\\polarized fluorescence microscopy,'' EMBL Seeing is Believing, Heidelberg, DE.\\ Poster presented by Oldenbourg, R.}

\item {\textbf{Chandler, T.}, Guo, M., Kumar, A., Mehta, S., Shroff, H., Oldenbourg, R.,\hfill 09/2019\\ La Rivi\`ere, P.J.,``Spatio-angular fluorescence imaging with a polarized\\ illumination light-sheet dual-view microscope,'' Junior Scientist Workshop on\\ Biological Optical Microscopy, Janelia Research Campus, VA. 20 minute talk.}

\item {\textbf{Chandler, T.}, La Rivi\`ere, P.J.,``Multipole spatio-angular fluorescence microscopy,'' \hfill 06/2019\\ Optics Society of America, Mathematics in Imaging, Munich, DE. 12 minute talk.\\ \textbf{Outstanding Student Presentation Award}}

\item {\textbf{Chandler, T.}, Guo, M., Kumar, A., Mehta, S., Shroff, H., Oldenbourg, R.,\hfill 05/2019\\ La Rivi\`ere, P.J.,``Spatio-angular fluorescence imaging with a polarized\\ illumination light-sheet dual-view microscope,'' Frontiers in Imaging Science,\\ Janelia Research Campus, VA. Poster.}

\item {\textbf{Chandler, T.}, Guo, M., Kumar, A., Mehta, S., Shroff, H., Oldenbourg, R.,\hfill 04/2019\\ La Rivi\`ere, P.J., ``Spatio-angular fluorescence imaging with a polarized\\ illumination light-sheet dual-view microscope,'' Focus on Microscopy, London, UK.\\ 20 minute talk.}

\item {\textbf{Chandler, T.}, Guo, M., Kumar, A., Mehta, S., Shroff, H., Oldenbourg, R.,\hfill 02/2019\\ La Rivi\`ere, P.J., ``Spatio-angular imaging with a polarized light sheet dual-view\\ fluorescence microscope,'' Advanced Imaging Methods, Berkeley, CA. Poster.}

\item {\textbf{Chandler, T.}, Guo, M., Kumar, A., Mehta, S., Shroff, H., Oldenbourg, R.,\hfill 11/2018\\ La Rivi\`ere, P.J., ``Spatio-angular imaging with a polarized light sheet dual-view \\ fluorescence microscope,'' NSF Workshop on Enabling Biological Discovery\\ through Innovations in Imaging and Computation, Woods Hole, MA. Poster.}

\item {\textbf{Chandler, T.}, Guo, M., Kumar, A., Mehta, S., Shroff, H., Oldenbourg, R.,\hfill 06/2018\\ La Rivi\`ere, P.J., ``Spatio-angular restoration of fluorescence microscopy data,'' \\
      Optics Society of America, Mathematics in Imaging, Orlando, FL. 12 minute talk.}

\item {\textbf{Chandler, T.}, Guo, M., Kumar, A., Mehta, S., Shroff, H., Oldenbourg, R.,\hfill 06/2018\\ La Rivi\`ere, P.J., ``Spatio-angular restoration of fluorescence microscopy data,''\\
      Gordon Image Science Conference, Easton, MA. 15 minute talk and poster.}

\item {\textbf{Chandler, T.}, Guo, M., Kumar, A., Mehta, S., Shroff, H., Oldenbourg, R.,\hfill 04/2018\\ La Rivi\`ere, P.J., ``Single-fluorophore orientation determination with multiview\\ polarized
      illumination microscope,'' IEEE International Symposium on Biomedical\\ Imaging (ISBI), Washington, DC. Poster.}
\end{benumerate}

\mysubsection{Miscellaneous Presentations}
\begin{benumerate}{9}
\item {``Anholonomy: falling cats, parallel parking, and polarized light,'' \hfill 01/2020\\Graduate Program on Medical Physics Journal Club. 30 minute talk.}

\item {``Spatio-angular fluorescence microscopy,'' \hfill 04/2019\\
     Graduate Program on Medical Physics Colloquium, Chicago, IL. 1 hour talk.}

\item {``Spatio-angular inverse problems in fluorescence microscopy,'' \hfill 03/2019\\
     Inverse Problems in Imaging Seminar, Chicago, IL. 1 hour talk.}

\item {``DNA microscopy,'' \hfill 03/2019\\
    Graduate Program on Medical Physics Journal Club. 30 minute talk.\\
    \textbf{Carl J. Vyborny Award for Best Journal Club Presentation}}

\item {``Are lenses necessary?'' \hfill 03/2018\\
    Graduate Program on Medical Physics Journal Club. 30 minute talk.\\
    \textbf{Carl J. Vyborny Award for Best Journal Club Presentation}}

\item {``Mapping molecular order in living organisms using polarized light microscopy,'' \hfill 10/2017\\
    with Rudolf Oldenbourg, University of California, Berkeley. 1 hour talk.}

\item {``Mapping molecular order in living organisms using polarized light microscopy,'' \hfill 10/2017\\
    with Rudolf Oldenbourg, SCIEN Colloquium, Stanford University. 1 hour talk.}

\item {``Evaluating gambles using dynamics,'' \hfill 04/2017\\
    Graduate Program on Medical Physics Journal Club. 30 minute talk.\\
    \textbf{Carl J. Vyborny Award for Best Journal Club Presentation}}

\item {``Digital holography for radiation dosimetry,'' \hfill 04/2016\\
    Graduate Program on Medical Physics Journal Club. 30 minute talk.}
\end{benumerate}

\mysubsection{Research History}
\begin{benumerate}{4}
\item
  {\textbf{La Rivi\`ere Lab}, University of Chicago} \hfill 09/2015--\\
  Advisor: Patrick La Rivi\`ere
\item
  {\textbf{Oldenbourg Lab}, Marine Biological Laboratory} \hfill 09/2017--09/2018\\
  Advisor: Rudolf Oldenbourg
\item
  {\textbf{MRI Research Centre}, University of British Columbia} \hfill 04/2014--09/2015\\
  Advisors: Alex MacKay \& Carl Michal
\item
  {\textbf{Centre For Operations Excellence}, University of British Columbia} \hfill 04/2013--09/2015\\
  Advisor: Steven Shechter
\end{benumerate}

\mysubsection{Employment History}
\begin{benumerate}{2}
\item
  \textbf{Kardium Inc.}, Burnaby, BC \hfill 09/2013--12/2013\\
  Junior Engineer
\item
  \textbf{SRK Consulting Inc.}, Vancouver, BC \hfill 01/2012--04/2012\\
  Junior Engineer
\end{benumerate}

\mysubsection{Teaching}
\begin{benumerate}{3}
\item
  \textbf{Introduction to Medical Physics}, University of Chicago \hfill 2019\\
  Teaching Assistant\\
  Topics: Medical imaging and radiation therapy\\
  Rating: 4.7/5.0 from 11 students
\item
  \textbf{Medical Imaging 1}, University of Chicago \hfill 2017\\
  Teaching Assistant\\
  Topics: X-ray imaging, MRI, image restoration\\
  Rating: 5.0/5.0 from 5 students
\item
  \textbf{Mathematics For Medical Physics}, University of Chicago \hfill 2016\\
  Teaching Assistant\\
  Topics: Linear systems theory, stochastic processes, image reconstruction\\
  Rating: 4.8/5.0 from 5 students
\end{benumerate}

\mysubsection{Awards}
\begin{mybenumerate}{11}
\item \itab{O'Brien--Hasten Research Collaboration Award} \rtab{\$1.5k}\hfill{2019}
\item \itab{University of Chicago Graduate Council Travel Award} \rtab{\$600}\hfill{2019}
\item \itab{University of Chicago Biological Sciences Division Travel Award} \rtab{\$500}\hfill{2019}
\item \itab{University of Chicago Biological Sciences Division Graduate Fellowship} \rtab{\$30k}\hfill{2016}
\item \itab{Eastern Irrigation District Graduate Scholarship} \rtab{\$2k}\hfill{2014}
\item \itab{NSERC Undergraduate Research Award} \rtab{\$4k}\hfill{2014}
\item \itab{NSERC Industrial Undergraduate Research Award} \rtab{\$4k}\hfill{2013}
\item \itab{Interpipeline Discovery Scholarship} \rtab{\$2k}\hfill{2011}
\item \itab{UBC President's Entrance Scholarship} \rtab{\$1.5k}\hfill{2010}
\item \itab{Alexander Rutherford Scholarship} \rtab{\$2.5k}\hfill{2010}
\item \itab{Junior Citizen of the Year, City of Brooks} \rtab{-}\hfill{2010}
\end{mybenumerate}

\mysubsection{Professional Membership}
\begin{etaremune}[itemsep=-2pt, labelsep=0.035\textwidth]
\item \itab{The Optical Society of America (OSA)} \hfill{2017--}
\item \itab{The International Society for Optics and Photonics (SPIE)} \hfill{2016--}
\item \itab{The American Association of Physicists in Medicine (AAPM)} \hfill{2015--2017}
\item \itab{Engineers \& Geoscientists of British Columbia (EGBC)} \hfill{2010--2016}
\end{etaremune}

\mysubsection{Reviewing}
\begin{etaremune}[itemsep=-2pt, labelsep=0.035\textwidth]
\item \itab{European Biophysical Journal} \hfill {2019}
\item \itab{Optics Letters} \hfill {2019}
\item \itab{Nature Communications} \hfill{2018--2019}
\item \itab{Optica} \hfill{2018}
\item \itab{Optics Express}  \hfill{2018}
\item \itab{Journal of the Optical Society of America A} \hfill{2017}
\end{etaremune}

\mysubsection{Computing}
\begin{itemize}[noitemsep]
\item[] \itab{\textbf{Top Language:}} \mtab{Python}
\item[] \itab{\textbf{Competent Languages:}} \mtab{C, \CPP, Bash, MATLAB}
\item[] \itab{\textbf{Familiar Languages:}} \mtab{R, Mathematica, HTML/CSS}
\item[] \itab{\textbf{Tools:}} \mtab{GNU Emacs, \LaTeX, git, VTK, ImageJ}
\end{itemize}

\mysubsection{Other Activities}
\begin{itemize}[noitemsep]
\item[] \itab{\textbf{Ultramarathon running}} \mtab{12 races $\geq$ 26.2 miles}
\item[] \itab{\textbf{SCUBA diving}} \mtab{15 open water dives, $\sim$600 minutes underwater}
\item[] \itab{\textbf{Apiculture}}
\end{itemize}

% \mysubsection{References}
% \begin{itemize}[noitemsep]
% \item[] \itab{\textbf{Patrick La Rivi{\`e}re}} \mtab{\texttt{pjlarivi@uchicago.edu}} \hfill (773) 702-6975
% \item[] \itab{\textbf{Rudolf Oldenbourg}} \mtab{\texttt{rudolfo@mbl.edu}}\hfill (508) 289-7426
% \item[] \itab{\textbf{Hari Shroff}} \mtab{\texttt{hari.shroff@nih.gov}}\hfill (301) 435-1995
% \end{itemize}

\end{document}


text:
<input class="filter-input" type="text" value="" placeholder="Keyword filter..." tabindex="1">

x

  All sites

All sites

  {{#each sites}}

{{{name_html}}}

  {{/each}}

  Sort by
  <input type="radio" name="sort-by" value="dateSort" checked> Date
  <input type="radio" name="sort-by" value="alphaSort"> Alpha


text:
/*****************************************************************************

  sc_wait_cthread.h -- Wait() and related functions for SC_CTHREADs.

  Original Author: Stan Y. Liao, Synopsys, Inc.
                   Martin Janssen, Synopsys, Inc.

  CHANGE LOG AT THE END OF THE FILE
 *****************************************************************************/

#ifndef SC_WAIT_CTHREAD_H
#define SC_WAIT_CTHREAD_H

#include "sysc/kernel/sc_simcontext.h"
#include "sysc/datatypes/bit/sc_logic.h"
#include "sysc/communication/sc_signal_ifs.h"

namespace sc_core
{

// for SC_CTHREADs

extern
void
halt( sc_simcontext* = sc_get_curr_simcontext() );

extern
void
wait( int,
      sc_simcontext* = sc_get_curr_simcontext() );

extern
void
at_posedge( const sc_signal_in_if<bool>&,
	    sc_simcontext* = sc_get_curr_simcontext() );

extern
void
at_posedge( const sc_signal_in_if<sc_dt::sc_logic>&,
	    sc_simcontext* = sc_get_curr_simcontext() );

extern
void
at_negedge( const sc_signal_in_if<bool>&,
	    sc_simcontext* = sc_get_curr_simcontext() );

extern
void
at_negedge( const sc_signal_in_if<sc_dt::sc_logic>&,
	    sc_simcontext* = sc_get_curr_simcontext() );

class sc_watch
{
public:

    sc_cthread_handle cthread_h;

    sc_watch( sc_simcontext* simc ) : cthread_h()
    {
        sc_curr_proc_handle cpi = simc->get_curr_proc_info();
        assert( SC_CTHREAD_PROC_ == cpi->kind );
        cthread_h = RCAST<sc_cthread_handle>( cpi->process_handle );
    }

    ~sc_watch()
    {
    }
};

} // namespace sc_core

/*
$Log: sc_wait_cthread.h,v $
Revision 1.6  2011/08/26 20:46:11  acg
 Andy Goodrich: moved the modification log to the end of the file to
 eliminate source line number skew when check-ins are done.

Revision 1.5  2011/08/24 22:05:51  acg
 Torsten Maehne: initialization changes to remove warnings.

Revision 1.4  2011/02/18 20:27:14  acg
 Andy Goodrich: Updated Copyrights.

Revision 1.3  2011/02/13 21:47:38  acg
 Andy Goodrich: update copyright notice.

Revision 1.2  2008/05/22 17:06:27  acg
 Andy Goodrich: updated copyright notice to include 2008.

Revision 1.1.1.1  2006/12/15 20:20:05  acg
SystemC 2.3

Revision 1.2  2006/01/03 23:18:45  acg
Changed copyright to include 2006.

Revision 1.1.1.1  2005/12/19 23:16:44  acg
First check in of SystemC 2.1 into its own archive.

Revision 1.10  2005/09/02 19:03:30  acg
Changes for dynamic processes. Removal of lambda support.

Revision 1.9  2005/04/04 00:16:08  acg
Changes for directory name change to sys from systemc.
Changes for sc_string going to std::string.
Changes for sc_pvector going to std::vector.
Changes for reference pools for bit and part selections.
Changes for const sc_concatref support.

Revision 1.6  2005/01/10 17:52:20  acg
Addition of namespace specifications.

Revision 1.5  2004/09/27 20:49:10  acg
Andy Goodrich, Forte Design Systems, Inc.
   - Added a $Log comment so that CVS checkin comments appear in the
     checkout source.

*/

#endif


text:
@implementation DBManager
{
    FMDatabase *_database;
    NSLock     *_lock; // 锁
}

//+ (instancetype)shareManager
//{
//    static DBManager *manager = nil;
//
//    static dispatch_once_t onceToken;
//
//    dispatch_once(&onceToken, ^{
//        manager = [[[self class] alloc] init];
//    });
//
//    return manager;
//}
//
//- (instancetype)init
//{
//    self = [super init];
//    if (self) {
//        _lock = [[NSLock alloc] init];
//       // [self createDatabase];
//    }
//    return self;
//}

//- (void)createDatabase
//{
//    _database = [[FMDatabase  alloc] initWithPath:[NSHomeDirectory() stringByAppendingPathComponent:@"Documents/qsbk.db"]];
//    BOOL isOpen = [_database open];
//    if (!isOpen) {
//        NSLog(@"打开数据库失败:%@", _database.lastErrorMessage);
//    } else {
//
//        NSString *createArticle = @"create table if not exists aticle(articleId varchar(100) , login varchar(50), content varchar(200),  imageURL varchar(255), status bit)";
//
//        BOOL flag = [_database executeUpdate:createArticle];
//        if (!flag) {
//            NSLog(@"创建表失败:%@", _database.lastErrorMessage);
//        }
//    }
//}
//
//

//- (NSArray *)getAll
//{
//    return [NSArray array];
//}
//- (BOOL)deleteArticleWithID:(NSString *)articleID
//{
//    BOOL ret = [_database executeUpdate:@"delete from article where articleId = ?", articleID];
//    if (!ret) {
//        NSLog(@"删除数据失败: %@", _database.lastErrorMessage);
//    }
//    return ret;
//}

// 判断是否已经收藏
//- (BOOL)isExists:(NSString *)articleId;
//{
//    int count = 0;
//
//    // sql
//    // as cnt   别名
//    // count(*) 搜索结果的个数
//    NSString *sql = @"select count(*) as cnt from article where articleId = ?";
//    FMResultSet *rs = [_database executeQuery:sql, articleId];
//    if ([rs next]) {
//        count = [rs intForColumn:@"cnt"];
//    }
//
//    if (count > 0) {
//        return YES;
//    }
//    return NO;
//}

@end


text:
package com.intellij.tools;

import com.intellij.openapi.actionSystem.*;
import com.intellij.openapi.project.DumbAware;
import com.intellij.openapi.project.Project;
import org.jetbrains.annotations.Nullable;

import java.util.List;

/**
 * @author Eugene Belyaev
 */
public abstract class BaseExternalToolsGroup<T extends Tool> extends SimpleActionGroup implements DumbAware {
  @Override
  public void update(AnActionEvent event) {
    Presentation presentation = event.getPresentation();
    removeAll();
    String context = event.getPlace();
    Project project = event.getData(CommonDataKeys.PROJECT);
    if (project == null) {
      presentation.setVisible(false);
      presentation.setEnabled(false);
      return;
    }
    presentation.setEnabled(true);
    List<ToolsGroup<T>> groups = getToolsGroups();
    for (ToolsGroup group : groups) {
      String groupName = group.getName();
      if (groupName != null && groupName.trim().length() > 0) {
        SimpleActionGroup subgroup = new SimpleActionGroup();
        subgroup.getTemplatePresentation().setText(groupName, false);
        subgroup.setPopup(true);
        fillGroup(context, groupName, subgroup);
        if (subgroup.getChildrenCount() > 0) {
          add(subgroup);
        }
      }
      else {
        fillGroup(context, null, this);
      }
    }
    presentation.setVisible(getChildrenCount() > 0);
  }

  protected abstract List<ToolsGroup<T>> getToolsGroups();

  private void fillGroup(String context, @Nullable String groupName, SimpleActionGroup group) {
    List<T> tools = getToolsByGroupName(groupName);
    for (T tool : tools) {
      if (isToolVisible(tool, context)) {
        addToolToGroup(tool, group);
      }
    }
  }

  protected abstract List<T> getToolsByGroupName(String groupName);

  private void addToolToGroup(T tool, SimpleActionGroup group) {
    String id = tool.getActionId();
    AnAction action = ActionManager.getInstance().getAction(id);
    if (action == null) {
      action = createToolAction(tool);
    }

    group.add(action);
  }

  protected abstract ToolAction createToolAction(T tool);

  private boolean isToolVisible(T tool, String context) {
    if (!tool.isEnabled()) return false;
    if (ActionPlaces.EDITOR_POPUP.equals(context) ||
        ActionPlaces.EDITOR_TAB_POPUP.equals(context)) {
      return tool.isShownInEditor();
    }
    else if (
      ActionPlaces.PROJECT_VIEW_POPUP.equals(context) ||
      ActionPlaces.COMMANDER_POPUP.equals(context) ||
      ActionPlaces.J2EE_VIEW_POPUP.equals(context) ||
      ActionPlaces.TYPE_HIERARCHY_VIEW_POPUP.equals(context) ||
      ActionPlaces.CALL_HIERARCHY_VIEW_POPUP.equals(context) ||
      ActionPlaces.METHOD_HIERARCHY_VIEW_POPUP.equals(context) ||
      ActionPlaces.FAVORITES_VIEW_POPUP.equals(context) ||
      ActionPlaces.SCOPE_VIEW_POPUP.equals(context) ||
      ActionPlaces.NAVIGATION_BAR.equals(context)
      ) {
      return tool.isShownInProjectViews();
    }
    else if (ActionPlaces.MAIN_MENU.equals(context)) {
      return tool.isShownInMainMenu();
    }
    else if (ActionPlaces.USAGE_VIEW_POPUP.equals(context)) {
      return tool.isShownInSearchResultsPopup();
    }
    return false;
  }
}


text:
const _ = require('underscore');
const GitCommander = require('./gitCommander');

/**
 * @module Blamer
 *
 * Blamer is a Class that should be instantiated with an atom 'Git' object
 * for the root repository in the project.
 *
 * @param {Git} repo - an instance of 'Git' class from atom workspace. See
 *   https://atom.io/docs/api/v0.92.0/api/ for more info.
 */
var Blamer = function(repo) {
  if (!repo) {
    throw new Error('Cannot create a Blamer without a repository.');
  }

  this.repo = repo;
  this.initialize();
};

// ================
// Instance Methods
// ================

_.extend(Blamer.prototype, {

  /**
   * Initializes this Blamer instance, by creating git-tools repos for the root
   * repository and submodules.
   */
  initialize: function() {
    this.tools = {};
    this.tools.root = new GitCommander(this.repo.getWorkingDirectory());

    var submodules = this.repo.submodules;
    if (submodules) {
      for (var submodulePath in submodules) {
        this.tools[submodulePath] = new GitCommander(this.repo.getWorkingDirectory() + '/' + submodulePath);
      }
    }
  },

  /**
   * Blames the given filePath and calls callback with blame lines or error.
   *
   * @param {string} filePath - filePath to blame
   * @param {function} callback - callback to call back with blame data
   */
  blame: function(filePath, callback) {
    // Ensure file path is relative to root repo
    filePath = this.repo.relativize(filePath);
    var repoUtil = this.repoUtilForPath(filePath);

    // Ensure that if this file is in a submodule, we remove the submodule dir
    // from the path
    filePath = this.removeSubmodulePrefix(filePath);

    if (!_.isFunction(callback)) {
      throw new Error('Must be called with a callback function');
    }

    // Make the async blame call on the git repo
    repoUtil.blame(filePath, function(err, blame) {
      callback(err, blame);
    });
  },

  /**
   * Utility to get the GitCommander repository for the given filePath. Takes into
   * account whether the file is part of a submodule and returns that repository
   * if necessary.
   *
   * @param {string} filePath - the path to the file in question.
   */
  repoUtilForPath: function(filePath) {
    var submodules = this.repo.submodules;

    // By default, we return the root GitCommander repository.
    var repoUtil = this.tools.root;

    // if we have submodules, loop through them and see if the given file path
    // belongs inside one of the repositories. If so, we return the GitCommander repo
    // for that submodule.
    if (submodules) {
      for (var submodulePath in submodules) {
        var submoduleRegex = new RegExp('^' + submodulePath);
        if (submoduleRegex.test(filePath)) {
          repoUtil = this.tools[submodulePath];
        }
      }
    }

    return repoUtil;
  },

  /**
   * If the file path given is inside a submodule, removes the submodule
   * directory prefix.
   *
   * @param {string} filePath - path to file to relativize
   * @param {Repo} toolsRepo - git-tools Repo
   */
  removeSubmodulePrefix: function(filePath) {
    var submodules = this.repo.submodules;
    if (submodules) {
      for (var submodulePath in submodules) {
        var submoduleRegex = new RegExp('^' + submodulePath);
        if (submoduleRegex.test(filePath)) {
          filePath = filePath.replace(submoduleRegex, '');
        }
      }
    }

    // remove leading '/' if there is one before returning
    filePath = filePath.replace(/^\//, '');
    return filePath;
  }

});

// ================
// Exports
// ================

module.exports = Blamer;


text:
import 'vs/platform/update/common/update.config.contribution';
import { localize } from 'vs/nls';
import { Registry } from 'vs/platform/registry/common/platform';
import { IWorkbenchContributionsRegistry, Extensions as WorkbenchExtensions } from 'vs/workbench/common/contributions';
import { IWorkbenchActionRegistry, Extensions as ActionExtensions } from 'vs/workbench/common/actions';
import { SyncActionDescriptor, MenuRegistry, MenuId } from 'vs/platform/actions/common/actions';
import { ShowCurrentReleaseNotesAction, ProductContribution, UpdateContribution, CheckForVSCodeUpdateAction, CONTEXT_UPDATE_STATE, SwitchProductQualityContribution } from 'vs/workbench/contrib/update/browser/update';
import { LifecyclePhase } from 'vs/platform/lifecycle/common/lifecycle';
import product from 'vs/platform/product/common/product';
import { StateType } from 'vs/platform/update/common/update';

const workbench = Registry.as<IWorkbenchContributionsRegistry>(WorkbenchExtensions.Workbench);

workbench.registerWorkbenchContribution(ProductContribution, LifecyclePhase.Restored);
workbench.registerWorkbenchContribution(UpdateContribution, LifecyclePhase.Restored);
workbench.registerWorkbenchContribution(SwitchProductQualityContribution, LifecyclePhase.Restored);

const actionRegistry = Registry.as<IWorkbenchActionRegistry>(ActionExtensions.WorkbenchActions);

// Editor
actionRegistry
	.registerWorkbenchAction(SyncActionDescriptor.from(ShowCurrentReleaseNotesAction), `${product.nameShort}: Show Release Notes`, product.nameShort);

actionRegistry
	.registerWorkbenchAction(SyncActionDescriptor.from(CheckForVSCodeUpdateAction), `${product.nameShort}: Check for Update`, product.nameShort, CONTEXT_UPDATE_STATE.isEqualTo(StateType.Idle));

// Menu
if (ShowCurrentReleaseNotesAction.AVAILABE) {
	MenuRegistry.appendMenuItem(MenuId.MenubarHelpMenu, {
		group: '1_welcome',
		command: {
			id: ShowCurrentReleaseNotesAction.ID,
			title: localize({ key: 'miReleaseNotes', comment: ['&& denotes a mnemonic'] }, "&&Release Notes")
		},
		order: 4
	});
}


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

package bigbang.auton.commands;

import edu.wpi.first.wpilibj.Timer;
import bigbang.auton.AutonCommand;
import bigbang.subsystems.Intake;

/**
 *
 * @author Shubham
 */
public class IntakeTimeOutCommand implements AutonCommand{
    Intake intake;
    Timer t = new Timer();
    double pwmVal;
    double timeOutInSecs;

    public IntakeTimeOutCommand (double pwm, double timeOut){
        this.pwmVal = pwm;
        this.timeOutInSecs = timeOut;
        intake = intake.getInstance();
    }

    public void init() {
        t.reset();
        t.start();
    }

    public boolean run() {

       // intake.setSpeed(pwmVal);
        intake.intakeBall(pwmVal,1);
        //intake.setRollerPWM(pwmVal);
        //intake.setPG71(pwmVal);

        return t.get() > timeOutInSecs;
    }

    public void done() {
        intake.intakeBall(0, 1);
    }
}


text:
#ifndef PlatformTouchPoint_h
#define PlatformTouchPoint_h

#include "IntPoint.h"
#include <wtf/Vector.h>

#if ENABLE(TOUCH_EVENTS)

#if PLATFORM(QT)
#include <QTouchEvent>
#endif

#if PLATFORM(BLACKBERRY)
namespace BlackBerry {
namespace Platform {
class TouchPoint;
};
};
#endif

namespace WebCore {

class PlatformTouchEvent;

class PlatformTouchPoint {
public:
    enum State {
        TouchReleased,
        TouchPressed,
        TouchMoved,
        TouchStationary,
        TouchCancelled,
        TouchStateEnd // Placeholder: must remain the last item.
    };

    // This is necessary for us to be able to build synthetic events.
    PlatformTouchPoint()
        : m_id(0)
        , m_radiusY(0)
        , m_radiusX(0)
        , m_rotationAngle(0)
        , m_force(0)
    {
    }

#if PLATFORM(BLACKBERRY)
    PlatformTouchPoint(const BlackBerry::Platform::TouchPoint&);
#endif

    unsigned id() const { return m_id; }
    State state() const { return m_state; }
    IntPoint screenPos() const { return m_screenPos; }
    IntPoint pos() const { return m_pos; }
    int radiusX() const { return m_radiusX; }
    int radiusY() const { return m_radiusY; }
    float rotationAngle() const { return m_rotationAngle; }
    float force() const { return m_force; }

protected:
    unsigned m_id;
    State m_state;
    IntPoint m_screenPos;
    IntPoint m_pos;
    int m_radiusY;
    int m_radiusX;
    float m_rotationAngle;
    float m_force;
};

}

#endif // ENABLE(TOUCH_EVENTS)

#endif // PlatformTouchPoint_h


text:
'use strict';

angular.module('jsSoundMixApp')
    .controller('MainCtrl', function($scope, $http) {
        $scope.awesomeThings = [];

        $http.get('/api/things').success(function(awesomeThings) {
            $scope.awesomeThings = awesomeThings;
        });

        $scope.addThing = function() {
            if ($scope.newThing === '') {
                return;
            }
            $http.post('/api/things', {
                name: $scope.newThing
            });
            $scope.newThing = '';
        };

        $scope.deleteThing = function(thing) {
            $http.delete('/api/things/' + thing._id);
        };
    });


text:
/**
 * There are JeeSite code generation
 */
package com.thinkgem.jeesite.modules.edu.web;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.thinkgem.jeesite.modules.edu.service.AbroadhomeService;
import com.thinkgem.jeesite.modules.edu.service.EuserService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.mvc.support.RedirectAttributes;

import com.thinkgem.jeesite.common.config.Global;
import com.thinkgem.jeesite.common.persistence.Page;
import com.thinkgem.jeesite.common.web.BaseController;
import com.thinkgem.jeesite.common.utils.StringUtils;
import com.thinkgem.jeesite.modules.sys.entity.User;
import com.thinkgem.jeesite.modules.sys.utils.UserUtils;
import com.thinkgem.jeesite.modules.edu.entity.AbroadEnroll;
import com.thinkgem.jeesite.modules.edu.service.AbroadEnrollService;

/**
 * 海外之家报名Controller
 * @author lala
 * @version 2015-04-23
 */
@Controller
@RequestMapping(value = "${adminPath}/edu/abroadEnroll")
public class AbroadEnrollController extends BaseController {

	@Autowired
	private AbroadEnrollService abroadEnrollService;

	@Autowired
	private AbroadhomeService abroadhomeService;
	@Autowired
	private EuserService euserService;

	@ModelAttribute
	public AbroadEnroll get(@RequestParam(required=false) String id) {
		if (StringUtils.isNotBlank(id)){
			return abroadEnrollService.get(id);
		}else{
			return new AbroadEnroll();
		}
	}

	@RequiresPermissions("edu:abroadEnroll:view")
	@RequestMapping(value = {"list", ""})
	public String list(AbroadEnroll abroadEnroll, HttpServletRequest request, HttpServletResponse response, Model model) {
		User user = UserUtils.getUser();
		if (!user.isAdmin()){
			abroadEnroll.setCreateBy(user);
		}
        Page<AbroadEnroll> page = abroadEnrollService.find(new Page<AbroadEnroll>(request, response), abroadEnroll);
        model.addAttribute("page", page);
		return "modules/" + "edu/abroadEnrollList";
	}

	@RequiresPermissions("edu:abroadEnroll:view")
	@RequestMapping(value = "form")
	public String form(AbroadEnroll abroadEnroll, Model model) {
		model.addAttribute("abroadEnroll", abroadEnroll);
		model.addAttribute("abroads", abroadhomeService.findAll());
		model.addAttribute("users", euserService.findAll());

		return "modules/" + "edu/abroadEnrollForm";
	}

	@RequiresPermissions("edu:abroadEnroll:edit")
	@RequestMapping(value = "save")
	public String save(AbroadEnroll abroadEnroll, Model model, RedirectAttributes redirectAttributes) {
		if (!beanValidator(model, abroadEnroll)){
			return form(abroadEnroll, model);
		}
		abroadEnrollService.save(abroadEnroll);
		addMessage(redirectAttributes, "保存海外之家报名成功");
		return "redirect:"+Global.getAdminPath()+"/edu/abroadEnroll/?repage";
	}

	@RequiresPermissions("edu:abroadEnroll:edit")
	@RequestMapping(value = "delete")
	public String delete(String id, RedirectAttributes redirectAttributes) {
		abroadEnrollService.delete(id);
		addMessage(redirectAttributes, "删除海外之家报名成功");
		return "redirect:"+Global.getAdminPath()+"/edu/abroadEnroll/?repage";
	}

	@RequiresPermissions("edu:abroadEnroll:edit")
	@RequestMapping(value = "publish")
	public String publish(String id,Byte status, RedirectAttributes redirectAttributes) {
		AbroadEnroll abroadEnroll = abroadEnrollService.get(id);
		abroadEnroll.setStatus(status);
		abroadEnrollService.save(abroadEnroll);
		if(status==1)
			addMessage(redirectAttributes, "发布海外之家报名成功");
		else
			addMessage(redirectAttributes, "取消发布海外之家报名成功");

		return "redirect:"+Global.getAdminPath()+"/edu/abroadEnroll/?repage";
	}

}


text:
package com.github.stephanenicolas.injectview.statement;

import com.github.stephanenicolas.injectview.binding.ViewBinding;
import javassist.CtClass;
import javassist.NotFoundException;

import static com.github.stephanenicolas.morpheus.commons.JavassistUtils.isActivity;
import static com.github.stephanenicolas.morpheus.commons.JavassistUtils.isView;

/**
 * A statement to find/retrieve a view.
 * <br/> e.g. : this.findViewById(R.id.foo);
 *
 * @author SNI
 */
public class FindViewStatement extends FindStatement {

  private String root;
  private boolean isActivity;

  /**
   * Creates a statement to find a view when the root is a parameter of a method.
   *
   * @param viewBinding the view data.
   * @param paramClasses all parameters of this method.
   * @param indexParam the index of the parameter that owns the view.
   */
  public FindViewStatement(ViewBinding viewBinding, CtClass[] paramClasses, int indexParam)
      throws NotFoundException {

    super(viewBinding);
    CtClass targetClazz = paramClasses[indexParam];
    isActivity = isActivity(targetClazz);
    boolean isView = isView(targetClazz);

    if (isActivity || isView) {
      root = "$" + (1 + indexParam);
    } else {
      root = "$" + (1 + indexParam) + ".getView()";
    }
  }

  /**
   * Creates a statement to find a fragment inside a fragment or an activity.
   * @param viewBinding the fragment data.
   * @param targetClazz the class that owns the view.
   */
  public FindViewStatement(ViewBinding viewBinding, CtClass targetClazz) throws NotFoundException {
    super(viewBinding);
    isActivity = isActivity(targetClazz);
    boolean isView = isView(targetClazz);

    if (isActivity || isView) {
      root = "this";
    } else {
      root = "$1";
    }
  }

  @Override
  public StringBuilder append(StringBuilder builder) throws NotFoundException {
    appendAssignment(builder);
    appendFindViewStatement(isActivity, builder);
    checkNullable(binding, builder);
    return builder;
  }

  /**
   * Appends a partial statement to find/retrieve a view given its binding.
   *
   * @param isActivity whether or not root is an activity.
   * @param builder the StringBuilder to which the statement will appended.
   * @return {@code builder}
   */
  private StringBuilder appendFindViewStatement(boolean isActivity, StringBuilder builder) {

    builder.append(root).append('.');

    if (binding.isUsingId()) {
      builder.append("findViewById(").append(binding.getId()).append(")");
    } else {
      if (isActivity) {
        builder.append("getWindow().getDecorView().findViewWithTag(\"")
            .append(binding.getTag())
            .append("\")");
      } else {
        builder.append("findViewWithTag(\"").append(binding.getTag()).append("\")");
      }
    }

    builder.append(";\n");
    return builder;
  }
}


text:
using System;

namespace OrbitTools
{
   /// <summary>
   /// This class accepts a single satellite's NORAD two-line element
   /// set and provides information regarding the satellite's orbit
   /// such as period, axis length, ECI coordinates, velocity, etc.
   /// </summary>
   public class Orbit
   {
      // Caching variables
      private TimeSpan m_Period = new TimeSpan(0, 0, 0, -1);

      // TLE caching variables
      private double m_Inclination;
      private double m_Eccentricity;
      private double m_RAAN;
      private double m_ArgPerigee;
      private double m_BStar;
      private double m_Drag;
      private double m_MeanAnomaly;
      private double m_TleMeanMotion;

      // Caching variables recovered from the input TLE elements
      private double m_aeAxisSemiMajorRec;  // semimajor axis, in AE units
      private double m_aeAxisSemiMinorRec;  // semiminor axis, in AE units
      private double m_rmMeanMotionRec;     // radians per minute
      private double m_kmPerigeeRec;        // perigee, in km
      private double m_kmApogeeRec;         // apogee, in km

      #region Properties

      private TLE       Tle        { get; set; }
      private NoradBase NoradModel { get; set; }
      public  Julian    Epoch      { get; private set; }
      public  DateTime  EpochTime  { get { return Epoch.ToTime(); }}

      // "Recovered" from the input elements
      public double SemiMajor    { get { return m_aeAxisSemiMajorRec; }}
      public double SemiMinor    { get { return m_aeAxisSemiMinorRec; }}
      public double MeanMotion   { get { return m_rmMeanMotionRec;    }}
      public double Major        { get { return 2.0 * SemiMajor;      }}
      public double Minor        { get { return 2.0 * SemiMinor;      }}
      public double Perigee      { get { return m_kmPerigeeRec;       }}
      public double Apogee       { get { return m_kmApogeeRec;        }}

      public double Inclination    { get { return m_Inclination;   }}
      public double Eccentricity   { get { return m_Eccentricity;  }}
      public double RAAN           { get { return m_RAAN;          }}
      public double ArgPerigee     { get { return m_ArgPerigee;    }}
      public double BStar          { get { return m_BStar;         }}
      public double Drag           { get { return m_Drag;          }}
      public double MeanAnomaly    { get { return m_MeanAnomaly;   }}
      private double TleMeanMotion { get { return m_TleMeanMotion; }}

      public string SatNoradId    { get { return Tle.NoradNumber; }}
      public string SatName       { get { return Tle.Name;        }}
      public string SatNameLong   { get { return SatName + " #" + SatNoradId; }}

      public TimeSpan Period
      {
         get
         {
            if (m_Period.TotalSeconds < 0.0)
            {
               // Calculate the period using the recovered mean motion.
               if (MeanMotion == 0)
               {
                  m_Period = new TimeSpan(0, 0, 0);
               }
               else
               {
                  double secs  = (Globals.TwoPi / MeanMotion) * 60.0;
                  int    msecs = (int)((secs - (int)secs) * 1000);

                  m_Period = new TimeSpan(0, 0, 0, (int)secs, msecs);
               }
            }

            return m_Period;
         }
      }

      #endregion

      #region Construction

      /// <summary>
      /// Standard constructor.
      /// </summary>
      /// <param name="tle">Two-line element orbital parameters.</param>
      public Orbit(TLE tle)
      {
         Tle     = tle;
         Epoch = Tle.EpochJulian;

         m_Inclination   = GetRad(TLE.Field.Inclination);
         m_Eccentricity  = Tle.GetField(TLE.Field.Eccentricity);
         m_RAAN          = GetRad(TLE.Field.Raan);
         m_ArgPerigee    = GetRad(TLE.Field.ArgPerigee);
         m_BStar         = Tle.GetField(TLE.Field.BStarDrag);
         m_Drag          = Tle.GetField(TLE.Field.MeanMotionDt);
         m_MeanAnomaly   = GetRad(TLE.Field.MeanAnomaly);
         m_TleMeanMotion = Tle.GetField(TLE.Field.MeanMotion);

         // Recover the original mean motion and semimajor axis from the
         // input elements.
         double mm     = TleMeanMotion;
         double rpmin  = mm * Globals.TwoPi / Globals.MinPerDay;   // rads per minute

         double a1     = Math.Pow(Globals.Xke / rpmin, 2.0 / 3.0);
         double e      = Eccentricity;
         double i      = Inclination;
         double temp   = (1.5 * Globals.Ck2 * (3.0 * Globals.Sqr(Math.Cos(i)) - 1.0) /
                         Math.Pow(1.0 - e * e, 1.5));
         double delta1 = temp / (a1 * a1);
         double a0     = a1 *
                        (1.0 - delta1 *
                        ((1.0 / 3.0) + delta1 *
                        (1.0 + 134.0 / 81.0 * delta1)));

         double delta0 = temp / (a0 * a0);

         m_rmMeanMotionRec    = rpmin / (1.0 + delta0);
         m_aeAxisSemiMajorRec = a0 / (1.0 - delta0);
         m_aeAxisSemiMinorRec = m_aeAxisSemiMajorRec * Math.Sqrt(1.0 - (e * e));
         m_kmPerigeeRec       = Globals.Xkmper * (m_aeAxisSemiMajorRec * (1.0 - e) - Globals.Ae);
         m_kmApogeeRec        = Globals.Xkmper * (m_aeAxisSemiMajorRec * (1.0 + e) - Globals.Ae);

         if (Period.TotalMinutes >= 225.0)
         {
            // SDP4 - period >= 225 minutes.
            NoradModel = new NoradSDP4(this);
         }
         else
         {
            // SGP4 - period < 225 minutes
            NoradModel = new NoradSGP4(this);
         }
      }

      #endregion

      #region Get Position

      /// <summary>
      /// Calculate satellite ECI position/velocity for a given time.
      /// </summary>
      /// <param name="tsince">Target time, in minutes past the TLE epoch.</param>
      /// <returns>Kilometer-based position/velocity ECI coordinates.</returns>
      public EciTime GetPosition(double minutesPastEpoch)
      {
         EciTime eci = NoradModel.GetPosition(minutesPastEpoch);

         // Convert ECI vector units from AU to kilometers
         double radiusAe = Globals.Xkmper / Globals.Ae;

         eci.ScalePosVector(radiusAe);                               // km
         eci.ScaleVelVector(radiusAe * (Globals.MinPerDay / 86400)); // km/sec

         return eci;
      }

      /// <summary>
      /// Calculate ECI position/velocity for a given time.
      /// </summary>
      /// <param name="utc">Target time (UTC).</param>
      /// <returns>Kilometer-based position/velocity ECI coordinates.</returns>
      public EciTime GetPosition(DateTime utc)
      {
         return GetPosition(TPlusEpoch(utc).TotalMinutes);
      }

      #endregion

      // ///////////////////////////////////////////////////////////////////////////
      // Returns elapsed time from epoch to given time.
      // Note: "Predicted" TLEs can have epochs in the future.
      public TimeSpan TPlusEpoch(DateTime utc)
      {
         return (utc - EpochTime);
      }

      // ///////////////////////////////////////////////////////////////////////////
      // Returns elapsed time from epoch to current time.
      // Note: "Predicted" TLEs can have epochs in the future.
      public TimeSpan TPlusEpoch()
      {
         return TPlusEpoch(DateTime.UtcNow);
      }

      #region Utility

      // ///////////////////////////////////////////////////////////////////
      protected double GetRad(TLE.Field fld)
      {
          return Tle.GetField(fld, TLE.Unit.Radians);
      }

      // ///////////////////////////////////////////////////////////////////
      protected double GetDeg(TLE.Field fld)
      {
          return Tle.GetField(fld, TLE.Unit.Degrees);
      }

      #endregion
   }
}