text:
using AspNetSeo.CoreMvc.Internal;
using AspNetSeo.Internal;
using Microsoft.AspNetCore.Razor.TagHelpers;

namespace AspNetSeo.CoreMvc.TagHelpers
{
    [HtmlTargetElement("og-image", TagStructure = TagStructure.WithoutEndTag)]
    [OutputElementHint("meta")]
    public class OgImageTagHelper : SeoTagHelperBase
    {
        public OgImageTagHelper(ISeoHelper seoHelper)
            : base(seoHelper)
        {
        }

        public string Value { get; set; }

        public override void Process(
            TagHelperContext context,
            TagHelperOutput output)
        {
            var content = TagValueUtility.GetContent(
                Value,
                SeoHelper.OgImage);

            output.ProcessOpenGraph(OgMetaName.Image, content);
        }
    }
}


text:
<TITLE>Review for Slums of Beverly Hills (1998)</TITLE>
<LINK REL="STYLESHEET" TYPE="text/css" HREF="/ramr.css">

Slums of Beverly Hills (1998)

reviewed by
Wallace Baine

'Slums' an endearing look at growing up in the 1970s

by Wallace Baine
Santa Cruz Sentinel

Another stereotype falls in writer/director Tamara Jenkins's coarsely funny
and surprisingly touching first feature `Slums of Beverly Hills.' Unlike a
certain tired TV show, this one features a handful of kids from the world's
most elite zip code who don't look like their first words as babies were
`Vidal Sassoon.' In fact, Jenkins points out in this autobiographical
coming-of-age comedy set in the summer of 1976, even Zsa Zsa's neighborhood
has its white trash.
Front and center is bug-eyed Vivian Abramowitz (Natasha Lyonne of `Everyone
Says I Love You'), a gawky teenager struggling to make her way through
adolescense in a barely functional family of males with no tact when it
comes to the special challenges of female puberty. It's bad enough that her
older brother is always making cracks about her rapidly expanding bust and
everyone mistakes her father for her grandfather. On top of that, Dad (Alan
Arkin) is constantly moving the family from one cheesy Beverly Hills
apartment building to another, skipping out on rent when necessary and
struggling to ride out a slump in his job as a car salesman (He trying to
sell giant American-made gas guzzlers during the oil crisis).
As if that weren't hard enough for a girl to whom dignity is denied every
day, here comes a new neighbor, a leering dope dealer with an alarming
admiration for Charles Manson and thirst to see Vivian naked. And then,
enter Rita (Marisa Tomei), the out-of-control cousin fresh from a stint in
drug rehab, who moves in as a kind of female role model for Vivian. Rita's
apparent reasons for living, however, seem limited to vibrators and
Seconals.
With her frizzled mop of red hair and her doofus bearing, Lyonne plays
Vivian as a girl not yet sure how to wield her sexual weapons (`It's just a
building thing,' she says to her neighbor trying to keep him from blabbing
after he fondles her suddenly womanly breasts). Vivian looks at the
wreckage of family neurosis around her and can't decide whether to rebel or
join in. Her role is primarily to play as foil to the weirdos around her
and when these prickly personalities bounce off each other, `Slums' finds
an entertaining sense of comic mania.
Jenkins's script, heavy on girl-centric themes such as sprouting breasts
and menstruation, nicely surfs that territory between pain and humor. In
nearly every scene, Vivian's self-image is assaulted by the mega-ton
embarrasments of adolescense. At one point, she is trapped with a `girl
problem' in the bathroom of her dad's post-menopausal lady friend (Jessica
Walter). The woman comes to the rescue, digging around for products she
hasn't used in years, finally producing a maxi-pad as large as tennis shoe
with an accompanying `menstrual belt' to keep everything in place. Vivian's
slack jaw and slumping eyes betrays an oceanic mortification.
Marisa Tomei is also stellar in her role as Rita, the daffy cousin who
can't seem to keep her clothes on. But this film's most endearing
performance comes from Alan Arkin who as divorced dad Murray Abramowitz
puts up with the indignities of poverty to keep his children in the highly
regarded Beverly Hills school district. He is the very picture of Dad-ness:
insisting Vivian wear a bra under her halter top or, dragging the whole
brood off to T-bones at the Sizzler ... for breakfast. But, ultimately, his
is a kind, warm portrayal and is the film's most convincing evidence that
director Jenkins harbors no bitterness about her unorthodox upbringing.
It's refreshing to see the '70s themes not played as obviously as other
similarly set films tend to do. The details, however, are impeccable from a
genuine delight for shag carpeting to the omnipresent flickers of `Let's
Make a Deal' on the TV. Jenkins presents the '70s in loving memory as a
benighted time when Trix cereal could happily co-exist with bong hits,
neither of which are often associated with Beverly Hills. There goes
another stereotype.

The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).

The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.

Please direct comments/criticisms of the review to relevant newsgroups.

Broken URLs inthe reviews are the responsibility of the author.

The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.

Related links: index of all rec.arts.movies.reviews reviews

redpajama_set_name: RedPajamaGithub


text:
namespace AdminSite.Models
{
    public class UserModel
    {
        public UserRequest UserRequest { get; set; } = null;
        public string request{ get; set; }
        public UserNote Note { get; set; }
    }

    public class UserNote
    {
        public uint UserId { get; set; }
        public string Note { get; set; }
    }
}


text:
package client.app.contacts.clients.tasks;

import share.app.contacts.clients.Client;
import client.app.contacts.clients.gui.def.GUIEditClient;
import client.app.contacts.clients.operations.OperationsClients;

public class AddClient extends BaseClient<Client>
{
	@Override
	public void start()
	{
		setTitle(getLiteral(GUIEditClient.Literals.TITLE_ADD_CLIENT));
		this.gui.firstName.focus();
	}

	private void addClient()
	{
		if (validate())
		{
			Client newClient = new Client(0, this.gui.firstName.get(), this.gui.lastName.get(), this.gui.identification.get(), this.gui.address.get(), this.gui.city.get(), this.gui.postalCode.getInt(), this.gui.telephone.getInt(), this.gui.mobile.getInt(), this.gui.email.get(), this.gui.comments.get(), 0);
			Client response = OperationsClients.call().addClient(newClient);

			if (response != null)
			{
				close(response);
			}
			else
			{
				showWarning(GUIEditClient.Literals.CLIENT_NOT_CREATED);
				this.gui.firstName.focus();
			}
		}
	}

	@Override
	public void closing()
	{
		if (formChanged())
		{
			if (showConfirm(GUIEditClient.Literals.ASK_CLOSE_WINDOW))
			{
				close();
			}
			else
			{
				setFocus();
			}
		}
		else
		{
			close();
		}
	}

	private boolean formChanged()
	{
		return ((!this.gui.firstName.isEmpty()) || (!this.gui.lastName.isEmpty()) || (!this.gui.identification.isEmpty()) || (!this.gui.address.isEmpty()) || (!this.gui.city.isEmpty()) || (!this.gui.postalCode.isEmpty()) || (!this.gui.telephone.isEmpty()) || (!this.gui.mobile.isEmpty()) || (!this.gui.email.isEmpty()) || (!this.gui.comments.isEmpty()));
	}

	@Override
	public void event(Event event)
	{
		switch (event)
		{
			case SAVE:
				addClient();
				break;

			case CANCEL:
				closing();
				break;

			default:
				break;
		}
	}
}


text:
'use strict';

describe('Controller: MessagesCtrl', function () {

  // load the controller's module
  beforeEach(module('consoleApp'));

  var MessagesCtrl,
    scope;

  // Initialize the controller and a mock scope
  beforeEach(inject(function ($controller, $rootScope) {
    scope = $rootScope.$new();
    MessagesCtrl = $controller('MessagesCtrl', {
      $scope: scope
      // place here mocked dependencies
    });
  }));

  it('should attach a list of awesomeThings to the scope', function () {
    expect(MessagesCtrl.awesomeThings.length).toBe(3);
  });
});


text:
using Avalonia;
using Avalonia.Platform;
using MiniMvvm;

namespace ControlCatalog.ViewModels;
#nullable enable

public class PlatformInformationViewModel : ViewModelBase
{
    public PlatformInformationViewModel()
    {
        var runtimeInfo = AvaloniaLocator.Current.GetService<IRuntimePlatform>()?.GetRuntimeInfo();

        if (runtimeInfo is { } info)
        {
            if (info.IsBrowser)
            {
                if (info.IsDesktop)
                {
                    PlatformInfo = "Platform: Desktop (browser)";
                }
                else if (info.IsMobile)
                {
                    PlatformInfo = "Platform: Mobile (browser)";
                }
                else
                {
                    PlatformInfo = "Platform: Unknown (browser) - please report";
                }
            }
            else
            {
                if (info.IsDesktop)
                {
                    PlatformInfo = "Platform: Desktop (native)";
                }
                else if (info.IsMobile)
                {
                    PlatformInfo = "Platform: Mobile (native)";
                }
                else
                {
                    PlatformInfo = "Platform: Unknown (native) - please report";
                }
            }
        }
        else
        {

        }
    }

    public string PlatformInfo { get; }
}


text:
         Câu hỏi với từ khóa

Thẻ này chưa có bài viết nào.

0" class="tag_question">

                         Đánh giá:
                         Quan tâm:
                         Trả lời:

