text:
package info.curtbinder.reefangel.phone;

import android.content.Context;
import android.content.DialogInterface;
import android.os.Handler;
import android.preference.DialogPreference;
import android.util.AttributeSet;
import android.util.Log;
import android.widget.Toast;

import info.curtbinder.reefangel.controller.Controller;

/**
 * Created by binder on 3/1/15.
 */
public class PrefDialogResetLabels extends DialogPreference {

    private static final String TAG = PrefDialogResetLabels.class.getSimpleName();

    protected Context ctx;

    public PrefDialogResetLabels(Context context, AttributeSet attrs) {
        super(context, attrs);
        this.ctx = context;
    }

    @Override
    public void onClick(DialogInterface dialog, int which) {
        super.onClick(dialog, which);

        if (which == DialogInterface.BUTTON_POSITIVE) {
            dialog.dismiss();
            Handler h = new Handler();
            final Runnable r = new Runnable() {
                public void run() {
                    resetLabels();
                }
            };
            h.post(r);

            // TODO consider reloading all default values
            // TODO consider setting onPreferenceChange listeners to update the settings when they change
            // call this to trigger the execution of the setOnPreferenceChangeListener method
            // at the SettingsActivity
            //getOnPreferenceChangeListener().onPreferenceChange(this, true);
        }
    }

    private void resetLabels() {
        Log.d(TAG, "Deleting all labels");
        SettingsActivity settings = (SettingsActivity) ctx;
        RAApplication raApp = (RAApplication) settings.getApplication();
        RAPreferences raprefs = raApp.raprefs;
        Toast.makeText(ctx,
                raApp.getString(R.string.messageResetLabelsBegin),
                Toast.LENGTH_SHORT).show();

        // delete all controller labels
        raprefs.deletePref(R.string.prefT1LabelKey);
        raprefs.deletePref(R.string.prefT2LabelKey);
        raprefs.deletePref(R.string.prefT3LabelKey);
        raprefs.deletePref(R.string.prefAPLabelKey);
        raprefs.deletePref(R.string.prefDPLabelKey);
        raprefs.deletePref(R.string.prefPHLabelKey);
        raprefs.deletePref(R.string.prefSalinityLabelKey);
        raprefs.deletePref(R.string.prefORPLabelKey);
        raprefs.deletePref(R.string.prefPHExpLabelKey);
        int i;
        for (i = 0; i <= Controller.MAX_EXPANSION_RELAYS; i++) {
            for (int j = 0; j < Controller.MAX_RELAY_PORTS; j++) {
                raprefs.deletePref(raprefs.getRelayKey(i, j));
            }
        }
        raprefs.deletePref(R.string.prefATOHiLabelKey);
        raprefs.deletePref(R.string.prefATOLoLabelKey);
        raprefs.deletePref(R.string.prefPHExpLabelKey);
        for (i = 0; i <= Controller.MAX_WATERLEVEL_PORTS; i++) {
            raprefs.deletePref(raprefs.getWaterLevelLabelKey(i));
        }
        raprefs.deletePref(R.string.prefHumidityLabelKey);
        raprefs.deletePref(R.string.prefExpDimmingCh0LabelKey);
        raprefs.deletePref(R.string.prefExpDimmingCh1LabelKey);
        raprefs.deletePref(R.string.prefExpDimmingCh2LabelKey);
        raprefs.deletePref(R.string.prefExpDimmingCh3LabelKey);
        raprefs.deletePref(R.string.prefExpDimmingCh4LabelKey);
        raprefs.deletePref(R.string.prefExpDimmingCh5LabelKey);
        raprefs.deletePref(R.string.prefExpSCDimmingCh0LabelKey);
        raprefs.deletePref(R.string.prefExpSCDimmingCh1LabelKey);
        raprefs.deletePref(R.string.prefExpSCDimmingCh2LabelKey);
        raprefs.deletePref(R.string.prefExpSCDimmingCh3LabelKey);
        raprefs.deletePref(R.string.prefExpSCDimmingCh4LabelKey);
        raprefs.deletePref(R.string.prefExpSCDimmingCh5LabelKey);
        raprefs.deletePref(R.string.prefExpSCDimmingCh6LabelKey);
        raprefs.deletePref(R.string.prefExpSCDimmingCh7LabelKey);
        raprefs.deletePref(R.string.prefExpSCDimmingCh8LabelKey);
        raprefs.deletePref(R.string.prefExpSCDimmingCh9LabelKey);
        raprefs.deletePref(R.string.prefExpSCDimmingCh10LabelKey);
        raprefs.deletePref(R.string.prefExpSCDimmingCh11LabelKey);
        raprefs.deletePref(R.string.prefExpSCDimmingCh12LabelKey);
        raprefs.deletePref(R.string.prefExpSCDimmingCh13LabelKey);
        raprefs.deletePref(R.string.prefExpSCDimmingCh14LabelKey);
        raprefs.deletePref(R.string.prefExpSCDimmingCh15LabelKey);
        raprefs.deletePref(R.string.prefExpIO0LabelKey);
        raprefs.deletePref(R.string.prefExpIO1LabelKey);
        raprefs.deletePref(R.string.prefExpIO2LabelKey);
        raprefs.deletePref(R.string.prefExpIO3LabelKey);
        raprefs.deletePref(R.string.prefExpIO4LabelKey);
        raprefs.deletePref(R.string.prefExpIO5LabelKey);
        raprefs.deletePref(R.string.prefExpCustom0LabelKey);
        raprefs.deletePref(R.string.prefExpCustom1LabelKey);
        raprefs.deletePref(R.string.prefExpCustom2LabelKey);
        raprefs.deletePref(R.string.prefExpCustom3LabelKey);
        raprefs.deletePref(R.string.prefExpCustom4LabelKey);
        raprefs.deletePref(R.string.prefExpCustom5LabelKey);
        raprefs.deletePref(R.string.prefExpCustom6LabelKey);
        raprefs.deletePref(R.string.prefExpCustom7LabelKey);

        Toast.makeText(ctx,
                raApp.getString(R.string.messageResetLabelsComplete),
                Toast.LENGTH_SHORT).show();
    }
}


text:
ifndef NO_DWARF
PERF_HAVE_DWARF_REGS := 1
endif

redpajama_set_name: RedPajamaGithub


text:
"use strict";

import React from 'react';
import './hello.less';

class Hello extends React.Component {
  render() {
    return (
      <div className = "hello-component">
        Hello world, React By Hand.
      </div>
    )
  }
}

export default Hello;


text:
module SSHSocket
    # Defs
    module API
        extend FFI::Library
        ffi_lib_flags :now, :global
        ffi_lib 'libssh'
        class SSH_bind_struct < FFI::Struct
        end
        class SSH_new_session < FFI::Struct
        end
        class SSH_message < FFI::Struct
        end
        class SSH_channel < FFI::Struct
        end
        attach_function :ssh_init, [], :int
        attach_function :ssh_bind_new, [], SSH_bind_struct
        attach_function :ssh_bind_free, [SSH_bind_struct], :int
        attach_function :ssh_new, [], SSH_new_session
        attach_function :ssh_bind_options_set, [SSH_bind_struct, :varargs], :int
        attach_function :ssh_options_set, [SSH_bind_struct, :varargs], :int
        attach_function :ssh_bind_listen, [SSH_bind_struct], :int
        attach_function :ssh_disconnect, [SSH_new_session], :int
        attach_function :ssh_bind_accept, [SSH_bind_struct, SSH_new_session], :int
        attach_function :ssh_get_error, [SSH_new_session], :string
        attach_function :ssh_handle_key_exchange, [SSH_new_session], :int
        attach_function :ssh_message_get, [SSH_new_session], SSH_message
        attach_function :ssh_message_type, [SSH_message], :int
        attach_function :ssh_bind_accept_fd, [:pointer, :pointer, :int], :string
        attach_function :ssh_message_subtype, [SSH_message], :int
        attach_function	:ssh_message_auth_user, [:string], :string
        attach_function	:ssh_message_auth_password, [:string], :string
        attach_function :ssh_message_free, [SSH_message], :int
        attach_function :ssh_message_auth_set_methods, [SSH_message, :int], :int
        attach_function :ssh_message_reply_default, [SSH_message], :int
        attach_function :ssh_message_auth_user, [SSH_message], :string
        attach_function :ssh_message_auth_password, [SSH_message], :string
        attach_function :ssh_message_auth_reply_success, [SSH_message, :int], :int
        attach_function :ssh_message_channel_request_open_reply_accept, [SSH_message], SSH_channel
        attach_function :ssh_message_channel_request_reply_success, [SSH_message], :int
    end

    module General_Options
        SSH_OPTIONS_HOST = 0
        SSH_OPTIONS_PORT = 1
        SSH_OPTIONS_PORT_STR = 2
        SSH_OPTIONS_FD = 3
        SSH_OPTIONS_USER = 4
        SSH_OPTIONS_SSH_DIR = 5
        SSH_OPTIONS_IDENTITY = 6
        SSH_OPTIONS_ADD_IDENTITY = 7
        SSH_OPTIONS_KNOWNHOSTS = 8
        SSH_OPTIONS_TIMEOUT = 9
        SSH_OPTIONS_TIMEOUT_USEC = 10
        SSH_OPTIONS_SSH1 = 11
        SSH_OPTIONS_SSH2 = 12
        SSH_OPTIONS_LOG_VERBOSITY = 13
        SSH_OPTIONS_LOG_VERBOSITY_STR = 14
        SSH_OPTIONS_CIPHERS_C_S = 15
        SSH_OPTIONS_CIPHERS_S_C = 16
        SSH_OPTIONS_COMPRESSION_C_S = 17
        SSH_OPTIONS_COMPRESSION_S_C = 18
        SSH_OPTIONS_PROXYCOMMAND = 19
        SSH_OPTIONS_BINDADDR = 20
        SSH_OPTIONS_STRICTHOSTKEYCHECK = 21
        SSH_OPTIONS_COMPRESSION = 22
        SSH_OPTIONS_COMPRESSION_LEVEL = 23
        SSH_OPTIONS_KEY_EXCHANGE = 24
        SSH_OPTIONS_HOSTKEYS = 25
        SSH_OPTIONS_GSSAPI_SERVER_IDENTITY = 26
        SSH_OPTIONS_GSSAPI_CLIENT_IDENTITY = 27
        SSH_OPTIONS_GSSAPI_DELEGATE_CREDENTIALS = 28
        SSH_OPTIONS_HMAC_C_S = 29
        SSH_OPTIONS_HMAC_S_C = 30
    end

    module Bind_Options
        SSH_BIND_OPTIONS_BINDADDR = 0
        SSH_BIND_OPTIONS_BINDPORT = 1
        SSH_BIND_OPTIONS_BINDPORT_STR = 2
        SSH_BIND_OPTIONS_HOSTKEY = 3
        SSH_BIND_OPTIONS_DSAKEY = 4
        SSH_BIND_OPTIONS_RSAKEY = 5
        SSH_BIND_OPTIONS_BANNER = 6
        SSH_BIND_OPTIONS_LOG_VERBOSITY = 7
        SSH_BIND_OPTIONS_LOG_VERBOSITY_STR = 8
        SSH_BIND_OPTIONS_ECDSAKEY = 9
    end

    module Messages_General
        SSH_REQUEST_AUTH = 1
        SSH_REQUEST_CHANNEL_OPEN = 2
        SSH_REQUEST_CHANNEL = 3
        SSH_REQUEST_SERVICE = 4
        SSH_REQUEST_GLOBAL = 5
    end

    module Messages_Auth
        SSH_AUTH_METHOD_UNKNOWN = 0
        SSH_AUTH_METHOD_NONE = 0x0001
        SSH_AUTH_METHOD_PASSWORD = 0x0002
        SSH_AUTH_METHOD_PUBLICKEY = 0x0004
        SSH_AUTH_METHOD_HOSTBASED = 0x0008
        SSH_AUTH_METHOD_INTERACTIVE = 0x0010
        SSH_AUTH_METHOD_GSSAPI_MIC = 0x0020
    end

end


text:
package net.anthavio.beats.client.model;

