text:
<?php

final class PhamePostRemarkupRule
  extends PhabricatorObjectRemarkupRule {

  protected function getObjectNamePrefix() {
    return 'J';
  }

  protected function loadObjects(array $ids) {
    $viewer = $this->getEngine()->getConfig('viewer');

    return id(new PhamePostQuery())
      ->setViewer($viewer)
      ->withIDs($ids)
      ->execute();
  }

}


text:
package it.agileday.ui.speakers;

import it.agileday2011.R;
import it.agileday.data.DatabaseHelper;
import it.agileday.data.Speaker;
import it.agileday.data.SpeakerRepository;
import it.agileday.ui.TextViewUtil;

import java.util.List;

import android.app.Activity;
import android.content.Context;
import android.content.res.TypedArray;
import android.database.sqlite.SQLiteDatabase;
import android.os.Bundle;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemSelectedListener;
import android.widget.BaseAdapter;
import android.widget.Gallery;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.ViewAnimator;

public class SpeakersActivity extends Activity {
	static final String TAG = SpeakersActivity.class.getName();
	private ViewAnimator viewAnimator;
	private Gallery gallery;

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.speakers);
		viewAnimator = (ViewAnimator) findViewById(R.id.flipper);
		gallery = (Gallery) findViewById(R.id.gallery);

		List<Speaker> speakers = getSpeakers();

		gallery.setAdapter(new ImageAdapter(this, speakers));

		gallery.setOnItemSelectedListener(new OnItemSelectedListener() {
			@Override
			public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
				viewAnimator.setDisplayedChild(position);
			}

			@Override
			public void onNothingSelected(AdapterView<?> parent) {
			}
		});

		fillData(speakers);
	}

	private void fillData(List<Speaker> speakers) {
		for (Speaker speaker : speakers) {
			View view = getLayoutInflater().inflate(R.layout.speakers_item, viewAnimator, false);
			TextView name = (TextView) view.findViewById(R.id.name);
			name.setText(speaker.name);
			TextView bio = (TextView) view.findViewById(R.id.bio);
			TextViewUtil.setHtmlText(speaker.bio, bio);
			viewAnimator.addView(view);
		}
	}

	private List<Speaker> getSpeakers() {
		SQLiteDatabase database = new DatabaseHelper(this).getReadableDatabase();
		try {
			SpeakerRepository repo = new SpeakerRepository(database, this.getResources(), this);
			return repo.getAll();
		} finally {
			database.close();
		}
	}

	public class ImageAdapter extends BaseAdapter {
		int galleryItemBackground;
		private Context context;
		private final List<Speaker> speakers;

		public ImageAdapter(Context c, List<Speaker> speakers) {
			context = c;
			this.speakers = speakers;
			TypedArray a = obtainStyledAttributes(R.styleable.SpeakersGallery);
			galleryItemBackground = a.getResourceId(R.styleable.SpeakersGallery_android_galleryItemBackground, 0);
			a.recycle();
		}

		public int getCount() {
			return speakers.size();
		}

		public Object getItem(int position) {
			return speakers.get(position);
		}

		public long getItemId(int position) {
			return position;
		}

		public View getView(int position, View convertView, ViewGroup parent) {
			float density = getResources().getDisplayMetrics().density;

			ImageView i = new ImageView(context);
			i.setImageDrawable(speakers.get(position).image);
			i.setLayoutParams(new Gallery.LayoutParams((int) (130 * density), (int) (150 * density)));
			i.setScaleType(ImageView.ScaleType.CENTER_INSIDE);
			i.setBackgroundResource(galleryItemBackground);
			return i;
		}
	}
}

redpajama_set_name: RedPajamaGithub


text:
#include <stxxl/bits/common/counting_ptr.h>
#include <stxxl/bits/verbose.h>

static unsigned int count_deletes = 0;

// derive from counted_object to include reference counter
struct my_int : public stxxl::counted_object
{
    int i;

    my_int(int _i) : i(_i) { }

    // count number of destructor calls
    ~my_int()
    { ++count_deletes; }
};

typedef stxxl::counting_ptr<my_int> int_ptr;
typedef stxxl::const_counting_ptr<my_int> int_cptr;

int_cptr run_test()
{
    // create object and pointer to it
    int_ptr i1 = new my_int(42);

    STXXL_CHECK(i1->i == 42);
    STXXL_CHECK((*i1).i == 42);
    STXXL_CHECK(i1.get()->i == 42);
    STXXL_CHECK(i1->unique());

    // make pointer sharing same object
    int_ptr i2 = i1;

    STXXL_CHECK(i2->i == 42);
    STXXL_CHECK(!i1->unique());
    STXXL_CHECK(i1 == i2);
    STXXL_CHECK(i1->get_reference_count() == 2);

    // make another pointer sharing the same object
    int_ptr i3 = i2;

    STXXL_CHECK(i3->i == 42);
    STXXL_CHECK(i3->get_reference_count() == 3);

    // replace object in i3 with new integer
    i3 = new my_int(5);
    STXXL_CHECK(i1 != i3);
    STXXL_CHECK(i1->get_reference_count() == 2);

    // create a const pointer
    int_cptr i4 = i3;

    // quitting the function will release the first object
    return i4;
}

int main()
{
    {
        // run tests and return a reference counted object
        int_cptr t1 = run_test();

        // check number of objects destructed
        STXXL_CHECK(count_deletes == 1);

        // quitting the block will release the ptr
    }

    STXXL_CHECK(count_deletes == 2);

    return 0;
}


text:
"use strict";
// The module 'assert' provides assertion methods from node
const assert = require('assert');
// Defines a Mocha test suite to group tests of similar kind together
suite("Extension Tests", () => {
    // Defines a Mocha unit test
    test("Something 1", () => {
        assert.equal(-1, [1, 2, 3].indexOf(5));
        assert.equal(-1, [1, 2, 3].indexOf(0));
    });
});
//# sourceMappingURL=extension.test.js.map


text:
function [val] = get_matrix(functionname, infostr, key, scell) %<<<1
        % returns content of matrix as text from infostr in section/subsections according scell
        %
        % functionname - name of the main function for proper error generation after concatenating
        % infostr - info string with all data
        % key - name of matrix for which val is searched
        % scell - cell of strings with name of section and subsections
        %
        % function suppose all inputs are ok!

        val = '';
        % get section:
        [infostr] = get_section(functionname, infostr, scell);
        % remove unwanted subsections:
        [infostr] = rem_subsections(functionname, infostr);

        % get matrix:
        % prepare regexp:
        key = strtrim(key);

        if isstruct(infostr)
                % --- PARSED INFO-STRING ---

                % search the matrix in the parsed list:
                mid = find(strcmp(infostr.matrix_names,key),1);
                if isempty(mid)
                        error([functionname ': matrix named `' key '` not found'])
                endif
                % return its content:
                val = infostr.matrix{mid};
        else
                % --- RAW INFO-STRING ---
                % find matrix:
                [S, E, TE, M, T, NM] = regexpi (infostr, make_regexp(key, 'matrix'), 'once');
                if isempty(M)
                        error([functionname ': matrix named `' key '` not found'])
                endif
                if isempty(T)
                        val = [];
                else
                        val=strtrim(T{1});
                endif
        endif
endfunction


text:
package doubleclickbidmanager

import (
	"bytes"
	"code.google.com/p/google-api-go-client/googleapi"
	"encoding/json"
	"errors"
	"fmt"
	"io"
	"net/http"
	"net/url"
	"strconv"
	"strings"
)

// Always reference these packages, just in case the auto-generated code
// below doesn't.
var _ = bytes.NewBuffer
var _ = strconv.Itoa
var _ = fmt.Sprintf
var _ = json.NewDecoder
var _ = io.Copy
var _ = url.Parse
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace

const apiId = "doubleclickbidmanager:v1"
const apiName = "doubleclickbidmanager"
const apiVersion = "v1"
const basePath = "https://www.googleapis.com/doubleclickbidmanager/v1/"

func New(client *http.Client) (*Service, error) {
	if client == nil {
		return nil, errors.New("client is nil")
	}
	s := &Service{client: client, BasePath: basePath}
	s.Lineitems = NewLineitemsService(s)
	s.Queries = NewQueriesService(s)
	s.Reports = NewReportsService(s)
	return s, nil
}

type Service struct {
	client   *http.Client
	BasePath string // API endpoint base URL

	Lineitems *LineitemsService

	Queries *QueriesService

	Reports *ReportsService
}

func NewLineitemsService(s *Service) *LineitemsService {
	rs := &LineitemsService{s: s}
	return rs
}

type LineitemsService struct {
	s *Service
}

func NewQueriesService(s *Service) *QueriesService {
	rs := &QueriesService{s: s}
	return rs
}

type QueriesService struct {
	s *Service
}

func NewReportsService(s *Service) *ReportsService {
	rs := &ReportsService{s: s}
	return rs
}

type ReportsService struct {
	s *Service
}

type DownloadLineItemsRequest struct {
	// FilterIds: Ids of the specified filter type used to filter line items
	// to fetch. If omitted, all the line items will be returned.
	FilterIds googleapi.Int64s `json:"filterIds,omitempty"`

	// FilterType: Filter type used to filter line items to fetch.
	FilterType string `json:"filterType,omitempty"`

	// Format: Format in which the line items will be returned. Default to
	// CSV.
	Format string `json:"format,omitempty"`
}

type DownloadLineItemsResponse struct {
	// LineItems: Retrieved line items in CSV format. Refer to  Entity Write
	// File Format for more information on file format.
	LineItems string `json:"lineItems,omitempty"`
}

type FilterPair struct {
	// Type: Filter type.
	Type string `json:"type,omitempty"`

	// Value: Filter value.
	Value string `json:"value,omitempty"`
}

type ListQueriesResponse struct {
	// Kind: Identifies what kind of resource this is. Value: the fixed
	// string "doubleclickbidmanager#listQueriesResponse".
	Kind string `json:"kind,omitempty"`

	// Queries: Retrieved queries.
	Queries []*Query `json:"queries,omitempty"`
}

type ListReportsResponse struct {
	// Kind: Identifies what kind of resource this is. Value: the fixed
	// string "doubleclickbidmanager#listReportsResponse".
	Kind string `json:"kind,omitempty"`

	// Reports: Retrieved reports.
	Reports []*Report `json:"reports,omitempty"`
}

type Parameters struct {
	// Filters: Filters used to match traffic data in your report.
	Filters []*FilterPair `json:"filters,omitempty"`

	// GroupBys: Data is grouped by the filters listed in this field.
	GroupBys []string `json:"groupBys,omitempty"`

	// IncludeInviteData: Whether to include data from Invite Media.
	IncludeInviteData bool `json:"includeInviteData,omitempty"`

	// Metrics: Metrics to include as columns in your report.
	Metrics []string `json:"metrics,omitempty"`

	// Type: Report type.
	Type string `json:"type,omitempty"`
}

type Query struct {
	// Kind: Identifies what kind of resource this is. Value: the fixed
	// string "doubleclickbidmanager#query".
	Kind string `json:"kind,omitempty"`

	// Metadata: Query metadata.
	Metadata *QueryMetadata `json:"metadata,omitempty"`

	// Params: Query parameters.
	Params *Parameters `json:"params,omitempty"`

	// QueryId: Query ID.
	QueryId int64 `json:"queryId,omitempty,string"`

	// ReportDataEndTimeMs: The ending time for the data that is shown in
	// the report. Note, reportDataEndTimeMs is required if
	// metadata.dataRange is CUSTOM_DATES and ignored otherwise.
	ReportDataEndTimeMs int64 `json:"reportDataEndTimeMs,omitempty,string"`

	// ReportDataStartTimeMs: The starting time for the data that is shown
	// in the report. Note, reportDataStartTimeMs is required if
	// metadata.dataRange is CUSTOM_DATES and ignored otherwise.
	ReportDataStartTimeMs int64 `json:"reportDataStartTimeMs,omitempty,string"`

	// Schedule: Information on how often and when to run a query.
	Schedule *QuerySchedule `json:"schedule,omitempty"`

	// TimezoneCode: Canonical timezone code for report data time. Defaults
	// to America/New_York.
	TimezoneCode string `json:"timezoneCode,omitempty"`
}

