text:
package org.apache.cassandra.db;

import java.nio.ByteBuffer;

import org.apache.cassandra.dht.IPartitioner;
import org.apache.cassandra.dht.Token;
import org.apache.cassandra.utils.bytecomparable.ByteComparable;

public class BufferDecoratedKey extends DecoratedKey
{
    private final ByteBuffer key;

    public BufferDecoratedKey(Token token, ByteBuffer key)
    {
        super(token);
        assert key != null;
        this.key = key;
    }

    public ByteBuffer getKey()
    {
        return key;
    }

    @Override
    public int getKeyLength()
    {
        return key.remaining();
    }

    /**
     * A factory method that translates the given byte-comparable representation to a {@link BufferDecoratedKey}
     * instance. If the given byte comparable doesn't represent the encoding of a buffer decorated key, anything from a
     * wide variety of throwables may be thrown (e.g. {@link AssertionError}, {@link IndexOutOfBoundsException},
     * {@link IllegalStateException}, etc.).
     *
     * @param byteComparable A byte-comparable representation (presumably of a {@link BufferDecoratedKey} instance).
     * @param version The encoding version used for the given byte comparable.
     * @param partitioner The partitioner of the encoded decorated key. Needed in order to correctly decode the token
     *                    bytes of the key.
     * @return A new {@link BufferDecoratedKey} instance, corresponding to the given byte-comparable representation. If
     * we were to call {@link #asComparableBytes(Version)} on the returned object, we should get a {@link ByteSource}
     * equal to the one of the input byte comparable.
     */
    public static BufferDecoratedKey fromByteComparable(ByteComparable byteComparable,
                                                        Version version,
                                                        IPartitioner partitioner)
    {
        return DecoratedKey.fromByteComparable(byteComparable,
                                               version,
                                               partitioner,
                                               (token, keyBytes) -> new BufferDecoratedKey(token, ByteBuffer.wrap(keyBytes)));
    }
}


text:
package com.kaufland.meetlybackend.domain;

import java.time.Instant;
import java.util.Date;
import java.util.UUID;

public class Proposal {
    private UUID id;
    private Topic topic;
    private TimeFrame timeFrame;
    private MeetingPoint meetingPoint;
    private Email email;

    public UUID getId() {
        return id;
    }

    public Topic getTopic() {
        return topic;
    }

    public TimeFrame getTimeFrame() {
        return timeFrame;
    }

    public MeetingPoint getMeetingPoint() {
        return meetingPoint;
    }

    public Email getEmail() {
        return email;
    }

    public static class ProposalBuilder {
        private Proposal proposal = new Proposal();

        public ProposalBuilder id(UUID id) {
            proposal.id = id;
            return this;
        }

        public ProposalBuilder topic(String topicTitel) {
            proposal.topic = new Topic().setTitle(topicTitel);
            return this;
        }

        public ProposalBuilder meetingPoint(String meetingPoint) {
            proposal.meetingPoint = new MeetingPoint().setName(meetingPoint);
            return this;
        }

        public ProposalBuilder email(String email) {
            proposal.email = new Email().setAddress(email);
            return this;
        }

        public ProposalBuilder timeFrame(Instant fromInstant, Instant toInstant) {
            proposal.timeFrame = new TimeFrame().setFrom(fromInstant).setTo(toInstant);
            return this;
        }

        public ProposalBuilder timeFrame(Date from, Date to) {
            return timeFrame(from.toInstant(), to.toInstant());
        }

        public Proposal build() {
            return  proposal;
        }
    }

}

redpajama_set_name: RedPajamaGithub


text:
"""
This module provides general http handler functions for processing http responses from BCE services.
"""

import http.client
import json
from baidubce.exception import BceClientError
from baidubce.exception import BceServerError
from baidubce import utils

def parse_json(http_response, response):
    """If the body is not empty, convert it to a python object and set as the value of
    response.body. http_response is always closed if no error occurs.

    :param http_response: the http_response object returned by HTTPConnection.getresponse()
    :type http_response: httplib.HTTPResponse

    :param response: general response object which will be returned to the caller
    :type response: baidubce.BceResponse

    :return: always true
    :rtype bool
    """
    body = http_response.read()
    if body:
        response.__dict__.update(json.loads(body, object_hook=dict_to_python_object).__dict__)
    http_response.close()
    return True

def parse_error(http_response, response):
    """If the body is not empty, convert it to a python object and set as the value of
    response.body. http_response is always closed if no error occurs.

    :param http_response: the http_response object returned by HTTPConnection.getresponse()
    :type http_response: httplib.HTTPResponse

    :param response: general response object which will be returned to the caller
    :type response: baidubce.BceResponse

    :return: false if http status code is 2xx, raise an error otherwise
    :rtype bool

    :raise baidubce.exception.BceClientError: if http status code is NOT 2xx
    """
    if http_response.status // 100 == http.client.OK // 100:
        return False
    if http_response.status // 100 == http.client.CONTINUE // 100:
        raise BceClientError(b'Can not handle 1xx http status code')
    bse = None
    body = http_response.read()
    if body:
        d = json.loads(body)
        if 'code' in d:
            bse = BceServerError(d['message'], code=d['code'], request_id=d['requestId'])
        else:
            bse = BceServerError(d['Message'], code=d['Code'], request_id="")

    if bse is None:
        bse = BceServerError(http_response.reason, request_id=response.metadata.bce_request_id)
    bse.status_code = http_response.status
    raise bse

def dict_to_python_object(d):
    """

    :param d:
    :return:
    """
    attr = {}
    for k, v in d.items():
        k = (str(k))
        attr[k] = v
    return utils.Expando(attr)


text:
package org.lwjgl.vulkan;

import javax.annotation.*;

import java.nio.*;

import org.lwjgl.*;
import org.lwjgl.system.*;

import static org.lwjgl.system.MemoryUtil.*;
import static org.lwjgl.system.MemoryStack.*;

/**
 * See {@link VkAttachmentDescriptionStencilLayout}.
 *
 *
Layout

 *
 *

 * struct VkAttachmentDescriptionStencilLayoutKHR {
 *     VkStructureType sType;
 *     void * pNext;
 *     VkImageLayout stencilInitialLayout;
 *     VkImageLayout stencilFinalLayout;
 * }

 */
public class VkAttachmentDescriptionStencilLayoutKHR extends VkAttachmentDescriptionStencilLayout {

    /**
     * Creates a {@code VkAttachmentDescriptionStencilLayoutKHR} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be
     * visible to the struct instance and vice versa.
     *
     *
The created instance holds a strong reference to the container object.

     */
    public VkAttachmentDescriptionStencilLayoutKHR(ByteBuffer container) {
        super(container);
    }

    /** Sets the specified value to the {@code sType} field. */
    @Override
    public VkAttachmentDescriptionStencilLayoutKHR sType(@NativeType("VkStructureType") int value) { nsType(address(), value); return this; }
    /** Sets the {@link VK12#VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_STENCIL_LAYOUT STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_STENCIL_LAYOUT} value to the {@code sType} field. */
    @Override
    public VkAttachmentDescriptionStencilLayoutKHR sType$Default() { return sType(VK12.VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_STENCIL_LAYOUT); }
    /** Sets the specified value to the {@code pNext} field. */
    @Override
    public VkAttachmentDescriptionStencilLayoutKHR pNext(@NativeType("void *") long value) { npNext(address(), value); return this; }
    /** Sets the specified value to the {@code stencilInitialLayout} field. */
    @Override
    public VkAttachmentDescriptionStencilLayoutKHR stencilInitialLayout(@NativeType("VkImageLayout") int value) { nstencilInitialLayout(address(), value); return this; }
    /** Sets the specified value to the {@code stencilFinalLayout} field. */
    @Override
    public VkAttachmentDescriptionStencilLayoutKHR stencilFinalLayout(@NativeType("VkImageLayout") int value) { nstencilFinalLayout(address(), value); return this; }

    /** Initializes this struct with the specified values. */
    @Override
    public VkAttachmentDescriptionStencilLayoutKHR set(
        int sType,
        long pNext,
        int stencilInitialLayout,
        int stencilFinalLayout
    ) {
        sType(sType);
        pNext(pNext);
        stencilInitialLayout(stencilInitialLayout);
        stencilFinalLayout(stencilFinalLayout);

        return this;
    }

    /**
     * Copies the specified struct data to this struct.
     *
     * @param src the source struct
     *
     * @return this struct
     */
    public VkAttachmentDescriptionStencilLayoutKHR set(VkAttachmentDescriptionStencilLayoutKHR src) {
        memCopy(src.address(), address(), SIZEOF);
        return this;
    }

    // -----------------------------------

    /** Returns a new {@code VkAttachmentDescriptionStencilLayoutKHR} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */
    public static VkAttachmentDescriptionStencilLayoutKHR malloc() {
        return wrap(VkAttachmentDescriptionStencilLayoutKHR.class, nmemAllocChecked(SIZEOF));
    }

    /** Returns a new {@code VkAttachmentDescriptionStencilLayoutKHR} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */
    public static VkAttachmentDescriptionStencilLayoutKHR calloc() {
        return wrap(VkAttachmentDescriptionStencilLayoutKHR.class, nmemCallocChecked(1, SIZEOF));
    }

