text:
<input type="radio" class="type-maid" name="attr_char-type" value="Maid" checked="true" />Maid
<input type="radio" class="type-butler" name="attr_char-type" value="Butler" />Butler
<input type="radio" class="type-master" name="attr_char-type" value="Master" />Master

MAID RPG

MAID CHARACTER SHEET

Character Name

<input type="text" class="attr_name" name="attr_character_name">

Age

<input type="number" class="attr_age" name="attr_age">

Clothing Color

                        <input type="text" class="attr_charcolors" name="attr_colorclothes">

Eye Color

                        <input type="text" class="attr_charcolors" name="attr_coloreyes">

Hair Color

                        <input type="text" class="attr_charcolors" name="attr_colorhair">

Maid Type 1

                        <select class="attr_chartype" name="attr_maidtype1">
                            <option value="maidtype1_lolita">(1) Lolita</option>
                            <option value="maidtype1_sexy">(2) Sexy</option>
                            <option value="maidtype1_pure">(3) Pure</option>
                            <option value="maidtype1_cool">(4) Cool</option>
                            <option value="maidtype1_boyish">(5) Boyish</option>
                            <option value="maidtype1_heroine">(6) Heroine</option>
                        </select>

Maid Type 2

                        <select class="attr_chartype" name="attr_maidtype2">
                            <option value="maidtype2_lolita">(1) Lolita</option>
                            <option value="maidtype2_sexy">(2) Sexy</option>
                            <option value="maidtype2_pure">(3) Pure</option>
                            <option value="maidtype2_cool">(4) Cool</option>
                            <option value="maidtype2_boyish">(5) Boyish</option>
                            <option value="maidtype2_heroine">(6) Heroine</option>
                        </select>

            Attributes

                    <button type="roll" name="roll_athletics" value="&{template:blue} {{name=@{character_name}, @{char-type}}} {{Athletics=[[@{athletics}*d6]]}}" class="attribute-roll">Athletics</button>

                        <input type="number" name="attr_athletics" value="(@{athletics_base} + @{athletics_mod})" disabled="true" class="attribute-field">

                            <input type="number" name="attr_athletics_base" class="attribute-field-minor">
                            Base

                            <input type="number" name="attr_athletics_mod" class="attribute-field-minor">
                            Mod

                    <button type="roll" name="roll_affection" value="&{template:blue} {{name=@{character_name}, @{char-type}}} {{Affection=[[@{affection}*d6]]}}" class="attribute-roll">Affection</button>

                        <input type="number" name="attr_affection" value="(@{affection_base} + @{affection_mod})" disabled="true" class="attribute-field">

                            <input type="number" name="attr_affection_base" class="attribute-field-minor">
                            Base

                            <input type="number" name="attr_affection_mod" class="attribute-field-minor">
                            Mod

                    <button type="roll" name="roll_skill" value="&{template:blue} {{name=@{character_name}, @{char-type}}} {{Skill=[[@{skill}*d6]]}}" class="attribute-roll">Skill</button>

                        <input type="number" name="attr_skill" value="(@{skill_base} + @{skill_mod})" disabled="true" class="attribute-field">

                            <input type="number" name="attr_skill_base" class="attribute-field-minor">
                            Base

                            <input type="number" name="attr_skill_mod" class="attribute-field-minor">
                            Mod

                    <button type="roll" name="roll_cunning" value="&{template:blue} {{name=@{character_name}, @{char-type}}} {{Cunning=[[@{cunning}*d6]]}}" class="attribute-roll">Cunning</button>

                        <input type="number" name="attr_cunning" value="(@{cunning_base} + @{cunning_mod})" disabled="true" class="attribute-field">

                            <input type="number" name="attr_cunning_base" class="attribute-field-minor">
                            Base

                            <input type="number" name="attr_cunning_mod" class="attribute-field-minor">
                            Mod

                    <button type="roll" name="roll_luck" value="&{template:blue} {{name=@{character_name}, @{char-type}}} {{Luck=[[@{luck}*d6]]}}" class="attribute-roll">Luck</button>

                        <input type="number" name="attr_luck" value="(@{luck_base} + @{luck_mod})" disabled="true" class="attribute-field">

                            <input type="number" name="attr_luck_base" class="attribute-field-minor">
                            Base

                            <input type="number" name="attr_luck_mod" class="attribute-field-minor">
                            Mod

                    <button type="roll" name="roll_will" value="&{template:blue} {{name=@{character_name}, @{char-type}}} {{Will=[[@{will}*d6]]}}" class="attribute-roll">Will</button>

                        <input type="number" name="attr_will" value="(@{will_base} + @{will_mod})" disabled="true" class="attribute-field">

                            <input type="number" name="attr_will_base" class="attribute-field-minor">
                            Base

                            <input type="number" name="attr_will_mod" class="attribute-field-minor">
                            Mod

            Quick Rolls

                <button type="roll" name="roll_d6" value="&{template:blue} {{name=@{character_name}, @{char-type}}} {{D6 Quick Roll =[[d6]]}}" class="quickrollbutton">D6</button>
                <button type="roll" name="roll_2d6" value="&{template:blue} {{name=@{character_name}, @{char-type}}} {{2D6 Quick Roll =[[2d6]]}}" class="quickrollbutton">2D6</button>

                <button type="roll" name="roll_d66" value="&{template:blue} {{name=@{character_name}, @{char-type}}} {{D66 Quick Roll =[[10*d6 + d6]]}}" class="quickrollbutton">D66</button>
                <button type="roll" name="roll_d666" value="&{template:blue} {{name=@{character_name}, @{char-type}}} {{D666 Quick Roll =[[100*d6 + 10*d6 + d6]]}}" class="quickrollbutton">D666</button>

                    Maid Roots
                    <select class="attr_charinfo-dropdown" name="attr_maidroots">
                        <option value="Debts">(11-12) Debts</option>
                        <option value="Slave">(13-14) Slave</option>
                        <option value="Mistress">(15-16) Mistress</option>
                        <option value="Revenge">(21-22) Revenge</option>
                        <option value="Orphan">(23-24) Orphan</option>
                        <option value="Illegitimate Child">(25-26) Illegitimate Child</option>
                        <option value="Hereditary Maid">(31-32) Hereditary Maid</option>
                        <option value="Self Punishment">(33-34) Self Punishment</option>
                        <option value="Unrequited Love">(35-36) Unrequited Love</option>
                        <option value="Business">(41-42) Business</option>
                        <option value="Infiltrator">(43-44) Infiltrator</option>
                        <option value="Loyalty">(45-46) Loyalty</option>
                        <option value="Childhood Friend">(51-52) Childhood Friend</option>
                        <option value="Admirer of Maids">(53-54) Admirer of Maids</option>
                        <option value="Returning a Favor">(55-56) Returning a Favor</option>
                        <option value="Distant Relative">(61-62) Distant Relative</option>
                        <option value="Bridal Training">(63-64) Bridal Training</option>
                        <option value="Who Knows?">(65-66) Who Knows?</option>
                    </select>
                    <textarea name="attr_maidroots_description" class="roots-stress-power_description" placeholder="Maid Roots description."></textarea>

                    Stress Explosion
                    <select class="attr_charinfo-dropdown" name="attr_stressexplosion">
                        <option value="Alcohol/Drugs">(11-12) Alcohol/Drugs</option>
                        <option value="Stealing">(13-14) Stealing</option>
                        <option value="Violence">(15-16) Violence</option>
                        <option value="Gambling">(21-22) Gambling</option>
                        <option value="Racing">(23-24) Racing</option>
                        <option value="Teasing">(25-26) Teasing</option>
                        <option value="Mischief">(31-32) Mischief</option>
                        <option value="Running Away">(33-34) Running Away</option>
                        <option value="Complaining">(35-36) Complaining</option>
                        <option value="Seclusion">(41-42) Seclusion</option>
                        <option value="Crying">(43-44) Crying</option>
                        <option value="Rampage">(45-46) Rampage</option>
                        <option value="Shopping">(51-52) Shopping</option>
                        <option value="Sleep">(53-54) Sleep</option>
                        <option value="Binge">(55-56) Binge</option>
                        <option value="Prayer">(61-62) Prayer</option>
                        <option value="Spoiled Child">(63-64) Spoiled Child</option>
                        <option value="Player Choice">(65-66) Player Choice</option>
                    </select>
                    <textarea name="attr_stressexplosion_description" class="roots-stress-power_description" placeholder="Stress Explosion description."></textarea>

                    Maid Power
                    <select class="attr_charinfo-dropdown" name="attr_maidpower">

                        <optgroup label="Highest Attribute: Athletics">
                            <option value="athletics_1">(1) Super Evasion</option>
                            <option value="athletics_2">(2) Iron Wall</option>
                            <option value="athletics_3">(3) Trespass</option>
                            <option value="athletics_4">(4) Weapon From Nowhere</option>
                            <option value="athletics_5">(5) Giant Weapon</option>
                            <option value="athletics_6">(6) Ultimate Retort</option>
                        </optgroup>

                        <optgroup label="Highest Attribute: Affection">
                            <option value="affection_1">(1) Maiden's Tears</option>
                            <option value="affection_2">(2) World For Two</option>
                            <option value="affection_3">(3) Power of Friendship</option>
                            <option value="affection_4">(4) Cooked With Love</option>
                            <option value="affection_5">(5) Windows of the Soul</option>
                            <option value="affection_6">(6) Passionate Gaze</option>
                        </optgroup>

                        <optgroup label="Highest Attribute: Skill">
                            <option value="skill_1">(1) Lock Picking</option>
                            <option value="skill_2">(2) Stalking</option>
                            <option value="skill_3">(3) Lie Detector</option>
                            <option value="skill_4">(4) Ultimate Menu</option>
                            <option value="skill_5">(5) Instant Cleaning</option>
                            <option value="skill_6">(6) 4-D Dress</option>
                        </optgroup>

                        <optgroup label="Highest Attribute: Cunning">
                            <option value="cunning_1">(1) Punishment</option>
                            <option value="cunning_2">(2) Instant Restraint</option>
                            <option value="cunning_3">(3) Coercion</option>
                            <option value="cunning_4">(4) Trap</option>
                            <option value="cunning_5">(5) Fake Crying</option>
                            <option value="cunning_6">(6) Mockery</option>
                        </optgroup>

                        <optgroup label="Highest Attribute: Luck">
                            <option value="luck_1">(1) Karma</option>
                            <option value="luck_2">(2) Saw It</option>
                            <option value="luck_3">(3) Teleport</option>
                            <option value="luck_4">(4) Escape</option>
                            <option value="luck_5">(5) Foreboding</option>
                            <option value="luck_6">(6) Chance Meeting</option>
                        </optgroup>

                        <optgroup label="Highest Attribute: Will">
                            <option value="will_1">(1) Immune to Pain</option>
                            <option value="will_2">(2) Crisis Adrenaline</option>
                            <option value="will_3">(3) Persistence</option>
                            <option value="will_4">(4) Tenacity</option>
                            <option value="will_5">(5) Hard Work</option>
                            <option value="will_6">(6) Absolute Maid</option>
                        </optgroup>
                    </select>
                    <textarea name="attr_maidpower_description" class="roots-stress-power_description" placeholder="Maid Power description."></textarea>

				Special Qualities

						<select class="attr_charinfo-dropdown" name="attr_specialquality1">
							<option value="00">None</option>
							<option value="11">(11) Glasses</option>
							<option value="12">(12) Freckles</option>
							<option value="13">(13) Sickly</option>
							<option value="14">(14) Quiet</option>
							<option value="15">(15) Easygoing</option>
							<option value="16">(16) Neat Freak</option>
							<option value="21">(21) Brown Skin</option>
							<option value="22">(22) Albino</option>
							<option value="23">(23) Shy</option>
							<option value="24">(24) Actually A Guy</option>
							<option value="25">(25) Overactive Imagination</option>
							<option value="26">(26) Greedy</option>
							<option value="31">(31) Elf Ears</option>
							<option value="32">(32) Nekomimi</option>
							<option value="33">(33) Android/Gynoid</option>
							<option value="34">(34) Vampire</option>
							<option value="35">(35) Princess</option>
							<option value="36">(36) Angel/Devil</option>
							<option value="41">(41) Uniform</option>
							<option value="42">(42) Symbol</option>
							<option value="43">(43) Delinquent</option>
							<option value="44">(44) Accent</option>
							<option value="45">(45) Hairstyle</option>
							<option value="46">(46) Accessory</option>
							<option value="51">(51) Relationship/Perversion</option>
							<option value="52">(52) Criminal Tendencies</option>
							<option value="53">(53) Injury</option>
							<option value="54">(54) Tragic Love</option>
							<option value="55">(55) Dark Past</option>
							<option value="56">(56) Trauma</option>
							<option value="61">(61) Secret Job</option>
							<option value="62">(62) Membership</option>
							<option value="63">(63) Shapeshifter</option>
							<option value="64">(64) Monster</option>
							<option value="65">(65) Magic</option>
							<option value="66">(66) Absurd</option>
						</select>
						<textarea name="attr_specialquality1_description" class="roots-stress-power_description" placeholder="Special Quality 1 description."></textarea>

						<select class="attr_charinfo-dropdown" name="attr_specialquality2">
							<option value="00">None</option>
							<option value="11">(11) Glasses</option>
							<option value="12">(12) Freckles</option>
							<option value="13">(13) Sickly</option>
							<option value="14">(14) Quiet</option>
							<option value="15">(15) Easygoing</option>
							<option value="16">(16) Neat Freak</option>
							<option value="21">(21) Brown Skin</option>
							<option value="22">(22) Albino</option>
							<option value="23">(23) Shy</option>
							<option value="24">(24) Actually A Guy</option>
							<option value="25">(25) Overactive Imagination</option>
							<option value="26">(26) Greedy</option>
							<option value="31">(31) Elf Ears</option>
							<option value="32">(32) Nekomimi</option>
							<option value="33">(33) Android/Gynoid</option>
							<option value="34">(34) Vampire</option>
							<option value="35">(35) Princess</option>
							<option value="36">(36) Angel/Devil</option>
							<option value="41">(41) Uniform</option>
							<option value="42">(42) Symbol</option>
							<option value="43">(43) Delinquent</option>
							<option value="44">(44) Accent</option>
							<option value="45">(45) Hairstyle</option>
							<option value="46">(46) Accessory</option>
							<option value="51">(51) Relationship/Perversion</option>
							<option value="52">(52) Criminal Tendencies</option>
							<option value="53">(53) Injury</option>
							<option value="54">(54) Tragic Love</option>
							<option value="55">(55) Dark Past</option>
							<option value="56">(56) Trauma</option>
							<option value="61">(61) Secret Job</option>
							<option value="62">(62) Membership</option>
							<option value="63">(63) Shapeshifter</option>
							<option value="64">(64) Monster</option>
							<option value="65">(65) Magic</option>
							<option value="66">(66) Absurd</option>
						</select>
						<textarea name="attr_specialquality2_description" class="roots-stress-power_description" placeholder="Special Quality 2 description."></textarea>

						<select class="attr_charinfo-dropdown" name="attr_specialquality3">
							<option value="00">None</option>
							<option value="11">(11) Glasses</option>
							<option value="12">(12) Freckles</option>
							<option value="13">(13) Sickly</option>
							<option value="14">(14) Quiet</option>
							<option value="15">(15) Easygoing</option>
							<option value="16">(16) Neat Freak</option>
							<option value="21">(21) Brown Skin</option>
							<option value="22">(22) Albino</option>
							<option value="23">(23) Shy</option>
							<option value="24">(24) Actually A Guy</option>
							<option value="25">(25) Overactive Imagination</option>
							<option value="26">(26) Greedy</option>
							<option value="31">(31) Elf Ears</option>
							<option value="32">(32) Nekomimi</option>
							<option value="33">(33) Android/Gynoid</option>
							<option value="34">(34) Vampire</option>
							<option value="35">(35) Princess</option>
							<option value="36">(36) Angel/Devil</option>
							<option value="41">(41) Uniform</option>
							<option value="42">(42) Symbol</option>
							<option value="43">(43) Delinquent</option>
							<option value="44">(44) Accent</option>
							<option value="45">(45) Hairstyle</option>
							<option value="46">(46) Accessory</option>
							<option value="51">(51) Relationship/Perversion</option>
							<option value="52">(52) Criminal Tendencies</option>
							<option value="53">(53) Injury</option>
							<option value="54">(54) Tragic Love</option>
							<option value="55">(55) Dark Past</option>
							<option value="56">(56) Trauma</option>
							<option value="61">(61) Secret Job</option>
							<option value="62">(62) Membership</option>
							<option value="63">(63) Shapeshifter</option>
							<option value="64">(64) Monster</option>
							<option value="65">(65) Magic</option>
							<option value="66">(66) Absurd</option>
						</select>
						<textarea name="attr_specialquality3_description" class="roots-stress-power_description" placeholder="Special Quality 3 description."></textarea>

                    Spirit ( <input type="number" name="attr_spirit" value="@{will} * 10" disabled="true" style="width:50px;"> )

                Stress
                <textarea name="attr_stress" class="character-notes" placeholder="Notes about the character's Stress."></textarea>

                    Starting Favor ( <input type="number" name="attr_startingfavor" value="@{affection} * 2" disabled="true" style="width:50px;"> )

                Favor
                <textarea name="attr_favor" class="character-notes" placeholder="Notes about the character's Favor."></textarea>

                Notes (Appearance, Personality, Items, etc.)
                <textarea name="attr_notes" class="character-notes" placeholder="Other general notes about the character."></textarea>

                Maid Weapons
                <textarea name="attr_weapons" class="character-notes" placeholder="Notes about the character's Maid Weapons."></textarea>

                Trauma
                <textarea name="attr_trauma" class="character-notes" placeholder="Notes about any Trauma the character has."></textarea>

                Seduction
                <textarea name="attr_seduction" class="character-notes" placeholder="Notes about any Seduction involving the character."></textarea>