type QueryMetadata struct {
	// DataRange: Range of report data.
	DataRange string `json:"dataRange,omitempty"`

	// Format: Format of the generated report.
	Format string `json:"format,omitempty"`

	// GoogleCloudStoragePathForLatestReport: The path to the location in
	// Google Cloud Storage where the latest report is stored.
	GoogleCloudStoragePathForLatestReport string `json:"googleCloudStoragePathForLatestReport,omitempty"`

	// GoogleDrivePathForLatestReport: The path in Google Drive for the
	// latest report.
	GoogleDrivePathForLatestReport string `json:"googleDrivePathForLatestReport,omitempty"`

	// LatestReportRunTimeMs: The time when the latest report started to
	// run.
	LatestReportRunTimeMs int64 `json:"latestReportRunTimeMs,omitempty,string"`

	// ReportCount: Number of reports that have been generated for the
	// query.
	ReportCount int64 `json:"reportCount,omitempty"`

	// Running: Whether the latest report is currently running.
	Running bool `json:"running,omitempty"`

	// SendNotification: Whether to send an email notification when a report
	// is ready. Default to false.
	SendNotification bool `json:"sendNotification,omitempty"`

	// ShareEmailAddress: List of email addresses which are sent email
	// notifications when the report is finished. Separate from
	// sendNotification.
	ShareEmailAddress []string `json:"shareEmailAddress,omitempty"`

	// Title: Query title. It is used to name the reports generated from
	// this query.
	Title string `json:"title,omitempty"`
}

type QuerySchedule struct {
	// EndTimeMs: Datetime to periodically run the query until.
	EndTimeMs int64 `json:"endTimeMs,omitempty,string"`

	// Frequency: How often the query is run.
	Frequency string `json:"frequency,omitempty"`

	// NextRunMinuteOfDay: Time of day at which a new report will be
	// generated, represented as minutes past midnight Range is 0 to 1439.
	// Only applies to scheduled reports.
	NextRunMinuteOfDay int64 `json:"nextRunMinuteOfDay,omitempty"`

	// NextRunTimezoneCode: Canonical timezone code for report generation
	// time. Defaults to America/New_York.
	NextRunTimezoneCode string `json:"nextRunTimezoneCode,omitempty"`
}

type Report struct {
	// Key: Key used to identify a report.
	Key *ReportKey `json:"key,omitempty"`

	// Metadata: Report metadata.
	Metadata *ReportMetadata `json:"metadata,omitempty"`

	// Params: Report parameters.
	Params *Parameters `json:"params,omitempty"`
}

type ReportFailure struct {
	// ErrorCode: Error code that shows why the report was not created.
	ErrorCode string `json:"errorCode,omitempty"`
}

type ReportKey struct {
	// QueryId: Query ID.
	QueryId int64 `json:"queryId,omitempty,string"`

	// ReportId: Report ID.
	ReportId int64 `json:"reportId,omitempty,string"`
}

type ReportMetadata struct {
	// GoogleCloudStoragePath: The path to the location in Google Cloud
	// Storage where the report is stored.
	GoogleCloudStoragePath string `json:"googleCloudStoragePath,omitempty"`

	// ReportDataEndTimeMs: The ending time for the data that is shown in
	// the report.
	ReportDataEndTimeMs int64 `json:"reportDataEndTimeMs,omitempty,string"`

	// ReportDataStartTimeMs: The starting time for the data that is shown
	// in the report.
	ReportDataStartTimeMs int64 `json:"reportDataStartTimeMs,omitempty,string"`

	// Status: Report status.
	Status *ReportStatus `json:"status,omitempty"`
}

type ReportStatus struct {
	// Failure: If the report failed, this records the cause.
	Failure *ReportFailure `json:"failure,omitempty"`

	// FinishTimeMs: The time when this report either completed successfully
	// or failed.
	FinishTimeMs int64 `json:"finishTimeMs,omitempty,string"`

	// Format: The file type of the report.
	Format string `json:"format,omitempty"`

	// State: The state of the report.
	State string `json:"state,omitempty"`
}

type RowStatus struct {
	// Changed: Whether the stored entity is changed as a result of upload.
	Changed bool `json:"changed,omitempty"`

	// EntityId: Entity Id.
	EntityId int64 `json:"entityId,omitempty,string"`

	// EntityName: Entity name.
	EntityName string `json:"entityName,omitempty"`

	// Errors: Reasons why the entity can't be uploaded.
	Errors []string `json:"errors,omitempty"`

	// Persisted: Whether the entity is persisted.
	Persisted bool `json:"persisted,omitempty"`

	// RowNumber: Row number.
	RowNumber int64 `json:"rowNumber,omitempty"`
}

type RunQueryRequest struct {
	// DataRange: Report data range used to generate the report.
	DataRange string `json:"dataRange,omitempty"`

	// ReportDataEndTimeMs: The ending time for the data that is shown in
	// the report. Note, reportDataEndTimeMs is required if dataRange is
	// CUSTOM_DATES and ignored otherwise.
	ReportDataEndTimeMs int64 `json:"reportDataEndTimeMs,omitempty,string"`

	// ReportDataStartTimeMs: The starting time for the data that is shown
	// in the report. Note, reportDataStartTimeMs is required if dataRange
	// is CUSTOM_DATES and ignored otherwise.
	ReportDataStartTimeMs int64 `json:"reportDataStartTimeMs,omitempty,string"`

	// TimezoneCode: Canonical timezone code for report data time. Defaults
	// to America/New_York.
	TimezoneCode string `json:"timezoneCode,omitempty"`
}

type UploadLineItemsRequest struct {
	// DryRun: Set to true to get upload status without actually persisting
	// the line items.
	DryRun bool `json:"dryRun,omitempty"`

	// Format: Format the line items are in. Default to CSV.
	Format string `json:"format,omitempty"`

	// LineItems: Line items in CSV to upload. Refer to  Entity Write File
	// Format for more information on file format.
	LineItems string `json:"lineItems,omitempty"`
}

type UploadLineItemsResponse struct {
	// UploadStatus: Status of upload.
	UploadStatus *UploadStatus `json:"uploadStatus,omitempty"`
}

type UploadStatus struct {
	// Errors: Reasons why upload can't be completed.
	Errors []string `json:"errors,omitempty"`

	// RowStatus: Per-row upload status.
	RowStatus []*RowStatus `json:"rowStatus,omitempty"`
}

// method id "doubleclickbidmanager.lineitems.downloadlineitems":

type LineitemsDownloadlineitemsCall struct {
	s                        *Service
	downloadlineitemsrequest *DownloadLineItemsRequest
	opt_                     map[string]interface{}
}

// Downloadlineitems: Retrieves line items in CSV format.
func (r *LineitemsService) Downloadlineitems(downloadlineitemsrequest *DownloadLineItemsRequest) *LineitemsDownloadlineitemsCall {
	c := &LineitemsDownloadlineitemsCall{s: r.s, opt_: make(map[string]interface{})}
	c.downloadlineitemsrequest = downloadlineitemsrequest
	return c
}

func (c *LineitemsDownloadlineitemsCall) Do() (*DownloadLineItemsResponse, error) {
	var body io.Reader = nil
	body, err := googleapi.WithoutDataWrapper.JSONReader(c.downloadlineitemsrequest)
	if err != nil {
		return nil, err
	}
	ctype := "application/json"
	params := make(url.Values)
	params.Set("alt", "json")
	urls := googleapi.ResolveRelative(c.s.BasePath, "lineitems/downloadlineitems")
	urls += "?" + params.Encode()
	req, _ := http.NewRequest("POST", urls, body)
	googleapi.SetOpaque(req.URL)
	req.Header.Set("Content-Type", ctype)
	req.Header.Set("User-Agent", "google-api-go-client/0.5")
	res, err := c.s.client.Do(req)
	if err != nil {
		return nil, err
	}
	defer googleapi.CloseBody(res)
	if err := googleapi.CheckResponse(res); err != nil {
		return nil, err
	}
	var ret *DownloadLineItemsResponse
	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
		return nil, err
	}
	return ret, nil
	// {
	//   "description": "Retrieves line items in CSV format.",
	//   "httpMethod": "POST",
	//   "id": "doubleclickbidmanager.lineitems.downloadlineitems",
	//   "path": "lineitems/downloadlineitems",
	//   "request": {
	//     "$ref": "DownloadLineItemsRequest"
	//   },
	//   "response": {
	//     "$ref": "DownloadLineItemsResponse"
	//   }
	// }

}

// method id "doubleclickbidmanager.lineitems.uploadlineitems":

type LineitemsUploadlineitemsCall struct {
	s                      *Service
	uploadlineitemsrequest *UploadLineItemsRequest
	opt_                   map[string]interface{}
}

// Uploadlineitems: Uploads line items in CSV format.
func (r *LineitemsService) Uploadlineitems(uploadlineitemsrequest *UploadLineItemsRequest) *LineitemsUploadlineitemsCall {
	c := &LineitemsUploadlineitemsCall{s: r.s, opt_: make(map[string]interface{})}
	c.uploadlineitemsrequest = uploadlineitemsrequest
	return c
}

func (c *LineitemsUploadlineitemsCall) Do() (*UploadLineItemsResponse, error) {
	var body io.Reader = nil
	body, err := googleapi.WithoutDataWrapper.JSONReader(c.uploadlineitemsrequest)
	if err != nil {
		return nil, err
	}
	ctype := "application/json"
	params := make(url.Values)
	params.Set("alt", "json")
	urls := googleapi.ResolveRelative(c.s.BasePath, "lineitems/uploadlineitems")
	urls += "?" + params.Encode()
	req, _ := http.NewRequest("POST", urls, body)
	googleapi.SetOpaque(req.URL)
	req.Header.Set("Content-Type", ctype)
	req.Header.Set("User-Agent", "google-api-go-client/0.5")
	res, err := c.s.client.Do(req)
	if err != nil {
		return nil, err
	}
	defer googleapi.CloseBody(res)
	if err := googleapi.CheckResponse(res); err != nil {
		return nil, err
	}
	var ret *UploadLineItemsResponse
	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
		return nil, err
	}
	return ret, nil
	// {
	//   "description": "Uploads line items in CSV format.",
	//   "httpMethod": "POST",
	//   "id": "doubleclickbidmanager.lineitems.uploadlineitems",
	//   "path": "lineitems/uploadlineitems",
	//   "request": {
	//     "$ref": "UploadLineItemsRequest"
	//   },
	//   "response": {
	//     "$ref": "UploadLineItemsResponse"
	//   }
	// }

}

// method id "doubleclickbidmanager.queries.createquery":

type QueriesCreatequeryCall struct {
	s     *Service
	query *Query
	opt_  map[string]interface{}
}

// Createquery: Creates a query.
func (r *QueriesService) Createquery(query *Query) *QueriesCreatequeryCall {
	c := &QueriesCreatequeryCall{s: r.s, opt_: make(map[string]interface{})}
	c.query = query
	return c
}

func (c *QueriesCreatequeryCall) Do() (*Query, error) {
	var body io.Reader = nil
	body, err := googleapi.WithoutDataWrapper.JSONReader(c.query)
	if err != nil {
		return nil, err
	}
	ctype := "application/json"
	params := make(url.Values)
	params.Set("alt", "json")
	urls := googleapi.ResolveRelative(c.s.BasePath, "query")
	urls += "?" + params.Encode()
	req, _ := http.NewRequest("POST", urls, body)
	googleapi.SetOpaque(req.URL)
	req.Header.Set("Content-Type", ctype)
	req.Header.Set("User-Agent", "google-api-go-client/0.5")
	res, err := c.s.client.Do(req)
	if err != nil {
		return nil, err
	}
	defer googleapi.CloseBody(res)
	if err := googleapi.CheckResponse(res); err != nil {
		return nil, err
	}
	var ret *Query
	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
		return nil, err
	}
	return ret, nil
	// {
	//   "description": "Creates a query.",
	//   "httpMethod": "POST",
	//   "id": "doubleclickbidmanager.queries.createquery",
	//   "path": "query",
	//   "request": {
	//     "$ref": "Query"
	//   },
	//   "response": {
	//     "$ref": "Query"
	//   }
	// }

}

// method id "doubleclickbidmanager.queries.deletequery":

type QueriesDeletequeryCall struct {
	s       *Service
	queryId int64
	opt_    map[string]interface{}
}

