text:
import asyncio
import logging
import random
import time
import traceback
import uuid
from typing import Callable, Dict, List, Optional, Union

from av import AudioFrame
from av.frame import Frame

from . import clock, rtp
from .codecs import get_capabilities, get_encoder, is_rtx
from .codecs.base import Encoder
from .exceptions import InvalidStateError
from .mediastreams import MediaStreamError, MediaStreamTrack
from .rtcrtpparameters import RTCRtpCodecParameters, RTCRtpSendParameters
from .rtp import (
    RTCP_PSFB_APP,
    RTCP_PSFB_PLI,
    RTCP_RTPFB_NACK,
    RTP_HISTORY_SIZE,
    AnyRtcpPacket,
    RtcpByePacket,
    RtcpPsfbPacket,
    RtcpRrPacket,
    RtcpRtpfbPacket,
    RtcpSdesPacket,
    RtcpSenderInfo,
    RtcpSourceInfo,
    RtcpSrPacket,
    RtpPacket,
    unpack_remb_fci,
    wrap_rtx,
)
from .stats import (
    RTCOutboundRtpStreamStats,
    RTCRemoteInboundRtpStreamStats,
    RTCStatsReport,
)
from .utils import random16, random32, uint16_add, uint32_add

logger = logging.getLogger(__name__)

RTT_ALPHA = 0.85

class RTCEncodedFrame:
    def __init__(self, payloads: List[bytes], timestamp: int, audio_level: int):
        self.payloads = payloads
        self.timestamp = timestamp
        self.audio_level = audio_level

class RTCRtpSender:
    """
    The :class:`RTCRtpSender` interface provides the ability to control and
    obtain details about how a particular :class:`MediaStreamTrack` is encoded
    and sent to a remote peer.

    :param trackOrKind: Either a :class:`MediaStreamTrack` instance or a
                         media kind (`'audio'` or `'video'`).
    :param transport: An :class:`RTCDtlsTransport`.
    """

    def __init__(self, trackOrKind: Union[MediaStreamTrack, str], transport) -> None:
        if transport.state == "closed":
            raise InvalidStateError

        if isinstance(trackOrKind, MediaStreamTrack):
            self.__kind = trackOrKind.kind
            self.replaceTrack(trackOrKind)
        else:
            self.__kind = trackOrKind
            self.replaceTrack(None)
        self.__cname: Optional[str] = None
        self._ssrc = random32()
        self._rtx_ssrc = random32()
        # FIXME: how should this be initialised?
        self._stream_id = str(uuid.uuid4())
        self.__encoder: Optional[Encoder] = None
        self.__force_keyframe = False
        self.__loop = asyncio.get_event_loop()
        self.__mid: Optional[str] = None
        self.__rtp_exited = asyncio.Event()
        self.__rtp_header_extensions_map = rtp.HeaderExtensionsMap()
        self.__rtp_started = asyncio.Event()
        self.__rtp_task: Optional[asyncio.Future[None]] = None
        self.__rtp_history: Dict[int, RtpPacket] = {}
        self.__rtcp_exited = asyncio.Event()
        self.__rtcp_started = asyncio.Event()
        self.__rtcp_task: Optional[asyncio.Future[None]] = None
        self.__rtx_payload_type: Optional[int] = None
        self.__rtx_sequence_number = random16()
        self.__started = False
        self.__stats = RTCStatsReport()
        self.__transport = transport

        # stats
        self.__lsr: Optional[int] = None
        self.__lsr_time: Optional[float] = None
        self.__ntp_timestamp = 0
        self.__rtp_timestamp = 0
        self.__octet_count = 0
        self.__packet_count = 0
        self.__rtt = None

        # logging
        self.__log_debug: Callable[..., None] = lambda *args: None
        if logger.isEnabledFor(logging.DEBUG):
            self.__log_debug = lambda msg, *args: logger.debug(
                f"RTCRtpSender(%s) {msg}", self.__kind, *args
            )

    @property
    def kind(self):
        return self.__kind

    @property
    def track(self) -> MediaStreamTrack:
        """
        The :class:`MediaStreamTrack` which is being handled by the sender.
        """
        return self.__track

    @property
    def transport(self):
        """
        The :class:`RTCDtlsTransport` over which media data for the track is
        transmitted.
        """
        return self.__transport

    @classmethod
    def getCapabilities(self, kind):
        """
        Returns the most optimistic view of the system's capabilities for
        sending media of the given `kind`.

        :rtype: :class:`RTCRtpCapabilities`
        """
        return get_capabilities(kind)

    async def getStats(self) -> RTCStatsReport:
        """
        Returns statistics about the RTP sender.

        :rtype: :class:`RTCStatsReport`
        """
        self.__stats.add(
            RTCOutboundRtpStreamStats(
                # RTCStats
                timestamp=clock.current_datetime(),
                type="outbound-rtp",
                id="outbound-rtp_" + str(id(self)),
                # RTCStreamStats
                ssrc=self._ssrc,
                kind=self.__kind,
                transportId=self.transport._stats_id,
                # RTCSentRtpStreamStats
                packetsSent=self.__packet_count,
                bytesSent=self.__octet_count,
                # RTCOutboundRtpStreamStats
                trackId=str(id(self.track)),
            )
        )
        self.__stats.update(self.transport._get_stats())

        return self.__stats

    def replaceTrack(self, track: Optional[MediaStreamTrack]) -> None:
        self.__track = track
        if track is not None:
            self._track_id = track.id
        else:
            self._track_id = str(uuid.uuid4())

    def setTransport(self, transport) -> None:
        self.__transport = transport

    async def send(self, parameters: RTCRtpSendParameters) -> None:
        """
        Attempt to set the parameters controlling the sending of media.

        :param parameters: The :class:`RTCRtpSendParameters` for the sender.
        """
        if not self.__started:
            self.__cname = parameters.rtcp.cname
            self.__mid = parameters.muxId

            # make note of the RTP header extension IDs
            self.__transport._register_rtp_sender(self, parameters)
            self.__rtp_header_extensions_map.configure(parameters)

            # make note of RTX payload type
            for codec in parameters.codecs:
                if (
                    is_rtx(codec)
                    and codec.parameters["apt"] == parameters.codecs[0].payloadType
                ):
                    self.__rtx_payload_type = codec.payloadType
                    break

            self.__rtp_task = asyncio.ensure_future(self._run_rtp(parameters.codecs[0]))
            self.__rtcp_task = asyncio.ensure_future(self._run_rtcp())
            self.__started = True

    async def stop(self):
        """
        Irreversibly stop the sender.
        """
        if self.__started:
            self.__transport._unregister_rtp_sender(self)

            # shutdown RTP and RTCP tasks
            await asyncio.gather(self.__rtp_started.wait(), self.__rtcp_started.wait())
            self.__rtp_task.cancel()
            self.__rtcp_task.cancel()
            await asyncio.gather(self.__rtp_exited.wait(), self.__rtcp_exited.wait())

    async def _handle_rtcp_packet(self, packet):
        if isinstance(packet, (RtcpRrPacket, RtcpSrPacket)):
            for report in filter(lambda x: x.ssrc == self._ssrc, packet.reports):
                # estimate round-trip time
                if self.__lsr == report.lsr and report.dlsr:
                    rtt = time.time() - self.__lsr_time - (report.dlsr / 65536)
                    if self.__rtt is None:
                        self.__rtt = rtt
                    else:
                        self.__rtt = RTT_ALPHA * self.__rtt + (1 - RTT_ALPHA) * rtt

                self.__stats.add(
                    RTCRemoteInboundRtpStreamStats(
                        # RTCStats
                        timestamp=clock.current_datetime(),
                        type="remote-inbound-rtp",
                        id="remote-inbound-rtp_" + str(id(self)),
                        # RTCStreamStats
                        ssrc=packet.ssrc,
                        kind=self.__kind,
                        transportId=self.transport._stats_id,
                        # RTCReceivedRtpStreamStats
                        packetsReceived=self.__packet_count - report.packets_lost,
                        packetsLost=report.packets_lost,
                        jitter=report.jitter,
                        # RTCRemoteInboundRtpStreamStats
                        roundTripTime=self.__rtt,
                        fractionLost=report.fraction_lost,
                    )
                )
        elif isinstance(packet, RtcpRtpfbPacket) and packet.fmt == RTCP_RTPFB_NACK:
            for seq in packet.lost:
                await self._retransmit(seq)
        elif isinstance(packet, RtcpPsfbPacket) and packet.fmt == RTCP_PSFB_PLI:
            self._send_keyframe()
        elif isinstance(packet, RtcpPsfbPacket) and packet.fmt == RTCP_PSFB_APP:
            try:
                bitrate, ssrcs = unpack_remb_fci(packet.fci)
                if self._ssrc in ssrcs:
                    self.__log_debug(
                        "- receiver estimated maximum bitrate %d bps", bitrate
                    )
                    if self.__encoder and hasattr(self.__encoder, "target_bitrate"):
                        self.__encoder.target_bitrate = bitrate
            except ValueError:
                pass

    async def _next_encoded_frame(self, codec: RTCRtpCodecParameters):
        # get [Frame|Packet]
        data = await self.__track.recv()
        audio_level = None

        if self.__encoder is None:
            self.__encoder = get_encoder(codec)

        if isinstance(data, Frame):
            # encode frame
            if isinstance(data, AudioFrame):
                audio_level = rtp.compute_audio_level_dbov(data)

            force_keyframe = self.__force_keyframe
            self.__force_keyframe = False
            payloads, timestamp = await self.__loop.run_in_executor(
                None, self.__encoder.encode, data, force_keyframe
            )
        else:
            payloads, timestamp = self.__encoder.pack(data)

        return RTCEncodedFrame(payloads, timestamp, audio_level)

    async def _retransmit(self, sequence_number: int) -> None:
        """
        Retransmit an RTP packet which was reported as lost.
        """
        packet = self.__rtp_history.get(sequence_number % RTP_HISTORY_SIZE)
        if packet and packet.sequence_number == sequence_number:
            if self.__rtx_payload_type is not None:
                packet = wrap_rtx(
                    packet,
                    payload_type=self.__rtx_payload_type,
                    sequence_number=self.__rtx_sequence_number,
                    ssrc=self._rtx_ssrc,
                )
                self.__rtx_sequence_number = uint16_add(self.__rtx_sequence_number, 1)

            self.__log_debug("> %s", packet)
            packet_bytes = packet.serialize(self.__rtp_header_extensions_map)
            await self.transport._send_rtp(packet_bytes)

    def _send_keyframe(self) -> None:
        """
        Request the next frame to be a keyframe.
        """
        self.__force_keyframe = True

    async def _run_rtp(self, codec: RTCRtpCodecParameters) -> None:
        self.__log_debug("- RTP started")
        self.__rtp_started.set()

        sequence_number = random16()
        timestamp_origin = random32()
        try:
            while True:
                if not self.__track:
                    await asyncio.sleep(0.02)
                    continue

                enc_frame = await self._next_encoded_frame(codec)
                timestamp = uint32_add(timestamp_origin, enc_frame.timestamp)

                for i, payload in enumerate(enc_frame.payloads):
                    packet = RtpPacket(
                        payload_type=codec.payloadType,
                        sequence_number=sequence_number,
                        timestamp=timestamp,
                    )
                    packet.ssrc = self._ssrc
                    packet.payload = payload
                    packet.marker = (i == len(enc_frame.payloads) - 1) and 1 or 0

                    # set header extensions
                    packet.extensions.abs_send_time = (
                        clock.current_ntp_time() >> 14
                    ) & 0x00FFFFFF
                    packet.extensions.mid = self.__mid
                    if enc_frame.audio_level is not None:
                        packet.extensions.audio_level = (False, -enc_frame.audio_level)

                    # send packet
                    self.__log_debug("> %s", packet)
                    self.__rtp_history[
                        packet.sequence_number % RTP_HISTORY_SIZE
                    ] = packet
                    packet_bytes = packet.serialize(self.__rtp_header_extensions_map)
                    await self.transport._send_rtp(packet_bytes)

                    self.__ntp_timestamp = clock.current_ntp_time()
                    self.__rtp_timestamp = packet.timestamp
                    self.__octet_count += len(payload)
                    self.__packet_count += 1
                    sequence_number = uint16_add(sequence_number, 1)
        except (asyncio.CancelledError, ConnectionError, MediaStreamError):
            pass
        except Exception:
            # we *need* to set __rtp_exited, otherwise RTCRtpSender.stop() will hang,
            # so issue a warning if we hit an unexpected exception
            self.__log_warning(traceback.format_exc())

        # stop track
        if self.__track:
            self.__track.stop()
            self.__track = None

        self.__log_debug("- RTP finished")
        self.__rtp_exited.set()

    async def _run_rtcp(self) -> None:
        self.__log_debug("- RTCP started")
        self.__rtcp_started.set()

        try:
            while True:
                # The interval between RTCP packets is varied randomly over the
                # range [0.5, 1.5] times the calculated interval.
                await asyncio.sleep(0.5 + random.random())

                # RTCP SR
                packets: List[AnyRtcpPacket] = [
                    RtcpSrPacket(
                        ssrc=self._ssrc,
                        sender_info=RtcpSenderInfo(
                            ntp_timestamp=self.__ntp_timestamp,
                            rtp_timestamp=self.__rtp_timestamp,
                            packet_count=self.__packet_count,
                            octet_count=self.__octet_count,
                        ),
                    )
                ]
                self.__lsr = ((self.__ntp_timestamp) >> 16) & 0xFFFFFFFF
                self.__lsr_time = time.time()

                # RTCP SDES
                if self.__cname is not None:
                    packets.append(
                        RtcpSdesPacket(
                            chunks=[
                                RtcpSourceInfo(
                                    ssrc=self._ssrc,
                                    items=[(1, self.__cname.encode("utf8"))],
                                )
                            ]
                        )
                    )

                await self._send_rtcp(packets)
        except asyncio.CancelledError:
            pass

        # RTCP BYE
        packet = RtcpByePacket(sources=[self._ssrc])
        await self._send_rtcp([packet])

        self.__log_debug("- RTCP finished")
        self.__rtcp_exited.set()

    async def _send_rtcp(self, packets: List[AnyRtcpPacket]) -> None:
        payload = b""
        for packet in packets:
            self.__log_debug("> %s", packet)
            payload += bytes(packet)

        try:
            await self.transport._send_rtp(payload)
        except ConnectionError:
            pass

    def __log_warning(self, msg: str, *args) -> None:
        logger.warning(f"RTCRtpsender(%s) {msg}", self.__kind, *args)


