text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using InternalEntity = Telligent.BigSocial.Polling.InternalApi.Poll;
using Telligent.Evolution.Extensibility.Api.Version1;
using TEApi = Telligent.Evolution.Extensibility.Api.Version1.PublicApi;
using Telligent.Evolution.Extensibility.Content.Version1;

namespace Telligent.BigSocial.Polling.PublicApi
{
	public delegate void PollBeforeCreateEventHandler(PollBeforeCreateEventArgs e);
	public delegate void PollAfterCreateEventHandler(PollAfterCreateEventArgs e);
	public delegate void PollBeforeUpdateEventHandler(PollBeforeUpdateEventArgs e);
	public delegate void PollAfterUpdateEventHandler(PollAfterUpdateEventArgs e);
	public delegate void PollBeforeDeleteEventHandler(PollBeforeDeleteEventArgs e);
	public delegate void PollAfterDeleteEventHandler(PollAfterDeleteEventArgs e);
	public delegate void PollRenderEventHandler(PollRenderEventArgs e);

	public class PollEvents : Telligent.Evolution.Extensibility.Events.Version1.EventsBase
	{
		#region Create

		private readonly object BeforeCreateEvent = new object();

		public event PollBeforeCreateEventHandler BeforeCreate
		{
			add { Add(BeforeCreateEvent, value); }
			remove { Remove(BeforeCreateEvent, value); }
		}

		internal void OnBeforeCreate(InternalEntity poll)
		{
			var handlers = Get<PollBeforeCreateEventHandler>(BeforeCreateEvent);
			if (handlers != null)
			{
				var args = new PollBeforeCreateEventArgs(poll);
				handlers(args);
			}

			TEApi.Html.Events.OnBeforeCreate(GetHtmlProperties(poll));
			TEApi.Content.Events.OnBeforeCreate(GetContent(poll));
		}

		private readonly object AfterCreateEvent = new object();

		public event PollAfterCreateEventHandler AfterCreate
		{
			add { Add(AfterCreateEvent, value); }
			remove { Remove(AfterCreateEvent, value); }
		}

		internal void OnAfterCreate(InternalEntity poll)
		{
			var handlers = Get<PollAfterCreateEventHandler>(AfterCreateEvent);
			if (handlers != null)
				handlers(new PollAfterCreateEventArgs(poll));

			TEApi.Content.Events.OnAfterCreate(GetContent(poll));
		}

		#endregion

		#region Update

		private readonly object BeforeUpdateEvent = new object();

		public event PollBeforeUpdateEventHandler BeforeUpdate
		{
			add { Add(BeforeUpdateEvent, value); }
			remove { Remove(BeforeUpdateEvent, value); }
		}

		internal void OnBeforeUpdate(InternalEntity poll)
		{
			var handlers = Get<PollBeforeUpdateEventHandler>(BeforeUpdateEvent);
			if (handlers != null)
			{
				var args = new PollBeforeUpdateEventArgs(poll);
				handlers(args);
			}

			TEApi.Html.Events.OnBeforeUpdate(GetHtmlProperties(poll));
			TEApi.Content.Events.OnBeforeUpdate(GetContent(poll));
		}

		private readonly object AfterUpdateEvent = new object();

		public event PollAfterUpdateEventHandler AfterUpdate
		{
			add { Add(AfterUpdateEvent, value); }
			remove { Remove(AfterUpdateEvent, value); }
		}

		internal void OnAfterUpdate(InternalEntity poll)
		{
			var handlers = Get<PollAfterUpdateEventHandler>(AfterUpdateEvent);
			if (handlers != null)
				handlers(new PollAfterUpdateEventArgs(poll));

			TEApi.Content.Events.OnAfterUpdate(GetContent(poll));
		}

		#endregion

		#region Delete

		private readonly object BeforeDeleteEvent = new object();

		public event PollBeforeDeleteEventHandler BeforeDelete
		{
			add { Add(BeforeDeleteEvent, value); }
			remove { Remove(BeforeDeleteEvent, value); }
		}

		internal void OnBeforeDelete(InternalEntity poll)
		{
			var handlers = Get<PollBeforeDeleteEventHandler>(BeforeDeleteEvent);
			if (handlers != null)
				handlers(new PollBeforeDeleteEventArgs(poll));

			TEApi.Content.Events.OnBeforeDelete(GetContent(poll));
		}

		private readonly object AfterDeleteEvent = new object();

		public event PollAfterDeleteEventHandler AfterDelete
		{
			add { Add(AfterDeleteEvent, value); }
			remove { Remove(AfterDeleteEvent, value); }
		}

		internal void OnAfterDelete(InternalEntity poll)
		{
			var handlers = Get<PollAfterDeleteEventHandler>(AfterDeleteEvent);
			if (handlers != null)
				handlers(new PollAfterDeleteEventArgs(poll));

			TEApi.Content.Events.OnAfterDelete(GetContent(poll));
		}

		#endregion

		#region Render

		private readonly object RenderEvent = new object();

		public event PollRenderEventHandler Render
		{
			add { Add(RenderEvent, value); }
			remove { Remove(RenderEvent, value); }
		}

		internal string OnRender(InternalEntity poll, string propertyName, string propertyHtml, string target)
		{
			var handlers = Get<PollRenderEventHandler>(RenderEvent);
			if (handlers != null)
			{
				var args = new PollRenderEventArgs(poll, propertyName, propertyHtml, target);
				handlers(args);
				propertyHtml = args.RenderedHtml;
			}

			return TEApi.Html.Events.OnRender(propertyName, propertyHtml, target);
		}

		#endregion

		private HtmlProperties GetHtmlProperties(InternalEntity internalEntity)
		{
			return new HtmlProperties()
				.Add("Description", () => internalEntity.Description, (string html) => internalEntity.Description = html, true)
				.Add("Name", () => internalEntity.Name, (string html) => internalEntity.Name = html, false);
		}

		private IContent GetContent(InternalEntity internalEntity)
		{
			return new Poll(internalEntity);
		}
	}

	public abstract class ReadOnlyUnrenderablePollEventArgsBase
	{
		internal ReadOnlyUnrenderablePollEventArgsBase(InternalEntity poll)
		{
			InternalEntity = poll;
		}

		internal InternalEntity InternalEntity { get; private set; }

		public Guid ContentId { get { return InternalEntity.Id; } }
		public Guid ContentTypeId { get { return PublicApi.Polls.ContentTypeId; } }
		public Guid Id { get { return InternalEntity.Id; } }
		public string Name { get { return InternalEntity.Name; } }
		public int AuthorUserId { get { return InternalEntity.AuthorUserId; } }
		public Guid ApplicationId { get { return InternalEntity.ApplicationId; } }
		public bool IsEnabled { get { return InternalEntity.IsEnabled; } }
		public DateTime CreatedDate { get { return InternalApi.Formatting.FromUtcToUserTime(InternalEntity.CreatedDateUtc); } }
		public DateTime LastUpdatedDate { get { return InternalApi.Formatting.FromUtcToUserTime(InternalEntity.LastUpdatedDateUtc); } }
		public DateTime? VotingEndDate { get { return InternalEntity.VotingEndDateUtc.HasValue ? (DateTime?) InternalApi.Formatting.FromUtcToUserTime(InternalEntity.VotingEndDateUtc.Value) : null; } }
		public bool HideResultsUntilVotingComplete { get { return InternalEntity.HideResultsUntilVotingComplete; } }

		List<PollAnswer> _answers = null;
		public IList<PollAnswer> Answers
		{
			get
			{
				if (_answers == null)
				{
					if (InternalEntity.Answers != null)
						_answers = new List<PollAnswer>(InternalEntity.Answers.Select(x => new PollAnswer(x, InternalEntity)));
					else
						_answers = new List<PollAnswer>();
				}

				return _answers;
			}
		}
	}

	public abstract class ReadOnlyPollEventArgsBase : ReadOnlyUnrenderablePollEventArgsBase
	{
		internal ReadOnlyPollEventArgsBase(InternalEntity poll)
			: base(poll)
		{
		}

		public string Description()
		{
			return Description("web");
		}

		public string Description(string target)
		{
			return InternalApi.PollingService.RenderPollDescription(InternalEntity, target);
		}
	}

	public abstract class EditablePollEventArgsBase
	{
		internal EditablePollEventArgsBase(InternalEntity poll)
		{
			InternalEntity = poll;
		}

		internal InternalEntity InternalEntity { get; private set; }

		public Guid ContentId { get { return InternalEntity.Id; } }
		public Guid ContentTypeId { get { return PublicApi.Polls.ContentTypeId; } }
		public Guid Id { get { return InternalEntity.Id; } }
		public string Name { get { return InternalEntity.Name; } set { InternalEntity.Name = value; } }
		public string Description { get { return InternalEntity.Description; } set { InternalEntity.Description = value; } }
		public int AuthorUserId { get { return InternalEntity.AuthorUserId; } }
        public Guid ApplicationId { get { return InternalEntity.ApplicationId; } }
        public bool IsEnabled { get { return InternalEntity.IsEnabled; } set { InternalEntity.IsEnabled = value; } }
		public DateTime CreatedDate { get { return InternalApi.Formatting.FromUtcToUserTime(InternalEntity.CreatedDateUtc); } }
		public DateTime LastUpdatedDate { get { return InternalApi.Formatting.FromUtcToUserTime(InternalEntity.LastUpdatedDateUtc); } }
		public DateTime? VotingEndDate { get { return InternalEntity.VotingEndDateUtc.HasValue ? (DateTime?) InternalApi.Formatting.FromUtcToUserTime(InternalEntity.VotingEndDateUtc.Value) : null; } set { InternalEntity.VotingEndDateUtc = value.HasValue ? (DateTime?) InternalApi.Formatting.FromUserTimeToUtc(value.Value) : null; } }
		public bool HideResultsUntilVotingComplete { get { return InternalEntity.HideResultsUntilVotingComplete; } set { InternalEntity.HideResultsUntilVotingComplete = value; } }

		List<PollAnswer> _answers = null;
		public IList<PollAnswer> Answers
		{
			get
			{
				if (_answers == null)
				{
					if (InternalEntity.Answers != null)
						_answers = new List<PollAnswer>(InternalEntity.Answers.Select(x => new PollAnswer(x, InternalEntity)));
					else
						_answers = new List<PollAnswer>();
				}

				return _answers;
			}
		}
	}

	public class PollBeforeCreateEventArgs : EditablePollEventArgsBase
    {
        internal PollBeforeCreateEventArgs(InternalEntity poll)
            : base(poll)
        {
        }
    }

    public class PollAfterCreateEventArgs : ReadOnlyPollEventArgsBase
    {
        internal PollAfterCreateEventArgs(InternalEntity poll)
            : base(poll)
        {
        }
    }

    public class PollBeforeUpdateEventArgs : EditablePollEventArgsBase
    {
        internal PollBeforeUpdateEventArgs(InternalEntity poll)
            : base(poll)
        {
        }
    }

    public class PollAfterUpdateEventArgs : ReadOnlyPollEventArgsBase
    {
        internal PollAfterUpdateEventArgs(InternalEntity poll)
            : base(poll)
        {
        }
    }

    public class PollBeforeDeleteEventArgs : ReadOnlyPollEventArgsBase
    {
        internal PollBeforeDeleteEventArgs(InternalEntity poll)
            : base(poll)
        {
        }
    }

    public class PollAfterDeleteEventArgs : ReadOnlyPollEventArgsBase
    {
        internal PollAfterDeleteEventArgs(InternalEntity poll)
            : base(poll)
        {
        }
    }

    public class PollRenderEventArgs : ReadOnlyUnrenderablePollEventArgsBase
    {
        internal PollRenderEventArgs(InternalEntity poll, string renderedProperty, string renderedHtml, string target)
            : base(poll)
        {
            RenderedHtml = renderedHtml;
            RenderedProperty = renderedProperty;
            RenderTarget = target;
        }

        public string RenderedProperty { get; private set; }
        public string RenderedHtml { get; set; }
        public string RenderTarget { get; private set; }
    }
}


text:
<?php

namespace Portal\KnowBundle;

use Symfony\Component\HttpKernel\Bundle\Bundle;

class PortalKnowBundle extends Bundle
{
}

redpajama_set_name: RedPajamaGithub


text:
<?php

namespace Box\Spout\Common\Helper;

