text:
package lsh.ext.gson;

import java.io.IOException;
import java.io.StringReader;
import java.util.stream.Stream;

import com.google.common.collect.Iterators;
import com.google.gson.stream.JsonToken;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

public final class PushbackJsonReaderTest {

	@Test
	public void testBeginArray()
			throws IOException {
		try ( final PushbackJsonReader unit = PushbackJsonReader.getAndRecord(new StringReader("[")) ) {
			unit.beginArray();
			assertPushback(unit, ValuedJsonToken.arrayBegin());
			unit.pushback();
			unit.beginArray();
			assertPushback(unit);
		}
	}

	@Test
	public void testEndArray()
			throws IOException {
		try ( final PushbackJsonReader unit = PushbackJsonReader.getAndRecord(new StringReader("[]")) ) {
			unit.beginArray();
			unit.endArray();
			assertPushback(unit, ValuedJsonToken.arrayBegin(), ValuedJsonToken.arrayEnd());
			unit.pushback();
			unit.beginArray();
			unit.endArray();
			assertPushback(unit);
		}
	}

	@Test
	public void testBeginObject()
			throws IOException {
		try ( final PushbackJsonReader unit = PushbackJsonReader.getAndRecord(new StringReader("{")) ) {
			unit.beginObject();
			assertPushback(unit, ValuedJsonToken.objectBegin());
			unit.pushback();
			unit.beginObject();
			assertPushback(unit);
		}
	}

	@Test
	public void testEndObject()
			throws IOException {
		try ( final PushbackJsonReader unit = PushbackJsonReader.getAndRecord(new StringReader("{}")) ) {
			unit.beginObject();
			unit.endObject();
			assertPushback(unit, ValuedJsonToken.objectBegin(), ValuedJsonToken.objectEnd());
			unit.pushback();
			unit.beginObject();
			unit.endObject();
			assertPushback(unit);
		}
	}

	@Test
	public void testHasNextForArrays()
			throws IOException {
		try ( final PushbackJsonReader unit = PushbackJsonReader.getAndRecord(new StringReader("[0]")) ) {
			unit.beginArray();
			Assertions.assertTrue(unit.hasNext());
			Assertions.assertEquals(0, unit.nextInt());
			Assertions.assertFalse(unit.hasNext());
			unit.endArray();
			assertPushback(unit, ValuedJsonToken.arrayBegin(), ValuedJsonToken.value(0), ValuedJsonToken.arrayEnd());
			unit.pushback();
			Assertions.assertTrue(unit.hasNext());
			unit.beginArray();
			Assertions.assertTrue(unit.hasNext());
			Assertions.assertEquals(0, unit.nextInt());
			Assertions.assertFalse(unit.hasNext());
			unit.endArray();
			assertPushback(unit);
		}
	}

	@Test
	public void testHasNextForEmptyArrays()
			throws IOException {
		try ( final PushbackJsonReader unit = PushbackJsonReader.getAndRecord(new StringReader("[]")) ) {
			unit.beginArray();
			Assertions.assertFalse(unit.hasNext());
			unit.endArray();
			assertPushback(unit, ValuedJsonToken.arrayBegin(), ValuedJsonToken.arrayEnd());
			unit.pushback();
			unit.beginArray();
			Assertions.assertFalse(unit.hasNext());
			unit.endArray();
			assertPushback(unit);
		}
	}

	@Test
	public void testHasNextForObjects()
			throws IOException {
		try ( final PushbackJsonReader unit = PushbackJsonReader.getAndRecord(new StringReader("{\"key\":\"value\"}")) ) {
			unit.beginObject();
			Assertions.assertTrue(unit.hasNext());
			Assertions.assertEquals("key", unit.nextName());
			Assertions.assertTrue(unit.hasNext());
			Assertions.assertEquals("value", unit.nextString());
			Assertions.assertFalse(unit.hasNext());
			unit.endObject();
			assertPushback(unit, ValuedJsonToken.objectBegin(), ValuedJsonToken.name("key"), ValuedJsonToken.value("value"), ValuedJsonToken.objectEnd());
			unit.pushback();
			unit.beginObject();
			Assertions.assertTrue(unit.hasNext());
			Assertions.assertEquals("key", unit.nextName());
			Assertions.assertTrue(unit.hasNext());
			Assertions.assertEquals("value", unit.nextString());
			Assertions.assertFalse(unit.hasNext());
			unit.endObject();
			assertPushback(unit);
		}
	}

	@Test
	public void testHasNextForEmptyObjects()
			throws IOException {
		try ( final PushbackJsonReader unit = PushbackJsonReader.getAndRecord(new StringReader("{}")) ) {
			unit.beginObject();
			Assertions.assertFalse(unit.hasNext());
			unit.endObject();
			assertPushback(unit, ValuedJsonToken.objectBegin(), ValuedJsonToken.objectEnd());
			unit.pushback();
			unit.beginObject();
			Assertions.assertFalse(unit.hasNext());
			unit.endObject();
			assertPushback(unit);
		}
	}

	@Test
	public void testHasNextForNestedArrays()
			throws IOException {
		try ( final PushbackJsonReader unit = PushbackJsonReader.getAndRecord(new StringReader("[[]]")) ) {
			unit.beginArray();
			Assertions.assertTrue(unit.hasNext());
			unit.beginArray();
			Assertions.assertFalse(unit.hasNext());
			unit.endArray();
			Assertions.assertFalse(unit.hasNext());
			unit.endArray();
			unit.pushback();
			assertPushback(unit, ValuedJsonToken.arrayBegin(), ValuedJsonToken.arrayBegin(), ValuedJsonToken.arrayEnd(), ValuedJsonToken.arrayEnd());
			unit.beginArray();
			Assertions.assertTrue(unit.hasNext());
			unit.beginArray();
			Assertions.assertFalse(unit.hasNext());
			unit.endArray();
			Assertions.assertFalse(unit.hasNext());
			unit.endArray();
			assertPushback(unit);
		}
	}

	@Test
	public void testPeek()
			throws IOException {
		try ( final PushbackJsonReader unit = PushbackJsonReader.getAndRecord(new StringReader("[]")) ) {
			Assertions.assertEquals(JsonToken.BEGIN_ARRAY, unit.peek());
			unit.beginArray();
			Assertions.assertEquals(JsonToken.END_ARRAY, unit.peek());
			unit.endArray();
			Assertions.assertEquals(JsonToken.END_DOCUMENT, unit.peek());
			unit.pushback();
			Assertions.assertEquals(JsonToken.BEGIN_ARRAY, unit.peek());
			unit.beginArray();
			Assertions.assertEquals(JsonToken.END_ARRAY, unit.peek());
			unit.endArray();
			Assertions.assertEquals(JsonToken.END_DOCUMENT, unit.peek());
		}
	}

	@Test
	public void testNextName()
			throws IOException {
		try ( final PushbackJsonReader unit = PushbackJsonReader.getAndRecord(new StringReader("{\"key\":\"value\"}")) ) {
			unit.beginObject();
			Assertions.assertEquals("key", unit.nextName());
			Assertions.assertEquals("value", unit.nextString());
			unit.endObject();
			assertPushback(unit, ValuedJsonToken.objectBegin(), ValuedJsonToken.name("key"), ValuedJsonToken.value("value"), ValuedJsonToken.objectEnd());
			unit.pushback();
			unit.beginObject();
			Assertions.assertEquals("key", unit.nextName());
			Assertions.assertEquals("value", unit.nextString());
			unit.endObject();
			assertPushback(unit);
		}
	}

	@Test
	public void testNextString()
			throws IOException {
		try ( final PushbackJsonReader unit = PushbackJsonReader.getAndRecord(new StringReader("\"value\"")) ) {
			Assertions.assertEquals("value", unit.nextString());
			assertPushback(unit, ValuedJsonToken.value("value"));
			unit.pushback();
			Assertions.assertEquals("value", unit.nextString());
			assertPushback(unit);
		}
	}

	@Test
	public void testNextBoolean()
			throws IOException {
		try ( final PushbackJsonReader unit = PushbackJsonReader.getAndRecord(new StringReader("true")) ) {
			Assertions.assertTrue(unit.nextBoolean());
			assertPushback(unit, ValuedJsonToken.value(true));
			unit.pushback();
			Assertions.assertTrue(unit.nextBoolean());
			assertPushback(unit);
		}
	}

	@Test
	public void testNextNull()
			throws IOException {
		try ( final PushbackJsonReader unit = PushbackJsonReader.getAndRecord(new StringReader("null")) ) {
			unit.nextNull();
			assertPushback(unit, ValuedJsonToken.value());
			unit.pushback();
			unit.nextNull();
			assertPushback(unit);
		}
	}

	@Test
	public void testNextDouble()
			throws IOException {
		try ( final PushbackJsonReader unit = PushbackJsonReader.getAndRecord(new StringReader("3.1415926")) ) {
			Assertions.assertEquals(3.1415926D, unit.nextDouble());
			assertPushback(unit, ValuedJsonToken.value(3.1415926D));
			unit.pushback();
			Assertions.assertEquals(3.1415926D, unit.nextDouble());
			assertPushback(unit);
		}
	}

	@Test
	public void testNextDoubleFromString()
			throws IOException {
		try ( final PushbackJsonReader unit = PushbackJsonReader.getAndRecord(new StringReader("\"3.1415926\"")) ) {
			Assertions.assertEquals("3.1415926", unit.nextString());
			assertPushback(unit, ValuedJsonToken.value("3.1415926"));
			unit.pushback();
			Assertions.assertEquals(3.1415926D, unit.nextDouble());
			assertPushback(unit);
		}
	}

	@Test
	public void testNextLong()
			throws IOException {
		try ( final PushbackJsonReader unit = PushbackJsonReader.getAndRecord(new StringReader("31415926")) ) {
			Assertions.assertEquals(31415926L, unit.nextLong());
			assertPushback(unit, ValuedJsonToken.value(31415926L));
			unit.pushback();
			Assertions.assertEquals(31415926L, unit.nextLong());
			assertPushback(unit);
		}
	}

	@Test
	public void testNextLongFromString()
			throws IOException {
		try ( final PushbackJsonReader unit = PushbackJsonReader.getAndRecord(new StringReader("\"31415926\"")) ) {
			Assertions.assertEquals("31415926", unit.nextString());
			assertPushback(unit, ValuedJsonToken.value("31415926"));
			unit.pushback();
			Assertions.assertEquals(31415926L, unit.nextLong());
			assertPushback(unit);
		}
	}

