text:
<?php

/**
 * Maintains a list of requests and responses sent using a request or client
 */
class puzzle_subscriber_History implements puzzle_event_SubscriberInterface, IteratorAggregate, Countable
{
    /** @var int The maximum number of requests to maintain in the history */
    private $limit;

    /** @var array Requests and responses that have passed through the plugin */
    private $transactions = array();

    public function __construct($limit = 10)
    {
        $this->limit = $limit;
    }

    public function getEvents()
    {
        return array(
            'complete' => array('onComplete', puzzle_event_RequestEvents::EARLY),
            'error'    => array('onError', puzzle_event_RequestEvents::EARLY),
        );
    }

    /**
     * Convert to a string that contains all request and response headers
     *
     * @return string
     */
    public function __toString()
    {
        $lines = array();
        foreach ($this->transactions as $entry) {
            $response = isset($entry['response']) ? $entry['response'] : '';
            $lines[] = '> ' . trim($entry['request']) . "\n\n< " . trim($response) . "\n";
        }

        return implode("\n", $lines);
    }

    public function onComplete(puzzle_event_CompleteEvent $event)
    {
        $this->add($event->getRequest(), $event->getResponse());
    }

    public function onError(puzzle_event_ErrorEvent $event)
    {
        // Only track when no response is present, meaning this didn't ever
        // emit a complete event
        if (!$event->getResponse()) {
            $this->add($event->getRequest());
        }
    }

    /**
     * Returns an Iterator that yields associative array values where each
     * associative array contains a 'request' and 'response' key.
     *
     * @return Iterator
     */
    public function getIterator()
    {
        return new ArrayIterator($this->transactions);
    }

    /**
     * Get all of the requests sent through the plugin
     *
     * @return puzzle_message_RequestInterface[]
     */
    public function getRequests()
    {
        return array_map(array($this, '__callback_getRequests'), $this->transactions);
    }

    public function __callback_getRequests($t)
    {
        return $t['request'];
    }

    /**
     * Get the number of requests in the history
     *
     * @return int
     */
    public function count()
    {
        return count($this->transactions);
    }

    /**
     * Get the last request sent
     *
     * @return puzzle_message_RequestInterface
     */
    public function getLastRequest()
    {
        $end = end($this->transactions);
        return $end['request'];
    }

    /**
     * Get the last response in the history
     *
     * @return puzzle_message_ResponseInterface|null
     */
    public function getLastResponse()
    {
        $end = end($this->transactions);
        return $end['response'];
    }

    /**
     * Clears the history
     */
    public function clear()
    {
        $this->transactions = array();
    }

    /**
     * Add a request to the history
     *
     * @param puzzle_message_RequestInterface  $request  Request to add
     * @param puzzle_message_ResponseInterface $response Response of the request
     */
    private function add(
        puzzle_message_RequestInterface $request,
        puzzle_message_ResponseInterface $response = null
    ) {
        $this->transactions[] = array('request' => $request, 'response' => $response);
        if (count($this->transactions) > $this->limit) {
            array_shift($this->transactions);
        }
    }
}


text:
package org.mvcspec.ozark.test.view;

import com.gargoylesoftware.htmlunit.WebClient;
import com.gargoylesoftware.htmlunit.html.HtmlElement;
import com.gargoylesoftware.htmlunit.html.HtmlPage;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;

import java.util.Iterator;

import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue;

public class ViewAnnotationIT {

    private String webUrl;
    private WebClient webClient;

    @Before
    public void setUp() {
        webUrl = System.getProperty("integration.url");
        webClient = new WebClient();
        // we explicitly want to test some status codes
        webClient.getOptions().setThrowExceptionOnFailingStatusCode(false);
        webClient.getOptions().setPrintContentOnFailingStatusCode(false);
    }

    @After
    public void tearDown() {
        webClient.closeAllWindows();
    }

    @Test
    public void testVoid() throws Exception {
        final HtmlPage page = webClient.getPage(webUrl + "resources/void");
        assertThat(page.getWebResponse().getStatusCode(), is(200));
        final Iterator<HtmlElement> it = page.getDocumentElement().getHtmlElementsByTagName("h1").iterator();
        assertTrue(it.next().asText().contains("Hello World"));
    }

    @Test
    public void testString() throws Exception {
        final HtmlPage page = webClient.getPage(webUrl + "resources/string");
        assertThat(page.getWebResponse().getStatusCode(), is(200));
        final Iterator<HtmlElement> it = page.getDocumentElement().getHtmlElementsByTagName("h1").iterator();
        assertTrue(it.next().asText().contains("Bye World"));
    }

    @Test
    public void testNull() throws Exception {
        final HtmlPage page = webClient.getPage(webUrl + "resources/null");
        assertThat(page.getWebResponse().getStatusCode(), is(200));
        final Iterator<HtmlElement> it = page.getDocumentElement().getHtmlElementsByTagName("h1").iterator();
        assertTrue(it.next().asText().contains("Hello World"));
    }

    @Test
    public void testVoidClass() throws Exception {
        final HtmlPage page = webClient.getPage(webUrl + "resources/class/void");
        assertThat(page.getWebResponse().getStatusCode(), is(200));
        final Iterator<HtmlElement> it = page.getDocumentElement().getHtmlElementsByTagName("h1").iterator();
        assertTrue(it.next().asText().contains("Hello World"));
    }

    @Test
    public void testStringClass() throws Exception {
        final HtmlPage page = webClient.getPage(webUrl + "resources/class/string");
        assertThat(page.getWebResponse().getStatusCode(), is(200));
        final Iterator<HtmlElement> it = page.getDocumentElement().getHtmlElementsByTagName("h1").iterator();
        assertTrue(it.next().asText().contains("Bye World"));
    }

    @Test
    public void testNullClass() throws Exception {
        final HtmlPage page = webClient.getPage(webUrl + "resources/class/null");
        assertThat(page.getWebResponse().getStatusCode(), is(200));
        final Iterator<HtmlElement> it = page.getDocumentElement().getHtmlElementsByTagName("h1").iterator();
        assertTrue(it.next().asText().contains("Hello World"));
    }

    @Test
    public void testVoidForbiddenException() throws Exception {
        final HtmlPage page = webClient.getPage(webUrl + "resources/void/forbidden");
        assertThat(page.getWebResponse().getStatusCode(), is(403));
        final Iterator<HtmlElement> it = page.getDocumentElement().getHtmlElementsByTagName("h1").iterator();
        assertTrue(it.next().asText().contains("Hello World"));
    }

    @Test
    public void testVoidIllegalArgumentException() throws Exception {
        final HtmlPage page = webClient.getPage(webUrl + "resources/void/illegal-argument");
        assertThat(page.getWebResponse().getStatusCode(), is(500));
        final Iterator<HtmlElement> it = page.getDocumentElement().getHtmlElementsByTagName("h1").iterator();
        assertTrue(it.next().asText().contains("Hello Error"));
    }

    @Test
    public void testStringForbiddenException() throws Exception {
        final HtmlPage page = webClient.getPage(webUrl + "resources/string/forbidden");
        assertThat(page.getWebResponse().getStatusCode(), is(403));
        final Iterator<HtmlElement> it = page.getDocumentElement().getHtmlElementsByTagName("h1").iterator();
        assertTrue(it.next().asText().contains("Hello World"));
    }

    @Test
    public void testStringIllegalArgumentException() throws Exception {
        final HtmlPage page = webClient.getPage(webUrl + "resources/string/illegal-argument");
        assertThat(page.getWebResponse().getStatusCode(), is(500));
        final Iterator<HtmlElement> it = page.getDocumentElement().getHtmlElementsByTagName("h1").iterator();
        assertTrue(it.next().asText().contains("Hello Error"));
    }

}

redpajama_set_name: RedPajamaGithub


text:
#ifndef _MACHINE_PRIVATESPACE_H_
#define _MACHINE_PRIVATESPACE_H_

/*
 * This is the upper (0xff800000) address space layout that is per-cpu.
 * It is setup in locore.s and pmap.c for the BSP and in mp_machdep.c for
 * each AP.  This is only applicable to the x86 SMP kernel.
 */
struct privatespace {
	/* page 0 - data page */
	struct	pcpu pcpu;
	char	__filler0[PAGE_SIZE - sizeof(struct pcpu)];

	/* page 1 - idle stack (KSTACK_PAGES pages) */
	char	idlekstack[KSTACK_PAGES * PAGE_SIZE];
	/* page 1+KSTACK_PAGES... */
};

extern struct privatespace SMP_prvspace[];