MAID RPG

BUTLER CHARACTER SHEET

Character Name

<input type="text" class="attr_name" name="attr_character_name">

Age

<input type="number" class="attr_age" name="attr_age">

Suit Color

                        <input type="text" class="attr_charcolors" name="attr_colorsuit">

Eye Color

                        <input type="text" class="attr_charcolors" name="attr_coloreyes">

Hair Color

                        <input type="text" class="attr_charcolors" name="attr_colorhair">

Butler Type 1

                        <select class="attr_chartype" name="attr_butlertype1">
                            <option value="Shadow">(1) Shadow</option>
                            <option value="Elite">(2) Elite</option>
                            <option value="Monster">(3) Monster</option>
                            <option value="Partner">(4) Partner</option>
                            <option value="Gothic">(5) Gothic</option>
                            <option value="Veteran">(6) Veteran</option>
                        </select>

Butler Type 2

                        <select class="attr_chartype" name="attr_butlertype2">
                            <option value="Shadow">(1) Shadow</option>
                            <option value="Elite">(2) Elite</option>
                            <option value="Monster">(3) Monster</option>
                            <option value="Partner">(4) Partner</option>
                            <option value="Gothic">(5) Gothic</option>
                            <option value="Veteran">(6) Veteran</option>
                        </select>

            Attributes

                    <button type="roll" name="roll_athletics" value="&{template:blue} {{name=@{character_name}, @{char-type}}} {{Athletics=[[@{athletics}*d6]]}}" class="attribute-roll">Athletics</button>

                        <input type="number" name="attr_athletics" value="(@{athletics_base} + @{athletics_mod})" disabled="true" class="attribute-field">

                            <input type="number" name="attr_athletics_base" class="attribute-field-minor">
                            Base

                            <input type="number" name="attr_athletics_mod" class="attribute-field-minor">
                            Mod

                    <button type="roll" name="roll_affection" value="&{template:blue} {{name=@{character_name}, @{char-type}}} {{Affection=[[@{affection}*d6]]}}" class="attribute-roll">Affection</button>

                        <input type="number" name="attr_affection" value="(@{affection_base} + @{affection_mod})" disabled="true" class="attribute-field">

                            <input type="number" name="attr_affection_base" class="attribute-field-minor">
                            Base

                            <input type="number" name="attr_affection_mod" class="attribute-field-minor">
                            Mod

                    <button type="roll" name="roll_skill" value="&{template:blue} {{name=@{character_name}, @{char-type}}} {{Skill=[[@{skill}*d6]]}}" class="attribute-roll">Skill</button>

                        <input type="number" name="attr_skill" value="(@{skill_base} + @{skill_mod})" disabled="true" class="attribute-field">

                            <input type="number" name="attr_skill_base" class="attribute-field-minor">
                            Base

                            <input type="number" name="attr_skill_mod" class="attribute-field-minor">
                            Mod

                    <button type="roll" name="roll_cunning" value="&{template:blue} {{name=@{character_name}, @{char-type}}} {{Cunning=[[@{cunning}*d6]]}}" class="attribute-roll">Cunning</button>

                        <input type="number" name="attr_cunning" value="(@{cunning_base} + @{cunning_mod})" disabled="true" class="attribute-field">

                            <input type="number" name="attr_cunning_base" class="attribute-field-minor">
                            Base

                            <input type="number" name="attr_cunning_mod" class="attribute-field-minor">
                            Mod

                    <button type="roll" name="roll_luck" value="&{template:blue} {{name=@{character_name}, @{char-type}}} {{Luck=[[@{luck}*d6]]}}" class="attribute-roll">Luck</button>

                        <input type="number" name="attr_luck" value="(@{luck_base} + @{luck_mod})" disabled="true" class="attribute-field">

                            <input type="number" name="attr_luck_base" class="attribute-field-minor">
                            Base

                            <input type="number" name="attr_luck_mod" class="attribute-field-minor">
                            Mod

                    <button type="roll" name="roll_will" value="&{template:blue} {{name=@{character_name}, @{char-type}}} {{Will=[[@{will}*d6]]}}" class="attribute-roll">Will</button>

                        <input type="number" name="attr_will" value="(@{will_base} + @{will_mod})" disabled="true" class="attribute-field">

                            <input type="number" name="attr_will_base" class="attribute-field-minor">
                            Base

                            <input type="number" name="attr_will_mod" class="attribute-field-minor">
                            Mod

            Quick Rolls

                <button type="roll" name="roll_d6" value="&{template:blue} {{name=@{character_name}, @{char-type}}} {{D6 Quick Roll =[[d6]]}}" class="quickrollbutton">D6</button>
                <button type="roll" name="roll_2d6" value="&{template:blue} {{name=@{character_name}, @{char-type}}} {{2D6 Quick Roll =[[2d6]]}}" class="quickrollbutton">2D6</button>

                <button type="roll" name="roll_d66" value="&{template:blue} {{name=@{character_name}, @{char-type}}} {{D66 Quick Roll =[[10*d6 + d6]]}}" class="quickrollbutton">D66</button>
                <button type="roll" name="roll_d666" value="&{template:blue} {{name=@{character_name}, @{char-type}}} {{D666 Quick Roll =[[100*d6 + 10*d6 + d6]]}}" class="quickrollbutton">D666</button>

                    Butler Roots
                    <select class="attr_charinfo-dropdown" name="attr_butlerroots">
                        <option value="Hatred">(1) Hatred</option>
                        <option value="Ambition">(2) Ambition</option>
                        <option value="Contract">(3) Contract</option>
                        <option value="Affection">(4) Affection</option>
                        <option value="Loyalty">(5) Loyalty</option>
                        <option value="Family">(6) Family</option>
                    <textarea name="attr_butlerroots_description" class="roots-stress-power_description" placeholder="Butler Roots description."></textarea>

                    Butler Power 1
                    <select class="attr_charinfo-dropdown" name="attr_butlerpower_1">

                        <optgroup label="Butler Type: Shadow">
                            <option value="shadow_1">(1) Super Evasion</option>
                            <option value="shadow_2">(2) Lock Picking</option>
                            <option value="shadow_3">(3) Stalking</option>
                            <option value="shadow_4">(4) Surprise Attack</option>
                            <option value="shadow_5">(5) Saw It</option>
                            <option value="shadow_6">(6) Now You See Him...</option>
                        </optgroup>

                        <optgroup label="Butler Type: Elite">
                            <option value="elite_1">(1) Support</option>
                            <option value="elite_2">(2) Intrigue</option>
                            <option value="elite_3">(3) Knowing Laugh</option>
                            <option value="elite_4">(4) Insight</option>
                            <option value="elite_5">(5) Trap</option>
                            <option value="elite_6">(6) Futile</option>
                        </optgroup>

                        <optgroup label="Butler Type: Monster">
                            <option value="monster_1">(1) Person Inside</option>
                            <option value="monster_2">(2) Fighting Spirit</option>
                            <option value="monster_3">(3) Eerie</option>
                            <option value="monster_4">(4) Limiter</option>
                            <option value="monster_5">(5) Giant Weapon</option>
                            <option value="monster_6">(6) Berserker</option>
                        </optgroup>

                        <optgroup label="Butler Type: Partner">
                            <option value="partner_1">(1) Backup</option>
                            <option value="partner_2">(2) World For Two</option>
                            <option value="partner_3">(3) Twisted Love</option>
                            <option value="partner_4">(4) Deep Trust</option>
                            <option value="partner_5">(5) Bonds of the Heart</option>
                            <option value="partner_6">(6) Two As One</option>
                        </optgroup>

                        <optgroup label="Butler Type: Gothic">
                            <option value="gothic_1">(1) Punishment</option>
                            <option value="gothic_2">(2) Lie Detector</option>
                            <option value="gothic_3">(3) Old Hand</option>
                            <option value="gothic_4">(4) As Expected</option>
                            <option value="gothic_5">(5) Foreboding</option>
                            <option value="gothic_6">(6) Consequences</option>
                        </optgroup>

                        <optgroup label="Butler Type: Veteran">
                            <option value="veteran_1">(1) Invincible</option>
                            <option value="veteran_2">(2) Crisis Adrenaline</option>
                            <option value="veteran_3">(3) Connections</option>
                            <option value="veteran_4">(4) Chance Meeting</option>
                            <option value="veteran_5">(5) Manly Tears</option>
                            <option value="veteran_6">(6) Meatshield</option>
                        </optgroup>
                    </select>
                    <textarea name="attr_butlerpower1_description" class="roots-stress-power_description" placeholder="Butler Power 1 description."></textarea>

                    Butler Power 2
                    <select class="attr_charinfo-dropdown" name="attr_butlerpower_2">

                        <optgroup label="Butler Type: Shadow">
                            <option value="shadow_1">(1) Super Evasion</option>
                            <option value="shadow_2">(2) Lock Picking</option>
                            <option value="shadow_3">(3) Stalking</option>
                            <option value="shadow_4">(4) Surprise Attack</option>
                            <option value="shadow_5">(5) Saw It</option>
                            <option value="shadow_6">(6) Now You See Him...</option>
                        </optgroup>

                        <optgroup label="Butler Type: Elite">
                            <option value="elite_1">(1) Support</option>
                            <option value="elite_2">(2) Intrigue</option>
                            <option value="elite_3">(3) Knowing Laugh</option>
                            <option value="elite_4">(4) Insight</option>
                            <option value="elite_5">(5) Trap</option>
                            <option value="elite_6">(6) Futile</option>
                        </optgroup>

                        <optgroup label="Butler Type: Monster">
                            <option value="monster_1">(1) Person Inside</option>
                            <option value="monster_2">(2) Fighting Spirit</option>
                            <option value="monster_3">(3) Eerie</option>
                            <option value="monster_4">(4) Limiter</option>
                            <option value="monster_5">(5) Giant Weapon</option>
                            <option value="monster_6">(6) Berserker</option>
                        </optgroup>

                        <optgroup label="Butler Type: Partner">
                            <option value="partner_1">(1) Backup</option>
                            <option value="partner_2">(2) World For Two</option>
                            <option value="partner_3">(3) Twisted Love</option>
                            <option value="partner_4">(4) Deep Trust</option>
                            <option value="partner_5">(5) Bonds of the Heart</option>
                            <option value="partner_6">(6) Two As One</option>
                        </optgroup>

                        <optgroup label="Butler Type: Gothic">
                            <option value="gothic_1">(1) Punishment</option>
                            <option value="gothic_2">(2) Lie Detector</option>
                            <option value="gothic_3">(3) Old Hand</option>
                            <option value="gothic_4">(4) As Expected</option>
                            <option value="gothic_5">(5) Foreboding</option>
                            <option value="gothic_6">(6) Consequences</option>
                        </optgroup>

                        <optgroup label="Butler Type: Veteran">
                            <option value="veteran_1">(1) Invincible</option>
                            <option value="veteran_2">(2) Crisis Adrenaline</option>
                            <option value="veteran_3">(3) Connections</option>
                            <option value="veteran_4">(4) Chance Meeting</option>
                            <option value="veteran_5">(5) Manly Tears</option>
                            <option value="veteran_6">(6) Meatshield</option>
                        </optgroup>
                    </select>
                    <textarea name="attr_butlerpower2_description" class="roots-stress-power_description" placeholder="Butler Power 2 description."></textarea>

				Special Qualities

						<select class="attr_charinfo-dropdown" name="attr_specialquality1">
							<option value="00">None</option>
							<option value="11">(11) Glasses</option>
							<option value="12">(12) Sunglasses</option>
							<option value="13">(13) Furrowed Brows</option>
							<option value="14">(14) Quiet</option>
							<option value="15">(15) My Pace</option>
							<option value="16">(16) Shibui</option>
							<option value="21">(21) Brown Skin</option>
							<option value="22">(22) Narrow Eyes</option>
							<option value="23">(23) Knight Talk</option>
							<option value="24">(24) A Woman</option>
							<option value="25">(25) Giant</option>
							<option value="26">(26) Muscular</option>
							<option value="31">(31) Attractive</option>
							<option value="32">(32) Misshapen Body</option>
							<option value="33">(33) Android</option>
							<option value="34">(34) Vampire</option>
							<option value="35">(35) White Eyes</option>
							<option value="36">(36) Emaciated</option>
							<option value="41">(41) Bishonen</option>
							<option value="42">(42) Sadist</option>
							<option value="43">(43) Sibling</option>
							<option value="44">(44) Sportsman</option>
							<option value="45">(45) Patchwork</option>
							<option value="46">(46) One Eye</option>
							<option value="51">(51) Burns</option>
							<option value="52">(52) Masochist</option>
							<option value="53">(53) Former Mercenary</option>
							<option value="54">(54) Amnesiac</option>
							<option value="55">(55) Wanted</option>
							<option value="56">(56) Secretly an Assassin</option>
							<option value="61">(61) Hacker</option>
							<option value="62">(62) Doctor</option>
							<option value="63">(63) Shadow Clan</option>
							<option value="64">(64) Mummy</option>
							<option value="65">(65) Priest</option>
							<option value="66">(66) Cyborg</option>
						</select>
						<textarea name="attr_specialquality1_description" class="roots-stress-power_description" placeholder="Special Quality 1 description."></textarea>

						<select class="attr_charinfo-dropdown" name="attr_specialquality2">
							<option value="00">None</option>
							<option value="11">(11) Glasses</option>
							<option value="12">(12) Sunglasses</option>
							<option value="13">(13) Furrowed Brows</option>
							<option value="14">(14) Quiet</option>
							<option value="15">(15) My Pace</option>
							<option value="16">(16) Shibui</option>
							<option value="21">(21) Brown Skin</option>
							<option value="22">(22) Narrow Eyes</option>
							<option value="23">(23) Knight Talk</option>
							<option value="24">(24) A Woman</option>
							<option value="25">(25) Giant</option>
							<option value="26">(26) Muscular</option>
							<option value="31">(31) Attractive</option>
							<option value="32">(32) Misshapen Body</option>
							<option value="33">(33) Android</option>
							<option value="34">(34) Vampire</option>
							<option value="35">(35) White Eyes</option>
							<option value="36">(36) Emaciated</option>
							<option value="41">(41) Bishonen</option>
							<option value="42">(42) Sadist</option>
							<option value="43">(43) Sibling</option>
							<option value="44">(44) Sportsman</option>
							<option value="45">(45) Patchwork</option>
							<option value="46">(46) One Eye</option>
							<option value="51">(51) Burns</option>
							<option value="52">(52) Masochist</option>
							<option value="53">(53) Former Mercenary</option>
							<option value="54">(54) Amnesiac</option>
							<option value="55">(55) Wanted</option>
							<option value="56">(56) Secretly an Assassin</option>
							<option value="61">(61) Hacker</option>
							<option value="62">(62) Doctor</option>
							<option value="63">(63) Shadow Clan</option>
							<option value="64">(64) Mummy</option>
							<option value="65">(65) Priest</option>
							<option value="66">(66) Cyborg</option>
						</select>
						<textarea name="attr_specialquality2_description" class="roots-stress-power_description" placeholder="Special Quality 2 description."></textarea>

						<select class="attr_charinfo-dropdown" name="attr_specialquality3">
							<option value="00">None</option>
							<option value="11">(11) Glasses</option>
							<option value="12">(12) Sunglasses</option>
							<option value="13">(13) Furrowed Brows</option>
							<option value="14">(14) Quiet</option>
							<option value="15">(15) My Pace</option>
							<option value="16">(16) Shibui</option>
							<option value="21">(21) Brown Skin</option>
							<option value="22">(22) Narrow Eyes</option>
							<option value="23">(23) Knight Talk</option>
							<option value="24">(24) A Woman</option>
							<option value="25">(25) Giant</option>
							<option value="26">(26) Muscular</option>
							<option value="31">(31) Attractive</option>
							<option value="32">(32) Misshapen Body</option>
							<option value="33">(33) Android</option>
							<option value="34">(34) Vampire</option>
							<option value="35">(35) White Eyes</option>
							<option value="36">(36) Emaciated</option>
							<option value="41">(41) Bishonen</option>
							<option value="42">(42) Sadist</option>
							<option value="43">(43) Sibling</option>
							<option value="44">(44) Sportsman</option>
							<option value="45">(45) Patchwork</option>
							<option value="46">(46) One Eye</option>
							<option value="51">(51) Burns</option>
							<option value="52">(52) Masochist</option>
							<option value="53">(53) Former Mercenary</option>
							<option value="54">(54) Amnesiac</option>
							<option value="55">(55) Wanted</option>
							<option value="56">(56) Secretly an Assassin</option>
							<option value="61">(61) Hacker</option>
							<option value="62">(62) Doctor</option>
							<option value="63">(63) Shadow Clan</option>
							<option value="64">(64) Mummy</option>
							<option value="65">(65) Priest</option>
							<option value="66">(66) Cyborg</option>
						</select>
						<textarea name="attr_specialquality3_description" class="roots-stress-power_description" placeholder="Special Quality 3 description."></textarea>

                    Spirit ( <input type="number" name="attr_spirit" value="@{will} * 10" disabled="true" style="width:50px;"> )

                Stress
                <textarea name="attr_stress" class="character-notes" placeholder="Notes about the character's Stress."></textarea>

                    Starting Favor ( <input type="number" name="attr_startingfavor" value="@{affection} * 2" disabled="true" style="width:50px;"> )

                Favor
                <textarea name="attr_favor" class="character-notes" placeholder="Notes about the character's Favor."></textarea>

                Notes (Appearance, Personality, Items, etc.)
                <textarea name="attr_notes" class="character-notes" placeholder="Other general notes about the character."></textarea>

                Butler Weapons
                <textarea name="attr_weapons" class="character-notes" placeholder="Notes about the character's Butler Weapons."></textarea>

                Trauma
                <textarea name="attr_trauma" class="character-notes" placeholder="Notes about any Trauma the character has."></textarea>

                Seduction
                <textarea name="attr_seduction" class="character-notes" placeholder="Notes about any Seduction involving the character."></textarea>

