text:
namespace credential_provider {

// Mdm registry value key name.

// Enables verbose logging in GCPW.
extern const wchar_t kRegEnableVerboseLogging[];

// Determines if crash reporting is initialized for credential provider DLL.
extern const wchar_t kRegInitializeCrashReporting[];

// The url used to register the machine to MDM. If specified and non-empty
// additional user access restrictions will be applied to users associated
// to GCPW that have invalid token handles.
extern const wchar_t kRegMdmUrl[];

// The registry entry is used to control whether to enable enrollment
// Google device management solution.
extern const wchar_t kRegEnableDmEnrollment[];

// Disables password escrowing feature in GCPW.
extern const wchar_t kRegDisablePasswordSync[];

// Determines if multiple users can be added to a system managed by MDM.
extern const wchar_t kRegMdmSupportsMultiUser[];

// Allow sign in using normal consumer accounts.
extern const wchar_t kRegMdmAllowConsumerAccounts[];

// Enables force password reset option in forgot password flow.
extern const wchar_t kRegMdmEnableForcePasswordReset[];

// Password lsa store key prefix.
extern const wchar_t kUserPasswordLsaStoreKeyPrefix[];

// Error key name that is likely to be present in HTTP responses.
extern const char kErrorKeyInRequestResult[];

// Upload status for device details.
extern const wchar_t kRegDeviceDetailsUploadStatus[];

// Number of consecutive failures encountered when uploading device details.
extern const wchar_t kRegDeviceDetailsUploadFailures[];

// Specifies custom Chrome path to use for GLS.
extern const wchar_t kRegGlsPath[];

// Registry key where user device resource ID is stored.
extern const wchar_t kRegUserDeviceResourceId[];

// Maximum number of consecutive Upload device details failures for which we do
// enforce auth.
extern const int kMaxNumConsecutiveUploadDeviceFailures;

// The URL part that is used when constructing the developer complete URL. When
// it is empty, developer mode isn't enabled.
extern const wchar_t kRegDeveloperMode[];

// Class used in tests to force either a successful on unsuccessful enrollment
// to google MDM.
class GoogleMdmEnrollmentStatusForTesting {
 public:
  explicit GoogleMdmEnrollmentStatusForTesting(bool success);
  ~GoogleMdmEnrollmentStatusForTesting();
};

// Class used in tests to force enrolled status to google MDM.
class GoogleMdmEnrolledStatusForTesting {
 public:
  explicit GoogleMdmEnrolledStatusForTesting(bool success);
  ~GoogleMdmEnrolledStatusForTesting();
};

// Class used in tests to force upload device details needed.
class GoogleUploadDeviceDetailsNeededForTesting {
 public:
  explicit GoogleUploadDeviceDetailsNeededForTesting(bool success);
  ~GoogleUploadDeviceDetailsNeededForTesting();
};

// If MdmEnrollmentEnabled returns true, this function verifies that the machine
// is enrolled to MDM AND that the server to which it is enrolled is the same
// as the one specified in |kGlobalMdmUrlRegKey|, otherwise returns false.
bool NeedsToEnrollWithMdm();

// Checks user properties to determine whether last upload device details
// attempt succeeded for the given user.
bool UploadDeviceDetailsNeeded(const base::string16& sid);

// Checks whether the |kRegMdmUrl| is set on this machine and points
// to a valid URL. Returns false otherwise.
bool MdmEnrollmentEnabled();

// Checks whether the |kRegEscrowServiceServerUrl| is not empty on this
// machine.
bool PasswordRecoveryEnabled();

// Returns true if the |kKeyEnableGemFeatures| is set to 1.
bool IsGemEnabled();

// Checks if online login is enforced. Returns true if
// |kRegMdmEnforceOnlineLogin| is set to true at global or user level.
bool IsOnlineLoginEnforced(const base::string16& sid);

// Gets the escrow service URL unless password sync is disabled. Otherwise an
// empty url is returned.
GURL EscrowServiceUrl();

// Gets the gcpw service URL.
GURL GetGcpwServiceUrl();

// Enrolls the machine to with the Google MDM server if not already.
HRESULT EnrollToGoogleMdmIfNeeded(const base::Value& properties);

// Constructs the password lsa store key for the given |sid|.
base::string16 GetUserPasswordLsaStoreKey(const base::string16& sid);

// Get device resource ID for the user with given |sid|. Returns an empty string
// if one has not been set for the user.
base::string16 GetUserDeviceResourceId(const base::string16& sid);

// Converts the |url| in the form of http://xxxxx.googleapis.com/...
// to a form that points to a development URL as specified with |dev|
// environment. Final url will be in the form
// https://{dev}-xxxxx.sandbox.googleapis.com/...
base::string16 GetDevelopmentUrl(const base::string16& url,
                                 const base::string16& dev);

}  // namespace credential_provider

#endif  // CHROME_CREDENTIAL_PROVIDER_GAIACP_MDM_UTILS_H_


text:
#include <core/dependencies.h>

#ifdef POK_NEEDS_PORTS_VIRTUAL

#include <types.h>
#include <errno.h>
#include <libc/stdio.h>
#include <core/syscall.h>
#include <middleware/port.h>

pok_ret_t pok_port_virtual_nb_destinations (const pok_port_id_t id, uint32_t* result)
{
   return (pok_syscall2 (POK_SYSCALL_MIDDLEWARE_VIRTUAL_NB_DESTINATIONS, (uint32_t) id, (uint32_t) result));
}

#endif

redpajama_set_name: RedPajamaGithub


text:
.. _start_quick_start:

Quick start
===========

The quick start section takes you through basic operations with the Envoy server, and
provides an introduction to the types of configuration Envoy can be used with.

.. toctree::
    :maxdepth: 3

    run-envoy
    configuration-static
    configuration-dynamic-filesystem
    configuration-dynamic-control-plane
    admin
    securing
    next-steps


text:
function __processArg(obj, key) {
    var arg = null;
    if (obj) {
        arg = obj[key] || null;
        delete obj[key];
    }
    return arg;
}

function Controller() {
    function __alloyId1() {
        $.__views.index.removeEventListener("open", __alloyId1);
        if ($.__views.index.activity) {
            $.__views.index.activity.actionBar.title = "My App Title";
            $.__views.index.activity.actionBar.subtitle = "App subtitle";
            $.__views.index.activity.actionBar.backgroundImage = "/actionbackground.png";
            $.__views.index.activity.actionBar.icon = "/actionicon.png";
        } else {
            Ti.API.warn("You attempted to access an Activity on a lightweight Window or other");
            Ti.API.warn("UI component which does not have an Android activity. Android Activities");
            Ti.API.warn("are valid with only windows in TabGroups or heavyweight Windows.");
        }
    }
    function __alloyId7() {
        $.__views.index.removeEventListener("open", __alloyId7);
        if ($.__views.index.activity) $.__views.index.activity.onCreateOptionsMenu = function(e) {
            var __alloyId4 = {
                title: "option 1",
                icon: "/ic_menu_help.png",
                id: "__alloyId3"
            };
            $.__views.__alloyId3 = e.menu.add(_.pick(__alloyId4, Alloy.Android.menuItemCreateArgs));
            $.__views.__alloyId3.applyProperties(_.omit(__alloyId4, Alloy.Android.menuItemCreateArgs));
            $.__alloyId3 = $.__views.__alloyId3;
            doClick ? $.addListener($.__views.__alloyId3, "click", doClick) : __defers["$.__views.__alloyId3!click!doClick"] = true;
            var __alloyId6 = {
                title: "option 2",
                icon: "/ic_menu_home.png",
                id: "__alloyId5"
            };
            $.__views.__alloyId5 = e.menu.add(_.pick(__alloyId6, Alloy.Android.menuItemCreateArgs));
            $.__views.__alloyId5.applyProperties(_.omit(__alloyId6, Alloy.Android.menuItemCreateArgs));
            $.__alloyId5 = $.__views.__alloyId5;
            openWin2 ? $.addListener($.__views.__alloyId5, "click", openWin2) : __defers["$.__views.__alloyId5!click!openWin2"] = true;
            $.__views.index.activity.actionBar && ($.__views.index.activity.actionBar.title = "Title from menu");
        }; else {
            Ti.API.warn("You attempted to attach an Android Menu to a lightweight Window");
            Ti.API.warn("or other UI component which does not have an Android activity.");
            Ti.API.warn("Android Menus can only be opened on TabGroups and heavyweight Windows.");
        }
    }
    function doClick(e) {
        alert(e.source.title);
    }
    function openWin2(e) {
        Alloy.createController("win2").getView().open();
    }
    require("/alloy/controllers/BaseController").apply(this, Array.prototype.slice.call(arguments));
    this.__controllerPath = "index";
    this.args = arguments[0] || {};
    if (arguments[0]) {
        __processArg(arguments[0], "__parentSymbol");
        __processArg(arguments[0], "$model");
        __processArg(arguments[0], "__itemTemplate");
    }
    var $ = this;
    var exports = {};
    var __defers = {};
    $.__views.index = Ti.UI.createWindow({
        backgroundColor: "#000",
        modal: false,
        exitOnClose: true,
        id: "index"
    });
    $.__views.index && $.addTopLevelView($.__views.index);
    $.__views.index.addEventListener("open", __alloyId1);
    $.__views.index.addEventListener("open", __alloyId7);
    $.__views.__alloyId8 = Ti.UI.createLabel({
        color: "#fff",
        font: {
            fontSize: "18dp",
            fontWeight: "bold"
        },
        height: Ti.UI.SIZE,
        width: Ti.UI.SIZE,
        text: "Window 1",
        id: "__alloyId8"
    });
    $.__views.index.add($.__views.__alloyId8);
    $.__views.__alloyId9 = Ti.UI.createLabel({
        color: "#fff",
        font: {
            fontSize: "18dp",
            fontWeight: "bold"
        },
        height: Ti.UI.SIZE,
        width: Ti.UI.SIZE,
        text: "Press the menu button",
        bottom: "20dp",
        id: "__alloyId9"
    });
    $.__views.index.add($.__views.__alloyId9);
    exports.destroy = function() {};
    _.extend($, $.__views);
    $.index.open();
    __defers["$.__views.__alloyId3!click!doClick"] && $.addListener($.__views.__alloyId3, "click", doClick);
    __defers["$.__views.__alloyId5!click!openWin2"] && $.addListener($.__views.__alloyId5, "click", openWin2);
    _.extend($, exports);
}

var Alloy = require("/alloy"), Backbone = Alloy.Backbone, _ = Alloy._;

module.exports = Controller;


text:
<?
$total_per_ini2 = 10;
$max_pages2 = 100;
$items_per_page2 = 5;

$id = ( $id == 0 && $aid > 0 ) ? $aid : $id;

$dispauctiondate = CreateSelEndDate();
/*
  ///////////////////////////
  Important Note:
  If you want to display all ended auctions than remove a.auc_final_end_date conditions from all queries
  ///////////////////////////
 */

if (isset($_GET['pgno2'])) {
    $PageNo2 = chkInput($_GET['pgno2'], 'i');
    $PageNo2 = $PageNo2 > 0 ? $PageNo2 : 1;
} else {
    $PageNo2 = 1;
}

$from2 = $PageNo2 > 1 ? ($PageNo2 - 1) * $items_per_page2 : 0;