#endif	/* ! _MACHINE_PRIVATESPACE_H_ */


text:
<!doctype html>

<title>实时显示地理位置</title>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />


text:
package org.auraframework.components.test.java.model;

import java.math.BigDecimal;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Collections;
import java.util.Date;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.TimeZone;

import org.auraframework.Aura;
import org.auraframework.components.ui.InputOption;
import org.auraframework.impl.service.testdata.LocalizationServiceTestData;
import org.auraframework.system.Annotations.AuraEnabled;
import org.auraframework.system.Annotations.Model;
import org.auraframework.util.AuraLocale;
import org.auraframework.util.date.DateOnly;

/**
 * Used by /expressionTest/expressionFunction.cmp which expects the current
 * return values.
 */
@Model
public class TestModelLocalization {
    static ArrayList<InputOption> inputOptions = new ArrayList<>();
    static ArrayList<InputOption> moreInputOptions = new ArrayList<>();
    static HashMap<String, ArrayList<InputOption>> optionMap = new LinkedHashMap<>();

    static {
        inputOptions.add(new InputOption("Option1", "Opt1", false, "option1"));
        inputOptions.add(new InputOption("Option2", "Opt2", true, "option2"));
        inputOptions.add(new InputOption("Option3", "Opt3", false, "option3"));

        moreInputOptions.add(new InputOption("Option4", "Opt4", false, "val4"));
        moreInputOptions.add(new InputOption("Option5", "Opt5", false, "val5"));
        moreInputOptions.add(new InputOption("Option6", "Opt6", false, "val6"));

        for (InputOption i : inputOptions) {
            optionMap.put(i.getValue(), getSubCategory(i.getValue()));
        }
    }

    private static ArrayList<InputOption> getSubCategory(String option) {
        ArrayList<InputOption> categoryOption = new ArrayList<>();
        if (option.equals("option1")) {
            categoryOption.add(new InputOption("", "", false, "opt1-sub1"));
            categoryOption.add(new InputOption("", "", false, "opt1-sub2"));
            categoryOption.add(new InputOption("", "", false, "opt1-sub3"));
        } else if (option.equals("option2")) {
            categoryOption.add(new InputOption("", "", false, "opt2-sub1"));
        } else if (option.equals("option3")) {
            categoryOption.add(new InputOption("", "", false, "opt3-sub1"));
            categoryOption.add(new InputOption("", "", false, "opt3-sub2"));
        }
        return categoryOption;
    }

    @AuraEnabled
    public Calendar getCalendar() {
        Calendar c = Calendar.getInstance();
        c.set(2004, 9, 23, 16, 30, 0);
        c.set(Calendar.MILLISECOND, 0);
        return c;
    }

    @AuraEnabled
    public Calendar getCalendarLater() {
        Calendar c = Calendar.getInstance();
        c.set(2005, 9, 23, 16, 30, 0);
        c.set(Calendar.MILLISECOND, 0);
        return c;
    }

    @AuraEnabled
    public Calendar getCalendarWithTimeZone() {
        Calendar c = Calendar.getInstance();
        c.set(2005, 6, 4, 16, 30, 0);
        c.set(Calendar.MILLISECOND, 0);
        c.setTimeZone(TimeZone.getTimeZone("GMT"));
        return c;
    }

    @AuraEnabled
    public Calendar getCalendarWithTimeZoneLater() {
        Calendar c = Calendar.getInstance();
        c.set(2006, 6, 4, 16, 30, 0);
        c.set(Calendar.MILLISECOND, 0);
        c.setTimeZone(TimeZone.getTimeZone("GMT"));
        return c;
    }

    @AuraEnabled
    public Date getDate() {
        Date d = new Date(1095957000000L);
        return d;
    }

    @AuraEnabled
    public Date getDateLater() {
        Date d = new Date(1095957000001L);
        return d;
    }

    @AuraEnabled
    public Calendar getTime() {
        Calendar c = Calendar.getInstance();
        c.setTime(new Date(1095957000000L));
        return c;
    }

    @AuraEnabled
    public String getString() {
        return "Model";
    }

    @AuraEnabled
    public String getStringNull() {
        return null;
    }

    @AuraEnabled
    public String getStringEmpty() {
        return "";
    }

    @AuraEnabled
    // TODO W-967767 can't return array because of this bug
    public Object getStringArray() {
        return new String[] { "red", "green", "blue" };
    }

    @AuraEnabled
    public List<String> getStringList() {
        ArrayList<String> sl = new ArrayList<>();
        sl.add("one");
        sl.add("two");
        sl.add("three");
        return sl;
    }

    @AuraEnabled
    public List<String> getStringListNull() {
        return null;
    }

    @AuraEnabled
    public List<List<String>> getListOfList() {
        List<List<String>> listofList = new ArrayList<>();
        ArrayList<String> l1 = new ArrayList<>();
        l1.add("one");
        l1.add("two");
        l1.add("three");
        ArrayList<String> l2 = new ArrayList<>();
        l2.add("un");
        l2.add("do");
        l2.add("tres");
        ArrayList<String> l3 = new ArrayList<>();
        l3.add("ek");
        l3.add("do");
        l3.add("theen");
        listofList.add(l1);
        listofList.add(l2);
        listofList.add(l3);
        return listofList;
    }

    @AuraEnabled
    public Integer getInteger() {
        return 411;
    }

    @AuraEnabled
    public Integer getIntegerNull() {
        return null;
    }

    @AuraEnabled
    // TODO W-967767 can't return array because of this bug
    public Object getIntegerArray() {
        return new Integer[] { 123, 999, 666 };
    }

    @AuraEnabled
    public Object getIntegerList() {
        ArrayList<Integer> il = new ArrayList<>();
        il.add(123);
        il.add(999);
        il.add(666);
        return il;
    }

    @AuraEnabled
    public List<Integer> getIntegerListNull() {
        return null;
    }

    @AuraEnabled
    public String getIntegerString() {
        return "511";
    }

    @AuraEnabled
    public Object getObjectNull() {
        return null;
    }

    @AuraEnabled
    public Boolean getBooleanFalse() {
        return false;
    }

    @AuraEnabled
    public Boolean getBooleanTrue() {
        return true;
    }

    @AuraEnabled
    public ArrayList<Boolean> getBooleanList() {
        ArrayList<Boolean> bl = new ArrayList<>();
        bl.add(true);
        bl.add(false);
        bl.add(true);
        return bl;
    }

    @AuraEnabled
    public List<Boolean> getBooleanListNull() {
        return null;
    }

    @AuraEnabled
    public String getDoubleNull() {
        return null;
    }

    @AuraEnabled
    public Double getDouble() {
        return 4.1;
    }

    @AuraEnabled
    public String getDoubleString() {
        return "5.1";
    }

    @AuraEnabled
    public List<Double> getDoubleListNull() {
        return null;
    }

    @AuraEnabled
    public Number getInfinity() {
        return Double.POSITIVE_INFINITY;
    }

    @AuraEnabled
    public Number getNegativeInfinity() {
        return Double.NEGATIVE_INFINITY;
    }

    @AuraEnabled
    public Number getNaN() {
        return Double.NaN;
    }

    @AuraEnabled
    public Object getEmptyArray() {
        return new Object[0];
    }

    @AuraEnabled
    public Object getEmptyList() {
        return Collections.emptyList();
    }

    @AuraEnabled
    public Object getStringMultiArray() {
        return new String[][][] { { { "one" }, { "two", "three" } }, {}, { { "a", "b" }, {} } };
    }

    @AuraEnabled
    public DateOnly getDateOnly() {
        // Sep 23, 2004
        DateOnly d = new DateOnly(1095957000000L);
        return d;
    }

    @AuraEnabled
    public Date getDateTime() {
        // May 10, 2012, 10:45 PM GMT
        Date d = new Date(1336689900000L);
        return d;
    }

    @AuraEnabled
    public Boolean getTrue() {
        return true;
    }

    @AuraEnabled
    public Boolean getFalse() {
        return false;
    }

    @AuraEnabled
    public Boolean getChecked() {
        return getTrue();
    }

    @AuraEnabled
    public double getCurrency() {
        return getDecimal();
    }

    @AuraEnabled
    public String getDateString() throws ParseException {
        SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
        return dateFormat.format(dateFormat.parse("1999-5-30"));
    }

    @AuraEnabled
    public double getDecimal() {
        return 123456.789;
    }

    @AuraEnabled
    public String getEmail() {
        return "aura@salesforce.com";
    }

    @AuraEnabled
    public Long getNumber() {
        return new Long("123456789123456789");
    }