text:
package co.edu.uniandes.csw.bookstore.exceptions;

import javax.ejb.ApplicationException;

/**
 * Expeción utilizada para representar errores en la lógica de negocio.
 * Se utiliza para diferenciar los errores externos de aquellos que provienen
 * de condiciones que no se cumplen, como IDs repetidos, atributos necesarios,
 * operaciones prohibidas o sin autorización entre otros.
 * @author ISIS2603
 */
@ApplicationException(rollback = true)
public class BusinessLogicException extends Exception {

    public BusinessLogicException() {
    }

    /**
     * Constructor con un mensaje
     *
     * @param message mensaje de la excepción
     */
    public BusinessLogicException(String message) {
        super(message);
    }

    /**
     * Constructor con una causa
     *
     * @param cause causa de la excepción. Usada para generar la traza.
     */
    public BusinessLogicException(Throwable cause) {
        super(cause);
    }

    /**
     * Constructor con mensaje y causa.
     *
     * @param message mensaje de la excepción
     * @param cause causa de la excepción. Usada para generar la traza.
     */
    public BusinessLogicException(String message, Throwable cause) {
        super(message, cause);
    }
}

redpajama_set_name: RedPajamaGithub


text:
using System;
using System.ComponentModel;
using System.Web.Mvc;
using TwitterBootstrapMVC.Infrastructure.Enums;
using TwitterBootstrapMVC.Renderers;
using TwitterBootstrapMVC.TypeExtensions;

namespace TwitterBootstrapMVC.Controls
{
    public class BootstrapControlGroupLabeled : BootstrapInputLabeled
    {
        public BootstrapControlGroupLabeled(HtmlHelper html, object inputModel, BootstrapInputType inputType)
            : base(html, inputModel, inputType)
        {
        }

        [EditorBrowsable(EditorBrowsableState.Never)]
        public override string ToHtmlString()
        {
            var input = string.Empty;
            switch (_inputType)
            {
                case BootstrapInputType._NotSet:
                    return null;
                case BootstrapInputType.TextBox:
                    _labelModel.htmlAttributes.AddOrMergeCssClass("class", "control-label");
                    input = Renderer.RenderControlGroupTextBox(html, _inputModel, _labelModel);
                    break;
                case BootstrapInputType.Password:
                    _labelModel.htmlAttributes.AddOrMergeCssClass("class", "control-label");
                    input = Renderer.RenderControlGroupPassword(html, _inputModel, _labelModel);
                    break;
                case BootstrapInputType.File:
                    _labelModel.htmlAttributes.AddOrMergeCssClass("class", "control-label");
                    input = Renderer.RenderControlGroupFile(html, _inputModel, _labelModel);
                    break;
                case BootstrapInputType.CheckBox:
                    _labelModel.htmlAttributes.AddOrMergeCssClass("class", "checkbox");
                    _labelModel.innerInputType = BootstrapInputType.CheckBox;
                    _labelModel.innerInputModel = _inputModel;
                    input = Renderer.RenderControlGroupCheckBox(html, _inputModel, _labelModel);
                    break;
                case BootstrapInputType.Radio:
                    _labelModel.htmlAttributes.AddOrMergeCssClass("class", "radio");
                    _labelModel.innerInputType = BootstrapInputType.Radio;
                    _labelModel.innerInputModel = _inputModel;
                    input = Renderer.RenderControlGroupRadioButton(html, _inputModel, _labelModel);
                    break;
                case BootstrapInputType.RadioTrueFalse:
                    _labelModel.htmlAttributes.AddOrMergeCssClass("class", "control-label");
                    input = Renderer.RenderControlGroupRadioButtonTrueFalse(html, _inputModel, _labelModel);
                    break;
                case BootstrapInputType.DropDownList:
                    _labelModel.htmlAttributes.AddOrMergeCssClass("class", "control-label");
                    input = Renderer.RenderControlGroupSelectElement(html, _inputModel, _labelModel, BootstrapInputType.DropDownList);
                    break;
                case BootstrapInputType.ListBox:
                    _labelModel.htmlAttributes.AddOrMergeCssClass("class", "control-label");
                    input = Renderer.RenderControlGroupSelectElement(html, _inputModel, _labelModel, BootstrapInputType.ListBox);
                    break;
                case BootstrapInputType.TextArea:
                    _labelModel.htmlAttributes.AddOrMergeCssClass("class", "control-label");
                    input = Renderer.RenderControlGroupTextArea(html, _inputModel, _labelModel);
                    break;
                case BootstrapInputType.Custom:
                    _labelModel.htmlAttributes.AddOrMergeCssClass("class", "control-label");
                    input = Renderer.RenderControlGroupCustom(html, _inputModel.input, _labelModel);
                    break;
                case BootstrapInputType.Display:
                    _labelModel.htmlAttributes.AddOrMergeCssClass("class", "control-label");
                    input = Renderer.RenderControlGroupDisplayText(html, _inputModel, _labelModel);
                    break;
            }
            return input;
        }

        [EditorBrowsable(EditorBrowsableState.Never)]
        public override string ToString() { return ToHtmlString(); }

        [EditorBrowsable(EditorBrowsableState.Never)]
        public override bool Equals(object obj) { return base.Equals(obj); }

        [EditorBrowsable(EditorBrowsableState.Never)]
        public override int GetHashCode() { return base.GetHashCode(); }

        [EditorBrowsable(EditorBrowsableState.Never)]
        public new Type GetType() { return base.GetType(); }
    }
}


text:
package com.haojiankang.framework.provider.sysmanager.api.model.vo.sysmgr;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import com.haojiankang.framework.provider.sysmanager.api.supports.vo.BaseVO;

public class VOUser  extends BaseVO {
    {
        userType = 0;
        roles=new ArrayList<>();
        organization=new VOOrganization();
    }
    private static final long serialVersionUID = -3907336598168676917L;
    private String userName;
    private String password;
    private String fullname;
    private String doctcode;

    private Integer sex;

    private Date birthday;

    private String tel;

    private String fax;

    private Integer flag;

    private String mail;
    private Integer userType;

    private List<VORole> roles;

    private VOOrganization organization;

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getFullname() {
        return fullname;
    }

    public void setFullname(String fullname) {
        this.fullname = fullname;
    }

    public String getDoctcode() {
        return doctcode;
    }

    public void setDoctcode(String doctcode) {
        this.doctcode = doctcode;
    }

    public Integer getSex() {
        return sex;
    }

    public void setSex(Integer sex) {
        this.sex = sex;
    }

    public Date getBirthday() {
        return birthday;
    }

    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }

    public String getTel() {
        return tel;
    }

    public void setTel(String tel) {
        this.tel = tel;
    }

    public String getFax() {
        return fax;
    }

    public void setFax(String fax) {
        this.fax = fax;
    }

    public Integer getFlag() {
        return flag;
    }

    public void setFlag(Integer flag) {
        this.flag = flag;
    }

    public String getMail() {
        return mail;
    }

    public void setMail(String mail) {
        this.mail = mail;
    }

    public static long getSerialversionuid() {
        return serialVersionUID;
    }

    public List<VORole> getRoles() {
        return roles;
    }

    public void setRoles(List<VORole> roles) {
        this.roles = roles;
    }

    public VOOrganization getOrganization() {
        return organization;
    }

    public void setOrganization(VOOrganization organization) {
        this.organization = organization;
    }

    public Integer getUserType() {
        return userType;
    }

    public void setUserType(Integer userType) {
        this.userType = userType;
    }

}


text:
A project estimation tool in html/javascript based upon the PERT estimation technique.

## Installing

Just download it and point your browser to the index.html file.

### Dependencies

* jQuery [provided]
* Sisyphus [provided]

## Features

- Keyboard navigation with arrows
- Enter a new task with `Shift-Enter`
- export estimations as a *.csv file
- storing the content in the browser localStorage

## TODO and Wishlist

* Reordering of task via keyboard or/and drag and drop.
* uploading a csv file

## License

This project is licensed under Apache 2.0 see the LICENSE file in the project root

## Issues

* If you insert a task in the middle of your list and reload the page the stored order is incorrect.

## Contributing

Contributions are welcome!


text:
package de._125m125.kt.okhttp.helper.modifier;

import okhttp3.OkHttpClient.Builder;
import okhttp3.Request;