if ($aid == 3) {
    $qryselC2 = "select Count(*) as total2 from auction where auc_status='$aid' and auc_final_end_date>='$dispauctiondate' and " .
            "auc_final_end_date<='" . date("Y-m-d") . " 23:59:59' order by auctionID desc";

    $qrysel2 = "select a.auctionID,a.productID as productID,a.categoryID as categoryID,auc_start_price,auc_final_price,auc_start_date,auc_end_date,auc_start_time,auc_end_time,auc_status,auc_type,auc_recurr,buy_user,
        auc_fixed_price,fixedpriceauction,pennyauction,nailbiterauction,offauction,nightauction,openauction,time_duration,auc_final_end_date,total_time,pause_status,shipping_id,future_tstamp,recurr_count,auction_min_price,min_win_price,c.name as catname,
        use_free,allowbuynow,buynowprice,reverseauction,uniqueauction,lockauction,halfbackauction,cashauction,reserve,bidpack,tax1,tax2,bidpack_name,bidpack_banner,bidpack_price,price,bid_size,freebids ,p.name,p.picture1,short_desc,username, " .
            "(case when use_free = '1' " .
            " then (select sum(bid_count) from free_account where bid_flag='d' and auction_id=a.auctionID and user_id=a.buy_user group by auction_id) " .
            " else (select sum(bid_count) from bid_account  where bid_flag='d' and auction_id=a.auctionID and user_id=a.buy_user group by auction_id) " .
            "end) as bidcount " .
            "from auction a left join products p on a.productID=p.productID and a.bidpack=0 left join bidpack b on b.id=a.productID and a.bidpack=1 " .
            "left join categories c on p.categoryID=c.categoryID left join registration r on r.id=a.buy_user " .
            "where a.auc_status='$aid' and a.auc_final_end_date>='$dispauctiondate' and a.auc_final_end_date<='" . date("Y-m-d") . " 23:59:59' " .
            "order by a.auc_final_end_date desc limit $from2, $items_per_page2";
} else {
    $qryselC2 = "select Count(*) as total2 from auction where auc_status='3' and categoryID=$id and " .
            "auc_final_end_date>='$dispauctiondate' and auc_final_end_date<='" . date("Y-m-d") . " 23:59:59' order by auctionID desc";

    $qrysel2 = "select a.auctionID,a.productID as productID,a.categoryID as categoryID,auc_start_price,auc_final_price,auc_start_date,auc_end_date,auc_start_time,auc_end_time,auc_status,auc_type,auc_recurr,buy_user,
        auc_fixed_price,fixedpriceauction,pennyauction,nailbiterauction,offauction,nightauction,openauction,time_duration,auc_final_end_date,total_time,pause_status,shipping_id,future_tstamp,recurr_count,auction_min_price,min_win_price,c.name as catname,
        use_free,allowbuynow,buynowprice,reverseauction,uniqueauction,lockauction,cashauction,reserve,halfbackauction,bidpack,tax1,tax2,bidpack_name,bidpack_banner,bidpack_price,price,bid_size,freebids ,p.name,p.picture1,short_desc,username, " .
            "(case when use_free = '1' " .
            " then (select sum(bid_count) from free_account where bid_flag='d' and auction_id=a.auctionID and user_id=a.buy_user group by auction_id) " .
            " else (select sum(bid_count) from bid_account  where bid_flag='d' and auction_id=a.auctionID and user_id=a.buy_user group by auction_id) " .
            "end) as bidcount " .
            "from auction a left join products p on a.productID=p.productID and a.bidpack=0 left join bidpack b on b.id=a.productID and a.bidpack=1 " .
            "left join categories c on p.categoryID=c.categoryID left join registration r on r.id=a.buy_user " .
            "where a.auc_status='3' and a.categoryID=$id and a.auc_final_end_date>='$dispauctiondate' and " .
            "a.auc_final_end_date<='" . date("Y-m-d") . " 23:59:59' order by a.auc_final_end_date desc limit $from2, $items_per_page2";
}

$resultC2 = db_query($qryselC2) or die("1:====" . db_error());
$totalC2 = db_result($resultC2, 0);
db_free_result($resultC2);

$ressel2 = db_query($qrysel2) or die("2:====" . db_error());

$total_pages2 = ceil($totalC2 / $items_per_page2); // Figure out the total number of pages. Always round up using ceil()

$nextval2 = $PageNo2 + $total_per_ini2;
if ($total_pages2 >= $nextval2) {
    $start2 = $PageNo2;
    $max2 = $nextval2;
} else {
    if ($total_pages2 > $total_per_ini2) {
        $start2 = $total_pages2 - $total_per_ini2 + 1;
        $max2 = $total_pages2 + 1;
    } else {
        $start2 = 1;
        $max2 = $total_pages2 + 1;
    }
}
?>
<?php if ($totalC2 > 0) { ?>

<?php echo ENDED_AUCTIONS; ?>

<?php echo PRODUCTS; ?>

<?php echo PRICE_BIDDER; ?>

<?php echo COUNTDOWN; ?>

    <?php
    while (( $obj = db_fetch_array($ressel2))) {

        $pname = $obj['bidpack'] ? $obj['bidpack_name'] : $obj['name'];
        $obj['picture1'] = $obj['bidpack'] ? $obj['bidpack_banner'] : $obj['picture1'];
        $obj['price'] = $obj['bidpack'] ? $obj['bidpack_price'] : $obj['price'];
        $obj['short_desc'] = $obj['bidpack'] ? "{$obj['bid_size']} Bids and {$obj['freebids']} Freebids" : $obj['short_desc'];

                        $cornerImag = cornerImag($obj);

        if ($obj["fixedpriceauction"] == 1) {
            $fprice = $obj["auc_fixed_price"];
        } else {
            $fprice = $obj["offauction"] == 1 ? "0.00" : $obj["auc_final_price"];
        }
try{
if(!empty($obj['price'])){
        $saving_percent =  (@ $obj["price"] - (@ $obj["bidcount"] * 0.50) - @ $fprice);

	  $saving_percent = $saving_percent * 100 / @ $obj["price"] . '%';
}else{

 $saving_percent =  'no data avail.';
}
}catch (Exception $e) {

}

if(empty($obj['picture1'])){

$obj['picture1'] = 'no_image.jpg';

}

    ?>

<?php if ($cornerImag != '') {
                        ?>

                                    <img src="include/addons/icons/quibids-1.0/<?php echo $cornerImag; ?>"  alt=""/>

                        <?php } ?>
                <a href="viewproduct.php?aid=<?php echo $obj["auctionID"]; ?>" class="thumb" style="background-image: url('<?php echo $UploadImagePath; ?>products/thumbs_small/thumbsmall_<?php echo $obj["picture1"]; ?>');">

                        <a href="viewproduct.php?aid=<?php echo $obj["auctionID"]; ?>"><?php echo $pname; ?>

<?php echo stripslashes($obj['short_desc']); ?>

                    <?php echo SAVINGS; ?>
                                        <font id="value_index_page_<?php echo $obj["auctionID"]; ?>">---<?php if($obj["buy_user"] != "0"){ echo $saving_percent;} ?>

                <label class="winner" id="product_bidder_<?php echo $obj["auctionID"]; ?>">
                                    <?=($obj["buy_user"] != "0" ? htmlspecialchars(stripslashes($obj["username"]), ENT_QUOTES) : "---"); ?>

                <label class="timer time-left" id="counter_index_page_<?php echo $obj["auctionID"]; ?>">
                      <?php echo END_DATE; ?>:
<?= enddatefunction($obj["auc_final_end_date"]) . ' ' . substr($obj["auc_final_end_date"], 10); ?>

    <?php
                }
                db_free_result($ressel2);
                $get_param = $aid == 3 ? "aid=3" : "id=$id";
    ?>

<?php echo TOTAL . ' ' . $totalC2 . ' ' . AUCTIONS ?>, <?php echo $PageNo2 . ' ' . OF . ' ' . $total_pages2 . ' ' . PAGES; ?>

                            <?php if ($PageNo2 > 1) {
                            ?>
                                <a style="width: 50px;" id="prev" href="allauctions.php?pgno2=<?php echo $PageNo2 - 1; ?>&<?=$get_param; ?>"><?php echo PREVIOUS; ?>
                            <?php } else {
                            ?>
                                <?php echo PREVIOUS; ?>
                            <?php } ?>

                            <?php
                            $pagestart = $PageNo2 - 3;
                            if ($pagestart < 1) {
                                $pagestart = 1;
                            }

                            $pageend = $pagestart + 7;
                            if ($pageend > $total_pages2) {
                                $pageend = $total_pages2;
                            }

                            for ($page = $pagestart; $page <= $pageend; $page++) {
                            ?>
                                <a href="allauctions.php?pgno2=<?php echo $page; ?>&<?=$get_param; ?>" class="<?php echo $page == $PageNo2 ? 'selected' : ''; ?>"><?php echo $page; ?>
                            <?php } ?>

                            <?php if ($PageNo2 < $total_pages2) {
                            ?>
                                <a id="next" href="allauctions.php?pgno2=<?php echo $PageNo2 + 1; ?>&<?=$get_param; ?>"><?php echo NEXT; ?>
                            <?php } else {
                            ?>
                                <?php echo NEXT; ?>
                            <?php } ?>

<?php
                        }
?>


text:
package org.agrona.concurrent.errors;

import org.agrona.concurrent.AtomicBuffer;
import org.agrona.concurrent.EpochClock;

import java.io.PrintWriter;
import java.io.StringWriter;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.util.Objects;

import static java.nio.charset.StandardCharsets.UTF_8;
import static org.agrona.BitUtil.SIZE_OF_INT;
import static org.agrona.BitUtil.SIZE_OF_LONG;
import static org.agrona.BitUtil.align;

/**
 * Distinct record of error observations. Rather than grow a record indefinitely when many errors of the same type
 * are logged, this log takes the approach of only recording distinct errors of the same type and stack trace
 * and keeping a count and time of observation so that the record only grows with new distinct observations.
 *

 * The provided {@link AtomicBuffer} can wrap a memory-mapped file so logging can be out of process. This provides
 * the benefit that if a crash or lockup occurs then the log can be read externally without loss of data.
 *

 * Note: This class is threadsafe to be used from multiple logging threads.
 *

 * The error records are recorded to the memory mapped buffer in the following format.
 *

 *   0                   1                   2                   3
 *   0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
 *  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 *  |R|                         Length                              |
 *  +-+-------------------------------------------------------------+
 *  |R|                    Observation Count                        |
 *  +-+-------------------------------------------------------------+
 *  |R|                Last Observation Timestamp                   |
 *  |                                                               |
 *  +-+-------------------------------------------------------------+
 *  |R|               First Observation Timestamp                   |
 *  |                                                               |
 *  +---------------------------------------------------------------+
 *  |                        Encoded Error                         ...
 * ...                                                              |
 *  +---------------------------------------------------------------+
 *

 */
public class DistinctErrorLog
{
    /**
     * Offset within a record at which the length field begins.
     */
    public static final int LENGTH_OFFSET = 0;

    /**
     * Offset within a record at which the observation count field begins.
     */
    public static final int OBSERVATION_COUNT_OFFSET = SIZE_OF_INT;

    /**
     * Offset within a record at which the last observation timestamp field begins.
     */
    public static final int LAST_OBSERVATION_TIMESTAMP_OFFSET = OBSERVATION_COUNT_OFFSET + SIZE_OF_INT;

    /**
     * Offset within a record at which the first observation timestamp field begins.
     */
    public static final int FIRST_OBSERVATION_TIMESTAMP_OFFSET = LAST_OBSERVATION_TIMESTAMP_OFFSET + SIZE_OF_LONG;

    /**
     * Offset within a record at which the encoded exception field begins.
     */
    public static final int ENCODED_ERROR_OFFSET = FIRST_OBSERVATION_TIMESTAMP_OFFSET + SIZE_OF_LONG;

    /**
     * Alignment to be applied for record beginning.
     */
    public static final int RECORD_ALIGNMENT = SIZE_OF_LONG;

    private static final DistinctObservation INSUFFICIENT_SPACE = new DistinctObservation(null, 0);