    @AuraEnabled
    public String getNumberAsString() {
        return getNumber().toString();
    }

    @AuraEnabled
    public Boolean getOption() {
        return getTrue();
    }

    @AuraEnabled
    public double getPercent() {
        return 12.345;
    }

    @AuraEnabled
    public String getPhone() {
        return "(415) 555-3131 ext. 123";
    }

    @AuraEnabled
    public String getSearch() {
        return getString();
    }

    @AuraEnabled
    public String getSecret() {
        return "password";
    }

    @AuraEnabled
    public ArrayList<InputOption> getSelect() {
        return inputOptions;
    }

    @AuraEnabled
    public boolean getSelectOption() {
        return true;
    }

    @AuraEnabled
    public ArrayList<InputOption> getSelectOptions() {
        return inputOptions;
    }

    @AuraEnabled
    public ArrayList<InputOption> getMoreSelectOption() {
        return moreInputOptions;
    }

    @AuraEnabled
    public String getText() {
        return getString();
    }

    @AuraEnabled
    public String getTextAreaText() {
        return "Some text from server\nspecially created to fit in....\n\n\na textarea!";
    }

    @AuraEnabled
    public String getUrl() {
        return "http://www.salesforce.com";
    }

    @AuraEnabled
    public BigDecimal getNumberBigDecimal() {
        BigDecimal number = new BigDecimal("123456789123456789123456789");
        return number;
    }

    @AuraEnabled
    public Object getDates() {
        List<Date> dates = new ArrayList<>();
        dates.add(new Date());
        dates.add(new Date(1000L));
        dates.add(new Date(1333322872649L));
        return dates;
    }

    @AuraEnabled
    public Object getTimes() {
        List<Calendar> times = new ArrayList<>();
        Date[] dates = { new Date(), // now
                new Date(1000L), // early in 1970
                new Date(1333322872649L), // April 1, 2012
                new Date(0) // January 1, 1970 00:00:00.000 GMT
        };

        for (int i = 0; i < dates.length; i++) {
            Calendar c = Calendar.getInstance();
            c.setTime(LocalizationServiceTestData.DATES[i]);
            times.add(c);
        }

        return times;
    }

    @AuraEnabled
    public Object getCurrencies() {
        List<BigDecimal> currencies = new ArrayList<>();
        currencies.add(new BigDecimal("0"));
        currencies.add(new BigDecimal("10.99"));
        currencies.add(new BigDecimal("123456789123456789123456789.12"));
        currencies.add(new BigDecimal("-12345.67891234"));
        return currencies;
    }

    @AuraEnabled
    public Object getNumbers() {
        List<BigDecimal> numbers = new ArrayList<>();
        numbers.add(new BigDecimal("0"));
        numbers.add(new BigDecimal("123456789123456789"));
        numbers.add(new BigDecimal("100000000000.123456789"));
        numbers.add(new BigDecimal("-1234567.123456789"));
        return numbers;
    }

    @AuraEnabled
    public Object getPercentages() {
        List<Double> percentages = new ArrayList<>();
        percentages.add(1.01);
        percentages.add(0.75);
        percentages.add(0.99);
        percentages.add(2.50);
        percentages.add(0.00d);
        percentages.add(0.999d);
        percentages.add(123456789.12345d);
        percentages.add(-987654321987654321987654321.2987654321d);
        return percentages;
    }

    @AuraEnabled
    public Object getStrings() {
        List<String> Strings = new ArrayList<>();
        Strings.add("salesforce.com");
        Strings.add("1 Landmark, San Francisco");
        return Strings;
    }

    @AuraEnabled
    public Object getLocaleData() {
        List<String> localeData = new LinkedList<>();
        AuraLocale ll = Aura.getLocalizationAdapter().getAuraLocale();
        localeData.add("Currency locale:" + ll.getCurrencyLocale().getDisplayName());
        localeData.add("Date locale:" + ll.getDateLocale().getDisplayName());
        localeData.add("Default locale:" + ll.getDefaultLocale().getDisplayName());
        localeData.add("Language locale:" + ll.getLanguageLocale().getDisplayName());
        localeData.add("Number locale:" + ll.getNumberLocale().getDisplayName());
        localeData.add("System locale:" + ll.getSystemLocale().getDisplayName());

        return localeData;
    }

}


text:
<?php

class Google_Service_Dataflow_WorkItemServiceState extends Google_Collection
{
  protected $collection_key = 'metricShortId';
  public $harnessData;
  public $leaseExpireTime;
  protected $metricShortIdType = 'Google_Service_Dataflow_MetricShortId';
  protected $metricShortIdDataType = 'array';
  public $nextReportIndex;
  public $reportStatusInterval;
  protected $splitRequestType = 'Google_Service_Dataflow_ApproximateSplitRequest';
  protected $splitRequestDataType = '';
  protected $suggestedStopPointType = 'Google_Service_Dataflow_ApproximateProgress';
  protected $suggestedStopPointDataType = '';
  protected $suggestedStopPositionType = 'Google_Service_Dataflow_Position';
  protected $suggestedStopPositionDataType = '';

  public function setHarnessData($harnessData)
  {
    $this->harnessData = $harnessData;
  }
  public function getHarnessData()
  {
    return $this->harnessData;
  }
  public function setLeaseExpireTime($leaseExpireTime)
  {
    $this->leaseExpireTime = $leaseExpireTime;
  }
  public function getLeaseExpireTime()
  {
    return $this->leaseExpireTime;
  }
  public function setMetricShortId($metricShortId)
  {
    $this->metricShortId = $metricShortId;
  }
  public function getMetricShortId()
  {
    return $this->metricShortId;
  }
  public function setNextReportIndex($nextReportIndex)
  {
    $this->nextReportIndex = $nextReportIndex;
  }
  public function getNextReportIndex()
  {
    return $this->nextReportIndex;
  }
  public function setReportStatusInterval($reportStatusInterval)
  {
    $this->reportStatusInterval = $reportStatusInterval;
  }
  public function getReportStatusInterval()
  {
    return $this->reportStatusInterval;
  }
  public function setSplitRequest(Google_Service_Dataflow_ApproximateSplitRequest $splitRequest)
  {
    $this->splitRequest = $splitRequest;
  }
  public function getSplitRequest()
  {
    return $this->splitRequest;
  }
  public function setSuggestedStopPoint(Google_Service_Dataflow_ApproximateProgress $suggestedStopPoint)
  {
    $this->suggestedStopPoint = $suggestedStopPoint;
  }
  public function getSuggestedStopPoint()
  {
    return $this->suggestedStopPoint;
  }
  public function setSuggestedStopPosition(Google_Service_Dataflow_Position $suggestedStopPosition)
  {
    $this->suggestedStopPosition = $suggestedStopPosition;
  }
  public function getSuggestedStopPosition()
  {
    return $this->suggestedStopPosition;
  }
}


text:
package com.amazonaws.services.pinpointsmsvoice.model;

import java.io.Serializable;
import javax.annotation.Generated;

import com.amazonaws.AmazonWebServiceRequest;

/**
 *
 * @see AWS API Documentation
 */
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class DeleteConfigurationSetRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {

    /** ConfigurationSetName */
    private String configurationSetName;

    /**
     * ConfigurationSetName
     *
     * @param configurationSetName
     *        ConfigurationSetName
     */

    public void setConfigurationSetName(String configurationSetName) {
        this.configurationSetName = configurationSetName;
    }

    /**
     * ConfigurationSetName
     *
     * @return ConfigurationSetName
     */

    public String getConfigurationSetName() {
        return this.configurationSetName;
    }

    /**
     * ConfigurationSetName
     *
     * @param configurationSetName
     *        ConfigurationSetName
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public DeleteConfigurationSetRequest withConfigurationSetName(String configurationSetName) {
        setConfigurationSetName(configurationSetName);
        return this;
    }

    /**
     * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
     * redacted from this string using a placeholder value.
     *
     * @return A string representation of this object.
     *
     * @see java.lang.Object#toString()
     */
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getConfigurationSetName() != null)
            sb.append("ConfigurationSetName: ").append(getConfigurationSetName());
        sb.append("}");
        return sb.toString();
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;

        if (obj instanceof DeleteConfigurationSetRequest == false)
            return false;
        DeleteConfigurationSetRequest other = (DeleteConfigurationSetRequest) obj;
        if (other.getConfigurationSetName() == null ^ this.getConfigurationSetName() == null)
            return false;
        if (other.getConfigurationSetName() != null && other.getConfigurationSetName().equals(this.getConfigurationSetName()) == false)
            return false;
        return true;
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;

        hashCode = prime * hashCode + ((getConfigurationSetName() == null) ? 0 : getConfigurationSetName().hashCode());
        return hashCode;
    }

    @Override
    public DeleteConfigurationSetRequest clone() {
        return (DeleteConfigurationSetRequest) super.clone();
    }

}


