text:
package campyre.android;

import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;

import android.app.Activity;
import android.app.ListActivity;
import android.app.ProgressDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.AsyncTask;
import android.os.Bundle;
import android.os.Handler;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.view.Window;
import android.view.inputmethod.EditorInfo;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ProgressBar;
import android.widget.TextView;
import campyre.java.Campfire;
import campyre.java.CampfireException;
import campyre.java.Message;
import campyre.java.Room;
import campyre.java.User;

public class RoomView extends ListActivity {
	private static final int MENU_LOGOUT = 0;

	private static final int MAX_MESSAGES = 20;
	private static final int AUTOPOLL_INTERVAL = 2; // in seconds
	private static final long JOIN_TIMEOUT = 60; // in seconds
	private static final int PASTE_TRUNCATE = 200;

	private static String timestampFormat = "hh:mm a";

	private Campfire campfire;
	private String roomId;
	private Room room;

	private HashMap<String,SpeakTask> speakTasks = new HashMap<String,SpeakTask>();
	private JoinTask joinTask;

	private int pollFailures = 0;
	private int transitId = 1;
	private long lastJoined = 0;

	private ArrayList<Message> messages = new ArrayList<Message>();
	private HashMap<String,Message> transitMessages = new HashMap<String,Message>();
	private HashMap<String,User> users = new HashMap<String,User>();

	private EditText body;
	private Button speak;
	private ProgressBar titleSpinner;

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		requestWindowFeature(Window.FEATURE_CUSTOM_TITLE);
		setContentView(R.layout.room);

		roomId = getIntent().getStringExtra("room_id");

		setupControls();

		if (savedInstanceState != null) {
			pollFailures = savedInstanceState.getInt("pollFailures");
			transitId = savedInstanceState.getInt("transitId");
			lastJoined = savedInstanceState.getLong("lastJoined");
		}

		RoomViewHolder holder = (RoomViewHolder) getLastNonConfigurationInstance();
		if (holder != null) {
			campfire = holder.campfire;
			room = holder.room;
			messages = holder.messages;
			transitMessages = holder.transitMessages;
			users = holder.users;
			speakTasks = holder.speakTasks;
			joinTask = holder.joinTask;

			if (speakTasks != null) {
				Iterator<SpeakTask> iterator = speakTasks.values().iterator();
				while (iterator.hasNext())
					iterator.next().onScreenLoad(this);
			}

			if (holder.joinTask != null)
				joinTask.onScreenLoad(this);
			else {
				if (campfire == null)
					verifyLogin();
				else if (room == null)
					onLogin();
				else
					onJoined();
			}
		} else
			verifyLogin();
	}

	@Override
	public Object onRetainNonConfigurationInstance() {
		RoomViewHolder holder = new RoomViewHolder();
		holder.campfire = this.campfire;
		holder.room = this.room;
		holder.messages = this.messages;
		holder.transitMessages = this.transitMessages;
		holder.users = this.users;
		holder.speakTasks = this.speakTasks;
		holder.joinTask = this.joinTask;
		return holder;
	}

	public void onSaveInstanceState(Bundle outState) {
		outState.putInt("pollFailures", pollFailures);
		outState.putInt("transitId", transitId);
		outState.putLong("lastJoined", lastJoined);
		super.onSaveInstanceState(outState);
	}

	private void onLogin() {
		join();
	}

	private void onJoined() {
		setWindowTitle(room.name);
		//setListAdapter(new RoomAdapter(this, messages));
		updateMessages();
		scrollToBottom();

		((ProgressBar) findViewById(R.id.empty_spinner)).setVisibility(View.VISIBLE);
		((TextView) findViewById(R.id.empty_message)).setVisibility(View.VISIBLE);

		autoPoll();
	}

	private void onJoined(CampfireException exception) {
		Utils.alert(this, exception);
		finish();
	}

	private void onPoll() {
		boolean wasAtBottom = scrolledToBottom();
		int position = scrollPosition();

		//setListAdapter(new RoomAdapter(this, messages));
		updateMessages();

		if (wasAtBottom)
			scrollToBottom();
		else
			scrollToPosition(position);
	}

	// polling failed, messages still has the old list
	private void onPoll(CampfireException exception) {
		messages.add(new Message("error", Message.ERROR, exception.getMessage()));
		//setListAdapter(new RoomAdapter(this, messages));
		updateMessages();
		scrollToBottom();
	}

	private void onSpeak(Message message, String transitId) {
		transitMessages.remove(transitId);
		messages.add(message);
		updateMessages();
		scrollToBottom();
	}

	private void onSpeak(CampfireException exception) {
		Utils.alert(this, exception);
	}

	private void updateMessages() {
		ArrayList<Message> allMessages = new ArrayList<Message>();
		allMessages.addAll(messages);
		allMessages.addAll(transitMessages.values());
		setListAdapter(new RoomAdapter(this, allMessages));
	}

	private void setupControls() {
		getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE, R.layout.room_title);
		setWindowTitle(R.string.app_name);

		titleSpinner = (ProgressBar) findViewById(R.id.title_spinner);

		body = (EditText) findViewById(R.id.room_message_body);
		body.setOnEditorActionListener(new TextView.OnEditorActionListener() {
			@Override
			public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
				if (actionId == EditorInfo.IME_ACTION_DONE)
					speak();
				else if (event != null) // the event will only be non-null for a press of the "Enter" key
					speak();
				return false;
			}
		});

		speak = (Button) this.findViewById(R.id.room_speak);
		speak.setOnClickListener(new View.OnClickListener() {
			@Override
			public void onClick(View v) {
				speak();
			}
		});
	}

	private boolean scrolledToBottom() {
		return (getListView().getLastVisiblePosition() == (getListAdapter().getCount()-1));
	}

	private void scrollToBottom() {
		getListView().setSelection(getListAdapter().getCount()-1);
	}

	private int scrollPosition() {
		return getListView().getFirstVisiblePosition();
	}

	private void scrollToPosition(int position) {
		getListView().setSelection(position);
	}

	final Handler handler = new Handler();

	final Runnable pollStart = new Runnable() {
		public void run() {
			showSpinner();
		}
	};

	final Runnable pollSuccess = new Runnable() {
		public void run() {
			pollFailures = 0;

			hideSpinner();
			onPoll();
		}
	};

	final Runnable pollFailure = new Runnable() {
		public void run() {
			pollFailures += 1;
			hideSpinner();
			onPoll(new CampfireException("Connection error while trying to poll. (Try #" + pollFailures + ")"));
		}
	};

	public void showSpinner() {
		titleSpinner.setVisibility(View.VISIBLE);
	}

	public void hideSpinner() {
		titleSpinner.setVisibility(View.INVISIBLE);
	}

	private void speak() {
		String msg = body.getText().toString();

		if (!msg.equals("")) {
			body.setText("");

			String id = transitId + "-" + campfire.user_id;
			transitId += 1;
			Message message = new Message(id, Message.TRANSIT, msg);
			transitMessages.put(id, message);

			// avoid refreshing the whole adapter if I don't have to
			((RoomAdapter) getListAdapter()).add(message);
			scrollToBottom();

			// actually do the speaking in the background
			new SpeakTask(this, message).execute();
		}
	}

	private void join() {
		if (joinTask == null)
			new JoinTask(this).execute();
	}

	private void autoPoll() {
		new Thread() {
			public void run() {
				while(true) {
					handler.post(pollStart);
					try {
						messages = poll(room, users);

						// ping the room so we don't get idle-kicked out
						if (shouldJoin()) {
							room.join();
							lastJoined = System.currentTimeMillis();
						}

						handler.post(pollSuccess);
					} catch(CampfireException e) {
						handler.post(pollFailure);
					}

					try {
						sleep(AUTOPOLL_INTERVAL * 1000);
					} catch(InterruptedException ex) {
						// well, I never
					}

				}
			}
		}.start();
	}

	// Fetches latest MAX_MESSAGES from the transcript, then for each message,
	// looks up the associated User to assign a display name.
	// We use the "users" HashMap to cache Users from the network.
	private ArrayList<Message> poll(Room room, HashMap<String,User> users) throws CampfireException {
		ArrayList<Message> messages = Message.allToday(room, MAX_MESSAGES);
		int length = messages.size();
		for (int i=0; i<length; i++) {
			Message message = messages.get(i);
			if (message.user_id != null)
				fillPerson(message, users);
		}
		return messages;
	}

	private void fillPerson(Message message, HashMap<String,User> users) throws CampfireException {
		User speaker;
		if (users.containsKey(message.user_id))
			speaker = (User) users.get(message.user_id);
		else {
			speaker = User.find(campfire, message.user_id);
			users.put(message.user_id, speaker);
		}
		message.person = speaker.displayName();
	}

	private void verifyLogin() {
		campfire = Utils.getCampfire(this);
        if (campfire != null)
        	onLogin();
        else
        	startActivityForResult(new Intent(this, Login.class), Login.RESULT_LOGIN);
    }

	@Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
    	switch (requestCode) {
    	case Login.RESULT_LOGIN:
    		if (resultCode == RESULT_OK) {
    			Utils.alert(this, "You have been logged in successfully.");
    			campfire = Utils.getCampfire(this);
    			onLogin();
    		} else
    			finish();
    	}
    }

	@Override
    public boolean onCreateOptionsMenu(Menu menu) {
	    boolean result = super.onCreateOptionsMenu(menu);

        menu.add(0, MENU_LOGOUT, MENU_LOGOUT, R.string.logout)
        	.setIcon(android.R.drawable.ic_menu_close_clear_cancel);

        return result;
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
    	switch(item.getItemId()) {
    	case MENU_LOGOUT:
    		Utils.logoutCampfire(this);
    		finish();
    		return true;
    	}
    	return super.onOptionsItemSelected(item);
    }

    private void setWindowTitle(String title) {
        ((TextView) findViewById(R.id.room_title)).setText(title);
    }

    private void setWindowTitle(int title) {
        ((TextView) findViewById(R.id.room_title)).setText(title);
    }

    private boolean shouldJoin() {
    	return (System.currentTimeMillis() - lastJoined) > (JOIN_TIMEOUT * 1000);
    }

    private static class RoomAdapter extends ArrayAdapter<Message> {
		private LayoutInflater inflater;

        public RoomAdapter(Activity context, ArrayList<Message> messages) {
            super(context, 0, messages);
            inflater = LayoutInflater.from(context);
        }

		public View getView(int position, View convertView, ViewGroup parent) {
			Message message = getItem(position);

			ViewHolder holder;
			if (convertView != null)
				holder = (ViewHolder) convertView.getTag();
			else
				holder = null;

			if (convertView == null || holder.type != message.type) {
				convertView = inflater.inflate(viewForMessage(message), null);

				holder = new ViewHolder();
				holder.body = (TextView) convertView.findViewById(R.id.text);
				holder.type = message.type;
				if (message.person != null)
					holder.person = (TextView) convertView.findViewById(R.id.person);

				convertView.setTag(holder);
			}

			holder.body.setText(bodyForMessage(message));
			if (message.person != null)
				holder.person.setText(message.person);

			return convertView;
		}

		public int viewForMessage(Message message) {
			switch (message.type) {
			case Message.ERROR:
				return R.layout.message_error;
			case Message.TRANSIT:
				return R.layout.message_transit;
			case Message.TEXT:
			case Message.PASTE:
				return R.layout.message_text;
			case Message.TIMESTAMP:
				return R.layout.message_timestamp;
			case Message.ENTRY:
			case Message.LEAVE:
				return R.layout.message_entry;
			default:
				return R.layout.message_text;
			}
		}

		public String bodyForMessage(Message message) {
			switch (message.type) {
			case Message.ENTRY:
				return "has entered the room";
			case Message.LEAVE:
				return "has left the room";
			case Message.TIMESTAMP:
				return new SimpleDateFormat(timestampFormat).format(message.timestamp);
			case Message.PASTE:
				int length = message.body.length();
				if (length > PASTE_TRUNCATE)
					return message.body.substring(0, PASTE_TRUNCATE-1) + "\n\n[paste truncated]";
				else
					return message.body;
			default: // all others
				return message.body;
			}
		}

		static class ViewHolder {
            TextView body, person;
            int type;
        }

    }

	private class SpeakTask extends AsyncTask<Void,Void,Message> {
		public RoomView context;
    	public CampfireException exception = null;
    	private ProgressDialog dialog = null;
    	private Message transitMessage;

    	public SpeakTask(RoomView context, Message transitMessage) {
    		super();
    		this.context = context;
    		this.context.speakTasks.put(transitMessage.id, this);
    		this.transitMessage = transitMessage;
    	}

       	protected void onScreenLoad(RoomView context) {
       		this.context = context;
       	}

    	@Override
    	protected Message doInBackground(Void... nothing) {
    		try {
    			// in case we've been idle-kicked out since we last spoke
    			if (context.shouldJoin()) {
    				context.room.join();
    				context.lastJoined = System.currentTimeMillis();
    			}

    			Message newMessage = context.room.speak(transitMessage.body);
    			context.fillPerson(newMessage, context.users);
    			return newMessage;
			} catch (CampfireException e) {
				this.exception = e;
				return null;
			}
    	}

    	@Override
    	protected void onPostExecute(Message newMessage) {
    		if (dialog != null && dialog.isShowing())
    			dialog.dismiss();
    		context.speakTasks.remove(transitMessage.id);

    		if (exception == null)
    			context.onSpeak(newMessage, transitMessage.id);
    		else
    			context.onSpeak(exception);
    	}
	}

	private class JoinTask extends AsyncTask<Void,String,CampfireException> {
		public RoomView context;

    	public Room room = null;
    	public HashMap<String,User> users;
    	private ProgressDialog dialog = null;

    	public JoinTask(RoomView context) {
    		super();
    		this.context = context;
    		this.context.joinTask = this;

    		// get the current state of the user cache, so that we can write to it as we poll
    		// and then assign it back to the new context
    		// preserves caching in the case of a screen flip during this task
    		users = this.context.users;
    	}

    	public void onScreenLoad(RoomView context) {
	    	this.context = context;
			loadingDialog();
    	}

       	@Override
    	protected void onPreExecute() {
            loadingDialog();
    	}

       	protected void loadingDialog() {
        	dialog = new ProgressDialog(context);
        	dialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
        	dialog.setMessage("Joining room...");

        	dialog.setOnCancelListener(new DialogInterface.OnCancelListener() {
    			@Override
    			public void onCancel(DialogInterface dialog) {
    				cancel(true);
    				context.finish();
    			}
    		});

        	dialog.show();
        }

    	@Override
    	protected CampfireException doInBackground(Void... nothing) {
    		try {
    			room = Room.find(context.campfire, context.roomId);

    			// cache the initial users now while we can
    			if (room.initialUsers != null) {
    				int length = room.initialUsers.size();
    				for (int i=0; i<length; i++) {
    					User user = room.initialUsers.get(i);
    					users.put(user.id, user);
    				}
    			}
			} catch (CampfireException e) {
				return e;
			}
			return null;
    	}

    	@Override
    	protected void onPostExecute(CampfireException exception) {
    		if (dialog != null && dialog.isShowing())
    			dialog.dismiss();
    		context.joinTask = null;

    		context.room = room;
    		context.users = users;

    		if (exception == null)
    			context.onJoined();
    		else
    			context.onJoined(exception);
    	}
	}

	static class RoomViewHolder {
		Campfire campfire;
		Room room;
		ArrayList<Message> messages;
		HashMap<String,Message> transitMessages;
		HashMap<String,User> users;
		HashMap<String,SpeakTask> speakTasks;
		JoinTask joinTask;
	}
}