MAID RPG

MASTER CHARACTER SHEET

Character Name

<input type="text" class="attr_name" name="attr_character_name">

Age

<input type="number" class="attr_age" name="attr_age">

Fave Maid Type

                        <select class="attr_charcolors" name="attr_favemaidtype">
                            <option value="maidtype1_lolita">(1) Lolita</option>
                            <option value="maidtype1_sexy">(2) Sexy</option>
                            <option value="maidtype1_pure">(3) Pure</option>
                            <option value="maidtype1_cool">(4) Cool</option>
                            <option value="maidtype1_boyish">(5) Boyish</option>
                            <option value="maidtype1_heroine">(6) Heroine</option>
                        </select>

Eye Color

                        <input type="text" class="attr_charcolors" name="attr_coloreyes">

Hair Color

                        <input type="text" class="attr_charcolors" name="attr_colorhair">

Master Type

                        <select class="attr_chartype" name="attr_mastertype">
                            <option value="Small Child">(1) Small Child</option>
                            <option value="Legitimate Child">(2) Legitimate Child</option>
                            <option value="Layman">(3) Layman</option>
                            <option value="Natural Born">(4) Natural Born</option>
                            <option value="Aristocrat">(5) Aristocrat</option>
                            <option value="Recluse">(6) Recluse</option>
                        </select>

            Attributes

                    <button type="roll" name="roll_athletics" value="&{template:blue} {{name=@{character_name}, @{char-type}}} {{Athletics=[[@{athletics}*d6]]}}" class="attribute-roll">Athletics</button>

                        <input type="number" name="attr_athletics" value="(@{athletics_base} + @{athletics_mod})" disabled="true" class="attribute-field">

                            <input type="number" name="attr_athletics_base" class="attribute-field-minor">
                            Base

                            <input type="number" name="attr_athletics_mod" class="attribute-field-minor">
                            Mod

                    <button type="roll" name="roll_affection" value="&{template:blue} {{name=@{character_name}, @{char-type}}} {{Affection=[[@{affection}*d6]]}}" class="attribute-roll">Affection</button>

                        <input type="number" name="attr_affection" value="(@{affection_base} + @{affection_mod})" disabled="true" class="attribute-field">

                            <input type="number" name="attr_affection_base" class="attribute-field-minor">
                            Base

                            <input type="number" name="attr_affection_mod" class="attribute-field-minor">
                            Mod

                    <button type="roll" name="roll_skill" value="&{template:blue} {{name=@{character_name}, @{char-type}}} {{Skill=[[@{skill}*d6]]}}" class="attribute-roll">Skill</button>

                        <input type="number" name="attr_skill" value="(@{skill_base} + @{skill_mod})" disabled="true" class="attribute-field">

                            <input type="number" name="attr_skill_base" class="attribute-field-minor">
                            Base

                            <input type="number" name="attr_skill_mod" class="attribute-field-minor">
                            Mod

                    <button type="roll" name="roll_cunning" value="&{template:blue} {{name=@{character_name}, @{char-type}}} {{Cunning=[[@{cunning}*d6]]}}" class="attribute-roll">Cunning</button>

                        <input type="number" name="attr_cunning" value="(@{cunning_base} + @{cunning_mod})" disabled="true" class="attribute-field">

                            <input type="number" name="attr_cunning_base" class="attribute-field-minor">
                            Base

                            <input type="number" name="attr_cunning_mod" class="attribute-field-minor">
                            Mod

                    <button type="roll" name="roll_luck" value="&{template:blue} {{name=@{character_name}, @{char-type}}} {{Luck=[[@{luck}*d6]]}}" class="attribute-roll">Luck</button>

                        <input type="number" name="attr_luck" value="(@{luck_base} + @{luck_mod})" disabled="true" class="attribute-field">

                            <input type="number" name="attr_luck_base" class="attribute-field-minor">
                            Base

                            <input type="number" name="attr_luck_mod" class="attribute-field-minor">
                            Mod

                    <button type="roll" name="roll_will" value="&{template:blue} {{name=@{character_name}, @{char-type}}} {{Will=[[@{will}*d6]]}}" class="attribute-roll">Will</button>

                        <input type="number" name="attr_will" value="(@{will_base} + @{will_mod})" disabled="true" class="attribute-field">

                            <input type="number" name="attr_will_base" class="attribute-field-minor">
                            Base

                            <input type="number" name="attr_will_mod" class="attribute-field-minor">
                            Mod

            Quick Rolls

                <button type="roll" name="roll_d6" value="&{template:blue} {{name=@{character_name}, @{char-type}}} {{D6 Quick Roll =[[d6]]}}" class="quickrollbutton">D6</button>
                <button type="roll" name="roll_2d6" value="&{template:blue} {{name=@{character_name}, @{char-type}}} {{2D6 Quick Roll =[[2d6]]}}" class="quickrollbutton">2D6</button>

                <button type="roll" name="roll_d66" value="&{template:blue} {{name=@{character_name}, @{char-type}}} {{D66 Quick Roll =[[10*d6 + d6]]}}" class="quickrollbutton">D66</button>
                <button type="roll" name="roll_d666" value="&{template:blue} {{name=@{character_name}, @{char-type}}} {{D666 Quick Roll =[[100*d6 + 10*d6 + d6]]}}" class="quickrollbutton">D666</button>

                    Master Power Source 1
                    <select class="attr_charinfo-dropdown" name="attr_powersource_1">
                        <option value="None">(2) None</option>
                        <option value="Fear">(3) Fear</option>
                        <option value="Magical Power">(4) Magical Power</option>
                        <option value="Blood Ties">(5) Blood Ties</option>
                        <option value="Military Might">(6) Military Might</option>
                        <option value="Assets">(7) Assets</option>
                        <option value="Political Power">(8) Political Power</option>
                        <option value="Mansion">(9) Mansion</option>
                        <option value="Talent">(10) Talent</option>
                        <option value="Renown">(11) Renown</option>
                        <option value="Popularity">(12) Popularity</option>
                    </select>
                    <textarea name="attr_masterpower1_description" class="roots-stress-power_description" placeholder="Master Power Source 1 description."></textarea>

                    Master Power Source 2
                    <select class="attr_charinfo-dropdown" name="attr_powersource_2">
                        <option value="None">(2) None</option>
                        <option value="Fear">(3) Fear</option>
                        <option value="Magical Power">(4) Magical Power</option>
                        <option value="Blood Ties">(5) Blood Ties</option>
                        <option value="Military Might">(6) Military Might</option>
                        <option value="Assets">(7) Assets</option>
                        <option value="Political Power">(8) Political Power</option>
                        <option value="Mansion">(9) Mansion</option>
                        <option value="Talent">(10) Talent</option>
                        <option value="Renown">(11) Renown</option>
                        <option value="Popularity">(12) Popularity</option>
                    </select>
                    <textarea name="attr_masterpower2_description" class="roots-stress-power_description" placeholder="Master Power Source 2 description."></textarea>

                    Stress Explosion
                    <select class="attr_charinfo-dropdown" name="attr_stressexplosion">
                        <option value="Alcohol/Drugs">(11-12) Alcohol/Drugs</option>
                        <option value="Stealing">(13-14) Stealing</option>
                        <option value="Violence">(15-16) Violence</option>
                        <option value="Gambling">(21-22) Gambling</option>
                        <option value="Racing">(23-24) Racing</option>
                        <option value="Teasing">(25-26) Teasing</option>
                        <option value="Mischief">(31-32) Mischief</option>
                        <option value="Running Away">(33-34) Running Away</option>
                        <option value="Complaining">(35-36) Complaining</option>
                        <option value="Seclusion">(41-42) Seclusion</option>
                        <option value="Crying">(43-44) Crying</option>
                        <option value="Rampage">(45-46) Rampage</option>
                        <option value="Shopping">(51-52) Shopping</option>
                        <option value="Sleep">(53-54) Sleep</option>
                        <option value="Binge">(55-56) Binge</option>
                        <option value="Prayer">(61-62) Prayer</option>
                        <option value="Spoiled Child">(63-64) Spoiled Child</option>
                        <option value="Player Choice">(65-66) Player Choice</option>
                    </select>
                    <textarea name="attr_stressexplosion_description" class="roots-stress-power_description" placeholder="Stress Explosion description."></textarea>

				Special Qualities

						<select class="attr_charinfo-dropdown" name="attr_specialquality1">
							<option value="00">None</option>
							<option value="11">(11) Glasses</option>
							<option value="12">(12) Sickly</option>
							<option value="13">(13) Royalty</option>
							<option value="14">(14) Quiet</option>
							<option value="15">(15) My Pace</option>
							<option value="16">(16) OCD</option>
							<option value="21">(21) Brown Skin</option>
							<option value="22">(22) Albino</option>
							<option value="23">(23) Shy</option>
							<option value="24">(24) Cross-Dresser</option>
							<option value="25">(25) Imagination</option>
							<option value="26">(26) Hermaphrodite</option>
							<option value="31">(31) Bishonen</option>
							<option value="32">(32) Noble Hair</option>
							<option value="33">(33) Hedonist</option>
							<option value="34">(34) Vampire</option>
							<option value="35">(35) Otaku</option>
							<option value="36">(36) Angel/Devil</option>
							<option value="41">(41) Lecherous</option>
							<option value="42">(42) Sadist</option>
							<option value="43">(43) Masochist</option>
							<option value="44">(44) Handicapped</option>
							<option value="45">(45) Scars</option>
							<option value="46">(46) Kidnapped</option>
							<option value="51">(51) Capable Sibling</option>
							<option value="52">(52) Family Hate</option>
							<option value="53">(53) Professional Criminal</option>
							<option value="54">(54) Amnesiac</option>
							<option value="55">(55) Artist</option>
							<option value="56">(56) Evil Emperor</option>
							<option value="61">(61) Undead</option>
							<option value="62">(62) Scientist</option>
							<option value="63">(63) Oracle</option>
							<option value="64">(64) Magician</option>
							<option value="65">(65) Priest</option>
							<option value="66">(66) Maid Quality</option>
						</select>
						<textarea name="attr_specialquality1_description" class="roots-stress-power_description" placeholder="Special Quality 1 description."></textarea>

						<select class="attr_charinfo-dropdown" name="attr_specialquality2">
							<option value="00">None</option>
							<option value="11">(11) Glasses</option>
							<option value="12">(12) Sickly</option>
							<option value="13">(13) Royalty</option>
							<option value="14">(14) Quiet</option>
							<option value="15">(15) My Pace</option>
							<option value="16">(16) OCD</option>
							<option value="21">(21) Brown Skin</option>
							<option value="22">(22) Albino</option>
							<option value="23">(23) Shy</option>
							<option value="24">(24) Cross-Dresser</option>
							<option value="25">(25) Imagination</option>
							<option value="26">(26) Hermaphrodite</option>
							<option value="31">(31) Bishonen</option>
							<option value="32">(32) Noble Hair</option>
							<option value="33">(33) Hedonist</option>
							<option value="34">(34) Vampire</option>
							<option value="35">(35) Otaku</option>
							<option value="36">(36) Angel/Devil</option>
							<option value="41">(41) Lecherous</option>
							<option value="42">(42) Sadist</option>
							<option value="43">(43) Masochist</option>
							<option value="44">(44) Handicapped</option>
							<option value="45">(45) Scars</option>
							<option value="46">(46) Kidnapped</option>
							<option value="51">(51) Capable Sibling</option>
							<option value="52">(52) Family Hate</option>
							<option value="53">(53) Professional Criminal</option>
							<option value="54">(54) Amnesiac</option>
							<option value="55">(55) Artist</option>
							<option value="56">(56) Evil Emperor</option>
							<option value="61">(61) Undead</option>
							<option value="62">(62) Scientist</option>
							<option value="63">(63) Oracle</option>
							<option value="64">(64) Magician</option>
							<option value="65">(65) Priest</option>
							<option value="66">(66) Maid Quality</option>
						</select>
						<textarea name="attr_specialquality2_description" class="roots-stress-power_description" placeholder="Special Quality 2 description."></textarea>

						<select class="attr_charinfo-dropdown" name="attr_specialquality3">
							<option value="00">None</option>
							<option value="11">(11) Glasses</option>
							<option value="12">(12) Sickly</option>
							<option value="13">(13) Royalty</option>
							<option value="14">(14) Quiet</option>
							<option value="15">(15) My Pace</option>
							<option value="16">(16) OCD</option>
							<option value="21">(21) Brown Skin</option>
							<option value="22">(22) Albino</option>
							<option value="23">(23) Shy</option>
							<option value="24">(24) Cross-Dresser</option>
							<option value="25">(25) Imagination</option>
							<option value="26">(26) Hermaphrodite</option>
							<option value="31">(31) Bishonen</option>
							<option value="32">(32) Noble Hair</option>
							<option value="33">(33) Hedonist</option>
							<option value="34">(34) Vampire</option>
							<option value="35">(35) Otaku</option>
							<option value="36">(36) Angel/Devil</option>
							<option value="41">(41) Lecherous</option>
							<option value="42">(42) Sadist</option>
							<option value="43">(43) Masochist</option>
							<option value="44">(44) Handicapped</option>
							<option value="45">(45) Scars</option>
							<option value="46">(46) Kidnapped</option>
							<option value="51">(51) Capable Sibling</option>
							<option value="52">(52) Family Hate</option>
							<option value="53">(53) Professional Criminal</option>
							<option value="54">(54) Amnesiac</option>
							<option value="55">(55) Artist</option>
							<option value="56">(56) Evil Emperor</option>
							<option value="61">(61) Undead</option>
							<option value="62">(62) Scientist</option>
							<option value="63">(63) Oracle</option>
							<option value="64">(64) Magician</option>
							<option value="65">(65) Priest</option>
							<option value="66">(66) Maid Quality</option>
						</select>
						<textarea name="attr_specialquality3_description" class="roots-stress-power_description" placeholder="Special Quality 3 description."></textarea>

                    Spirit ( <input type="number" name="attr_spirit" value="@{will} * 10" disabled="true" style="width:50px;"> )

                Stress
                <textarea name="attr_stress" class="character-notes" placeholder="Notes about the character's Stress."></textarea>

                Notes (Appearance, Personality, Items, etc.)
                <textarea name="attr_notes" class="character-notes" placeholder="Other general notes about the character."></textarea>

                Trauma
                <textarea name="attr_trauma" class="character-notes" placeholder="Notes about any Trauma the character has."></textarea>

                Seduction
                <textarea name="attr_seduction" class="character-notes" placeholder="Notes about any Seduction involving the character."></textarea>

                Mansion
                <textarea name="attr_mansion" class="character-notes" placeholder="Notes about the Master's Mansion, including the type of world it is located in, the general mood of the mansion, its color scheme and any special facilities it has."></textarea>

                Encounter Table
                <textarea name="attr_encountertable" class="character-notes" placeholder="List all the characters who could be encountered in the mansion here."></textarea>