text:
require 'pathname'
load Pathname.new(File.join(File.dirname(__FILE__), ['..'] * 2,
                            'bioruby_test_helper.rb')).cleanpath.to_s

# libraries needed for the tests
require 'test/unit'
require 'bio/shell'

module Bio
end


text:
<?php

/**
 * XmlConnect Model Resource Application Collection
 *
 * @category    Mage
 * @package     Mage_XmlConnect
 * @author      Magento Core Team <core@magentocommerce.com>
 */
class Mage_XmlConnect_Model_Resource_Application_Collection extends Mage_Core_Model_Resource_Db_Collection_Abstract
{
    /**
     * Constructor, setting table
     *
     * @return null
     */
    protected function _construct()
    {
        $this->_init('xmlconnect/application');
    }
}


text:
package com.jamesnkh.myhazejar;

import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;

import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;
import org.apache.commons.lang3.StringUtils;

import com.jamesnkh.myhazejar.models.MyHazeData;
import com.jamesnkh.myhazejar.models.MyHazeDataValue;

/**
 * Reads Malaysia's Department of Environmental's API data from
 *
 * http://apims.doe.gov.my/apims/hourly1.php?date=2013-10-09
 *
 * hourly1.php means 12am to 5am
 * hourly2.php means 6am to 11am
 * hourly3.php means 12pm to 5pm
 * hourly4.php means 6pm to 11pm
 *
 */
public class ApiReader
{
    private Document doc;
    private String userAgent;
    private int hourOption;
    private String date; //yyyy-mm-dd
    private boolean useProxy;
    private String proxyProtocol;
    private String proxyHost;
    private String proxyPort;

    private static final int FULL_DAY_HOUR_OPTION = -1;
    private static final String MY_HAZE_URL_PREFIX = "http://apims.doe.gov.my/apims/hourly";
    private static final String MY_HAZE_URL_POSTFIX = ".php?date=";
    private static final int HOURS_PER_DAY = 24;

    private static final int CONNECTION_TIME_OUT = 20000; //20 seconds

    /**
     *
     * @param userAgent
     * @param hourOption refers to hourly[1,2,3,4].php
     * @param date
     * @param useProxy
     * @param proxyProtocol
     * @param proxyHost
     * @param proxyPort
     */
    public ApiReader(String userAgent,
            Integer hourOption,
            String date,
            boolean useProxy,
            String proxyProtocol,
            String proxyHost,
            String proxyPort)
    {
        this.userAgent = userAgent;
        this.hourOption = hourOption;
        this.date = date;
        this.useProxy = useProxy;
        this.proxyProtocol = proxyProtocol;
        this.proxyHost = proxyHost;
        this.proxyPort = proxyPort;

        if (this.useProxy)
        {
            System.setProperty(this.proxyProtocol + ".proxyHost", this.proxyHost);
            System.setProperty(this.proxyProtocol + ".proxyPort", this.proxyPort);
        }
        String webUrl = "";
        int lastHourOptionsIndex = MyHazeData.HOUR_OPTIONS.length - 1;
        if (this.hourOption >= MyHazeData.HOUR_OPTIONS[0] &&
                this.hourOption <= MyHazeData.HOUR_OPTIONS[lastHourOptionsIndex])
        {
            webUrl = buildMyHazeUrl(this.hourOption, this.date);
            connectToMyHazeUrl(webUrl);
        }
        else if (this.hourOption == FULL_DAY_HOUR_OPTION)
        {
            //postpone jsoup connection
        }
        else //fallback to hourOption = 1
        {
            this.hourOption = 1; //reset invalid constructor input to 1
            webUrl = buildMyHazeUrl(this.hourOption, this.date);
            connectToMyHazeUrl(webUrl);
        }
    }

    private void connectToMyHazeUrl(String webUrl)
    {
        try
        {
            this.doc = Jsoup.connect(webUrl)
                .timeout(CONNECTION_TIME_OUT)
                .userAgent(this.userAgent)
                .get();
        }
        catch (IOException e)
        {
            e.printStackTrace();
        }
    }

    /**
     * Helper function for the constructor to build a proper Malaysia Haze
     * web Url request with JSoup
     *
     * @return
     */
    private String buildMyHazeUrl(Integer hourOption, String date)
    {
        //sanity check if the hour option is valid
        //fallback to first hour option if not valid
        HashSet<Integer> set= new HashSet<Integer>(Arrays.asList(MyHazeData.HOUR_OPTIONS));
        String webUrl = "";
        if (!set.contains(hourOption))
        {
            this.hourOption = MyHazeData.HOUR_OPTIONS[0];
        }
        else
        {
            this.hourOption = hourOption;
        }

        this.date = date;
        webUrl = MY_HAZE_URL_PREFIX + this.hourOption + MY_HAZE_URL_POSTFIX +
                this.date;

        return webUrl;
    }

    public Document setDocument(Document doc)
    {
        return this.doc = doc;
    }

    public Document getDocument()
    {
        return this.doc;
    }

    private ArrayList<MyHazeDataValue> getArrayHourData(int hourDataSize, Element data)
    {
        ArrayList<MyHazeDataValue> hourData = new ArrayList<MyHazeDataValue>(hourDataSize);
        for (int i=0; i<hourDataSize; i++)
        {
            MyHazeDataValue dataValue = new MyHazeDataValue();
            dataValue.parse(data.child(i+2).text());
            hourData.add(i, dataValue);
            dataValue = null; //optimization
        }
        return hourData;
    }

    public ArrayList<MyHazeData> buildDataWithHourOption()
    {
        //this function is only applicable when hourOption is valid
        ArrayList<MyHazeData> datas = new ArrayList<MyHazeData>();

        int hourDivider = MyHazeData.HOUR_OPTIONS.length;
        int hourDataSize = HOURS_PER_DAY / hourDivider;
        ArrayList<MyHazeDataValue> hourData = new ArrayList<MyHazeDataValue>(hourDataSize);

        if (this.doc != null)
        {
            //do more things
            Elements tableData = this.doc.select("table.table1 tr:gt(0)");

            for (Element data : tableData)
            {
                MyHazeData tmp = new MyHazeData();
                tmp.setDate(this.date);
                tmp.setState(data.child(0).text());
                tmp.setArea(data.child(1).text());
                hourData = getArrayHourData(hourDataSize, data);
                tmp.setHourDataWithOption(this.hourOption, hourData);

                datas.add(tmp);
                tmp = null; //optimization
            }
        }
        else
        {

        }
        return datas;
    }
}


text:
package com.indarsoft.iso8583core.coretypes;

import com.indarsoft.iso8583core.types.Field;
import com.indarsoft.iso8583core.types.TypeFixed;

/** Application : ISO8583CORE  - Class F065 - Bit Map, Extended.
 *
 */
public class F065 extends TypeFixed {

	private F065 (byte[] bytearr, Field field) {

		super( bytearr, field ) ;
    	if ( ! super.isValid() ){
    		return;
		}
	}

	/** Static constructor .
	 *
	 * @param 	bytearr
	 * @return	{@link F065 }
	 */
    protected static F065 get ( byte[] bytearr, Field field ){
    	return new F065 ( bytearr, field ) ;
    }
}


text:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>polynomial</title>
    <link rel="stylesheet" type="text/css" href="csound.css" />
    <meta name="generator" content="DocBook XSL Stylesheets V1.78.1" />
    <link rel="home" href="index.html" title="Manuel de référence canonique de Csound" />
    <link rel="up" href="OpcodesTop.html" title="Opcodes et opérateurs de l'orchestre" />
    <link rel="prev" href="polyaft.html" title="polyaft" />
    <link rel="next" href="port.html" title="port" />

          polynomial

          Précédent
          Opcodes et opérateurs de l'orchestre
           Suivant

          polynomial

polynomial —
      Evalue efficacement un polynôme d'ordre arbitraire.

Description

      L'opcode polynomial calcule un polynôme à une seule
      variable d'entrée de taux-a. Le polynôme est la somme de n'importe quel
      nombre de termes de la forme kn*x^n où
      kn est le nième coefficient de l'expression. Ces
      coefficients sont des valeurs de taux-k.

Syntaxe

aout polynomial ain, k0 [, k1 [, k2 [...]]]

