text:
/*================================================================================
  code generated by: java2cpp
  author: Zoran Angelov, mailto://baldzar@gmail.com
  class: android.view.SurfaceHolder
================================================================================*/

#ifndef J2CPP_INCLUDE_IMPLEMENTATION

#ifndef J2CPP_ANDROID_VIEW_SURFACEHOLDER_HPP_DECL
#define J2CPP_ANDROID_VIEW_SURFACEHOLDER_HPP_DECL

namespace j2cpp { namespace java { namespace lang { class Exception; } } }
namespace j2cpp { namespace java { namespace lang { class String; } } }
namespace j2cpp { namespace java { namespace lang { class RuntimeException; } } }
namespace j2cpp { namespace java { namespace lang { class Throwable; } } }
namespace j2cpp { namespace java { namespace lang { class Object; } } }
namespace j2cpp { namespace java { namespace io { class Serializable; } } }
namespace j2cpp { namespace android { namespace view { class Surface; } } }
namespace j2cpp { namespace android { namespace view { namespace SurfaceHolder_ { class Callback; } } } }
namespace j2cpp { namespace android { namespace graphics { class Canvas; } } }
namespace j2cpp { namespace android { namespace graphics { class Rect; } } }

#include <android/graphics/Canvas.hpp>
#include <android/graphics/Rect.hpp>
#include <android/view/Surface.hpp>
#include <android/view/SurfaceHolder.hpp>
#include <java/io/Serializable.hpp>
#include <java/lang/Exception.hpp>
#include <java/lang/Object.hpp>
#include <java/lang/RuntimeException.hpp>
#include <java/lang/String.hpp>
#include <java/lang/Throwable.hpp>

namespace j2cpp {

namespace android { namespace view {

	class SurfaceHolder;
	namespace SurfaceHolder_ {

		class Callback;
		class Callback
			: public object<Callback>
		{
		public:

			J2CPP_DECLARE_CLASS

			J2CPP_DECLARE_METHOD(0)
			J2CPP_DECLARE_METHOD(1)
			J2CPP_DECLARE_METHOD(2)

			explicit Callback(jobject jobj)
			: object<Callback>(jobj)
			{
			}

			operator local_ref<java::lang::Object>() const;

			void surfaceCreated(local_ref< android::view::SurfaceHolder >  const&);
			void surfaceChanged(local_ref< android::view::SurfaceHolder >  const&, jint, jint, jint);
			void surfaceDestroyed(local_ref< android::view::SurfaceHolder >  const&);
		}; //class Callback

		class Callback2;
		class Callback2
			: public object<Callback2>
		{
		public:

			J2CPP_DECLARE_CLASS

			J2CPP_DECLARE_METHOD(0)

			explicit Callback2(jobject jobj)
			: object<Callback2>(jobj)
			{
			}

			operator local_ref<java::lang::Object>() const;
			operator local_ref<android::view::SurfaceHolder_::Callback>() const;

			void surfaceRedrawNeeded(local_ref< android::view::SurfaceHolder >  const&);
		}; //class Callback2

		class BadSurfaceTypeException;
		class BadSurfaceTypeException
			: public object<BadSurfaceTypeException>
		{
		public:

			J2CPP_DECLARE_CLASS

			J2CPP_DECLARE_METHOD(0)
			J2CPP_DECLARE_METHOD(1)

			explicit BadSurfaceTypeException(jobject jobj)
			: object<BadSurfaceTypeException>(jobj)
			{
			}

			operator local_ref<java::lang::Exception>() const;
			operator local_ref<java::lang::RuntimeException>() const;
			operator local_ref<java::lang::Throwable>() const;
			operator local_ref<java::lang::Object>() const;
			operator local_ref<java::io::Serializable>() const;

			BadSurfaceTypeException();
			BadSurfaceTypeException(local_ref< java::lang::String > const&);
		}; //class BadSurfaceTypeException

	} //namespace SurfaceHolder_

	class SurfaceHolder
		: public object<SurfaceHolder>
	{
	public:

		J2CPP_DECLARE_CLASS

		J2CPP_DECLARE_METHOD(0)
		J2CPP_DECLARE_METHOD(1)
		J2CPP_DECLARE_METHOD(2)
		J2CPP_DECLARE_METHOD(3)
		J2CPP_DECLARE_METHOD(4)
		J2CPP_DECLARE_METHOD(5)
		J2CPP_DECLARE_METHOD(6)
		J2CPP_DECLARE_METHOD(7)
		J2CPP_DECLARE_METHOD(8)
		J2CPP_DECLARE_METHOD(9)
		J2CPP_DECLARE_METHOD(10)
		J2CPP_DECLARE_METHOD(11)
		J2CPP_DECLARE_METHOD(12)
		J2CPP_DECLARE_FIELD(0)
		J2CPP_DECLARE_FIELD(1)
		J2CPP_DECLARE_FIELD(2)
		J2CPP_DECLARE_FIELD(3)

		typedef SurfaceHolder_::Callback Callback;
		typedef SurfaceHolder_::Callback2 Callback2;
		typedef SurfaceHolder_::BadSurfaceTypeException BadSurfaceTypeException;

		explicit SurfaceHolder(jobject jobj)
		: object<SurfaceHolder>(jobj)
		{
		}

		operator local_ref<java::lang::Object>() const;

		void addCallback(local_ref< android::view::SurfaceHolder_::Callback >  const&);
		void removeCallback(local_ref< android::view::SurfaceHolder_::Callback >  const&);
		jboolean isCreating();
		void setType(jint);
		void setFixedSize(jint, jint);
		void setSizeFromLayout();
		void setFormat(jint);
		void setKeepScreenOn(jboolean);
		local_ref< android::graphics::Canvas > lockCanvas();
		local_ref< android::graphics::Canvas > lockCanvas(local_ref< android::graphics::Rect >  const&);
		void unlockCanvasAndPost(local_ref< android::graphics::Canvas >  const&);
		local_ref< android::graphics::Rect > getSurfaceFrame();
		local_ref< android::view::Surface > getSurface();

		static static_field< J2CPP_CLASS_NAME, J2CPP_FIELD_NAME(0), J2CPP_FIELD_SIGNATURE(0), jint > SURFACE_TYPE_NORMAL;
		static static_field< J2CPP_CLASS_NAME, J2CPP_FIELD_NAME(1), J2CPP_FIELD_SIGNATURE(1), jint > SURFACE_TYPE_HARDWARE;
		static static_field< J2CPP_CLASS_NAME, J2CPP_FIELD_NAME(2), J2CPP_FIELD_SIGNATURE(2), jint > SURFACE_TYPE_GPU;
		static static_field< J2CPP_CLASS_NAME, J2CPP_FIELD_NAME(3), J2CPP_FIELD_SIGNATURE(3), jint > SURFACE_TYPE_PUSH_BUFFERS;
	}; //class SurfaceHolder

} //namespace view
} //namespace android

} //namespace j2cpp

#endif //J2CPP_ANDROID_VIEW_SURFACEHOLDER_HPP_DECL

#else //J2CPP_INCLUDE_IMPLEMENTATION

#ifndef J2CPP_ANDROID_VIEW_SURFACEHOLDER_HPP_IMPL
#define J2CPP_ANDROID_VIEW_SURFACEHOLDER_HPP_IMPL