public class UserKeyRemover implements ClientModifier {
    @Override
    public Builder modify(final Builder clientBuilder) {
        return clientBuilder.addInterceptor(chain -> {
            final Request r = chain.request().newBuilder().removeHeader("userKey").build();
            return chain.proceed(r);
        });
    }
}


text:
<AssignMessage name="AM-Redirect-to-Logout">
  <Remove>
    <Payload/>
    <Headers/>
  </Remove>
  <Set>
    <StatusCode>302</StatusCode>
    <Headers>
      <Header name="Location">{request.queryparam.post_logout_redirect_uri}</Header>
    </Headers>
  </Set>
  <IgnoreUnresolvedVariables>true</IgnoreUnresolvedVariables>
</AssignMessage>


text:
namespace cryptohome {
class Identification;
}  // namespace cryptohome

namespace arc {

// An adapter to talk to a Chrome OS daemon to manage lifetime of ARC instance.
class ArcClientAdapter {
 public:
  class Observer {
   public:
    virtual ~Observer() = default;
    virtual void ArcInstanceStopped(bool is_system_shutdown) = 0;
  };

  // DemoModeDelegate contains functions used to load the demo session apps for
  // ARC. The adapter cannot do this directly because ash::DemoSession classes
  // are in //chrome.
  class DemoModeDelegate {
   public:
    virtual ~DemoModeDelegate() = default;

    // Ensures that the demo session resources are loaded, if demo mode
    // is enabled. This must be called before GetDemoAppsPath().
    virtual void EnsureResourcesLoaded(base::OnceClosure callback) = 0;

    // Gets the path of the image containing demo session Android apps. Returns
    // an empty path if demo mode is not enabled.
    virtual base::FilePath GetDemoAppsPath() = 0;
  };

  // Creates a default instance of ArcClientAdapter.
  static std::unique_ptr<ArcClientAdapter> Create();

  ArcClientAdapter(const ArcClientAdapter&) = delete;
  ArcClientAdapter& operator=(const ArcClientAdapter&) = delete;

  virtual ~ArcClientAdapter();

  // StartMiniArc starts ARC with only a handful of ARC processes for Chrome OS
  // login screen.
  virtual void StartMiniArc(StartParams params,
                            chromeos::VoidDBusMethodCallback callback) = 0;

  // UpgradeArc upgrades a mini ARC instance to a full ARC instance.
  virtual void UpgradeArc(UpgradeParams params,
                          chromeos::VoidDBusMethodCallback callback) = 0;

  // Asynchronously stops the ARC instance. |on_shutdown| is true if the method
  // is called due to the browser being shut down. Also backs up the ARC
  // bug report if |should_backup_log| is set to true.
  virtual void StopArcInstance(bool on_shutdown, bool should_backup_log) = 0;

  // Sets a hash string of the profile user IDs and an ARC serial number for the
  // user.
  virtual void SetUserInfo(const cryptohome::Identification& cryptohome_id,
                           const std::string& hash,
                           const std::string& serial_number) = 0;

  // Provides the DemoModeDelegate which will be used to load the demo session
  // apps path.
  virtual void SetDemoModeDelegate(DemoModeDelegate* delegate) = 0;

  // Trims VM's memory by moving it to zram. |callback| is called when the
  // operation is done.
  using TrimVmMemoryCallback =
      base::OnceCallback<void(bool success, const std::string& failure_reason)>;
  virtual void TrimVmMemory(TrimVmMemoryCallback callback) = 0;

  void AddObserver(Observer* observer);
  void RemoveObserver(Observer* observer);

 protected:
  ArcClientAdapter();

  base::ObserverList<Observer>::Unchecked observer_list_;
};

}  // namespace arc

#endif  // ASH_COMPONENTS_ARC_SESSION_ARC_CLIENT_ADAPTER_H_


text:
Configure Assignments

Configure course assignments and assign due dates for the courses you teach in the learning community.

Note: The system will auto populate the fields based on instructor name,Configure assignments by selecting the options presented in the each field.

<a href="<?php echo Yii::$app->getUrlManager()->createUrl('site/assignmentcreate') ?>">Create

<a href="<?php echo Yii::$app->getUrlManager()->createUrl('site/assignmentview') ?>">View

<a href="<?php echo Yii::$app->getUrlManager()->createUrl('site/assignmentarchive') ?>">Archive

                <form class="form-horizontal" role="form" id="">

                        Instructor Name

                                <select class="form-control">
                                    <option>Select One</option>
                                    <option>Option 1</option>
                                    <option>Option 2</option>
                                    <option>Option 3</option>
                                </select>

                        eCourse Title

                                <select class="form-control">
                                    <option>Select One</option>
                                    <option>Option 1</option>
                                    <option>Option 2</option>
                                    <option>Option 3</option>
                                </select>

                        EC Code

                                <select class="form-control">
                                    <option>Select One</option>
                                    <option>Option 1</option>
                                    <option>Option 2</option>
                                    <option>Option 3</option>
                                </select>

                        Session

                                <select class="form-control">
                                    <option>Select One</option>
                                    <option>Option 1</option>
                                    <option>Option 2</option>
                                    <option>Option 3</option>
                                </select>

                        Year

                                <select class="form-control">
                                    <option>Select One</option>
                                    <option>Option 1</option>
                                    <option>Option 2</option>
                                    <option>Option 3</option>
                                </select>

                        Quarter

                                <select class="form-control">
                                    <option>Select One</option>
                                    <option>Option 1</option>
                                    <option>Option 2</option>
                                    <option>Option 3</option>
                                </select>

                        Assignment

                                <select class="form-control">
                                    <option>Select One</option>
                                    <option>Option 1</option>
                                    <option>Option 2</option>
                                    <option>Option 3</option>
                                </select>

                        Link

                                <input type="text" class="form-control" placeholder="Edit or enter Assignment Link"/>

                                <input type="submit" class="btn btn-danger btn-small margin-left-15px" value="Upload">

                        Due Date

                                <select class="form-control">
                                    <option>Select One</option>
                                    <option>Option 1</option>
                                    <option>Option 2</option>
                                    <option>Option 3</option>
                                </select>

Select a due date from the calender

                        <input type="submit" class="btn btn-danger" value="Save">

                </form>

Configuring Assignments

Select Instructor Name

Select eCourse Name

Select eClass ID

Select Session

Select Year

Select Quarter

Select Name of Assignment

Edit or enter Assignment Link

Select Due Date

Click Submit button


text:
import $ from 'dom7';

function clearPreviousHistory() {
  const router = this;
  const app = router.app;
  const separateNavbar = router.separateNavbar;
  const url = router.history[router.history.length - 1];

  const $currentPageEl = $(router.currentPageEl);

  const $pagesToRemove = router.$el
    .children('.page:not(.stacked)')
    .filter((index, pageInView) => pageInView !== $currentPageEl[0]);

  $pagesToRemove.each((index, pageEl) => {
    const $oldPageEl = $(pageEl);
    const $oldNavbarInnerEl = $(app.navbar.getElByPage($oldPageEl));
    if (router.params.stackPages && router.initialPages.indexOf($oldPageEl[0]) >= 0) {
      $oldPageEl.addClass('stacked');
      if (separateNavbar) {
        $oldNavbarInnerEl.addClass('stacked');
      }
    } else {
      // Page remove event
      router.pageCallback('beforeRemove', $oldPageEl, $oldNavbarInnerEl, 'previous', undefined, {});
      router.removePage($oldPageEl);
      if (separateNavbar && $oldNavbarInnerEl.length) {
        router.removeNavbar($oldNavbarInnerEl);
      }
    }
  });

  router.history = [url];
  router.view.history = [url];
  router.saveHistory();
}

export { clearPreviousHistory }; // eslint-disable-line


text:
package org.dhira.core.optimize.api

import org.dhira.core.containers.Pair
import org.dhira.core.nnet.api.Model
import org.dhira.core.nnet.api.Updater
import org.dhira.core.nnet.conf.NeuralNetConfiguration
import org.dhira.core.nnet.gradient.Gradient
import org.dhira.core.nnet.updater.graph.ComputationGraphUpdater
import org.nd4j.linalg.api.ndarray.INDArray
import org.dhira.core.optimize.api.IterationListener
import java.io.Serializable

/**
 * Convex optimizer.
 * @author Adam Gibson
 */
trait ConvexOptimizer extends Serializable {
  /**
   * The score for the optimizer so far
   * @return the score for this optimizer so far
   */
  def score: Double

  def getUpdater: Updater

  def getComputationGraphUpdater: ComputationGraphUpdater

  def setUpdater(updater: Updater)

  def setUpdaterComputationGraph(updater: ComputationGraphUpdater)

  def setListeners(listeners: Iterable[IterationListener])

  def getConf: NeuralNetConfiguration

  /**
   * The gradient and score for this optimizer
   * @return the gradient and score for this optimizer
   */
  def gradientAndScore: Pair[Gradient, Double]

  /**
   * Calls optimize
   * @return whether the convex optimizer
   *         converted or not
   */
  def optimize: Boolean

  /**
   * The batch size for the optimizer
   * @return
   */
  def batchSize: Int

  /**
   * Set the batch size for the optimizer
   * @param batchSize
   */
  def setBatchSize(batchSize: Int)

  /**
   * Pre preProcess a line before an iteration
   */
  def preProcessLine

  /**
   * After the step has been made, do an action
   * @param line
   **/
  def postStep(line: INDArray)

  /**
   * Based on the gradient and score
   * setup a search state
   * @param pair the gradient and score
   */
  def setupSearchState(pair: Pair[Gradient, Double])

  /**
   * Update the gradient according to the configuration such as adagrad, momentum, and sparsity
   * @param gradient the gradient to modify
   * @param model the model with the parameters to update
   * @param batchSize batchSize for update
   * @paramType paramType to update
   */
  def updateGradientAccordingToParams(gradient: Gradient, model: Model, batchSize: Int)

  /**
   * Check termination conditions
   * setup a search state
   * @param gradient layer gradients
   * @param iteration what iteration the optimizer is on
   */
  def checkTerminalConditions(gradient: INDArray, oldScore: Double, score: Double, iteration: Int): Boolean
}


text:
package org.wso2.carbon.dashboard.bean;

import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import org.wso2.carbon.dashboard.common.bean.Tab;

import java.util.Iterator;

/**
 * The bean represent all the dashboard props which need to be rendered in the FE
 */
public class DashboardContentBean {
    private String portalCss;
    private Tab[] tabs;
    private String[] defaultGadgetUrlSet;
    private boolean readOnlyMode;
    private String tabLayout;
    private String backendHttpPort;

    public String getBackendHttpPort() {
        return backendHttpPort;
    }

    public void setBackendHttpPort(String backendHttpPort) {
        this.backendHttpPort = backendHttpPort;
    }

    public String[] getDefaultGadgetUrlSet() {
        return defaultGadgetUrlSet;
    }

    public void setDefaultGadgetUrlSet(String[] defaultGadgetUrlSet) {
        this.defaultGadgetUrlSet = defaultGadgetUrlSet;
    }

    public String getPortalCss() {
        return portalCss;
    }

    public void setPortalCss(String portalCss) {
        this.portalCss = portalCss;
    }

    public boolean isReadOnlyMode() {
        return readOnlyMode;
    }

    public void setReadOnlyMode(boolean readOnlyMode) {
        this.readOnlyMode = readOnlyMode;
    }

    public Tab[] getTabs() {
        return tabs;
    }

    public void setTabs(Tab[] tabs) {
        this.tabs = tabs;
    }

    public String getTabLayout() {
        return tabLayout;
    }