	@Test
	public void testNextInt()
			throws IOException {
		try ( final PushbackJsonReader unit = PushbackJsonReader.getAndRecord(new StringReader("31415926")) ) {
			Assertions.assertEquals(31415926, unit.nextInt());
			assertPushback(unit, ValuedJsonToken.value(31415926));
			unit.pushback();
			Assertions.assertEquals(31415926, unit.nextInt());
			assertPushback(unit);
		}
	}

	@Test
	public void textNextIntFromString()
			throws IOException {
		try ( final PushbackJsonReader unit = PushbackJsonReader.getAndRecord(new StringReader("\"31415926\"")) ) {
			Assertions.assertEquals("31415926", unit.nextString());
			assertPushback(unit, ValuedJsonToken.value("31415926"));
			unit.pushback();
			Assertions.assertEquals(31415926, unit.nextInt());
			assertPushback(unit);
		}
	}

	@Test
	public void testClose()
			throws IOException {
		@SuppressWarnings("resource")
		final PushbackJsonReader unit = PushbackJsonReader.getAndRecord(new StringReader("[0]"));
		try {
			unit.beginArray();
			unit.nextInt();
			unit.endArray();
			assertPushback(unit, ValuedJsonToken.arrayBegin(), ValuedJsonToken.value(0), ValuedJsonToken.arrayEnd());
		} finally {
			unit.close();
			assertPushback(unit);
		}
	}

	@Test
	public void testSkipValue()
			throws IOException {
		try ( final PushbackJsonReader unit = PushbackJsonReader.getAndRecord(new StringReader("[0,1,2,[8],[1000,2000,3000]]")) ) {
			unit.beginArray();
			unit.skipValue();
			unit.skipValue();
			unit.skipValue();
			unit.skipValue();
			unit.skipValue();
			unit.endArray();
			assertPushback(unit, ValuedJsonToken.arrayBegin(), ValuedJsonToken.value(0D), ValuedJsonToken.value(1D), ValuedJsonToken.value(2D), ValuedJsonToken.arrayBegin(), ValuedJsonToken.value(8D), ValuedJsonToken.arrayEnd(), ValuedJsonToken.arrayBegin(), ValuedJsonToken.value(1000D), ValuedJsonToken.value(2000D), ValuedJsonToken.value(3000D), ValuedJsonToken.arrayEnd(), ValuedJsonToken.arrayEnd());
			unit.pushback();
			unit.beginArray();
			Assertions.assertEquals(0, unit.nextInt());
			Assertions.assertEquals(1, unit.nextInt());
			Assertions.assertEquals(2, unit.nextInt());
			unit.skipValue();
			unit.beginArray();
			Assertions.assertEquals(1000, unit.nextInt());
			Assertions.assertEquals(2000, unit.nextInt());
			Assertions.assertEquals(3000, unit.nextInt());
			unit.endArray();
			unit.endArray();
			assertPushback(unit);
		}
	}

	@Test
	public void testToStringForRecordingIsNotImplementedYet() {
		Assertions.assertThrows(UnsupportedOperationException.class, () -> {
			try ( final PushbackJsonReader unit = PushbackJsonReader.getAndRecord(new StringReader("[]")) ) {
				@SuppressWarnings("unused")
				final String s = unit.toString();
			}
		});
	}

	@Test
	public void testToStringForReplayingIsNotImplementedYet() {
		Assertions.assertThrows(UnsupportedOperationException.class, () -> {
			try ( final PushbackJsonReader unit = PushbackJsonReader.getAndRecord(new StringReader("[]")) ) {
				unit.pushback();
				@SuppressWarnings("unused")
				final String s = unit.toString();
			}
		});
	}

	@Test
	public void testToStringForReplayed()
			throws IOException {
		try ( final PushbackJsonReader unit = PushbackJsonReader.getAndRecord(new StringReader("[1,2,3]")) ) {
			unit.beginArray();
			unit.nextInt();
			unit.nextInt();
			unit.pushback();
			unit.beginArray();
			unit.nextInt();
			unit.nextInt();
			Assertions.assertEquals("PushbackJsonReader at line 1 column 5 path $[2]", unit.toString());
		}
	}

	@Test
	public void testGetPathForRecordingIsNotImplementedYet() {
		Assertions.assertThrows(UnsupportedOperationException.class, () -> {
			try ( final PushbackJsonReader unit = PushbackJsonReader.getAndRecord(new StringReader("[]")) ) {
				unit.getPath();
			}
		});
	}

	@Test
	public void testGetPathForReplayingIsNotImplementedYet() {
		Assertions.assertThrows(UnsupportedOperationException.class, () -> {
			try ( final PushbackJsonReader unit = PushbackJsonReader.getAndRecord(new StringReader("[]")) ) {
				unit.pushback();
				unit.getPath();
			}
		});
	}

	@Test
	public void testGetPathForReplayed()
			throws IOException {
		try ( final PushbackJsonReader unit = PushbackJsonReader.getAndRecord(new StringReader("[1,2,3]")) ) {
			unit.beginArray();
			unit.nextInt();
			unit.nextInt();
			unit.pushback();
			unit.beginArray();
			unit.nextInt();
			unit.nextInt();
			Assertions.assertEquals("$[2]", unit.getPath());
		}
	}

	private static void assertPushback(final PushbackJsonReader pushbackJsonReader, final ValuedJsonToken<?>... tokens) {
		Iterators.elementsEqual(Stream.of(tokens).iterator(), pushbackJsonReader.iterator());
	}

}


text:
/* AUTO-GENERATED FILE.  DO NOT MODIFY.
 *
 * This class was automatically generated by the
 * aapt tool from the resource data it found.  It
 * should not be modified by hand.
 */

package com.LRA;