    private int nextOffset = 0;
    private final EpochClock clock;
    private final AtomicBuffer buffer;
    private final Charset charset;
    private DistinctObservation[] distinctObservations = new DistinctObservation[0];

    /**
     * Create a new error log that will be written to a provided {@link AtomicBuffer}.
     *

     * The {@link Charset} with default to {@link StandardCharsets#UTF_8} for encoding the exceptions.
     *
     * @param buffer into which the observation records are recorded.
     * @param clock  to be used for time stamping records.
     */
    public DistinctErrorLog(final AtomicBuffer buffer, final EpochClock clock)
    {
        this(buffer, clock, UTF_8);
    }

    /**
     * Create a new error log that will be written to a provided {@link AtomicBuffer}.
     *
     * @param buffer  into which the observation records are recorded.
     * @param clock   to be used for time stamping records.
     * @param charset for encoding the errors.
     */
    public DistinctErrorLog(final AtomicBuffer buffer, final EpochClock clock, final Charset charset)
    {
        buffer.verifyAlignment();
        this.clock = clock;
        this.buffer = buffer;
        this.charset = charset;
    }

    /**
     * Buffer the error log is written to.
     *
     * @return buffer the error log is written to.
     */
    public AtomicBuffer buffer()
    {
        return buffer;
    }

    /**
     * {@link Charset} used to encode errors.
     *
     * @return the {@link Charset} used to encode errors.
     */
    public Charset charset()
    {
        return charset;
    }

    /**
     * Record an observation of an error. If it is the first observation of this error type for a stack trace
     * then a new entry will be created. For subsequent observations of the same error type and stack trace a
     * counter and time of last observation will be updated.
     *
     * @param observation to be logged as an error observation.
     * @return true if successfully logged otherwise false if insufficient space remaining in the log.
     */
    public boolean record(final Throwable observation)
    {
        final long timestampMs;
        DistinctObservation distinctObservation;

        synchronized (this)
        {
            timestampMs = clock.time();
            distinctObservation = find(distinctObservations, observation);

            if (null == distinctObservation)
            {
                distinctObservation = newObservation(timestampMs, observation);
                if (INSUFFICIENT_SPACE == distinctObservation)
                {
                    return false;
                }
            }
        }

        final int offset = distinctObservation.offset;
        buffer.getAndAddInt(offset + OBSERVATION_COUNT_OFFSET, 1);
        buffer.putLongOrdered(offset + LAST_OBSERVATION_TIMESTAMP_OFFSET, timestampMs);

        return true;
    }

    private static DistinctObservation find(
        final DistinctObservation[] existingObservations, final Throwable observation)
    {
        DistinctObservation existingObservation = null;

        for (final DistinctObservation o : existingObservations)
        {
            if (equals(o.throwable, observation))
            {
                existingObservation = o;
                break;
            }
        }

        return existingObservation;
    }

    @SuppressWarnings("FinalParameters")
    private static boolean equals(Throwable lhs, Throwable rhs)
    {
        while (true)
        {
            if (lhs == rhs)
            {
                return true;
            }

            if (lhs.getClass() == rhs.getClass() &&
                Objects.equals(lhs.getMessage(), rhs.getMessage()) &&
                equals(lhs.getStackTrace(), rhs.getStackTrace()))
            {
                lhs = lhs.getCause();
                rhs = rhs.getCause();

                if (null == lhs && null == rhs)
                {
                    return true;
                }
                else if (null != lhs && null != rhs)
                {
                    continue;
                }
            }

            return false;
        }
    }

    private static boolean equals(final StackTraceElement[] lhsStackTrace, final StackTraceElement[] rhsStackTrace)
    {
        if (lhsStackTrace.length != rhsStackTrace.length)
        {
            return false;
        }

        for (int i = 0, length = lhsStackTrace.length; i < length; i++)
        {
            final StackTraceElement lhs = lhsStackTrace[i];
            final StackTraceElement rhs = rhsStackTrace[i];

            if (lhs.getLineNumber() != rhs.getLineNumber() ||
                !lhs.getClassName().equals(rhs.getClassName()) ||
                !Objects.equals(lhs.getMethodName(), rhs.getMethodName()) ||
                !Objects.equals(lhs.getFileName(), rhs.getFileName()))
            {
                return false;
            }
        }

        return true;
    }

    private DistinctObservation newObservation(final long timestampMs, final Throwable observation)
    {
        final StringWriter stringWriter = new StringWriter();
        observation.printStackTrace(new PrintWriter(stringWriter));
        final byte[] encodedError = stringWriter.toString().getBytes(charset);

        final int length = ENCODED_ERROR_OFFSET + encodedError.length;
        final int offset = nextOffset;

        if ((offset + length) > buffer.capacity())
        {
            return INSUFFICIENT_SPACE;
        }

        buffer.putBytes(offset + ENCODED_ERROR_OFFSET, encodedError);
        buffer.putLong(offset + FIRST_OBSERVATION_TIMESTAMP_OFFSET, timestampMs);
        nextOffset = align(offset + length, RECORD_ALIGNMENT);

        final DistinctObservation distinctObservation = new DistinctObservation(observation, offset);
        distinctObservations = prepend(distinctObservations, distinctObservation);
        buffer.putIntOrdered(offset + LENGTH_OFFSET, length);

        return distinctObservation;
    }

    private static DistinctObservation[] prepend(
        final DistinctObservation[] observations, final DistinctObservation observation)
    {
        final int length = observations.length;
        final DistinctObservation[] newObservations = new DistinctObservation[length + 1];

        newObservations[0] = observation;
        System.arraycopy(observations, 0, newObservations, 1, length);

        return newObservations;
    }

    static final class DistinctObservation
    {
        final Throwable throwable;
        final int offset;

        DistinctObservation(final Throwable throwable, final int offset)
        {
            this.throwable = throwable;
            this.offset = offset;
        }
    }
}


text:
<!DOCTYPE html>

	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width">
	<title>QUnit Kix</title>
	<link rel="stylesheet" href="node_modules/qunitjs/qunit/qunit.css">


text:
//
//  DRHTAFPlotData.m
//  TAFPlotter
//
//  Created by Lee Walsh on 9/01/2014.
//  Copyright (c) 2014 Lee Walsh. All rights reserved.
//

#import "DRHTAFPlotData.h"
#import "DRHMotorUnitData.h"
#import "DRHTAFPlotDocument.h"

@implementation DRHTAFPlotData

@synthesize document;
@synthesize minFreq,maxFreq,xAxisMin,xAxisMax;

- (id)init
{
    self = [super init];
    if (self) {
        // Add your subclass-specific initialization here.
        dataArray = [NSMutableArray array];
        normalisedDataArray = [NSMutableArray array];

        minFreq = [NSNumber numberWithDouble:0.0];
        maxFreq = [NSNumber numberWithDouble:1000.0];
        xAxisMin = [NSNumber numberWithDouble:-1.0];
        xAxisMax = [NSNumber numberWithDouble:2.0];;
    }
    return self;
}

#pragma mark Getters
-(NSInteger)count{
    return [dataArray count];
}

-(NSArray *)dataArray{
    return dataArray;
}

-(void)decodeDataFromCSV:(NSString *)dataString{
//    NSLog(@"Decoding data from CSV string");
    //    NSLog(@".csv string:\n%@",dataString);
    BOOL fileFormatOK = YES;
    NSScanner *dataStringScanner = [NSScanner scannerWithString:dataString];
    [dataStringScanner scanUpToString:@"\r" intoString:NULL];       //exclude first line
    while (![dataStringScanner isAtEnd]) {
        NSMutableDictionary *unitData = [NSMutableDictionary dictionary];
        NSInteger newInteger;
        NSString *newString;
        CGFloat newDouble;
        if (![dataStringScanner scanString:@"," intoString:NULL]) {             //if a value is present
            if ([dataStringScanner scanInteger:&newInteger])                 //scan it
                [unitData setObject:[NSNumber numberWithInteger:newInteger] forKey:@"unitNumber"];
            if (![dataStringScanner scanString:@"," intoString:NULL]) {          //check that a comma follows
                fileFormatOK = NO;                                              //if not, formatting error
                break;
            }
        }

        if (![dataStringScanner scanString:@"," intoString:NULL]) {             //if a value is present
            if ([dataStringScanner scanInteger:&newInteger])                 //scan it
                [unitData setObject:[NSNumber numberWithInteger:newInteger] forKey:@"unitSet"];
            if (![dataStringScanner scanString:@"," intoString:NULL]) {          //check that a comma follows
                fileFormatOK = NO;                                              //if not, formatting error
                break;
            }
        }

        if (![dataStringScanner scanString:@"," intoString:NULL]) {             //if a value is present
            if ([dataStringScanner scanUpToString:@"," intoString:&newString])             //scan it
                [unitData setObject:newString forKey:@"unitType"];
            if (![dataStringScanner scanString:@"," intoString:NULL]) {          //check that a comma follows
                fileFormatOK = NO;                                              //if not, formatting error
                break;
            }
        }

        if (![dataStringScanner scanString:@"," intoString:NULL]) {             //if a value is present
            if ([dataStringScanner scanDouble:&newDouble])                 //scan it
                [unitData setObject:[NSNumber numberWithDouble:newDouble] forKey:@"onsetTime"];
            if (![dataStringScanner scanString:@"," intoString:NULL]) {          //check that a comma follows
                fileFormatOK = NO;                                              //if not, formatting error
                break;
            }
        }

        if (![dataStringScanner scanString:@"," intoString:NULL]) {             //if a value is present
            if ([dataStringScanner scanDouble:&newDouble])                 //scan it
                [unitData setObject:[NSNumber numberWithDouble:newDouble] forKey:@"peakTime"];
            if (![dataStringScanner scanString:@"," intoString:NULL]) {          //check that a comma follows
                fileFormatOK = NO;                                              //if not, formatting error
                break;
            }
        }

        if (![dataStringScanner scanString:@"," intoString:NULL]) {             //if a value is present
            if ([dataStringScanner scanDouble:&newDouble])                 //scan it
                [unitData setObject:[NSNumber numberWithDouble:newDouble] forKey:@"endTime"];
            if (![dataStringScanner scanString:@"," intoString:NULL]) {          //check that a comma follows
                fileFormatOK = NO;                                              //if not, formatting error
                break;
            }
        }

        if (![dataStringScanner scanString:@"," intoString:NULL]) {             //if a value is present
            if ([dataStringScanner scanDouble:&newDouble])                 //scan it
                [unitData setObject:[NSNumber numberWithDouble:newDouble] forKey:@"inspTime"];
            if (![dataStringScanner scanString:@"," intoString:NULL]) {          //check that a comma follows
                fileFormatOK = NO;                                              //if not, formatting error
                break;
            }
        }

        if (![dataStringScanner scanString:@"," intoString:NULL]) {             //if a value is present
            if ([dataStringScanner scanDouble:&newDouble])                 //scan it
                [unitData setObject:[NSNumber numberWithDouble:newDouble] forKey:@"onsetFreq"];
            if (![dataStringScanner scanString:@"," intoString:NULL]) {          //check that a comma follows
                fileFormatOK = NO;                                              //if not, formatting error
                break;
            }
        }
        if (![dataStringScanner scanString:@"," intoString:NULL]) {             //if a value is present
            if ([dataStringScanner scanDouble:&newDouble])                 //scan it
                [unitData setObject:[NSNumber numberWithDouble:newDouble] forKey:@"peakFreq"];
            if (![dataStringScanner scanString:@"," intoString:NULL]) {          //check that a comma follows
                fileFormatOK = NO;                                              //if not, formatting error
                break;
            }
        }
        if (![dataStringScanner scanString:@"," intoString:NULL]) {             //if a value is present
            if ([dataStringScanner scanDouble:&newDouble])                 //scan it
                [unitData setObject:[NSNumber numberWithDouble:newDouble] forKey:@"endFreq"];
            if (![dataStringScanner scanString:@"," intoString:NULL]) {          //check that a comma follows
                fileFormatOK = NO;                                              //if not, formatting error
                break;
            }
        }

        if (![dataStringScanner scanString:@"," intoString:NULL]) {             //if a value is present
            if ([dataStringScanner scanDouble:&newDouble])                 //scan it
                [unitData setObject:[NSNumber numberWithDouble:newDouble] forKey:@"tonicFreq"];
/*            if (![dataStringScanner scanString:@"\r" intoString:NULL]){          //check that a comma follows
                fileFormatOK = NO;                                              //if not, formatting error
                break;
            }*/
        }

//        NSLog(@"Unit data: %@,%@,%@,%@,%@,%@,%@,%@,%@,%@,%@",[unitData objectForKey:@"unitNumber"],[unitData objectForKey:@"unitSet"],[unitData objectForKey:@"unitType"],[unitData objectForKey:@"onsetTime"],[unitData objectForKey:@"peakTime"],[unitData objectForKey:@"endTime"],[unitData objectForKey:@"inspTime"],[unitData objectForKey:@"onsetFreq"],[unitData objectForKey:@"peakFreq"],[unitData objectForKey:@"endFreq"],[unitData objectForKey:@"tonicFreq"]);
        [dataArray addObject:[DRHMotorUnitData unitWith:unitData]];
        //NSLog(@"NUmber of motor units: %ld",[dataArray count]);
    }
    [self sortMotorUnits];
}