    public void setTabLayout(String tabLayout) {
        this.tabLayout = tabLayout;
    }

    public JSONObject toJSONObject() throws JSONException {
        JSONObject json = new JSONObject();
        json.put("portalCss", portalCss);
        json.put("readOnlyMode", readOnlyMode);
        json.put("tabLayout", tabLayout);
        json.put("backendHttpPort", backendHttpPort);

        JSONArray jsonItems = new JSONArray();
        if (defaultGadgetUrlSet != null) {
            for (String defaultGadgetUrl : defaultGadgetUrlSet) {
                jsonItems.put(defaultGadgetUrl);
            }
        }
        json.put("defaultGadgetUrlSet", jsonItems);
        JSONArray tabsJArray = new JSONArray();
        if (tabs != null) {
            for (Tab tab : tabs) {
                tabsJArray.put(tab.toJSONObject());
            }
        }
        json.put("tabs", tabsJArray);

        return json;
    }
}


text:
using System.Linq;
using System.Threading.Tasks;
using Kralizek.Assembla;
using Kralizek.Assembla.Connector;
using Kralizek.Assembla.Connector.Spaces.Tools;
using Shouldly;

namespace Sample.Assembla.Connector.Samples
{
    public class ToolSample : ISample
    {
        public async Task Execute(IAssemblaClient client)
        {
            using (var test = await client.CreateDisposableSpace())
            {
                var tool = await client.Spaces.Tools.AddAsync(test.Space.WikiName, ToolType.SourceGit);

                tool.ShouldNotBeNull();
                tool.Id.ShouldNotBeNull();
                tool.ToolType.ShouldBe(ToolType.SourceGit);

                var listAll = await client.Spaces.Tools.GetAllInSpaceAsync(test.Space.WikiName);

                listAll.Count().ShouldBe(1);
                listAll.Single().Id.ShouldBe(tool.Id);

                var listRepo = await client.Spaces.Tools.GetAllRepoInSpaceAsync(test.Space.WikiName);

                listRepo.Count().ShouldBe(1);
                listRepo.Single().Id.ShouldBe(tool.Id);

                await client.Spaces.Tools.UpdateAsync(test.Space.WikiName, new Tool {Id = tool.Id, WatcherPermissions = Permissions.All});

                var updatedTool = await client.Spaces.Tools.GetAsync(test.Space.WikiName, tool.Id);

                updatedTool.WatcherPermissions.ShouldBe(Permissions.All);

                await client.Spaces.Tools.DeleteAsync(test.Space.WikiName, tool.Id);
            }
        }
    }
}


text:
import stream = require("stream");
import Stream = stream.Readable;
import merge = require("merge-stream");

var stream1 = new Stream();
var stream2 = new Stream();

var merged = merge(stream1, stream2);

var stream3 = new Stream();
merged.add(stream3);

var stream4 = new Stream();
var stream5 = new Stream();
merged.add([stream4, stream5]);

merged.isEmpty();

var stream6 = new Stream();
var stream7 = new Stream();
var streamArray = [stream6, stream7];
var merged2 = merge(streamArray);


text:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- PYCSW_VERSION -->
<csw:DescribeRecordResponse xmlns:csw="http://www.opengis.net/cat/csw/2.0.2" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dct="http://purl.org/dc/terms/" xmlns:gmd="http://www.isotc211.org/2005/gmd" xmlns:gml="http://www.opengis.net/gml" xmlns:ows="http://www.opengis.net/ows" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/cat/csw/2.0.2 http://schemas.opengis.net/csw/2.0.2/CSW-discovery.xsd">
  <csw:SchemaComponent schemaLanguage="XMLSCHEMA" targetNamespace="http://www.isotc211.org/2005/gmd" parentSchema="gmd.xsd">
    <xs:schema targetNamespace="http://www.isotc211.org/2005/gmd" elementFormDefault="qualified" version="0.1">
	<!-- ================================= Annotation ================================ -->
	<xs:annotation>
		<xs:documentation>This file was generated from ISO TC/211 UML class diagrams == 01-26-2005 12:40:05 ====== </xs:documentation>
	</xs:annotation>
	<!-- ================================== Imports ================================== -->
	<xs:import namespace="http://www.isotc211.org/2005/gco" schemaLocation="../gco/gco.xsd"/>
	<xs:include schemaLocation="../gmd/constraints.xsd"/>
	<xs:include schemaLocation="../gmd/distribution.xsd"/>
	<xs:include schemaLocation="../gmd/maintenance.xsd"/>
	<!-- ########################################################################### -->
	<!-- ########################################################################### -->
	<!-- ================================== Classes ================================= -->
	<xs:complexType name="AbstractMD_Identification_Type" abstract="true">
		<xs:annotation>
			<xs:documentation>Basic information about data</xs:documentation>
		</xs:annotation>
		<xs:complexContent>
			<xs:extension base="gco:AbstractObject_Type">
				<xs:sequence>
					<xs:element name="citation" type="gmd:CI_Citation_PropertyType"/>
					<xs:element name="abstract" type="gco:CharacterString_PropertyType"/>
					<xs:element name="purpose" type="gco:CharacterString_PropertyType" minOccurs="0"/>
					<xs:element name="credit" type="gco:CharacterString_PropertyType" minOccurs="0" maxOccurs="unbounded"/>
					<xs:element name="status" type="gmd:MD_ProgressCode_PropertyType" minOccurs="0" maxOccurs="unbounded"/>
					<xs:element name="pointOfContact" type="gmd:CI_ResponsibleParty_PropertyType" minOccurs="0" maxOccurs="unbounded"/>
					<xs:element name="resourceMaintenance" type="gmd:MD_MaintenanceInformation_PropertyType" minOccurs="0" maxOccurs="unbounded"/>
					<xs:element name="graphicOverview" type="gmd:MD_BrowseGraphic_PropertyType" minOccurs="0" maxOccurs="unbounded"/>
					<xs:element name="resourceFormat" type="gmd:MD_Format_PropertyType" minOccurs="0" maxOccurs="unbounded"/>
					<xs:element name="descriptiveKeywords" type="gmd:MD_Keywords_PropertyType" minOccurs="0" maxOccurs="unbounded"/>
					<xs:element name="resourceSpecificUsage" type="gmd:MD_Usage_PropertyType" minOccurs="0" maxOccurs="unbounded"/>
					<xs:element name="resourceConstraints" type="gmd:MD_Constraints_PropertyType" minOccurs="0" maxOccurs="unbounded"/>
					<xs:element name="aggregationInfo" type="gmd:MD_AggregateInformation_PropertyType" minOccurs="0" maxOccurs="unbounded"/>
				</xs:sequence>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	<!-- ........................................................................ -->
	<xs:element name="AbstractMD_Identification" type="gmd:AbstractMD_Identification_Type" abstract="true"/>
	<!-- ........................................................................ -->
	<xs:complexType name="MD_Identification_PropertyType">
		<xs:sequence minOccurs="0">
			<xs:element ref="gmd:AbstractMD_Identification"/>
		</xs:sequence>
		<xs:attributeGroup ref="gco:ObjectReference"/>
		<xs:attribute ref="gco:nilReason"/>
	</xs:complexType>
	<!-- =========================================================================== -->
	<xs:complexType name="MD_BrowseGraphic_Type">
		<xs:annotation>
			<xs:documentation>Graphic that provides an illustration of the dataset (should include a legend for the graphic)</xs:documentation>
		</xs:annotation>
		<xs:complexContent>
			<xs:extension base="gco:AbstractObject_Type">
				<xs:sequence>
					<xs:element name="fileName" type="gco:CharacterString_PropertyType"/>
					<xs:element name="fileDescription" type="gco:CharacterString_PropertyType" minOccurs="0"/>
					<xs:element name="fileType" type="gco:CharacterString_PropertyType" minOccurs="0"/>
				</xs:sequence>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	<!-- ........................................................................ -->
	<xs:element name="MD_BrowseGraphic" type="gmd:MD_BrowseGraphic_Type"/>
	<!-- ........................................................................ -->
	<xs:complexType name="MD_BrowseGraphic_PropertyType">
		<xs:sequence minOccurs="0">
			<xs:element ref="gmd:MD_BrowseGraphic"/>
		</xs:sequence>
		<xs:attributeGroup ref="gco:ObjectReference"/>
		<xs:attribute ref="gco:nilReason"/>
	</xs:complexType>
	<!-- =========================================================================== -->
	<xs:complexType name="MD_DataIdentification_Type">
		<xs:complexContent>
			<xs:extension base="gmd:AbstractMD_Identification_Type">
				<xs:sequence>
					<xs:element name="spatialRepresentationType" type="gmd:MD_SpatialRepresentationTypeCode_PropertyType" minOccurs="0" maxOccurs="unbounded"/>
					<xs:element name="spatialResolution" type="gmd:MD_Resolution_PropertyType" minOccurs="0" maxOccurs="unbounded"/>
					<xs:element name="language" type="gco:CharacterString_PropertyType" maxOccurs="unbounded"/>
					<xs:element name="characterSet" type="gmd:MD_CharacterSetCode_PropertyType" minOccurs="0" maxOccurs="unbounded"/>
					<xs:element name="topicCategory" type="gmd:MD_TopicCategoryCode_PropertyType" minOccurs="0" maxOccurs="unbounded"/>
					<xs:element name="environmentDescription" type="gco:CharacterString_PropertyType" minOccurs="0"/>
					<xs:element name="extent" type="gmd:EX_Extent_PropertyType" minOccurs="0" maxOccurs="unbounded"/>
					<xs:element name="supplementalInformation" type="gco:CharacterString_PropertyType" minOccurs="0"/>
				</xs:sequence>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	<!-- ........................................................................ -->
	<xs:element name="MD_DataIdentification" type="gmd:MD_DataIdentification_Type" substitutionGroup="gmd:AbstractMD_Identification"/>
	<!-- ........................................................................ -->
	<xs:complexType name="MD_DataIdentification_PropertyType">
		<xs:sequence minOccurs="0">
			<xs:element ref="gmd:MD_DataIdentification"/>
		</xs:sequence>
		<xs:attributeGroup ref="gco:ObjectReference"/>
		<xs:attribute ref="gco:nilReason"/>
	</xs:complexType>
	<!-- =========================================================================== -->
	<xs:complexType name="MD_ServiceIdentification_Type">
		<xs:annotation>
			<xs:documentation>See 19119 for further info</xs:documentation>
		</xs:annotation>
		<xs:complexContent>
			<xs:extension base="gmd:AbstractMD_Identification_Type"/>
		</xs:complexContent>
	</xs:complexType>
	<!-- ........................................................................ -->
	<xs:element name="MD_ServiceIdentification" type="gmd:MD_ServiceIdentification_Type" substitutionGroup="gmd:AbstractMD_Identification"/>
	<!-- ........................................................................ -->
	<xs:complexType name="MD_ServiceIdentification_PropertyType">
		<xs:sequence minOccurs="0">
			<xs:element ref="gmd:MD_ServiceIdentification"/>
		</xs:sequence>
		<xs:attributeGroup ref="gco:ObjectReference"/>
		<xs:attribute ref="gco:nilReason"/>
	</xs:complexType>
	<!-- =========================================================================== -->
	<xs:complexType name="MD_RepresentativeFraction_Type">
		<xs:complexContent>
			<xs:extension base="gco:AbstractObject_Type">
				<xs:sequence>
					<xs:element name="denominator" type="gco:Integer_PropertyType"/>
				</xs:sequence>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	<!-- ........................................................................ -->
	<xs:element name="MD_RepresentativeFraction" type="gmd:MD_RepresentativeFraction_Type"/>
	<!-- ........................................................................ -->
	<xs:complexType name="MD_RepresentativeFraction_PropertyType">
		<xs:sequence minOccurs="0">
			<xs:element ref="gmd:MD_RepresentativeFraction"/>
		</xs:sequence>
		<xs:attributeGroup ref="gco:ObjectReference"/>
		<xs:attribute ref="gco:nilReason"/>
	</xs:complexType>
	<!-- =========================================================================== -->
	<xs:complexType name="MD_Usage_Type">
		<xs:annotation>
			<xs:documentation>Brief description of ways in which the dataset is currently used.</xs:documentation>
		</xs:annotation>
		<xs:complexContent>
			<xs:extension base="gco:AbstractObject_Type">
				<xs:sequence>
					<xs:element name="specificUsage" type="gco:CharacterString_PropertyType"/>
					<xs:element name="usageDateTime" type="gco:DateTime_PropertyType" minOccurs="0"/>
					<xs:element name="userDeterminedLimitations" type="gco:CharacterString_PropertyType" minOccurs="0"/>
					<xs:element name="userContactInfo" type="gmd:CI_ResponsibleParty_PropertyType" maxOccurs="unbounded"/>
				</xs:sequence>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	<!-- ........................................................................ -->
	<xs:element name="MD_Usage" type="gmd:MD_Usage_Type"/>
	<!-- ........................................................................ -->
	<xs:complexType name="MD_Usage_PropertyType">
		<xs:sequence minOccurs="0">
			<xs:element ref="gmd:MD_Usage"/>
		</xs:sequence>
		<xs:attributeGroup ref="gco:ObjectReference"/>
		<xs:attribute ref="gco:nilReason"/>
	</xs:complexType>
	<!-- =========================================================================== -->
	<xs:complexType name="MD_Keywords_Type">
		<xs:annotation>
			<xs:documentation>Keywords, their type and reference source</xs:documentation>
		</xs:annotation>
		<xs:complexContent>
			<xs:extension base="gco:AbstractObject_Type">
				<xs:sequence>
					<xs:element name="keyword" type="gco:CharacterString_PropertyType" maxOccurs="unbounded"/>
					<xs:element name="type" type="gmd:MD_KeywordTypeCode_PropertyType" minOccurs="0"/>
					<xs:element name="thesaurusName" type="gmd:CI_Citation_PropertyType" minOccurs="0"/>
				</xs:sequence>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	<!-- ........................................................................ -->
	<xs:element name="MD_Keywords" type="gmd:MD_Keywords_Type"/>
	<!-- ........................................................................ -->
	<xs:complexType name="MD_Keywords_PropertyType">
		<xs:sequence minOccurs="0">
			<xs:element ref="gmd:MD_Keywords"/>
		</xs:sequence>
		<xs:attributeGroup ref="gco:ObjectReference"/>
		<xs:attribute ref="gco:nilReason"/>
	</xs:complexType>
	<!-- =========================================================================== -->
	<xs:complexType name="DS_Association_Type">
		<xs:complexContent>
			<xs:extension base="gco:AbstractObject_Type">
				<xs:sequence/>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	<!-- ........................................................................ -->
	<xs:element name="DS_Association" type="gmd:DS_Association_Type"/>
	<!-- ........................................................................ -->
	<xs:complexType name="DS_Association_PropertyType">
		<xs:sequence minOccurs="0">
			<xs:element ref="gmd:DS_Association"/>
		</xs:sequence>
		<xs:attributeGroup ref="gco:ObjectReference"/>
		<xs:attribute ref="gco:nilReason"/>
	</xs:complexType>
	<!-- =========================================================================== -->
	<xs:complexType name="MD_AggregateInformation_Type">
		<xs:annotation>
			<xs:documentation>Encapsulates the dataset aggregation information</xs:documentation>
		</xs:annotation>
		<xs:complexContent>
			<xs:extension base="gco:AbstractObject_Type">
				<xs:sequence>
					<xs:element name="aggregateDataSetName" type="gmd:CI_Citation_PropertyType" minOccurs="0"/>
					<xs:element name="aggregateDataSetIdentifier" type="gmd:MD_Identifier_PropertyType" minOccurs="0"/>
					<xs:element name="associationType" type="gmd:DS_AssociationTypeCode_PropertyType"/>
					<xs:element name="initiativeType" type="gmd:DS_InitiativeTypeCode_PropertyType" minOccurs="0"/>
				</xs:sequence>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	<!-- ........................................................................ -->
	<xs:element name="MD_AggregateInformation" type="gmd:MD_AggregateInformation_Type"/>
	<!-- ........................................................................ -->
	<xs:complexType name="MD_AggregateInformation_PropertyType">
		<xs:sequence minOccurs="0">
			<xs:element ref="gmd:MD_AggregateInformation"/>
		</xs:sequence>
		<xs:attributeGroup ref="gco:ObjectReference"/>
		<xs:attribute ref="gco:nilReason"/>
	</xs:complexType>
	<!-- =========================================================================== -->
	<xs:complexType name="MD_Resolution_Type">
		<xs:choice>
			<xs:element name="equivalentScale" type="gmd:MD_RepresentativeFraction_PropertyType"/>
			<xs:element name="distance" type="gco:Distance_PropertyType"/>
		</xs:choice>
	</xs:complexType>
	<!-- ........................................................................ -->
	<xs:element name="MD_Resolution" type="gmd:MD_Resolution_Type"/>
	<!-- ........................................................................ -->
	<xs:complexType name="MD_Resolution_PropertyType">
		<xs:sequence minOccurs="0">
			<xs:element ref="gmd:MD_Resolution"/>
		</xs:sequence>
		<xs:attribute ref="gco:nilReason"/>
	</xs:complexType>
	<!-- =========================================================================== -->
	<xs:simpleType name="MD_TopicCategoryCode_Type">
		<xs:annotation>
			<xs:documentation>High-level geospatial data thematic classification to assist in the grouping and search of available geospatial datasets</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:enumeration value="farming"/>
			<xs:enumeration value="biota"/>
			<xs:enumeration value="boundaries"/>
			<xs:enumeration value="climatologyMeteorologyAtmosphere"/>
			<xs:enumeration value="economy"/>
			<xs:enumeration value="elevation"/>
			<xs:enumeration value="environment"/>
			<xs:enumeration value="geoscientificInformation"/>
			<xs:enumeration value="health"/>
			<xs:enumeration value="imageryBaseMapsEarthCover"/>
			<xs:enumeration value="intelligenceMilitary"/>
			<xs:enumeration value="inlandWaters"/>
			<xs:enumeration value="location"/>
			<xs:enumeration value="oceans"/>
			<xs:enumeration value="planningCadastre"/>
			<xs:enumeration value="society"/>
			<xs:enumeration value="structure"/>
			<xs:enumeration value="transportation"/>
			<xs:enumeration value="utilitiesCommunication"/>
		</xs:restriction>
	</xs:simpleType>
	<!-- ........................................................................ -->
	<xs:element name="MD_TopicCategoryCode" type="gmd:MD_TopicCategoryCode_Type" substitutionGroup="gco:CharacterString"/>
	<!-- ........................................................................ -->
	<xs:complexType name="MD_TopicCategoryCode_PropertyType">
		<xs:sequence minOccurs="0">
			<xs:element ref="gmd:MD_TopicCategoryCode"/>
		</xs:sequence>
		<xs:attribute ref="gco:nilReason"/>
	</xs:complexType>
	<!-- =========================================================================== -->
	<!-- ........................................................................ -->
	<xs:element name="MD_CharacterSetCode" type="gco:CodeListValue_Type" substitutionGroup="gco:CharacterString"/>
	<!-- ........................................................................ -->
	<xs:complexType name="MD_CharacterSetCode_PropertyType">
		<xs:sequence minOccurs="0">
			<xs:element ref="gmd:MD_CharacterSetCode"/>
		</xs:sequence>
		<xs:attribute ref="gco:nilReason"/>
	</xs:complexType>
	<!-- =========================================================================== -->
	<!-- ........................................................................ -->
	<xs:element name="MD_SpatialRepresentationTypeCode" type="gco:CodeListValue_Type" substitutionGroup="gco:CharacterString"/>
	<!-- ........................................................................ -->
	<xs:complexType name="MD_SpatialRepresentationTypeCode_PropertyType">
		<xs:sequence minOccurs="0">
			<xs:element ref="gmd:MD_SpatialRepresentationTypeCode"/>
		</xs:sequence>
		<xs:attribute ref="gco:nilReason"/>
	</xs:complexType>
	<!-- =========================================================================== -->
	<!-- ........................................................................ -->
	<xs:element name="MD_ProgressCode" type="gco:CodeListValue_Type" substitutionGroup="gco:CharacterString"/>
	<!-- ........................................................................ -->
	<xs:complexType name="MD_ProgressCode_PropertyType">
		<xs:sequence minOccurs="0">
			<xs:element ref="gmd:MD_ProgressCode"/>
		</xs:sequence>
		<xs:attribute ref="gco:nilReason"/>
	</xs:complexType>
	<!-- =========================================================================== -->
	<!-- ........................................................................ -->
	<xs:element name="MD_KeywordTypeCode" type="gco:CodeListValue_Type" substitutionGroup="gco:CharacterString"/>
	<!-- ........................................................................ -->
	<xs:complexType name="MD_KeywordTypeCode_PropertyType">
		<xs:sequence minOccurs="0">
			<xs:element ref="gmd:MD_KeywordTypeCode"/>
		</xs:sequence>
		<xs:attribute ref="gco:nilReason"/>
	</xs:complexType>
	<!-- =========================================================================== -->
	<!-- ........................................................................ -->
	<xs:element name="DS_AssociationTypeCode" type="gco:CodeListValue_Type" substitutionGroup="gco:CharacterString"/>
	<!-- ........................................................................ -->
	<xs:complexType name="DS_AssociationTypeCode_PropertyType">
		<xs:sequence minOccurs="0">
			<xs:element ref="gmd:DS_AssociationTypeCode"/>
		</xs:sequence>
		<xs:attribute ref="gco:nilReason"/>
	</xs:complexType>
	<!-- =========================================================================== -->
	<!-- ........................................................................ -->
	<xs:element name="DS_InitiativeTypeCode" type="gco:CodeListValue_Type" substitutionGroup="gco:CharacterString"/>
	<!-- ........................................................................ -->
	<xs:complexType name="DS_InitiativeTypeCode_PropertyType">
		<xs:sequence minOccurs="0">
			<xs:element ref="gmd:DS_InitiativeTypeCode"/>
		</xs:sequence>
		<xs:attribute ref="gco:nilReason"/>
	</xs:complexType>
	<!-- =========================================================================== -->