public final class R {
    public static final class attr {
        /**
Must be a boolean value, either "true" or "false".

This may also be a reference to a resource (in the form
"@[package:]type:name") or
theme attribute (in the form
"?[package:][type:]name")
containing a value of this type.
         */
        public static final int confirm_logout=0x7f01000c;
        /**
Must be a reference to another resource, in the form "@[+][package:]type:name"
or to a theme attribute in the form "?[package:][type:]name".
         */
        public static final int done_button_background=0x7f010006;
        /**
Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character.

This may also be a reference to a resource (in the form
"@[package:]type:name") or
theme attribute (in the form
"?[package:][type:]name")
containing a value of this type.
         */
        public static final int done_button_text=0x7f010004;
        /**
Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character.

This may also be a reference to a resource (in the form
"@[package:]type:name") or
theme attribute (in the form
"?[package:][type:]name")
containing a value of this type.
         */
        public static final int extra_fields=0x7f010001;
        /**
Must be a boolean value, either "true" or "false".

This may also be a reference to a resource (in the form
"@[package:]type:name") or
theme attribute (in the form
"?[package:][type:]name")
containing a value of this type.
         */
        public static final int fetch_user_info=0x7f01000d;
        /**
Must be a boolean value, either "true" or "false".

This may also be a reference to a resource (in the form
"@[package:]type:name") or
theme attribute (in the form
"?[package:][type:]name")
containing a value of this type.
         */
        public static final int is_cropped=0x7f010011;
        /**
Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character.

This may also be a reference to a resource (in the form
"@[package:]type:name") or
theme attribute (in the form
"?[package:][type:]name")
containing a value of this type.
         */
        public static final int login_text=0x7f01000e;
        /**
Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character.

This may also be a reference to a resource (in the form
"@[package:]type:name") or
theme attribute (in the form
"?[package:][type:]name")
containing a value of this type.
         */
        public static final int logout_text=0x7f01000f;
        /**
Must be a boolean value, either "true" or "false".

This may also be a reference to a resource (in the form
"@[package:]type:name") or
theme attribute (in the form
"?[package:][type:]name")
containing a value of this type.
         */
        public static final int multi_select=0x7f010007;
        /**
Must be one of the following constant values.

<colgroup align="left" />
<colgroup align="left" />
<colgroup align="left" />

Constant	Value	Description

small	-2	 Keep in sync with constants in ProfilePictureView

normal	-3

large	-4

         */
        public static final int preset_size=0x7f010010;
        /**
Must be an integer value, such as "100".

This may also be a reference to a resource (in the form
"@[package:]type:name") or
theme attribute (in the form
"?[package:][type:]name")
containing a value of this type.
         */
        public static final int radius_in_meters=0x7f010008;
        /**
Must be an integer value, such as "100".

This may also be a reference to a resource (in the form
"@[package:]type:name") or
theme attribute (in the form
"?[package:][type:]name")
containing a value of this type.
         */
        public static final int results_limit=0x7f010009;
        /**
Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character.

This may also be a reference to a resource (in the form
"@[package:]type:name") or
theme attribute (in the form
"?[package:][type:]name")
containing a value of this type.
         */
        public static final int search_text=0x7f01000a;
        /**
Must be a boolean value, either "true" or "false".

This may also be a reference to a resource (in the form
"@[package:]type:name") or
theme attribute (in the form
"?[package:][type:]name")
containing a value of this type.
         */
        public static final int show_pictures=0x7f010000;
        /**
Must be a boolean value, either "true" or "false".

This may also be a reference to a resource (in the form
"@[package:]type:name") or
theme attribute (in the form
"?[package:][type:]name")
containing a value of this type.
         */
        public static final int show_search_box=0x7f01000b;
        /**
Must be a boolean value, either "true" or "false".

This may also be a reference to a resource (in the form
"@[package:]type:name") or
theme attribute (in the form
"?[package:][type:]name")
containing a value of this type.
         */
        public static final int show_title_bar=0x7f010002;
        /**
Must be a reference to another resource, in the form "@[+][package:]type:name"
or to a theme attribute in the form "?[package:][type:]name".
         */
        public static final int title_bar_background=0x7f010005;
        /**
Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character.

This may also be a reference to a resource (in the form
"@[package:]type:name") or
theme attribute (in the form
"?[package:][type:]name")
containing a value of this type.
         */
        public static final int title_text=0x7f010003;
    }
    public static final class bool {
        /** Enable automatic activity tracking
         */
        public static final int ga_autoActivityTracking=0x7f090000;
        /** Enable automatic exception tracking
         */
        public static final int ga_reportUncaughtExceptions=0x7f090001;
    }
    public static final class color {
        public static final int com_facebook_blue=0x7f060002;
        public static final int com_facebook_loginview_text_color=0x7f060006;
        public static final int com_facebook_picker_search_bar_background=0x7f060000;
        public static final int com_facebook_picker_search_bar_text=0x7f060001;
        public static final int com_facebook_usersettingsfragment_connected_shadow_color=0x7f060004;
        public static final int com_facebook_usersettingsfragment_connected_text_color=0x7f060003;
        public static final int com_facebook_usersettingsfragment_not_connected_text_color=0x7f060005;
    }
    public static final class dimen {
        /**  Default screen margins, per the Android Design guidelines.

         Customize dimensions originally defined in res/values/dimens.xml (such as
         screen margins) for sw720dp devices (e.g. 10" tablets) in landscape here.

         */
        public static final int activity_horizontal_margin=0x7f05000d;
        public static final int activity_vertical_margin=0x7f05000e;
        public static final int com_facebook_loginview_compound_drawable_padding=0x7f050008;
        public static final int com_facebook_loginview_padding_bottom=0x7f050007;
        public static final int com_facebook_loginview_padding_left=0x7f050004;
        public static final int com_facebook_loginview_padding_right=0x7f050005;
        public static final int com_facebook_loginview_padding_top=0x7f050006;
        public static final int com_facebook_loginview_text_size=0x7f050009;
        public static final int com_facebook_picker_divider_width=0x7f050001;
        public static final int com_facebook_picker_place_image_size=0x7f050000;
        public static final int com_facebook_profilepictureview_preset_size_large=0x7f05000c;
        public static final int com_facebook_profilepictureview_preset_size_normal=0x7f05000b;
        public static final int com_facebook_profilepictureview_preset_size_small=0x7f05000a;
        public static final int com_facebook_usersettingsfragment_profile_picture_height=0x7f050003;
        public static final int com_facebook_usersettingsfragment_profile_picture_width=0x7f050002;
    }
    public static final class drawable {
        public static final int account=0x7f020000;
        public static final int bird_black_48_0=0x7f020001;
        public static final int bird_white_48_0=0x7f020002;
        public static final int com_facebook_button_blue=0x7f020003;
        public static final int com_facebook_button_blue_focused=0x7f020004;
        public static final int com_facebook_button_blue_normal=0x7f020005;
        public static final int com_facebook_button_blue_pressed=0x7f020006;
        public static final int com_facebook_button_check=0x7f020007;
        public static final int com_facebook_button_check_off=0x7f020008;
        public static final int com_facebook_button_check_on=0x7f020009;
        public static final int com_facebook_button_grey_focused=0x7f02000a;
        public static final int com_facebook_button_grey_normal=0x7f02000b;
        public static final int com_facebook_button_grey_pressed=0x7f02000c;
        public static final int com_facebook_close=0x7f02000d;
        public static final int com_facebook_inverse_icon=0x7f02000e;
        public static final int com_facebook_list_divider=0x7f02000f;
        public static final int com_facebook_list_section_header_background=0x7f020010;
        public static final int com_facebook_loginbutton_silver=0x7f020011;
        public static final int com_facebook_logo=0x7f020012;
        public static final int com_facebook_picker_default_separator_color=0x7f02002a;
        public static final int com_facebook_picker_item_background=0x7f020013;
        public static final int com_facebook_picker_list_focused=0x7f020014;
        public static final int com_facebook_picker_list_longpressed=0x7f020015;
        public static final int com_facebook_picker_list_pressed=0x7f020016;
        public static final int com_facebook_picker_list_selector=0x7f020017;
        public static final int com_facebook_picker_list_selector_background_transition=0x7f020018;
        public static final int com_facebook_picker_list_selector_disabled=0x7f020019;
        public static final int com_facebook_picker_magnifier=0x7f02001a;
        public static final int com_facebook_picker_top_button=0x7f02001b;
        public static final int com_facebook_place_default_icon=0x7f02001c;
        public static final int com_facebook_profile_default_icon=0x7f02001d;
        public static final int com_facebook_profile_picture_blank_portrait=0x7f02001e;
        public static final int com_facebook_profile_picture_blank_square=0x7f02001f;
        public static final int com_facebook_top_background=0x7f020020;
        public static final int com_facebook_top_button=0x7f020021;
        public static final int com_facebook_usersettingsfragment_background_gradient=0x7f020022;
        public static final int facebook_twitter_logo_combo1=0x7f020023;
        public static final int facebookicon=0x7f020024;
        public static final int ic_action_back=0x7f020025;
        public static final int ic_action_forward=0x7f020026;
        public static final int ic_launcher=0x7f020027;
        public static final int twitter_button_background=0x7f020028;
        public static final int visualtour=0x7f020029;
    }
    public static final class id {
        public static final int action_forgot_password=0x7f04002f;
        public static final int action_settings=0x7f04002e;
        public static final int com_facebook_login_activity_progress_bar=0x7f040011;
        public static final int com_facebook_picker_activity_circle=0x7f040010;
        public static final int com_facebook_picker_checkbox=0x7f040013;
        public static final int com_facebook_picker_checkbox_stub=0x7f040017;
        public static final int com_facebook_picker_divider=0x7f04001b;
        public static final int com_facebook_picker_done_button=0x7f04001a;
        public static final int com_facebook_picker_image=0x7f040014;
        public static final int com_facebook_picker_list_section_header=0x7f040018;
        public static final int com_facebook_picker_list_view=0x7f04000f;
        public static final int com_facebook_picker_profile_pic_stub=0x7f040015;
        public static final int com_facebook_picker_row_activity_circle=0x7f040012;
        public static final int com_facebook_picker_search_text=0x7f040020;
        public static final int com_facebook_picker_title=0x7f040016;
        public static final int com_facebook_picker_title_bar=0x7f04001d;
        public static final int com_facebook_picker_title_bar_stub=0x7f04001c;
        public static final int com_facebook_picker_top_bar=0x7f040019;
        public static final int com_facebook_search_bar_view=0x7f04001f;
        public static final int com_facebook_usersettingsfragment_login_button=0x7f040023;
        public static final int com_facebook_usersettingsfragment_logo_image=0x7f040021;
        public static final int com_facebook_usersettingsfragment_profile_name=0x7f040022;
        public static final int email=0x7f040008;
        public static final int fragment_container=0x7f040004;
        public static final int fragmentcontainer=0x7f040003;
        public static final int gridRowImageView=0x7f040027;
        public static final int gridRowTextView=0x7f040028;
        public static final int gridview=0x7f040005;
        public static final int large=0x7f040002;
        public static final int login=0x7f04000a;
        public static final int login_container=0x7f040006;
        public static final int login_form=0x7f040007;
        public static final int login_status=0x7f040029;
        public static final int login_status_message=0x7f04002a;
        public static final int message=0x7f04002d;
        public static final int message_date=0x7f04002c;
        public static final int move_back=0x7f040030;
        public static final int move_forward=0x7f040031;
        public static final int normal=0x7f040001;
        public static final int password=0x7f040009;
        public static final int picker_subtitle=0x7f04001e;
        public static final int progressBar=0x7f040026;
        public static final int sign_in_button=0x7f04000b;
        public static final int sign_in_with_facebook_button=0x7f04000d;
        public static final int sign_in_with_twitter_button=0x7f04000e;
        public static final int sign_up_button=0x7f04000c;
        public static final int small=0x7f040000;
        public static final int social_icon=0x7f04002b;
        public static final int titleTextView=0x7f040025;
        public static final int webView=0x7f040024;
    }
    public static final class layout {
        public static final int activity_fragment=0x7f030000;
        public static final int activity_grid_menu=0x7f030001;
        public static final int activity_login=0x7f030002;
        public static final int com_facebook_friendpickerfragment=0x7f030003;
        public static final int com_facebook_login_activity_layout=0x7f030004;
        public static final int com_facebook_picker_activity_circle_row=0x7f030005;
        public static final int com_facebook_picker_checkbox=0x7f030006;
        public static final int com_facebook_picker_image=0x7f030007;
        public static final int com_facebook_picker_list_row=0x7f030008;
        public static final int com_facebook_picker_list_section_header=0x7f030009;
        public static final int com_facebook_picker_search_box=0x7f03000a;
        public static final int com_facebook_picker_title_bar=0x7f03000b;
        public static final int com_facebook_picker_title_bar_stub=0x7f03000c;
        public static final int com_facebook_placepickerfragment=0x7f03000d;
        public static final int com_facebook_placepickerfragment_list_row=0x7f03000e;
        public static final int com_facebook_search_bar_layout=0x7f03000f;
        public static final int com_facebook_usersettingsfragment=0x7f030010;
        public static final int fragment_webpage=0x7f030011;
        public static final int grid_row=0x7f030012;
        public static final int login_progress=0x7f030013;
        public static final int social_feed_item=0x7f030014;
    }
    public static final class menu {
        public static final int grid_menu=0x7f0a0000;
        public static final int login=0x7f0a0001;
        public static final int web_nav_menu=0x7f0a0002;
    }
    public static final class string {
        public static final int action_forgot_password=0x7f070031;
        public static final int action_settings=0x7f070020;
        public static final int action_sign_in=0x7f07002e;
        public static final int action_sign_in_short=0x7f070030;
        public static final int action_sign_up=0x7f07002f;
        public static final int app_id=0x7f07001b;
        public static final int app_name=0x7f07001a;
        public static final int app_secret=0x7f07001c;
        public static final int cancelled=0x7f070024;
        public static final int com_facebook_choose_friends=0x7f07000f;
        public static final int com_facebook_dialogloginactivity_ok_button=0x7f070000;
        public static final int com_facebook_internet_permission_error_message=0x7f070013;
        public static final int com_facebook_internet_permission_error_title=0x7f070012;
        public static final int com_facebook_loading=0x7f070011;
        public static final int com_facebook_loginview_cancel_action=0x7f070006;
        public static final int com_facebook_loginview_log_in_button=0x7f070002;
        public static final int com_facebook_loginview_log_out_action=0x7f070005;
        public static final int com_facebook_loginview_log_out_button=0x7f070001;
        public static final int com_facebook_loginview_logged_in_as=0x7f070003;
        public static final int com_facebook_loginview_logged_in_using_facebook=0x7f070004;
        public static final int com_facebook_logo_content_description=0x7f070007;
        public static final int com_facebook_nearby=0x7f070010;
        public static final int com_facebook_picker_done_button_text=0x7f07000e;
        public static final int com_facebook_placepicker_subtitle_catetory_only_format=0x7f07000c;
        public static final int com_facebook_placepicker_subtitle_format=0x7f07000b;
        public static final int com_facebook_placepicker_subtitle_were_here_only_format=0x7f07000d;
        public static final int com_facebook_requesterror_password_changed=0x7f070016;
        public static final int com_facebook_requesterror_permissions=0x7f070018;
        public static final int com_facebook_requesterror_reconnect=0x7f070017;
        public static final int com_facebook_requesterror_relogin=0x7f070015;
        public static final int com_facebook_requesterror_web_login=0x7f070014;
        public static final int com_facebook_usersettingsfragment_log_in_button=0x7f070008;
        public static final int com_facebook_usersettingsfragment_logged_in=0x7f070009;
        public static final int com_facebook_usersettingsfragment_not_logged_in=0x7f07000a;
        public static final int error_field_required=0x7f070036;
        public static final int error_incorrect_password=0x7f070035;
        public static final int error_invalid_email=0x7f070033;
        public static final int error_invalid_password=0x7f070034;
        public static final int facebook_feedsuff=0x7f07001e;
        public static final int facebook_graph=0x7f07001d;
        public static final int facebook_page=0x7f07001f;
        /** Replace placeholder ID with your tracking ID
         */
        public static final int ga_trackingId=0x7f070019;
        public static final int hello_world=0x7f070021;
        public static final int login_progress_signing_in=0x7f070032;
        public static final int move_back=0x7f070029;
        public static final int move_forward=0x7f07002a;
        public static final int no_network=0x7f070028;
        public static final int ok=0x7f070026;
        public static final int or_sign_in_text=0x7f070023;
        public static final int permission_not_granted=0x7f070025;
        /**  Strings related to login
         */
        public static final int prompt_email=0x7f07002c;
        public static final int prompt_password=0x7f07002d;
        public static final int sign_in_with_twitter=0x7f070027;
        public static final int title_activity_grid_menu_fragment=0x7f070022;
        public static final int title_activity_login=0x7f07002b;
    }
    public static final class style {
        /**
        Base application theme, dependent on API level. This theme is replaced
        by AppBaseTheme from res/values-vXX/styles.xml on newer devices.

            Theme customizations available in newer API levels can go in
            res/values-vXX/styles.xml, while customizations related to
            backward-compatibility can go here.

        Base application theme for API 11+. This theme completely replaces
        AppBaseTheme from res/values/styles.xml on API 11+ devices.

 API 11 theme customizations can go here.

        Base application theme for API 14+. This theme completely replaces
        AppBaseTheme from BOTH res/values/styles.xml and
        res/values-v11/styles.xml on API 14+ devices.

 API 14 theme customizations can go here.
         */
        public static final int AppBaseTheme=0x7f080002;
        /**  Application theme.
 All customizations that are NOT specific to a particular API-level can go here.
         */
        public static final int AppTheme=0x7f080003;
        public static final int LoginFormContainer=0x7f080004;
        public static final int com_facebook_loginview_default_style=0x7f080000;
        public static final int com_facebook_loginview_silver_style=0x7f080001;
    }
    public static final class styleable {
        /** Attributes that can be used with a com_facebook_friend_picker_fragment.

Includes the following attributes:

           <colgroup align="left" />
           <colgroup align="left" />

Attribute	Description

{@link #com_facebook_friend_picker_fragment_multi_select com.LRA:multi_select}

           @see #com_facebook_friend_picker_fragment_multi_select
         */
        public static final int[] com_facebook_friend_picker_fragment = {
            0x7f010007
        };
        /**

This symbol is the offset where the {@link com.LRA.R.attr#multi_select}
          attribute's value can be found in the {@link #com_facebook_friend_picker_fragment} array.

Must be a boolean value, either "true" or "false".

This may also be a reference to a resource (in the form
"@[package:]type:name") or
theme attribute (in the form
"?[package:][type:]name")
containing a value of this type.
          @attr name com.LRA:multi_select
        */
        public static final int com_facebook_friend_picker_fragment_multi_select = 0;
        /** Attributes that can be used with a com_facebook_login_view.

Includes the following attributes:

           <colgroup align="left" />
           <colgroup align="left" />

Attribute	Description

{@link #com_facebook_login_view_confirm_logout com.LRA:confirm_logout}

{@link #com_facebook_login_view_fetch_user_info com.LRA:fetch_user_info}

{@link #com_facebook_login_view_login_text com.LRA:login_text}

{@link #com_facebook_login_view_logout_text com.LRA:logout_text}

           @see #com_facebook_login_view_confirm_logout
           @see #com_facebook_login_view_fetch_user_info
           @see #com_facebook_login_view_login_text
           @see #com_facebook_login_view_logout_text
         */
        public static final int[] com_facebook_login_view = {
            0x7f01000c, 0x7f01000d, 0x7f01000e, 0x7f01000f
        };
        /**

This symbol is the offset where the {@link com.LRA.R.attr#confirm_logout}
          attribute's value can be found in the {@link #com_facebook_login_view} array.

Must be a boolean value, either "true" or "false".

This may also be a reference to a resource (in the form
"@[package:]type:name") or
theme attribute (in the form
"?[package:][type:]name")
containing a value of this type.
          @attr name com.LRA:confirm_logout
        */
        public static final int com_facebook_login_view_confirm_logout = 0;
        /**

This symbol is the offset where the {@link com.LRA.R.attr#fetch_user_info}
          attribute's value can be found in the {@link #com_facebook_login_view} array.

Must be a boolean value, either "true" or "false".

This may also be a reference to a resource (in the form
"@[package:]type:name") or
theme attribute (in the form
"?[package:][type:]name")
containing a value of this type.
          @attr name com.LRA:fetch_user_info
        */
        public static final int com_facebook_login_view_fetch_user_info = 1;
        /**

This symbol is the offset where the {@link com.LRA.R.attr#login_text}
          attribute's value can be found in the {@link #com_facebook_login_view} array.

Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character.

This may also be a reference to a resource (in the form
"@[package:]type:name") or
theme attribute (in the form
"?[package:][type:]name")
containing a value of this type.
          @attr name com.LRA:login_text
        */
        public static final int com_facebook_login_view_login_text = 2;
        /**

This symbol is the offset where the {@link com.LRA.R.attr#logout_text}
          attribute's value can be found in the {@link #com_facebook_login_view} array.

Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character.

This may also be a reference to a resource (in the form
"@[package:]type:name") or
theme attribute (in the form
"?[package:][type:]name")
containing a value of this type.
          @attr name com.LRA:logout_text
        */
        public static final int com_facebook_login_view_logout_text = 3;
        /** Attributes that can be used with a com_facebook_picker_fragment.

Includes the following attributes:

           <colgroup align="left" />
           <colgroup align="left" />

Attribute	Description

{@link #com_facebook_picker_fragment_done_button_background com.LRA:done_button_background}

{@link #com_facebook_picker_fragment_done_button_text com.LRA:done_button_text}

{@link #com_facebook_picker_fragment_extra_fields com.LRA:extra_fields}

{@link #com_facebook_picker_fragment_show_pictures com.LRA:show_pictures}

{@link #com_facebook_picker_fragment_show_title_bar com.LRA:show_title_bar}

{@link #com_facebook_picker_fragment_title_bar_background com.LRA:title_bar_background}

{@link #com_facebook_picker_fragment_title_text com.LRA:title_text}

           @see #com_facebook_picker_fragment_done_button_background
           @see #com_facebook_picker_fragment_done_button_text
           @see #com_facebook_picker_fragment_extra_fields
           @see #com_facebook_picker_fragment_show_pictures
           @see #com_facebook_picker_fragment_show_title_bar
           @see #com_facebook_picker_fragment_title_bar_background
           @see #com_facebook_picker_fragment_title_text
         */
        public static final int[] com_facebook_picker_fragment = {
            0x7f010000, 0x7f010001, 0x7f010002, 0x7f010003,
            0x7f010004, 0x7f010005, 0x7f010006
        };
        /**

This symbol is the offset where the {@link com.LRA.R.attr#done_button_background}
          attribute's value can be found in the {@link #com_facebook_picker_fragment} array.

Must be a reference to another resource, in the form "@[+][package:]type:name"
or to a theme attribute in the form "?[package:][type:]name".
          @attr name com.LRA:done_button_background
        */
        public static final int com_facebook_picker_fragment_done_button_background = 6;
        /**

This symbol is the offset where the {@link com.LRA.R.attr#done_button_text}
          attribute's value can be found in the {@link #com_facebook_picker_fragment} array.

Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character.

This may also be a reference to a resource (in the form
"@[package:]type:name") or
theme attribute (in the form
"?[package:][type:]name")
containing a value of this type.
          @attr name com.LRA:done_button_text
        */
        public static final int com_facebook_picker_fragment_done_button_text = 4;
        /**

This symbol is the offset where the {@link com.LRA.R.attr#extra_fields}
          attribute's value can be found in the {@link #com_facebook_picker_fragment} array.

Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character.

This may also be a reference to a resource (in the form
"@[package:]type:name") or
theme attribute (in the form
"?[package:][type:]name")
containing a value of this type.
          @attr name com.LRA:extra_fields
        */
        public static final int com_facebook_picker_fragment_extra_fields = 1;
        /**

This symbol is the offset where the {@link com.LRA.R.attr#show_pictures}
          attribute's value can be found in the {@link #com_facebook_picker_fragment} array.

Must be a boolean value, either "true" or "false".

This may also be a reference to a resource (in the form
"@[package:]type:name") or
theme attribute (in the form
"?[package:][type:]name")
containing a value of this type.
          @attr name com.LRA:show_pictures
        */
        public static final int com_facebook_picker_fragment_show_pictures = 0;
        /**

This symbol is the offset where the {@link com.LRA.R.attr#show_title_bar}
          attribute's value can be found in the {@link #com_facebook_picker_fragment} array.

Must be a boolean value, either "true" or "false".

This may also be a reference to a resource (in the form
"@[package:]type:name") or
theme attribute (in the form
"?[package:][type:]name")
containing a value of this type.
          @attr name com.LRA:show_title_bar
        */
        public static final int com_facebook_picker_fragment_show_title_bar = 2;
        /**

This symbol is the offset where the {@link com.LRA.R.attr#title_bar_background}
          attribute's value can be found in the {@link #com_facebook_picker_fragment} array.

Must be a reference to another resource, in the form "@[+][package:]type:name"
or to a theme attribute in the form "?[package:][type:]name".
          @attr name com.LRA:title_bar_background
        */
        public static final int com_facebook_picker_fragment_title_bar_background = 5;
        /**

This symbol is the offset where the {@link com.LRA.R.attr#title_text}
          attribute's value can be found in the {@link #com_facebook_picker_fragment} array.

Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character.

This may also be a reference to a resource (in the form
"@[package:]type:name") or
theme attribute (in the form
"?[package:][type:]name")
containing a value of this type.
          @attr name com.LRA:title_text
        */
        public static final int com_facebook_picker_fragment_title_text = 3;
        /** Attributes that can be used with a com_facebook_place_picker_fragment.

Includes the following attributes:

           <colgroup align="left" />
           <colgroup align="left" />

Attribute	Description

{@link #com_facebook_place_picker_fragment_radius_in_meters com.LRA:radius_in_meters}

{@link #com_facebook_place_picker_fragment_results_limit com.LRA:results_limit}

{@link #com_facebook_place_picker_fragment_search_text com.LRA:search_text}

{@link #com_facebook_place_picker_fragment_show_search_box com.LRA:show_search_box}

           @see #com_facebook_place_picker_fragment_radius_in_meters
           @see #com_facebook_place_picker_fragment_results_limit
           @see #com_facebook_place_picker_fragment_search_text
           @see #com_facebook_place_picker_fragment_show_search_box
         */
        public static final int[] com_facebook_place_picker_fragment = {
            0x7f010008, 0x7f010009, 0x7f01000a, 0x7f01000b
        };
        /**

This symbol is the offset where the {@link com.LRA.R.attr#radius_in_meters}
          attribute's value can be found in the {@link #com_facebook_place_picker_fragment} array.

Must be an integer value, such as "100".

This may also be a reference to a resource (in the form
"@[package:]type:name") or
theme attribute (in the form
"?[package:][type:]name")
containing a value of this type.
          @attr name com.LRA:radius_in_meters
        */
        public static final int com_facebook_place_picker_fragment_radius_in_meters = 0;
        /**

This symbol is the offset where the {@link com.LRA.R.attr#results_limit}
          attribute's value can be found in the {@link #com_facebook_place_picker_fragment} array.

Must be an integer value, such as "100".

This may also be a reference to a resource (in the form
"@[package:]type:name") or
theme attribute (in the form
"?[package:][type:]name")
containing a value of this type.
          @attr name com.LRA:results_limit
        */
        public static final int com_facebook_place_picker_fragment_results_limit = 1;
        /**

This symbol is the offset where the {@link com.LRA.R.attr#search_text}
          attribute's value can be found in the {@link #com_facebook_place_picker_fragment} array.

Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character.

This may also be a reference to a resource (in the form
"@[package:]type:name") or
theme attribute (in the form
"?[package:][type:]name")
containing a value of this type.
          @attr name com.LRA:search_text
        */
        public static final int com_facebook_place_picker_fragment_search_text = 2;
        /**

This symbol is the offset where the {@link com.LRA.R.attr#show_search_box}
          attribute's value can be found in the {@link #com_facebook_place_picker_fragment} array.

Must be a boolean value, either "true" or "false".

This may also be a reference to a resource (in the form
"@[package:]type:name") or
theme attribute (in the form
"?[package:][type:]name")
containing a value of this type.
          @attr name com.LRA:show_search_box
        */
        public static final int com_facebook_place_picker_fragment_show_search_box = 3;
        /** Attributes that can be used with a com_facebook_profile_picture_view.

Includes the following attributes:

           <colgroup align="left" />
           <colgroup align="left" />

Attribute	Description

{@link #com_facebook_profile_picture_view_is_cropped com.LRA:is_cropped}

{@link #com_facebook_profile_picture_view_preset_size com.LRA:preset_size}

           @see #com_facebook_profile_picture_view_is_cropped
           @see #com_facebook_profile_picture_view_preset_size
         */
        public static final int[] com_facebook_profile_picture_view = {
            0x7f010010, 0x7f010011
        };
        /**

This symbol is the offset where the {@link com.LRA.R.attr#is_cropped}
          attribute's value can be found in the {@link #com_facebook_profile_picture_view} array.

Must be a boolean value, either "true" or "false".

This may also be a reference to a resource (in the form
"@[package:]type:name") or
theme attribute (in the form
"?[package:][type:]name")
containing a value of this type.
          @attr name com.LRA:is_cropped
        */
        public static final int com_facebook_profile_picture_view_is_cropped = 1;
        /**

This symbol is the offset where the {@link com.LRA.R.attr#preset_size}
          attribute's value can be found in the {@link #com_facebook_profile_picture_view} array.

Must be one of the following constant values.

<colgroup align="left" />
<colgroup align="left" />
<colgroup align="left" />

Constant	Value	Description

small	-2	 Keep in sync with constants in ProfilePictureView

normal	-3

large	-4

          @attr name com.LRA:preset_size
        */
        public static final int com_facebook_profile_picture_view_preset_size = 0;
    };
}

