text:
CREATE TABLE list (id VARCHAR(64) NOT NULL, value VARCHAR(64) NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;

INSERT INTO `list` (`id`, `value`) VALUES ('AM', 'Aamenia');
INSERT INTO `list` (`id`, `value`) VALUES ('IE', 'Aereland');
INSERT INTO `list` (`id`, `value`) VALUES ('IS', 'Aesland');
INSERT INTO `list` (`id`, `value`) VALUES ('AF', 'Afganistan');
INSERT INTO `list` (`id`, `value`) VALUES ('ZA', 'Afrika Anaafo');
INSERT INTO `list` (`id`, `value`) VALUES ('CF', 'Afrika Finimfin Man');
INSERT INTO `list` (`id`, `value`) VALUES ('AR', 'Agyɛntina');
INSERT INTO `list` (`id`, `value`) VALUES ('GB', 'Ahendiman Nkabom');
INSERT INTO `list` (`id`, `value`) VALUES ('AX', 'Åland Islands');
INSERT INTO `list` (`id`, `value`) VALUES ('AL', 'Albenia');
INSERT INTO `list` (`id`, `value`) VALUES ('US', 'Amɛrika');
INSERT INTO `list` (`id`, `value`) VALUES ('AS', 'Amɛrika Samoa');
INSERT INTO `list` (`id`, `value`) VALUES ('VI', 'Amɛrika Virgin Islands');
INSERT INTO `list` (`id`, `value`) VALUES ('KR', 'Anaafo Koria');
INSERT INTO `list` (`id`, `value`) VALUES ('AD', 'Andora');
INSERT INTO `list` (`id`, `value`) VALUES ('AO', 'Angola');
INSERT INTO `list` (`id`, `value`) VALUES ('AI', 'Anguila');
INSERT INTO `list` (`id`, `value`) VALUES ('AQ', 'Antarctica');
INSERT INTO `list` (`id`, `value`) VALUES ('AG', 'Antigua ne Baabuda');
INSERT INTO `list` (`id`, `value`) VALUES ('AW', 'Aruba');
INSERT INTO `list` (`id`, `value`) VALUES ('AZ', 'Azebaegyan');
INSERT INTO `list` (`id`, `value`) VALUES ('BB', 'Baabados');
INSERT INTO `list` (`id`, `value`) VALUES ('BS', 'Bahama');
INSERT INTO `list` (`id`, `value`) VALUES ('BD', 'Bangladɛhye');
INSERT INTO `list` (`id`, `value`) VALUES ('BH', 'Baren');
INSERT INTO `list` (`id`, `value`) VALUES ('BZ', 'Beliz');
INSERT INTO `list` (`id`, `value`) VALUES ('BY', 'Bɛlarus');
INSERT INTO `list` (`id`, `value`) VALUES ('BE', 'Bɛlgyium');
INSERT INTO `list` (`id`, `value`) VALUES ('BM', 'Bɛmuda');
INSERT INTO `list` (`id`, `value`) VALUES ('BJ', 'Bɛnin');
INSERT INTO `list` (`id`, `value`) VALUES ('BO', 'Bolivia');
INSERT INTO `list` (`id`, `value`) VALUES ('BA', 'Bosnia ne Hɛzegovina');
INSERT INTO `list` (`id`, `value`) VALUES ('BV', 'Bouvet Island');
INSERT INTO `list` (`id`, `value`) VALUES ('BF', 'Bɔkina Faso');
INSERT INTO `list` (`id`, `value`) VALUES ('BG', 'Bɔlgeria');
INSERT INTO `list` (`id`, `value`) VALUES ('BW', 'Bɔtswana');
INSERT INTO `list` (`id`, `value`) VALUES ('BR', 'Brazil');
INSERT INTO `list` (`id`, `value`) VALUES ('VG', 'Britainfo Virgin Islands');
INSERT INTO `list` (`id`, `value`) VALUES ('IO', 'Britenfo Hɔn Man Wɔ India Po No Mu');
INSERT INTO `list` (`id`, `value`) VALUES ('BN', 'Brunae');
INSERT INTO `list` (`id`, `value`) VALUES ('BI', 'Burundi');
INSERT INTO `list` (`id`, `value`) VALUES ('BT', 'Butan');
INSERT INTO `list` (`id`, `value`) VALUES ('BQ', 'Caribbean Netherlands');
INSERT INTO `list` (`id`, `value`) VALUES ('CX', 'Christmas Island');
INSERT INTO `list` (`id`, `value`) VALUES ('CC', 'Cocos (Keeling) Islands');
INSERT INTO `list` (`id`, `value`) VALUES ('CW', 'Curaçao');
INSERT INTO `list` (`id`, `value`) VALUES ('DK', 'Dɛnmak');
INSERT INTO `list` (`id`, `value`) VALUES ('DM', 'Dɔmeneka');
INSERT INTO `list` (`id`, `value`) VALUES ('DO', 'Dɔmeneka Kurokɛse');
INSERT INTO `list` (`id`, `value`) VALUES ('KP', 'Etifi Koria');
INSERT INTO `list` (`id`, `value`) VALUES ('SV', 'Ɛl Salvadɔ');
INSERT INTO `list` (`id`, `value`) VALUES ('ER', 'Ɛritrea');
INSERT INTO `list` (`id`, `value`) VALUES ('EE', 'Ɛstonia');
INSERT INTO `list` (`id`, `value`) VALUES ('FO', 'Faroe Islands');
INSERT INTO `list` (`id`, `value`) VALUES ('FJ', 'Figyi');
INSERT INTO `list` (`id`, `value`) VALUES ('FI', 'Finland');
INSERT INTO `list` (`id`, `value`) VALUES ('FK', 'Fɔlkman Aeland');
INSERT INTO `list` (`id`, `value`) VALUES ('TF', 'French Southern Territories');
INSERT INTO `list` (`id`, `value`) VALUES ('GF', 'Frɛnkye Gayana');
INSERT INTO `list` (`id`, `value`) VALUES ('PF', 'Frɛnkye Pɔlenehyia');
INSERT INTO `list` (`id`, `value`) VALUES ('FR', 'Frɛnkyeman');
INSERT INTO `list` (`id`, `value`) VALUES ('GH', 'Gaana');
INSERT INTO `list` (`id`, `value`) VALUES ('GA', 'Gabɔn');
INSERT INTO `list` (`id`, `value`) VALUES ('GM', 'Gambia');
INSERT INTO `list` (`id`, `value`) VALUES ('GY', 'Gayana');
INSERT INTO `list` (`id`, `value`) VALUES ('GN', 'Gini');
INSERT INTO `list` (`id`, `value`) VALUES ('GW', 'Gini Bisaw');
INSERT INTO `list` (`id`, `value`) VALUES ('GQ', 'Gini Ikuweta');
INSERT INTO `list` (`id`, `value`) VALUES ('GR', 'Greekman');
INSERT INTO `list` (`id`, `value`) VALUES ('GL', 'Greenman');
INSERT INTO `list` (`id`, `value`) VALUES ('GD', 'Grenada');
INSERT INTO `list` (`id`, `value`) VALUES ('GU', 'Guam');
INSERT INTO `list` (`id`, `value`) VALUES ('GG', 'Guernsey');
INSERT INTO `list` (`id`, `value`) VALUES ('GP', 'Guwadelup');
INSERT INTO `list` (`id`, `value`) VALUES ('GT', 'Guwatemala');
INSERT INTO `list` (`id`, `value`) VALUES ('DE', 'Gyaaman');
INSERT INTO `list` (`id`, `value`) VALUES ('JM', 'Gyameka');
INSERT INTO `list` (`id`, `value`) VALUES ('JP', 'Gyapan');
INSERT INTO `list` (`id`, `value`) VALUES ('GI', 'Gyebralta');
INSERT INTO `list` (`id`, `value`) VALUES ('DJ', 'Gyibuti');
INSERT INTO `list` (`id`, `value`) VALUES ('JO', 'Gyɔdan');
INSERT INTO `list` (`id`, `value`) VALUES ('GE', 'Gyɔgyea');
INSERT INTO `list` (`id`, `value`) VALUES ('HU', 'Hangari');
INSERT INTO `list` (`id`, `value`) VALUES ('HM', 'Heard & McDonald Islands');
INSERT INTO `list` (`id`, `value`) VALUES ('HT', 'Heiti');
INSERT INTO `list` (`id`, `value`) VALUES ('HK', 'Hong Kong SAR China');
INSERT INTO `list` (`id`, `value`) VALUES ('HN', 'Hɔnduras');
INSERT INTO `list` (`id`, `value`) VALUES ('EC', 'Ikuwadɔ');
INSERT INTO `list` (`id`, `value`) VALUES ('IN', 'India');
INSERT INTO `list` (`id`, `value`) VALUES ('ID', 'Indɔnehyia');
INSERT INTO `list` (`id`, `value`) VALUES ('IQ', 'Irak');
INSERT INTO `list` (`id`, `value`) VALUES ('IR', 'Iran');
INSERT INTO `list` (`id`, `value`) VALUES ('IM', 'Isle of Man');
INSERT INTO `list` (`id`, `value`) VALUES ('IL', 'Israel');
INSERT INTO `list` (`id`, `value`) VALUES ('IT', 'Itali');
INSERT INTO `list` (`id`, `value`) VALUES ('ET', 'Ithiopia');
INSERT INTO `list` (`id`, `value`) VALUES ('JE', 'Jersey');
INSERT INTO `list` (`id`, `value`) VALUES ('NC', 'Kaledonia Foforo');
INSERT INTO `list` (`id`, `value`) VALUES ('KH', 'Kambodia');
INSERT INTO `list` (`id`, `value`) VALUES ('CM', 'Kamɛrun');
INSERT INTO `list` (`id`, `value`) VALUES ('CA', 'Kanada');
INSERT INTO `list` (`id`, `value`) VALUES ('QA', 'Kata');
INSERT INTO `list` (`id`, `value`) VALUES ('KZ', 'Kazakstan');
INSERT INTO `list` (`id`, `value`) VALUES ('KY', 'Kemanfo Islands');
INSERT INTO `list` (`id`, `value`) VALUES ('CV', 'Kepvɛdfo Islands');
INSERT INTO `list` (`id`, `value`) VALUES ('KG', 'Kɛɛgestan');
INSERT INTO `list` (`id`, `value`) VALUES ('KE', 'Kɛnya');
INSERT INTO `list` (`id`, `value`) VALUES ('KI', 'Kiribati');
INSERT INTO `list` (`id`, `value`) VALUES ('CO', 'Kolombia');
INSERT INTO `list` (`id`, `value`) VALUES ('CG', 'Kongo');
INSERT INTO `list` (`id`, `value`) VALUES ('CD', 'Kongo (Zair)');
INSERT INTO `list` (`id`, `value`) VALUES ('CK', 'Kook Nsupɔw');
INSERT INTO `list` (`id`, `value`) VALUES ('KM', 'Kɔmɔrɔs');
INSERT INTO `list` (`id`, `value`) VALUES ('CR', 'Kɔsta Rika');
INSERT INTO `list` (`id`, `value`) VALUES ('HR', 'Krowehyia');
INSERT INTO `list` (`id`, `value`) VALUES ('CU', 'Kuba');
INSERT INTO `list` (`id`, `value`) VALUES ('KW', 'Kuwete');
INSERT INTO `list` (`id`, `value`) VALUES ('TD', 'Kyad');
INSERT INTO `list` (`id`, `value`) VALUES ('CN', 'Kyaena');
INSERT INTO `list` (`id`, `value`) VALUES ('CZ', 'Kyɛk Kurokɛse');
INSERT INTO `list` (`id`, `value`) VALUES ('CL', 'Kyili');
INSERT INTO `list` (`id`, `value`) VALUES ('CI', 'La Côte d'Ivoire');
INSERT INTO `list` (`id`, `value`) VALUES ('LR', 'Laeberia');
INSERT INTO `list` (`id`, `value`) VALUES ('LU', 'Laksembɛg');
INSERT INTO `list` (`id`, `value`) VALUES ('LA', 'Laos');
INSERT INTO `list` (`id`, `value`) VALUES ('LV', 'Latvia');
INSERT INTO `list` (`id`, `value`) VALUES ('LI', 'Lektenstaen');
INSERT INTO `list` (`id`, `value`) VALUES ('LB', 'Lɛbanɔn');
INSERT INTO `list` (`id`, `value`) VALUES ('LS', 'Lɛsutu');
INSERT INTO `list` (`id`, `value`) VALUES ('LY', 'Libya');
INSERT INTO `list` (`id`, `value`) VALUES ('LT', 'Lituwenia');
INSERT INTO `list` (`id`, `value`) VALUES ('MO', 'Macao SAR China');
INSERT INTO `list` (`id`, `value`) VALUES ('MG', 'Madagaska');
INSERT INTO `list` (`id`, `value`) VALUES ('FM', 'Maekronehyia');
INSERT INTO `list` (`id`, `value`) VALUES ('MW', 'Malawi');
INSERT INTO `list` (`id`, `value`) VALUES ('MV', 'Maldives');
INSERT INTO `list` (`id`, `value`) VALUES ('MY', 'Malehyia');
INSERT INTO `list` (`id`, `value`) VALUES ('ML', 'Mali');
INSERT INTO `list` (`id`, `value`) VALUES ('MS', 'Mantserat');
INSERT INTO `list` (`id`, `value`) VALUES ('MH', 'Marshall Islands');
INSERT INTO `list` (`id`, `value`) VALUES ('MQ', 'Matinik');
INSERT INTO `list` (`id`, `value`) VALUES ('YT', 'Mayɔte');
INSERT INTO `list` (`id`, `value`) VALUES ('MX', 'Mɛksiko');
INSERT INTO `list` (`id`, `value`) VALUES ('MM', 'Miyanma');
INSERT INTO `list` (`id`, `value`) VALUES ('ME', 'Montenegro');
INSERT INTO `list` (`id`, `value`) VALUES ('MA', 'Moroko');
INSERT INTO `list` (`id`, `value`) VALUES ('MZ', 'Mozambik');
INSERT INTO `list` (`id`, `value`) VALUES ('MD', 'Mɔldova');
INSERT INTO `list` (`id`, `value`) VALUES ('MT', 'Mɔlta');
INSERT INTO `list` (`id`, `value`) VALUES ('MC', 'Mɔnako');
INSERT INTO `list` (`id`, `value`) VALUES ('MN', 'Mɔngolia');
INSERT INTO `list` (`id`, `value`) VALUES ('MU', 'Mɔrehyeɔs');
INSERT INTO `list` (`id`, `value`) VALUES ('MR', 'Mɔretenia');
INSERT INTO `list` (`id`, `value`) VALUES ('NG', 'Naegyeria');
INSERT INTO `list` (`id`, `value`) VALUES ('NA', 'Namibia');
INSERT INTO `list` (`id`, `value`) VALUES ('NR', 'Naworu');
INSERT INTO `list` (`id`, `value`) VALUES ('NI', 'Nekaraguwa');
INSERT INTO `list` (`id`, `value`) VALUES ('NL', 'Nɛdɛland');
INSERT INTO `list` (`id`, `value`) VALUES ('NP', 'Nɛpɔl');
INSERT INTO `list` (`id`, `value`) VALUES ('NE', 'Nigyɛ');
INSERT INTO `list` (`id`, `value`) VALUES ('EG', 'Nisrim');
INSERT INTO `list` (`id`, `value`) VALUES ('NU', 'Niyu');
INSERT INTO `list` (`id`, `value`) VALUES ('MK', 'North Macedonia');
INSERT INTO `list` (`id`, `value`) VALUES ('MP', 'Northern Mariana Islands');
INSERT INTO `list` (`id`, `value`) VALUES ('NF', 'Nɔfolk Aeland');
INSERT INTO `list` (`id`, `value`) VALUES ('NO', 'Nɔɔwe');
INSERT INTO `list` (`id`, `value`) VALUES ('OM', 'Oman');
INSERT INTO `list` (`id`, `value`) VALUES ('DZ', 'Ɔlgyeria');
INSERT INTO `list` (`id`, `value`) VALUES ('AU', 'Ɔstrelia');
INSERT INTO `list` (`id`, `value`) VALUES ('AT', 'Ɔstria');
INSERT INTO `list` (`id`, `value`) VALUES ('PK', 'Pakistan');
INSERT INTO `list` (`id`, `value`) VALUES ('PW', 'Palau');
INSERT INTO `list` (`id`, `value`) VALUES ('PS', 'Palestaen West Bank ne Gaza');
INSERT INTO `list` (`id`, `value`) VALUES ('PA', 'Panama');
INSERT INTO `list` (`id`, `value`) VALUES ('PG', 'Papua Guinea Foforo');
INSERT INTO `list` (`id`, `value`) VALUES ('PY', 'Paraguay');
INSERT INTO `list` (`id`, `value`) VALUES ('PE', 'Peru');
INSERT INTO `list` (`id`, `value`) VALUES ('PH', 'Philippines');
INSERT INTO `list` (`id`, `value`) VALUES ('PN', 'Pitcairn');
INSERT INTO `list` (`id`, `value`) VALUES ('PL', 'Poland');
INSERT INTO `list` (`id`, `value`) VALUES ('PT', 'Pɔtugal');
INSERT INTO `list` (`id`, `value`) VALUES ('PR', 'Puɛto Riko');
INSERT INTO `list` (`id`, `value`) VALUES ('RE', 'Reyuniɔn');
INSERT INTO `list` (`id`, `value`) VALUES ('RO', 'Romenia');
INSERT INTO `list` (`id`, `value`) VALUES ('RU', 'Rɔhyea');
INSERT INTO `list` (`id`, `value`) VALUES ('RW', 'Rwanda');
INSERT INTO `list` (`id`, `value`) VALUES ('CY', 'Saeprɔs');
INSERT INTO `list` (`id`, `value`) VALUES ('SH', 'Saint Helena');
INSERT INTO `list` (`id`, `value`) VALUES ('KN', 'Saint Kitts ne Nɛves');
INSERT INTO `list` (`id`, `value`) VALUES ('LC', 'Saint Lucia');
INSERT INTO `list` (`id`, `value`) VALUES ('PM', 'Saint Pierre ne Miquelon');
INSERT INTO `list` (`id`, `value`) VALUES ('VC', 'Saint Vincent ne Grenadines');
INSERT INTO `list` (`id`, `value`) VALUES ('WS', 'Samoa');
INSERT INTO `list` (`id`, `value`) VALUES ('SM', 'San Marino');
INSERT INTO `list` (`id`, `value`) VALUES ('ST', 'São Tomé and Príncipe');
INSERT INTO `list` (`id`, `value`) VALUES ('SA', 'Saudi Arabia');
INSERT INTO `list` (`id`, `value`) VALUES ('SN', 'Senegal');
INSERT INTO `list` (`id`, `value`) VALUES ('RS', 'Serbia');
INSERT INTO `list` (`id`, `value`) VALUES ('SC', 'Seyhyɛl');
INSERT INTO `list` (`id`, `value`) VALUES ('SL', 'Sierra Leone');
INSERT INTO `list` (`id`, `value`) VALUES ('SG', 'Singapɔ');
INSERT INTO `list` (`id`, `value`) VALUES ('SX', 'Sint Maarten');
INSERT INTO `list` (`id`, `value`) VALUES ('SY', 'Siria');
INSERT INTO `list` (`id`, `value`) VALUES ('SK', 'Slovakia');
INSERT INTO `list` (`id`, `value`) VALUES ('SI', 'Slovinia');
INSERT INTO `list` (`id`, `value`) VALUES ('SB', 'Solomon Islands');
INSERT INTO `list` (`id`, `value`) VALUES ('SO', 'Somalia');
INSERT INTO `list` (`id`, `value`) VALUES ('GS', 'South Georgia & South Sandwich Islands');
INSERT INTO `list` (`id`, `value`) VALUES ('SS', 'South Sudan');
INSERT INTO `list` (`id`, `value`) VALUES ('ES', 'Spain');
INSERT INTO `list` (`id`, `value`) VALUES ('LK', 'Sri Lanka');
INSERT INTO `list` (`id`, `value`) VALUES ('BL', 'St. Barthélemy');
INSERT INTO `list` (`id`, `value`) VALUES ('MF', 'St. Martin');
INSERT INTO `list` (`id`, `value`) VALUES ('SD', 'Sudan');
INSERT INTO `list` (`id`, `value`) VALUES ('SR', 'Suriname');
INSERT INTO `list` (`id`, `value`) VALUES ('SJ', 'Svalbard & Jan Mayen');
INSERT INTO `list` (`id`, `value`) VALUES ('SZ', 'Swaziland');
INSERT INTO `list` (`id`, `value`) VALUES ('SE', 'Sweden');
INSERT INTO `list` (`id`, `value`) VALUES ('CH', 'Swetzaland');
INSERT INTO `list` (`id`, `value`) VALUES ('TH', 'Taeland');
INSERT INTO `list` (`id`, `value`) VALUES ('TW', 'Taiwan');
INSERT INTO `list` (`id`, `value`) VALUES ('TJ', 'Tajikistan');
INSERT INTO `list` (`id`, `value`) VALUES ('TZ', 'Tanzania');
INSERT INTO `list` (`id`, `value`) VALUES ('TR', 'Tɛɛki');
INSERT INTO `list` (`id`, `value`) VALUES ('TM', 'Tɛkmɛnistan');
INSERT INTO `list` (`id`, `value`) VALUES ('TL', 'Timɔ Boka');
INSERT INTO `list` (`id`, `value`) VALUES ('TG', 'Togo');
INSERT INTO `list` (`id`, `value`) VALUES ('TK', 'Tokelau');
INSERT INTO `list` (`id`, `value`) VALUES ('TO', 'Tonga');
INSERT INTO `list` (`id`, `value`) VALUES ('TT', 'Trinidad ne Tobago');
INSERT INTO `list` (`id`, `value`) VALUES ('TN', 'Tunihyia');
INSERT INTO `list` (`id`, `value`) VALUES ('TC', 'Turks ne Caicos Islands');
INSERT INTO `list` (`id`, `value`) VALUES ('TV', 'Tuvalu');
INSERT INTO `list` (`id`, `value`) VALUES ('UM', 'U.S. Outlying Islands');
INSERT INTO `list` (`id`, `value`) VALUES ('UG', 'Uganda');
INSERT INTO `list` (`id`, `value`) VALUES ('UA', 'Ukren');
INSERT INTO `list` (`id`, `value`) VALUES ('AE', 'United Arab Emirates');
INSERT INTO `list` (`id`, `value`) VALUES ('UZ', 'Uzbɛkistan');
INSERT INTO `list` (`id`, `value`) VALUES ('VU', 'Vanuatu');
INSERT INTO `list` (`id`, `value`) VALUES ('VA', 'Vatican Man');
INSERT INTO `list` (`id`, `value`) VALUES ('VE', 'Venezuela');
INSERT INTO `list` (`id`, `value`) VALUES ('VN', 'Viɛtnam');
INSERT INTO `list` (`id`, `value`) VALUES ('WF', 'Wallis ne Futuna');
INSERT INTO `list` (`id`, `value`) VALUES ('EH', 'Western Sahara');
INSERT INTO `list` (`id`, `value`) VALUES ('YE', 'Yɛmen');
INSERT INTO `list` (`id`, `value`) VALUES ('UY', 'Yurugwae');
INSERT INTO `list` (`id`, `value`) VALUES ('ZM', 'Zambia');
INSERT INTO `list` (`id`, `value`) VALUES ('ZW', 'Zembabwe');
INSERT INTO `list` (`id`, `value`) VALUES ('NZ', 'Ziland Foforo');


text:
namespace libzerocoin {

class ParallelTasks {
private:
    vector<boost::future<void>> tasks;

public:
    ParallelTasks(int n=0);

    // add new task
    void Add(std::function<void()> task);

    // wait for everything added so far
    void Wait();

    // clear all the tasks from the waiting list
    void Reset();

    // helper class to put thread interruption on pause
    class DoNotDisturb {
    private:
        boost::this_thread::disable_interruption dnd;
    public:
        DoNotDisturb() {}
    };
};

}

#endif // PARALLELTASKS_H

redpajama_set_name: RedPajamaGithub


text:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
	android:id="@+id/contentCg"
	xmlns:android="http://schemas.android.com/apk/res/android"
	xmlns:app="http://schemas.android.com/apk/res-auto"
	android:layout_width="match_parent"
	android:layout_height="match_parent"
	android:paddingBottom="@dimen/activity_vertical_margin"
	android:paddingLeft="@dimen/activity_horizontal_margin"
	android:paddingRight="@dimen/activity_horizontal_margin"
	android:paddingTop="@dimen/activity_vertical_margin"
	app:layout_behavior="@string/appbar_scrolling_view_behavior">

	<Switch
		android:id="@+id/oneSetForAllGears"
		android:layout_width="wrap_content"
		android:layout_height="wrap_content"
		android:layout_gravity="center_vertical"
		android:layout_margin="6dp"
		android:showText="true"
		android:textOff="Multiple sets"
		android:textOn="One set for all"
		android:textStyle="bold|italic"
		android:thumb="@drawable/switch_custom_selector"
		android:track="@drawable/switch_custom_track"/>

	<LinearLayout
		android:id="@+id/oneSetLayout"
		android:layout_width="match_parent"
		android:layout_height="wrap_content"
		android:layout_below="@id/oneSetForAllGears">

		<Button
			android:id="@+id/z0Set"
			android:layout_width="wrap_content"
			android:layout_height="wrap_content"
			android:layout_margin="6dp"
			android:text="Gears"/>

		<EditText
			android:id="@+id/z0Gears"
			android:layout_width="0dp"
			android:layout_height="wrap_content"
			android:layout_gravity="center_vertical"
			android:layout_weight="1"
			android:inputType="number|text"
			android:maxEms="16"
			android:minEms="6"
			android:textAppearance="?android:attr/textAppearanceSmall"/>

	</LinearLayout>

	<HorizontalScrollView
		android:id="@+id/gearsetScroll"
		android:layout_width="match_parent"
		android:layout_height="wrap_content"
		android:layout_below="@id/oneSetLayout">

		<GridLayout
			android:id="@+id/gearsetGrid"
			android:layout_width="wrap_content"
			android:layout_height="wrap_content"
			android:columnCount="4"
			android:rowCount="3">

			<LinearLayout
				android:id="@+id/z1Layout"
				android:layout_width="wrap_content"
				android:layout_height="wrap_content"
				android:layout_column="0"
				android:layout_row="0"
				android:orientation="horizontal"
				android:padding="6dp">

				<Button
					android:id="@+id/z1Set"
					android:layout_width="46dp"
					android:layout_height="wrap_content"
					android:layout_weight="1"
					android:text="Z1"
					android:textColor="@android:color/holo_red_dark"/>

				<CheckBox
					android:id="@+id/z1Select"
					android:layout_width="wrap_content"
					android:layout_height="match_parent"
					android:checked="true"
					android:enabled="false"
					android:visibility="gone"/>

				<EditText
					android:id="@+id/z1Gears"
					android:layout_width="wrap_content"
					android:layout_height="wrap_content"
					android:layout_gravity="center_vertical"
					android:inputType="number|text"
					android:maxEms="8"
					android:minEms="3"
					android:textAppearance="?android:attr/textAppearanceSmall"/>

			</LinearLayout>

			<LinearLayout
				android:id="@+id/z2Layout"
				android:layout_width="wrap_content"
				android:layout_height="wrap_content"
				android:layout_column="1"
				android:layout_row="0"
				android:orientation="horizontal"
				android:padding="6dp">

				<Button
					android:id="@+id/z2Set"
					android:layout_width="46dp"
					android:layout_height="wrap_content"
					android:layout_weight="1"
					android:text="Z2"
					android:textColor="@android:color/holo_blue_dark"/>

				<CheckBox
					android:id="@+id/z2Select"
					android:layout_width="wrap_content"
					android:layout_height="match_parent"
					android:checked="true"
					android:enabled="false"
					android:visibility="gone"/>

				<EditText
					android:id="@+id/z2Gears"
					android:layout_width="wrap_content"
					android:layout_height="wrap_content"
					android:layout_gravity="center_vertical"
					android:inputType="number|text"
					android:maxEms="8"
					android:minEms="3"
					android:textAppearance="?android:attr/textAppearanceSmall"/>

			</LinearLayout>

			<LinearLayout
				android:id="@+id/z3Layout"
				android:layout_width="wrap_content"
				android:layout_height="wrap_content"
				android:layout_column="1"
				android:layout_row="1"
				android:orientation="horizontal"
				android:padding="6dp">

				<Button
					android:id="@+id/z3Set"
					android:layout_width="46dp"
					android:layout_height="wrap_content"
					android:layout_weight="1"
					android:text="Z3"
					android:textColor="@android:color/holo_blue_dark"/>

				<CheckBox
					android:id="@+id/z3Select"
					android:layout_width="wrap_content"
					android:layout_height="match_parent"
					android:visibility="gone"/>

				<EditText
					android:id="@+id/z3Gears"
					android:layout_width="wrap_content"
					android:layout_height="wrap_content"
					android:layout_gravity="center_vertical"
					android:inputType="number|text"
					android:maxEms="8"
					android:minEms="3"
					android:textAppearance="?android:attr/textAppearanceSmall"/>

			</LinearLayout>

			<LinearLayout
				android:id="@+id/z4Layout"
				android:layout_width="wrap_content"
				android:layout_height="wrap_content"
				android:layout_column="2"
				android:layout_row="1"
				android:orientation="horizontal"
				android:padding="6dp">

				<Button
					android:id="@+id/z4Set"
					android:layout_width="46dp"
					android:layout_height="wrap_content"
					android:layout_weight="1"
					android:text="Z4"
					android:textColor="@android:color/holo_green_dark"/>

				<CheckBox
					android:id="@+id/z4Select"
					android:layout_width="wrap_content"
					android:layout_height="match_parent"
					android:visibility="gone"/>

				<EditText
					android:id="@+id/z4Gears"
					android:layout_width="wrap_content"
					android:layout_height="wrap_content"
					android:layout_gravity="center_vertical"
					android:inputType="number|text"
					android:maxEms="8"
					android:minEms="3"
					android:textAppearance="?android:attr/textAppearanceSmall"/>

			</LinearLayout>

			<LinearLayout
				android:id="@+id/z5Layout"
				android:layout_width="wrap_content"
				android:layout_height="wrap_content"
				android:layout_column="2"
				android:layout_row="2"
				android:orientation="horizontal"
				android:padding="6dp">

				<Button
					android:id="@+id/z5Set"
					android:layout_width="46dp"
					android:layout_height="wrap_content"
					android:layout_weight="1"
					android:text="Z5"
					android:textColor="@android:color/holo_green_dark"/>

				<CheckBox
					android:id="@+id/z5Select"
					android:layout_width="wrap_content"
					android:layout_height="match_parent"
					android:visibility="gone"/>

				<EditText
					android:id="@+id/z5Gears"
					android:layout_width="wrap_content"
					android:layout_height="wrap_content"
					android:layout_gravity="center_vertical"
					android:inputType="number|text"
					android:maxEms="8"
					android:minEms="3"
					android:textAppearance="?android:attr/textAppearanceSmall"/>

			</LinearLayout>

			<LinearLayout
				android:id="@+id/z6Layout"
				android:layout_width="wrap_content"
				android:layout_height="wrap_content"
				android:layout_column="3"
				android:layout_row="2"
				android:orientation="horizontal"
				android:padding="6dp">

				<Button
					android:id="@+id/z6Set"
					android:layout_width="46dp"
					android:layout_height="wrap_content"
					android:layout_weight="1"
					android:text="Z6"
					android:textColor="@android:color/holo_orange_dark"/>

				<CheckBox
					android:id="@+id/z6Select"
					android:layout_width="wrap_content"
					android:layout_height="match_parent"
					android:visibility="gone"/>

				<EditText
					android:id="@+id/z6Gears"
					android:layout_width="wrap_content"
					android:layout_height="wrap_content"
					android:layout_gravity="center_vertical"
					android:inputType="number|text"
					android:maxEms="8"
					android:minEms="3"
					android:textAppearance="?android:attr/textAppearanceSmall"/>

			</LinearLayout>

		</GridLayout>

	</HorizontalScrollView>

	<LinearLayout
		android:id="@+id/calcModeLayout"
		android:layout_width="match_parent"
		android:layout_height="wrap_content"
		android:layout_below="@id/gearsetScroll"
		android:orientation="vertical">

		<TextView
			android:layout_width="match_parent"
			android:layout_height="wrap_content"
			android:layout_margin="6dp"
			android:padding="2dp"
			android:text="Calculation mode"
			android:textColor="@android:color/holo_green_dark"
			android:textStyle="bold|italic"/>

		<Spinner
			android:id="@+id/calcTypeSpinner"
			android:layout_width="wrap_content"
			android:layout_height="wrap_content"
			android:layout_gravity="center_vertical"/>

		<LinearLayout
			android:id="@+id/threadPitchLayout"
			android:layout_width="match_parent"
			android:layout_height="wrap_content"
			android:orientation="horizontal">

			<TextView
				android:id="@+id/threadPitchText"
				android:layout_width="wrap_content"
				android:layout_height="wrap_content"
				android:layout_gravity="center_vertical"
				android:layout_margin="6dp"
				android:text="Thread Pitch"/>

			<EditText
				android:id="@+id/threadPitchValue"
				android:layout_width="wrap_content"
				android:layout_height="wrap_content"
				android:layout_gravity="center_vertical"
				android:layout_margin="6dp"
				android:ems="3"
				android:inputType="numberDecimal"/>

			<Spinner
				android:id="@+id/threadUnitSpinner"
				android:layout_width="wrap_content"
				android:layout_height="wrap_content"
				android:layout_gravity="center_vertical"
				android:layout_margin="6dp"/>

		</LinearLayout>

		<LinearLayout
			android:id="@+id/screwPitchLayout"
			android:layout_width="match_parent"
			android:layout_height="wrap_content"
			android:orientation="horizontal">

			<TextView
				android:id="@+id/leadscrewPitchText"
				android:layout_width="wrap_content"
				android:layout_height="wrap_content"
				android:layout_gravity="center_vertical"
				android:layout_margin="6dp"
				android:text="Leadscrew Pitch"/>

			<EditText
				android:id="@+id/screwPitchValue"
				android:layout_width="wrap_content"
				android:layout_height="wrap_content"
				android:layout_gravity="center_vertical"
				android:layout_margin="6dp"
				android:ems="3"
				android:inputType="numberDecimal"/>

			<Spinner
				android:id="@+id/screwUnitSpinner"
				android:layout_width="wrap_content"
				android:layout_height="wrap_content"
				android:layout_gravity="center_vertical"
				android:layout_margin="6dp"/>

		</LinearLayout>

		<LinearLayout
			android:id="@+id/gearRatioLayout"
			android:layout_width="match_parent"
			android:layout_height="wrap_content"
			android:orientation="vertical">

			<LinearLayout
				android:layout_width="match_parent"
				android:layout_height="wrap_content"
				android:orientation="horizontal">

				<TextView
					android:id="@+id/gearRatioText"
					android:layout_width="wrap_content"
					android:layout_height="wrap_content"
					android:layout_gravity="center_vertical"
					android:layout_margin="6dp"
					android:text="Ratio"/>

				<Switch
					android:id="@+id/ratioAsFractionSwitch"
					android:layout_width="wrap_content"
					android:layout_height="wrap_content"
					android:layout_gravity="center_vertical"
					android:layout_margin="6dp"
					android:showText="true"
					android:textOff="x.y"
					android:textOn="x/y"
					android:thumb="@drawable/switch_custom_selector"
					android:track="@drawable/switch_custom_track"/>

				<EditText
					android:id="@+id/gearRatioValue"
					android:layout_width="wrap_content"
					android:layout_height="wrap_content"
					android:layout_gravity="center_vertical"
					android:layout_margin="6dp"
					android:ems="3"
					android:inputType="numberDecimal"/>

				<LinearLayout
					android:id="@+id/gearRatioFractionLayout"
					android:layout_width="wrap_content"
					android:layout_height="wrap_content"
					android:orientation="horizontal">

					<EditText
						android:id="@+id/gearRatioNumerator"
						android:layout_width="wrap_content"
						android:layout_height="wrap_content"
						android:layout_gravity="center_vertical"
						android:layout_margin="6dp"
						android:ems="3"
						android:inputType="numberDecimal"/>

					<TextView
						android:id="@+id/solidusText"
						android:layout_width="wrap_content"
						android:layout_height="wrap_content"
						android:layout_gravity="center_vertical"
						android:layout_margin="4dp"
						android:text="/"
						android:textAppearance="?android:attr/textAppearanceLarge"/>

					<EditText
						android:id="@+id/gearRatioDenominator"
						android:layout_width="wrap_content"
						android:layout_height="wrap_content"
						android:layout_gravity="center_vertical"
						android:layout_margin="6dp"
						android:ems="3"
						android:inputType="numberDecimal"/>

				</LinearLayout>

			</LinearLayout>

		</LinearLayout>

		<TextView
			android:id="@+id/ratioResultText"
			android:layout_width="wrap_content"
			android:layout_height="wrap_content"
			android:layout_gravity="center_vertical"
			android:layout_margin="6dp"
			android:text="R = 0.0"
			android:textAppearance="?android:attr/textAppearanceLarge"/>

	</LinearLayout>

	<LinearLayout
		android:id="@+id/progressLayout"
		android:layout_width="match_parent"
		android:layout_height="wrap_content"
		android:layout_below="@id/calcModeLayout"
		android:orientation="horizontal">

		<ImageButton
			android:id="@+id/showPrev"
			android:layout_width="wrap_content"
			android:layout_height="wrap_content"
			android:layout_gravity="center_vertical"
			android:layout_margin="6dp"
			android:src="@drawable/ic_arrow_back_white_24dp"/>

		<TextView
			android:id="@+id/resultFirstNumberText"
			android:layout_width="wrap_content"
			android:layout_height="wrap_content"
			android:layout_gravity="center_vertical"
			android:layout_margin="6dp"
			android:gravity="center"
			android:text="1"/>

		<TextView
			android:layout_width="wrap_content"
			android:layout_height="wrap_content"
			android:layout_gravity="center_vertical"
			android:layout_margin="6dp"
			android:gravity="center"
			android:text="-"/>

		<TextView
			android:id="@+id/resultLastNumberText"
			android:layout_width="wrap_content"
			android:layout_height="wrap_content"
			android:layout_gravity="center_vertical"
			android:layout_margin="6dp"
			android:gravity="center"
			android:text="100"/>

		<ImageButton
			android:id="@+id/showNext"
			android:layout_width="wrap_content"
			android:layout_height="wrap_content"
			android:layout_gravity="center_vertical"
			android:layout_margin="6dp"
			android:src="@drawable/ic_arrow_forward_white_24dp"/>

	</LinearLayout>

	<ScrollView
		android:id="@+id/resultsScroll"
		android:layout_width="match_parent"
		android:layout_height="wrap_content"
		android:layout_below="@id/progressLayout">

		<LinearLayout
			android:id="@+id/resultsLayout"
			android:layout_width="match_parent"
			android:layout_height="wrap_content"
			android:orientation="vertical"/>

	</ScrollView>

</RelativeLayout>


text:
package main

import (
	"fmt"
	"os"
	"text/tabwriter"
	"time"

	"github.com/containerd/containerd/content"
	"github.com/containerd/containerd/log"
	units "github.com/docker/go-units"
	"github.com/urfave/cli"
)

var listCommand = cli.Command{
	Name:        "list",
	Aliases:     []string{"ls"},
	Usage:       "list all blobs in the store.",
	ArgsUsage:   "[flags] [<prefix>, ...]",
	Description: `List blobs in the content store.`,
	Flags: []cli.Flag{
		cli.BoolFlag{
			Name:  "quiet, q",
			Usage: "print only the blob digest",
		},
	},
	Action: func(context *cli.Context) error {
		var (
			quiet = context.Bool("quiet")
			args  = []string(context.Args())
		)
		ctx, cancel := appContext()
		defer cancel()

		cs, err := resolveContentStore(context)
		if err != nil {
			return err
		}

		if len(args) > 0 {
			// TODO(stevvooe): Implement selection of a few blobs. Not sure
			// what kind of efficiency gains we can actually get here.
			log.G(ctx).Warnf("args ignored; need to implement matchers")
		}

		var walkFn content.WalkFunc
		if quiet {
			walkFn = func(info content.Info) error {
				fmt.Println(info.Digest)
				return nil
			}
		} else {
			tw := tabwriter.NewWriter(os.Stdout, 1, 8, 1, '\t', 0)
			defer tw.Flush()

			fmt.Fprintln(tw, "DIGEST\tSIZE\tAGE")
			walkFn = func(info content.Info) error {
				fmt.Fprintf(tw, "%s\t%s\t%s\n",
					info.Digest,
					units.HumanSize(float64(info.Size)),
					units.HumanDuration(time.Since(info.CommittedAt)))
				return nil
			}

		}

		return cs.Walk(ctx, walkFn)
	},
}


text:
package wfdb;

public class example5 {

  public static void main(final String argv[]) {
    int i, nsig;

    if (argv.length < 1) {
      System.out.println("usage: example5 record");
      // Unlike C programs, Java programs do not have any foolproof way
      // to discover their own names, so the name is given as a constant
      // above. The usage statement is correct if this file has been
      // compiled. The command needed to run this program within a JVM
      // is platform-dependent and likely to be more complex.
      System.exit(1);
    }
    nsig = wfdb.isigopen(argv[0], null, 0);
    if (nsig < 1)
      System.exit(2);
    final WFDB_SiginfoArray s = new WFDB_SiginfoArray(nsig);

    if (wfdb.isigopen(argv[0], s.cast(), nsig) != nsig)
      System.exit(2);
    System.out.println("Record " + argv[0]);
    System.out.println("Starting time: " + wfdb.timstr(0));
    System.out.println("Sampling frequency: " + wfdb.sampfreq(argv[0]) + " Hz");
    System.out.println(nsig + " signals");
    for (i = 0; i < nsig; i++) {
      final WFDB_Siginfo s_i_ = s.getitem(i);
      System.out.println("Group " + s_i_.getGroup() + ", Signal " + i + ":");
      System.out.println(" File: " + s_i_.getFname());
      System.out.println(" Description: " + s_i_.getDesc());
      System.out.print(" Gain: ");
      if (s_i_.getGain() == 0.)
        System.out.print("uncalibrated; assume " + wfdbConstants.WFDB_DEFGAIN);
      else
        System.out.print(s_i_.getGain());
      System.out.println(" adu/"
          + (s_i_.getUnits() != null ? s_i_.getUnits() : "mV"));
      System.out.println(" Initial value: " + s_i_.getInitval());
      System.out.println(" Storage format: " + s_i_.getFmt());
      System.out.print(" I/O: ");
      if (s_i_.getBsize() == 0)
        System.out.println("can be unbuffered");
      else
        System.out.println(s_i_.getBsize() + "-byte blocks");
      System.out.println(" ADC resolution: " + s_i_.getAdcres() + " bits");
      System.out.println(" ADC zero: " + s_i_.getAdczero());
      if (s_i_.getNsamp() > 0) {
        System.out.println(" Length: " + wfdb.timstr(s_i_.getNsamp()) + " ("
            + s_i_.getNsamp() + " sample intervals)");
        System.out.println(" Checksum: " + s_i_.getCksum());
      } else
        System.out.println(" Length undefined");
    }
    wfdb.wfdbquit();
  }
}


text:
import useTheme from '../useTheme';
import propsToClassKey from '../propsToClassKey';

const useThemeVariants = (props, name) => {
  const { classes = {} } = props;
  const theme = useTheme();

  let variantsClasses = '';
  if (theme && theme.components && theme.components[name] && theme.components[name].variants) {
    const themeVariants = theme.components[name].variants;

    themeVariants.forEach((themeVariant) => {
      let isMatch = true;
      Object.keys(themeVariant.props).forEach((key) => {
        if (props[key] !== themeVariant.props[key]) {
          isMatch = false;
        }
      });
      if (isMatch) {
        variantsClasses = `${variantsClasses}${classes[propsToClassKey(themeVariant.props)]} `;
      }
    });
  }

  return variantsClasses;
};

export default useThemeVariants;


text:
package gr.ntua.cslab.celar.server.beans;

import java.sql.Timestamp;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;

/**
 * This is a wrapper for java.sql.Timestamp containing a default contructor
 * @author cmantas
 */
@XmlAccessorType(XmlAccessType.PROPERTY)
public class MyTimestamp extends Timestamp{

    public MyTimestamp(){
        super(0);
    }

    public MyTimestamp(Long nanos){
        super(nanos);
    }

    public long getLongTime(){
        return super.getTime();
    }

    public void setLongTime(long time){
        super.setTime(time);
    }
}


text:
extern zend_class_entry *phalcon_text_ce;

ZEPHIR_INIT_CLASS(Phalcon_Text);

PHP_METHOD(Phalcon_Text, camelize);
PHP_METHOD(Phalcon_Text, uncamelize);
PHP_METHOD(Phalcon_Text, increment);
PHP_METHOD(Phalcon_Text, random);
PHP_METHOD(Phalcon_Text, startsWith);
PHP_METHOD(Phalcon_Text, endsWith);
PHP_METHOD(Phalcon_Text, lower);
PHP_METHOD(Phalcon_Text, upper);
PHP_METHOD(Phalcon_Text, reduceSlashes);
PHP_METHOD(Phalcon_Text, concat);

ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_text_camelize, 0, 0, 1)
	ZEND_ARG_INFO(0, str)
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_text_uncamelize, 0, 0, 1)
	ZEND_ARG_INFO(0, str)
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_text_increment, 0, 0, 1)
	ZEND_ARG_INFO(0, str)
	ZEND_ARG_INFO(0, separator)
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_text_random, 0, 0, 0)
	ZEND_ARG_INFO(0, type)
	ZEND_ARG_INFO(0, length)
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_text_startswith, 0, 0, 2)
	ZEND_ARG_INFO(0, str)
	ZEND_ARG_INFO(0, start)
	ZEND_ARG_INFO(0, ignoreCase)
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_text_endswith, 0, 0, 2)
	ZEND_ARG_INFO(0, str)
	ZEND_ARG_INFO(0, end)
	ZEND_ARG_INFO(0, ignoreCase)
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_text_lower, 0, 0, 1)
	ZEND_ARG_INFO(0, str)
	ZEND_ARG_INFO(0, encoding)
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_text_upper, 0, 0, 1)
	ZEND_ARG_INFO(0, str)
	ZEND_ARG_INFO(0, encoding)
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_text_reduceslashes, 0, 0, 1)
	ZEND_ARG_INFO(0, str)
