text:
<!DOCTYPE html>

  <meta charset="utf-8" />
  <title>Flatkit - HTML Version | Bootstrap 4 Web App Kit with AngularJS</title>
  <meta name="description" content="Admin, Dashboard, Bootstrap, Bootstrap 4, Angular, AngularJS" />
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimal-ui" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge">

  <meta name="apple-mobile-web-app-capable" content="yes">
  <meta name="apple-mobile-web-app-status-barstyle" content="black-translucent">
  <link rel="apple-touch-icon" href="../assets/images/logo.png">
  <meta name="apple-mobile-web-app-title" content="Flatkit">

  <meta name="mobile-web-app-capable" content="yes">
  <link rel="shortcut icon" sizes="196x196" href="../assets/images/logo.png">

  <link rel="stylesheet" href="../assets/animate.css/animate.min.css" type="text/css" />
  <link rel="stylesheet" href="../assets/glyphicons/glyphicons.css" type="text/css" />
  <link rel="stylesheet" href="../assets/font-awesome/css/font-awesome.min.css" type="text/css" />
  <link rel="stylesheet" href="../assets/material-design-icons/material-design-icons.css" type="text/css" />

  <link rel="stylesheet" href="../assets/bootstrap/dist/css/bootstrap.min.css" type="text/css" />

  <link rel="stylesheet" href="../assets/styles/app.css" type="text/css" />

  <link rel="stylesheet" href="../assets/styles/font.css" type="text/css" />

        	Flatkit

                  Main

                      

                    Dashboard

                      5

                      

                    Apps

                        Inbox

                        Contacts

                        Calendar

                      

                    Layouts

                        Header

                        Aside

                        Footer

                      

                    Widgets

                  Components

                      8

                      

                    UI kit

                        Arrow

                        Box

                        Button

                        Color

                        Dropdown

                        Grid

                        Icon

                        Label

                        List Group

                        Modal

                        Nav

                        Progress

                        Social

                        Sortable

                        Streamline

                        Timeline

                        Vector Map

                    9

                      

                    Pages

                        Profile

                        Setting

                        Search

                        FAQ

                        Gallery

                        Invoice

                        Price

                        Blank

                        Sign In

                        Sign Up

                        Forgot Password

                        Lockme Screen

                        Error 404

                        Error 505

                      

                    Form

                        Form Layout

                        Form Element

                        Form Validation

                        Select

                        Editor

                        Picker

                        Wizard

                        File Upload

                      

                    Tables

                        Static table

                        Datatable

                        Footable

                      N

                      

                    Charts

                        Chart

                        Echarts

                            line

                            Bar

                            Pie

                            Scatter

                            Radar & Chord

                            Gauges & Funnel

                            Map

                  Help

                    Documents

        	      Jean Reyes
        	      online

              

                  
                  3

                  

                    New

          © Copyright Flatkit - Built with Love v1.1.1

          About
          -
          Get it

Basic

        Default textbox
        <input id="default" type="text" class="form-control" placeholder="Placeholder text">

        Select2 single select
        <select id="single" class="form-control select2" ui-jp="select2" ui-options="{theme: 'bootstrap'}">

          <optgroup label="Alaskan/Hawaiian Time Zone">
            <option value="AK">Alaska</option>
            <option value="HI" disabled="disabled">Hawaii</option>
          </optgroup>
          <optgroup label="Pacific Time Zone">
            <option value="CA">California</option>
            <option value="NV">Nevada</option>
            <option value="OR">Oregon</option>
            <option value="WA">Washington</option>
          </optgroup>
          <optgroup label="Mountain Time Zone">
            <option value="AZ">Arizona</option>
            <option value="CO">Colorado</option>
            <option value="ID">Idaho</option>
            <option value="MT">Montana</option><option value="NE">Nebraska</option>
            <option value="NM">New Mexico</option>
            <option value="ND">North Dakota</option>
            <option value="UT">Utah</option>
            <option value="WY">Wyoming</option>
          </optgroup>
          <optgroup label="Central Time Zone">
            <option value="AL">Alabama</option>
            <option value="AR">Arkansas</option>
            <option value="IL">Illinois</option>
            <option value="IA">Iowa</option>
            <option value="KS">Kansas</option>
            <option value="KY">Kentucky</option>
            <option value="LA">Louisiana</option>
            <option value="MN">Minnesota</option>
            <option value="MS">Mississippi</option>
            <option value="MO">Missouri</option>
            <option value="OK">Oklahoma</option>
            <option value="SD">South Dakota</option>
            <option value="TX">Texas</option>
            <option value="TN">Tennessee</option>
            <option value="WI">Wisconsin</option>
          </optgroup>
          <optgroup label="Eastern Time Zone">
            <option value="CT">Connecticut</option>
            <option value="DE">Delaware</option>
            <option value="FL">Florida</option>
            <option value="GA">Georgia</option>
            <option value="IN">Indiana</option>
            <option value="ME">Maine</option>
            <option value="MD">Maryland</option>
            <option value="MA">Massachusetts</option>
            <option value="MI">Michigan</option>
            <option value="NH">New Hampshire</option><option value="NJ">New Jersey</option>
            <option value="NY">New York</option>
            <option value="NC">North Carolina</option>
            <option value="OH">Ohio</option>
            <option value="PA">Pennsylvania</option><option value="RI">Rhode Island</option><option value="SC">South Carolina</option>
            <option value="VT">Vermont</option><option value="VA">Virginia</option>
            <option value="WV">West Virginia</option>
          </optgroup>
        </select>

        Select2 multi select
        <select id="multiple" class="form-control select2-multiple" multiple ui-jp="select2" ui-options="{theme: 'bootstrap'}">
          <optgroup label="Alaskan/Hawaiian Time Zone">
            <option value="AK">Alaska</option>
            <option value="HI" disabled="disabled">Hawaii</option>
          </optgroup>
          <optgroup label="Pacific Time Zone">
            <option value="CA">California</option>
            <option value="NV">Nevada</option>
            <option value="OR">Oregon</option>
            <option value="WA">Washington</option>
          </optgroup>
          <optgroup label="Mountain Time Zone">
            <option value="AZ">Arizona</option>
            <option value="CO">Colorado</option>
            <option value="ID">Idaho</option>
            <option value="MT">Montana</option><option value="NE">Nebraska</option>
            <option value="NM">New Mexico</option>
            <option value="ND">North Dakota</option>
            <option value="UT">Utah</option>
            <option value="WY">Wyoming</option>
          </optgroup>
          <optgroup label="Central Time Zone">
            <option value="AL">Alabama</option>
            <option value="AR">Arkansas</option>
            <option value="IL">Illinois</option>
            <option value="IA">Iowa</option>
            <option value="KS">Kansas</option>
            <option value="KY">Kentucky</option>
            <option value="LA">Louisiana</option>
            <option value="MN">Minnesota</option>
            <option value="MS">Mississippi</option>
            <option value="MO">Missouri</option>
            <option value="OK">Oklahoma</option>
            <option value="SD">South Dakota</option>
            <option value="TX">Texas</option>
            <option value="TN">Tennessee</option>
            <option value="WI">Wisconsin</option>
          </optgroup>
          <optgroup label="Eastern Time Zone">
            <option value="CT">Connecticut</option>
            <option value="DE">Delaware</option>
            <option value="FL">Florida</option>
            <option value="GA">Georgia</option>
            <option value="IN">Indiana</option>
            <option value="ME">Maine</option>
            <option value="MD">Maryland</option>
            <option value="MA">Massachusetts</option>
            <option value="MI">Michigan</option>
            <option value="NH">New Hampshire</option><option value="NJ">New Jersey</option>
            <option value="NY">New York</option>
            <option value="NC">North Carolina</option>
            <option value="OH">Ohio</option>
            <option value="PA">Pennsylvania</option><option value="RI">Rhode Island</option><option value="SC">South Carolina</option>
            <option value="VT">Vermont</option><option value="VA">Virginia</option>
            <option value="WV">West Virginia</option>
          </optgroup>
        </select>

