text:
<mods xmlns="http://www.loc.gov/mods/v3" xmlns:exslt="http://exslt.org/common" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink" xsi:schemaLocation="http://www.loc.gov/mods/v3 http://www.loc.gov/standards/mods/v3/mods-3-3.xsd" version="3.3" ID="P0b002ee18bb56d18">
<name type="corporate">
 <namePart>United States Government Printing Office</namePart>
 <role>
  <roleTerm type="text" authority="marcrelator">printer</roleTerm>
  <roleTerm type="code" authority="marcrelator">prt</roleTerm>
</role>
 <role>
  <roleTerm type="text" authority="marcrelator">distributor</roleTerm>
  <roleTerm type="code" authority="marcrelator">dst</roleTerm>
</role>
</name>
<name type="corporate">
 <namePart>United States</namePart>
 <namePart>United States District Court Eastern District of California</namePart>
 <role>
  <roleTerm type="text" authority="marcrelator">author</roleTerm>
  <roleTerm type="code" authority="marcrelator">aut</roleTerm>
</role>
 <description>Government Organization</description>
</name>
<typeOfResource>text</typeOfResource>
<genre authority="marcgt">government publication</genre>
<language>
 <languageTerm authority="iso639-2b" type="code">eng</languageTerm>
</language>
<extension>
 <collectionCode>USCOURTS</collectionCode>
 <category>Judicial Publications</category>
 <branch>judicial</branch>
 <dateIngested>2015-03-17</dateIngested>
</extension>
<originInfo>
 <publisher>Administrative Office of the United States Courts</publisher>
 <dateIssued encoding="w3cdtf">2015-03-16</dateIssued>
 <issuance>monographic</issuance>
</originInfo>
<physicalDescription>
 <note type="source content type">deposited</note>
 <digitalOrigin>born digital</digitalOrigin>
</physicalDescription>
<classification authority="sudocs">JU 4.15</classification>
<identifier type="uri">http://www.gpo.gov/fdsys/pkg/USCOURTS-caed-1_13-cv-01652</identifier>
<identifier type="local">P0b002ee18bb56d18</identifier>
<recordInfo>
 <recordContentSource authority="marcorg">DGPO</recordContentSource>
 <recordCreationDate encoding="w3cdtf">2015-03-17</recordCreationDate>
 <recordChangeDate encoding="w3cdtf">2015-03-17</recordChangeDate>
 <recordIdentifier source="DGPO">USCOURTS-caed-1_13-cv-01652</recordIdentifier>
 <recordOrigin>machine generated</recordOrigin>
 <languageOfCataloging>
  <languageTerm authority="iso639-2b" type="code">eng</languageTerm>
</languageOfCataloging>
</recordInfo>
<accessCondition type="GPO scope determination">fdlp</accessCondition>
<extension>
 <docClass>USCOURTS</docClass>
 <accessId>USCOURTS-caed-1_13-cv-01652</accessId>
 <courtType>District</courtType>
 <courtCode>caed</courtCode>
 <courtCircuit>9th</courtCircuit>
 <courtState>California</courtState>
 <courtSortOrder>2061</courtSortOrder>
 <caseNumber>1:13-cv-01652</caseNumber>
 <caseOffice>Fresno</caseOffice>
 <caseType>civil</caseType>
 <natureSuitCode>864</natureSuitCode>
 <natureSuit>Social Security - SSID Title XVI</natureSuit>
 <cause>42:205 Denial Social Security Benefits</cause>
 <party fullName="Commissioner of Social Security" lastName="Commissioner of Social Security" role="Defendant"></party>
 <party firstName="Allen" fullName="Allen Lee Swetalla" lastName="Swetalla" middleName="Lee" role="Plaintiff"></party>
</extension>
<titleInfo>
 <title>(SS) Swetalla v. Commissioner of Social Security</title>
 <partNumber>1:13-cv-01652</partNumber>
</titleInfo>
<location>
 <url access="object in context" displayLabel="Content Detail">http://www.gpo.gov/fdsys/pkg/USCOURTS-caed-1_13-cv-01652/content-detail.html</url>
</location>
<classification authority="sudocs">JU 4.15</classification>
<identifier type="preferred citation">1:13-cv-01652;13-1652</identifier>
<name type="corporate">
 <namePart>United States District Court Eastern District of California</namePart>
 <namePart>9th Circuit</namePart>
 <namePart>Fresno</namePart>
 <affiliation>U.S. Courts</affiliation>
 <role>
  <roleTerm authority="marcrelator" type="text">author</roleTerm>
  <roleTerm authority="marcrelator" type="code">aut</roleTerm>
</role>
</name>
<name type="personal">
 <displayForm>Commissioner of Social Security</displayForm>
 <namePart type="family">Commissioner of Social Security</namePart>
 <namePart type="given"></namePart>
 <namePart type="termsOfAddress"></namePart>
 <description>Defendant</description>
</name>
<name type="personal">
 <displayForm>Allen Lee Swetalla</displayForm>
 <namePart type="family">Swetalla</namePart>
 <namePart type="given">Allen</namePart>
 <namePart type="termsOfAddress"></namePart>
 <description>Plaintiff</description>
</name>
<extension>
 <docClass>USCOURTS</docClass>
 <accessId>USCOURTS-caed-1_13-cv-01652</accessId>
 <courtType>District</courtType>
 <courtCode>caed</courtCode>
 <courtCircuit>9th</courtCircuit>
 <courtState>California</courtState>
 <courtSortOrder>2061</courtSortOrder>
 <caseNumber>1:13-cv-01652</caseNumber>
 <caseOffice>Fresno</caseOffice>
 <caseType>civil</caseType>
 <natureSuitCode>864</natureSuitCode>
 <natureSuit>Social Security - SSID Title XVI</natureSuit>
 <cause>42:205 Denial Social Security Benefits</cause>
 <party fullName="Commissioner of Social Security" lastName="Commissioner of Social Security" role="Defendant"></party>
 <party firstName="Allen" fullName="Allen Lee Swetalla" lastName="Swetalla" middleName="Lee" role="Plaintiff"></party>
 <state>California</state>
</extension>
<relatedItem type="constituent" ID="id-USCOURTS-caed-1_13-cv-01652-0" xlink:href="http://www.gpo.gov/fdsys/granule/USCOURTS-caed-1_13-cv-01652/USCOURTS-caed-1_13-cv-01652-0/mods.xml">
 <titleInfo>
  <title>(SS) Swetalla v. Commissioner of Social Security</title>
  <subTitle>ORDER GRANTING Plaintiff's 2 Application to Proceed In Forma Pauperis signed by Magistrate Judge Sheila K. Oberto on 10/16/2013. (Sant Agata, S)</subTitle>
  <partNumber>0</partNumber>
</titleInfo>
 <originInfo>
  <dateIssued>2013-10-16</dateIssued>
</originInfo>
 <relatedItem type="otherFormat" xlink:href="http://www.gpo.gov/fdsys/pkg/USCOURTS-caed-1_13-cv-01652/pdf/USCOURTS-caed-1_13-cv-01652-0.pdf">
  <identifier type="FDsys Unique ID">D09002ee18bb5e3b4</identifier>
</relatedItem>
 <identifier type="uri">http://www.gpo.gov/fdsys/granule/USCOURTS-caed-1_13-cv-01652/USCOURTS-caed-1_13-cv-01652-0</identifier>
 <identifier type="former granule identifier">caed-1_13-cv-01652_0.pdf</identifier>
 <location>
  <url access="object in context" displayLabel="Content Detail">http://www.gpo.gov/fdsys/granule/USCOURTS-caed-1_13-cv-01652/USCOURTS-caed-1_13-cv-01652-0/content-detail.html</url>
  <url access="raw object" displayLabel="PDF rendition">http://www.gpo.gov/fdsys/pkg/USCOURTS-caed-1_13-cv-01652/pdf/USCOURTS-caed-1_13-cv-01652-0.pdf</url>
</location>
 <extension>
  <searchTitle>USCOURTS 1:13-cv-01652; (SS) Swetalla v. Commissioner of Social Security; </searchTitle>
  <courtName>United States District Court Eastern District of California</courtName>
  <state>California</state>
  <accessId>USCOURTS-caed-1_13-cv-01652-0</accessId>
  <sequenceNumber>0</sequenceNumber>
  <dateIssued>2013-10-16</dateIssued>
  <docketText>ORDER GRANTING Plaintiff's 2 Application to Proceed In Forma Pauperis signed by Magistrate Judge Sheila K. Oberto on 10/16/2013. (Sant Agata, S)</docketText>
</extension>
</relatedItem>
<relatedItem type="constituent" ID="id-USCOURTS-caed-1_13-cv-01652-1" xlink:href="http://www.gpo.gov/fdsys/granule/USCOURTS-caed-1_13-cv-01652/USCOURTS-caed-1_13-cv-01652-1/mods.xml">
 <titleInfo>
  <title>(SS) Swetalla v. Commissioner of Social Security</title>
  <subTitle>ORDER EXTENDING Briefing Schedule. Plaintiff's opening brief shall be filed no later than June 27, 2014; any opposition brief shall be filed no later than July 30, 2014; and Plaintiff may file an optional reply brief on or before August 18, 2014. Order signed by Magistrate Judge Sheila K. Oberto on 6/17/2014. (Timken, A)</subTitle>
  <partNumber>1</partNumber>
</titleInfo>
 <originInfo>
  <dateIssued>2014-06-17</dateIssued>
</originInfo>
 <relatedItem type="otherFormat" xlink:href="http://www.gpo.gov/fdsys/pkg/USCOURTS-caed-1_13-cv-01652/pdf/USCOURTS-caed-1_13-cv-01652-1.pdf">
  <identifier type="FDsys Unique ID">D09002ee18bb5e3b6</identifier>
</relatedItem>
 <identifier type="uri">http://www.gpo.gov/fdsys/granule/USCOURTS-caed-1_13-cv-01652/USCOURTS-caed-1_13-cv-01652-1</identifier>
 <identifier type="former granule identifier">caed-1_13-cv-01652_1.pdf</identifier>
 <location>
  <url access="object in context" displayLabel="Content Detail">http://www.gpo.gov/fdsys/granule/USCOURTS-caed-1_13-cv-01652/USCOURTS-caed-1_13-cv-01652-1/content-detail.html</url>
  <url access="raw object" displayLabel="PDF rendition">http://www.gpo.gov/fdsys/pkg/USCOURTS-caed-1_13-cv-01652/pdf/USCOURTS-caed-1_13-cv-01652-1.pdf</url>
</location>
 <extension>
  <searchTitle>USCOURTS 1:13-cv-01652; (SS) Swetalla v. Commissioner of Social Security; </searchTitle>
  <courtName>United States District Court Eastern District of California</courtName>
  <state>California</state>
  <accessId>USCOURTS-caed-1_13-cv-01652-1</accessId>
  <sequenceNumber>1</sequenceNumber>
  <dateIssued>2014-06-17</dateIssued>
  <docketText>ORDER EXTENDING Briefing Schedule. Plaintiff's opening brief shall be filed no later than June 27, 2014; any opposition brief shall be filed no later than July 30, 2014; and Plaintiff may file an optional reply brief on or before August 18, 2014. Order signed by Magistrate Judge Sheila K. Oberto on 6/17/2014. (Timken, A)</docketText>