<pagination total-items="totalItems" ng-model="currentPage" max-size="itemsPerPage" class="pagination-sm" boundary-links="false" rotate="false" num-pages="numPages" previous-text="←" next-text="→"></pagination>


text:
using System;
using System.Collections.Generic;

namespace KitchenSink.Collections
{
    /// <summary>
    /// A comparer based on a function that returns a gt/lt/eq result.
    /// </summary>
    public class ComparisonComparer<A> : IComparer<A>
    {
        private readonly Func<A, A, Ordering> f;

        /// <summary>
        /// Builds a comparer out of a function.
        /// </summary>
        public ComparisonComparer(Func<A, A, Ordering> f) => this.f = f;

        public int Compare(A x, A y) =>
            f(x, y) switch
            {
                Ordering.Gt => 1,
                Ordering.Lt => -1,
                Ordering.Eq => 0,
                _ => throw new ArgumentOutOfRangeException()
            };
    }
}


text:
package javax.portlet.tck.portlets;

import javax.inject.Inject;
import javax.portlet.ActionRequest;
import javax.portlet.ActionResponse;
import javax.portlet.BaseURL;
import javax.portlet.PortletConfig;
import javax.portlet.PortletException;
import javax.portlet.RenderRequest;
import javax.portlet.RenderResponse;
import javax.portlet.ResourceRequest;
import javax.portlet.ResourceResponse;
import javax.portlet.annotations.RenderMethod;
import javax.portlet.tck.beans.TestResult;
import javax.portlet.tck.util.ModuleTestCaseDetails;

import java.io.IOException;
import java.io.PrintWriter;

import static javax.portlet.tck.constants.Constants.THREADID_ATTR;
import static javax.portlet.tck.util.ModuleTestCaseDetails.V3URLTESTS_BASEURL_APPEND;
import static javax.portlet.tck.util.ModuleTestCaseDetails.V3URLTESTS_BASEURL_APPEND2;
import static javax.portlet.tck.util.ModuleTestCaseDetails.V3URLTESTS_BASEURL_APPEND3;
import static javax.portlet.tck.util.ModuleTestCaseDetails.V3URLTESTS_BASEURL_APPEND4;

/**
 * This portlet implements several test cases for the JSR 362 TCK. The test case
 * names are defined in the /src/main/resources/xml-resources/additionalTCs.xml
 * file. The build process will integrate the test case names defined in the
 * additionalTCs.xml file into the complete list of test case names for
 * execution by the driver.
 *
 * This is the main portlet for the test cases. If the test cases call for
 * events, this portlet will initiate the events, but not process them. The
 * processing is done in the companion portlet PortletContextTests_Context_event
 *
 */

public class URLTests_BaseURL {

   @Inject
   PortletConfig portletConfig;

   public void processAction(ActionRequest portletReq,
         ActionResponse portletResp) throws PortletException, IOException {
   }

   public void serveResource(ResourceRequest portletReq,
         ResourceResponse portletResp) throws PortletException, IOException {
   }

   @RenderMethod(portletNames = "BaseURLTests")
   public void render(RenderRequest portletReq, RenderResponse portletResp)
         throws PortletException, IOException {

      long tid = Thread.currentThread().getId();
      portletReq.setAttribute(THREADID_ATTR, tid);

      PrintWriter writer = portletResp.getWriter();

      ModuleTestCaseDetails tcd = new ModuleTestCaseDetails();

      /* TestCase: V3URLTests_BaseURL_append */
      /*
       * Details: "BaseURL.append(Appendable out) method appends the portlet URL
       * to the appendable object."
       */
      {
         TestResult tr0 = tcd.getTestResultFailed(V3URLTESTS_BASEURL_APPEND);
         BaseURL baseURL = portletResp.createRenderURL();
         StringBuilder sb = new StringBuilder();
         baseURL.append(sb);
         String resultingString = sb.toString();
         if (resultingString != null && !resultingString.equals("")) {
            tr0.setTcSuccess(true);
            tr0.appendTcDetail(
                  "
Successfully appended BaseURL object to StringBuilder.
Resulting StringBuilder object is: "
                        + resultingString);
         } else {
            tr0.appendTcDetail(
                  "
Failed because couldn't append BaseURL to StringBuilder object.
Resulting StringBuilder object is: "
                        + resultingString);
         }
         tr0.writeTo(writer);
      }

      /* TestCase: V3URLTests_BaseURL_append2 */
      /*
       * Details:
       * "BaseURL.append(Appendable out) - The appended URL is always XML escaped."
       */
      {
         TestResult tr1 = tcd.getTestResultFailed(V3URLTESTS_BASEURL_APPEND2);
         BaseURL baseURL = portletResp.createRenderURL();
         baseURL.setParameter("tr1", ">'\"");
         StringBuilder sb = new StringBuilder();
         baseURL.append(sb);
         String resultingString = sb.toString();
         if (resultingString != null && !resultingString.equals("")
               && !resultingString.contains(">")
               && !resultingString.contains("'")
               && !resultingString.contains("\"")) {
            tr1.setTcSuccess(true);
            tr1.appendTcDetail(
                  "
Successfully appended XMLescaped BaseURL object to StringBuilder.
Resulting StringBuilder object is: "
                        + resultingString);
         } else {
            tr1.appendTcDetail(
                  "
Failed because couldn't append XMLescaped BaseURL to StringBuilder object.
Resulting StringBuilder object is: "
                        + resultingString);
         }
         tr1.writeTo(writer);
      }

      /* TestCase: V3URLTests_BaseURL_append3 */
      /*
       * Details: "BaseURL.append(Appendable out, boolean escapeXML) - If the
       * parameter escapeXML is set to true, the URL will be escaped to be valid
       * XML characters. The manner in which escaping is performed is
       * implementation specific."
       */
      {
         TestResult tr2 = tcd.getTestResultFailed(V3URLTESTS_BASEURL_APPEND3);
         BaseURL baseURL = portletResp.createRenderURL();
         baseURL.setParameter("tr2", ">'\"");
         StringBuilder sb = new StringBuilder();
         baseURL.append(sb, true);
         String resultingString = sb.toString();
         if (resultingString != null && !resultingString.equals("")
               && !resultingString.contains(">")
               && !resultingString.contains("'")
               && !resultingString.contains("\"")) {
            tr2.setTcSuccess(true);
            tr2.appendTcDetail(
                  "
Successfully appended XMLescaped BaseURL object to StringBuilder.
Resulting StringBuilder object is: "
                        + resultingString);
         } else {
            tr2.appendTcDetail(
                  "
Failed because couldn't append XMLescaped BaseURL to StringBuilder object.
Resulting StringBuilder object is: "
                        + resultingString);
         }
         tr2.writeTo(writer);
      }

      /* TestCase: V3URLTests_BaseURL_append4 */
      /*
       * Details: "BaseURL.append(Appendable out, boolean escapeXML) - If
       * escapeXML is set to false, escaping the URL is left to the
       * implementation."
       */
      {
         TestResult tr3 = tcd.getTestResultFailed(V3URLTESTS_BASEURL_APPEND4);
         tr3.setTcSuccess(true);
         tr3.appendTcDetail("Can't be tested as escaping is left to implementation.");
         tr3.writeTo(writer);
      }

   }

}


text:
package Drawer_fragments;

import android.content.Context;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Spinner;

import com.careconnectpatient.R;

/**
 * Class for assigning precept for patient
 */
public class PreceptAssignFragment extends Fragment implements View.OnClickListener {

    preceptAssignListener mCommunicator;

    public PreceptAssignFragment() {
        // Required empty public constructor
    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        getActivity().setTitle("Assign Precept");
        View view = inflater.inflate(R.layout.fragment_precept_assign, container, false);
        Spinner spinner = (Spinner) view.findViewById(R.id.precept_spinner);
        mCommunicator.populateSpinner(spinner);
        return view;
    }