/**
 * Class GlobalFunctionsHelper
 * This class wraps global functions to facilitate testing
 *
 * @codeCoverageIgnore
 *
 * @package Box\Spout\Common\Helper
 */
class GlobalFunctionsHelper
{
    /**
     * Wrapper around global function fopen()
     * @see fopen()
     *
     * @param string $fileName
     * @param string $mode
     * @return resource|bool
     */
    public function fopen($fileName, $mode)
    {
        return fopen($fileName, $mode);
    }

    /**
     * Wrapper around global function fgets()
     * @see fgets()
     *
     * @param resource $handle
     * @param int|void $length
     * @return string
     */
    public function fgets($handle, $length = null)
    {
        return fgets($handle, $length);
    }

    /**
     * Wrapper around global function fputs()
     * @see fputs()
     *
     * @param resource $handle
     * @param string $string
     * @return int
     */
    public function fputs($handle, $string)
    {
        return fputs($handle, $string);
    }

    /**
     * Wrapper around global function fflush()
     * @see fflush()
     *
     * @param resource $handle
     * @return bool
     */
    public function fflush($handle)
    {
        return fflush($handle);
    }

    /**
     * Wrapper around global function fseek()
     * @see fseek()
     *
     * @param resource $handle
     * @param int $offset
     * @return int
     */
    public function fseek($handle, $offset)
    {
        return fseek($handle, $offset);
    }

    /**
     * Wrapper around global function fgetcsv()
     * @see fgetcsv()
     *
     * @param resource $handle
     * @param int|void $length
     * @param string|void $delimiter
     * @param string|void $enclosure
     * @return array
     */
    public function fgetcsv($handle, $length = null, $delimiter = null, $enclosure = null)
    {
        return fgetcsv($handle, $length, $delimiter, $enclosure);
    }

    /**
     * Wrapper around global function fputcsv()
     * @see fputcsv()
     *
     * @param resource $handle
     * @param array $fields
     * @param string|void $delimiter
     * @param string|void $enclosure
     * @return int
     */
    public function fputcsv($handle, array $fields, $delimiter = null, $enclosure = null)
    {
        return fputcsv($handle, $fields, $delimiter, $enclosure);
    }

    /**
     * Wrapper around global function fwrite()
     * @see fwrite()
     *
     * @param resource $handle
     * @param string $string
     * @return int
     */
    public function fwrite($handle, $string)
    {
        return fwrite($handle, $string);
    }

    /**
     * Wrapper around global function fclose()
     * @see fclose()
     *
     * @param resource $handle
     * @return bool
     */
    public function fclose($handle)
    {
        return fclose($handle);
    }

    /**
     * Wrapper around global function rewind()
     * @see rewind()
     *
     * @param resource $handle
     * @return bool
     */
    public function rewind($handle)
    {
        return rewind($handle);
    }

    /**
     * Wrapper around global function file_exists()
     * @see file_exists()
     *
     * @param string $fileName
     * @return bool
     */
    public function file_exists($fileName)
    {
        return file_exists($fileName);
    }

    /**
     * Wrapper around global function file_get_contents()
     * @see file_get_contents()
     *
     * @param string $filePath
     * @return string
     */
    public function file_get_contents($filePath)
    {
        $realFilePath = $this->convertToUseRealPath($filePath);
        return file_get_contents($realFilePath);
    }

    /**
     * Updates the given file path to use a real path.
     * This is to avoid issues on some Windows setup.
     *
     * @param string $filePath File path
     * @return string The file path using a real path
     */
    protected function convertToUseRealPath($filePath)
    {
        $realFilePath = $filePath;

        if ($this->isZipStream($filePath)) {
            if (preg_match('/zip:\/\/(.*)#(.*)/', $filePath, $matches)) {
                $documentPath = $matches[1];
                $documentInsideZipPath = $matches[2];
                $realFilePath = 'zip://' . realpath($documentPath) . '#' . $documentInsideZipPath;
            }
        } else {
            $realFilePath = realpath($filePath);
        }

        return $realFilePath;
    }

    /**
     * Returns whether the given path is a zip stream.
     *
     * @param string $path Path pointing to a document
     * @return bool TRUE if path is a zip stream, FALSE otherwise
     */
    protected function isZipStream($path)
    {
        return (strpos($path, 'zip://') === 0);
    }

    /**
     * Wrapper around global function feof()
     * @see feof()
     *
     * @param resource
     * @return bool
     */
    public function feof($handle)
    {
        return feof($handle);
    }

    /**
     * Wrapper around global function is_readable()
     * @see is_readable()
     *
     * @param string $fileName
     * @return bool
     */
    public function is_readable($fileName)
    {
        return is_readable($fileName);
    }

    /**
     * Wrapper around global function basename()
     * @see basename()
     *
     * @param string $path
     * @param string|void $suffix
     * @return string
     */
    public function basename($path, $suffix = null)
    {
        return basename($path, $suffix);
    }

    /**
     * Wrapper around global function header()
     * @see header()
     *
     * @param string $string
     * @return void
     */
    public function header($string)
    {
        header($string);
    }

    /**
     * Wrapper around global function ob_end_clean()
     * @see ob_end_clean()
     *
     * @return void
     */
    public function ob_end_clean()
    {
        if (ob_get_length() > 0) {
            ob_end_clean();
        }
    }

    /**
     * Wrapper around global function iconv()
     * @see iconv()
     *
     * @param string $string The string to be converted
     * @param string $sourceEncoding The encoding of the source string
     * @param string $targetEncoding The encoding the source string should be converted to
     * @return string|bool the converted string or FALSE on failure.
     */
    public function iconv($string, $sourceEncoding, $targetEncoding)
    {
        return iconv($sourceEncoding, $targetEncoding, $string);
    }

    /**
     * Wrapper around global function mb_convert_encoding()
     * @see mb_convert_encoding()
     *
     * @param string $string The string to be converted
     * @param string $sourceEncoding The encoding of the source string
     * @param string $targetEncoding The encoding the source string should be converted to
     * @return string|bool the converted string or FALSE on failure.
     */
    public function mb_convert_encoding($string, $sourceEncoding, $targetEncoding)
    {
        return mb_convert_encoding($string, $targetEncoding, $sourceEncoding);
    }

    /**
     * Wrapper around global function stream_get_wrappers()
     * @see stream_get_wrappers()
     *
     * @return array
     */
    public function stream_get_wrappers()
    {
        return stream_get_wrappers();
    }

    /**
     * Wrapper around global function function_exists()
     * @see function_exists()
     *
     * @param string $functionName
     * @return bool
     */
    public function function_exists($functionName)
    {
        return function_exists($functionName);
    }
}


text:
"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.foo7 = foo7;
var foo = exports.foo = 1;
var foo = exports.foo = 1,
    bar = exports.bar = 2;
var foo2 = exports.foo2 = function () {};
var foo3 = exports.foo3 = undefined;
let foo4 = exports.foo4 = 2;
let foo5 = exports.foo5 = undefined;
const foo6 = exports.foo6 = 3;
function foo7() {}
class foo8 {}
exports.foo8 = foo8;


text:
package com.datonicgroup.narrate.app.ui.settings;

import android.animation.Animator;
import android.animation.ValueAnimator;
import android.content.Intent;
import android.graphics.PorterDuff;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.support.v7.widget.Toolbar;
import android.view.Gravity;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewTreeObserver;
import android.view.animation.AccelerateDecelerateInterpolator;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
import android.widget.Toast;

import com.datonicgroup.narrate.app.BuildConfig;
import com.datonicgroup.narrate.app.R;
import com.datonicgroup.narrate.app.dataprovider.Settings;
import com.datonicgroup.narrate.app.ui.base.BaseActivity;
import com.datonicgroup.narrate.app.util.GraphicsUtil;
import com.datonicgroup.narrate.app.util.LogUtil;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by timothymiko on 12/20/14.
 */
public class MaterialPreferencesActivity extends BaseActivity implements View.OnClickListener, DeveloperCard.DeveloperOptionsListener {

    /**
     * Control
     */
    private int versionTapCount;
    private int developerModeThreshold = 10;
    private Toast mVersionToast;

    private int mAccentColor;

    /**
     * Views
     */
    private Toolbar mToolbar;
    private View fab;
    private LinearLayout mCardsLayout;
    private TextView mTitle;
    private TextView mCredits;

    /**
     * Preferences
     */
    private GeneralSettingsCard mGeneralSettings;
    private SectionTogglesCard mSectionToggles;
    private PasscodeLockCard mPasscodeCard;
    private RemindersCard mRemindersCard;
    private SyncCard mSyncCard;
    private LocalBackupCard mLocalBackupCard;
    private LinksCard mLinksCard;
    private DeveloperCard mDeveloperCard;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        mAccentColor = getResources().getColor(R.color.accent);

        setContentView(R.layout.activity_material_preferences);

        if ( Settings.getEmail() != null )
            ((TextView) findViewById(R.id.email)).setText(Settings.getEmail());

        mToolbar = (Toolbar) findViewById(R.id.toolbar);
        setSupportActionBar(mToolbar);
        if (getSupportActionBar() != null) {
            getSupportActionBar().setDisplayHomeAsUpEnabled(true);
            getSupportActionBar().setDisplayShowTitleEnabled(false);

            // add a view behind status bar on KitKat builds
            if (Build.VERSION.SDK_INT == Build.VERSION_CODES.KITKAT) {
                int statusBarHeight = 0;
                int resourceId = getResources().getIdentifier("status_bar_height", "dimen", "android");
                if (resourceId > 0) {
                    statusBarHeight = getResources().getDimensionPixelSize(resourceId);
                }

                LinearLayout root = (LinearLayout) findViewById(R.id.root);

                mStatusBarBg = new View(this);
                mStatusBarBg.setLayoutParams(new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.MATCH_PARENT, statusBarHeight));
                root.addView(mStatusBarBg, 0);
            }

            setStatusBarColor(GraphicsUtil.darkenColor(getResources().getColor(R.color.primary), 0.85f));
        }

        mTitle = (TextView) findViewById(R.id.title);

        mCardsLayout = (LinearLayout) findViewById(R.id.settings_group);

        mGeneralSettings = new GeneralSettingsCard(this);
        mCardsLayout.addView(mGeneralSettings);

        mSectionToggles = new SectionTogglesCard(this);
        mCardsLayout.addView(mSectionToggles);

        mPasscodeCard = new PasscodeLockCard(this);
        mCardsLayout.addView(mPasscodeCard);

        mRemindersCard = new RemindersCard(this);
        mCardsLayout.addView(mRemindersCard);

        mSyncCard = new SyncCard(this);
        mCardsLayout.addView(mSyncCard);

        mLocalBackupCard = new LocalBackupCard(this);
        mCardsLayout.addView(mLocalBackupCard);

        mLinksCard = new LinksCard(this);
        mCardsLayout.addView(mLinksCard);

        if ( Settings.getDeveloperModeEnabled() ) {
            mDeveloperCard = new DeveloperCard(MaterialPreferencesActivity.this, MaterialPreferencesActivity.this);
            mCardsLayout.addView(mDeveloperCard);
        }

        mCredits = new TextView(this);
        StringBuilder s = new StringBuilder();
        s.append('\n');
        s.append(getString(R.string.version));
        s.append(' ');
        s.append(BuildConfig.VERSION_NAME);
        s.append('\n');
        s.append(getString(R.string.made_in_detroit));
        s.append("\n\n");
        s.append(getString(R.string.settings_open_source_footer));
        s.append("\n\n");
        mCredits.setText(s.toString());
        mCredits.setTextColor(getResources().getColor(R.color.secondary_text));
        mCredits.setGravity(Gravity.CENTER);
        mCredits.setLineSpacing(0, 1.2f);
        mCardsLayout.addView(mCredits);

        mCredits.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                if ( !Settings.getDeveloperModeEnabled() ) {
                    if (versionTapCount < developerModeThreshold - 1) {
                        versionTapCount++;

                        if (mVersionToast != null)
                            mVersionToast.cancel();

                        if (versionTapCount > 2) {
                            mVersionToast = Toast.makeText(MaterialPreferencesActivity.this, String.format("You are now %d steps away from enabling developer mode.", (developerModeThreshold - versionTapCount)), Toast.LENGTH_SHORT);
                            mVersionToast.show();
                        }

                    } else {

                        if (mVersionToast != null)
                            mVersionToast.cancel();

                        Toast.makeText(MaterialPreferencesActivity.this, "Developer mode enabled.", Toast.LENGTH_LONG).show();

                        Settings.setDeveloperModeEnabled(true);

                        // add developer mode preference
                        mDeveloperCard = new DeveloperCard(MaterialPreferencesActivity.this, MaterialPreferencesActivity.this);
                        mCardsLayout.addView(mDeveloperCard, mCardsLayout.getChildCount()-1);
                    }
                }
            }
        });
    }

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

        if (mSyncCard.mAuthenticatingDropbox)
            mSyncCard.onResume();

        if ( mLinksCard != null )
            mLinksCard.refreshPlusOneView();
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        switch (item.getItemId()) {
            case android.R.id.home:
                finish();
                return true;
            default:
                return super.onOptionsItemSelected(item);
        }
    }

    @Override
    public void onBackPressed() {
        finish();
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.fab:
                Intent emailIntent = new Intent(Intent.ACTION_SENDTO, Uri.fromParts(
                        "mailto", "tim@datonicgroup.com", null));
                emailIntent.putExtra(Intent.EXTRA_SUBJECT, "User Feedback (" + BuildConfig.VERSION_NAME + ")");
                startActivity(Intent.createChooser(emailIntent, getString(R.string.email_support)));
                break;
        }
    }

    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);
        switch (requestCode) {
            case SyncCard.GDRIVE_REQUEST_AUTHORIZATION:
                mSyncCard.onActivityResult(resultCode);
                return;
            case PasscodeLockCard.ENABLE_PASSLOCK:
            case PasscodeLockCard.DISABLE_PASSLOCK:
            case PasscodeLockCard.CHANGE_PASSWORD:
                mPasscodeCard.onActivityResult(requestCode, resultCode);
                return;
        }
    }

    @Override
    public void onDisableDevOptions() {
        mCardsLayout.removeView(mDeveloperCard);
        mDeveloperCard = null;
        versionTapCount = 0;
    }
}