text:
Imports bv.winclient.BasePanel
Imports bv.winclient.Core
Imports EIDSS.model.Resources

Public Class SampleTypeDetail

    Inherits GenericReferenceDetail

    Public Sub New()
        MyBase.New()
        Me.gvReference.OptionsCustomization.AllowFilter = False
        Me.FormID = "A28"
    End Sub

    Protected Overrides ReadOnly Property ReferenceDbService() As BaseDbService
        Get
            Return New SampleType_DB
        End Get
    End Property
    Protected Overrides ReadOnly Property CanDeleteProc() As String
        Get
            Return "spSampleTypeReference_CanDelete"
        End Get
    End Property
    Protected Overrides ReadOnly Property MainCaption() As String
        Get
            Return EidssMessages.Get("lblSampleTypeMainCaption") '"Sample Type Reference Editor"
        End Get
    End Property
    Protected Overrides ReadOnly Property CodeCaption() As String
        Get
            Return EidssMessages.Get("lblSampleTypeCodeCaption") '"Code"
        End Get
    End Property
    Protected Overrides ReadOnly Property CodeField() As String
        Get
            Return "strSampleCode"
        End Get
    End Property

#Region "Main form interface"
    Private Shared m_Parent As Control
    Public Shared Sub Register(ByVal ParentControl As System.Windows.Forms.Control)
        m_Parent = ParentControl
        Dim category As MenuAction = MenuActionManager.Instance.FindAction("MenuReferencies", MenuActionManager.Instance.System, 950)
        Dim ma As MenuAction = New MenuAction(AddressOf ShowMe, MenuActionManager.Instance, category, "MenuSampleTypeReferenceEditor", 930, False, model.Enums.MenuIconsSmall.References, -1)
        ma.SelectPermission = PermissionHelper.SelectPermission(EIDSS.model.Enums.EIDSSPermissionObject.Reference)
        ma.Name = "btnSampleTypeReferenceEditor"
    End Sub

    Public Shared Sub ShowMe()
        BaseFormManager.ShowNormal(New SampleTypeDetail, Nothing)
    End Sub
#End Region

End Class

redpajama_set_name: RedPajamaGithub


text:
require './exercise.rb'

describe 'welcome_message' do
  it 'should return "Hello, World!"' do
    expect(welcome_message).to eq "Hello, World!"
  end
end

describe "factorial" do
  describe "when input = 0" do
    it { expect(factorial 0).to eq 1 }
  end
  describe "when input = 1" do
    it { expect(factorial 1).to eq 1 }
  end
  describe "when input = 2" do
    it { expect(factorial 2).to eq (1*2) }
  end
  describe "when input = 3" do
    it { expect(factorial 3).to eq (1*2*3) }
  end
  describe "when input = 10" do
    it { expect(factorial 10).to eq (1*2*3*4*5*6*7*8*9*10) }
  end