    /** Returns a new {@code VkAttachmentDescriptionStencilLayoutKHR} instance allocated with {@link BufferUtils}. */
    public static VkAttachmentDescriptionStencilLayoutKHR create() {
        ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF);
        return wrap(VkAttachmentDescriptionStencilLayoutKHR.class, memAddress(container), container);
    }

    /** Returns a new {@code VkAttachmentDescriptionStencilLayoutKHR} instance for the specified memory address. */
    public static VkAttachmentDescriptionStencilLayoutKHR create(long address) {
        return wrap(VkAttachmentDescriptionStencilLayoutKHR.class, address);
    }

    /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */
    @Nullable
    public static VkAttachmentDescriptionStencilLayoutKHR createSafe(long address) {
        return address == NULL ? null : wrap(VkAttachmentDescriptionStencilLayoutKHR.class, address);
    }

    /**
     * Returns a new {@link VkAttachmentDescriptionStencilLayoutKHR.Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed.
     *
     * @param capacity the buffer capacity
     */
    public static VkAttachmentDescriptionStencilLayoutKHR.Buffer malloc(int capacity) {
        return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity);
    }

    /**
     * Returns a new {@link VkAttachmentDescriptionStencilLayoutKHR.Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed.
     *
     * @param capacity the buffer capacity
     */
    public static VkAttachmentDescriptionStencilLayoutKHR.Buffer calloc(int capacity) {
        return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity);
    }

    /**
     * Returns a new {@link VkAttachmentDescriptionStencilLayoutKHR.Buffer} instance allocated with {@link BufferUtils}.
     *
     * @param capacity the buffer capacity
     */
    public static VkAttachmentDescriptionStencilLayoutKHR.Buffer create(int capacity) {
        ByteBuffer container = __create(capacity, SIZEOF);
        return wrap(Buffer.class, memAddress(container), capacity, container);
    }

    /**
     * Create a {@link VkAttachmentDescriptionStencilLayoutKHR.Buffer} instance at the specified memory.
     *
     * @param address  the memory address
     * @param capacity the buffer capacity
     */
    public static VkAttachmentDescriptionStencilLayoutKHR.Buffer create(long address, int capacity) {
        return wrap(Buffer.class, address, capacity);
    }

    /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */
    @Nullable
    public static VkAttachmentDescriptionStencilLayoutKHR.Buffer createSafe(long address, int capacity) {
        return address == NULL ? null : wrap(Buffer.class, address, capacity);
    }

    /**
     * Returns a new {@code VkAttachmentDescriptionStencilLayoutKHR} instance allocated on the specified {@link MemoryStack}.
     *
     * @param stack the stack from which to allocate
     */
    public static VkAttachmentDescriptionStencilLayoutKHR malloc(MemoryStack stack) {
        return wrap(VkAttachmentDescriptionStencilLayoutKHR.class, stack.nmalloc(ALIGNOF, SIZEOF));
    }

    /**
     * Returns a new {@code VkAttachmentDescriptionStencilLayoutKHR} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero.
     *
     * @param stack the stack from which to allocate
     */
    public static VkAttachmentDescriptionStencilLayoutKHR calloc(MemoryStack stack) {
        return wrap(VkAttachmentDescriptionStencilLayoutKHR.class, stack.ncalloc(ALIGNOF, 1, SIZEOF));
    }

    /**
     * Returns a new {@link VkAttachmentDescriptionStencilLayoutKHR.Buffer} instance allocated on the specified {@link MemoryStack}.
     *
     * @param stack    the stack from which to allocate
     * @param capacity the buffer capacity
     */
    public static VkAttachmentDescriptionStencilLayoutKHR.Buffer malloc(int capacity, MemoryStack stack) {
        return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity);
    }

    /**
     * Returns a new {@link VkAttachmentDescriptionStencilLayoutKHR.Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero.
     *
     * @param stack    the stack from which to allocate
     * @param capacity the buffer capacity
     */
    public static VkAttachmentDescriptionStencilLayoutKHR.Buffer calloc(int capacity, MemoryStack stack) {
        return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity);
    }

    // -----------------------------------

    /** An array of {@link VkAttachmentDescriptionStencilLayoutKHR} structs. */
    public static class Buffer extends VkAttachmentDescriptionStencilLayout.Buffer {

        private static final VkAttachmentDescriptionStencilLayoutKHR ELEMENT_FACTORY = VkAttachmentDescriptionStencilLayoutKHR.create(-1L);

        /**
         * Creates a new {@code VkAttachmentDescriptionStencilLayoutKHR.Buffer} instance backed by the specified container.
         *
         * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values
         * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided
         * by {@link VkAttachmentDescriptionStencilLayoutKHR#SIZEOF}, and its mark will be undefined.
         *
         *
The created buffer instance holds a strong reference to the container object.

         */
        public Buffer(ByteBuffer container) {
            super(container);
        }

        public Buffer(long address, int cap) {
            super(address, null, -1, 0, cap, cap);
        }

        Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) {
            super(address, container, mark, pos, lim, cap);
        }

        @Override
        protected Buffer self() {
            return this;
        }

        @Override
        protected VkAttachmentDescriptionStencilLayoutKHR getElementFactory() {
            return ELEMENT_FACTORY;
        }

        /** Sets the specified value to the {@code sType} field. */
        @Override
        public VkAttachmentDescriptionStencilLayoutKHR.Buffer sType(@NativeType("VkStructureType") int value) { VkAttachmentDescriptionStencilLayoutKHR.nsType(address(), value); return this; }
        /** Sets the {@link VK12#VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_STENCIL_LAYOUT STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_STENCIL_LAYOUT} value to the {@code sType} field. */
        @Override
        public VkAttachmentDescriptionStencilLayoutKHR.Buffer sType$Default() { return sType(VK12.VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_STENCIL_LAYOUT); }
        /** Sets the specified value to the {@code pNext} field. */
        @Override
        public VkAttachmentDescriptionStencilLayoutKHR.Buffer pNext(@NativeType("void *") long value) { VkAttachmentDescriptionStencilLayoutKHR.npNext(address(), value); return this; }
        /** Sets the specified value to the {@code stencilInitialLayout} field. */
        @Override
        public VkAttachmentDescriptionStencilLayoutKHR.Buffer stencilInitialLayout(@NativeType("VkImageLayout") int value) { VkAttachmentDescriptionStencilLayoutKHR.nstencilInitialLayout(address(), value); return this; }
        /** Sets the specified value to the {@code stencilFinalLayout} field. */
        @Override
        public VkAttachmentDescriptionStencilLayoutKHR.Buffer stencilFinalLayout(@NativeType("VkImageLayout") int value) { VkAttachmentDescriptionStencilLayoutKHR.nstencilFinalLayout(address(), value); return this; }

    }

}


text:
package edu.ntu.netdb.flowclassified;

import net.floodlightcontroller.core.module.IFloodlightService;

public interface IFlowClassifier extends IFloodlightService {
	public FlowClass classifyFlow(Flow flow);

}


text:
YAHOO.util.Event.onDOMReady(init);

function init() {
	var bStart = new YAHOO.widget.Button("StartAConference");
}


text:
namespace openxc {
namespace commands {

bool validatePassthroughRequest(openxc_VehicleMessage* message);

bool handlePassthroughModeCommand(openxc_ControlCommand* command);

} // namespace commands
} // namespace openxc

#endif // __PASSTHROUGH_COMMAND_H__


text:
from django.db import migrations, models

class Migration(migrations.Migration):

    dependencies = [
        ('activities', '0046_auto_20220317_0900'),
    ]

    operations = [
        migrations.AlterField(
            model_name='activity',
            name='team_activity',
            field=models.CharField(blank=True, choices=[('teams', 'Teams'), ('individuals', 'Individuals')], default='individuals', help_text='Is this activity open for individuals or can only teams sign up?', max_length=100, verbose_name='Team activity'),
        ),
    ]