</xs:schema>
  </csw:SchemaComponent>
  <csw:SchemaComponent schemaLanguage="XMLSCHEMA" targetNamespace="http://www.isotc211.org/2005/gmd" parentSchema="gmd.xsd">
    <xs:schema targetNamespace="http://www.isotc211.org/2005/srv" elementFormDefault="qualified" version="0.1">
	<!-- ================================= Annotation ================================ -->
	<xs:annotation>
		<xs:documentation>This file was generated from ISO TC/211 UML class diagrams == 10-13-2006 11:14:04 ====== </xs:documentation>
	</xs:annotation>
	<!-- ================================== Imports ================================== -->
	<xs:import namespace="http://www.isotc211.org/2005/gmd" schemaLocation="../gmd/identification.xsd"/>
	<xs:import namespace="http://www.isotc211.org/2005/gco" schemaLocation="../gco/gco.xsd"/>
	<xs:include schemaLocation="../srv/serviceModel.xsd"/>
	<!-- ########################################################################### -->
	<!-- ########################################################################### -->
	<!-- ================================== Classes ================================= -->
	<xs:complexType name="SV_Parameter_Type">
		<xs:complexContent>
			<xs:extension base="gco:AbstractObject_Type">
				<xs:sequence>
					<xs:element name="name" type="gco:MemberName_Type"/>
					<xs:element name="direction" type="srv:SV_ParameterDirection_PropertyType" minOccurs="0"/>
					<xs:element name="description" type="gco:CharacterString_PropertyType" minOccurs="0"/>
					<xs:element name="optionality" type="gco:CharacterString_PropertyType"/>
					<xs:element name="repeatability" type="gco:Boolean_PropertyType"/>
					<xs:element name="valueType" type="gco:TypeName_PropertyType"/>
				</xs:sequence>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	<!-- ........................................................................ -->
	<xs:element name="SV_Parameter" type="srv:SV_Parameter_Type"/>
	<!-- ........................................................................ -->
	<xs:complexType name="SV_Parameter_PropertyType">
		<xs:sequence>
			<xs:element ref="srv:SV_Parameter" minOccurs="0"/>
		</xs:sequence>
		<xs:attributeGroup ref="gco:ObjectReference"/>
		<xs:attribute ref="gco:nilReason"/>
	</xs:complexType>
	<!-- =========================================================================== -->
	<xs:complexType name="SV_OperationMetadata_Type">
		<xs:complexContent>
			<xs:extension base="gco:AbstractObject_Type">
				<xs:sequence>
					<xs:element name="operationName" type="gco:CharacterString_PropertyType"/>
					<xs:element name="DCP" type="srv:DCPList_PropertyType" maxOccurs="unbounded"/>
					<xs:element name="operationDescription" type="gco:CharacterString_PropertyType" minOccurs="0"/>
					<xs:element name="invocationName" type="gco:CharacterString_PropertyType" minOccurs="0"/>
					<xs:element name="parameters" type="srv:SV_Parameter_PropertyType" minOccurs="0" maxOccurs="unbounded"/>
					<xs:element name="connectPoint" type="gmd:CI_OnlineResource_PropertyType" maxOccurs="unbounded"/>
					<xs:element name="dependsOn" type="srv:SV_OperationMetadata_PropertyType" minOccurs="0" maxOccurs="unbounded"/>
				</xs:sequence>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	<!-- ........................................................................ -->
	<xs:element name="SV_OperationMetadata" type="srv:SV_OperationMetadata_Type"/>
	<!-- ........................................................................ -->
	<xs:complexType name="SV_OperationMetadata_PropertyType">
		<xs:sequence>
			<xs:element ref="srv:SV_OperationMetadata" minOccurs="0"/>
		</xs:sequence>
		<xs:attributeGroup ref="gco:ObjectReference"/>
		<xs:attribute ref="gco:nilReason"/>
	</xs:complexType>
	<!-- =========================================================================== -->
	<xs:complexType name="SV_ServiceIdentification_Type">
		<xs:complexContent>
			<xs:extension base="gmd:AbstractMD_Identification_Type">
				<xs:sequence>
					<xs:element name="serviceType" type="gco:GenericName_PropertyType"/>
					<xs:element name="serviceTypeVersion" type="gco:CharacterString_PropertyType" minOccurs="0" maxOccurs="unbounded"/>
					<xs:element name="accessProperties" type="gmd:MD_StandardOrderProcess_PropertyType" minOccurs="0"/>
					<xs:element name="restrictions" type="gmd:MD_Constraints_PropertyType" minOccurs="0"/>
					<xs:element name="keywords" type="gmd:MD_Keywords_PropertyType" minOccurs="0" maxOccurs="unbounded"/>
					<xs:element name="extent" type="gmd:EX_Extent_PropertyType" minOccurs="0" maxOccurs="unbounded"/>
					<xs:element name="coupledResource" type="srv:SV_CoupledResource_PropertyType" minOccurs="0" maxOccurs="unbounded"/>
					<xs:element name="couplingType" type="srv:SV_CouplingType_PropertyType"/>
					<xs:element name="containsOperations" type="srv:SV_OperationMetadata_PropertyType" maxOccurs="unbounded"/>
					<xs:element name="operatesOn" type="gmd:MD_DataIdentification_PropertyType" minOccurs="0" maxOccurs="unbounded"/>
				</xs:sequence>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	<!-- ........................................................................ -->
	<xs:element name="SV_ServiceIdentification" type="srv:SV_ServiceIdentification_Type" substitutionGroup="gmd:AbstractMD_Identification"/>
	<!-- ........................................................................ -->
	<xs:complexType name="SV_ServiceIdentification_PropertyType">
		<xs:sequence>
			<xs:element ref="srv:SV_ServiceIdentification" minOccurs="0"/>
		</xs:sequence>
		<xs:attributeGroup ref="gco:ObjectReference"/>
		<xs:attribute ref="gco:nilReason"/>
	</xs:complexType>
	<!-- =========================================================================== -->
	<xs:complexType name="SV_OperationChain_Type">
		<xs:complexContent>
			<xs:extension base="gco:AbstractObject_Type">
				<xs:sequence>
					<xs:element name="name" type="gco:CharacterString_PropertyType"/>
					<xs:element name="description" type="gco:CharacterString_PropertyType" minOccurs="0"/>
					<xs:element name="operation" type="srv:SV_Operation_PropertyType" maxOccurs="unbounded"/>
				</xs:sequence>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	<!-- ........................................................................ -->
	<xs:element name="SV_OperationChain" type="srv:SV_OperationChain_Type"/>
	<!-- ........................................................................ -->
	<xs:complexType name="SV_OperationChain_PropertyType">
		<xs:sequence>
			<xs:element ref="srv:SV_OperationChain" minOccurs="0"/>
		</xs:sequence>
		<xs:attributeGroup ref="gco:ObjectReference"/>
		<xs:attribute ref="gco:nilReason"/>
	</xs:complexType>
	<!-- =========================================================================== -->
	<xs:complexType name="SV_OperationChainMetadata_Type">
		<xs:complexContent>
			<xs:extension base="gco:AbstractObject_Type">
				<xs:sequence>
					<xs:element name="name" type="gco:CharacterString_PropertyType"/>
					<xs:element name="description" type="gco:CharacterString_PropertyType" minOccurs="0"/>
					<xs:element name="operation" type="srv:SV_OperationMetadata_PropertyType" maxOccurs="unbounded"/>
				</xs:sequence>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	<!-- ........................................................................ -->
	<xs:element name="SV_OperationChainMetadata" type="srv:SV_OperationChainMetadata_Type"/>
	<!-- ........................................................................ -->
	<xs:complexType name="SV_OperationChainMetadata_PropertyType">
		<xs:sequence>
			<xs:element ref="srv:SV_OperationChainMetadata" minOccurs="0"/>
		</xs:sequence>
		<xs:attributeGroup ref="gco:ObjectReference"/>
		<xs:attribute ref="gco:nilReason"/>
	</xs:complexType>
	<!-- =========================================================================== -->
	<xs:complexType name="SV_CoupledResource_Type">
		<xs:complexContent>
			<xs:extension base="gco:AbstractObject_Type">
				<xs:sequence>
					<xs:element name="operationName" type="gco:CharacterString_PropertyType"/>
					<xs:element name="identifier" type="gco:CharacterString_PropertyType"/>
					<xs:element ref="gco:ScopedName" minOccurs="0" maxOccurs="1"/>
				</xs:sequence>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	<!-- ........................................................................ -->
	<xs:element name="SV_CoupledResource" type="srv:SV_CoupledResource_Type"/>
	<!-- ........................................................................ -->
	<xs:complexType name="SV_CoupledResource_PropertyType">
		<xs:sequence>
			<xs:element ref="srv:SV_CoupledResource" minOccurs="0"/>
		</xs:sequence>
		<xs:attributeGroup ref="gco:ObjectReference"/>
		<xs:attribute ref="gco:nilReason"/>
	</xs:complexType>
	<!-- =========================================================================== -->
	<xs:simpleType name="SV_ParameterDirection_Type">
		<xs:restriction base="xs:string">
			<xs:enumeration value="in"/>
			<xs:enumeration value="out"/>
			<xs:enumeration value="in/out"/>
		</xs:restriction>
	</xs:simpleType>
	<!-- ........................................................................ -->
	<xs:element name="SV_ParameterDirection" type="srv:SV_ParameterDirection_Type" substitutionGroup="gco:CharacterString"/>
	<!-- ........................................................................ -->
	<xs:complexType name="SV_ParameterDirection_PropertyType">
		<xs:sequence>
			<xs:element ref="srv:SV_ParameterDirection" minOccurs="0"/>
		</xs:sequence>
		<xs:attribute ref="gco:nilReason"/>
	</xs:complexType>
	<!-- =========================================================================== -->
	<!-- ........................................................................ -->
	<xs:element name="DCPList" type="gco:CodeListValue_Type" substitutionGroup="gco:CharacterString"/>
	<!-- ........................................................................ -->
	<xs:complexType name="DCPList_PropertyType">
		<xs:sequence>
			<xs:element ref="srv:DCPList" minOccurs="0"/>
		</xs:sequence>
		<xs:attribute ref="gco:nilReason"/>
	</xs:complexType>
	<!-- =========================================================================== -->
	<!-- ........................................................................ -->
	<xs:element name="SV_CouplingType" type="gco:CodeListValue_Type" substitutionGroup="gco:CharacterString"/>
	<!-- ........................................................................ -->
	<xs:complexType name="SV_CouplingType_PropertyType">
		<xs:sequence>
			<xs:element ref="srv:SV_CouplingType" minOccurs="0"/>
		</xs:sequence>
		<xs:attribute ref="gco:nilReason"/>
	</xs:complexType>
	<!-- =========================================================================== -->
</xs:schema>
  </csw:SchemaComponent>
</csw:DescribeRecordResponse>


text:
a {
  color: red; }

/*# sourceMappingURL=input.css.map */


text:
var gulp = require('gulp');
var wpPot = require('gulp-wp-pot');
var gettext = require('gulp-gettext');
var sort = require('gulp-sort');
var pofill = require('gulp-pofill');
var rename = require('gulp-rename');

gulp.task('default', function () {
    // Create POT out of i18n.php.
    gulp.src('includes/i18n.php')
        .pipe(sort())
        .pipe(wpPot( {
            destFile:'freemius.pot',
            package: 'freemius',
            bugReport: 'https://github.com/Freemius/wordpress-sdk/issues',
            lastTranslator: 'Vova Feldman <vova@freemius.com>',
            team: 'Freemius Team <admin@freemius.com>'
        } ))
        .pipe(gulp.dest('languages/'));

    // Create English PO out of the POT.
    gulp.src('languages/freemius.pot')
        .pipe(pofill({
            items: function(item) {
                // If msgstr is empty, use identity translation
                if (!item.msgstr.length) {
                  item.msgstr = [''];
                }
                if (!item.msgstr[0]) {
                    item.msgstr[0] = item.msgid;
                }
                return item;
            }
        }))
        .pipe(rename('freemius-en.po'))
        .pipe(gulp.dest('languages/'));

    // Compile POs to MOs.
    gulp.src('languages/*.po')
        .pipe(gettext())
        .pipe(gulp.dest('languages/'))
});