text:
package adinar.annotationsutils.objectdialog;

import android.app.AlertDialog;
import android.app.Dialog;
import android.content.Context;
import android.support.v4.util.Pair;

import adinar.annotationsutils.common.Cache;

/** Main class containing methods to deal with dialogs. */
public class DialogProcessor<T> {
    private Context ctx;
    private Dialog dialog;

    public DialogProcessor(Context ctx) {
        this.ctx = ctx;
    }

    /** Creates dialog based on object's class annotations, applies listener
     *  for dialog results and shows dialog.
     *  @return Created dialog object, remember that it's already shown. */
    public Dialog createDialogFrom(T object, AnnotationDialogListener<T> listener) {
        DialogClassData<T> data = prepareDataForClass((Class<T>) object.getClass());

        AlertDialog.Builder builder = new AlertDialog.Builder(ctx);
        DialogDataManager<T> man = new DialogDataManager<>(object, data, builder);

        man.setTitle();
        man.setView(ctx);
        man.setButtons(listener);

        dialog = builder.create();

        // Dialog must be shown before the next line with setting positive listener.
        dialog.show();
        man.setPositiveButtonListener((AlertDialog) dialog, listener);

        return dialog;
    }

    /** Call this in activity onBackPressed to hide dialog. */
    public void onBackPressed() {
        if (dialog != null && dialog.isShowing()) dialog.hide();
    }

    /** Caches class dialog data extracted from it's annotations. */
    private DialogClassData prepareDataForClass(final Class<T> clazz) {
        return Cache.getCached(new Pair<>(DialogProcessor.class, clazz), new Cache.Supplier<DialogClassData>() {
            @Override
            public DialogClassData get() {
                return new DialogClassData<>(clazz, ctx);
            }
        });
    }
}


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<TITLE>
AutoFilter (POI API Documentation)
</TITLE>

<META NAME="date" CONTENT="2010-10-29">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">

      Overview
      Package
    Class
      Use
      Tree
      Deprecated
      Index
      Help

 PREV CLASS
 NEXT CLASS

  FRAMES
 NO FRAMES

  All Classes

  SUMMARY: NESTED | FIELD | CONSTR | METHOD

DETAIL: FIELD | CONSTR | METHOD

org.apache.poi.ss.usermodel

Interface AutoFilter

All Known Implementing Classes:
HSSFAutoFilter, XSSFAutoFilter

public interface AutoFilter

Represents autofiltering for the specified worksheet.

 Filtering data is a quick and easy way to find and work with a subset of data in a range of cells or table.
 For example, you can filter to see only the values that you specify, filter to see the top or bottom values,
 or filter to quickly see duplicate values.

 TODO YK: For now (Aug 2010) POI only supports setting a basic autofilter on a range of cells.
 In future, when we support more auto-filter functions like custom criteria, sort, etc. we will add
 corresponding methods to this interface.

      Overview
      Package
    Class
      Use
      Tree
      Deprecated
      Index
      Help

 PREV CLASS
 NEXT CLASS

  FRAMES
 NO FRAMES

  All Classes

  SUMMARY: NESTED | FIELD | CONSTR | METHOD

DETAIL: FIELD | CONSTR | METHOD

                Copyright 2010 The Apache Software Foundation or
        its licensors, as applicable.


text:
using namespace odin;
using namespace boost;
using namespace boost::assign;
using namespace std;

namespace munin {

// ==========================================================================
// CARD::IMPLEMENTATION STRUCTURE
// ==========================================================================
struct card::impl
{
    // ======================================================================
    //  GET_CURRENT_FACE
    // ======================================================================
    optional< shared_ptr<component> > get_current_face() const
    {
        if (current_face_.is_initialized())
        {
            BOOST_AUTO(face_iter, faces_.find(current_face_.get()));

            if (face_iter != faces_.end())
            {
                return face_iter->second;
            }
        }

        return NULL;
    }

    typedef map< string, shared_ptr<component> > face_map_type;
    face_map_type                                faces_;
    optional<string>                             current_face_;
};

// ==========================================================================
// CONSTRUCTOR
// ==========================================================================
card::card()
    : pimpl_(make_shared<impl>())
{
}

// ==========================================================================
// DESTRUCTOR
// ==========================================================================
card::~card()
{
}

// ==========================================================================
// ADD_FACE
// ==========================================================================
void card::add_face(
    shared_ptr<component> const &comp,
    string                const &name)
{
    pimpl_->faces_[name] = comp;

    // Connect the underlying container's default signals to the signals
    // of this component with.
    comp->on_redraw.connect(
        boost::bind(boost::ref(on_redraw), _1));

    comp->on_layout_change.connect(
        boost::bind(boost::ref(on_layout_change)));

    comp->on_position_changed.connect(
        boost::bind(boost::ref(on_position_changed), _1, _2));

    comp->on_focus_set.connect(
        boost::bind(boost::ref(on_focus_set)));

    comp->on_focus_lost.connect(
        boost::bind(boost::ref(on_focus_lost)));

    comp->on_cursor_state_changed.connect(
        boost::bind(boost::ref(on_cursor_state_changed), _1));

    comp->on_cursor_position_changed.connect(
        boost::bind(boost::ref(on_cursor_position_changed), _1));
}

// ==========================================================================
// GET_NUMBER_OF_FACES
// ==========================================================================
u32 card::get_number_of_faces() const
{
    return pimpl_->faces_.size();
}

// ==========================================================================
// SELECT_FACE
// ==========================================================================
void card::select_face(string const &name)
{
    BOOST_AUTO(old_face,      pimpl_->get_current_face());
    BOOST_AUTO(old_face_name, pimpl_->current_face_);

    pimpl_->current_face_ = name;

    BOOST_AUTO(new_face, pimpl_->get_current_face());

    if (!old_face_name.is_initialized()
     || old_face_name.get() != pimpl_->current_face_)
    {
        // The name was initialised, so there must be a face to go with
        // it.

        // Determine any focus change between the faces.
        bool old_focussed = old_face.is_initialized()
                          ? old_face.get()->has_focus()
                          : false;

        bool new_focussed = new_face.is_initialized()
                          ? new_face.get()->has_focus()
                          : false;

        // Determine any cursor state change
        bool old_cursor_state = old_face.is_initialized()
                              ? old_face.get()->get_cursor_state()
                              : false;

        bool new_cursor_state = new_face.is_initialized()
                              ? new_face.get()->get_cursor_state()
                              : false;

        point cursor_position = new_face.is_initialized()
                              ? new_face.get()->get_cursor_position()
                              : point();

        // Fire any necessary events.
        if (old_focussed != new_focussed)
        {
            if (new_focussed)
            {
                on_focus_set();
            }
            else
            {
                on_focus_lost();
            }
        }

        if (old_cursor_state != new_cursor_state)
        {
            on_cursor_state_changed(new_cursor_state);
        }

        on_cursor_position_changed(cursor_position);

        // The face of the card has changed.  Fire an on_redraw event for
        // the entire component.
        on_redraw(list_of(rectangle(point(), get_size())));
    }
}

// ==========================================================================
// DO_HASE_FOCUS
// ==========================================================================
bool card::do_has_focus() const
{
    BOOST_AUTO(current_face, pimpl_->get_current_face());

    if (current_face.is_initialized())
    {
        return current_face.get()->has_focus();
    }

    return false;
}

// ==========================================================================
// DO_CAN_FOCUS
// ==========================================================================
bool card::do_can_focus() const
{
    BOOST_AUTO(current_face, pimpl_->get_current_face());

    if (current_face.is_initialized())
    {
        return current_face.get()->can_focus();
    }

    return false;
}

// ==========================================================================
// DO_SET_FOCUS
// ==========================================================================
void card::do_set_focus()
{
    BOOST_AUTO(current_face, pimpl_->get_current_face());

    if (current_face.is_initialized())
    {
        current_face.get()->set_focus();
    }
}

// ==========================================================================
// DO_GET_PREFERRED_SIZE
// ==========================================================================
extent card::do_get_preferred_size() const
{
    return extent();
}

// ==========================================================================
// DO_LAYOUT
// ==========================================================================
void card::do_layout()
{
    BOOST_FOREACH(impl::face_map_type::value_type face_pair, pimpl_->faces_)
    {
        face_pair.second->layout();
    }
}

// ==========================================================================
// DO_DRAW
// ==========================================================================
void card::do_draw(
    context         &ctx
  , rectangle const &region)
{
    if (pimpl_->current_face_.is_initialized())
    {
        BOOST_AUTO(current_face, pimpl_->current_face_.get());
        BOOST_AUTO(face_iter, pimpl_->faces_.find(current_face));

        if (face_iter != pimpl_->faces_.end())
        {
            face_iter->second->draw(ctx, region);
        }
    }
}

// ==========================================================================
// DO_EVENT
// ==========================================================================
void card::do_event(any const &event)
{
    if (pimpl_->current_face_.is_initialized())
    {
        BOOST_AUTO(current_face, pimpl_->current_face_.get());
        BOOST_AUTO(face_iter, pimpl_->faces_.find(current_face));

        if (face_iter != pimpl_->faces_.end())
        {
            face_iter->second->event(event);
        }
    }
}

// ==========================================================================
// DO_SET_SIZE
// ==========================================================================
void card::do_set_size(extent const &size)
{
    basic_component::do_set_size(size);

    BOOST_FOREACH(impl::face_map_type::value_type entry, pimpl_->faces_)
    {
        entry.second->set_size(size);
    }
}

// ==========================================================================
// DO_FOCUS_NEXT
// ==========================================================================
void card::do_focus_next()
{
    BOOST_AUTO(current_face, pimpl_->get_current_face());

    if (current_face.is_initialized())
    {
        current_face.get()->focus_next();
    }
}

// ==========================================================================
// DO_FOCUS_PREVIOUS
// ==========================================================================
void card::do_focus_previous()
{
    BOOST_AUTO(current_face, pimpl_->get_current_face());

    if (current_face.is_initialized())
    {
        current_face.get()->focus_previous();
    }
}

// ==========================================================================
// DO_GET_FOCUSSED_COMPONENT
// ==========================================================================
shared_ptr<component> card::do_get_focussed_component()
{
    BOOST_AUTO(current_face, pimpl_->get_current_face());

    if (current_face.is_initialized())
    {
        return current_face.get()->get_focussed_component();
    }

    return shared_ptr<component>();
}

// ==========================================================================
// DO_ENABLE
// ==========================================================================
void card::do_enable()
{
    BOOST_AUTO(current_face, pimpl_->get_current_face());

    if (current_face.is_initialized())
    {
        current_face.get()->enable();
    }
}

// ==========================================================================
// DO_DISABLE
// ==========================================================================
void card::do_disable()
{
    BOOST_AUTO(current_face, pimpl_->get_current_face());

    if (current_face.is_initialized())
    {
        current_face.get()->disable();
    }
}

// ==========================================================================
// DO_IS_ENABLED
// ==========================================================================
bool card::do_is_enabled() const
{
    BOOST_AUTO(current_face, pimpl_->get_current_face());

    if (current_face.is_initialized())
    {
        return current_face.get()->is_enabled();
    }

    return false;
}

// ==========================================================================
// DO_GET_CURSOR_STATE
// ==========================================================================
bool card::do_get_cursor_state() const
{
    BOOST_AUTO(current_face, pimpl_->get_current_face());

    if (current_face.is_initialized())
    {
        return current_face.get()->get_cursor_state();
    }

    return false;
}

// ==========================================================================
// DO_GET_CURSOR_POSITION
// ==========================================================================
point card::do_get_cursor_position() const
{
    BOOST_AUTO(current_face, pimpl_->get_current_face());

    if (current_face.is_initialized())
    {
        return current_face.get()->get_cursor_position();
    }

    return point();
}

// ==========================================================================
// DO_SET_CURSOR_POSITION
// ==========================================================================
void card::do_set_cursor_position(point const &position)
{
    BOOST_AUTO(current_face, pimpl_->get_current_face());

    if (current_face.is_initialized())
    {
        return current_face.get()->set_cursor_position(position);
    }
}

// ==========================================================================
// DO_SET_ATTRIBUTE
// ==========================================================================
void card::do_set_attribute(
    string const &name, any const &attr)
{
    BOOST_AUTO(current_face, pimpl_->get_current_face());

    if (current_face.is_initialized())
    {
        current_face.get()->set_attribute(name, attr);
    }
}

}