namespace j2cpp {

android::view::SurfaceHolder_::Callback::operator local_ref<java::lang::Object>() const
{
	return local_ref<java::lang::Object>(get_jobject());
}

void android::view::SurfaceHolder_::Callback::surfaceCreated(local_ref< android::view::SurfaceHolder > const &a0)
{
	return call_method<
		android::view::SurfaceHolder_::Callback::J2CPP_CLASS_NAME,
		android::view::SurfaceHolder_::Callback::J2CPP_METHOD_NAME(0),
		android::view::SurfaceHolder_::Callback::J2CPP_METHOD_SIGNATURE(0),
		void
	>(get_jobject(), a0);
}

void android::view::SurfaceHolder_::Callback::surfaceChanged(local_ref< android::view::SurfaceHolder > const &a0, jint a1, jint a2, jint a3)
{
	return call_method<
		android::view::SurfaceHolder_::Callback::J2CPP_CLASS_NAME,
		android::view::SurfaceHolder_::Callback::J2CPP_METHOD_NAME(1),
		android::view::SurfaceHolder_::Callback::J2CPP_METHOD_SIGNATURE(1),
		void
	>(get_jobject(), a0, a1, a2, a3);
}

void android::view::SurfaceHolder_::Callback::surfaceDestroyed(local_ref< android::view::SurfaceHolder > const &a0)
{
	return call_method<
		android::view::SurfaceHolder_::Callback::J2CPP_CLASS_NAME,
		android::view::SurfaceHolder_::Callback::J2CPP_METHOD_NAME(2),
		android::view::SurfaceHolder_::Callback::J2CPP_METHOD_SIGNATURE(2),
		void
	>(get_jobject(), a0);
}

J2CPP_DEFINE_CLASS(android::view::SurfaceHolder_::Callback,"android/view/SurfaceHolder$Callback")
J2CPP_DEFINE_METHOD(android::view::SurfaceHolder_::Callback,0,"surfaceCreated","(Landroid/view/SurfaceHolder;)V")
J2CPP_DEFINE_METHOD(android::view::SurfaceHolder_::Callback,1,"surfaceChanged","(Landroid/view/SurfaceHolder;III)V")
J2CPP_DEFINE_METHOD(android::view::SurfaceHolder_::Callback,2,"surfaceDestroyed","(Landroid/view/SurfaceHolder;)V")

android::view::SurfaceHolder_::Callback2::operator local_ref<java::lang::Object>() const
{
	return local_ref<java::lang::Object>(get_jobject());
}

android::view::SurfaceHolder_::Callback2::operator local_ref<android::view::SurfaceHolder_::Callback>() const
{
	return local_ref<android::view::SurfaceHolder_::Callback>(get_jobject());
}

void android::view::SurfaceHolder_::Callback2::surfaceRedrawNeeded(local_ref< android::view::SurfaceHolder > const &a0)
{
	return call_method<
		android::view::SurfaceHolder_::Callback2::J2CPP_CLASS_NAME,
		android::view::SurfaceHolder_::Callback2::J2CPP_METHOD_NAME(0),
		android::view::SurfaceHolder_::Callback2::J2CPP_METHOD_SIGNATURE(0),
		void
	>(get_jobject(), a0);
}

J2CPP_DEFINE_CLASS(android::view::SurfaceHolder_::Callback2,"android/view/SurfaceHolder$Callback2")
J2CPP_DEFINE_METHOD(android::view::SurfaceHolder_::Callback2,0,"surfaceRedrawNeeded","(Landroid/view/SurfaceHolder;)V")

android::view::SurfaceHolder_::BadSurfaceTypeException::operator local_ref<java::lang::Exception>() const
{
	return local_ref<java::lang::Exception>(get_jobject());
}

android::view::SurfaceHolder_::BadSurfaceTypeException::operator local_ref<java::lang::RuntimeException>() const
{
	return local_ref<java::lang::RuntimeException>(get_jobject());
}

android::view::SurfaceHolder_::BadSurfaceTypeException::operator local_ref<java::lang::Throwable>() const
{
	return local_ref<java::lang::Throwable>(get_jobject());
}

android::view::SurfaceHolder_::BadSurfaceTypeException::operator local_ref<java::lang::Object>() const
{
	return local_ref<java::lang::Object>(get_jobject());
}

android::view::SurfaceHolder_::BadSurfaceTypeException::operator local_ref<java::io::Serializable>() const
{
	return local_ref<java::io::Serializable>(get_jobject());
}

android::view::SurfaceHolder_::BadSurfaceTypeException::BadSurfaceTypeException()
: object<android::view::SurfaceHolder_::BadSurfaceTypeException>(
	call_new_object<
		android::view::SurfaceHolder_::BadSurfaceTypeException::J2CPP_CLASS_NAME,
		android::view::SurfaceHolder_::BadSurfaceTypeException::J2CPP_METHOD_NAME(0),
		android::view::SurfaceHolder_::BadSurfaceTypeException::J2CPP_METHOD_SIGNATURE(0)
	>()
)
{
}

android::view::SurfaceHolder_::BadSurfaceTypeException::BadSurfaceTypeException(local_ref< java::lang::String > const &a0)
: object<android::view::SurfaceHolder_::BadSurfaceTypeException>(
	call_new_object<
		android::view::SurfaceHolder_::BadSurfaceTypeException::J2CPP_CLASS_NAME,
		android::view::SurfaceHolder_::BadSurfaceTypeException::J2CPP_METHOD_NAME(1),
		android::view::SurfaceHolder_::BadSurfaceTypeException::J2CPP_METHOD_SIGNATURE(1)
	>(a0)
)
{
}

J2CPP_DEFINE_CLASS(android::view::SurfaceHolder_::BadSurfaceTypeException,"android/view/SurfaceHolder$BadSurfaceTypeException")
J2CPP_DEFINE_METHOD(android::view::SurfaceHolder_::BadSurfaceTypeException,0,"<init>","()V")
J2CPP_DEFINE_METHOD(android::view::SurfaceHolder_::BadSurfaceTypeException,1,"<init>","(Ljava/lang/String;)V")

android::view::SurfaceHolder::operator local_ref<java::lang::Object>() const
{
	return local_ref<java::lang::Object>(get_jobject());
}

void android::view::SurfaceHolder::addCallback(local_ref< android::view::SurfaceHolder_::Callback > const &a0)
{
	return call_method<
		android::view::SurfaceHolder::J2CPP_CLASS_NAME,
		android::view::SurfaceHolder::J2CPP_METHOD_NAME(0),
		android::view::SurfaceHolder::J2CPP_METHOD_SIGNATURE(0),
		void
	>(get_jobject(), a0);
}

void android::view::SurfaceHolder::removeCallback(local_ref< android::view::SurfaceHolder_::Callback > const &a0)
{
	return call_method<
		android::view::SurfaceHolder::J2CPP_CLASS_NAME,
		android::view::SurfaceHolder::J2CPP_METHOD_NAME(1),
		android::view::SurfaceHolder::J2CPP_METHOD_SIGNATURE(1),
		void
	>(get_jobject(), a0);
}

jboolean android::view::SurfaceHolder::isCreating()
{
	return call_method<
		android::view::SurfaceHolder::J2CPP_CLASS_NAME,
		android::view::SurfaceHolder::J2CPP_METHOD_NAME(2),
		android::view::SurfaceHolder::J2CPP_METHOD_SIGNATURE(2),
		jboolean
	>(get_jobject());
}

void android::view::SurfaceHolder::setType(jint a0)
{
	return call_method<
		android::view::SurfaceHolder::J2CPP_CLASS_NAME,
		android::view::SurfaceHolder::J2CPP_METHOD_NAME(3),
		android::view::SurfaceHolder::J2CPP_METHOD_SIGNATURE(3),
		void
	>(get_jobject(), a0);
}

void android::view::SurfaceHolder::setFixedSize(jint a0, jint a1)
{
	return call_method<
		android::view::SurfaceHolder::J2CPP_CLASS_NAME,
		android::view::SurfaceHolder::J2CPP_METHOD_NAME(4),
		android::view::SurfaceHolder::J2CPP_METHOD_SIGNATURE(4),
		void
	>(get_jobject(), a0, a1);
}

void android::view::SurfaceHolder::setSizeFromLayout()
{
	return call_method<
		android::view::SurfaceHolder::J2CPP_CLASS_NAME,
		android::view::SurfaceHolder::J2CPP_METHOD_NAME(5),
		android::view::SurfaceHolder::J2CPP_METHOD_SIGNATURE(5),
		void
	>(get_jobject());
}

void android::view::SurfaceHolder::setFormat(jint a0)
{
	return call_method<
		android::view::SurfaceHolder::J2CPP_CLASS_NAME,
		android::view::SurfaceHolder::J2CPP_METHOD_NAME(6),
		android::view::SurfaceHolder::J2CPP_METHOD_SIGNATURE(6),
		void
	>(get_jobject(), a0);
}

void android::view::SurfaceHolder::setKeepScreenOn(jboolean a0)
{
	return call_method<
		android::view::SurfaceHolder::J2CPP_CLASS_NAME,
		android::view::SurfaceHolder::J2CPP_METHOD_NAME(7),
		android::view::SurfaceHolder::J2CPP_METHOD_SIGNATURE(7),
		void
	>(get_jobject(), a0);
}

local_ref< android::graphics::Canvas > android::view::SurfaceHolder::lockCanvas()
{
	return call_method<
		android::view::SurfaceHolder::J2CPP_CLASS_NAME,
		android::view::SurfaceHolder::J2CPP_METHOD_NAME(8),
		android::view::SurfaceHolder::J2CPP_METHOD_SIGNATURE(8),
		local_ref< android::graphics::Canvas >
	>(get_jobject());
}

local_ref< android::graphics::Canvas > android::view::SurfaceHolder::lockCanvas(local_ref< android::graphics::Rect > const &a0)
{
	return call_method<
		android::view::SurfaceHolder::J2CPP_CLASS_NAME,
		android::view::SurfaceHolder::J2CPP_METHOD_NAME(9),
		android::view::SurfaceHolder::J2CPP_METHOD_SIGNATURE(9),
		local_ref< android::graphics::Canvas >
	>(get_jobject(), a0);
}

void android::view::SurfaceHolder::unlockCanvasAndPost(local_ref< android::graphics::Canvas > const &a0)
{
	return call_method<
		android::view::SurfaceHolder::J2CPP_CLASS_NAME,
		android::view::SurfaceHolder::J2CPP_METHOD_NAME(10),
		android::view::SurfaceHolder::J2CPP_METHOD_SIGNATURE(10),
		void
	>(get_jobject(), a0);
}

local_ref< android::graphics::Rect > android::view::SurfaceHolder::getSurfaceFrame()
{
	return call_method<
		android::view::SurfaceHolder::J2CPP_CLASS_NAME,
		android::view::SurfaceHolder::J2CPP_METHOD_NAME(11),
		android::view::SurfaceHolder::J2CPP_METHOD_SIGNATURE(11),
		local_ref< android::graphics::Rect >
	>(get_jobject());
}

local_ref< android::view::Surface > android::view::SurfaceHolder::getSurface()
{
	return call_method<
		android::view::SurfaceHolder::J2CPP_CLASS_NAME,
		android::view::SurfaceHolder::J2CPP_METHOD_NAME(12),
		android::view::SurfaceHolder::J2CPP_METHOD_SIGNATURE(12),
		local_ref< android::view::Surface >
	>(get_jobject());
}

static_field<
	android::view::SurfaceHolder::J2CPP_CLASS_NAME,
	android::view::SurfaceHolder::J2CPP_FIELD_NAME(0),
	android::view::SurfaceHolder::J2CPP_FIELD_SIGNATURE(0),
	jint
> android::view::SurfaceHolder::SURFACE_TYPE_NORMAL;

static_field<
	android::view::SurfaceHolder::J2CPP_CLASS_NAME,
	android::view::SurfaceHolder::J2CPP_FIELD_NAME(1),
	android::view::SurfaceHolder::J2CPP_FIELD_SIGNATURE(1),
	jint
> android::view::SurfaceHolder::SURFACE_TYPE_HARDWARE;

static_field<
	android::view::SurfaceHolder::J2CPP_CLASS_NAME,
	android::view::SurfaceHolder::J2CPP_FIELD_NAME(2),
	android::view::SurfaceHolder::J2CPP_FIELD_SIGNATURE(2),
	jint
> android::view::SurfaceHolder::SURFACE_TYPE_GPU;

static_field<
	android::view::SurfaceHolder::J2CPP_CLASS_NAME,
	android::view::SurfaceHolder::J2CPP_FIELD_NAME(3),
	android::view::SurfaceHolder::J2CPP_FIELD_SIGNATURE(3),
	jint
> android::view::SurfaceHolder::SURFACE_TYPE_PUSH_BUFFERS;

J2CPP_DEFINE_CLASS(android::view::SurfaceHolder,"android/view/SurfaceHolder")
J2CPP_DEFINE_METHOD(android::view::SurfaceHolder,0,"addCallback","(Landroid/view/SurfaceHolder$Callback;)V")
J2CPP_DEFINE_METHOD(android::view::SurfaceHolder,1,"removeCallback","(Landroid/view/SurfaceHolder$Callback;)V")
J2CPP_DEFINE_METHOD(android::view::SurfaceHolder,2,"isCreating","()Z")
J2CPP_DEFINE_METHOD(android::view::SurfaceHolder,3,"setType","(I)V")
J2CPP_DEFINE_METHOD(android::view::SurfaceHolder,4,"setFixedSize","(II)V")
J2CPP_DEFINE_METHOD(android::view::SurfaceHolder,5,"setSizeFromLayout","()V")
J2CPP_DEFINE_METHOD(android::view::SurfaceHolder,6,"setFormat","(I)V")
J2CPP_DEFINE_METHOD(android::view::SurfaceHolder,7,"setKeepScreenOn","(Z)V")
J2CPP_DEFINE_METHOD(android::view::SurfaceHolder,8,"lockCanvas","()Landroid/graphics/Canvas;")
J2CPP_DEFINE_METHOD(android::view::SurfaceHolder,9,"lockCanvas","(Landroid/graphics/Rect;)Landroid/graphics/Canvas;")
J2CPP_DEFINE_METHOD(android::view::SurfaceHolder,10,"unlockCanvasAndPost","(Landroid/graphics/Canvas;)V")
J2CPP_DEFINE_METHOD(android::view::SurfaceHolder,11,"getSurfaceFrame","()Landroid/graphics/Rect;")
J2CPP_DEFINE_METHOD(android::view::SurfaceHolder,12,"getSurface","()Landroid/view/Surface;")
J2CPP_DEFINE_FIELD(android::view::SurfaceHolder,0,"SURFACE_TYPE_NORMAL","I")
J2CPP_DEFINE_FIELD(android::view::SurfaceHolder,1,"SURFACE_TYPE_HARDWARE","I")
J2CPP_DEFINE_FIELD(android::view::SurfaceHolder,2,"SURFACE_TYPE_GPU","I")
J2CPP_DEFINE_FIELD(android::view::SurfaceHolder,3,"SURFACE_TYPE_PUSH_BUFFERS","I")

} //namespace j2cpp

#endif //J2CPP_ANDROID_VIEW_SURFACEHOLDER_HPP_IMPL

#endif //J2CPP_INCLUDE_IMPLEMENTATION


text:
extern "C" {
#endif

//
// Trace a verbose message.
//
// tag - a tag to be given to this message.
// format - a "printf" style format string
// ... - var args for printf.
//
void TraceVerbose(const wchar_t* tag, const wchar_t* format, ...);

//
// Trace an info message.
//
// tag - a tag to be given to this message.
// format - a "printf" style format string
// ... - var args for printf.
//
void TraceInfo(const wchar_t* tag, const wchar_t* format, ...);

//
// Trace a warning message.
//
// tag - a tag to be given to this message.
// format - a "printf" style format string
// ... - var args for printf.
//
void TraceWarning(const wchar_t* tag, const wchar_t* format, ...);

//
// Trace an error message.
//
// tag - a tag to be given to this message.
// format - a "printf" style format string
// ... - var args for printf.
//
void TraceError(const wchar_t* tag, const wchar_t* format, ...);

//
// Trace a critical message.
//
// tag - a tag to be given to this message.
// format - a "printf" style format string
// ... - var args for printf.
//
void TraceCritical(const wchar_t* tag, const wchar_t* format, ...);

//
// Ensures the the trace logging provider is registered.
//
void TraceRegister();

//
// Ensures the trace logging provider is unregistered.
//
void TraceUnregister();

// Shim for legacy EbrDebugLog
// TODO: replace calls to EbrDebugLog with trace calls.
void EbrDebugLogShim(const char* format, ...);

#ifdef __cplusplus
}
#endif

redpajama_set_name: RedPajamaGithub


text:
					Pause

0

				Percent Complete

				Time

				00:00

             Mark

             Fill


text:
package com.github.daawa.sample.viewcontainer;

import android.graphics.Color;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.Window;
import android.widget.TextView;
import android.widget.Toast;

import com.github.daawa.lib.viewcontainer.springcontainer.LoadingStateListener;
import com.github.daawa.lib.viewcontainer.springcontainer.RefreshingStateListener;
import com.github.daawa.lib.viewcontainer.springcontainer.SampleFooterView;
import com.github.daawa.lib.viewcontainer.springcontainer.SampleHeaderView;
import com.github.daawa.lib.viewcontainer.springcontainer.SpringContainer;