text:
/**
 * ag-grid-community - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components
 * @version v20.0.0
 * @link http://www.ag-grid.com/
 * @license MIT
 */
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
Object.defineProperty(exports, "__esModule", { value: true });
var context_1 = require("../context/context");
var eventService_1 = require("../eventService");
var events_1 = require("../events");
var columnController_1 = require("../columnController/columnController");
var columnApi_1 = require("../columnController/columnApi");
var gridApi_1 = require("../gridApi");
var gridOptionsWrapper_1 = require("../gridOptionsWrapper");
var ScrollVisibleService = /** @class */ (function () {
    function ScrollVisibleService() {
    }
    ScrollVisibleService.prototype.setScrollsVisible = function (params) {
        var atLeastOneDifferent = this.horizontalScrollShowing !== params.horizontalScrollShowing ||
            this.verticalScrollShowing !== params.verticalScrollShowing;
        if (atLeastOneDifferent) {
            this.horizontalScrollShowing = params.horizontalScrollShowing;
            this.verticalScrollShowing = params.verticalScrollShowing;
            var event_1 = {
                type: events_1.Events.EVENT_SCROLL_VISIBILITY_CHANGED,
                api: this.gridApi,
                columnApi: this.columnApi
            };
            this.eventService.dispatchEvent(event_1);
        }
    };
    // used by pagination service - to know page height
    ScrollVisibleService.prototype.isHorizontalScrollShowing = function () {
        return this.horizontalScrollShowing;
    };
    // used by header container
    ScrollVisibleService.prototype.isVerticalScrollShowing = function () {
        return this.verticalScrollShowing;
    };
    __decorate([
        context_1.Autowired('eventService'),
        __metadata("design:type", eventService_1.EventService)
    ], ScrollVisibleService.prototype, "eventService", void 0);
    __decorate([
        context_1.Autowired('columnController'),
        __metadata("design:type", columnController_1.ColumnController)
    ], ScrollVisibleService.prototype, "columnController", void 0);
    __decorate([
        context_1.Autowired('columnApi'),
        __metadata("design:type", columnApi_1.ColumnApi)
    ], ScrollVisibleService.prototype, "columnApi", void 0);
    __decorate([
        context_1.Autowired('gridApi'),
        __metadata("design:type", gridApi_1.GridApi)
    ], ScrollVisibleService.prototype, "gridApi", void 0);
    __decorate([
        context_1.Autowired('gridOptionsWrapper'),
        __metadata("design:type", gridOptionsWrapper_1.GridOptionsWrapper)
    ], ScrollVisibleService.prototype, "gridOptionsWrapper", void 0);
    ScrollVisibleService = __decorate([
        context_1.Bean('scrollVisibleService')
    ], ScrollVisibleService);
    return ScrollVisibleService;
}());
exports.ScrollVisibleService = ScrollVisibleService;


text:
"""Entry filters."""
from __future__ import annotations

import re
from datetime import date
from typing import Any
from typing import Callable
from typing import Generator

import ply.yacc  # type: ignore
from beancount.core import account
from beancount.core.data import Directive
from beancount.core.data import Entries
from beancount.ops.summarize import clamp_opt  # type: ignore

from fava.core.accounts import get_entry_accounts
from fava.core.fava_options import FavaOptions
from fava.helpers import FavaAPIException
from fava.util.date import parse_date
from fava.util.typing import BeancountOptions

class FilterException(FavaAPIException):
    """Filter exception."""

    def __init__(self, filter_type: str, message: str) -> None:
        super().__init__(message)
        self.filter_type = filter_type

    def __str__(self) -> str:
        return self.message

class Token:
    """A token having a certain type and value.

    The lexer attribute only exists since PLY writes to it in case of a parser
    error.
    """

    __slots__ = ["type", "value", "lexer"]

    def __init__(self, type_: str, value: str) -> None:
        self.type = type_
        self.value = value

    def __repr__(self) -> str:
        return f"Token({self.type}, {self.value})"

class FilterSyntaxLexer:
    """Lexer for Fava's filter syntax."""

    # pylint: disable=missing-docstring,invalid-name

    tokens = ("ANY", "ALL", "KEY", "LINK", "STRING", "TAG")

    RULES = (
        ("LINK", r"\^[A-Za-z0-9\-_/.]+"),
        ("TAG", r"\#[A-Za-z0-9\-_/.]+"),
        ("KEY", r"[a-z][a-zA-Z0-9\-_]+:"),
        ("ALL", r"all\("),
        ("ANY", r"any\("),
        ("STRING", r'\w[-\w]*|"[^"]*"|\'[^\']*\''),
    )

    regex = re.compile(
        "|".join((f"(?P<{name}>{rule})" for name, rule in RULES))
    )

    def LINK(self, token: str, value: str) -> tuple[str, str]:
        return token, value[1:]

    def TAG(self, token: str, value: str) -> tuple[str, str]:
        return token, value[1:]

    def KEY(self, token: str, value: str) -> tuple[str, str]:
        return token, value[:-1]

    def ALL(self, token: str, _: str) -> tuple[str, str]:
        return token, token

    def ANY(self, token: str, _: str) -> tuple[str, str]:
        return token, token

    def STRING(self, token: str, value: str) -> tuple[str, str]:
        if value[0] in ['"', "'"]:
            return token, value[1:-1]
        return token, value

    def lex(self, data: str) -> Generator[Token, None, None]:
        """A generator yielding all tokens in a given line.

        Arguments:
            data: A string, the line to lex.

        Yields:
            All Tokens in the line.
        """
        ignore = " \t"
        literals = "-,()"
        regex = self.regex.match

        pos = 0
        length = len(data)
        while pos < length:
            char = data[pos]
            if char in ignore:
                pos += 1
                continue
            match = regex(data, pos)
            if match:
                value = match.group()
                pos += len(value)
                token = match.lastgroup
                assert token is not None, "Internal Error"
                func: Callable[[str, str], tuple[str, str]] = getattr(
                    self, token
                )
                ret = func(token, value)
                yield Token(*ret)
            elif char in literals:
                yield Token(char, char)
                pos += 1
            else:
                raise FilterException(
                    "filter", f'Illegal character "{char}" in filter.'
                )

class Match:
    """Match a string."""

    __slots__ = ["match"]

    def __init__(self, search: str) -> None:
        try:
            match = re.compile(search, re.IGNORECASE).search
            self.match: Callable[[str], bool] = lambda s: bool(match(s))
        except re.error:
            self.match = lambda s: s == search

    def __call__(self, string: str) -> bool:
        return self.match(string)

class FilterSyntaxParser:
    # pylint: disable=missing-docstring,invalid-name

    precedence = (("left", "AND"), ("right", "UMINUS"))
    tokens = FilterSyntaxLexer.tokens

    def p_error(self, _: Any) -> None:
        raise FilterException("filter", "Failed to parse filter: ")

    def p_filter(self, p: list[Any]) -> None:
        """
        filter : expr
        """
        p[0] = p[1]

    def p_expr(self, p: list[Any]) -> None:
        """
        expr : simple_expr
        """
        p[0] = p[1]

    def p_expr_all(self, p: list[Any]) -> None:
        """
        expr : ALL expr ')'
        """
        expr = p[2]

        def _match_postings(entry: Directive) -> bool:
            return all(
                expr(posting) for posting in getattr(entry, "postings", [])
            )

        p[0] = _match_postings

    def p_expr_any(self, p: list[Any]) -> None:
        """
        expr : ANY expr ')'
        """
        expr = p[2]

        def _match_postings(entry: Directive) -> bool:
            return any(
                expr(posting) for posting in getattr(entry, "postings", [])
            )

        p[0] = _match_postings

    def p_expr_parentheses(self, p: list[Any]) -> None:
        """
        expr : '(' expr ')'
        """
        p[0] = p[2]

    def p_expr_and(self, p: list[Any]) -> None:
        """
        expr : expr expr %prec AND
        """
        left, right = p[1], p[2]

        def _and(entry: Directive) -> bool:
            return left(entry) and right(entry)  # type: ignore

        p[0] = _and

    def p_expr_or(self, p: list[Any]) -> None:
        """
        expr : expr ',' expr
        """
        left, right = p[1], p[3]

        def _or(entry: Directive) -> bool:
            return left(entry) or right(entry)  # type: ignore

        p[0] = _or

    def p_expr_negated(self, p: list[Any]) -> None:
        """
        expr : '-' expr %prec UMINUS
        """
        func = p[2]

        def _neg(entry: Directive) -> bool:
            return not func(entry)

        p[0] = _neg

    def p_simple_expr_TAG(self, p: list[Any]) -> None:
        """
        simple_expr : TAG
        """
        tag = p[1]

        def _tag(entry: Directive) -> bool:
            tags = getattr(entry, "tags", None)
            return (tag in tags) if tags is not None else False

        p[0] = _tag

    def p_simple_expr_LINK(self, p: list[Any]) -> None:
        """
        simple_expr : LINK
        """
        link = p[1]

        def _link(entry: Directive) -> bool:
            links = getattr(entry, "links", None)
            return (link in links) if links is not None else False

        p[0] = _link

    def p_simple_expr_STRING(self, p: list[Any]) -> None:
        """
        simple_expr : STRING
        """
        string = p[1]
        match = Match(string)

        def _string(entry: Directive) -> bool:
            for name in ("narration", "payee", "comment"):
                value = getattr(entry, name, "")
                if value and match(value):
                    return True
            return False

        p[0] = _string

    def p_simple_expr_key(self, p: list[Any]) -> None:
        """
        simple_expr : KEY STRING
        """
        key, value = p[1], p[2]
        match = Match(value)

        def _key(entry: Directive) -> bool:
            if hasattr(entry, key):
                return match(str(getattr(entry, key) or ""))
            if entry.meta is not None and key in entry.meta:
                return match(str(entry.meta.get(key)))
            return False

        p[0] = _key

class EntryFilter:
    """Filters a list of entries."""

    def __init__(
        self, options: BeancountOptions, fava_options: FavaOptions
    ) -> None:
        self.options = options
        self.fava_options = fava_options
        self.value: str | None = None

    def set(self, value: str | None) -> bool:
        """Set the filter.

        Subclasses should check for validity of the value in this method.
        """
        if value == self.value:
            return False
        self.value = value
        return True

    def _include_entry(self, entry: Directive) -> bool:
        raise NotImplementedError

    def _filter(self, entries: Entries) -> Entries:
        return [entry for entry in entries if self._include_entry(entry)]

    def apply(self, entries: Entries) -> Entries:
        """Apply filter.

        Args:
            entries: a list of entries.
            options: an options_map.

        Returns:
            A list of filtered entries.
        """
        if self.value:
            return self._filter(entries)
        return entries

    def __bool__(self) -> bool:
        return bool(self.value)