end

describe "factorial_bigger_than" do
  describe "when input = 1" do
    it { expect(factorial_bigger_than 1).to eq 2 }
  end
  describe "when input = 2" do
    it { expect(factorial_bigger_than 2).to eq 6 }
  end
  describe "when input = 10" do
    it { expect(factorial_bigger_than 10).to eq 24 }
  end
  describe "when input = 100" do
    it { expect(factorial_bigger_than 100).to eq 120 }
  end
end

describe "find_longest_string" do
  describe "when input = ['EU', 'US', 'UK', 'BCE']" do
    it { expect(find_longest_string(['EU', 'US', 'UK', 'BCE'])).to eq "BCE" }
  end
  describe "when input = ['dog', 'cat', 'rhino']" do
    it { expect(find_longest_string(['dog', 'cat', 'rhino'])).to eq "rhino"}
  end
end

describe "has_nested_array?" do
  describe "when input = [1, 2, [3, 4]]" do
    it { expect(has_nested_array?([1, 2, [3, 4]])).to be_truthy }
  end
  describe "when input = [[]]" do
    it { expect(has_nested_array?([[]])).to be_truthy }
  end
  describe "when input = [1, 2, 3, 4]" do
    it { expect(has_nested_array?([1, 2, 3, 4])).to be_falsey }
  end
  describe "when input = []" do
    it { expect(has_nested_array?([])).to be_falsey }
  end
end

describe "count_upcased_letters" do
  describe "when input = 'HeLLo'" do
    it { expect(count_upcased_letters('HeLLo')).to eq 3 }
  end
  describe "when input = 'GREETings'" do
    it { expect(count_upcased_letters('GREETings')).to eq 5 }
  end
  describe "when input = 'hola!'" do
    it { expect(count_upcased_letters('hola!')).to eq 0 }
  end
  describe "when input = ''" do
    it { expect(count_upcased_letters('')).to eq 0 }
  end
end


text:
// THIS FILE IS GENERATED BY ZAP
#include "CHIPCallbackTypes.h"

#include <app-common/zap-generated/cluster-objects.h>
#include <jni.h>
#include <zap-generated/CHIPClientCallbacks.h>

namespace chip {

class CHIPGroupsClusterAddGroupResponseCallback : public Callback::Callback<CHIPGroupsClusterAddGroupResponseCallbackType>
{
public:
    CHIPGroupsClusterAddGroupResponseCallback(jobject javaCallback);

    ~CHIPGroupsClusterAddGroupResponseCallback();

    static void CallbackFn(void * context, const chip::app::Clusters::Groups::Commands::AddGroupResponse::DecodableType & data);

private:
    jobject javaCallbackRef;
};

class CHIPGroupsClusterViewGroupResponseCallback : public Callback::Callback<CHIPGroupsClusterViewGroupResponseCallbackType>
{
public:
    CHIPGroupsClusterViewGroupResponseCallback(jobject javaCallback);

    ~CHIPGroupsClusterViewGroupResponseCallback();

    static void CallbackFn(void * context, const chip::app::Clusters::Groups::Commands::ViewGroupResponse::DecodableType & data);

private:
    jobject javaCallbackRef;
};

class CHIPGroupsClusterGetGroupMembershipResponseCallback
    : public Callback::Callback<CHIPGroupsClusterGetGroupMembershipResponseCallbackType>
{
public:
    CHIPGroupsClusterGetGroupMembershipResponseCallback(jobject javaCallback);

    ~CHIPGroupsClusterGetGroupMembershipResponseCallback();

    static void CallbackFn(void * context,
                           const chip::app::Clusters::Groups::Commands::GetGroupMembershipResponse::DecodableType & data);

private:
    jobject javaCallbackRef;
};

class CHIPGroupsClusterRemoveGroupResponseCallback : public Callback::Callback<CHIPGroupsClusterRemoveGroupResponseCallbackType>
{
public:
    CHIPGroupsClusterRemoveGroupResponseCallback(jobject javaCallback);

    ~CHIPGroupsClusterRemoveGroupResponseCallback();

    static void CallbackFn(void * context, const chip::app::Clusters::Groups::Commands::RemoveGroupResponse::DecodableType & data);

private:
    jobject javaCallbackRef;
};

class CHIPScenesClusterAddSceneResponseCallback : public Callback::Callback<CHIPScenesClusterAddSceneResponseCallbackType>
{
public:
    CHIPScenesClusterAddSceneResponseCallback(jobject javaCallback);

    ~CHIPScenesClusterAddSceneResponseCallback();

    static void CallbackFn(void * context, const chip::app::Clusters::Scenes::Commands::AddSceneResponse::DecodableType & data);

private:
    jobject javaCallbackRef;
};

class CHIPScenesClusterViewSceneResponseCallback : public Callback::Callback<CHIPScenesClusterViewSceneResponseCallbackType>
{
public:
    CHIPScenesClusterViewSceneResponseCallback(jobject javaCallback);

    ~CHIPScenesClusterViewSceneResponseCallback();

    static void CallbackFn(void * context, const chip::app::Clusters::Scenes::Commands::ViewSceneResponse::DecodableType & data);

private:
    jobject javaCallbackRef;
};

class CHIPScenesClusterRemoveSceneResponseCallback : public Callback::Callback<CHIPScenesClusterRemoveSceneResponseCallbackType>
{
public:
    CHIPScenesClusterRemoveSceneResponseCallback(jobject javaCallback);

    ~CHIPScenesClusterRemoveSceneResponseCallback();

    static void CallbackFn(void * context, const chip::app::Clusters::Scenes::Commands::RemoveSceneResponse::DecodableType & data);

private:
    jobject javaCallbackRef;
};

class CHIPScenesClusterRemoveAllScenesResponseCallback
    : public Callback::Callback<CHIPScenesClusterRemoveAllScenesResponseCallbackType>
{
public:
    CHIPScenesClusterRemoveAllScenesResponseCallback(jobject javaCallback);

    ~CHIPScenesClusterRemoveAllScenesResponseCallback();

    static void CallbackFn(void * context,
                           const chip::app::Clusters::Scenes::Commands::RemoveAllScenesResponse::DecodableType & data);

private:
    jobject javaCallbackRef;
};

class CHIPScenesClusterStoreSceneResponseCallback : public Callback::Callback<CHIPScenesClusterStoreSceneResponseCallbackType>
{
public:
    CHIPScenesClusterStoreSceneResponseCallback(jobject javaCallback);

    ~CHIPScenesClusterStoreSceneResponseCallback();