// Deletequery: Deletes a stored query as well as the associated stored
// reports.
func (r *QueriesService) Deletequery(queryId int64) *QueriesDeletequeryCall {
	c := &QueriesDeletequeryCall{s: r.s, opt_: make(map[string]interface{})}
	c.queryId = queryId
	return c
}

func (c *QueriesDeletequeryCall) Do() error {
	var body io.Reader = nil
	params := make(url.Values)
	params.Set("alt", "json")
	urls := googleapi.ResolveRelative(c.s.BasePath, "query/{queryId}")
	urls += "?" + params.Encode()
	req, _ := http.NewRequest("DELETE", urls, body)
	req.URL.Path = strings.Replace(req.URL.Path, "{queryId}", strconv.FormatInt(c.queryId, 10), 1)
	googleapi.SetOpaque(req.URL)
	req.Header.Set("User-Agent", "google-api-go-client/0.5")
	res, err := c.s.client.Do(req)
	if err != nil {
		return err
	}
	defer googleapi.CloseBody(res)
	if err := googleapi.CheckResponse(res); err != nil {
		return err
	}
	return nil
	// {
	//   "description": "Deletes a stored query as well as the associated stored reports.",
	//   "httpMethod": "DELETE",
	//   "id": "doubleclickbidmanager.queries.deletequery",
	//   "parameterOrder": [
	//     "queryId"
	//   ],
	//   "parameters": {
	//     "queryId": {
	//       "description": "Query ID to delete.",
	//       "format": "int64",
	//       "location": "path",
	//       "required": true,
	//       "type": "string"
	//     }
	//   },
	//   "path": "query/{queryId}"
	// }

}

// method id "doubleclickbidmanager.queries.getquery":

type QueriesGetqueryCall struct {
	s       *Service
	queryId int64
	opt_    map[string]interface{}
}

// Getquery: Retrieves a stored query.
func (r *QueriesService) Getquery(queryId int64) *QueriesGetqueryCall {
	c := &QueriesGetqueryCall{s: r.s, opt_: make(map[string]interface{})}
	c.queryId = queryId
	return c
}

func (c *QueriesGetqueryCall) Do() (*Query, error) {
	var body io.Reader = nil
	params := make(url.Values)
	params.Set("alt", "json")
	urls := googleapi.ResolveRelative(c.s.BasePath, "query/{queryId}")
	urls += "?" + params.Encode()
	req, _ := http.NewRequest("GET", urls, body)
	req.URL.Path = strings.Replace(req.URL.Path, "{queryId}", strconv.FormatInt(c.queryId, 10), 1)
	googleapi.SetOpaque(req.URL)
	req.Header.Set("User-Agent", "google-api-go-client/0.5")
	res, err := c.s.client.Do(req)
	if err != nil {
		return nil, err
	}
	defer googleapi.CloseBody(res)
	if err := googleapi.CheckResponse(res); err != nil {
		return nil, err
	}
	var ret *Query
	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
		return nil, err
	}
	return ret, nil
	// {
	//   "description": "Retrieves a stored query.",
	//   "httpMethod": "GET",
	//   "id": "doubleclickbidmanager.queries.getquery",
	//   "parameterOrder": [
	//     "queryId"
	//   ],
	//   "parameters": {
	//     "queryId": {
	//       "description": "Query ID to retrieve.",
	//       "format": "int64",
	//       "location": "path",
	//       "required": true,
	//       "type": "string"
	//     }
	//   },
	//   "path": "query/{queryId}",
	//   "response": {
	//     "$ref": "Query"
	//   }
	// }

}

// method id "doubleclickbidmanager.queries.listqueries":

type QueriesListqueriesCall struct {
	s    *Service
	opt_ map[string]interface{}
}

// Listqueries: Retrieves stored queries.
func (r *QueriesService) Listqueries() *QueriesListqueriesCall {
	c := &QueriesListqueriesCall{s: r.s, opt_: make(map[string]interface{})}
	return c
}

func (c *QueriesListqueriesCall) Do() (*ListQueriesResponse, error) {
	var body io.Reader = nil
	params := make(url.Values)
	params.Set("alt", "json")
	urls := googleapi.ResolveRelative(c.s.BasePath, "queries")
	urls += "?" + params.Encode()
	req, _ := http.NewRequest("GET", urls, body)
	googleapi.SetOpaque(req.URL)
	req.Header.Set("User-Agent", "google-api-go-client/0.5")
	res, err := c.s.client.Do(req)
	if err != nil {
		return nil, err
	}
	defer googleapi.CloseBody(res)
	if err := googleapi.CheckResponse(res); err != nil {
		return nil, err
	}
	var ret *ListQueriesResponse
	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
		return nil, err
	}
	return ret, nil
	// {
	//   "description": "Retrieves stored queries.",
	//   "httpMethod": "GET",
	//   "id": "doubleclickbidmanager.queries.listqueries",
	//   "path": "queries",
	//   "response": {
	//     "$ref": "ListQueriesResponse"
	//   }
	// }

}

// method id "doubleclickbidmanager.queries.runquery":

type QueriesRunqueryCall struct {
	s               *Service
	queryId         int64
	runqueryrequest *RunQueryRequest
	opt_            map[string]interface{}
}

// Runquery: Runs a stored query to generate a report.
func (r *QueriesService) Runquery(queryId int64, runqueryrequest *RunQueryRequest) *QueriesRunqueryCall {
	c := &QueriesRunqueryCall{s: r.s, opt_: make(map[string]interface{})}
	c.queryId = queryId
	c.runqueryrequest = runqueryrequest
	return c
}

func (c *QueriesRunqueryCall) Do() error {
	var body io.Reader = nil
	body, err := googleapi.WithoutDataWrapper.JSONReader(c.runqueryrequest)
	if err != nil {
		return err
	}
	ctype := "application/json"
	params := make(url.Values)
	params.Set("alt", "json")
	urls := googleapi.ResolveRelative(c.s.BasePath, "query/{queryId}")
	urls += "?" + params.Encode()
	req, _ := http.NewRequest("POST", urls, body)
	req.URL.Path = strings.Replace(req.URL.Path, "{queryId}", strconv.FormatInt(c.queryId, 10), 1)
	googleapi.SetOpaque(req.URL)
	req.Header.Set("Content-Type", ctype)
	req.Header.Set("User-Agent", "google-api-go-client/0.5")
	res, err := c.s.client.Do(req)
	if err != nil {
		return err
	}
	defer googleapi.CloseBody(res)
	if err := googleapi.CheckResponse(res); err != nil {
		return err
	}
	return nil
	// {
	//   "description": "Runs a stored query to generate a report.",
	//   "httpMethod": "POST",
	//   "id": "doubleclickbidmanager.queries.runquery",
	//   "parameterOrder": [
	//     "queryId"
	//   ],
	//   "parameters": {
	//     "queryId": {
	//       "description": "Query ID to run.",
	//       "format": "int64",
	//       "location": "path",
	//       "required": true,
	//       "type": "string"
	//     }
	//   },
	//   "path": "query/{queryId}",
	//   "request": {
	//     "$ref": "RunQueryRequest"
	//   }
	// }

}

// method id "doubleclickbidmanager.reports.listreports":

type ReportsListreportsCall struct {
	s       *Service
	queryId int64
	opt_    map[string]interface{}
}

// Listreports: Retrieves stored reports.
func (r *ReportsService) Listreports(queryId int64) *ReportsListreportsCall {
	c := &ReportsListreportsCall{s: r.s, opt_: make(map[string]interface{})}
	c.queryId = queryId
	return c
}

func (c *ReportsListreportsCall) Do() (*ListReportsResponse, error) {
	var body io.Reader = nil
	params := make(url.Values)
	params.Set("alt", "json")
	urls := googleapi.ResolveRelative(c.s.BasePath, "queries/{queryId}/reports")
	urls += "?" + params.Encode()
	req, _ := http.NewRequest("GET", urls, body)
	req.URL.Path = strings.Replace(req.URL.Path, "{queryId}", strconv.FormatInt(c.queryId, 10), 1)
	googleapi.SetOpaque(req.URL)
	req.Header.Set("User-Agent", "google-api-go-client/0.5")
	res, err := c.s.client.Do(req)
	if err != nil {
		return nil, err
	}
	defer googleapi.CloseBody(res)
	if err := googleapi.CheckResponse(res); err != nil {
		return nil, err
	}
	var ret *ListReportsResponse
	if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
		return nil, err
	}
	return ret, nil
	// {
	//   "description": "Retrieves stored reports.",
	//   "httpMethod": "GET",
	//   "id": "doubleclickbidmanager.reports.listreports",
	//   "parameterOrder": [
	//     "queryId"
	//   ],
	//   "parameters": {
	//     "queryId": {
	//       "description": "Query ID with which the reports are associated.",
	//       "format": "int64",
	//       "location": "path",
	//       "required": true,
	//       "type": "string"
	//     }
	//   },
	//   "path": "queries/{queryId}/reports",
	//   "response": {
	//     "$ref": "ListReportsResponse"
	//   }
	// }

}


text:
import redhawk.common.writers.xml_writer as X
from . import common_test_utils as T

import nose.tools

import random
import itertools
import tempfile
import os

class TestXMLWriter:
  def __init__(self):
    self.counter = itertools.count(0)
    self.temp_dir = tempfile.mkdtemp(prefix='xml')
    return

  def GetFilename(self):
    i = next(self.counter)
    return os.path.join(self.temp_dir, str(i))

  def FunctionTestXML(self, ast):
    v = self.GetFilename()
    X.WriteToFile(ast, filename = v + '.xml')
    return

def TestGenerator():
  """ Testing XML Writer. """
  PICK=5
  c = TestXMLWriter()
  all_asts = list(T.GetAllLASTs())
  for i in range(PICK):
    r_index = random.randrange(0, len(all_asts))
    yield c.FunctionTestXML, all_asts[r_index]

# Disable the test by default.
@nose.tools.nottest
def TestAllPrograms():
  """ Testing XML Writer (all programs) """
  c = TestXMLWriter()
  all_asts = list(T.GetAllLASTs())
  for (i, ast) in enumerate(all_asts):
    yield c.FunctionTestXML, ast


text:
/*
 * override-validation.js: Example of using prompt with complex properties and command-line input.
 *
 * (C) 2010, Nodejitsu Inc.
 *
 */

var prompt = require('../lib/prompt'),
    optimist = require('optimist');

var schema = {
  properties: {
    name: {
      pattern: /^[a-zA-Z\s-]+$/,
      message: 'Name must be only letters, spaces, or dashes',
      required: true
    },
    email: {
      name: 'email',
      format: 'email',
      message: 'Must be a valid email address'
    }
  }
};

//
// Set the overrides
//
prompt.override = optimist.argv

//
// Start the prompt
//
prompt.start();

//
// Get two properties from the user: email, password
//
prompt.get(schema, function (err, result) {
  //
  // Log the results.
  //
  console.log('Command-line input received:');
  console.log('  name: ' + result.name);
  console.log('  email: ' + result.email);
});

// try running
// $ node ./override-validation.js --name USER --email EMAIL
// You will only be asked for email becasue it's invalid
// $ node ./override-validation.js --name h$acker --email me@example.com
// You will only be asked for email becasue it's invalid


text:
package com.stashinvest.http;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.net.HttpURLConnection;
import java.net.ProtocolException;
import java.net.URL;
import java.net.URLConnection;

import javax.net.ssl.HttpsURLConnection;

import org.apache.log4j.Logger;

import com.google.gson.FieldNamingPolicy;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;

// A generic class for handling http/https get/post requests.
public class HttpRequests<T> {
    private HttpURLConnection httpConnection;
    private HttpsURLConnection httpsConnection;

    public static enum HttpRequestMethod {
	GET, POST;
    }

    private static final Logger log = Logger.getLogger(HttpRequests.class);
    private static final String USERS_SERVICE_ENDPOINT = "/invest-stash-rest/rest/v1/users";
    private static final String ACCOUNT_KEY_ENDPOINT = "/v1/account";
    private static final String HTTP_PROTOCOL = "http";
    private static final String HTTPS_PROTOCOL = "https";
    private static final int HTTP_PORT = 8080;
    private static final int HTTPS_PORT = 443;
    private static final String LOCAL_HOST = "localhost";
    private static final String ACCOUNT_KEY_SERVICE_HOST = "account-key-service.herokuapp.com";
    private static final String USER_AGENT = "Mozilla/5.0";
    private static final String JSON_MEDIA_TYPE = "application/json";