redpajama_set_name: RedPajamaGithub


text:
(function () {
    'use strict';

    angular
        .module('app')
        .controller('PatientIndexController', PatientIndexController);

    PatientIndexController.$inject = ['PatientService', '$rootScope', 'usSpinnerService'];

    /* @ngInject */
    function PatientIndexController(PatientService, $rootScope, usSpinnerService) {
        /* jshint validthis: true */
        var vm = this;
        $rootScope.pageHeader = "Patients";
        vm.patients = [];

        vm.activate = activate;
        vm.title = 'PatientIndexController';

        activate();

        ////////////////

        function activate() {
            PatientService.query().$promise.then(function (data) {
                usSpinnerService.stop('load-spinner');
                vm.patients = data;
            })
        }

    }
})();


text:
//Copyright © 2014 Sony Computer Entertainment America LLC. See License.txt.

using System;

namespace Sce.Atf.Wpf.Applications
{
    ///
    /// Interface for contexts which support editing item labels
    public interface ILabelEditingContext
    {
        ///
        /// Checks whether the client can edit an item's label
        /// <param name="item">Item whose label to be edited</param>
        /// <returns>True iff client can edit the label</returns>
        bool CanEditLabel(object item);

        ///
        /// Edits an item's label
        /// <param name="item">Item whose label to be edited</param>
        void EditLabel(object item);