Exécution

      ain -- le signal d'entrée jouant le rôle de la variable
      indépendante du polynôme ("x").

      aout -- le signal de sortie ("y").

      k0, k1, k2, ... -- les coefficients pour chaque terme
      du polynôme.

      Si l'on considère que le paramètre d'entrée ain est
      "x" et que la sortie aout est "y", alors l'opcode
      polynomial calcule l'équation suivante :

        y = k0 + k1*x + k2*x^2 + k3*x^3 + ...

Voir aussi

      chebyshevpoly,
      mac
      maca

Exemples

      Voici un exemple de l'opcode polynomial. Il utilise le fichier
      polynomial.csd.

            Exemple 669. Exemple de l'opcode polynomial.

Voir les sections Audio en Temps Réel et
        Options de la Ligne de Commande pour
        plus d'information sur l'utilisation des options de la ligne de commande.

<CsoundSynthesizer>
<CsOptions>
; Select audio/midi flags here according to platform
-odac  ;;;realtime audio
;-iadc    ;;;uncomment -iadc if realtime audio input is needed too
; For Non-realtime ouput leave only the line below:
; -o polynomial.wav -W ;;; for file output any platform
</CsOptions>
<CsInstruments>

sr = 44100
ksmps = 32
nchnls = 2
0dbfs  = 1

; The polynomial y=x^n where n is odd always produces a curve
; that traverses the range [-1, 1] when the input is within
; the same range.  Therefore, we can use one of these curves
; to make a nonlinear phasor that repeatedly reads a table
; from beginning to end like a linear phasor (maintaining
; continuity) but that distorts the waveform in the table.

instr 4	; This instrument demonstrates phase distortion with x^3

idur   = p3
iamp   = p4
ifreq  = p5
itable = p6

aenv linseg 0, .001, 1.0, idur - .051, 1.0, .05, 0	; declicking envelope
aosc phasor ifreq					; create a linear phasor
apd  polynomial aosc, 0, 0, 0, 1			; distort the phasor with x^3
aout tablei apd, itable, 1				; read a sine table with the nonlinear phasor
     outs aenv*aout*iamp, aenv*aout*iamp

endin

instr 5	; This instrument demonstrates phase distortion with x^11

idur   = p3
iamp   = p4
ifreq  = p5
itable = p6

aenv linseg 0, .001, 1.0, idur - .051, 1.0, .05, 0	; declicking envelope
aosc phasor ifreq					; create a linear phasor
apd  polynomial aosc, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 ; distort the phasor with x^11
aout tablei apd, itable, 1				; read a sine table with the nonlinear phasor
     outs aenv*aout*iamp, aenv*aout*iamp

endin

instr 6 ; This instrument crossfades between a pure sine and one distorted with x^11

idur   = p3
iamp   = p4
ifreq  = p5
itable = p6

aenv	linseg	0, .001, 1.0, idur - .051, 1.0, .05, 0	; declicking envelope
aosc	phasor	ifreq					; create a linear phasor
aout3	tablei	aosc, itable, 1				; read a sine table without the linear phasor
apd11	polynomial aosc, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 ; distort the phasor with x^11
aout11	tablei	apd11, itable, 1			; read a sine table with the nonlinear phasor
kamount	linseg	1.0, 0.05, 0.9, 1.0, 0.0		; crossfade between two outputs
aout	= aout3*kamount + aout11*(1.0 - kamount)
        outs aenv*aout*iamp, aenv*aout*iamp

endin
</CsInstruments>
<CsScore>
f1 0 16385 10 1	; sine wave

; descending "just blues" scale

t 0 100
i4 0 .333 .7 512     1
i. + .    .  448
i. + .    .  384
i. + .    .  360
i. + .    .  341.33
i. + .    .  298.67
i. + 2    .  256
s

t 0 100
i5 0 .333 .7 512     1
i. + .    .  448
i. + .    .  384
i. + .    .  360
i. + .    .  341.33
i. + .    .  298.67
i. + 2    .  256
s

t 0 100
i6 0 .333 .7 512     1
i. + .    .  448
i. + .    .  384
i. + .    .  360
i. + .    .  341.33
i. + .    .  298.67
i. + 2    .  256

e

</CsScore>
</CsoundSynthesizer>

Voir aussi

      chebyshevpoly,
      mac
      maca

Crédits

            Auteur : Anthony Kozar

            Janvier 2008

Nouveau dans la version 5.08 de Csound.

          Précédent

            Niveau supérieur

           Suivant

          polyaft

            Sommaire

           port


text:
package pl.pkosmowski.gxtshowcase.client;

import com.google.gwt.user.client.ui.Widget;

/**
 *
 * @author Piotr Kosmowski
 */
public class PropertiesEditorPanel extends AbstractEditorTab {

    public PropertiesEditorPanel(EditorWidgetsMapper editorWidgetsMapper) {
        super(editorWidgetsMapper, "Properties");
    }

    @Override
    protected void setEditorWidgetFor(Widget widget) {
        setEditorWidgetAndDisplayIt(getEditorWidgetsMapper().getPropertiesEditorForType(widget.getClass()));
    }
}


text:
package org.ops4j.pax.exam.spi.war;

import java.io.IOException;
import java.io.InputStream;
import java.net.URI;
import java.util.Set;

import org.ops4j.pax.exam.TestAddress;
import org.ops4j.pax.exam.TestProbeProvider;

/**
 * Provides a WAR probe as an input stream.
 *
 * @author Harald Wellmann
 *
 */
public class WarTestProbeProvider implements TestProbeProvider {

    private URI warUri;
    private Set<TestAddress> testAddresses;

    public WarTestProbeProvider(URI uri, Set<TestAddress> testAddresses) {
        this.warUri = uri;
        this.testAddresses = testAddresses;
    }

    @Override
    public Set<TestAddress> getTests() {
        return testAddresses;
    }

    @Override
    public InputStream getStream() throws IOException {
        return warUri.toURL().openStream();
    }
}