    public T httpsPost(String jsonBody, Class<T> clazz) throws IOException {
	URL url = new URL(HTTPS_PROTOCOL, ACCOUNT_KEY_SERVICE_HOST, HTTPS_PORT,
		ACCOUNT_KEY_ENDPOINT);
	httpsConnection = (HttpsURLConnection) url.openConnection();
	httpsConnection.setRequestMethod(HttpRequestMethod.POST.toString());
	setConnectionParameters(httpsConnection, HttpRequestMethod.POST);

	httpsConnection.setFixedLengthStreamingMode(jsonBody.getBytes().length);
	try (OutputStreamWriter out = new OutputStreamWriter(
		httpsConnection.getOutputStream())) {
	    out.write(jsonBody);
	}
	StringBuilder sb = new StringBuilder();
	try (BufferedReader in = new BufferedReader(new InputStreamReader(
		httpsConnection.getInputStream()))) {
	    String inputLine;
	    while ((inputLine = in.readLine()) != null) {
		sb.append(inputLine);
	    }
	}
	// setFieldNamingPolicy is used to here to convert from
	// lower_case_with_underscore names retrieved from end point to camel
	// case to match POJO class
	Gson gson = new GsonBuilder().setFieldNamingPolicy(
		FieldNamingPolicy.LOWER_CASE_WITH_UNDERSCORES).create();
	return gson.fromJson(sb.toString(), clazz);
    }

    public T httpPost(String jsonBody, Class<T> clazz) {
	try {
	    URL url = new URL(HTTP_PROTOCOL, LOCAL_HOST, HTTP_PORT,
		    USERS_SERVICE_ENDPOINT);
	    httpConnection = (HttpURLConnection) url.openConnection();
	    httpConnection.setRequestMethod(HttpRequestMethod.POST.toString());
	    setConnectionParameters(httpConnection, HttpRequestMethod.POST);
	    httpConnection
		    .setFixedLengthStreamingMode(jsonBody.getBytes().length);
	    try (OutputStreamWriter out = new OutputStreamWriter(
		    httpConnection.getOutputStream())) {
		out.write(jsonBody);
	    }
	    StringBuilder sb = new StringBuilder();
	    try (BufferedReader in = new BufferedReader(new InputStreamReader(
		    httpConnection.getInputStream()))) {
		String inputLine;
		while ((inputLine = in.readLine()) != null) {
		    sb.append(inputLine);
		}
	    }
	    return new Gson().fromJson(sb.toString(), clazz);
	} catch (IOException e) {
	    log.error(e);
	}
	return null;
    }

    public T httpGet(String query, Class<T> clazz) {
	try {
	    URL url = null;
	    if (query == null) {
		url = new URL(HTTP_PROTOCOL, LOCAL_HOST, HTTP_PORT,
			USERS_SERVICE_ENDPOINT);
	    } else {
		url = new URL(HTTP_PROTOCOL, LOCAL_HOST, HTTP_PORT,
			USERS_SERVICE_ENDPOINT + query);
	    }
	    httpConnection = (HttpURLConnection) url.openConnection();
	    httpConnection.setRequestMethod(HttpRequestMethod.GET.toString());
	    setConnectionParameters(httpConnection, HttpRequestMethod.GET);
	    Gson gson = new Gson();
	    StringBuilder sb = new StringBuilder();
	    try (BufferedReader in = new BufferedReader(new InputStreamReader(
		    httpConnection.getInputStream()))) {
		String inputLine;
		while ((inputLine = in.readLine()) != null) {
		    sb.append(inputLine);
		}
	    }
	    return gson.fromJson(sb.toString(), clazz);
	} catch (IOException e) {
	    log.error(e);
	}
	return null;
    }

    public void setConnectionParameters(URLConnection connection,
	    HttpRequestMethod requestMethod) throws ProtocolException {
	connection.setRequestProperty("User-Agent", USER_AGENT);
	connection.setRequestProperty("Content-Type", JSON_MEDIA_TYPE);
	connection.setRequestProperty("Accept", JSON_MEDIA_TYPE);
	if (requestMethod.equals(HttpRequestMethod.POST)) {
	    connection.setDoOutput(true);
	}
    }

    public HttpURLConnection getHttpConnection() {
	return httpConnection;
    }

    public HttpsURLConnection getHttpsConnection() {
	return httpsConnection;
    }
}


text:
import {Behavior} from 'aurelia-framework';

export class Navigation {
  static metadata(){
    return Behavior
      .withProperty('title')
      .withProperty('href')
      .withProperty('router');
  }

  attached() {
    $('#side-menu').metisMenu();

    this.focusFromRoute();
  }

  focusFromRoute(){
    setTimeout(() => {
      let sidebar = $('.sidebar-nav');
      let navModel = this.router.currentInstruction.config.navModel;
      let currentHref = navModel.href;

      let anchor = sidebar.find('a[href="' + currentHref + '"]');
      anchor.parents('ul.nav.collapse')
        .addClass('in')
        .attr('aria-expanded', 'true');

      anchor.focus();
    }, 100);
  }
}


text:
using System.Windows.Forms;

namespace TestTarget
{
    public class GuiData
    {
        Control _core;
        public GuiData(Control core)
        {
            _core = core;
        }
        public GuiData(Form core)
        {
            _core = core;
        }
    }
}


text:
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
	<translate android:fromYDelta="-100%p" android:toYDelta="0" android:duration="@android:integer/config_mediumAnimTime" />
	<alpha android:fromAlpha="1.0" android:toAlpha="1.0" android:duration="@android:integer/config_mediumAnimTime" />
</set>
<!-- From: file:/Users/rodrigo/Copy/Projetos/Android/Ocypode/res/anim/slide_down_enter.xml --><!-- From: file:/Users/rodrigo/Copy/Projetos/Android/Ocypode/build/intermediates/bundles/debug/res/anim/slide_down_enter.xml -->


text:
//go:build !noplugin && cgo
// +build !noplugin,cgo

package library

import (
	"fmt"
	"os"
	"plugin"

	"github.com/hyperledger/fabric/core/handlers/auth"
	"github.com/hyperledger/fabric/core/handlers/decoration"
	endorsement "github.com/hyperledger/fabric/core/handlers/endorsement/api"
	validation "github.com/hyperledger/fabric/core/handlers/validation/api"
)

// loadPlugin loads a pluggable handler
func (r *registry) loadPlugin(pluginPath string, handlerType HandlerType, extraArgs ...string) {
	if _, err := os.Stat(pluginPath); err != nil {
		logger.Panicf(fmt.Sprintf("Could not find plugin at path %s: %s", pluginPath, err))
	}
	p, err := plugin.Open(pluginPath)
	if err != nil {
		logger.Panicf(fmt.Sprintf("Error opening plugin at path %s: %s", pluginPath, err))
	}

	if handlerType == Auth {
		r.initAuthPlugin(p)
	} else if handlerType == Decoration {
		r.initDecoratorPlugin(p)
	} else if handlerType == Endorsement {
		r.initEndorsementPlugin(p, extraArgs...)
	} else if handlerType == Validation {
		r.initValidationPlugin(p, extraArgs...)
	}
}

// initAuthPlugin constructs an auth filter from the given plugin
func (r *registry) initAuthPlugin(p *plugin.Plugin) {
	constructorSymbol, err := p.Lookup(authPluginFactory)
	if err != nil {
		panicWithLookupError(authPluginFactory, err)
	}
	constructor, ok := constructorSymbol.(func() auth.Filter)
	if !ok {
		panicWithDefinitionError(authPluginFactory)
	}

	filter := constructor()
	if filter != nil {
		r.filters = append(r.filters, filter)
	}
}

// initDecoratorPlugin constructs a decorator from the given plugin
func (r *registry) initDecoratorPlugin(p *plugin.Plugin) {
	constructorSymbol, err := p.Lookup(decoratorPluginFactory)
	if err != nil {
		panicWithLookupError(decoratorPluginFactory, err)
	}
	constructor, ok := constructorSymbol.(func() decoration.Decorator)
	if !ok {
		panicWithDefinitionError(decoratorPluginFactory)
	}
	decorator := constructor()
	if decorator != nil {
		r.decorators = append(r.decorators, constructor())
	}
}

func (r *registry) initEndorsementPlugin(p *plugin.Plugin, extraArgs ...string) {
	if len(extraArgs) != 1 {
		logger.Panicf("expected 1 argument in extraArgs")
	}
	factorySymbol, err := p.Lookup(pluginFactory)
	if err != nil {
		panicWithLookupError(pluginFactory, err)
	}

	constructor, ok := factorySymbol.(func() endorsement.PluginFactory)
	if !ok {
		panicWithDefinitionError(pluginFactory)
	}
	factory := constructor()
	if factory == nil {
		logger.Panicf("factory instance returned nil")
	}
	r.endorsers[extraArgs[0]] = factory
}

func (r *registry) initValidationPlugin(p *plugin.Plugin, extraArgs ...string) {
	if len(extraArgs) != 1 {
		logger.Panicf("expected 1 argument in extraArgs")
	}
	factorySymbol, err := p.Lookup(pluginFactory)
	if err != nil {
		panicWithLookupError(pluginFactory, err)
	}

	constructor, ok := factorySymbol.(func() validation.PluginFactory)
	if !ok {
		panicWithDefinitionError(pluginFactory)
	}
	factory := constructor()
	if factory == nil {
		logger.Panicf("factory instance returned nil")
	}
	r.validators[extraArgs[0]] = factory
}

// panicWithLookupError panics when a handler constructor lookup fails
func panicWithLookupError(factory string, err error) {
	logger.Panicf("Plugin must contain constructor with name %s. Error from lookup: %s", factory, err)
}

// panicWithDefinitionError panics when a handler constructor does not match
// the expected function definition
func panicWithDefinitionError(factory string) {
	logger.Panicf("Constructor method %s does not match expected definition", factory)
}


text:
	<?php include "global.php" ?>
	<link rel="stylesheet" type="text/css" href="Assets/CSS/services.css">
	<link href="http://fonts.googleapis.com/css?family=Source+Sans+Pro" rel="stylesheet"  type="text/css">

	<title>Our Service</title>

		<?php siteHeader(); ?>

Ideas Matter

 Whether you want to advertise your work or communicate with potential investors, we will help you initiate the first step towards your goal.

1

Submit Your Project

Online project submission:

What is your idea?

What is the name of your business/ project?

What is your team? Who are the members on your team?

In what way are you foreseeing to use this website?

START NOW

2

Consult with The Team

One UI Designer

One Software Programmer

By providing our knowledge in technological industry, we want to give beneficial technical consulting to the small businesses. During the process, the entrepreneurial team will meet with one of our marketing team members and one of our technical team members. Together we will polish the ideas and set up the plans for future cooperation at the convenience of both parties.

3

Website Development

We understand that most of the small business and student project may experience financial difficulty of affording to build their professional websites. Because we want you to enjoy your start-up experience without worrying about the mass cost of building, the price listed on our website is negotiable.

4

Web Applications

We understand that most of the small business and student project may experience financial difficulty of affording to build their professional websites. Because we want you to enjoy your start-up experience without worrying about the mass cost of building, the price listed on our website is negotiable.

1

Submit Your Project

Online project submission:

What is your idea?

What is the name of your business/ project?

What is your team? Who are the members on your team?

In what way are you foreseeing to use this website?

START NOW

2

Consult with The Team

One UI Designer

One Software Programmer

By providing our knowledge in technological industry, we want to give beneficial technical consulting to the small businesses. During the process, the entrepreneurial team will meet with one of our marketing team members and one of our technical team members. Together we will polish the ideas and set up the plans for future cooperation at the convenience of both parties.

3

Website Development

We understand that most of the small business and student project may experience financial difficulty of affording to build their professional websites. Because we want you to enjoy your start-up experience without worrying about the mass cost of building, the price listed on our website is negotiable.

4

Web Applications

We understand that most of the small business and student project may experience financial difficulty of affording to build their professional websites. Because we want you to enjoy your start-up experience without worrying about the mass cost of building, the price listed on our website is negotiable.