class TimeFilter(EntryFilter):  # pylint: disable=abstract-method
    """Filter by dates."""

    def __init__(
        self, options: BeancountOptions, fava_options: FavaOptions
    ) -> None:
        super().__init__(options, fava_options)
        self.begin_date: date | None = None
        self.end_date: date | None = None

    def set(self, value: str | None) -> bool:
        if value == self.value:
            return False
        self.value = value
        if not self.value:
            return True

        self.begin_date, self.end_date = parse_date(
            self.value, self.fava_options.fiscal_year_end
        )
        if not self.begin_date:
            self.value = None
            raise FilterException("time", f"Failed to parse date: {value}")
        return True

    def _filter(self, entries: Entries) -> Entries:
        entries, _ = clamp_opt(
            entries, self.begin_date, self.end_date, self.options
        )
        return entries

LEXER = FilterSyntaxLexer()
PARSE = ply.yacc.yacc(
    errorlog=ply.yacc.NullLogger(),
    write_tables=False,
    debug=False,
    module=FilterSyntaxParser(),
).parse

class AdvancedFilter(EntryFilter):
    """Filter by tags and links and keys."""

    def __init__(
        self, options: BeancountOptions, fava_options: FavaOptions
    ) -> None:
        super().__init__(options, fava_options)
        self._include = None

    def set(self, value: str | None) -> bool:
        if value == self.value:
            return False
        self.value = value
        if value and value.strip():
            try:
                tokens = LEXER.lex(value.strip())
                self._include = PARSE(
                    lexer="NONE",
                    tokenfunc=lambda toks=tokens: next(toks, None),
                )
            except FilterException as exception:
                exception.message = exception.message + value
                self.value = None
                raise exception
        else:
            self._include = None
        return True

    def _include_entry(self, entry: Directive) -> bool:
        if self._include:
            return self._include(entry)
        return True

class AccountFilter(EntryFilter):
    """Filter by account.

    The filter string can either a regular expression or a parent account.
    """

    def __init__(
        self, options: BeancountOptions, fava_options: FavaOptions
    ) -> None:
        super().__init__(options, fava_options)
        self.match: Match | None = None

    def set(self, value: str | None) -> bool:
        if value == self.value:
            return False
        self.value = value
        self.match = Match(value or "")
        return True

    def _include_entry(self, entry: Directive) -> bool:
        if self.value is None or self.match is None:
            return False
        return any(
            account.has_component(name, self.value) or self.match(name)
            for name in get_entry_accounts(entry)
        )


text:
/** Compiled by the Randori compiler v0.2.3 on Wed Apr 03 12:33:14 PDT 2013 */

if (typeof com == "undefined")
	var com = {};
if (typeof com.leonardsouza == "undefined")
	com.leonardsouza = {};
if (typeof com.leonardsouza.threejs == "undefined")
	com.leonardsouza.threejs = {};
if (typeof com.leonardsouza.threejs.mediators == "undefined")
	com.leonardsouza.threejs.mediators = {};

com.leonardsouza.threejs.mediators.MainMediator = function() {
	this.stats = null;
	this.targetRotationOnMouseDown = 0;
	this.mouseX = 0;
	this.targetRotation = 0;
	this.renderer = null;
	this.animation = null;
	this.camera = null;
	this.windowHalfX = window.innerWidth / 2;
	this.windowHalfY = window.innerHeight / 2;
	this.plane = null;
	this.container = null;
	this.mouseXOnMouseDown = 0;
	this.scene = null;
	this.cube = null;
	randori.behaviors.AbstractMediator.call(this);

};

com.leonardsouza.threejs.mediators.MainMediator.prototype.onRegister = function() {
	window.console.log("Started");
	this.container = document.createElement('div');
	window.document.body.appendChild(this.container);
	var info = document.createElement('div');
	info.style.position = "absolute;";
	info.style.top = "10px";
	info.style.width = "100%";
	info.style.textAlign = "center";
	info.innerHTML = "Drag to spin the cube";
	this.container.appendChild(info);
	this.camera = new THREE.PerspectiveCamera(70, window.innerWidth / window.innerHeight, 1, 1000);
	this.camera.position.y = 150;
	this.camera.position.z = 500;
	this.scene = new THREE.Scene();
	var geometry = new THREE.CubeGeometry(200, 200, 200);
	for (var i = 0; i < geometry.faces.length; i++) {
		geometry.faces[i].color.setHex(Math.random() * 0xffffff);
	}
	var material = new THREE.MeshBasicMaterial({vertexColors:1});
	this.cube = new THREE.Mesh(geometry, material);
	this.cube.position.y = 150;
	this.scene.add(this.cube);
	var geometry = new THREE.PlaneGeometry(200, 200);
	geometry.applyMatrix(new THREE.Matrix4().makeRotationX(-3.141592653589793 / 2));
	var material = new THREE.MeshBasicMaterial({color:0xe0e0e0});
	this.plane = new THREE.Mesh(geometry, material);
	this.scene.add(this.plane);
	this.renderer = new THREE.CanvasRenderer();
	this.renderer.setSize(window.innerWidth, window.innerHeight);
	this.container.appendChild(this.renderer.domElement);
	this.stats = new Stats();
	this.stats.domElement.style.position = "absolute";
	this.stats.domElement.style.top = "0px";
	this.container.appendChild(this.stats.domElement);
	window.document.addEventListener("mousedown", $createStaticDelegate(this, this.onDocumentMouseDown), false);
	window.document.addEventListener("touchstart", $createStaticDelegate(this, this.onDocumentTouchStart), false);
	window.document.addEventListener("touchmove", $createStaticDelegate(this, this.onDocumentTouchMove), false);
	window.addEventListener("resize", $createStaticDelegate(this, this.onWindowResize), false);
	this.startRender();
};

com.leonardsouza.threejs.mediators.MainMediator.prototype.onDocumentMouseDown = function(event) {
	event.preventDefault();
	console.log("down");
	window.document.addEventListener("mousemove", $createStaticDelegate(this, this.onDocumentMouseMove), false);
	window.document.addEventListener("mouseup", $createStaticDelegate(this, this.onDocumentMouseUp), false);
	window.document.addEventListener("mouseout", $createStaticDelegate(this, this.onDocumentMouseOut), false);
	this.mouseXOnMouseDown = event.clientX - this.windowHalfX;
	this.targetRotationOnMouseDown = this.targetRotation;
};

com.leonardsouza.threejs.mediators.MainMediator.prototype.onDocumentTouchStart = function(event) {
	if (event.touches.length === 1) {
		event.preventDefault();
		this.mouseXOnMouseDown = event.touches()[0].pageX - this.windowHalfX;
		this.targetRotationOnMouseDown = this.targetRotation;
	}
};

com.leonardsouza.threejs.mediators.MainMediator.prototype.onDocumentTouchMove = function(event) {
	if (event.touches.length === 1) {
		event.preventDefault();
		this.mouseX = event.touches()[0].pageX - this.windowHalfX;
		this.targetRotation = this.targetRotationOnMouseDown + (this.mouseX - this.mouseXOnMouseDown) * 0.05;
	}
};

com.leonardsouza.threejs.mediators.MainMediator.prototype.onWindowResize = function(event) {
	this.windowHalfX = window.innerWidth / 2;
	this.windowHalfY = window.innerHeight / 2;
	this.camera.aspect = window.innerWidth / window.innerHeight;
	this.camera.updateProjectionMatrix();
	this.renderer.setSize(window.innerWidth, window.innerHeight);
};

com.leonardsouza.threejs.mediators.MainMediator.prototype.onDocumentMouseMove = function(event) {
	this.mouseX = event.clientX - this.windowHalfX;
	this.targetRotation = this.targetRotationOnMouseDown + (this.mouseX - this.mouseXOnMouseDown) * 0.02;
};

com.leonardsouza.threejs.mediators.MainMediator.prototype.onDocumentMouseUp = function(event) {
	console.log("up");
	window.document.removeEventListener("mousemove", $createStaticDelegate(this, this.onDocumentMouseMove), false);
	window.document.removeEventListener("mouseup", $createStaticDelegate(this, this.onDocumentMouseUp), false);
	window.document.removeEventListener("mouseout", $createStaticDelegate(this, this.onDocumentMouseOut), false);
};

com.leonardsouza.threejs.mediators.MainMediator.prototype.onDocumentMouseOut = function(event) {
	console.log("out");
	window.document.removeEventListener("mousemove", $createStaticDelegate(this, this.onDocumentMouseMove), false);
	window.document.removeEventListener("mouseup", $createStaticDelegate(this, this.onDocumentMouseUp), false);
	window.document.removeEventListener("mouseout", $createStaticDelegate(this, this.onDocumentMouseOut), false);
};

com.leonardsouza.threejs.mediators.MainMediator.prototype.startRender = function() {
	this.animation.request($createStaticDelegate(this, this.startRender));
	this.render();
	this.stats.update();
};