        ///
        /// Gets an item's label
        /// <param name="item">Item whose label is obtained</param>
        /// <returns>Item's label</returns>
        string GetLabel(object item);

        ///
        /// Sets an item's label
        /// <param name="item">Item whose label is set</param>
        /// <param name="value">Item's label</param>
        void SetLabel(object item, string value);

        ///
        /// Event that is raised when a label edit operation begins
        event EventHandler<BeginLabelEditEventArgs> BeginLabelEdit;
    }

    ///
    /// Event information for the BeginLabelEdit event
    public class BeginLabelEditEventArgs : EventArgs
    {
        ///
        /// Constructor
        /// <param name="item">Item whose label has begun to be edited</param>
        public BeginLabelEditEventArgs(object item)
        {
            Item = item;
        }

        ///
        /// Item whose label has begun to be edited
        public readonly object Item;
    }

}


text:
package org.structuredb.fileops.app;

import org.structuredb.exception.app.AppFilesInitializationException;
import org.structuredb.exception.app.AppIndexEntryException;
import org.structuredb.exception.app.AppIndexParseException;
import org.structuredb.utils.Console;

import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.nio.file.StandardOpenOption;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class AppIndex {

    public static void initAppIndex(String dataPath) throws IOException {

        File file = new File(Paths.get(dataPath, "apps").toString());

        if (!file.exists()) {
            Console.info("App index not initialized. Creating now.");
            if (file.createNewFile()) {
                Console.info("Initialized app index successfully");
            } else {
                Console.error("Error initializing app index");
                throw new AppFilesInitializationException();
            }
        }
    }

    public static List<String> getAppsList(String dataPath) {
        List<String> apps = new ArrayList<>();

        File appIndexFile = new File(Paths.get(dataPath, "apps").toString());

        try {
            Scanner appIndexScanner = new Scanner(appIndexFile);

            while (appIndexScanner.hasNextLine()) {
                String appName = appIndexScanner.nextLine().trim();

                if (appName.equals("")) {
                    continue;
                }

                apps.add(appName);
            }
        } catch (Exception e) {
            Console.error(e.getMessage());
            throw new AppIndexParseException();
        }

        return apps;
    }

    public static boolean appEntryExists(String dataPath, String appName) {
        File appIndexFile = new File(Paths.get(dataPath, "apps").toString());

        boolean appInIndex = false;

        try {
            Scanner appIndexScanner = new Scanner(appIndexFile);

            while (appIndexScanner.hasNextLine()) {
                if (appName.equals(appIndexScanner.nextLine().trim())) {
                    appInIndex = true;
                    break;
                }
            }
        } catch (Exception e) {
            Console.error(e.getMessage());
        }

        return appInIndex;
    }

    public static void addAppEntry(String dataPath, String appName) {
        try {
            Console.info("Adding '" + appName + "' to app index");
            Files.write(Paths.get(dataPath, "apps"), (appName + "\n").getBytes(), StandardOpenOption.APPEND);
        } catch (IOException e) {
            Console.error("Error adding '" + appName + "' to app index");
            throw new AppIndexEntryException(appName);
        }
    }

    public static void removeAppEntry(String dataPath, String appName) {

    }

    public static void renameAppEntry(String dataPath, String appName, String newName) {

    }
}


text:
package aima.logic.propositional.parsing;

import java.util.ArrayList;
import java.util.List;

import aima.logic.propositional.parsing.ast.BinarySentence;
import aima.logic.propositional.parsing.ast.FalseSentence;
import aima.logic.propositional.parsing.ast.MultiSentence;
import aima.logic.propositional.parsing.ast.Sentence;
import aima.logic.propositional.parsing.ast.Symbol;
import aima.logic.propositional.parsing.ast.TrueSentence;
import aima.logic.propositional.parsing.ast.UnarySentence;

/**
 * @author Ravi Mohan
 *
 */

public class AbstractPLVisitor implements PLVisitor {
	private PEParser parser = new PEParser();

	public Object visitSymbol(Symbol s, Object arg) {
		return new Symbol(s.getValue());
	}

	public Object visitTrueSentence(TrueSentence ts, Object arg) {
		return new TrueSentence();
	}

	public Object visitFalseSentence(FalseSentence fs, Object arg) {
		return new FalseSentence();
	}