text:
This code is really intended to go along with my talk (Slides are in
presentation, but they aren't comprehensive.)
That said, if you want to get started, there are two
challenges!

## Evaluate Mathematical expressions.

Fill out code in stack.py, postfix.py, and evaluate.py until the tests
pass. You can run the tests with nosestests or better yet, pytest.

The solutions are in the complete folder, but try not to peak too early.

## Balanced Parenthesis!
I've put stubs for the balanced parenthesis problem in the balanced
folder, as well as some tests. I'm not providing solutions for this
(yet).


text:
<?xml version="1.0"?>
<InterchangeStudentDiscipline xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://ed-fi.org/0100"
                              xsi:schemaLocation="http://ed-fi.org/0100 ../../sli/edfi-schema/src/main/resources/edfiXsd-SLI/SLI-Interchange-StudentDiscipline.xsd">
    <Action ActionType="DELETE" Cascade="false" Force="false">
        <StudentDisciplineIncidentAssociation>
            <StudentReference>
                <StudentIdentity>
                    <StudentUniqueStateId>1</StudentUniqueStateId>
                </StudentIdentity>
            </StudentReference>
            <DisciplineIncidentReference>
                <DisciplineIncidentIdentity>
                    <IncidentIdentifier>4#0</IncidentIdentifier>
                    <EducationalOrgReference>
                        <EducationalOrgIdentity>
                            <StateOrganizationId>Daybreak Central High</StateOrganizationId>
                        </EducationalOrgIdentity>
                    </EducationalOrgReference>
                </DisciplineIncidentIdentity>
            </DisciplineIncidentReference>
            <StudentParticipationCode>Perpetrator</StudentParticipationCode>
            <Behaviors>
                <CodeValue>BE1</CodeValue>
            </Behaviors>
        </StudentDisciplineIncidentAssociation>
    </Action>
</InterchangeStudentDiscipline>


text:
using Xwt;
using Xwt.Drawing;

namespace URMSimulator
{
    public partial class AboutDialog
    {
        VBox vbox1;
        HBox hbox1;
        ImageView image1;
        Label labelProgramName, labelComments;
        LinkLabel labelWebsite;

        private void Build()
        {
            this.Icon = Xwt.Drawing.Image.FromResource("URMSimulator.Resources.urm.png");
            this.Title = "About";
            this.Resizable = false;
            this.Buttons.Add(new DialogButton(Command.Close));

            vbox1 = new VBox();

            image1 = new ImageView();
            image1.WidthRequest = 320;
            image1.HeightRequest = 270;
            vbox1.PackStart(image1);

            labelProgramName = new Label();
            labelProgramName.TextAlignment = Alignment.Center;
            vbox1.PackStart(labelProgramName);

            labelComments = new Label();
            labelComments.TextAlignment = Alignment.Center;
            vbox1.PackStart(labelComments);

            hbox1 = new HBox();

            hbox1.PackStart(new HBox(), true);

            labelWebsite = new LinkLabel();
            labelWebsite.TextAlignment = Alignment.Center; //text aligment doesn't work with Xwt.WPF
            hbox1.PackStart(labelWebsite, false);

            hbox1.PackStart(new HBox(), true);
            vbox1.PackStart(hbox1);

            this.Content = vbox1;
        }
    }
}


text:
/* This file is ALSO:
 * Copyright 2001-2004 David Abrahams.
 * Copyright 2005 Reece H. Dunn.
 * Copyright 2005 Rene Rivera.
 * Distributed under the Boost Software License, Version 1.0.
 * (See accompanying file LICENSE_1_0.txt or copy at
 * http://www.boost.org/LICENSE_1_0.txt)
 */

/*
 * variable.c - handle Jam multi-element variables.
 *
 * External routines:
 *
 *  var_defines() - load a bunch of variable=value settings
 *  var_get()     - get value of a user defined symbol
 *  var_set()     - set a variable in jam's user defined symbol table.
 *  var_swap()    - swap a variable's value with the given one
 *  var_done()    - free variable tables
 *
 * Internal routines:
 *
 *  var_enter() - make new var symbol table entry, returning var ptr
 *  var_dump()  - dump a variable to stdout
 */

#include "jam.h"
#include "variable.h"

#include "filesys.h"
#include "hash.h"
#include "modules.h"
#include "parse.h"
#include "pathsys.h"
#include "strings.h"
#include "output.h"

#include <stdio.h>
#include <stdlib.h>

/*
 * VARIABLE - a user defined multi-value variable
 */

typedef struct _variable VARIABLE ;

struct _variable
{
    OBJECT * symbol;
    LIST   * value;
};

static LIST * * var_enter( struct module_t *, OBJECT * symbol );
static void var_dump( OBJECT * symbol, LIST * value, char * what );

/*
 * var_defines() - load a bunch of variable=value settings
 *
 * If preprocess is false, take the value verbatim.
 *
 * Otherwise, if the variable value is enclosed in quotes, strip the quotes.
 * Otherwise, if variable name ends in PATH, split value at :'s.
 * Otherwise, split the value at blanks.
 */

void var_defines( struct module_t * module, char * const * e, int preprocess )
{
    string buf[ 1 ];

    string_new( buf );

    for ( ; *e; ++e )
    {
        char * val;

        if ( ( val = strchr( *e, '=' ) )
#if defined( OS_MAC )
            /* On the mac (MPW), the var=val is actually var\0val */
            /* Think different. */
            || ( val = *e + strlen( *e ) )
#endif
        )
        {
            LIST * l = L0;
            size_t const len = strlen( val + 1 );
            int const quoted = ( val[ 1 ] == '"' ) && ( val[ len ] == '"' ) &&
                ( len > 1 );

            if ( quoted && preprocess )
            {
                string_append_range( buf, val + 2, val + len );
                l = list_push_back( l, object_new( buf->value ) );
                string_truncate( buf, 0 );
            }
            else
            {
                char * p;
                char * pp;
                char split =
#if defined( OPT_NO_EXTERNAL_VARIABLE_SPLIT )
                    '\0'
#elif defined( OS_MAC )
                    ','
#else
                    ' '
#endif
                    ;

                /* Split *PATH at :'s, not spaces. */
                if ( val - 4 >= *e )
                {
                    if ( !strncmp( val - 4, "PATH", 4 ) ||
                        !strncmp( val - 4, "Path", 4 ) ||
                        !strncmp( val - 4, "path", 4 ) )
                        split = SPLITPATH;
                }

                /* Do the split. */
                for
                (
                    pp = val + 1;
                    preprocess && ( ( p = strchr( pp, split ) ) != 0 );
                    pp = p + 1
                )
                {
                    string_append_range( buf, pp, p );
                    l = list_push_back( l, object_new( buf->value ) );
                    string_truncate( buf, 0 );
                }

                l = list_push_back( l, object_new( pp ) );
            }

            /* Get name. */
            string_append_range( buf, *e, val );
            {
                OBJECT * const varname = object_new( buf->value );
                var_set( module, varname, l, VAR_SET );
                object_free( varname );
            }
            string_truncate( buf, 0 );
        }
    }
    string_free( buf );
}

/* Last returned variable value saved so we may clear it in var_done(). */
static LIST * saved_var = L0;

/*
 * var_get() - get value of a user defined symbol
 *
 * Returns NULL if symbol unset.
 */

LIST * var_get( struct module_t * module, OBJECT * symbol )
{
    LIST * result = L0;
#ifdef OPT_AT_FILES
    /* Some "fixed" variables... */
    if ( object_equal( symbol, constant_TMPDIR ) )
    {
        list_free( saved_var );
        result = saved_var = list_new( object_new( path_tmpdir()->value ) );
    }
    else if ( object_equal( symbol, constant_TMPNAME ) )
    {
        list_free( saved_var );
        result = saved_var = list_new( path_tmpnam() );
    }
    else if ( object_equal( symbol, constant_TMPFILE ) )
    {
        list_free( saved_var );
        result = saved_var = list_new( path_tmpfile() );
    }
    else if ( object_equal( symbol, constant_STDOUT ) )
    {
        list_free( saved_var );
        result = saved_var = list_new( object_copy( constant_STDOUT ) );
    }
    else if ( object_equal( symbol, constant_STDERR ) )
    {
        list_free( saved_var );
        result = saved_var = list_new( object_copy( constant_STDERR ) );
    }
    else
#endif
    {
        VARIABLE * v;
        int n;

        if ( ( n = module_get_fixed_var( module, symbol ) ) != -1 )
        {
            if ( DEBUG_VARGET )
                var_dump( symbol, module->fixed_variables[ n ], "get" );
            result = module->fixed_variables[ n ];
        }
        else if ( module->variables && ( v = (VARIABLE *)hash_find(
            module->variables, symbol ) ) )
        {
            if ( DEBUG_VARGET )
                var_dump( v->symbol, v->value, "get" );
            result = v->value;
        }

#ifdef OS_VMS
        else if ( ( module->name && object_equal( module->name, constant_ENVIRON ) )
                  || root_module() == module )
        {
            /* On VMS, when a variable from root or ENVIRON module is not found,
             * explicitly request it from the process.
             * By design, process variables (and logicals) are not made available
             * to C main(), and thus will not get loaded in bulk to root/ENVRON.
             * So we get around it by getting any such variable on first request.
             */
            const char * val = getenv( object_str( symbol ) );

            if ( val )
            {
                struct module_t * environ_module = module;
                char * environ[ 2 ] = { 0 }; /* NULL-terminated */
                string buf[ 1 ];

                if ( root_module() == module )
                {
                    environ_module = bindmodule( constant_ENVIRON );
                }

                string_copy( buf, object_str( symbol ) );
                string_append( buf, "=" );
                string_append( buf, val );

                environ[ 0 ] = buf->value;

                /* Load variable to global module, with splitting, for backward
                 * compatibility. Then to .ENVIRON, without splitting.
                 */
                var_defines( root_module(), environ, 1 );
                var_defines( environ_module, environ, 0 );
                string_free( buf );

                if ( module->variables && ( v = (VARIABLE *)hash_find(
                    module->variables, symbol ) ) )
                {
                    if ( DEBUG_VARGET )
                        var_dump( v->symbol, v->value, "get" );
                    result = v->value;
                }
            }
        }
#endif
    }
    return result;
}

LIST * var_get_and_clear_raw( module_t * module, OBJECT * symbol )
{
    LIST * result = L0;
    VARIABLE * v;

    if ( module->variables && ( v = (VARIABLE *)hash_find( module->variables,
        symbol ) ) )
    {
        result = v->value;
        v->value = L0;
    }

    return result;
}

/*
 * var_set() - set a variable in Jam's user defined symbol table
 *
 * 'flag' controls the relationship between new and old values of the variable:
 * SET replaces the old with the new; APPEND appends the new to the old; DEFAULT
 * only uses the new if the variable was previously unset.
 *
 * Copies symbol. Takes ownership of value.
 */

void var_set( struct module_t * module, OBJECT * symbol, LIST * value, int flag
    )
{
    LIST * * v = var_enter( module, symbol );

    if ( DEBUG_VARSET )
        var_dump( symbol, value, "set" );

    switch ( flag )
    {
    case VAR_SET:  /* Replace value */
        list_free( *v );
        *v = value;
        break;

    case VAR_APPEND:  /* Append value */
        *v = list_append( *v, value );
        break;

    case VAR_DEFAULT:  /* Set only if unset */
        if ( list_empty( *v ) )
            *v = value;
        else
            list_free( value );
        break;
    }
}

/*
 * var_swap() - swap a variable's value with the given one
 */

LIST * var_swap( struct module_t * module, OBJECT * symbol, LIST * value )
{
    LIST * * v = var_enter( module, symbol );
    LIST * oldvalue = *v;
    if ( DEBUG_VARSET )
        var_dump( symbol, value, "set" );
    *v = value;
    return oldvalue;
}

/*
 * var_enter() - make new var symbol table entry, returning var ptr
 */

static LIST * * var_enter( struct module_t * module, OBJECT * symbol )
{
    int found;
    VARIABLE * v;
    int n;

    if ( ( n = module_get_fixed_var( module, symbol ) ) != -1 )
        return &module->fixed_variables[ n ];

    if ( !module->variables )
        module->variables = hashinit( sizeof( VARIABLE ), "variables" );

    v = (VARIABLE *)hash_insert( module->variables, symbol, &found );
    if ( !found )
    {
        v->symbol = object_copy( symbol );
        v->value = L0;
    }

    return &v->value;
}

/*
 * var_dump() - dump a variable to stdout
 */

static void var_dump( OBJECT * symbol, LIST * value, char * what )
{
    out_printf( "%s %s = ", what, object_str( symbol ) );
    list_print( value );
    out_printf( "\n" );
}

/*
 * var_done() - free variable tables
 */

static void delete_var_( void * xvar, void * data )
{
    VARIABLE * const v = (VARIABLE *)xvar;
    object_free( v->symbol );
    list_free( v->value );
}

void var_done( struct module_t * module )
{
    list_free( saved_var );
    saved_var = L0;
    hashenumerate( module->variables, delete_var_, 0 );
    hash_free( module->variables );
}


text:
/*
 * Version macros.
 *
 * This file is part of FFmpeg.
 *
 * FFmpeg is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * FFmpeg is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with FFmpeg; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 */

#ifndef AVFILTER_VERSION_H
#define AVFILTER_VERSION_H

/**
 * @file
 * Libavfilter version macros
 */

#include "libavutil/avutil.h"

#define LIBAVFILTER_VERSION_MAJOR  3
#define LIBAVFILTER_VERSION_MINOR  60
#define LIBAVFILTER_VERSION_MICRO 101

#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
                                               LIBAVFILTER_VERSION_MINOR, \
                                               LIBAVFILTER_VERSION_MICRO)