ZEND_END_ARG_INFO()

ZEPHIR_INIT_FUNCS(phalcon_text_method_entry) {
	PHP_ME(Phalcon_Text, camelize, arginfo_phalcon_text_camelize, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
	PHP_ME(Phalcon_Text, uncamelize, arginfo_phalcon_text_uncamelize, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
	PHP_ME(Phalcon_Text, increment, arginfo_phalcon_text_increment, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
	PHP_ME(Phalcon_Text, random, arginfo_phalcon_text_random, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
	PHP_ME(Phalcon_Text, startsWith, arginfo_phalcon_text_startswith, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
	PHP_ME(Phalcon_Text, endsWith, arginfo_phalcon_text_endswith, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
	PHP_ME(Phalcon_Text, lower, arginfo_phalcon_text_lower, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
	PHP_ME(Phalcon_Text, upper, arginfo_phalcon_text_upper, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
	PHP_ME(Phalcon_Text, reduceSlashes, arginfo_phalcon_text_reduceslashes, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
	PHP_ME(Phalcon_Text, concat, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
	PHP_FE_END
};


text:
package org.http4s
package multipart

import cats._
import cats.effect._
import cats.implicits._
import fs2._
import java.io.File
import org.http4s.MediaType._
import org.http4s.headers._
import org.http4s.Uri._
import org.http4s.EntityEncoder._
import org.specs2.Specification
import scodec.bits.ByteVector

class MultipartSpec extends Specification {
  sequential

  def is = s2"""
    Multipart form data can be
        encoded and decoded with    content types  $encodeAndDecodeMultipart
        encoded and decoded without content types  $encodeAndDecodeMultipartMissingContentType
        encoded and decoded with    binary data    $encodeAndDecodeMultipartWithBinaryFormData
        decode  and encode  with    content types  $decodeMultipartRequestWithContentTypes
        decode  and encode  without content types  $decodeMultipartRequestWithoutContentTypes
        extract name properly if it is present     $extractNameIfPresent
     """

  val url = Uri(
    scheme = Some(Scheme.https),
    authority = Some(Authority(host = RegName("example.com"))),
    path = "/path/to/some/where")

  def toBV(entityBody: EntityBody[IO]): ByteVector =
    ByteVector(entityBody.compile.toVector.unsafeRunSync())

  implicit def partIOEq: Eq[Part[IO]] = Eq.instance[Part[IO]] {
    case (a, b) =>
      a.headers === b.headers && {
        for {
          abv <- a.body.compile.toVector.map(ByteVector(_))
          bbv <- b.body.compile.toVector.map(ByteVector(_))
        } yield abv === bbv
      }.unsafeRunSync()
  }

  implicit def multipartIOEq: Eq[Multipart[IO]] = Eq.instance[Multipart[IO]] { (a, b) =>
    a.headers === b.headers &&
    a.boundary === b.boundary &&
    a.parts === b.parts
  }

  def encodeAndDecodeMultipart = {

    val field1 = Part.formData[IO]("field1", "Text_Field_1", `Content-Type`(`text/plain`))
    val field2 = Part.formData[IO]("field2", "Text_Field_2")
    val multipart = Multipart(Vector(field1, field2))
    val entity = EntityEncoder[IO, Multipart[IO]].toEntity(multipart)
    val body = entity.unsafeRunSync().body
    val request = Request(method = Method.POST, uri = url, body = body, headers = multipart.headers)
    val decoded = EntityDecoder[IO, Multipart[IO]].decode(request, true)
    val result = decoded.value.unsafeRunSync()

    result must beRight.like {
      case mp =>
        mp === multipart
    }
  }

  def encodeAndDecodeMultipartMissingContentType = {

    val field1 = Part.formData[IO]("field1", "Text_Field_1")
    val multipart = Multipart[IO](Vector(field1))

    val entity = EntityEncoder[IO, Multipart[IO]].toEntity(multipart)
    val body = entity.unsafeRunSync().body
    val request = Request(method = Method.POST, uri = url, body = body, headers = multipart.headers)
    val decoded = EntityDecoder[IO, Multipart[IO]].decode(request, true)
    val result = decoded.value.unsafeRunSync()

    result must beRight.like {
      case mp =>
        mp === multipart
    }

  }

  def encodeAndDecodeMultipartWithBinaryFormData = {

    val file = new File(getClass.getResource("/ball.png").toURI)

    val field1 = Part.formData[IO]("field1", "Text_Field_1")
    val field2 = Part.fileData[IO]("image", file, `Content-Type`(`image/png`))

    val multipart = Multipart[IO](Vector(field1, field2))

    val entity = EntityEncoder[IO, Multipart[IO]].toEntity(multipart)
    val body = entity.unsafeRunSync().body
    val request = Request(method = Method.POST, uri = url, body = body, headers = multipart.headers)

    val decoded = EntityDecoder[IO, Multipart[IO]].decode(request, true)
    val result = decoded.value.unsafeRunSync()

    result must beRight.like {
      case mp =>
        mp === multipart
    }
  }

  def decodeMultipartRequestWithContentTypes = {

    val body = """
------WebKitFormBoundarycaZFo8IAKVROTEeD
Content-Disposition: form-data; name="text"

I AM A MOOSE
------WebKitFormBoundarycaZFo8IAKVROTEeD
Content-Disposition: form-data; name="file1"; filename="Graph_Databases_2e_Neo4j.pdf"
Content-Type: application/pdf

------WebKitFormBoundarycaZFo8IAKVROTEeD
Content-Disposition: form-data; name="file2"; filename="DataTypesALaCarte.pdf"
Content-Type: application/pdf

------WebKitFormBoundarycaZFo8IAKVROTEeD--
      """.replaceAllLiterally("\n", "\r\n")
    val header = Headers(
      `Content-Type`(
        MediaType.multipart("form-data", Some("----WebKitFormBoundarycaZFo8IAKVROTEeD"))))
    val request = Request[IO](
      method = Method.POST,
      uri = url,
      body = Stream.emit(body).through(text.utf8Encode),
      headers = header)

    val decoded = EntityDecoder[IO, Multipart[IO]].decode(request, true)
    val result = decoded.value.unsafeRunSync()

    result must beRight
  }

  def decodeMultipartRequestWithoutContentTypes = {

    val body =
      """--bQskVplbbxbC2JO8ibZ7KwmEe3AJLx_Olz
Content-Disposition: form-data; name="Mooses"

We are big mooses
--bQskVplbbxbC2JO8ibZ7KwmEe3AJLx_Olz
Content-Disposition: form-data; name="Moose"

I am a big moose
--bQskVplbbxbC2JO8ibZ7KwmEe3AJLx_Olz--

      """.replaceAllLiterally("\n", "\r\n")
    val header = Headers(
      `Content-Type`(MediaType.multipart("form-data", Some("bQskVplbbxbC2JO8ibZ7KwmEe3AJLx_Olz"))))
    val request = Request[IO](
      method = Method.POST,
      uri = url,
      body = Stream.emit(body).through(text.utf8Encode),
      headers = header)
    val decoded = EntityDecoder[IO, Multipart[IO]].decode(request, true)
    val result = decoded.value.unsafeRunSync()

    result must beRight
  }

  def extractNameIfPresent = {
    val part = Part(
      Headers(`Content-Disposition`("form-data", Map("name" -> "Rich Homie Quan"))),
      Stream.empty.covary[IO])
    part.name must beEqualTo(Some("Rich Homie Quan"))
  }
}


text:
var assert = require('assert');
var nodeEditorial = require('../lib/index.js').NodeEditorial();

describe('node-editorial', function () {
    //var arr;

    beforeEach(function () {
        //arr = [1, 2, 3];
    });

    describe('config', function () {
        //console.log("the nodeEditorial:" + nodeEditorial);

        it('should check that config exist', function () {
            assert(nodeEditorial.config != null, 'conf exist');
        });

    })
});


text:
<?php

namespace SalesModule\ValueObjects;

class Email {

    private $email;

    public function __construct(string $email) {
        //validate email
        $this->email = $email;
    }

    public function __string() {
        return $this->email;
    }
}


text:
package com.webfirmframework.wffweb.tag.html.html5.attribute;

import com.webfirmframework.wffweb.tag.html.attribute.core.AbstractAttribute;
import com.webfirmframework.wffweb.tag.html.attribute.core.PreIndexedAttributeName;
import com.webfirmframework.wffweb.tag.html.html5.identifier.SourceAttributable;
import com.webfirmframework.wffweb.tag.html.identifier.ImgAttributable;

/**
 *
 * @author WFF
 * @since 2.0.2
 */
public class SrcSet extends AbstractAttribute implements ImgAttributable, SourceAttributable {

    private static final long serialVersionUID = 1_0_0L;

    private static final PreIndexedAttributeName PRE_INDEXED_ATTR_NAME;

    static {
        PRE_INDEXED_ATTR_NAME = (PreIndexedAttributeName.SRCSET);

    }

    {

        super.setPreIndexedAttribute(PRE_INDEXED_ATTR_NAME);
        init();
    }

    /**
     *
     * @param value the value for the attribute
     * @since 2.0.2
     */
    public SrcSet(final String value) {
        setAttributeValue(value);
    }

    /**
     * sets the value for this attribute
     *
     * @param value the value for the attribute.
     * @since 2.0.2
     */
    public void setValue(final String value) {
        super.setAttributeValue(value);
    }

    /**
     * sets the value for this attribute
     *
     * @param updateClient true to update client browser page if it is available.
     *                     The default value is true but it will be ignored if there
     *                     is no client browser page.
     * @param value        the value for the attribute.
     * @since 2.1.15
     * @author WFF
     */
    public void setValue(final boolean updateClient, final String value) {
        super.setAttributeValue(updateClient, value);
    }

    /**
     * gets the value of this attribute
     *
     * @return the value of the attribute
     * @since 2.0.2
     */
    public String getValue() {
        return super.getAttributeValue();
    }

    /**
     * invokes only once per object
     *
     * @since 2.0.2
     */
    protected void init() {
        // to override and use this method
    }

}


text:
<menu xmlns:android="http://schemas.android.com/apk/res/android">
    <!-- TODO: icons -->
    <item
        android:id="@+id/nav_mass"
        android:title="@string/nav_mass"
        android:checkable="true" />
    <!-- TODO: make it a header instead -->
    <item
        android:id="@+id/nav_information"
        android:title="@string/nav_informations"
        android:checkable="true" />

    <item
        android:id="@+id/nav_bible"
        android:title="@string/nav_bible"
        android:checkable="true" />

    <item android:title="@string/nav_title_offices">
        <menu>
            <item
                android:id="@+id/nav_lectures"
                android:title="@string/nav_lectures"
                android:checkable="true" />
            <item
                android:id="@+id/nav_laudes"
                android:title="@string/nav_laudes"
                android:checkable="true" />
            <item
                android:id="@+id/nav_tierce"
                android:title="@string/nav_tierce"
                android:checkable="true" />
            <item
                android:id="@+id/nav_sexte"
                android:title="@string/nav_sexte"
                android:checkable="true" />
            <item
                android:id="@+id/nav_none"
                android:title="@string/nav_none"
                android:checkable="true" />
            <item
                android:id="@+id/nav_vepres"
                android:title="@string/nav_vepres"
                android:checkable="true" />
            <item
                android:id="@+id/nav_complies"
                android:title="@string/nav_complies"
                android:checkable="true" />
        </menu>
    </item>
</menu>


text:
using ydclient = yadisk::Client;

#include <string>
#include <list>

#include <url/path.hpp>
using url::path;

TEST_CASE("adding meta info to file", "[client][set][meta][file]") {

    std::string token = "AQAAAAATPnx3AAQXOJS1w4zmPUdrsJNR1FATxEM";
    path resource{ "/file.dat" };
    ydclient client{ token };
    json meta = "{\"custom_properties\":{\"foo\":\"1\",\"bar\":\"2\"}}"_json;
    std::list<std::string> fields {"custom_properties.foo", "custom_properties.bar"};
    auto info = client.patch(resource, meta, fields);
    REQUIRE(not info.empty());
    auto foo = info["custom_properties"]["foo"].get<std::string>();
    auto bar = info["custom_properties"]["bar"].get<std::string>();
    REQUIRE(foo == "1");
    REQUIRE(bar == "2");
}


text:
package com.example.myapplication;

import android.content.DialogInterface;
import android.os.Build;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.annotation.RequiresApi;
import android.support.v7.app.AlertDialog;
import android.text.InputType;
import android.util.Log;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.BaseAdapter;
import android.widget.Button;
import android.widget.EditText;
import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.TextView;
import android.widget.Toast;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.util.ArrayList;
import java.util.Locale;
import java.util.StringTokenizer;

public class CommissieActivity extends baseActivity {

    private EditText txtinput;
    CustomAdapter customAdapter = new CustomAdapter();

    @Override
    @RequiresApi(api = Build.VERSION_CODES.KITKAT)
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.setBaseContentView(R.layout.addprize_layout);
        super.onCreate(savedInstanceState);

        final ListView listview = (ListView)findViewById(R.id.myList) ;
        listview.setAdapter(customAdapter);
        customAdapter.notifyDataSetChanged();
        listview.setItemsCanFocus(true);
    }

    public void addPrize(View v) {
        AlertDialog.Builder alert = new AlertDialog.Builder(this);
        alert.setTitle("Nieuwe Commissie");
        alert.setMessage("Voer naam van de commissie in!");

        // Set an EditText view to get user input
        final EditText name = new EditText(this);
        name.setHint("  Naam");
        name.setInputType(InputType.TYPE_TEXT_FLAG_CAP_WORDS);
        LinearLayout layout = new LinearLayout(getApplicationContext());
        layout.setOrientation(LinearLayout.VERTICAL);
        layout.addView(name);
        alert.setView(layout);

        alert.setPositiveButton("Oke", new DialogInterface.OnClickListener() {
            public void onClick(DialogInterface dialog, int whichButton) {
                if(name.getText().toString() != "") {
                    cl.commissies.add(name.getText().toString().replace("'", ""));
                    customAdapter.notifyDataSetChanged();
                    cl.WriteToCommissies();
                }

            }
        });
        alert.setNegativeButton("Annuleer", new DialogInterface.OnClickListener() {
            public void onClick(DialogInterface dialog, int whichButton) {
                // Canceled.
            }
        });
        alert.show();
    }

    class CustomAdapter extends BaseAdapter {

        @Override
        public int getCount() {
            return cl.commissies.size();
        }

        @Override
        public Object getItem(int i) {
            return null;
        }

        @Override
        public long getItemId(int i) {
            return 0;
        }

        @Override
        public View getView(final int i, View view, ViewGroup viewGroup) {
            view = getLayoutInflater().inflate(R.layout.list_item,null);
            TextView tname = (TextView)view.findViewById(R.id.txtitem);
            TextView tprize = (TextView)view.findViewById(R.id.prizeView);

            tname.setText(cl.commissies.get(i));
            //tprize.setText("€" + String.format("%.2f",drinks.get(i).getPrize()) + ",-");

            //String myobj = drinks.get(i).getName();

            view.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View v) {
                    AlertDialog.Builder builder = new AlertDialog.Builder(CommissieActivity.this);
                    builder.setTitle(cl.commissies.get(i));

                    builder.setNegativeButton("Wijzig", new DialogInterface.OnClickListener() {
                        public void onClick(DialogInterface dialog, int id) {
                            final String POPUP_LOGIN_TITLE="Verander commissie";
                            final String POPUP_LOGIN_TEXT="Voer nieuwe naam van de commissie in.";
                            AlertDialog.Builder alert = new AlertDialog.Builder(CommissieActivity.this);

                            alert.setTitle(POPUP_LOGIN_TITLE);
                            alert.setMessage(POPUP_LOGIN_TEXT);

                            // Set an EditText view to get user input
                            final EditText name = new EditText(CommissieActivity.this);
                            name.setText(cl.commissies.get(i));
                            name.setInputType(InputType.TYPE_TEXT_FLAG_CAP_WORDS);

                            LinearLayout layout = new LinearLayout(getApplicationContext());
                            layout.setOrientation(LinearLayout.VERTICAL);
                            layout.addView(name);
                            alert.setView(layout);
                            alert.setPositiveButton("Oke", new DialogInterface.OnClickListener() {
                                public void onClick(DialogInterface dialog, int whichButton) {
                                    String oldval = cl.commissies.get(i);
                                    String newval = name.getText().toString().replace("'", "");
                                    if(cl.commissies.indexOf(cl.selectedCommissie) == i){
                                        cl.setCommissie(newval);
                                    }
                                    cl.commissies.set(i, newval);
                                    customAdapter.notifyDataSetChanged();
                                    cl.WriteToCommissies();
                                    cl.readTransactionfile();
                                    for(int j = 0; j < cl.transactions.size() ; j++){
                                        if(cl.transactions.get(j).getCommissie().equals(oldval)){
                                            cl.transactions.get(j).setCommissie(newval);
                                        }
                                    }
                                    cl.WriteTransactionFile();
                                }
                            });
                            alert.setNegativeButton("Annuleer", new DialogInterface.OnClickListener() {
                                public void onClick(DialogInterface dialog, int whichButton) {
                                    // Canceled.
                                }
                            });

                            alert.show();
                        }
                    });
                    builder.setNeutralButton("Verwijder", new DialogInterface.OnClickListener() {
                        public void onClick(DialogInterface dialog, int id) {
                            cl.commissies.remove(i);
                            customAdapter.notifyDataSetChanged();
                            cl.WriteToCommissies();
                        }
                    });
                    builder.setPositiveButton("Annuleer", new DialogInterface.OnClickListener() {
                        public void onClick(DialogInterface dialog, int id) {
                            // User cancelled the dialog
                        }
                    });

                    // 3. Get the AlertDialog from create()
                    AlertDialog dialog = builder.create();
                    dialog.show();
                }

            });

            return view;
        }

    }
}


text:
/*--------------------------------------------------*/

#import "GLBDataViewSectionsListContainer+Private.h"

/*--------------------------------------------------*/
#if defined(GLB_TARGET_IOS)
/*--------------------------------------------------*/

@implementation GLBDataViewSectionsListContainer

#pragma mark - Synthesize

@synthesize orientation = _orientation;
@synthesize margin = _margin;
@synthesize spacing = _spacing;
@synthesize pagingEnabled = _pagingEnabled;
@synthesize currentSection = _currentSection;

#pragma mark - Init / Free

+ (instancetype)containerWithOrientation:(GLBDataViewContainerOrientation)orientation {
    return [[self alloc] initWithOrientation:orientation];
}

- (instancetype)initWithOrientation:(GLBDataViewContainerOrientation)orientation {
    self = [super init];
    if(self != nil) {
        _orientation = orientation;
    }
    return self;
}

- (void)setup {
    [super setup];

    _margin = UIEdgeInsetsZero;
    _spacing = UIOffsetZero;
}

#pragma mark - Property

- (void)setAllowAutoAlign:(BOOL)allowAutoAlign {
    if(_allowAutoAlign != allowAutoAlign) {
        [super setAllowAutoAlign:allowAutoAlign];
        if(_pagingEnabled == YES) {
            self.pagingEnabled = NO;
        }
    }
}

- (void)setOrientation:(GLBDataViewContainerOrientation)orientation {
    if(_orientation != orientation) {
        _orientation = orientation;
        if(_dataView != nil) {
            [_dataView setNeedValidateLayout];
        }
    }
}

- (void)setMargin:(UIEdgeInsets)margin {
    if(UIEdgeInsetsEqualToEdgeInsets(_margin, margin) == NO) {
        _margin = margin;
        if(_dataView != nil) {
            [_dataView setNeedValidateLayout];
        }
    }
}

- (void)setSpacing:(UIOffset)spacing {
    if(UIOffsetEqualToOffset(_spacing, spacing) == NO) {
        _spacing = spacing;
        if(_dataView != nil) {
            [_dataView setNeedValidateLayout];
        }
    }
}

- (void)setPagingEnabled:(BOOL)pagingEnabled {
    if(_pagingEnabled != pagingEnabled) {
        if(_pagingEnabled == YES) {
            _currentSection = nil;
        }
        _pagingEnabled = pagingEnabled;
        _allowAutoAlign = _pagingEnabled;
        if(_pagingEnabled == YES) {
            [self align];
        }
    }
}

- (void)setCurrentSectionIndex:(NSUInteger)currentSectionIndex {
    [self setCurrentSection:_sections[currentSectionIndex] animated:NO];
}

- (void)setCurrentSectionIndex:(NSUInteger)currentSectionIndex animated:(BOOL)animated {
    [self setCurrentSection:_sections[currentSectionIndex] animated:animated];
}

- (NSUInteger)currentSectionIndex {
    return [_sections indexOfObjectIdenticalTo:_currentSection];
}

- (void)setCurrentSection:(GLBDataViewContainer*)currentSection {
    [self setCurrentSection:currentSection animated:NO];
}

- (void)setCurrentSection:(GLBDataViewContainer*)currentSection animated:(BOOL)animated {
    if(_currentSection != currentSection) {
        _currentSection = currentSection;
        if((_pagingEnabled == YES) && (_currentSection != nil)) {
            [self scrollToSection:_currentSection scrollPosition:(GLBDataViewPosition)_alignPosition animated:animated];
        }
    }
}

#pragma mark - Public override

- (void)replaceOriginSection:(GLBDataViewContainer*)originSection withSection:(GLBDataViewContainer*)section {
    if((_pagingEnabled == YES) && (_currentSection == originSection)) {
        _currentSection = section;
    }
    [super replaceOriginSection:originSection withSection:section];
}

- (void)deleteSection:(GLBDataViewContainer*)section {
    if((_pagingEnabled == YES) && (_currentSection == section)) {
        _currentSection = [_sections glb_nextObjectOfObject:_currentSection];
    }
    [super deleteSection:section];
}

- (void)deleteAllSections {
    if(_pagingEnabled == YES) {
        _currentSection = nil;
    }
    [super deleteAllSections];
}

- (void)didEndDraggingWillDecelerate:(BOOL __unused)decelerate {
    [super didEndDraggingWillDecelerate:decelerate];

    if((_pagingEnabled == YES) && (decelerate == NO)) {
        CGPoint alignPoint = [self alignPoint];
        for(GLBDataViewContainer* section in _sections) {
            if(section.hidden == YES) {
                continue;
            }
            if(CGRectContainsPoint(section.frame, alignPoint) == YES) {
                _currentSection = section;
                [self performActionForKey:GLBDataViewContainerCurrentSectionChanged withArguments:@[ _currentSection ]];
                break;
            }
        }
    }
}

- (void)didEndDecelerating {
    [super didEndDecelerating];

    if(_pagingEnabled == YES) {
        CGPoint alignPoint = [self alignPoint];
        for(GLBDataViewContainer* section in _sections) {
            if(section.hidden == YES) {
                continue;
            }
            if(CGRectContainsPoint(section.frame, alignPoint) == YES) {
                _currentSection = section;
                [self performActionForKey:GLBDataViewContainerCurrentSectionChanged withArguments:@[ _currentSection ]];
                break;
            }
        }
    }
}

- (void)endUpdateAnimated:(BOOL)animated {
    [super endUpdateAnimated:animated];

    if((_pagingEnabled == YES) && (_currentSection != nil)) {
        [self scrollToSection:_currentSection scrollPosition:(GLBDataViewPosition)_alignPosition animated:animated];
    }
}

- (CGRect)validateLayoutForAvailableFrame:(CGRect)frame {
    CGPoint offset = CGPointMake(frame.origin.x + _margin.left, frame.origin.y + _margin.top);
    CGSize restriction = CGSizeMake(frame.size.width - (_margin.left + _margin.right), frame.size.height - (_margin.left + _margin.right));
    CGSize cumulative = CGSizeZero;
    switch(_orientation) {
        case GLBDataViewContainerOrientationVertical: {
            for(GLBDataViewContainer* container in _sections) {
                if(container.hidden == YES) {
                    continue;
                }
                [container validateLayoutForAvailableFrame:CGRectMake(offset.x, offset.y, restriction.width, restriction.height)];
                CGRect containerFrame = container.frame;
                cumulative.height += containerFrame.size.height + _spacing.vertical;
                cumulative.width = MAX(cumulative.width, containerFrame.size.width);
                offset.y = (containerFrame.origin.y + containerFrame.size.height) + _spacing.vertical;
            }
            break;
        }
        case GLBDataViewContainerOrientationHorizontal: {
            for(GLBDataViewContainer* container in _sections) {
                if(container.hidden == YES) {
                    continue;
                }
                [container validateLayoutForAvailableFrame:CGRectMake(offset.x, offset.y, restriction.width, restriction.height)];
                CGRect containerFrame = container.frame;
                cumulative.width += containerFrame.size.width + _spacing.horizontal;
                cumulative.height = MAX(cumulative.height, containerFrame.size.height);
                offset.x = (containerFrame.origin.x + containerFrame.size.width) + _spacing.horizontal;
            }
            break;
        }
    }
    _frame = CGRectMake(frame.origin.x, frame.origin.y, _margin.left + cumulative.width + _margin.right, _margin.top + cumulative.height + _margin.bottom);
    return _frame;
}

- (CGRect)frameSectionsForAvailableFrame:(CGRect)frame {
    CGPoint offset = CGPointMake(frame.origin.x + _margin.left, frame.origin.y + _margin.top);
    CGSize restriction = CGSizeMake(frame.size.width - (_margin.left + _margin.right), frame.size.height - (_margin.left + _margin.right));
    CGSize cumulative = CGSizeZero;
    switch(_orientation) {
        case GLBDataViewContainerOrientationVertical: {
            for(GLBDataViewContainer* container in _sections) {
                if(container.hidden == YES) {
                    continue;
                }
                CGRect containerFrame = [container frameForAvailableFrame:CGRectMake(offset.x, offset.y, restriction.width, restriction.height)];
                cumulative.height += containerFrame.size.height + _spacing.vertical;
                cumulative.width = MAX(cumulative.width, containerFrame.size.width);
                offset.y = (containerFrame.origin.y + containerFrame.size.height) + _spacing.vertical;
            }
            cumulative.height -= _spacing.vertical;
            break;
        }
        case GLBDataViewContainerOrientationHorizontal: {
            for(GLBDataViewContainer* container in _sections) {
                if(container.hidden == YES) {
                    continue;
                }
                CGRect containerFrame = [container frameForAvailableFrame:CGRectMake(offset.x, offset.y, restriction.width, restriction.height)];
                cumulative.width += containerFrame.size.width + _spacing.horizontal;
                cumulative.height = MAX(cumulative.height, containerFrame.size.height);
                offset.x = (containerFrame.origin.x + containerFrame.size.width) + _spacing.horizontal;
            }
            cumulative.width -= _spacing.horizontal;
            break;
        }
    }
    return CGRectMake(frame.origin.x, frame.origin.y, _margin.left + cumulative.width + _margin.right, _margin.top + cumulative.height + _margin.bottom);
}

- (void)layoutSectionsForFrame:(CGRect)frame {
    CGPoint offset = CGPointMake(frame.origin.x + _margin.left, frame.origin.y + _margin.top);
    CGSize restriction = CGSizeMake(frame.size.width - (_margin.left + _margin.right), frame.size.height - (_margin.left + _margin.right));
    CGSize cumulative = CGSizeZero;
    switch(_orientation) {
        case GLBDataViewContainerOrientationVertical: {
            for(GLBDataViewContainer* container in _sections) {
                if(container.hidden == YES) {
                    continue;
                }
                CGRect containerFrame = CGRectMake(offset.x, offset.y, restriction.width, restriction.height);
                [container layoutForAvailableFrame:containerFrame];
                cumulative.height += containerFrame.size.height + _spacing.vertical;
                cumulative.width = MAX(cumulative.width, containerFrame.size.width);
                offset.y = (containerFrame.origin.y + containerFrame.size.height) + _spacing.vertical;
            }
            cumulative.height -= _spacing.vertical;
            break;
        }
        case GLBDataViewContainerOrientationHorizontal: {
            for(GLBDataViewContainer* container in _sections) {
                if(container.hidden == YES) {
                    continue;
                }
                CGRect containerFrame = [container frameForAvailableFrame:CGRectMake(offset.x, offset.y, restriction.width, restriction.height)];
                [container layoutForAvailableFrame:containerFrame];
                cumulative.width += containerFrame.size.width + _spacing.horizontal;
                cumulative.height = MAX(cumulative.height, containerFrame.size.height);
                offset.x = (containerFrame.origin.x + containerFrame.size.width) + _spacing.horizontal;
            }
            cumulative.width -= _spacing.horizontal;
            break;
        }
    }
}

@end

/*--------------------------------------------------*/
/* Constants                                        */
/*--------------------------------------------------*/

NSString* GLBDataViewContainerCurrentSectionChanged = @"GLBDataViewContainerCurrentSectionChanged";

/*--------------------------------------------------*/
#endif
/*--------------------------------------------------*/


text:
package model

import (
	"time"
)

// Config represents the configuration and is unique and holds data relevant for calculating the
// metabolic rate of the user
type Config struct {
	ID         int       `storm:"id,increment" json:"id"`
	Height     float64   `json:"height"`
	Activity   float64   `json:"activity"`
	Birthday   time.Time `json:"birthday"`
	Gender     string    `json:"gender"`
	UnitSystem string    `json:"unitSystem"`
}


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ERMine.Core.Modeling
{
    public enum Cardinality
    {
        ZeroOrOne,
        ExactyOne,
        ZeroOrMore,
        OneOrMore
    }
}


text:
import { KeyCode, KeyMod } from 'vs/base/common/keyCodes';
import { ICodeEditor } from 'vs/editor/browser/editorBrowser';
import { EditorAction, EditorCommand, ICommandOptions, registerEditorAction, registerEditorCommand, ServicesAccessor } from 'vs/editor/browser/editorExtensions';
import { ReplaceCommand } from 'vs/editor/common/commands/replaceCommand';
import { EditorOption, EditorOptions } from 'vs/editor/common/config/editorOptions';
import { CursorState } from 'vs/editor/common/controller/cursorCommon';
import { CursorChangeReason } from 'vs/editor/common/controller/cursorEvents';
import { DeleteWordContext, WordNavigationType, WordOperations } from 'vs/editor/common/controller/cursorWordOperations';
import { getMapForWordSeparators, WordCharacterClassifier } from 'vs/editor/common/controller/wordCharacterClassifier';
import { Position } from 'vs/editor/common/core/position';
import { Range } from 'vs/editor/common/core/range';
import { Selection } from 'vs/editor/common/core/selection';
import { ScrollType } from 'vs/editor/common/editorCommon';
import { EditorContextKeys } from 'vs/editor/common/editorContextKeys';
import { ITextModel } from 'vs/editor/common/model';
import { LanguageConfigurationRegistry } from 'vs/editor/common/modes/languageConfigurationRegistry';
import * as nls from 'vs/nls';
import { CONTEXT_ACCESSIBILITY_MODE_ENABLED } from 'vs/platform/accessibility/common/accessibility';
import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey';
import { IsWindowsContext } from 'vs/platform/contextkey/common/contextkeys';
import { KeybindingWeight } from 'vs/platform/keybinding/common/keybindingsRegistry';

export interface MoveWordOptions extends ICommandOptions {
	inSelectionMode: boolean;
	wordNavigationType: WordNavigationType;
}

export abstract class MoveWordCommand extends EditorCommand {

	private readonly _inSelectionMode: boolean;
	private readonly _wordNavigationType: WordNavigationType;

	constructor(opts: MoveWordOptions) {
		super(opts);
		this._inSelectionMode = opts.inSelectionMode;
		this._wordNavigationType = opts.wordNavigationType;
	}

	public runEditorCommand(accessor: ServicesAccessor, editor: ICodeEditor, args: any): void {
		if (!editor.hasModel()) {
			return;
		}
		const wordSeparators = getMapForWordSeparators(editor.getOption(EditorOption.wordSeparators));
		const model = editor.getModel();
		const selections = editor.getSelections();

		const result = selections.map((sel) => {
			const inPosition = new Position(sel.positionLineNumber, sel.positionColumn);
			const outPosition = this._move(wordSeparators, model, inPosition, this._wordNavigationType);
			return this._moveTo(sel, outPosition, this._inSelectionMode);
		});

		model.pushStackElement();
		editor._getViewModel().setCursorStates('moveWordCommand', CursorChangeReason.Explicit, result.map(r => CursorState.fromModelSelection(r)));
		if (result.length === 1) {
			const pos = new Position(result[0].positionLineNumber, result[0].positionColumn);
			editor.revealPosition(pos, ScrollType.Smooth);
		}
	}

	private _moveTo(from: Selection, to: Position, inSelectionMode: boolean): Selection {
		if (inSelectionMode) {
			// move just position
			return new Selection(
				from.selectionStartLineNumber,
				from.selectionStartColumn,
				to.lineNumber,
				to.column
			);
		} else {
			// move everything
			return new Selection(
				to.lineNumber,
				to.column,
				to.lineNumber,
				to.column
			);
		}
	}

	protected abstract _move(wordSeparators: WordCharacterClassifier, model: ITextModel, position: Position, wordNavigationType: WordNavigationType): Position;
}

export class WordLeftCommand extends MoveWordCommand {
	protected _move(wordSeparators: WordCharacterClassifier, model: ITextModel, position: Position, wordNavigationType: WordNavigationType): Position {
		return WordOperations.moveWordLeft(wordSeparators, model, position, wordNavigationType);
	}
}

export class WordRightCommand extends MoveWordCommand {
	protected _move(wordSeparators: WordCharacterClassifier, model: ITextModel, position: Position, wordNavigationType: WordNavigationType): Position {
		return WordOperations.moveWordRight(wordSeparators, model, position, wordNavigationType);
	}
}

export class CursorWordStartLeft extends WordLeftCommand {
	constructor() {
		super({
			inSelectionMode: false,
			wordNavigationType: WordNavigationType.WordStart,
			id: 'cursorWordStartLeft',
			precondition: undefined
		});
	}
}

export class CursorWordEndLeft extends WordLeftCommand {
	constructor() {
		super({
			inSelectionMode: false,
			wordNavigationType: WordNavigationType.WordEnd,
			id: 'cursorWordEndLeft',
			precondition: undefined
		});
	}
}

export class CursorWordLeft extends WordLeftCommand {
	constructor() {
		super({
			inSelectionMode: false,
			wordNavigationType: WordNavigationType.WordStartFast,
			id: 'cursorWordLeft',
			precondition: undefined,
			kbOpts: {
				kbExpr: ContextKeyExpr.and(EditorContextKeys.textInputFocus, ContextKeyExpr.and(CONTEXT_ACCESSIBILITY_MODE_ENABLED, IsWindowsContext)?.negate()),
				primary: KeyMod.CtrlCmd | KeyCode.LeftArrow,
				mac: { primary: KeyMod.Alt | KeyCode.LeftArrow },
				weight: KeybindingWeight.EditorContrib
			}
		});
	}
}

export class CursorWordStartLeftSelect extends WordLeftCommand {
	constructor() {
		super({
			inSelectionMode: true,
			wordNavigationType: WordNavigationType.WordStart,
			id: 'cursorWordStartLeftSelect',
			precondition: undefined
		});
	}
}

export class CursorWordEndLeftSelect extends WordLeftCommand {
	constructor() {
		super({
			inSelectionMode: true,
			wordNavigationType: WordNavigationType.WordEnd,
			id: 'cursorWordEndLeftSelect',
			precondition: undefined
		});
	}
}

export class CursorWordLeftSelect extends WordLeftCommand {
	constructor() {
		super({
			inSelectionMode: true,
			wordNavigationType: WordNavigationType.WordStartFast,
			id: 'cursorWordLeftSelect',
			precondition: undefined,
			kbOpts: {
				kbExpr: ContextKeyExpr.and(EditorContextKeys.textInputFocus, ContextKeyExpr.and(CONTEXT_ACCESSIBILITY_MODE_ENABLED, IsWindowsContext)?.negate()),
				primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.LeftArrow,
				mac: { primary: KeyMod.Alt | KeyMod.Shift | KeyCode.LeftArrow },
				weight: KeybindingWeight.EditorContrib
			}
		});
	}
}

// Accessibility navigation commands should only be enabled on windows since they are tuned to what NVDA expects
export class CursorWordAccessibilityLeft extends WordLeftCommand {
	constructor() {
		super({
			inSelectionMode: false,
			wordNavigationType: WordNavigationType.WordAccessibility,
			id: 'cursorWordAccessibilityLeft',
			precondition: undefined
		});
	}

	protected override _move(_: WordCharacterClassifier, model: ITextModel, position: Position, wordNavigationType: WordNavigationType): Position {
		return super._move(getMapForWordSeparators(EditorOptions.wordSeparators.defaultValue), model, position, wordNavigationType);
	}
}

export class CursorWordAccessibilityLeftSelect extends WordLeftCommand {
	constructor() {
		super({
			inSelectionMode: true,
			wordNavigationType: WordNavigationType.WordAccessibility,
			id: 'cursorWordAccessibilityLeftSelect',
			precondition: undefined
		});
	}

	protected override _move(_: WordCharacterClassifier, model: ITextModel, position: Position, wordNavigationType: WordNavigationType): Position {
		return super._move(getMapForWordSeparators(EditorOptions.wordSeparators.defaultValue), model, position, wordNavigationType);
	}
}

export class CursorWordStartRight extends WordRightCommand {
	constructor() {
		super({
			inSelectionMode: false,
			wordNavigationType: WordNavigationType.WordStart,
			id: 'cursorWordStartRight',
			precondition: undefined
		});
	}
}

export class CursorWordEndRight extends WordRightCommand {
	constructor() {
		super({
			inSelectionMode: false,
			wordNavigationType: WordNavigationType.WordEnd,
			id: 'cursorWordEndRight',
			precondition: undefined,
			kbOpts: {
				kbExpr: ContextKeyExpr.and(EditorContextKeys.textInputFocus, ContextKeyExpr.and(CONTEXT_ACCESSIBILITY_MODE_ENABLED, IsWindowsContext)?.negate()),
				primary: KeyMod.CtrlCmd | KeyCode.RightArrow,
				mac: { primary: KeyMod.Alt | KeyCode.RightArrow },
				weight: KeybindingWeight.EditorContrib
			}
		});
	}
}

export class CursorWordRight extends WordRightCommand {
	constructor() {
		super({
			inSelectionMode: false,
			wordNavigationType: WordNavigationType.WordEnd,
			id: 'cursorWordRight',
			precondition: undefined
		});
	}
}

export class CursorWordStartRightSelect extends WordRightCommand {
	constructor() {
		super({
			inSelectionMode: true,
			wordNavigationType: WordNavigationType.WordStart,
			id: 'cursorWordStartRightSelect',
			precondition: undefined
		});
	}
}

export class CursorWordEndRightSelect extends WordRightCommand {
	constructor() {
		super({
			inSelectionMode: true,
			wordNavigationType: WordNavigationType.WordEnd,
			id: 'cursorWordEndRightSelect',
			precondition: undefined,
			kbOpts: {
				kbExpr: ContextKeyExpr.and(EditorContextKeys.textInputFocus, ContextKeyExpr.and(CONTEXT_ACCESSIBILITY_MODE_ENABLED, IsWindowsContext)?.negate()),
				primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.RightArrow,
				mac: { primary: KeyMod.Alt | KeyMod.Shift | KeyCode.RightArrow },
				weight: KeybindingWeight.EditorContrib
			}
		});
	}
}

export class CursorWordRightSelect extends WordRightCommand {
	constructor() {
		super({
			inSelectionMode: true,
			wordNavigationType: WordNavigationType.WordEnd,
			id: 'cursorWordRightSelect',
			precondition: undefined
		});
	}
}

export class CursorWordAccessibilityRight extends WordRightCommand {
	constructor() {
		super({
			inSelectionMode: false,
			wordNavigationType: WordNavigationType.WordAccessibility,
			id: 'cursorWordAccessibilityRight',
			precondition: undefined
		});
	}

	protected override _move(_: WordCharacterClassifier, model: ITextModel, position: Position, wordNavigationType: WordNavigationType): Position {
		return super._move(getMapForWordSeparators(EditorOptions.wordSeparators.defaultValue), model, position, wordNavigationType);
	}
}

export class CursorWordAccessibilityRightSelect extends WordRightCommand {
	constructor() {
		super({
			inSelectionMode: true,
			wordNavigationType: WordNavigationType.WordAccessibility,
			id: 'cursorWordAccessibilityRightSelect',
			precondition: undefined
		});
	}

	protected override _move(_: WordCharacterClassifier, model: ITextModel, position: Position, wordNavigationType: WordNavigationType): Position {
		return super._move(getMapForWordSeparators(EditorOptions.wordSeparators.defaultValue), model, position, wordNavigationType);
	}
}

export interface DeleteWordOptions extends ICommandOptions {
	whitespaceHeuristics: boolean;
	wordNavigationType: WordNavigationType;
}

export abstract class DeleteWordCommand extends EditorCommand {
	private readonly _whitespaceHeuristics: boolean;
	private readonly _wordNavigationType: WordNavigationType;

	constructor(opts: DeleteWordOptions) {
		super(opts);
		this._whitespaceHeuristics = opts.whitespaceHeuristics;
		this._wordNavigationType = opts.wordNavigationType;
	}

	public runEditorCommand(accessor: ServicesAccessor, editor: ICodeEditor, args: any): void {
		if (!editor.hasModel()) {
			return;
		}
		const wordSeparators = getMapForWordSeparators(editor.getOption(EditorOption.wordSeparators));
		const model = editor.getModel();
		const selections = editor.getSelections();
		const autoClosingBrackets = editor.getOption(EditorOption.autoClosingBrackets);
		const autoClosingQuotes = editor.getOption(EditorOption.autoClosingQuotes);
		const autoClosingPairs = LanguageConfigurationRegistry.getAutoClosingPairs(model.getLanguageIdentifier().id);
		const viewModel = editor._getViewModel();

		const commands = selections.map((sel) => {
			const deleteRange = this._delete({
				wordSeparators,
				model,
				selection: sel,
				whitespaceHeuristics: this._whitespaceHeuristics,
				autoClosingDelete: editor.getOption(EditorOption.autoClosingDelete),
				autoClosingBrackets,
				autoClosingQuotes,
				autoClosingPairs,
				autoClosedCharacters: viewModel.getCursorAutoClosedCharacters()
			}, this._wordNavigationType);
			return new ReplaceCommand(deleteRange, '');
		});

		editor.pushUndoStop();
		editor.executeCommands(this.id, commands);
		editor.pushUndoStop();
	}

	protected abstract _delete(ctx: DeleteWordContext, wordNavigationType: WordNavigationType): Range;
}

export class DeleteWordLeftCommand extends DeleteWordCommand {
	protected _delete(ctx: DeleteWordContext, wordNavigationType: WordNavigationType): Range {
		let r = WordOperations.deleteWordLeft(ctx, wordNavigationType);
		if (r) {
			return r;
		}
		return new Range(1, 1, 1, 1);
	}
}

export class DeleteWordRightCommand extends DeleteWordCommand {
	protected _delete(ctx: DeleteWordContext, wordNavigationType: WordNavigationType): Range {
		let r = WordOperations.deleteWordRight(ctx, wordNavigationType);
		if (r) {
			return r;
		}
		const lineCount = ctx.model.getLineCount();
		const maxColumn = ctx.model.getLineMaxColumn(lineCount);
		return new Range(lineCount, maxColumn, lineCount, maxColumn);
	}
}

export class DeleteWordStartLeft extends DeleteWordLeftCommand {
	constructor() {
		super({
			whitespaceHeuristics: false,
			wordNavigationType: WordNavigationType.WordStart,
			id: 'deleteWordStartLeft',
			precondition: EditorContextKeys.writable
		});
	}
}

export class DeleteWordEndLeft extends DeleteWordLeftCommand {
	constructor() {
		super({
			whitespaceHeuristics: false,
			wordNavigationType: WordNavigationType.WordEnd,
			id: 'deleteWordEndLeft',
			precondition: EditorContextKeys.writable
		});
	}
}

export class DeleteWordLeft extends DeleteWordLeftCommand {
	constructor() {
		super({
			whitespaceHeuristics: true,
			wordNavigationType: WordNavigationType.WordStart,
			id: 'deleteWordLeft',
			precondition: EditorContextKeys.writable,
			kbOpts: {
				kbExpr: EditorContextKeys.textInputFocus,
				primary: KeyMod.CtrlCmd | KeyCode.Backspace,
				mac: { primary: KeyMod.Alt | KeyCode.Backspace },
				weight: KeybindingWeight.EditorContrib
			}
		});
	}
}

export class DeleteWordStartRight extends DeleteWordRightCommand {
	constructor() {
		super({
			whitespaceHeuristics: false,
			wordNavigationType: WordNavigationType.WordStart,
			id: 'deleteWordStartRight',
			precondition: EditorContextKeys.writable
		});
	}
}

export class DeleteWordEndRight extends DeleteWordRightCommand {
	constructor() {
		super({
			whitespaceHeuristics: false,
			wordNavigationType: WordNavigationType.WordEnd,
			id: 'deleteWordEndRight',
			precondition: EditorContextKeys.writable
		});
	}
}

export class DeleteWordRight extends DeleteWordRightCommand {
	constructor() {
		super({
			whitespaceHeuristics: true,
			wordNavigationType: WordNavigationType.WordEnd,
			id: 'deleteWordRight',
			precondition: EditorContextKeys.writable,
			kbOpts: {
				kbExpr: EditorContextKeys.textInputFocus,
				primary: KeyMod.CtrlCmd | KeyCode.Delete,
				mac: { primary: KeyMod.Alt | KeyCode.Delete },
				weight: KeybindingWeight.EditorContrib
			}
		});
	}
}

export class DeleteInsideWord extends EditorAction {

	constructor() {
		super({
			id: 'deleteInsideWord',
			precondition: EditorContextKeys.writable,
			label: nls.localize('deleteInsideWord', "Delete Word"),
			alias: 'Delete Word'
		});
	}

	public run(accessor: ServicesAccessor, editor: ICodeEditor, args: any): void {
		if (!editor.hasModel()) {
			return;
		}
		const wordSeparators = getMapForWordSeparators(editor.getOption(EditorOption.wordSeparators));
		const model = editor.getModel();
		const selections = editor.getSelections();

		const commands = selections.map((sel) => {
			const deleteRange = WordOperations.deleteInsideWord(wordSeparators, model, sel);
			return new ReplaceCommand(deleteRange, '');
		});

		editor.pushUndoStop();
		editor.executeCommands(this.id, commands);
		editor.pushUndoStop();
	}
}

registerEditorCommand(new CursorWordStartLeft());
registerEditorCommand(new CursorWordEndLeft());
registerEditorCommand(new CursorWordLeft());
registerEditorCommand(new CursorWordStartLeftSelect());
registerEditorCommand(new CursorWordEndLeftSelect());
registerEditorCommand(new CursorWordLeftSelect());
registerEditorCommand(new CursorWordStartRight());
registerEditorCommand(new CursorWordEndRight());
registerEditorCommand(new CursorWordRight());
registerEditorCommand(new CursorWordStartRightSelect());
registerEditorCommand(new CursorWordEndRightSelect());
registerEditorCommand(new CursorWordRightSelect());
registerEditorCommand(new CursorWordAccessibilityLeft());
registerEditorCommand(new CursorWordAccessibilityLeftSelect());
registerEditorCommand(new CursorWordAccessibilityRight());
registerEditorCommand(new CursorWordAccessibilityRightSelect());
registerEditorCommand(new DeleteWordStartLeft());
registerEditorCommand(new DeleteWordEndLeft());
registerEditorCommand(new DeleteWordLeft());
registerEditorCommand(new DeleteWordStartRight());
registerEditorCommand(new DeleteWordEndRight());
registerEditorCommand(new DeleteWordRight());
registerEditorAction(DeleteInsideWord);


text:
package org.springframework.vault.support;

import java.time.Duration;
import java.util.Collections;

import org.junit.jupiter.api.Test;

import static org.assertj.core.api.Assertions.assertThat;

/**
 * Unit tests for {@link VaultTokenRequest}.
 *
 * @author Mark Paluch
 */
class VaultTokenRequestUnitTests {

	@Test
	void shouldBuildEmptyRequest() {

		VaultTokenRequest tokenRequest = VaultTokenRequest.builder().build();

		assertThat(tokenRequest.getMeta()).isEmpty();
		assertThat(tokenRequest.getPolicies()).isEmpty();
	}

	@Test
	void shouldBuildRequestWithMeta() {

		VaultTokenRequest tokenRequest = VaultTokenRequest.builder()
				.meta(Collections.singletonMap("key", "value")).build();

		assertThat(tokenRequest.getMeta()).containsEntry("key", "value");
	}

	@Test
	void shouldBuildRequestWithPolicies() {

		VaultTokenRequest tokenRequest = VaultTokenRequest.builder().withPolicy("foo")
				.build();

		assertThat(tokenRequest.getPolicies()).containsOnly("foo");
	}

	@Test
	void shouldRequestWithDuration() {

		VaultTokenRequest tokenRequest = VaultTokenRequest.builder()
				.ttl(Duration.ofSeconds(10)).explicitMaxTtl(Duration.ofSeconds(20))
				.build();

		assertThat(tokenRequest.getTtl()).isEqualTo("10s");
		assertThat(tokenRequest.getExplicitMaxTtl()).isEqualTo("20s");
	}
}


text:
package logger

import (
	"fmt"
	"sync"
)

// Creator builds a logging driver instance with given context.
type Creator func(Context) (Logger, error)

// LogOptValidator checks the options specific to the underlying
// logging implementation.
type LogOptValidator func(cfg map[string]string) error

type logdriverFactory struct {
	registry     map[string]Creator
	optValidator map[string]LogOptValidator
	m            sync.Mutex
}

func (lf *logdriverFactory) register(name string, c Creator) error {
	if lf.driverRegistered(name) {
		return fmt.Errorf("logger: log driver named '%s' is already registered", name)
	}

	lf.m.Lock()
	lf.registry[name] = c
	lf.m.Unlock()
	return nil
}

func (lf *logdriverFactory) driverRegistered(name string) bool {
	lf.m.Lock()
	_, ok := lf.registry[name]
	lf.m.Unlock()
	return ok
}

func (lf *logdriverFactory) registerLogOptValidator(name string, l LogOptValidator) error {
	lf.m.Lock()
	defer lf.m.Unlock()

	if _, ok := lf.optValidator[name]; ok {
		return fmt.Errorf("logger: log validator named '%s' is already registered", name)
	}
	lf.optValidator[name] = l
	return nil
}

func (lf *logdriverFactory) get(name string) (Creator, error) {
	lf.m.Lock()
	defer lf.m.Unlock()

	c, ok := lf.registry[name]
	if !ok {
		return c, fmt.Errorf("logger: no log driver named '%s' is registered", name)
	}
	return c, nil
}

func (lf *logdriverFactory) getLogOptValidator(name string) LogOptValidator {
	lf.m.Lock()
	defer lf.m.Unlock()

	c, _ := lf.optValidator[name]
	return c
}

var factory = &logdriverFactory{registry: make(map[string]Creator), optValidator: make(map[string]LogOptValidator)} // global factory instance

// RegisterLogDriver registers the given logging driver builder with given logging
// driver name.
func RegisterLogDriver(name string, c Creator) error {
	return factory.register(name, c)
}

// RegisterLogOptValidator registers the logging option validator with
// the given logging driver name.
func RegisterLogOptValidator(name string, l LogOptValidator) error {
	return factory.registerLogOptValidator(name, l)
}

// GetLogDriver provides the logging driver builder for a logging driver name.
func GetLogDriver(name string) (Creator, error) {
	return factory.get(name)
}

// ValidateLogOpts checks the options for the given log driver. The
// options supported are specific to the LogDriver implementation.
func ValidateLogOpts(name string, cfg map[string]string) error {
	if name == "none" {
		return nil
	}

	if !factory.driverRegistered(name) {
		return fmt.Errorf("logger: no log driver named '%s' is registered", name)
	}

	validator := factory.getLogOptValidator(name)
	if validator != nil {
		return validator(cfg)
	}
	return nil
}


text:
package edu.hnu.webapp.model.base;

import com.jfinal.plugin.activerecord.IBean;

import edu.hnu.webapp.core.model.BaseModel;

/**
 * Generated by JFinal, do not modify this file.
 */
@SuppressWarnings("serial")
public abstract class BaseSysRole<M extends BaseSysRole<M>> extends BaseModel<M> implements IBean {

	public void setId(java.lang.Integer id) {
		set("id", id);
	}

	public java.lang.Integer getId() {
		return get("id");
	}

	public void setName(java.lang.String name) {
		set("name", name);
	}

	public java.lang.String getName() {
		return get("name");
	}

	public void setDes(java.lang.String des) {
		set("des", des);
	}

	public java.lang.String getDes() {
		return get("des");
	}

	public void setSeq(java.lang.Integer seq) {
		set("seq", seq);
	}

	public java.lang.Integer getSeq() {
		return get("seq");
	}

	public void setCreatedate(java.util.Date createdate) {
		set("createdate", createdate);
	}

	public java.util.Date getCreatedate() {
		return get("createdate");
	}

	public void setStatus(java.lang.Integer status) {
		set("status", status);
	}

	public java.lang.Integer getStatus() {
		return get("status");
	}

}