    @Override
    public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
        super.onViewCreated(view, savedInstanceState);
        Button mAddButton = (Button) view.findViewById(R.id.assign_precept_button);
        Button mRemoveButton = (Button) view.findViewById(R.id.remove_precept_button);
        mAddButton.setOnClickListener(this);
        mRemoveButton.setOnClickListener(this);
    }

    //Override method from View.OnClickListener
    @Override
    public void onClick(final View v) {
        //TODO: create all editTexts
        Spinner mPatientSpinnerView = (Spinner) getView().findViewById(R.id.precept_spinner);
        String patient = mPatientSpinnerView.getSelectedItem().toString();
        Context context = getContext();

        //Switching between buttons
        switch(v.getId()){
            case R.id.assign_precept_button:

                EditText mOptAngleView = (EditText) getView().findViewById(R.id.precept_opt_angle);
                EditText mMaxAngleView = (EditText) getView().findViewById(R.id.precept_max_angle);
                EditText mDurationView = (EditText) getView().findViewById(R.id.precept_duration);
                EditText mFrequencyView = (EditText) getView().findViewById(R.id.precept_frequency);

                int o_angle = 0;
                int m_angle = 0;
                int duration = 0;
                int frequency = 0;
                boolean cancel = false;
                View focusView = null;

                if(!TextUtils.isEmpty(mOptAngleView.getText())) {
                    o_angle = Integer.parseInt(mOptAngleView.getText().toString());
                }
                else {
                    cancel = true;
                    mOptAngleView.setError(getString(R.string.error_field_required));
                    focusView = mOptAngleView;
                }

                if(!TextUtils.isEmpty(mMaxAngleView.getText())) {
                    m_angle = Integer.parseInt(mMaxAngleView.getText().toString());
                }
                else{
                    cancel = true;
                    mMaxAngleView.setError(getString(R.string.error_field_required));
                    focusView = mMaxAngleView;
                }

                if(!TextUtils.isEmpty(mDurationView.getText())) {
                    duration = Integer.parseInt(mDurationView.getText().toString());
                }
                else{
                    cancel = true;
                    mDurationView.setError(getString(R.string.error_field_required));
                    focusView = mDurationView;
                }

                if(!TextUtils.isEmpty(mFrequencyView.getText())) {
                    frequency = Integer.parseInt(mFrequencyView.getText().toString());
                }
                else{
                    cancel = true;
                    mFrequencyView.setError(getString(R.string.error_field_required));
                    focusView = mFrequencyView;
                }

                if(cancel){
                    focusView.requestFocus();
                }
                else{
                    mCommunicator.assignPrecept(patient, o_angle, m_angle, duration, frequency);
                }
                break;

            case R.id.remove_precept_button:
                mCommunicator.removeAssignment(patient, context);
                break;
        }

    }

    @Override
    public void onAttach(Context context) {
        super.onAttach(context);
        if (context instanceof preceptAssignListener) {
            mCommunicator = (preceptAssignListener) context;
        } else {
            throw new RuntimeException(context.toString());
        }
    }

    @Override
    public void onDetach() {
        super.onDetach();
        mCommunicator = null;
    }

    public interface preceptAssignListener{
        void populateSpinner(Spinner spinner);
        void assignPrecept(String patient, int o_angle, int m_angle, int duration, int frequency);
        void removeAssignment(String patient, Context context);
    }

}


text:
import csv
import os
import errno

class ArticleMappingWriter(object):

    def __init__(self, filepath, delimiter=','):
        self.__delimiter = delimiter
        self.__filepath = filepath
        self.__file = None
        self.__writer = None
        self.__currentId = -1
        self.__currentOrigId = ""

    def open(self):
        if not os.path.exists(os.path.dirname(self.__filepath)):
            try:
                os.makedirs(os.path.dirname(self.__filepath))
            except OSError as exc: # Guard against race condition
                if exc.errno != errno.EEXIST:
                    raise

        # w  = writing, will empty file and write from beginning (file is created)
        # a+ = read and append (file is created if it does not exist)
        self.__file = open(self.__filepath, 'w', newline='', encoding="UTF-8")
        self.__writer = csv.writer(self.__file)
        return self

    def close(self):
        self.__file.close()

    def printHeader(self, template=None):
        if template is None:
            self.__writer.writerow(["article_id", "arcticle_url"])
        else:
            self.__writer.writerow(template)

    def mapToId(self, origArticleId, articleUrl):
        if self.__currentOrigId == origArticleId:
            return self.__currentId

        self.__currentId += 1
        self.__currentOrigId = origArticleId
        self.__writer.writerow([self.__currentId, articleUrl])
        return self.__currentId

    def __enter__(self):
        return self.open()

    def __exit__(self, type, value, traceback):
        self.close()

if __name__ == '__main__':
    writer = ArticleMappingWriter(os.path.join("data", "arcticleIdsTest.csv"))
    writer.open()
    writer.printHeader()
    writer.mapToId("abc", "url1")
    writer.mapToId("abc", "url1")
    writer.mapToId("bcd", "url2")
    writer.mapToId("cde", "url3")
    writer.close()


text:
/*
	-----------------------------------------------------------------
	SETTINGS
	Test itemSelector options passed to init()
	-----------------------------------------------------------------
 */

module("API: init(itemSelector)");