#define LIBAVFILTER_VERSION     AV_VERSION(LIBAVFILTER_VERSION_MAJOR,   \
                                           LIBAVFILTER_VERSION_MINOR,   \
                                           LIBAVFILTER_VERSION_MICRO)
#define LIBAVFILTER_BUILD       LIBAVFILTER_VERSION_INT

#define LIBAVFILTER_IDENT       "Lavfi" AV_STRINGIFY(LIBAVFILTER_VERSION)

/**
 * FF_API_* defines may be placed below to indicate public API that will be
 * dropped at a future version bump. The defines themselves are not part of
 * the public API and may change, break or disappear at any time.
 */

#ifndef FF_API_AVFILTERPAD_PUBLIC
#define FF_API_AVFILTERPAD_PUBLIC           (LIBAVFILTER_VERSION_MAJOR < 4)
#endif
#ifndef FF_API_FOO_COUNT
#define FF_API_FOO_COUNT                    (LIBAVFILTER_VERSION_MAJOR < 4)
#endif
#ifndef FF_API_FILL_FRAME
#define FF_API_FILL_FRAME                   (LIBAVFILTER_VERSION_MAJOR < 4)
#endif
#ifndef FF_API_BUFFERSRC_BUFFER
#define FF_API_BUFFERSRC_BUFFER             (LIBAVFILTER_VERSION_MAJOR < 4)
#endif
#ifndef FF_API_AVFILTERBUFFER
#define FF_API_AVFILTERBUFFER               (LIBAVFILTER_VERSION_MAJOR < 4)
#endif
#ifndef FF_API_OLD_FILTER_OPTS
#define FF_API_OLD_FILTER_OPTS              (LIBAVFILTER_VERSION_MAJOR < 4)
#endif
#ifndef FF_API_ACONVERT_FILTER
#define FF_API_ACONVERT_FILTER              (LIBAVFILTER_VERSION_MAJOR < 4)
#endif
#ifndef FF_API_AVFILTER_OPEN
#define FF_API_AVFILTER_OPEN                (LIBAVFILTER_VERSION_MAJOR < 4)
#endif
#ifndef FF_API_AVFILTER_INIT_FILTER
#define FF_API_AVFILTER_INIT_FILTER         (LIBAVFILTER_VERSION_MAJOR < 4)
#endif
#ifndef FF_API_OLD_FILTER_REGISTER
#define FF_API_OLD_FILTER_REGISTER          (LIBAVFILTER_VERSION_MAJOR < 4)
#endif

#endif /* AVFILTER_VERSION_H */


text:
tumblr_url: /post/81817340773/no-intro-required
slug: no-intro-required
title: No Intro Required
---

If you’re insane enough to be reading this, then you probably have a sinking suspicion that you don’t need to. And you’re probably right. Except I think you should stay anyway. I might not be a supergenius or a hilarious comedic, but I think I have something to offer. As such, I want you to judge me on what I post here, not who I am. Because that’s germane to the discussion. With that said, here are some of my creds:

Rising Senior in High School

Trumpeter, Flugelhorn player

Bassist, Guitarist, Singer

Apple Enthusiast

Aspiring Developer

Writer

Cynic and Pundit

With that out of the way, let’s get started!


text:
package com.onboard.service.activity;

import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.TreeMap;

import com.onboard.domain.mapper.model.ActivityExample;
import com.onboard.domain.model.Activity;

/**
 * {@link Activity}服务接口
 *
 * @author yewei
 *
 */
public interface ActivityService {

    /**
     * 创建一个Activity对象
     *
     * @param activity
     * @return 返回创建的Activity对象,包括数据库中的id
     */
    Activity create(Activity activity);

    /**
     * 更新Activity
     *
     * @param activity
     * @return
     */
    Activity update(Activity activity);

    /**
     * 删除Activity
     *
     * @param id
     */
    void delete(int id);

    /**
     * 根据id获取Activity对象
     *
     * @param id
     *            Activity id
     * @return
     */
    Activity getById(int id);

    /**
     * 获取一个项目内的Activity
     *
     * @param projectId
     * @param start
     * @param limit
     * @return
     */
    List<Activity> getByProject(int projectId, int start, int limit);

    /**
     * 获取一个项目的Activity,截止到endTime为止, 试取limit条数据,如果最前一条数据的当天还有其它Activity数据,则取完该天的所有数据, 返回的Activity数据最终可能大于limit条。
     *
     * @param projectId
     * @param endTime
     *            截止时间
     * @param limit
     * @return
     */
    List<Activity> getByProjectTillDay(int projectId, Date endTime, int limit);

    /**
     * 获取一个公司的Activity
     *
     * @param projectId
     * @param start
     * @param limit
     * @return
     */
    List<Activity> getByCompany(int projectId, int start, int limit);

    /**
     * 获取一个公司的Activity,截止到endTime为止, 试取limit条数据,如果最前一条数据的当天还有其它Activity数据,则取完该天的所有数据, 返回的Activity数据最终可能大于limit条。
     *
     * @param projectId
     * @param start
     * @param limit
     * @return
     */
    List<Activity> getByCompanyTillDay(int companyId, Date endTime, int limit);

    /**
     * 获取用户的最新Activity列表
     *
     * @param companyId
     * @param userId
     * @param limit
     * @param projectList
     *            如果为空,表示用户参与的所有项目
     * @return
     */
    List<Activity> getLatestByUser(int companyId, int userId, int limit, List<Integer> projectList);

    /**
     * 分页获取一个用户在一个公司的活动
     *
     * @param companyId
     * @param userId
     * @param start
     * @param limit
     * @param projectList
     * @return
     */
    List<Activity> getLatestByUserByPage(int companyId, int userId, int start, int limit, List<Integer> projectList);

