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

import java.awt.Image;
import javax.swing.ImageIcon;
import javax.swing.JDialog;
import javax.swing.JOptionPane;

/**
 *
 * @author PC-BANK
 */
public class Dialogs extends JDialog{

    public int Dialogs(String _fileName, String _path) {
        Object[] options = {"Save", "Discard"};
        String fileType = _fileName.substring(_fileName.indexOf(".") + 1, _fileName.length());

        int chk = 0;
        ImageIcon image = null;
        if (fileType.toLowerCase().equals("jpg")
                || fileType.toLowerCase().equals("png")
                || fileType.toLowerCase().equals("gif")
                || fileType.toLowerCase().equals("bmp")) {
            image = new ImageIcon(_path);
            Image img = (image.getImage()).getScaledInstance(80, 95, java.awt.Image.SCALE_SMOOTH);
            image = new ImageIcon(img);
            chk = JOptionPane.showOptionDialog(null,
                    "Trying to transfer file : \""
                            + _fileName + "\" to you.\nDo you want to save or discard it?",
                    "Save or Discard",
                    JOptionPane.YES_NO_OPTION,
                    JOptionPane.QUESTION_MESSAGE,
                    image,
                    options,
                    options[0]);
        }
        else {
            chk = JOptionPane.showOptionDialog(null,
                    "Trying to transfer file : \""
                            + _fileName + "\" to you.\nDo you want to save or discard it?",
                    "Save or Discard",
                    JOptionPane.YES_NO_OPTION,
                    JOptionPane.QUESTION_MESSAGE,
                    image,
                    options,
                    options[0]);
        }

        return chk;
    }
}


text:
/* SVD.h */

#include "Eigen/Core"
using namespace Eigen;

typedef Matrix<double, Dynamic, 9, RowMajor> AMatrixType;

/* SVD function */
void SVD(const AMatrixType &A, AMatrixType &Vt, VectorXd &sv);

redpajama_set_name: RedPajamaGithub


text:
package examples.fancy_numbers

import com.swoop.spark.records._

/** Let's create a simple but not simplistic example of data processing with Spark.
  *
  * We have to categorize integers in the range [0, 100] in the following way:
  *
  * - Numbers outside of [0, 100] are errors.
  *
  * - 0s should be ignored.
  *
  * - Prime numbers are categorized as `prime`.
  *
  * - Perfect numbers, those that are equal to the sums of their factors, e.g.,
  * 6 = 3 + 2 + 1, are categorized as `perfect`.
  *
  * - 13 is categorized as `bakers-dozen`
  *
  * - Everything else is categorized as `even` or `odd`.
  *
  * This example is simple because the inputs are integers but it is not simplistic
  * because we have to deal with errors and inputs that should not produce any output.
  * Further, just to make things a little more interesting, we'll introduce a bug in our code.
  *
  * Here is how we'd like to represent our output data.
  *
  * @param n        the input integer
  * @param category the integer's category
  */
case class FancyNumber(n: Int, category: String)

/** Wrapping our data with a record is simple: we extend `Record[OurData, OurInput]` and
  * then provide defaults. Below you see the minimum set of fields you need in a record.
  * You can add more fields if you need more information in the wrapper. Common examples include
  * adding a timestamp, a record ID or schema versioning information.
  *
  * @see [[com.swoop.spark.records.Record]]
  * @see [[com.swoop.spark.records.Issue]]
  * @param features A bit mask that allows records to be easily filtered
  * @param data     The data the record wraps. May be empty in the case of some error records.
  * @param source   The source of the data. This is how we keep track of data provenance.
  *                 A common optimization is to only include the source for error records.
  * @param flight   Several jobs that work together to produce a result share the same flight ID.
  *                 How you choose to organize this is up to you. The ID is often a UUIDv4.
  * @param issues   The [[issues]] field contains the record-level "log file".
  */
case class FancyNumberRecord(
  features: Int,
  data: Option[FancyNumber] = None,
  source: Option[Int] = None,
  flight: Option[String] = None,
  issues: Option[Seq[Issue]] = None
) extends Record[FancyNumber, Int]

/** This is just a holder for our example code */
object Example {

  /** A record builder for a simple use case like the one we are dealing with should
    * extend [[RecordBuilder]].
    *
    * [[JobContext]] provides state management and other services during building.
    * In this example, we'll use it collect some custom statistics.
    *
    * @see [[RecordBuilder]]
    * @see [[JobContext]]
    * @see [[BuildContext]]
    * @param n  the input integer to categorize
    * @param jc the job context
    */
  case class Builder(n: Int, override val jc: JobContext)
    extends RecordBuilder[Int, FancyNumber, FancyNumberRecord, JobContext](n, jc) {

    /** This is the main method we have to implement. Here we build an
      * [[examples.fancy_numbers.FancyNumber]] from the input.
      *
      * @return the record data generated for this input or `None`
      */
    def buildData: Option[FancyNumber] = {
      // Use throwError to throw _identifiable exceptions_, ones you can easily find
      // after the job has finished executing
      if (n < 0 || n > 100) throwError("input outside [0, 100]", n.toString, Err.OUT_OF_RANGE)

      // jc.inc() is how we can collect custom metrics during job execution
      val stat = if (n % 2 == 0) "even" else "odd"
      jc.inc(s"numbers.$stat")

      if (n == 0) None // returning None will skip this input and generate no record
      else Some(FancyNumber(n, category))
    }

    /** Returns a record with valid data.
      * This method is a hook to allow you to create your own custom records.
      * It uses the state that has been accumulated during the building of the record's data,
      * namely, `features` and `issues`.
      *
      * When everything is going well, we save on storage by not saving the source of the data.
      *
      * @param data   the data produced in [[buildData]]
      * @param issues the issues collected during the building process
      * @return A valid record with data
      */
    def dataRecord(data: FancyNumber, issues: Seq[Issue]): FancyNumberRecord =
      FancyNumberRecord(features, Some(data), None, jc.flight, issues)

    /** Returns an error record.
      * This method is called if the record will contain an error.
      *
      * Depending on whether the error occurred during or after [[buildData]], the resulting
      * record may or may not have `data`. In our case `maybeData` will always be `None`
      * because there is no code path where an error is generated after [[buildData]].
      *
      * @param issues the issues collected during the building process, at least one of
      *               which will be an error
      * @return A valid error record
      */
    def errorRecord(issues: Seq[Issue]): FancyNumberRecord =
      FancyNumberRecord(features, maybeData, Some(n), jc.flight, issues)

    /** Returns the category of the input number. */
    def category: String =
      if (primesTo100(n)) "prime"
      else if (n == 6 || n == 28) {
        // warn(), info() and debug() let you store messages inside the `issues` collection
        // associated with each record. Debug messages are particularly useful during
        // development. Features.QUALITY_CONCERN is one of the predefined record flags.
        warn("rare number", "perfect, really?", Features.QUALITY_CONCERN)
        "perfect"
      }
      else if (n == 13) "bakers-dozen"
      else if (n % 2 == 0) "even"
      else "odd"

  }

  /** One of the key principles of bulletproof big data processing is controlling failure modes
    * and ensuring that errors can be quickly separated in appropriate buckets, e.g., known vs.
    * unknown, safely ignorable vs. something one has to act on, etc.
    *
    * In Spark records, the first step in doing this involves associating IDs with known/expected
    * error types.
    */
  object Err {
    /** The ID of the error raised when we get an out-of-range number. */
    val OUT_OF_RANGE = 1001
  }

  /** Integers IDs are great for big data processing but not great for comprehension.
    * Fear not: you can associated descriptive messages with error (and warning, info, debug)
    * IDs in the following manner. The Spark Records root cause analysis framework will
    * automatically make these available without adding them to the data.
    */
  Issue.addMessagesFor(Issue.Error, Map(
    Err.OUT_OF_RANGE -> "number out of range"
  ))

  /** This little bit of API sugar makes it easier to plug a builder into Spark's RDD and
    * Dataset APIs. It is not required but makes code simpler & cleaner.
    */
  def buildRecords[Ctx <: JobContext](inputs: TraversableOnce[Int], jc: Ctx)
  : Iterator[FancyNumberRecord] =
    inputs.flatMap(Builder(_, jc).build).toIterator

  /** A simple prime number algorithm that builds a boolean array telling us whether a
    * number is prime. We've introduced an off-by-one error in the implementation on
    * purpose to show how Spark Records deals with unexpected failures (as opposed to
    * out of range input, which is an expected failure).
    *
    * @see http://alvinalexander.com/text/prime-number-algorithm-scala-scala-stream-class
    */
  private lazy val primesTo100 = {
    def primeStream(s: Stream[Int]): Stream[Int] = Stream.cons(s.head, primeStream(s.tail filter {
      _ % s.head != 0
    }))

    val arr = Array.fill(100)(false) // bug: should be 101 because of 0-based indexing
    primeStream(Stream.from(2)).takeWhile(_ <= 100).foreach(arr(_) = true)
    arr
  }

}


text:
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    tools:context="${relativePackage}.${activityClass}">

    <androidx.coordinatorlayout.widget.CoordinatorLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:fitsSystemWindows="true">

        <com.google.android.material.appbar.AppBarLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:theme="@style/AppTheme.AppBarOverlay">

            <include layout="@layout/content_toolbar" />

        </com.google.android.material.appbar.AppBarLayout>

        <include layout="@layout/content_frame" />

    </androidx.coordinatorlayout.widget.CoordinatorLayout>
</layout>


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Ancora.Parsers
{
    public class KeyWord : Parser
    {
        private String Word;

        public KeyWord(String Word)
        {
            this.Word = Word;
        }

        protected override Parser ImplementClone()
        {
            return new KeyWord(Word);
        }

        protected override ParseResult ImplementParse(StringIterator InputStream)
        {
            var text = InputStream.Peek(Word.Length);
            if (text == Word)
                return new ParseResult
                {
                    ResultType = Ancora.ResultType.Success,
                    Node = ((Flags & ParserFlags.CREATE_AST) == ParserFlags.CREATE_AST) ? new AstNode
                    {
                        NodeType = AstNodeType,
                        Value = Word
                    } : null,
                    StreamState = InputStream.Advance(Word.Length),
                    Flags = Flags
                };
            else
                return Fail("KeyWord not found");
        }
    }
}