text:
#ifndef WKGrammarDetail_h
#define WKGrammarDetail_h

#include <WebKit2/WKBase.h>

#ifdef __cplusplus
extern "C" {
#endif

WK_EXPORT WKTypeID WKGrammarDetailGetTypeID();
WK_EXPORT WKGrammarDetailRef WKGrammarDetailCreate(int location, int length, WKArrayRef guesses, WKStringRef userDescription);

WK_EXPORT int WKGrammarDetailGetLocation(WKGrammarDetailRef grammarDetailRef);
WK_EXPORT int WKGrammarDetailGetLength(WKGrammarDetailRef grammarDetailRef);
WK_EXPORT WKArrayRef WKGrammarDetailCopyGuesses(WKGrammarDetailRef grammarDetailRef);
WK_EXPORT WKStringRef WKGrammarDetailCopyUserDescription(WKGrammarDetailRef grammarDetailRef);

#ifdef __cplusplus
}
#endif

#endif /* WKGrammarDetail_h */


text:
import requests

__all__ = ['OpenWeather']

class OpenWeather:
    base_url = 'http://api.openweathermap.org/data/2.5/'

    def __init__(self, key):
        self.key = key

    def kelvin_by_zip(self, zipcode):
        payload = {
            'zip': zipcode,
            'APPID': self.key
        }
        return requests.get(self.base_url + '/weather', params=payload).json()['main']['temp']


text:
package youroom4j.util;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.List;
import java.util.logging.Logger;
import org.junit.Test;
import static org.junit.Assert.*;
import youroom4j.model.Entry;
import youroom4j.model.MyGroup;
import youroom4j.model.User;

/**
 * Test for {@link XmlParse}.
 *
 * @author Shintaro Katafuchi
 */
public class XmlParseTest {

  private static final String XML_PATH = "src/test/java/youroom4j/util/xml/";

  private static final Logger logger = Logger.getLogger("YouRoomImplTest");

  @Test
  public void getTimelineNormal() throws IOException {
    String xml = fileToString(new File(XML_PATH + "home_timeline.xml"));
    List<Entry> list = XmlParse.getTimeline(xml);
    assertNotNull(list);
    assertSame(list.size(), 7);
    for (Entry entry : list) {
      assertNotNull(entry);
      logger.info(entry.toString());
    }
  }

  @Test
  public void getRoomTimelineNormal() throws IOException {
    String xml = fileToString(new File(XML_PATH + "room_timeline.xml"));
    List<Entry> list = XmlParse.getTimeline(xml);
    assertNotNull(list);
    assertSame(list.size(), 2);
    for (Entry entry : list) {
      assertNotNull(entry);
      logger.info(entry.toString());
    }
  }

  @Test
  public void getEntryNormal() throws IOException {
    String xml = fileToString(new File(XML_PATH + "entry.xml"));
    Entry entry = XmlParse.getEntry(xml);
    assertNotNull(entry);
    logger.info(entry.toString());
  }

  @Test
  public void getMyGroupsNormal() throws IOException {
    String xml = fileToString(new File(XML_PATH + "mygroups.xml"));
    List<MyGroup> list = XmlParse.getMyGroups(xml);
    assertNotNull(list);
    assertSame(list.size(), 2);
    for (MyGroup group : list) {
      assertNotNull(group);
      logger.info(group.toString());
    }
  }

  @Test
  public void getUserNormal() throws IOException {
    String xml = fileToString(new File(XML_PATH + "credential.xml"));
    User user = XmlParse.getUser(xml);
    assertNotNull(user);
    logger.info(user.toString());
  }

  private static String fileToString(File file) throws IOException {
    BufferedReader br = null;
    try {
      br = new BufferedReader(new InputStreamReader(new FileInputStream(file)));
      StringBuilder sb = new StringBuilder();
      int c;
      while ((c = br.read()) != -1) {
        sb.append((char) c);
      }
      return sb.toString();
    } finally {
      if (br != null)
        br.close();
    }
  }

}


text:
// Copyright (c) Microsoft.  All Rights Reserved.  Licensed under the Apache License, Version 2.0.  See License.txt in the project root for license information.

using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Drawing;
using System.Threading;
using Microsoft.CodeAnalysis.NavigateTo;
using Microsoft.CodeAnalysis.Navigation;
using Microsoft.CodeAnalysis.Text.Shared.Extensions;
using Microsoft.VisualStudio.Language.NavigateTo.Interfaces;
using Microsoft.VisualStudio.Text;
using Roslyn.Utilities;

namespace Microsoft.CodeAnalysis.Editor.Implementation.NavigateTo
{
    internal abstract class AbstractNavigateToItemDisplay : INavigateToItemDisplay2
    {
        protected readonly INavigateToSearchResult SearchResult;
        private ReadOnlyCollection<DescriptionItem> _descriptionItems;

        protected AbstractNavigateToItemDisplay(INavigateToSearchResult searchResult)
        {
            SearchResult = searchResult;
        }

        public string AdditionalInformation => SearchResult.AdditionalInformation;

        public string Description => null;

        public ReadOnlyCollection<DescriptionItem> DescriptionItems
        {
            get
            {
                if (_descriptionItems == null)
                {
                    _descriptionItems = CreateDescriptionItems();
                }

                return _descriptionItems;
            }
        }

        private ReadOnlyCollection<DescriptionItem> CreateDescriptionItems()
        {
            var document = SearchResult.NavigableItem.Document;
            if (document == null)
            {
                return new List<DescriptionItem>().AsReadOnly();
            }

            var sourceText = document.GetTextAsync(CancellationToken.None).WaitAndGetResult(CancellationToken.None);

            var items = new List<DescriptionItem>
                    {
                        new DescriptionItem(
                            new ReadOnlyCollection<DescriptionRun>(
                                new[] { new DescriptionRun("Project:", bold: true) }),
                            new ReadOnlyCollection<DescriptionRun>(
                                new[] { new DescriptionRun(document.Project.Name) })),
                        new DescriptionItem(
                            new ReadOnlyCollection<DescriptionRun>(
                                new[] { new DescriptionRun("File:", bold: true) }),
                            new ReadOnlyCollection<DescriptionRun>(
                                new[] { new DescriptionRun(document.FilePath ?? document.Name) })),
                        new DescriptionItem(
                            new ReadOnlyCollection<DescriptionRun>(
                                new[] { new DescriptionRun("Line:", bold: true) }),
                            new ReadOnlyCollection<DescriptionRun>(
                                new[] { new DescriptionRun((sourceText.Lines.IndexOf(SearchResult.NavigableItem.SourceSpan.Start) + 1).ToString()) }))
                    };

            var summary = SearchResult.Summary;
            if (!string.IsNullOrWhiteSpace(summary))
            {
                items.Add(
                    new DescriptionItem(
                        new ReadOnlyCollection<DescriptionRun>(
                            new[] { new DescriptionRun("Summary:", bold: true) }),
                        new ReadOnlyCollection<DescriptionRun>(
                            new[] { new DescriptionRun(summary) })));
            }

            return items.AsReadOnly();
        }

        public abstract Icon Glyph { get; }

        public string Name => SearchResult.NavigableItem.DisplayTaggedParts.JoinText();

        public void NavigateTo()
        {
            var document = SearchResult.NavigableItem.Document;
            if (document == null)
            {
                return;
            }

            var workspace = document.Project.Solution.Workspace;
            var navigationService = workspace.Services.GetService<IDocumentNavigationService>();

            // Document tabs opened by NavigateTo are carefully created as preview or regular
            // tabs by them; trying to specifically open them in a particular kind of tab here
            // has no effect.
            navigationService.TryNavigateToSpan(workspace, document.Id, SearchResult.NavigableItem.SourceSpan);
        }

        public int GetProvisionalViewingStatus()
        {
            var document = SearchResult.NavigableItem.Document;
            if (document == null)
            {
                return 0;
            }

            var workspace = document.Project.Solution.Workspace;
            var previewService = workspace.Services.GetService<INavigateToPreviewService>();

            return previewService.GetProvisionalViewingStatus(document);
        }

        public void PreviewItem()
        {
            var document = SearchResult.NavigableItem.Document;
            if (document == null)
            {
                return;
            }

            var workspace = document.Project.Solution.Workspace;
            var previewService = workspace.Services.GetService<INavigateToPreviewService>();

            previewService.PreviewItem(this);
        }

        public IReadOnlyList<Span> GetNameMatchRuns(string searchValue)
            => SearchResult.NameMatchSpans.NullToEmpty().SelectAsArray(ts => ts.ToSpan());
    }
}


text:
using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Linq;
using System.Reflection;
using JsonApiDotNetCore;
using JsonApiDotNetCore.Configuration;
using JsonApiDotNetCore.Queries.Expressions;
using JsonApiDotNetCore.Resources;
using JsonApiDotNetCore.Resources.Annotations;

namespace JsonApiDotNetCoreTests.IntegrationTests.CompositeKeys
{
    /// <summary>
    /// Rewrites an expression tree, updating all references to <see cref="Car.Id" /> with the combination of <see cref="Car.RegionId" /> and
    /// <see cref="Car.LicensePlate" />.
    /// </summary>
    /// <remarks>
    /// This enables queries to use <see cref="Car.Id" />, which is not mapped in the database.
    /// </remarks>
    internal sealed class CarExpressionRewriter : QueryExpressionRewriter<object>
    {
        private readonly AttrAttribute _regionIdAttribute;
        private readonly AttrAttribute _licensePlateAttribute;

        public CarExpressionRewriter(IResourceGraph resourceGraph)
        {
            ResourceContext carResourceContext = resourceGraph.GetResourceContext<Car>();

            _regionIdAttribute = carResourceContext.GetAttributeByPropertyName(nameof(Car.RegionId));
            _licensePlateAttribute = carResourceContext.GetAttributeByPropertyName(nameof(Car.LicensePlate));
        }

        public override QueryExpression VisitComparison(ComparisonExpression expression, object argument)
        {
            if (expression.Left is ResourceFieldChainExpression leftChain && expression.Right is LiteralConstantExpression rightConstant)
            {
                PropertyInfo leftProperty = leftChain.Fields[^1].Property;

                if (IsCarId(leftProperty))
                {
                    if (expression.Operator != ComparisonOperator.Equals)
                    {
                        throw new NotSupportedException("Only equality comparisons are possible on Car IDs.");
                    }

                    return RewriteFilterOnCarStringIds(leftChain, rightConstant.Value.AsEnumerable());
                }
            }

            return base.VisitComparison(expression, argument);
        }