Input Groups

To let the Select2 widget know if any elements are directly being appended, prepended or both in the context of a Bootstrap Input Group, add .select2-bootstrap-prepend and/or .select2-bootstrap-append to the .input-group wrapper element to address Select2's corresponding border-radii.

        Select2 append Checkbox

            <input type="checkbox" checked>

          <select id="select2-single-append" class="form-control select2-allow-clear" ui-jp="select2" ui-options="{theme: 'bootstrap'}">

            <optgroup label="Alaskan/Hawaiian Time Zone">
              <option value="AK">Alaska</option>
              <option value="HI" disabled="disabled">Hawaii</option>
            </optgroup>
            <optgroup label="Pacific Time Zone">
              <option value="CA">California</option>
              <option value="NV">Nevada</option>
              <option value="OR">Oregon</option>
              <option value="WA">Washington</option>
            </optgroup>
            <optgroup label="Mountain Time Zone">
              <option value="AZ">Arizona</option>
              <option value="CO">Colorado</option>
              <option value="ID">Idaho</option>
              <option value="MT">Montana</option><option value="NE">Nebraska</option>
              <option value="NM">New Mexico</option>
              <option value="ND">North Dakota</option>
              <option value="UT">Utah</option>
              <option value="WY">Wyoming</option>
            </optgroup>
            <optgroup label="Central Time Zone">
              <option value="AL">Alabama</option>
              <option value="AR">Arkansas</option>
              <option value="IL">Illinois</option>
              <option value="IA">Iowa</option>
              <option value="KS">Kansas</option>
              <option value="KY">Kentucky</option>
              <option value="LA">Louisiana</option>
              <option value="MN">Minnesota</option>
              <option value="MS">Mississippi</option>
              <option value="MO">Missouri</option>
              <option value="OK">Oklahoma</option>
              <option value="SD">South Dakota</option>
              <option value="TX">Texas</option>
              <option value="TN">Tennessee</option>
              <option value="WI">Wisconsin</option>
            </optgroup>
            <optgroup label="Eastern Time Zone">
              <option value="CT">Connecticut</option>
              <option value="DE">Delaware</option>
              <option value="FL">Florida</option>
              <option value="GA">Georgia</option>
              <option value="IN">Indiana</option>
              <option value="ME">Maine</option>
              <option value="MD">Maryland</option>
              <option value="MA">Massachusetts</option>
              <option value="MI">Michigan</option>
              <option value="NH">New Hampshire</option><option value="NJ">New Jersey</option>
              <option value="NY">New York</option>
              <option value="NC">North Carolina</option>
              <option value="OH">Ohio</option>
              <option value="PA">Pennsylvania</option><option value="RI">Rhode Island</option><option value="SC">South Carolina</option>
              <option value="VT">Vermont</option><option value="VA">Virginia</option>
              <option value="WV">West Virginia</option>
            </optgroup>
          </select>

        Select2 multi append Radiobutton

            <input type="radio">

          <select id="single-append-radio" class="form-control select2-allow-clear" multiple ui-jp="select2" ui-options="{theme: 'bootstrap'}">

            <optgroup label="Alaskan/Hawaiian Time Zone">
              <option value="AK">Alaska</option>
              <option value="HI" disabled="disabled">Hawaii</option>
            </optgroup>
            <optgroup label="Pacific Time Zone">
              <option value="CA">California</option>
              <option value="NV">Nevada</option>
              <option value="OR">Oregon</option>
              <option value="WA">Washington</option>
            </optgroup>
            <optgroup label="Mountain Time Zone">
              <option value="AZ">Arizona</option>
              <option value="CO">Colorado</option>
              <option value="ID">Idaho</option>
              <option value="MT">Montana</option><option value="NE">Nebraska</option>
              <option value="NM">New Mexico</option>
              <option value="ND">North Dakota</option>
              <option value="UT">Utah</option>
              <option value="WY">Wyoming</option>
            </optgroup>
            <optgroup label="Central Time Zone">
              <option value="AL">Alabama</option>
              <option value="AR">Arkansas</option>
              <option value="IL">Illinois</option>
              <option value="IA">Iowa</option>
              <option value="KS">Kansas</option>
              <option value="KY">Kentucky</option>
              <option value="LA">Louisiana</option>
              <option value="MN">Minnesota</option>
              <option value="MS">Mississippi</option>
              <option value="MO">Missouri</option>
              <option value="OK">Oklahoma</option>
              <option value="SD">South Dakota</option>
              <option value="TX">Texas</option>
              <option value="TN">Tennessee</option>
              <option value="WI">Wisconsin</option>
            </optgroup>
            <optgroup label="Eastern Time Zone">
              <option value="CT">Connecticut</option>
              <option value="DE">Delaware</option>
              <option value="FL">Florida</option>
              <option value="GA">Georgia</option>
              <option value="IN">Indiana</option>
              <option value="ME">Maine</option>
              <option value="MD">Maryland</option>
              <option value="MA">Massachusetts</option>
              <option value="MI">Michigan</option>
              <option value="NH">New Hampshire</option><option value="NJ">New Jersey</option>
              <option value="NY">New York</option>
              <option value="NC">North Carolina</option>
              <option value="OH">Ohio</option>
              <option value="PA">Pennsylvania</option><option value="RI">Rhode Island</option><option value="SC">South Carolina</option>
              <option value="VT">Vermont</option><option value="VA">Virginia</option>
              <option value="WV">West Virginia</option>
            </optgroup>
          </select>

        Select2 append

          <select id="single-append-text" class="form-control select2-allow-clear" ui-jp="select2" ui-options="{theme: 'bootstrap'}">

            <optgroup label="Alaskan/Hawaiian Time Zone">
              <option value="AK">Alaska</option>
              <option value="HI" disabled="disabled">Hawaii</option>
            </optgroup>
            <optgroup label="Pacific Time Zone">
              <option value="CA">California</option>
              <option value="NV">Nevada</option>
              <option value="OR">Oregon</option>
              <option value="WA">Washington</option>
            </optgroup>
            <optgroup label="Mountain Time Zone">
              <option value="AZ">Arizona</option>
              <option value="CO">Colorado</option>
              <option value="ID">Idaho</option>
              <option value="MT">Montana</option><option value="NE">Nebraska</option>
              <option value="NM">New Mexico</option>
              <option value="ND">North Dakota</option>
              <option value="UT">Utah</option>
              <option value="WY">Wyoming</option>
            </optgroup>
            <optgroup label="Central Time Zone">
              <option value="AL">Alabama</option>
              <option value="AR">Arkansas</option>
              <option value="IL">Illinois</option>
              <option value="IA">Iowa</option>
              <option value="KS">Kansas</option>
              <option value="KY">Kentucky</option>
              <option value="LA">Louisiana</option>
              <option value="MN">Minnesota</option>
              <option value="MS">Mississippi</option>
              <option value="MO">Missouri</option>
              <option value="OK">Oklahoma</option>
              <option value="SD">South Dakota</option>
              <option value="TX">Texas</option>
              <option value="TN">Tennessee</option>
              <option value="WI">Wisconsin</option>
            </optgroup>
            <optgroup label="Eastern Time Zone">
              <option value="CT">Connecticut</option>
              <option value="DE">Delaware</option>
              <option value="FL">Florida</option>
              <option value="GA">Georgia</option>
              <option value="IN">Indiana</option>
              <option value="ME">Maine</option>
              <option value="MD">Maryland</option>
              <option value="MA">Massachusetts</option>
              <option value="MI">Michigan</option>
              <option value="NH">New Hampshire</option><option value="NJ">New Jersey</option>
              <option value="NY">New York</option>
              <option value="NC">North Carolina</option>
              <option value="OH">Ohio</option>
              <option value="PA">Pennsylvania</option><option value="RI">Rhode Island</option><option value="SC">South Carolina</option>
              <option value="VT">Vermont</option><option value="VA">Virginia</option>
              <option value="WV">West Virginia</option>
            </optgroup>
          </select>

            <button class="btn btn-default" type="button" data-select2-open="single-append-text">

            </button>

        Select2 prepend

            <button class="btn btn-default" type="button" data-select2-open="single-prepend-text">

            </button>

          <select id="single-prepend-text" class="form-control select2" ui-jp="select2" ui-options="{theme: 'bootstrap'}">
            <option value="A">A</option>
            <option value="B">B</option>
            <option value="C">C</option>
          </select>

        Select2 multi append

          <select id="multi-append" class="form-control select2" multiple multiple ui-jp="select2" ui-options="{theme: 'bootstrap'}">
            <option value="A">A</option>
            <option value="B">B</option>
            <option value="C">C</option>
          </select>

            <button class="btn btn-default" type="button" data-select2-open="multi-append">

            </button>

        Select2 multi prepend

            <button class="btn btn-default" type="button" data-select2-open="multi-prepend">
              State
            </button>

          <select id="multi-prepend" class="form-control select2" multiple multiple ui-jp="select2" ui-options="{theme: 'bootstrap'}">

            <optgroup label="Alaskan/Hawaiian Time Zone">
              <option value="AK">Alaska</option>
              <option value="HI" disabled="disabled">Hawaii</option>
            </optgroup>
            <optgroup label="Pacific Time Zone">
              <option value="CA">California</option>
              <option value="NV">Nevada</option>
              <option value="OR">Oregon</option>
              <option value="WA">Washington</option>
            </optgroup>
            <optgroup label="Mountain Time Zone">
              <option value="AZ">Arizona</option>
              <option value="CO">Colorado</option>
              <option value="ID">Idaho</option>
              <option value="MT">Montana</option><option value="NE">Nebraska</option>
              <option value="NM">New Mexico</option>
              <option value="ND">North Dakota</option>
              <option value="UT">Utah</option>
              <option value="WY">Wyoming</option>
            </optgroup>
            <optgroup label="Central Time Zone">
              <option value="AL">Alabama</option>
              <option value="AR">Arkansas</option>
              <option value="IL">Illinois</option>
              <option value="IA">Iowa</option>
              <option value="KS">Kansas</option>
              <option value="KY">Kentucky</option>
              <option value="LA">Louisiana</option>
              <option value="MN">Minnesota</option>
              <option value="MS">Mississippi</option>
              <option value="MO">Missouri</option>
              <option value="OK">Oklahoma</option>
              <option value="SD">South Dakota</option>
              <option value="TX">Texas</option>
              <option value="TN">Tennessee</option>
              <option value="WI">Wisconsin</option>
            </optgroup>
            <optgroup label="Eastern Time Zone">
              <option value="CT">Connecticut</option>
              <option value="DE">Delaware</option>
              <option value="FL">Florida</option>
              <option value="GA">Georgia</option>
              <option value="IN">Indiana</option>
              <option value="ME">Maine</option>
              <option value="MD">Maryland</option>
              <option value="MA">Massachusetts</option>
              <option value="MI">Michigan</option>
              <option value="NH">New Hampshire</option><option value="NJ">New Jersey</option>
              <option value="NY">New York</option>
              <option value="NC">North Carolina</option>
              <option value="OH">Ohio</option>
              <option value="PA">Pennsylvania</option><option value="RI">Rhode Island</option><option value="SC">South Carolina</option>
              <option value="VT">Vermont</option><option value="VA">Virginia</option>
              <option value="WV">West Virginia</option>
            </optgroup>
          </select>