public class RecyclerViewActivity extends AppCompatActivity {
    SpringContainer spring;
    RecyclerView recyclerView;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        setContentView(R.layout.activity_recyclerview);
        View refresh = findViewById(R.id.refresh_btn);
        refresh.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                spring.setTopState(SpringContainer.STATUS_TOP_LINGERING);
            }
        });
        View load = findViewById(R.id.load_btn);
        load.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                spring.setBottomState(SpringContainer.STATUS_BOTTOM_LINGERING);
            }
        });
        spring = findViewById(R.id.refreshable_view);
        //spring.setStateTransferTimeInterval(SpringContainer.STATUS_TOP_LINGERING, SpringContainer.STATUS_TOP_LINGER_FINISHED, 0);
        recyclerView = findViewById(R.id.list_view);
        recyclerView.setLayoutManager(new LinearLayoutManager(this));
        recyclerView.setAdapter(new ItemAdapter());
        spring.setHeaderView(new SampleHeaderView(this));
        spring.setOnRefreshingStateListener(new RefreshingStateListener() {
            @Override
            public void onRefreshing(SpringContainer v) {
                v.postDelayed(new Runnable() {
                    @Override
                    public void run() {
                        spring.finishTopLingering();
                    }
                },1000);

            }
        });

        spring.setFooterView(new SampleFooterView());
        spring.setOnLoadListener(new LoadingStateListener() {
            @Override
            public void onLoading(SpringContainer v) {
                v.postDelayed(new Runnable() {
                    @Override
                    public void run() {
                        spring.finishBottomLingering();
                    }
                },1000);
            }
        });
    }

    class ItemAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>{

        String[] items = { "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L","1","2","3" ,"4","5","6","7","8" };

        @Override
        public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
            View item = LayoutInflater.from(parent.getContext()).inflate(R.layout.simple_item, parent, false);
            return new TextViewHolder(item);
        }

        @Override
        public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) {
            final TextViewHolder holder1 = (TextViewHolder)holder;
            holder1.v1.setText(items[position]);
            if(position < items.length -1){
                holder1.v2.setText(items[position + 1]);
            }
            if(position%2 == 0){
                holder1.itemView.setBackgroundColor(Color.GRAY);
            } else {
                holder1.itemView.setBackgroundColor(Color.WHITE);
            }

            holder1.itemView.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View v) {
                    Toast.makeText(v.getContext(),holder1.v1.getText(),Toast.LENGTH_SHORT).show();
                }
            });
        }

        @Override
        public int getItemCount() {
            return items.length;
        }

        class TextViewHolder extends RecyclerView.ViewHolder{
            TextView v1;
            TextView v2;
            public TextViewHolder(View itemView) {
                super(itemView);
                v1 = itemView.findViewById(R.id.text1);
                v2 = itemView.findViewById(R.id.text2);
            }
        }
    }
}


text:
/* The Computer Language Benchmarks Game
 * http://benchmarksgame.alioth.debian.org/
 *
 * based on Go program by The Go Authors.
 * based on C program by Kevin Carson
 * flag.Arg hack by Isaac Gouy
 * modified by Jamil Djadala to use goroutines
 * modified by Chai Shushan
 *
 */

package main

import (
   "flag"
   "fmt"
   "runtime"
   "strconv"
   "sync"
)

var minDepth = 4
var n = 0

func main() {
   runtime.GOMAXPROCS(runtime.NumCPU() * 2)

   flag.Parse()
   if flag.NArg() > 0 {
      n, _ = strconv.Atoi(flag.Arg(0))
   }

   maxDepth := n
   if minDepth+2 > n {
      maxDepth = minDepth + 2
   }
   stretchDepth := maxDepth + 1

   check_l := bottomUpTree(0, stretchDepth).ItemCheck()
   fmt.Printf("stretch tree of depth %d\t check: %d\n", stretchDepth, check_l)

   longLivedTree := bottomUpTree(0, maxDepth)

   result_trees := make([]int, maxDepth+1)
   result_check := make([]int, maxDepth+1)

   var wg sync.WaitGroup
   for depth_l := minDepth; depth_l <= maxDepth; depth_l += 2 {
      wg.Add(1)
      go func(depth int) {
         iterations := 1 << uint(maxDepth-depth+minDepth)
         check := 0

         for i := 1; i <= iterations; i++ {
            check += bottomUpTree(i, depth).ItemCheck()
            check += bottomUpTree(-i, depth).ItemCheck()
         }
         result_trees[depth] = iterations * 2
         result_check[depth] = check

         wg.Done()
      }(depth_l)
   }
   wg.Wait()

   for depth := minDepth; depth <= maxDepth; depth += 2 {
      fmt.Printf("%d\t trees of depth %d\t check: %d\n",
         result_trees[depth], depth, result_check[depth],
      )
   }
   fmt.Printf("long lived tree of depth %d\t check: %d\n",
      maxDepth, longLivedTree.ItemCheck(),
   )
}

func bottomUpTree(item, depth int) *Node {
   if depth <= 0 {
      return &Node{item, nil, nil}
   }
   return &Node{item,
      bottomUpTree(2*item-1, depth-1),
      bottomUpTree(2*item, depth-1),
   }
}

type Node struct {
   item        int
   left, right *Node
}

func (self *Node) ItemCheck() int {
   if self.left == nil {
      return self.item
   }
   return self.item + self.left.ItemCheck() - self.right.ItemCheck()
}


text:
package org.cagrid.dorian.policy;

import java.io.Serializable;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
import org.jvnet.jaxb2_commons.lang.Equals;
import org.jvnet.jaxb2_commons.lang.EqualsStrategy;
import org.jvnet.jaxb2_commons.lang.HashCode;
import org.jvnet.jaxb2_commons.lang.HashCodeStrategy;
import org.jvnet.jaxb2_commons.lang.JAXBEqualsStrategy;
import org.jvnet.jaxb2_commons.lang.JAXBHashCodeStrategy;
import org.jvnet.jaxb2_commons.lang.JAXBToStringStrategy;
import org.jvnet.jaxb2_commons.lang.ToString;
import org.jvnet.jaxb2_commons.lang.ToStringStrategy;
import org.jvnet.jaxb2_commons.locator.ObjectLocator;
import org.jvnet.jaxb2_commons.locator.util.LocatorUtils;

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

 * <complexType name="FederationPolicy">
 *   <complexContent>
 *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *       <sequence>
 *         <element ref="{http://cagrid.nci.nih.gov/1/dorian-policy}UserPolicy"/>
 *         <element ref="{http://cagrid.nci.nih.gov/1/dorian-policy}HostPolicy"/>
 *         <element ref="{http://cagrid.nci.nih.gov/1/dorian-policy}SearchPolicy"/>
 *       </sequence>
 *     </restriction>
 *   </complexContent>
 * </complexType>
 *

 *
 *
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "FederationPolicy", propOrder = {
    "userPolicy",
    "hostPolicy",
    "searchPolicy"
})
public class FederationPolicy
    implements Serializable, Equals, HashCode, ToString
{

    @XmlElement(name = "UserPolicy", required = true)
    protected UserPolicy userPolicy;
    @XmlElement(name = "HostPolicy", required = true)
    protected HostPolicy hostPolicy;
    @XmlElement(name = "SearchPolicy", required = true)
    protected SearchPolicy searchPolicy;

    /**
     * Gets the value of the userPolicy property.
     *
     * @return
     *     possible object is
     *     {@link UserPolicy }
     *
     */
    public UserPolicy getUserPolicy() {
        return userPolicy;
    }

    /**
     * Sets the value of the userPolicy property.
     *
     * @param value
     *     allowed object is
     *     {@link UserPolicy }
     *
     */
    public void setUserPolicy(UserPolicy value) {
        this.userPolicy = value;
    }

    /**
     * Gets the value of the hostPolicy property.
     *
     * @return
     *     possible object is
     *     {@link HostPolicy }
     *
     */
    public HostPolicy getHostPolicy() {
        return hostPolicy;
    }

    /**
     * Sets the value of the hostPolicy property.
     *
     * @param value
     *     allowed object is
     *     {@link HostPolicy }
     *
     */
    public void setHostPolicy(HostPolicy value) {
        this.hostPolicy = value;
    }

    /**
     * Gets the value of the searchPolicy property.
     *
     * @return
     *     possible object is
     *     {@link SearchPolicy }
     *
     */
    public SearchPolicy getSearchPolicy() {
        return searchPolicy;
    }

    /**
     * Sets the value of the searchPolicy property.
     *
     * @param value
     *     allowed object is
     *     {@link SearchPolicy }
     *
     */
    public void setSearchPolicy(SearchPolicy value) {
        this.searchPolicy = value;
    }

    public String toString() {
        final ToStringStrategy strategy = JAXBToStringStrategy.INSTANCE;
        final StringBuilder buffer = new StringBuilder();
        append(null, buffer, strategy);
        return buffer.toString();
    }

    public StringBuilder append(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
        strategy.appendStart(locator, this, buffer);
        appendFields(locator, buffer, strategy);
        strategy.appendEnd(locator, this, buffer);
        return buffer;
    }

    public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
        {
            UserPolicy theUserPolicy;
            theUserPolicy = this.getUserPolicy();
            strategy.appendField(locator, this, "userPolicy", buffer, theUserPolicy);
        }
        {
            HostPolicy theHostPolicy;
            theHostPolicy = this.getHostPolicy();
            strategy.appendField(locator, this, "hostPolicy", buffer, theHostPolicy);
        }
        {
            SearchPolicy theSearchPolicy;
            theSearchPolicy = this.getSearchPolicy();
            strategy.appendField(locator, this, "searchPolicy", buffer, theSearchPolicy);
        }
        return buffer;
    }

    public int hashCode(ObjectLocator locator, HashCodeStrategy strategy) {
        int currentHashCode = 1;
        {
            UserPolicy theUserPolicy;
            theUserPolicy = this.getUserPolicy();
            currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "userPolicy", theUserPolicy), currentHashCode, theUserPolicy);
        }
        {
            HostPolicy theHostPolicy;
            theHostPolicy = this.getHostPolicy();
            currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "hostPolicy", theHostPolicy), currentHashCode, theHostPolicy);
        }
        {
            SearchPolicy theSearchPolicy;
            theSearchPolicy = this.getSearchPolicy();
            currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "searchPolicy", theSearchPolicy), currentHashCode, theSearchPolicy);
        }
        return currentHashCode;
    }

    public int hashCode() {
        final HashCodeStrategy strategy = JAXBHashCodeStrategy.INSTANCE;
        return this.hashCode(null, strategy);
    }

    public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) {
        if (!(object instanceof FederationPolicy)) {
            return false;
        }
        if (this == object) {
            return true;
        }
        final FederationPolicy that = ((FederationPolicy) object);
        {
            UserPolicy lhsUserPolicy;
            lhsUserPolicy = this.getUserPolicy();
            UserPolicy rhsUserPolicy;
            rhsUserPolicy = that.getUserPolicy();
            if (!strategy.equals(LocatorUtils.property(thisLocator, "userPolicy", lhsUserPolicy), LocatorUtils.property(thatLocator, "userPolicy", rhsUserPolicy), lhsUserPolicy, rhsUserPolicy)) {
                return false;
            }
        }
        {
            HostPolicy lhsHostPolicy;
            lhsHostPolicy = this.getHostPolicy();
            HostPolicy rhsHostPolicy;
            rhsHostPolicy = that.getHostPolicy();
            if (!strategy.equals(LocatorUtils.property(thisLocator, "hostPolicy", lhsHostPolicy), LocatorUtils.property(thatLocator, "hostPolicy", rhsHostPolicy), lhsHostPolicy, rhsHostPolicy)) {
                return false;
            }
        }
        {
            SearchPolicy lhsSearchPolicy;
            lhsSearchPolicy = this.getSearchPolicy();
            SearchPolicy rhsSearchPolicy;
            rhsSearchPolicy = that.getSearchPolicy();
            if (!strategy.equals(LocatorUtils.property(thisLocator, "searchPolicy", lhsSearchPolicy), LocatorUtils.property(thatLocator, "searchPolicy", rhsSearchPolicy), lhsSearchPolicy, rhsSearchPolicy)) {
                return false;
            }
        }
        return true;
    }

    public boolean equals(Object object) {
        final EqualsStrategy strategy = JAXBEqualsStrategy.INSTANCE;
        return equals(null, null, object, strategy);
    }

}