</extension>
</relatedItem>
<relatedItem type="constituent" ID="id-USCOURTS-caed-1_13-cv-01652-2" xlink:href="http://www.gpo.gov/fdsys/granule/USCOURTS-caed-1_13-cv-01652/USCOURTS-caed-1_13-cv-01652-2/mods.xml">
 <titleInfo>
  <title>(SS) Swetalla v. Commissioner of Social Security</title>
  <subTitle>Order extending briefing schedule, signed by Magistrate Judge Sheila K. Oberto on 07/01/2014. (Opening Brief due by 7/25/2014; Responsive Brief due by 8/28/2014; Optional Reply Brief due by 9/15/2014) (Figueroa, O)</subTitle>
  <partNumber>2</partNumber>
</titleInfo>
 <originInfo>
  <dateIssued>2014-07-02</dateIssued>
</originInfo>
 <relatedItem type="otherFormat" xlink:href="http://www.gpo.gov/fdsys/pkg/USCOURTS-caed-1_13-cv-01652/pdf/USCOURTS-caed-1_13-cv-01652-2.pdf">
  <identifier type="FDsys Unique ID">D09002ee18bb5e3ac</identifier>
</relatedItem>
 <identifier type="uri">http://www.gpo.gov/fdsys/granule/USCOURTS-caed-1_13-cv-01652/USCOURTS-caed-1_13-cv-01652-2</identifier>
 <identifier type="former granule identifier">caed-1_13-cv-01652_2.pdf</identifier>
 <location>
  <url access="object in context" displayLabel="Content Detail">http://www.gpo.gov/fdsys/granule/USCOURTS-caed-1_13-cv-01652/USCOURTS-caed-1_13-cv-01652-2/content-detail.html</url>
  <url access="raw object" displayLabel="PDF rendition">http://www.gpo.gov/fdsys/pkg/USCOURTS-caed-1_13-cv-01652/pdf/USCOURTS-caed-1_13-cv-01652-2.pdf</url>
</location>
 <extension>
  <searchTitle>USCOURTS 1:13-cv-01652; (SS) Swetalla v. Commissioner of Social Security; </searchTitle>
  <courtName>United States District Court Eastern District of California</courtName>
  <state>California</state>
  <accessId>USCOURTS-caed-1_13-cv-01652-2</accessId>
  <sequenceNumber>2</sequenceNumber>
  <dateIssued>2014-07-02</dateIssued>
  <docketText>Order extending briefing schedule, signed by Magistrate Judge Sheila K. Oberto on 07/01/2014. (Opening Brief due by 7/25/2014; Responsive Brief due by 8/28/2014; Optional Reply Brief due by 9/15/2014) (Figueroa, O)</docketText>
</extension>
</relatedItem>
<relatedItem type="constituent" ID="id-USCOURTS-caed-1_13-cv-01652-3" xlink:href="http://www.gpo.gov/fdsys/granule/USCOURTS-caed-1_13-cv-01652/USCOURTS-caed-1_13-cv-01652-3/mods.xml">
 <titleInfo>
  <title>(SS) Swetalla v. Commissioner of Social Security</title>
  <subTitle>ORDER REVERSING ALJ's DECISION and REMANDING CASE signed by Magistrate Judge Sheila K. Oberto on 1/5/2015. CASE CLOSED. (Jessen, A)</subTitle>
  <partNumber>3</partNumber>
</titleInfo>
 <originInfo>
  <dateIssued>2015-01-06</dateIssued>
</originInfo>
 <relatedItem type="otherFormat" xlink:href="http://www.gpo.gov/fdsys/pkg/USCOURTS-caed-1_13-cv-01652/pdf/USCOURTS-caed-1_13-cv-01652-3.pdf">
  <identifier type="FDsys Unique ID">D09002ee18bb5e3b5</identifier>
</relatedItem>
 <identifier type="uri">http://www.gpo.gov/fdsys/granule/USCOURTS-caed-1_13-cv-01652/USCOURTS-caed-1_13-cv-01652-3</identifier>
 <identifier type="former granule identifier">caed-1_13-cv-01652_3.pdf</identifier>
 <location>
  <url access="object in context" displayLabel="Content Detail">http://www.gpo.gov/fdsys/granule/USCOURTS-caed-1_13-cv-01652/USCOURTS-caed-1_13-cv-01652-3/content-detail.html</url>
  <url access="raw object" displayLabel="PDF rendition">http://www.gpo.gov/fdsys/pkg/USCOURTS-caed-1_13-cv-01652/pdf/USCOURTS-caed-1_13-cv-01652-3.pdf</url>
</location>
 <extension>
  <searchTitle>USCOURTS 1:13-cv-01652; (SS) Swetalla v. Commissioner of Social Security; </searchTitle>
  <courtName>United States District Court Eastern District of California</courtName>
  <state>California</state>
  <accessId>USCOURTS-caed-1_13-cv-01652-3</accessId>
  <sequenceNumber>3</sequenceNumber>
  <dateIssued>2015-01-06</dateIssued>
  <docketText>ORDER REVERSING ALJ's DECISION and REMANDING CASE signed by Magistrate Judge Sheila K. Oberto on 1/5/2015. CASE CLOSED. (Jessen, A)</docketText>
</extension>
</relatedItem>
<relatedItem type="constituent" ID="id-USCOURTS-caed-1_13-cv-01652-4" xlink:href="http://www.gpo.gov/fdsys/granule/USCOURTS-caed-1_13-cv-01652/USCOURTS-caed-1_13-cv-01652-4/mods.xml">
 <titleInfo>
  <title>(SS) Swetalla v. Commissioner of Social Security</title>
  <subTitle>Order awarding Equal Access to Justice Act Attorney Fees and Expenses pursuant to 28 U.S.C. § 2412 (d) and costs pursuant to 28 U.S.C. § 1920, signed by Magistrate Judge Sheila K. Oberto on 3/16/2015. (Rosales, O)</subTitle>
  <partNumber>4</partNumber>
</titleInfo>
 <originInfo>
  <dateIssued>2015-03-16</dateIssued>
</originInfo>
 <relatedItem type="otherFormat" xlink:href="http://www.gpo.gov/fdsys/pkg/USCOURTS-caed-1_13-cv-01652/pdf/USCOURTS-caed-1_13-cv-01652-4.pdf">
  <identifier type="FDsys Unique ID">D09002ee18bb5e3b7</identifier>
</relatedItem>
 <identifier type="uri">http://www.gpo.gov/fdsys/granule/USCOURTS-caed-1_13-cv-01652/USCOURTS-caed-1_13-cv-01652-4</identifier>
 <identifier type="former granule identifier">caed-1_13-cv-01652_4.pdf</identifier>
 <location>
  <url access="object in context" displayLabel="Content Detail">http://www.gpo.gov/fdsys/granule/USCOURTS-caed-1_13-cv-01652/USCOURTS-caed-1_13-cv-01652-4/content-detail.html</url>
  <url access="raw object" displayLabel="PDF rendition">http://www.gpo.gov/fdsys/pkg/USCOURTS-caed-1_13-cv-01652/pdf/USCOURTS-caed-1_13-cv-01652-4.pdf</url>
</location>
 <extension>
  <searchTitle>USCOURTS 1:13-cv-01652; (SS) Swetalla v. Commissioner of Social Security; </searchTitle>
  <courtName>United States District Court Eastern District of California</courtName>
  <state>California</state>
  <accessId>USCOURTS-caed-1_13-cv-01652-4</accessId>
  <sequenceNumber>4</sequenceNumber>
  <dateIssued>2015-03-16</dateIssued>
  <docketText>Order awarding Equal Access to Justice Act Attorney Fees and Expenses pursuant to 28 U.S.C. § 2412 (d) and costs pursuant to 28 U.S.C. § 1920, signed by Magistrate Judge Sheila K. Oberto on 3/16/2015. (Rosales, O)</docketText>
</extension>
</relatedItem>
</mods>


text:
package org.sakaiproject.evaluation.logic;

import java.util.List;

import org.sakaiproject.evaluation.constant.EvalConstants;
import org.sakaiproject.evaluation.logic.externals.ExternalContent;
import org.sakaiproject.evaluation.logic.externals.ExternalEntities;
import org.sakaiproject.evaluation.logic.externals.ExternalEvalGroups;
import org.sakaiproject.evaluation.logic.externals.ExternalScheduler;
import org.sakaiproject.evaluation.logic.externals.ExternalSecurity;
import org.sakaiproject.evaluation.logic.externals.ExternalTextUtils;
import org.sakaiproject.evaluation.logic.externals.ExternalUsers;
import org.sakaiproject.evaluation.logic.model.EvalHierarchyNode;
import org.sakaiproject.evaluation.logic.model.EvalUser;
import org.sakaiproject.evaluation.model.EvalAdhocGroup;
import org.sakaiproject.evaluation.model.EvalAdhocUser;
import org.sakaiproject.evaluation.model.EvalAdmin;
import org.sakaiproject.evaluation.providers.EvalGroupsProvider;
import org.sakaiproject.evaluation.model.EvalAssignGroup;

/**
 * Handles all basic internal operations for the evaluation system,
 * includes user information, group/course/site information, and security checks

 * Note: Meant to be used internally in the evaluation system app only, please
 * do not call these methods outside the evaluation tool or logic layer
 *
 * @author Aaron Zeckoski (aaronz@vt.edu)
 */