	public Object visitNotSentence(UnarySentence fs, Object arg) {
		return new UnarySentence((Sentence) fs.getNegated().accept(this, arg));
	}

	public Object visitBinarySentence(BinarySentence fs, Object arg) {
		return new BinarySentence(fs.getOperator(), (Sentence) fs.getFirst()
				.accept(this, arg), (Sentence) fs.getSecond().accept(this, arg));
	}

	public Object visitMultiSentence(MultiSentence fs, Object arg) {
		List terms = fs.getSentences();
		List<Sentence> newTerms = new ArrayList<Sentence>();
		for (int i = 0; i < terms.size(); i++) {
			Sentence s = (Sentence) terms.get(i);
			Sentence subsTerm = (Sentence) s.accept(this, arg);
			newTerms.add(subsTerm);
		}
		return new MultiSentence(fs.getOperator(), newTerms);
	}

	protected Sentence recreate(Object ast) {
		return (Sentence) parser.parse(((Sentence) ast).toString());
	}

}


text:
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.securityinsights.models;

import com.azure.core.util.ExpandableStringEnum;
import com.fasterxml.jackson.annotation.JsonCreator;
import java.util.Collection;

/** Status while trying to fetch the deployment information. */
public final class DeploymentFetchStatus extends ExpandableStringEnum<DeploymentFetchStatus> {
    /** Static value Success for DeploymentFetchStatus. */
    public static final DeploymentFetchStatus SUCCESS = fromString("Success");

    /** Static value Unauthorized for DeploymentFetchStatus. */
    public static final DeploymentFetchStatus UNAUTHORIZED = fromString("Unauthorized");

    /** Static value NotFound for DeploymentFetchStatus. */
    public static final DeploymentFetchStatus NOT_FOUND = fromString("NotFound");

    /**
     * Creates or finds a DeploymentFetchStatus from its string representation.
     *
     * @param name a name to look for.
     * @return the corresponding DeploymentFetchStatus.
     */
    @JsonCreator
    public static DeploymentFetchStatus fromString(String name) {
        return fromString(name, DeploymentFetchStatus.class);
    }

    /**
     * Gets known DeploymentFetchStatus values.
     *
     * @return known DeploymentFetchStatus values.
     */
    public static Collection<DeploymentFetchStatus> values() {
        return values(DeploymentFetchStatus.class);
    }
}


text:
//---------------------------------------------------------------------
// <copyright file="NullPropertyInstance.cs" company="Microsoft">
//      Copyright (C) Microsoft Corporation. All rights reserved. See License.txt in the project root for license information.
// </copyright>
//---------------------------------------------------------------------

namespace Microsoft.Test.Taupo.Astoria.Contracts.OData
{
    using System.Globalization;

    /// <summary>
    /// Represents a null property instance that may be primitive, complex, or a navigation
    /// </summary>
    public class NullPropertyInstance : PropertyInstance
    {
        /// <summary>
        /// Initializes a new instance of the NullPropertyInstance class
        /// </summary>
        public NullPropertyInstance()
            : this(null, null)
        {
        }

        /// <summary>
        /// Initializes a new instance of the NullPropertyInstance class
        /// </summary>
        /// <param name="name">The property's name</param>
        /// <param name="fullTypeName">The property's type name</param>
        public NullPropertyInstance(string name, string fullTypeName)
            : base(name)
        {
            this.FullTypeName = fullTypeName;
        }

        /// <summary>
        /// Gets or sets the type name for the null property
        /// </summary>
        public string FullTypeName { get; set; }

        /// <summary>
        /// Gets a string representation of the annotation to make debugging easier
        /// </summary>
        public override string StringRepresentation
        {
            get
            {
                return string.Format(CultureInfo.InvariantCulture, "{0}:{1}", this.Name, this.ElementType);
            }
        }

        /// <summary>
        /// The Accept method used to support the double-dispatch visitor pattern with a visitor that returns a result.
        /// </summary>
        /// <typeparam name="TResult">The result type returned by the visitor.</typeparam>
        /// <param name="visitor">The visitor that is visiting this element.</param>
        /// <returns>The result of visiting this expression.</returns>
        public override TResult Accept<TResult>(IODataPayloadElementVisitor<TResult> visitor)
        {
            return visitor.Visit(this);
        }

        /// <summary>
        /// The Accept method used to support the double-dispatch visitor pattern with a visitor that does not return a result.
        /// </summary>
        /// <param name="visitor">The visitor that is visiting this element.</param>
        public override void Accept(IODataPayloadElementVisitor visitor)
        {
            visitor.Visit(this);
        }
    }
}


text:
import getFieldValue from '../getFieldValue';

const mock = (
  type,
  value,
  target = {},
  others = {},
) => getFieldValue(type, {
  stopPropagation: () => {},
  preventDefault: () => {},
  target: {
    type,
    value,
    ...target,
  },
  ...others,
});

describe('utils#getFieldValue', () => {
  test('Should be get checkbox value', () => {
    expect(mock('checkbox', null)).toBe('');
    expect(mock('checkbox', '')).toBe('');
    expect(mock('checkbox', 'foo', { checked: true })).toBe('foo');
    expect(mock('checkbox', 'foo', { checked: false })).toBe('');
    expect(mock('checkbox', '', {})).toBe('');
  });

  test('Should be get file value', () => {
    expect(mock('file', null, { files: 'value' })).toBe('value');
    expect(mock('file', 'string', { files: 'value' })).toBe('value');
    expect(mock('file', null, {}, { dataTransfer: { files: 'test' } })).toBe('test');
    expect(mock('file', null, {}, {})).toBe(undefined);
  });

  test('Should be get select-multiple value', () => {
    expect(mock('select-multiple', null, {
      options: [
      ],
    })).toEqual([
    ]);

    expect(mock('select-multiple', null, {
      options: [
        { selected: false, value: 'value 1' },
        { selected: false, value: 'value 2' },
        { selected: false, value: 'value 3' },
      ],
    })).toEqual([
    ]);

    expect(mock('select-multiple', null, {
      options: [
        { selected: false, value: 'value 1' },
        { selected: true, value: 'value 2' },
        { selected: false, value: 'value 3' },
      ],
    })).toEqual([
      'value 2',
    ]);

    expect(mock('select-multiple', null, {
      options: [
        { selected: true, value: 'value 1' },
        { selected: true, value: 'value 2' },
        { selected: true, value: 'value 3' },
      ],
    })).toEqual([
      'value 1',
      'value 2',
      'value 3',
    ]);
  });

  test('Should be get other type value', () => {
    expect(mock('text', 'text value')).toBe('text value');
    expect(mock('email', 'email value')).toBe('email value');
    expect(mock('password', 'password value')).toBe('password value');
    expect(mock('number', 'number value')).toBe('number value');
  });

  test('Should be get obtain value other than event', () => {
    expect(getFieldValue('text', null)).toBe(null);
    expect(getFieldValue('text', undefined)).toBe(undefined);
    expect(getFieldValue('text', 'string')).toBe('string');
    expect(getFieldValue('text', 100)).toBe(100);
  });
});


text:
#ifndef RECODEX_WORKER_BROKER_COMMANDS_H
#define RECODEX_WORKER_BROKER_COMMANDS_H

#include "command_holder.h"

/**
 * Commands from broker.
 * Commands originated from broker. See @ref command_holder and @ref broker_connection.
 */
namespace broker_commands
{
	/**
	 * Command eval was received from broker, send it to "job" thread.
	 * @param args received multipart message with leading command
	 * @param context command context of command holder
	 */
	template <typename context_t>
	void process_eval(const std::vector<std::string> &args, const command_context<context_t> &context)
	{
		context.sockets->send_jobs(args);
	}

	/**
	 * Intro command arrived from broker, send him back init message with headers and hwgroup.
	 * @param args received multipart message with leading command
	 * @param context command context of command holder
	 */
	template <typename context_t>
	void process_intro(const std::vector<std::string> &args, const command_context<context_t> &context)
	{
		std::vector<std::string> reply = {"init", context.config->get_hwgroup()};

		for (auto &it : context.config->get_headers()) { reply.push_back(it.first + "=" + it.second); }
		reply.push_back("");
		reply.push_back("description=" + context.config->get_worker_description());
		if (!context.current_job.empty()) { reply.push_back("current_job=" + context.current_job); }

		context.sockets->send_broker(reply);
	}
} // namespace broker_commands

#endif // RECODEX_WORKER_BROKER_COMMANDS_H


text:
namespace vanilc {

Mat RawIO::imread(const string filename, const string dimensions) {
	char dimstr[32];
	strcpy(dimstr, dimensions.c_str());
	int bitdepth = atoi(strtok(dimstr, "x"));
	int sz[3];
	sz[2] = atoi(strtok(NULL, "x"));
	sz[1] = atoi(strtok(NULL, "x"));
	sz[0] = atoi(strtok(NULL, "x"));
	ifstream fs(filename.c_str(), ios::in | ios::binary);
	if(bitdepth == 8) {
		Mat image(3, sz, CV_8U);
		fs.read(image.ptr<char>(), sizeof(uchar) * image.total());
		fs.close();
		return image;
	} else if(bitdepth == 16) {
		Mat image(3, sz, CV_16U);
		fs.read(image.ptr<char>(), sizeof(ushort) * image.total());
		fs.close();
		return image;
	}
	else throw NoValidBitdepthException();
} // end RawIO::imread

void RawIO::imwrite(const string filename, const Mat image) {
	ofstream fs(filename.c_str(), ios::out | ios::binary);
	if(image.depth() == CV_64F) {
		fs.write(image.ptr<char>(), sizeof(double) * image.total());
	} else if(image.depth() == CV_8U) {
		fs.write(image.ptr<char>(), sizeof(uchar) * image.total());
	} else {
		fs.write(image.ptr<char>(), sizeof(ushort) * image.total());
	}
	fs.close();
} // end RawIO::imwrite

} // end namespace vanilc


text:
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.

using System.Collections.Generic;
using Microsoft.Languages.Core.Text;
using Microsoft.Languages.Core.Tokens;
using Microsoft.Languages.Editor.BraceMatch.Definitions;
using Microsoft.VisualStudio.Text;
using Microsoft.VisualStudio.Text.Editor;