text:
SELECT
  value,
  sum(dur) as dur_sum
FROM (
  SELECT value,
  lead(ts) OVER (PARTITION BY name, track_id ORDER BY ts) - ts AS dur
  FROM counter
  INNER JOIN counter_track ON counter.track_id = counter_track.id
)
WHERE value > 0
GROUP BY value
ORDER BY dur_sum desc


text:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/atlas_healer_view_layout"
    android:layout_width="match_parent"
    android:layout_height="192dp"
    android:background="?attr/colorPrimaryDark"
    android:padding="16dp"
    android:theme="@style/ThemeOverlay.AppCompat.Dark"
    android:orientation="horizontal"
    android:gravity="bottom">

    <LinearLayout
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_weight=".80"
        android:orientation="vertical">

        <TextView
            android:id="@+id/atlas_title"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:text="Atlas Name"
            android:textAppearance="@style/TextAppearance.AppCompat.Body1"/>

        <TextView
            android:id="@+id/atlas_url"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:text="Atlas URL"
            android:textAppearance="@style/Base.TextAppearance.AppCompat.Caption" />

    </LinearLayout>

    <ToggleButton
        android:id="@+id/account_view_icon_button"
        android:layout_width="20dp"
        android:layout_height="24dp"
        android:background="@drawable/toggle_expand_collapse"
        android:textOff="@null"
        android:textOn="@null" />

</LinearLayout>


text:
<?php

namespace Tohouri\StoreBundle\Form\Type;

use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilder;

class OrganisationUnitType extends AbstractType
{
    public function buildForm(FormBuilder $builder, array $options)
    {
        $builder
            ->add('name')
            ->add('address')
            ->add('parent')
            ->add('children')
        ;
    }

    public function getName()
    {
        return 'tohouri_storebundle_organisationunittype';
    }
}


text:
package armdevhub_test

import (
	"context"
	"log"

	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
	"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/devhub/armdevhub"
)

// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/developerhub/resource-manager/Microsoft.DevHub/preview/2022-04-01-preview/examples/Workflow_List.json
func ExampleWorkflowClient_NewListPager() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdevhub.NewWorkflowClient("subscriptionId1", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListPager(nil)
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}

// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/developerhub/resource-manager/Microsoft.DevHub/preview/2022-04-01-preview/examples/Workflow_ListByResourceGroup.json
func ExampleWorkflowClient_NewListByResourceGroupPager() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdevhub.NewWorkflowClient("subscriptionId1", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	pager := client.NewListByResourceGroupPager("resourceGroup1", &armdevhub.WorkflowClientListByResourceGroupOptions{ManagedClusterResource: to.Ptr("/subscriptions/subscriptionId1/resourcegroups/resourceGroup1/providers/Microsoft.ContainerService/managedClusters/cluster1")})
	for pager.More() {
		nextResult, err := pager.NextPage(ctx)
		if err != nil {
			log.Fatalf("failed to advance page: %v", err)
		}
		for _, v := range nextResult.Value {
			// TODO: use page item
			_ = v
		}
	}
}

// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/developerhub/resource-manager/Microsoft.DevHub/preview/2022-04-01-preview/examples/Workflow_Get.json
func ExampleWorkflowClient_Get() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdevhub.NewWorkflowClient("subscriptionId1", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Get(ctx, "resourceGroup1", "workflow1", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}

// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/developerhub/resource-manager/Microsoft.DevHub/preview/2022-04-01-preview/examples/Workflow_CreateOrUpdate.json
func ExampleWorkflowClient_CreateOrUpdate() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdevhub.NewWorkflowClient("subscriptionId1", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.CreateOrUpdate(ctx, "resourceGroup1", "workflow1", armdevhub.Workflow{
		Location: to.Ptr("location1"),
		Tags: map[string]*string{
			"appname": to.Ptr("testApp"),
		},
		Properties: &armdevhub.WorkflowProperties{
			GithubWorkflowProfile: &armdevhub.GitHubWorkflowProfile{
				Acr: &armdevhub.ACR{
					AcrRegistryName:   to.Ptr("registry1"),
					AcrRepositoryName: to.Ptr("repo1"),
					AcrResourceGroup:  to.Ptr("resourceGroup1"),
					AcrSubscriptionID: to.Ptr("subscriptionId1"),
				},
				AksResourceID: to.Ptr("/subscriptions/subscriptionId1/resourcegroups/resourceGroup1/providers/Microsoft.ContainerService/managedClusters/cluster1"),
				BranchName:    to.Ptr("branch1"),
				DeploymentProperties: &armdevhub.DeploymentProperties{
					KubeManifestLocations: []*string{
						to.Ptr("/src/manifests/")},
					ManifestType: to.Ptr(armdevhub.ManifestTypeKube),
					Overrides: map[string]*string{
						"key1": to.Ptr("value1"),
					},
				},
				DockerBuildContext: to.Ptr("repo1/src/"),
				Dockerfile:         to.Ptr("repo1/images/Dockerfile"),
				OidcCredentials: &armdevhub.GitHubWorkflowProfileOidcCredentials{
					AzureClientID: to.Ptr("12345678-3456-7890-5678-012345678901"),
					AzureTenantID: to.Ptr("66666666-3456-7890-5678-012345678901"),
				},
				RepositoryName:  to.Ptr("repo1"),
				RepositoryOwner: to.Ptr("owner1"),
			},
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}

// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/developerhub/resource-manager/Microsoft.DevHub/preview/2022-04-01-preview/examples/Workflow_Delete.json
func ExampleWorkflowClient_Delete() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdevhub.NewWorkflowClient("subscriptionId1", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.Delete(ctx, "resourceGroup1", "workflow1", nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}

// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/developerhub/resource-manager/Microsoft.DevHub/preview/2022-04-01-preview/examples/Workflow_UpdateTags.json
func ExampleWorkflowClient_UpdateTags() {
	cred, err := azidentity.NewDefaultAzureCredential(nil)
	if err != nil {
		log.Fatalf("failed to obtain a credential: %v", err)
	}
	ctx := context.Background()
	client, err := armdevhub.NewWorkflowClient("subscriptionId1", cred, nil)
	if err != nil {
		log.Fatalf("failed to create client: %v", err)
	}
	res, err := client.UpdateTags(ctx, "resourceGroup1", "workflow1", armdevhub.TagsObject{
		Tags: map[string]*string{
			"promote":     to.Ptr("false"),
			"resourceEnv": to.Ptr("testing"),
		},
	}, nil)
	if err != nil {
		log.Fatalf("failed to finish the request: %v", err)
	}
	// TODO: use response item
	_ = res
}


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<meta name="GENERATOR" content="Mozilla/4.01 [en] (Win95; I) [Netscape]">
<title>KSI/Odetics TPRO/S IRIG Interface</title>
<link href="scripts/style.css" type="text/css" rel="stylesheet">

KSI/Odetics TPRO/S IRIG Interface

Author: David L. Mills (mills@udel.edu)

  Last update:
  11-Sep-2010  05:56
  UTC

Synopsis

Address: 127.127.12.u

  Reference ID: <tt>IRIG</tt>

  Driver ID: <tt>IRIG_TPRO</tt>

  TPRO Device: <tt>/dev/tprou</tt>

  Requires: KSI/Odetics device driver, <tt>/usr/include/sys/tpro.h</tt> header file

Description

This driver supports the KSI/Odetics TPRO and TPRO-SAT IRIG-B Decoder, which is a module connected directly to the SBus of a Sun workstation. The module works with the IRIG-B signal generated by several radio clocks, including those made by Arbiter, Austron, Odetics, Spectracom and TrueTime, among others, although it is generally an add- on option. In the case of the TPRO-SAT, the module is an integral part of a GPS receiver, which serves as the primary timing source.

Using the TPRO interface as a NTP reference clock provides precision time only to ntpd and its clients. With suitable kernel modifications, it is possible to use the TPRO as the CPU system clock, avoiding errors introduced by the CPU clock oscillator wander. See the A Kernel Model for Precision Timekeeping page for further details.

Fudge Factors

<tt>time1 time</tt>

Specifies the time offset calibration factor, in seconds and fraction, with default 0.0.

<tt>time2 time</tt>

Not used by this driver.

<tt>stratum number</tt>

Specifies the driver stratum, in decimal from 0 to 15, with default 0.

<tt>refid string</tt>

Specifies the driver reference identifier, an ASCII string from one to four characters, with default <tt>IRIG</tt>.

<tt>flag1 0 | 1</tt>

Not used by this driver.

<tt>flag2 0 | 1</tt>

Not used by this driver.

<tt>flag3 0 | 1</tt>

Not used by this driver.

<tt>flag4 0 | 1</tt>

Not used by this driver.

Additional Information

Reference Clock Drivers


text:
FROM biocontainers/biocontainers:vdebian-buster-backports_cv1
MAINTAINER biocontainers <biodocker@gmail.com>
LABEL    software="bitseq" \
    base_image="biocontainers/biocontainers:vdebian-buster-backports_cv1" \
    container="bitseq" \
    about.summary="Bayesian Inference of Transcripts from Sequencing Data" \
    about.home="https://github.com/BitSeq/BitSeq" \
    software.version="0.7.5dfsg-4-deb" \
    upstream.version="0.7.5" \
    version="1" \
    extra.identifiers.biotools="bitseq" \
    about.copyright=" 2013-2014 Peter Glaus" \
    about.license="Artistic-2" \
    about.license_file="/usr/share/doc/bitseq/copyright" \
    extra.binaries="/usr/bin/biocUpdate,/usr/bin/checkTR,/usr/bin/convertSamples,/usr/bin/estimateDE,/usr/bin/estimateExpression,/usr/bin/estimateHyperPar,/usr/bin/estimateVBExpression,/usr/bin/extractSamples,/usr/bin/extractTranscriptInfo,/usr/bin/getCounts,/usr/bin/getFoldChange,/usr/bin/getGeneExpression,/usr/bin/getPPLR,/usr/bin/getVariance,/usr/bin/getWithinGeneExpression,/usr/bin/parseAlignment,/usr/bin/transposeLargeFile" \
    about.tags=""

USER root
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && (apt-get install -t buster-backports -y bitseq || apt-get install -y bitseq) && apt-get clean && apt-get purge && rm -rf /var/lib/apt/lists/* /tmp/*
USER biodocker


text:
require 'dmtd_vbmapp_data/request_helpers'

module DmtdVbmappData

  # Provides for the retrieving of VB-MAPP Protocol Area information from the VB-MAPP Data Server.
  class ProtocolArea

    # @!attribute [r] client
    #   @return [Client] the associated client
    attr_reader :client

    # @!attribute [r] area
    #   @return [Symbol] the area of the question (e.g. :milestones, :barriers, :transitions, :eesa)
    attr_reader :area

    # Creates an accessor for the VB-MAPP Guide Chapter on the VB-MAPP Data Server
    #
    # @note This method does *not* block, simply creates an accessor and returns
    #
    # @option opts [Client] :client A client instance
    # @option opts [Hash] :area_index_json The vbmapp area index json for the VB-Mapp Area in the format described at
    #     {https://datamtd.atlassian.net/wiki/pages/viewpage.action?pageId=18710543 /1/protocol/index - GET REST api - Area Fields}
    def initialize(opts)
      @client = opts.fetch(:client)

      index_json = opts.fetch(:area_index_json)
      @area = index_json[:area].to_sym
      @groups_index = index_json[:groups]
    end

    # @note This method does *not* block on server access
    #
    # @return [Array<ProtocolAreaGroup>] all of the VB-Mapp's {ProtocolAreaGroup} instances
    def groups
      @groups = @groups_index.map.with_index do |group_index_json, group_num|
        ProtocolAreaGroup.new(client: client, area: area, group_index_json: group_index_json)
      end if @groups.nil?

      @groups
    end

  end

end


text:
package com.github.etacassiopeia.CtCI.arrayslist

/**
  *
Permutation

  * Given two strings, write a method to decide if one is a permutation of the other
  *
  * @author Mohsen Zainalpour
  * @version 1.0
  * @since 12/05/16
  */
object Permutation {
  def main(args: Array[String]) {
    println(isPermutation("carrot", "tarroc"))
    println(isPermutationByCounting("carrot", "tarroc"))
    println(isPermutation("car", "tarroc"))
    println(isPermutationByCounting("car", "tarroc"))
  }

  def isPermutation(str1: String, str2: String): Boolean = {
    //sort and then examine elements
    str1.sorted.sameElements(str2.sorted)
  }

  def isPermutationByCounting(str1: String, str2: String): Boolean = {
    if (str1.length != str2.length)
      return false

    val list = new Array[Int](128)

    str1.foreach(c => list(c) = list(c) + 1)
    str2.forall(c => {
      list(c) = list(c) - 1
      list(c) >= 0
    })
  }
}


text:
package android.webkit;

import android.net.WebAddress;

/**
 * Manages the cookies used by an application's {@link WebView} instances.
 * Cookies are manipulated according to RFC2109.
 */
public class CookieManager {
    /**
     * @hide Only for use by WebViewProvider implementations
     */
    protected CookieManager() {
    }

    @Override
    protected Object clone() throws CloneNotSupportedException {
        throw new CloneNotSupportedException("doesn't implement Cloneable");
    }

    /**
     * Gets the singleton CookieManager instance. If this method is used
     * before the application instantiates a {@link WebView} instance,
     * {@link CookieSyncManager#createInstance CookieSyncManager.createInstance(Context)}
     * must be called first.
     *
     * @return the singleton CookieManager instance
     */
    public static synchronized CookieManager getInstance() {
        return WebViewFactory.getProvider().getCookieManager();
    }

    /**
     * Sets whether the application's {@link WebView} instances should send and
     * accept cookies.
     *
     * @param accept whether {@link WebView} instances should send and accept
     *               cookies
     */
    public synchronized void setAcceptCookie(boolean accept) {
        throw new MustOverrideException();
    }

    /**
     * Gets whether the application's {@link WebView} instances send and accept
     * cookies.
     *
     * @return true if {@link WebView} instances send and accept cookies
     */
    public synchronized boolean acceptCookie() {
        throw new MustOverrideException();
    }

     /**
     * Sets a cookie for the given URL. Any existing cookie with the same host,
     * path and name will be replaced with the new cookie. The cookie being set
     * must not have expired and must not be a session cookie, otherwise it
     * will be ignored.
     *
     * @param url the URL for which the cookie is set
     * @param value the cookie as a string, using the format of the 'Set-Cookie'
     *              HTTP response header
     */
    public void setCookie(String url, String value) {
        throw new MustOverrideException();
    }

    /**
     * Gets the cookies for the given URL.
     *
     * @param url the URL for which the cookies are requested
     * @return value the cookies as a string, using the format of the 'Cookie'
     *               HTTP request header
     */
    public String getCookie(String url) {
        throw new MustOverrideException();
    }

    /**
     * See {@link #getCookie(String)}.
     *
     * @param url the URL for which the cookies are requested
     * @param privateBrowsing whether to use the private browsing cookie jar
     * @return value the cookies as a string, using the format of the 'Cookie'
     *               HTTP request header
     * @hide Used by Browser, no intention to publish.
     */
    public String getCookie(String url, boolean privateBrowsing) {
        throw new MustOverrideException();
    }

    /**
     * Gets cookie(s) for a given uri so that it can be set to "cookie:" in http
     * request header.
     *
     * @param uri the WebAddress for which the cookies are requested
     * @return value the cookies as a string, using the format of the 'Cookie'
     *               HTTP request header
     * @hide Used by RequestHandle, no intention to publish.
     */
    public synchronized String getCookie(WebAddress uri) {
        throw new MustOverrideException();
    }

    /**
     * Removes all session cookies, which are cookies without an expiration
     * date.
     */
    public void removeSessionCookie() {
        throw new MustOverrideException();
    }

    /**
     * Removes all cookies.
     */
    public void removeAllCookie() {
        throw new MustOverrideException();
    }

    /**
     * Gets whether there are stored cookies.
     *
     * @return true if there are stored cookies
     */
    public synchronized boolean hasCookies() {
        throw new MustOverrideException();
    }

    /**
     * See {@link #hasCookies()}.
     *
     * @param privateBrowsing whether to use the private browsing cookie jar
     * @hide Used by Browser, no intention to publish.
     */
    public synchronized boolean hasCookies(boolean privateBrowsing) {
        throw new MustOverrideException();
    }

    /**
     * Removes all expired cookies.
     */
    public void removeExpiredCookie() {
        throw new MustOverrideException();
    }

    /**
     * Flushes all cookies managed by the Chrome HTTP stack to flash.
     *
     * @hide Package level api, called from CookieSyncManager
     */
    protected void flushCookieStore() {
        throw new MustOverrideException();
    }

    /**
     * Gets whether the application's {@link WebView} instances send and accept
     * cookies for file scheme URLs.
     *
     * @return true if {@link WebView} instances send and accept cookies for
     *         file scheme URLs
     */
    // Static for backward compatibility.
    public static boolean allowFileSchemeCookies() {
        return getInstance().allowFileSchemeCookiesImpl();
    }

    /**
     * Implements {@link #allowFileSchemeCookies()}.
     *
     * @hide Only for use by WebViewProvider implementations
     */
    protected boolean allowFileSchemeCookiesImpl() {
        throw new MustOverrideException();
    }

    /**
     * Sets whether the application's {@link WebView} instances should send and
     * accept cookies for file scheme URLs.
     * Use of cookies with file scheme URLs is potentially insecure. Do not use
     * this feature unless you can be sure that no unintentional sharing of
     * cookie data can take place.
     * <p>
     * Note that calls to this method will have no effect if made after a
     * {@link WebView} or CookieManager instance has been created.
     */
    // Static for backward compatibility.
    public static void setAcceptFileSchemeCookies(boolean accept) {
        getInstance().setAcceptFileSchemeCookiesImpl(accept);
    }

    /**
     * Implements {@link #setAcceptFileSchemeCookies(boolean)}.
     *
     * @hide Only for use by WebViewProvider implementations
     */
    protected void setAcceptFileSchemeCookiesImpl(boolean accept) {
        throw new MustOverrideException();
    }
}


text:
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="240dp"
    android:layout_height="match_parent"
    android:orientation="vertical" >

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="@drawable/menu_bg"
        android:orientation="vertical"
        >

        <TextView
            style="@style/SlideMenuTextItem"
            android:drawableLeft="@drawable/tab_news"
            android:text="新闻"
            android:textColor="@android:color/darker_gray"
            />
        <TextView
            style="@style/SlideMenuTextItem"
            android:drawableLeft="@drawable/tab_read"
            android:text="订阅"
            android:textColor="@android:color/darker_gray"
            />
        <TextView
            style="@style/SlideMenuTextItem"
            android:drawableLeft="@drawable/tab_ties"
            android:text="跟帖"
            android:textColor="@android:color/darker_gray"
            />
        <TextView
            style="@style/SlideMenuTextItem"
            android:drawableLeft="@drawable/tab_pics"
            android:text="图片"
            android:textColor="@android:color/darker_gray"
            />
        <TextView
            style="@style/SlideMenuTextItem"
            android:drawableLeft="@drawable/tab_ugc"
            android:text="话题"
            android:textColor="@android:color/darker_gray"
            />
        <TextView
            style="@style/SlideMenuTextItem"
            android:drawableLeft="@drawable/tab_vote"
            android:text="投票"
            android:textColor="@android:color/darker_gray"
            />
        <TextView
            style="@style/SlideMenuTextItem"
            android:drawableLeft="@drawable/tab_focus"
            android:text="聚合阅读"
            android:textColor="@android:color/darker_gray"
            />
    </LinearLayout>

</ScrollView>


text:
import request = require('request');
import http = require('http');

declare namespace requestretry {
    type RetryStrategy = (err: Error, response: http.IncomingMessage, body: any) => boolean;
    type DelayStrategy = (err: Error, response: http.IncomingMessage, body: any) => number;
    interface RequestPromise extends request.Request {
        then: Promise<any>["then"];
        catch: Promise<any>["catch"];
        promise(): Promise<any>;
    }
    interface RetryRequestAPI extends request.RequestAPI<RequestPromise, RequestRetryOptions, request.RequiredUriUrl> {
        RetryStrategies: {
            'HttpError': RetryStrategy;
            'HTTPOrNetworkError': RetryStrategy;
            'NetworkError': RetryStrategy;
        };
    }

    interface RequestRetryOptions extends request.CoreOptions {
        maxAttempts?: number;
        promiseFactory?(resolver: any): any;
        retryDelay?: number;
        retryStrategy?: RetryStrategy;
        delayStrategy?: DelayStrategy;
        fullResponse?: boolean;
    }
}

declare let requestretry: requestretry.RetryRequestAPI;
export = requestretry;


text:
#include <stdio.h>
#include <stdbool.h>

#define FOLD_COLUMN 30
#define NOT_IN_WORD -1

bool is_whitespace(int c)
{
    return c == ' ' || c == '\t' || c == '\n';
}

int main()
{
    int current_char = EOF;
    int char_position = 0;
    int position_in_word = NOT_IN_WORD;

    while ((current_char = getchar()) != EOF)
    {
        ++char_position;

        /* If on the penultimate character. */
        if (char_position == FOLD_COLUMN - 1)
        {
            /* If whitespace, simply start a newline and continue from there. */
            if (is_whitespace(current_char))
            {
                putchar('\n');
                char_position = 0;
                position_in_word = NOT_IN_WORD;
            }
            else
            {
                /*
                 * Not whitespace so in a word. If position_in_word == NOT_IN_WORD then
                 * this is the first character in the word and so we set it to 1.
                 */
                if (position_in_word == NOT_IN_WORD)
                {
                    position_in_word = 1;
                }
                else
                {
                    ++position_in_word;
                }

                /*
                 * If we are on the first character in the word, don't hyphenate.
                 * Instead start the word on a newline.
                 */
                if (position_in_word == 1)
                {
                    printf("\n%c", current_char);
                }
                /* Otherwise hyphenating is fine. */
                else
                {
                    printf("-\n%c", current_char);
                }

                /* In any case we have started a newline so reset char_position to zero. */
                char_position = 0;
            }
        }
        else
        {
            /* If we encounter whitespace we are no longer in a word. */
            if (is_whitespace(current_char))
            {
                position_in_word = NOT_IN_WORD;
            }
            else if (position_in_word == NOT_IN_WORD)
            {
                position_in_word = 1;
            }
            else
            {
                ++position_in_word;
            }

            putchar(current_char);
        }
    }

    return 0;
}


text:
<?php

namespace Sentient\Data\Metadata\Query;

use Doctrine\ORM\Mapping\ClassMetadata;
use Sentient\Data\Metadata\QueryInterface;

class GetEditablePropertiesQuery implements QueryInterface {

	protected $isPropertyEditableQuery;

	public function __construct(IsPropertyEditableQuery $isPropertyEditableQuery) {
		$this->isPropertyEditableQuery = $isPropertyEditableQuery;
	}

	public function getName() {
		return 'getEditableProperties';
	}

	public function getResult(ClassMetadata $classMetadata, array $options = []) {
		$create = !isset($options['create']) || $options['create'];
		$editableProperties = [];
		foreach($classMetadata->getReflectionClass()->getMethods(\ReflectionMethod::IS_PUBLIC) as $reflMethod) {
			if(!preg_match('/^set([A-Z][A-Za-z0-9]+)$/', $reflMethod->getName(), $matches)) {
				continue;
			}
			$property = lcfirst($matches[1]);
			if($this->isPropertyEditableQuery->getResult($classMetadata, compact('property', 'create'))) {
				$editableProperties[] = $property;
			}
		}
		return $editableProperties;
	}

}


text: YOU WIN


text:
module.exports = exports = Gridlock

var events = require('events')
var util = require('util')

util.inherits(Gridlock, events.EventEmitter)
function Gridlock () {
  if (!(this instanceof Gridlock)) return new Gridlock()
  events.EventEmitter.call(this)
  this.locks = Object.create(null)
}

Gridlock.prototype.lock = function (id) {
  return this.locks[id] || !(this.locks[id] = true)
}

Gridlock.prototype.unlock = function (id) {
  delete this.locks[id]
  this.emit(id, id)
}


text:
class Assignee
  include MotionModel::Model
  include MotionModel::ArrayModelAdapter
  columns :assignee_name => :string
  belongs_to :task
end

class Task
  include MotionModel::Model
  include MotionModel::ArrayModelAdapter
  columns       :name => :string,
  							:details => :string,
  							:some_day => :date
  has_many :assignees
end

class User
  include MotionModel::Model
  include MotionModel::ArrayModelAdapter
  columns :name => :string

  has_many :email_accounts
end

class EmailAccount
  include MotionModel::Model
  include MotionModel::ArrayModelAdapter
  columns :name => :string
  belongs_to :user
end

describe 'related objects' do
  describe "supporting belongs_to and has_many with camelcased relations" do
    before do
      EmailAccount.delete_all
      User.delete_all
    end

    it "camelcased style" do
      t = User.create(:name => "Arkan")
      t.email_accounts.create(:name => "Gmail")
      EmailAccount.first.user.name.should == "Arkan"
      User.last.email_accounts.last.name.should == "Gmail"
    end
  end

  describe 'has_many' do
    before do
      Task.delete_all
      Assignee.delete_all
    end

    it "is wired up right" do
      lambda {Task.new}.should.not.raise
      lambda {Task.new.assignees}.should.not.raise
    end

    it 'relation objects are empty on initialization' do
      a_task = Task.create
      a_task.assignees.all.should.be.empty
    end

    it "supports creating related objects directly on parents" do
      a_task = Task.create(:name => 'Walk the Dog')
      a_task.assignees.create(:assignee_name => 'bob')
      a_task.assignees.count.should == 1
      a_task.assignees.first.assignee_name.should == 'bob'
      Assignee.count.should == 1
    end

    describe "supporting has_many" do
      before do
        Task.delete_all
        Assignee.delete_all

        @tasks = []
        @assignees = []
        1.upto(3) do |task|
          t = Task.create(:name => "task #{task}", :id => task)
          assignee_index = 1
          @tasks << t
          1.upto(task * 2) do |assignee|
            @assignees << t.assignees.create(:assignee_name => "employee #{assignee_index}_assignee_for_task_#{t.id}")
            assignee_index += 1
          end
        end
      end

      it "is wired up right" do
        Task.count.should == 3
        Assignee.count.should == 12
      end

      it "has 2 assignees for the first task" do
        Task.first.assignees.count.should == 2
      end

      it "the first assignee for the second task is employee 7" do
        Task.find(2).name.should == @tasks[1].name
        Task.find(2).assignees.first.assignee_name.should == @assignees[2].assignee_name
      end

      it 'supports adding related objects to parents' do
        assignee = Assignee.new(:assignee_name => 'Zoe')
        Task.count.should == 3
        assignee_count = Task.find(3).assignees.count
        Task.find(3).assignees.push(assignee)
        Task.find(3).assignees.count.should == assignee_count + 1
      end

    end

    it "supports creating blank (empty) scratchpad associated objects" do
      task = Task.create :name => 'watch a movie'
      assignee = task.assignees.new # TODO per Rails convention, this should really be #build, not #new
      assignee.assignee_name = 'Chloe'
      assignee.save
      task.assignees.count.should == 1
      task.assignees.first.assignee_name.should == 'Chloe'
    end
  end

  describe "supporting belongs_to" do
    before do
      Task.delete_all
      Assignee.delete_all
    end

    it "allows a child to back-reference its parent" do
      t = Task.create(:name => "Walk the Dog")
      t.assignees.create(:assignee_name => "Rihanna")
      Assignee.first.task.name.should == "Walk the Dog"
    end

    describe "belongs_to reassignment" do
      before do
        Task.delete_all
        @t1 = Task.create(:name => "Walk the Dog")
        @t2 = Task.create :name => "Feed the cat"
        @a1 = Assignee.create :assignee_name => "Jim"
      end

      describe "basic wiring" do
        before do
          @t1.assignees << @a1
        end

        it "pushing a created assignee gives a task count of 1" do
          @t1.assignees.count.should == 1
        end

        it "pushing a created assignee gives a cascaded assignee name" do
          @t1.assignees.first.assignee_name.should == "Jim"
        end

        it "pushing a created assignee enables back-referencing a task" do
          @a1.task.name.should == "Walk the Dog"
        end
      end

      describe "when pushing assignees onto two different tasks" do
        before do
          @t2.assignees << @a1
        end

        it "pushing assignees to two different tasks lets the last task have the assignee (count)" do
          @t2.assignees.count.should == 1
        end

        it "pushing assignees to two different tasks removes the assignee from the first task (count)" do
          @t1.assignees.count.should == 0
        end

        it "pushing assignees to two different tasks lets the last task have the assignee (assignee name)" do
          @t2.assignees.first.assignee_name.should == "Jim"
        end

        it "pushing assignees to two different tasks lets the last task have the assignee (back reference)" do
          @a1.task.name.should == "Feed the cat"
        end
      end

      describe "directly assigning to child" do
        it "directly assigning a different task to an assignee changes the assignee's task" do
          @a1.task_id = @t1.id
          @a1.save
          @t1.assignees.count.should == 1
          @t1.assignees.first.assignee_name.should == @a1.assignee_name
        end

        it "directly assigning an instance of a task to an assignee changes the assignee's task" do
          @a1.task = @t1
          @a1.save
          @t1.assignees.count.should == 1
          @t1.assignees.first.assignee_name.should == @a1.assignee_name
        end

        it "directly assigning the assignee a nil task twice doesn't change anything" do
          @a1.task.should == nil
          @a1.task = nil
          @a1.dirty?.should == false
        end

        it "directly assigning the existing task to an assignee doesn't change anything" do
          @a1.task = @t1
          @a1.save
          @a1.task = @t1
          @a1.dirty?.should == false
        end

        it "directly assigning the assignee a nil task twice doesn't change anything" do
          @a1.task.should == nil
          @a1.task = nil
          @a1.dirty?.should == false
        end
      end
    end
  end
end


text:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"[]>

    <title>Tag demonstrator</title>
    <link rel="stylesheet" href="../../css/master.css" type="text/css" />
    <link rel="stylesheet" href="../../css/print.css" type="text/css" media="print" />

«

            Home

            readme

              Features

                Arithmetic

                Trigonometry

                  00 Basic Gherkin

                    Showing basic gherkin syntax

                  01 Test Runner

                    The test runner is not (very) important

                  02 Tags And Hooks

                    Addition

                    Tag demonstrator

                  031 Scenario Context

                    Scenario Context features

                  032 Feature Context

                    FeatureContext features

                  03 Scenario Outline

                    Scenario outline

                  04 Background

                    Show the use of background

                  05 Tables And Assist

                    Showing table usage

                  06 Compare To Assist

                    Show the compare to feature

                  07 Localization

                    Svenska - Summering

                    Test de Cultuur in het Vlaams

                  08 Attribute Overloading

                    Attribute overloading

                  09 Calling Steps From Steps

                    Calling Steps from StepDefinitions

                  10 Step Transformation

                    Step Argument Transformations

                  11 Context Injection

                    Injecting context into step specifications

                  12 Nested Folders

                      Child Folder

                          Child Child Folder

                            Nested Folder Example

                  13 Multiline Text

                    Multiline Feature Example

                  14 Markdown Example

                    Sample Markdown Feature

                  15 Pickles

                    Interactive DHTML View

                    Kinds of verification

                  Workflow

                    Clearing Screen

Tags: @allAboutTags, @important

Tag demonstrator

In order to show the capabilities of tags in SpecFlow

As a SpecFlow evanglist

I want to write scenarios that has tags and show their usage in code

Tags: @allAboutTags, @ignore, @important

Ignored scenario

                  Given that my scenario has the @ignore tag

                  When I run the scenario

                  Then the scenario is ignored

                  And the missing step definitions are not reported

Tags: @allAboutTags, @important

A scenario without tags

                  Given that my scenario has 0 tags

                  When I run the scenario

                  Then before scenario hook with '' is run

Tags: @allAboutTags, @important, @testTag1

A scenario with 1 tag

                  Given that my scenario has 1 tags

                  When I run the scenario

                  Then before scenario hook with 'testTag1' is run

Tags: @allAboutTags, @important, @testTag1, @testTag2, @testTag3

A scenario with 3 tags

                  Given that my scenario has 3 tags

                  When I run the scenario

                  Then before scenario hook with 'testTag1, testTag2, testTag3' is run

Tags: @allAboutTags, @important, @testTag1, @testTag3

A scenario with 2 tags

                  Given that my scenario has 2 tags

                  When I run the scenario

                  Then before scenario hook with 'testTag1, testTag3' is run

Test results generated for: Pickles, version 4.0.1

Generated on: 9 May 2022 16:20:50

Produced by Pickles, version 0.0.0.0


text:
<?php

namespace Oro\Bundle\EmailBundle\Form\Type;

use Symfony\Component\Form\AbstractType;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;

use Oro\Bundle\SecurityBundle\SecurityFacade;
use Oro\Bundle\UserBundle\Entity\User;
use Oro\Bundle\EmailBundle\Provider\RelatedEmailsProvider;
use Oro\Bundle\EmailBundle\Entity\Manager\MailboxManager;

class EmailAddressFromType extends AbstractType
{
    const NAME = 'oro_email_email_address_from';

    /** @var SecurityFacade */
    protected $securityFacade;

    /** @var RelatedEmailsProvider */
    protected $relatedEmailsProvider;

    /** @var MailboxManager */
    protected $mailboxManager;

    /**
     * @param SecurityFacade $securityFacade
     * @param RelatedEmailsProvider $relatedEmailsProvider
     * @param MailboxManager $mailboxManager
     */
    public function __construct(
        SecurityFacade $securityFacade,
        RelatedEmailsProvider $relatedEmailsProvider,
        MailboxManager $mailboxManager
    ) {
        $this->securityFacade = $securityFacade;
        $this->relatedEmailsProvider = $relatedEmailsProvider;
        $this->mailboxManager = $mailboxManager;
    }

    /**
     * {@inheritdoc}
     */
    public function setDefaultOptions(OptionsResolverInterface $resolver)
    {
        $choices = $this->createChoices();

        $resolver->setDefaults([
            'choices'   => $choices,
            'read_only' => count($choices) === 1,
        ]);
    }

    /**
     * @return array
     */
    protected function createChoices()
    {
        $user = $this->securityFacade->getLoggedUser();
        if (!$user instanceof User) {
            return [];
        }

        $emails = array_merge(
            array_values($this->relatedEmailsProvider->getEmails($user, 1, true)),
            $this->mailboxManager->findAvailableMailboxEmails($user, $this->securityFacade->getOrganization())
        );

        return array_combine($emails, $emails);
    }

    /**
     * {@inheritdoc}
     */
    public function getParent()
    {
        return 'genemu_jqueryselect2_choice';
    }

    /**
     * {@inheritdoc}
     */
    public function getName()
    {
        return $this->getBlockPrefix();
    }

    /**
     * {@inheritdoc}
     */
    public function getBlockPrefix()
    {
        return static::NAME;
    }
}


text:
package com.hazelcast.multimap.impl.operations;

import com.hazelcast.multimap.impl.MultiMapDataSerializerHook;
import com.hazelcast.nio.serialization.Data;
import com.hazelcast.spi.BackupOperation;

public class RemoveAllBackupOperation extends MultiMapKeyBasedOperation implements BackupOperation {

    public RemoveAllBackupOperation() {
    }

    public RemoveAllBackupOperation(String name, Data dataKey) {
        super(name, dataKey);
    }

    @Override
    public void run() throws Exception {
        delete();
        response = true;
    }

    @Override
    public int getId() {
        return MultiMapDataSerializerHook.REMOVE_ALL_BACKUP;
    }
}


text:
<!DOCTYPE html>

  <title>Strix</title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">

  <link rel="stylesheet" href="strix.css">

      <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">

       </button>
       STRIX

Home

About

Features

Register

Contact Us

Contact Us

Let us know how we can assist you.

Help & Support

We're here to help with any technical questions you may have.

Sales

We'd love to talk about how we can collaborate and help your business reach the bottom line.

Media Resources

We can refer you to more of our company info and media resources.

Please email info@strix.com for all queries.

Ready to get started?

Create an account now!

          <button type="button" class="btn btn-success btn-lg" id="ready-button">Create Account</button>
          <button type="button" class="btn btn-success btn-lg" id="ready-button">Learn More About Us</button>

        Home
        About
        Features
        Register
        Contact Us

        © Strix 2017 All Rights Reserved.


text:
package com.example.ui.tag;

import org.thymeleaf.Arguments;
import org.thymeleaf.Configuration;
import org.thymeleaf.dom.Element;
import org.thymeleaf.processor.attr.AbstractAttributeModifierAttrProcessor;
import org.thymeleaf.standard.expression.IStandardExpression;
import org.thymeleaf.standard.expression.IStandardExpressionParser;
import org.thymeleaf.standard.expression.StandardExpressions;

import java.util.*;

/**
 * Created by naga on 15/04/02.
 */
public class IdNameProcessor extends AbstractAttributeModifierAttrProcessor {

    public static final int ATTR_PRECEDENCE = 10000;
    public static final String ATTR_NAME = "idname";

    public IdNameProcessor() {
        super(ATTR_NAME);
    }

    @Override
    public int getPrecedence() {
        return ATTR_PRECEDENCE;
    }

    @Override
    protected Map<String, String> getModifiedAttributeValues(
            Arguments arguments, Element element, String attributeName) {
        final String attributeValue = element.getAttributeValue(attributeName);

        final Configuration configuration = arguments.getConfiguration();
        final IStandardExpressionParser expressionParser =
                StandardExpressions.getExpressionParser(configuration);

        final IStandardExpression expression =
                expressionParser.parseExpression(configuration, arguments, attributeValue);

        final Set<String> newAttributeNames =
                new HashSet<String>(Arrays.asList("id", "name"));

        final Object valueForAttributes = expression.execute(configuration, arguments);

        final Map<String,String> result =
                new HashMap<String,String>(newAttributeNames.size() + 1, 1.0f);
        for (final String newAttributeName : newAttributeNames) {
            result.put(newAttributeName,
                    (valueForAttributes == null? "" : valueForAttributes.toString()));
        }

        return result;
    }

    @Override
    protected ModificationType getModificationType(
            final Arguments arguments, final Element element,
            final String attributeName, final String newAttributeName) {
        return ModificationType.SUBSTITUTION;
    }

    @Override
    protected boolean removeAttributeIfEmpty(
            final Arguments arguments, final Element element,
            final String attributeName, final String newAttributeName) {
        return false;
    }

    @Override
    protected boolean recomputeProcessorsAfterExecution(
            Arguments arguments, Element element, String attributeName) {
        return false;
    }
}


text:
import fuse

import time, sys

import stat, os, errno

import libCloudSnakeClient as SnakeClient

fuse.fuse_python_api = (0, 2)

class ObjectStat(fuse.Stat):
	def __init__( self ):
		self.st_mode = stat.S_IFDIR | 0755
		self.st_ino = 0
		self.st_dev = 0
		self.st_nlink = 2
		self.st_uid = 0
		self.st_gid = 0
		self.st_size = 4096
		self.st_atime = int( time.time() )
		self.st_mtime = int( time.time() )
		self.st_ctime = int( time.time() )

class testFS( fuse.Fuse ):
	def __init__(self, *args, **kw):
		fuse.Fuse.__init__(self, *args, **kw)

		print 'Init complete.'

		self.files = []
		#self.files.append( 'htpasswd_id' )
		self.client = None

	def attach_cloudsnake( self, client ):
		self.client = client
		self.snake = SnakeClient.CloudSnakeMapper( self.client )

		self.files = self.snake.apache_get_groups()
		print "self.files:", self.files
		self.content = {}

	def getattr(self, path):
		"""
		- st_mode (protection bits)
		- st_ino (inode number)
		- st_dev (device)
		- st_nlink (number of hard links)
		- st_uid (user ID of owner)
		- st_gid (group ID of owner)
		- st_size (size of file, in bytes)
		- st_atime (time of most recent access)
		- st_mtime (time of most recent content modification)
		- st_ctime (platform dependent; time of most recent metadata change on Unix,
					or the time of creation on Windows).
		"""

		print '*** getattr', path

		#depth = getDepth(path) # depth of path, zero-based from root
		#pathparts = getParts(path) # the actual parts of the path

		#return -errno.ENOSYS

		self.files = self.snake.apache_get_groups()
		print "self.files:", self.files

		st = ObjectStat()

		parts = path.split( '/' )
		if len( parts ) > 1:
			fn = parts[ 1 ]
		else:
			fn = ''

		if fn == '':
			print "returing stats"
			st.st_nlink += len( self.files )
			return st

		elif fn not in self.files:
			print "No such file! (%s)"%fn
			return -errno.ENOENT
		else:
			print "Returning stats.."
			st.st_mode = stat.S_IFREG | 0755

			self.content[ fn ] = self.snake.apache_get_content( fn )
			st.st_size = len( self.content[ fn ] )

			return st

#	def getdir(self, path):
#		"""
#		return: [[('file1', 0), ('file2', 0), ... ]]
#		"""
#		self.files = self.snake.apache_get_groups()
#
#		print '*** getdir', path
#		#return -errno.ENOSYS
#		return [[ (x, 0) for x in self.files ]]

	def readdir(self, path, offset):

		print "*** readdir"

		dirents = [ '.', '..' ]

		self.files = self.snake.apache_get_groups()
		print "self.files:", self.files

		if path == '/':
			dirents.extend( self.files )

		for r in dirents:
			yield fuse.Direntry( str( r ))

	def chmod( self, path, mode ):
		print '*** chmod', path, oct(mode)
		#return -errno.ENOSYS
		return 0

	def chown( self, path, uid, gid ):
		print '*** chown', path, uid, gid
		#return -errno.ENOSYS
		return 0

	def fsync( self, path, isFsyncFile ):
		print '*** fsync', path, isFsyncFile
		return -errno.ENOSYS

	def link( self, targetPath, linkPath ):
		print '*** link', targetPath, linkPath
		return -errno.ENOSYS

	def mkdir( self, path, mode ):
		print '*** mkdir', path, oct(mode)
		return -errno.ENOSYS

	def mknod( self, path, mode, dev ):
		print '*** mknod', path, oct(mode), dev
		return -errno.ENOSYS

	def open( self, path, flags ):
		print '*** open', path, flags
		#return -errno.ENOSYS
		return 0

	def read( self, path, length, offset ):
		print '*** read', path, length, offset
		#return -errno.ENOSYS
		parts = path.split( '/' )
		fn = parts[ 1 ]
		self.content[ fn ] = self.snake.apache_get_content( fn )
		#return self.content[ fn ][ offset : offset + length ]
		out = self.content[ fn ][ offset : offset + length ]
		print "out:", out
		return str( out )

	def readlink( self, path ):
		print '*** readlink', path
		return -errno.ENOSYS

	def release( self, path, flags ):
		print '*** release', path, flags
		#return -errno.ENOSYS
		return 0

	def rename( self, oldPath, newPath ):
		print '*** rename', oldPath, newPath
		return -errno.ENOSYS

	def rmdir( self, path ):
		print '*** rmdir', path
		return -errno.ENOSYS

	def statfs( self ):
		print '*** statfs'
		return -errno.ENOSYS

	def symlink( self, targetPath, linkPath ):
		print '*** symlink', targetPath, linkPath
		return -errno.ENOSYS

	def truncate( self, path, size ):
		print '*** truncate', path, size
		return -errno.ENOSYS

	def unlink( self, path ):
		print '*** unlink', path
		return -errno.ENOSYS

	def utime( self, path, times ):
		print '*** utime', path, times
		return -errno.ENOSYS

	def write( self, path, buf, offset ):
		print '*** write', path, buf, offset
		return -errno.ENOSYS

if __name__ == '__main__':

	client = SnakeClient.CloudSnakeClient( 'http://localhost:8500', 'main' )

	fs = testFS()
	fs.attach_cloudsnake( client )

	fs.flags = 0
	fs.multihreaded = 0
	fs.parse()
	fs.main()
	#print fs.main.__doc__


text:
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4
// See http://java.sun.com/xml/jaxb
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2014.10.06 at 09:06:12 AM BRT
//

package br.com.cmabreu.webomt.ieee1516e;

import java.util.HashMap;
import java.util.Map;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAnyAttribute;
import javax.xml.bind.annotation.XmlAnyElement;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlID;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlSeeAlso;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import javax.xml.namespace.QName;

/**
 *
Java class for synchronizationPointType complex type.
 *
 *
The following schema fragment specifies the expected content contained within this class.
 *
 *

 * <complexType name="synchronizationPointType">
 *   <complexContent>
 *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *       <sequence>
 *         <element name="label" type="{http://standards.ieee.org/IEEE1516-2010}IdentifierType"/>
 *         <element name="dataType" type="{http://standards.ieee.org/IEEE1516-2010}ReferenceType" minOccurs="0"/>
 *         <element name="capability" type="{http://standards.ieee.org/IEEE1516-2010}capabilityType" minOccurs="0"/>
 *         <element name="semantics" type="{http://standards.ieee.org/IEEE1516-2010}String" minOccurs="0"/>
 *         <any namespace='##other' minOccurs="0"/>
 *       </sequence>
 *       <attGroup ref="{http://standards.ieee.org/IEEE1516-2010}commonAttributes"/>
 *       <anyAttribute namespace='##other'/>
 *     </restriction>
 *   </complexContent>
 * </complexType>
 *

 *
 *
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "synchronizationPointType", propOrder = {
    "label",
    "dataType",
    "capability",
    "semantics",
    "any"
})
@XmlSeeAlso({
    br.com.cmabreu.webomt.ieee1516e.SynchronizationsType.SynchronizationPoint.class
})
public class SynchronizationPointType {

    @XmlElement(required = true)
    protected IdentifierType label;
    protected ReferenceType dataType;
    protected CapabilityType capability;
    protected br.com.cmabreu.webomt.ieee1516e.String semantics;
    @XmlAnyElement(lax = true)
    protected Object any;
    @XmlAttribute(name = "idtag")
    @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
    @XmlID
    @XmlSchemaType(name = "ID")
    protected java.lang.String idtag;
    @XmlAnyAttribute
    private Map<QName, java.lang.String> otherAttributes = new HashMap<QName, java.lang.String>();

    /**
     * Gets the value of the label property.
     *
     * @return
     *     possible object is
     *     {@link IdentifierType }
     *
     */
    public IdentifierType getLabel() {
        return label;
    }

    /**
     * Sets the value of the label property.
     *
     * @param value
     *     allowed object is
     *     {@link IdentifierType }
     *
     */
    public void setLabel(IdentifierType value) {
        this.label = value;
    }

    /**
     * Gets the value of the dataType property.
     *
     * @return
     *     possible object is
     *     {@link ReferenceType }
     *
     */
    public ReferenceType getDataType() {
        return dataType;
    }

    /**
     * Sets the value of the dataType property.
     *
     * @param value
     *     allowed object is
     *     {@link ReferenceType }
     *
     */
    public void setDataType(ReferenceType value) {
        this.dataType = value;
    }

    /**
     * Gets the value of the capability property.
     *
     * @return
     *     possible object is
     *     {@link CapabilityType }
     *
     */
    public CapabilityType getCapability() {
        return capability;
    }

    /**
     * Sets the value of the capability property.
     *
     * @param value
     *     allowed object is
     *     {@link CapabilityType }
     *
     */
    public void setCapability(CapabilityType value) {
        this.capability = value;
    }

    /**
     * Gets the value of the semantics property.
     *
     * @return
     *     possible object is
     *     {@link br.com.cmabreu.webomt.ieee1516e.String }
     *
     */
    public br.com.cmabreu.webomt.ieee1516e.String getSemantics() {
        return semantics;
    }

    /**
     * Sets the value of the semantics property.
     *
     * @param value
     *     allowed object is
     *     {@link br.com.cmabreu.webomt.ieee1516e.String }
     *
     */
    public void setSemantics(br.com.cmabreu.webomt.ieee1516e.String value) {
        this.semantics = value;
    }

    /**
     * Gets the value of the any property.
     *
     * @return
     *     possible object is
     *     {@link Object }
     *
     */
    public Object getAny() {
        return any;
    }

    /**
     * Sets the value of the any property.
     *
     * @param value
     *     allowed object is
     *     {@link Object }
     *
     */
    public void setAny(Object value) {
        this.any = value;
    }

    /**
     * Gets the value of the idtag property.
     *
     * @return
     *     possible object is
     *     {@link java.lang.String }
     *
     */
    public java.lang.String getIdtag() {
        return idtag;
    }

    /**
     * Sets the value of the idtag property.
     *
     * @param value
     *     allowed object is
     *     {@link java.lang.String }
     *
     */
    public void setIdtag(java.lang.String value) {
        this.idtag = value;
    }

    /**
     * Gets a map that contains attributes that aren't bound to any typed property on this class.
     *
     *

     * the map is keyed by the name of the attribute and
     * the value is the string value of the attribute.
     *
     * the map returned by this method is live, and you can add new attribute
     * by updating the map directly. Because of this design, there's no setter.
     *
     *
     * @return
     *     always non-null
     */
    public Map<QName, java.lang.String> getOtherAttributes() {
        return otherAttributes;
    }

}


text:
Available Games

					Host
					Map
                                        Laps
                                        Damage Mode
					Players

					{{game.players[0].name}}
					{{game.mapName}}
                                        {{game.laps}}
                                        {{game.advanced?"Advanced":"Basic"}}
					{{game.players.length}}/{{game.maxPlayers}}

						<button ng-show="player.valid" ng-click="join(game)">{{joinText(game)}}</button>

				<tr ng-show="games.length < 1">
					There are currently no open games

		<button ng-show="player.valid" ng-click="startGame()">Start a new game</button>


text:
package com.facebook.buck.android;

import com.facebook.buck.io.MorePaths;
import com.facebook.buck.io.ProjectFilesystem;
import com.facebook.buck.log.Logger;
import com.facebook.buck.rules.RuleKeyAppendable;
import com.facebook.buck.rules.RuleKeyBuilder;
import com.facebook.buck.shell.BashStep;
import com.facebook.buck.step.ExecutionContext;
import com.facebook.buck.step.Step;
import com.facebook.buck.util.Console;
import com.facebook.buck.util.DefaultFilteredDirectoryCopier;
import com.facebook.buck.util.Escaper;
import com.facebook.buck.util.FilteredDirectoryCopier;
import com.facebook.buck.util.Filters;
import com.facebook.buck.util.Filters.Density;
import com.facebook.buck.util.HumanReadableException;
import com.facebook.buck.util.Verbosity;
import com.google.common.annotations.VisibleForTesting;
import com.google.common.base.Preconditions;
import com.google.common.base.Predicate;
import com.google.common.base.Predicates;
import com.google.common.collect.ImmutableBiMap;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Lists;
import com.google.common.collect.Sets;

import java.io.IOException;
import java.nio.file.FileVisitResult;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.nio.file.SimpleFileVisitor;
import java.nio.file.attribute.BasicFileAttributes;
import java.util.Collection;
import java.util.List;
import java.util.Set;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

import javax.annotation.Nullable;

/**
 * This {@link com.facebook.buck.step.Step} copies {@code res} directories to a different location,
 * while filtering out certain resources.
 */
public class FilterResourcesStep implements Step {

  private static final Pattern DRAWABLE_PATH_PATTERN = Pattern.compile(
      ".*drawable.*/.*(png|jpg|jpeg|gif|webp)", Pattern.CASE_INSENSITIVE);
  // Android doesn't scale these, so we don't need to scale or filter them either.
  private static final Pattern DRAWABLE_EXCLUDE_PATTERN = Pattern.compile(
      ".*-nodpi.*", Pattern.CASE_INSENSITIVE);

  private static final Logger LOG = Logger.get(FilterResourcesStep.class);

  @VisibleForTesting
  static final Pattern NON_ENGLISH_STRINGS_FILE_PATH = Pattern.compile(
      "\\b|.*/res/values-([a-z]{2})(?:-r([A-Z]{2}))*/strings.xml");

  private final ImmutableBiMap<Path, Path> inResDirToOutResDirMap;
  private final boolean filterDrawables;
  private final boolean enableStringWhitelisting;
  private final ImmutableSet<Path> whitelistedStringDirs;
  private final ImmutableSet<String> locales;
  private final FilteredDirectoryCopier filteredDirectoryCopier;
  @Nullable
  private final Set<Filters.Density> targetDensities;
  @Nullable
  private final DrawableFinder drawableFinder;
  @Nullable
  private final ImageScaler imageScaler;

  /**
   * Creates a command that filters a specified set of directories.
   * @param inResDirToOutResDirMap set of {@code res} directories to filter
   * @param filterDrawables whether to filter drawables (images)
   * @param enableStringWhitelisting whether to filter strings based on a whitelist
   * @param whitelistedStringDirs set of directories containing string resource files that must not
   *     be filtered out.
   * @param locales set of locales that the localized strings.xml files within {@code values-*}
   *     directories should be filtered by. This is useful if there are multiple apps that support a
   *     different set of locales that share a module. If empty, no filtering is performed.
   * @param filteredDirectoryCopier refer {@link FilteredDirectoryCopier}
   * @param targetDensities densities we're interested in keeping (e.g. {@code mdpi}, {@code hdpi}
   *     etc.) Only applicable if filterDrawables is true
   * @param drawableFinder refer {@link DrawableFinder}. Only applicable if filterDrawables is true.
   * @param imageScaler if not null, use the {@link ImageScaler} to downscale higher-density
   *     drawables for which we weren't able to find an image file of the proper density (as opposed
   *     to allowing Android to do it at runtime). Only applicable if filterDrawables. is true.
   */
  @VisibleForTesting
  FilterResourcesStep(
      ImmutableBiMap<Path, Path> inResDirToOutResDirMap,
      boolean filterDrawables,
      boolean enableStringWhitelisting,
      ImmutableSet<Path> whitelistedStringDirs,
      ImmutableSet<String> locales,
      FilteredDirectoryCopier filteredDirectoryCopier,
      @Nullable Set<Filters.Density> targetDensities,
      @Nullable DrawableFinder drawableFinder,
      @Nullable ImageScaler imageScaler) {

    Preconditions.checkArgument(filterDrawables || enableStringWhitelisting || !locales.isEmpty());
    Preconditions.checkArgument(!filterDrawables ||
        (targetDensities != null && drawableFinder != null));
    this.inResDirToOutResDirMap = inResDirToOutResDirMap;
    this.filterDrawables = filterDrawables;
    this.enableStringWhitelisting = enableStringWhitelisting;
    this.whitelistedStringDirs = whitelistedStringDirs;
    this.locales = locales;
    this.filteredDirectoryCopier = filteredDirectoryCopier;
    this.targetDensities = targetDensities;
    this.drawableFinder = drawableFinder;
    this.imageScaler = imageScaler;
  }

  @Override
  public int execute(ExecutionContext context) {
    try {
      return doExecute(context);
    } catch (Exception e) {
      context.logError(e, "There was an error filtering resources.");
      return 1;
    }
  }

  private int doExecute(ExecutionContext context) throws IOException, InterruptedException {
    List<Predicate<Path>> pathPredicates = Lists.newArrayList();

    boolean canDownscale = imageScaler != null && imageScaler.isAvailable(context);
    LOG.info(
        "FilterResourcesStep: canDownscale: %s. imageScalar non-null: %s.",
        canDownscale,
        imageScaler != null);

    if (filterDrawables) {
      Preconditions.checkNotNull(drawableFinder);
      Set<Path> drawables = drawableFinder.findDrawables(
          inResDirToOutResDirMap.keySet(),
          context.getProjectFilesystem());
      pathPredicates.add(
          Filters.createImageDensityFilter(
              drawables,
              Preconditions.checkNotNull(targetDensities),
              canDownscale));
    }

    final boolean localeFilterEnabled = !locales.isEmpty();
    if (localeFilterEnabled || enableStringWhitelisting) {
      pathPredicates.add(
          new Predicate<Path>() {
            @Override
            public boolean apply(Path path) {
              Matcher matcher = NON_ENGLISH_STRINGS_FILE_PATH.matcher(
                  MorePaths.pathWithUnixSeparators(path));
              if (!matcher.matches()) {
                return true;
              }

              if (enableStringWhitelisting) {
                return isPathWhitelisted(path);
              } else {
                Preconditions.checkState(localeFilterEnabled);
                String locale = matcher.group(1);
                if (matcher.group(2) != null) {
                  locale += "_" + matcher.group(2);
                }

                return locales.contains(locale);
              }
            }
          });
    }

    // Create filtered copies of all resource directories. These will be passed to aapt instead.
    filteredDirectoryCopier.copyDirs(
        context.getProjectFilesystem(),
        inResDirToOutResDirMap,
        Predicates.and(pathPredicates));

    // If an ImageScaler was specified, but only if it is available, try to apply it.
    if (canDownscale && filterDrawables) {
      scaleUnmatchedDrawables(context);
    }

    return 0;
  }

  private boolean isPathWhitelisted(Path path) {
    for (Path whitelistedStringDir : whitelistedStringDirs) {
      if (path.startsWith(whitelistedStringDir)) {
        return true;
      }
    }

    return false;
  }

  @Override
  public String getShortName() {
    return "resource_filtering";
  }

  @Override
  public String getDescription(ExecutionContext context) {
    return "Filtering drawable and string resources.";
  }

  /**
   * Looks through filtered drawables for files not of the target density and replaces them with
   * scaled versions.
   *

   * Any drawables found by this step didn't have equivalents in the target density. If they are of
   * a higher density, we can replicate what Android does and downscale them at compile-time.
   */
  private void scaleUnmatchedDrawables(ExecutionContext context)
      throws IOException, InterruptedException {
    ProjectFilesystem filesystem = context.getProjectFilesystem();
    Filters.Density targetDensity = Filters.Density.ORDERING.max(targetDensities);

    // Go over all the images that remain after filtering.
    Preconditions.checkNotNull(drawableFinder);
    Collection<Path> drawables = drawableFinder.findDrawables(
        inResDirToOutResDirMap.values(),
        context.getProjectFilesystem());
    for (Path drawable : drawables) {
      if (drawable.toString().endsWith(".9.png")) {
        // Skip nine-patch for now.
        continue;
      }

      Filters.Qualifiers qualifiers = new Filters.Qualifiers(drawable);
      Filters.Density density = qualifiers.density;

      // If the image has a qualifier but it's not the right one.
      Preconditions.checkNotNull(targetDensities);
      if (!targetDensities.contains(density)) {

        // Replace density qualifier with target density using regular expression to match
        // the qualifier in the context of a path to a drawable.
        String fromDensity = (density == Density.NO_QUALIFIER ? "" : "-") + density.toString();
        Path destination = Paths.get(MorePaths.pathWithUnixSeparators(drawable).replaceFirst(
            "((?:^|/)drawable[^/]*)" + Pattern.quote(fromDensity) + "(-|$|/)",
            "$1-" + targetDensity + "$2"));

        double factor = targetDensity.value() / density.value();
        if (factor >= 1.0) {
          // There is no point in up-scaling, or converting between drawable and drawable-mdpi.
          continue;
        }

        // Make sure destination folder exists and perform downscaling.
        filesystem.createParentDirs(destination);
        Preconditions.checkNotNull(imageScaler);
        imageScaler.scale(factor, drawable, destination, context);

        // Delete source file.
        filesystem.deleteFileAtPath(drawable);

        // Delete newly-empty directories to prevent missing resources errors in apkbuilder.
        Path parent = drawable.getParent();
        if (filesystem.listFiles(parent).length == 0) {
          filesystem.deleteFileAtPath(parent);
        }

      }
    }
  }

  public interface DrawableFinder {
    public Set<Path> findDrawables(Collection<Path> dirs, ProjectFilesystem filesystem)
        throws IOException;
  }

  public static class DefaultDrawableFinder implements DrawableFinder {

    private static final DefaultDrawableFinder instance = new DefaultDrawableFinder();

    public static DefaultDrawableFinder getInstance() {
      return instance;
    }

    @Override
    public Set<Path> findDrawables(Collection<Path> dirs, ProjectFilesystem filesystem)
        throws IOException {
      final ImmutableSet.Builder<Path> drawableBuilder = ImmutableSet.builder();
      for (Path dir : dirs) {
        filesystem.walkRelativeFileTree(dir, new SimpleFileVisitor<Path>() {
              @Override
              public FileVisitResult visitFile(Path path, BasicFileAttributes attributes) {
                String unixPath = MorePaths.pathWithUnixSeparators(path);
                if (DRAWABLE_PATH_PATTERN.matcher(unixPath).matches() &&
                    !DRAWABLE_EXCLUDE_PATTERN.matcher(unixPath).matches()) {
                  // The path is normalized so that the value can be matched against patterns.
                  drawableBuilder.add(path);
                }
                return FileVisitResult.CONTINUE;
              }
            });
      }
      return drawableBuilder.build();
    }
  }

  public interface ImageScaler {
    public boolean isAvailable(ExecutionContext context) throws IOException, InterruptedException;
    public void scale(double factor, Path source, Path destination, ExecutionContext context)
        throws IOException, InterruptedException;
  }

  /**
   * Implementation of {@link ImageScaler} that uses ImageMagick's {@code convert} command.
   *
   * @see ImageMagick
   */
  public static class ImageMagickScaler implements ImageScaler {

    private static final ImageMagickScaler instance = new ImageMagickScaler();

    public static ImageMagickScaler getInstance() {
      return instance;
    }

    private ExecutionContext getContextWithSilentConsole(ExecutionContext context) {
      // Using the normal console results in the super console freezing.
      Console console = context.getConsole();
      return ExecutionContext.builder()
          .setExecutionContext(context)
          .setConsole(new Console(
              Verbosity.SILENT,
              console.getStdOut(),
              console.getStdErr(),
              console.getAnsi()
          ))
          .build();
    }

    @Override
    public boolean isAvailable(ExecutionContext context) throws IOException, InterruptedException {
      try (ExecutionContext silentContext = getContextWithSilentConsole(context)) {
        return 0 == new BashStep("which convert").execute(silentContext);
      }
    }

    @Override
    public void scale(double factor, Path source, Path destination, ExecutionContext context)
        throws IOException, InterruptedException {
      Step convertStep = new BashStep(
          "convert",
          "-adaptive-resize", (int) (factor * 100) + "%",
          Escaper.escapeAsBashString(source),
          Escaper.escapeAsBashString(destination));

      if (0 != convertStep.execute(context)) {
        throw new HumanReadableException("Cannot scale " + source + " to " + destination);
      }
    }
  }

  /**
   * Helper class for interpreting the resource_filter argument to android_binary().
   */
  public static class ResourceFilter implements RuleKeyAppendable {

    static final ResourceFilter EMPTY_FILTER = new ResourceFilter(ImmutableList.<String>of());

    private final Set<String> filter;
    private final Set<Filters.Density> densities;
    private final boolean downscale;

    public ResourceFilter(List<String> resourceFilter) {
      this.filter = ImmutableSet.copyOf(resourceFilter);
      this.densities = Sets.newHashSet();

      boolean downscale = false;
      for (String component : filter) {
        if ("downscale".equals(component)) {
          downscale = true;
        } else {
          densities.add(Filters.Density.from(component));
        }
      }

      this.downscale = downscale;
    }

    public boolean shouldDownscale() {
      return isEnabled() && downscale;
    }

    @Nullable
    public Set<Filters.Density> getDensities() {
      return densities;
    }

    public boolean isEnabled() {
      return !densities.isEmpty();
    }

    public String getDescription() {
      return filter.toString();
    }

    @Override
    public RuleKeyBuilder appendToRuleKey(RuleKeyBuilder builder) {
      return builder.setReflectively("filter", getDescription());
    }

    @VisibleForTesting
    Set<String> getFilter() {
      return filter;
    }
  }

  public static Builder builder() {
    return new Builder();
  }

  public static class Builder {

    @Nullable
    private ImmutableBiMap<Path, Path> inResDirToOutResDirMap;
    @Nullable
    private ResourceFilter resourceFilter;
    private ImmutableSet<Path> whitelistedStringDirs = ImmutableSet.of();
    private ImmutableSet<String> locales = ImmutableSet.of();
    private boolean enableStringWhitelisting = false;

    private Builder() {
    }

    public Builder setInResToOutResDirMap(ImmutableBiMap<Path, Path> inResDirToOutResDirMap) {
      this.inResDirToOutResDirMap = inResDirToOutResDirMap;
      return this;
    }

    public Builder setResourceFilter(ResourceFilter resourceFilter) {
      this.resourceFilter = resourceFilter;
      return this;
    }

    public Builder enableStringWhitelisting() {
      this.enableStringWhitelisting = true;
      return this;
    }

    public Builder setWhitelistedStringDirs(ImmutableSet<Path> whitelistedStringDirs) {
      this.whitelistedStringDirs = whitelistedStringDirs;
      return this;
    }

    public Builder setLocales(ImmutableSet<String> locales) {
      this.locales = locales;
      return this;
    }

    public FilterResourcesStep build() {
      Preconditions.checkNotNull(resourceFilter);
      LOG.info("FilterResourcesStep.Builder: resource filter: %s", resourceFilter);
      Preconditions.checkNotNull(inResDirToOutResDirMap);
      return new FilterResourcesStep(
          inResDirToOutResDirMap,
          resourceFilter.isEnabled(),
          enableStringWhitelisting,
          whitelistedStringDirs,
          locales,
          DefaultFilteredDirectoryCopier.getInstance(),
          resourceFilter.getDensities(),
          DefaultDrawableFinder.getInstance(),
          resourceFilter.shouldDownscale() ? ImageMagickScaler.getInstance() : null);
    }
  }
}


text:
package com.jayway.uipattern.service;

/**
 * Created by pererik on 12/10/15.
 */
public class LoginService {
    private static final String USERNAME = "username";
    private static final String PASSWORD = "password";

    public boolean validate(String username, String password){
        if(!USERNAME.equals(username)){
            return false;
        }

        if(!PASSWORD.equals(password)){
            return false;
        }

        return true;
    }

    public static LoginService getService() {
        return new LoginService();
    }

}


text:
import '@angular/core';
import '@angular/common';
import '@angular/platform-browser';
import '@angular/platform-browser-dynamic';
import '@angular/router-deprecated';

import 'rxjs/add/operator/toPromise';

import 'bootstrap/dist/css/bootstrap.css';


text:
breakout
========

Breakout clone written in C using Stanford's cslib package


text:
@external formDetailDataGrid;
@def selectionBorderWidth 0px;

.formDetailDataGrid{
	border:1px solid #4c4c4c;
}
.dataGridWidget {

}

.dataGridFirstColumn {

}

.dataGridLastColumn {

}

.dataGridFooter {
  padding: 3px 15px;
  text-align: left;
  color: #4b4a4a;
  text-shadow: #ddf 1px 1px 0;
  overflow: hidden;
  white-space: nowrap;
}

.dataGridHeader {
  background: -webkit-gradient(linear, literal("left top"),
            literal("left bottom"), from(#70A5A5), to(#618E8E) );
  height: 35px;
  color: #fff;
  text-shadow: none;
  padding:4px;
  border-right-style: solid;
  border-right-color:#7aa8a5;
  border-right-width: 1px;
  }

.dataGridHeader:hover {
	  background: -webkit-gradient(linear, literal("left top"),
            literal("left bottom"), from(#678888), to(#557878) );
  }

.dataGridCell {
  padding: 2px 15px;
  overflow: hidden;
  height: 30px;
}

.dataGridFirstColumnFooter {

}

.dataGridFirstColumnHeader {

}

.dataGridLastColumnFooter {

}

.dataGridLastColumnHeader {

}

.dataGridSortableHeader {
  cursor: pointer;
  cursor: hand;
  background-color: red;

}

.dataGridSortableHeader:hover {
  color: #6c6b6b;
}

.dataGridSortedHeaderAscending {

}

.dataGridSortedHeaderDescending {

}

.dataGridEvenRow {
  background: #ffffff;
}

.dataGridEvenRowCell {
  border: selectionBorderWidth solid #ffffff;
}

.dataGridOddRow {
  background: #f6f6f6;
}

.dataGridOddRowCell {
  border: selectionBorderWidth solid #f6f6f6;
}

.dataGridHoveredRow {
  background: #dfdfdf;
}

.dataGridHoveredRowCell {
  border: selectionBorderWidth solid #d4e4e4;
}

.dataGridKeyboardSelectedRow {
  background: #d4e4e4;
}

.dataGridKeyboardSelectedRowCell {
  border: selectionBorderWidth solid #d4e4e4;
}

.dataGridSelectedRow {
  background: #d4e4e4;
  color: white;
  height: auto;
  overflow: auto;
}

.dataGridSelectedRowCell {
  border: selectionBorderWidth solid #d4e4e4;
}

/**
 * The keyboard selected cell is visible over selection.
 */
.dataGridKeyboardSelectedCell {
  border: selectionBorderWidth solid #d4e4e4;
}