Button Addons

Used in context with Bootstrap's Button Addons.

              <button class="btn btn-default" type="button" data-select2-open="select2-button-addons-single-input-group-sm">
                State
              </button>

            <select class="form-control select2-multiple" multiple ui-jp="select2" ui-options="{theme: 'bootstrap'}">
              <optgroup label="Alaskan/Hawaiian Time Zone">
                <option value="AK">Alaska</option>
                <option value="HI" disabled="disabled">Hawaii</option>
              </optgroup>
              <optgroup label="Pacific Time Zone">
                <option value="CA">California</option>
                <option value="NV">Nevada</option>
                <option value="OR">Oregon</option>
                <option value="WA">Washington</option>
              </optgroup>
              <optgroup label="Mountain Time Zone">
                <option value="AZ">Arizona</option>
                <option value="CO">Colorado</option>
                <option value="ID">Idaho</option>
                <option value="MT">Montana</option><option value="NE">Nebraska</option>
                <option value="NM">New Mexico</option>
                <option value="ND">North Dakota</option>
                <option value="UT">Utah</option>
                <option value="WY">Wyoming</option>
              </optgroup>
              <optgroup label="Central Time Zone">
                <option value="AL">Alabama</option>
                <option value="AR">Arkansas</option>
                <option value="IL">Illinois</option>
                <option value="IA">Iowa</option>
                <option value="KS">Kansas</option>
                <option value="KY">Kentucky</option>
                <option value="LA">Louisiana</option>
                <option value="MN">Minnesota</option>
                <option value="MS">Mississippi</option>
                <option value="MO">Missouri</option>
                <option value="OK">Oklahoma</option>
                <option value="SD">South Dakota</option>
                <option value="TX">Texas</option>
                <option value="TN">Tennessee</option>
                <option value="WI">Wisconsin</option>
              </optgroup>
              <optgroup label="Eastern Time Zone">
                <option value="CT">Connecticut</option>
                <option value="DE">Delaware</option>
                <option value="FL">Florida</option>
                <option value="GA">Georgia</option>
                <option value="IN">Indiana</option>
                <option value="ME">Maine</option>
                <option value="MD">Maryland</option>
                <option value="MA">Massachusetts</option>
                <option value="MI">Michigan</option>
                <option value="NH">New Hampshire</option><option value="NJ">New Jersey</option>
                <option value="NY">New York</option>
                <option value="NC">North Carolina</option>
                <option value="OH">Ohio</option>
                <option value="PA">Pennsylvania</option><option value="RI">Rhode Island</option><option value="SC">South Carolina</option>
                <option value="VT">Vermont</option><option value="VA">Virginia</option>
                <option value="WV">West Virginia</option>
              </optgroup>
            </select>

              <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
                Action
              </button>

Action

Another action

Something else here