text:
This module is a partial port of the Haskell QuickCheck library.

QuickCheck provides a way to write _property-based_ tests.

The `Arbitrary` and `CoArbitrary` type classes allow us to create
random data with which we can run our tests. This module provides
instances of both classes for PureScript's core data structures,
as well as functions for writing new instances.

Test suites can use the `quickCheck` and `quickCheckPure` functions
to test properties.

For example:

```purescript
main = quickCheck \n -> n + 1 > n
```

#### `QC`

``` purescript
type QC eff a = Eff (console :: CONSOLE, random :: RANDOM, err :: EXCEPTION | eff) a
```

A type synonym which represents the effects used by the `quickCheck` function.

#### `quickCheck`

``` purescript
quickCheck :: forall eff prop. (Testable prop) => prop -> QC eff Unit
```

Test a property.

This function generates a new random seed, runs 100 tests and
prints the test results to the console.

#### `quickCheck'`

``` purescript
quickCheck' :: forall eff prop. (Testable prop) => Int -> prop -> QC eff Unit
```

A variant of the `quickCheck` function which accepts an extra parameter
representing the number of tests which should be run.

#### `quickCheckPure`

``` purescript
quickCheckPure :: forall prop. (Testable prop) => Seed -> Int -> prop -> List Result
```

Test a property, returning all test results as an array.

The first argument is the _random seed_ to be passed to the random generator.
The second argument is the number of tests to run.

#### `Testable`

``` purescript
class Testable prop where
  test :: prop -> Gen Result
```

The `Testable` class represents _testable properties_.

A testable property is a function of zero or more `Arbitrary` arguments,
returning a `Boolean` or `Result`.

Testable properties can be passed to the `quickCheck` function.

##### Instances
``` purescript
instance testableResult :: Testable Result
instance testableBoolean :: Testable Boolean
instance testableFunction :: (Arbitrary t, Testable prop) => Testable (t -> prop)
```

#### `Result`

``` purescript
data Result
  = Success
  | Failed String
```

The result of a test: success or failure (with an error message).

##### Instances
``` purescript
instance testableResult :: Testable Result
instance showResult :: Show Result
```

#### `(<?>)`

``` purescript
(<?>) :: Boolean -> String -> Result
```

_left-associative / precedence -1_

This operator attaches an error message to a failed test.

For example:

```purescript
test x = myProperty x <?> ("myProperty did not hold for " <> show x)
```

#### `(===)`

``` purescript
(===) :: forall a b. (Eq a, Show a) => a -> a -> Result
```

_left-associative / precedence -1_

Self-documenting equality assertion

#### `(/==)`

``` purescript
(/==) :: forall a b. (Eq a, Show a) => a -> a -> Result
```

_left-associative / precedence -1_

Self-documenting inequality assertion


text:
<Type Name="AVAudioSessionDelegate" FullName="MonoMac.AVFoundation.AVAudioSessionDelegate">
  <TypeSignature Language="C#" Value="public class AVAudioSessionDelegate : MonoMac.Foundation.NSObject" />
  <TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit AVAudioSessionDelegate extends MonoMac.Foundation.NSObject" />
  <AssemblyInfo>
    <AssemblyName>MonoMac</AssemblyName>
    <AssemblyVersion>0.0.0.0</AssemblyVersion>
  </AssemblyInfo>
  <Base>
    <BaseTypeName>MonoMac.Foundation.NSObject</BaseTypeName>
  </Base>
  <Interfaces />
  <Attributes>
    <Attribute>
      <AttributeName>MonoMac.Foundation.Model</AttributeName>
    </Attribute>
    <Attribute>
      <AttributeName>MonoMac.Foundation.Register("AVAudioSessionDelegate", true)</AttributeName>
    </Attribute>
  </Attributes>
  <Docs>
    Delegate for the AVAudioSession class.
    <remarks>To be added.</remarks>
  </Docs>
  <Members>
    <Member MemberName=".ctor">
      <MemberSignature Language="C#" Value="public AVAudioSessionDelegate ();" />
      <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
      <MemberType>Constructor</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>0.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <Attributes>
        <Attribute>
          <AttributeName>MonoMac.Foundation.Export("init")</AttributeName>
        </Attribute>
        <Attribute>
          <AttributeName>System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Advanced)</AttributeName>
        </Attribute>
      </Attributes>
      <Parameters />
      <Docs>
        Default constructor that initializes a new instance of this class with no parameters.
        <remarks>
        </remarks>
      </Docs>
    </Member>
    <Member MemberName=".ctor">
      <MemberSignature Language="C#" Value="public AVAudioSessionDelegate (MonoMac.Foundation.NSCoder coder);" />
      <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(class MonoMac.Foundation.NSCoder coder) cil managed" />
      <MemberType>Constructor</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>0.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <Attributes>
        <Attribute>
          <AttributeName>MonoMac.Foundation.Export("initWithCoder:")</AttributeName>
        </Attribute>
        <Attribute>
          <AttributeName>System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Advanced)</AttributeName>
        </Attribute>
      </Attributes>
      <Parameters>
        <Parameter Name="coder" Type="MonoMac.Foundation.NSCoder" />
      </Parameters>
      <Docs>
        <param name="coder">The unarchiver object.</param>
        A constructor that initializes the object from the data stored in the unarchiver object.
        <remarks>This constructor is provided to allow the class to be initialized from an unarchiver (for example, during NIB deserialization).</remarks>
      </Docs>
    </Member>
    <Member MemberName=".ctor">
      <MemberSignature Language="C#" Value="public AVAudioSessionDelegate (MonoMac.Foundation.NSObjectFlag t);" />
      <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(class MonoMac.Foundation.NSObjectFlag t) cil managed" />
      <MemberType>Constructor</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>0.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <Attributes>
        <Attribute>
          <AttributeName>System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Advanced)</AttributeName>
        </Attribute>
      </Attributes>
      <Parameters>
        <Parameter Name="t" Type="MonoMac.Foundation.NSObjectFlag" />
      </Parameters>
      <Docs>
        <param name="t">Unused sentinel value, pass NSObjectFlag.Empty.</param>
        Constructor to call on derived classes when the derived class has an [Export] constructor.
        <remarks>
          <para>This constructor should be called by derived classes when they are initialized using an [Export] attribute. The argument value is ignore, typically the chaining would look like this:</para>
          <example>

public class MyClass : BaseClass {
    [Export ("initWithFoo:")]
    public MyClass (string foo) : base (NSObjectFlag.Empty)
    {
        ...
    }

          </example>
        </remarks>
      </Docs>
    </Member>
    <Member MemberName=".ctor">
      <MemberSignature Language="C#" Value="public AVAudioSessionDelegate (IntPtr handle);" />
      <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(native int handle) cil managed" />
      <MemberType>Constructor</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>0.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <Attributes>
        <Attribute>
          <AttributeName>System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Advanced)</AttributeName>
        </Attribute>
      </Attributes>
      <Parameters>
        <Parameter Name="handle" Type="System.IntPtr" />
      </Parameters>
      <Docs>
        <param name="handle">Pointer (handle) to the unmanaged object.</param>
        A constructor used when creating managed representations of unmanaged objects;  Called by the runtime.
        <remarks>
          <para>This constructor is invoked by the runtime infrastructure (<see cref="M:MonoMac.ObjCRuntime.GetNSObject (System.IntPtr)" />) to create a new managed representation for a pointer to an unmanaged Objective-C object.    You should not invoke this method directly, instead you should call the GetNSObject method as it will prevent two instances of a managed object to point to the same native object.</para>
        </remarks>
      </Docs>
    </Member>
    <Member MemberName="BeginInterruption">
      <MemberSignature Language="C#" Value="public virtual void BeginInterruption ();" />
      <MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void BeginInterruption() cil managed" />
      <MemberType>Method</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>0.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <Attributes>
        <Attribute>
          <AttributeName>MonoMac.Foundation.Export("beginInterruption")</AttributeName>
        </Attribute>
      </Attributes>
      <ReturnValue>
        <ReturnType>System.Void</ReturnType>
      </ReturnValue>
      <Parameters />
      <Docs>
        To be added.
        <remarks>To be added.</remarks>
      </Docs>
    </Member>
    <Member MemberName="EndInterruption">
      <MemberSignature Language="C#" Value="public virtual void EndInterruption ();" />
      <MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void EndInterruption() cil managed" />
      <MemberType>Method</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>0.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <Attributes>
        <Attribute>
          <AttributeName>MonoMac.Foundation.Export("endInterruption")</AttributeName>
        </Attribute>
      </Attributes>
      <ReturnValue>
        <ReturnType>System.Void</ReturnType>
      </ReturnValue>
      <Parameters />
      <Docs>
        To be added.
        <remarks>To be added.</remarks>
      </Docs>
    </Member>
    <Member MemberName="EndInterruption">
      <MemberSignature Language="C#" Value="public virtual void EndInterruption (MonoMac.AVFoundation.AVAudioSessionInterruptionFlags flags);" />
      <MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void EndInterruption(valuetype MonoMac.AVFoundation.AVAudioSessionInterruptionFlags flags) cil managed" />
      <MemberType>Method</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>0.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <Attributes>
        <Attribute>
          <AttributeName>MonoMac.Foundation.Export("endInterruptionWithFlags:")</AttributeName>
        </Attribute>
      </Attributes>
      <ReturnValue>
        <ReturnType>System.Void</ReturnType>
      </ReturnValue>
      <Parameters>
        <Parameter Name="flags" Type="MonoMac.AVFoundation.AVAudioSessionInterruptionFlags" />
      </Parameters>
      <Docs>
        <param name="flags">To be added.</param>
        To be added.
        <remarks>To be added.</remarks>
      </Docs>
    </Member>
    <Member MemberName="InputIsAvailableChanged">
      <MemberSignature Language="C#" Value="public virtual void InputIsAvailableChanged (bool isInputAvailable);" />
      <MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void InputIsAvailableChanged(bool isInputAvailable) cil managed" />
      <MemberType>Method</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>0.0.0.0</AssemblyVersion>
      </AssemblyInfo>
      <Attributes>
        <Attribute>
          <AttributeName>MonoMac.Foundation.Export("inputIsAvailableChanged:")</AttributeName>
        </Attribute>
      </Attributes>
      <ReturnValue>
        <ReturnType>System.Void</ReturnType>
      </ReturnValue>
      <Parameters>
        <Parameter Name="isInputAvailable" Type="System.Boolean" />
      </Parameters>
      <Docs>
        <param name="isInputAvailable">To be added.</param>
        To be added.
        <remarks>To be added.</remarks>
      </Docs>
    </Member>
  </Members>
</Type>


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

namespace System.Threading
{
    [Serializable
    //, ComVisible(true)
    ]
    public sealed class ThreadAbortException : SystemException
    {
    }
}


text:
package com.gs.fw.common.mithra.finder.doubleop;

import com.gs.fw.common.mithra.attribute.Attribute;
import com.gs.fw.common.mithra.attribute.DoubleAttribute;
import com.gs.fw.common.mithra.finder.*;
import com.gs.fw.common.mithra.util.HashUtil;

import java.sql.PreparedStatement;
import java.sql.SQLException;

public class DoubleGreaterThanEqualsOperation extends GreaterThanEqualsOperation
{

    private double parameter;

    public DoubleGreaterThanEqualsOperation(Attribute attribute, double parameter)
    {
        super(attribute);
        this.parameter = parameter;
    }

    public double getParameter()
    {
        return parameter;
    }

    public void zToString(ToStringContext toStringContext)
    {
        this.getAttribute().zAppendToString(toStringContext);
        toStringContext.append(">=").append(this.parameter);
    }

    protected Boolean matchesWithoutDeleteCheck(Object o)
    {
        DoubleAttribute DoubleAttribute = (DoubleAttribute)this.getAttribute();
        if (DoubleAttribute.isAttributeNull(o)) return false;
        return DoubleAttribute.doubleValueOf(o) >= parameter;
    }

    public int setSqlParameters(PreparedStatement pstmt, int startIndex, SqlQuery query) throws SQLException
    {
        pstmt.setDouble(startIndex, parameter);
        return 1;
    }

    public Operation zCombinedAndWithAtomicEquality(AtomicEqualityOperation op)
    {
        if (op.getAttribute().equals(this.getAttribute()))
        {
            if (!op.zIsNullOperation() && ((DoubleEqOperation) op).getParameter() >= this.parameter)
            {
                return op;
            }
            return new None(this.getAttribute());
        }
        return null;
    }