<rolltemplate class="sheet-rolltemplate-blue">

{{name}}

    {{#allprops() }}

{{key}}	{{value}}
    {{/allprops() }}

</rolltemplate>


text:
#include <stdio.h>
#include <unistd.h>
#include <netdb.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>

#include "tsfuncs.h"

struct ts_privsec *ts_privsec_alloc() {
	struct ts_privsec *privsec = calloc(1, sizeof(struct ts_privsec));
	privsec->section_header	= ts_section_data_alloc();
	return privsec;
}

void ts_privsec_clear(struct ts_privsec *privsec) {
	if (!privsec)
		return;
	// save
	struct ts_section_header *section_header = privsec->section_header;
	// clear
	ts_section_data_clear(section_header);
	memset(privsec, 0, sizeof(struct ts_privsec));
	// restore
	privsec->section_header = section_header;
}

void ts_privsec_free(struct ts_privsec **pprivsec) {
	struct ts_privsec *privsec = *pprivsec;
	if (privsec) {
		ts_section_data_free(&privsec->section_header);
		FREE(*pprivsec);
	}
}

void ts_privsec_copy(struct ts_privsec *src, struct ts_privsec *dst) {
	if (!src || !dst)
		return;
	dst->ts_header = src->ts_header;
	dst->initialized = src->initialized;
	ts_section_data_copy(src->section_header, dst->section_header);
}

struct ts_privsec *ts_privsec_push_packet(struct ts_privsec *privsec, uint8_t *ts_packet) {
	struct ts_header ts_header;
	memset(&ts_header, 0, sizeof(struct ts_header));

	if (ts_packet_header_parse(ts_packet, &ts_header)) {
		// Received PUSI packet before table END, clear the table to start gathering new one
		if (ts_header.pusi && privsec->ts_header.pusi)
			ts_privsec_clear(privsec);
		if (!privsec->ts_header.pusi)
			privsec->ts_header = ts_header;
	}

	if (ts_header.pusi) {
		struct ts_section_header section_header;
		memset(&section_header, 0, sizeof(struct ts_section_header));

		uint8_t *section_data = ts_section_header_parse(ts_packet, &privsec->ts_header, &section_header);
		if (!section_data) {
			memset(&privsec->ts_header, 0, sizeof(struct ts_header));
			goto OUT;
		}

		// Set correct section_header
		ts_section_header_parse(ts_packet, &privsec->ts_header, privsec->section_header);
	}

	if (!privsec->initialized) {
		ts_section_add_packet(privsec->section_header, &ts_header, ts_packet);
		if (privsec->section_header->initialized) {
			privsec->initialized = 1;
		}
	}

OUT:
	return privsec;
}

int ts_privsec_is_same(struct ts_privsec *p1, struct ts_privsec *p2) {
	if (p1 == p2) return 1; // Same
	if (p1 && p2) {
		if (p1->section_header->section_length != p2->section_header->section_length) return 0; // Not same
		return memcmp(p1->section_header->section_data, p2->section_header->section_data, p1->section_header->section_length) == 0;
	} else {
		return 0;
	}
}

void ts_privsec_dump(struct ts_privsec *privsec) {
	struct ts_section_header *sec = privsec->section_header;
	ts_section_dump(sec);
	char *data = ts_hex_dump(sec->data, sec->data_len, 16);
	ts_LOGf("  * Section data:\n%s\n", data);
	FREE(data);
}

redpajama_set_name: RedPajamaGithub


text:
using cmplx_z = std::complex<double>;

namespace lilypad {
    class Communicator {
        private:
            MPI_Comm comm_;
            int rank_;
            int size_;
        public:
            Communicator() {}
            explicit Communicator(MPI_Comm comm)
                : comm_(comm)
            {
                MPI_Comm_rank(comm, &rank_);
                MPI_Comm_size(comm, &size_);
            }

            void barrier() const { MPI_Barrier(comm_); }
            int rank() const { return rank_; }
            int size() const { return size_; }
            bool is_root() const { return rank_ == 0; }
            MPI_Comm comm() const { return comm_; }

            void Allreduce_sum(LocalMatrix<cmplx_z>& A)
            {
                MPI_Allreduce(MPI_IN_PLACE, A.ptr(), A.ld()*A.cols(), MPI_DOUBLE_COMPLEX, MPI_SUM, comm_);
            }

            void Allreduce_sum(double& a) const
            {
                MPI_Allreduce(MPI_IN_PLACE, &a, 1, MPI_DOUBLE, MPI_SUM, comm_);
            }

            void Barrier() const
            {
                MPI_Barrier(comm_);
            }
    };
}

#endif // LILYPAD_COMMUNICATOR_HPP


text:
package org.jboss.as.quickstarts.tasksrs.service;

import java.net.URI;
import java.security.Principal;
import java.util.List;

import javax.inject.Inject;
import javax.ws.rs.DELETE;
import javax.ws.rs.DefaultValue;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.WebApplicationException;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.SecurityContext;
import javax.ws.rs.core.UriBuilder;
import javax.ws.rs.core.UriInfo;

import org.jboss.as.quickstarts.tasksrs.model.Task;
import org.jboss.as.quickstarts.tasksrs.model.TaskDao;
import org.jboss.as.quickstarts.tasksrs.model.User;
import org.jboss.as.quickstarts.tasksrs.model.UserDao;

/**
 * A JAX-RS resource for exposing REST endpoints for Task manipulation
 */
@Path("/")
public class TaskResource {
    @Inject
    private UserDao userDao;

    @Inject
    private TaskDao taskDao;

    @POST
    @Path("tasks/{title}")
    public Response createTask(@Context UriInfo info, @Context SecurityContext context,
                               @PathParam("title")  @DefaultValue("task") String taskTitle) {

        User user = getUser(context);
        Task task = new Task(taskTitle);

        taskDao.createTask(user, task);

        // Construct the URI for the newly created resource and put in into the Location header of the response
        // (assumes that there is only one occurrence of the task title in the request)
        String rawPath = info.getAbsolutePath().getRawPath().replace(task.getTitle(), task.getId().toString());
        UriBuilder uriBuilder = info.getAbsolutePathBuilder().replacePath(rawPath);
        URI uri = uriBuilder.build();

        return Response.created(uri).build();
    }

    @DELETE
    @Path("tasks/{id}")
    public void deleteTaskById(@Context SecurityContext context, @PathParam("id") Long id) {
        Task task = getTaskById(context, id);

        taskDao.deleteTask(task);
    }

    @GET
    @Path("tasks/{id}")
    // JSON: include "application/json" in the @Produces annotation to include json support
    //@Produces({ "application/xml", "application/json" })
    @Produces({ "application/xml" })
    public Task getTaskById(@Context SecurityContext context, @PathParam("id") Long id) {
        User user = getUser(context);

        return getTask(user, id);
    }

    @GET
    @Path("tasks/{title}")
    // JSON: include "application/json" in the @Produces annotation to include json support
    //@Produces({ "application/xml", "application/json" })
    @Produces({ "application/xml" })
    public List<Task> getTasksByTitle(@Context SecurityContext context, @PathParam("title") String title) {
        return getTasks(getUser(context), title);
    }

    @GET
    @Path("tasks")
    // JSON: include "application/json" in the @Produces annotation to include json support
    //@Produces({ "application/xml", "application/json" })
    @Produces({ "application/xml" })
    public List<Task> getTasks(@Context SecurityContext context) {
        return getTasks(getUser(context));
    }

    // Utility Methods

    private List<Task> getTasks(User user, String title) {
        return taskDao.getForTitle(user, title);
    }

    private List<Task> getTasks(User user) {
        return taskDao.getAll(user);
    }

    private Task getTask(User user, Long id) {
        for (Task task : taskDao.getAll(user))
            if (task.getId().equals(id))
                return task;

        throw new WebApplicationException(Response.Status.NOT_FOUND);
    }

    private User getUser(SecurityContext context) {
        Principal principal = null;

        if (context != null)
            principal = context.getUserPrincipal();

        if (principal == null)
            throw new WebApplicationException(Response.Status.UNAUTHORIZED);

        return getUser(principal.getName());
    }

    private User getUser(String username) {

        try {
            User user = userDao.getForUsername(username);

            if (user == null) {
                user = new User(username);

                userDao.createUser(user);
            }

            return user;
        } catch (Exception e) {
            throw new WebApplicationException(e);
        }
    }
}


text:
using JetBrains.Application.Settings;
using JetBrains.ReSharper.Feature.Services.Daemon;
using JetBrains.ReSharper.FeaturesTestFramework.Daemon;
using JetBrains.ReSharper.Psi;
using NUnit.Framework;
using ReCommendedExtension.Analyzers.YieldReturnWithinLock;

namespace ReCommendedExtension.Tests.Analyzers
{
    [TestFixture]
    public sealed class YieldReturnWithinLockAnalyzerTests : CSharpHighlightingTestBase
    {
        protected override string RelativeTestDataPath => @"Analyzers\YieldReturnWithinLock";

        protected override bool HighlightingPredicate(IHighlighting highlighting, IPsiSourceFile sourceFile, IContextBoundSettingsStore settingsStore)
            => highlighting is YieldReturnWithinLockWarning;

        [Test]
        public void TestYieldReturnWithinLock() => DoNamedTest2();
    }
}


text:
title: Un voilier sur terre
layout: post
---

Le 17 juin dernier a été inauguré un bateau peu commun. Il s'agit en fait d'une éolienne à voile!

Une éolienne à axe vertical qui permet d'exploiter toutes les directions du vents sans interruption.

Ce concept intitulé [VoiléO](http://www.voileo.com/) a été développé par un ancien marin qui s'est tout simplement dit que si le vent dans les voiles était utiliser comme source d'énergie pour faire avancer les bateaux, l'association pouvait également servir à  fabriquer de l'énergie

Certes la production en électricité n'est pas élevée mais c'est beau et à priori silencieux.

Enjoy!

{% include vimeo.html
    id="53446233"
%}


text:
/**
 * Created by VladimirIlich on 22/4/2016.
 */

angular.module("App")
    .controller("DeviceAccessUserCtrl", function ($scope,
                                                  $state,
                                                  $sessionStorage,
                                                  $rootScope,
                                                  DeviceService,
                                                  UserService,
                                                  $log,
                                                  growl,
                                                  spinnerService,
                                                  $stateParams,
                                                  $timeout,
                                                  GLOBAL_CONSTANT,
                                                  GLOBAL_MESSAGE) {

        //Search on the menu
        $scope.menuOptions = {searchWord: ''};

        $scope.accessAllUsers=[];
        $scope.userFilter = [];
        $scope.allUserSelcStakeHolder = [];
        $scope.showTable = false;

        var filterCondition = {
            ReaxiumParameters: {
                Users: {
                    filter: ""
                }
            }
        };

        function init() {
            console.info("Iniciando controlador DeviceRelRouteCtrl");

            if(isUndefined($sessionStorage.rol_user) || isEmptyString($sessionStorage.rol_user)){
                console.error("Usuario no a iniciado session");
                $state.go("login");
            }
            else{
                //data user by session
                $scope.photeUser = $sessionStorage.user_photo;
                $scope.nameUser = $sessionStorage.nameUser;
                //menu sidebar
                $scope.menus = addActiveClassMenu(JSON.parse($sessionStorage.appMenus),GLOBAL_CONSTANT.ID_DEVICE_MENU);

                console.log("Id device: " + $stateParams.id_device);
                console.log("Mode Device Relation User: " + $stateParams.modeDeviceRelUser);

                if(!isEmptyString($stateParams.id_device) && $stateParams.id_device != null){

                    DeviceService.setRelUserDevice({isModeRel: $stateParams.modeDeviceRelUser,id_device: $stateParams.id_device});

                    if ($sessionStorage.rol_user == GLOBAL_CONSTANT.USER_ROL_CALL_CENTER) {

                        filterCondition.ReaxiumParameters.Users.user_type_id = $sessionStorage.rol_user;
                    }
                    else if ($sessionStorage.rol_user == GLOBAL_CONSTANT.USER_ROL_SCHOOL) {
                        filterCondition.ReaxiumParameters.Users.user_type_id = $sessionStorage.rol_user;
                        filterCondition.ReaxiumParameters.Users.business_id = $sessionStorage.id_business;
                    }
                }
                else{
                    $state.go("device");
                }
            }
        }

        init();

        /**
         * Method compare input with list server users filter
         * @param str
         * @returns {Array}
         */
        $scope.localSearch = function (str) {
            var matches = [];

            invokeServiceUserFilter(str);

            $scope.userFilter.forEach(function (person) {

                if (!person.first_name.toLowerCase().indexOf(str.toString().toLowerCase()) >= 0 ||
                    !person.second_name.toLowerCase().indexOf(str.toString().toLowerCase()) >= 0 ||
                    !person.document_id.indexOf(str.toString()) >= 0 ||
                    !person.first_last_name.toLowerCase().indexOf(str.toString().toLowerCase()) >= 0 ||
                    !person.second_last_name.toLowerCase().indexOf(str.toString().toLowerCase()) >= 0 ||
                    !person.email.toLowerCase().indexOf(str.toString().toLowerCase()) >= 0) {

                    matches.push(person);
                }
            });

            return matches;
        };

        /**
         * call services search user with filter
         * @param str
         */
        var invokeServiceUserFilter = function (str) {

            filterCondition.ReaxiumParameters.Users.filter = str;

            UserService.getUsersFilter(filterCondition)
            .then(function (result) {

                if (result.ReaxiumResponse.code == GLOBAL_CONSTANT.SUCCESS_RESPONSE_SERVICE) {
                    $scope.userFilter = [];
                    var array = result.ReaxiumResponse.object;
                    console.log("size:" + array.length);
                    array.forEach(function (entry) {
                        var aux = {
                            first_name: entry.first_name,
                            second_name: entry.second_name,
                            first_last_name: entry.first_last_name,
                            second_last_name: entry.second_last_name,
                            user_id: entry.user_id,
                            document_id: entry.document_id,
                            email: entry.email,
                            pic: entry.user_photo
                        };

                        $scope.userFilter.push(aux);
                    });

                }
            }).catch(function (err) {
                console.log("Error invocando service filter" + err);
            });
        };

        $scope.addUser = function (str) {

            if (!seachObjList(str.originalObject.user_id)) {

                spinnerService.show("spinnerNew");
                $log.debug(str.originalObject);

                var device_id = DeviceService.getRelUserDevice().id_device;

                //obtengo todos los accessos del usuario

                DeviceService.getAllAccessUserDeviceConfig({
                    ReaxiumParameters:{
                        ReaxiumDevice:{
                            user_id:str.originalObject.user_id,
                            device_id:DeviceService.getRelUserDevice().id_device
                        }
                    }})
                    .then(function(resp){
                        if(resp.ReaxiumResponse.code == GLOBAL_CONSTANT.SUCCESS_RESPONSE_SERVICE){

                            $log.debug(resp);
                            $scope.accessAllUsers = resp.ReaxiumResponse.object;

                            DeviceService.getTypeAccessByUser({
                                    ReaxiumParameters: {
                                        ReaxiumDevice: {
                                            user_id: str.originalObject.user_id,
                                            device_id: device_id
                                        }
                                    }
                                })
                                .then(function (response) {

                                    spinnerService.hide("spinnerNew");

                                    var dataUser = response.ReaxiumResponse;

                                    if (dataUser.code == 0) {

                                        var objAccessUser = {};

                                        objAccessUser.device_id = device_id;
                                        objAccessUser.user_id = str.originalObject.user_id;
                                        objAccessUser.document_id = str.originalObject.document_id;
                                        objAccessUser.first_name = str.originalObject.first_name;
                                        objAccessUser.second_name = str.originalObject.second_name;
                                        objAccessUser.login_and_pass = {};
                                        objAccessUser.biometric = {};
                                        objAccessUser.rfid = {};
                                        objAccessUser.documentAccessId={};

                                        var arrayData = searchAccessTypeId(dataUser.object);

                                        var disable_login_and_pass = (!arrayData.containsObj(GLOBAL_CONSTANT.ACCESS_LOGIN_AND_PASS)) ? 0 : 1;
                                        var disable_bio = (!arrayData.containsObj(GLOBAL_CONSTANT.ACCESS_BIOMETRIC)) ? 0 : 1;
                                        var disable_rfid = (!arrayData.containsObj(GLOBAL_CONSTANT.ACCESS_RFID)) ? 0 : 1;
                                        var disable_document_id = (!arrayData.containsObj(GLOBAL_CONSTANT.ACCESS_DOCUMENT_ID)) ? 0 : 1;

                                        objAccessUser.login_and_pass = {
                                            disable_login_and_pass: disable_login_and_pass,
                                            access_type_id: GLOBAL_CONSTANT.ACCESS_LOGIN_AND_PASS,
                                            user_access_data_id: searchAccessDataId(dataUser.object, GLOBAL_CONSTANT.ACCESS_LOGIN_AND_PASS),
                                            exist_access_type:isConfiguredDeviceByUser(GLOBAL_CONSTANT.ACCESS_LOGIN_AND_PASS).existAccess,
                                            isConfigured:isConfiguredDeviceByUser(GLOBAL_CONSTANT.ACCESS_LOGIN_AND_PASS).isConfigure
                                        };

                                        objAccessUser.biometric = {
                                            disable_bio: disable_bio,
                                            access_type_id: GLOBAL_CONSTANT.ACCESS_BIOMETRIC,
                                            user_access_data_id: searchAccessDataId(dataUser.object, GLOBAL_CONSTANT.ACCESS_BIOMETRIC),
                                            exist_access_type:isConfiguredDeviceByUser(GLOBAL_CONSTANT.ACCESS_BIOMETRIC).existAccess,
                                            isConfigured:isConfiguredDeviceByUser(GLOBAL_CONSTANT.ACCESS_BIOMETRIC).isConfigure
                                        };

                                        objAccessUser.rfid = {
                                            disable_rfid: disable_rfid,
                                            access_type_id: GLOBAL_CONSTANT.ACCESS_RFID,
                                            user_access_data_id: searchAccessDataId(dataUser.object, GLOBAL_CONSTANT.ACCESS_RFID),
                                            exist_access_type:isConfiguredDeviceByUser(GLOBAL_CONSTANT.ACCESS_RFID).existAccess,
                                            isConfigured:isConfiguredDeviceByUser(GLOBAL_CONSTANT.ACCESS_RFID).isConfigure
                                        };

                                        objAccessUser.documentAccessId = {
                                            disable_document_id: disable_document_id,
                                            access_type_id: GLOBAL_CONSTANT.ACCESS_DOCUMENT_ID,
                                            user_access_data_id: searchAccessDataId(dataUser.object, GLOBAL_CONSTANT.ACCESS_DOCUMENT_ID),
                                            exist_access_type:isConfiguredDeviceByUser(GLOBAL_CONSTANT.ACCESS_DOCUMENT_ID).existAccess,
                                            isConfigured:isConfiguredDeviceByUser(GLOBAL_CONSTANT.ACCESS_DOCUMENT_ID).isConfigure
                                        };

                                        $log.debug(objAccessUser);
                                        $scope.allUserSelcStakeHolder.push(objAccessUser);
                                        $scope.showTable = true;

                                    }
                                    else {

                                        console.info(dataUser.message);
                                        if(dataUser.code == 1){

                                            growl.success(GLOBAL_MESSAGE.MESSAGE_USER_NO_HAS_DATE_ACCESS_DEVICE);

                                            var objAccessUser = {};

                                            objAccessUser.device_id = device_id;
                                            objAccessUser.user_id = str.originalObject.user_id;
                                            objAccessUser.document_id = str.originalObject.document_id;
                                            objAccessUser.first_name = str.originalObject.first_name;
                                            objAccessUser.second_name = str.originalObject.second_name;
                                            objAccessUser.login_and_pass = {};
                                            objAccessUser.biometric = {};
                                            objAccessUser.rfid = {};
                                            objAccessUser.documentAccessId={};

                                            objAccessUser.login_and_pass.disable_login_and_pass = 0;
                                            objAccessUser.login_and_pass.access_type_id = GLOBAL_CONSTANT.ACCESS_LOGIN_AND_PASS;
                                            objAccessUser.login_and_pass.user_access_data_id = 0;
                                            objAccessUser.login_and_pass.exist_access_type = false;
                                            objAccessUser.login_and_pass.isConfigured = false;

                                            objAccessUser.biometric.disable_bio = 0;
                                            objAccessUser.biometric.access_type_id = GLOBAL_CONSTANT.ACCESS_BIOMETRIC;
                                            objAccessUser.biometric.user_access_data_id = 0;
                                            objAccessUser.biometric.exist_access_type = false;
                                            objAccessUser.biometric.isConfigured = false;

                                            objAccessUser.rfid.disable_rfid = 0;
                                            objAccessUser.rfid.access_type_id = GLOBAL_CONSTANT.ACCESS_RFID;
                                            objAccessUser.rfid.user_access_data_id = 0;
                                            objAccessUser.rfid.exist_access_type = false;
                                            objAccessUser.rfid.isConfigured = false;

                                            objAccessUser.documentAccessId.disable_document_id = 0;
                                            objAccessUser.documentAccessId.access_type_id = GLOBAL_CONSTANT.ACCESS_DOCUMENT_ID;
                                            objAccessUser.documentAccessId.user_access_data_id=0;
                                            objAccessUser.documentAccessId.exist_access_type = false;
                                            objAccessUser.documentAccessId.isConfigured = false;

                                            $scope.allUserSelcStakeHolder.push(objAccessUser);
                                            $scope.showTable = true;

                                        }else if(dataUser.code == 2){

                                            growl.success(GLOBAL_MESSAGE.MESSAGE_USER_HAS_ALL_ACCESS_DEVICE);

                                            var objAccessUser = {};

                                            objAccessUser.device_id = device_id;
                                            objAccessUser.user_id = str.originalObject.user_id;
                                            objAccessUser.document_id = str.originalObject.document_id;
                                            objAccessUser.first_name = str.originalObject.first_name;
                                            objAccessUser.second_name = str.originalObject.second_name;
                                            objAccessUser.login_and_pass = {};
                                            objAccessUser.biometric = {};
                                            objAccessUser.rfid = {};
                                            objAccessUser.documentAccessId={};

                                            objAccessUser.login_and_pass.disable_login_and_pass = 0;
                                            objAccessUser.login_and_pass.access_type_id = GLOBAL_CONSTANT.ACCESS_LOGIN_AND_PASS;
                                            objAccessUser.login_and_pass.user_access_data_id = 0;
                                            objAccessUser.login_and_pass.exist_access_type = isConfiguredDeviceByUser(GLOBAL_CONSTANT.ACCESS_LOGIN_AND_PASS).existAccess;
                                            objAccessUser.login_and_pass.isConfigured = isConfiguredDeviceByUser(GLOBAL_CONSTANT.ACCESS_LOGIN_AND_PASS).isConfigure;

                                            objAccessUser.biometric.disable_bio = 0;
                                            objAccessUser.biometric.access_type_id = GLOBAL_CONSTANT.ACCESS_BIOMETRIC;
                                            objAccessUser.biometric.user_access_data_id = 0;
                                            objAccessUser.biometric.exist_access_type = isConfiguredDeviceByUser(GLOBAL_CONSTANT.ACCESS_BIOMETRIC).existAccess;
                                            objAccessUser.biometric.isConfigured = isConfiguredDeviceByUser(GLOBAL_CONSTANT.ACCESS_BIOMETRIC).isConfigure;

                                            objAccessUser.rfid.disable_rfid = 0;
                                            objAccessUser.rfid.access_type_id = GLOBAL_CONSTANT.ACCESS_RFID;
                                            objAccessUser.rfid.user_access_data_id = 0;
                                            objAccessUser.rfid.exist_access_type = isConfiguredDeviceByUser(GLOBAL_CONSTANT.ACCESS_RFID).existAccess;;
                                            objAccessUser.rfid.isConfigured = isConfiguredDeviceByUser(GLOBAL_CONSTANT.ACCESS_RFID).isConfigure;

                                            objAccessUser.documentAccessId.disable_document_id = 0;
                                            objAccessUser.documentAccessId.access_type_id = GLOBAL_CONSTANT.ACCESS_DOCUMENT_ID;
                                            objAccessUser.documentAccessId.user_access_data_id=0;
                                            objAccessUser.documentAccessId.exist_access_type = isConfiguredDeviceByUser(GLOBAL_CONSTANT.ACCESS_DOCUMENT_ID).existAccess;
                                            objAccessUser.documentAccessId.isConfigured = isConfiguredDeviceByUser(GLOBAL_CONSTANT.ACCESS_DOCUMENT_ID).isConfigure;

                                            $scope.allUserSelcStakeHolder.push(objAccessUser);
                                            $scope.showTable = true;
                                        }
                                    }
                                }).catch(function (err) {
                                console.error("Error invocando servicio " + err);
                                spinnerService.hide("spinnerNew");
                                growl.error(GLOBAL_MESSAGE.MESSAGE_SERVICE_ERROR);
                            });

                        }else{
                            console.error("Error respuesta servicio: "+resp.ReaxiumResponse.code);
                        }
                    }).catch(function(err){
                    console.error("Error obteniendo informacion de acceso del usuario:" +err);
                    $scope.accessAllUsers=[];
                });

            } else {
               console.log("Usuario ya se encuentra en la lista interna");
                growl.warning("User is already included in your shortlist");
            }

            clearInput('ex2');
        };

       /* function findAllAccessUsersDevice(user_id){

            var request={
                ReaxiumParameters:{
                    ReaxiumDevice:{
                        user_id:user_id,
                        device_id:DeviceService.getRelUserDevice().id_device
                    }
                }
            };

            DeviceService.getAllAccessUserDeviceConfig(request)
                .then(function(resp){
                    if(resp.ReaxiumResponse.code == GLOBAL_CONSTANT.SUCCESS_RESPONSE_SERVICE){
                        $log.debug(resp);
                        $scope.accessAllUsers = resp.ReaxiumResponse.object;
                    }else{
                        console.error("Error respuesta servicio: "+resp.ReaxiumResponse.code);
                    }
                }).catch(function(err){
                console.error("Error obteniendo informacion de acceso del usuario:" +err);
                $scope.accessAllUsers=[];
            });

        }*/

        function isConfiguredDeviceByUser(access_type_id){

            var obj = {
                existAccess:false,
                isConfigure:false
            };

            if($scope.accessAllUsers.length > 0){

                $scope.accessAllUsers.forEach(function(entry){

                    if(access_type_id == entry.access_type_id){
                        obj.existAccess=true;
                        obj.isConfigure = entry.configured;
                    }
                });
            }else{
                console.error("No hay elemento en arreglo de acceso de usuario");
            }

            return obj;
        }

        var searchAccessDataId = function (obj, id) {

            var user_access_data_id = 0;

            if (isEmptyArray(obj)) {
                obj.forEach(function (entry) {

                    if (entry.access_type_id === id) {
                        user_access_data_id = entry.user_access_data_id;
                    }
                });
            }

            return user_access_data_id;
        }

        var searchAccessTypeId = function (obj) {

            var typeAccessId = [];

            if (isEmptyArray(obj)) {
                obj.forEach(function (entry) {
                    typeAccessId.push(entry.access_type_id);
                });
            }

            return typeAccessId;
        }

        function buildJsonSend(userObj) {

            var obj = [];

            $.each($('#userTable').find('tbody tr'), function (index, elemento) {
                //cada usuario
                $.each($(elemento).find('td'), function (index2, elementoTD) {

                    //informacion del usuario
                    if ($(elementoTD).attr('id').indexOf('biometrico_' + userObj.user_id) > -1) {

                        var biometrico = $(elementoTD).find('input');
                        if ($(biometrico).is(':checked')) {
                            var arrayValues = $(biometrico).val().split("-");
                            obj.push({device_id: userObj.device_id, user_access_data_id: arrayValues[1]});

                        }
                    }
                    else if ($(elementoTD).attr('id').indexOf('rfid_' + userObj.user_id) > -1) {
                        var rfid = $(elementoTD).find('input');
                        if ($(rfid).is(':checked')) {
                            var arrayValues = $(rfid).val().split("-");
                            obj.push({device_id: userObj.device_id, user_access_data_id: arrayValues[1]});

                        }
                    }
                    else if ($(elementoTD).attr('id').indexOf('userPassword_' + userObj.user_id) > -1) {
                        var userpasss = $(elementoTD).find('input');
                        if ($(userpasss).is(':checked')) {
                            var arrayValues = $(userpasss).val().split("-");
                            obj.push({device_id: userObj.device_id, user_access_data_id: arrayValues[1]});
                        }
                    }
                    else if ($(elementoTD).attr('id').indexOf('documentId_' + userObj.user_id) > -1) {
                        var documentId = $(elementoTD).find('input');
                        if ($(documentId).is(':checked')) {
                            var arrayValues = $(documentId).val().split("-");
                            obj.push({device_id: userObj.device_id, user_access_data_id: arrayValues[1]});
                        }
                    }
                });
            });

            return obj;
        }

        $scope.deleteUserTable = function (user_id) {

            console.log("Delete Element: " + user_id);
            var index = -1;
            for (var i = 0, len = $scope.allUserSelcStakeHolder.length; i < len; i++) {
                if ($scope.allUserSelcStakeHolder[i].user_id == user_id) {
                    index = i;
                    break;
                }
            }

            console.log("Delete Element Pos: " + index);
            $scope.allUserSelcStakeHolder.splice(index, 1);

            if ($scope.allUserSelcStakeHolder.length == 0) {
                $scope.showTable = false;
            }

        }

        var clearInput = function (id) {
            if (id) {
                $scope.$broadcast('angucomplete-alt:clearInput', id);
            }
            else {
                $scope.$broadcast('angucomplete-alt:clearInput');
            }
        };

        $scope.saveAccessUser = function () {

            var arrayObject = [];

            var jsonSendService = {
                ReaxiumParameters: {
                    ReaxiumDevice: {
                        object: []
                    }
                }
            };

            $scope.allUserSelcStakeHolder.forEach(function (entry) {
                arrayObject.push(buildJsonSend(entry));
            });

            if (isEmptyArray(arrayObject)) {

                spinnerService.show("spinnerNew");

                arrayObject.forEach(function (entry) {

                    entry.forEach(function (obj) {

                        $log.debug(obj);

                        jsonSendService.ReaxiumParameters.ReaxiumDevice.object.push(
                            {
                                device_id: obj.device_id,
                                user_access_data_id: obj.user_access_data_id
                            });
                    });

                });

                $log.debug("Json para enviar: ", jsonSendService);

                //llamando servicio para crear los accessos a los usuario

                DeviceService.newCreateAccessUserByDevice(jsonSendService)
                    .then(function (response) {
                        spinnerService.hide("spinnerNew");
                        if (response.ReaxiumResponse.code == GLOBAL_CONSTANT.SUCCESS_RESPONSE_SERVICE) {
                            DeviceService.setShowGrowlMessage({
                                isShow: true,
                                message: GLOBAL_MESSAGE.MESSAGE_ASSOCIATE_ACCESS_DEVICE_SUCCESS
                            });
                            $state.go('device');
                        } else {
                            growl.error(response.ReaxiumResponse.message);
                        }

                    }).catch(function (err) {
                    spinnerService.hide("spinnerNew");
                    console.log("Error: " + err);
                    growl.error(GLOBAL_MESSAGE.MESSAGE_SERVICE_ERROR);
                });
            }
            else {
                growl.warning(GLOBAL_MESSAGE.MESSAGE_ADD_USERS_TO_CONTINUE);
            }

        }

        function seachObjList(id_user) {

            var validate = false;

            if ($scope.allUserSelcStakeHolder.length > 0) {

                $scope.allUserSelcStakeHolder.forEach(function (entry) {

                    if (entry.user_id == id_user) {
                        validate = true;
                    }
                });
            }

            return validate;
        }

    })