-(void)sortMotorUnits{
    NSSortDescriptor *normOnsetTimeDescriptor = [NSSortDescriptor sortDescriptorWithKey:@"normOnsetTime" ascending:YES];
    NSArray *sortDescriptors = @[normOnsetTimeDescriptor];
    [dataArray sortUsingDescriptors:sortDescriptors];

    NSMutableArray *inspPhasic = [NSMutableArray array];
    NSMutableArray *inspTonic = [NSMutableArray array];
    NSMutableArray *expPhasic = [NSMutableArray array];
    NSMutableArray *expTonic = [NSMutableArray array];
    NSMutableArray *tonic = [NSMutableArray array];

    for (DRHMotorUnitData *currentUnit in dataArray) {
        if ([[[currentUnit unitType] lowercaseString] isEqualToString:@"inspiratory phasic"]) {
            [inspPhasic addObject:currentUnit];
        } else if ([[[currentUnit unitType] lowercaseString] isEqualToString:@"inspiratory tonic"]) {
            [inspTonic addObject:currentUnit];
        } else if ([[[currentUnit unitType] lowercaseString] isEqualToString:@"expiratory phasic"]) {
            [expPhasic addObject:currentUnit];
        } else if ([[[currentUnit unitType] lowercaseString] isEqualToString:@"expiratory tonic"]) {
            [expTonic addObject:currentUnit];
        } else if ([[[currentUnit unitType] lowercaseString] isEqualToString:@"tonic"]) {
            [tonic addObject:currentUnit];
        }
    }
//    NSLog(@"Count: %ld, total: %ld",[dataArray count],[inspPhasic count]+[inspTonic count]+[expPhasic count]+[expTonic count]+[tonic count]);
    [dataArray removeAllObjects];
    if ([tonic count]>0) {
        [dataArray addObjectsFromArray:tonic];
        [dataArray addObject:[DRHMotorUnitData blankUnit]];
    }
    if ([expTonic count]>0) {
        [dataArray addObjectsFromArray:expTonic];
        [dataArray addObject:[DRHMotorUnitData blankUnit]];
    }
    if ([expPhasic count]>0) {
        [dataArray addObjectsFromArray:expPhasic];
        [dataArray addObject:[DRHMotorUnitData blankUnit]];
    }
    if ([inspTonic count]>0) {
        [dataArray addObjectsFromArray:inspTonic];
        [dataArray addObject:[DRHMotorUnitData blankUnit]];
    }
    if ([inspPhasic count]>0) {
        [dataArray addObjectsFromArray:inspPhasic];
        [dataArray addObject:[DRHMotorUnitData blankUnit]];
    }
}

-(void)calculateParameters{
    NSNumber *lowestFreq = [NSNumber numberWithDouble:1000.0];
    NSNumber *highestFreq = [NSNumber numberWithDouble:0.0];
    NSNumber *firstUnitStartTime = [NSNumber numberWithDouble:1000.0];
    NSNumber *lastUnitEndTime = [NSNumber numberWithDouble:0.0];
    for (DRHMotorUnitData *currentUnit in dataArray) {
        if ([[currentUnit onsetFreq] isLessThan:lowestFreq]) {
            lowestFreq = [currentUnit onsetFreq];
        }
        if ([[currentUnit peakFreq] isLessThan:lowestFreq]) {
            lowestFreq = [currentUnit peakFreq];
        }
        if ([[currentUnit endFreq] isLessThan:lowestFreq]) {
            lowestFreq = [currentUnit endFreq];
        }
        if ([[currentUnit tonicFreq] isLessThan:lowestFreq]) {
            lowestFreq = [currentUnit tonicFreq];
        }

        if ([[currentUnit onsetFreq] isGreaterThan:highestFreq]) {
            highestFreq = [currentUnit onsetFreq];
        }
        if ([[currentUnit peakFreq] isGreaterThan:highestFreq]) {
            highestFreq = [currentUnit peakFreq];
        }
        if ([[currentUnit endFreq] isGreaterThan:highestFreq]) {
            highestFreq = [currentUnit endFreq];
        }
        if ([[currentUnit tonicFreq] isGreaterThan:highestFreq]) {
            highestFreq = [currentUnit tonicFreq];
        }

        if ([[currentUnit normOnsetTime] isLessThan:firstUnitStartTime]) {
            firstUnitStartTime = [currentUnit normOnsetTime];
        }
        if ([[currentUnit normEndTime] isGreaterThan:lastUnitEndTime]) {
            lastUnitEndTime = [currentUnit normEndTime];
        }
    }
    [self willChangeValueForKey:@"minFreq"];
    [self willChangeValueForKey:@"maxFreq"];
    [self willChangeValueForKey:@"xAxisMin"];
    [self willChangeValueForKey:@"xAxisMax"];
    minFreq = lowestFreq;
    maxFreq = highestFreq;
    xAxisMin = firstUnitStartTime;
    xAxisMax = lastUnitEndTime;
    [self didChangeValueForKey:@"minFreq"];
    [self didChangeValueForKey:@"maxFreq"];
    [self didChangeValueForKey:@"xAxisMin"];
    [self didChangeValueForKey:@"xAxisMax"];
}

#pragma NSCoding
-(id)initWithCoder:(NSCoder *)coder{
    self = [super init];
    dataArray = [coder decodeObjectForKey:@"dataArray"];
    normalisedDataArray = [coder decodeObjectForKey:@"normalisedDataArray"];
    minFreq = [coder decodeObjectForKey:@"minFreq"];
    maxFreq = [coder decodeObjectForKey:@"maxFreq"];
    xAxisMin = [coder decodeObjectForKey:@"xAxisMin"];
    xAxisMax = [coder decodeObjectForKey:@"xAxisMax"];
    return self;
}

-(void)encodeWithCoder:(NSCoder *)coder{
    [coder encodeObject:dataArray forKey:@"dataArray"];
    [coder encodeObject:normalisedDataArray forKey:@"normalisedDataArray"];
    [coder encodeObject:minFreq forKey:@"minFreq"];
    [coder encodeObject:maxFreq forKey:@"maxFreq"];
    [coder encodeObject:xAxisMin forKey:@"xAxisMin"];
    [coder encodeObject:xAxisMax forKey:@"xAxisMax"];
}

@end


text:
package org.jredis.semantics;

import java.util.List;
import java.util.Map;

import org.jredis.JRedis;
import org.jredis.RedisException;
import org.jredis.RedisType;

/**
 * This interface is certainly optional, and as of now simply an idea
 * that needed to be put in place for review and feedback.
 *
 * [TODO: think about me!]
 *
 * @author  Joubin Houshyar (alphazero@sensesay.net)
 * @version alpha.0, Apr 14, 2009
 * @since   alpha.0
 *
 */

public interface SemanticJRedis <T> /* extends JRedis */
extends CodecManager {

	// ------------------------------------------------------------------------
	// Semantic context methods
	// ------------------------------------------------------------------------

	// ------------------------------------------------------------------------
	// Security and User Management
	// ------------------------------------------------------------------------

	/**
	 * Required for authorizing access to the server.  This method implements
	 * the AUTH command.  It may be used with a non-secured server without
	 * any side effect.
	 *
	 * @param authorization key as defined in the server.
	 * @throws RedisException if the server is in secure more and the
	 * authorization provided
	 */
	public JRedis auth (String authorization) throws RedisException;

	// ------------------------------------------------------------------------
	// "Connection Handling"
	// ------------------------------------------------------------------------

	/**
	 * Ping redis
	 * @return true (unless not authorized)
	 * @throws RedisException (as of ver. 0.09) in case of unauthorized access
	 */
	public JRedis ping () throws RedisException;
	public void quit ();

	// ------------------------------------------------------------------------
	// "Commands operating on string values"
	// ------------------------------------------------------------------------

	public void set (String key, T value) throws RedisException;

	public boolean setnx (String key, T value) throws RedisException;

	public T get (String key)  throws RedisException;

	public List<T> mget(String key, String...moreKeys) throws RedisException;

	public long incr (String key) throws RedisException;
	public long incrby (String key, int delta) throws RedisException;
	public long decr (String key) throws RedisException;
	public long decrby (String key, int delta) throws RedisException;

	public boolean exists(String key) throws RedisException;
	public boolean del (String key) throws RedisException;
	public RedisType type (String key) throws RedisException;

	// ------------------------------------------------------------------------
	// "Commands operating on the key space"
	// ------------------------------------------------------------------------

	public List<String> keys () throws RedisException;
	public List<String> keys (String pattern) throws RedisException;
	public String randomkey() throws RedisException;
	public String rename (String oldkey, String newkey) throws RedisException;
	public boolean renamenx (String oldkey, String brandnewkey) throws RedisException;
	public long dbsize () throws RedisException;
	public boolean expire (String key, int ttlseconds) throws RedisException;
	// ------------------------------------------------------------------------
	// Commands operating on lists
	// ------------------------------------------------------------------------

	public void rpush (String listkey, T value) throws RedisException;
	public void lpush (String listkey, T value) throws RedisException;
	public void lset (String key, int index, T value) throws RedisException;
	public long lrem (String listKey, T value,       int count) throws RedisException;
	public long llen (String listkey) throws RedisException;
	public List<T> lrange (String listkey, int from, int to) throws RedisException;
	public void ltrim (String listkey, int keepFrom, int keepTo) throws RedisException;
	public T lindex (String listkey, int index) throws RedisException;
	public T lpop (String listKey) throws RedisException;
	public T rpop (String listKey) throws RedisException;

	// ------------------------------------------------------------------------
	// Commands operating on sets
	// ------------------------------------------------------------------------

	public boolean sadd (String setkey, T member) throws RedisException;
	public boolean srem (String setKey, T member) throws RedisException;
	public boolean sismember (String setKey, T member) throws RedisException;
	public long scard (String setKey) throws RedisException;
	public List<T> sinter (String set1, String...sets) throws RedisException;
	public void sinterstore (String destSetKey, String...sets) throws RedisException;
	public List<T> smembers (String setkey) throws RedisException;

	// ------------------------------------------------------------------------
	// Multiple databases handling commands
	// ------------------------------------------------------------------------

	public JRedis select (int index) throws RedisException;
	public JRedis flushdb () throws RedisException;
	public JRedis flushall () throws RedisException;
	public boolean move (String key, int dbIndex) throws RedisException;

	// ------------------------------------------------------------------------
	// Sorting
	// ------------------------------------------------------------------------

	public SemanticSort<T> sort(String key);

	// ------------------------------------------------------------------------
	// Persistence control commands
	// ------------------------------------------------------------------------

	public void save() throws RedisException;
	public void bgsave () throws RedisException;
	public long lastsave () throws RedisException;
	public void shutdown () throws RedisException;

	//------------------------------------------------------------------------
	//Remote server control commands
	//------------------------------------------------------------------------

	public Map<String, String>	info ()  throws RedisException;
}