com.leonardsouza.threejs.mediators.MainMediator.prototype.render = function() {
	this.plane.rotation.y = this.cube.rotation.y += (this.targetRotation - this.cube.rotation.y) * 0.05;
	this.renderer.render(this.scene, this.camera);
};

$inherit(com.leonardsouza.threejs.mediators.MainMediator, randori.behaviors.AbstractMediator);

com.leonardsouza.threejs.mediators.MainMediator.className = "com.leonardsouza.threejs.mediators.MainMediator";

com.leonardsouza.threejs.mediators.MainMediator.getClassDependencies = function(t) {
	var p;
	return [];
};

com.leonardsouza.threejs.mediators.MainMediator.injectionPoints = function(t) {
	var p;
	switch (t) {
		case 1:
			p = randori.behaviors.AbstractMediator.injectionPoints(t);
			p.push({n:'animation', t:'com.leonardsouza.threejs.RequestAnimationFrame', r:0, v:null});
			break;
		case 2:
			p = randori.behaviors.AbstractMediator.injectionPoints(t);
			break;
		case 3:
			p = randori.behaviors.AbstractMediator.injectionPoints(t);
			break;
		default:
			p = [];
			break;
	}
	return p;
};


text:
package jadx.tests.integration.loops;

import jadx.core.dex.nodes.ClassNode;
import jadx.tests.api.IntegrationTest;

import org.junit.Test;

import static jadx.tests.api.utils.JadxMatchers.containsLines;
import static org.junit.Assert.assertThat;

public class TestIndexForLoop extends IntegrationTest {

	public static class TestCls {

		private int test(int[] a, int b) {
			int sum = 0;
			for (int i = 0; i < b; i++) {
				sum += a[i];
			}
			return sum;
		}
	}

	@Test
	public void test() {
		ClassNode cls = getClassNode(TestCls.class);
		String code = cls.getCode().toString();

		assertThat(code, containsLines(2,
				"int sum = 0;",
				"for (int i = 0; i < b; i++) {",
				indent(1) + "sum += a[i];",
				"}",
				"return sum;"
		));
	}
}


text:
#ifndef BROWSERMAINWINDOW_H
#define BROWSERMAINWINDOW_H

#include <QtGui/QMainWindow>
#include <QtGui/QIcon>
#include <QtCore/QUrl>

class AutoSaver;
class BookmarksToolBar;
class ChaseWidget;
class QWebFrame;
class TabWidget;
class ToolbarSearch;
class WebView;

/*!
    The MainWindow of the Browser Application.

    Handles the tab widget and all the actions
 */
class BrowserMainWindow : public QMainWindow {
    Q_OBJECT

public:
    BrowserMainWindow(QWidget *parent = 0, Qt::WindowFlags flags = 0);
    ~BrowserMainWindow();
    QSize sizeHint() const;

public:
    static QUrl guessUrlFromString(const QString &url);
    TabWidget *tabWidget() const;
    WebView *currentTab() const;
    QByteArray saveState(bool withTabs = true) const;
    bool restoreState(const QByteArray &state);

public slots:
    void loadPage(const QString &url);
    void slotHome();

protected:
    void closeEvent(QCloseEvent *event);

private slots:
    void save();

    void slotLoadProgress(int);
    void slotUpdateStatusbar(const QString &string);
    void slotUpdateWindowTitle(const QString &title = QString());

    void loadUrl(const QUrl &url);
    void slotPreferences();

    void slotFileNew();
    void slotFileOpen();
    void slotFilePrintPreview();
    void slotFilePrint();
    void slotPrivateBrowsing();
    void slotFileSaveAs();
    void slotEditFind();
    void slotEditFindNext();
    void slotEditFindPrevious();
    void slotShowBookmarksDialog();
    void slotAddBookmark();
    void slotViewZoomIn();
    void slotViewZoomOut();
    void slotViewResetZoom();
    void slotViewZoomTextOnly(bool enable);
    void slotViewToolbar();
    void slotViewBookmarksBar();
    void slotViewStatusbar();
    void slotViewPageSource();
    void slotViewFullScreen(bool enable);

    void slotWebSearch();
    void slotToggleInspector(bool enable);
    void slotAboutApplication();
    void slotDownloadManager();
    void slotSelectLineEdit();

    void slotAboutToShowBackMenu();
    void slotAboutToShowForwardMenu();
    void slotAboutToShowWindowMenu();
    void slotOpenActionUrl(QAction *action);
    void slotShowWindow();
    void slotSwapFocus();

    void printRequested(QWebFrame *frame);
    void geometryChangeRequested(const QRect &geometry);
    void updateToolbarActionText(bool visible);
    void updateBookmarksToolbarActionText(bool visible);

private:
    void loadDefaultState();
    void setupMenu();
    void setupToolBar();
    void updateStatusbarActionText(bool visible);

private:
    QToolBar *m_navigationBar;
    ToolbarSearch *m_toolbarSearch;
    BookmarksToolBar *m_bookmarksToolbar;
    ChaseWidget *m_chaseWidget;
    TabWidget *m_tabWidget;
    AutoSaver *m_autoSaver;

    QAction *m_historyBack;
    QMenu *m_historyBackMenu;
    QAction *m_historyForward;
    QMenu *m_historyForwardMenu;
    QMenu *m_windowMenu;

    QAction *m_stop;
    QAction *m_reload;
    QAction *m_stopReload;
    QAction *m_viewToolbar;
    QAction *m_viewBookmarkBar;
    QAction *m_viewStatusbar;
    QAction *m_restoreLastSession;
    QAction *m_addBookmark;

    QIcon m_reloadIcon;
    QIcon m_stopIcon;

    QString m_lastSearch;
};

#endif // BROWSERMAINWINDOW_H


text:
package com.example.administrator.rxjavaandretrofitsimple.ui.base.manager;

import android.annotation.TargetApi;
import android.content.Context;
import android.os.Build;
import android.support.annotation.LayoutRes;
import android.util.AttributeSet;
import android.util.SparseArray;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.TextView;

import com.example.administrator.rxjavaandretrofitsimple.R;

/**
 * 作者:quzongyang
 *
 * 创建时间:2017/3/18
 *
 * 类描述:基类Activity状态布局
 */
public class RootFrameLayout extends FrameLayout {

    /**
     *  loading 加载id
     */
    public static final int LAYOUT_LOADING_ID = 1;

    /**
     *  内容id
     */
    public static final int LAYOUT_CONTENT_ID = 2;

    /**
     *  异常id
     */
    public static final int LAYOUT_ERROR_ID = 3;

    /**
     *  网络异常id
     */
    public static final int LAYOUT_NETWORK_ERROR_ID = 4;

    /**
     *  空数据id
     */
    public static final int LAYOUT_EMPTYDATA_ID = 5;

    /**
     *  存放布局集合
     */
    private SparseArray<View> layoutSparseArray = new SparseArray();

    /**
     *  布局管理器
     */
    private StatusLayoutManager mStatusLayoutManager;

    public int ivEmptyResID;
    public String tvEmptyMessage;

    public RootFrameLayout(Context context) {
        super(context);
    }