Separated link

            <select id="select2-button-addons-multiple-input-group-sm" class="form-control select2-multiple" multiple ui-jp="select2" ui-options="{theme: 'bootstrap'}">
              <optgroup label="Alaskan/Hawaiian Time Zone">
                <option value="AK">Alaska</option>
                <option value="HI" disabled="disabled">Hawaii</option>
              </optgroup>
              <optgroup label="Pacific Time Zone">
                <option value="CA">California</option>
                <option value="NV">Nevada</option>
                <option value="OR">Oregon</option>
                <option value="WA">Washington</option>
              </optgroup>
              <optgroup label="Mountain Time Zone">
                <option value="AZ">Arizona</option>
                <option value="CO">Colorado</option>
                <option value="ID">Idaho</option>
                <option value="MT">Montana</option><option value="NE">Nebraska</option>
                <option value="NM">New Mexico</option>
                <option value="ND">North Dakota</option>
                <option value="UT">Utah</option>
                <option value="WY">Wyoming</option>
              </optgroup>
              <optgroup label="Central Time Zone">
                <option value="AL">Alabama</option>
                <option value="AR">Arkansas</option>
                <option value="IL">Illinois</option>
                <option value="IA">Iowa</option>
                <option value="KS">Kansas</option>
                <option value="KY">Kentucky</option>
                <option value="LA">Louisiana</option>
                <option value="MN">Minnesota</option>
                <option value="MS">Mississippi</option>
                <option value="MO">Missouri</option>
                <option value="OK">Oklahoma</option>
                <option value="SD">South Dakota</option>
                <option value="TX">Texas</option>
                <option value="TN">Tennessee</option>
                <option value="WI">Wisconsin</option>
              </optgroup>
              <optgroup label="Eastern Time Zone">
                <option value="CT">Connecticut</option>
                <option value="DE">Delaware</option>
                <option value="FL">Florida</option>
                <option value="GA">Georgia</option>
                <option value="IN">Indiana</option>
                <option value="ME">Maine</option>
                <option value="MD">Maryland</option>
                <option value="MA">Massachusetts</option>
                <option value="MI">Michigan</option>
                <option value="NH">New Hampshire</option><option value="NJ">New Jersey</option>
                <option value="NY">New York</option>
                <option value="NC">North Carolina</option>
                <option value="OH">Ohio</option>
                <option value="PA">Pennsylvania</option><option value="RI">Rhode Island</option><option value="SC">South Carolina</option>
                <option value="VT">Vermont</option><option value="VA">Virginia</option>
                <option value="WV">West Virginia</option>
              </optgroup>
            </select>

              <button class="btn btn-default" type="button" data-select2-open="select2-input-group-append">

              </button>

            <select id="select2-input-group-append" class="form-control select2-multiple m-b" multiple ui-jp="select2" ui-options="{theme: 'bootstrap'}">
              <optgroup label="Alaskan/Hawaiian Time Zone">
                <option value="AK">Alaska</option>
                <option value="HI" disabled="disabled">Hawaii</option>
              </optgroup>
              <optgroup label="Pacific Time Zone">
                <option value="CA">California</option>
                <option value="NV">Nevada</option>
                <option value="OR">Oregon</option>
                <option value="WA">Washington</option>
              </optgroup>
              <optgroup label="Mountain Time Zone">
                <option value="AZ">Arizona</option>
                <option value="CO">Colorado</option>
                <option value="ID">Idaho</option>
                <option value="MT">Montana</option><option value="NE">Nebraska</option>
                <option value="NM">New Mexico</option>
                <option value="ND">North Dakota</option>
                <option value="UT">Utah</option>
                <option value="WY">Wyoming</option>
              </optgroup>
              <optgroup label="Central Time Zone">
                <option value="AL">Alabama</option>
                <option value="AR">Arkansas</option>
                <option value="IL">Illinois</option>
                <option value="IA">Iowa</option>
                <option value="KS">Kansas</option>
                <option value="KY">Kentucky</option>
                <option value="LA">Louisiana</option>
                <option value="MN">Minnesota</option>
                <option value="MS">Mississippi</option>
                <option value="MO">Missouri</option>
                <option value="OK">Oklahoma</option>
                <option value="SD">South Dakota</option>
                <option value="TX">Texas</option>
                <option value="TN">Tennessee</option>
                <option value="WI">Wisconsin</option>
              </optgroup>
              <optgroup label="Eastern Time Zone">
                <option value="CT">Connecticut</option>
                <option value="DE">Delaware</option>
                <option value="FL">Florida</option>
                <option value="GA">Georgia</option>
                <option value="IN">Indiana</option>
                <option value="ME">Maine</option>
                <option value="MD">Maryland</option>
                <option value="MA">Massachusetts</option>
                <option value="MI">Michigan</option>
                <option value="NH">New Hampshire</option><option value="NJ">New Jersey</option>
                <option value="NY">New York</option>
                <option value="NC">North Carolina</option>
                <option value="OH">Ohio</option>
                <option value="PA">Pennsylvania</option><option value="RI">Rhode Island</option><option value="SC">South Carolina</option>
                <option value="VT">Vermont</option><option value="VA">Virginia</option>
                <option value="WV">West Virginia</option>
              </optgroup>
            </select>

              <button class="btn btn-default" type="button" data-select2-open="select2-button-addons-multi-input-group-lg">

              </button>

            <select id="select2-button-addons-multi-input-group-lg" class="form-control select2-multiple" multiple ui-jp="select2" ui-options="{theme: 'bootstrap'}">
              <optgroup label="Alaskan/Hawaiian Time Zone">
                <option value="AK">Alaska</option>
                <option value="HI" disabled="disabled">Hawaii</option>
              </optgroup>
              <optgroup label="Pacific Time Zone">
                <option value="CA">California</option>
                <option value="NV">Nevada</option>
                <option value="OR">Oregon</option>
                <option value="WA">Washington</option>
              </optgroup>
              <optgroup label="Mountain Time Zone">
                <option value="AZ">Arizona</option>
                <option value="CO">Colorado</option>
                <option value="ID">Idaho</option>
                <option value="MT">Montana</option><option value="NE">Nebraska</option>
                <option value="NM">New Mexico</option>
                <option value="ND">North Dakota</option>
                <option value="UT">Utah</option>
                <option value="WY">Wyoming</option>
              </optgroup>
              <optgroup label="Central Time Zone">
                <option value="AL">Alabama</option>
                <option value="AR">Arkansas</option>
                <option value="IL">Illinois</option>
                <option value="IA">Iowa</option>
                <option value="KS">Kansas</option>
                <option value="KY">Kentucky</option>
                <option value="LA">Louisiana</option>
                <option value="MN">Minnesota</option>
                <option value="MS">Mississippi</option>
                <option value="MO">Missouri</option>
                <option value="OK">Oklahoma</option>
                <option value="SD">South Dakota</option>
                <option value="TX">Texas</option>
                <option value="TN">Tennessee</option>
                <option value="WI">Wisconsin</option>
              </optgroup>
              <optgroup label="Eastern Time Zone">
                <option value="CT">Connecticut</option>
                <option value="DE">Delaware</option>
                <option value="FL">Florida</option>
                <option value="GA">Georgia</option>
                <option value="IN">Indiana</option>
                <option value="ME">Maine</option>
                <option value="MD">Maryland</option>
                <option value="MA">Massachusetts</option>
                <option value="MI">Michigan</option>
                <option value="NH">New Hampshire</option><option value="NJ">New Jersey</option>
                <option value="NY">New York</option>
                <option value="NC">North Carolina</option>
                <option value="OH">Ohio</option>
                <option value="PA">Pennsylvania</option><option value="RI">Rhode Island</option><option value="SC">South Carolina</option>
                <option value="VT">Vermont</option><option value="VA">Virginia</option>
                <option value="WV">West Virginia</option>
              </optgroup>

            </select>

Theme Switcher

            <input type="checkbox">

            Folded Aside

            <input type="checkbox">

            Boxed Layout

Colors:

            <input type="radio" name="color" value="1">

            <input type="radio" name="color" value="2">

            <input type="radio" name="color" value="3">

            <input type="radio" name="color" value="4">

            <input type="radio" name="color" value="5">

            <input type="radio" name="color" value="6">

            <input type="radio" name="color" value="7">

            <input type="radio" name="color" value="8">

Themes:

            <input type="radio" name="theme" value="" hidden>
            Light

            <input type="radio" name="theme" value="grey" hidden>
            Grey

            <input type="radio" name="theme" value="dark" hidden>
            Dark

            <input type="radio" name="theme" value="black" hidden>
            Black

Demos

            Default

            Zero

            One

            Two

            Three

            Four


text:
'''
Created on Jul 17, 2016

@author: leem42

'''