        public override QueryExpression VisitAny(AnyExpression expression, object argument)
        {
            PropertyInfo property = expression.TargetAttribute.Fields[^1].Property;

            if (IsCarId(property))
            {
                string[] carStringIds = expression.Constants.Select(constant => constant.Value).ToArray();
                return RewriteFilterOnCarStringIds(expression.TargetAttribute, carStringIds);
            }

            return base.VisitAny(expression, argument);
        }

        public override QueryExpression VisitMatchText(MatchTextExpression expression, object argument)
        {
            PropertyInfo property = expression.TargetAttribute.Fields[^1].Property;

            if (IsCarId(property))
            {
                throw new NotSupportedException("Partial text matching on Car IDs is not possible.");
            }

            return base.VisitMatchText(expression, argument);
        }

        private static bool IsCarId(PropertyInfo property)
        {
            return property.Name == nameof(Identifiable.Id) && property.DeclaringType == typeof(Car);
        }

        private QueryExpression RewriteFilterOnCarStringIds(ResourceFieldChainExpression existingCarIdChain, IEnumerable<string> carStringIds)
        {
            ImmutableArray<FilterExpression>.Builder outerTermsBuilder = ImmutableArray.CreateBuilder<FilterExpression>();

            foreach (string carStringId in carStringIds)
            {
                var tempCar = new Car
                {
                    StringId = carStringId
                };

                FilterExpression keyComparison = CreateEqualityComparisonOnCompositeKey(existingCarIdChain, tempCar.RegionId, tempCar.LicensePlate);
                outerTermsBuilder.Add(keyComparison);
            }

            return outerTermsBuilder.Count == 1 ? outerTermsBuilder[0] : new LogicalExpression(LogicalOperator.Or, outerTermsBuilder.ToImmutable());
        }

        private FilterExpression CreateEqualityComparisonOnCompositeKey(ResourceFieldChainExpression existingCarIdChain, long regionIdValue,
            string licensePlateValue)
        {
            ResourceFieldChainExpression regionIdChain = ReplaceLastAttributeInChain(existingCarIdChain, _regionIdAttribute);

            var regionIdComparison = new ComparisonExpression(ComparisonOperator.Equals, regionIdChain,
                new LiteralConstantExpression(regionIdValue.ToString()));

            ResourceFieldChainExpression licensePlateChain = ReplaceLastAttributeInChain(existingCarIdChain, _licensePlateAttribute);

            var licensePlateComparison = new ComparisonExpression(ComparisonOperator.Equals, licensePlateChain,
                new LiteralConstantExpression(licensePlateValue));

            return new LogicalExpression(LogicalOperator.And, regionIdComparison, licensePlateComparison);
        }

        public override QueryExpression VisitSort(SortExpression expression, object argument)
        {
            ImmutableArray<SortElementExpression>.Builder elementsBuilder = ImmutableArray.CreateBuilder<SortElementExpression>(expression.Elements.Count);

            foreach (SortElementExpression sortElement in expression.Elements)
            {
                if (IsSortOnCarId(sortElement))
                {
                    ResourceFieldChainExpression regionIdSort = ReplaceLastAttributeInChain(sortElement.TargetAttribute, _regionIdAttribute);
                    elementsBuilder.Add(new SortElementExpression(regionIdSort, sortElement.IsAscending));

                    ResourceFieldChainExpression licensePlateSort = ReplaceLastAttributeInChain(sortElement.TargetAttribute, _licensePlateAttribute);
                    elementsBuilder.Add(new SortElementExpression(licensePlateSort, sortElement.IsAscending));
                }
                else
                {
                    elementsBuilder.Add(sortElement);
                }
            }

            return new SortExpression(elementsBuilder.ToImmutable());
        }

        private static bool IsSortOnCarId(SortElementExpression sortElement)
        {
            if (sortElement.TargetAttribute != null)
            {
                PropertyInfo property = sortElement.TargetAttribute.Fields[^1].Property;

                if (IsCarId(property))
                {
                    return true;
                }
            }

            return false;
        }

        private static ResourceFieldChainExpression ReplaceLastAttributeInChain(ResourceFieldChainExpression resourceFieldChain, AttrAttribute attribute)
        {
            IImmutableList<ResourceFieldAttribute> fields = resourceFieldChain.Fields.SetItem(resourceFieldChain.Fields.Count - 1, attribute);
            return new ResourceFieldChainExpression(fields);
        }
    }
}


text:
package sbt

import java.io.{ File, FileNotFoundException }
import sbinary.{ DefaultProtocol, Format, Operations }
import scala.reflect.Manifest

object CacheIO {
  def toBytes[T](format: Format[T])(value: T)(implicit mf: Manifest[Format[T]]): Array[Byte] =
    toBytes[T](value)(format, mf)
  def toBytes[T](value: T)(implicit format: Format[T], mf: Manifest[Format[T]]): Array[Byte] =
    Operations.toByteArray(value)(stampedFormat(format))
  def fromBytes[T](format: Format[T], default: => T)(bytes: Array[Byte])(implicit mf: Manifest[Format[T]]): T =
    fromBytes(default)(bytes)(format, mf)
  def fromBytes[T](default: => T)(bytes: Array[Byte])(implicit format: Format[T], mf: Manifest[Format[T]]): T =
    if (bytes.isEmpty) default else Operations.fromByteArray(bytes)(stampedFormat(format))

  def fromFile[T](format: Format[T], default: => T)(file: File)(implicit mf: Manifest[Format[T]]): T =
    fromFile(file, default)(format, mf)
  def fromFile[T](file: File, default: => T)(implicit format: Format[T], mf: Manifest[Format[T]]): T =
    fromFile[T](file) getOrElse default
  def fromFile[T](file: File)(implicit format: Format[T], mf: Manifest[Format[T]]): Option[T] =
    try { Some(Operations.fromFile(file)(stampedFormat(format))) }
    catch { case e: Exception => None }

  def toFile[T](format: Format[T])(value: T)(file: File)(implicit mf: Manifest[Format[T]]): Unit =
    toFile(value)(file)(format, mf)
  def toFile[T](value: T)(file: File)(implicit format: Format[T], mf: Manifest[Format[T]]): Unit =
    {
      IO.createDirectory(file.getParentFile)
      Operations.toFile(value)(file)(stampedFormat(format))
    }
  def stampedFormat[T](format: Format[T])(implicit mf: Manifest[Format[T]]): Format[T] =
    {
      import DefaultProtocol._
      withStamp(stamp(format))(format)
    }
  def stamp[T](format: Format[T])(implicit mf: Manifest[Format[T]]): Int = typeHash(mf)
  def typeHash[T](implicit mf: Manifest[T]) = mf.toString.hashCode
  def manifest[T](implicit mf: Manifest[T]): Manifest[T] = mf
  def objManifest[T](t: T)(implicit mf: Manifest[T]): Manifest[T] = mf
}


text:
namespace Magix.app {

    public partial class MainWebPage {

        /// <summary>
        /// Head1 control.
        /// </summary>
        /// <remarks>
        /// Auto-generated field.
        /// To modify move field declaration from designer file to code-behind file.
        /// </remarks>
        protected global::System.Web.UI.HtmlControls.HtmlHead Head1;

        /// <summary>
        /// title control.
        /// </summary>
        /// <remarks>
        /// Auto-generated field.
        /// To modify move field declaration from designer file to code-behind file.
        /// </remarks>
        protected global::System.Web.UI.HtmlControls.HtmlTitle title;

        /// <summary>
        /// form1 control.
        /// </summary>
        /// <remarks>
        /// Auto-generated field.
        /// To modify move field declaration from designer file to code-behind file.
        /// </remarks>
        protected global::System.Web.UI.HtmlControls.HtmlForm form1;
    }
}


text:
title: "The kids and their Final Fantasies"
excerpt: "PaperFaces portrait of @Beautiful_Paine drawn with Paper for iOS on an iPad."
image:
  path: &image /assets/images/paperfaces-beautiful-paine-twitter.jpg
  feature: *image
  thumbnail: /assets/images/paperfaces-beautiful-paine-twitter-150.jpg
categories: [paperfaces]
tags: [portrait, illustration, Paper for iOS]
---