namespace Microsoft.Languages.Editor.BraceMatch {
    public abstract class BraceMatcher<TokenClassT, TokenTypeT> : IBraceMatcher
        where TokenClassT : IToken<TokenTypeT> {
        public enum BraceType {
            Curly,
            Square,
            Parenthesis,
            Unknown
        }

        // Overriding classes should provide actual values in their static constructors.
        // Reserving space for three items, as the most-commonly used braces are Curly, Square, and Parenthesis.
        protected static Dictionary<BraceType, BraceTokenPair<TokenTypeT>> BraceTypeToTokenTypeMap = new Dictionary<BraceType, BraceTokenPair<TokenTypeT>>(3);

        public ITextView TextView { get; private set; }
        public ITextBuffer TextBuffer { get; private set; }

        private readonly IComparer<TokenTypeT> _tokenComparer;

        protected BraceMatcher(ITextView textView, ITextBuffer textBuffer, IComparer<TokenTypeT> tokenComparer) {
            TextView = textView;
            TextBuffer = textBuffer;
            _tokenComparer = tokenComparer;
        }

        public bool GetBracesFromPosition(ITextSnapshot snapshot, int currentPosition, bool extendSelection, out int startPosition, out int endPosition) {
            startPosition = 0;
            endPosition = 0;

            if (snapshot != TextBuffer.CurrentSnapshot || snapshot.Length == 0) {
                return false;
            }

            var braceType = BraceType.Unknown;

            var ch = '\0';
            var validCharacter = false;
            var searchPosition = currentPosition;
            var reversed = false;

            if (currentPosition < snapshot.Length) {
                ch = snapshot[currentPosition];
                validCharacter = GetMatchingBraceType(ch, out braceType, out reversed);
            }

            if (!validCharacter && currentPosition > 0) {
                ch = snapshot[currentPosition - 1];
                validCharacter = GetMatchingBraceType(ch, out braceType, out reversed);
                searchPosition--;
            }

            if (!validCharacter) {
                return false;
            }

            return GetLanguageBracesFromPosition(braceType, searchPosition, reversed, out startPosition, out endPosition);
        }

        public static bool IsSupportedBraceType(BraceType braceType) {
            return BraceTypeToTokenTypeMap.ContainsKey(braceType);
        }

        protected abstract IReadOnlyTextRangeCollection<TokenClassT> GetTokens(int start, int length);

        public virtual bool GetLanguageBracesFromPosition(
            BraceType braceType,
            int position, bool reversed, out int start, out int end) {
            var startTokenType = BraceTypeToTokenTypeMap[braceType].OpenBrace;
            var endTokenType = BraceTypeToTokenTypeMap[braceType].CloseBrace;
            var tokens = GetTokens(0, TextBuffer.CurrentSnapshot.Length);

            start = -1;
            end = -1;

            var stack = new Stack<TokenTypeT>();

            var startIndex = -1;
            for (var i = 0; i < tokens.Count; i++) {
                if (tokens[i].Start == position) {
                    startIndex = i;
                    break;
                }
            }

            if (startIndex < 0) {
                return false;
            }

            if (_tokenComparer.Compare(tokens[startIndex].TokenType, startTokenType) != 0 && _tokenComparer.Compare(tokens[startIndex].TokenType, endTokenType) != 0) {
                return false;
            }

            if (!reversed) {
                for (var i = startIndex; i < tokens.Count; i++) {
                    var token = tokens[i];

                    if (token.TokenType.Equals(startTokenType)) {
                        stack.Push(token.TokenType);
                    } else if (_tokenComparer.Compare(token.TokenType, endTokenType) == 0) {
                        if (stack.Count > 0) {
                            stack.Pop();
                        }

                        if (stack.Count == 0) {
                            start = tokens[startIndex].Start;
                            end = token.Start;
                            return true;
                        }
                    }
                }
            } else {
                for (var i = startIndex; i >= 0; i--) {
                    var token = tokens[i];

                    if (_tokenComparer.Compare(token.TokenType, endTokenType) == 0) {
                        stack.Push(token.TokenType);
                    } else if (_tokenComparer.Compare(token.TokenType, startTokenType) == 0) {
                        if (stack.Count > 0) {
                            stack.Pop();
                        }

                        if (stack.Count == 0) {
                            start = token.Start;
                            end = token.Start;

                            end = tokens[startIndex].Start;
                            return true;
                        }
                    }
                }
            }

            return false;
        }

        public bool GetMatchingBraceType(char ch, out BraceType braceType, out bool reversed) {
            braceType = BraceType.Unknown;
            reversed = false;

            switch (ch) {
                case '{':
                case '}':
                    braceType = BraceType.Curly;
                    reversed = ch == '}';
                    break;

                case '(':
                case ')':
                    braceType = BraceType.Parenthesis;
                    reversed = ch == ')';
                    break;

                case '[':
                case ']':
                    braceType = BraceType.Square;
                    reversed = ch == ']';
                    break;
            }

            if (braceType != BraceType.Unknown && !IsSupportedBraceType(braceType)) {
                braceType = BraceType.Unknown;
                reversed = false;
            }

            return braceType != BraceType.Unknown;
        }
    }
}


text:
using System.Configuration;

namespace DALBenchmark
{
	internal static class Initialize
	{
		public static void Postgres()
		{
			var cs = ConfigurationManager.AppSettings["PostgresConnectionString"];
			var dbScript = typeof(Initialize).Assembly.GetManifestResourceStream("DALBenchmark.Database.Postgres.sql");
			using (var conn = new Revenj.DatabasePersistence.Postgres.Npgsql.NpgsqlConnection(cs))
			{
				var com = Revenj.DatabasePersistence.Postgres.PostgresCommandFactory.NewCommand(dbScript);
				com.Connection = conn;
				conn.Open();
				com.ExecuteNonQuery();
				conn.Close();
			}
		}
	}
}


text:
from rest_framework import viewsets

from web_db.models import Album, Song

from web_endpoints.serializers import AlbumSerializer, SongSerializer

class AlbumViewSet(viewsets.ModelViewSet):
    queryset = Album.objects.all()
    serializer_class = AlbumSerializer

class SongViewSet(viewsets.ModelViewSet):
    queryset = Song.objects.all()
    serializer_class = SongSerializer


text:
#pragma once
#ifndef _OP_COMMON_HAS_MEMBER_DEF__H_
#define _OP_COMMON_HAS_MEMBER_DEF__H_

/**
    Define macro to create compile-time checker of specific method name in arbitrary class.
    For example you need check if some class has `size` method. To accomplish define somewhere
    checker `OP_DECLARE_CLASS_HAS_MEMBER(size)`. Later use:
    ~~~~~~~~~~~~~~~~~~~~~~
    has_size<std::string>::value //evaluates true since exists std::string::size()
    ~~~~~~~~~~~~~~~~~~~~~~
    Also this member provides additional predicate is_invocable<Ax...> that allows to check
    if specified member is invocable for checking class with probe arguments `Ax...`. In compare
    with std::is_invocable_v it doesn't fail when method is not exist. Examples:
    ~~~~~~~~~~~~~~~~~~~~~~
    has_size<std::string>::is_invocable() //`true` since exists std::string::size()
    has_size<std::string>::is_invocable<double>() //`false` since std::string::size() has no double arg
    has_some_method<std::string>::is_invocable() //`false` since no std::string::some_method() (in compare
                                                 //std::is_invocable_v that even cannot be compiled)
    ~~~~~~~~~~~~~~~~~~~~~~
*/
#define OP_DECLARE_CLASS_HAS_MEMBER(Member)  template <typename A>\
    class has_##Member \
    { \
        typedef char YesType[1]; \
        typedef char NoType[2]; \
        template <typename C> static YesType& test( decltype(&C::Member) ) ; \
        template <typename C> static NoType& test(...); \
    public: \
        enum { value = sizeof(test<A>(nullptr)) == sizeof(YesType) }; \
        template <class ... Ax> \
        static constexpr bool is_invocable() \
        { if constexpr (value) {return std::is_invocable_v<&A::Member, A&, Ax...>;} \
        else return false; \
        }\
    };

/**
    Define macro same as OP_DECLARE_CLASS_HAS_MEMBER but allows to check presence of template member.
    For example you need check if some class has defined `template <typename T> method`.
    Define is similary straigh `OP_DECLARE_CLASS_HAS_TEMPLATE_MEMBER(method)`. Later use:
    ~~~~~~~~~~~~~~~~~~~~~~
    has_method<MyClassWithMethod, int*>::value //evaluates true if defined MyClassWithMethod::method<int*>()
    ~~~~~~~~~~~~~~~~~~~~~~
*/
#define OP_DECLARE_CLASS_HAS_TEMPLATE_MEMBER(Member)  template <typename A, typename ...Ts>\
    class has_##Member \
    { \
        typedef char YesType[1]; \
        typedef char NoType[2]; \
        template <typename C> static YesType& test( decltype(&C::template Member<Ts ...>) ) ; \
        template <typename C> static NoType& test(...); \
    public: \
        enum { value = sizeof(test<A>(nullptr)) == sizeof(YesType) }; \
    };

/**
    Define macro to create compile-time checker of specific type definition in arbitrary class.
    For example you need check if some class has `iterator` definition. To accomplish define somewhere
    checker `OP_DECLARE_HAS_TYPEDEF(iterator)`. Later use:
    ~~~~~~~~~~~~~~~~~~~~~~
    has_typedef_iterator<std::vector<int>>::value //evaluates true since exists std::vector<int>::iterator
    ~~~~~~~~~~~~~~~~~~~~~~
*/
#define OP_DECLARE_HAS_TYPEDEF(type_name) template <class T> \
    class has_typedef_##type_name {\
        typedef char YesType[1]; \
        typedef char NoType[2]; \
        template <typename U> static YesType& test( typename U::type_name*  ) ; \
        template <typename U> static NoType& test(...); \
    public: \
            enum { value = sizeof(test<T>(nullptr)) == sizeof(YesType) }; \
        };

#define OP_CHECK_CLASS_HAS_MEMBER_TYPE(Class, Member) details::has_##Member<Class>

/** Complimentar to OP_DECLARE_CLASS_HAS_MEMBER - generate compile time const that indicate if class `A` has member `Member`*/
#define OP_CHECK_CLASS_HAS_MEMBER(Class, Member) (OP_CHECK_CLASS_HAS_MEMBER_TYPE(Class, Member)::value)

namespace OP::has_operators
{
    namespace details{

        template<class T, class = decltype(std::declval<T>() < std::declval<T>() )>
        std::true_type  has_less_than_test(const T&);
        std::false_type has_less_than_test(...);