    public Operation zCombinedAndWithAtomicGreaterThan(GreaterThanOperation op)
    {
        if (op.getAttribute().equals(this.getAttribute()))
        {
            double target = ((DoubleGreaterThanOperation) op).getParameter();
            if (target >= this.parameter) return op;
            return this;
        }
        return null;
    }

    public Operation zCombinedAndWithAtomicGreaterThanEquals(GreaterThanEqualsOperation op)
    {
        if (op.getAttribute().equals(this.getAttribute()))
        {
            double target = ((DoubleGreaterThanEqualsOperation) op).getParameter();
            if (target >= this.parameter) return op;
            return this;
        }
        return null;
    }

    public int hashCode()
    {
        return this.getAttribute().hashCode() ^ HashUtil.hash(this.parameter) ^ 0x0F0F0F;
    }

    public boolean equals(Object obj)
    {
        if (obj == this) return true;
        if (obj instanceof DoubleGreaterThanEqualsOperation)
        {
            DoubleGreaterThanEqualsOperation other = (DoubleGreaterThanEqualsOperation) obj;
            return this.parameter == other.parameter && this.getAttribute().equals(other.getAttribute());
        }
        return false;
    }

}


text:
<?php

namespace Zend\Soap\AutoDiscover\DiscoveryStrategy;

use Zend\Server\Reflection\AbstractFunction;
use Zend\Server\Reflection\Prototype;
use Zend\Server\Reflection\ReflectionParameter;

/**
 * Describes how types, return values and method details are detected during AutoDiscovery of a WSDL.
 *
 * @category   Zend
 * @package    Zend_Soap
 * @subpackage WSDL
 */

class ReflectionDiscovery implements DiscoveryStrategyInterface
{
    public function getFunctionDocumentation(AbstractFunction $function)
    {
        return $function->getDescription();
    }

    public function getFunctionParameterType(ReflectionParameter $param)
    {
        return $param->getType();
    }

    public function getFunctionReturnType(AbstractFunction $function, Prototype $prototype)
    {
        return $prototype->getReturnType();
    }

    public function isFunctionOneWay(AbstractFunction $function, Prototype $prototype)
    {
        return $prototype->getReturnType() == 'void';
    }
}


text:
using System.Collections.Generic;
using System.IO;
using System.Text;
using System.Diagnostics.Contracts;
using System;

// Disable the "this variable is not used" warning as every field would imply it.
#pragma warning disable 0414
// Disable the "this variable is never assigned to".
#pragma warning disable 0067
// Disable the "this event is never assigned to".
#pragma warning disable 0649
// Disable the "this variable is never used".
#pragma warning disable 0169
// Disable the "new keyword not required" warning.
#pragma warning disable 0109
// Disable the "extern without DllImport" warning.
#pragma warning disable 0626
// Disable the "could hide other member" warning, can happen on certain properties.
#pragma warning disable 0108

namespace System.IO
{
  static public partial class Path
  {
    #region Methods and constructors
    public static string ChangeExtension(string path, string extension)
    {
      return default(string);
    }

    public static string Combine(string path1, string path2, string path3)
    {
      return default(string);
    }

    public static string Combine(string[] paths)
    {
      Contract.Ensures(0 <= string.Empty.Length);

      return default(string);
    }

    public static string Combine(string path1, string path2)
    {
      return default(string);
    }

    public static string Combine(string path1, string path2, string path3, string path4)
    {
      return default(string);
    }

    public static string GetDirectoryName(string path)
    {
      return default(string);
    }

    public static string GetExtension(string path)
    {
      return default(string);
    }

    public static string GetFileName(string path)
    {
      return default(string);
    }

    public static string GetFileNameWithoutExtension(string path)
    {
      return default(string);
    }

    public static string GetFullPath(string path)
    {
      return default(string);
    }

    public static char[] GetInvalidFileNameChars()
    {
      return default(char[]);
    }

    public static char[] GetInvalidPathChars()
    {
      return default(char[]);
    }

    public static string GetPathRoot(string path)
    {
      return default(string);
    }

    public static string GetRandomFileName()
    {
      Contract.Ensures(0 <= string.Empty.Length);
      Contract.Ensures(Contract.Result<string>() != null);

      return default(string);
    }

    public static string GetTempFileName()
    {
      Contract.Ensures(0 <= string.Empty.Length);

      return default(string);
    }

    public static string GetTempPath()
    {
      Contract.Ensures(0 <= string.Empty.Length);

      return default(string);
    }

    public static bool HasExtension(string path)
    {
      return default(bool);
    }

    public static bool IsPathRooted(string path)
    {
      return default(bool);
    }
    #endregion

    #region Fields
    public readonly static char AltDirectorySeparatorChar;
    public readonly static char DirectorySeparatorChar;
    public readonly static char[] InvalidPathChars;
    public readonly static char PathSeparator;
    public readonly static char VolumeSeparatorChar;
    #endregion
  }
}


text:
namespace RestSharp.Tests
{
    using Xunit;

    public class AddRangeTests
    {
        [Fact]
        public void ShouldParseOutRangeSpecifier()
        {
            var restClient = new RestClient("http://localhost");
            var req = new RestRequest("bob", Method.GET);

            req.AddHeader("Range", "pages=1-2");
            var resp = restClient.Execute(req);
        }
    }
}


text:
<!DOCTYPE html>

	<meta charset="UTF-8">
	<title>Grid test</title>

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

		Lorem ipsum dolor sit amet, consectetur adipisicing elit. Deserunt dignissimos a, architecto soluta pariatur perferendis cumque fugiat saepe rem porro, distinctio mollitia temporibus laborum suscipit, eveniet similique nesciunt ad aut.

			Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
			tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
			quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
			consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
			cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
			proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

			Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
			tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
			quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
			consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
			cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
			proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

			Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
			tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
			quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
			consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
			cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
			proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

			Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
			tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
			quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
			consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
			cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
			proident, sunt in culpa qui officia deserunt mollit anim id est laborum.


text:
FactoryGirl.define do

  factory :user, :aliases => [:creator] do
    before(:create) do |user|
      user.stub(:send_welcome_email)
    end
    sequence :username do |n|
      "foobar#{n}"
    end
    sequence :email do |n|
      "foo#{n}@bar.com"
    end

    password "foobar"
    legal_agreement true
    confirmed_at Time.now - 5000000 #Approximately 1 month ago
    reg_before_conf false
    # For testing ordering of most recently visited student.
    # Without this, users were created with nothing in this field, with the side effect
    # that User.order("last_sign_in_at desc") was putting those users as before any others.
    sequence :last_sign_in_at do |n|
      n.weeks.ago
    end

  end

  factory :content_bucket do
    sequence :name do |n|
      "foobarContent#{n}"
    end
  end

  factory :lesson do
    sequence :title do |n|
      "test lesson#{n}"
    end
    sequence :position do |n|
      n
    end
    url "http://www.bogus.com/subpage/whatever.git" # need url to be non-nil for lesson contribution links feature
    title_url { title.parameterize }
    association :section
  end

  factory :section do
    sequence :title do |n|
      "test section#{n}"
    end
    title_url { title.parameterize }
    sequence :position do |n|
      n
    end
    association :course
  end

  factory :course do
    sequence :title do |n|
      "test course#{n}"
    end
    is_active true
    title_url { title.parameterize }
    sequence :position do |n|
      n
    end
  end

  factory :admin_flash do
    message "Some Message"
    expires 2.days.from_now
  end

  factory :expired_admin_flash, :parent => :admin_flash do
    expires "#{1.day.ago}"
    message "Some Expired Message"
  end

  factory :ad do
    client "some client"
    style "banner"
    url "http://fake.com"
    image_path "/some_image.png"
    category "ad category"
  end

end


text:
SPREE_GEM_VERSION = '0.8.99' unless defined? SPREE_GEM_VERSION

# Bootstrap the Rails environment, frameworks, and default configuration
require File.join(File.dirname(__FILE__), 'boot')

Spree::Initializer.run do |config|
  # Settings in config/environments/* take precedence over those specified here.
  # Application configuration should go into files in config/initializers
  # -- all .rb files in that directory are automatically loaded.
  # See Rails::Configuration for more options.

  # Skip frameworks you're not going to use. To use Rails without a database
  # you must remove the Active Record framework.
  # config.frameworks -= [ :active_record, :active_resource, :action_mailer ]

  # Specify gems that this application depends on.
  # They can then be installed with "rake gems:install" on new installations.
  # config.gem "bj"
  # config.gem "hpricot", :version => '0.6', :source => "http://code.whytheluckystiff.net"
  # config.gem "aws-s3", :lib => "aws/s3"

  config.gem "highline", :version => '>=1.4.0'
  config.gem 'authlogic', :version => '>=2.0.11'
  config.gem "activemerchant", :lib => "active_merchant", :version => '>=1.4.1'
  config.gem "tlsmail", :version => '0.0.1'
  config.gem 'activerecord-tableless', :lib => 'tableless', :version => '>=0.1.0'
  config.gem 'haml-edge', :lib=> 'haml', :version => ">=2.1.37"
  config.gem 'chriseppstein-compass', :lib => 'compass', :source => "http://gems.github.com", :version => '0.6.15'
  config.gem 'calendar_date_select', :version => '1.15'
  config.gem 'rsl-stringex', :lib => 'stringex', :source => "http://gems.github.com"
  config.gem 'chronic' #required for whenever
  config.gem 'javan-whenever', :lib => false, :source => 'http://gems.github.com'
  config.gem 'searchlogic', :version => '2.1.13'
  config.gem 'mislav-will_paginate', :version => '~> 2.3.11', :lib => 'will_paginate',
        :source => 'http://gems.github.com'

  # Only load the plugins named here, in the order given. By default, all plugins
  # in vendor/plugins are loaded in alphabetical order.
  # :all can be used as a placeholder for all plugins not explicitly named
  # config.plugins = [ :exception_notification, :ssl_requirement, :all ]
  config.plugins = [ :all, :resource_controller, :extension_patches ]

  # Add additional load paths for your own custom dirs
  # config.load_paths += %W( #{RAILS_ROOT}/extras )

  # Force all environments to use the same logger level
  # (by default production uses :info, the others :debug)
  # config.log_level = :debug

  # Make Time.zone default to the specified zone, and make Active Record store time values
  # in the database in UTC, and return them converted to the specified local zone.
  # Run "rake -D time" for a list of tasks for finding time zone names.
  config.time_zone = "Eastern Time (US & Canada)"

  # Use SQL instead of Active Record's schema dumper when creating the test database.
  # This is necessary if your schema can't be completely dumped by the schema dumper,
  # like if you have constraints or database-specific column types
  config.active_record.schema_format = :sql

  # Activate observers that should always be running
  # config.active_record.observers = :cacher, :garbage_collector

  # The internationalization framework can be changed to have another default locale (standard is :en) or more load paths.
  # All files from config/locales/*.rb,yml are added automatically.
  #config.i18n.load_path << Dir[File.join(RAILS_ROOT, 'my', 'locales', '*.{rb,yml}')]
  config.i18n.default_locale = :'en-US'

  config.active_record.observers = :order_observer
end

Time::DATE_FORMATS[:date_time24] = "%Y-%m-%d %H:%M"
Time::DATE_FORMATS[:short_date] = "%Y-%m-%d"

# Add new inflection rules using the following format
# (all these examples are active by default):
# Inflector.inflections do |inflect|
#   inflect.plural /^(ox)$/i, '\1en'
#   inflect.singular /^(ox)en/i, '\1'
#   inflect.irregular 'person', 'people'
#   inflect.uncountable %w( fish sheep )
# end

# Add new mime types for use in respond_to blocks:
# Mime::Type.register "text/richtext", :rtf
# Mime::Type.register "application/x-mobile", :mobile

# Include your application configuration below


text:
"""
=================================================
Demo of affinity propagation clustering algorithm
=================================================

Reference:
Brendan J. Frey and Delbert Dueck, "Clustering by Passing Messages
Between Data Points", Science Feb. 2007

"""
print __doc__

import numpy as np
from sklearn.cluster import AffinityPropagation
from sklearn import metrics
from sklearn.datasets.samples_generator import make_blobs

##############################################################################
# Generate sample data
centers = [[1, 1], [-1, -1], [1, -1]]
X, labels_true = make_blobs(n_samples=300, centers=centers, cluster_std=0.5)