test("itemSelector accept a valid document.querySelector or CSS3 string value", function() {

	$("body").append("

");

	expect(10);

	var cal = new CalHeatMap();
	equal(cal.init({itemSelector: "#a", paintOnLoad: false}), true, "#a is a valid itemSelector");
	equal($("#a .cal-heatmap-container").length, 1, "Calendar is appended to #a");

	equal(cal.init({itemSelector: "#a + #b", paintOnLoad: false}), true, "#a + #b is a valid itemSelector");
	equal($("#b .cal-heatmap-container").length, 1, "Calendar is appended to #a + #b");

	equal(cal.init({itemSelector: "div[data=y]", paintOnLoad: false}), true, "div[data=y] is a valid itemSelector");
	equal($("div[data=y] .cal-heatmap-container").length, 1, "Calendar is appended to div[data=y]");

	equal(cal.init({itemSelector: ".u", paintOnLoad: false}), true, ".u is a valid itemSelector");
	equal($(".u .cal-heatmap-container").length, 1, "Calendar is appended to .u");

	equal(cal.init({itemSelector: "#test > div:last-child", paintOnLoad: false}), true, "#test > div:last-child is a valid itemSelector");
	equal($("#last .cal-heatmap-container").length, 1, "Calendar is appended to #test > div:last-child");

	$("#test").remove();
});

test("itemSelector accept a valid Element object", function() {

	$("body").append("

");

	expect(10);

	var cal = new CalHeatMap();
	equal(cal.init({itemSelector: document.querySelector("#a"), paintOnLoad: false}), true, "document.querySelector(\"#a\") is a valid itemSelector");
	equal($("#a .graph").length, 1, "Graph is appended to #a");

	equal(cal.init({itemSelector: $("#b")[0], paintOnLoad: false}), true, "$(\"#b\")[0] is a valid itemSelector");
	equal($("#b .graph").length, 1, "Graph is appended to #b");

	equal(cal.init({itemSelector: document.getElementById("last"), paintOnLoad: false}), true, "document.getElementById(\"last\") is a valid itemSelector");
	equal($("#last .graph").length, 1, "Graph is appended to #last");

	equal(cal.init({itemSelector: document.getElementsByClassName("u")[0], paintOnLoad: false}), true, "document.getElementsByClassName(\".u\") is a valid itemSelector");
	equal($(".u .graph").length, 1, "Graph is appended to .u");

	equal(cal.init({itemSelector: d3.select("[data=y]")[0][0], paintOnLoad: false}), true, "d3.select(\"[data=y]\")[0][0] is a valid itemSelector");
	equal($("div[data=y] .graph").length, 1, "Graph is appended to div[data=y]");

	$("#test").remove();
});

function _testInvalidItemSelector(name, input) {
	test("Invalid itemSelector (" + name + ") throws an Error", function() {
		expect(1);

		throws(function() { createCalendar({itemSelector: input}); });
	});
}

_testInvalidItemSelector("empty string", "");
_testInvalidItemSelector("array", []);
_testInvalidItemSelector("number", 15);
_testInvalidItemSelector("function", function() {});

test("itemSelector target does not exist", function() {
	expect(1);

	throws(function() { createCalendar({itemSelector: "#test"}); }, "Non-existent itemSelector raises an Error");
});


text:
import datetime
import getpass
import gzip
import json
import os
import zlib

CONFIG_FOLDER_PATH = os.path.expanduser("~/.config/s4")
CONFIG_FILE_PATH = os.path.join(CONFIG_FOLDER_PATH, "sync.conf")

def try_decompress(body):
    # Attempt multiple levels of fallback in case we cannot
    # figure out the compression type using `magic`
    try:
        return gzip.decompress(body)
    except OSError:
        pass

    try:
        return zlib.decompress(body)
    except zlib.error:
        raise ValueError("Unknown compression format")

def to_timestamp(dt):
    epoch = datetime.datetime(1970, 1, 1, tzinfo=datetime.timezone.utc)
    return (dt - epoch) / datetime.timedelta(seconds=1)

def get_input(*args, secret=False, required=False, blank=False, **kwargs):
    """
    secret: Don't show user input when they are typing.
    required: Keep prompting if the user enters an empty value.
    blank: turn all empty strings into None.
    """

    while True:
        if secret:
            value = getpass.getpass(*args, **kwargs)
        else:
            value = input(*args, **kwargs)

        if blank:
            value = value if value else None

        if not required or value:
            break

    return value

def get_config():
    if not os.path.exists(CONFIG_FILE_PATH):
        return {"targets": {}}

    with open(CONFIG_FILE_PATH, "r") as fp:
        config = json.load(fp)
    return config

def set_config(config):
    if not os.path.exists(CONFIG_FOLDER_PATH):
        os.makedirs(CONFIG_FOLDER_PATH)

    with open(CONFIG_FILE_PATH, "w") as fp:
        json.dump(config, fp, indent=5)


text:
FactoryGirl.define do
  factory :call_forward do
    association :phone_number
    #OPTIMIZE Make sure that the phone_number's phone_numberable
    # isn't a phone_book_entry but a sip_account.
    #f.sequence( :call_forward_case_id ) { |n| CallForwardCase.where(:value => "always").first.id }
    #f.association :call_forward_case
    sequence( :call_forward_case_id  ) { |n| 1 }
    sequence( :destination  ) { |n| "20#{n}" }
    sequence( :to_voicemail ) { |n| false }
    sequence( :timeout      ) { |n| nil }
    sequence( :source       ) { |n| nil }
    sequence( :depth        ) { |n| 5 }
    sequence( :active       ) { |n| false }
  end
end


text:
The folder tests/ contains resources for automated testing tools.

Here you will find PHPUnit, Behat, etc. files to test the functionaly
of Hubzilla. Right now it only contains some basic tests to see if feasable
this can help improve the project.

# Contents

* unit/           PHPUnit tests
These are unit tests to check the smallest parts, like single functions.
It uses the tool PHPUnit https://phpunit.de/

* acceptance/     functional/acceptance testing
These are behavioral or so called functional/acceptance testing. They
are used to test business logic. They are written in Gherkin and use
the tool Behat http://behat.org/

# How to use?
You need the dev tools which are defined in the composer.json in the
require-dev configuration.
Run ```composer install``` without --no-dev to install these tools.

To run unit tests run ```vendor/bin/phpunit tests/unit/```

To run acceptance tests run ```vendor/bin/behat --config tests/acceptance/behat.yml```


text:
[Official Tutorial](https://git-scm.com/docs/gittutorial)

## Introduction

 -	Overview of Git approach as compared to TFS
    - TFS is centralized (SQL Server, TFS Server, Collections, Projects)
    - Easy merges / No "Abandon Ship Procedure"
    - Git is decentralized

      ![](./git-flow.png)
 -	Behind the scenes: What's happening??
    - Commits are just diffs
      ![](./stages.png)
 -	Tools
    -	Commandline
    - SourceTree
    -	VS Code
    -	Visual Studio

 -	Tips and Tricks: How do I fix it when I … ?
    - First things first:
    ```
    git config --global user.name "Dan Wolf"
    git config --global user.email dcwolf@gmail.com
    git config --global credential.helper wincred
    ```
    - If you forget the above before pushing your initial commit, do a quick ` git rebase` and `git commit --amend --author="Dan Wolf <dcwolf@gmail.com>" -m "initial commit"`. You'll need to force the push with `git push -u origin master -f`
    - `.gitignore` and `.gitkeep`
    - Remove ignored files from cache (another term for stage or index)
    ```
    foreach ($i in iex 'git ls-files -i --exclude-from=.gitignore') { git rm --cached $i }
    ```
    - If you get the following error:
    ```
    remote: error: File astilectron-eg/5.single_binary_distribution/vendor.go is 199.38 MB; this exceeds GitHub's file size limit of 100.00 MB
    To https://github.com/PaluMacil/misc.git
    ! [remote rejected] master -> master (pre-receive hook declined)
    ```
    ...you will need to remove this file from history because it was too large for Github (100 MB max). If you want apply these changes to ALL branches, you need to use a `-- --all` flag instead of `HEAD`. This is only for when 100% necessary. If other people have somehow pulled your code, they will lose continuity. Make sure the filepath (or dir) is accurate. Note that in my example, I used the path as shown from the error. This command is run from the repository root folder.
    ```
    git filter-branch --index-filter 'git rm -r --cached --ignore-unmatch vendor.go' -f HEAD
    ```
    - Reset (before push) to to set the files back to the state they were in a previous commit (for example, the parent of HEAD).
    ```
    git reset --hard <SOME-COMMIT, e.g. ~HEAD>
    ```
    - Or, if you only want to add changes to previous commit, you could do a `git reset --soft HEAD~` which will undo the previous commit but leave your changes staged. In other words, your files won't be touched.
## Keep things Organized

 -  File Hygiene
    - Tagging:  `git tag -a v0.2 -m "migration from Bottle to Flask"` This annotates a point in history. As a bonus, the [semantic version](http://semver.org) in the annotation will cause Github to make this a release. If you need more control, consider [creating the release manually](https://help.github.com/articles/creating-releases) on Github. Finally, don't forget to `git push --tags` since they don't get pushed to a remote without explicitly doing so.

## Tips and Tricks: How do I fix it when I … ?
- First things first:
  - Set up how
  ```
  git config --global user.name "Dan Wolf"
  git config --global user.email dcwolf@gmail.com
  git config --global credential.helper wincred
  ```
  - `.gitignore` and `.gitkeep`
  - Remove ignored files from cache (another term for stage or index)
  ```
  foreach ($i in iex 'git ls-files -i --exclude-from=.gitignore') { git rm --cached $i }
  ```
- If you get the following error:
```
remote: error: File astilectron-eg/5.single_binary_distribution/vendor.go is 199.38 MB; this exceeds GitHub's file size limit of 100.00 MB
To https://github.com/PaluMacil/misc.git
! [remote rejected] master -> master (pre-receive hook declined)
```
...you will need to remove this file from history because it was too large for Github (100 MB max). If you want apply these changes to ALL branches, you need to use a `-- --all` flag instead of `HEAD`. This is only for when 100% necessary. If other people have somehow pulled your code, they will lose continuity. Make sure the filepath (or dir) is accurate. Note that in my example, I used the path as shown from the error. This command is run from the repository root folder.
```
git filter-branch --index-filter 'git rm -r --cached --ignore-unmatch vendor.go' -f HEAD
```
- Reset (before push) to to set the files back to the state they were in a previous commit (for example, the parent of HEAD).
```
git reset --hard <SOME-COMMIT, e.g. ~HEAD>
```
- Or, if you only want to add changes to previous commit, you could do a `git reset --soft HEAD~` which will undo the previous commit but leave your changes staged. In other words, your files won't be touched.

- If you already pushed, use `git revert HEAD` to create an "undo" commit. This will prevent other repos from getting mixed up. **HEAD** is simply the easy (non-SHA) name for your last commit.

- Commit your code *yesterday* if you forgot to commit and want the correct date reflected (omit backticks in PowerShell):
```
git commit --date="`date --date='n day ago'`" -am "Commit Message"
```

 - **When forking a Go project** you'll be faced with broken import paths if you use go get and suddenly have a new path to your repo. You have two choices.

    - Create the folder path of `GOPATH\src\user\` manually and `git clone https:\\path.git` into there (and `go get ./...` in there will still grab your deps) or...

    - Use a named remote that points to your fork. You'll need to use the name in pull / push operations after that:
    ```
    go get http://github.com/other-user/repo
    git remote add my-fork http://github.com/my-user/repo

    git pull --rebase my-fork
    git push my-fork
    ```

## Referencing Things

 - **`^` and `~`** The caret (^) specifies which parent, while tilde (`~`) moves back generations.

   - If you don't know the order of parents, you can see this through `git log` or `git show`. The order shown here is the order to use in this syntax.

   - "`HEAD^` means the first parent of the tip of the current branch. Remember that git commits can have more than one parent. `HEAD^` is short for `HEAD^1`, and you can also address `HEAD^2` and so on as appropriate. You can get to parents of any commit, not just `HEAD`. You can also move back through generations: for example, `master~2` means the grandparent of the tip of the master branch, favoring the first parent in cases of ambiguity. These specifiers can be chained arbitrarily , e.g., `topic~3^2`." (credit: [Greg Bacon](https://stackoverflow.com/users/123109/greg-bacon))

   ![](./git-tilde-hat.png)

   [credit: Alex Janzik](https://stackoverflow.com/users/22038/alex-janzik)

[← Back to Project List](../README.md)


text:
> ## This project is not being maintained anymore.
>
> Unfortunately, I'm not doing much work on REST APIs (or APIs in general) anymore, which means
> it's been a while since I last used Pragma in a real project or improved the ecosystem. If anyone
> wants to take over the project and keep it alive, feel free to reach out to me at
> hello@alessandro.codes.

[![Build Status](https://travis-ci.org/pragmarb/pragma.svg?branch=master)](https://travis-ci.org/pragmarb/pragma)
[![Coverage Status](https://coveralls.io/repos/github/pragmarb/pragma/badge.svg?branch=master)](https://coveralls.io/github/pragmarb/pragma?branch=master)
[![Maintainability](https://api.codeclimate.com/v1/badges/e51e8d7489eb72ab97ba/maintainability)](https://codeclimate.com/github/pragmarb/pragma/maintainability)

Welcome to Pragma, an expressive, opinionated ecosystem for building beautiful RESTful APIs with
Ruby.

You can think of this as a meta-gem that pulls in the following pieces:

- [Pragma::Operation](https://github.com/pragmarb/pragma-operation);
- [Pragma::Policy](https://github.com/pragmarb/pragma-policy);
- [Pragma::Decorator](https://github.com/pragmarb/pragma-decorator);
- [Pragma::Contract](https://github.com/pragmarb/pragma-contract).

Additionally, it also provides default CRUD operations that leverage all of the Pragma components
and will make creating new resources in your API a breeze.

Looking for a Rails integration? Check out [pragma-rails](https://github.com/pragmarb/pragma-rails)!

## Philosophy

Pragma was created with a very specific goal in mind: to make the development of JSON APIs a matter
of hours, not days. In other words, Pragma is for JSON APIs what Rails is for web applications.

Here are the ground rules:

1. **Pragma is opinionated.** With Pragma, you don't get to make a lot of choices and that's
   _exactly_ why people are using it: they want to focus on the business logic of their API rather
   than the useless details. We understand this approach will not work in some cases and that's
   alright. If you need more personalization, only use a subset of Pragma (see item 2) or something
   else.
2. **Pragma is modular.** Pragma is built as a set of gems (currently 6), plus some standalone
   tools. You can pick one or more modules and use them in your application as you see fit. Even
   though they are completely independent from each other, they nicely integrate and work best when
   used together, creating an ecosystem that will dramatically speed up your design and development
   process.
3. **Pragma is designed to be Rails-free.** Just as what happens with Trailblazer, our Rails
   integration is decoupled from the rest of the ecosystem and all of the gems can be used without
   Rails. This is just a byproduct of the project's design: Pragma is built with pure Ruby.
   [pragma-rails](https://github.com/pragmarb/pragma-rails) is the only available framework
   integration at the moment, but more will come!

### Why not Trailblazer?

[Trailblazer](https://github.com/trailblazer/trailblazer) and all of its companion projects are
awesome. They are so awesome that Pragma is built on top of them: even though we're not using
the Trailblazer gem itself yet, many of the Pragma gems are simply extensions of their Trailblazer
counterparts:

- decorators are [ROAR representers](https://github.com/apotonick/roar);
- contracts are [Reform forms](https://github.com/apotonick/reform);
- operations are [Trailblazer operations](https://github.com/trailblazer/trailblazer-operation).

Trailblazer and Pragma have different (but similar) places in the Ruby world: Trailblazer is an
architecture for building all kinds of web applications in an intelligent, rational way, while
Pragma is an architecture for building JSON APIs. We have shamelessly taken all of the flexibility
and awesomeness from the Trailblazer project and restricted it to a narrow field of work, providing
tools, helpers and integrations that could never be part of Trailblazer due to their specificity.

Thank you, guys!

## Installation

Add this line to your application's Gemfile:

```ruby
gem 'pragma'
```

And then execute:

```console
$ bundle
```

Or install it yourself as:

```console
$ gem install pragma
```

## Usage

### Project Structure

This gem works best if you follow the recommended structure for organizing resources:

```
└── api
    └── v1
        └── article
            ├── contract
            │   ├── create.rb
            │   └── update.rb
            ├── operation
            │   ├── create.rb
            │   ├── destroy.rb
            │   ├── index.rb
            │   └── update.rb
            └── decorator
            |   ├── collection.rb
            |   └── instance.rb
            └── policy.rb
```

Your modules and classes would, of course, follow the same structure: `API::V1::Article::Policy` and
so on and so forth.

If you adhere to this structure, the gem will be able to locate all of your classes without any
explicit configuration. This will save you a lot of time and is highly recommended.

### Fantastic Five

Pragma comes with five built-in operations, often referred to as Fantastic Five (or "FF" for
brevity). They are, of course, Index, Show, Create, Update and Destroy.

These operations leverage the full power of the integrated Pragma ecosystem and require all four
components to be properly installed and configured in your application. You may reconfigure them
to skip some of the steps, but it is highly recommended to use them as they come.

You can find these operations under [lib/pragma/operation](https://github.com/pragmarb/pragma/tree/master/lib/pragma/operation).
To use them, simply create your own operations and inherit from ours. For instance:

```ruby
module API
  module V1
    module Article
      module Operation
        class Create < Pragma::Operation::Create
          # This assumes that you have the following:
          #   1) an Article model
          #   2) a Policy (responding to #create?)
          #   3) a Create contract
          #   4) an Instance decorator
        end
      end
    end
  end
end
```

## Macros

The FF are implemented through their own set of macros, which take care of stuff like authorizing,
paginating, filtering etc.

If you want, you can use these macros in your own operations.

### Classes

**Used in:** Index, Show, Create, Update, Destroy

The `Classes` macro is responsible of tying together all the Pragma components: put it into an
operation and it will determine the class names of the related policy, model, decorators and
contract. You can override any of these classes when defining the operation or at runtime if you
wish.

Example usage:

```ruby
module API
  module V1
    module Article
      module Operation
        class Create < Pragma::Operation::Base
          # Let the macro figure out class names.
          step Pragma::Macro::Classes()
          step :execute!

          # But override the contract.
          self['contract.default.class'] = Contract::CustomCreate

          def execute!(options)
            # `options` contains the following:
            #
            #    `model.class`
            #    `policy.default.class`
            #    `policy.default.scope.class`
            #    `decorator.instance.class`
            #    `decorator.collection.class`
            #    `contract.default.class`
            #
            # These will be `nil` if the expected classes do not exist.
          end
        end
      end
    end
  end
end
```

### Model

**Used in:** Index, Show, Create, Update, Destroy

The `Model` macro provides support for performing different operations with models. It can either
build a new instance of the model, if you are creating a new record, for instance, or it can find
an existing record by ID.

Example of building a new record:

```ruby
module API
  module V1
    module Article
      module Operation
        class Create < Pragma::Operation::Base
          # This step can be done by Classes if you want.
          self['model.class'] = ::Article

          step Pragma::Macro::Model(:build)
          step :save!

          def save!(options)
            # Here you'd usually validate and assign parameters before saving.

            # ...

            options['model'].save!
          end
        end
      end
    end
  end
end
```

As we mentioned, `Model` can also be used to find a record by ID:

```ruby
module API
  module V1
    module Article
      module Operation
        class Show < Pragma::Operation::Base
          # This step can be done by Classes if you want.
          self['model.class'] = ::Article

          step Pragma::Macro::Model(:find_by), fail_fast: true
          step :respond!

          def respond!(options)
            options['result.response'] = Response::Ok.new(
              entity: options['model']
            )
          end
        end
      end
    end
  end
end
```

In the example above, if the record is not found, the macro will respond with `404 Not Found` and a
descriptive error message for you. If you want to override the error handling logic, you can remove
the `fail_fast` option and instead implement your own `failure` step.

### Policy

**Used in:** Index, Show, Create, Update, Destroy

The `Policy` macro ensures that the current user can perform an operation on a given record.

Here's a usage example:

```ruby
module API
  module V1
    module Article
      module Operation
        class Show < Pragma::Operation::Base
          # This step can be done by Classes if you want.
          self['policy.default.class'] = Policy

          step :model!
          step Pragma::Macro::Policy(), fail_fast: true
          # You can also specify a custom method to call on the policy:
          # step Pragma::Macro::Policy(action: :custom_method), fail_fast: true
          step :respond!

          def model!(params:, **)
            options['model'] = ::Article.find(params[:id])
          end
        end
      end
    end
  end
end
```

If the user is not authorized to perform the operation (i.e. if the policy's `#show?` method returns
`false`), the macro will respond with `403 Forbidden` and a descriptive error message. If you want
to override the error handling logic, you can remove the `fail_fast` option and instead implement
your own `failure` step.

The macro accepts the following options, which can be defined on the operation or at runtime:

- `policy.context`: the context to use for the policy (optional, `current_user` is used if not
  provided).

### Ordering

**Used in:** Index

As the name suggests, the `Ordering` macro allows you to easily implement default and user-defined
ordering.

Here's an example:

```ruby
module API
  module V1
    module Article
      module Operation
        class Index < Pragma::Operation::Base
          # This step can be done by Classes if you want.
          self['model.class'] = ::Article

          self['ordering.default_column'] = :published_at
          self['ordering.default_direction'] = :desc
          self['ordering.columns'] = %i[title published_at updated_at]

          step :model!

          # This will override `model` with the ordered relation.
          step Pragma::Macro::Ordering(), fail_fast: true

          step :respond!

          def model!(options)
            options['model'] = options['model.class'].all
          end

          def respond!(options)
            options['result.response'] = Response::Ok.new(
              entity: options['model']
            )
          end
        end
      end
    end
  end
end
```

If the user provides an invalid order column or direction, the macro will respond with `422 Unprocessable Entity`
and a descriptive error message. If you wish to implement your own error handling logic, you can
remove the `fail_fast` option and implement your own `failure` step.

The macro accepts the following options, which can be defined on the operation or at runtime:

- `ordering.columns`: an array of columns the user can order by.
- `ordering.default_column`: the default column to order by (default: `created_at`).
- `ordering.default_direction`: the default direction to order by (default: `desc`).
- `ordering.column_param`: the name of the parameter which will contain the order column.
- `ordering.direction_param`: the name of the parameter which will contain the order direction.

### Pagination

**Used in:** Index

The `Pagination` macro is responsible for paginating collections of records through
[will_paginate](https://github.com/mislav/will_paginate). It also allows your users to set the
number of records per page.

```ruby
module API
  module V1
    module Article
      module Operation
        class Index < Pragma::Operation::Base
          # This step can be done by Classes if you want.
          self['model.class'] = ::Article

          step :model!

          # This will override `model` with the paginated relation.
          step Pragma::Macro::Pagination(), fail_fast: true

          step :respond!

          def model!(options)
            options['model'] = options['model.class'].all
          end

          def respond!(options)
            options['result.response'] = Response::Ok.new(
              entity: options['model']
            )
          end
        end
      end
    end
  end
end
```

In the example above, if the page or per-page number fail validation, the macro will respond with
`422 Unprocessable Entity` and a descriptive error message. If you wish to implement your own error
handling logic, you can remove the `fail_fast` option and implement your own `failure` step.

The macro accepts the following options, which can be defined on the operation or at runtime:

- `pagination.page_param`: the parameter that will contain the page number.
- `pagination.per_page_param`: the parameter that will contain the number of items to include in each page.
- `pagination.default_per_page`: the default number of items per page.
- `pagination.max_per_page`: the max number of items per page.

This macro is best used in conjunction with the [Collection](https://github.com/pragmarb/pragma-decorator#collection)
and [Pagination](https://github.com/pragmarb/pragma-decorator#pagination) modules of
[Pragma::Decorator](https://github.com/pragmarb/pragma-decorator), which will expose all the
pagination metadata.

### Decorator

**Used in:** Index, Show, Create, Update

The `Decorator` macro uses one of your decorators to decorate the model. If you are using
[expansion](https://github.com/pragmarb/pragma-decorator#associations), it will also make sure that
the expansion parameter is valid.

Example usage:

```ruby
module API
  module V1
    module Article
      module Operation
        class Show < Pragma::Operation::Base
          # This step can be done by Classes if you want.
          self['decorator.instance.class'] = Decorator::Instance

          step :model!
          step Pragma::Macro::Decorator(), fail_fast: true
          step :respond!

          def model!(params:, **)
            options['model'] = ::Article.find(params[:id])
          end

          def respond!(options)
            # Pragma does this for you in the default operations.
            options['result.response'] = Response::Ok.new(
              entity: options['result.decorator.instance']
            )
          end
        end
      end
    end
  end
end
```

The macro accepts the following options, which can be defined on the operation or at runtime:

- `expand.enabled`: whether associations can be expanded.
- `expand.limit`: how many associations can be expanded at once.

## Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/pragmarb/pragma.

## License

The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).


text:
#include "PolyVoxExample.h"

#include "PolyVox/CubicSurfaceExtractor.h"
#include "PolyVox/MarchingCubesSurfaceExtractor.h"
#include "PolyVox/Mesh.h"
#include "PolyVox/RawVolume.h"

#include <QApplication>

//Use the PolyVox namespace
using namespace PolyVox;

void createSphereInVolume(RawVolume<uint8_t>& volData, float fRadius)
{
	//This vector hold the position of the center of the volume
	Vector3DFloat v3dVolCenter(volData.getWidth() / 2, volData.getHeight() / 2, volData.getDepth() / 2);

	//This three-level for loop iterates over every voxel in the volume
	for (int z = 0; z < volData.getDepth(); z++)
	{
		for (int y = 0; y < volData.getHeight(); y++)
		{
			for (int x = 0; x < volData.getWidth(); x++)
			{
				//Store our current position as a vector...
				Vector3DFloat v3dCurrentPos(x, y, z);
				//And compute how far the current position is from the center of the volume
				float fDistToCenter = (v3dCurrentPos - v3dVolCenter).length();

				uint8_t uVoxelValue = 0;

				//If the current voxel is less than 'radius' units from the center then we make it solid.
				if (fDistToCenter <= fRadius)
				{
					//Our new voxel value
					uVoxelValue = 255;
				}

				//Wrte the voxel value into the volume
				volData.setVoxel(x, y, z, uVoxelValue);
			}
		}
	}
}

class DecodeOnGPUExample : public PolyVoxExample
{
public:
	DecodeOnGPUExample(QWidget *parent)
		:PolyVoxExample(parent)
	{
	}

protected:
	void initializeExample() override
	{
		QSharedPointer<QGLShaderProgram> shader(new QGLShaderProgram);

		if (!shader->addShaderFromSourceFile(QGLShader::Vertex, ":/decode.vert"))
		{
			std::cerr << shader->log().toStdString() << std::endl;
			exit(EXIT_FAILURE);
		}

		if (!shader->addShaderFromSourceFile(QGLShader::Fragment, ":/decode.frag"))
		{
			std::cerr << shader->log().toStdString() << std::endl;
			exit(EXIT_FAILURE);
		}

		setShader(shader);

		//Create an empty volume and then place a sphere in it
		RawVolume<uint8_t> volData(PolyVox::Region(Vector3DInt32(0, 0, 0), Vector3DInt32(63, 63, 63)));
		createSphereInVolume(volData, 30);

		// Extract the surface for the specified region of the volume. Uncomment the line for the kind of surface extraction you want to see.
		auto mesh = extractMarchingCubesMesh(&volData, volData.getEnclosingRegion());

		//Pass the surface to the OpenGL window
		OpenGLMeshData meshData = buildOpenGLMeshData(mesh);
		addMeshData(meshData);

		setCameraTransform(QVector3D(100.0f, 100.0f, 100.0f), -(PI / 4.0f), PI + (PI / 4.0f));
	}

private:
	OpenGLMeshData buildOpenGLMeshData(const PolyVox::Mesh< PolyVox::MarchingCubesVertex< uint8_t > >& surfaceMesh, const PolyVox::Vector3DInt32& translation = PolyVox::Vector3DInt32(0, 0, 0), float scale = 1.0f)
	{
		// This struct holds the OpenGL properties (buffer handles, etc) which will be used
		// to render our mesh. We copy the data from the PolyVox mesh into this structure.
		OpenGLMeshData meshData;

		// Create the VAO for the mesh
		glGenVertexArrays(1, &(meshData.vertexArrayObject));
		glBindVertexArray(meshData.vertexArrayObject);

		// The GL_ARRAY_BUFFER will contain the list of vertex positions
		glGenBuffers(1, &(meshData.vertexBuffer));
		glBindBuffer(GL_ARRAY_BUFFER, meshData.vertexBuffer);
		glBufferData(GL_ARRAY_BUFFER, surfaceMesh.getNoOfVertices() * sizeof(MarchingCubesVertex< uint8_t >), surfaceMesh.getRawVertexData(), GL_STATIC_DRAW);

		// and GL_ELEMENT_ARRAY_BUFFER will contain the indices
		glGenBuffers(1, &(meshData.indexBuffer));
		glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, meshData.indexBuffer);
		glBufferData(GL_ELEMENT_ARRAY_BUFFER, surfaceMesh.getNoOfIndices() * sizeof(uint32_t), surfaceMesh.getRawIndexData(), GL_STATIC_DRAW);

		// Every surface extractor outputs valid positions for the vertices, so tell OpenGL how these are laid out
		glEnableVertexAttribArray(0); // Attrib '0' is the vertex positions
		glVertexAttribIPointer(0, 3, GL_UNSIGNED_SHORT, sizeof(MarchingCubesVertex< uint8_t >), (GLvoid*)(offsetof(MarchingCubesVertex< uint8_t >, encodedPosition))); //take the first 3 floats from every sizeof(decltype(vecVertices)::value_type)

		// Some surface extractors also generate normals, so tell OpenGL how these are laid out. If a surface extractor
		// does not generate normals then nonsense values are written into the buffer here and sghould be ignored by the
		// shader. This is mostly just to simplify this example code - in a real application you will know whether your
		// chosen surface extractor generates normals and can skip uploading them if not.
		glEnableVertexAttribArray(1); // Attrib '1' is the vertex normals.
		glVertexAttribIPointer(1, 1, GL_UNSIGNED_SHORT, sizeof(MarchingCubesVertex< uint8_t >), (GLvoid*)(offsetof(MarchingCubesVertex< uint8_t >, encodedNormal)));

		// Finally a surface extractor will probably output additional data. This is highly application dependant. For this example code
		// we're just uploading it as a set of bytes which we can read individually, but real code will want to do something specialised here.
		glEnableVertexAttribArray(2); //We're talking about shader attribute '2'
		GLint size = (std::min)(sizeof(uint8_t), size_t(4)); // Can't upload more that 4 components (vec4 is GLSL's biggest type)
		glVertexAttribIPointer(2, size, GL_UNSIGNED_BYTE, sizeof(MarchingCubesVertex< uint8_t >), (GLvoid*)(offsetof(MarchingCubesVertex< uint8_t >, data)));

		// We're done uploading and can now unbind.
		glBindVertexArray(0);

		// A few additional properties can be copied across for use during rendering.
		meshData.noOfIndices = surfaceMesh.getNoOfIndices();
		meshData.translation = QVector3D(translation.getX(), translation.getY(), translation.getZ());
		meshData.scale = scale;

		// Set 16 or 32-bit index buffer size.
		meshData.indexType = sizeof(PolyVox::Mesh< PolyVox::MarchingCubesVertex< uint8_t > >::IndexType) == 2 ? GL_UNSIGNED_SHORT : GL_UNSIGNED_INT;

		return meshData;
	}
};

int main(int argc, char *argv[])
{
	//Create and show the Qt OpenGL window
	QApplication app(argc, argv);
	DecodeOnGPUExample openGLWidget(0);
	openGLWidget.show();

	//Run the message pump.
	return app.exec();
}


text:
//!
//! @file   SignalNumericalInput.hpp
//! @author Robert Braun <robert.braun@liu.se>
//! @date   2014-07-03
//!
//! @brief Contains a numerical input component (for animation)
//!
//$Id$

#ifndef SIGNALNUMERICALINPUT_HPP_INCLUDED
#define SIGNALNUMERICALINPUT_HPP_INCLUDED

#include "ComponentEssentials.h"

namespace hopsan {

//!
//! @brief
//! @ingroup HydraulicComponents
//!
class SignalNumericalInput : public ComponentC
{

    private:
        double *mpOut;

    public:
        static Component *Creator()
        {
            return new SignalNumericalInput();
        }

        void configure()
        {
            //Add ports to the component
            addOutputVariable("out","","",0.0, &mpOut);
        }

        void initialize()
        {

        }

        void simulateOneTimestep()
        {

        }
    };
}

#endif


text:
<?php

namespace google\appengine\WordPress\Mail {

	use google\appengine\api\app_identity\AppIdentityService;
	use google\appengine\api\mail\Message;
	use Exception;

	/**
	 * Admin settings for the Mail module
	 *
	 * @package WordPress
	 * @subpackage Mail
	 */
	class Admin {
		/**
		 * Register our action
		 */
		public static function bootstrap(){
			add_action( 'appengine_register_settings', __CLASS__ . '::register_google_settings' );
		}

		/**
		 * Register our admin settings and settings UI
		 *
		 * @wp-action appengine_register_settings
		 */
		public static function register_google_settings() {
			register_setting( 'appengine_settings', 'appengine_email_enable', __CLASS__ . '::enable_validation' );
			register_setting( 'appengine_settings', 'appengine_email', __CLASS__ . '::email_validation' );

			add_settings_section( 'appengine-mail', __( 'Email Settings', 'appengine' ), __CLASS__ . '::section_text', 'appengine' );
			add_settings_field( 'appengine_email_enable', __( 'Use App Engine Email Service', 'appengine' ), __CLASS__ . '::enable_input', 'appengine', 'appengine-mail', [ 'label_for' => 'appengine_email_enable' ] );
			add_settings_field( 'appengine_email', __( 'App Email Address', 'appengine' ), __CLASS__ . '::email_input', 'appengine', 'appengine-mail', [ 'label_for' => 'appengine_email' ] );
		}

		/**
		 * Informational text for the settings section
		 */
		public static function section_text() {
?>

		<?php _e( "Emails from WordPress will be sent through the App Engine email infrastructure, including password emails and those sent from plugins. If you're not happy with the default email address, set it here.", 'appengine' ) ?>

<?php
		}

		/**
		 * Output the checkbox for the enable checkbox
		 */
		public static function enable_input() {
			$enabled = get_option( 'appengine_email_enable', true );
			echo '<input id="appengine_email_enable" name="appengine_email_enable"
				type="checkbox" ' . checked( $enabled, true, false ) . ' />';
		}

		/**
		 * Validate the enable checkbox input
		 *
		 * @param mixed $input
		 * @return bool
		 */
		public static function enable_validation( $input ) {
			return (bool) $input;
		}

		/**
		 * Output the input field for the email address override
		 */
		public static function email_input() {
			$email = get_option( 'appengine_email', '' );
			echo '<input id="appengine_email" name="appengine_email"
				type="email" value="' . esc_attr( $email ) . '" />';

			$desc = __( 'This address can be the email address of a registered administrator (developer) of your application or an address of the form %1$s.
If this is not set, this will default to %2$s', 'appengine' );
			echo '
'
				. sprintf(
					$desc,
					get_default_email( '[string]' ),
					get_default_email()
				) . '.
';
		}

		/**
		 * Validate the App Engine email address
		 *
		 * @param mixed $input
		 * @return string
		 */
		public static function email_validation( $input ) {
			$email = get_option( 'appengine_email', '' );

			if ( is_email( $input ) || empty($input) ) {
				$email = $input;
			}
			else {
				add_settings_error( 'appengine_email', 'invalid-email', __( 'You have entered an invalid e-mail address.', 'appengine' ) );
			}
			return $email;
		}
	}

	/**
	 * Get the default email address for App Engine
	 *
	 * @param string $user User part of the email address (typically 'wordpress')
	 * @return string Email address with the correct email domain
	 */
	function get_default_email( $user = 'wordpress' ) {
		// Let's build an email address for the app via the app identity api
		$service_account = new AppIdentityService();
		$id = $service_account->getApplicationId();
		if ( empty( $id ) ) {
			$service_account_name = $service_account->getServiceAccountName();
			$service_account_from_name = explode( '@', $service_account_name );
			$id = $service_account_from_name[0];
		}
		return $user . '@' . $id . '.appspotmail.com';
	}

	/**
	 * Send email
	 *
	 * This is based on {@see wp_mail()} which is in turn based on PHP's
	 * built-in mail() function. This is typically called from the overriden
	 * version of {@see wp_mail()} below.
	 *
	 * @param string|array $to          Array or comma-separated list of email addresses to send message.
	 * @param string       $subject     Email subject
	 * @param string       $message     Message contents
	 * @param string|array $headers     Optional. Additional headers.
	 * @param string|array $attachments Optional. Files to attach.
	 *
	 * @return bool Whether the email contents were sent successfully.
	 */
	function send_mail( $to, $subject, $message, $headers = '', $attachments = array() ) {

		// Compact the input, apply the filters, and extract them back out
		extract( apply_filters( 'wp_mail', compact( 'to', 'subject', 'message', 'headers', 'attachments' ) ) );

		global $phpmailer;

		if ( ! is_object( $phpmailer ) || ! is_a( $phpmailer, 'Message' ) ) {
			$phpmailer = new Message();
		}
		$cc  = array();
		$bcc = array();

		// Headers
		if ( empty( $headers ) ) {
			$headers = array();
		}
		else {
			if ( ! is_array( $headers ) ) {
				// Explode the headers out, so this function can take both
				// string headers and an array of headers.
				$tempheaders = explode( "\n", str_replace( "\r\n", "\n", $headers ) );
			}
			else {
				$tempheaders = $headers;
			}
			$headers = array();

			// If it's actually got contents
			if ( ! empty( $tempheaders ) ) {
				// Iterate through the raw headers
				foreach ( (array) $tempheaders as $header ) {
					if ( false === strpos( $header, ':' ) ) {
						if ( false !== stripos( $header, 'boundary=' ) ) {
							$parts    = preg_split( '/boundary=/i', trim( $header ) );
							$boundary = trim( str_replace( array( "'", '"' ), '', $parts[1] ) );
						}
						continue;
					}
					// Explode them out
					list( $name, $content ) = explode( ':', trim( $header ), 2 );

					// Cleanup crew
					$name    = trim( $name );
					$content = trim( $content );

					switch ( strtolower( $name ) ) {
						// Mainly for legacy -- process a From: header if it's there
						case 'from':
							if ( false !== strpos( $content, '<' ) ) {
								// So... making my life hard again?
								$from_name = substr( $content, 0, strpos( $content, '<' ) - 1 );
								$from_name = str_replace( '"', '', $from_name );
								$from_name = trim( $from_name );

								$from_email = substr( $content, strpos( $content, '<' ) + 1 );
								$from_email = str_replace( '>', '', $from_email );
								$from_email = trim( $from_email );
							}
							else {
								$from_email = trim( $content );
							}
							break;
						case 'content-type':
							if ( false !== strpos( $content, ';' ) ) {
								list( $type, $charset ) = explode( ';', $content );
								$content_type = trim( $type );
								if ( false !== stripos( $charset, 'charset=' ) ) {
									$charset = trim( str_replace( array( 'charset=', '"' ), '', $charset ) );
								}
								elseif ( false !== stripos( $charset, 'boundary=' ) ) {
									$boundary = trim( str_replace( array( 'BOUNDARY=', 'boundary=', '"' ), '', $charset ) );
									$charset  = '';
								}
							}
							else {
								$content_type = trim( $content );
							}
							break;
						case 'cc':
							$cc = array_merge( (array) $cc, explode( ',', $content ) );
							break;
						case 'bcc':
							$bcc = array_merge( (array) $bcc, explode( ',', $content ) );
							break;
						default:
							// Add it to our grand headers array
							$headers[trim( $name )] = trim( $content );
							break;
					}
				}
			}
		}

		// Empty out the values that may be set
		$phpmailer->clearBcc();
		$phpmailer->clearCc();
		$phpmailer->clearReplyTo();
		$phpmailer->clearTo();

		// From email and name
		// If we don't have a name from the input headers
		if ( ! isset( $from_name ) ) {
			$from_name = 'App Engine';
		}

		/* If we don't have an email from the input headers default to wordpress@$sitename
		* Some hosts will block outgoing mail from this address if it doesn't exist but
		* there's no easy alternative. Defaulting to admin_email might appear to be another
		* option but some hosts may refuse to relay mail from an unknown domain. See
		* http://trac.wordpress.org/ticket/5007.
		*/

		if ( ! isset( $from_email ) ) {
			$from_email = get_option( 'appengine_email', false );
			if ( ! $from_email ) {
				$from_email = get_default_email();
			}
		}

		// Plugin authors can override the potentially troublesome default
		// TODO: Currently, App Engine doesn't support a from name. We should
		//       come back to this and fix it if/when it does
		//$phpmailer->setSender( apply_filters( 'wp_mail_from_name', $from_name ) . " <" . apply_filters( 'wp_mail_from', $from_email ) . ">");
		$phpmailer->setSender( apply_filters( 'wp_mail_from', $from_email ) );

		// Set destination addresses
		if ( ! is_array( $to ) ) {
			$to = explode( ',', $to );
		}

		foreach ( (array) $to as $recipient ) {
			try {
				// Break $recipient into name and address parts if in the format "Foo <bar@baz.com>"
				$recipient_name = '';
				if ( preg_match( '/(.*)<(.+)>/', $recipient, $matches ) ) {
					if ( count( $matches ) == 3 ) {
						$recipient_name = $matches[1];
						$recipient      = $matches[2];
					}
				}
				$phpmailer->addTo( $recipient, $recipient_name );
			} catch ( Exception $e ) {
				syslog( LOG_DEBUG, 'Mail error: ' . $e->getMessage() );
				continue;
			}
		}

		// Add any CC and BCC recipients
		$cc  = array_filter( $cc );
		$bcc = array_filter( $bcc );

		if ( ! empty( $cc ) ) {
			foreach ( (array) $cc as $recipient ) {
				try {
					// Break $recipient into name and address parts if in the format "Foo <bar@baz.com>"
					$recipient_name = '';
					if ( preg_match( '/(.*)<(.+)>/', $recipient, $matches ) ) {
						if ( count( $matches ) == 3 ) {
							$recipient_name = $matches[1];
							$recipient      = $matches[2];
						}
					}
					$phpmailer->addCc( $recipient, $recipient_name );
				} catch ( Exception $e ) {
					syslog( LOG_DEBUG, 'Mail error: ' . $e->getMessage() );
					continue;
				}
			}
		}

		if ( ! empty( $bcc ) ) {
			foreach ( (array) $bcc as $recipient ) {
				try {
					// Break $recipient into name and address parts if in the format "Foo <bar@baz.com>"
					$recipient_name = '';
					if ( preg_match( '/(.*)<(.+)>/', $recipient, $matches ) ) {
						if ( count( $matches ) == 3 ) {
							$recipient_name = $matches[1];
							$recipient      = $matches[2];
						}
					}
					$phpmailer->addBcc( $recipient, $recipient_name );
				} catch ( Exception $e ) {
					syslog( LOG_DEBUG, 'Mail error: ' . $e->getMessage() );
					continue;
				}
			}
		}

		// Set Content-Type and charset
		// If we don't have a content-type from the input headers
		if ( ! isset( $content_type ) ) {
			$content_type = 'text/plain';
		}

		$content_type = apply_filters( 'wp_mail_content_type', $content_type );

		// Set whether it's plaintext, depending on $content_type
		if ( 'text/html' == $content_type ) {
			$phpmailer->setHtmlBody( $message );
		}
		else {
			$phpmailer->setTextBody( $message );
		}

		$phpmailer->setSubject( $subject );
		// If we don't have a charset from the input headers
		if ( !isset( $charset ) ) {
			$charset = get_bloginfo( 'charset' );
		}

		// Set the content-type and charset
		//$phpmailer->charsset = apply_filters( 'wp_mail_charset', $charset );

		// Set custom headers
		if ( !empty( $headers ) ) {
			if ( isset( $headers['MIME-Version'] ) ) {
				unset( $headers['MIME-Version'] );
			}
			$phpmailer->addHeaderArray( $headers );

			if ( false !== stripos( $content_type, 'multipart' ) && ! empty($boundary) ) {
				$phpmailer->addHeaderArray( 'Content-Type', sprintf( "%s;\n\t boundary=\"%s\"", $content_type, $boundary ) );
			}
		}

		if ( !empty( $attachments ) ) {
			foreach ( $attachments as $attachment ) {
				try {
					$name = basename( $attachment );
					$data = file_get_contents( $attachment );
					$phpmailer->addAttachment( $name, $data );
				} catch ( Exception $e ) {
					syslog( LOG_DEBUG, 'Mail error: ' . $e->getMessage() );
					continue;
				}
			}
		}

		// Send!
		$phpmailer->send();

		return true;
	}

	Admin::bootstrap();
}

namespace {
	use google\appengine\WordPress;
	use google\appengine\WordPress\Mail;

	if ( get_option( 'appengine_email_enable', true ) && !function_exists( 'wp_mail' ) ) {
		/**
		 * Send mail, similar to PHP's mail
		 *
		 * @uses \google\appengine\WordPress\Mail\send_mail()
		 *
		 * @param string|array $to          Array or comma-separated list of email addresses to send message.
		 * @param string       $subject     Email subject
		 * @param string       $message     Message contents
		 * @param string|array $headers     Optional. Additional headers.
		 * @param string|array $attachments Optional. Files to attach.
		 *
		 * @return bool Whether the email contents were sent successfully.
		 */
		function wp_mail( $to, $subject, $message, $headers = '', $attachments = array() ) {
			$GLOBALS[ 'appengine_mail_last_error' ] = null;
			try {
				return Mail\send_mail( $to, $subject, $message, $headers, $attachments );
			} catch ( Exception $e ) {
				$GLOBALS[ 'appengine_mail_last_error' ] = $e;
				syslog( LOG_DEBUG, 'Mail error: ' . $e->getMessage() );
				return false;
			}
		}
	}
}


text:
<!doctype html>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
    <title>login-polyform Demo</title>

    <link rel="import" href="../login-polyform.html">

An example of <login-polyform>:

    <template is="dom-bind" id="app">
      <login-polyform on-login="handleLogin" credentials="{{_user}}">

      </login-polyform>
    </template>


text:
<?xml version="1.0" encoding="UTF-8"?>
<imageIndex>
  <image>
    <originalFileName>IMG_7791.jpg</originalFileName>
    <size>365766</size>
    <dateLastModified>Thu, 05 Jan 2012 05:09:49 GMT</dateLastModified>
    <width>1365</width>
    <height>2048</height>
    <cachedImage>
      <fileName>2volz5bs.jpeg</fileName>
      <dateCreated>Thu, 05 Jan 2012 05:17:12 GMT</dateCreated>
      <dateLastAccessed>Wed, 04 Mar 2015 15:33:38 GMT</dateLastAccessed>
      <imageFormat>jpeg</imageFormat>
      <compression>90</compression>
      <width>67</width>
      <height>100</height>
      <bgColor>#FFFFFF</bgColor>
      <transparent>True</transparent>
      <border>0</border>
      <borderColor>#000000</borderColor>
      <constrain>True</constrain>
      <pad>False</pad>
    </cachedImage>
    <cachedImage>
      <fileName>00lnbm3b.jpeg</fileName>
      <dateCreated>Thu, 05 Jan 2012 18:19:45 GMT</dateCreated>
      <dateLastAccessed>Thu, 12 Mar 2015 17:51:31 GMT</dateLastAccessed>
      <imageFormat>jpeg</imageFormat>
      <compression>90</compression>
      <width>400</width>
      <height>600</height>
      <bgColor>#FFFFFF</bgColor>
      <transparent>True</transparent>
      <border>0</border>
      <borderColor>#000000</borderColor>
      <constrain>True</constrain>
      <pad>False</pad>
    </cachedImage>
    <cachedImage>
      <fileName>5iqk2ohk.jpeg</fileName>
      <dateCreated>Thu, 05 Apr 2012 14:18:10 GMT</dateCreated>
      <dateLastAccessed>Tue, 13 Jan 2015 20:59:05 GMT</dateLastAccessed>
      <imageFormat>jpeg</imageFormat>
      <compression>90</compression>
      <width>1365</width>
      <height>2048</height>
      <bgColor>#FFFFFF</bgColor>
      <transparent>True</transparent>
      <border>0</border>
      <borderColor>#000000</borderColor>
      <constrain>False</constrain>
      <pad>False</pad>
    </cachedImage>
  </image>
</imageIndex>


text:
"""Stop the arcyd instance for the current directory."""
# =============================================================================
# CONTENTS
# -----------------------------------------------------------------------------
# abdcmd_stop
#
# Public Functions:
#   getFromfilePrefixChars
#   setupParser
#   process
#
# -----------------------------------------------------------------------------
# (this contents block is generated, edits will be lost)
# =============================================================================

from __future__ import absolute_import
from __future__ import division
from __future__ import print_function

import abdi_startstop

def getFromfilePrefixChars():
    return None

def setupParser(parser):
    parser.add_argument(
        '-m',
        '--message',
        default='',
        help="reason for stopping arcyd")

def process(args):
    abdi_startstop.stop_arcyd(args.message)

# -----------------------------------------------------------------------------
# Copyright (C) 2014-2015 Bloomberg Finance L.P.
#
# 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.
# ------------------------------ END-OF-FILE ----------------------------------


text:
// Generated by xsd compiler for android/java
// DO NOT CHANGE!
package ebay.apis.eblbasecomponents;

/**
 *
 * MyMessagesFolderOperationCodeType - Indicates the type of
 * operation to perform on a specified My Messsages folder.
 * Operations cannot be performed on the Inbox or Sent folders.
 *
 */
public enum MyMessagesFolderOperationCodeType {

    /**
     *
   * If a folder has been removed, restores the specified folder
   * in My Messages. Because you cannot remove the Inbox and Sent folders,
   * they can also not be restored. Requires FolderName as input.
   *

   * Use Display to create a new custom folder. If you specify a FolderName
   * that has not be removed, a new My Messages folder is created.
   *
     */
    DISPLAY("Display"),

    /**
     *
   * Renames a specified folder. Inbox and Sent folders cannot be
   * renamed. To rename a folder, use FolderID to indicate the
   * folder to rename, and FolderName to indicate the new name.
   *
     */
    RENAME("Rename"),

    /**
     *
   * Removes a specified folder. Inbox and Sent folders cannot be
   * removed. Removing a folder that is not empty returns an
   * error. Requires FolderID as input.
   *
     */
    REMOVE("Remove"),

    /**
     *
   * Reserved for future or internal use.
   *
     */
    CUSTOM_CODE("CustomCode");

    private final String value;

    MyMessagesFolderOperationCodeType(String v) {
        value = v;
    }

    public String value() {
        return value;
    }

    public static MyMessagesFolderOperationCodeType fromValue(String v) {
        if (v != null) {
            for (MyMessagesFolderOperationCodeType c: MyMessagesFolderOperationCodeType.values()) {
                if (c.value.equals(v)) {
                    return c;
                }
            }
        }
        throw new IllegalArgumentException(v);
    }
}