    static void CallbackFn(void * context, const chip::app::Clusters::Scenes::Commands::StoreSceneResponse::DecodableType & data);

private:
    jobject javaCallbackRef;
};

class CHIPScenesClusterGetSceneMembershipResponseCallback
    : public Callback::Callback<CHIPScenesClusterGetSceneMembershipResponseCallbackType>
{
public:
    CHIPScenesClusterGetSceneMembershipResponseCallback(jobject javaCallback);

    ~CHIPScenesClusterGetSceneMembershipResponseCallback();

    static void CallbackFn(void * context,
                           const chip::app::Clusters::Scenes::Commands::GetSceneMembershipResponse::DecodableType & data);

private:
    jobject javaCallbackRef;
};

class CHIPOtaSoftwareUpdateProviderClusterQueryImageResponseCallback
    : public Callback::Callback<CHIPOtaSoftwareUpdateProviderClusterQueryImageResponseCallbackType>
{
public:
    CHIPOtaSoftwareUpdateProviderClusterQueryImageResponseCallback(jobject javaCallback);

    ~CHIPOtaSoftwareUpdateProviderClusterQueryImageResponseCallback();

    static void
    CallbackFn(void * context,
               const chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::QueryImageResponse::DecodableType & data);

private:
    jobject javaCallbackRef;
};

class CHIPOtaSoftwareUpdateProviderClusterApplyUpdateResponseCallback
    : public Callback::Callback<CHIPOtaSoftwareUpdateProviderClusterApplyUpdateResponseCallbackType>
{
public:
    CHIPOtaSoftwareUpdateProviderClusterApplyUpdateResponseCallback(jobject javaCallback);

    ~CHIPOtaSoftwareUpdateProviderClusterApplyUpdateResponseCallback();

    static void
    CallbackFn(void * context,
               const chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::ApplyUpdateResponse::DecodableType & data);

private:
    jobject javaCallbackRef;
};

class CHIPGeneralCommissioningClusterArmFailSafeResponseCallback
    : public Callback::Callback<CHIPGeneralCommissioningClusterArmFailSafeResponseCallbackType>
{
public:
    CHIPGeneralCommissioningClusterArmFailSafeResponseCallback(jobject javaCallback);

    ~CHIPGeneralCommissioningClusterArmFailSafeResponseCallback();

    static void CallbackFn(void * context,
                           const chip::app::Clusters::GeneralCommissioning::Commands::ArmFailSafeResponse::DecodableType & data);

private:
    jobject javaCallbackRef;
};

class CHIPGeneralCommissioningClusterSetRegulatoryConfigResponseCallback
    : public Callback::Callback<CHIPGeneralCommissioningClusterSetRegulatoryConfigResponseCallbackType>
{
public:
    CHIPGeneralCommissioningClusterSetRegulatoryConfigResponseCallback(jobject javaCallback);

    ~CHIPGeneralCommissioningClusterSetRegulatoryConfigResponseCallback();

    static void
    CallbackFn(void * context,
               const chip::app::Clusters::GeneralCommissioning::Commands::SetRegulatoryConfigResponse::DecodableType & data);

private:
    jobject javaCallbackRef;
};

class CHIPGeneralCommissioningClusterCommissioningCompleteResponseCallback
    : public Callback::Callback<CHIPGeneralCommissioningClusterCommissioningCompleteResponseCallbackType>
{
public:
    CHIPGeneralCommissioningClusterCommissioningCompleteResponseCallback(jobject javaCallback);

    ~CHIPGeneralCommissioningClusterCommissioningCompleteResponseCallback();

    static void
    CallbackFn(void * context,
               const chip::app::Clusters::GeneralCommissioning::Commands::CommissioningCompleteResponse::DecodableType & data);

private:
    jobject javaCallbackRef;
};

class CHIPNetworkCommissioningClusterScanNetworksResponseCallback
    : public Callback::Callback<CHIPNetworkCommissioningClusterScanNetworksResponseCallbackType>
{
public:
    CHIPNetworkCommissioningClusterScanNetworksResponseCallback(jobject javaCallback);

    ~CHIPNetworkCommissioningClusterScanNetworksResponseCallback();

    static void CallbackFn(void * context,
                           const chip::app::Clusters::NetworkCommissioning::Commands::ScanNetworksResponse::DecodableType & data);

private:
    jobject javaCallbackRef;
};

class CHIPNetworkCommissioningClusterNetworkConfigResponseCallback
    : public Callback::Callback<CHIPNetworkCommissioningClusterNetworkConfigResponseCallbackType>
{
public:
    CHIPNetworkCommissioningClusterNetworkConfigResponseCallback(jobject javaCallback);

    ~CHIPNetworkCommissioningClusterNetworkConfigResponseCallback();

    static void CallbackFn(void * context,
                           const chip::app::Clusters::NetworkCommissioning::Commands::NetworkConfigResponse::DecodableType & data);

private:
    jobject javaCallbackRef;
};

class CHIPNetworkCommissioningClusterConnectNetworkResponseCallback
    : public Callback::Callback<CHIPNetworkCommissioningClusterConnectNetworkResponseCallbackType>
{
public:
    CHIPNetworkCommissioningClusterConnectNetworkResponseCallback(jobject javaCallback);

    ~CHIPNetworkCommissioningClusterConnectNetworkResponseCallback();

    static void CallbackFn(void * context,
                           const chip::app::Clusters::NetworkCommissioning::Commands::ConnectNetworkResponse::DecodableType & data);

private:
    jobject javaCallbackRef;
};

class CHIPDiagnosticLogsClusterRetrieveLogsResponseCallback
    : public Callback::Callback<CHIPDiagnosticLogsClusterRetrieveLogsResponseCallbackType>
{
public:
    CHIPDiagnosticLogsClusterRetrieveLogsResponseCallback(jobject javaCallback);

    ~CHIPDiagnosticLogsClusterRetrieveLogsResponseCallback();

    static void CallbackFn(void * context,
                           const chip::app::Clusters::DiagnosticLogs::Commands::RetrieveLogsResponse::DecodableType & data);

private:
    jobject javaCallbackRef;
};

class CHIPOperationalCredentialsClusterAttestationResponseCallback
    : public Callback::Callback<CHIPOperationalCredentialsClusterAttestationResponseCallbackType>
{
public:
    CHIPOperationalCredentialsClusterAttestationResponseCallback(jobject javaCallback);

    ~CHIPOperationalCredentialsClusterAttestationResponseCallback();

    static void CallbackFn(void * context,
                           const chip::app::Clusters::OperationalCredentials::Commands::AttestationResponse::DecodableType & data);

private:
    jobject javaCallbackRef;
};

class CHIPOperationalCredentialsClusterCertificateChainResponseCallback
    : public Callback::Callback<CHIPOperationalCredentialsClusterCertificateChainResponseCallbackType>
{
public:
    CHIPOperationalCredentialsClusterCertificateChainResponseCallback(jobject javaCallback);

    ~CHIPOperationalCredentialsClusterCertificateChainResponseCallback();

    static void
    CallbackFn(void * context,
               const chip::app::Clusters::OperationalCredentials::Commands::CertificateChainResponse::DecodableType & data);

private:
    jobject javaCallbackRef;
};

class CHIPOperationalCredentialsClusterCSRResponseCallback
    : public Callback::Callback<CHIPOperationalCredentialsClusterCSRResponseCallbackType>
{
public:
    CHIPOperationalCredentialsClusterCSRResponseCallback(jobject javaCallback);

    ~CHIPOperationalCredentialsClusterCSRResponseCallback();

    static void CallbackFn(void * context,
                           const chip::app::Clusters::OperationalCredentials::Commands::CSRResponse::DecodableType & data);

private:
    jobject javaCallbackRef;
};

class CHIPOperationalCredentialsClusterNOCResponseCallback
    : public Callback::Callback<CHIPOperationalCredentialsClusterNOCResponseCallbackType>
{
public:
    CHIPOperationalCredentialsClusterNOCResponseCallback(jobject javaCallback);

    ~CHIPOperationalCredentialsClusterNOCResponseCallback();

    static void CallbackFn(void * context,
                           const chip::app::Clusters::OperationalCredentials::Commands::NOCResponse::DecodableType & data);

private:
    jobject javaCallbackRef;
};

class CHIPGroupKeyManagementClusterKeySetReadResponseCallback
    : public Callback::Callback<CHIPGroupKeyManagementClusterKeySetReadResponseCallbackType>
{
public:
    CHIPGroupKeyManagementClusterKeySetReadResponseCallback(jobject javaCallback);

    ~CHIPGroupKeyManagementClusterKeySetReadResponseCallback();

    static void CallbackFn(void * context,
                           const chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadResponse::DecodableType & data);

private:
    jobject javaCallbackRef;
};

class CHIPGroupKeyManagementClusterKeySetReadAllIndicesResponseCallback
    : public Callback::Callback<CHIPGroupKeyManagementClusterKeySetReadAllIndicesResponseCallbackType>
{
public:
    CHIPGroupKeyManagementClusterKeySetReadAllIndicesResponseCallback(jobject javaCallback);

    ~CHIPGroupKeyManagementClusterKeySetReadAllIndicesResponseCallback();

    static void
    CallbackFn(void * context,
               const chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadAllIndicesResponse::DecodableType & data);

private:
    jobject javaCallbackRef;
};

class CHIPDoorLockClusterGetWeekDayScheduleResponseCallback
    : public Callback::Callback<CHIPDoorLockClusterGetWeekDayScheduleResponseCallbackType>
{
public:
    CHIPDoorLockClusterGetWeekDayScheduleResponseCallback(jobject javaCallback);

    ~CHIPDoorLockClusterGetWeekDayScheduleResponseCallback();

    static void CallbackFn(void * context,
                           const chip::app::Clusters::DoorLock::Commands::GetWeekDayScheduleResponse::DecodableType & data);

private:
    jobject javaCallbackRef;
};

class CHIPDoorLockClusterGetYearDayScheduleResponseCallback
    : public Callback::Callback<CHIPDoorLockClusterGetYearDayScheduleResponseCallbackType>
{
public:
    CHIPDoorLockClusterGetYearDayScheduleResponseCallback(jobject javaCallback);

    ~CHIPDoorLockClusterGetYearDayScheduleResponseCallback();

    static void CallbackFn(void * context,
                           const chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::DecodableType & data);

private:
    jobject javaCallbackRef;
};

class CHIPDoorLockClusterGetHolidayScheduleResponseCallback
    : public Callback::Callback<CHIPDoorLockClusterGetHolidayScheduleResponseCallbackType>
{
public:
    CHIPDoorLockClusterGetHolidayScheduleResponseCallback(jobject javaCallback);

    ~CHIPDoorLockClusterGetHolidayScheduleResponseCallback();

    static void CallbackFn(void * context,
                           const chip::app::Clusters::DoorLock::Commands::GetHolidayScheduleResponse::DecodableType & data);

private:
    jobject javaCallbackRef;
};

class CHIPDoorLockClusterGetUserResponseCallback : public Callback::Callback<CHIPDoorLockClusterGetUserResponseCallbackType>
{
public:
    CHIPDoorLockClusterGetUserResponseCallback(jobject javaCallback);

    ~CHIPDoorLockClusterGetUserResponseCallback();