##############################################################################
# Compute similarities
X_norms = np.sum(X ** 2, axis=1)
S = - X_norms[:, np.newaxis] - X_norms[np.newaxis, :] + 2 * np.dot(X, X.T)
p = 10 * np.median(S)

##############################################################################
# Compute Affinity Propagation
af = AffinityPropagation().fit(S, p)
cluster_centers_indices = af.cluster_centers_indices_
labels = af.labels_

n_clusters_ = len(cluster_centers_indices)

print 'Estimated number of clusters: %d' % n_clusters_
print "Homogeneity: %0.3f" % metrics.homogeneity_score(labels_true, labels)
print "Completeness: %0.3f" % metrics.completeness_score(labels_true, labels)
print "V-measure: %0.3f" % metrics.v_measure_score(labels_true, labels)
print "Adjusted Rand Index: %0.3f" % \
    metrics.adjusted_rand_score(labels_true, labels)
print "Adjusted Mutual Information: %0.3f" % \
    metrics.adjusted_mutual_info_score(labels_true, labels)
D = (S / np.min(S))
print ("Silhouette Coefficient: %0.3f" %
       metrics.silhouette_score(D, labels, metric='precomputed'))

##############################################################################
# Plot result
import pylab as pl
from itertools import cycle

pl.close('all')
pl.figure(1)
pl.clf()

colors = cycle('bgrcmykbgrcmykbgrcmykbgrcmyk')
for k, col in zip(range(n_clusters_), colors):
    class_members = labels == k
    cluster_center = X[cluster_centers_indices[k]]
    pl.plot(X[class_members, 0], X[class_members, 1], col + '.')
    pl.plot(cluster_center[0], cluster_center[1], 'o', markerfacecolor=col,
            markeredgecolor='k', markersize=14)
    for x in X[class_members]:
        pl.plot([cluster_center[0], x[0]], [cluster_center[1], x[1]], col)

pl.title('Estimated number of clusters: %d' % n_clusters_)
pl.show()


text:
namespace rocksdb {

#if ROCKSDB_USING_THREAD_STATUS
const std::string& ThreadStatus::GetThreadTypeName(
    ThreadStatus::ThreadType thread_type) {
  static std::string thread_type_names[NUM_THREAD_TYPES + 1] = {
      "High Pri", "Low Pri", "User", "Unknown"};
  if (thread_type < 0 || thread_type >= NUM_THREAD_TYPES) {
    return thread_type_names[NUM_THREAD_TYPES];  // "Unknown"
  }
  return thread_type_names[thread_type];
}

const std::string& ThreadStatus::GetOperationName(
    ThreadStatus::OperationType op_type) {
  if (op_type < 0 || op_type >= NUM_OP_TYPES) {
    return global_operation_table[OP_UNKNOWN].name;
  }
  return global_operation_table[op_type].name;
}

const std::string& ThreadStatus::GetOperationStageName(
    ThreadStatus::OperationStage stage) {
  if (stage < 0 || stage >= NUM_OP_STAGES) {
    return global_op_stage_table[STAGE_UNKNOWN].name;
  }
  return global_op_stage_table[stage].name;
}

const std::string& ThreadStatus::GetStateName(
    ThreadStatus::StateType state_type) {
  if (state_type < 0 || state_type >= NUM_STATE_TYPES) {
    return global_state_table[STATE_UNKNOWN].name;
  }
  return global_state_table[state_type].name;
}

const std::string ThreadStatus::MicrosToString(uint64_t micros) {
  if (micros == 0) {
    return "";
  }
  const int kBufferLen = 100;
  char buffer[kBufferLen];
  AppendHumanMicros(micros, buffer, kBufferLen, false);
  return std::string(buffer);
}

const std::string& ThreadStatus::GetOperationPropertyName(
    ThreadStatus::OperationType op_type, int i) {
  static const std::string empty_str = "";
  switch (op_type) {
    case ThreadStatus::OP_COMPACTION:
      if (i >= NUM_COMPACTION_PROPERTIES) {
        return empty_str;
      }
      return compaction_operation_properties[i].name;
    case ThreadStatus::OP_FLUSH:
      if (i >= NUM_FLUSH_PROPERTIES) {
        return empty_str;
      }
      return flush_operation_properties[i].name;
    default:
      return empty_str;
  }
}

std::map<std::string, uint64_t>
    ThreadStatus::InterpretOperationProperties(
    ThreadStatus::OperationType op_type,
    const uint64_t* op_properties) {
  int num_properties;
  switch (op_type) {
    case OP_COMPACTION:
      num_properties = NUM_COMPACTION_PROPERTIES;
      break;
    case OP_FLUSH:
      num_properties = NUM_FLUSH_PROPERTIES;
      break;
    default:
      num_properties = 0;
  }

  std::map<std::string, uint64_t> property_map;
  for (int i = 0; i < num_properties; ++i) {
    if (op_type == OP_COMPACTION &&
        i == COMPACTION_INPUT_OUTPUT_LEVEL) {
      property_map.insert(
          {"BaseInputLevel", op_properties[i] >> 32});
      property_map.insert(
          {"OutputLevel", op_properties[i] % (uint64_t(1) << 32U)});
    } else if (op_type == OP_COMPACTION &&
               i == COMPACTION_PROP_FLAGS) {
      property_map.insert(
          {"IsManual", ((op_properties[i] & 2) >> 1)});
      property_map.insert(
          {"IsDeletion", ((op_properties[i] & 4) >> 2)});
      property_map.insert(
          {"IsTrivialMove", ((op_properties[i] & 8) >> 3)});
    } else {
      property_map.insert(
          {GetOperationPropertyName(op_type, i), op_properties[i]});
    }
  }
  return property_map;
}

#else

const std::string& ThreadStatus::GetThreadTypeName(
    ThreadStatus::ThreadType thread_type) {
  static std::string dummy_str = "";
  return dummy_str;
}

const std::string& ThreadStatus::GetOperationName(
    ThreadStatus::OperationType op_type) {
  static std::string dummy_str = "";
  return dummy_str;
}

const std::string& ThreadStatus::GetOperationStageName(
    ThreadStatus::OperationStage stage) {
  static std::string dummy_str = "";
  return dummy_str;
}

const std::string& ThreadStatus::GetStateName(
    ThreadStatus::StateType state_type) {
  static std::string dummy_str = "";
  return dummy_str;
}

const std::string ThreadStatus::MicrosToString(
    uint64_t op_elapsed_time) {
  static std::string dummy_str = "";
  return dummy_str;
}

const std::string& ThreadStatus::GetOperationPropertyName(
    ThreadStatus::OperationType op_type, int i) {
  static std::string dummy_str = "";
  return dummy_str;
}

std::map<std::string, uint64_t>
    ThreadStatus::InterpretOperationProperties(
    ThreadStatus::OperationType op_type,
    const uint64_t* op_properties) {
  return std::map<std::string, uint64_t>();
}

#endif  // ROCKSDB_USING_THREAD_STATUS
}  // namespace rocksdb


text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title>INSPINIA | Error</title>

    <link href="css/bootstrap.min.css" rel="stylesheet">
    <link href="font-awesome/css/font-awesome.css" rel="stylesheet">

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

404

Page Not Found

            {{ e }}
            <form class="form-inline m-t" role="form">

                    <input type="text" class="form-control" placeholder="Search for page">

                <button type="submit" class="btn btn-primary">Search</button>
            </form>


text:
NS_ASSUME_NONNULL_BEGIN

@interface ApptentiveIndexedCollectionView : UICollectionView

@property (assign, nonatomic) NSInteger index;

@end

NS_ASSUME_NONNULL_END


text:
namespace RayTrace {

class Light {
 public:
  Light() { }

  virtual ~Light() { }
};

}

#endif


text:
// Copyright 2020 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "chrome/browser/ash/exo/chrome_data_exchange_delegate.h"

#include <string>
#include <vector>

#include "ash/components/arc/arc_util.h"
#include "ash/public/cpp/app_types_util.h"
#include "base/logging.h"
#include "base/memory/ref_counted_memory.h"
#include "base/strings/escape.h"
#include "base/strings/strcat.h"
#include "base/strings/string_piece.h"
#include "base/strings/string_split.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/ash/arc/arc_util.h"
#include "chrome/browser/ash/borealis/borealis_window_manager.h"
#include "chrome/browser/ash/crosapi/browser_util.h"
#include "chrome/browser/ash/crostini/crostini_util.h"
#include "chrome/browser/ash/extensions/file_manager/event_router.h"
#include "chrome/browser/ash/extensions/file_manager/event_router_factory.h"
#include "chrome/browser/ash/file_manager/app_id.h"
#include "chrome/browser/ash/file_manager/fileapi_util.h"
#include "chrome/browser/ash/file_manager/path_util.h"
#include "chrome/browser/ash/guest_os/guest_os_session_tracker.h"
#include "chrome/browser/ash/guest_os/guest_os_share_path.h"
#include "chrome/browser/ash/plugin_vm/plugin_vm_files.h"
#include "chrome/browser/ash/plugin_vm/plugin_vm_util.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/profile_manager.h"
#include "content/public/common/drop_data.h"
#include "storage/browser/file_system/external_mount_points.h"
#include "storage/browser/file_system/file_system_context.h"
#include "storage/browser/file_system/file_system_url.h"
#include "third_party/blink/public/common/storage_key/storage_key.h"
#include "ui/aura/window.h"
#include "ui/base/clipboard/clipboard.h"
#include "ui/base/clipboard/clipboard_buffer.h"
#include "ui/base/clipboard/custom_data_helper.h"
#include "ui/base/clipboard/file_info.h"
#include "ui/base/data_transfer_policy/data_transfer_endpoint.h"
#include "ui/base/dragdrop/os_exchange_data.h"
#include "url/gurl.h"