        template<class T, class = decltype(std::declval<T>() <= std::declval<T>() )>
        std::true_type  has_less_eq_than_test(const T&);
        std::false_type has_less_eq_than_test(...);

        template<class T, class = decltype(std::declval<T>() > std::declval<T>() )>
        std::true_type  has_greater_than_test(const T&);
        std::false_type has_greater_than_test(...);

        template<class T, class = decltype(std::declval<T>() >= std::declval<T>() )>
        std::true_type  has_greater_eq_than_test(const T&);
        std::false_type has_greater_eq_than_test(...);

        template<class T, class = decltype( !std::declval<T>() )>
        std::true_type  has_logical_not_test(const T&);
        std::false_type has_logical_not_test(...);

        template<class T, class = decltype(std::declval<T>() == std::declval<T>() )>
        std::true_type  has_eq_test(const T&);
        std::false_type has_eq_test(...);

        template<class T, class = decltype(std::declval<T>() != std::declval<T>() )>
        std::true_type  has_not_eq_test(const T&);
        std::false_type has_not_eq_test(...);

        template<class T, class = decltype(std::declval<std::ostream&>() << std::declval<T>() )>
        std::true_type  has_ostream_out(const T&);
        std::false_type has_ostream_out(...);

    }//ns:details

    /** Compile time check if type T supports operator less `<` */
    template<class T> using less = decltype(details::has_less_than_test(std::declval<T>()));
    template<class T> inline constexpr bool less_v = less<T>::value;

    /** Compile time check if type T supports operator less-eq `<=` */
    template<class T> using less_eq = decltype(details::has_less_eq_than_test(std::declval<T>()));
    template<class T> inline constexpr bool less_eq_v = less_eq<T>::value;

    /** Compile time check if type T supports operator greater `>` */
    template<class T> using greater = decltype(details::has_greater_than_test(std::declval<T>()));
    template<class T> inline constexpr bool greater_v = greater<T>::value;

    /** Compile time check if type T supports operator greater-eq `>=` */
    template<class T> using greater_eq = decltype(details::has_greater_eq_than_test(std::declval<T>()));
    template<class T> inline constexpr bool greater_eq_v = greater_eq<T>::value;

    /** Compile time check if type T supports operator logical-not `!` */
    template<class T> using logical_not = decltype(details::has_logical_not_test(std::declval<T>()));
    template<class T> inline constexpr bool logical_not_v = logical_not<T>::value;

    /** Compile time check if type T supports operator equals `==` */
    template<class T> using equals = decltype(details::has_eq_test(std::declval<T>()));
    template<class T> inline constexpr bool equals_v = equals<T>::value;

    /** Compile time check if type T supports operator equals `!=` */
    template<class T> using not_equals = decltype(details::has_not_eq_test(std::declval<T>()));
    template<class T> inline constexpr bool not_equals_v = not_equals<T>::value;

    /** Compile time check if type T supports operator << for std::ostream */
    template<class T> using ostream_out = decltype(details::has_ostream_out(std::declval<T>()));
    template<class T> inline constexpr bool ostream_out_v = ostream_out<T>::value;
} //ns:OP::operators_check

#endif //_OP_COMMON_HAS_MEMBER_DEF__H_


text:
<?php namespace Bishopm\Connexion\Repositories;

use Bishopm\Connexion\Repositories\EloquentBaseRepository;

class IndividualsRepository extends EloquentBaseRepository
{
    public function dropdown()
    {
        return $this->model->orderBy('surname', 'ASC')->select('id', 'surname', 'firstname')->get();
    }

    public function findBySlug($slug)
    {
        return $this->model->with('sermons', 'blogs')->where('slug', $slug)->first();
    }

    public function staff()
    {
        return $this->model->where('memberstatus', 'staff')->orderBy('surname')->orderBy('firstname')->get();
    }

    public function employee($slug)
    {
        return $this->model->with('employee.leavedays')->where('slug', $slug)->first();
    }

    public function getName($id)
    {
        $indiv=$this->model->find($id);
        return $indiv->firstname . " " . $indiv->surname;
    }

    public function forEmail($email)
    {
        $hhh=$this->model->with('household')->where('email', $email)->select('household_id')->first();
        if ($hhh) {
            if ($hhh->household) {
                $household=$hhh->household_id;
                return $this->model->where('household_id', $household)->select('id', 'surname', 'firstname')->get();
            } else {
                return "No data";
            }
        } else {
            return "No data";
        }
    }

    public function givingnumbers()
    {
        $giving=$this->model->where('giving', '>', 0)->select('giving')->orderBy('giving')->get();
        $pg=array();
        foreach ($giving as $give) {
            $pg[]=$give->giving;
        }
        return $pg;
    }

    public function allchurchmembers()
    {
        return $this->model->has('household')->where('memberstatus', 'member')->whereNull('deleted_at')->select('id', 'surname', 'firstname', 'email', 'cellphone', 'household_id')->get();
    }

    public function everyone()
    {
        return $this->model->has('household')->where('memberstatus', '<>', 'child')->whereNull('deleted_at')->select('id', 'surname', 'firstname', 'email', 'cellphone', 'household_id')->get();
    }
}


text:
package mg.fishchicken.core.actions;

import com.badlogic.gdx.utils.GdxRuntimeException;
import com.badlogic.gdx.utils.XmlReader.Element;

import groovy.lang.Binding;
import mg.fishchicken.gamelogic.characters.GameCharacter;

/**
 * Adds the supplied amount to the HP of the supplied
 * player character.
 *

 * Example:
 *
 *

 * <addToHP amount="50" targetObject="__pcAtDialogue" />
 *

 * @author ANNUN
 *
 */
public class AddToHP extends Action {

	public static final String XML_AMOUNT = "amount";

	@Override
	protected void run(Object object, Binding parameters) {
		if (object instanceof GameCharacter) {
			((GameCharacter) object).stats().addToHP(Float.parseFloat(getParameter(XML_AMOUNT)));
		}
	}

	@Override
	public void validateAndLoadFromXML(Element conditionElement) {
		if (conditionElement.get(XML_AMOUNT, null) == null) {
			throw new GdxRuntimeException(XML_AMOUNT+" must be set for action AddToHP in element: \n\n"+conditionElement);
		}
	}

}


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Boost.Geometry (aka GGL, Generic Geometry Library)</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">

Main Page

Related Pages

Modules

Namespaces

Classes

Files

Examples

Class List

Class Index

Class Hierarchy

Class Members

boost

geometry

traits

indexed_access

boost::geometry::traits::indexed_access< Geometry, Index, Dimension > Struct Template Reference
traits: adapt geometries

Traits class defining "get" and "set" to get and set point coordinate values.
 More...

Detailed Description

template<typename Geometry, std::size_t Index, std::size_t Dimension>

struct boost::geometry::traits::indexed_access< Geometry, Index, Dimension >

Traits class defining "get" and "set" to get and set point coordinate values.

Template Parameters:

Geometry	geometry (box, segment)

Index	index (min_corner/max_corner for box, 0/1 for segment)

Dimension	dimension

Geometries:

box

segment

Specializations should provide:

static inline T get(G const&)

static inline void set(G&, T const&)

April 2, 2011

Copyright © 2007-2011 Barend Gehrels, Amsterdam, the Netherlands

Copyright © 2008-2011 Bruno Lalande, Paris, France

Copyright © 2009-2010 Mateusz Loskot, London, UK

<address style="text-align: right;">
Documentation is generated by Doxygen
</address>


text:
namespace cudacnn
{

//Trainer base class
template< template<class> class MAT, class T>
class Trainer
{
public:
	Trainer(CNNet<MAT, T>* cnnet):cnnet_(cnnet) {};
	//Train over all epochs, all iterations, all data
	//void Train() = 0;
	//Only apply 1 step of weights change
	virtual void Adapt(T tau) = 0;
	virtual ~Trainer() {};
protected:
	CNNet<MAT, T>* cnnet_;
};

//Stochastic Levenberg-Marquardt trainer
template< template<class> class MAT, class T>
class StochasticLMTrainer : public Trainer<MAT, T>
{
public:
	struct Settings
	{
		T mu;
		std::vector<T> theta;
		UINT epochs;
		Settings():mu(T(0.0001f)),epochs(10), theta(std::vector<T>(epochs,0.001f)){};
	};
	Settings settings;
	StochasticLMTrainer(CNNet<MAT, T>* cnnet):Trainer<MAT,T>(cnnet) {};
	//Train over all epochs, all iterations, all data
	void Train();
	//Only apply 1 step of weights change
	void Adapt(T tau);
	void ComputeGradient(const MAT<T>& error);
	void EstimateHessian(const std::vector< MAT<T> >& train_set);
};

template< template<class> class MAT, class T>
void StochasticLMTrainer<MAT,T>::ComputeGradient(const MAT<T>& error)
{
	this->cnnet_->BackpropGradients(error);
}

template< template<class> class MAT, class T>
void StochasticLMTrainer<MAT,T>::EstimateHessian(const std::vector<MAT<T> >& train_set)
{
	this->cnnet_->ResetHessian();
	typename std::vector<MAT<T> >::const_iterator  it;
	for(it = train_set.begin(); it!= train_set.end(); ++it){
		this->cnnet_->AccumulateHessian(*it);
	}
	this->cnnet_->AverageHessian();
}

template< template<class> class MAT, class T>
void StochasticLMTrainer<MAT,T>::Adapt(T tau)
{
	this->cnnet_->AdaptWeights(tau, true, settings.mu);
}

//Stochastic Gradient descent trainer
template< template<class> class MAT, class T>
class StochasticGDTrainer : public Trainer<MAT, T>
{
public:
	struct Settings
	{
		std::vector<T> theta;
		UINT epochs;
		Settings(): epochs(10), theta(std::vector<T>(epochs,0.001f)){};
	};
	Settings settings;
	StochasticGDTrainer(CNNet<MAT, T>* cnnet):Trainer<MAT,T>(cnnet) {};
	//Train over all epochs, all iterations, all data
	void Train();
	//Only apply 1 step of weights change
	void Adapt(T tau);
	void ComputeGradient(const MAT<T>& error);
	void EstimateHessian(const std::vector<MAT<T> >& train_set);
};

template< template<class> class MAT, class T>
void StochasticGDTrainer<MAT,T>::Adapt(T tau)
{
	this->cnnet_->AdaptWeights(tau, false, 0);
}

#endif //_TRAINER_H

}