Website for Individual

										Build personal blog, portfolio, and informative website

									<button onclick="formButtonClicked('1','#selection-form-one','#selection-form-two')">Learn More</button>

Website for Organization

										Build website creative business ideas and cross-platform ecommerce site

									<button onclick="formButtonClicked('2','#selection-form-one','#selection-form-two')">Learn More</button>

	<?php siteFooter(); ?>


text:
package lib.reasoner.analysis

import lib.reasoner.analysis.Analysis._
import lib.reasoner.functions._
import lib.reasoner.lexical._
import lib.reasoner.syntactical._
import lib.reasoner.syntactical.types._
import models.enums._
import net.flatmap.ace._
import net.flatmap.ace.CypherParser._
import scala.collection.mutable.ListBuffer
import scala.language.postfixOps

class TypeCheck(implicit val gds: org.neo4j.graphdb.GraphDatabaseService) extends FunctionProvider {
  import play.api.cache.Cache
  import play.api.Play.current

  /* -------- *
   * Services
   * -------- */

  /**
   * Checks the given expression and returns its type.
   *
   * @param expr the [[lib.reasoner.syntactical.Expression]] to be checked
   * @return the [[lib.reasoner.syntactical.types.Type]] of the expression or a
   *         [[lib.reasoner.analysis.Failure]] if the evaluation failed.
   */
  def run(expr: Expression): FinalResult[Type] =
    check(expr)().right.map(_._2)

  /**
   * Checks the given predicate and returns its boolean type.
   *
   * @param expr the [[lib.reasoner.syntactical.Expression]] to be checked
   * @return the [[lib.reasoner.syntactical.types.Type]] of the predicate or a
   *         [[lib.reasoner.analysis.Failure]] if the evaluation failed.
   */
  def runPred(expr: Expression): FinalResult[Type] =
    checkPred(expr)().right.map(_._2)

  /**
   * Checks the given expression (plain string) and returns its type.
   *
   * @param input the plain definition of the expression
   * @param f the function to apply in order to type check the input string
   * @return the [[lib.reasoner.syntactical.types.Type]] of the expression or a
   *         [[lib.reasoner.analysis.Failure]] if the evaluation failed.
   */
  def fromString[A](input: String)(f: TypeCheck => (Expression => FinalResult[A])): FinalResult[A] = {
    val tokens = new Lexical.Scanner(input)
    Parser(Parser.root)(tokens).fold(
      err => Left(GlobalFailure(err)),
      exp => f(this)(exp)
    )
  }

  /* ---------- *
   * Type Check
   * ---------- */

  protected def checkPred(expr: Expression): Analysis[Type] = for {
    t <- check(expr)
    _ <- require(t is BoolType)(s"Expected result type Boolean but found $t", expr)
  } yield t

  protected def check(expr: Expression): Analysis[Type] = expr match {
    case l: Literal     => literal(l)
    case u: Unary       => unary(u)
    case b: Binary      => binary(b)
    case v: Variable    => variable(v)
    case c: Call        => call(c)
    case i: InstanceRef => instanceRef(i)
    case m: ModelRef    => modelRef(m)
    case a: Access      => access(a)
    case b: Binding     => binding(b)
    case c: Condition   => condition(c)
    case l: Loop        => loop(l)
  }

  protected def literal(expr: Literal): Analysis[Type] = expr.typed match {
    case Some(_:SeqType) => for {
      ts <- sequence(expr.valueAs[Seq[Expression]].map(check))
      t  <- ts.headOption match {
        case Some(t) => requireType(expr.valueAs[Seq[Expression]])(t) >> SeqType(t)
        case _       => unit(SeqType.unknown)
      }
    } yield expr.setType(t)
    case Some(t) => unit(t)
    case _       => error("Untyped expression", expr)
  }

  protected def unary(expr: Unary): Analysis[Type] = for {
    t <- check(expr.operand)
    _ <- expr.operator match {
      case "-" => requireType(expr.operand)(IntType, DblType)
      case "!" => requireType(expr.operand)(BoolType)
      case op  => error(s"Unknown unary operator `$op'", expr)
    }
  } yield expr.setType(t)

  protected def binary(expr: Binary): Analysis[Type] = for {
    t1 <- check(expr.left)
    t2 <- check(expr.right)
    t <- expr.operator match {
      case "||" | "&&" | "=>" => for {
        _ <- requireType(expr.left)(BoolType)
        _ <- requireType(expr.right)(BoolType)
      } yield BoolType
      case op@("==" | "!=") => for {
        _ <- requireType(expr.left)(BoolType, IntType, DblType, StrType, DateType, TimeType, DateTimeType, InstType.base)
        _ <- requireType(expr.right)(BoolType, IntType, DblType, StrType, DateType, TimeType, DateTimeType, InstType.base)
        _ <- require((t1 is t2) || t1.isNum && t2.isNum)(s"Expected $t1 but found $t2", expr.right)
      } yield BoolType
      case "<" | ">" | "<=" | ">=" => for {
        _ <- requireType(expr.left)(IntType, DblType, DateType, TimeType, DateTimeType)
        _ <- requireType(expr.right)(IntType, DblType, DateType, TimeType, DateTimeType)
        _ <- require((t1 is t2) || t1.isNum && t2.isNum)(s"Expected $t1 but found $t2", expr.right)
      } yield BoolType
      case "+" | "-" | "*" | "/" => for {
        _ <- requireType(expr.left)(IntType, DblType)
        _ <- requireType(expr.right)(IntType, DblType)
      } yield if (t1 == DblType || t2 == DblType) DblType else IntType
      case op@"++" => for {
        _ <- requireType(expr.left)(StrType, SeqType.base)
        _ <- requireType(expr.right)(StrType, SeqType.base)
        _ <- require(t1 == t2)(s"Expected $t1 but found $t2", expr)
      } yield StrType
      case "=~" => for {
        _ <- requireType(expr.left)(StrType)
        _ <- requireType(expr.right)(StrType)
      } yield BoolType
      case op => error(s"Unknown binary operator `$op'", expr)
    }
  } yield expr.setType(t)

  protected def variable(expr: Variable): Analysis[Type] =
    getAs[Type](expr.name, expr) >>= expr.setType

  protected def call(expr: Call): Analysis[Type] = {
    def checkParams(length: Range): Analysis[Seq[Type]] = for {
      _ <- require(expr.parameters.length <= length.end)(s"Too many arguments (expected ${printRange(length)})", expr)
      _ <- require(expr.parameters.length >= length.start)(s"Not enough arguments (expected ${printRange(length)})", expr)
      p <- sequence(expr.parameters.map(check))
    } yield p
    expr.name match {
      case "eid" => for {
        _ <- checkParams(1 to 1)
        _ <- requireType(expr.parameters.head)(InstType.base)
      } yield expr.setType(IntType)
      case "defined" => for {
        _ <- checkParams(1 to 1)
        _ <- require(expr.parameters.head.isInstanceOf[Access])("Invalid argument", expr.parameters.head)
      } yield expr.setType(BoolType)
      case "get" => for {
        _ <- checkParams(2 to 2)
        p0 = expr.parameters(0)
        p1 = expr.parameters(1)
        t <- if(p0.isInstanceOf[Access]) for {
          _ <- requireType(p1)(p0.getType)
        } yield p0.getType else for {
          _ <- requireType(p0)(SeqType.base)
          _ <- requireType(p1)(IntType)
        } yield p0.getType.asInstanceOf[SeqType].getSubType
      } yield expr.setType(t)
      case name => for {
        _ <- require(callChecks.isDefinedAt(name))(s"Unknown function `${name}'", expr)
        (fArity, fCheck) = callChecks(name)
        _ <- checkParams(fArity)
        t <- fCheck(expr.parameters)
      } yield expr.setType(t)
    }
  }

  protected def instanceRef(expr: InstanceRef): Analysis[Type] = for {
    _ <- require(modelCache.isDefinedAt(expr.name))(s"Unknown model `${expr.name}'", expr)
  } yield expr.setType(InstType(expr.name))

  protected def modelRef(expr: ModelRef): Analysis[Type] = for {
    _ <- require(modelCache.isDefinedAt(expr.name))(s"Unknown model `${expr.name}'", expr)
  } yield expr.setType(SeqType(InstType(expr.name)))

  protected def access(expr: Access): Analysis[Type] = for {
    r <- check(expr.reference)
    _ <- requireType(expr.reference)(InstType.base)
    attr = modelCache(r.asInstanceOf[InstType].getModel).get(expr.attribute)
    t <- attr.map(_.datatype) match {
      case Some(Datatype.Boolean) => unit(BoolType)
      case Some(Datatype.Integer) => unit(IntType)
      case Some(Datatype.Double)  => unit(DblType)
      case Some(Datatype.String)  => unit(StrType)
      case Some(Datatype.Text)    => unit(StrType)
      case Some(Datatype.Date)    => unit(DateType)
      case Some(Datatype.Time)    => unit(TimeType)
      case _                      => error("Invalid attribute access", expr.reference)
    }
  } yield expr.setType(t)

  protected def binding(expr: Binding): Analysis[Type] = for {
    b <- check(expr.body)
    t <- local(expr.name -> b) {
      check(expr.scope)
    }
  } yield expr.setType(t)

  protected def condition(expr: Condition): Analysis[Type] = for {
    ip <- check(expr.ifPart)
    _  <- requireType(expr.ifPart)(BoolType)
    tp <- check(expr.thenPart)
    ep <- check(expr.elsePart)
    _  <- requireType(expr.elsePart)(tp)
  } yield expr.setType(tp)

  protected def loop(expr: Loop): Analysis[Type] = for {
    ts <- checkPath(expr)
    lt <- local(ts.toSeq:_*) {
      check(expr.body)
    } >>= (t => if(expr.operator == "for") SeqType(t) else t)
    _  <- expr.operator match {
      case "for"  => expr.condition match {
        case Some(cond) => local(ts.toSeq:_*) {
          check(cond)
        } >>> requireType(cond)(BoolType)
        case None => unit
      }
      case "exists"|"exists!"|"forall"|"forall!" => requireType(expr.body)(BoolType)
      case op     => error(s"Unknown loop operator `$op'", expr)
    }
  } yield expr.setType(lt)

  /* ---------- *
   * Loop check
   * ---------- */
  import lib.reasoner.syntactical.Loop.TypeMap

  /* Sets the ident. type, binds it in the env. and checks compatibility. */
  def setAndBind(env: TypeMap, reBind: Boolean)(data: (PathIdent, Type)): Analysis[TypeMap] = for {
    t <- data._2 match {
      case t:InstType => unit(t)
      case s:SeqType => s.subType match {
        case Some(t:InstType) => unit(t)
        case _ => error[InstType]("Invalid type", data._1)
      }
      case _ => error[InstType]("Invalid type", data._1)
    }
    _ <- unit(data._1.setType(t))
    e <- data._1.name match {
      case None => unit(env)
      case Some(namePos) => {
        val name = namePos.chars
        val prevBind = env.get(name)
        if(prevBind.isEmpty) unit(env + (name -> t))
        else if(reBind) require(prevBind.get == data._2)(s"Expected ${prevBind.get} but found ${data._2}", namePos) >> env
        else error[TypeMap]("Invalid re-binding", namePos)
      }
    }
  } yield e