text:
{% extends "tribes/base.html" %}

{% load i18n %}
{% load humanize %}
{% load pagination_tags %}
{% load order_by %}
{% load extra_tagging_tags %}
{% load tribe_tags %}
{% load things_tags %}

{% block head_title %}{% blocktrans %}Tribes{% endblocktrans %}{% endblock %}

{% block body %}

{% trans "Tribes" %}

{% trans "A tribe is a group of people with some common interest." %}

    {% if user.is_authenticated %}

{% trans "Start your own tribe" %}

            <form id="start-tribe" method="POST" action="{% url tribe_create %}">
                {% get_tribe_form as tribe_form %}

                    {{ tribe_form }}

	<input type="hidden" name="action" value="create" /><input type="submit" value="{% trans 'create' %}"/>

            </form>

    {% else %}
        {% url acct_signup as signup_url %}
        {% url acct_login as login_url %}

{% blocktrans %}Sign up and log in  to create your own tribe or join an existing one.{% endblocktrans %}

    {% endif %}
    {% display_search %}
    {% display_ordering %}

    {% autopaginate objects 10 %}
    {% if objects %}

        {% for tribe in objects %}
            {% show_tribe tribe %}
        {% endfor %}

        {% paginate %}
    {% endif %}

{% endblock %}

{% block extra_body %}

{% endblock %}


text:
package org.pxcbpmisframework.core.page;

import org.pxcbpmisframework.core.util.oConvertUtils;

/**
 *
 * @ClassName: PageHtmlUtils
 * @Description: TODO(分页html)
 * @author Mr_Pxc
 * @date 2013-6-19 下午03:11:19
 * @project_name:BPMIS_1
 * @version 1.0
 */
public class PageHtmlUtils {
	private static String Start_Form = "<form id=\"searchForm\" action=\"\" method=\"post\" >";
	private static String End_Form = "</form>";
	private static String Input_Hidden = "<input type=\"hidden\" name=\"currentPage\" id=\"pageNo\" value=\"\" />";
	/*
	 * ===================== 默认样式1 Default//正规的正方形====================
	 */
	private static String Div_Class_Pagination = "
"; // 缺

	private static String Ul_Class_Pager = "
";// 缺

	private static String Li_Class_Previous_s = "
上一页
";// pdisabled=disabled
	private static String Li_Class_Previous_Disabled = "
上一页
";// pdisabled=disabled
	private static String Li_Active_Content = "
"; // 缺尾
	private static String Li_Content = "
<a href=\"javascript:page("; // 缺尾
	private static String Li_Class_Next_s = "
下一页
";// ndisabled=disabled
	private static String Li_Class_Next_Disabled = "
下一页
";// ndisabled=disabled
	private static String Li_Sheng = "
......
";
	/*
	 * ===================== 默认样式2 样式1//圆形====================
	 */
	private static String Ul_Class_Pager1 = "
";// 缺

	/*
	 * ===================== 后尾继续====================
	 */
	private static String Ul_Class_Last = "
"
			+ "
"
			+ "当前第 <input type=\"text\" value=\"#currentPage#\" onkeypress=\"var e=window.event||this;var c=e.keyCode||e.which;if(c==13)return page(this.value);\" onclick=\"this.select();\"> / #totalPages# 页,共 #totalRecords# 条"
			+ "
" + "
";

	public PageHtmlUtils() {

	}

	/**
	 *
	 * @Title: DefaultPagination
	 * @Description: TODO(默认样式)
	 * @param @param currentPage 当前页
	 * @param @param pageSize 页数量
	 * @param @param totalPages 总页数
	 * @return String
	 * @throws
	 */
	public static String getDefault(Page page) {
		return DefaultPagination(page.getCurrentPage(), page.getPageSize(),
				page.getTotalPages(), page.getTotalRecords());
	}