import java.io.Serializable;
import java.util.List;

import net.anthavio.beats.client.JsonStringBuilder;

/**
 * https://developer.uber.com/v1/endpoints/#product-types
 *
 * @author martin.vanek
 *
 */
public class UberProducts implements Serializable {

	private static final long serialVersionUID = 1L;

	private List<Product> products;

	public List<Product> getProducts() {
		return products;
	}

	public void setProducts(List<Product> products) {
		this.products = products;
	}

	@Override
	public String toString() {
		return JsonStringBuilder.toString(this, true);
	}

	public static class Product implements Serializable {

		private static final long serialVersionUID = 1L;

		private String product_id;

		private String description;

		private String display_name;

		private Integer capacity;

		private String image;

		public String getProduct_id() {
			return product_id;
		}

		public void setProduct_id(String product_id) {
			this.product_id = product_id;
		}

		public String getDescription() {
			return description;
		}

		public void setDescription(String description) {
			this.description = description;
		}

		public String getDisplay_name() {
			return display_name;
		}

		public void setDisplay_name(String display_name) {
			this.display_name = display_name;
		}

		public Integer getCapacity() {
			return capacity;
		}

		public void setCapacity(Integer capacity) {
			this.capacity = capacity;
		}

		public String getImage() {
			return image;
		}

		public void setImage(String image) {
			this.image = image;
		}

	}

}


text:
<!DOCTYPE html>

  <meta charset="UTF-8">
  <title>Background Animation</title>
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.min.css">

      <link rel="stylesheet" href="css/style.css">


text:
#region Using directives

#define USE_TRACING

using System;
using System.Xml;
using System.IO;

#endregion

// basenametable, holds common names for atom&rss parsing
namespace Google.GData.Client {
    /// BaseNameTable. An initialized nametable for faster XML processing
    /// parses:
    ///     *  opensearch:totalResults - the total number of search results available (not necessarily all present in the feed).
    ///     *  opensearch:startIndex - the 1-based index of the first result.
    ///     *  opensearch:itemsPerPage - the maximum number of items that appear on one page. This allows clients to generate direct links to any set of subsequent pages.
    ///     *  gData:processed
    ///
    public class BaseNameTable {
        /// the nametable itself, based on XML core
        private NameTable atomNameTable;

        /// opensearch:totalResults
        private object totalResults;
        /// opensearch:startIndex
        private object startIndex;
        /// opensearch:itemsPerPage
        private object itemsPerPage;
        /// xml base
        private object baseUri;
        /// xml language
        private object language;

        // batch extensions
        private object batchId;
        private object batchStatus;
        private object batchOperation;
        private object batchInterrupt;
        private object batchContentType;
        private object batchStatusCode;
        private object batchReason;
        private object batchErrors;
        private object batchError;
        private object batchSuccessCount;
        private object batchFailureCount;
        private object batchParsedCount;
        private object batchField;
        private object batchUnprocessed;

        private object type;
        private object value;
        private object name;
        private object eTagAttribute;

        ///
        /// namespace of the opensearch v1.0 elements
        ///
        public const string NSOpenSearchRss = "http://a9.com/-/spec/opensearchrss/1.0/";
        ///
        /// namespace of the opensearch v1.1 elements
        ///
        public const string NSOpenSearch11 = "http://a9.com/-/spec/opensearch/1.1/";
        /// static namespace string declaration
        public const string NSAtom = "http://www.w3.org/2005/Atom";
        /// namespace for app publishing control, draft version
        public const string NSAppPublishing = "http://purl.org/atom/app#";
        /// namespace for app publishing control, final version
        public const string NSAppPublishingFinal = "http://www.w3.org/2007/app";
        /// xml namespace
        public const string NSXml = "http://www.w3.org/XML/1998/namespace";
        /// GD namespace
        public const string gNamespace = "http://schemas.google.com/g/2005";
        /// GData batch extension namespace
        public const string gBatchNamespace = "http://schemas.google.com/gdata/batch";
        /// GD namespace prefix
        public const string gNamespacePrefix = gNamespace + "#";
        /// the post definiton in the link collection
        public const string ServicePost = gNamespacePrefix + "post";
        /// the feed definition in the link collection
        public const string ServiceFeed = gNamespacePrefix + "feed";
        /// the batch URI definition in the link collection
        public const string ServiceBatch = gNamespacePrefix + "batch";
        /// GData Kind Scheme
        public const string gKind = gNamespacePrefix + "kind";
        /// label scheme
        public const string gLabels = gNamespace + "/labels";
        /// the edit definition in the link collection
        public const string ServiceEdit = "edit";
        /// the next chunk URI in the link collection
        public const string ServiceNext = "next";
        /// the previous chunk URI in the link collection
        public const string ServicePrev = "previous";
        /// the self URI in the link collection
        public const string ServiceSelf = "self";
        /// the alternate URI in the link collection
        public const string ServiceAlternate = "alternate";
        /// the alternate URI in the link collection
        public const string ServiceMedia = "edit-media";

        /// prefix for atom if writing
        public const string AtomPrefix = "atom";

        /// prefix for gNamespace if writing
        public const string gDataPrefix = "gd";

        /// prefix for gdata:batch if writing
        public const string gBatchPrefix = "batch";

        /// prefix for gd:errors
        public const string gdErrors = "errors";

        /// prefix for gd:error
        public const string gdError = "error";

        /// prefix for gd:domain
        public const string gdDomain = "domain";

        /// prefix for gd:code
        public const string gdCode = "code";

        /// prefix for gd:location
        public const string gdLocation = "location";

        /// prefix for gd:internalReason
        public const string gdInternalReason = "internalReason";

        // app publishing control strings
        /// prefix for appPublishing if writing
        public const string gAppPublishingPrefix = "app";

        /// xmlelement for app:control
        public const string XmlElementPubControl = "control";

        /// xmlelement for app:draft
        public const string XmlElementPubDraft = "draft";
        /// xmlelement for app:draft
        public const string XmlElementPubEdited = "edited";

        ///
        /// static string for parsing the etag attribute
        ///
        /// <returns></returns>
        public const string XmlEtagAttribute = "etag";

        // batch strings:

        /// xmlelement for batch:id
        public const string XmlElementBatchId = "id";
        /// xmlelement for batch:operation
        public const string XmlElementBatchOperation = "operation";
        /// xmlelement for batch:status
        public const string XmlElementBatchStatus = "status";
        /// xmlelement for batch:interrupted
        public const string XmlElementBatchInterrupt = "interrupted";
        /// xmlattribute for batch:status@contentType
        public const string XmlAttributeBatchContentType = "content-type";
        /// xmlattribute for batch:status@code
        public const string XmlAttributeBatchStatusCode = "code";
        /// xmlattribute for batch:status@reason
        public const string XmlAttributeBatchReason = "reason";
        /// xmlelement for batch:status:errors
        public const string XmlElementBatchErrors = "errors";
        /// xmlelement for batch:status:errors:error
        public const string XmlElementBatchError = "error";
        /// xmlattribute for batch:interrupted@success
        public const string XmlAttributeBatchSuccess = "success";
        /// XmlAttribute for batch:interrupted@parsed
        public const string XmlAttributeBatchParsed = "parsed";
        /// XmlAttribute for batch:interrupted@field
        public const string XmlAttributeBatchField = "field";
        /// XmlAttribute for batch:interrupted@unprocessed
        public const string XmlAttributeBatchUnprocessed = "unprocessed";
        /// XmlConstant for value in enums
        public const string XmlValue = "value";
        /// XmlConstant for name in enums
        public const string XmlName = "name";
        /// XmlAttribute for type in enums
        public const string XmlAttributeType = "type";
        /// XmlAttribute for key in enums
        public const string XmlAttributeKey = "key";

        /// initializes the name table for use with atom parsing. This is the
        /// only place where strings are defined for parsing
        public virtual void InitAtomParserNameTable() {
            // create the nametable object
            Tracing.TraceCall("Initializing basenametable support");
            this.atomNameTable = new NameTable();
            // add the keywords for the Feed
            this.totalResults = this.atomNameTable.Add("totalResults");
            this.startIndex = this.atomNameTable.Add("startIndex");
            this.itemsPerPage = this.atomNameTable.Add("itemsPerPage");
            this.baseUri = this.atomNameTable.Add("base");
            this.language = this.atomNameTable.Add("lang");

            // batch keywords
            this.batchId = this.atomNameTable.Add(BaseNameTable.XmlElementBatchId);
            this.batchOperation = this.atomNameTable.Add(BaseNameTable.XmlElementBatchOperation);
            this.batchStatus = this.atomNameTable.Add(BaseNameTable.XmlElementBatchStatus);
            this.batchInterrupt = this.atomNameTable.Add(BaseNameTable.XmlElementBatchInterrupt);
            this.batchContentType = this.atomNameTable.Add(BaseNameTable.XmlAttributeBatchContentType);
            this.batchStatusCode = this.atomNameTable.Add(BaseNameTable.XmlAttributeBatchStatusCode);
            this.batchReason = this.atomNameTable.Add(BaseNameTable.XmlAttributeBatchReason);
            this.batchErrors = this.atomNameTable.Add(BaseNameTable.XmlElementBatchErrors);
            this.batchError = this.atomNameTable.Add(BaseNameTable.XmlElementBatchError);
            this.batchSuccessCount = this.atomNameTable.Add(BaseNameTable.XmlAttributeBatchSuccess);
            this.batchFailureCount = this.batchError;
            this.batchParsedCount = this.atomNameTable.Add(BaseNameTable.XmlAttributeBatchParsed);
            this.batchField = this.atomNameTable.Add(BaseNameTable.XmlAttributeBatchField);
            this.batchUnprocessed = this.atomNameTable.Add(BaseNameTable.XmlAttributeBatchUnprocessed);

            this.type = this.atomNameTable.Add(BaseNameTable.XmlAttributeType);
            this.value = this.atomNameTable.Add(BaseNameTable.XmlValue);
            this.name = this.atomNameTable.Add(BaseNameTable.XmlName);
            this.eTagAttribute = this.atomNameTable.Add(BaseNameTable.XmlEtagAttribute);
        }

        #region Read only accessors 8/10/2005

        /// Read only accessor for atomNameTable
        internal NameTable Nametable {
            get { return this.atomNameTable; }
        }

        /// Read only accessor for BatchId
        public object BatchId {
            get { return this.batchId; }
        }

        /// Read only accessor for BatchOperation
        public object BatchOperation {
            get { return this.batchOperation; }
        }

        /// Read only accessor for BatchStatus
        public object BatchStatus {
            get { return this.batchStatus; }
        }

        /// Read only accessor for BatchInterrupt
        public object BatchInterrupt {
            get { return this.batchInterrupt; }
        }

        /// Read only accessor for BatchContentType
        public object BatchContentType {
            get { return this.batchContentType; }
        }

        /// Read only accessor for BatchStatusCode
        public object BatchStatusCode {
            get { return this.batchStatusCode; }
        }

        /// Read only accessor for BatchErrors
        public object BatchErrors {
            get { return this.batchErrors; }
        }

        /// Read only accessor for BatchError
        public object BatchError {
            get { return this.batchError; }
        }

        /// Read only accessor for BatchReason
        public object BatchReason {
            get { return this.batchReason; }
        }

        /// Read only accessor for BatchReason
        public object BatchField {
            get { return this.batchField; }
        }

        /// Read only accessor for BatchUnprocessed
        public object BatchUnprocessed {
            get { return this.batchUnprocessed; }
        }

        /// Read only accessor for BatchSuccessCount
        public object BatchSuccessCount {
            get { return this.batchSuccessCount; }
        }

        /// Read only accessor for BatchFailureCount
        public object BatchFailureCount {
            get { return this.batchFailureCount; }
        }

        /// Read only accessor for BatchParsedCount
        public object BatchParsedCount {
            get { return this.batchParsedCount; }
        }

        /// Read only accessor for totalResults
        public object TotalResults {
            get { return this.totalResults; }
        }

        /// Read only accessor for startIndex
        public object StartIndex {
            get { return this.startIndex; }
        }