PaperFaces portrait of [@Beautiful_Paine](https://twitter.com/Beautiful_Paine).

{% include_cached boilerplate/paperfaces-2.md %}

{% figure caption:"Work in progress screenshots (Paper for iOS)." class:"gallery-3-col" %}
[![](/assets/images/paperfaces-beautiful-paine-process-1-600.jpg)](/assets/images/paperfaces-beautiful-paine-process-1-lg.jpg)
[![](/assets/images/paperfaces-beautiful-paine-process-2-600.jpg)](/assets/images/paperfaces-beautiful-paine-process-2-lg.jpg)
[![](/assets/images/paperfaces-beautiful-paine-process-3-600.jpg)](/assets/images/paperfaces-beautiful-paine-process-3-lg.jpg)
[![](/assets/images/paperfaces-beautiful-paine-process-4-600.jpg)](/assets/images/paperfaces-beautiful-paine-process-4-lg.jpg)
[![](/assets/images/paperfaces-beautiful-paine-process-5-600.jpg)](/assets/images/paperfaces-beautiful-paine-process-5-lg.jpg)
[![](/assets/images/paperfaces-beautiful-paine-process-6-600.jpg)](/assets/images/paperfaces-beautiful-paine-process-6-lg.jpg)
{% endfigure %}


text:
USE [master]
GO

CREATE DATABASE [CountriesDB]
GO

USE [CountriesDB]
GO

CREATE TABLE [Countries](
	[CountryID] [int] IDENTITY NOT NULL PRIMARY KEY,
	[Name] [nvarchar](50) NOT NULL
)
GO

SET IDENTITY_INSERT [Countries] ON
INSERT [Countries] ([CountryID], [Name]) VALUES (1, N'Bulgaria')
INSERT [Countries] ([CountryID], [Name]) VALUES (2, N'United States')
INSERT [Countries] ([CountryID], [Name]) VALUES (3, N'France')
SET IDENTITY_INSERT [Countries] OFF

CREATE TABLE [Towns](
	[TownID] [int] IDENTITY NOT NULL PRIMARY KEY,
	[Name] [nvarchar](50) NOT NULL,
	[CountryID] [int] NOT NULL
)
GO

SET IDENTITY_INSERT [Towns] ON
INSERT [Towns] ([TownID], [Name], [CountryID]) VALUES (1, N'Sofia', 1)
INSERT [Towns] ([TownID], [Name], [CountryID]) VALUES (2, N'Varna', 1)
INSERT [Towns] ([TownID], [Name], [CountryID]) VALUES (3, N'Plovdiv', 1)
INSERT [Towns] ([TownID], [Name], [CountryID]) VALUES (4, N'Seattle', 2)
INSERT [Towns] ([TownID], [Name], [CountryID]) VALUES (6, N'Los Angeles', 2)
INSERT [Towns] ([TownID], [Name], [CountryID]) VALUES (7, N'New York', 2)
INSERT [Towns] ([TownID], [Name], [CountryID]) VALUES (8, N'Paris', 3)
INSERT [Towns] ([TownID], [Name], [CountryID]) VALUES (9, N'Lion', 3)
SET IDENTITY_INSERT [Towns] OFF

ALTER TABLE [Towns] ADD CONSTRAINT [FK_Towns_Countries] FOREIGN KEY([CountryID])
REFERENCES [Countries] ([CountryID])
GO


text:
package org.b3log.solo.constants;

import java.util.HashMap;
import java.util.Map;

public class MIMEType {

	public static final Map<String, String> types = new HashMap<String, String>(){{
		put( "image/gif", ".gif" );
		put( "image/jpeg", ".jpg" );
		put( "image/jpg", ".jpg" );
		put( "image/png", ".png" );
		put( "image/bmp", ".bmp" );
	}};

	public static String getSuffix ( String mime ) {
		return MIMEType.types.get( mime );
	}

}


text:
package org.xdty.imageviewer2.view;

import android.annotation.TargetApi;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Camera;
import android.graphics.Color;
import android.graphics.Matrix;
import android.os.Build;
import android.support.v4.view.PagerAdapter;
import android.support.v4.view.ViewPager;
import android.util.AttributeSet;
import android.util.Log;
import android.view.MotionEvent;
import android.view.View;

import com.nineoldandroids.view.ViewHelper;

import org.xdty.imageviewer2.R;

import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Random;

public class JazzyViewPager extends ViewPager {

	public static final String TAG = "JazzyViewPager";

	private boolean mEnabled = true;
	private boolean mFadeEnabled = false;
	private boolean mOutlineEnabled = false;
	public static int sOutlineColor = Color.WHITE;
	private TransitionEffect mEffect = TransitionEffect.Standard;

	private HashMap<Integer, Object> mObjs = new LinkedHashMap<Integer, Object>();

	private static final float SCALE_MAX = 0.5f;
	private static final float ZOOM_MAX = 0.5f;
	private static final float ROT_MAX = 15.0f;

	public enum TransitionEffect {
		Standard,
		Tablet,
		CubeIn,
		CubeOut,
		FlipVertical,
		FlipHorizontal,
		Stack,
		ZoomIn,
		ZoomOut,
		RotateUp,
		RotateDown,
		Accordion;

		private static final List<TransitionEffect> VALUES =
				Collections.unmodifiableList(Arrays.asList(values()));
		private static final int SIZE = VALUES.size();
		private static final Random RANDOM = new Random();

		public static TransitionEffect randomEffect() {
			return VALUES.get(RANDOM.nextInt(SIZE));
		}
	}

	private static final boolean API_11;
	static {
		API_11 = Build.VERSION.SDK_INT >= 11;
	}

	public JazzyViewPager(Context context) {
		this(context, null);
	}

	@SuppressWarnings("incomplete-switch")
	public JazzyViewPager(Context context, AttributeSet attrs) {
		super(context, attrs);
		if(!isInEditMode()) {
			setClipChildren(false);
			// now style everything!
			TypedArray ta = context.obtainStyledAttributes(attrs, R.styleable.JazzyViewPager);
			int effect = ta.getInt(R.styleable.JazzyViewPager_style, 0);
			String[] transitions = getResources().getStringArray(R.array.jazzy_effects);
			setTransitionEffect(TransitionEffect.valueOf(transitions[effect]));
			setFadeEnabled(ta.getBoolean(R.styleable.JazzyViewPager_fadeEnabled, false));
			setOutlineEnabled(ta.getBoolean(R.styleable.JazzyViewPager_outlineEnabled, false));
			setOutlineColor(ta.getColor(R.styleable.JazzyViewPager_outlineColor, Color.WHITE));
			switch (mEffect) {
				case Stack:
				case ZoomOut:
					setFadeEnabled(true);
			}
			ta.recycle();
		}
	}

	public void setTransitionEffect(TransitionEffect effect) {
		mEffect = effect;
//		reset();
	}

	public void setPagingEnabled(boolean enabled) {
		mEnabled = enabled;
	}

	public void setFadeEnabled(boolean enabled) {
		mFadeEnabled = enabled;
	}

	public boolean getFadeEnabled() {
		return mFadeEnabled;
	}

	public void setOutlineEnabled(boolean enabled) {
		mOutlineEnabled = enabled;
		wrapWithOutlines();
	}

	public void setOutlineColor(int color) {
		sOutlineColor = color;
	}

	private void wrapWithOutlines() {
		for (int i = 0; i < getChildCount(); i++) {
			View v = getChildAt(i);
			if (!(v instanceof OutlineContainer)) {
				removeView(v);
				super.addView(wrapChild(v), i);
			}
		}
	}

	private View wrapChild(View child) {
		if (!mOutlineEnabled || child instanceof OutlineContainer) return child;
		OutlineContainer out = new OutlineContainer(getContext());
		out.setLayoutParams(generateDefaultLayoutParams());
		child.setLayoutParams(new OutlineContainer.LayoutParams(
				LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT));
		out.addView(child);
		return out;
	}

	public void addView(View child) {
		super.addView(wrapChild(child));
	}

	public void addView(View child, int index) {
		super.addView(wrapChild(child), index);
	}

	public void addView(View child, LayoutParams params) {
		super.addView(wrapChild(child), params);
	}

	public void addView(View child, int width, int height) {
		super.addView(wrapChild(child), width, height);
	}

	public void addView(View child, int index, LayoutParams params) {
		super.addView(wrapChild(child), index, params);
	}

	@Override
	public boolean onInterceptTouchEvent(MotionEvent arg0) {

		if (mEnabled) {
			try {
				return super.onInterceptTouchEvent(arg0);
			} catch (Exception e) {
				e.printStackTrace();
				return false;
			}
		} else {
			return false;
		}
	}

	private State mState;
	private int oldPage;

	private View mLeft;
	private View mRight;
	private float mRot;
	private float mTrans;
	private float mScale;

	private enum State {
		IDLE,
		GOING_LEFT,
		GOING_RIGHT
	}

//	public void reset() {
//	resetPrivate();
//	int curr = getCurrentItem();
//	onPageScrolled(curr, 0.0f, 0);
//}
//
//private void resetPrivate() {
//	for (int i = 0; i < getChildCount(); i++) {
//		View v = getChildAt(i);
//		//			ViewHelper.setRotation(v, -ViewHelper.getRotation(v));
//		//			ViewHelper.setRotationX(v, -ViewHelper.getRotationX(v));
//		//			ViewHelper.setRotationY(v, -ViewHelper.getRotationY(v));
//		//
//		//			ViewHelper.setTranslationX(v, -ViewHelper.getTranslationX(v));
//		//			ViewHelper.setTranslationY(v, -ViewHelper.getTranslationY(v));
//
//		ViewHelper.setRotation(v, 0);
//		ViewHelper.setRotationX(v, 0);
//		ViewHelper.setRotationY(v, 0);
//
//		ViewHelper.setTranslationX(v, 0);
//		ViewHelper.setTranslationY(v, 0);
//
//		ViewHelper.setAlpha(v, 1.0f);
//
//		ViewHelper.setScaleX(v, 1.0f);
//		ViewHelper.setScaleY(v, 1.0f);
//
//		ViewHelper.setPivotX(v, 0);
//		ViewHelper.setPivotY(v, 0);
//
//		logState(v, "Child " + i);
//	}
//}

	private void logState(View v, String title) {
		Log.v(TAG, title + ": ROT (" + ViewHelper.getRotation(v) + ", " +
				ViewHelper.getRotationX(v) + ", " +
				ViewHelper.getRotationY(v) + "), TRANS (" +
				ViewHelper.getTranslationX(v) + ", " +
				ViewHelper.getTranslationY(v) + "), SCALE (" +
				ViewHelper.getScaleX(v) + ", " +
				ViewHelper.getScaleY(v) + "), ALPHA " +
				ViewHelper.getAlpha(v));
	}

	protected void animateScroll(int position, float positionOffset) {
		if (mState != State.IDLE) {
			mRot = (float)(1-Math.cos(2*Math.PI*positionOffset))/2*30.0f;
			ViewHelper.setRotationY(this, mState == State.GOING_RIGHT ? mRot : -mRot);
			ViewHelper.setPivotX(this, getMeasuredWidth()*0.5f);
			ViewHelper.setPivotY(this, getMeasuredHeight()*0.5f);
		}
	}

	protected void animateTablet(View left, View right, float positionOffset) {
		if (mState != State.IDLE) {
			if (left != null) {
				manageLayer(left, true);
				mRot = 30.0f * positionOffset;
				mTrans = getOffsetXForRotation(mRot, left.getMeasuredWidth(),
						left.getMeasuredHeight());
				ViewHelper.setPivotX(left, left.getMeasuredWidth()/2);
				ViewHelper.setPivotY(left, left.getMeasuredHeight()/2);
				ViewHelper.setTranslationX(left, mTrans);
				ViewHelper.setRotationY(left, mRot);
				logState(left, "Left");
			}
			if (right != null) {
				manageLayer(right, true);
				mRot = -30.0f * (1-positionOffset);
				mTrans = getOffsetXForRotation(mRot, right.getMeasuredWidth(),
						right.getMeasuredHeight());
				ViewHelper.setPivotX(right, right.getMeasuredWidth()*0.5f);
				ViewHelper.setPivotY(right, right.getMeasuredHeight()*0.5f);
				ViewHelper.setTranslationX(right, mTrans);
				ViewHelper.setRotationY(right, mRot);
				logState(right, "Right");
			}
		}
	}

	private void animateCube(View left, View right, float positionOffset, boolean in) {
		if (mState != State.IDLE) {
			if (left != null) {
				manageLayer(left, true);
				mRot = (in ? 90.0f : -90.0f) * positionOffset;
				ViewHelper.setPivotX(left, left.getMeasuredWidth());
				ViewHelper.setPivotY(left, left.getMeasuredHeight()*0.5f);
				ViewHelper.setRotationY(left, mRot);
			}
			if (right != null) {
				manageLayer(right, true);
				mRot = -(in ? 90.0f : -90.0f) * (1-positionOffset);
				ViewHelper.setPivotX(right, 0);
				ViewHelper.setPivotY(right, right.getMeasuredHeight()*0.5f);
				ViewHelper.setRotationY(right, mRot);
			}
		}
	}

	private void animateAccordion(View left, View right, float positionOffset) {
		if (mState != State.IDLE) {
			if (left != null) {
				manageLayer(left, true);
				ViewHelper.setPivotX(left, left.getMeasuredWidth());
				ViewHelper.setPivotY(left, 0);
				ViewHelper.setScaleX(left, 1-positionOffset);
			}
			if (right != null) {
				manageLayer(right, true);
				ViewHelper.setPivotX(right, 0);
				ViewHelper.setPivotY(right, 0);
				ViewHelper.setScaleX(right, positionOffset);
			}
		}
	}

	private void animateZoom(View left, View right, float positionOffset, boolean in) {
		if (mState != State.IDLE) {
			if (left != null) {
				manageLayer(left, true);
				mScale = in ? ZOOM_MAX + (1-ZOOM_MAX)*(1-positionOffset) :
					1+ZOOM_MAX - ZOOM_MAX*(1-positionOffset);
				ViewHelper.setPivotX(left, left.getMeasuredWidth()*0.5f);
				ViewHelper.setPivotY(left, left.getMeasuredHeight()*0.5f);
				ViewHelper.setScaleX(left, mScale);
				ViewHelper.setScaleY(left, mScale);
			}
			if (right != null) {
				manageLayer(right, true);
				mScale = in ? ZOOM_MAX + (1-ZOOM_MAX)*positionOffset :
					1+ZOOM_MAX - ZOOM_MAX*positionOffset;
				ViewHelper.setPivotX(right, right.getMeasuredWidth()*0.5f);
				ViewHelper.setPivotY(right, right.getMeasuredHeight()*0.5f);
				ViewHelper.setScaleX(right, mScale);
				ViewHelper.setScaleY(right, mScale);
			}
		}
	}

	private void animateRotate(View left, View right, float positionOffset, boolean up) {
		if (mState != State.IDLE) {
			if (left != null) {
				manageLayer(left, true);
				mRot = (up ? 1 : -1) * (ROT_MAX * positionOffset);
				mTrans = (up ? -1 : 1) * (float) (getMeasuredHeight() - getMeasuredHeight()*Math.cos(mRot*Math.PI/180.0f));
				ViewHelper.setPivotX(left, left.getMeasuredWidth()*0.5f);
				ViewHelper.setPivotY(left, up ? 0 : left.getMeasuredHeight());
				ViewHelper.setTranslationY(left, mTrans);
				ViewHelper.setRotation(left, mRot);
			}
			if (right != null) {
				manageLayer(right, true);
				mRot = (up ? 1 : -1) * (-ROT_MAX + ROT_MAX*positionOffset);
				mTrans = (up ? -1 : 1) * (float) (getMeasuredHeight() - getMeasuredHeight()*Math.cos(mRot*Math.PI/180.0f));
				ViewHelper.setPivotX(right, right.getMeasuredWidth()*0.5f);
				ViewHelper.setPivotY(right, up ? 0 : right.getMeasuredHeight());
				ViewHelper.setTranslationY(right, mTrans);
				ViewHelper.setRotation(right, mRot);
			}
		}
	}

	private void animateFlipHorizontal(View left, View right, float positionOffset, int positionOffsetPixels) {
		if (mState != State.IDLE) {
			if (left != null) {
				manageLayer(left, true);
				mRot = 180.0f * positionOffset;
				if (mRot > 90.0f) {
					left.setVisibility(View.INVISIBLE);
				} else {
					if (left.getVisibility() == View.INVISIBLE)
						left.setVisibility(View.VISIBLE);
					mTrans = positionOffsetPixels;
					ViewHelper.setPivotX(left, left.getMeasuredWidth()*0.5f);
					ViewHelper.setPivotY(left, left.getMeasuredHeight()*0.5f);
					ViewHelper.setTranslationX(left, mTrans);
					ViewHelper.setRotationY(left, mRot);
				}
			}
			if (right != null) {
				manageLayer(right, true);
				mRot = -180.0f * (1-positionOffset);
				if (mRot < -90.0f) {
					right.setVisibility(View.INVISIBLE);
				} else {
					if (right.getVisibility() == View.INVISIBLE)
						right.setVisibility(View.VISIBLE);
					mTrans = -getWidth()-getPageMargin()+positionOffsetPixels;
					ViewHelper.setPivotX(right, right.getMeasuredWidth()*0.5f);
					ViewHelper.setPivotY(right, right.getMeasuredHeight()*0.5f);
					ViewHelper.setTranslationX(right, mTrans);
					ViewHelper.setRotationY(right, mRot);
				}
			}
		}
	}

	private void animateFlipVertical(View left, View right, float positionOffset, int positionOffsetPixels) {
		if(mState != State.IDLE) {
			if (left != null) {
				manageLayer(left, true);
				mRot = 180.0f * positionOffset;
				if (mRot > 90.0f) {
					left.setVisibility(View.INVISIBLE);
				} else {
					if (left.getVisibility() == View.INVISIBLE)
						left.setVisibility(View.VISIBLE);
					mTrans = positionOffsetPixels;
					ViewHelper.setPivotX(left, left.getMeasuredWidth()*0.5f);
					ViewHelper.setPivotY(left, left.getMeasuredHeight()*0.5f);
					ViewHelper.setTranslationX(left, mTrans);
					ViewHelper.setRotationX(left, mRot);
				}
			}
			if (right != null) {
				manageLayer(right, true);
				mRot = -180.0f * (1-positionOffset);
				if (mRot < -90.0f) {
					right.setVisibility(View.INVISIBLE);
				} else {
					if (right.getVisibility() == View.INVISIBLE)
						right.setVisibility(View.VISIBLE);
					mTrans = -getWidth()-getPageMargin()+positionOffsetPixels;
					ViewHelper.setPivotX(right, right.getMeasuredWidth()*0.5f);
					ViewHelper.setPivotY(right, right.getMeasuredHeight()*0.5f);
					ViewHelper.setTranslationX(right, mTrans);
					ViewHelper.setRotationX(right, mRot);
				}
			}
		}
	}

	protected void animateStack(View left, View right, float positionOffset, int positionOffsetPixels) {
		if (mState != State.IDLE) {
			if (right != null) {
				manageLayer(right, true);
				mScale = (1-SCALE_MAX) * positionOffset + SCALE_MAX;
				mTrans = -getWidth()-getPageMargin()+positionOffsetPixels;
				ViewHelper.setScaleX(right, mScale);
				ViewHelper.setScaleY(right, mScale);
				ViewHelper.setTranslationX(right, mTrans);
			}
			if (left != null) {
				left.bringToFront();
			}
		}
	}

	@TargetApi(Build.VERSION_CODES.HONEYCOMB)
	private void manageLayer(View v, boolean enableHardware) {
		if (!API_11) return;
		int layerType = enableHardware ? View.LAYER_TYPE_HARDWARE : View.LAYER_TYPE_NONE;
		if (layerType != v.getLayerType())
			v.setLayerType(layerType, null);
	}

	@TargetApi(Build.VERSION_CODES.HONEYCOMB)
	private void disableHardwareLayer() {
		if (!API_11) return;
		View v;
		for (int i = 0; i < getChildCount(); i++) {
			v = getChildAt(i);
			if (v.getLayerType() != View.LAYER_TYPE_NONE)
				v.setLayerType(View.LAYER_TYPE_NONE, null);
		}
	}

	private Matrix mMatrix = new Matrix();
	private Camera mCamera = new Camera();
	private float[] mTempFloat2 = new float[2];

	protected float getOffsetXForRotation(float degrees, int width, int height) {
		mMatrix.reset();
		mCamera.save();
		mCamera.rotateY(Math.abs(degrees));
		mCamera.getMatrix(mMatrix);
		mCamera.restore();

		mMatrix.preTranslate(-width * 0.5f, -height * 0.5f);
		mMatrix.postTranslate(width * 0.5f, height * 0.5f);
		mTempFloat2[0] = width;
		mTempFloat2[1] = height;
		mMatrix.mapPoints(mTempFloat2);
		return (width - mTempFloat2[0]) * (degrees > 0.0f ? 1.0f : -1.0f);
	}

	protected void animateFade(View left, View right, float positionOffset) {
		if (left != null) {
			ViewHelper.setAlpha(left, 1-positionOffset);
		}
		if (right != null) {
			ViewHelper.setAlpha(right, positionOffset);
		}
	}

	protected void animateOutline(View left, View right) {
		if (!(left instanceof OutlineContainer))
			return;
		if (mState != State.IDLE) {
			if (left != null) {
				manageLayer(left, true);
				((OutlineContainer)left).setOutlineAlpha(1.0f);
			}
			if (right != null) {
				manageLayer(right, true);
				((OutlineContainer)right).setOutlineAlpha(1.0f);
			}
		} else {
			if (left != null)
				((OutlineContainer)left).start();
			if (right != null)
				((OutlineContainer)right).start();
		}
	}

	@Override
	public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
		if (mState == State.IDLE && positionOffset > 0) {
			oldPage = getCurrentItem();
			mState = position == oldPage ? State.GOING_RIGHT : State.GOING_LEFT;
		}
		boolean goingRight = position == oldPage;
		if (mState == State.GOING_RIGHT && !goingRight)
			mState = State.GOING_LEFT;
		else if (mState == State.GOING_LEFT && goingRight)
			mState = State.GOING_RIGHT;

		float effectOffset = isSmall(positionOffset) ? 0 : positionOffset;

//		mLeft = getChildAt(position);
//		mRight = getChildAt(position+1);
		mLeft = findViewFromObject(position);
		mRight = findViewFromObject(position+1);

		if (mFadeEnabled)
			animateFade(mLeft, mRight, effectOffset);
		if (mOutlineEnabled)
			animateOutline(mLeft, mRight);

		switch (mEffect) {
		case Standard:
			break;
		case Tablet:
			animateTablet(mLeft, mRight, effectOffset);
			break;
		case CubeIn:
			animateCube(mLeft, mRight, effectOffset, true);
			break;
		case CubeOut:
			animateCube(mLeft, mRight, effectOffset, false);
			break;
		case FlipVertical:
			animateFlipVertical(mLeft, mRight, positionOffset, positionOffsetPixels);
			break;
		case FlipHorizontal:
			animateFlipHorizontal(mLeft, mRight, effectOffset, positionOffsetPixels);
		case Stack:
			animateStack(mLeft, mRight, effectOffset, positionOffsetPixels);
			break;
		case ZoomIn:
			animateZoom(mLeft, mRight, effectOffset, true);
			break;
		case ZoomOut:
			animateZoom(mLeft, mRight, effectOffset, false);
			break;
		case RotateUp:
			animateRotate(mLeft, mRight, effectOffset, true);
			break;
		case RotateDown:
			animateRotate(mLeft, mRight, effectOffset, false);
			break;
		case Accordion:
			animateAccordion(mLeft, mRight, effectOffset);
			break;
		}

		super.onPageScrolled(position, positionOffset, positionOffsetPixels);

		if (effectOffset == 0) {
			disableHardwareLayer();
			mState = State.IDLE;
		}

	}

	private boolean isSmall(float positionOffset) {
		return Math.abs(positionOffset) < 0.0001;
	}

	public void setObjectForPosition(Object obj, int position) {
		mObjs.put(Integer.valueOf(position), obj);
	}

	public View findViewFromObject(int position) {
		Object o = mObjs.get(Integer.valueOf(position));
		if (o == null) {
			return null;
		}
		PagerAdapter a = getAdapter();
		View v;
		for (int i = 0; i < getChildCount(); i++) {
			v = getChildAt(i);
			if (a.isViewFromObject(v, o))
				return v;
		}
		return null;
	}

}