class MathOperator(object):
    '''
    Class MathOperator performs basic mathematical operations, namely
    add, subtract, divide, and multiply
    '''
    def __init__(self, params):
        '''
        Constructor
        '''

    def multiply(self, arg1, arg2):
        '''
        Args:
        arg1(double): The first number being multiplied
        arg2(double): The second number being multiplied

        Returns:
        returns the multiplicative value of arg1 and arg2

        Raises:
        ValueError: If `arg1` or `arg2` is None.

        '''
        #TODO
        return 1

    def divide(self,arg1,arg2):
        #TODO
        return 1

    def add(self,arg1,arg2):
        #TODO
        return 1

    def substract(self,arg1,arg2):
        #TODO
        return 1

redpajama_set_name: RedPajamaGithub


text:
@interface adoptViewTableViewCell : UITableViewCell

@property (strong, nonatomic) IBOutlet UIView *viewBound;
@property (strong, nonatomic) IBOutlet UIImageView *imgViewIcon;
@property (strong, nonatomic) IBOutlet UIImageView *imgViewPhoto;
@property (strong, nonatomic) IBOutlet UILabel *labelName;
@property (strong, nonatomic) IBOutlet UILabel *labelSex;
@property (strong, nonatomic) IBOutlet UILabel *labelAge;
@property (strong, nonatomic) IBOutlet UILabel *labelType;
@property (strong, nonatomic) IBOutlet FUIButton *btnFavirite;

//- (DOFavoriteButton *)returnSwiftClassInstance;

@end


text:
package com.github.orderbyhelper.sqlsource;

import com.github.orderbyhelper.OrderByHelper;
import com.github.orderbyhelper.OrderByParser;
import org.apache.ibatis.builder.StaticSqlSource;
import org.apache.ibatis.mapping.BoundSql;
import org.apache.ibatis.mapping.ParameterMapping;
import org.apache.ibatis.mapping.SqlSource;
import org.apache.ibatis.reflection.MetaObject;
import org.apache.ibatis.reflection.SystemMetaObject;
import org.apache.ibatis.session.Configuration;

import java.util.List;

/**
 * 描述信息
 *
 * @author liuzh
 * @since 2015-06-26
 */
public class OrderByStaticSqlSource implements SqlSource, OrderBySqlSource {
    private String sql;
    private List<ParameterMapping> parameterMappings;
    private Configuration configuration;
    private SqlSource original;

    public OrderByStaticSqlSource(StaticSqlSource sqlSource) {
        MetaObject metaObject = SystemMetaObject.forObject(sqlSource);
        this.sql = (String) metaObject.getValue("sql");
        this.parameterMappings = (List<ParameterMapping>) metaObject.getValue("parameterMappings");
        this.configuration = (Configuration) metaObject.getValue("configuration");
        this.original = sqlSource;
    }

    public BoundSql getBoundSql(Object parameterObject) {
        String orderBy = OrderByHelper.getOrderBy();
        String tempSql = sql;
        if (orderBy != null) {
            tempSql = OrderByParser.converToOrderBySql(sql, orderBy);
        }
        return new BoundSql(configuration, tempSql, parameterMappings, parameterObject);
    }

    public SqlSource getOriginal() {
        return original;
    }

}


text:
using SuccincT.Functional;
using SuccincT.Unions;
using System;
using static SuccincT.Unions.None;

namespace SuccincT.Options
{
    /// <summary>
    /// Provides an optional value of type T. Modeled on F# options. Either contains a T value, or None.
    /// </summary>
    public readonly struct Option<T>
    {
        private readonly T _value;

        public Option(T value) => (HasValue, _value) = (value is {}, value);

        /// <summary>
        /// Creates an instance of an option with no value.
        /// </summary>
        public static Option<T> None() => default;

        /// <summary>
        /// Creates an instance of option with the specified value.
        /// </summary>
        public static Option<T> Some(T value) => value is {} valid
            ? new Option<T>(valid)
            : throw new ArgumentNullException(
                nameof(value),
                "null cannot be used with Option<T>.Some() as null is equivalent to None.\n" +
                "Please use Option<T>.None() or new Option<T>(null) instead.");

        /// <summary>
        /// Provides a fluent matcher that ultimately (upon Result() being called) returns a TResult value
        /// by invoking the function associated with the match.
        /// </summary>
        public IOptionFuncMatcher<T, TResult> Match<TResult>() => new OptionMatcher<T, TResult>(CreateUnion(), this);

        /// <summary>
        /// Provides a fluent matcher that ultimately (upon Exec() being called) invokes the Action
        /// associated with the match.
        /// </summary>
        public IOptionActionMatcher<T> Match() => new OptionMatcher<T, Unit>(CreateUnion(), this);

        /// <summary>
        /// True if created via Some(), false if via None().
        /// </summary>
        public bool HasValue { get; }

        /// <summary>
        /// The value held (if created by Some()). Will throw an InvalidOperationException if created via None().
        /// </summary>
        public T Value => HasValue ? _value : throw new InvalidOperationException("Option contains no value.");

        public T ValueOrDefault => HasValue ? _value : default!;

        public override bool Equals(object obj)
            => obj is Option<T> option ? EqualsOption(option) : obj is null && !HasValue;

        private bool EqualsOption(Option<T> other)
            => HasValue && other.HasValue && Value is {} value && value.Equals(other.Value) ||
               !(HasValue || other.HasValue);

        public override int GetHashCode() => HasValue && _value is {} value ? value.GetHashCode() : 0;

        public static bool operator ==(Option<T> a, Option<T> b) => a.EqualsOption(b);

        public static bool operator !=(Option<T> a, Option<T> b) => !a.EqualsOption(b);

        public static implicit operator Option<T>(T value) => new Option<T>(value);

        public void Deconstruct(out Option state, out T value)
            => (state, value) = (HasValue ? Option.Some : Option.None, _value);

        private Union<T, None> CreateUnion() => HasValue ? new Union<T, None>(_value) : new Union<T, None>(none);
    }
}


text:
package com.hp.autonomy.aci.content.fieldtext;

import org.apache.commons.lang.StringUtils;

import java.time.ZonedDateTime;
import java.time.format.DateTimeFormatter;
import java.time.temporal.ChronoUnit;
import java.util.Arrays;
import java.util.Collections;
import java.util.Optional;

@SuppressWarnings({"WeakerAccess", "ClassWithTooManyConstructors"})
public class RANGE extends Specifier {
    public RANGE(final String field, final Long min, final Long max, final Type type) {
        this(Collections.singletonList(field), min, max, type);
    }

    public RANGE(final String field, final ZonedDateTime min, final ZonedDateTime max) {
        this(Collections.singletonList(field), min, max);
    }

    public RANGE(final String[] fields, final Long min, final Long max, final Type type) {
        this(Arrays.asList(fields), min, max, type);
    }

    public RANGE(final String[] fields, final ZonedDateTime min, final ZonedDateTime max) {
        this(Arrays.asList(fields), min, max);
    }

    public RANGE(final Iterable<? extends String> fields, final Long min, final Long max, final Type type) {
        super("RANGE", fields, constructRangeParam(min, type), constructRangeParam(max, type));
    }

    public RANGE(final Iterable<? extends String> fields, final ZonedDateTime min, final ZonedDateTime max) {
        super("RANGE", fields, formatDate(min), formatDate(max));
    }

    private static String constructRangeParam(final Long param, final Type type) {
        return Optional.ofNullable(param).map(type::getParam).orElse(".");
    }

    private static String formatDate(final ZonedDateTime param) {
        // IDOL ISO date time does not have a year 0 whereas Java ISO date time does
        return DateTimeFormatter.ISO_INSTANT
            .format(param.truncatedTo(ChronoUnit.SECONDS));
    }

    @Override
    protected String getValuesString() {
        return StringUtils.join(getValues(), ',');
    }