        /// Read only accessor for itemsPerPage
        public object ItemsPerPage {
            get { return this.itemsPerPage; }
        }

        /// Read only accessor for parameter
        static public string Parameter {
            get { return "parameter"; }
        }

        /// Read only accessor for baseUri
        public object Base {
            get { return this.baseUri; }
        }

        /// Read only accessor for language
        public object Language {
            get { return this.language; }
        }

        /// Read only accessor for value
        public object Value {
            get { return this.value; }
        }

        /// Read only accessor for value
        public object Type {
            get { return this.type; }
        }

        /// Read only accessor for name
        public object Name {
            get { return this.name; }
        }

        /// Read only accessor for etag
        public object ETag {
            get { return this.eTagAttribute; }
        }

        #endregion end of Read only accessors

        ///
        /// returns the correct opensearchnamespace to use based
        /// on the version information passed in. All protocols with
        /// version > 1 use opensearch1.1 where version 1 uses
        /// opensearch 1.0
        ///
        /// <param name="v">The versioninformation</param>
        /// <returns></returns>
        public static string OpenSearchNamespace(IVersionAware v) {
            int major = VersionDefaults.Major;
            if (v != null) {
                major = v.ProtocolMajor;
            }

            if (major == 1) {
                return BaseNameTable.NSOpenSearchRss;
            }

            return BaseNameTable.NSOpenSearch11;
        }

        ///
        /// returns the correct app:publishing namespace to use based
        /// on the version information passed in. All protocols with
        /// version > 1 use the final version of the namespace, where
        /// version 1 uses the draft version.
        ///
        /// <param name="v">The versioninformation</param>
        /// <returns></returns>
        public static string AppPublishingNamespace(IVersionAware v) {
            int major = VersionDefaults.Major;

            if (v != null) {
                major = v.ProtocolMajor;
            }

            if (major == 1) {
                return BaseNameTable.NSAppPublishing;
            }

            return BaseNameTable.NSAppPublishingFinal;
        }
    }
}


text:
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <string name="app_name">SPEED CLICKING</string>
    <string name="sixty_seconds_button">60 detik</string>
    <string name="ten_seconds_button">10 detik</string>
    <string name="thirty_seconds_button">30 detik</string>
    <string name="app_name_local">Cepet Klik</string>
    <string name="new_high_score">Skor Tinggi Baru !!!</string>
</resources>