    /**
     * 获取一组项目用户相关的活动,基于日期进行分组
     *
     * @param companyId
     * @param userId
     * @param projectList
     *            如果为空,表示用户参与的所有项目
     * @return
     */
    TreeMap<Date, List<Activity>> getByUserGroupByDate(int companyId, int userId, int limit, List<Integer> projectList, Date until);

    /**
     * 获取用户可以查看的Activity信息
     *
     * @param companyId
     * @param filterUserId
     * @param filterProjectId
     * @param endTime
     * @param limit
     * @return
     */
    List<Activity> getUserVisibleTillDay(int companyId, Integer filterUserId, Integer filterProjectId, Date endTime, String type,
            int limit);

    /**
     * 获取用户可以查看的Activity信息
     *
     * @param companyId
     * @param userId
     * @return
     */
    List<Activity> getUserVisibleBySampleTillDay(int companyId, Activity sample, Date endTime, int limit);

    /**
     * 获取一个任务的相关活动信息,其中删除了回复相关的活动信息
     *
     * @param todoId
     * @param start
     * @param limit
     * @return
     */
    List<Activity> getByTodo(int todoId, int start, int limit);

    /**
     * 获取某项目某天的activity
     *
     * @param projectId
     * @param date
     * @return
     */
    List<Activity> getByProjectByDate(int projectId, Date date);

    /**
     * 根据某对象的类型和id来获取activity
     *
     * @param type
     * @param id
     * @return
     */
    List<Activity> getByAttachTypeAndId(String type, int id);

    /**
     * 分页获取一个用户在一个公司的活动
     *
     * @param companyId
     * @param userId
     * @param start
     * @param limit
     * @param projectList
     * @return
     */
    List<Activity> getLatestByBySampleCompanyByPage(Activity sample, int companyId, int start, int limit,
            List<Integer> projectList);

    /**
     * 根据example获取activity
     *
     * @param example
     * @return
     */
    List<Activity> getByActivityExample(ActivityExample example);

    /**
     * 根据attachType和id删除activity
     *
     * @param type
     * @param id
     */
    void deleteByAttachTypeAndId(String type, int id);

    /**
     * 获取某一日期之后所有的该用户的活动信息
     *
     * @author Chenlong
     * @param companyId
     * @param userId
     * @param projectList
     * @param until
     * @return
     */
    List<Activity> getLatestByUserSince(int companyId, int userId, List<Integer> projectList, Date until);

    /**
     * 获取一个用户在某个项目中某时间范围内的活动
     *
     * @param projectId
     * @param start
     * @param end
     * @return
     */
    List<Activity> getByProjectBetweenDates(int projectId, Date start, Date end);

    List<Activity> getByUserGroupByDateReturnList(int companyId, int userId, int limit, List<Integer> projectList, Date until);

    /**
     * 获取一个用户在某个项目中某时间范围内的活动
     *
     * @param projectId
     * @param userId
     * @param start
     * @param end
     * @return
     */
    List<Activity> getByProjectUserBetweenDates(int projectId, int userId, Date start, Date end);

    /**
     * 获取团队成员某段时间的活动数
     *
     * @param companyId
     * @param since
     * @param until
     * @return
     */
    Map<Integer, Integer> getActivityCountForUsers(Integer companyId, Date since, Date until);

    /**
     * 获取团队成员某段时间内每天的活动数
     *
     * @param companyId
     * @param since
     * @param until
     * @return
     */
    List<Map<String, ?>> getActivityCountForUsersGroupByDate(Integer companyId, Date since, Date until);

    List<Activity> getActivitiesByCompanyAndDates(Integer companyId, Date since, Date until);
}


text:
package com.netease.nim.demo.contact.helper;

import android.widget.Toast;

import com.netease.nim.demo.DemoCache;
import com.netease.nim.demo.R;
import com.netease.nim.uikit.common.util.log.LogUtil;
import com.netease.nimlib.sdk.NIMClient;
import com.netease.nimlib.sdk.RequestCallbackWrapper;
import com.netease.nimlib.sdk.ResponseCode;
import com.netease.nimlib.sdk.uinfo.UserService;
import com.netease.nimlib.sdk.uinfo.constant.UserInfoFieldEnum;

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

/**
 * Created by hzxuwen on 2015/9/17.
 */
public class UserUpdateHelper {
    private static final String TAG = UserUpdateHelper.class.getSimpleName();

    /**
     * 更新用户资料
     */
    public static void update(final UserInfoFieldEnum field, final Object value, RequestCallbackWrapper<Void> callback) {
        Map<UserInfoFieldEnum, Object> fields = new HashMap<>(1);
        fields.put(field, value);
        update(fields, callback);
    }

    private static void update(final Map<UserInfoFieldEnum, Object> fields, final RequestCallbackWrapper<Void> callback) {
        NIMClient.getService(UserService.class).updateUserInfo(fields).setCallback(new RequestCallbackWrapper<Void>() {
            @Override
            public void onResult(int code, Void result, Throwable exception) {

                if (code == ResponseCode.RES_SUCCESS) {
                    LogUtil.i(TAG, "update userInfo success, update fields count=" + fields.size());
                } else {
                    if (exception != null) {
                        Toast.makeText(DemoCache.getContext(), R.string.user_info_update_failed, Toast.LENGTH_SHORT).show();
                        LogUtil.i(TAG, "update userInfo failed, exception=" + exception.getMessage());
                    }
                }
                if (callback != null) {
                    callback.onResult(code, result, exception);
                }
            }
        });
    }
}


text:
This is a basic sample that loads the Traffic Module and display a traffic layer over the Bing Maps v8 Javascript control.

[See it Run](http://crpietschmann.github.io/bingmaps-v8-quickstart-samples/201-module-traffic/)

[View Code](index.htm)


text:
Below are some common commands for performing tasks using Git (with Github in mind as the target remote host).

- Setup initial configuration
	```sh
	$ git config --global user.name "Bob Smith"
	$ git config --global user.email bobsmith@gmail.com
	```

- Initialize a repository
	```sh
	$ git init
	```

- Clone a repository
	```sh
	$ git clone git@github.com:bobsmith/project.git
	```

- Check the current status of staged files
	```sh
	$ git status
	```

- Add changes to be staged
	```sh
	$ git add -A
	```

- Commit the added changes
	```sh
	$ git commit -m "initial commit"
	```

- Push latest commit to remote branch
	```sh
	$ git push origin master
	```

- Pull latest commit from remote branch
	```sh
	$ git pull origin master
	```

- Check the current branch
	```sh
	$ git branch
	```

- Checkout an existing branch
	```sh
	$ git checkout branchname
	```

- Create a new branch and switch to it
	```sh
	$ git checkout -b branchname
	```

- Delete an existing branch
	```sh
	$ git branch -d branchname
	```

- Add a local branch to the remote repository
	```sh
	$ git push origin branchname
	```

- Merge a branch into the master branch
	```sh
	$ git merge branchname
	$ git pull
	$ git add -A
	$ git commit -m "merged branchname into master, resolved any conflicts"
	$ git push origin master
	```

- Reset the local repository to the most recent remote commit
	```sh
	$ git reset --hard
	```

- Print verbose logging information about the repository tree
	```sh
	$ git log --graph --all --pretty=format:'%Cgreen%h%Creset -%Cblue%d%Creset %s %C(yellow)(%cr) %C(bold red)<%an>%Creset' --abbrev-commit
	```


text:
<!DOCTYPE html>

<title>Calendar_CalendarItem_set_location_geolocation_categories</title>


text:
package androidx.work.multiprocess.parcelable;

import android.os.Parcel;
import android.os.Parcelable;

import androidx.annotation.NonNull;
import androidx.annotation.RestrictTo;

/**
 * @hide
 */
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
public final class ParcelConverters {
    private ParcelConverters() {
        // Does nothing
    }

    /**
     * Marshalls a {@link Parcelable}.
     */
    @NonNull
    public static byte[] marshall(@NonNull Parcelable parcelable) {
        Parcel parcel = Parcel.obtain();
        try {
            parcelable.writeToParcel(parcel, 0 /* flags */);
            return parcel.marshall();
        } finally {
            parcel.recycle();
        }
    }

    /**
     * Unmarshalls a {@code byte[]} to the {@link T} given a {@link android.os.Parcelable.Creator}.
     */
    @NonNull
    public static <T> T unmarshall(
            @NonNull byte[] array,
            @NonNull Parcelable.Creator<T> creator) {

        Parcel parcel = Parcel.obtain();
        try {
            parcel.unmarshall(array, 0, array.length);
            parcel.setDataPosition(0); // reset
            return creator.createFromParcel(parcel);
        } finally {
            parcel.recycle();
        }
    }
}