text:
package com.awesometickets.util;

import org.slf4j.Logger;

import javax.servlet.http.HttpServletRequest;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;

public class LogUtil {

    /**
     * Print logs of http request.
     */
    public static void logReq(Logger logger, HttpServletRequest req) {
        String queryStr = req.getQueryString();
        if (queryStr == null || queryStr.length() == 0) {
            logger.info(req.getMethod() + " " + req.getRequestURI());
        } else {
            try {
                queryStr = URLDecoder.decode(queryStr, "UTF-8");
            } catch (UnsupportedEncodingException e) {
                logger.warn(e.getMessage());
            }
            logger.info(req.getMethod() + " " + req.getRequestURI() + "?" + queryStr);
        }
    }

}


text:
var app = angular.module('myApp', ['GoergianKeyboard']);

app.controller('AppController', ['$scope', function($scope){

	console.log("Controller init...");

	$scope.enabled = true;

	$scope.input1 = "Test";

	$scope.onChange = function(){
		console.log($scope.input1);
	}

	$scope.submit = function(){
		console.log("Submit::", $scope.input1);
	}

}]);


text:
package com.scottbezek.superdiff;

import com.scottbezek.difflib.unified.SideBySideLine;
import com.scottbezek.superdiff.list.CollapsedSideBySideLineAdapter;
import com.scottbezek.superdiff.list.CollapsedSideBySideLineAdapter.CollapsedOrLine;
import com.scottbezek.superdiff.list.HorizontalScrollObservingListView;
import com.scottbezek.superdiff.list.MultiFileDiffAdapter;
import com.scottbezek.superdiff.list.SideBySideLineView.ItemWidths;
import com.scottbezek.superdiff.manager.DiffManager;
import com.scottbezek.superdiff.manager.DiffManager.DiffFailed;
import com.scottbezek.superdiff.manager.DiffManager.DiffLoadResult;
import com.scottbezek.superdiff.manager.DiffManager.DiffLoading;
import com.scottbezek.superdiff.manager.DiffManager.DiffStatus;
import com.scottbezek.superdiff.manager.IntralineDiffProcessor;
import com.scottbezek.superdiff.manager.StateStream;
import com.scottbezek.superdiff.manager.StateStream.Listener;
import com.scottbezek.util.Assert;
import com.scottbezek.util.StopWatch;

import android.app.Activity;
import android.content.Intent;
import android.content.res.Resources;
import android.graphics.Paint;
import android.graphics.Typeface;
import android.net.Uri;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;
import android.view.View.OnLayoutChangeListener;
import android.widget.ProgressBar;
import android.widget.Toast;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;

public class ListViewActivity extends Activity {

    public static final String EXTRA_SAMPLE = "EXTRA_SAMPLE";

    private DiffManager mDiffManager;
    private ProgressBar mProgress;
    private HorizontalScrollObservingListView mListView;
    private ItemWidths mItemWidthInfo;
    private final OnLayoutChangeListener mListviewLayoutChangeListener = new OnLayoutChangeListener() {

        @Override
        public void onLayoutChange(View v, int left, int top, int right,
                int bottom, int oldLeft, int oldTop, int oldRight, int oldBottom) {
            int contentWidth = mItemWidthInfo.getLineContentsWidthPx();
            int scrollContainerWidth = (right - left)/2 - mItemWidthInfo.getLineNumberWidthPx();
            mListView.setHorizontalScrollRange(Math.max(0, contentWidth - scrollContainerWidth));
        }
    };

    private StateStream<DiffStatus> mResultStream;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        mDiffManager = DiffManager.getInstance();

        mListView = (HorizontalScrollObservingListView)
                findViewById(R.id.content_view);
        mProgress = (ProgressBar) findViewById(R.id.progress);

        // If the listview changes dimensions (including the initial layout), we
        // need to recalculate the horizontal scroll range.
        mListView.addOnLayoutChangeListener(mListviewLayoutChangeListener);
    }

    @Override
    protected void onResume() {
        super.onResume();
        initiateLoad();
    }

    @Override
    protected void onPause() {
        super.onPause();
        mResultStream.unsubscribe(mDiffListener);
    }

    private void initiateLoad() {
        final Intent intent = getIntent();
        final Uri dataUri = intent.getData();
        if (dataUri == null && !intent.hasExtra(EXTRA_SAMPLE)) {
            finish();
            return;
        } else {
            final IntralineDiffProcessor intralineDiffProcessor
                    = intralineDiffProcessorFromResources(getResources());
            if (dataUri != null) {
                mResultStream = mDiffManager
                        .loadContentUri(getContentResolver(), dataUri, intralineDiffProcessor);
            } else {
                String sampleName = intent.getStringExtra(EXTRA_SAMPLE);
                if (sampleName.contains("..")) {
                    finish();
                    return;
                }
                mResultStream = mDiffManager
                        .loadSample(getAssets(), sampleName, intralineDiffProcessor);
            }
            mResultStream.subscribeInvoke(mDiffListener);
        }
    }

    private static IntralineDiffProcessor intralineDiffProcessorFromResources(Resources resources) {
        int addedCharactersBackgroundColor = resources
                .getColor(R.color.diff_chars_added_background);
        int removedCharactersBackgroundColor = resources
                .getColor(R.color.diff_chars_removed_background);
        return new IntralineDiffProcessor(resources.getConfiguration().locale,
                removedCharactersBackgroundColor, addedCharactersBackgroundColor);
    }

    private final Listener mDiffListener = new Listener<DiffStatus>() {
        @Override
        public void onStateChanged(DiffStatus state) {
            if (state instanceof DiffLoading) {
                mListView.setVisibility(View.GONE);
                mProgress.setVisibility(View.VISIBLE);
            } else if (state instanceof DiffFailed) {
                mProgress.setVisibility(View.GONE);
                DiffFailed failure = (DiffFailed)state;
                Toast.makeText(ListViewActivity.this, failure.getCause().getMessage(), Toast.LENGTH_LONG).show();
            } else if (state instanceof DiffLoadResult) {
                Map<String, List<CollapsedOrLine>> diffByFilename = ((DiffLoadResult)state).getDiffByFilename();

                // TODO(sbezek): move this to a background thread; make the result contain the 'Spanned' results
                StopWatch itemWidthTimer = StopWatch.start("calculate_item_widths");
                // For now we only support a single horizontally-scrollable container
                // (in the future it might be nice to allow each file to be scrolled
                // separately), so just take the max widths of all file diffs
                int widestLineNumberWidth = 0;
                int widestLineContentsWidth = 0;
                for (List<CollapsedOrLine> fileDiff : diffByFilename.values()) {
                    ItemWidths curItemWidths = calculateItemWidths(getResources(), fileDiff);
                    if (curItemWidths.getLineNumberWidthPx() > widestLineNumberWidth) {
                        widestLineNumberWidth = curItemWidths.getLineNumberWidthPx();
                    }
                    if (curItemWidths.getLineContentsWidthPx() > widestLineContentsWidth) {
                        widestLineContentsWidth = curItemWidths.getLineContentsWidthPx();
                    }
                }
                mItemWidthInfo = new ItemWidths(widestLineNumberWidth, widestLineContentsWidth);
                itemWidthTimer.stopAndLog();

                List<CollapsedSideBySideLineAdapter> adapters = new ArrayList<CollapsedSideBySideLineAdapter>();
                for (Entry<String, List<CollapsedOrLine>> entry : diffByFilename.entrySet()) {
                    adapters.add(new CollapsedSideBySideLineAdapter(entry.getKey(),
                            entry.getValue(), mItemWidthInfo, mListView));
                }
                mListView.setAdapter(new MultiFileDiffAdapter(adapters));

                mListView.setVisibility(View.VISIBLE);
                mProgress.setVisibility(View.GONE);
            }
        }
    };

    private static ItemWidths calculateItemWidths(Resources resources, List<CollapsedOrLine> diff) {
        Paint p = new Paint();
        p.setTextSize(resources.getDimension(R.dimen.code_text_size));
        p.setTypeface(Typeface.MONOSPACE);

        // Because we're using a monospace font, cheat by finding widest line (#
        // of characters) and just measuring that once.
        // TODO(sbezek): XXX what about unicode? this is almost certainly completely flawed, though it might be possible to use a BreakIterator.getCharacterInstance()?
        int widestLineNumberChars = 2;
        int widestContentsChars = 20;
        for (CollapsedOrLine item : diff) {
            if (item.isCollapsed()) {
                continue;
            } else {
                SideBySideLine line = item.getLine();
                final CharSequence leftLine = line.getLeftLine();
                if (leftLine != null) {
                    widestLineNumberChars = Math.max(widestLineNumberChars,
                            String.valueOf(line.getLeftLineNumber()).length());
                    widestContentsChars = Math.max(widestContentsChars, leftLine.length());
                }
                final CharSequence rightLine = line.getRightLine();
                if (rightLine != null) {
                    widestLineNumberChars = Math.max(widestLineNumberChars,
                            String.valueOf(line.getRightLineNumber()).length());
                    widestContentsChars = Math.max(widestContentsChars, rightLine.length());
                }
            }
        }

        return new ItemWidths(
                getWidthOfNCharacters(p, widestLineNumberChars),
                getWidthOfNCharacters(p, widestContentsChars));
    }

    /**
     * Only valid for monospaced fonts.
     */
    private static int getWidthOfNCharacters(Paint p, int numChars) {
        // Only is valid for monospaced fonts
        Assert.isTrue(p.getTypeface() == Typeface.MONOSPACE);

        StringBuilder dummy = new StringBuilder();
        for (int i = 0; i < numChars; i++) {
            dummy.append("A");
        }
        return (int)p.measureText(dummy.toString());
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        return false;
    }
}


text:
<?php
    /*
     * dumpit5.php
     *
     * a command-line script which dumps the given HTML, PHP, ASP, XHTML, etc.
     * file as it is represented in the document model.
     *
     * NOTE: Only works with tidy for PHP 5+, for tidy in 4.3.x, see dumpit.php
     *
     * By: John Coggeshall <john@php.net>
     *
     * Usage; php dumpit5.php <filename>
     */

    $tidy = tidy_parse_file($_SERVER['argv'][1]);

    /* Optionally you can do this here if you want to fix up the document */

    /* $tidy->clean_repair() */

    $tree = $tidy->root();
    dump_tree($tree);
    echo "\n";

    function node_type($type) {

        switch($type) {

            case TIDY_NODETYPE_ROOT: return "Root Node";
            case TIDY_NODETYPE_DOCTYPE: return "DocType Node";
            case TIDY_NODETYPE_COMMENT: return "Comment Node";
            case TIDY_NODETYPE_PROCINS: return "ProcIns Node";
            case TIDY_NODETYPE_TEXT: return "Text Node";
            case TIDY_NODETYPE_START: return "Start Node";
            case TIDY_NODETYPE_END: return "End Node";
            case TIDY_NODETYPE_STARTEND: return "Start/End Node";
            case TIDY_NODETYPE_CDATA: return "CDATA Node";
            case TIDY_NODETYPE_SECTION: return "Section Node";
            case TIDY_NODETYPE_ASP: return "ASP Source Code Node";
            case TIDY_NODETYPE_PHP: return "PHP Source Code Node";
            case TIDY_NODETYPE_JSTE: return "JSTE Source Code";
            case TIDY_NODETYPE_XMLDECL: return "XML Declaration Node";
            default: return "Unknown Node";
        }
    }

    function do_leaf($string, $indent) {
        for($i = 0; $i < $indent; $i++) {
            echo " ";
        }
        echo $string;
    }

    function dump_tree(tidyNode $node, $indent = 0) {

        /* Put something there if the node name is empty */
        $nodename = trim(strtoupper($node->name));
        $nodename = (empty($nodename)) ? "[EMPTY]" : $nodename;

        /* Generate the Node, and a pretty name for it */
        do_leaf(" + $nodename (".node_type($node->type).")\n", $indent);

        /* Check to see if this node is a text node. Text nodes are
           generated by start/end tags and contain the text in between.
           i.e. <B>foo</B> will create a text node with $node->value
           equal to 'foo' */
        if($node->type == TIDY_NODETYPE_TEXT) {
            do_leaf("     |\n", $indent);
            do_leaf("     +---- Value: '{$node->value}'\n", $indent);
        }

        if(count($node->attribute)) {
            do_leaf(" |\n", $indent);
            do_leaf(" +---- Attributes\n", $indent);

            foreach($node->attribute as $name=>$value) {
                @do_leaf("            +-- $name\n", $indent);
                do_leaf("             |     +-- Value: $value\n", $indent);
            }
        }

        /* Recurse along the children to generate the remaining nodes */
        if($node->hasChildren()) {
            foreach($node->child as $child) {
                dump_tree($child, $indent + 3);
            }
        }

    }