namespace ash {

namespace {

constexpr char kMimeTypeArcUriList[] = "application/x-arc-uri-list";
constexpr char kMimeTypeTextUriList[] = "text/uri-list";
constexpr char kUriListSeparator[] = "\r\n";
constexpr char kVmFileScheme[] = "vmfile";

// Mime types used in FilesApp to copy/paste files to clipboard.
constexpr char16_t kFilesAppMimeSources[] = u"fs/sources";
constexpr char16_t kFilesAppSeparator16[] = u"\n";

storage::FileSystemContext* GetFileSystemContext() {
  Profile* primary_profile = ProfileManager::GetPrimaryUserProfile();
  if (!primary_profile)
    return nullptr;

  return file_manager::util::GetFileManagerFileSystemContext(primary_profile);
}

void GetFileSystemUrlsFromPickle(
    const base::Pickle& pickle,
    std::vector<storage::FileSystemURL>* file_system_urls) {
  storage::FileSystemContext* file_system_context = GetFileSystemContext();
  if (!file_system_context)
    return;

  std::vector<content::DropData::FileSystemFileInfo> file_system_files;
  if (!content::DropData::FileSystemFileInfo::ReadFileSystemFilesFromPickle(
          pickle, &file_system_files))
    return;

  for (const auto& file_system_file : file_system_files) {
    const storage::FileSystemURL file_system_url =
        file_system_context->CrackURLInFirstPartyContext(file_system_file.url);
    if (file_system_url.is_valid())
      file_system_urls->push_back(std::move(file_system_url));
  }
}

void SendArcUrls(exo::DataExchangeDelegate::SendDataCallback callback,
                 const std::vector<GURL>& urls) {
  std::vector<std::string> lines;
  for (const GURL& url : urls) {
    if (!url.is_valid())
      continue;
    lines.push_back(url.spec());
  }
  // Arc requires UTF16 for data.
  std::move(callback).Run(base::MakeRefCounted<base::RefCountedString16>(
      base::UTF8ToUTF16(base::JoinString(lines, kUriListSeparator))));
}

void SendAfterShare(ui::EndpointType target,
                    exo::DataExchangeDelegate::SendDataCallback callback,
                    std::vector<std::string> file_urls) {
  std::string joined = base::JoinString(file_urls, kUriListSeparator);
  scoped_refptr<base::RefCountedMemory> data;
  if (target == ui::EndpointType::kArc) {
    // Arc uses utf-16 data.
    data = base::MakeRefCounted<base::RefCountedString16>(
        base::UTF8ToUTF16(joined));
  } else {
    data = base::MakeRefCounted<base::RefCountedString>(std::move(joined));
  }

  std::move(callback).Run(data);
}

struct FileInfo {
  base::FilePath path;
  storage::FileSystemURL url;
};

// Returns true if path is shared with the specified VM, or for crostini if path
// is homedir or dir within.
bool IsPathShared(Profile* profile,
                  std::string vm_name,
                  bool is_crostini,
                  base::FilePath path) {
  auto* share_path = guest_os::GuestOsSharePath::GetForProfile(profile);
  if (share_path->IsPathShared(vm_name, path)) {
    return true;
  }
  if (is_crostini) {
    base::FilePath mount =
        file_manager::util::GetCrostiniMountDirectory(profile);
    return path == mount || mount.IsParent(path);
  }
  return false;
}

// Translate |vm_paths| from |source| VM to host paths.
std::vector<FileInfo> TranslateVMToHost(ui::EndpointType source,
                                        std::vector<ui::FileInfo> vm_paths) {
  std::vector<FileInfo> file_info;
  Profile* primary_profile = ProfileManager::GetPrimaryUserProfile();
  bool is_crostini = source == ui::EndpointType::kCrostini;
  bool is_plugin_vm = source == ui::EndpointType::kPluginVm;

  base::FilePath vm_mount;
  std::string vm_name;
  if (is_crostini) {
    vm_mount = crostini::ContainerChromeOSBaseDirectory();
    vm_name = crostini::kCrostiniDefaultVmName;
  } else if (is_plugin_vm) {
    vm_mount = plugin_vm::ChromeOSBaseDirectory();
    vm_name = plugin_vm::kPluginVmName;
  }

  for (ui::FileInfo& info : vm_paths) {
    base::FilePath path = std::move(info.path);
    storage::FileSystemURL url;

    // Convert the VM path to a path in the host if possible (in homedir or
    // /mnt/chromeos for crostini; in //ChromeOS for Plugin VM), otherwise
    // prefix with 'vmfile:<vm_name>:' to avoid VMs spoofing host paths.
    // E.g. crostini /etc/mime.types => vmfile:termina:/etc/mime.types.
    if (is_crostini || is_plugin_vm) {
      if (file_manager::util::ConvertPathInsideVMToFileSystemURL(
              primary_profile, path, vm_mount,
              /*map_crostini_home=*/is_crostini, &url)) {
        path = url.path();
        // Only allow write to clipboard for paths that are shared.
        if (!IsPathShared(primary_profile, vm_name, is_crostini, path)) {
          LOG(WARNING) << "Unshared file path: " << path;
          continue;
        }
      } else {
        path = base::FilePath(
            base::StrCat({kVmFileScheme, ":", vm_name, ":", path.value()}));
      }
    }
    file_info.push_back({std::move(path), std::move(url)});
  }
  return file_info;
}

// Crack paths and get FileSystemURL.
std::vector<FileInfo> CrackPaths(std::vector<base::FilePath> paths) {
  storage::ExternalMountPoints* mount_points =
      storage::ExternalMountPoints::GetSystemInstance();
  base::FilePath virtual_path;
  std::vector<FileInfo> file_info;

  for (auto& path : paths) {
    // Convert absolute host path to FileSystemURL if possible.
    storage::FileSystemURL url;
    if (mount_points->GetVirtualPath(path, &virtual_path)) {
      url = mount_points->CreateCrackedFileSystemURL(
          blink::StorageKey(), storage::kFileSystemTypeExternal, virtual_path);
    }
    file_info.push_back({std::move(path), std::move(url)});
  }
  return file_info;
}

// Share |files| with |target| VM and invoke |callback| with translated file:
// URLs.
void ShareAndTranslateHostToVM(
    ui::EndpointType target,
    std::vector<FileInfo> files,
    base::OnceCallback<void(std::vector<std::string>)> callback) {
  Profile* primary_profile = ProfileManager::GetPrimaryUserProfile();
  bool is_arc = target == ui::EndpointType::kArc;
  bool is_crostini = target == ui::EndpointType::kCrostini;
  bool is_plugin_vm = target == ui::EndpointType::kPluginVm;

  base::FilePath vm_mount;
  std::string vm_name;
  if (is_arc) {
    // For ARC, |share_required| below will always be false and |vm_name| will
    // not be used. Setting it to arc::kArcVmName has no effect.
    vm_name = arc::kArcVmName;
  } else if (is_crostini) {
    vm_mount = crostini::ContainerChromeOSBaseDirectory();
    vm_name = crostini::kCrostiniDefaultVmName;
  } else if (is_plugin_vm) {
    vm_mount = plugin_vm::ChromeOSBaseDirectory();
    vm_name = plugin_vm::kPluginVmName;
  }

  const std::string vm_prefix =
      base::StrCat({kVmFileScheme, ":", vm_name, ":"});
  std::vector<std::string> file_urls;
  auto* share_path = guest_os::GuestOsSharePath::GetForProfile(primary_profile);
  std::vector<base::FilePath> paths_to_share;

  for (auto& info : files) {
    std::string file_url;
    bool share_required = false;
    if (is_arc) {
      GURL arc_url;
      if (!file_manager::util::ConvertPathToArcUrl(info.path, &arc_url,
                                                   &share_required)) {
        LOG(WARNING) << "Could not convert arc path " << info.path;
        continue;
      }
      file_url = arc_url.spec();
    } else if (is_crostini || is_plugin_vm) {
      base::FilePath path;
      // Check if it is a path inside the VM: 'vmfile:<vm_name>:'.
      if (base::StartsWith(info.path.value(), vm_prefix,
                           base::CompareCase::SENSITIVE)) {
        file_url = ui::FilePathToFileURL(
            base::FilePath(info.path.value().substr(vm_prefix.size())));
      } else if (file_manager::util::ConvertFileSystemURLToPathInsideVM(
                     primary_profile, info.url, vm_mount,
                     /*map_crostini_home=*/is_crostini, &path)) {
        // Convert to path inside the VM.
        file_url = ui::FilePathToFileURL(path);
        share_required = true;
      } else {
        LOG(WARNING) << "Could not convert into VM path " << info.path;
        continue;
      }
    } else {
      // Use path without conversion as default.
      file_url = ui::FilePathToFileURL(info.path);
    }
    file_urls.push_back(std::move(file_url));
    if (share_required && !share_path->IsPathShared(vm_name, info.path))
      paths_to_share.push_back(std::move(info.path));
  }

  if (!paths_to_share.empty()) {
    if (!is_plugin_vm) {
      auto vm_info =
          guest_os::GuestOsSessionTracker::GetForProfile(primary_profile)
              ->GetVmInfo(vm_name);
      if (!vm_info) {
        // VM must be running for copy-paste or drag-drop to be happening so
        // something's gone wrong, skip trying to share and just send the data.
        std::move(callback).Run(std::move(file_urls));
        return;
      }
      share_path->SharePaths(
          vm_name, vm_info->seneschal_server_handle(),
          std::move(paths_to_share),
          base::BindOnce(
              [](base::OnceCallback<void(std::vector<std::string>)> callback,
                 std::vector<std::string> file_urls, bool success,
                 const std::string& failure_reason) {
                if (!success)
                  LOG(ERROR) << "Error sharing paths: " << failure_reason;

                // Still send the data, even if sharing failed.
                std::move(callback).Run(file_urls);
              },
              std::move(callback), std::move(file_urls)));
      return;
    }

    // Show FilesApp move-to-windows-files dialog when Plugin VM is not shared.
    if (auto* event_router =
            file_manager::EventRouterFactory::GetForProfile(primary_profile)) {
      event_router->DropFailedPluginVmDirectoryNotShared();
    }
    file_urls.clear();
  }

  std::move(callback).Run(std::move(file_urls));
}

}  // namespace

std::vector<base::FilePath> TranslateVMPathsToHost(
    ui::EndpointType source,
    const std::vector<ui::FileInfo>& vm_paths) {
  std::vector<FileInfo> translated = TranslateVMToHost(source, vm_paths);
  std::vector<base::FilePath> result;
  for (auto& info : translated)
    result.push_back(std::move(info.path));
  return result;
}

void ShareWithVMAndTranslateToFileUrls(
    ui::EndpointType target,
    const std::vector<base::FilePath>& files,
    base::OnceCallback<void(std::vector<std::string>)> callback) {
  ShareAndTranslateHostToVM(target, CrackPaths(files), std::move(callback));
}

ChromeDataExchangeDelegate::ChromeDataExchangeDelegate() = default;

ChromeDataExchangeDelegate::~ChromeDataExchangeDelegate() = default;

ui::EndpointType ChromeDataExchangeDelegate::GetDataTransferEndpointType(
    aura::Window* target) const {
  auto* top_level_window = target->GetToplevelWindow();

  if (IsArcWindow(top_level_window))
    return ui::EndpointType::kArc;

  if (borealis::BorealisWindowManager::IsBorealisWindow(top_level_window))
    return ui::EndpointType::kBorealis;

  if (crosapi::browser_util::IsLacrosWindow(top_level_window))
    return ui::EndpointType::kLacros;

  if (crostini::IsCrostiniWindow(top_level_window))
    return ui::EndpointType::kCrostini;

  if (plugin_vm::IsPluginVmAppWindow(top_level_window))
    return ui::EndpointType::kPluginVm;

  return ui::EndpointType::kUnknownVm;
}

std::vector<ui::FileInfo> ChromeDataExchangeDelegate::GetFilenames(
    ui::EndpointType source,
    const std::vector<uint8_t>& data) const {
  std::vector<ui::FileInfo> result;
  std::vector<FileInfo> file_info = TranslateVMToHost(
      source, ui::URIListToFileInfos(std::string(data.begin(), data.end())));
  for (auto& info : file_info)
    result.push_back(ui::FileInfo(std::move(info.path), base::FilePath()));
  return result;
}

std::string ChromeDataExchangeDelegate::GetMimeTypeForUriList(
    ui::EndpointType target) const {
  return target == ui::EndpointType::kArc ? kMimeTypeArcUriList
                                          : kMimeTypeTextUriList;
}

void ChromeDataExchangeDelegate::SendFileInfo(
    ui::EndpointType target,
    const std::vector<ui::FileInfo>& files,
    SendDataCallback callback) const {
  std::vector<base::FilePath> paths;
  for (const auto& file : files)
    paths.push_back(file.path);

  ShareAndTranslateHostToVM(
      target, CrackPaths(std::move(paths)),
      base::BindOnce(&SendAfterShare, target, std::move(callback)));
}

bool ChromeDataExchangeDelegate::HasUrlsInPickle(
    const base::Pickle& pickle) const {
  std::vector<storage::FileSystemURL> file_system_urls;
  GetFileSystemUrlsFromPickle(pickle, &file_system_urls);
  return !file_system_urls.empty();
}

void ChromeDataExchangeDelegate::SendPickle(ui::EndpointType target,
                                            const base::Pickle& pickle,
                                            SendDataCallback callback) {
  std::vector<storage::FileSystemURL> file_system_urls;
  GetFileSystemUrlsFromPickle(pickle, &file_system_urls);

  // ARC FileSystemURLs are converted to Content URLs.
  if (target == ui::EndpointType::kArc) {
    if (file_system_urls.empty()) {
      std::move(callback).Run(nullptr);
      return;
    }
    arc::ConvertToContentUrlsAndShare(
        ProfileManager::GetPrimaryUserProfile(), file_system_urls,
        base::BindOnce(&SendArcUrls, std::move(callback)));
    return;
  }

  std::vector<FileInfo> list;
  for (auto& url : file_system_urls) {
    base::FilePath path = url.path();
    list.push_back({std::move(path), std::move(url)});
  }

  ShareAndTranslateHostToVM(
      target, std::move(list),
      base::BindOnce(&SendAfterShare, target, std::move(callback)));
}

std::vector<ui::FileInfo> ChromeDataExchangeDelegate::ParseFileSystemSources(
    const ui::DataTransferEndpoint* source,
    const base::Pickle& pickle) const {
  std::vector<ui::FileInfo> file_info;
  // We only promote 'fs/sources' custom data pickle to be filenames which can
  // be shared and read by clients if it came from the trusted FilesApp.
  if (!source || !source->GetURL() ||
      !file_manager::util::IsFileManagerURL(*source->GetURL())) {
    return file_info;
  }

  std::u16string file_system_url_list;
  ui::ReadCustomDataForType(pickle.data(), pickle.size(), kFilesAppMimeSources,
                            &file_system_url_list);
  if (file_system_url_list.empty())
    return file_info;

  storage::ExternalMountPoints* mount_points =
      storage::ExternalMountPoints::GetSystemInstance();

  for (const base::StringPiece16& line : base::SplitStringPiece(
           file_system_url_list, kFilesAppSeparator16, base::TRIM_WHITESPACE,
           base::SPLIT_WANT_NONEMPTY)) {
    if (line.empty() || line[0] == '#')
      continue;
    const GURL gurl(line);
    storage::FileSystemURL url = mount_points->CrackURL(
        gurl, blink::StorageKey(url::Origin::Create(gurl)));
    if (!url.is_valid()) {
      LOG(WARNING) << "Invalid clipboard FileSystemURL: " << line;
      continue;
    }
    file_info.push_back(ui::FileInfo(std::move(url.path()), base::FilePath()));
  }
  return file_info;
}

}  // namespace ash