	private static String DefaultPagination(int currentPage, int pageSize,
			int totalPages, int totalRecords) {
		StringBuffer page = new StringBuffer();
		page.append(Start_Form).append(Input_Hidden).append(
				Div_Class_Pagination).append(Ul_Class_Pager);// 先添加头
		// totalPages <=5
		if (totalPages <= 5) {
			if (currentPage == 1) // ==第一页
				page.append(Li_Class_Previous_Disabled);
			else
				page.append(Li_Class_Previous_s).append(currentPage - 1)
						.append(Li_Class_Previous_e);
			for (int i = 1; i < totalPages + 1; i++) {
				if (currentPage == i)
					page.append(Li_Active_Content).append(i)
							.append("
");
				else
					page.append(Li_Content).append(i).append(");\">").append(i)
							.append("
");
			}
			if (currentPage == totalPages) // ==总页数
				page.append(Li_Class_Next_Disabled);
			else
				page.append(Li_Class_Next_s).append(currentPage + 1).append(
						Li_Class_Next_e);

		} else {// totalPages >5
			if (currentPage < 5) {
				if (currentPage == 1) // ==第一页
					page.append(Li_Class_Previous_Disabled);
				else
					page.append(Li_Class_Previous_s).append(currentPage - 1)
							.append(Li_Class_Previous_e);
				for (int i = 1; i < 6; i++) {
					if (currentPage == i)
						page.append(Li_Active_Content).append(i).append(
								"
");
					else
						page.append(Li_Content).append(i).append(");\">")
								.append(i).append("
");
				}
				page.append(Li_Sheng);
				if (currentPage == totalPages) // ==总页数
					page.append(Li_Class_Next_Disabled);
				else
					page.append(Li_Class_Next_s).append(currentPage + 1)
							.append(Li_Class_Next_e);

			} else {
				page.append(Li_Class_Previous_s).append(currentPage - 1)
						.append(Li_Class_Previous_e);
				page.append(Li_Sheng);
				page.append(Li_Content).append(currentPage - 2).append(");\">")
						.append(currentPage - 2).append("
");
				page.append(Li_Content).append(currentPage - 1).append(");\">")
						.append(currentPage - 1).append("
");
				page.append(Li_Active_Content).append(currentPage).append(
						"
");
				if (currentPage + 1 == totalPages) {
					page.append(Li_Content).append(currentPage + 1).append(
							");\">").append(currentPage + 1)
							.append("
");
				} else if (currentPage + 2 <= totalPages) {
					page.append(Li_Content).append(currentPage + 1).append(
							");\">").append(currentPage + 1)
							.append("
");
					page.append(Li_Content).append(currentPage + 2).append(
							");\">").append(currentPage + 2)
							.append("
");
				}
				if (currentPage + 2 <= totalPages)
					page.append(Li_Sheng);
				if (currentPage == totalPages) // ==总页数
					page.append(Li_Class_Next_Disabled);
				else
					page.append(Li_Class_Next_s).append(currentPage + 1)
							.append(Li_Class_Next_e);

			}
		}
		page.append("
").append(Ul_Class_Last).append("
").append(
				End_Form);
		return page.toString().replaceAll("#currentPage#",
				oConvertUtils.getString(currentPage)).replaceAll(
				"#totalPages#", oConvertUtils.getString(totalPages))
				.replaceAll("#totalRecords#",
						oConvertUtils.getString(totalRecords)).replaceAll(
						"#pageSize#", oConvertUtils.getString(pageSize));
	}

	/**
	 *
	 * @Title: getPaginationCir
	 * @Description: TODO(默认样式)
	 * @param @param currentPage 当前页
	 * @param @param pageSize 页数量
	 * @param @param totalPages 总页数
	 * @return String
	 * @throws
	 */
	public static String getPageCir(Page page) {
		return getPaginationCir(page.getCurrentPage(), page.getPageSize(), page
				.getTotalPages(), page.getTotalRecords());
	}

	private static String getPaginationCir(int currentPage, int pageSize,
			int totalPages, int totalRecords) {
		StringBuffer page = new StringBuffer();
		page.append(Start_Form).append(Input_Hidden).append(
				Div_Class_Pagination).append(Ul_Class_Pager1);// 先添加头
		// totalPages <=5
		if (totalPages <= 5) {
			if (currentPage == 1) // ==第一页
				page.append(Li_Class_Previous_Disabled);
			else
				page.append(Li_Class_Previous_s).append(currentPage - 1)
						.append(Li_Class_Previous_e);
			for (int i = 1; i < totalPages + 1; i++) {
				if (currentPage == i)
					page.append(Li_Active_Content).append(i)
							.append("
");
				else
					page.append(Li_Content).append(i).append(");\">").append(i)
							.append("
");
			}
			if (currentPage == totalPages) // ==总页数
				page.append(Li_Class_Next_Disabled);
			else
				page.append(Li_Class_Next_s).append(currentPage + 1).append(
						Li_Class_Next_e);

		} else {// totalPages >5
			if (currentPage < 5) {
				if (currentPage == 1) // ==第一页
					page.append(Li_Class_Previous_Disabled);
				else
					page.append(Li_Class_Previous_s).append(currentPage - 1)
							.append(Li_Class_Previous_e);
				for (int i = 1; i < 6; i++) {
					if (currentPage == i)
						page.append(Li_Active_Content).append(i).append(
								"
");
					else
						page.append(Li_Content).append(i).append(");\">")
								.append(i).append("
");
				}
				page.append(Li_Sheng);
				if (currentPage == totalPages) // ==总页数
					page.append(Li_Class_Next_Disabled);
				else
					page.append(Li_Class_Next_s).append(currentPage + 1)
							.append(Li_Class_Next_e);

			} else {
				page.append(Li_Class_Previous_s).append(currentPage - 1)
						.append(Li_Class_Previous_e);
				page.append(Li_Sheng);
				page.append(Li_Content).append(currentPage - 2).append(");\">")
						.append(currentPage - 2).append("
");
				page.append(Li_Content).append(currentPage - 1).append(");\">")
						.append(currentPage - 1).append("
");
				page.append(Li_Active_Content).append(currentPage).append(
						"
");
				if (currentPage + 1 == totalPages) {
					page.append(Li_Content).append(currentPage + 1).append(
							");\">").append(currentPage + 1)
							.append("
");
				} else if (currentPage + 2 <= totalPages) {
					page.append(Li_Content).append(currentPage + 1).append(
							");\">").append(currentPage + 1)
							.append("
");
					page.append(Li_Content).append(currentPage + 2).append(
							");\">").append(currentPage + 2)
							.append("
");
				}
				if (currentPage + 2 <= totalPages)
					page.append(Li_Sheng);
				if (currentPage == totalPages) // ==总页数
					page.append(Li_Class_Next_Disabled);
				else
					page.append(Li_Class_Next_s).append(currentPage + 1)
							.append(Li_Class_Next_e);

			}
		}
		page.append("
").append(Ul_Class_Last).append("
").append(
				End_Form);
		return page.toString().replaceAll("#currentPage#",
				oConvertUtils.getString(currentPage)).replaceAll(
				"#totalPages#", oConvertUtils.getString(totalPages))
				.replaceAll("#totalRecords#",
						oConvertUtils.getString(totalRecords)).replaceAll(
						"#pageSize#", oConvertUtils.getString(pageSize));
	}

	// System.out.println("http://"+request.getHeader("Host")+""+request.getRequestURI());

	/*
	 * function page(n,s){ $("#pageNo").val(n); $("#pageSize").val(s);
	 * $("#searchForm").submit(); return false; }
	 *
	 * test
	 */
	@SuppressWarnings("static-access")
	public static void main(String[] args) {
		for (int i = 1; i < 21; i++) {
			System.out.println(new PageHtmlUtils().getPaginationCir(i, 10, 20,
					10));
		}

	}

}


text:
@interface ARInternalMobileWebViewController : ARExternalWebBrowserViewController <UIScrollViewDelegate>

@property (nonatomic, strong) Fair *fair;

- (void)startLoginOrSignupWithTrialContext:(ARTrialContext)context;
- (ARTrialContext)trialContextForRequestURL:(NSURL *)requestURL;

@end


text:
package com.opensymphony.workflow.loader;

import com.opensymphony.workflow.FactoryException;

import java.io.*;

import java.net.URL;
import java.net.URLConnection;
import java.net.URLEncoder;

import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;

/**
 * @author Hani Suleiman
 *         Date: Dec 17, 2004
 *         Time: 12:00:36 AM
 */
public class HTTPWorkflowFactory extends AbstractWorkflowFactory {
    //~ Instance fields ////////////////////////////////////////////////////////

    protected Map workflows;
    protected boolean reload;

    //~ Methods ////////////////////////////////////////////////////////////////

    public void setLayout(String workflowName, Object layout) {
    }

    public Object getLayout(String workflowName) {
        return null;
    }

    public boolean isModifiable(String name) {
        return true;
    }

    public String getName() {
        return null;
    }

    public WorkflowDescriptor getWorkflow(String name, boolean validate) throws FactoryException {
        HTTPWorkflowConfig c = (HTTPWorkflowConfig) workflows.get(name);

        if (c == null) {
            throw new FactoryException("Unknown workflow name \"" + name + '\"');
        }

        if (c.descriptor != null) {
            loadWorkflow(c);
        }

        c.descriptor.setName(name);

        return c.descriptor;
    }

    public String[] getWorkflowNames() throws FactoryException {
        int i = 0;
        String[] res = new String[workflows.keySet().size()];
        Iterator it = workflows.keySet().iterator();

        while (it.hasNext()) {
            res[i++] = (String) it.next();
        }

        return res;
    }

    public void createWorkflow(String name) {
    }

    public void initDone() throws FactoryException {
    }

    public boolean removeWorkflow(String name) throws FactoryException {
        throw new FactoryException("remove workflow not supported");
    }

    /* (non-Javadoc)
     * @see com.opensymphony.workflow.loader.AbstractWorkflowFactory#renameWorkflow(java.lang.String, java.lang.String)
     */
    public void renameWorkflow(String oldName, String newName) {
    }

    /* (non-Javadoc)
     * @see com.opensymphony.workflow.loader.AbstractWorkflowFactory#save()
     */
    public void save() {
    }

    /* (non-Javadoc)
     * @see com.opensymphony.workflow.loader.AbstractWorkflowFactory#saveWorkflow(java.lang.String, com.opensymphony.workflow.loader.WorkflowDescriptor, boolean)
     */
    public boolean saveWorkflow(String name, WorkflowDescriptor descriptor, boolean replace) throws FactoryException {
        HTTPWorkflowConfig c = (HTTPWorkflowConfig) workflows.get(name);

        if ((c != null) && !replace) {
            return false;
        }

        if (c == null) {
            throw new UnsupportedOperationException("Saving of new workflow is not currently supported");
        }

        Writer out;

        // [KAP] comment this line to disable all the validation while saving a workflow
        //descriptor.validate();
        try {
            out = new OutputStreamWriter(null, "utf-8");
        } catch (UnsupportedEncodingException ex) {
            throw new FactoryException("utf-8 encoding not supported, contact your JVM vendor!");
        }

        writeXML(descriptor, out);

        //write it out to a new file, to ensure we don't end up with a messed up file if we're interrupted halfway for some reason
        //now lets rename
        return true;
    }

    protected static String get(String urlValue, Map data) throws IOException {
        BufferedReader input;

        StringBuffer value = new StringBuffer(urlValue);

        if (data.size() > 0) {
            if (value.indexOf("?") == -1) {
                value.append("?");
            } else {
                value.append("&");
            }
        }

        Iterator i = data.entrySet().iterator();

        while (i.hasNext()) {
            Map.Entry entry = (Map.Entry) i.next();
            value.append(entry.getKey()).append('=');
            value.append(URLEncoder.encode((String) entry.getValue(), "utf-8"));

            if (i.hasNext()) {
                value.append("&");
            }
        }

        URL url = new URL(urlValue);
        URLConnection connection = url.openConnection();
        connection.setDoOutput(true);
        connection.setUseCaches(false);

        input = new BufferedReader(new InputStreamReader(connection.getInputStream()));

        StringBuffer output = new StringBuffer();
        String line;

        while (null != (line = input.readLine())) {
            output.append(line).append('\n');
        }

        input.close();

        return output.toString();
    }

    protected static String post(String urlValue, Map data) throws IOException {
        BufferedReader input;

        URL url = new URL(urlValue);
        URLConnection connection = url.openConnection();
        connection.setDoInput(true);
        connection.setDoOutput(true);
        connection.setUseCaches(false);
        connection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");

        DataOutputStream out = new DataOutputStream(connection.getOutputStream());

        StringBuffer content = new StringBuffer();
        Iterator i = data.entrySet().iterator();

        while (i.hasNext()) {
            Map.Entry entry = (Map.Entry) i.next();
            content.append(entry.getKey()).append('=');
            content.append(URLEncoder.encode((String) entry.getValue(), "utf-8"));

            if (i.hasNext()) {
                content.append("&");
            }
        }

        out.writeBytes(content.toString());
        out.flush();
        out.close();

        input = new BufferedReader(new InputStreamReader(connection.getInputStream()));

        StringBuffer output = new StringBuffer();
        String line;

        while (null != (line = input.readLine())) {
            output.append(line).append('\n');
        }

        input.close();

        return output.toString();
    }

    protected String readLayoutBuffer(final String url, final String docId) throws Exception {
        Map map = new HashMap();
        map.put("docId", docId);
        map.put("command", "layout");

        return get(url, map);
    }

    protected String readWorkflowBuffer(final String url, final String docId) throws Exception {
        Map map = new HashMap();
        map.put("docId", docId);
        map.put("command", "workflow");

        return get(url, map);
    }

    protected String writeWorkflowDescriptor(final String url, final String docId, final String name, final String workflowXML) throws Exception {
        String ret = null;

        Map map = new HashMap();
        map.put("docId", docId);
        map.put("data", workflowXML);
        map.put("command", "workflow");

        return post(url, map);
    }

    protected String writeWorkflowLayout(final String url, final String docId, final String name, final String layoutXML) throws Exception {
        Map map = new HashMap();
        map.put("docId", docId);
        map.put("data", layoutXML);
        map.put("command", "layout");

        return post(url, map);
    }

    protected void writeXML(WorkflowDescriptor descriptor, Writer out) {
        PrintWriter writer = new PrintWriter(new BufferedWriter(out));
        writer.println(WorkflowDescriptor.XML_HEADER);
        writer.println(WorkflowDescriptor.DOCTYPE_DECL);
        descriptor.writeXML(writer, 0);
        writer.flush();
        writer.close();
    }

    private void loadWorkflow(HTTPWorkflowConfig c) throws FactoryException {
        /*
        try
        {
          c.descriptor = WorkflowLoader.load(c.url);
        }
        catch (Exception e)
        {
          throw new FactoryException("Error in workflow descriptor: " + c.url, e);
        }
        */
    }

    //~ Inner Classes //////////////////////////////////////////////////////////

    static class HTTPWorkflowConfig {
        String docId;
        String name;
        String service_addr;
        WorkflowDescriptor descriptor;

        //long lastModified;
        public HTTPWorkflowConfig(String service_addr, String name, String docId) {
            this.service_addr = service_addr;
            this.name = name;
            this.docId = docId;
        }
    }
}


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<meta http-equiv="content-type" content="text/html;charset=UTF-8" />

<title>  Introduction to WAI ARIA – available in Spanish and French - The Web Standards Project</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="description" content="The Web Standards Project is a grassroots coalition fighting for standards which ensure simple, affordable access to web technologies for all." />
<meta name="MSSmartTagsPreventParsing" content="true" />

<link rel="stylesheet" type="text/css" media="screen, projection" href="/wp/wp-content/themes/web-standards-project/styles.css" />
<link rel="stylesheet" type="text/css" media="print" href="/wp/wp-content/themes/web-standards-project/print.css" />
<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="/feed/index.html" />
<link rel="alternate" type="text/xml" title="RSS .92" href="/feed/rss/index.html" />
<link rel="alternate" type="application/atom+xml" title="Atom 1.0" href="/feed/atom/index.html" />
<link rel="pingback" href="/wp/xmlrpc.php" />
<link rel="Shortcut Icon" type="image/ico" href="/files/theme/wasp.ico" />
<link rel="home" title="Web Standards Project Home" href="/index.html" />
	<link rel='archives' title='March 2013' href='/2013/03/index.html' />
	<link rel='archives' title='February 2012' href='/2012/02/index.html' />
	<link rel='archives' title='December 2011' href='/2011/12/index.html' />
	<link rel='archives' title='November 2011' href='/2011/11/index.html' />
	<link rel='archives' title='March 2011' href='/2011/03/index.html' />
	<link rel='archives' title='February 2011' href='/2011/02/index.html' />
	<link rel='archives' title='January 2011' href='/2011/01/index.html' />
	<link rel='archives' title='August 2010' href='/2010/08/index.html' />
	<link rel='archives' title='June 2010' href='/2010/06/index.html' />
	<link rel='archives' title='March 2010' href='/2010/03/index.html' />
	<link rel='archives' title='February 2010' href='/2010/02/index.html' />
	<link rel='archives' title='January 2010' href='/2010/01/index.html' />
	<link rel='archives' title='November 2009' href='/2009/11/index.html' />
	<link rel='archives' title='June 2009' href='/2009/06/index.html' />
	<link rel='archives' title='May 2009' href='/2009/05/index.html' />
	<link rel='archives' title='April 2009' href='/2009/04/index.html' />
	<link rel='archives' title='March 2009' href='/2009/03/index.html' />
	<link rel='archives' title='February 2009' href='/2009/02/index.html' />
	<link rel='archives' title='January 2009' href='/2009/01/index.html' />
	<link rel='archives' title='December 2008' href='../../index.html' />
	<link rel='archives' title='November 2008' href='../../../11/index.html' />
	<link rel='archives' title='October 2008' href='../../../10/index.html' />
	<link rel='archives' title='September 2008' href='../../../09/index.html' />
	<link rel='archives' title='August 2008' href='../../../08/index.html' />
	<link rel='archives' title='July 2008' href='../../../07/index.html' />
	<link rel='archives' title='June 2008' href='../../../06/index.html' />
	<link rel='archives' title='May 2008' href='../../../05/index.html' />
	<link rel='archives' title='April 2008' href='../../../04/index.html' />
	<link rel='archives' title='March 2008' href='../../../03/index.html' />
	<link rel='archives' title='February 2008' href='../../../02/index.html' />
	<link rel='archives' title='January 2008' href='../../../01/index.html' />
	<link rel='archives' title='December 2007' href='/2007/12/index.html' />
	<link rel='archives' title='November 2007' href='/2007/11/index.html' />
	<link rel='archives' title='October 2007' href='/2007/10/index.html' />
	<link rel='archives' title='September 2007' href='/2007/09/index.html' />
	<link rel='archives' title='August 2007' href='/2007/08/index.html' />
	<link rel='archives' title='June 2007' href='/2007/06/index.html' />
	<link rel='archives' title='May 2007' href='/2007/05/index.html' />
	<link rel='archives' title='April 2007' href='/2007/04/index.html' />
	<link rel='archives' title='March 2007' href='/2007/03/index.html' />
	<link rel='archives' title='February 2007' href='/2007/02/index.html' />
	<link rel='archives' title='January 2007' href='/2007/01/index.html' />
	<link rel='archives' title='December 2006' href='/2006/12/index.html' />
	<link rel='archives' title='November 2006' href='/2006/11/index.html' />
	<link rel='archives' title='October 2006' href='/2006/10/index.html' />
	<link rel='archives' title='September 2006' href='/2006/09/index.html' />
	<link rel='archives' title='August 2006' href='/2006/08/index.html' />
	<link rel='archives' title='July 2006' href='/2006/07/index.html' />
	<link rel='archives' title='June 2006' href='/2006/06/index.html' />
	<link rel='archives' title='May 2006' href='/2006/05/index.html' />
	<link rel='archives' title='April 2006' href='/2006/04/index.html' />
	<link rel='archives' title='March 2006' href='/2006/03/index.html' />
	<link rel='archives' title='February 2006' href='/2006/02/index.html' />
	<link rel='archives' title='January 2006' href='/2006/01/index.html' />
	<link rel='archives' title='December 2005' href='/2005/12/index.html' />
	<link rel='archives' title='November 2005' href='/2005/11/index.html' />
	<link rel='archives' title='October 2005' href='/2005/10/index.html' />
	<link rel='archives' title='September 2005' href='/2005/09/index.html' />
	<link rel='archives' title='August 2005' href='/2005/08/index.html' />
	<link rel='archives' title='July 2005' href='/2005/07/index.html' />
	<link rel='archives' title='June 2005' href='/2005/06/index.html' />
	<link rel='archives' title='May 2005' href='/2005/05/index.html' />
	<link rel='archives' title='April 2005' href='/2005/04/index.html' />
	<link rel='archives' title='March 2005' href='/2005/03/index.html' />
	<link rel='archives' title='February 2005' href='/2005/02/index.html' />
	<link rel='archives' title='January 2005' href='/2005/01/index.html' />
	<link rel='archives' title='December 2004' href='/2004/12/index.html' />
	<link rel='archives' title='November 2004' href='/2004/11/index.html' />
	<link rel='archives' title='October 2004' href='/2004/10/index.html' />
	<link rel='archives' title='September 2004' href='/2004/09/index.html' />
	<link rel='archives' title='August 2004' href='/2004/08/index.html' />
	<link rel='archives' title='July 2004' href='/2004/07/index.html' />
	<link rel='archives' title='June 2004' href='/2004/06/index.html' />
	<link rel='archives' title='May 2004' href='/2004/05/index.html' />
	<link rel='archives' title='April 2004' href='/2004/04/index.html' />
	<link rel='archives' title='March 2004' href='/2004/03/index.html' />
	<link rel='archives' title='February 2004' href='/2004/02/index.html' />
	<link rel='archives' title='January 2004' href='/2004/01/index.html' />
	<link rel='archives' title='December 2003' href='/2003/12/index.html' />
	<link rel='archives' title='November 2003' href='/2003/11/index.html' />
	<link rel='archives' title='October 2003' href='/2003/10/index.html' />
	<link rel='archives' title='September 2003' href='/2003/09/index.html' />
	<link rel='archives' title='August 2003' href='/2003/08/index.html' />
	<link rel='archives' title='July 2003' href='/2003/07/index.html' />
	<link rel='archives' title='June 2003' href='/2003/06/index.html' />
	<link rel='archives' title='May 2003' href='/2003/05/index.html' />
	<link rel='archives' title='April 2003' href='/2003/04/index.html' />
	<link rel='archives' title='March 2003' href='/2003/03/index.html' />
	<link rel='archives' title='February 2003' href='/2003/02/index.html' />
	<link rel='archives' title='January 2003' href='/2003/01/index.html' />
	<link rel='archives' title='December 2002' href='/2002/12/index.html' />
	<link rel='archives' title='November 2002' href='/2002/11/index.html' />
	<link rel='archives' title='October 2002' href='/2002/10/index.html' />
	<link rel='archives' title='September 2002' href='/2002/09/index.html' />
	<link rel='archives' title='August 2002' href='/2002/08/index.html' />
	<link rel='archives' title='July 2002' href='/2002/07/index.html' />
	<link rel='archives' title='June 2002' href='/2002/06/index.html' />
	<link rel='archives' title='April 2002' href='/2002/04/index.html' />
	<link rel='archives' title='March 2002' href='/2002/03/index.html' />
	<link rel='archives' title='December 2001' href='/2001/12/index.html' />
	<link rel='archives' title='September 2001' href='/2001/09/index.html' />
	<link rel='archives' title='November 2000' href='/2000/11/index.html' />
	<link rel='archives' title='July 2000' href='/2000/07/index.html' />
	<link rel='archives' title='April 2000' href='/2000/04/index.html' />
	<link rel='archives' title='March 1999' href='/1999/03/index.html' />
	<link rel='archives' title='October 1998' href='/1998/10/index.html' />
	<link rel='archives' title='August 1998' href='/1998/08/index.html' />
<link rel="alternate" type="application/rss+xml" title="The Web Standards Project » Introduction to WAI ARIA – available in Spanish and French Comments Feed" href="feed/index.html" />
<link rel="EditURI" type="application/rsd+xml" title="RSD" href="/wp/xmlrpc0db0.php?rsd" />
<link rel="wlwmanifest" type="application/wlwmanifest+xml" href="/wp/wp-includes/wlwmanifest.xml" />
<link rel='prev' title='“Just ask: Integrating accessibility throughout design” available in English, Japanese and Spanish' href='../../08/just-ask-integrating-accessibility-throughout-design-available-in-english-japanese-and-spanish/index.html' />
<link rel='next' title='WCAG 2.0 is a W3C Recommendation' href='../../11/wcag-20-is-a-w3c-rec/index.html' />
<meta name="generator" content="WordPress 3.3.1" />
<link rel='canonical' href='index.html' />
<link rel='shortlink' href='../../../../indexc474.html?p=1306' />

Working together for standards  The Web Standards Project

		Skip to content

				<form id="fm-search" method="get" action="http://www.webstandards.org/index.php">
			<fieldset>
				<legend>Search</legend>
				Search WaSP
				<input id="s" name="s" class="search" value="" />
				<input type="submit" class="submit" name="submit" value="Go!" />
			</fieldset>
		</form>

Home

About

Learn

Action

Buzz

Press

Introduction to WAI ARIA – available in Spanish and French

By Henny Swan | December 10th, 2008 | Filed in Accessibility, Español, Français

								Skip to comment form

Accessibility genius Gez Lemon recently published An Introduction to WAI ARIA on Dev.Opera. Designed to work together with HTML 5 the Accessible Rich Internet Application Suite, published by the Web Accessibility Initiative, aims to make Ajax accessible to disabled people using screen-readers and is key to safeguarding accessibility in today’s increasingly dynamic web.

The article is now available in both Spanish and French.

An Introduction to WAI ARIA, original article in English

Introducción a WAI-ARIA, Spanish version translated by David Martin

Introduction à WAI ARIA, French version translate by Pierre Bertet

Interested in translating it? Then contact Gez, he’d be happy to hear from you.

Your Replies

#1 On December 10th, 2008 8:26 pm nortypig » Blog Archive » Introduction to WAI-ARIA replied:

[...] Swan on the Web Standards Project reports that Introduction to WAI-ARIA is now available in Spanish and [...]

#2 On December 15th, 2008 9:07 pm Introducción a WAI-ARIA « edusanver - Blog de Desarrollo Web replied:

[...] Via: http://www.webstandards.org/2008/12/10/ introduction-to-wai-aria-available-in-spanish-and-french/ [...]

#3 On January 8th, 2009 3:53 am Gamefox replied:

It would be nice if it is available in german…

Or is there still a german translation anywhere?

#4 On January 12th, 2009 3:10 pm WaSP Member Henny Swan replied:

Hello Gamefox, to my knowledge there’s no German translation. It tends to be volunteers who donate their time to translate articles like this. That’s not to say there isn’t one out there and I’ll post about it if one pops up.

			Return to top

Post a Reply

Comments are closed.

Back to Top

All of the entries posted in WaSP Buzz express the opinions of their individual authors. They do not necessarily reflect the plans or positions of the Web Standards Project as a group.

This site is valid XHTML 1.0 Strict, CSS | Get Buzz via RSS or Atom | Colophon | Legal


text:
using System.Collections.Generic;
using System.IO;
using System.Text;
using System.Diagnostics.Contracts;
using System;

// Disable the "this variable is not used" warning as every field would imply it.
#pragma warning disable 0414
// Disable the "this variable is never assigned to".
#pragma warning disable 0067
// Disable the "this event is never assigned to".
#pragma warning disable 0649
// Disable the "this variable is never used".
#pragma warning disable 0169
// Disable the "new keyword not required" warning.
#pragma warning disable 0109
// Disable the "extern without DllImport" warning.
#pragma warning disable 0626
// Disable the "could hide other member" warning, can happen on certain properties.
#pragma warning disable 0108

namespace System.Windows.Controls
{
  sealed public partial class RowDefinitionCollection : IList<RowDefinition>, ICollection<RowDefinition>, IEnumerable<RowDefinition>, System.Collections.IList, System.Collections.ICollection, System.Collections.IEnumerable
  {
    #region Methods and constructors
    public void Add(RowDefinition value)
    {
    }

    public void Clear()
    {
    }

    public bool Contains(RowDefinition value)
    {
      return default(bool);
    }

    public void CopyTo(RowDefinition[] array, int index)
    {
    }

    public int IndexOf(RowDefinition value)
    {
      return default(int);
    }

    public void Insert(int index, RowDefinition value)
    {
    }

    public bool Remove(RowDefinition value)
    {
      return default(bool);
    }

    public void RemoveAt(int index)
    {
    }

    public void RemoveRange(int index, int count)
    {
    }

    internal RowDefinitionCollection()
    {
    }

    IEnumerator<RowDefinition> System.Collections.Generic.IEnumerable<System.Windows.Controls.RowDefinition>.GetEnumerator()
    {
      return default(IEnumerator<RowDefinition>);
    }

    void System.Collections.ICollection.CopyTo(Array array, int index)
    {
    }

    System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
    {
      return default(System.Collections.IEnumerator);
    }

    int System.Collections.IList.Add(Object value)
    {
      return default(int);
    }

    bool System.Collections.IList.Contains(Object value)
    {
      return default(bool);
    }

    int System.Collections.IList.IndexOf(Object value)
    {
      return default(int);
    }

    void System.Collections.IList.Insert(int index, Object value)
    {
    }

    void System.Collections.IList.Remove(Object value)
    {
    }
    #endregion

    #region Properties and indexers
    public int Count
    {
      get
      {
        return default(int);
      }
    }

    public bool IsReadOnly
    {
      get
      {
        return default(bool);
      }
    }

    public bool IsSynchronized
    {
      get
      {
        return default(bool);
      }
    }

    public RowDefinition this [int index]
    {
      get
      {
        return default(RowDefinition);
      }
      set
      {
      }
    }

    public Object SyncRoot
    {
      get
      {
        return default(Object);
      }
    }

    bool System.Collections.IList.IsFixedSize
    {
      get
      {
        return default(bool);
      }
    }

    Object System.Collections.IList.this [int index]
    {
      get
      {
        return default(Object);
      }
      set
      {
      }
    }
    #endregion
  }
}


text:
<?php
    $title = 'Legs vs. Wheels';
    $date = '11-02-2009';
    content_article_setup($title, $date, $page);
?>

It seems to me that most of the robots with a lot of media presence have legs (and are usually humanoid)
    whereas the ones that are actually starting
    to come into use have wheels. In Japan, pet-like robots with four legs as well as
    2-legged robots resembling human beings are already being marketed. On the other hand, currently the most visible practical robot is no
    doubt the Roomba, which runs on wheels, and the automotive industry is beginning to introduce robotic
    technologies, too. I'm not sure where we're at with regard to military robots, but I think some are on wheels
    and others have wings for airborne movement.

I think practical ("servant"?) robots will be wheeled for some time to come because this technology
    is superior to legs for movement in controlled, mainly flat environments. Legs start to come in handy
    when you have to deal with unpredictable terrain, where you (or a robot) might need to climb a tree, stairs,
    a rock face or to jump across or over obstacles.

A robot's practical need for legs will thus depend on its ability to evaluate a variety of
    physical environments and to translate this evaluation into the appropriate movements. So, without the intelligence
    level of vertebrates, legs are really useless. So, it's still unclear to me at what point legged robots will
    actually start to become common in practical contexts. Since my college days, people have been actively working on
    AI, but it's unclear to me how far we have come toward being able to create a robot with a mind as sophisticated
    as that of a dog.

When we do reach that point, however, I wonder whether robots will more likely have 4 legs or 2. In the animal world,
    4 legs have proven themselves to allow greater speed (cheetahs vs. even the fastest 2-legged aninals: ostriches)
    and greater mobility (squirrels, monkeys). Birds of course have wings, and that may actually be a component
    of intelligent, all-purpose robots, but one does get into engineering issues having to do with weight. For a robot
    capable of highly skilled movements on land (such as those that monkeys can perform), I'm not seeing the real need to deal with the
    engineering problems necessary to add the capacity for flight.

For humans, walking was evolutionarily adaptive because it freed up our hands to carry things and make tools, thus creating
    a biological environment in which differentiated human language also became advantageous. Basically, we received generous
    biological compensation for our inability to swing from tree to tree like monkeys or run with the speed and agility of more distant
    relatives such as leopards or wolves.

I see no reason, however, why robots should need to sacrifice the advantages of 4-legged travel: The evolution of their
    linguistic intelligence is going to have nothing to do with their ability to make tools but will depend entirely on our
    ability to provide them with such intelligence. And many of the uses of human hands (carrying offspring, food, tools) are
    unnecessary or can be achieved by other, more efficient means in a robot.

Exceptions would be robots designed for tasks that don't require high ground-speeds or the ability to climb but that
    rely more heavily on using hands and arms. The first one that comes to mind for me would be a cooking robot. For such a robot,
    two legs would be desirable, but perhaps a configuration of hands and arms completely divorced from biological necessity--such
    as multiple hands and arms of different types for different tasks.

For now, in any case, I think most of the robots we see used for practical purposes (as opposed to toys) will be wheeled.
    We'll have to wait for AI to get a bit further along before robots with legs can become useful in practice. But when we do reach
    that point, I expect that the engineering of legs and arms will tend to make such robots differ significantly from expectations
    that currently derive from our experiences with human beings and other animals.


text:
ImageClassifierKNN::ImageClassifierKNN(Ptr<BowVocabulary> bowVocabulary, string classifierFilename) : ImageClassifier(bowVocabulary, classifierFilename, new KNearest(), "KNearest") {}
ImageClassifierKNN::~ImageClassifierKNN() {}

bool ImageClassifierKNN::train(const Mat& trainingSamples32f, const Mat& trainingLabels32s) {
	return ((Ptr<KNearest>)_classifier)->train(trainingSamples32f, trainingLabels32s);
}

float ImageClassifierKNN::predict(const Mat& imageBoWDescriptors) {
	return ((Ptr<KNearest>)_classifier)->find_nearest(imageBoWDescriptors, KNN_CLASSIFIER_K);
}
// >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>  </ImageClassifierSVM>  <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<


text:
namespace System.Xml.Xsl.XsltOld
{
    using System;
    using System.Diagnostics;
    using System.Xml;

    internal class OutKeywords
    {
#if DEBUG
        private readonly XmlNameTable _NameTable;
#endif
        internal OutKeywords(XmlNameTable nameTable)
        {
            Debug.Assert(nameTable != null);
#if DEBUG
            _NameTable = nameTable;
#endif

            _AtomEmpty = nameTable.Add(string.Empty);
            _AtomLang = nameTable.Add("lang");
            _AtomSpace = nameTable.Add("space");
            _AtomXmlns = nameTable.Add("xmlns");
            _AtomXml = nameTable.Add("xml");
            _AtomXmlNamespace = nameTable.Add(XmlReservedNs.NsXml);
            _AtomXmlnsNamespace = nameTable.Add(XmlReservedNs.NsXmlNs);

            CheckKeyword(_AtomEmpty);
            CheckKeyword(_AtomLang);
            CheckKeyword(_AtomSpace);
            CheckKeyword(_AtomXmlns);
            CheckKeyword(_AtomXml);
            CheckKeyword(_AtomXmlNamespace);
            CheckKeyword(_AtomXmlnsNamespace);
        }

        private readonly string _AtomEmpty;
        private readonly string _AtomLang;
        private readonly string _AtomSpace;
        private readonly string _AtomXmlns;
        private readonly string _AtomXml;
        private readonly string _AtomXmlNamespace;
        private readonly string _AtomXmlnsNamespace;

        internal string Empty
        {
            get
            {
                CheckKeyword(_AtomEmpty);
                return _AtomEmpty;
            }
        }

        internal string Lang
        {
            get
            {
                CheckKeyword(_AtomLang);
                return _AtomLang;
            }
        }

        internal string Space
        {
            get
            {
                CheckKeyword(_AtomSpace);
                return _AtomSpace;
            }
        }

        internal string Xmlns
        {
            get
            {
                CheckKeyword(_AtomXmlns);
                return _AtomXmlns;
            }
        }

        internal string Xml
        {
            get
            {
                CheckKeyword(_AtomXml);
                return _AtomXml;
            }
        }

        internal string XmlNamespace
        {
            get
            {
                CheckKeyword(_AtomXmlNamespace);
                return _AtomXmlNamespace;       // http://www.w3.org/XML/1998/namespace
            }
        }

        internal string XmlnsNamespace
        {
            get
            {
                CheckKeyword(_AtomXmlnsNamespace);
                return _AtomXmlnsNamespace;               // http://www.w3.org/XML/2000/xmlns
            }
        }

        [System.Diagnostics.Conditional("DEBUG")]
        private void CheckKeyword(string keyword)
        {
#if DEBUG
            Debug.Assert(keyword != null);
            Debug.Assert((object)keyword == (object)_NameTable.Get(keyword));
#endif
        }
    }
}


text:
<!DOCTYPE html>

        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <title>Andrew Ramos</title>
        <meta name="description" content="">
        <meta name="viewport" content="width=device-width">

        <link rel="stylesheet" href="css/normalize.css" type="type/css" media="screen">
        <link rel="stylesheet" href="css/main.css" type="type/css" media="screen">
        <link rel="stylesheet" href="css/custom.css" type="type/css" media="screen">
        <link rel="stylesheet" href="css/grid.css" type="type/css" media="screen">
        <link href='http://fonts.googleapis.com/css?family=Droid+Serif:400,400italic' rel='stylesheet' type='text/css'>

Work

About

Andrew Ramos

Beautiful brands, websites and mobile apps

Somewhat organic

---

Branding & Packaging

Somewhat organic

---

Branding & Packaging

Somewhat organic

---

Branding & Packaging

Somewhat organic

---

Branding & Packaging

Somewhat organic

---

Branding & Packaging

Somewhat organic

---

Branding & Packaging

Somewhat organic

---

Branding & Packaging

Somewhat organic

---

Branding & Packaging

                    I could not have been more pleased with the branding for The Trappe Door. I had been planning this restaurant concept for 10 years, and he 100% nailed the design.

JOSH BEEBY Owner, The Trappe Door

                    Andrew Ramos helps people get their ideas off
                    the ground, from concept to finished product.

                Let's Talk

All content © 2013 Andrew Ramos, obviously. Stay curious, my friend.

Follow @andrewramos


text:
// Copyright 2015-2016 Espressif Systems (Shanghai) PTE LTD
//
// 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.

#ifndef ESP_PING_H_
#define ESP_PING_H_

#include "esp_err.h"

#ifdef __cplusplus
extern "C" {
#endif

#define ESP_ERR_PING_BASE               0x6000

#define ESP_ERR_PING_INVALID_PARAMS     ESP_ERR_PING_BASE + 0x00
#define ESP_ERR_PING_NO_MEM             ESP_ERR_PING_BASE + 0x01

#define ESP_PING_CHECK_OPTLEN(optlen, opttype) do { if ((optlen) < sizeof(opttype)) { return ESP_ERR_PING_INVALID_PARAMS; }}while(0)

typedef struct _ping_found {
    uint32_t resp_time;
    uint32_t timeout_count;
    uint32_t send_count;
    uint32_t recv_count;
    uint32_t err_count;
    uint32_t bytes;
    uint32_t total_bytes;
    uint32_t total_time;
    uint32_t min_time;
    uint32_t max_time;
    int8_t  ping_err;
} esp_ping_found;

typedef enum {
    PING_TARGET_IP_ADDRESS          = 50,   /**< target IP address */
    PING_TARGET_IP_ADDRESS_COUNT    = 51,   /**< target IP address total counter */
    PING_TARGET_RCV_TIMEO           = 52,   /**< receive timeout in milliseconds */
    PING_TARGET_DELAY_TIME          = 53,   /**< delay time in milliseconds */
    PING_TARGET_ID                  = 54,   /**< identifier */
    PING_TARGET_RES_FN              = 55,   /**< ping result callback function */
    PING_TARGET_RES_RESET           = 56    /**< ping result statistic reset */
} ping_target_id_t;

typedef enum {
    PING_RES_TIMEOUT = 0,
    PING_RES_OK      = 1,
    PING_RES_FINISH  = 2,
} ping_res_t;

typedef void (* esp_ping_found_fn)(ping_target_id_t found_id, esp_ping_found *found_val);

/**
 * @brief  Set PING function option
 *
 * @param[in]  opt_id: option index, 50 for IP, 51 for COUNT, 52 for RCV TIMEOUT, 53 for DELAY TIME, 54 for ID
 * @param[in]  opt_val: option parameter
 * @param[in]  opt_len: option length
 *
 * @return
 *      - ESP_OK
 *      - ESP_ERR_PING_INVALID_PARAMS
 */
esp_err_t esp_ping_set_target(ping_target_id_t opt_id, void *opt_val, uint32_t opt_len);

/**
 * @brief  Get PING function option
 *
 * @param[in]  opt_id: option index, 50 for IP, 51 for COUNT, 52 for RCV TIMEOUT, 53 for DELAY TIME, 54 for ID
 * @param[in]  opt_val: option parameter
 * @param[in]  opt_len: option length
 *
 * @return
 *      - ESP_OK
 *      - ESP_ERR_PING_INVALID_PARAMS
 */
esp_err_t esp_ping_get_target(ping_target_id_t opt_id, void *opt_val, uint32_t opt_len);

/**
 * @brief  Get PING function result action
 *
 * @param[in]  res_val: ping function action, 1 for successful, 0 for fail.
 *             res_len: response bytes
 *             res_time: response time
 *
 * @return
 *      - ESP_OK
 *      - ESP_ERR_PING_INVALID_PARAMS
 */
esp_err_t esp_ping_result(uint8_t res_val, uint16_t res_len, uint32_t res_time);

#ifdef __cplusplus
}
#endif

#endif /* ESP_PING_H_ */