    static void CallbackFn(void * context, const chip::app::Clusters::DoorLock::Commands::GetUserResponse::DecodableType & data);

private:
    jobject javaCallbackRef;
};

class CHIPDoorLockClusterSetCredentialResponseCallback
    : public Callback::Callback<CHIPDoorLockClusterSetCredentialResponseCallbackType>
{
public:
    CHIPDoorLockClusterSetCredentialResponseCallback(jobject javaCallback);

    ~CHIPDoorLockClusterSetCredentialResponseCallback();

    static void CallbackFn(void * context,
                           const chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType & data);

private:
    jobject javaCallbackRef;
};

class CHIPDoorLockClusterGetCredentialStatusResponseCallback
    : public Callback::Callback<CHIPDoorLockClusterGetCredentialStatusResponseCallbackType>
{
public:
    CHIPDoorLockClusterGetCredentialStatusResponseCallback(jobject javaCallback);

    ~CHIPDoorLockClusterGetCredentialStatusResponseCallback();

    static void CallbackFn(void * context,
                           const chip::app::Clusters::DoorLock::Commands::GetCredentialStatusResponse::DecodableType & data);

private:
    jobject javaCallbackRef;
};

class CHIPThermostatClusterGetWeeklyScheduleResponseCallback
    : public Callback::Callback<CHIPThermostatClusterGetWeeklyScheduleResponseCallbackType>
{
public:
    CHIPThermostatClusterGetWeeklyScheduleResponseCallback(jobject javaCallback);

    ~CHIPThermostatClusterGetWeeklyScheduleResponseCallback();

    static void CallbackFn(void * context,
                           const chip::app::Clusters::Thermostat::Commands::GetWeeklyScheduleResponse::DecodableType & data);

private:
    jobject javaCallbackRef;
};

class CHIPChannelClusterChangeChannelResponseCallback
    : public Callback::Callback<CHIPChannelClusterChangeChannelResponseCallbackType>
{
public:
    CHIPChannelClusterChangeChannelResponseCallback(jobject javaCallback);

    ~CHIPChannelClusterChangeChannelResponseCallback();

    static void CallbackFn(void * context,
                           const chip::app::Clusters::Channel::Commands::ChangeChannelResponse::DecodableType & data);

private:
    jobject javaCallbackRef;
};

class CHIPTargetNavigatorClusterNavigateTargetResponseCallback
    : public Callback::Callback<CHIPTargetNavigatorClusterNavigateTargetResponseCallbackType>
{
public:
    CHIPTargetNavigatorClusterNavigateTargetResponseCallback(jobject javaCallback);

    ~CHIPTargetNavigatorClusterNavigateTargetResponseCallback();

    static void CallbackFn(void * context,
                           const chip::app::Clusters::TargetNavigator::Commands::NavigateTargetResponse::DecodableType & data);

private:
    jobject javaCallbackRef;
};

class CHIPMediaPlaybackClusterPlaybackResponseCallback
    : public Callback::Callback<CHIPMediaPlaybackClusterPlaybackResponseCallbackType>
{
public:
    CHIPMediaPlaybackClusterPlaybackResponseCallback(jobject javaCallback);

    ~CHIPMediaPlaybackClusterPlaybackResponseCallback();

    static void CallbackFn(void * context,
                           const chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType & data);

private:
    jobject javaCallbackRef;
};

class CHIPKeypadInputClusterSendKeyResponseCallback : public Callback::Callback<CHIPKeypadInputClusterSendKeyResponseCallbackType>
{
public:
    CHIPKeypadInputClusterSendKeyResponseCallback(jobject javaCallback);

    ~CHIPKeypadInputClusterSendKeyResponseCallback();

    static void CallbackFn(void * context, const chip::app::Clusters::KeypadInput::Commands::SendKeyResponse::DecodableType & data);

private:
    jobject javaCallbackRef;
};

class CHIPContentLauncherClusterLaunchResponseCallback
    : public Callback::Callback<CHIPContentLauncherClusterLaunchResponseCallbackType>
{
public:
    CHIPContentLauncherClusterLaunchResponseCallback(jobject javaCallback);

    ~CHIPContentLauncherClusterLaunchResponseCallback();

    static void CallbackFn(void * context,
                           const chip::app::Clusters::ContentLauncher::Commands::LaunchResponse::DecodableType & data);

private:
    jobject javaCallbackRef;
};

class CHIPApplicationLauncherClusterLauncherResponseCallback
    : public Callback::Callback<CHIPApplicationLauncherClusterLauncherResponseCallbackType>
{
public:
    CHIPApplicationLauncherClusterLauncherResponseCallback(jobject javaCallback);

    ~CHIPApplicationLauncherClusterLauncherResponseCallback();

    static void CallbackFn(void * context,
                           const chip::app::Clusters::ApplicationLauncher::Commands::LauncherResponse::DecodableType & data);

private:
    jobject javaCallbackRef;
};

class CHIPAccountLoginClusterGetSetupPINResponseCallback
    : public Callback::Callback<CHIPAccountLoginClusterGetSetupPINResponseCallbackType>
{
public:
    CHIPAccountLoginClusterGetSetupPINResponseCallback(jobject javaCallback);

    ~CHIPAccountLoginClusterGetSetupPINResponseCallback();

    static void CallbackFn(void * context,
                           const chip::app::Clusters::AccountLogin::Commands::GetSetupPINResponse::DecodableType & data);

private:
    jobject javaCallbackRef;
};

class CHIPUnitTestingClusterTestSpecificResponseCallback
    : public Callback::Callback<CHIPUnitTestingClusterTestSpecificResponseCallbackType>
{
public:
    CHIPUnitTestingClusterTestSpecificResponseCallback(jobject javaCallback);

    ~CHIPUnitTestingClusterTestSpecificResponseCallback();

    static void CallbackFn(void * context,
                           const chip::app::Clusters::UnitTesting::Commands::TestSpecificResponse::DecodableType & data);

private:
    jobject javaCallbackRef;
};

class CHIPUnitTestingClusterTestAddArgumentsResponseCallback
    : public Callback::Callback<CHIPUnitTestingClusterTestAddArgumentsResponseCallbackType>
{
public:
    CHIPUnitTestingClusterTestAddArgumentsResponseCallback(jobject javaCallback);

    ~CHIPUnitTestingClusterTestAddArgumentsResponseCallback();

    static void CallbackFn(void * context,
                           const chip::app::Clusters::UnitTesting::Commands::TestAddArgumentsResponse::DecodableType & data);

private:
    jobject javaCallbackRef;
};

class CHIPUnitTestingClusterTestListInt8UReverseResponseCallback
    : public Callback::Callback<CHIPUnitTestingClusterTestListInt8UReverseResponseCallbackType>
{
public:
    CHIPUnitTestingClusterTestListInt8UReverseResponseCallback(jobject javaCallback);

    ~CHIPUnitTestingClusterTestListInt8UReverseResponseCallback();

    static void CallbackFn(void * context,
                           const chip::app::Clusters::UnitTesting::Commands::TestListInt8UReverseResponse::DecodableType & data);

private:
    jobject javaCallbackRef;
};

class CHIPUnitTestingClusterTestEnumsResponseCallback
    : public Callback::Callback<CHIPUnitTestingClusterTestEnumsResponseCallbackType>
{
public:
    CHIPUnitTestingClusterTestEnumsResponseCallback(jobject javaCallback);

    ~CHIPUnitTestingClusterTestEnumsResponseCallback();

    static void CallbackFn(void * context,
                           const chip::app::Clusters::UnitTesting::Commands::TestEnumsResponse::DecodableType & data);

private:
    jobject javaCallbackRef;
};

class CHIPUnitTestingClusterTestNullableOptionalResponseCallback
    : public Callback::Callback<CHIPUnitTestingClusterTestNullableOptionalResponseCallbackType>
{
public:
    CHIPUnitTestingClusterTestNullableOptionalResponseCallback(jobject javaCallback);

    ~CHIPUnitTestingClusterTestNullableOptionalResponseCallback();

    static void CallbackFn(void * context,
                           const chip::app::Clusters::UnitTesting::Commands::TestNullableOptionalResponse::DecodableType & data);

private:
    jobject javaCallbackRef;
};

class CHIPUnitTestingClusterBooleanResponseCallback : public Callback::Callback<CHIPUnitTestingClusterBooleanResponseCallbackType>
{
public:
    CHIPUnitTestingClusterBooleanResponseCallback(jobject javaCallback);

    ~CHIPUnitTestingClusterBooleanResponseCallback();

    static void CallbackFn(void * context, const chip::app::Clusters::UnitTesting::Commands::BooleanResponse::DecodableType & data);

private:
    jobject javaCallbackRef;
};

class CHIPUnitTestingClusterSimpleStructResponseCallback
    : public Callback::Callback<CHIPUnitTestingClusterSimpleStructResponseCallbackType>
{
public:
    CHIPUnitTestingClusterSimpleStructResponseCallback(jobject javaCallback);

    ~CHIPUnitTestingClusterSimpleStructResponseCallback();

    static void CallbackFn(void * context,
                           const chip::app::Clusters::UnitTesting::Commands::SimpleStructResponse::DecodableType & data);

private:
    jobject javaCallbackRef;
};

class CHIPUnitTestingClusterTestEmitTestEventResponseCallback
    : public Callback::Callback<CHIPUnitTestingClusterTestEmitTestEventResponseCallbackType>
{
public:
    CHIPUnitTestingClusterTestEmitTestEventResponseCallback(jobject javaCallback);

    ~CHIPUnitTestingClusterTestEmitTestEventResponseCallback();

    static void CallbackFn(void * context,
                           const chip::app::Clusters::UnitTesting::Commands::TestEmitTestEventResponse::DecodableType & data);

private:
    jobject javaCallbackRef;
};

} // namespace chip