  private def checkPath(expr: Loop): Analysis[TypeMap] = {
    type BindPair = (PathIdent, PathLink, PathIdent)
    val inferred: ListBuffer[Int] = ListBuffer.empty

    /* Infers the type of a path ident. by attribute lookup. */
    def infer(pair: BindPair): Analysis[InstType] = {
      val (typed, link, untyped) = pair
      val modelName = typed.getType.asInstanceOf[InstType].getModel
      val modelAttr = modelCache(modelName).get(link.name.chars)
      for {
        _ <- require(modelAttr.isDefined)(s"Unknown attribute `$modelName.${link.name.chars}'", link)
        _ <- require(modelAttr.get.datatype == models.enums.Datatype.Relation)("Invalid attribute `$modelName.${link.name.chars}'", link)
        ut = nameCache.get(modelAttr.get.relTarget.get)
        _ <- require(ut.isDefined)(s"Unknown target model", link)
      } yield InstType(ut.get)
    }

    /* Yields the next (typed/untyped) pair of path idents. */
    def findNext(i: Int = 0): Option[(BindPair, Int)] =
      if(i >= expr.idents.length - 1) None
      else {
        val curr = expr.idents(i)
        val link = expr.links(i)
        val next = expr.idents(i + 1)
        (curr.isTyped, link.isOutgoing, next.isTyped) match {
          case (true, true, false)  => Some(((curr, link, next), i))
          case (false, false, true) => Some(((next, link, curr), i))
          case _                    => findNext(i+1)
        }
      }

    /* Types all directly typed path idents. */
    def hardBinds(env: TypeMap = Map.empty): Analysis[TypeMap] = {
      expr.idents.foldLeft(unit(env))({ case (acc, ident) =>
        ident.source match {
          case None => {
            for {
              d <- if(ident.name.isDefined) isDefined(ident.name.get.chars) else unit(false)
              t <- if(!d) acc else acc >>>=
                (env => getAs[Type](ident.name.get.chars, ident.name.get) >>>=
                (t => setAndBind(env, false)(ident -> t)))
            } yield t
          }
          case Some(src) => acc >>>=
            (env => check(src) >>>=
            (t => setAndBind(env, false)(ident -> t)))
        }
      })
    }

    /* Types all indirectly typed path idents. */
    def softBinds(env: TypeMap): Analysis[TypeMap] = findNext() match {
      case None => unit(env)
      case Some((pair@(typed, link, untyped), i)) => {
        val modelName = typed.getType.asInstanceOf[InstType].getModel
        val modelAttr = modelCache(modelName).get(link.name.chars)
        for {
          it <- infer(pair)
          e0 <- setAndBind(env, true)(untyped -> it)
          e1 <- softBinds(e0)
        } yield { inferred.append(i); e1 }
      }
    }

    /* Re-checks all directly typed path idents. for link compatibility. */
    def checkBinds(): Analysis[Unit] = expr.links.zipWithIndex.foldLeft(unit)({ case (acc, (link, i)) =>
      if(inferred.contains(i)) acc
      else {
        val (left, right) =
          if(link.isOutgoing) (expr.idents(i), expr.idents(i+1))
          else (expr.idents(i+1), expr.idents(i))
        for {
          i <- infer((left, link, right))
          _ <- require(right.getType.isInstanceOf[InstType])("Invalid type", right)
          b = right.getType.asInstanceOf[InstType]
          _ <- require(b == i || inheritsFrom(b.getModel, i.getModel))(s"Expected $b but found $i", right)
        } yield ()
      }
    })

    for {
      e0 <- hardBinds()
      e1 <- softBinds(e0)
      _  <- require(expr.idents.exists(_.name.isDefined))("Could not find loop variables", expr)
      _  <- require(e1.size == expr.idents.size)("Type check error", expr)
      ut = expr.idents.find(!_.isTyped)
      _  <- require(ut.isEmpty)("Unknown type", ut.get)
      _  <- checkBinds()
    } yield { expr.bindVars = e1; e1 }
  }

  /* ------- *
   * Helpers
   * ------- */

  private lazy val nameCache: Map[Long, String] =
    Cache.getAs[Map[Long, models.Model.Rich]]("app.models.idToModel").get.mapValues(_._1.name)

  private type ModelCache = Map[String, Map[String, models.Attribute]]
  private lazy val modelCache: ModelCache =
    Cypher("""
      START model = node:MODELS("name:*")
      MATCH model -[:EXTENDS*0..]-> _ -[?:HAS_ATTR]-> attr
      RETURN model.name AS name, attr"""
    ).as(str("name") ~ models.Attribute.simple("attr").? map(flatten) *)
     .groupBy(_._1).mapValues(_.map(_._2).flatten)
     .mapValues(_.groupBy(_.name).mapValues(_.head))

  private def inheritsFrom(name: String, supName: String): Boolean =
    models.ModelCache.supModels(name).find(_._2 == supName).isDefined

  private def printRange(r: Range): String =
    if(r.length == 1) r.start.toString
    else s"${r.start}-${r.end}"
}


text:
article {
    background-color: white;
}


text:
using System;

namespace SageOne.Api.Accounts
{
    public class AccountNote
    {
        public int ID { get; set; }
        public string Subject { get; set; }
        public DateTime? EntryDate { get; set; }
        public DateTime? ActionDate { get; set; }
        public int? Status { get; set; }
        public string Note { get; set; }
        public bool? HasAttachments { get; set; }
        public int UserId { get; set; }
        public int CompanyId { get; set; }
        public string CompanyName { get; set; }
        public string ToAccountant { get; set; }
        public string StatusText { get; set; }
        public int? CreatedByUserId { get; set; }
        public string CreatedBy { get; set; }
        public string LastModified { get; set; }
        public int? CategoryId { get; set; }
        public string Category { get; set; }
        public int? DocumentHeaderId { get; set; }
        public bool IsOwner { get; set; }
    }
}


text:
arduino-express
===============

Expose control to an Arduino as an Express site


text:
{% extends "base.html" %}
{% block title %}Churching - Inicio{% endblock %}

{% block body %}
  {% if current_user.is_authenticated %}
    {% if current_user.is_admin %}

      {% include "home/_sidebar.html" %}

          {% include "home/_topbar.html" %}

          {% include "home/contenido.html" %}

      {% include "home/_footer.html" %}

    {% endif %}
  {% endif %}
{% endblock %}


text:
package entitysearchapi

// Copyright (c) Microsoft and contributors.  All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.

import (
	"context"
	"github.com/Azure/azure-sdk-for-go/services/cognitiveservices/v1.0/entitysearch"
)

// EntitiesClientAPI contains the set of methods on the EntitiesClient type.
type EntitiesClientAPI interface {
	Search(ctx context.Context, query string, acceptLanguage string, pragma string, userAgent string, clientID string, clientIP string, location string, countryCode string, market string, responseFilter []entitysearch.AnswerType, responseFormat []entitysearch.ResponseFormat, safeSearch entitysearch.SafeSearch, setLang string) (result entitysearch.SearchResponse, err error)
}

var _ EntitiesClientAPI = (*entitysearch.EntitiesClient)(nil)


text:
@implementation UIAlertController (supportedInterfaceOrientations)
#if __IPHONE_OS_VERSION_MAX_ALLOWED < 90000
- (NSUInteger)supportedInterfaceOrientations; {
    return UIInterfaceOrientationMaskPortrait;
}
#else
- (UIInterfaceOrientationMask)supportedInterfaceOrientations {
    return UIInterfaceOrientationMaskPortrait;
}
#endif
@end


text: <ng-devtools></ng-devtools>


text:
'use strict';

import sqldb from '../../sqldb';
import _ from 'lodash';
var Promise = require('bluebird');

export default function(sequelize, DataTypes) {
  return sequelize.define('Nut', {
    _id: {
      type: DataTypes.INTEGER,
      allowNull: false,
      primaryKey: true,
      autoIncrement: true
    },
    name: {
      type: DataTypes.STRING
    },
	appId: DataTypes.INTEGER,
	spaceId: DataTypes.INTEGER,
	alias: DataTypes.STRING,
    description: DataTypes.STRING,
	typeId: DataTypes.INTEGER,
    active: DataTypes.BOOLEAN
  },{
	  classMethods: {
		  addType: function(typeData){
			  return this.getType(typeData,true);
		  },
		  getType: function(typeData,autoCreated){
			  //console.log('in app Category:', Category);
			  //console.log('in app User:', User);
			  //console.log('in app sqldb:', sqldb);
			  var Category = sqldb.Category;
			  //var Category = sqldb.Category;
			  //console.log('in app Category:', Category);
			  if(typeof typeData === 'string' && isNaN(typeData)){
				  var typeName = typeData;

				  typeData = {};

				  typeData.name = typeName;

				  //console.log('in space getType');
				  //console.log('in space Category:', Category);
				  //console.log('space getType typeData:', JSON.stringfy(typeData));
			  }

			  if(typeof typeData === 'object' && !_.isEmpty(typeData)){
				typeData.owner = 'nut';
				var tyName = typeData.name;
			    if(tyName.substr(0,4).toLowerCase() !== 'nut.'){
				   tyName = 'nut.' + tyName;
			    }
				typeData.name = tyName;
				//console.log('app model typeData:', JSON.stringify(typeData));
			  	return Category.getType(typeData, true);
			  }

			  //otherwise return promise reject
			  sequelize.Promise.reject(new Error('fail to add type for nut!'));
		  },
		  addBulkNut: function(bulkNutData){

		  	var that = this;

		  	return Promise.each(bulkNutData, function(nutData){
		  		if(nutData.type && !nutData.typeId){
		  			var typeData = {
		  				name: nutData.type,
		  				spaceId: nutData.spaceId
		  			};

		  			return that.getType(typeData, true).then(function(type){
		  				nutData.typeId = type._id;
		  				//console.log('nutData:', nutData);
		  				return Promise.resolve(null);
		  			});
		  		} else {
		  			return Promise.resolve(null);
		  		}
		  	}).then(function(){
		  		//console.log('2 bulkNutData:', JSON.stringify(bulkNutData));
		  		return that.bulkCreate(bulkNutData);
		  	});

		  }
	  },
  });
}


text:
<?php

namespace app\module\Admin\modules\User\models;

use Yii;

/**
 * This is the model class for table "{{%admin}}".
 *
 * @property integer $uid
 * @property string $uname
 * @property string $pwd
 * @property string $email
 * @property string $salt
 * @property string $regtime
 * @property string $lasttime
 * @property string $avatar
 * @property integer $rid
 * @property string $nickname
 * @property integer $updated_at
 * @property integer $reset_at
 * @property integer $status
 */
class AdminUser extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%admin}}';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['uid', 'uname', 'pwd'], 'required'],
            [['uid', 'rid', 'updated_at', 'reset_at', 'status'], 'integer'],
            [['regtime', 'lasttime'], 'safe'],
            [['uname', 'pwd', 'email', 'salt', 'avatar', 'nickname'], 'string', 'max' => 255]
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'uid' => 'Uid',
            'uname' => 'Uname',
            'pwd' => 'Pwd',
            'email' => 'Email',
            'salt' => 'Salt',
            'regtime' => 'Regtime',
            'lasttime' => 'Lasttime',
            'avatar' => 'Avatar',
            'rid' => 'Rid',
            'nickname' => 'Nickname',
            'updated_at' => 'Updated At',
            'reset_at' => 'Reset At',
            'status' => 'Status',
        ];
    }
}


text:
ROOT = ../../../..
DIR = Executor/tests/Macro

include $(ROOT)/mak/config.mak

PROGRAM = TestExecutorMacro
SOURCES = TestExecutorMacro.c
EXTRA_INCLUDES += -I../../..

LIBRARIES += pegexecutor

include ../common.mak
include $(ROOT)/mak/program.mak

tests:
	$(PROGRAM)

poststarttests:


text:
package it.unibz.inf.ontop.iq.exception;

import it.unibz.inf.ontop.exception.OntopInternalBugException;

/**
 * TODO: explain
 */
public class IllegalTreeUpdateException extends OntopInternalBugException {
    public IllegalTreeUpdateException(String message) {
        super(message);
    }
}


text:
require 'test_helper'

describe 'StartCommand' do
  include MockExecution

  let(:command) { CfScript::Command::Apps::StartCommand.instance }

  it_behaves_like 'a command object that', {
    has_type:  :apps,
    has_name:  :start,
    fails_with: nil
  }

  let(:expected_instances) {[
    {
      index:    '#0',
      state:    'running',
      since:    '2015-12-25 00:00:00 AM',
      cpu:      '42.0%',
      memory:   '12.3M of 256M',
      disk:     '45.6M of 1G',
      details:  ''
    }, {
      index:    '#1',
      state:    'stopped',
      since:    '2015-12-25 00:00:00 AM',
      cpu:      '0.0%',
      memory:   '0M of 256M',
      disk:     '45.6M of 1G',
      details:  ''
    },
  ]}

  it "returns an AppStaus object with its instance_status set on success" do
    fake_cf do
      app_info = command.run(:some_app)

      assert_app_info(app_info, expected_instances)
    end
  end

  it "correctly handles container creation output" do
    fake_cf start: :with_container do
      app_info = command.run(:frontend)

      assert_app_info(app_info, expected_instances)
    end
  end

  it "returns nil if no attributes were found" do
    fake_cf start: :empty do
      result = command.run(:worker)

      assert_nil result
    end
  end

  it "returns nil on failure" do
    fake_cf start: :not_found do
      assert_nil command.run(:some_app)
    end
  end