text:
extern const unsigned short startscreen[38400];
#define STARTSCREEN_WIDTH 240
#define STARTSCREEN_HEIGHT 160
#endif


text:
package org.kie.workbench.common.stunner.bpmn.definition.property.task;

import java.util.Objects;

import javax.validation.Valid;

import org.jboss.errai.common.client.api.annotations.MapsTo;
import org.jboss.errai.common.client.api.annotations.Portable;
import org.jboss.errai.databinding.client.api.Bindable;
import org.kie.workbench.common.forms.adf.definitions.annotations.FieldParam;
import org.kie.workbench.common.forms.adf.definitions.annotations.FormDefinition;
import org.kie.workbench.common.forms.adf.definitions.annotations.FormField;
import org.kie.workbench.common.forms.adf.definitions.annotations.SkipFormField;
import org.kie.workbench.common.forms.adf.definitions.annotations.field.selector.SelectorDataProvider;
import org.kie.workbench.common.forms.fields.shared.fieldTypes.basic.selectors.listBox.type.ListBoxFieldType;
import org.kie.workbench.common.forms.fields.shared.fieldTypes.basic.textArea.type.TextAreaFieldType;
import org.kie.workbench.common.stunner.bpmn.definition.property.general.SLADueDate;
import org.kie.workbench.common.stunner.bpmn.forms.model.MultipleInstanceVariableFieldType;
import org.kie.workbench.common.stunner.core.definition.annotation.Property;
import org.kie.workbench.common.stunner.core.definition.annotation.PropertySet;
import org.kie.workbench.common.stunner.core.util.HashUtil;

@Portable
@Bindable
@PropertySet
@FormDefinition(
        startElement = "multipleInstanceExecutionMode"
)
public class MultipleInstanceSubprocessTaskExecutionSet extends BaseSubprocessTaskExecutionSet {

    @Property
    @Valid
    @FormField(
            type = ListBoxFieldType.class,
            settings = {@FieldParam(name = "addEmptyOption", value = "false")}
    )
    @SelectorDataProvider(
            type = SelectorDataProvider.ProviderType.CLIENT,
            className = "org.kie.workbench.common.stunner.bpmn.client.dataproviders.ExecutionOrderProvider")
    private MultipleInstanceExecutionMode multipleInstanceExecutionMode;

    @Property
    @FormField(
            afterElement = "multipleInstanceExecutionMode",
            type = ListBoxFieldType.class)
    @SelectorDataProvider(
            type = SelectorDataProvider.ProviderType.CLIENT,
            className = "org.kie.workbench.common.stunner.bpmn.client.dataproviders.VariablesProvider"
    )
    @Valid
    private MultipleInstanceCollectionInput multipleInstanceCollectionInput;

    @Property
    @FormField(
            type = MultipleInstanceVariableFieldType.class,
            afterElement = "multipleInstanceCollectionInput"
    )
    @Valid
    private MultipleInstanceDataInput multipleInstanceDataInput;

    @Property
    @FormField(
            type = ListBoxFieldType.class,
            afterElement = "multipleInstanceDataInput"
    )
    @SelectorDataProvider(
            type = SelectorDataProvider.ProviderType.CLIENT,
            className = "org.kie.workbench.common.stunner.bpmn.client.dataproviders.VariablesProvider"
    )
    @Valid
    private MultipleInstanceCollectionOutput multipleInstanceCollectionOutput;

    @Property
    @FormField(
            type = MultipleInstanceVariableFieldType.class,
            afterElement = "multipleInstanceCollectionOutput"
    )
    @Valid
    private MultipleInstanceDataOutput multipleInstanceDataOutput;

    @Property
    @FormField(
            type = TextAreaFieldType.class,
            afterElement = "multipleInstanceDataOutput",
            settings = {@FieldParam(name = "rows", value = "5")}
    )
    @Valid
    private MultipleInstanceCompletionCondition multipleInstanceCompletionCondition;

    @Property
    @FormField(afterElement = "multipleInstanceCompletionCondition",
            settings = {@FieldParam(name = "mode", value = "ACTION_SCRIPT")}
    )
    @Valid
    private OnEntryAction onEntryAction;