    public enum Type {
        DAYS {
            @Override
            protected String getParam(final Long param) {
                return String.valueOf(param);
            }
        },
        SECONDS {
            @Override
            protected String getParam(final Long param) {
                return param + "s";
            }
        },
        EPOCH {
            @Override
            protected String getParam(final Long param) {
                return param / 1000 + "e";
            }
        };

        protected abstract String getParam(final Long value);
    }
}


text:
// This file is automatically generated.

package adila.db;

/*
 * Samsung Galaxy Tab 3 7.0
 *
 * DEVICE: lt02wifilgt
 * MODEL: SM-T210L
 */
final class lt02wifilgt {
    public static final String DATA = "Samsung|Galaxy Tab 3 7.0|Galaxy Tab";
}


text:
package com.websystique.springbatch;

import java.io.File;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;

import org.springframework.batch.core.JobExecution;
import org.springframework.batch.core.JobExecutionException;
import org.springframework.batch.core.JobParameter;
import org.springframework.batch.core.JobParameters;
import org.springframework.batch.core.configuration.JobLocator;
import org.springframework.batch.core.launch.JobLauncher;

public class SpringBatchJob {
	private String jobName;
	private JobLocator jobLocator;
	private JobLauncher jobLauncher;
	private File contentDirectory;
	private String directoryPath = "E:/inputFiles";

	public void init() {
		contentDirectory = new File(directoryPath);
	}

	boolean fileFound = false;

	public void performJob() {
		System.out.println("Starting ExamResult Job");
		try {
			if (contentDirectory == null || !contentDirectory.isDirectory()) {
				System.err
						.println("Input directory doesn't exist. Job ExamResult terminated");
			}
			fileFound = false;
			for (File file : contentDirectory.listFiles()) {
				if (file.isFile()) {
					System.out.println("File found :" + file.getAbsolutePath());
					fileFound = true;
					JobParameter param = new JobParameter(
							file.getAbsolutePath());
					Map<String, JobParameter> map = new HashMap<String, JobParameter>();
					map.put("examResultInputFile", param);
					map.put("date", new JobParameter(new Date()));
					JobExecution result = jobLauncher.run(
							jobLocator.getJob(jobName), new JobParameters(map));
					System.out.println("ExamResult Job completetion details : "
							+ result.toString());
				}
			}
			if (!fileFound) {
				System.out.println("No Input file found, Job terminated.");
			}
		} catch (JobExecutionException ex) {
			System.out
					.println("ExamResult Job halted with following excpetion :"
							+ ex);
		}
	}

	public void setJobName(String jobName) {
		this.jobName = jobName;
	}

	public void setJobLocator(JobLocator jobLocator) {
		this.jobLocator = jobLocator;
	}

	public void setJobLauncher(JobLauncher jobLauncher) {
		this.jobLauncher = jobLauncher;
	}
}


text:
#include <itkImageFileWriter.h>
#include <itkNiftiImageIO.h>
#include <itkImageRegionIterator.h>
#include <itkImageDuplicator.h>
using namespace std;

typedef itk::Image< unsigned char, 3 >	BinaryImageType;
typedef ImageType::IndexType IndexType;
typedef itk::Point< double, 3 > PointType;
typedef itk::ImageFileWriter< BinaryImageType > WriterType;
typedef itk::ImageDuplicator< ImageType > DuplicatorType;

typedef itk::SpatialOrientation::ValidCoordinateOrientationFlags OrientationType;

SpinalCord::SpinalCord()
{
	radialResolution_ = 0;
	centerline_ = new vector<CVector3>(0);
	crossSectionalArea_ = new vector<double>(0);
	length_ = 0.0;
}

SpinalCord::~SpinalCord()
{
	delete centerline_, crossSectionalArea_;
}

SpinalCord::SpinalCord(const SpinalCord& sp): Mesh(sp)
{
	radialResolution_ = sp.radialResolution_;
	centerline_ = new vector<CVector3>(*sp.centerline_);
	crossSectionalArea_ = new vector<double>(*sp.crossSectionalArea_);
	length_ = sp.length_;
}

SpinalCord::SpinalCord(const Mesh& m): Mesh(m)
{
	radialResolution_ = 0;
	centerline_ = new vector<CVector3>(0);
	crossSectionalArea_ = new vector<double>(0);
	length_ = 0.0;
}

void SpinalCord::Initialize(int radialResolution)
{
	radialResolution_ = radialResolution;
	centerline_ = new vector<CVector3>(0);
	crossSectionalArea_ = new vector<double>(0);
	length_ = 0.0;
}

vector<CVector3> SpinalCord::computeCenterline(bool saveFile, string filename)
{
	unsigned int numberDisks = points_.size()/radialResolution_;
	centerline_ = new vector<CVector3>(numberDisks);
	for (unsigned int i=0; i<numberDisks; i++)
	{
		CVector3 result;
		for (int k=0; k<radialResolution_; k++)
			result += points_[i*radialResolution_+k]->getPosition();
		result /= (double)radialResolution_;
		(*centerline_)[i] = result;
	}

	// compute length of spinal cord
	double length = 0.0;
	for (unsigned int i=0; i<centerline_->size()-1; i++)
		length += ((*centerline_)[i+1]-(*centerline_)[i]).Norm();
	length_ = length;

	if (saveFile) saveCenterline(filename);

	return *centerline_;
}

// need centerline computed
vector<double> SpinalCord::computeApproximateCircleRadius()
{
	// To determine approximate circle radius of disks, we have two solutions :
	// 1. take minimal distance of points to centerline
	// 2. take mean distance of points to centerline
	unsigned int numberDisks = points_.size()/radialResolution_;
	vector<double> *result = new vector<double>(numberDisks);
	for (unsigned int i=0; i<numberDisks; i++)
	{
		double minDistance = 10000.0, currentDistance;
		for (int k=0; k<radialResolution_; k++)
		{
			currentDistance = points_[i*radialResolution_+k]->distance((*centerline_)[i][0],(*centerline_)[i][1],(*centerline_)[i][2]);
			if (currentDistance < minDistance)
				minDistance = currentDistance;
		}
		(*result)[i] = minDistance;
	}
	return *result;
}

void SpinalCord::subdivision()
{
	subdivisionAxiale();
	subdivisionRadiale();
}

void SpinalCord::subdivisionAxiale()
{
	// On ajoute tout d'abord le premier disque. Ensuite, pour chaque bande, on ajoute un nouveau disque au milieu
	int numberOfDisks = getNbrOfPoints()/radialResolution_;
	vector<Vertex*> copyPoints = getListPoints(), points(copyPoints.size());
	for (unsigned int k=0; k<copyPoints.size(); k++)
		points[k] = new Vertex(*copyPoints[k]);
	this->clear();
	// Ajout du premier disque
	for (int i=0; i<radialResolution_; i++)
		addPoint(points[i]);
	// Ajout des disques suivant en subdivisiant
	for (int i=1; i<numberOfDisks; i++)
	{
		int offsetPoint = getNbrOfPoints(), offsetTriangles = getNbrOfTriangles();
		// Ajout des points intermédiaires
		for (int k=0; k<radialResolution_; k++)
			addPoint(new Vertex((points[i*radialResolution_+k]->getPosition()+points[(i-1)*radialResolution_+k]->getPosition())/2));
		// Ajout de la nouvelle bande de triangles
		for (int k=0; k<radialResolution_-1; k++)
		{
			addTriangle(offsetPoint-radialResolution_+k,offsetPoint-radialResolution_+k+1,offsetPoint+k);
			addTriangle(offsetPoint-radialResolution_+k+1,offsetPoint+k+1,offsetPoint+k);
		}
		// Adding two last triangles to close tube
		addTriangle(offsetPoint-radialResolution_+radialResolution_-1,offsetPoint-radialResolution_,offsetPoint+radialResolution_-1);
		addTriangle(offsetPoint-radialResolution_,offsetPoint,offsetPoint+radialResolution_-1);

		// Adding existing points
		offsetPoint = getNbrOfPoints();
		for (int k=0; k<radialResolution_; k++)
			addPoint(points[i*radialResolution_+k]);
		// Ajout de la nouvelle bande de triangles
		for (int k=0; k<radialResolution_-1; k++)
		{
			addTriangle(offsetPoint-radialResolution_+k,offsetPoint-radialResolution_+k+1,offsetPoint+k);
			addTriangle(offsetPoint-radialResolution_+k+1,offsetPoint+k+1,offsetPoint+k);
		}
		// Ajout des deux derniers triangles pour fermer le tube
		addTriangle(offsetPoint-radialResolution_+radialResolution_-1,offsetPoint-radialResolution_,offsetPoint+radialResolution_-1);
		addTriangle(offsetPoint-radialResolution_,offsetPoint,offsetPoint+radialResolution_-1);
	}
}