?>


text:
class UndergroundSystem {

struct CheckItem {
    std::string stationName;
    int timestamp;
};

struct CountItem {
    int total;
    int count;
};
public:
    UndergroundSystem() {

    }

    void checkIn(int id, string stationName, int t) {
        checkMap_.emplace(id, CheckItem{stationName, t});
    }

    void checkOut(int id, string stationName, int t) {
        CheckItem item = checkMap_[id];
        auto iter = itemMap_.find(item.stationName+sep_+stationName);
        if (iter == itemMap_.end()) {
            itemMap_.emplace(item.stationName+sep_+stationName, CountItem{t-item.timestamp, 1});
        } else {
            iter->second.count++;
            iter->second.total += t-item.timestamp;
        }
    }

    double getAverageTime(string startStation, string endStation) {
        auto iter = itemMap_.find(startStation+sep_+endStation);
        return (double) iter->second.total / iter->second.count;
    }
private:
    std::unordered_map<int, CheckItem> checkMap_;
    std::unordered_map<std::string, CountItem> itemMap_;
    std::string sep_ = "_";
};

/**
 * Your UndergroundSystem object will be instantiated and called as such:
 * UndergroundSystem* obj = new UndergroundSystem();
 * obj->checkIn(id,stationName,t);
 * obj->checkOut(id,stationName,t);
 * double param_3 = obj->getAverageTime(startStation,endStation);
 */


text:
Board game selector app.

# Installation

```
git clone https://github.com/chehopar/game.git
cd game
make node_modules
```

# Run

```
make
```


text:
"""Tests for run_length_encoding."""

from mt3 import event_codec
from mt3 import run_length_encoding

import note_seq
import numpy as np
import seqio
import tensorflow as tf

assert_dataset = seqio.test_utils.assert_dataset
codec = event_codec.Codec(
    max_shift_steps=100,
    steps_per_second=100,
    event_ranges=[
        event_codec.EventRange('pitch', note_seq.MIN_MIDI_PITCH,
                               note_seq.MAX_MIDI_PITCH),
        event_codec.EventRange('velocity', 0, 127),
        event_codec.EventRange('drum', note_seq.MIN_MIDI_PITCH,
                               note_seq.MAX_MIDI_PITCH),
        event_codec.EventRange('program', note_seq.MIN_MIDI_PROGRAM,
                               note_seq.MAX_MIDI_PROGRAM),
        event_codec.EventRange('tie', 0, 0)
    ])
run_length_encode_shifts = run_length_encoding.run_length_encode_shifts_fn(
    codec=codec)

class RunLengthEncodingTest(tf.test.TestCase):

  def test_remove_redundant_state_changes(self):
    og_dataset = tf.data.Dataset.from_tensors({
        'targets': [3, 525, 356, 161, 2, 525, 356, 161, 355, 394]
    })

    assert_dataset(
        run_length_encoding.remove_redundant_state_changes_fn(
            codec=codec,
            state_change_event_types=['velocity', 'program'])(og_dataset),
        {
            'targets': [3, 525, 356, 161, 2, 161, 355, 394],
        })

  def test_run_length_encode_shifts(self):
    og_dataset = tf.data.Dataset.from_tensors({
        'targets': [1, 1, 1, 161, 1, 1, 1, 162, 1, 1, 1]
    })

    assert_dataset(
        run_length_encode_shifts(og_dataset),
        {
            'targets': [3, 161, 6, 162],
        })

  def test_run_length_encode_shifts_beyond_max_length(self):
    og_dataset = tf.data.Dataset.from_tensors({
        'targets': [1] * 202 + [161, 1, 1, 1]
    })

    assert_dataset(
        run_length_encode_shifts(og_dataset),
        {
            'targets': [100, 100, 2, 161],
        })

  def test_run_length_encode_shifts_simultaneous(self):
    og_dataset = tf.data.Dataset.from_tensors({
        'targets': [1, 1, 1, 161, 162, 1, 1, 1]
    })

    assert_dataset(
        run_length_encode_shifts(og_dataset),
        {
            'targets': [3, 161, 162],
        })

  def test_merge_run_length_encoded_targets(self):
    # pylint: disable=bad-whitespace
    targets = np.array([
        [  3, 161, 162,   5, 163],
        [160, 164,   3, 165,   0]
    ])
    # pylint: enable=bad-whitespace
    merged_targets = run_length_encoding.merge_run_length_encoded_targets(
        targets=targets, codec=codec)
    expected_merged_targets = [
        160, 164, 3, 161, 162, 165, 5, 163
    ]
    np.testing.assert_array_equal(expected_merged_targets, merged_targets)

if __name__ == '__main__':
  tf.test.main()


text:
use query::Occur;

/// An `OccurFilter` represents a filter over a bitset of
// at most 64 elements.
///
/// It wraps some simple bitmask to compute the filter
/// rapidly.
#[derive(Clone, Copy)]
pub struct OccurFilter {
    and_mask: u64,
    result: u64,
}

impl OccurFilter {
    /// Returns true if the bitset is matching the occur list.
    pub fn accept(&self, ord_set: u64) -> bool {
        (self.and_mask & ord_set) == self.result
    }

    /// Builds an `OccurFilter` from a list of `Occur`.
    pub fn new(occurs: &[Occur]) -> OccurFilter {
        let mut and_mask = 0u64;
        let mut result = 0u64;
        for (i, occur) in occurs.iter().enumerate() {
            let shift = 1 << i;
            match *occur {
                Occur::Must => {
                    and_mask |= shift;
                    result |= shift;
                }
                Occur::MustNot => {
                    and_mask |= shift;
                }
                Occur::Should => {}
            }
        }
        OccurFilter {
            and_mask: and_mask,
            result: result,
        }
    }
}


text:
<!DOCTYPE HTML>
<html>
<head>
  <meta charset=utf-8>
  <title>Largest Contentful Paint: observe image.</title>
  <script src="/resources/testharness.js"></script>
  <script src="/resources/testharnessreport.js"></script>
  <script src="../resources/largest-contentful-paint-helpers.js"></script>
  <script src="/common/get-host-info.sub.js"></script>
</head>
<body>
  <script>
    promise_test(async () => {
      assert_implements(window.LargestContentfulPaint,
                        "LargestContentfulPaint is not implemented");
      const beforeLoad = performance.now();
      // 262 is the size of the animated PNG up until the first frame,
      // including the chunk that starts the second frame (indicating that
      //the first frame data is done).
      const {REMOTE_ORIGIN} = get_host_info();
      const url = REMOTE_ORIGIN +
                  '/images/anim-tao.png?pipe=trickle(262:d1)';
      const entry = await load_and_observe(url);
      // anim-gr.png is 100 by 50.
      const size = 100 * 50;
      checkImage(entry, url, 'image_id', size, beforeLoad, ["animated"]);
    }, "Same origin animated image is observable and has a first frame.");
  </script>
</body>
</html>


text:
"""
    website.docs
    ~~~~~~~~~~~~

    website docs blueprint.
"""


text:
namespace TianXia
{
    partial class Help
    {
        /// <summary>
        /// 必需的设计器变量。
        /// </summary>
        private System.ComponentModel.IContainer components = null;

        /// <summary>
        /// 清理所有正在使用的资源。
        /// </summary>
        /// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        #region Windows 窗体设计器生成的代码

        /// <summary>
        /// 设计器支持所需的方法 - 不要
        /// 使用代码编辑器修改此方法的内容。
        /// </summary>
        private void InitializeComponent()
        {
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Help));
            this.textBox1 = new System.Windows.Forms.TextBox();
            this.SuspendLayout();
            //
            // textBox1
            //
            this.textBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
            | System.Windows.Forms.AnchorStyles.Left)
            | System.Windows.Forms.AnchorStyles.Right)));
            this.textBox1.BackColor = System.Drawing.SystemColors.HighlightText;
            this.textBox1.BorderStyle = System.Windows.Forms.BorderStyle.None;
            this.textBox1.Location = new System.Drawing.Point(2, 12);
            this.textBox1.Multiline = true;
            this.textBox1.Name = "textBox1";
            this.textBox1.ReadOnly = true;
            this.textBox1.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
            this.textBox1.Size = new System.Drawing.Size(368, 174);
            this.textBox1.TabIndex = 0;
            this.textBox1.Text = resources.GetString("textBox1.Text");
            this.textBox1.TextChanged += new System.EventHandler(this.textBox1_TextChanged);
            //
            // Help
            //
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(373, 176);
            this.Controls.Add(this.textBox1);
            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
            this.Name = "Help";
            this.Text = "帮助";
            this.TopMost = true;
            this.ResumeLayout(false);
            this.PerformLayout();

        }

        #endregion

        private System.Windows.Forms.TextBox textBox1;
    }
}


text:
#include <aws/config/model/PutRemediationConfigurationsRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>

#include <utility>

using namespace Aws::ConfigService::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;

PutRemediationConfigurationsRequest::PutRemediationConfigurationsRequest() :
    m_remediationConfigurationsHasBeenSet(false)
{
}

Aws::String PutRemediationConfigurationsRequest::SerializePayload() const
{
  JsonValue payload;

  if(m_remediationConfigurationsHasBeenSet)
  {
   Aws::Utils::Array<JsonValue> remediationConfigurationsJsonList(m_remediationConfigurations.size());
   for(unsigned remediationConfigurationsIndex = 0; remediationConfigurationsIndex < remediationConfigurationsJsonList.GetLength(); ++remediationConfigurationsIndex)
   {
     remediationConfigurationsJsonList[remediationConfigurationsIndex].AsObject(m_remediationConfigurations[remediationConfigurationsIndex].Jsonize());
   }
   payload.WithArray("RemediationConfigurations", std::move(remediationConfigurationsJsonList));

  }

  return payload.View().WriteReadable();
}

Aws::Http::HeaderValueCollection PutRemediationConfigurationsRequest::GetRequestSpecificHeaders() const
{
  Aws::Http::HeaderValueCollection headers;
  headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "StarlingDoveService.PutRemediationConfigurations"));
  return headers;

}