text:
<?php
namespace BDev\Bundle\RoutingExtraBundle\Tests;

use BDev\Bundle\RoutingExtraBundle\RouteCollection;

class RouteCollectionTest extends \PHPUnit_Framework_TestCase
{
    public function testGetRoute()
    {
        $route = $this->getMockBuilder('BDev\Bundle\RoutingExtraBundle\Route')
            ->disableOriginalConstructor()
            ->getMock();

        $compiler = $this->getMock('BDev\Bundle\RoutingExtraBundle\RouteCompilerInterface');
        $compiler->expects($this->once())
            ->method('compile')
            ->will($this->returnValue($route));

        $rawRoute = $this->getMockBuilder('BDev\Bundle\RoutingExtraBundle\RawRoute')
            ->disableOriginalConstructor()
            ->getMock();
        $rawRoute->expects($this->once())
            ->method('getRoute')
            ->will($this->returnValue('my_route'));

        $collection = new RouteCollection(array($rawRoute), $compiler);

        $this->assertEquals($route, $collection->getRoute('my_route'));
        $this->assertNull($collection->getRoute('no_route'));
    }

    public function testGetParent()
    {
        $route1 = $this->getMockBuilder('BDev\Bundle\RoutingExtraBundle\Route')
            ->disableOriginalConstructor()
            ->getMock();
        $route1->expects($this->atLeastOnce())
            ->method('getParent')
            ->will($this->returnValue('route_parent'));

        $route2 = $this->getMockBuilder('BDev\Bundle\RoutingExtraBundle\Route')
            ->disableOriginalConstructor()
            ->getMock();
        $route2->expects($this->atLeastOnce())
            ->method('getParent')
            ->will($this->returnValue(null));

        $rawRoute1 = $this->getMockBuilder('BDev\Bundle\RoutingExtraBundle\RawRoute')
            ->disableOriginalConstructor()
            ->getMock();
        $rawRoute1->expects($this->once())
            ->method('getRoute')
            ->will($this->returnValue('my_route'));

        $rawRoute2 = $this->getMockBuilder('BDev\Bundle\RoutingExtraBundle\RawRoute')
            ->disableOriginalConstructor()
            ->getMock();
        $rawRoute2->expects($this->once())
            ->method('getRoute')
            ->will($this->returnValue('route_parent'));

        $compiler = $this->getMock('BDev\Bundle\RoutingExtraBundle\RouteCompilerInterface');
        $compiler->expects($this->exactly(2))
            ->method('compile')
            ->will(
                $this->returnValueMap(
                    array(
                        array($rawRoute1, $route1),
                        array($rawRoute2, $route2)
                    )
                )
            );

        $collection = new RouteCollection(array($rawRoute1, $rawRoute2), $compiler);

        $this->assertEquals($route2, $collection->getParent('my_route'));
        $this->assertNull($collection->getParent('route_parent'));
    }
}


text:
<?php

namespace App\Http\Controllers;

use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Routing\Controller as BaseController;
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;

class WorkoutController extends Controller
{
    public function index() {
        $tags = array_get($_GET, 'tag', []);
        $accessToken = getenv('CONTENTFUL_ACCESS_TOKEN');
        //get cards
        $jsonDataUrl = "https://cdn.contentful.com/spaces/x9l1w0gxdbuo/entries?access_token=$accessToken&content_type=49FgA0eZcQUCogAo6a8oEg";
        $json = file_get_contents($jsonDataUrl);
        $jsonObj = json_decode($json);

        $result = array();
        foreach($jsonObj->items as $item) {
            foreach($item->fields->tags as $tag){
                $cardTags[] = $tag->sys->id;
                if (!empty($tags) && in_array($tag->sys->id, $tags)) {
                    $result[] = $item->fields;
                    continue;
                }
                else if (empty($tags)) {
                    $result[] = $item->fields;
                }
            }
        }
        shuffle($result);
        $jsonData = json_encode($result);
        return view('partials.workout')->with('cards', $jsonData);
    }

    public function home() {
        $accessToken = getenv('CONTENTFUL_ACCESS_TOKEN');
        //get tags
        $jsonDataUrl = "https://cdn.contentful.com/spaces/x9l1w0gxdbuo/entries?access_token=$accessToken&content_type=6OXBfKosEw4yuWKegeQQ2M";
        $json = file_get_contents($jsonDataUrl);
        $jsonObj = json_decode($json);
        $tags = array();
        foreach($jsonObj->items as $item) {
            $tags[$item->fields->name] = $item->sys->id;
        }

        return view('partials.index')->with('tags', $tags);
    }
}


text:
package kr.simula.formula.core.wrapper;

import java.util.List;

import kr.simula.formula.core.Context;
import kr.simula.formula.core.EvalException;
import kr.simula.formula.core.GrammarTokens;
import kr.simula.formula.core.Lambda;
import kr.simula.formula.core.QName;
import kr.simula.formula.core.Ref;
import kr.simula.formula.core.Returnable;

/**
 * <pre>
 * </pre>
 * @author Ikchan Kwon
 *
 */
public class LambdaFunction<O> extends AbstractBlock implements Lambda<O>, Returnable {
	private static final long serialVersionUID = 1L;
	private Class<O> retType;
	private String name;
	private List<Ref> args;
	private final QName returnValueKey;

	/**
	 * @param retType
	 * @param name
	 * @param args
	 */
	public LambdaFunction(Class<O> retType, List<Ref> args, QName returnValueKey) {
		this.retType = retType;
		this.name = "lambda" + hashCode();
		this.args = args;
		this.returnValueKey = returnValueKey;
	}

	/**
	 * @return the name
	 */
	@Override
	public String getName() {
		return name;
	}

	@Override
	public String getToken() {
		return GrammarTokens.LAMBDA;
	}

	@Override
	public Class<O> getReturnType() {
		return retType;
	}

	/**
	 * @return the args
	 */
	@Override
	public List<Ref> getArgs() {
		return args;
	}

	@Override
	public String getExpression() {
		StringBuilder buf = new StringBuilder();
		buf.append("lambda ").append(retType.getSimpleName()).append(" ").append(name).append("(");
		for(Ref n : args){
			buf.append(" ").append(n.getExpression());
		}
		buf.append(") {");
		getBodyExpression(buf);
		buf.append("}");
		return buf.toString();
	}

	@Override
	public O eval(Object... args) {
		throw new EvalException(this, "LambdaFunction#eval(Object[]) is not applicable.");
	}

	@Override
	public O evalFunc(Context context) {
		eval(context);
		return getReturnValue(context);
	}

	@Override
	public void eval(Context context) {
		evalBody(context);
	}

	@SuppressWarnings("unchecked")
	public O getReturnValue(Context context){
		O value = (O)context.getReference(returnValueKey);
		return value;
	}

	@Override
	public String toString() {
		StringBuilder buf = new StringBuilder();
		buf.append("[lambda ");
		buf.append(retType.getSimpleName()).append(" ").append(name).append("(");
		for(Ref n : args){
			buf.append(" ").append(n.getExpression());
		}
		buf.append(")]");
		return buf.toString();
	}

	@Override
	public QName getReturnValueKey() {
		return returnValueKey;
	}
}


text:
namespace dp
{
  class TextureManager;
}

namespace df
{

class TextHandle : public dp::OverlayHandle
{
public:
  TextHandle(FeatureID const & id, strings::UniString const & text,
             dp::Anchor anchor, uint64_t priority,
             ref_ptr<dp::TextureManager> textureManager,
             bool isBillboard = false);

  TextHandle(FeatureID const & id, strings::UniString const & text,
             dp::Anchor anchor, uint64_t priority,
             ref_ptr<dp::TextureManager> textureManager,
             gpu::TTextDynamicVertexBuffer && normals,
             bool IsBillboard = false);

  bool Update(ScreenBase const & screen) override;

  void GetAttributeMutation(ref_ptr<dp::AttributeBufferMutator> mutator) const override;

  bool IndexesRequired() const override;

  void SetForceUpdateNormals(bool forceUpdate) const;

#ifdef DEBUG_OVERLAYS_OUTPUT
  virtual string GetOverlayDebugInfo() override;
#endif

protected:
  gpu::TTextDynamicVertexBuffer m_buffer;
  mutable bool m_forceUpdateNormals;

private:
  mutable bool m_isLastVisible;

  strings::UniString m_text;
  ref_ptr<dp::TextureManager> m_textureManager;
  bool m_glyphsReady;
};

} // namespace df


text:
// message.h

#pragma once

#include <vector>

#include "mongo/platform/atomic_word.h"
#include "mongo/platform/cstdint.h"
#include "mongo/base/data_view.h"
#include "mongo/base/encoded_value_storage.h"
#include "mongo/util/mongoutils/str.h"
#include "mongo/util/net/hostandport.h"
#include "mongo/util/net/operation.h"
#include "mongo/util/net/sock.h"