void SpinalCord::subdivisionRadiale()
{
	// Pour chaque disque, on doit ajouter un point entre deux points. La résolution radiale de sortie est donc 2*resolutionRadiale
	int numberOfDisks = getNbrOfPoints()/radialResolution_, newRadialResolution = 2*radialResolution_;
	vector<Vertex*> copyPoints = getListPoints(), points(copyPoints.size());
	for (unsigned int k=0; k<copyPoints.size(); k++)
		points[k] = new Vertex(*copyPoints[k]);
	this->clear();
	// Ajout du premier disque - Attention au dernier point
	for (int i=0; i<radialResolution_-1; i++)
	{
		addPoint(points[i]);
		addPoint(new Vertex((points[i]->getPosition()+points[i+1]->getPosition())/2));
	}
	addPoint(points[radialResolution_-1]); // Ajout des deux derniers points
	addPoint(new Vertex((points[radialResolution_-1]->getPosition()+points[0]->getPosition())/2));
	// Ajout des disques suivant en subdivisiant
	for (int i=1; i<numberOfDisks; i++)
	{
		int offsetPoint = getNbrOfPoints(), offsetTriangles = getNbrOfTriangles();
		// Ajout des points intermédiaires
		for (int k=0; k<radialResolution_-1; k++)
		{
			addPoint(points[i*radialResolution_+k]);
			addPoint(new Vertex((points[i*radialResolution_+k]->getPosition()+points[i*radialResolution_+k+1]->getPosition())/2));
		}
		addPoint(points[i*radialResolution_+radialResolution_-1]); // Ajout des deux derniers points
		addPoint(new Vertex((points[i*radialResolution_+radialResolution_-1]->getPosition()+points[i*radialResolution_]->getPosition())/2));
		// Ajout de la nouvelle bande de triangles
		for (int k=0; k<newRadialResolution-1; k++)
		{
			addTriangle(offsetPoint-newRadialResolution+k,offsetPoint-newRadialResolution+k+1,offsetPoint+k);
			addTriangle(offsetPoint-newRadialResolution+k+1,offsetPoint+k+1,offsetPoint+k);
		}
		// Ajout des deux derniers triangles pour fermer le tube
		addTriangle(offsetPoint-newRadialResolution+newRadialResolution-1,offsetPoint-newRadialResolution,offsetPoint+newRadialResolution-1);
		addTriangle(offsetPoint-newRadialResolution,offsetPoint,offsetPoint+newRadialResolution-1);
	}
	radialResolution_ = newRadialResolution;
}

void SpinalCord::saveCenterlineAsBinaryImage(ImageType::Pointer im, string filename, OrientationType orient)
{
	BinaryImageType::Pointer binaryCenterline = BinaryImageType::New();
	ImageType::RegionType region;
	ImageType::IndexType start;
	start[0] = 0; start[1] = 0; start[2] = 0;
	ImageType::SizeType size, imSize = im->GetLargestPossibleRegion().GetSize();
	size[0] = imSize[0]; size[1] = imSize[1]; size[2] = imSize[2];
	region.SetSize(size);
	region.SetIndex(start);
	binaryCenterline->CopyInformation(im);
	binaryCenterline->SetRegions(region);
	binaryCenterline->Allocate();
	binaryCenterline->FillBuffer(false);

	for (unsigned int i=0; i<centerline_->size(); i++)
	{
		PointType pt; pt[0] = (*centerline_)[i][0]; pt[1] = (*centerline_)[i][1]; pt[2] = (*centerline_)[i][2];
		IndexType ind;
		if (im->TransformPhysicalPointToIndex(pt,ind))
			binaryCenterline->SetPixel(ind,true);
	}

    OrientImage<BinaryImageType> orientationFilter;
    orientationFilter.setInputImage(binaryCenterline);
    orientationFilter.orientation(orient);
    binaryCenterline = orientationFilter.getOutputImage();

	WriterType::Pointer writer = WriterType::New();
	itk::NiftiImageIO::Pointer io = itk::NiftiImageIO::New();
	writer->SetImageIO(io);
	writer->SetFileName(filename+"_CenterlineBinaryImage.nii");
	writer->SetInput(binaryCenterline);
	try {
		writer->Write();
	} catch( itk::ExceptionObject & e ) {
		std::cerr << "Exception caught while writing image " << std::endl;
		std::cerr << e << std::endl;
	}
}

void SpinalCord::saveCenterline(string filename)
{
	ofstream myfile;
	filename += "_centerline.txt";
	myfile.open(filename.c_str());
	for (unsigned int i=0; i<centerline_->size(); i++)
		myfile << (*centerline_)[i][0] << " " << (*centerline_)[i][1] << " " << (*centerline_)[i][2] << endl;
	myfile.close();
}

vector<double> SpinalCord::computeCrossSectionalArea(bool saveFile, string filename)
{
	if (centerline_->size() == 0) computeCenterline();
	crossSectionalArea_ = new vector<double>(centerline_->size());

	// create polyData from points and triangles from mesh
	vtkSmartPointer<vtkPoints> points = vtkSmartPointer<vtkPoints>::New();
	vtkSmartPointer<vtkDoubleArray> pointNormalsArray = vtkSmartPointer<vtkDoubleArray>::New();
	pointNormalsArray->SetNumberOfComponents(3); //3d normals (ie x,y,z)
	pointNormalsArray->SetNumberOfTuples(points_.size());
	CVector3 p, n;
	for (unsigned int i=0; i<points_.size(); i++) {
		p = points_[i]->getPosition();
		n = points_[i]->getNormal();
		points->InsertNextPoint(p[0],p[1],p[2]);
		pointNormalsArray->SetTuple3(i, n[0], n[1], n[2]) ;
	}
	vtkSmartPointer<vtkPolyData> source = vtkSmartPointer<vtkPolyData>::New();
	source->SetPoints(points);
	source->GetPointData()->SetNormals(pointNormalsArray);
	source->Allocate(triangles_.size());
	for (unsigned int i=0; i<triangles_.size(); i+=3) {
		vtkIdType pts[3] = {triangles_[i],triangles_[i+1],triangles_[i+2]};
		source->InsertNextCell(VTK_TRIANGLE,3,pts);
	}

	// Computing area of cross-section. First and last values ar certainly wrong. Firstly because of the orientatation of points at the end of the mesh and for the last one, because of approximation of normal
	CVector3 point, normal;
	vtkSmartPointer<vtkPlane> plane = vtkSmartPointer<vtkPlane>::New();
	vtkSmartPointer<vtkCutter> cutter = vtkSmartPointer<vtkCutter>::New();
	vtkSmartPointer<vtkContourTriangulator> triangleFilter = vtkSmartPointer<vtkContourTriangulator>::New();
	vtkSmartPointer<vtkMassProperties> areaEvaluator = vtkSmartPointer<vtkMassProperties>::New();
	cutter->SetInputData(source);
	for (unsigned int i=1; i<centerline_->size()-3; i++)
	{
		point = (*centerline_)[i];
		normal = ((*centerline_)[i+3]-point).Normalize();
		plane->SetOrigin(point[0],point[1],point[2]);
		plane->SetNormal(normal[0],normal[1],normal[2]);
		cutter->SetCutFunction(plane);
		cutter->Update();
		triangleFilter->SetInputConnection(cutter->GetOutputPort());
		triangleFilter->Update();
		vtkSmartPointer<vtkPolyData> res = triangleFilter->GetOutput();
		areaEvaluator->SetInputConnection(triangleFilter->GetOutputPort());
		areaEvaluator->Update();
		(*crossSectionalArea_)[i] = areaEvaluator->GetSurfaceArea();
	}

	if (saveFile) saveCrossSectionalArea(filename);

	return *crossSectionalArea_;
}