end


text:
const Plugin = require('../plugin');
const utils = require('../utils');

module.exports = Plugin.define('inline', ['updates', 'info'], {
  async start (bot, options) {
    /* When the bot sends an update, emit a *query* event of the given type */
    this.on('update', ($evt, update) => {
      if (update.inline_query) {
        const inline = update.inline_query;
        inline.from.full_name = utils.fullName(inline.from.first_name, inline.from.last_name);

        this.logger.trace({'inline_query': inline}, 'received inline query from #%s', inline.from.id);

        return this.bot.emit(['inline'], inline);
      }

      if (update.chosen_inline_result) {
        const result = update.chosen_inline_result;
        result.from.full_name = utils.fullName(result.from.first_name, result.from.last_name);

        this.logger.trace({'inline_chosen': result}, 'received chosen inline result from #%s', result.from.id);

        return this.bot.emit(['inline-chosen'], result);
      }
    });
  },
});


text:
.. module:: pymeasure.instruments.keysight

########
Keysight
########

This section contains specific documentation on the keysight instruments that are implemented. If you are interested in an instrument not included, please consider :doc:`adding the instrument </dev/adding_instruments>`.

.. toctree::
   :maxdepth: 2

   keysightDSOX1102G
   keysightN5767A


text:
@interface BarSeries : Series

-(void) addPoint:(float)p;

@end


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Evo C++ Library v0.5.1: FmtChar Struct Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>

<link href="doxygen.css" rel="stylesheet" type="text/css" />

Evo C++ Library v0.5.1

evo

FmtChar

Public Member Functions |
Public Attributes |
List of all members

FmtChar Struct Reference
EvoContainers

#include <evo/impl/str.h>

Detailed Description

Explicitly format a repeated character.

Used with operator<<() on String, Stream, and StreamOut

See String Formatting and Stream Formatting

Public Member Functions

 	FmtChar (char ch, ulong count)

 	Constructor.  More...

Public Attributes

char 	ch

 	Character to format.  More...

uint 	count

 	Character repeat count.  More...

Constructor & Destructor Documentation

◆ FmtChar()

          FmtChar
          (
          char
          ch,

          ulong
          count

          )

inline

Constructor.

Parameters

ch	Character to format

count	Character repeat count

Member Data Documentation

◆ ch

          char ch

Character to format.

◆ count

          uint count

Character repeat count.

The documentation for this struct was generated from the following file:

evo/impl/str.h

<address class="footer">
Generated on Tue May 7 2019 18:17:36 for Evo C++ Library v0.5.1 by

 1.8.13
</address>


text:
layout: page
title: Levine 40th Anniversary
date: 2016-05-24
author: Lawrence Miller
tags: weekly links, java
status: published
summary: Duis turpis massa, fringilla vitae rhoncus quis, elementum.
banner: images/banner/leisure-05.jpg
booking:
  startDate: 01/21/2017
  endDate: 01/26/2017
  ctyhocn: SFOHSHX
  groupCode: L4A
published: true
---
Quisque volutpat quam et pharetra auctor. Sed ac tincidunt libero. Vivamus eu felis vel quam ornare luctus ac at arcu. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Pellentesque pulvinar, tellus quis aliquet vehicula, nunc odio placerat magna, vitae finibus felis libero sit amet magna. Integer non ex felis. Phasellus et vestibulum metus. Nam et dolor vel arcu molestie tincidunt. Vivamus sed vulputate risus, at facilisis lorem. Sed ac arcu viverra, malesuada dolor at, maximus nisl.
Duis congue dapibus ipsum, non blandit lorem lobortis ac. Aliquam ex felis, congue quis pulvinar eget, rhoncus ac eros. Aliquam eleifend nunc nisl, nec maximus risus rhoncus non. Nam malesuada ullamcorper felis a facilisis. Morbi quis lacinia arcu, eu pharetra nibh. Etiam ac finibus ante. Donec sed risus augue. Nullam pretium molestie dolor, vel condimentum nisi semper at. Nunc consectetur nisi eu nisi dapibus ullamcorper. In malesuada, nisl sed tincidunt placerat, lorem massa sagittis erat, vitae auctor urna metus et leo. Mauris ornare velit in condimentum luctus.

* Vivamus convallis purus quis metus egestas placerat non at diam
* Nulla vel nibh suscipit, rhoncus nisi ut, rhoncus urna
* Nulla vitae ex et elit sodales tincidunt
* Fusce bibendum quam dictum porta interdum
* Praesent nec urna sit amet nunc auctor gravida.

Pellentesque arcu orci, aliquet lobortis nibh vel, fringilla mollis erat. Ut non egestas augue. Etiam volutpat lorem et fermentum laoreet. Donec egestas tortor at ligula luctus hendrerit. Pellentesque fringilla, turpis at laoreet vehicula, metus mi pharetra purus, id dapibus felis justo non sapien. Quisque feugiat facilisis purus, nec hendrerit lacus consectetur sed. Nunc fermentum imperdiet felis, non sodales est feugiat id. Donec dui velit, varius in nunc vulputate, bibendum bibendum orci. Nullam ac bibendum sem.
Suspendisse fringilla blandit augue ut venenatis. Quisque non lorem mi. Curabitur egestas commodo aliquet. Nunc ante justo, consequat et lacus eu, tempus accumsan diam. Vestibulum nibh leo, porttitor sed nisi eu, vestibulum tristique sapien. Nunc quis ante convallis, condimentum nibh et, tristique eros. Nulla facilisi.


text: export * from './Rental';


text:
import styled from 'styled-components';
export default styled.div`
  text-align: ${p=>p.lang==='ar' ? 'right' : 'left'};
`;


text:
package parser;

import java.util.Vector;

import org.antlr.v4.runtime.ParserRuleContext;
import org.antlr.v4.runtime.tree.ErrorNode;
import org.antlr.v4.runtime.tree.ParseTreeListener;
import org.antlr.v4.runtime.tree.TerminalNode;

import antlrparser.SimpleAsmListener;
import antlrparser.SimpleAsmParser.DataDeclContext;
import antlrparser.SimpleAsmParser.InitContext;
import antlrparser.SimpleAsmParser.LabelContext;
import antlrparser.SimpleAsmParser.NumberListContext;
import antlrparser.SimpleAsmParser.SegmentStmtContext;
import antlrparser.SimpleAsmParser.StmtContext;
import antlrparser.SimpleAsmParser.ValueContext;

public class TranslateASMSource implements SimpleAsmListener {

	MemoryMap memoryMap;

	public TranslateASMSource(MemoryMap memoryMap) {
		this.memoryMap = memoryMap;
	}

	@Override
	public void enterEveryRule(ParserRuleContext arg0) {
		// TODO Auto-generated method stub

	}

	@Override
	public void exitEveryRule(ParserRuleContext arg0) {
		// TODO Auto-generated method stub

	}

	@Override
	public void visitErrorNode(ErrorNode arg0) {
		// TODO Auto-generated method stub

	}

	@Override
	public void visitTerminal(TerminalNode arg0) {
		// TODO Auto-generated method stub

	}

	@Override
	public void enterInit(InitContext ctx) {
		// TODO Auto-generated method stub

	}

	@Override
	public void exitInit(InitContext ctx) {
		// TODO Auto-generated method stub

	}

	@Override
	public void enterStmt(StmtContext ctx) {

	}

	@Override
	public void exitStmt(StmtContext ctx) {
		// TODO Auto-generated method stub

	}

	@Override
	public void enterSegmentStmt(SegmentStmtContext ctx) {
		memoryMap.setActiveSegment(ctx.getText());

		System.out.println();
	}

	@Override
	public void exitSegmentStmt(SegmentStmtContext ctx) {
		// TODO Auto-generated method stub

	}

	@Override
	public void enterDataDecl(DataDeclContext ctx) {
		// TODO Auto-generated method stub

	}

	@Override
	public void exitDataDecl(DataDeclContext ctx) {

	}

	@Override
	public void enterLabel(LabelContext ctx) {
		// TODO Auto-generated method stub

	}

	@Override
	public void exitLabel(LabelContext ctx) {

	}

	@Override
	public void enterNumberList(NumberListContext ctx) {

	}

	@Override
	public void exitNumberList(NumberListContext ctx) {

	}

	@Override
	public void enterValue(ValueContext ctx) {
		System.out.println(ctx.INT().getText());
		memoryMap.add(ctx.INT().getText());
	}

	@Override
	public void exitValue(ValueContext ctx) {
		// TODO Auto-generated method stub

	}

}


text:
using System;
using System.IO;
using System.Globalization;
using System.Runtime.Serialization.Formatters.Binary;
using Newtonsoft.Json;

namespace Othello
{
    public static class OthelloIO
    {
        public static string CreateDefaultDirectory(string pathString)
        {
            if (!Directory.Exists(pathString))
            {
                try
                {
                    Directory.CreateDirectory(pathString);
                }
                catch (Exception e)
                {
                    throw new Exception(string.Format(CultureInfo.CurrentCulture, "CreateDefaultDirectory [Exception] : Exception Message = {0}", e.Message));
                }
            }

            return pathString;
        }
        public static string GetFileSavePath(string strSaveDirPath, string fileName)
        {
            return Path.Combine(strSaveDirPath, fileName);
        }
        public static object LoadFromBinaryFile(string path)
        {
            FileStream fs = new FileStream(path, FileMode.Open, FileAccess.Read);
            BinaryFormatter f = new BinaryFormatter();

            object obj = f.Deserialize(fs);
            fs.Close();

            return obj;
        }
        public static void SaveToBinaryFile(object target, string path)
        {
            FileStream fs = new FileStream(path, FileMode.Create, FileAccess.Write);
            BinaryFormatter bf = new BinaryFormatter();

            // Serializer and write
            bf.Serialize(fs, target);
            fs.Close();
        }

        public static string GetBase64String(object target)
        {
            using (MemoryStream m = new MemoryStream())
            {
                new BinaryFormatter().Serialize(m, target);
                return Convert.ToBase64String(m.ToArray());
            }
        }

        public static object GetObjectFromBase64String(string b64str)
        {
            byte[] bytes = Convert.FromBase64String(b64str);
            using (MemoryStream m = new MemoryStream(bytes, 0, bytes.Length))
            {
                m.Write(bytes, 0, bytes.Length);
                m.Position = 0;
                return new BinaryFormatter().Deserialize(m);
            }
        }

        public static string ConvertBase64StringToJSON(string b64str)
        {
            return JsonConvert.SerializeObject(b64str);
        }

        public static string ConvertJSONToBase64String(string json)
        {
            return JsonConvert.DeserializeObject<string>(json);
        }
    }
}


text:
namespace SimpleInjector.Diagnostics.Tests.Unit
{
    using Microsoft.VisualStudio.TestTools.UnitTesting;
    using SimpleInjector.Diagnostics;
    using SimpleInjector.Diagnostics.Analyzers;
    using SimpleInjector.Diagnostics.Tests.Unit.Helpers;

    [TestClass]
    public class PotentialLifestyleMismatchContainerAnalyzerTests
    {
        [TestMethod]
        public void Analyze_ContainerWithOneMismatch_ReturnsItemWithExpectedName()
        {
            // Arrange
            var container = new Container();

            container.Register<IUserRepository, InMemoryUserRepository>();

            // RealUserService depends on IUserRepository
            container.RegisterSingle<RealUserService>();

            container.Verify();

            // Act
            var item = DebuggerGeneralWarningsContainerAnalyzer.Analyze(container);

            // Assert
            Assert.AreEqual("Potential Lifestyle Mismatches", item.Name);
        }

        [TestMethod]
        public void Analyze_ContainerWithOneMismatch_ReturnsItemWithExpectedDescription()
        {
            // Arrange
            var container = new Container();

            container.Register<IUserRepository, InMemoryUserRepository>();

            // RealUserService depends on IUserRepository
            container.RegisterSingle<RealUserService>();

            container.Verify();

            // Act
            var item = DebuggerGeneralWarningsContainerAnalyzer.Analyze(container);

            // Assert
            Assert.AreEqual("1 possible lifestyle mismatch for 1 service.", item.Description);
        }