public interface EvalCommonLogic extends ExternalUsers, ExternalEvalGroups, ExternalEntities,
    ExternalSecurity, ExternalContent, ExternalScheduler, ExternalTextUtils {

    // Users

    /**
     * Get a populated user object for the given userId,
     * will not return null, always returns an object though it may be marked as invalid
     *
     * @param userId the internal user id (not username)
     * @return a populated {@link EvalUser} object (may be marked as invalid)
     */
    public EvalUser getEvalUserById(String userId);

    /**
     * Get user object populated with data based on the input email,
     * will not return null, always returns an object though it may be marked as invalid,
     * guarantees to return one {@link EvalUser} object only
     *
     * @param email the email address for a user
     * @return a populated {@link EvalUser} object (may be marked as invalid)
     */
    public EvalUser getEvalUserByEmail(String email);

    /**
     * Get user objects populated with data based on the input set of userIds,
     * guarantees to return one {@link EvalUser} object per input id and in the
     * same order as the inputs,

     * Note that some users may be marked as invalid users

     * multiple inputs version of {@link #getEvalUserById(String)}
     *
     * @param userIds an array of the internal user ids (not usernames) for users
     * @return a list of {@link EvalUser} objects which match with the input userIds and are in the same order
     */
    public List<EvalUser> getEvalUsersByIds(List<String> userIds);

    // GROUPS

    /**
     * Get the title associated with an evalGroup
     *
     * @param evalGroupId the internal unique ID for an evalGroup
     * @return the displayable title or default text "--------" if it cannot be found
     */
    public String getDisplayTitle(String evalGroupId);

    // EMAIL

    /**
     * Send emails to a set of users (can send to a single user
     * by specifying an array with one item only), gets the email addresses
     * for the users ids
     *
     * @param from the email address this email appears to come from
     * @param toUserIds the userIds this message should be sent to
     * @param subject the message subject
     * @param message the message to send
     * @param deferExceptions if true, then exceptions are logged and then thrown after sending as many emails as possible,
     * if false then exceptions are thrown immediately
     * @param deliveryOption a delivery option constant from the eval constants,
     * determines what to do with the emails, null is the default: {@link EvalConstants#EMAIL_DELIVERY_SEND}
     * @return an array of email addresses that this message was sent to
     */
    public String[] sendEmailsToUsers(String from, String[] toUserIds, String subject, String message, boolean deferExceptions, String deliveryOption);

    /**
     * Send emails to a set of email addresses (can send to a single address
     * by specifying an array with one item only)
     * NOTE: Use {@link #sendEmailsToUsers(String, String[], String, String, boolean)} if you know who the users are
     *
     * @param from the email address this email appears to come from
     * @param to the email address(es) this message should be sent to
     * @param subject the message subject
     * @param message the message to send
     * @param deferExceptions if true, then exceptions are logged and then thrown after sending as many emails as possible,
     * if false then exceptions are thrown immediately
     * @param deliveryOption a delivery option constant from the eval constants,
     * determines what to do with the emails, null is the default: {@link EvalConstants#EMAIL_DELIVERY_SEND}
     * @return an array of email addresses that this message was sent to
     * @throws IllegalArgumentException if necessary params are not included
     */
    public String[] sendEmailsToAddresses(String from, String[] to, String subject, String message, boolean deferExceptions, String deliveryOption);

    // SERVER

    /**
     * @param settingName the name of the setting to retrieve,
     * Can be a string name: e.g. auto.ddl, etc. or one of the special SETTING_* constants in this file
     *
     * @param defaultValue a specified default value to return if this setting cannot be found,
     * NOTE: You can set the default value to null but you must specify the class in parens
     * @return the value of the configuration setting or the default value if none can be found
     */
    public <T> T getConfigurationSetting(String settingName, T defaultValue);

    // ADHOC methods

    /**
     * Get the adhoc group by the unique id (not the evalGroupId)
     *
     * @param adhocGroupId the unique id for an {@link EvalAdhocGroup}
     * @return the adhoc group or null if not found
     */
    public EvalAdhocGroup getAdhocGroupById(Long adhocGroupId);

    /**
     * Delete the adhoc group by the unique id,
     * will not fail if the group cannot be found
     *
     * @param adhocGroupId the unique id for an {@link EvalAdhocGroup}
     */
    public void deleteAdhocGroup(Long adhocGroupId);

    /**
     * Save this adhoc user,
     * owner and email must be set

     * This will check to see if this user already exists and will update the existing one
     * rather than saving more copies of the same user

     * Permissions checks will be done based on the current user,
     * only the owner or an admin can modify an adhoc user,
     * anonymous users cannot create adhoc users
     *
     * @param user
     */
    public void saveAdhocUser(EvalAdhocUser user);

    /**
     * Save this adhoc group,
     * owner and title must be set

     * Permissions checks will be done based on the current user,
     * only the owner or an admin can modify an adhoc group,
     * anonymous users cannot create adhoc groups
     *
     * @param group
     */
    public void saveAdhocGroup(EvalAdhocGroup group);

    /**
     * Get the list of adhoc groups for the user that created them,
     * ordered by title
     *
     * @param userId internal user id (not username)
     * @return the list of all adhoc groups that this user owns
     */
    public List<EvalAdhocGroup> getAdhocGroupsForOwner(String userId);

    /**
     * Check if this user has admin access in the evaluation system (whether
     * as a sakai admin or an eval admin).
     *
     * @param userId the internal user id (not username)
     * @return true if the user has admin access, false otherwise
     */
    public boolean isUserAdmin(String userId);

    /**
     * Gets the list of all eval admins.
     *
     * @return a list of EvalAdmin objects
     */
    public List<EvalAdmin> getEvalAdmins();

    /**
     * Gets the EvalAdmin object representing the user with the specified user id.
     * Returns null if no user was found.
     *
     * @param userId internal user id (not username)
     * @return an EvalAdmin object or null if not found
     */
	public EvalAdmin getEvalAdmin(String userId);

	/**
	 * calculateViewability() takes a state and determines if the state
	 * should be viewable, based on system settings
	 *
EvalSettings.VIEW_SURVEY_RESULTS_IGNORE, if set, will promote some
	 * states to EvalConstants.EVALUATION_STATE_VIEWABLE
	 * @param state one of the states listed in EvalConstants, such as EVALUATION_STATE_ACTIVE
	 * @return the original state or EVALUATION_STATE_VIEWABLE if the view can be promoted
	 */
	public String calculateViewability(String state);

	/**
	 * Assigns a user as an eval admin.
	 *
	 * @param userId internal user id (not username)
	 * @param assignorUserId internal user id (not username) of the assignor (most likely the current user)
	 */
	public void assignEvalAdmin(String userId, String assignorUserId);

	/**
	 * Removes a user from the list of eval admins.
	 *
	 * @param userId internal user id (not username)
	 */
	public void unassignEvalAdmin(String userId);

	/**
	 * Checks if this user has eval admin rights in the evaluation system.
	 *
	 * @param userId internal user id (not username)
	 * @return true if the user is an eval admin, false otherwise
	 */
	public boolean isUserEvalAdmin(String userId);

    /**
     * Get a list of evaluation groups that contain the search term.
     * SUPPORTED: Search assign groups of type Sakai Site
     *

     * NOT YET SUPPORTED: This will search all supported group types by attribute:
     *

{@link EvalAdhocGroup#getTitle()}

     *
{@link EvalAssignGroup} searched by corresponding title (eg: sakai site title)

     *
{@link EvalHierarchyNode#title}

     *
     * @param searchString Text to match. If empty no results are sent back
     * @param order Field to order the groups
     * @param startResult Results set will start at this minimum count
     * @param maxResults Results set will end at this limit count
     *
     * @return An ordered list of eval group ids
     */
    public List<String> searchForEvalGroupIds(String searchString, String order, int startResult, int maxResults);

    // PROVIDERS

    /**
     * The provider will auto-register if it can, but this will allow it to also be registered
     * or unregistered manually, calling this will override any previously registered eval groups provider
     * and calling it with a null will clear the currently registered provider
     *
     * @param provider the EGP to register for the system to use,
     * if NULL then unregister the provider
     */
    public void registerEvalGroupsProvider(EvalGroupsProvider provider);

    /**
     * Check if this user has readonly admin access in the evaluation system
     *
     * @param userId the internal user id (not username)
     * @return true if the user has readonly admin access, false otherwise
     */
    public boolean isUserReadonlyAdmin(String userId);
}

redpajama_set_name: RedPajamaGithub


text:
namespace Avalonia.Media.Immutable
{
    /// <summary>
    /// An immutable representation of a <see cref="TextDecoration"/>.
    /// </summary>
    public class ImmutableTextDecoration
    {
        public ImmutableTextDecoration(TextDecorationLocation location, ImmutablePen pen,
            TextDecorationUnit penThicknessUnit,
            double penOffset, TextDecorationUnit penOffsetUnit)
        {
            Location = location;
            Pen = pen;
            PenThicknessUnit = penThicknessUnit;
            PenOffset = penOffset;
            PenOffsetUnit = penOffsetUnit;
        }

        /// <summary>
        /// Gets or sets the location.
        /// </summary>
        /// <value>
        /// The location.
        /// </value>
        public TextDecorationLocation Location { get; }

        /// <summary>
        /// Gets or sets the pen.
        /// </summary>
        /// <value>
        /// The pen.
        /// </value>
        public ImmutablePen Pen { get; }

        /// <summary>
        /// Gets the units in which the Thickness of the text decoration's <see cref="Pen"/> is expressed.
        /// </summary>
        public TextDecorationUnit PenThicknessUnit { get; }

        /// <summary>
        /// Gets or sets the pen offset.
        /// </summary>
        /// <value>
        /// The pen offset.
        /// </value>
        public double PenOffset { get; }

        /// <summary>
        /// Gets the units in which the <see cref="PenOffset"/> value is expressed.
        /// </summary>
        public TextDecorationUnit PenOffsetUnit { get; }
    }
}


text:
#import <Foundation/Foundation.h>

@protocol SinaWeiboAuthorizeViewDelegate;

@interface SinaWeiboAuthorizeView : UIView <UIWebViewDelegate>
{
    UIWebView *webView;
    UIButton *closeButton;
    UIView *modalBackgroundView;
    UIActivityIndicatorView *indicatorView;
    UIInterfaceOrientation previousOrientation;

    id<SinaWeiboAuthorizeViewDelegate> delegate;

    NSString *appRedirectURI;
    NSDictionary *authParams;
}

@property (nonatomic, assign) id<SinaWeiboAuthorizeViewDelegate> delegate;

- (id)initWithAuthParams:(NSDictionary *)params
                delegate:(id<SinaWeiboAuthorizeViewDelegate>)delegate;

- (void)show;
- (void)hide;

@end

@protocol SinaWeiboAuthorizeViewDelegate <NSObject>

- (void)authorizeView:(SinaWeiboAuthorizeView *)authView
        didRecieveAuthorizationCode:(NSString *)code;
- (void)authorizeView:(SinaWeiboAuthorizeView *)authView
        didFailWithErrorInfo:(NSDictionary *)errorInfo;
- (void)authorizeViewDidCancel:(SinaWeiboAuthorizeView *)authView;

@end


text:
Is your iPhoto library using too much space?

This `iphoto-relocate.py` script relocates the photos and videos from
your iPhoto library to an external drive (e.g., a NAS drive).

To ensure that iPhoto works 100% correctly, the iPhoto library itself
(incl. various DBs, the thumbnail files, etc.) stays where it is --
only the 'masters' are relocated. Each original file in the iPhoto
library is replaced by a symbolic link that points to the new file
location on the external drive.

So the script simulates a missing "relocate masters" or "relocate
originals" functionality for iPhoto.

After running the script, iPhoto will work just as before. When you
click on a photo, iPhoto will follow the symbolic link and display the
photo. You can still quickly flip through your large collection of
photos, unless you have a very slow connection to your external drive
(all USB drives and most NAS drives should be fine).