namespace mongo {

/**
 * Maximum accepted message size on the wire protocol.
 */
const size_t MaxMessageSizeBytes = 48 * 1000 * 1000;

class Message;
class MessagingPort;
class PiggyBackData;

typedef uint32_t MSGID;

bool doesOpGetAResponse(int op);

inline const char* opToString(int op) {
    switch (op) {
        case 0:
            return "none";
        case opReply:
            return "reply";
        case dbMsg:
            return "msg";
        case dbUpdate:
            return "update";
        case dbInsert:
            return "insert";
        case dbQuery:
            return "query";
        case dbGetMore:
            return "getmore";
        case dbDelete:
            return "remove";
        case dbKillCursors:
            return "killcursors";
        default:
            massert(16141, str::stream() << "cannot translate opcode " << op, !op);
            return "";
    }
}

inline bool opIsWrite(int op) {
    switch (op) {
        case 0:
        case opReply:
        case dbMsg:
        case dbQuery:
        case dbGetMore:
        case dbKillCursors:
            return false;

        case dbUpdate:
        case dbInsert:
        case dbDelete:
            return true;

        default:
            verify(0);
            return "";
    }
}

namespace MSGHEADER {
#pragma pack(1)
/* see http://dochub.mongodb.org/core/mongowireprotocol
*/
struct Layout {
    int32_t messageLength;  // total message size, including this
    int32_t requestID;      // identifier for this message
    int32_t responseTo;     // requestID from the original request
    //   (used in responses from db)
    int32_t opCode;
};
#pragma pack()

class ConstView {
public:
    typedef ConstDataView view_type;

    ConstView(const char* data) : _data(data) {}

    const char* view2ptr() const {
        return data().view();
    }

    int32_t getMessageLength() const {
        return data().readLE<int32_t>(offsetof(Layout, messageLength));
    }

    int32_t getRequestID() const {
        return data().readLE<int32_t>(offsetof(Layout, requestID));
    }

    int32_t getResponseTo() const {
        return data().readLE<int32_t>(offsetof(Layout, responseTo));
    }

    int32_t getOpCode() const {
        return data().readLE<int32_t>(offsetof(Layout, opCode));
    }

protected:
    const view_type& data() const {
        return _data;
    }

private:
    view_type _data;
};

class View : public ConstView {
public:
    typedef DataView view_type;

    View(char* data) : ConstView(data) {}

    using ConstView::view2ptr;
    char* view2ptr() {
        return data().view();
    }

    void setMessageLength(int32_t value) {
        data().writeLE(value, offsetof(Layout, messageLength));
    }

    void setRequestID(int32_t value) {
        data().writeLE(value, offsetof(Layout, requestID));
    }

    void setResponseTo(int32_t value) {
        data().writeLE(value, offsetof(Layout, responseTo));
    }

    void setOpCode(int32_t value) {
        data().writeLE(value, offsetof(Layout, opCode));
    }

private:
    view_type data() const {
        return const_cast<char*>(ConstView::view2ptr());
    }
};

class Value : public EncodedValueStorage<Layout, ConstView, View> {
public:
    Value() {
        BOOST_STATIC_ASSERT(sizeof(Value) == sizeof(Layout));
    }

    Value(ZeroInitTag_t zit) : EncodedValueStorage<Layout, ConstView, View>(zit) {}
};

}  // namespace MSGHEADER

namespace MsgData {
#pragma pack(1)
struct Layout {
    MSGHEADER::Layout header;
    char data[4];
};
#pragma pack()

class ConstView {
public:
    ConstView(const char* storage) : _storage(storage) {}

    const char* view2ptr() const {
        return storage().view();
    }

    int32_t getLen() const {
        return header().getMessageLength();
    }

    MSGID getId() const {
        return header().getRequestID();
    }

    MSGID getResponseTo() const {
        return header().getResponseTo();
    }

    int32_t getOperation() const {
        return header().getOpCode();
    }

    const char* data() const {
        return storage().view(offsetof(Layout, data));
    }

    bool valid() const {
        if (getLen() <= 0 || getLen() > (4 * BSONObjMaxInternalSize))
            return false;
        if (getOperation() < 0 || getOperation() > 30000)
            return false;
        return true;
    }

    int64_t getCursor() const {
        verify(getResponseTo() > 0);
        verify(getOperation() == opReply);
        return ConstDataView(data() + sizeof(int32_t)).readLE<int64_t>();
    }

    int dataLen() const;  // len without header

protected:
    const ConstDataView& storage() const {
        return _storage;
    }

    MSGHEADER::ConstView header() const {
        return storage().view(offsetof(Layout, header));
    }

private:
    ConstDataView _storage;
};

class View : public ConstView {
public:
    View(char* storage) : ConstView(storage) {}

    using ConstView::view2ptr;
    char* view2ptr() {
        return storage().view();
    }

    void setLen(int value) {
        return header().setMessageLength(value);
    }

    void setId(MSGID value) {
        return header().setRequestID(value);
    }

    void setResponseTo(MSGID value) {
        return header().setResponseTo(value);
    }

    void setOperation(int value) {
        return header().setOpCode(value);
    }

    using ConstView::data;
    char* data() {
        return storage().view(offsetof(Layout, data));
    }

private:
    DataView storage() const {
        return const_cast<char*>(ConstView::view2ptr());
    }

    MSGHEADER::View header() const {
        return storage().view(offsetof(Layout, header));
    }
};

class Value : public EncodedValueStorage<Layout, ConstView, View> {
public:
    Value() {
        BOOST_STATIC_ASSERT(sizeof(Value) == sizeof(Layout));
    }

    Value(ZeroInitTag_t zit) : EncodedValueStorage<Layout, ConstView, View>(zit) {}
};

const int MsgDataHeaderSize = sizeof(Value) - 4;
inline int ConstView::dataLen() const {
    return getLen() - MsgDataHeaderSize;
}
}  // namespace MsgData

class Message {
public:
    // we assume here that a vector with initial size 0 does no allocation (0 is the default, but
    // wanted to make it explicit).
    Message() : _buf(0), _data(0), _freeIt(false) {}
    Message(void* data, bool freeIt) : _buf(0), _data(0), _freeIt(false) {
        _setData(reinterpret_cast<char*>(data), freeIt);
    };
    Message(Message& r) : _buf(0), _data(0), _freeIt(false) {
        *this = r;
    }
    ~Message() {
        reset();
    }

    SockAddr _from;

    MsgData::View header() const {
        verify(!empty());
        return _buf ? _buf : _data[0].first;
    }

    int operation() const {
        return header().getOperation();
    }

    MsgData::View singleData() const {
        massert(13273, "single data buffer expected", _buf);
        return header();
    }

    bool empty() const {
        return !_buf && _data.empty();
    }

    int size() const {
        int res = 0;
        if (_buf) {
            res = MsgData::ConstView(_buf).getLen();
        } else {
            for (MsgVec::const_iterator it = _data.begin(); it != _data.end(); ++it) {
                res += it->second;
            }
        }
        return res;
    }

    int dataSize() const {
        return size() - sizeof(MSGHEADER::Value);
    }

    // concat multiple buffers - noop if <2 buffers already, otherwise can be expensive copy
    // can get rid of this if we make response handling smarter
    void concat() {
        if (_buf || empty()) {
            return;
        }

        verify(_freeIt);
        int totalSize = 0;
        for (std::vector<std::pair<char*, int> >::const_iterator i = _data.begin();
             i != _data.end();
             ++i) {
            totalSize += i->second;
        }
        char* buf = (char*)malloc(totalSize);
        char* p = buf;
        for (std::vector<std::pair<char*, int> >::const_iterator i = _data.begin();
             i != _data.end();
             ++i) {
            memcpy(p, i->first, i->second);
            p += i->second;
        }
        reset();
        _setData(buf, true);
    }

    // vector swap() so this is fast
    Message& operator=(Message& r) {
        verify(empty());
        verify(r._freeIt);
        _buf = r._buf;
        r._buf = 0;
        if (r._data.size() > 0) {
            _data.swap(r._data);
        }
        r._freeIt = false;
        _freeIt = true;
        return *this;
    }

    void reset() {
        if (_freeIt) {
            if (_buf) {
                free(_buf);
            }
            for (std::vector<std::pair<char*, int> >::const_iterator i = _data.begin();
                 i != _data.end();
                 ++i) {
                free(i->first);
            }
        }
        _buf = 0;
        _data.clear();
        _freeIt = false;
    }

    // use to add a buffer
    // assumes message will free everything
    void appendData(char* d, int size) {
        if (size <= 0) {
            return;
        }
        if (empty()) {
            MsgData::View md = d;
            md.setLen(size);  // can be updated later if more buffers added
            _setData(md.view2ptr(), true);
            return;
        }
        verify(_freeIt);
        if (_buf) {
            _data.push_back(std::make_pair(_buf, MsgData::ConstView(_buf).getLen()));
            _buf = 0;
        }
        _data.push_back(std::make_pair(d, size));
        header().setLen(header().getLen() + size);
    }

    // use to set first buffer if empty
    void setData(char* d, bool freeIt) {
        verify(empty());
        _setData(d, freeIt);
    }
    void setData(int operation, const char* msgtxt) {
        setData(operation, msgtxt, strlen(msgtxt) + 1);
    }
    void setData(int operation, const char* msgdata, size_t len) {
        verify(empty());
        size_t dataLen = len + sizeof(MsgData::Value) - 4;
        MsgData::View d = reinterpret_cast<char*>(malloc(dataLen));
        memcpy(d.data(), msgdata, len);
        d.setLen(dataLen);
        d.setOperation(operation);
        _setData(d.view2ptr(), true);
    }