    public RootFrameLayout(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    public RootFrameLayout(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
    }

    @TargetApi(Build.VERSION_CODES.LOLLIPOP)
    public RootFrameLayout(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
        super(context, attrs, defStyleAttr, defStyleRes);
    }

    public void setStatusLayoutManager(StatusLayoutManager statusLayoutManager) {
        mStatusLayoutManager = statusLayoutManager;

        addAllLayoutToLayout();
    }

    public void addAllLayoutToLayout() {
        if(mStatusLayoutManager.contentLayoutResId != 0) addLayoutResId(mStatusLayoutManager.contentLayoutResId, RootFrameLayout.LAYOUT_CONTENT_ID);
        if(mStatusLayoutManager.loadingLayoutResId != 0) addLayoutResId(mStatusLayoutManager.loadingLayoutResId, RootFrameLayout.LAYOUT_LOADING_ID);

        if(mStatusLayoutManager.emptyDataVs != null) addView(mStatusLayoutManager.emptyDataVs);
        if(mStatusLayoutManager.errorVs != null) addView(mStatusLayoutManager.errorVs);
        if(mStatusLayoutManager.netWorkErrorVs != null) addView(mStatusLayoutManager.netWorkErrorVs);
    }

    public void addLayoutResId(@LayoutRes int layoutResId, int id) {
        View resView = LayoutInflater.from(mStatusLayoutManager.context).inflate(layoutResId, null);
        layoutSparseArray.put(id, resView);
        addView(resView);
    }

    /**
     *  显示loading
     */
    public void showLoading() {
        if(layoutSparseArray.get(LAYOUT_LOADING_ID) != null)
            showHideViewById(LAYOUT_LOADING_ID);
    }

    /**
     *  显示内容
     */
    public void showContent() {
        if(layoutSparseArray.get(LAYOUT_CONTENT_ID) != null)
            showHideViewById(LAYOUT_CONTENT_ID);
    }

    /**
     *  显示空数据
     */
    public void showEmptyData() {
        if(inflateLayout(LAYOUT_EMPTYDATA_ID))
            showHideViewById(LAYOUT_EMPTYDATA_ID);
    }

    /**
     *  显示网络异常
     */
    public void showNetWorkError() {
        if(inflateLayout(LAYOUT_NETWORK_ERROR_ID))
            showHideViewById(LAYOUT_NETWORK_ERROR_ID);
    }

    /**
     *  显示异常
     */
    public void showError() {
        if(inflateLayout(LAYOUT_ERROR_ID))
            showHideViewById(LAYOUT_ERROR_ID);
    }

    /**
     *  根据ID显示隐藏布局
     * @param id
     */
    private void showHideViewById(int id) {
        for(int i = 0; i < layoutSparseArray.size(); i++) {
            int key = layoutSparseArray.keyAt(i);
            View valueView = layoutSparseArray.valueAt(i);
            //显示该view
            if(key == id) {
                valueView.setVisibility(View.VISIBLE);
                if(mStatusLayoutManager.onShowHideViewListener != null) mStatusLayoutManager.onShowHideViewListener.onShowView(valueView, key);
            } else {
                if(valueView.getVisibility() != View.GONE) {
                    valueView.setVisibility(View.GONE);
                    if(mStatusLayoutManager.onShowHideViewListener != null) mStatusLayoutManager.onShowHideViewListener.onHideView(valueView, key);
                }
            }
        }
    }

    private boolean inflateLayout(int id) {
        boolean isShow = true;
        if(layoutSparseArray.get(id) != null) return isShow;
        switch (id) {
            case LAYOUT_NETWORK_ERROR_ID:
                if(mStatusLayoutManager.netWorkErrorVs != null) {
                    View view = mStatusLayoutManager.netWorkErrorVs.inflate();
                    retryLoad(view, mStatusLayoutManager.netWorkErrorRetryViewId);
                    layoutSparseArray.put(id, view);
                    isShow = true;
                } else {
                    isShow = false;
                }
                break;
            case LAYOUT_ERROR_ID:
                if(mStatusLayoutManager.errorVs != null) {
                    View view = mStatusLayoutManager.errorVs.inflate();
                    retryLoad(view, mStatusLayoutManager.errorRetryViewId);
                    layoutSparseArray.put(id, view);
                    isShow = true;
                } else {
                    isShow = false;
                }
                break;
            case LAYOUT_EMPTYDATA_ID:
                if(mStatusLayoutManager.emptyDataVs != null) {
                    View view = mStatusLayoutManager.emptyDataVs.inflate();
                    ImageView ivEmpty = (ImageView) view.findViewById(R.id.icon);
                    TextView tvEmpty = (TextView)  view.findViewById(R.id.message);
                    if(ivEmptyResID != 0){
                        ivEmpty.setImageResource(ivEmptyResID);
                    }
                    if(null != tvEmptyMessage){
                        tvEmpty.setText(tvEmptyMessage);
                    }
                    retryLoad(view, mStatusLayoutManager.emptyDataRetryViewId);
                    layoutSparseArray.put(id, view);
                    isShow = true;
                } else {
                    isShow = false;
                }
                break;
        }
        return isShow;
    }

    /**
     *  重试加载
     */
    public void retryLoad(View view, int id) {
        View retryView = view.findViewById(mStatusLayoutManager.retryViewId != 0 ? mStatusLayoutManager.retryViewId : id);
        if(retryView == null || mStatusLayoutManager.onRetryListener == null) return;
        retryView.setOnClickListener(new OnClickListener() {
            @Override
            public void onClick(View v) {
                mStatusLayoutManager.onRetryListener.onRetry();
            }
        });
    }
}


text:
package test;

import static java.lang.Math.abs;

class X {{
  abs();
}}


text:
<!DOCTYPE html>

    <meta charset="UTF-8">
    <title>任务四:基础JavaScript练习(一)</title>

<form>
    <input type="text" title="number" id="input">
    <button type="button" id="left-in">左侧入</button>
    <button type="button" id="right-in">右侧入</button>
    <button type="button" id="left-out">左侧出</button>
    <button type="button" id="right-out">右侧出</button>
</form>


text:
import angr
import nose
import os

test_location = os.path.join(os.path.dirname(__file__), '..', '..', 'binaries', 'tests')

def run_0div(arch):
    # check that we run in unicorn up to the zero-div site, fall back, try again in angr, and error correctly.
    p = angr.Project(os.path.join(test_location, arch, 'test_0div'))
    s = p.factory.entry_state(add_options=angr.options.unicorn)
    simgr = p.factory.simulation_manager(s)
    simgr.run(n=5)
    nose.tools.assert_equal(len(simgr.active), 1)
    simgr.step()
    nose.tools.assert_equal(len(simgr.errored), 1)
    nose.tools.assert_true(isinstance(simgr.errored[0].error, angr.errors.SimZeroDivisionException))

def test_0div_exception():
    yield run_0div, 'i386'
    yield run_0div, 'x86_64'

def test_symbolic_0div():
    p = angr.load_shellcode(b'X', arch='amd64')
    s = p.factory.blank_state()
    s.regs.rax = s.solver.BVS('rax', 64)
    s.regs.rcx = s.solver.BVS('rcx', 64)
    s.regs.rdx = s.solver.BVS('rdx', 64)

    s.options.add(angr.options.PRODUCE_ZERODIV_SUCCESSORS)
    successors = s.step(insn_bytes=b'\x48\xf7\xf1') # div rcx
    assert len(successors.flat_successors) == 2

    s.options.discard(angr.options.PRODUCE_ZERODIV_SUCCESSORS)
    successors = s.step(insn_bytes=b'\x48\xf7\xf1') # div rcx
    assert len(successors.flat_successors) == 1

if __name__ == '__main__':
    for func, arg in test_0div_exception():
        func(arg)
    test_symbolic_0div()


text:
using namespace std;

class atom
{
private:
	static const size_t n = 33;
	static const array<string, n> ad_strings;
	static const array<float, n> ad_covalent_radii;
	static const array<size_t, n> ad_to_xs;
	static const array<size_t, n> ad_to_rf;
public:
	size_t serial;
	array<float, 3> coord;
	size_t ad;
	size_t xs;
	size_t rf;

	// Constructs an atom from an ATOM/HETATM line in PDBQT format.
	explicit atom(const string& line);

	/// Returns true if the AutoDock4 atom type is not supported.
	bool ad_unsupported() const;

	/// Returns true if the XScore atom type is not supported.
	bool xs_unsupported() const;

	/// Returns true if the RF-Score atom type is not supported.
	bool rf_unsupported() const;

	/// Returns true if the atom is a nonpolar hydrogen atom.
	bool is_nonpolar_hydrogen() const;

	/// Returns true if the atom is a polar hydrogen atom.
	bool is_polar_hydrogen() const;

	/// Returns true if the atom is a hydrogen atom.
	bool is_hydrogen() const;

	/// Returns true if the atom is a hetero atom, i.e. non-carbon heavy atom.
	bool is_hetero() const;

	/// For nitrogen and oxygen, revises the XScore atom type to make it a hydrogen bond donor.
	void donorize();

	/// For carbon, revises the XScore atom type to make it non-hydrophobic.
	void dehydrophobicize();

	/// Returns the covalent radius of current AutoDock4 atom type.
	float covalent_radius() const;

	/// Returns true if the current atom is covalently bonded to a given atom.
	bool has_covalent_bond(const atom& a) const;