Note that the alternative, simpler method of just copying the whole
iPhoto library to a NAS drive is not recommended and may result in
data loss. See a discussion
[here](https://discussions.apple.com/thread/54372780).

## Usage

Usage example:

    ./iphoto-relocate.py "/Users/markus/Pictures/iPhoto Library" "/Volumes/external-drive"

This creates a `Masters` directory on the external drive (the
`/Volumes/external-drive` directory), which contains all 'master'
image and video files from the iPhoto library. The `Masters` directory
in the iPhoto library `/Users/markus/Pictures/iPhoto Library` is
changed to contain symbolic links only.

As a precaution, you should make a backup of your iPhoto library
before running the script.

See also:

    ./iphoto-relocate.py --help

When you run the script for the first time, it will move all originals
over to the external drive, which can take many hours.  It is
recommended to connect your external drive directly to the computer
(e.g., via Thunderbolt or USB) the first time you run the script (as
opposed to a slower wireless connection).

On subsequent calls, the script will only copy new files over, so it
will run much faster than the first time and does not need a direct
connection to the external drive.

You can, for example, run the script every month to move your latest
photos over to the external drive. It will recognize which files are
already symbolic links and which files are new and need to be moved to
the external drive.

## Deleting photos in iPhoto

After you run the script, all masters will be on the external drive;
iPhoto will only see symbolic links in its local iPhoto
library. Consequently, when you delete a photo in iPhoto, it will only
delete the link, but not the original photo on the external drive.

The following procedure is recommended: Whenever you get a new batch
of photos from your camera, they will be in your local iPhoto library
as usual. Go through them and delete some photos. Then run the script
to move all remaining photos to the external drive.

## Installation

You can run the script from the command line on your Mac (e.g.,
`iTerm`), provided you have Python installed.

Currently, no GUI is provided.

## Contributors

Markus Dreyer, markus.dreyer@gmail.com

## License

Copyright 2014 Markus Dreyer

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.


text:
	#pragma import on
#endif

PP_Begin_Namespace_PowerPlant

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

namespace UClassicDialogs {

	#include <UStandardDialogs.i>

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

	class	LFileChooser {
		public:
			#include <LFileChooser.i>

		protected:
			StandardFileReply			mSFReply;
			mutable StAEDescriptor		mFileDescList;
			NavObjectFilterProcPtr		mNavFilterProc;
			FSSpec						mDefaultLocation;
			bool						mSelectDefault;

			static NavObjectFilterProcPtr	sFilterProc;
			static bool						sChoosingFolder;
			static bool						sChoosingVolume;

			static pascal Boolean	FileFilter_NavServicesAPI(
										CInfoPBPtr		inPB,
										void*			ioDataPtr);
	};

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

	class	LFileDesignator {
		public:
			#include <LFileDesignator.i>

		protected:
			StandardFileReply			mSFReply;
			mutable StAEDescriptor		mFileDescList;
			FSSpec						mDefaultLocation;
			bool						mSelectDefault;
	};

	// -----------------------------------------------------------------------
	//	User data for StandaraFile callback functions

	struct	SHookUserData {
		StandardFileReply*		reply;
		FSSpec*					defaultSpec;
		bool					selectDefault;
	};

	// -----------------------------------------------------------------------
	//	Callback functions for selecting a Directory

	pascal Boolean	FileFilter_Directories(
							CInfoPBPtr		inPB,
							void*			ioDataPtr);

	pascal short	DialogHook_SelectDirectory(
							short			inItem,
							DialogPtr		inDialog,
							void*			ioDataPtr);

	void			SetSelectButtonTitle(
							ControlHandle	inButtonH,
							const Rect&		inButtonRect,
							ConstStringPtr	inDirName);

	bool			GetNewFolderName(
							Str255			outFolderName);

	pascal Boolean	EventFilter_NewFolder(
							DialogPtr			inDialog,
							EventRecord*		inMacEvent,
							DialogItemIndex*	outItemHit);

	// -----------------------------------------------------------------------
	//	Callback functions for selecting a Volume

	pascal Boolean	FileFilter_Volumes(
							CInfoPBPtr		inPB,
							void*			ioDataPtr);

	pascal short	DialogHook_SelectVolume(
							short			inItem,
							DialogPtr		inDialog,
							void*			ioDataPtr);

	// -----------------------------------------------------------------------
	//	Callback function for setting the initial location

	pascal short	DialogHook_DefaultLocation(
							short			inItem,
							DialogPtr		inDialog,
							void*			ioDataPtr);
}

PP_End_Namespace_PowerPlant

#if PP_Uses_Pragma_Import
	#pragma import reset
#endif

#endif


text:
package com.coreoz.plume.admin.services.configuration;

import javax.inject.Inject;
import javax.inject.Singleton;

import com.typesafe.config.Config;
import com.typesafe.config.ConfigFactory;

@Singleton
public class AdminSecurityConfigurationService {

	private final Config config;

	@Inject
	public AdminSecurityConfigurationService(Config config) {
		// the reference file is not located in src/main/resources/ to ensure
		// that it is not overridden by another config file when a "fat jar" is created.
		this.config = config.withFallback(
			ConfigFactory.parseResources(AdminSecurityConfigurationService.class, "reference.conf")
		);
	}

	public String jwtSecret() {
		return config.getString("admin.jwt-secret");
	}

	public boolean sessionUseFingerprintCookie() {
		return config.getBoolean("admin.session.use-fingerprint-cookie");
	}

	public boolean sessionFingerprintCookieHttpsOnly() {
		return config.getBoolean("admin.session.fingerprint-cookie-https-only");
	}

}


text:
using namespace std;

int main() {
  ios::sync_with_stdio(false);
  while (1) {
    int duration, depreciation_count;
    double down_payment, amount;
    cin >> duration >> down_payment >> amount >> depreciation_count;
    if (duration < 0) {
      break;
    }
    double value[duration + 2]; // value at the beginning of ith month
    value[0] = down_payment + amount;
    int month = 0;
    double depreciation = 1.0;
    while (depreciation_count--) {
      int depreciation_month;
      double depreciation_value;
      cin >> depreciation_month >> depreciation_value;
      for (; month < depreciation_month; month++) {
        value[month + 1] = value[month] * depreciation;
      }
      depreciation = 1.0 - depreciation_value;
    }
    for (; month <= duration; month++) {
      value[month + 1] = value[month] * depreciation;
    }
    double payment = amount / duration;
    for (int i = 0; i <= duration; i++) {
      if (amount <= value[i + 1]) {
        cout << i << (i == 1 ? " month" : " months") << endl;
        break;
      }
      amount -= payment;
    }
  }
  return 0;
}


text:
package com.adobe.epubcheck.messages;

import com.google.common.base.Charsets;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.URL;
import java.net.URLConnection;
import java.util.EnumMap;
import java.util.HashMap;
import java.util.Locale;
import java.util.Map;
import java.util.PropertyResourceBundle;
import java.util.ResourceBundle;

/**
 * Manages storage, caching and retrieval of default localized messages.
 */
public class LocalizedMessages
{

  private final Locale locale;
  private final ResourceBundle bundle;
  // Collection (static) will contain one LocalizedMessages instance for each
  // Locale that has been requested.
  private static final Map<String, LocalizedMessages> localizedMessages = new HashMap<String, LocalizedMessages>();
  // Messages are lazily instantiated and cached as they are requested.
  private final Map<MessageId, Message> cachedMessages = new EnumMap<MessageId, Message>(MessageId.class);
  private final Severities defaultSeverities = new DefaultSeverities();

  /**
   * Provides messages for the default locale.
   *
   * @return Localized messages.
   */
  public static LocalizedMessages getInstance()
  {
    return getInstance(null);
  }

  /**
   * Provides messages for the given locale.
   *
   * @param locale The locale. If null or unsupported, will use the default
   * locale instead.
   * @return Localized messages.
   */
  public static LocalizedMessages getInstance(Locale locale)
  {
    LocalizedMessages instance = null;

    if (locale == null)
    {
      locale = Locale.getDefault();
    }

    String localeKey = locale.getLanguage();
    if (localizedMessages.containsKey(localeKey))
    {
      instance = localizedMessages.get(localeKey);
    }
    else
    {
      synchronized (LocalizedMessages.class)
      {
        if (instance == null)
        {
          instance = new LocalizedMessages(locale);
          localizedMessages.put(localeKey, instance);
        }
      }
    }

    return instance;
  }

  /**
   * Gets the message for the given id.
   *
   * @param id
   * @return A Message object, using the localized string if necessary.
   */
  public Message getMessage(MessageId id)
  {
    // Performance note: this method uses a lazy initialization pattern. When
    // a MessageId is first requested, we fetch the data from the ResourceBundle
    // and create a new Message object, which is then cached. On the next
    // request, we'll use the cached version instead.
    Message message;
    if (cachedMessages.containsKey(id))
    {
      message = cachedMessages.get(id);
    }
    else
    {
      message = new Message(id, defaultSeverities.get(id), getMessageAsString(id), getSuggestion(id));
      cachedMessages.put(id, message);
    }

    return message;
  }

  /**
   * Typical pattern for instantiation should use the static getInstance() methods
   * to ensure that cached objects are used. If that behavior isn't desired,
   * direct instantiation is also an option using this constructor.
   * @param locale The locale used to localize the messages, or default.
   */
  public LocalizedMessages(Locale locale)
  {
    this.locale = (locale != null) ? locale : Locale.getDefault();
    bundle = ResourceBundle.getBundle(
      "com.adobe.epubcheck.messages.MessageBundle", this.locale, new LocalizedMessages.UTF8Control());
  }

  private String getStringFromBundle(String id)
  {
    String result = "";
    try
    {
      result = bundle.getString(id);
    }
    catch (Exception ignore)
    {
      // Might not exist
    }

    return result;
  }

  private String getMessageAsString(MessageId id)
  {
    return getStringFromBundle(id.name());
  }

  /**
   * Returns the suggestion message for the given message ID.
   * In other words, for a message ID of `XXX_NNN`,
   * returns the bundle message named `XXX_NNN_SUG`.
   *
   * @param id a message ID
   * @return the associated suggestion, or the empty string if there's none.
   */
  public String getSuggestion(MessageId id)
  {
    return getStringFromBundle(id.name() + "_SUG");
  }

  /**
   * Returns the suggestion message for the given message ID and key.
   * In other words, for a message ID of `XXX_NNN`, and a key `key`,
   * returns the bundle message named `XXX_NNN_SUG.key`.
   * If the suggestion key is not found, returns the bundle message
   * named `XXX_NNN_SUG.default`.
   * If this latter is not found, returns the bundle message nameed
   * `XXX_NNN_SUG`.
   *
   * @param id a message ID
   * @param key the key of a specific suggestion string
   * @return the associated suggestion string
   */
  public String getSuggestion(MessageId id, String key)
  {
    String messageKey = id.name() + "_SUG." + key;
    String messageDefaultKey = id.name() + "_SUG.default";
    return bundle.containsKey(messageKey) ? getStringFromBundle(messageKey)
        : (bundle.containsKey(messageDefaultKey) ? getStringFromBundle(messageDefaultKey)
            : getSuggestion(id));
  }

  public static class UTF8Control extends ResourceBundle.Control
  {

    @Override
    public ResourceBundle newBundle(
            String baseName,
            Locale locale,
            String format,
            ClassLoader loader,
            boolean reload) throws IllegalAccessException,
            InstantiationException,
            IOException
    {
      // The below is a copy of the default implementation.
      String bundleName = toBundleName(baseName, locale);
      String resourceName = toResourceName(bundleName, "properties"); //$NON-NLS-1$
      ResourceBundle bundle = null;
      InputStream stream = null;
      if (reload)
      {
        URL url = loader.getResource(resourceName);
        if (url != null)
        {
          URLConnection connection = url.openConnection();
          if (connection != null)
          {
            connection.setUseCaches(false);
            stream = connection.getInputStream();
          }
        }
      } else
      {
        stream = loader.getResourceAsStream(resourceName);
      }
      if (stream != null)
      {
        try
        {
          // Only this line is changed to make it to read properties files as
          // UTF-8.
          bundle = new PropertyResourceBundle(
                  new BufferedReader(new InputStreamReader(stream, Charsets.UTF_8)));
        } finally
        {
          stream.close();
        }
      }
      return bundle;
    }
  }
}


text:
module HawkularMetrics {

  export class MessageCenterController {
    private static MESSAGES_PER_PAGE = 5;
    public storedMessages;
    public visibleMessages;
    public seenMessages;
    constructor(private NotificationsService: INotificationsService) {
      this.storedMessages = this.NotificationsService.storedMessages;
      this.visibleMessages = MessageCenterController.MESSAGES_PER_PAGE;
      this.seenMessages = 0;
    }

    public moreMessages($event): void {
      $event.preventDefault();
      this.visibleMessages += MessageCenterController.MESSAGES_PER_PAGE;
    }

    public removeMessage(index): void {
      this.NotificationsService.storedMessages.splice(index, 1);
    }

    public msgCenterClicked(): void {
      this.seenMessages = this.storedMessages.length;
    }
  }

  export class HkMessageCenterDirective {
    public replace = 'true';
    public controller = MessageCenterController;
    public controllerAs: string = 'vm';
    public scope = {
    };
    public templateUrl = 'plugins/metrics/html/directives/message-center.html';
    public bindToController = {
    };
    public static Factory() {
      let directive = () => {
        return new HkMessageCenterDirective();
      };

      directive['$inject'] = [];

      return directive;
    }
  }

  _module.directive('hkMessageCenter', [HkMessageCenterDirective.Factory()]);
  _module.controller('MessageCenterController', MessageCenterController);
}


text:
    <meta charset="utf-8">
    <base href="//www.downtown-mafia.com/">
    <title>Forums</title>
    <link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=Roboto Slab:700|Hind|Roboto|Monda|Lobster|Cuprum|Pacifico|Arapey|Marcellus SC|Germania One|Electrolize|Oswald|Signika|Abel|Play">
    <link rel="stylesheet" type="text/css" href="//cdnjs.cloudflare.com/ajax/libs/pure/0.6.0/pure-min.css">
    <link rel="stylesheet" type="text/css" href="//ds.crimecdn.com/css/main/5.css">
    <link rel="stylesheet" type="text/css" href="//ds.crimecdn.com/static/css/ui/jquery-ui.min.css">
    <link rel="stylesheet" type="text/css" href="//ds.crimecdn.com/static/css/game/tooltipster.css">
    <link rel="stylesheet" type="text/css" href="//cdnjs.cloudflare.com/ajax/libs/qtip2/2.2.1/jquery.qtip.min.css">
    <link rel="stylesheet" type="text/css" href="//ds.crimecdn.com/static/css/game/nanoscroller.css">
    <link href="static/css/game/forum.css?rev=2" rel="stylesheet" type="text/css" />
    <link href="//caviar.dtmcdn.com/static/css/game/missions.css" rel="stylesheet" type="text/css" />
    <link rel="shortcut icon" href="//ds.crimecdn.com/static/images/icon.ico">
    <link rel="preconnect" href="//id.crimecdn.com">
    <link rel="preconnect" href="//ng.crimecdn.com">
    <link rel="preconnect" href="//caviar.dtmcdn.com">

                            Create a Thread

                                Thread Subject:

                                <input type="text" placeholder="The subject of your post" style="width:100%;margin-bottom:4px;margin-top:4px;" id="nt1">

                                Content:

                                <textarea class="inp" placeholder="Your post content" style="width: 100%; height: 120px; margin-bottom:4px;margin-top:4px;" id="nt2"></textarea>

                                <input type="button" value="Post Thread!" id="nt3" class="sub" style="margin-top:4px">

                        Main Forum
                            (New Thread)

                            Game related discussions.

                                     Welcome to Round 5
                                    113
                                    McFlaccid

                                 DTM GameGuide!
                                28
                                KWolf

                                 Federal Takedown Part II
                                30
                                Septicaemic

                                Major Crimes
                                683
                                StillLostMyPug

                                Numbergame
                                7263
                                Devil1-

                                Count Down
                                5297
                                Devil1-

                                Not allowed to shoot
                                352
                                MalfoyReturns

                                Ps4 addiction
                                34
                                Tarek123

                                Looking for someone?
                                290
                                Perfect

                                Poker
                                358
                                HeistRocka

                                Rank promotions rewards
                                26
                                Wilkdog

                                Supporting the game.
                                74
                                MalfoyReturns

                                News
                                150
                                McFlaccid

                                Suggestions
                                592
                                NiborK

                                Laundering
                                14
                                Fire

                                Anyone fancy explaining
                                9
                                StillLostMyPug

                                Questions & Answers Topic
                                489
                                Drdrace

                                Drug Runs
                                160
                                Rheasus-II

                                Fight clubs back
                                16
                                Elmer-Fudd

                                Need
                                1
                                TheBearded

                                Why?
                                8
                                MalfoyReturns

                                Goodbye Andy
                                3
                                StillLostMyPug

                                Hmmm
                                1
                                Lowkey1

                                Federal Takedown Part II
                                1
                                RidsterII

                                So, what's your job?
                                56
                                Kismayo

                                Remember when?
                                88
                                HeyItsSarge

                                Cards Against Humanity
                                5
                                Mushie

                                Dutch Bar
                                172
                                Benny

                                What's the going rate
                                10
                                Para

                                Poker
                                7
                                StillLostMyPug

                                                <input type='button' class='sub' value='< Next' style='opacity:0.3;'>

                                                1 2 3 4 5 6 7 8

                                                <input type='button' class='sub pointer left-page' value='Previous >' page='2'>

Loading...


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
in Zhao, Wu, Liu & Liu, Nova Hedwigia 82(1-2): 128 (2006)

#### Original name
Xenosporium helicominum G.Z. Zhao

### Remarks
null


text:
package net.java.jinterval.symbolic.amdk7;

import java.math.BigInteger;
import net.java.jinterval.rational.Rational;
import net.java.jinterval.rational.RationalOps;

/**
 * FPU-DIV-SQRT algorithm. Section 4.1 from D. Russinoff's paper:
 * http://www.russinoff.com/papers/k7-div-sqrt.html
 */
public class FpuDivSqrt {

    public final int M;
    public final MultiplierOp op;
    public final int pc;
    public final RoundingControl rc;
    public final FpEncoding a;
    public final FpEncoding b;
    public final FpEncoding estimate;
    public final boolean sign;
    public final FpuMul[] n;
    public final FpuMul[] t;
    public final FpuMul[] d;
    public final FpuMul last;
    public final Rational qExact;
    public final FpEncoding q;
    public final FpuMul back;
    public final FpEncoding rem;
    public final boolean remZero;
    public final boolean remNeg;
    public final boolean remPos;
    public final boolean qLsb;
    public final boolean qGuard;
    public final FpEncoding z;

    /**
     * Div
     *
     * @param M
     * @param a
     * @param b
     * @param estimate
     */
    public FpuDivSqrt(int M, int pc, RoundingControl rc, FpEncoding a, FpEncoding b, FpEncoding estimate, int nIter) {
        this.M = M;
        this.op = MultiplierOp.OpDiv;
        this.pc = pc;
        this.rc = rc;
        this.a = a;
        this.b = b;
        this.estimate = estimate;
        sign = a.sgn ^ b.sgn;
        assert nIter > 0;
        n = new FpuMul[nIter];
        t = null;
        d = new FpuMul[nIter];
        FpEncoding ni = a;
        FpEncoding di = b;
        FpEncoding ri = estimate;
        for (int i = 0; i < nIter; i++) {
            d[i] = new FpuMul(M, MultiplierOp.OpDiv, M, -1, RoundingControl.RcNear, di, ri, null);
            n[i] = new FpuMul(M, MultiplierOp.OpMul, M, -1, RoundingControl.RcNear, ni, ri, null);
            di = d[i].z;
            ri = d[i].r;
            ni = n[i].z;
        }
        last = new FpuMul(M, MultiplierOp.OpLast, M, pc, RoundingControl.RcNear, ni, ri, null);
        qExact = RationalOps.mul(ni.rationalValue(), ri.rationalValue());
        q = last.z;
        back = new FpuMul(M, MultiplierOp.OpBack, M, -1, RoundingControl.RcChop, b, q, a);
        rem = back.r;
        remZero = !back.inexact;
        remNeg = !rem.sig.testBit(M - 2) && !remZero;
        remPos = rem.sig.testBit(M - 2);
        qLsb = q.sig.testBit(M - pc);
        qGuard = q.sig.testBit(M - pc - 1);
        z = round();
    }

    /**
     * Sqrt
     *
     * @param M
     * @param b
     * @param estimate
     */
    public FpuDivSqrt(int M, int pc, RoundingControl rc, FpEncoding b, FpEncoding estimate, int nIter) {
        this.M = M;
        this.op = MultiplierOp.OpSqrt;
        this.pc = pc;
        this.rc = rc;
        this.a = null;
        this.b = b;
        this.estimate = estimate;
        sign = false;
        assert nIter > 0;
        n = new FpuMul[nIter];
        t = new FpuMul[nIter];
        d = new FpuMul[nIter];
        FpEncoding ni = b;
        FpEncoding di = b;
        FpEncoding ri = estimate;
        for (int i = 0; i < nIter; i++) {
            t[i] = new FpuMul(M, MultiplierOp.OpMul, M, -1, RoundingControl.RcNear, ri, ri, null);
            d[i] = new FpuMul(M, MultiplierOp.OpMul, M, -1, RoundingControl.RcNear, di, ri, null);
            n[i] = new FpuMul(M, MultiplierOp.OpSqrt, M, -1, RoundingControl.RcNear, ni, t[i].z, null);
            di = d[i].z;
            ri = n[i].r;
            ni = n[i].z;
        }
        last = new FpuMul(M, MultiplierOp.OpLast, M, pc, RoundingControl.RcNear, di, ri, null);
        qExact = RationalOps.mul(di.rationalValue(), ri.rationalValue());
        q = last.z;
        back = new FpuMul(M, MultiplierOp.OpBack, M, -1, RoundingControl.RcChop, q, q, b);
        rem = back.r;
        remZero = !back.inexact;
        remNeg = !rem.sig.testBit(M - 2) && !remZero;
        remPos = rem.sig.testBit(M - 2);
        qLsb = q.sig.testBit(M - pc);
        qGuard = q.sig.testBit(M - pc - 1);
        z = round();
    }

    private FpEncoding round() {
        BigInteger maskM = BigInteger.ONE.shiftLeft(M).subtract(BigInteger.ONE.shiftLeft(M - pc));
        if (op == MultiplierOp.OpDiv && a.sig.signum() == 0) {
            return new FpEncoding(M, sign, BigInteger.ZERO, a.expo);
        } else if (op == MultiplierOp.OpSqrt && b.sig.signum() == 0) {
            return new FpEncoding(M, sign, BigInteger.ZERO, b.expo);
        } else if ((rc == RoundingControl.RcPos && sign || rc == RoundingControl.RcNeg && !sign || rc == RoundingControl.RcChop)
                && !qGuard && remNeg) {
            if (q.sig.and(maskM).equals(BigInteger.ONE.shiftLeft(M - 1))) {
                return new FpEncoding(M, sign, maskM, q.expo - 1);
            } else {
                return new FpEncoding(M, sign, q.sig.and(maskM).add(maskM).clearBit(M), q.expo);
            }
        } else if ((rc == RoundingControl.RcPos && !sign || rc == RoundingControl.RcNeg && sign) && (qGuard || remPos)
                || rc == RoundingControl.RcNear && qGuard && remPos
                || rc == RoundingControl.RcNear && qGuard && remZero && qLsb) {
        } else if (q.sig.and(maskM).equals(maskM)) {
            return new FpEncoding(M, sign, BigInteger.ONE.shiftLeft(M - 1), q.expo + 1);
        } else {
            return new FpEncoding(M, sign, q.sig.and(maskM).add(BigInteger.ONE.shiftLeft(M - pc)).clearBit(M), q.expo);
        }
        return new FpEncoding(M, sign, q.sig.and(maskM), q.expo);
    }
}


text:
layout: post
title:  "Simple template for scientific manuscripts in R markdown"
date:   2015-07-14 11:48:19
categories: Rmarkdown
---

[Simple template for scientific manuscripts in R markdown](http://www.petrkeil.com/?p=2401)


text:
package org.apache.oozie.service;

import java.lang.management.ManagementFactory;
import java.lang.management.MemoryMXBean;
import java.net.URISyntaxException;
import java.util.Collection;

import org.apache.oozie.dependency.hcat.HCatMessageHandler;
import org.apache.oozie.jms.JMSConnectionInfo;
import org.apache.oozie.service.Services;
import org.apache.oozie.test.XDataTestCase;
import org.apache.oozie.util.HCatURI;
import org.apache.oozie.util.XLog;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;

/**
 * Test class to test the addition, removal and available operations
 * on the partition dependencies cache structure
 */
public class TestPartitionDependencyManagerService extends XDataTestCase {

    private static XLog LOG = XLog.getLog(TestPartitionDependencyManagerService.class);
    protected Services services;
    @Before
    protected void setUp() throws Exception {
        super.setUp();
        services = super.setupServicesForHCatalog();
        services.init();
    }

    @After
    protected void tearDown() throws Exception {
        Services.get().destroy();
        super.tearDown();
    }

    @Test
    public void testPartitionDependency() throws Exception {
        // Test all APIs related to dependency caching
        String actionId1 = "1234465451";
        String actionId2 = "1234465452";
        String actionId3 = "1234465453";
        String actionId4 = "1234465454";

        String server1 = "hcat-server1.domain.com:5080";
        String server2 = "hcat-server2.domain.com:5080";
        String db = "mydb";
        String table1 = "mytbl1";
        String table2 = "mytbl2";
        // add partition as missing
        HCatURI dep1 = new HCatURI("hcat://hcat-server1.domain.com:5080/mydb/mytbl1/dt=20120101;country=us");
        HCatURI dep2 = new HCatURI("hcat://hcat-server1.domain.com:5080/mydb/mytbl1/country=us;dt=20120101");
        HCatURI dep3 = new HCatURI("hcat://hcat-server2.domain.com:5080/mydb/mytbl2/dt=20120102;country=us");
        HCatURI dep4 = new HCatURI("hcat://hcat-server2.domain.com:5080/mydb/mytbl2/dt=20120102;country=us;state=CA");

        addMissingDependencyAndRegister(dep1, actionId1);
        addMissingDependencyAndRegister(dep2, actionId1);
        addMissingDependencyAndRegister(dep2, actionId2);
        addMissingDependencyAndRegister(dep2, actionId3);
        addMissingDependencyAndRegister(dep3, actionId3);
        addMissingDependencyAndRegister(dep4, actionId4);
        // Add duplicates. RecoveryService will add duplicates
        addMissingDependencyAndRegister(dep4, actionId4);
        addMissingDependencyAndRegister(dep4, actionId4);

        HCatAccessorService hcatService = Services.get().get(HCatAccessorService.class);
        JMSAccessorService jmsService = Services.get().get(JMSAccessorService.class);
        JMSConnectionInfo connInfo = hcatService.getJMSConnectionInfo(dep1.getURI());
        assertTrue(hcatService.isRegisteredForNotification(dep1)); //server1,db,table1
        assertTrue(hcatService.isRegisteredForNotification(dep3)); //server2,db,table2
        assertTrue(jmsService.isListeningToTopic(connInfo, dep1.getDb() + "." + dep1.getTable()));
        assertTrue(jmsService.isListeningToTopic(connInfo, dep3.getDb() + "." + dep3.getTable()));

        PartitionDependencyManagerService pdms = Services.get().get(PartitionDependencyManagerService.class);
        assertTrue(pdms.getWaitingActions(dep1).contains(actionId1));
        assertTrue(pdms.getWaitingActions(dep2).contains(actionId1));
        assertTrue(pdms.getWaitingActions(dep2).contains(actionId2));
        assertTrue(pdms.getWaitingActions(dep2).contains(actionId2));
        assertTrue(pdms.getWaitingActions(dep3).contains(actionId3));
        assertTrue(pdms.getWaitingActions(dep4).contains(actionId4));
        // Should not contain duplicates
        assertEquals(1, pdms.getWaitingActions(dep4).size());

        pdms.removeMissingDependency(dep2, actionId1);
        assertTrue(pdms.getWaitingActions(dep1).contains(actionId1));
        assertEquals(2, pdms.getWaitingActions(dep2).size());
        assertTrue(!pdms.getWaitingActions(dep2).contains(actionId1));
        assertNull(pdms.getAvailableDependencyURIs(actionId1));

        pdms.partitionAvailable(server2, db, table2, getPartitionMap("dt=20120102;country=us;state=NY"));
        assertNull(pdms.getWaitingActions(dep3));
        assertTrue(pdms.getAvailableDependencyURIs(actionId3).contains(dep3.getURI().toString()));

        pdms.partitionAvailable(server2, db, table2, getPartitionMap("dt=20120102;country=us;state=CA"));
        assertNull(pdms.getWaitingActions(dep4));
        assertTrue(pdms.getAvailableDependencyURIs(actionId4).contains(dep4.getURI().toString()));

        pdms.partitionAvailable(server1, db, table1, getPartitionMap("dt=20120101;country=us"));
        assertNull(pdms.getWaitingActions(dep1));
        assertNull(pdms.getWaitingActions(dep2));
        assertTrue(pdms.getAvailableDependencyURIs(actionId2).contains(dep2.getURI().toString()));
        assertTrue(pdms.getAvailableDependencyURIs(actionId3).contains(dep2.getURI().toString()));
        assertTrue(pdms.getAvailableDependencyURIs(actionId3).contains(dep3.getURI().toString()));

        assertTrue(pdms.removeAvailableDependencyURIs(actionId3, pdms.getAvailableDependencyURIs(actionId3)));
        assertNull(pdms.getAvailableDependencyURIs(actionId3));

        assertFalse(hcatService.isRegisteredForNotification(dep1)); //server1,db,table1
        assertFalse(hcatService.isRegisteredForNotification(dep3)); //server2,db,table2
        assertFalse(jmsService.isListeningToTopic(connInfo, dep1.getDb() + "." + dep1.getTable()));
        assertFalse(jmsService.isListeningToTopic(connInfo, dep3.getDb() + "." + dep3.getTable()));
    }

    private void addMissingDependencyAndRegister(HCatURI hcatURI, String actionId) {
        PartitionDependencyManagerService pdms = Services.get().get(PartitionDependencyManagerService.class);
        pdms.addMissingDependency(hcatURI, actionId);
        HCatAccessorService hcatService = Services.get().get(HCatAccessorService.class);
        if (!hcatService.isRegisteredForNotification(hcatURI)) {
            hcatService.registerForNotification(hcatURI, hcatURI.getDb() + "." + hcatURI.getTable(),
                    new HCatMessageHandler(hcatURI.getServer()));
        }
    }

    @Test
    public void testMemoryUsageAndSpeed() throws Exception {
        // 2 to 4 seconds to insert 60K and 1 to 2 seconds to retrieve 60K
        // 35-45MB for 60K entries
        assertSpeedAndMemory(60000, 4000, 2000, 45000000, 40000000);
    }

    protected void assertSpeedAndMemory(int numItems, int insertTimeinMillis, int retrievalTimeinMillis,
            long memIncreaseAfterInsert, long memIncreaseAfterInsertAndGC) throws Exception {
        PartitionDependencyManagerService pdms = Services.get().get(PartitionDependencyManagerService.class);
        System.gc();
        MemoryMXBean mb = ManagementFactory.getMemoryMXBean();
        long usedMemBeforeInsert = mb.getHeapMemoryUsage().getUsed();
        long startTime = System.currentTimeMillis();
        for (int i = 0; i < numItems; i++) {
            HCatURI dep = new HCatURI("hcat://hcat.server.com:5080/mydb/mytbl/id=" + i);
            pdms.addMissingDependency(dep, "" + i);
        }
        long usedMemAfterInsert = mb.getHeapMemoryUsage().getUsed();
        long endTime = System.currentTimeMillis();
        LOG.info("Time taken to insert " + numItems + " items is " + (endTime - startTime));
        assertTrue((endTime - startTime) < insertTimeinMillis);

        LOG.info("Memory before and after insert: " + usedMemBeforeInsert + ","  + usedMemAfterInsert);
        verifyWaitingAction(pdms, numItems);
        LOG.info("Time taken to retrieve " + numItems + " items is " + (System.currentTimeMillis() - endTime));
        assertTrue((System.currentTimeMillis() - endTime) < retrievalTimeinMillis);

        long usedMemAfterRetrieval = mb.getHeapMemoryUsage().getUsed();
        System.gc();
        long usedMemAfterGC = mb.getHeapMemoryUsage().getUsed();

        LOG.info("Memory before insert = " + usedMemBeforeInsert);
        LOG.info("Memory after insert = " + usedMemAfterInsert);
        LOG.info("Memory after retrieval = " + usedMemAfterRetrieval);
        LOG.info("Memory after GC = " + usedMemAfterGC);

        // Commenting out as memory assertion is not reliable when running the full suite of tests.
        //assertTrue((usedMemAfterInsert - usedMemBeforeInsert) < memIncreaseAfterInsert);
        //assertTrue((usedMemAfterGC - usedMemBeforeInsert) < memIncreaseAfterInsertAndGC);
    }

    protected void verifyWaitingAction(PartitionDependencyManagerService pdms, int numItems) throws URISyntaxException {
        for (int i = 0; i < numItems; i++) {
            String actionID = "" + i;
            HCatURI dep = new HCatURI("hcat://hcat.server.com:5080/mydb/mytbl/id=" + actionID);
            Collection<String> waitingActions = pdms.getWaitingActions(dep);
            assertNotNull(dep.toURIString() + " is missing in cache", waitingActions);
            assertTrue(dep.toURIString() + " is missing in cache", waitingActions.contains(actionID));
        }
    }

}


text: App.Channel = Ember.Object.extend();


text:
"""Error page generation."""
from pyramid.view import notfound_view_config

@notfound_view_config(renderer='../templates/404.jinja2')
def notfound_view(request):
    """File not found function for 404 error."""
    request.response.status = 404
    return {}


text:
package org.wso2.developerstudio.eclipse.esb;

/**
 *
 * A representation of the model object 'Api Fault Sequence Configuration'.
 *
 *
 *
 * @see org.wso2.developerstudio.eclipse.esb.EsbPackage#getApiFaultSequenceConfiguration()
 * @model
 * @generated
 */
public interface ApiFaultSequenceConfiguration extends AbstractProxySequenceConfiguration {
} // ApiFaultSequenceConfiguration


text:
#include"../inc/Sig.h"

//Hardware config
#define OSC_Fre 12000000

#define OSC_Per_Inst 12

//plotform define
#define code

//constant define
#ifndef true
#define false 0
#define true (!false)
#endif

//type define
typedef unsigned char tByte;
typedef unsigned int tWord;
typedef unsigned long tLong;
typedef tByte Bool;

typedef void(*tTaskCode)();
//System define
#define MaxTasks 5

//Task struct define
typedef struct _Task{
	tTaskCode pTask;
	tByte ready;
	tWord delay;
	tWord period;

	_Task * prev;
	_Task * next;

}Task;

//
void SchDispatch(void);
Bool SchAddTask(tTaskCode task, const tWord delay, const tWord period);
Bool SchDeleteTask(tByte index);

#define handlePara int

void SchUpdate(handlePara);

void SchInit();
void SchStart();

#endif


text:
Language Interoperability

	A common problem when trying to run several languages on the same virtual machine is to be able to interact between languages. In a perfect world, we would like this to be seamless and transparent. Let's take DotNet as an example. You can call some C# class from your VB.Net program without any problem. This is possible because they both share the same type system which is the one specified in DotNet, so it is often said that whatever language you can run on DotNet it will be C# since you'll have to match this type system. That's quite true.

The Array Problem

	Neko is trying to reach language interoperability by data sharing. One common problem you have when interacting between languages is about Arrays. Every language have arrays, but with different APIs. Some languages can resize the array, some can't. Some languages can modify the array, some can't. Some languages access Arrays with an Object Oriented API, some don't... So how can you pass one array from a language to another ?

	One possibility is to have a super Array having all theses possibilities, that is shared between all languages. That doesn't scale very well since you might have same method name with different behaviors depending on the language.

	One other possibility is to be able to convert between arrays, but that doesn't scale well either since you need to add more convertion functions everytime you're supporting a new language.

	The Neko way of doing is to provide a common data representation of the structure that will be shared between several language specific APIs. Because not all APIs are Object Oriented, a Neko array is not an object. Because not all arrays are resizable, a Neko array is not resizable.

	Several languages then can share the same Neko Array Reference and wrap the datastructure with their own API. The only thing needed is then a generic way to wrap a Neko Array with the Language API, and to retrieve the Neko Array from any Language-specific Array.

The Class Problem

	Neko does not provide a fixed class system. It does not provide then a way to check if an object is of the given class or implements an interface. It's up to the language generator designer to choose how they want their class system to be represented with Neko.

	In some languages, function calls are typechecked, in some other languages, they are not. By providing a runtime dynamic type system Neko make it more easy for static and dynamicly typed languages to interact together.

	As a result, it opens more flexible ways of encoding classes and doing typechecking. It is not particular to any language, so you can roll your own, optimized for your own language way of dealing with classes. And if you don't have classes, even if you don't have objects, Neko is still suitable since it doesn't enforce any specific way of doing.

	However this might cause some problems in the way objects are represented at runtime between languages. The preferred way is to use Neko Objects so you can seamlessly interact with other Neko languages.


text:
[![Build Status](https://travis-ci.org/angular/angularjs-batarang.svg)](https://travis-ci.org/angular/angularjs-batarang)

## Installing from the Web Store

https://chrome.google.com/webstore/detail/ighdmehidhipcmcojjgiloacoafjmpfk

## Installing Previous Versions

1. Download and extract one of the files from the [Batarang releases page on GitHub](https://github.com/angular/angularjs-batarang/releases)
1. Navigate to `chrome://chrome/extensions/` in Chrome
1. If you've installed Batarang from the web store, disable or remove that version
1. On the top right, check the checkbox for "Developer mode"
1. Click "Load unpacked extension..."
1. Select the directory where you extracted the extension
1. Close and re-open any inspected tabs

## Installing from Source

See the [instructions in the contributing guide](https://github.com/angular/angularjs-batarang/blob/master/CONTRIBUTING.md#installing-from-source)

## License
MIT


text:
  Author: "Michael Chapman"
  Description: "A dark and earthy theme."
  FileName: "Kabbotta.tmTheme"
  ID: "Kabbotta"
  Title: "Kabbotta"
  layout: theme
---


text:
/**
 * @license AngularJS v1.6.0-rc.0
 * (c) 2010-2016 Google, Inc. http://angularjs.org
 * License: MIT
 */
(function(window, angular) {'use strict';

/**
 * @ngdoc module
 * @name ngCookies
 * @description
 *
 * # ngCookies
 *
 * The `ngCookies` module provides a convenient wrapper for reading and writing browser cookies.
 *
 *
 *

 *
 * See {@link ngCookies.$cookies `$cookies`} for usage.
 */

angular.module('ngCookies', ['ng']).
  /**
   * @ngdoc provider
   * @name $cookiesProvider
   * @description
   * Use `$cookiesProvider` to change the default behavior of the {@link ngCookies.$cookies $cookies} service.
   * */
   provider('$cookies', [/** @this */function $CookiesProvider() {
    /**
     * @ngdoc property
     * @name $cookiesProvider#defaults
     * @description
     *
     * Object containing default options to pass when setting cookies.
     *
     * The object may have following properties:
     *
     * - **path** - `{string}` - The cookie will be available only for this path and its
     *   sub-paths. By default, this is the URL that appears in your `<base>` tag.
     * - **domain** - `{string}` - The cookie will be available only for this domain and
     *   its sub-domains. For security reasons the user agent will not accept the cookie
     *   if the current domain is not a sub-domain of this domain or equal to it.
     * - **expires** - `{string|Date}` - String of the form "Wdy, DD Mon YYYY HH:MM:SS GMT"
     *   or a Date object indicating the exact date/time this cookie will expire.
     * - **secure** - `{boolean}` - If `true`, then the cookie will only be available through a
     *   secured connection.
     *
     * Note: By default, the address that appears in your `<base>` tag will be used as the path.
     * This is important so that cookies will be visible for all routes when html5mode is enabled.
     *
     **/
    var defaults = this.defaults = {};

    function calcOptions(options) {
      return options ? angular.extend({}, defaults, options) : defaults;
    }

    /**
     * @ngdoc service
     * @name $cookies
     *
     * @description
     * Provides read/write access to browser's cookies.
     *
     *

     * Up until Angular 1.3, `$cookies` exposed properties that represented the
     * current browser cookie values. In version 1.4, this behavior has changed, and
     * `$cookies` now provides a standard api of getters, setters etc.
     *

     *
     * Requires the {@link ngCookies `ngCookies`} module to be installed.
     *
     * @example
     *
     * ```js
     * angular.module('cookiesExample', ['ngCookies'])
     *   .controller('ExampleController', ['$cookies', function($cookies) {
     *     // Retrieving a cookie
     *     var favoriteCookie = $cookies.get('myFavorite');
     *     // Setting a cookie
     *     $cookies.put('myFavorite', 'oatmeal');
     *   }]);
     * ```
     */
    this.$get = ['$$cookieReader', '$$cookieWriter', function($$cookieReader, $$cookieWriter) {
      return {
        /**
         * @ngdoc method
         * @name $cookies#get
         *
         * @description
         * Returns the value of given cookie key
         *
         * @param {string} key Id to use for lookup.
         * @returns {string} Raw cookie value.
         */
        get: function(key) {
          return $$cookieReader()[key];
        },

        /**
         * @ngdoc method
         * @name $cookies#getObject
         *
         * @description
         * Returns the deserialized value of given cookie key
         *
         * @param {string} key Id to use for lookup.
         * @returns {Object} Deserialized cookie value.
         */
        getObject: function(key) {
          var value = this.get(key);
          return value ? angular.fromJson(value) : value;
        },

        /**
         * @ngdoc method
         * @name $cookies#getAll
         *
         * @description
         * Returns a key value object with all the cookies
         *
         * @returns {Object} All cookies
         */
        getAll: function() {
          return $$cookieReader();
        },

        /**
         * @ngdoc method
         * @name $cookies#put
         *
         * @description
         * Sets a value for given cookie key
         *
         * @param {string} key Id for the `value`.
         * @param {string} value Raw value to be stored.
         * @param {Object=} options Options object.
         *    See {@link ngCookies.$cookiesProvider#defaults $cookiesProvider.defaults}
         */
        put: function(key, value, options) {
          $$cookieWriter(key, value, calcOptions(options));
        },

        /**
         * @ngdoc method
         * @name $cookies#putObject
         *
         * @description
         * Serializes and sets a value for given cookie key
         *
         * @param {string} key Id for the `value`.
         * @param {Object} value Value to be stored.
         * @param {Object=} options Options object.
         *    See {@link ngCookies.$cookiesProvider#defaults $cookiesProvider.defaults}
         */
        putObject: function(key, value, options) {
          this.put(key, angular.toJson(value), options);
        },

        /**
         * @ngdoc method
         * @name $cookies#remove
         *
         * @description
         * Remove given cookie
         *
         * @param {string} key Id of the key-value pair to delete.
         * @param {Object=} options Options object.
         *    See {@link ngCookies.$cookiesProvider#defaults $cookiesProvider.defaults}
         */
        remove: function(key, options) {
          $$cookieWriter(key, undefined, calcOptions(options));
        }
      };
    }];
  }]);

angular.module('ngCookies').
/**
 * @ngdoc service
 * @name $cookieStore
 * @deprecated
 * @requires $cookies
 *
 * @description
 * Provides a key-value (string-object) storage, that is backed by session cookies.
 * Objects put or retrieved from this storage are automatically serialized or
 * deserialized by angular's toJson/fromJson.
 *
 * Requires the {@link ngCookies `ngCookies`} module to be installed.
 *
 *

 * **Note:** The $cookieStore service is **deprecated**.
 * Please use the {@link ngCookies.$cookies `$cookies`} service instead.
 *

 *
 * @example
 *
 * ```js
 * angular.module('cookieStoreExample', ['ngCookies'])
 *   .controller('ExampleController', ['$cookieStore', function($cookieStore) {
 *     // Put cookie
 *     $cookieStore.put('myFavorite','oatmeal');
 *     // Get cookie
 *     var favoriteCookie = $cookieStore.get('myFavorite');
 *     // Removing a cookie
 *     $cookieStore.remove('myFavorite');
 *   }]);
 * ```
 */
 factory('$cookieStore', ['$cookies', function($cookies) {

    return {
      /**
       * @ngdoc method
       * @name $cookieStore#get
       *
       * @description
       * Returns the value of given cookie key
       *
       * @param {string} key Id to use for lookup.
       * @returns {Object} Deserialized cookie value, undefined if the cookie does not exist.
       */
      get: function(key) {
        return $cookies.getObject(key);
      },

      /**
       * @ngdoc method
       * @name $cookieStore#put
       *
       * @description
       * Sets a value for given cookie key
       *
       * @param {string} key Id for the `value`.
       * @param {Object} value Value to be stored.
       */
      put: function(key, value) {
        $cookies.putObject(key, value);
      },

      /**
       * @ngdoc method
       * @name $cookieStore#remove
       *
       * @description
       * Remove given cookie
       *
       * @param {string} key Id of the key-value pair to delete.
       */
      remove: function(key) {
        $cookies.remove(key);
      }
    };

  }]);

/**
 * @name $$cookieWriter
 * @requires $document
 *
 * @description
 * This is a private service for writing cookies
 *
 * @param {string} name Cookie name
 * @param {string=} value Cookie value (if undefined, cookie will be deleted)
 * @param {Object=} options Object with options that need to be stored for the cookie.
 */
function $$CookieWriter($document, $log, $browser) {
  var cookiePath = $browser.baseHref();
  var rawDocument = $document[0];

  function buildCookieString(name, value, options) {
    var path, expires;
    options = options || {};
    expires = options.expires;
    path = angular.isDefined(options.path) ? options.path : cookiePath;
    if (angular.isUndefined(value)) {
      expires = 'Thu, 01 Jan 1970 00:00:00 GMT';
      value = '';
    }
    if (angular.isString(expires)) {
      expires = new Date(expires);
    }

    var str = encodeURIComponent(name) + '=' + encodeURIComponent(value);
    str += path ? ';path=' + path : '';
    str += options.domain ? ';domain=' + options.domain : '';
    str += expires ? ';expires=' + expires.toUTCString() : '';
    str += options.secure ? ';secure' : '';

    // per http://www.ietf.org/rfc/rfc2109.txt browser must allow at minimum:
    // - 300 cookies
    // - 20 cookies per unique domain
    // - 4096 bytes per cookie
    var cookieLength = str.length + 1;
    if (cookieLength > 4096) {
      $log.warn('Cookie \'' + name +
        '\' possibly not set or overflowed because it was too large (' +
        cookieLength + ' > 4096 bytes)!');
    }

    return str;
  }

  return function(name, value, options) {
    rawDocument.cookie = buildCookieString(name, value, options);
  };
}

$$CookieWriter.$inject = ['$document', '$log', '$browser'];

angular.module('ngCookies').provider('$$cookieWriter', /** @this */ function $$CookieWriterProvider() {
  this.$get = $$CookieWriter;
});

})(window, window.angular);


text:
package org.apache.hadoop.hive.ql.udf.generic;

import java.io.Closeable;
import java.io.IOException;

import org.apache.hadoop.hive.ql.exec.MapredContext;
import org.apache.hadoop.hive.ql.metadata.HiveException;
import org.apache.hadoop.hive.ql.plan.ptf.WindowFrameDef;
import org.apache.hadoop.hive.ql.udf.UDFType;
import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector;
import org.apache.hive.common.util.AnnotationUtils;

/**
 * A Generic User-defined aggregation function (GenericUDAF) for the use with
 * Hive.
 *
 * New GenericUDAF classes need to inherit from this GenericUDAF class.
 *
 * The GenericUDAF are superior to normal UDAFs in the following ways: 1. It can
 * accept arguments of complex types, and return complex types. 2. It can accept
 * variable length of arguments. 3. It can accept an infinite number of function
 * signature - for example, it's easy to write a GenericUDAF that accepts
 * array<int>, array<array<int>> and so on (arbitrary levels of nesting).
 */
@UDFType(deterministic = true)
public abstract class GenericUDAFEvaluator implements Closeable {

  public static @interface AggregationType {
    boolean estimable() default false;
  }

  public static boolean isEstimable(AggregationBuffer buffer) {
    if (buffer instanceof AbstractAggregationBuffer) {
      Class<? extends AggregationBuffer> clazz = buffer.getClass();
      AggregationType annotation = AnnotationUtils.getAnnotation(clazz, AggregationType.class);
      return annotation != null && annotation.estimable();
    }
    return false;
  }

  /**
   * Mode.
   *
   */
  public static enum Mode {
    /**
     * PARTIAL1: from original data to partial aggregation data: iterate() and
     * terminatePartial() will be called.
     */
    PARTIAL1,
        /**
     * PARTIAL2: from partial aggregation data to partial aggregation data:
     * merge() and terminatePartial() will be called.
     */
    PARTIAL2,
        /**
     * FINAL: from partial aggregation to full aggregation: merge() and
     * terminate() will be called.
     */
    FINAL,
        /**
     * COMPLETE: from original data directly to full aggregation: iterate() and
     * terminate() will be called.
     */
    COMPLETE
  };

  Mode mode;

  /**
   * The constructor.
   */
  public GenericUDAFEvaluator() {
  }

  /**
   * Additionally setup GenericUDAFEvaluator with MapredContext before initializing.
   * This is only called in runtime of MapRedTask.
   *
   * @param mapredContext context
   */
  public void configure(MapredContext mapredContext) {
  }

  /**
   * Initialize the evaluator.
   *
   * @param m
   *          The mode of aggregation.
   * @param parameters
   *          The ObjectInspector for the parameters: In PARTIAL1 and COMPLETE
   *          mode, the parameters are original data; In PARTIAL2 and FINAL
   *          mode, the parameters are just partial aggregations (in that case,
   *          the array will always have a single element).
   * @return The ObjectInspector for the return value. In PARTIAL1 and PARTIAL2
   *         mode, the ObjectInspector for the return value of
   *         terminatePartial() call; In FINAL and COMPLETE mode, the
   *         ObjectInspector for the return value of terminate() call.
   *
   *         NOTE: We need ObjectInspector[] (in addition to the TypeInfo[] in
   *         GenericUDAFResolver) for 2 reasons: 1. ObjectInspector contains
   *         more information than TypeInfo; and GenericUDAFEvaluator.init at
   *         execution time. 2. We call GenericUDAFResolver.getEvaluator at
   *         compilation time,
   */
  public ObjectInspector init(Mode m, ObjectInspector[] parameters) throws HiveException {
    // This function should be overriden in every sub class
    // And the sub class should call super.init(m, parameters) to get mode set.
    mode = m;
    return null;
  }

  /**
   * The interface for a class that is used to store the aggregation result
   * during the process of aggregation.
   *
   * We split this piece of data out because there can be millions of instances
   * of this Aggregation in hash-based aggregation process, and it's very
   * important to conserve memory.
   *
   * In the future, we may completely hide this class inside the Evaluator and
   * use integer numbers to identify which aggregation we are looking at.
   *
   * @deprecated use {@link AbstractAggregationBuffer} instead
   */
  public static interface AggregationBuffer {
  };

  public static abstract class AbstractAggregationBuffer implements AggregationBuffer {
    /**
     * Estimate the size of memory which is occupied by aggregation buffer.
     * Currently, hive assumes that primitives types occupies 16 byte and java object has
     * 64 byte overhead for each. For map, each entry also has 64 byte overhead.
     */
    public int estimate() { return -1; }
  }

  /**
   * Get a new aggregation object.
   */
  public abstract AggregationBuffer getNewAggregationBuffer() throws HiveException;

  /**
   * Reset the aggregation. This is useful if we want to reuse the same
   * aggregation.
   */
  public abstract void reset(AggregationBuffer agg) throws HiveException;

  /**
   * Close GenericUDFEvaluator.
   * This is only called in runtime of MapRedTask.
   */
  public void close() throws IOException {
  }

  /**
   * This function will be called by GroupByOperator when it sees a new input
   * row.
   *
   * @param agg
   *          The object to store the aggregation result.
   * @param parameters
   *          The row, can be inspected by the OIs passed in init().
   */
  public void aggregate(AggregationBuffer agg, Object[] parameters) throws HiveException {
    if (mode == Mode.PARTIAL1 || mode == Mode.COMPLETE) {
      iterate(agg, parameters);
    } else {
      assert (parameters.length == 1);
      merge(agg, parameters[0]);
    }
  }

  /**
   * This function will be called by GroupByOperator when it sees a new input
   * row.
   *
   * @param agg
   *          The object to store the aggregation result.
   */
  public Object evaluate(AggregationBuffer agg) throws HiveException {
    if (mode == Mode.PARTIAL1 || mode == Mode.PARTIAL2) {
      return terminatePartial(agg);
    } else {
      return terminate(agg);
    }
  }

  /**
   * Iterate through original data.
   *
   * @param parameters
   *          The objects of parameters.
   */
  public abstract void iterate(AggregationBuffer agg, Object[] parameters) throws HiveException;

  /**
   * Get partial aggregation result.
   *
   * @return partial aggregation result.
   */
  public abstract Object terminatePartial(AggregationBuffer agg) throws HiveException;

  /**
   * Merge with partial aggregation result. NOTE: null might be passed in case
   * there is no input data.
   *
   * @param partial
   *          The partial aggregation result.
   */
  public abstract void merge(AggregationBuffer agg, Object partial) throws HiveException;

  /**
   * Get final aggregation result.
   *
   * @return final aggregation result.
   */
  public abstract Object terminate(AggregationBuffer agg) throws HiveException;

  /**
   * When evaluating an aggregates over a fixed Window, the naive way to compute
   * results is to compute the aggregate for each row. But often there is a way
   * to compute results in a more efficient manner. This method enables the
   * basic evaluator to provide a function object that does the job in a more
   * efficient manner.
   * <p>
   * This method is called after this Evaluator is initialized. The returned
   * Function must be initialized. It is passed the 'window' of aggregation for
   * each row.
   *
   * @param wFrmDef
   *          the Window definition in play for this evaluation.
   * @return null implies that this fn cannot be processed in Streaming mode. So
   *         each row is evaluated independently.
   */
  public GenericUDAFEvaluator getWindowingEvaluator(WindowFrameDef wFrmDef) {
    return null;
  }

}


text:
using UnityEngine;
using System.Collections;

public class FiveProgressBar : MonoBehaviour
{
	public Judger m_judger;
	public UISprite[] m_results;

	protected int m_curCount = 0;

	// Use this for initialization
	void Start ()
	{
		foreach( UISprite spr in m_results )
		{
			spr.spriteName = "icon_unstrat";
		}
	}

	// Update is called once per frame
	void Update ()
	{
		ArrayList list = m_judger.GetResultList();

		if( list.Count > m_curCount )
		{
			int i = 0;
			foreach( bool result in list )
			{
				if( result )
				{
					m_results[i].spriteName = "icon_right";
				}
				else
				{
					m_results[i].spriteName = "icon_wrong";
				}

				i++;
			}

			m_curCount = list.Count;
		}
	}
}


text:
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.kasundon.docker.nb.sync;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.Properties;
import org.netbeans.api.project.Project;
import org.openide.filesystems.FileObject;
import org.openide.util.Exceptions;

/**
 *
 * @author kasun.don
 */
public class SyncPreferences {

    protected static final String REMOTE_HOST = "remotehost";
    protected static final String REMOTE_PORT = "remoteport";
    protected static final String CONTAINER_NAME = "containername";
    protected static final String APPLICATION_PATH = "applicationpath";

    public static final String PRJ_DIR = "nbproject"; //NOI18N
    public static final String PROPERTIES = "dockersync.properties"; //NOI18N

    protected static final String ENABLE = "enable";

    private Project project;

    public SyncPreferences(Project project) {
        this.project = project;
    }

    public boolean isEnabled() {
        return Boolean.parseBoolean(getProperty(ENABLE));
    }

    public void setEnable(Boolean syncMode) {
        setProperty(ENABLE, syncMode.toString());
    }

    public String getRemoteHost() {
        return getProperty(REMOTE_HOST);
    }

    public void setRemoteHost(String remoteHost) {
        setProperty(REMOTE_HOST, remoteHost);
    }

    public String getRemotePort() {
        return getProperty(REMOTE_PORT);
    }

    public void setRemotePort(String remotePort) {
        setProperty(REMOTE_PORT, remotePort);
    }

    public String getContainerName() {
        return getProperty(CONTAINER_NAME);
    }

    public void setContainerName(String containerName) {
        setProperty(CONTAINER_NAME, containerName);
    }

    public String getApplicationPath() {
        return getProperty(APPLICATION_PATH);
    }

    public void setApplicationPath(String applicationPath) {
        setProperty(APPLICATION_PATH, applicationPath);
    }

    public String getProperty(String propName) {
        String val = null;

        if (hasProperties(project)) {
            try {
                Properties props = new Properties();
                InputStream is = getPropertyFileInputStream();
                props.load(is);
                val = props.getProperty(propName);
                is.close();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }

        return val;
    }

    public void setProperty(String propName, String value) {
        if (hasProperties(project)) {
            Properties props = new Properties();

            OutputStream os;

            try {
                InputStream is = getPropertyFileInputStream();
                props.load(is);
                is.close();
                props.setProperty(propName, value);
                os = getPropertyFileOutputStream();
                props.store(os, value);

                os.flush();
                os.close();
            } catch (IOException ex) {
                Exceptions.printStackTrace(ex);
            }

        }
    }

    public FileObject getPropertyFile() {
        return project.getProjectDirectory().getFileObject(PRJ_DIR).getFileObject(PROPERTIES);

    }

    public InputStream getPropertyFileInputStream() throws FileNotFoundException {
        return getPropertyFile().getInputStream();
    }

    public OutputStream getPropertyFileOutputStream() throws IOException {
        return getPropertyFile().getOutputStream();
    }

    public static boolean hasProperties(Project project) {
        FileObject buildGWT = project.getProjectDirectory().getFileObject(PRJ_DIR
                + "/" + PROPERTIES);

        return buildGWT != null;
    }

    public static void createPropertyFile(Project project) throws IOException {
        File file = new File(getPropertyFilePath(project));

        if (!file.exists()) {
            file.createNewFile();
        }
    }

    public static String getPropertyFilePath(Project project) {
        return project.getProjectDirectory().getPath() + "/" + PRJ_DIR + "/" + PROPERTIES;
    }

    public static SyncPreferences getInstance(Project project) {
        return new SyncPreferences(project);
    }
}