    @Property
    @FormField(afterElement = "onEntryAction",
            settings = {@FieldParam(name = "mode", value = "ACTION_SCRIPT")}
    )
    @Valid
    private OnExitAction onExitAction;

    @Property
    @SkipFormField
    private IsMultipleInstance isMultipleInstance;

    public MultipleInstanceSubprocessTaskExecutionSet() {
        this(new MultipleInstanceExecutionMode(false),
             new MultipleInstanceCollectionInput(),
             new MultipleInstanceCollectionOutput(),
             new MultipleInstanceDataInput(),
             new MultipleInstanceDataOutput(),
             new MultipleInstanceCompletionCondition(),
             new OnEntryAction(new ScriptTypeListValue().addValue(new ScriptTypeValue("java",
                                                                                ""))),
             new OnExitAction(new ScriptTypeListValue().addValue(new ScriptTypeValue("java",
                                                                                ""))),
             new IsMultipleInstance(true),
             new IsAsync(),
             new SLADueDate());
    }

    public MultipleInstanceSubprocessTaskExecutionSet(final @MapsTo("multipleInstanceExecutionMode") MultipleInstanceExecutionMode multipleInstanceExecutionMode,
                                                      final @MapsTo("multipleInstanceCollectionInput") MultipleInstanceCollectionInput multipleInstanceCollectionInput,
                                                      final @MapsTo("multipleInstanceCollectionOutput") MultipleInstanceCollectionOutput multipleInstanceCollectionOutput,
                                                      final @MapsTo("multipleInstanceDataInput") MultipleInstanceDataInput multipleInstanceDataInput,
                                                      final @MapsTo("multipleInstanceDataOutput") MultipleInstanceDataOutput multipleInstanceDataOutput,
                                                      final @MapsTo("multipleInstanceCompletionCondition") MultipleInstanceCompletionCondition multipleInstanceCompletionCondition,
                                                      final @MapsTo("onEntryAction") OnEntryAction onEntryAction,
                                                      final @MapsTo("onExitAction") OnExitAction onExitAction,
                                                      final @MapsTo("isMultipleInstance") IsMultipleInstance isMultipleInstance,
                                                      final @MapsTo("isAsync") IsAsync isAsync,
                                                      final @MapsTo("slaDueDate") SLADueDate slaDueDate) {
        super(isAsync, slaDueDate);
        this.multipleInstanceExecutionMode = multipleInstanceExecutionMode;
        this.multipleInstanceCollectionInput = multipleInstanceCollectionInput;
        this.multipleInstanceCollectionOutput = multipleInstanceCollectionOutput;
        this.multipleInstanceDataInput = multipleInstanceDataInput;
        this.multipleInstanceDataOutput = multipleInstanceDataOutput;
        this.multipleInstanceCompletionCondition = multipleInstanceCompletionCondition;
        this.onEntryAction = onEntryAction;
        this.onExitAction = onExitAction;
        this.isMultipleInstance = isMultipleInstance;
    }

    public MultipleInstanceExecutionMode getMultipleInstanceExecutionMode() {
        return multipleInstanceExecutionMode;
    }

    public void setMultipleInstanceExecutionMode(MultipleInstanceExecutionMode multipleInstanceExecutionMode) {
        this.multipleInstanceExecutionMode = multipleInstanceExecutionMode;
    }

    public MultipleInstanceCollectionInput getMultipleInstanceCollectionInput() {
        return multipleInstanceCollectionInput;
    }

    public void setMultipleInstanceCollectionInput(MultipleInstanceCollectionInput multipleInstanceCollectionInput) {
        this.multipleInstanceCollectionInput = multipleInstanceCollectionInput;
    }

    public MultipleInstanceCollectionOutput getMultipleInstanceCollectionOutput() {
        return multipleInstanceCollectionOutput;
    }

    public void setMultipleInstanceCollectionOutput(MultipleInstanceCollectionOutput multipleInstanceCollectionOutput) {
        this.multipleInstanceCollectionOutput = multipleInstanceCollectionOutput;
    }

    public MultipleInstanceDataInput getMultipleInstanceDataInput() {
        return multipleInstanceDataInput;
    }

    public void setMultipleInstanceDataInput(MultipleInstanceDataInput multipleInstanceDataInput) {
        this.multipleInstanceDataInput = multipleInstanceDataInput;
    }

    public MultipleInstanceDataOutput getMultipleInstanceDataOutput() {
        return multipleInstanceDataOutput;
    }

    public void setMultipleInstanceDataOutput(MultipleInstanceDataOutput multipleInstanceDataOutput) {
        this.multipleInstanceDataOutput = multipleInstanceDataOutput;
    }

    public MultipleInstanceCompletionCondition getMultipleInstanceCompletionCondition() {
        return multipleInstanceCompletionCondition;
    }

    public void setMultipleInstanceCompletionCondition(MultipleInstanceCompletionCondition multipleInstanceCompletionCondition) {
        this.multipleInstanceCompletionCondition = multipleInstanceCompletionCondition;
    }

    public IsMultipleInstance getIsMultipleInstance() {
        return isMultipleInstance;
    }

    public void setIsMultipleInstance(IsMultipleInstance isMultipleInstance) {
        this.isMultipleInstance = isMultipleInstance;
    }

    public OnEntryAction getOnEntryAction() {
        return onEntryAction;
    }

    public void setOnEntryAction(final OnEntryAction onEntryAction) {
        this.onEntryAction = onEntryAction;
    }

    public OnExitAction getOnExitAction() {
        return onExitAction;
    }

    public void setOnExitAction(final OnExitAction onExitAction) {
        this.onExitAction = onExitAction;
    }

    @Override
    public int hashCode() {
        return HashUtil.combineHashCodes(super.hashCode(),
                                         Objects.hashCode(multipleInstanceExecutionMode),
                                         Objects.hashCode(multipleInstanceCollectionInput),
                                         Objects.hashCode(multipleInstanceCollectionOutput),
                                         Objects.hashCode(multipleInstanceDataInput),
                                         Objects.hashCode(multipleInstanceDataOutput),
                                         Objects.hashCode(multipleInstanceCompletionCondition),
                                         Objects.hashCode(onEntryAction),
                                         Objects.hashCode(onExitAction),
                                         Objects.hashCode(isMultipleInstance));
    }

    @Override
    public boolean equals(Object o) {
        if (o instanceof MultipleInstanceSubprocessTaskExecutionSet) {
            MultipleInstanceSubprocessTaskExecutionSet other = (MultipleInstanceSubprocessTaskExecutionSet) o;
            return super.equals(other) &&
                    Objects.equals(multipleInstanceExecutionMode, other.multipleInstanceExecutionMode) &&
                    Objects.equals(multipleInstanceCollectionInput, other.multipleInstanceCollectionInput) &&
                    Objects.equals(multipleInstanceCollectionOutput, other.multipleInstanceCollectionOutput) &&
                    Objects.equals(multipleInstanceDataInput, other.multipleInstanceDataInput) &&
                    Objects.equals(multipleInstanceDataOutput, other.multipleInstanceDataOutput) &&
                    Objects.equals(multipleInstanceCompletionCondition, other.multipleInstanceCompletionCondition) &&
                    Objects.equals(onEntryAction, other.onEntryAction) &&
                    Objects.equals(onExitAction, other.onExitAction) &&
                    Objects.equals(isMultipleInstance, other.isMultipleInstance);
        }
        return false;
    }
}


text:
namespace Orleans.Streams
{
    /// <summary>
    /// Filter predicate for streams.
    /// Classes implementing this interface MUST be [Serializable]
    /// </summary>
    internal interface IStreamFilterPredicateWrapper
    {
        object FilterData { get; }

        /// <summary>
        /// Should this item be delivered to the intended receiver?
        /// </summary>
        /// <param name="stream"></param>
        /// <param name="filterData"></param>
        /// <param name="item">Item sent through the stream.</param>
        /// <returns>Return <c>true</c> if this item should be delivered to the intended recipient.</returns>
        bool ShouldReceive(IStreamIdentity stream, object filterData, object item);
    }
}


text:
import {Types} from '../actions';

const initialState = {
    searchInputVal: "",
    searchResultList:[],
    currentEpisode: "",
    ratings: undefined,
    focused:false,
    mouseInside:false,
    searchLoading:false,
}

const SearchReducer = (state = initialState ,action) =>{
    switch(action.type) {
        case Types.SEARCH_VALUE_CHANGED:
            return {...state, searchInputVal:action.payload }
        case Types.PODCAST_SEARCH_STARTED:
            return {...state,searchLoading:true}
        case Types.PODCAST_SEARCH_RECIEVED_SUCCESS:
            return {...state,searchResultList: action.payload, searchLoading:false}
        case Types.SEARCH_RESULT_CLICKED:
            return {...state,searchInputVal:"", searchResultList:[], currentEpisode:action.payload.title}
        case Types.PODCAST_RATINGS_RECIEVED:
            return {...state,ratings:action.payload}
        case Types.SEARCH_FOCUSED:
            return {...state,focused:true}
        case Types.SEARCH_UNFOCUS:
            return {...state,focused:false}
        case Types.SEARCH_MOUSE_ENTERED:
            return {...state,mouseInside:true}
        case Types.SEARCH_MOUSE_LEFT:
            return {...state,mouseInside:false}
        default:
            return state;
    }
}

export default SearchReducer


text:
/* Adapted from https://github.com/json-path/JsonPath/blob/master/json-path/src/test/java/com/jayway/jsonpath/internal/path/PathTokenTest.java */

#import <XCTest/XCTest.h>

#import "SMJBaseTest.h"

#import "SMJPathToken.h"
#import "SMJPropertyPathToken.h"
#import "SMJWildcardPathToken.h"
#import "SMJScanPathToken.h"

NS_ASSUME_NONNULL_BEGIN

/*
** SMJPathTokenTest
*/
#pragma mark - SMJPathTokenTest

@interface SMJPathTokenTest : SMJBaseTest
@end

@implementation SMJPathTokenTest

- (SMJPathToken *)makePathReturningTail:(NSArray <SMJPathToken *> *)tokens
{
	SMJPathToken *last = nil;

	for (SMJPathToken *token in tokens)
	{
		if (last != nil)
			[last appendTailToken:token];

		last = token;
	}

	return last;
}

- (SMJPathToken *)makePTT:(NSArray <NSString *> *)properties
{
	return [[SMJPropertyPathToken alloc] initWithProperties:properties delimiter:'\'' error:nil];
}

- (void)test_is_upstream_definite_in_simple_case
{
	BOOL result;

	result = [[self makePathReturningTail:@[ [self makePTT:@[ @"foo" ]] ]] isUpstreamDefinite];
	XCTAssertTrue(result);

	result = [[self makePathReturningTail:@[ [self makePTT:@[ @"foo" ]], [self makePTT:@[ @"bar" ]] ]] isUpstreamDefinite];
	XCTAssertTrue(result);

	result = [[self makePathReturningTail:@[ [self makePTT:@[ @"foo", @"foo2" ]], [self makePTT:@[ @"bar" ]] ]] isUpstreamDefinite];
	XCTAssertFalse(result);

	result = [[self makePathReturningTail:@[ [[SMJWildcardPathToken alloc] init], [self makePTT:@[ @"bar" ]] ]] isUpstreamDefinite];
	XCTAssertFalse(result);

	result = [[self makePathReturningTail:@[ [[SMJScanPathToken alloc] init], [self makePTT:@[ @"bar" ]] ]] isUpstreamDefinite];
	XCTAssertFalse(result);
}

- (void)test_is_upstream_definite_in_complex_case
{
	BOOL result;

	result = [[self makePathReturningTail:@[ [self makePTT:@[ @"foo" ]], [self makePTT:@[ @"bar" ]], [self makePTT:@[ @"baz" ]] ]] isUpstreamDefinite];
	XCTAssertTrue(result);

	result = [[self makePathReturningTail:@[ [self makePTT:@[ @"foo" ]], [[SMJWildcardPathToken alloc] init] ]] isUpstreamDefinite];
	XCTAssertTrue(result);

	result = [[self makePathReturningTail:@[ [[SMJWildcardPathToken alloc] init], [self makePTT:@[ @"bar" ]], [self makePTT:@[ @"baz" ]] ]] isUpstreamDefinite];
	XCTAssertFalse(result);
}

@end

NS_ASSUME_NONNULL_END