	bool is_hydrophobic() const;
	bool is_aromatic() const;
	bool is_hbd() const;
	bool is_hba() const;
};

#endif


text:
[![Build Status](https://travis-ci.org/ashishbaghudana/mthesis-ashish.svg)](https://travis-ci.org/ashishbaghudana/mthesis-ashish) [![Coverage Status](https://coveralls.io/repos/ashishbaghudana/mthesis-ashish/badge.svg?branch=develop&service=github)](https://coveralls.io/github/ashishbaghudana/mthesis-ashish?branch=develop)

## Status

* NLPBA corpus of 2000 abstracts with tag annotations of `Protein`, `DNA`, and `RNA`. No relations
* LLL05 corpuswith 85 sentences with relations of `genic` interaction (to anything)
* Stub implementation of [Relna](https://github.com/ashishbaghudana/mthesis-ashish/) here.
* [README](https://github.com/ashishbaghudana/mthesis-ashish/) for Relna follows below.

## Goal

1. Expand NLPBA corpus with:
  * `Protein` to `RNA` relations (reason, more interesting biologically & we don't have to deal with the problem of distinguishing Protein vs Genes)
  * `Protein` to `DNA elements` (very specific cases... TODO)
  * [ ] Write as PubAnnotation format & anndoc (tagtog) format
2. Create method to given a text or PMID, recognize these kind of relations (meaning, entity names have to also be recognized)
  * Make method public
  * Well documented for totally new users (HOWTO)

## Approach

1. Expand dictionary by bootstrapping method:
  1. Annotate seed corpus of 20 abstracts (with relations)
  2. Develop method for relationship extraction
  3. Predict on a bigger set of abstracts
  4. Review manually (gradually check only low confidence cases)
  5. Add to whole corpus and repeat process

# RELNA HOWTO

### INSTALLATION ###

1. Install [gradle](http://gradle.com) on your system.
2. Run install.sh.

#### ALTERNATE (Deprecated)
1. Install [gradle](http://gradle.com) on your system.
2. Unzip the `genia.mod.tar.gz` from `resources/` and copy it to `src/main/resources/gimli/resources/tools/gdep`
3. Navigate to the parent directory (where build.gradle is placed) and run `gradle assemble`

### RUNNING THE TOOL ###

Navigate to `build/libs` and run the tool with `java -jar mthesis-ashish-*.jar` with the following arguments:
* `-i` **path-to-input-file**
* `-o` **path-to-output-file**
* `-w` **writer-format - anndoc or json**
* `-r` **reader-format - can be txt or iob2 (optional argument)**
* `-s` **string - text to tag given from command line (optional argument)**

If `reader format (-r)` argument is not given, the program will guess based on the extension.

If `string (-s)` argument is given, the program will automatically read from the command line for an input.

#### Example ####

**Input format : iob2, `-r` specified, writer format : anndoc**
`java -jar build/libs/mthesis-ashish-*.jar -r iob2 -i sample/iob2/corpus1.iob2 -w anndoc -o sample/iob2/output1.ann.json`

**Input format : iob2, `-r` not specified, writer format : json**
`java -jar build/libs/mthesis-ashish-*.jar -i sample/iob2/corpus1.iob2 -w json -o sample/iob2/output1.json`

**Input format : txt, `-r` specified, writer format : anndoc**
`java -jar build/libs/mthesis-ashish-*.jar -i sample/txt/corpus2.txt -r txt -w anndoc -o sample/txt/output2.ann.json`

Eventually, the jar file will be called relna.

If the file is in `txt` format, it must follow the pattern below.

```text
<identifier>
<title>
<abstract>
```

If the file is in `iob` format, it must follow the pattern below.

```text
<identifier>

<sentence begin>
.
.
<token>
.
.
<sentence end>

<sentence begin>
.
.
.
<sentence end>
```


text:
//
//  Copyright (c) SRG SSR. All rights reserved.
//
//  License information is available from the LICENSE file.
//

@import UIKit;

NS_ASSUME_NONNULL_BEGIN

@interface UIDevice (SRGMediaPlayer)

/**
 *  Return YES when the device is locked.
 */
@property (class, nonatomic, readonly) BOOL srg_mediaPlayer_isLocked;

@end

NS_ASSUME_NONNULL_END


text:
package com.google.devtools.kythe.extractors.java.standalone;

import com.google.auto.service.AutoService;
import com.google.common.collect.Lists;
import com.sun.tools.javac.main.Arguments;
import com.sun.tools.javac.main.CommandLine;
import java.io.IOException;
import java.util.List;

/** JdkCompatibilityShims implementation for JDK9-compatible releases. */
@AutoService(JdkCompatibilityShims.class)
public final class Jdk9CompatibilityShims implements JdkCompatibilityShims {
  private static final Runtime.Version minVersion = Runtime.Version.parse("9");
  private static final Runtime.Version maxVersion = Runtime.Version.parse("15");

  public Jdk9CompatibilityShims() {}

  @Override
  public CompatibilityClass getCompatibility() {
    Runtime.Version version = Runtime.version();
    if (version.compareToIgnoreOptional(minVersion) >= 0
        && version.compareToIgnoreOptional(maxVersion) < 0) {
      return CompatibilityClass.COMPATIBLE;
    }
    return CompatibilityClass.INCOMPATIBLE;
  }

  @Override
  public List<String> parseCompilerArguments(String[] args) throws IOException {
    return Lists.newArrayList(CommandLine.parse(args));
  }

  @Override
  public void initializeArguments(Arguments arguments, String[] args) {
    arguments.init("kythe_javac", args);
  }
}


text:
require 'fog/core'
require 'fog/json'
require 'fog/xml'

require File.expand_path('../oraclecloud/version', __FILE__)

module Fog
  module Compute
  	autoload :OracleCloud, File.expand_path('../oraclecloud/compute', __FILE__)
  end

  module Storage
  	autoload :OracleCloud, File.expand_path('../oraclecloud/storage', __FILE__)
  end

  module OracleCloud
  	extend Fog::Provider

    autoload :Java, File.expand_path('../oraclecloud/java', __FILE__)
    autoload :Database, File.expand_path('../oraclecloud/database', __FILE__)
    autoload :SOA, File.expand_path('../oraclecloud/soa', __FILE__)
    autoload :Monitoring, File.expand_path('../oraclecloud/monitoring', __FILE__)

  	service(:compute, 'Compute')
  	service(:storage, 'Storage')
    service(:java, 'Java')
    service(:database, 'Database')
    service(:soa, 'SOA')
    service(:monitoring, 'Monitoring')
  end
end


text:
layout: default
title: Principles
description:
permalink: /category/principles/
---
{% include category.html %}


text:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>cn.yjxxclub.springboot</groupId>
  <artifactId>customer</artifactId>
  <packaging>war</packaging>
  <version>1.0-SNAPSHOT</version>
  <name>springboot Maven Webapp</name>
  <url>http://maven.apache.org</url>

  <parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>1.5.2.RELEASE</version>
    <relativePath/> <!-- lookup parent from repository -->
  </parent>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <java.version>1.8</java.version>
  </properties>

  <dependencies>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-web</artifactId>
      <!--  方法一  -->
      <!--<exclusions>
          <exclusion>
              <groupId>org.springframework.boot</groupId>
              <artifactId>spring-boot-starter-tomcat</artifactId>
          </exclusion>
      </exclusions>-->
    </dependency>

    <dependency>
      <groupId>org.mybatis.spring.boot</groupId>
      <artifactId>mybatis-spring-boot-starter</artifactId>
      <version>1.2.1</version>
    </dependency>

    <!--shiro start-->
    <dependency>
      <groupId>org.apache.shiro</groupId>
      <artifactId>shiro-core</artifactId>
      <version>1.2.3</version>
    </dependency>
    <dependency>
      <groupId>org.apache.shiro</groupId>
      <artifactId>shiro-web</artifactId>
      <version>1.2.3</version>
    </dependency>
    <dependency>
      <groupId>org.apache.shiro</groupId>
      <artifactId>shiro-spring</artifactId>
      <version>1.2.3</version>
    </dependency>
    <dependency>
      <groupId>org.apache.shiro</groupId>
      <artifactId>shiro-ehcache</artifactId>
      <version>1.2.3</version>
    </dependency>
    <!--shiro end-->
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-devtools</artifactId>
      <scope>provided</scope>
      <optional>true</optional><!---->
    </dependency>

    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>jstl</artifactId>
    </dependency>

    <!-- 方法二  -->
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-tomcat</artifactId>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>org.apache.tomcat.embed</groupId>
      <artifactId>tomcat-embed-jasper</artifactId>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>mysql</groupId>
      <artifactId>mysql-connector-java</artifactId>
      <version>5.1.21</version>
    </dependency>

    <dependency>
      <groupId>com.alibaba</groupId>
      <artifactId>druid</artifactId>
      <version>1.0.26</version>
    </dependency>
    <dependency>
      <groupId>com.alibaba</groupId>
      <artifactId>fastjson</artifactId>
      <version>1.2.6</version>
    </dependency>
    <!--使用以下进行时间格式化-->
    <dependency>
      <groupId>net.sf.json-lib</groupId>
      <artifactId>json-lib</artifactId>
      <version>2.4</version>
      <classifier>jdk15</classifier><!--jdk版本-->
    </dependency>

    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-test</artifactId>
      <scope>test</scope>
    </dependency>

  </dependencies>

  <build>
    <finalName>customer</finalName>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.springframework.boot</groupId>
          <artifactId>spring-boot-maven-plugin</artifactId>
          <dependencies>
            <!-- spring热部署 -->
            <dependency>
              <groupId>org.springframework</groupId>
              <artifactId>springloaded</artifactId>
              <version>1.2.6.RELEASE</version>
            </dependency>
          </dependencies>
          <configuration>
            <mainClass>cn.yjxxclub.springboot.Mainspringboot</mainClass>
          </configuration>
          <executions>
            <execution>
              <goals>
                <goal>repackage</goal>
              </goals>
            </execution>
          </executions>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-shade-plugin</artifactId>
          <version>1.2.1</version>
          <executions>
            <execution>
              <phase>package</phase>
              <goals>
                <goal>shade</goal>
              </goals>
              <configuration>
                <transformers>
                  <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
                    <mainClass>cn.yjxxclub.springboot.Mainspringboot</mainClass>
                  </transformer>
                </transformers>
              </configuration>
            </execution>
          </executions>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <configuration>
            <target>1.8</target>
            <source>1.8</source>
          </configuration>
        </plugin>
        <!--tomcat plugin-->
        <plugin>
          <groupId>org.apache.tomcat.maven</groupId>
          <artifactId>tomcat7-maven-plugin</artifactId>
          <version>2.2</version>
          <configuration>
            <url>http://localhost:8080/manager/text</url>
            <server>tomcat</server>
            <username>tomcat</username>
            <password>tomcat</password>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>
</project>


text:
from __future__ import unicode_literals
import redis
from rq import Connection, Queue, Worker
from frappe.utils import cstr
from collections import defaultdict
import frappe
import MySQLdb
import os, socket, time

default_timeout = 300
queue_timeout = {
	'long': 1500,
	'default': 300,
	'short': 300
}

def enqueue(method, queue='default', timeout=300, event=None,
	async=True, job_name=None, **kwargs):
	'''
		Enqueue method to be executed using a background worker

		:param method: method string or method object
		:param queue: should be either long, default or short
		:param timeout: should be set according to the functions
		:param event: this is passed to enable clearing of jobs from queues
		:param async: if async=False, the method is executed immediately, else via a worker
		:param job_name: can be used to name an enqueue call, which can be used to prevent duplicate calls
		:param kwargs: keyword arguments to be passed to the method
	'''
	q = get_queue(queue, async=async)
	if not timeout:
		timeout = queue_timeout.get(queue) or 300

	return q.enqueue_call(execute_job, timeout=timeout,
		kwargs={
			"site": frappe.local.site,
			"user": frappe.session.user,
			"method": method,
			"event": event,
			"job_name": job_name or cstr(method),
			"async": async,
			"kwargs": kwargs
		})

def execute_job(site, method, event, job_name, kwargs, user=None, async=True, retry=0):
	'''Executes job in a worker, performs commit/rollback and logs if there is any error'''
	from frappe.utils.scheduler import log

	if async:
		frappe.connect(site)
		if user:
			frappe.set_user(user)

	if isinstance(method, basestring):
		method_name = method
		method = frappe.get_attr(method)
	else:
		method_name = cstr(method.__name__)

	try:
		method(**kwargs)

	except (MySQLdb.OperationalError, frappe.RetryBackgroundJobError), e:
		frappe.db.rollback()

		if (retry < 5 and
			(isinstance(e, frappe.RetryBackgroundJobError) or e.args[0] in (1213, 1205))):
			# retry the job if
			# 1213 = deadlock
			# 1205 = lock wait timeout
			# or RetryBackgroundJobError is explicitly raised
			frappe.destroy()
			time.sleep(retry+1)

			return execute_job(site, method, event, job_name, kwargs,
				async=async, retry=retry+1)

		else:
			log(method_name, message=repr(locals()))
			raise

	except:
		frappe.db.rollback()
		log(method_name, message=repr(locals()))
		raise

	else:
		frappe.db.commit()

	finally:
		if async:
			frappe.destroy()

def start_worker(queue=None):
	'''Wrapper to start rq worker. Connects to redis and monitors these queues.'''
	with frappe.init_site():
		# empty init is required to get redis_queue from common_site_config.json
		redis_connection = get_redis_conn()

	with Connection(redis_connection):
		queues = get_queue_list(queue)
		Worker(queues, name=get_worker_name(queue)).work()

def get_worker_name(queue):
	'''When limiting worker to a specific queue, also append queue name to default worker name'''
	name = None

	if queue:
		# hostname.pid is the default worker name
		name = '{hostname}.{pid}.{queue}'.format(
			hostname=socket.gethostname(),
			pid=os.getpid(),
			queue=queue)

	return name

def get_jobs(site=None, queue=None, key='method'):
	'''Gets jobs per queue or per site or both'''
	jobs_per_site = defaultdict(list)
	for queue in get_queue_list(queue):
		q = get_queue(queue)

		for job in q.jobs:
			if job.kwargs.get('site'):
				if site is None:
					# get jobs for all sites
					jobs_per_site[job.kwargs['site']].append(job.kwargs[key])

				elif job.kwargs['site'] == site:
					# get jobs only for given site
					jobs_per_site[site].append(job.kwargs[key])

			else:
				print 'No site found in job', job.__dict__

	return jobs_per_site

def get_queue_list(queue_list=None):
	'''Defines possible queues. Also wraps a given queue in a list after validating.'''
	default_queue_list = queue_timeout.keys()
	if queue_list:
		if isinstance(queue_list, basestring):
			queue_list = [queue_list]

		for queue in queue_list:
			validate_queue(queue, default_queue_list)

		return queue_list

	else:
		return default_queue_list

def get_queue(queue, async=True):
	'''Returns a Queue object tied to a redis connection'''
	validate_queue(queue)

	return Queue(queue, connection=get_redis_conn(), async=async)

def validate_queue(queue, default_queue_list=None):
	if not default_queue_list:
		default_queue_list = queue_timeout.keys()

	if queue not in default_queue_list:
		frappe.throw("Queue should be one of {0}".format(', '.join(default_queue_list)))

def get_redis_conn():
	if not hasattr(frappe.local, 'conf'):
		raise Exception('You need to call frappe.init')

	elif not frappe.local.conf.redis_queue:
		raise Exception('redis_queue missing in common_site_config.json')

	return redis.from_url(frappe.local.conf.redis_queue)


text:
/* The purpose of the following program is to demonstrate use of gettimeofday() system call.
   The program computes the average amount of time and the maximum amount of time required
   to execute gettimeofday() system call. It is provided here as an example to demonstrate
   how to call gettimeofday() system call.

   The program is developed by eric sotol
*/

/*
 * Needed Includes
 */
#include <sys/time.h>		/* gettimeofday() */
#include <unistd.h>		/* gettimeofday() */
#include <stdio.h>		/* printf() */
#include <sched.h>
//#define FIFO

/*
 * NO_OF_ITERATIONS is the number of times that the gettimeofday() call will
 * be called.  This number is large to allow for a large statistical set from
 * which the average time can be acquired.
 */
#define NO_OF_ITERATIONS	100000

/*
 * MICRO_PER_SECOND defines the number of microseconds in a second
 */
#define MICRO_PER_SECOND	1000000

/*
 * Start of the Main Program
 */
int main( int argc, char *argv[] )
{
	/*
	 * times array holds the timeval structure returned by each subsequent
	 * call to gettimeofday().  These values are stored in this array and
	 * held for later analysis.
         */
#ifdef FIFO
printf("using FIFO sched..\n\n\n");
    //set priority and sched info
     pid_t _pid = getpid();
    struct sched_param param;
    int policy;

        param.sched_priority = 99;
        if( sched_setscheduler( 0, SCHED_FIFO, &param ) == -1 ) {
                fprintf(stderr,"error setting scheduler ... are you root?\n");
                exit(1);
        }

        /*
         * Set the priority of the process
         */
        param.sched_priority = 99;
        if( sched_setparam( 0, &param ) == -1 ) {
                fprintf(stderr,"Error setting priority!\n");
                exit(1);
        }
#endif
printf("default sched...");
	struct timeval times[NO_OF_ITERATIONS];

        /*
         * Other important variables
         */
        float total;
	float delta;
	float maximum;
        int count;

	/*
	 * First, loop NO_OF_ITERATIONS times and each time through the loop
	 * make a call to gettimeofday() and store the results in the times
	 * array.
         */
	struct timeval timeread;
	for( count = 0; count < NO_OF_ITERATIONS; count++ )
	{
		gettimeofday( &timeread, NULL );
		times[count] = timeread;
	}

	/*
	 * Second, perform a second loop to analysis the results.  NOTE that
         * this loop depends on a pair of time values so it is only performed
	 * NO_OF_ITERATIONS - 1 times.
         */
	total = maximum = delta = 0;
	for( count = 0; count < NO_OF_ITERATIONS - 1; count ++ ) {
		printf("\n %d",count);
		/* Calculate the seconds part of the delta between count and count + 1 */
		delta  = times[count+1].tv_sec  - times[count].tv_sec;

		/* Calculate the microseconds part of the delta between count and count + 1 */
                delta += (times[count+1].tv_usec - times[count].tv_usec)/(float)MICRO_PER_SECOND;

		/* Add the delta to the total for calculating the average */
		total += delta;

		/* If delta greater than the maximum, replace the maximum */
		if( delta > maximum )
		{
			maximum = delta;
		}
	}

	/*
	 * Third, display the results,  NOTE:  the results are only displayed to
	 * the microsecond precision.  This is because the gettimeofday() call
	 * is only accurate to microseconds and any value beyond that is
	 * "garbage."
         */
        printf( "The average time for the gettimeofday() call: %.6f\n", total / count );
        printf( "The maximum time for the gettimeofday() call: %.6f\n", maximum );
}


text:
file_state_t* fileio_new(ch_cstr type, ch_cstr filename){
    if(!strcmp(type,"mmap")){
        return fileio_new_mmap(filename);
    }
    else if(!strcmp(type,"cwrite")){
        return fileio_new_cwrite(filename);
    }

    ch_log_fatal("Unkown filio type=%s\n    ", filename);
    return NULL;
}


text:
package com.google.firebase.auth.hash;

import com.google.common.collect.ImmutableMap;
import com.google.firebase.auth.UserImportHash;
import java.util.Map;

/**
 * Represents the Bcrypt password hashing algorithm. Can be used as an instance of
 * {@link com.google.firebase.auth.UserImportHash} when importing users.
 */
public final class Bcrypt extends UserImportHash {

  private Bcrypt() {
    super("BCRYPT");
  }

  public static Bcrypt getInstance() {
    return new Bcrypt();
  }

  @Override
  protected Map<String, Object> getOptions() {
    return ImmutableMap.of();
  }
}