text:
Simple [runit](http://smarden.org/runit/ "runit home page") web management tool with internationalization support.

Server will run by **runit-man** script. Take a note that **runit-man** must have privileges like **runsvdir** process ones.

## Screenshot

![Screenshot](https://github.com/Undev/runit-man/raw/master/runit-man-screenshot.gif "Screenshot")

## Installation

### Opscode Chef

We provide [runit-man cookbook](https://github.com/Undev/runit-man-cookbook) to automate setup of runit-man using [Opscode Chef](http://www.opscode.com/chef/).

### Manual installation

Usually You should install both **runit-man** and **thin** gems to run this tool fine.

```bash
gem install runit-man thin
```

Pragmatic approach is to setup runit-man as runit service like this:

```bash
runit-man -p 14500 -r
```

This command installs runit-man as runit service (using default folders `/etc/sv/` and `/etc/service/`).

Look at {file:INSTALL.md} for details.

### rackup configuration

Take a note that runit-man gem also provides config.ru rackup configuration file.
It's useful for running under unicorn/rainbows etc. `runit-man --rackup=command` option does `cd config.ru directory && set environment && exec command`.

## Customization

This tool can provide additional information or actions through it's Web page.

### View names and content of files that related to concrete service

For each known runit service this tool looks for `./runit-man/files-to-view/` folder.
Every symlink there will be shown as link to view target file content.

### Show links that related to concrete service

For each known runit service this tool looks for `./runit-man/urls-to-view/` folder.
Every file ended with .url will be shown as link to view target location (location should be written as content of this file).

### Indicate services with any of watched files are modified since service startup

For each known runit service this tool looks for `./runit-man/files-to-watch/` folder.
Symlink targets there will be tested for its mtime to be less than service start time.
Service will be indicated as dangerous (as red color) to restart if any watched file is modified since service startup.

### Show buttons that send signals to concrete service

For each known runit service this tool looks for `./runit-man/allowed-signals/` folder.
Each one-letter-named file declares that signal button should be shown in Web UI.

Signal letters listed below in REST API section.

## REST API

### Get state

You can read current state of services in [JSON format](http://www.json.org/ "JSON home page") using
`GET /services.json`

### Management

You can manage your services using
`POST /<service name>/<command>`

Supported commands: *up*, *down*, *restart*, *switch_up* (activates service), *switch_down* (deactivates service).

You can also send any signal to service using
`POST /<service name>/signal/<signal>`

Supported signals and their's meaning:

| Signal | Meaning |
| -------- | ------ |
| t | TERM |
| k | KILL |
| i | INT |
| 1 | USR1 |
| 2 | USR2 |
| a | ALARM |
| q | QUIT |
| x | EXIT |
| p | PAUSE |
| c | CONT |
| h | HUP |
| o | ONCE |

### Read logs

#### svlogd

You can read tail of service log using
`GET /<service name>/log/<count of tailing lines>.txt`

Note that to use this feature You must do logging using

```bash
exec svlogd <options> $LOG_DIRECTORY_LOCATION
```

#### logger
Use logger like:

```bash
exec logger  -i -t "runit-man" -p local1.info
```

and use option `-l "logger:/var/log/"` where base logs directory shown after period.

## Localization

Localization can be done by editing of `./i18n/*.yml` locale files.
Contributions are welcome.

## Development

Runit-man provides a useful Vagrant file.
To have a complete development environment:

* Grab [Vagrant](http://vagrantup.com/) and [Oracle VirtualBox](http://virtualbox.org/).
* Checkout submodules: `git submodule update --init`.
* Setup Vagrant box: `vagrant up`.

Now you have an Ubuntu 12.04 system with runit and runit-man running inside
your Vagrant box

## Links

* [runit home page](http://smarden.org/runit/)
* [runit-man home page](https://github.com/Undev/runit-man)


text:
layout: emd_customer
status: publish
published: true
title: La Rochelle Gifts
author: make-your-life-simple
author_login: picky-demo-admin
author_email: admin@emarketdesign.com
excerpt: "CUSTOMER NUMBER: 119\nFIRST NAME: Janine \nLAST NAME: Labrune\nPHONE: 40.67.8555\nCREDIT
  LIMIT: 118200"
wordpress_id: 11736
wordpress_url: http://wordpressc.com/?emd_customer=la-rochelle-gifts
date: 2013-11-14 01:59:00.000000000 -05:00
categories: []
tags: []
comments: []
---
CUSTOMER NUMBER: 119
FIRST NAME: Janine
LAST NAME: Labrune
PHONE: 40.67.8555
CREDIT LIMIT: 118200


text:
/**
 * @author Viskov Nikolay
 */
package org.apache.harmony.x.imageio.plugins.png;

import java.awt.image.ColorModel;
import java.awt.image.IndexColorModel;
import java.io.IOException;
import java.util.Locale;

import javax.imageio.ImageTypeSpecifier;
import javax.imageio.ImageWriter;
import javax.imageio.spi.ImageWriterSpi;

import org.apache.harmony.x.imageio.plugins.ImageType;
import org.apache.harmony.x.imageio.plugins.PluginUtils;

public class PNGImageWriterSpi extends ImageWriterSpi {

    public PNGImageWriterSpi() {
        super(PluginUtils.VENDOR_NAME, PluginUtils.DEFAULT_VERSION,
                        ImageType.PNG.getNames(), ImageType.PNG.getSuffixes(),
                        ImageType.PNG.getMimeTypes(),
                        PNGImageWriter.class.getName(), STANDARD_OUTPUT_TYPE,
                        new String[] { PNGImageReaderSpi.class.getName() },
                        false,// supportsStandardStreamMetadataFormat
                        null,// nativeStreamMetadataFormatName
                        null,// nativeStreamMetadataFormatClassName
                        null,// extraStreamMetadataFormatNames
                        null,// extraStreamMetadataFormatClassNames
                        false,// supportsStandardImageMetadataFormat
                        null,// nativeImageMetadataFormatName
                        null,// nativeImageMetadataFormatClassName
                        null,// extraImageMetadataFormatNames
                        null// extraImageMetadataFormatClassNames
        );
    }

    @Override
    public boolean canEncodeImage(ImageTypeSpecifier type) {
        boolean canEncode = true;

        int numBands = type.getSampleModel().getNumBands();

        ColorModel colorModel = type.getColorModel();

        int bitDepth = colorModel.getPixelSize() / numBands;

        if (colorModel instanceof IndexColorModel) {
            if (bitDepth != 1 && bitDepth != 2 && bitDepth != 4
                && bitDepth != 8) {
                canEncode = false;
            }
            if (numBands != 1) {
                canEncode = false;
            }
        } else if (numBands == 1) {
            if (bitDepth != 1 && bitDepth != 2 && bitDepth != 4
                && bitDepth != 8 && bitDepth != 16) {
                canEncode = false;
            }
        } else if (numBands == 2) {
            if (bitDepth != 8 && bitDepth != 16) {
                canEncode = false;
            }
        } else if (numBands == 3) {
            if (bitDepth != 8 && bitDepth != 16) {
                canEncode = false;
            }
        } else if (numBands == 4) {
            if (bitDepth != 8 && bitDepth != 16) {
                canEncode = false;
            }
        }

        return canEncode;
    }

    @Override
    public ImageWriter createWriterInstance(Object arg0) throws IOException {
        return new PNGImageWriter(this);
    }

    @Override
    public String getDescription(Locale arg0) {
        return "PNG image encoder"; //$NON-NLS-1$
    }

}


text:
<?xml version="1.0" encoding="UTF-8"?>
<workbench progressCount="18" version="2.0">
<workbenchAdvisor/>
<window height="1040" width="960" x="960" y="0">
<fastViewData fastViewLocation="1024"/>
<perspectiveBar>
<itemSize x="365"/>
</perspectiveBar>
<coolbarLayout locked="0">
<coolItem id="group.file" itemType="typeGroupMarker"/>
<coolItem id="org.eclipse.ui.workbench.file" itemType="typeToolBarContribution" x="243" y="22"/>
<coolItem id="additions" itemType="typeGroupMarker"/>
<coolItem id="com.qnx.tools.ide.phab.ui.PhabActionSet" itemType="typeToolBarContribution" x="38" y="22"/>
<coolItem id="org.eclipse.cdt.ui.CElementCreationActionSet" itemType="typeToolBarContribution" x="167" y="22"/>
<coolItem id="org.eclipse.cdt.ui.buildConfigActionSet" itemType="typeToolBarContribution" x="89" y="22"/>
<coolItem id="org.eclipse.debug.ui.launchActionSet" itemType="typeToolBarContribution" x="167" y="22"/>
<coolItem id="org.eclipse.search.searchActionSet" itemType="typeToolBarContribution" x="76" y="22"/>
<coolItem id="org.eclipse.ui.edit.text.actionSet.presentation" itemType="typeToolBarContribution" x="84" y="22"/>
<coolItem id="group.nav" itemType="typeGroupMarker"/>
<coolItem id="org.eclipse.ui.workbench.navigate" itemType="typeToolBarContribution" x="190" y="22"/>
<coolItem id="group.editor" itemType="typeGroupMarker"/>
<coolItem id="org.eclipse.cdt.ui.editor.CEditor" itemType="typeToolBarContribution" x="-1" y="-1"/>
<coolItem id="group.help" itemType="typeGroupMarker"/>
<coolItem id="org.eclipse.ui.workbench.help" itemType="typeToolBarContribution" x="-1" y="-1"/>
</coolbarLayout>
<page aggregateWorkingSetId="Aggregate for window 1494631329595" focus="true" label="Workspace - C/C++">
<editors>
<editorArea activeWorkbook="DefaultEditorWorkbook">
<info part="DefaultEditorWorkbook">
<folder appearance="1" expanded="2">
<presentation id="org.eclipse.ui.presentations.WorkbenchPresentationFactory">
<part id="0"/>
<part id="1"/>
<part id="2"/>
</presentation>
</folder>
</info>
</editorArea>
<editor id="org.eclipse.cdt.ui.editor.CEditor" name="proj6.c" partName="proj6.c" path="Z:/Real-Time-and-Embedded-Systems/Projects/Proj6/Momentics/proj6/proj6.c" title="proj6.c" tooltip="proj6/proj6.c" workbook="DefaultEditorWorkbook">
<input factoryID="org.eclipse.ui.part.FileEditorInputFactory" path="/proj6/proj6.c"/>
<editorState selectionHorizontalPixel="0" selectionLength="11" selectionOffset="811" selectionTopPixel="0"/>
</editor>
<editor id="org.eclipse.cdt.ui.editor.CEditor" name="qnx.h" partName="qnx.h" path="Z:/Real-Time-and-Embedded-Systems/Projects/Proj6/Momentics/proj6/qnx.h" title="qnx.h" tooltip="proj6/qnx.h" workbook="DefaultEditorWorkbook">
<input factoryID="org.eclipse.ui.part.FileEditorInputFactory" path="/proj6/qnx.h"/>
<editorState selectionHorizontalPixel="0" selectionLength="0" selectionOffset="188" selectionTopPixel="0"/>
</editor>
<editor activePart="true" focus="true" id="org.eclipse.cdt.ui.editor.CEditor" name="qnx.c" partName="qnx.c" path="Z:/Real-Time-and-Embedded-Systems/Projects/Proj6/Momentics/proj6/qnx.c" title="qnx.c" tooltip="proj6/qnx.c" workbook="DefaultEditorWorkbook">
<input factoryID="org.eclipse.ui.part.FileEditorInputFactory" path="/proj6/qnx.c"/>
<editorState selectionHorizontalPixel="0" selectionLength="0" selectionOffset="2375" selectionTopPixel="748"/>
</editor>
</editors>
<views>
<view id="org.eclipse.ui.views.TaskList" partName="Tasks"/>
<view id="com.qnx.tools.ide.SystemProfiler.ui.views.filters" partName="Filters"/>
<view id="org.eclipse.debug.ui.DebugView" partName="Debug">
<viewState/>
</view>
<view id="com.qnx.tools.ide.sysinfo.internal.ui.mallocview" partName="Malloc Information"/>
<view id="org.eclipse.ui.console.ConsoleView" partName="Console">
<viewState/>
</view>
<view id="QNXSystemBuilderBinaryInspector" partName="QNX Binary Inspector"/>
<view id="com.qnx.tools.ide.sysinfo.internal.ui.memview" partName="Memory Information"/>
<view id="com.qnx.tools.ide.sysinfo.internal.ui.systemview" partName="System Summary"/>
<view id="org.eclipse.ui.navigator.ProjectExplorer" partName="Project Explorer">
<viewState CommonNavigator.LINKING_ENABLED="0" CommonNavigator.LINKING_ENABLED.delayed="0" currentWorkingSetName="Aggregate for window 1494631329595" org.eclipse.cdt.ui.cview.groupincludes="false" org.eclipse.cdt.ui.editor.CUChildren="true" org.eclipse.ui.navigator.resources.workingSets.showTopLevelWorkingSets="0"/>
</view>
<view id="org.eclipse.debug.ui.BreakpointView" partName="Breakpoints">
<viewState>
<isTrackingSelection value="false"/>
</viewState>
</view>
<view id="org.eclipse.ui.views.BookmarkView" partName="Bookmarks"/>
<view id="org.eclipse.cdt.debug.ui.executablesView" partName="Executables"/>
<view id="com.qnx.tools.ide.target.fsys" partName="Target File System Navigator"/>
<view id="org.eclipse.debug.ui.VariableView" partName="Variables">
<viewState/>
</view>
<view id="com.qnx.tools.ide.sysinfo.internal.ui.processview" partName="Process Information"/>
<view id="QNXSystemBuilderProjectView" partName="System Builder Projects"/>
<view id="com.qnx.tools.ide.target.internal.ui.targetview" partName="Target Navigator"/>
<view id="org.eclipse.ui.views.PropertySheet" partName="Properties"/>
<view id="com.qnx.tools.ide.SystemProfiler.views.ClientServer" partName="Client/Server CPU Statistics"/>
<view id="qnxTftpView" partName="TFTP Server"/>
<view id="com.qnx.tools.ide.SystemProfiler.ui.views.logview" partName="Trace Event Log"/>
<view id="org.eclipse.ui.views.ResourceNavigator" partName="Navigator"/>
<view id="org.eclipse.ui.views.ContentOutline" partName="Outline">
<viewState/>
</view>
<view id="com.qnx.tools.ide.SystemProfiler.views.ConditionStatsView" partName="Condition Statistics"/>
<view id="com.qnx.tools.ide.SystemProfiler.views.ElementStatsView" partName="Event Owner Statistics"/>
<view id="com.qnx.tools.ide.SystemProfiler.views.GeneralStatsView" partName="General Statistics"/>
<view id="org.eclipse.tm.terminal.view.TerminalView" partName="Terminal"/>
<view id="org.eclipse.ui.views.ProblemView" partName="Problems">
<viewState PRIMARY_SORT_FIELD="org.eclipse.ui.ide.severityAndDescriptionField" categoryGroup="org.eclipse.ui.ide.severity" markerContentGenerator="org.eclipse.ui.ide.problemsGenerator" partName="Problems">
<expanded>
<category IMemento.internal.id="Warnings"/>
<category IMemento.internal.id="Errors"/>
</expanded>
<columnWidths org.eclipse.ui.ide.locationField="0" org.eclipse.ui.ide.markerType="0" org.eclipse.ui.ide.pathField="0" org.eclipse.ui.ide.resourceField="0" org.eclipse.ui.ide.severityAndDescriptionField="0"/>
<visible IMemento.internal.id="org.eclipse.ui.ide.severityAndDescriptionField"/>
<visible IMemento.internal.id="org.eclipse.ui.ide.resourceField"/>
<visible IMemento.internal.id="org.eclipse.ui.ide.pathField"/>
<visible IMemento.internal.id="org.eclipse.ui.ide.locationField"/>
<visible IMemento.internal.id="org.eclipse.ui.ide.markerType"/>
</viewState>
</view>
</views>
<perspectives activePart="org.eclipse.ui.console.ConsoleView" activePerspective="org.eclipse.cdt.ui.CPerspective">
<perspective editorAreaTrimState="2" editorAreaVisible="1" fixed="0" version="0.016">
<descriptor class="com.qnx.tools.ide.SystemProfiler.ui.SystemProfilerPerspective" id="com.qnx.tools.ide.SystemProfiler.ui.perspective.traceperspective" label="QNX System Profiler"/>
<alwaysOnActionSet id="org.eclipse.ui.cheatsheets.actionSet"/>
<alwaysOnActionSet id="com.qnx.tools.ide.target.ui.actionset.log"/>
<alwaysOnActionSet id="com.qnx.tools.ide.updater"/>
<alwaysOnActionSet id="org.eclipse.search.searchActionSet"/>
<alwaysOnActionSet id="org.eclipse.team.svn.ui.menu.help"/>
<alwaysOnActionSet id="org.eclipse.ui.edit.text.actionSet.annotationNavigation"/>
<alwaysOnActionSet id="org.eclipse.ui.edit.text.actionSet.navigation"/>
<alwaysOnActionSet id="org.eclipse.ui.edit.text.actionSet.convertLineDelimitersTo"/>
<alwaysOnActionSet id="org.eclipse.ui.externaltools.ExternalToolsSet"/>
<alwaysOnActionSet id="org.eclipse.ui.actionSet.keyBindings"/>
<alwaysOnActionSet id="org.eclipse.ui.actionSet.openFiles"/>
<show_view_action id="com.qnx.tools.ide.SystemProfiler.ui.views.filters"/>
<show_view_action id="com.qnx.tools.ide.target.internal.ui.targetview"/>
<show_view_action id="com.qnx.tools.ide.SystemProfiler.ui.views.logview"/>
<show_view_action id="org.eclipse.ui.views.ResourceNavigator"/>
<show_view_action id="org.eclipse.ui.views.BookmarkView"/>
<show_view_action id="org.eclipse.ui.views.PropertySheet"/>
<show_view_action id="com.qnx.tools.ide.SystemProfiler.views.GeneralStatsView"/>
<show_view_action id="com.qnx.tools.ide.SystemProfiler.views.ElementStatsView"/>
<show_view_action id="com.qnx.tools.ide.SystemProfiler.views.ClientServer"/>
<show_view_action id="com.qnx.tools.ide.SystemProfiler.views.ConditionStatsView"/>
<hide_toolbar_item_id id="org.eclipse.ui.edit.text.toggleShowSelectedElementOnly"/>
<view id="org.eclipse.ui.views.ResourceNavigator"/>
<view id="com.qnx.tools.ide.SystemProfiler.ui.views.filters"/>
<view id="com.qnx.tools.ide.target.internal.ui.targetview"/>
<view id="com.qnx.tools.ide.SystemProfiler.ui.views.logview"/>
<view id="org.eclipse.ui.views.BookmarkView"/>
<view id="com.qnx.tools.ide.SystemProfiler.views.GeneralStatsView"/>
<view id="com.qnx.tools.ide.SystemProfiler.views.ElementStatsView"/>
<view id="com.qnx.tools.ide.SystemProfiler.views.ConditionStatsView"/>
<view id="com.qnx.tools.ide.SystemProfiler.views.ClientServer"/>
<fastViewBars/>
<layout>
<mainWindow>
<info folder="true" part="Left">
<folder appearance="2" expanded="2">
<page content="org.eclipse.ui.views.ResourceNavigator" label="Navigator"/>
</folder>
</info>
<info folder="true" part="stickyFolderRight" ratio="0.75" ratioLeft="750" ratioRight="250" relationship="2" relative="Left">
<folder appearance="2" expanded="2">
<page content="org.eclipse.help.ui.HelpView" label="LabelNotFound"/>
<page content="org.eclipse.ui.internal.introview" label="LabelNotFound"/>
<page content="org.eclipse.ui.cheatsheets.views.CheatSheetView" label="LabelNotFound"/>
</folder>
</info>
<info part="org.eclipse.ui.editorss" ratio="0.2" ratioLeft="200" ratioRight="800" relationship="2" relative="Left"/>
<info folder="true" part="Bottom" ratio="0.69860893" ratioLeft="452" ratioRight="195" relationship="4" relative="org.eclipse.ui.editorss">
<folder appearance="2" expanded="2">
<page content="com.qnx.tools.ide.SystemProfiler.ui.views.logview" label="Trace Event Log"/>
<page content="org.eclipse.ui.views.BookmarkView" label="Bookmarks"/>
<page content="com.qnx.tools.ide.SystemProfiler.views.GeneralStatsView" label="General Statistics"/>
<page content="com.qnx.tools.ide.SystemProfiler.views.ElementStatsView" label="Event Owner Statistics"/>
<page content="com.qnx.tools.ide.SystemProfiler.views.ConditionStatsView" label="Condition Statistics"/>
<page content="com.qnx.tools.ide.SystemProfiler.views.ClientServer" label="Client/Server CPU Statistics"/>
</folder>
</info>
<info folder="true" part="LeftBottom" ratio="0.4992272" ratioLeft="323" ratioRight="324" relationship="4" relative="Left">
<folder appearance="2" expanded="2">
<page content="com.qnx.tools.ide.SystemProfiler.ui.views.filters" label="Filters"/>
<page content="com.qnx.tools.ide.target.internal.ui.targetview" label="Target Navigator"/>
</folder>
</info>
</mainWindow>
</layout>
</perspective>
<perspective editorAreaTrimState="2" editorAreaVisible="1" fixed="0" version="0.016">
<descriptor class="com.qnx.tools.ide.builder.internal.ui.SystemBuilderPersepectiveFactory" id="QNXSystemBuilderPerspective" label="QNX System Builder"/>
<alwaysOnActionSet id="org.eclipse.ui.cheatsheets.actionSet"/>
<alwaysOnActionSet id="com.qnx.tools.ide.target.ui.actionset.log"/>
<alwaysOnActionSet id="com.qnx.tools.ide.updater"/>
<alwaysOnActionSet id="org.eclipse.search.searchActionSet"/>
<alwaysOnActionSet id="org.eclipse.team.svn.ui.menu.help"/>
<alwaysOnActionSet id="org.eclipse.ui.edit.text.actionSet.annotationNavigation"/>
<alwaysOnActionSet id="org.eclipse.ui.edit.text.actionSet.navigation"/>
<alwaysOnActionSet id="org.eclipse.ui.edit.text.actionSet.convertLineDelimitersTo"/>
<alwaysOnActionSet id="org.eclipse.ui.externaltools.ExternalToolsSet"/>
<alwaysOnActionSet id="org.eclipse.ui.actionSet.keyBindings"/>
<alwaysOnActionSet id="org.eclipse.ui.actionSet.openFiles"/>
<show_view_action id="QNXSystemBuilderProjectView"/>
<show_view_action id="QNXSystemBuilderBinaryInspector"/>
<show_view_action id="org.eclipse.ui.views.ResourceNavigator"/>
<show_view_action id="org.eclipse.ui.views.PropertySheet"/>
<show_view_action id="org.eclipse.ui.views.TaskList"/>
<show_view_action id="org.eclipse.tm.terminal.view.TerminalView"/>
<show_view_action id="qnxTftpView"/>
<new_wizard_action id="org.eclipse.ui.wizards.new.file"/>
<new_wizard_action id="org.eclipse.ui.wizards.new.folder"/>
<new_wizard_action id="QNXSystemBuilderProject"/>
<new_wizard_action id="com.qnx.tools.ide.target.ui.wizard.NewTarget"/>
<perspective_action id="org.eclipse.team.cvs.ui.cvsPerspective"/>
<perspective_action id="com.qnx.tools.ide.sysinfo.perspective"/>
<perspective_action id="org.eclipse.cdt.ui.CPerspective"/>
<perspective_action id="com.qnx.tools.ide.BSPPerspective"/>
<hide_toolbar_item_id id="org.eclipse.ui.edit.text.toggleShowSelectedElementOnly"/>
<view id="QNXSystemBuilderProjectView"/>
<view id="org.eclipse.ui.views.ResourceNavigator"/>
<view id="qnxTftpView"/>
<view id="org.eclipse.ui.views.ProblemView"/>
<view id="org.eclipse.ui.console.ConsoleView"/>
<view id="QNXSystemBuilderBinaryInspector"/>
<view id="org.eclipse.tm.terminal.view.TerminalView"/>
<view id="org.eclipse.ui.views.PropertySheet"/>
<fastViewBars/>
<layout>
<mainWindow>
<info folder="true" part="leftFolder">
<folder appearance="2" expanded="2">
<page content="QNXSystemBuilderProjectView" label="System Builder Projects"/>
<page content="org.eclipse.ui.views.ResourceNavigator" label="Navigator"/>
</folder>
</info>
<info folder="true" part="stickyFolderRight" ratio="0.75" ratioLeft="750" ratioRight="250" relationship="2" relative="leftFolder">
<folder appearance="2" expanded="2">
<page content="org.eclipse.help.ui.HelpView" label="LabelNotFound"/>
<page content="org.eclipse.ui.internal.introview" label="LabelNotFound"/>
<page content="org.eclipse.ui.cheatsheets.views.CheatSheetView" label="LabelNotFound"/>
</folder>
</info>
<info part="org.eclipse.ui.editorss" ratio="0.25" ratioLeft="250" ratioRight="750" relationship="2" relative="leftFolder"/>
<info folder="true" part="bottomFolder" ratio="0.7496136" ratioLeft="485" ratioRight="162" relationship="4" relative="org.eclipse.ui.editorss">
<folder appearance="2" expanded="2">
<page content="org.eclipse.ui.views.ProblemView" label="Problems"/>
<page content="org.eclipse.ui.console.ConsoleView" label="Console"/>
<page content="QNXSystemBuilderBinaryInspector" label="QNX Binary Inspector"/>
<page content="org.eclipse.tm.terminal.view.TerminalView" label="Terminal"/>
</folder>
</info>
<info folder="true" part="rightFolder" ratio="0.7493333" ratioLeft="562" ratioRight="188" relationship="2" relative="org.eclipse.ui.editorss">
<folder appearance="2" expanded="2">
<page content="org.eclipse.ui.views.PropertySheet" label="Properties"/>
</folder>
</info>
<info folder="true" part="org.eclipse.ui.internal.ViewStack@e15a69" ratio="0.7496136" ratioLeft="485" ratioRight="162" relationship="4" relative="leftFolder">
<folder appearance="2" expanded="2">
<page content="qnxTftpView" label="TFTP Server"/>
</folder>
</info>
</mainWindow>
</layout>
</perspective>
<perspective editorAreaTrimState="2" editorAreaVisible="0" fixed="0" version="0.016">
<descriptor class="com.qnx.tools.ide.sysinfo.internal.ui.SysInfoPerspective" id="com.qnx.tools.ide.sysinfo.perspective" label="QNX System Information"/>
<alwaysOnActionSet id="org.eclipse.ui.cheatsheets.actionSet"/>
<alwaysOnActionSet id="com.qnx.tools.ide.target.ui.actionset.log"/>
<alwaysOnActionSet id="com.qnx.tools.ide.updater"/>
<alwaysOnActionSet id="org.eclipse.search.searchActionSet"/>
<alwaysOnActionSet id="org.eclipse.team.svn.ui.menu.help"/>
<alwaysOnActionSet id="org.eclipse.ui.edit.text.actionSet.annotationNavigation"/>
<alwaysOnActionSet id="org.eclipse.ui.edit.text.actionSet.navigation"/>
<alwaysOnActionSet id="org.eclipse.ui.edit.text.actionSet.convertLineDelimitersTo"/>
<alwaysOnActionSet id="org.eclipse.ui.externaltools.ExternalToolsSet"/>
<alwaysOnActionSet id="org.eclipse.ui.actionSet.keyBindings"/>
<alwaysOnActionSet id="org.eclipse.ui.actionSet.openFiles"/>
<show_view_action id="com.qnx.tools.ide.target.internal.ui.targetview"/>
<show_view_action id="com.qnx.tools.ide.sysinfo.internal.ui.systemview"/>
<show_view_action id="com.qnx.tools.ide.sysinfo.internal.ui.processview"/>
<show_view_action id="com.qnx.tools.ide.sysinfo.internal.ui.memview"/>
<show_view_action id="com.qnx.tools.ide.sysinfo.internal.ui.mallocview"/>
<show_view_action id="com.qnx.tools.ide.target.fsys"/>
<show_view_action id="com.qnx.tools.ide.sysinfo.internal.ui.blockedview"/>
<show_view_action id="com.qnx.tools.ide.sysinfo.internal.ui.coidview"/>
<show_view_action id="com.qnx.tools.ide.sysinfo.internal.ui.signalview"/>
<show_view_action id="com.qnx.tools.ide.sysinfo.internal.ui.usageview"/>
<show_view_action id="org.eclipse.ui.views.ProgressView"/>
<show_view_action id="com.qnx.tools.ide.apsinfo.ui.views.APSView"/>
<show_view_action id="com.qnx.tools.ide.sysinfo.log.ui.historyView"/>
<new_wizard_action id="com.qnx.tools.ide.target.ui.wizard.NewTarget"/>
<hide_toolbar_item_id id="org.eclipse.ui.edit.text.toggleShowSelectedElementOnly"/>
<view id="com.qnx.tools.ide.target.internal.ui.targetview"/>
<view id="com.qnx.tools.ide.sysinfo.internal.ui.systemview"/>
<view id="com.qnx.tools.ide.sysinfo.internal.ui.processview"/>
<view id="com.qnx.tools.ide.sysinfo.internal.ui.memview"/>
<view id="com.qnx.tools.ide.sysinfo.internal.ui.mallocview"/>
<view id="com.qnx.tools.ide.target.fsys"/>
<fastViewBars/>
<layout>
<mainWindow>
<info folder="true" part="navArea">
<folder appearance="2" expanded="2">
<page content="com.qnx.tools.ide.target.internal.ui.targetview" label="Target Navigator"/>
</folder>
</info>
<info folder="true" part="stickyFolderRight" ratio="0.75" ratioLeft="750" ratioRight="250" relationship="2" relative="navArea">
<folder appearance="2" expanded="2">
<page content="org.eclipse.help.ui.HelpView" label="LabelNotFound"/>
<page content="org.eclipse.ui.internal.introview" label="LabelNotFound"/>
<page content="org.eclipse.ui.cheatsheets.views.CheatSheetView" label="LabelNotFound"/>
</folder>
</info>
<info part="org.eclipse.ui.editorss" ratio="0.25" ratioLeft="250" ratioRight="750" relationship="2" relative="navArea"/>
<info folder="true" part="belowEditor" ratio="0.24884081" ratioLeft="161" ratioRight="486" relationship="4" relative="org.eclipse.ui.editorss">
<folder appearance="2" expanded="2">
<page content="com.qnx.tools.ide.sysinfo.internal.ui.systemview" label="System Summary"/>
<page content="com.qnx.tools.ide.sysinfo.internal.ui.processview" label="Process Information"/>
<page content="com.qnx.tools.ide.sysinfo.internal.ui.memview" label="Memory Information"/>
<page content="com.qnx.tools.ide.sysinfo.internal.ui.mallocview" label="Malloc Information"/>
<page content="com.qnx.tools.ide.target.fsys" label="Target File System Navigator"/>
<page content="com.qnx.tools.ide.sysinfo.internal.ui.blockedview" label="LabelNotFound"/>
<page content="com.qnx.tools.ide.sysinfo.internal.ui.coidview" label="LabelNotFound"/>
<page content="com.qnx.tools.ide.sysinfo.internal.ui.signalview" label="LabelNotFound"/>
<page content="com.qnx.tools.ide.sysinfo.internal.ui.usageview" label="LabelNotFound"/>
</folder>
</info>
<info folder="true" part="belowSysViews" ratio="0.74897116" ratioLeft="364" ratioRight="122" relationship="4" relative="belowEditor">
<folder appearance="2" expanded="2">
<page content="org.eclipse.ui.views.ProgressView" label="LabelNotFound"/>
</folder>
</info>
<info part="com.qnx.tools.ide.sysinfo.log.ui.historyView" ratio="0.4992272" ratioLeft="323" ratioRight="324" relationship="4" relative="navArea"/>
</mainWindow>
</layout>
</perspective>
<perspective editorAreaTrimState="2" editorAreaVisible="1" fixed="0" version="0.016">
<descriptor class="org.eclipse.debug.internal.ui.DebugPerspectiveFactory" id="org.eclipse.debug.ui.DebugPerspective" label="Debug"/>
<alwaysOnActionSet id="org.eclipse.ui.cheatsheets.actionSet"/>
<alwaysOnActionSet id="com.qnx.tools.ide.target.ui.actionset.log"/>
<alwaysOnActionSet id="com.qnx.tools.ide.updater"/>
<alwaysOnActionSet id="org.eclipse.search.searchActionSet"/>
<alwaysOnActionSet id="org.eclipse.team.svn.ui.menu.help"/>
<alwaysOnActionSet id="org.eclipse.ui.edit.text.actionSet.annotationNavigation"/>
<alwaysOnActionSet id="org.eclipse.ui.edit.text.actionSet.navigation"/>
<alwaysOnActionSet id="org.eclipse.ui.edit.text.actionSet.convertLineDelimitersTo"/>
<alwaysOnActionSet id="org.eclipse.ui.externaltools.ExternalToolsSet"/>
<alwaysOnActionSet id="org.eclipse.ui.actionSet.keyBindings"/>
<alwaysOnActionSet id="org.eclipse.ui.actionSet.openFiles"/>
<alwaysOnActionSet id="org.eclipse.debug.ui.launchActionSet"/>
<alwaysOnActionSet id="org.eclipse.cdt.debug.ui.debugActionSet"/>
<alwaysOnActionSet id="org.eclipse.ui.NavigateActionSet"/>
<alwaysOnActionSet id="org.eclipse.debug.ui.breakpointActionSet"/>
<alwaysOnActionSet id="org.eclipse.debug.ui.debugActionSet"/>
<show_view_action id="org.eclipse.debug.ui.DebugView"/>
<show_view_action id="org.eclipse.debug.ui.VariableView"/>
<show_view_action id="org.eclipse.debug.ui.BreakpointView"/>
<show_view_action id="org.eclipse.debug.ui.ExpressionView"/>
<show_view_action id="org.eclipse.ui.views.ContentOutline"/>
<show_view_action id="org.eclipse.ui.console.ConsoleView"/>
<show_view_action id="org.eclipse.ui.views.TaskList"/>
<show_view_action id="com.qnx.tools.ide.target.fsys"/>
<show_view_action id="com.qnx.tools.ide.target.internal.ui.targetview"/>
<show_view_action id="org.eclipse.cdt.debug.ui.SignalsView"/>
<show_view_action id="org.eclipse.debug.ui.RegisterView"/>
<show_view_action id="org.eclipse.debug.ui.ModuleView"/>
<show_view_action id="org.eclipse.debug.ui.MemoryView"/>
<show_view_action id="org.eclipse.cdt.debug.ui.DisassemblyView"/>
<show_view_action id="org.eclipse.ui.views.ProblemView"/>
<show_view_action id="org.eclipse.cdt.debug.ui.executablesView"/>
<show_view_action id="org.eclipse.cdt.debug.ui.memory.memorybrowser.MemoryBrowser"/>
<show_view_action id="org.eclipse.pde.runtime.LogView"/>
<perspective_action id="com.qnx.tools.ide.sysinfo.perspective"/>
<perspective_action id="org.eclipse.cdt.ui.CPerspective"/>
<hide_toolbar_item_id id="org.eclipse.ui.edit.text.toggleShowSelectedElementOnly"/>
<view id="org.eclipse.ui.console.ConsoleView"/>
<view id="org.eclipse.ui.views.TaskList"/>
<view id="org.eclipse.ui.views.ProblemView"/>
<view id="org.eclipse.cdt.debug.ui.executablesView"/>
<view id="org.eclipse.debug.ui.DebugView"/>
<view id="org.eclipse.debug.ui.VariableView"/>
<view id="org.eclipse.debug.ui.BreakpointView"/>
<view id="org.eclipse.ui.views.ContentOutline"/>
<fastViewBars/>
<layout>
<mainWindow>
<info folder="true" part="org.eclipse.debug.internal.ui.NavigatorFolderView">
<folder activePageID="org.eclipse.debug.ui.DebugView" appearance="2" expanded="2">
<page content="org.eclipse.debug.ui.DebugView" label="Debug"/>
<page content="org.eclipse.ui.views.ResourceNavigator" label="LabelNotFound"/>
<presentation id="org.eclipse.ui.presentations.WorkbenchPresentationFactory">
<part id="0"/>
</presentation>
</folder>
</info>
<info folder="true" part="stickyFolderRight" ratio="0.75" ratioLeft="750" ratioRight="250" relationship="2" relative="org.eclipse.debug.internal.ui.NavigatorFolderView">
<folder appearance="2" expanded="2">
<page content="org.eclipse.help.ui.HelpView" label="LabelNotFound"/>
<page content="org.eclipse.ui.internal.introview" label="LabelNotFound"/>
<page content="org.eclipse.ui.cheatsheets.views.CheatSheetView" label="LabelNotFound"/>
</folder>
</info>
<info folder="true" part="org.eclipse.debug.internal.ui.ConsoleFolderView" ratio="0.7496136" ratioLeft="485" ratioRight="162" relationship="4" relative="org.eclipse.debug.internal.ui.NavigatorFolderView">
<folder activePageID="org.eclipse.ui.console.ConsoleView" appearance="2" expanded="2">
<page content="org.eclipse.ui.console.ConsoleView" label="Console"/>
<page content="org.eclipse.ui.views.TaskList" label="Tasks"/>
<page content="org.eclipse.ui.views.ProblemView" label="Problems"/>
<page content="org.eclipse.cdt.debug.ui.executablesView" label="Executables"/>
<page content="org.eclipse.ui.views.BookmarkView" label="LabelNotFound"/>
<page content="org.eclipse.ui.views.PropertySheet" label="LabelNotFound"/>
<page content="org.eclipse.cdt.debug.ui.memory.memorybrowser.MemoryBrowser" label="LabelNotFound"/>
<page content="org.eclipse.debug.ui.MemoryView" label="LabelNotFound"/>
<presentation id="org.eclipse.ui.presentations.WorkbenchPresentationFactory">
<part id="0"/>
<part id="1"/>
<part id="2"/>
<part id="3"/>
</presentation>
</folder>
</info>
<info part="org.eclipse.ui.editorss" ratio="0.44948453" ratioLeft="218" ratioRight="267" relationship="4" relative="org.eclipse.debug.internal.ui.NavigatorFolderView"/>
<info folder="true" part="org.eclipse.debug.internal.ui.OutlineFolderView" ratio="0.75" ratioLeft="750" ratioRight="250" relationship="2" relative="org.eclipse.ui.editorss">
<folder activePageID="org.eclipse.ui.views.ContentOutline" appearance="2" expanded="2">
<page content="org.eclipse.ui.views.ContentOutline" label="Outline"/>
<page content="org.eclipse.cdt.debug.ui.DisassemblyView" label="LabelNotFound"/>
<presentation id="org.eclipse.ui.presentations.WorkbenchPresentationFactory">
<part id="0"/>
</presentation>
</folder>
</info>
<info folder="true" part="org.eclipse.debug.internal.ui.ToolsFolderView" ratio="0.5" ratioLeft="500" ratioRight="500" relationship="2" relative="org.eclipse.debug.internal.ui.NavigatorFolderView">
<folder activePageID="org.eclipse.debug.ui.VariableView" appearance="2" expanded="2">
<page content="org.eclipse.debug.ui.VariableView" label="Variables"/>
<page content="org.eclipse.debug.ui.BreakpointView" label="Breakpoints"/>
<page content="org.eclipse.debug.ui.ExpressionView" label="LabelNotFound"/>
<page content="org.eclipse.debug.ui.RegisterView" label="LabelNotFound"/>
<page content="org.eclipse.cdt.debug.ui.SignalsView" label="LabelNotFound"/>
<page content="org.eclipse.debug.ui.ModuleView" label="LabelNotFound"/>
<presentation id="org.eclipse.ui.presentations.WorkbenchPresentationFactory">
<part id="0"/>
<part id="1"/>
</presentation>
</folder>
</info>
</mainWindow>
</layout>
</perspective>
<perspective editorAreaTrimState="2" editorAreaVisible="1" fixed="0" version="0.016">
<descriptor class="org.eclipse.cdt.internal.ui.CPerspectiveFactory" id="org.eclipse.cdt.ui.CPerspective" label="C/C++"/>
<alwaysOnActionSet id="org.eclipse.ui.cheatsheets.actionSet"/>
<alwaysOnActionSet id="com.qnx.tools.ide.target.ui.actionset.log"/>
<alwaysOnActionSet id="com.qnx.tools.ide.updater"/>
<alwaysOnActionSet id="org.eclipse.search.searchActionSet"/>
<alwaysOnActionSet id="org.eclipse.team.svn.ui.menu.help"/>
<alwaysOnActionSet id="org.eclipse.ui.edit.text.actionSet.annotationNavigation"/>
<alwaysOnActionSet id="org.eclipse.ui.edit.text.actionSet.navigation"/>
<alwaysOnActionSet id="org.eclipse.ui.edit.text.actionSet.convertLineDelimitersTo"/>
<alwaysOnActionSet id="org.eclipse.ui.externaltools.ExternalToolsSet"/>
<alwaysOnActionSet id="org.eclipse.ui.actionSet.keyBindings"/>
<alwaysOnActionSet id="org.eclipse.ui.actionSet.openFiles"/>
<alwaysOnActionSet id="org.eclipse.cdt.ui.SearchActionSet"/>
<alwaysOnActionSet id="org.eclipse.cdt.ui.CElementCreationActionSet"/>
<alwaysOnActionSet id="org.eclipse.ui.NavigateActionSet"/>
<alwaysOnActionSet id="com.qnx.tools.ide.phab.ui.PhabActionSet"/>
<alwaysOnActionSet id="com.qnx.tools.ide.qde.ui.extraActions"/>
<alwaysOnActionSet id="org.eclipse.debug.ui.breakpointActionSet"/>
<alwaysOnActionSet id="org.eclipse.cdt.make.ui.makeTargetActionSet"/>
<alwaysOnActionSet id="org.eclipse.debug.ui.launchActionSet"/>
<alwaysOnActionSet id="org.eclipse.cdt.ui.buildConfigActionSet"/>
<alwaysOnActionSet id="org.eclipse.cdt.ui.NavigationActionSet"/>
<alwaysOnActionSet id="org.eclipse.cdt.ui.OpenActionSet"/>
<alwaysOnActionSet id="org.eclipse.cdt.ui.CodingActionSet"/>
<alwaysOnActionSet id="org.eclipse.ui.edit.text.actionSet.presentation"/>
<show_view_action id="org.eclipse.ui.console.ConsoleView"/>
<show_view_action id="org.eclipse.search.ui.views.SearchView"/>
<show_view_action id="org.eclipse.ui.views.ContentOutline"/>
<show_view_action id="org.eclipse.ui.views.ProblemView"/>
<show_view_action id="org.eclipse.cdt.ui.CView"/>
<show_view_action id="org.eclipse.ui.views.ResourceNavigator"/>
<show_view_action id="org.eclipse.ui.views.PropertySheet"/>
<show_view_action id="org.eclipse.ui.views.TaskList"/>
<show_view_action id="com.qnx.tools.ide.target.fsys"/>
<show_view_action id="com.qnx.tools.ide.target.internal.ui.targetview"/>
<show_view_action id="org.eclipse.cdt.make.ui.views.MakeView"/>
<show_view_action id="org.eclipse.ui.navigator.ProjectExplorer"/>
<show_view_action id="org.eclipse.cdt.ui.includeBrowser"/>
<new_wizard_action id="com.qnx.tools.ide.qde.ui.MPQNXCWizard"/>
<new_wizard_action id="com.qnx.tools.ide.qde.ui.MPQNXCCWizard"/>
<new_wizard_action id="org.eclipse.cdt.ui.wizards.ConvertToMakeWizard"/>
<new_wizard_action id="org.eclipse.cdt.ui.wizards.NewCWizard1"/>
<new_wizard_action id="org.eclipse.cdt.ui.wizards.NewCWizard2"/>
<new_wizard_action id="org.eclipse.cdt.ui.wizards.NewSourceFolderCreationWizard"/>
<new_wizard_action id="org.eclipse.cdt.ui.wizards.NewFolderCreationWizard"/>
<new_wizard_action id="org.eclipse.cdt.ui.wizards.NewSourceFileCreationWizard"/>
<new_wizard_action id="org.eclipse.cdt.ui.wizards.NewHeaderFileCreationWizard"/>
<new_wizard_action id="org.eclipse.cdt.ui.wizards.NewFileCreationWizard"/>
<new_wizard_action id="org.eclipse.cdt.ui.wizards.NewClassCreationWizard"/>
<perspective_action id="com.qnx.tools.ide.BSPPerspective"/>
<perspective_action id="com.qnx.tools.ide.sysinfo.perspective"/>
<perspective_action id="org.eclipse.debug.ui.DebugPerspective"/>
<perspective_action id="org.eclipse.team.ui.TeamSynchronizingPerspective"/>
<hide_toolbar_item_id id="org.eclipse.ui.edit.text.toggleShowSelectedElementOnly"/>
<view id="org.eclipse.ui.navigator.ProjectExplorer"/>
<view id="org.eclipse.ui.views.ProblemView"/>
<view id="org.eclipse.ui.views.TaskList"/>
<view id="org.eclipse.ui.console.ConsoleView"/>
<view id="org.eclipse.ui.views.PropertySheet"/>
<fastViewBars/>
<layout>
<mainWindow>
<info folder="true" part="topLeft">
<folder activePageID="org.eclipse.ui.navigator.ProjectExplorer" appearance="2" expanded="2">
<page content="org.eclipse.ui.navigator.ProjectExplorer" label="Project Explorer"/>
<page content="org.eclipse.cdt.ui.CView" label="LabelNotFound"/>
<page content="org.eclipse.ui.views.ResourceNavigator" label="LabelNotFound"/>
<page content="org.eclipse.ui.views.BookmarkView" label="LabelNotFound"/>
<presentation id="org.eclipse.ui.presentations.WorkbenchPresentationFactory">
<part id="0"/>
</presentation>
</folder>
</info>
<info folder="true" part="org.eclipse.ui.internal.ViewStack@bc5245" ratio="0.75" ratioLeft="750" ratioRight="250" relationship="2" relative="topLeft">
<folder appearance="2" expanded="2">
<page content="org.eclipse.help.ui.HelpView" label="LabelNotFound"/>
<page content="org.eclipse.ui.internal.introview" label="LabelNotFound"/>
<page content="org.eclipse.ui.cheatsheets.views.CheatSheetView" label="LabelNotFound"/>
<presentation id="org.eclipse.ui.presentations.WorkbenchPresentationFactory"/>
</folder>
</info>
<info part="org.eclipse.ui.editorss" ratio="0.14911607" ratioLeft="194" ratioRight="1107" relationship="2" relative="topLeft"/>
<info folder="true" part="bottom" ratio="0.49328858" ratioLeft="441" ratioRight="453" relationship="4" relative="org.eclipse.ui.editorss">
<folder activePageID="org.eclipse.ui.console.ConsoleView" appearance="2" expanded="2">
<page content="org.eclipse.ui.views.ProblemView" label="Problems"/>
<page content="org.eclipse.ui.views.TaskList" label="Tasks"/>
<page content="org.eclipse.ui.console.ConsoleView" label="Console"/>
<page content="org.eclipse.ui.views.PropertySheet" label="Properties"/>
<presentation id="org.eclipse.ui.presentations.WorkbenchPresentationFactory">
<part id="0"/>
<part id="1"/>
<part id="2"/>
<part id="3"/>
</presentation>
</folder>
</info>
<info folder="true" part="topRight" ratio="0.7493333" ratioLeft="562" ratioRight="188" relationship="2" relative="org.eclipse.ui.editorss">
<folder appearance="2" expanded="2">
<page content="org.eclipse.ui.views.ContentOutline" label="LabelNotFound"/>
<page content="org.eclipse.cdt.make.ui.views.MakeView" label="LabelNotFound"/>
<presentation id="org.eclipse.ui.presentations.WorkbenchPresentationFactory"/>
</folder>
</info>
</mainWindow>
</layout>
</perspective>
</perspectives>
<workingSets/>
<navigationHistory>
<editors>
<editor factoryID="org.eclipse.ui.part.FileEditorInputFactory" id="org.eclipse.cdt.ui.editor.CEditor" path="/proj6/proj6.c"/>
<editor factoryID="org.eclipse.ui.part.FileEditorInputFactory" id="org.eclipse.cdt.ui.editor.CEditor" path="/proj6/qnx.c"/>
<editor factoryID="org.eclipse.ui.part.FileEditorInputFactory" id="org.eclipse.cdt.ui.editor.CEditor" path="/proj6/qnx.h"/>
<editor factoryID="org.eclipse.ui.part.FileEditorInputFactory" id="org.eclipse.cdt.ui.editor.CEditor" path="/proj6/proj6.c"/>
<editor factoryID="org.eclipse.ui.part.FileEditorInputFactory" id="org.eclipse.cdt.ui.editor.CEditor" path="/proj6/qnx.h"/>
<editor factoryID="org.eclipse.ui.part.FileEditorInputFactory" id="org.eclipse.cdt.ui.editor.CEditor" path="/proj6/proj6.c"/>
<editor factoryID="org.eclipse.ui.part.FileEditorInputFactory" id="org.eclipse.cdt.ui.editor.CEditor" path="/proj6/qnx.h"/>
</editors>
<item historyLabel="qnx.h" index="2">
<position info="not_deleted" x="0" y="209"/>
</item>
<item historyLabel="proj6.c" index="0">
<position info="not_deleted" x="100" y="0"/>
</item>
<item historyLabel="qnx.c" index="1">
<position info="not_deleted" x="3306" y="0"/>
</item>
<item historyLabel="proj6.c" index="0">
<position info="not_deleted" x="100" y="0"/>
</item>
<item historyLabel="qnx.h" index="2">
<position info="not_deleted" x="0" y="209"/>
</item>
<item historyLabel="qnx.c" index="1">
<position info="not_deleted" x="3306" y="0"/>
</item>
<item historyLabel="proj6.c" index="3">
<position info="not_deleted" x="383" y="0"/>
</item>
<item historyLabel="qnx.c" index="1">
<position info="not_deleted" x="4155" y="0"/>
</item>
<item historyLabel="proj6.c" index="3">
<position info="not_deleted" x="397" y="9"/>
</item>
<item historyLabel="qnx.c" index="1">
<position info="not_deleted" x="4155" y="0"/>
</item>
<item historyLabel="qnx.c" index="1">
<position info="not_deleted" x="3056" y="0"/>
</item>
<item historyLabel="proj6.c" index="3">
<position info="not_deleted" x="485" y="0"/>
</item>
<item historyLabel="qnx.c" index="1">
<position/>
</item>
<item historyLabel="proj6.c" index="3">
<position info="not_deleted" x="328" y="0"/>
</item>
<item historyLabel="qnx.c" index="1">
<position/>
</item>
<item historyLabel="proj6.c" index="3">
<position info="not_deleted" x="328" y="0"/>
</item>
<item historyLabel="qnx.h" index="4">
<position info="not_deleted" x="0" y="209"/>
</item>
<item historyLabel="qnx.c" index="1">
<position info="not_deleted" x="1482" y="0"/>
</item>
<item historyLabel="proj6.c" index="3">
<position info="not_deleted" x="415" y="23"/>
</item>
<item historyLabel="qnx.c" index="1">
<position info="not_deleted" x="3302" y="0"/>
</item>
<item historyLabel="proj6.c" index="3">
<position info="not_deleted" x="892" y="0"/>
</item>
<item historyLabel="qnx.h" index="4">
<position info="not_deleted" x="209" y="0"/>
</item>
<item historyLabel="qnx.c" index="1">
<position info="not_deleted" x="3302" y="0"/>
</item>
<item historyLabel="qnx.c" index="1">
<position/>
</item>
<item historyLabel="qnx.c" index="1">
<position info="not_deleted" x="3652" y="0"/>
</item>
<item historyLabel="proj6.c" index="3">
<position info="not_deleted" x="357" y="0"/>
</item>
<item historyLabel="qnx.c" index="1">
<position info="not_deleted" x="3032" y="17"/>
</item>
<item historyLabel="proj6.c" index="3">
<position info="not_deleted" x="760" y="13"/>
</item>
<item historyLabel="qnx.c" index="1">
<position info="not_deleted" x="4140" y="12"/>
</item>
<item historyLabel="proj6.c" index="3">
<position info="not_deleted" x="760" y="13"/>
</item>
<item historyLabel="qnx.c" index="1">
<position info="not_deleted" x="4140" y="12"/>
</item>
<item historyLabel="qnx.c" index="1">
<position info="not_deleted" x="4256" y="0"/>
</item>
<item historyLabel="qnx.c" index="1">
<position info="not_deleted" x="3764" y="0"/>
</item>
<item historyLabel="qnx.h" index="4">
<position info="not_deleted" x="209" y="0"/>
</item>
<item historyLabel="proj6.c" index="3">
<position info="not_deleted" x="872" y="0"/>
</item>
<item historyLabel="qnx.c" index="1">
<position info="not_deleted" x="4116" y="15"/>
</item>
<item historyLabel="qnx.h" index="4">
<position info="not_deleted" x="209" y="0"/>
</item>
<item historyLabel="proj6.c" index="3">
<position info="not_deleted" x="480" y="17"/>
</item>
<item historyLabel="qnx.c" index="1">
<position info="not_deleted" x="4116" y="15"/>
</item>
<item historyLabel="proj6.c" index="3">
<position info="not_deleted" x="892" y="0"/>
</item>
<item historyLabel="qnx.c" index="1">
<position info="not_deleted" x="4116" y="15"/>
</item>
<item historyLabel="qnx.c" index="1">
<position info="not_deleted" x="4216" y="0"/>
</item>
<item historyLabel="proj6.c" index="3">
<position info="not_deleted" x="892" y="0"/>
</item>
<item historyLabel="qnx.c" index="1">
<position info="not_deleted" x="4216" y="0"/>
</item>
<item historyLabel="proj6.c" index="5">
<position info="not_deleted" x="945" y="0"/>
</item>
<item historyLabel="qnx.h" index="6">
<position info="not_deleted" x="215" y="0"/>
</item>
<item historyLabel="qnx.c" index="1">
<position info="not_deleted" x="996" y="0"/>
</item>
<item historyLabel="proj6.c" index="5">
<position info="not_deleted" x="811" y="11"/>
</item>
<item historyLabel="qnx.h" index="6">
<position info="not_deleted" x="188" y="0"/>
</item>
<item active="true" historyLabel="qnx.c" index="1">
<position info="not_deleted" x="996" y="0"/>
</item>
</navigationHistory>
<input factoryID="org.eclipse.ui.internal.model.ResourceFactory" path="/" type="8"/>
</page>
<workbenchWindowAdvisor/>
<actionBarAdvisor/>
<trimLayout>
<trimArea IMemento.internal.id="128">
<trimItem IMemento.internal.id="org.eclipse.ui.internal.WorkbenchWindow.topBar"/>
</trimArea>
<trimArea IMemento.internal.id="1024">
<trimItem IMemento.internal.id="org.eclise.ui.internal.FastViewBar"/>
<trimItem IMemento.internal.id="org.eclipse.jface.action.StatusLineManager"/>
<trimItem IMemento.internal.id="org.eclipse.ui.internal.progress.ProgressRegion"/>
</trimArea>
</trimLayout>
</window>
<mruList>
<file factoryID="org.eclipse.ui.part.FileEditorInputFactory" id="org.eclipse.cdt.ui.editor.CEditor" name="qnx.c" tooltip="proj6/qnx.c">
<persistable path="/proj6/qnx.c"/>
</file>
<file factoryID="org.eclipse.ui.part.FileEditorInputFactory" id="org.eclipse.cdt.ui.editor.CEditor" name="qnx.h" tooltip="proj6/qnx.h">
<persistable path="/proj6/qnx.h"/>
</file>
<file factoryID="org.eclipse.ui.part.FileEditorInputFactory" id="org.eclipse.cdt.ui.editor.CEditor" name="proj6.c" tooltip="proj6/proj6.c">
<persistable path="/proj6/proj6.c"/>
</file>
<file factoryID="org.eclipse.cdt.ui.ExternalEditorInputFactory" id="org.eclipse.cdt.ui.editor.CEditor" name="inout.h" tooltip="C:\QNX650\target\qnx6\usr\include\hw\inout.h">
<persistable path="C:\QNX650\target\qnx6\usr\include\hw\inout.h" project="proj6"/>
</file>
</mruList>
</workbench>


text:
import { JssmError } from './jssm_error';
import { parse } from './fsl_parser';
import { arrow_left_kind, arrow_right_kind } from './jssm_arrow';
import { find_repeated, name_bind_prop_and_state } from './jssm_util';
import { reduce as reduce_to_639 } from 'reduce-to-639-1';
/*********
 *
 *  Internal method meant to perform factory assembly of an edge.  Not meant for
 *  external use.
 *
 *  @internal
 *
 *  @typeparam mDT The type of the machine data member; usually omitted
 *
 */
// TODO add at-param to docblock
function makeTransition(this_se, from, to, isRight, _wasList, _wasIndex) {
    const kind = isRight
        ? arrow_right_kind(this_se.kind)
        : arrow_left_kind(this_se.kind), edge = {
        from,
        to,
        kind,
        forced_only: kind === 'forced',
        main_path: kind === 'main'
    };
    //  if ((wasList  !== undefined) && (wasIndex === undefined)) { throw new JssmError(undefined, `Must have an index if transition was in a list"); }
    //  if ((wasIndex !== undefined) && (wasList  === undefined)) { throw new JssmError(undefined, `Must be in a list if transition has an index");   }
    /*
      if (typeof edge.to === 'object') {

        if (edge.to.key === 'cycle') {
          if (wasList === undefined) { throw new JssmError(undefined, "Must have a waslist if a to is type cycle"); }
          const nextIndex = wrapBy(wasIndex, edge.to.value, wasList.length);
          edge.to = wasList[nextIndex];
        }

      }
    */
    const action = isRight ? 'r_action' : 'l_action', probability = isRight ? 'r_probability' : 'l_probability';
    if (this_se[action]) {
        edge.action = this_se[action];
    }
    if (this_se[probability]) {
        edge.probability = this_se[probability];
    }
    return edge;
}
/*********
 *
 *  This method wraps the parser call that comes from the peg grammar,
 *  {@link parse}.  Generally neither this nor that should be used directly
 *  unless you mean to develop plugins or extensions for the machine.
 *
 *  Parses the intermediate representation of a compiled string down to a
 *  machine configuration object.  If you're using this (probably don't,) you're
 *  probably also using {@link compile} and {@link Machine.constructor}.
 *
 *  ```typescript
 *  import { parse, compile, Machine } from 'jssm';
 *
 *  const intermediate = wrap_parse('a -> b;', {});
 *  // [ {key:'transition', from:'a', se:{kind:'->',to:'b'}} ]
 *
 *  const cfg = compile(intermediate);
 *  // { start_states:['a'], transitions: [{ from:'a', to:'b', kind:'legal', forced_only:false, main_path:false }] }
 *
 *  const machine = new Machine(cfg);
 *  // Machine { _instance_name: undefined, _state: 'a', ...
 *  ```
 *
 *  This method is mostly for plugin and intermediate tool authors, or people
 *  who need to work with the machine's intermediate representation.
 *
 *  # Hey!
 *
 *  Most people looking at this want either the `sm` operator or method `from`,
 *  which perform all the steps in the chain.  The library's author mostly uses
 *  operator `sm`, and mostly falls back to `.from` when needing to parse
 *  strings dynamically instead of from template literals.
 *
 *  Operator {@link sm}:
 *
 *  ```typescript
 *  import { sm } from 'jssm';
 *
 *  const lswitch = sm`on <=> off;`;
 *  ```
 *
 *  Method {@link from}:
 *
 *  ```typescript
 *  import * as jssm from 'jssm';
 *
 *  const toggle = jssm.from('up <=> down;');
 *  ```
 *
 *  `wrap_parse` itself is an internal convenience method for alting out an
 *  object as the options call.  Not generally meant for external use.
 *
 *  @param input The FSL code to be evaluated
 *
 *  @param options Things to control about the instance
 *
 */
function wrap_parse(input, options) {
    return parse(input, options || {});
}
/*********
 *
 *  Internal method performing one step in compiling rules for transitions.  Not
 *  generally meant for external use.
 *
 *  @internal
 *
 *  @typeparam mDT The type of the machine data member; usually omitted
 *
 */
function compile_rule_transition_step(acc, from, to, this_se, next_se) {
    const edges = [];
    const uFrom = (Array.isArray(from) ? from : [from]), uTo = (Array.isArray(to) ? to : [to]);
    uFrom.map((f) => {
        uTo.map((t) => {
            const right = makeTransition(this_se, f, t, true);
            if (right.kind !== 'none') {
                edges.push(right);
            }
            const left = makeTransition(this_se, t, f, false);
            if (left.kind !== 'none') {
                edges.push(left);
            }
        });
    });
    const new_acc = acc.concat(edges);
    if (next_se) {
        return compile_rule_transition_step(new_acc, to, next_se.to, next_se, next_se.se);
    }
    else {
        return new_acc;
    }
}
/*********
 *
 *  Internal method performing one step in compiling rules for transitions.  Not
 *  generally meant for external use.
 *
 *  @internal
 *
 */
function compile_rule_handle_transition(rule) {
    return compile_rule_transition_step([], rule.from, rule.se.to, rule.se, rule.se.se);
}
/*********
 *
 *  Internal method performing one step in compiling rules for transitions.  Not
 *  generally meant for external use.
 *
 *  @internal
 *
 */
function compile_rule_handler(rule) {
    if (rule.key === 'transition') {
        return { agg_as: 'transition', val: compile_rule_handle_transition(rule) };
    }
    if (rule.key === 'machine_language') {
        return { agg_as: 'machine_language', val: reduce_to_639(rule.value) };
    }
    // manually rehandled to make `undefined` as a property safe
    if (rule.key === 'property_definition') {
        const ret = { agg_as: 'property_definition', val: { name: rule.name } };
        if (rule.hasOwnProperty('default_value')) {
            ret.val.default_value = rule.default_value;
        }
        if (rule.hasOwnProperty('required')) {
            ret.val.required = rule.required;
        }
        return ret;
    }
    // state properties are in here
    if (rule.key === 'state_declaration') {
        if (!rule.name) {
            throw new JssmError(undefined, 'State declarations must have a name');
        }
        return { agg_as: 'state_declaration', val: { state: rule.name, declarations: rule.value } };
    }
    if (['arrange_declaration', 'arrange_start_declaration',
        'arrange_end_declaration'].includes(rule.key)) {
        return { agg_as: rule.key, val: [rule.value] };
    }
    // things that can only exist once and are just a value under their own name
    const tautologies = [
        'graph_layout', 'start_states', 'end_states', 'machine_name', 'machine_version',
        'machine_comment', 'machine_author', 'machine_contributor', 'machine_definition',
        'machine_reference', 'machine_license', 'fsl_version', 'state_config', 'theme',
        'flow', 'dot_preamble', 'allows_override', 'default_state_config',
        'default_start_state_config', 'default_end_state_config',
        'default_hooked_state_config', 'default_active_state_config',
        'default_terminal_state_config'
    ];
    if (tautologies.includes(rule.key)) {
        return { agg_as: rule.key, val: rule.value };
    }
    throw new JssmError(undefined, `compile_rule_handler: Unknown rule: ${JSON.stringify(rule)}`);
}
/*********
 *
 *  Compile a machine's JSON intermediate representation to a config object.  If
 *  you're using this (probably don't,) you're probably also using
 *  {@link parse} to get the IR, and the object constructor
 *  {@link Machine.construct} to turn the config object into a workable machine.
 *
 *  ```typescript
 *  import { parse, compile, Machine } from 'jssm';
 *
 *  const intermediate = parse('a -> b;');
 *  // [ {key:'transition', from:'a', se:{kind:'->',to:'b'}} ]
 *
 *  const cfg = compile(intermediate);
 *  // { start_states:['a'], transitions: [{ from:'a', to:'b', kind:'legal', forced_only:false, main_path:false }] }
 *
 *  const machine = new Machine(cfg);
 *  // Machine { _instance_name: undefined, _state: 'a', ...
 *  ```
 *
 *  This method is mostly for plugin and intermediate tool authors, or people
 *  who need to work with the machine's intermediate representation.
 *
 *  # Hey!
 *
 *  Most people looking at this want either the `sm` operator or method `from`,
 *  which perform all the steps in the chain.  The library's author mostly uses
 *  operator `sm`, and mostly falls back to `.from` when needing to parse
 *  strings dynamically instead of from template literals.
 *
 *  Operator {@link sm}:
 *
 *  ```typescript
 *  import { sm } from 'jssm';
 *
 *  const lswitch = sm`on <=> off;`;
 *  ```
 *
 *  Method {@link from}:
 *
 *  ```typescript
 *  import * as jssm from 'jssm';
 *
 *  const toggle = jssm.from('up <=> down;');
 *  ```
 *
 *  @typeparam mDT The type of the machine data member; usually omitted
 *
 *  @param tree The parse tree to be boiled down into a machine config
 *
 */
function compile(tree) {
    const results = {
        graph_layout: [],
        transition: [],
        start_states: [],
        end_states: [],
        state_config: [],
        state_declaration: [],
        fsl_version: [],
        machine_author: [],
        machine_comment: [],
        machine_contributor: [],
        machine_definition: [],
        machine_language: [],
        machine_license: [],
        machine_name: [],
        machine_reference: [],
        property_definition: [],
        state_property: {},
        theme: [],
        flow: [],
        dot_preamble: [],
        arrange_declaration: [],
        arrange_start_declaration: [],
        arrange_end_declaration: [],
        machine_version: [],
        default_state_config: [],
        default_active_state_config: [],
        default_hooked_state_config: [],
        default_terminal_state_config: [],
        default_start_state_config: [],
        default_end_state_config: [],
        allows_override: []
    };
    tree.map((tr) => {
        const rule = compile_rule_handler(tr), agg_as = rule.agg_as, val = rule.val; // TODO FIXME no any
        results[agg_as] = results[agg_as].concat(val);
    });
    const property_keys = results['property_definition'].map(pd => pd.name), repeat_props = find_repeated(property_keys);
    if (repeat_props.length) {
        throw new JssmError(undefined, `Cannot repeat property definitions.  Saw ${JSON.stringify(repeat_props)}`);
    }
    const assembled_transitions = [].concat(...results['transition']);
    const result_cfg = {
        start_states: results.start_states.length ? results.start_states : [assembled_transitions[0].from],
        end_states: results.end_states,
        transitions: assembled_transitions,
        state_property: [],
    };
    const oneOnlyKeys = [
        'graph_layout', 'machine_name', 'machine_version', 'machine_comment',
        'fsl_version', 'machine_license', 'machine_definition', 'machine_language',
        'flow', 'dot_preamble', 'allows_override'
    ];
    oneOnlyKeys.map((oneOnlyKey) => {
        if (results[oneOnlyKey].length > 1) {
            throw new JssmError(undefined, `May only have one ${oneOnlyKey} statement maximum: ${JSON.stringify(results[oneOnlyKey])}`);
        }
        else {
            if (results[oneOnlyKey].length) {
                result_cfg[oneOnlyKey] = results[oneOnlyKey][0];
            }
        }
    });
    ['arrange_declaration', 'arrange_start_declaration', 'arrange_end_declaration',
        'machine_author', 'machine_contributor', 'machine_reference', 'theme',
        'state_declaration', 'property_definition', 'default_state_config',
        'default_start_state_config', 'default_end_state_config',
        'default_hooked_state_config', 'default_terminal_state_config',
        'default_active_state_config'].map((multiKey) => {
        if (results[multiKey].length) {
            result_cfg[multiKey] = results[multiKey];
        }
    });
    // re-walk state declarations, already wrapped up, to get state properties,
    // which go out in a different datastructure
    results.state_declaration.forEach(sd => {
        sd.declarations.forEach(decl => {
            if (decl.key === 'state_property') {
                const label = name_bind_prop_and_state(decl.name, sd.state);
                if (result_cfg.state_property.findIndex(c => c.name === label) !== -1) {
                    throw new JssmError(undefined, `A state may only bind a property once (${sd.state} re-binds ${decl.name})`);
                }
                else {
                    result_cfg.state_property.push({ name: label, default_value: decl.value });
                }
            }
        });
    });
    return result_cfg;
}
/*********
 *
 *  An internal convenience wrapper for parsing then compiling a machine string.
 *  Not generally meant for external use.  Please see {@link compile} or
 *  {@link sm}.
 *
 *  @typeparam mDT The type of the machine data member; usually omitted
 *
 *  @param plan The FSL code to be evaluated and built into a machine config
 *
 */
function make(plan) {
    return compile(wrap_parse(plan));
}
export { compile,
// compile_rule_handler,
// compile_rule_transition_step,
// compile_rule_handle_transition,
make, makeTransition, wrap_parse };