        [TestMethod]
        public void Analyze_ContainerWithTwoMismatch_ReturnsItemWithExpectedDescription()
        {
            // Arrange
            var container = new Container();

            container.Register<IUserRepository, InMemoryUserRepository>();

            // RealUserService depends on IUserRepository
            container.RegisterSingle<RealUserService>();

            // FakeUserService depends on IUserRepository
            container.RegisterSingle<FakeUserService>();

            container.Verify();

            // Act
            var item = DebuggerGeneralWarningsContainerAnalyzer.Analyze(container);

            // Assert
            Assert.AreEqual("2 possible lifestyle mismatches for 2 services.", item.Description);
        }
    }
}


text:
    <button data-remote="{!! route('administrator.articles.destroy', $id) !!}"
            class="btn btn-xs btn-delete btn-default text-red"
            data-toggle="tooltip"
            data-title="{{trans('cms::button.delete')}}"
            data-container="body"
    >

    </button>


text:
typedef ds::Array<ds::DroppedCell<GridEntry>> DroppedCells;
typedef ds::Array<ds::Point> Points;

enum BucketMode {
	B_IDLE,
	BK_INIT,
	BK_RUNNING,
	BK_MOVING,
	BK_REMOVING,
	BK_REFILLING,
	BK_SWAPPING,
	BK_BACK_SWAPPING,
	BK_DROPPING,
	BK_FILLRATE,
	BK_NONE
};

struct BucketContext : public ds::StateContext {
	ds::World* world;
	ColorGrid* grid;
	DroppedCells droppedCells;
	Points points;
	ds::Point firstSwapPoint;
	ds::Point secondSwapPoint;
	GameSettings* settings;
};

class MouseOverState : public ds::State {

public:
	MouseOverState() : ds::State(), _selectedEntry(-1, -1), _lastUpdate(-1, -1) {}
	virtual ~MouseOverState() {}
	int activate();
	int update(float dt);
	int getMode() const {
		return BK_RUNNING;
	}
	const char* getName() const {
		return "MouseOverState";
	}
private:
	ds::Point _selectedEntry;
	ds::Point _lastUpdate;
};

class SwapCellsState : public ds::State {

public:
	SwapCellsState() : ds::State() {}
	virtual ~SwapCellsState() {}
	int activate();
	int deactivate();
	int getMode() const {
		return BK_SWAPPING;
	}
	const char* getName() const {
		return "SwapCellsState";
	}
private:
	int findMatching(const ds::Point& p);
};

class SwapBackCellsState : public ds::State {

public:
	SwapBackCellsState() : ds::State() {}
	virtual ~SwapBackCellsState() {}
	int activate();
	int getMode() const {
		return BK_BACK_SWAPPING;
	}
	const char* getName() const {
		return "SwapBackCellsState";
	}
};

class RemoveCellsState : public ds::State {

public:
	RemoveCellsState() : ds::State() {}
	virtual ~RemoveCellsState() {}
	int activate();
	int deactivate();
	int getMode() const {
		return BK_REMOVING;
	}
	const char* getName() const {
		return "RemoveCellsState";
	}

};

class DropCellsState : public ds::State {

public:
	DropCellsState() : ds::State() {}
	virtual ~DropCellsState() {}
	int activate();
	int getMode() const {
		return BK_DROPPING;
	}
	const char* getName() const {
		return "DropCellsState";
	}
};

class RefillCellsState : public ds::State {

public:
	RefillCellsState() : ds::State() {}
	virtual ~RefillCellsState() {}
	void init();
	int activate();
	int getMode() const {
		return BK_REFILLING;
	}
	const char* getName() const {
		return "RefillCellsState";
	}
private:
	void moveRow(int row);
	ds::SID _refill[GRID_SX];
};

// -------------------------------------------------------
// Bucket
// -------------------------------------------------------
class Bucket {

public:
	Bucket(GameContext* context);
	~Bucket();
	void init();
	void clear();
	int update(float elapsed);
	void fillRow(int row,int pieces);
	void fill(int minCol,int maxCol);
	bool refill(int pieces,bool move = true);
	int selectCell();
	void moveRow(int row);
	bool isRowFull(int row);
	void debug();
	void synch();
private:
	bool Bucket::containsGridEntry(ds::SID sid);
	const bool isValid(const ds::Point& p) const;
	const bool isValid(int x, int y) const;
	const bool isUsed(int x, int y) const;
	const bool isUsed(const ds::Point& p) const;
	int swapCells(const ds::Point& first, const ds::Point& second);
	int findMatching(const ds::Point& p);
	void calculateFillRate();
	const char* translateColor(int color) const;

	ds::SID _selection;
	GameContext* _context;
	ds::World* _world;
	ds::Point _selectedEntry;
	ColorGrid m_Grid;
	PlayMode _playMode;
	BucketContext _bucketContext;
	ds::StateManager* _states;
};


text:
package org.artificer.ui.client.local.pages.details;

import com.google.gwt.core.client.JavaScriptObject;
import com.google.gwt.dom.client.Document;
import com.google.gwt.event.logical.shared.AttachEvent;
import com.google.gwt.event.logical.shared.AttachEvent.Handler;
import com.google.gwt.event.logical.shared.ValueChangeHandler;
import com.google.gwt.event.shared.HandlerRegistration;
import com.google.gwt.user.client.ui.HasValue;
import com.google.gwt.user.client.ui.Widget;

/**
 * A simple widget that wraps the ACE JavaScript source editor.
 *
 * @author eric.wittmann@redhat.com
 */
public class SourceEditor extends Widget implements HasValue<String> {

    private JavaScriptObject editor;

    /**
     * Constructor.
     */
    public SourceEditor() {
        setElement(Document.get().createDivElement());
        addAttachHandler(new Handler() {
            @Override
            public void onAttachOrDetach(AttachEvent event) {
                if (event.isAttached()) {
                    initEditor();
                } else {
                    destroyEditor();
                }
            }
        });
    }

    /**
     * Initializes the ACE editor.
     */
    protected void initEditor() {
        String id = getElement().getId();
        initACE(id);
    }

    /**
     * Initializes the ACE editor.
     *
     * @param id
     * @return the ACE javascript object
     */
    public native void initACE(String id) /*-{
		var editor = $wnd.ace.edit(id);
		editor.setTheme("ace/theme/eclipse");
		editor.getSession().setMode("ace/mode/xml");
		editor.setReadOnly(true);
		this.@org.artificer.ui.client.local.pages.details.SourceEditor::editor = editor;
    }-*/;

    /**
     * @see com.google.gwt.event.logical.shared.HasValueChangeHandlers#addValueChangeHandler(com.google.gwt.event.logical.shared.ValueChangeHandler)
     */
    @Override
    public HandlerRegistration addValueChangeHandler(ValueChangeHandler<String> handler) {
        // TODO: handle value change in SourceEditor
        return null;
    }

    /**
     * @see com.google.gwt.user.client.ui.HasValue#getValue()
     */
    @Override
    public native String getValue() /*-{
        return this.@org.artificer.ui.client.local.pages.details.SourceEditor::editor.getValue();
    }-*/;

    /**
     * Sets the value in the editor.
     *
     * @param value
     */
    public native void setEditorValue(String value) /*-{
		this.@org.artificer.ui.client.local.pages.details.SourceEditor::editor.setValue(value, -1);
    }-*/;

    /**
     * @see com.google.gwt.user.client.ui.HasValue#setValue(java.lang.Object)
     */
    @Override
    public void setValue(String value) {
        setEditorValue(value);
    }

    /**
     * @see com.google.gwt.user.client.ui.HasValue#setValue(java.lang.Object, boolean)
     */
    @Override
    public void setValue(String value, boolean fireEvents) {
    }

    /**
     * Destroys the editor.
     */
    protected native void destroyEditor() /*-{
		this.@org.artificer.ui.client.local.pages.details.SourceEditor::editor.destroy();
    }-*/;

}


text:
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
 *
 * The contents of this file are subject to the Mozilla Public License Version
 * 1.1 (the "License"); you may not use this file except in compliance with
 * the License. You may obtain a copy of the License at
 * http://www.mozilla.org/MPL/
 *
 * Software distributed under the License is distributed on an "AS IS" basis,
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
 * for the specific language governing rights and limitations under the
 * License.
 *
 * The Original Code is JavaScript Engine testing utilities.
 *
 * The Initial Developer of the Original Code is
 * Mozilla Foundation.
 * Portions created by the Initial Developer are Copyright (C) 2007
 * the Initial Developer. All Rights Reserved.
 *
 * Contributor(s):
 *
 * Alternatively, the contents of this file may be used under the terms of
 * either the GNU General Public License Version 2 or later (the "GPL"), or
 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
 * in which case the provisions of the GPL or the LGPL are applicable instead
 * of those above. If you wish to allow use of your version of this file only
 * under the terms of either the GPL or the LGPL, and not to allow others to
 * use your version of this file under the terms of the MPL, indicate your
 * decision by deleting the provisions above and replace them with the notice
 * and other provisions required by the GPL or the LGPL. If you do not delete
 * the provisions above, a recipient may use your version of this file under
 * the terms of any one of the MPL, the GPL or the LGPL.
 *
 * ***** END LICENSE BLOCK ***** */

var gTestfile = 'regress-363040-01.js';
//-----------------------------------------------------------------------------
var BUGNUMBER = 363040;
var summary = 'Array.prototype.reduce, Array.prototype.reduceRight';
var actual = '';
var expect = '';

//-----------------------------------------------------------------------------
test();
//-----------------------------------------------------------------------------

function test()
{
  enterFunc ('test');
  printBugNumber(BUGNUMBER);
  printStatus (summary);

  function f(x,y) { return '(' + x + '+' + y + ')';}

  var testdesc;
  var arr0elms  = [];
  var arr1elms = [1];
  var arr2elms  = [1, 2];

  testdesc = 'Test reduce of empty array without initializer.';
  try
  {
    expect = 'TypeError: reduce of empty array with no initial value';
    arr0elms.reduce(f);
  }
  catch(ex)
  {
    actual = ex + '';
  }
  reportCompare(expect + '', actual + '', testdesc + ' : ' + expect);

  testdesc = 'Test reduceRight of empty array without initializer.';
  try
  {
    expect = 'TypeError: reduce of empty array with no initial value';
    arr0elms.reduceRight(f);
  }
  catch(ex)
  {
    actual = ex + '';
  }
  reportCompare(expect + '', actual + '', testdesc + ' : ' + expect);

  testdesc = 'Test reduce of empty array with initial value.';
  expect = 'a';
  actual = arr0elms.reduce(f, 'a');
  reportCompare(expect + '', actual + '', testdesc + ' : ' + expect);

  testdesc = 'Test reduceRight of empty array with initial value.';
  expect = 'a';
  actual = arr0elms.reduceRight(f, 'a');
  reportCompare(expect + '', actual + '', testdesc +' : ' + expect);

  testdesc = 'Test reduce of 1 element array with no initializer.';
  expect = '1';
  actual = arr1elms.reduce(f);
  reportCompare(expect + '', actual + '', testdesc + ' : ' + expect);

  testdesc = 'Test reduceRight of 1 element array with no initializer.';
  expect = '1';
  actual = arr1elms.reduceRight(f);
  reportCompare(expect + '', actual + '', testdesc + ' : ' + expect);

  testdesc = 'Test reduce of 2 element array with no initializer.';
  expect = '(1+2)';
  actual = arr2elms.reduce(f);
  reportCompare(expect + '', actual + '', testdesc + ' : ' + expect);

  testdesc = 'Test reduce of 2 element array with initializer.';
  expect = '((a+1)+2)';
  actual = arr2elms.reduce(f,'a');
  reportCompare(expect + '', actual + '', testdesc + ' : ' + expect);

  testdesc = 'Test reduceRight of 2 element array with no initializer.';
  expect = '(2+1)';
  actual = arr2elms.reduceRight(f);
  reportCompare(expect + '', actual + '', testdesc + ' : ' + expect);

  testdesc = 'Test reduceRight of 2 element array with no initializer.';
  expect = '((a+2)+1)';
  actual = arr2elms.reduceRight(f,'a');
  reportCompare(expect + '', actual + '', testdesc + ' : ' + expect);

  exitFunc ('test');
}