double SpinalCord::computeLastCrossSectionalArea()
{
	computeCenterline();

	// create polyData from points and triangles from mesh
	vtkSmartPointer<vtkPoints> points = vtkSmartPointer<vtkPoints>::New();
	vtkSmartPointer<vtkDoubleArray> pointNormalsArray = vtkSmartPointer<vtkDoubleArray>::New();
	pointNormalsArray->SetNumberOfComponents(3); //3d normals (ie x,y,z)
	pointNormalsArray->SetNumberOfTuples(points_.size());
	CVector3 p, n;
	for (unsigned int i=0; i<points_.size(); i++) {
		p = points_[i]->getPosition();
		n = points_[i]->getNormal();
		points->InsertNextPoint(p[0],p[1],p[2]);
		pointNormalsArray->SetTuple3(i, n[0], n[1], n[2]) ;
	}
	vtkSmartPointer<vtkPolyData> source = vtkSmartPointer<vtkPolyData>::New();
	source->SetPoints(points);
	source->GetPointData()->SetNormals(pointNormalsArray);
	source->Allocate(triangles_.size());
	for (unsigned int i=0; i<triangles_.size(); i+=3) {
		vtkIdType pts[3] = {triangles_[i],triangles_[i+1],triangles_[i+2]};
		source->InsertNextCell(VTK_TRIANGLE,3,pts);
	}

	// Computing area of cross-section. First and last values ar certainly wrong. Firstly because of the orientatation of points at the end of the mesh and for the last one, because of approximation of normal
	CVector3 point, normal;
	vtkSmartPointer<vtkPlane> plane = vtkSmartPointer<vtkPlane>::New();
	vtkSmartPointer<vtkCutter> cutter = vtkSmartPointer<vtkCutter>::New();
	vtkSmartPointer<vtkContourTriangulator> triangleFilter = vtkSmartPointer<vtkContourTriangulator>::New();
	vtkSmartPointer<vtkMassProperties> areaEvaluator = vtkSmartPointer<vtkMassProperties>::New();
	cutter->SetInputData(source);

	unsigned int position = centerline_->size()/2;
	point = (*centerline_)[position];
	normal = ((*centerline_)[centerline_->size()-1]-point).Normalize();
	plane->SetOrigin(point[0],point[1],point[2]);
	plane->SetNormal(normal[0],normal[1],normal[2]);
	cutter->SetCutFunction(plane);
	cutter->Update();
	triangleFilter->SetInputConnection(cutter->GetOutputPort());
	triangleFilter->Update();
	vtkSmartPointer<vtkPolyData> res = triangleFilter->GetOutput();
	areaEvaluator->SetInputConnection(triangleFilter->GetOutputPort());
	areaEvaluator->Update();

	return areaEvaluator->GetSurfaceArea();
}

void SpinalCord::saveCrossSectionalArea(string filename)
{
	ofstream myfile;
	filename += "_CrossSectionalArea.txt";
	myfile.open(filename.c_str());
	for (unsigned int i=0; i<crossSectionalArea_->size(); i++)
		myfile << (*crossSectionalArea_)[i] << endl;
	myfile.close();
}

void SpinalCord::reduceMeshUpAndDown(CVector3 upperSlicePoint, CVector3 upperSliceNormal, CVector3 downSlicePoint, CVector3 downSliceNormal, string filename)
{
	vtkSmartPointer<vtkPoints> points = vtkSmartPointer<vtkPoints>::New();
	vtkSmartPointer<vtkDoubleArray> pointNormalsArray = vtkSmartPointer<vtkDoubleArray>::New();
	pointNormalsArray->SetNumberOfComponents(3); //3d normals (ie x,y,z)
	pointNormalsArray->SetNumberOfTuples(points_.size());
	CVector3 p, n;
	for (unsigned int i=0; i<points_.size(); i++) {
		p = points_[i]->getPosition();
		n = points_[i]->getNormal();
		points->InsertNextPoint(p[0],p[1],p[2]);
		pointNormalsArray->SetTuple3(i, n[0], n[1], n[2]) ;
	}
	vtkSmartPointer<vtkPolyData> source = vtkSmartPointer<vtkPolyData>::New();
	source->SetPoints(points);
	source->GetPointData()->SetNormals(pointNormalsArray);
	source->Allocate(triangles_.size());
	for (unsigned int i=0; i<triangles_.size(); i+=3) {
		vtkIdType pts[3] = {triangles_[i],triangles_[i+1],triangles_[i+2]};
		source->InsertNextCell(VTK_TRIANGLE,3,pts);
	}

	vtkSmartPointer<vtkPlane> downPlane = vtkSmartPointer<vtkPlane>::New(), upperPlane = vtkSmartPointer<vtkPlane>::New();
	downPlane->SetOrigin(downSlicePoint[0],downSlicePoint[1],downSlicePoint[2]);
	downPlane->SetNormal(downSliceNormal[0],downSliceNormal[1],downSliceNormal[2]);
	upperPlane->SetOrigin(upperSlicePoint[0],upperSlicePoint[1],upperSlicePoint[2]);
	upperPlane->SetNormal(upperSliceNormal[0],upperSliceNormal[1],upperSliceNormal[2]);

	vtkSmartPointer<vtkClipPolyData> downClipper = vtkSmartPointer<vtkClipPolyData>::New();
	downClipper->SetInputData(source);
	downClipper->SetClipFunction(downPlane);
	downClipper->InsideOutOn();
	downClipper->Update();

	vtkSmartPointer<vtkClipPolyData> upperClipper = vtkSmartPointer<vtkClipPolyData>::New();
	upperClipper->SetInputData(downClipper->GetOutput());
	upperClipper->SetClipFunction(upperPlane);
	upperClipper->InsideOutOn();
	upperClipper->Update();

	vtkSmartPointer<vtkPolyDataWriter> writer = vtkSmartPointer<vtkPolyDataWriter>::New();
	writer->SetFileName(filename.c_str());
	writer->SetInputData(upperClipper->GetOutput());
	writer->Write();
}


text:
<!DOCTYPE html>

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


text:
// AUTOMATICALLY GENERATED BY MIDDLECRAFT
/* Allows plugins to access server functions without needing to link the actual server Jar. */
package net.minecraft.server;

public abstract class RecipesTools {
	// FIELDS
	private java.lang.String[][] field_20158;
	private java.lang.Object[][] field_20157;

	// METHODS

	/**
	 * *
	 */
	public abstract void func_20156(CraftingManager a);

}


text:
SYNONYM

#### According to
The Catalogue of Life, 3rd January 2011

#### Published in
Monograph Brit. Ured. 216 (1889)

#### Original name
Puccinia cardui Plowr., 1889

### Remarks
null