    bool doIFreeIt() {
        return _freeIt;
    }

    void send(MessagingPort& p, const char* context);

    std::string toString() const;

private:
    void _setData(char* d, bool freeIt) {
        _freeIt = freeIt;
        _buf = d;
    }
    // if just one buffer, keep it in _buf, otherwise keep a sequence of buffers in _data
    char* _buf;
    // byte buffer(s) - the first must contain at least a full MsgData unless using _buf for storage
    // instead
    typedef std::vector<std::pair<char*, int> > MsgVec;
    MsgVec _data;
    bool _freeIt;
};

MSGID nextMessageId();

}  // namespace mongo


text:
import os
import numpy as np
from PIL import Image
from PIL.Image import FLIP_LEFT_RIGHT

def image_to_tensor(img):
    '''
    convert image to Theano/Lasagne 3-tensor format;
    changes channel dimension to be in the first position and rescales from [0,255] to [-1,1]
    '''
    tensor = np.array(img).transpose( (2,0,1) )
    tensor = tensor / 255.*2 - 1.
    return tensor

def tensor_to_image(tensor):
    '''
    convert 3-tensor to image;
    changes channel to be last and rescales from [-1, 1] to [0, 255]
    '''
    img = np.array(tensor).transpose( (1,2,0) )
    img = (img + 1.) * 255/2.
    return np.uint8(img)

def get_texture_iter(folder, npx=128, batch_size=64, \
                     filter=None, mirror=True):
    '''
    @param folder       iterate of pictures from this folder
    @param npx          size of patches to extract
    @param n_batches    number of batches to yield - if None, it yields forever
    @param mirror       if True the images get augmented by left-right mirroring
    @return a batch of image patches fo size npx x npx, with values in [0,1]
    '''
    HW    = npx
    imTex = []
    files = os.listdir(folder)
    for f in files:
        name = folder + f
        try:
            img = Image.open(name)
            imTex += [image_to_tensor(img)]
            if mirror:
                img = img.transpose(FLIP_LEFT_RIGHT)
                imTex += [image_to_tensor(img)]
        except:
            print "Image ", name, " failed to load!"

    while True:
        data=np.zeros((batch_size,3,npx,npx))                   # NOTE: assumes 3 channels!
        for i in range(batch_size):
            ir = np.random.randint(len(imTex))
            imgBig = imTex[ir]
            if HW < imgBig.shape[1] and HW < imgBig.shape[2]:   # sample patches
                h = np.random.randint(imgBig.shape[1] - HW)
                w = np.random.randint(imgBig.shape[2] - HW)
                img = imgBig[:, h:h + HW, w:w + HW]
            else:                                               # whole input texture
                img = imgBig
            data[i] = img

        yield data

def save_tensor(tensor, filename):
    '''
    save a 3-tensor (channel, x, y) to image file
    '''
    img = tensor_to_image(tensor)
    img = Image.fromarray(img)
    img.save(filename)

if __name__=="__main__":
    print "nothing here."


text:
title: "Collaborating on GitHub"
text: "Git and Github are tools not only for version control of your own code, but are widely used for collaborative team coding! Learn more about how you can use Git collaboratively on a project, the genereal workflow as well as details about the step-by-step process.
"
location: "MADLab"
link: "https://github.com/UofTCoders/Events/issues/256"
date: "2019-08-01"
startTime: "18:10"
endTime: "19:00"
---


text:
package org.springframework.boot.autoconfigure.orm.jpa;

import java.sql.Connection;
import java.sql.DatabaseMetaData;
import java.sql.SQLException;
import java.util.Map;

import javax.sql.DataSource;

import org.junit.After;
import org.junit.Test;

import org.springframework.boot.autoconfigure.TestAutoConfigurationPackage;
import org.springframework.boot.autoconfigure.context.PropertyPlaceholderAutoConfiguration;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.boot.autoconfigure.jdbc.EmbeddedDataSourceConfiguration;
import org.springframework.boot.autoconfigure.orm.jpa.test.City;
import org.springframework.boot.test.util.TestPropertyValues;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.orm.jpa.vendor.Database;
import org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter;
import org.springframework.test.util.ReflectionTestUtils;

import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.BDDMockito.given;
import static org.mockito.Mockito.mock;

/**
 * Tests for {@link HibernateJpaAutoConfiguration}.
 *
 * @author Dave Syer
 * @author Phillip Webb
 * @author Eddú Meléndez
 */
public class CustomHibernateJpaAutoConfigurationTests {

	protected AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext();

	@After
	public void close() {
		this.context.close();
	}

	@Test
	public void testDefaultDdlAutoForMySql() throws Exception {
		// Set up environment so we get a MySQL database but don't require server to be
		// running...
		TestPropertyValues
				.of("spring.datasource.type:"
						+ org.apache.tomcat.jdbc.pool.DataSource.class.getName(),
				"spring.datasource.database:mysql",
				"spring.datasource.url:jdbc:mysql://localhost/nonexistent",
				"spring.datasource.initialize:false", "spring.jpa.database:MYSQL")
				.applyTo(this.context);
		this.context.register(TestConfiguration.class, DataSourceAutoConfiguration.class,
				PropertyPlaceholderAutoConfiguration.class,
				HibernateJpaAutoConfiguration.class);
		this.context.refresh();
		JpaProperties bean = this.context.getBean(JpaProperties.class);
		DataSource dataSource = this.context.getBean(DataSource.class);
		String actual = bean.getHibernateProperties(dataSource)
				.get("hibernate.hbm2ddl.auto");
		// Default is generic and safe
		assertThat(actual).isNull();
	}

	@Test
	public void testDefaultDdlAutoForEmbedded() throws Exception {
		TestPropertyValues.of("spring.datasource.initialize:false").applyTo(this.context);
		this.context.register(TestConfiguration.class,
				EmbeddedDataSourceConfiguration.class,
				PropertyPlaceholderAutoConfiguration.class,
				HibernateJpaAutoConfiguration.class);
		this.context.refresh();
		JpaProperties bean = this.context.getBean(JpaProperties.class);
		DataSource dataSource = this.context.getBean(DataSource.class);
		String actual = bean.getHibernateProperties(dataSource)
				.get("hibernate.hbm2ddl.auto");
		assertThat(actual).isEqualTo("create-drop");
	}

	@Test
	public void testNamingStrategyDelegatorTakesPrecedence() {
		TestPropertyValues
				.of("spring.jpa.properties.hibernate.ejb.naming_strategy_delegator:"
						+ "org.hibernate.cfg.naming.ImprovedNamingStrategyDelegator");
		this.context.register(TestConfiguration.class,
				EmbeddedDataSourceConfiguration.class,
				PropertyPlaceholderAutoConfiguration.class,
				HibernateJpaAutoConfiguration.class);
		this.context.refresh();
		JpaProperties bean = this.context.getBean(JpaProperties.class);
		DataSource dataSource = this.context.getBean(DataSource.class);
		Map<String, String> hibernateProperties = bean.getHibernateProperties(dataSource);
		assertThat(hibernateProperties.get("hibernate.ejb.naming_strategy")).isNull();
	}

	@Test
	public void testDefaultDatabaseForH2() throws Exception {
		TestPropertyValues.of("spring.datasource.url:jdbc:h2:mem:testdb",
				"spring.datasource.initialize:false").applyTo(this.context);
		this.context.register(TestConfiguration.class, DataSourceAutoConfiguration.class,
				PropertyPlaceholderAutoConfiguration.class,
				HibernateJpaAutoConfiguration.class);
		this.context.refresh();
		HibernateJpaVendorAdapter bean = this.context
				.getBean(HibernateJpaVendorAdapter.class);
		Database database = (Database) ReflectionTestUtils.getField(bean, "database");
		assertThat(database).isEqualTo(Database.H2);
	}

	@Configuration
	@TestAutoConfigurationPackage(City.class)
	protected static class TestConfiguration {

	}

	@Configuration
	protected static class MockDataSourceConfiguration {

		@Bean
		public DataSource dataSource() {
			DataSource dataSource = mock(DataSource.class);
			try {
				given(dataSource.getConnection()).willReturn(mock(Connection.class));
				given(dataSource.getConnection().getMetaData())
						.willReturn(mock(DatabaseMetaData.class));
			}
			catch (SQLException e) {
				// Do nothing
			}
			return dataSource;
		}

	}

}


text:
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
    <PreferenceCategory android:title="@string/pref_auto_play_category">
        <ListPreference
            android:defaultValue="@string/pref_auto_play_default"
            android:dialogTitle="@string/pref_auto_play_dialog_title"
            android:entries="@array/pref_auto_play_entries"
            android:entryValues="@array/pref_auto_play_entryvalues"
            android:key="auto_play"
            android:title="@string/pref_auto_play_title"/>
        <SwitchPreference
            android:defaultValue="@bool/pref_auto_flip_default"
            android:key="auto_flip"
            android:summaryOff="@string/pref_auto_flip_summary_off"
            android:summaryOn="@string/pref_auto_flip_summary_on"
            android:title="@string/pref_auto_flip_title"
            android:switchTextOff="@string/pref_switch_text_off"
            android:switchTextOn="@string/pref_switch_text_on"/>
    </PreferenceCategory>
</PreferenceScreen>