text:
//
// Este archivo ha sido generado por la arquitectura JavaTM para la implantación de la referencia de enlace (JAXB) XML v2.2.7
// Visite http://java.sun.com/xml/jaxb
// Todas las modificaciones realizadas en este archivo se perderán si se vuelve a compilar el esquema de origen.
// Generado el: 2014.07.03 a las 03:33:34 AM CDT
//

package com.dextratech.dtf.xml.testsuite;

import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
import org.jvnet.jaxb2_commons.lang.JAXBToStringStrategy;
import org.jvnet.jaxb2_commons.lang.ToString;
import org.jvnet.jaxb2_commons.lang.ToStringStrategy;
import org.jvnet.jaxb2_commons.locator.ObjectLocator;

/**
 *
Clase Java para ValidationRules complex type.
 *
 *
El siguiente fragmento de esquema especifica el contenido que se espera que haya en esta clase.
 *
 *

 * <complexType name="ValidationRules">
 *   <complexContent>
 *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *       <sequence>
 *         <element name="function" type="{http://www.dextratech.com/testsuite}ValidationFunction" maxOccurs="unbounded" minOccurs="0"/>
 *       </sequence>
 *     </restriction>
 *   </complexContent>
 * </complexType>
 *

 *
 *
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "ValidationRules", propOrder = {
    "function"
})
public class ValidationRules
    implements ToString
{

    protected List<ValidationFunction> function;

    /**
     * Gets the value of the function property.
     *
     *

     * This accessor method returns a reference to the live list,
     * not a snapshot. Therefore any modification you make to the
     * returned list will be present inside the JAXB object.
     * This is why there is not a set method for the function property.
     *
     *

     * For example, to add a new item, do as follows:
     *

     *    getFunction().add(newItem);
     *

     *
     *
     *

     * Objects of the following type(s) are allowed in the list
     * {@link ValidationFunction }
     *
     *
     */
    public List<ValidationFunction> getFunction() {
        if (function == null) {
            function = new ArrayList<ValidationFunction>();
        }
        return this.function;
    }

    public String toString() {
        final ToStringStrategy strategy = JAXBToStringStrategy.INSTANCE;
        final StringBuilder buffer = new StringBuilder();
        append(null, buffer, strategy);
        return buffer.toString();
    }

    public StringBuilder append(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
        strategy.appendStart(locator, this, buffer);
        appendFields(locator, buffer, strategy);
        strategy.appendEnd(locator, this, buffer);
        return buffer;
    }

    public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
        {
            List<ValidationFunction> theFunction;
            theFunction = (((this.function!= null)&&(!this.function.isEmpty()))?this.getFunction():null);
            strategy.appendField(locator, this, "function", buffer, theFunction);
        }
        return buffer;
    }

}


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

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Uses of Package org.diablitozzz.jin.impl (jin 1.0.0 API)</title>
<meta name="date" content="2016-03-18">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Skip navigation links

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes

Uses of Package
org.diablitozzz.jin.impl

Packages that use org.diablitozzz.jin.impl

Package
Description

org.diablitozzz.jin.impl

Classes in org.diablitozzz.jin.impl used by org.diablitozzz.jin.impl

Class and Description

JinBuilder

This builder for Jin implementations.

JinBuilder.Type

Types of Jin implementations.

JinFactoryAbstract

A default abstract implementation of the Jin factory.

JinFactoryAnnotation

This is implementation of the annotation-driven factory.

JinFactoryConfigurable

This is implementation of the configurable factory.

JinFactoryConfigurable.Spec

Specification for for the configurable factory.

JinFactoryConfigurable.Spec.Arg

Argument specification.

JinFactoryConfigurable.Spec.Call

Call specification.

JinFactoryConfigurable.Spec.Entry

Entry specification.

JinFactoryConfigurable.Spec.Field

Field specification.

JinFactoryConfigurable.Spec.Node

Abstract node specification.

JinFactoryConfigurable.Spec.Property

Property specification.

JinFactorySynchronized

This is thread safe wrapper of factory.

Skip navigation links

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes

Copyright © 2016 jin. All rights reserved.


text:
using System;
using System.Windows.Forms;
using Microsoft.Speech.Recognition;
namespace KinectHaus
{
    public class ListenContext
    {
        readonly Form _form;
        readonly Action<int, string, string, ListenIcon> _balloonTip;

        public ListenContext(Form form, Action<int, string, string, ListenIcon> balloonTip)
        {
            _form = form;
            _balloonTip = balloonTip;
        }

        public void BalloonTip(string title, RecognitionResult r)
        {
            var args = r.Semantics.Value.ToString().Split('|');
            var text = string.Format("{0} {1:P0}", args[0], r.Confidence);
            _balloonTip(15, title, text, ListenIcon.Info);
        }
        public void BalloonTip(int time, string title, string text, RecognitionResult r, ListenIcon icon)
        {
            var args = r.Semantics.Value.ToString().Split('|');
            text = string.Format("{0} {1:P0}", text, r.Confidence);
            _balloonTip(time, title, text, icon);
        }

        public void BalloonTip(int time, string title, string text, ListenIcon icon)
        {
            _balloonTip(time, title, text, icon);
        }

        public void Exit()
        {
            _form.Close();
            Application.Exit();
        }
    }
}


text:
package Lab7_P1.Q4;

public class Child implements Player {

	public String play() {
		return "The meaning of the word play when it comes to children is doing some" +
				"activity to that's fun to kill time";
	}

}


text:
/**
 */
package isostdisois_13584_32ed_1techxmlschemaontomlSimplified.impl;

import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.NotificationChain;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.ENotificationImpl;

import isostdisois_13584_32ed_1techxmlschemaontomlSimplified.CLASSESREFERENCE;
import isostdisois_13584_32ed_1techxmlschemaontomlSimplified.Isostdisois_13584_32ed_1techxmlschemaontomlSimplifiedPackage;
import isostdisois_13584_32ed_1techxmlschemaontomlSimplified.SUBCLASSCONSTRAINT;

/**
 *
 * An implementation of the model object 'SUBCLASSCONSTRAINT'.
 *
 *

 * The following features are implemented:
 *

 *

 *
{@link isostdisois_13584_32ed_1techxmlschemaontomlSimplified.impl.SUBCLASSCONSTRAINTImpl#getSubclasses Subclasses}

 *

 *
 * @generated
 */
public class SUBCLASSCONSTRAINTImpl extends DOMAINCONSTRAINTImpl implements SUBCLASSCONSTRAINT {
	/**
	 * The cached value of the '{@link #getSubclasses() Subclasses}' containment reference.
	 *
	 *
	 * @see #getSubclasses()
	 * @generated
	 * @ordered
	 */
	protected CLASSESREFERENCE subclasses;

	/**
	 *
	 *
	 * @generated
	 */
	protected SUBCLASSCONSTRAINTImpl() {
		super();
	}

	/**
	 *
	 *
	 * @generated
	 */
	@Override
	protected EClass eStaticClass() {
		return Isostdisois_13584_32ed_1techxmlschemaontomlSimplifiedPackage.Literals.SUBCLASSCONSTRAINT;
	}

	/**
	 *
	 *
	 * @generated
	 */
	public CLASSESREFERENCE getSubclasses() {
		return subclasses;
	}

	/**
	 *
	 *
	 * @generated
	 */
	public NotificationChain basicSetSubclasses(CLASSESREFERENCE newSubclasses, NotificationChain msgs) {
		CLASSESREFERENCE oldSubclasses = subclasses;
		subclasses = newSubclasses;
		if (eNotificationRequired()) {
			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Isostdisois_13584_32ed_1techxmlschemaontomlSimplifiedPackage.SUBCLASSCONSTRAINT__SUBCLASSES, oldSubclasses, newSubclasses);
			if (msgs == null) msgs = notification; else msgs.add(notification);
		}
		return msgs;
	}

	/**
	 *
	 *
	 * @generated
	 */
	public void setSubclasses(CLASSESREFERENCE newSubclasses) {
		if (newSubclasses != subclasses) {
			NotificationChain msgs = null;
			if (subclasses != null)
				msgs = ((InternalEObject)subclasses).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - Isostdisois_13584_32ed_1techxmlschemaontomlSimplifiedPackage.SUBCLASSCONSTRAINT__SUBCLASSES, null, msgs);
			if (newSubclasses != null)
				msgs = ((InternalEObject)newSubclasses).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - Isostdisois_13584_32ed_1techxmlschemaontomlSimplifiedPackage.SUBCLASSCONSTRAINT__SUBCLASSES, null, msgs);
			msgs = basicSetSubclasses(newSubclasses, msgs);
			if (msgs != null) msgs.dispatch();
		}
		else if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, Isostdisois_13584_32ed_1techxmlschemaontomlSimplifiedPackage.SUBCLASSCONSTRAINT__SUBCLASSES, newSubclasses, newSubclasses));
	}

	/**
	 *
	 *
	 * @generated
	 */
	@Override
	public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
		switch (featureID) {
			case Isostdisois_13584_32ed_1techxmlschemaontomlSimplifiedPackage.SUBCLASSCONSTRAINT__SUBCLASSES:
				return basicSetSubclasses(null, msgs);
		}
		return super.eInverseRemove(otherEnd, featureID, msgs);
	}

	/**
	 *
	 *
	 * @generated
	 */
	@Override
	public Object eGet(int featureID, boolean resolve, boolean coreType) {
		switch (featureID) {
			case Isostdisois_13584_32ed_1techxmlschemaontomlSimplifiedPackage.SUBCLASSCONSTRAINT__SUBCLASSES:
				return getSubclasses();
		}
		return super.eGet(featureID, resolve, coreType);
	}

	/**
	 *
	 *
	 * @generated
	 */
	@Override
	public void eSet(int featureID, Object newValue) {
		switch (featureID) {
			case Isostdisois_13584_32ed_1techxmlschemaontomlSimplifiedPackage.SUBCLASSCONSTRAINT__SUBCLASSES:
				setSubclasses((CLASSESREFERENCE)newValue);
				return;
		}
		super.eSet(featureID, newValue);
	}

	/**
	 *
	 *
	 * @generated
	 */
	@Override
	public void eUnset(int featureID) {
		switch (featureID) {
			case Isostdisois_13584_32ed_1techxmlschemaontomlSimplifiedPackage.SUBCLASSCONSTRAINT__SUBCLASSES:
				setSubclasses((CLASSESREFERENCE)null);
				return;
		}
		super.eUnset(featureID);
	}

	/**
	 *
	 *
	 * @generated
	 */
	@Override
	public boolean eIsSet(int featureID) {
		switch (featureID) {
			case Isostdisois_13584_32ed_1techxmlschemaontomlSimplifiedPackage.SUBCLASSCONSTRAINT__SUBCLASSES:
				return subclasses != null;
		}
		return super.eIsSet(featureID);
	}

} //SUBCLASSCONSTRAINTImpl


text:
export function newUserMessage(username) {
  return `Thanks ${username}! You have successfully registered, please log in.`
}


text:
Template.clients.onRendered(function(){
});

Template.clients.helpers({
  'client_list' : function (){
    return Clients.find();
  }
});

Template.clients.events({
  'click .open_dlg_btn' : function (evt, tmp) {

  },
  'click .new_client_act' : function (evt, tmp) {
    $("#new_client").modal('show');
  }
});

Template.client_item.events({
  'click .edit_client' : function (evt, tmp) {
    Session.set('editing_client', this);
    $("#new_client").modal('show');
  },

  'click .remove_client' : function (evt, tmp) {
    Meteor.call('remove_client', this._id);
  }

});