text:
                        <input type="text" class="sheet-text" name="attr_Age" style="width:100%"/>
                        <input type="text" class="sheet-text" name="attr_Height" style="width:100%"/>
                        <input type="text" class="sheet-text" name="attr_Weight" style="width:100%"/>

                        Age
                        Height
                        Weight

                        <input type="text" class="sheet-text" name="attr_character_name" style="width:100%"/>

                        Character Name

                        <input type="text" class="sheet-text" name="attr_Race" style="width:100%"/>
                        <input type="text" class="sheet-text" name="attr_Nationality" style="width:100%"/>

                        Race
                        Nationality

                        <input type="text" class="sheet-text" name="attr_Religion" style="width:100%"/>

                        Religion

<input type="radio" class="sheet-tab sheet-tab1" name="attr_core-tab" value="1" title="Basic" checked="checked"/>
Basic
<input type="radio" class="sheet-tab sheet-tab2" name="attr_core-tab" value="2" title="Specialties" />
Specialties
<input type="radio" class="sheet-tab sheet-tab3" name="attr_core-tab" value="3" title="Combat" />
Combat
<input type="radio" class="sheet-tab sheet-tab4" name="attr_core-tab" value="4" title="Equipment" />
Equipment
<input type="radio" class="sheet-tab sheet-tab99" name="attr_core-tab" value="99" title="All" />
All

                    <button type="roll" class="sheet-attribute" name="attr_Brute_roll" value="&{template:skill}{{attribute= Brute}} {{character= @{character_name}}} {{Roll= [[@{Brute}+@{Brute_mod}+d12!]]}}">Brute</button>
                    <input type="number" class="sheet-skill" name="attr_Brute" value="[[@{Brawl}+@{Frenzy}+@{Overpower}+@{Resilience}]]" disabled="true"/>
                    <button type="roll" class="sheet-skillbtn" name="attr_Brawl_roll" value="&{template:skill}{{attribute= Brawl}} {{character= @{character_name}}} {{Roll= [[@{Brawl}+d12!]]}}">Brawl</button>
                    <input type="number" class="sheet-skill" name="attr_Brawl" value="0"/>

                    Atribute Mod
                    <input type="number" class="sheet-skill" name="attr_Brute_mod" value="0"/>
                    <button type="roll" class="sheet-skillbtn" name="attr_Frenzy_roll" value="&{template:skill}{{attribute= Frenzy}} {{character= @{character_name}}} {{Roll= [[@{Frenzy}+d12!]]}} ">Frenzy</button>
                    <input type="number" class="sheet-skill" name="attr_Frenzy" value="0"/>

                    <button type="roll" class="sheet-skillbtn" name="attr_Overpower_roll" value="&{template:skill}{{attribute= Overpower}} {{character= @{character_name}}} {{Roll= [[@{Overpower}+d12!]]}}">Overpower</button>
                    <input type="number" class="sheet-skill" name="attr_Overpower" value="0"/>

                    <button type="roll" class="sheet-skillbtn" name="attr_Resilience_roll" value="&{template:skill}{{attribute= Resilience}} {{character= @{character_name}}} {{Roll= [[@{Resilience}+d12!]]}}">Resilience</button>
                    <input type="number" class="sheet-skill" name="attr_Resilience" value="0"/>

                    <button type="roll" class="sheet-attribute" name="attr_Cunning_roll" value="&{template:skill}{{attribute= Cunning}} {{character= @{character_name}}} {{Roll= [[@{Cunning}+@{Cunning_mod}+d12!]] }}">Cunning</button>
                    <input type="number" class="sheet-skill" name="attr_Cunning" value="@{Espionage}+@{Expertise}+@{Showmanship}+@{Tactical}" disabled="true"/>
                    <button type="roll" class="sheet-skillbtn" name="attr_Espionage_roll" value="&{template:skill}{{attribute= Espionage}} {{character= @{character_name}}} {{Roll= [[@{Espionage}+d12!]]}}">Espionage</button>
                    <input type="number" class="sheet-skill" name="attr_Espionage" value="0"/>

                    Atribute Mod
                    <input type="number" class="sheet-skill" name="attr_Cunning_mod" value="0"/>
                    <button type="roll" class="sheet-skillbtn" name="attr_Expertise_roll" value="&{template:skill}{{attribute= Expertise}} {{character= @{character_name}}} {{Roll= [[@{Expertise}+d12!]]}}">Expertise</button>
                    <input type="number" class="sheet-skill" name="attr_Expertise" value="0"/>

                    <button type="roll" class="sheet-skillbtn" name="attr_Showmanship_roll" value="&{template:skill}{{attribute= Showmanship}} {{character= @{character_name}}} {{Roll= [[@{Showmanship}+d12!]]}}">Showmanship</button>
                    <input type="number" class="sheet-skill" name="attr_Showmanship" value="0"/>

                    <button type="roll" class="sheet-skillbtn" name="attr_Tactical_roll" value="&{template:skill}{{attribute= Tactical}} {{character= @{character_name}}} {{Roll= [[@{Tactical}+d12!]]}}">Tactical</button>
                    <input type="number" class="sheet-skill" name="attr_Tactical" value="0"/>

                    <button type="roll" class="sheet-attribute" name="attr_Dexterity_roll" value="&{template:skill}{{attribute= Dexterity}} {{character= @{character_name}}} {{Roll= [[@{Dexterity}+@{Dexterity_mod}+d12!]]}}">Dexterity</button>
                    <input type="number" class="sheet-skill" name="attr_Dexterity" value="@{Ace}+@{Agility}+@{Marksmanship}+@{Swashbuckling}" disabled="true"/>
                    <button type="roll" class="sheet-skillbtn" name="attr_Ace_roll" value="&{template:skill}{{attribute= Ace}} {{character= @{character_name}}} {{Roll= [[@{Ace}+d12!]]}}">Ace</button>
                    <input type="number" class="sheet-skill" name="attr_Ace" value="0"/>

                    Atribute Mod
                    <input type="number" class="sheet-skill" name="attr_Dexterity_mod" value="0"/>
                    <button type="roll" class="sheet-skillbtn" name="attr_Agility_roll" value="&{template:skill}{{attribute= Agility}} {{character= @{character_name}}} {{Roll= [[@{Agility}+d12!]]}}">Agility</button>
                    <input type="number" class="sheet-skill" name="attr_Agility" value="0"/>

                    <button type="roll" class="sheet-skillbtn" name="attr_Marksmanship_roll" value="&{template:skill}{{attribute= Marksmanship}} {{character= @{character_name}}} {{Roll= [[@{Marksmanship}+d12!]]}}">Marksmanship</button>
                    <input type="number" class="sheet-skill" name="attr_Marksmanship" value="0"/>

                    <button type="roll" class="sheet-skillbtn" name="attr_Swashbuckling_roll" value="&{template:skill}{{attribute= Swashbuckling}} {{character= @{character_name}}} {{Roll= [[@{Swashbuckling}+d12!]]}}">Swashbuckling</button>
                    <input type="number" class="sheet-skill" name="attr_Swashbuckling" value="0"/>

                    <button type="roll" class="sheet-attribute" name="attr_Spirit_roll" value="&{template:skill}{{attribute= Spirit}} {{character= @{character_name}}} {{Roll= [[@{Spirit}+@{Spirit_mod}+d12!]]}}">Spirit</button>
                    <input type="number" class="sheet-skill" name="attr_Spirit" value="@{Faith}+@{Grace}+@{Luck}+@{Shamanism}" disabled="true"/>
                    <button type="roll" class="sheet-skillbtn" name="attr_Faith_roll" value="&{template:skill}{{attribute= Faith}} {{character= @{character_name}}} {{Roll= [[@{Faith}+d12!]]}}">Faith</button>
                    <input type="number" class="sheet-skill" name="attr_Faith" value="0"/>

                    Atribute Mod
                    <input type="number" class="sheet-skill" name="attr_Spirit_mod" value="0"/>
                    <button type="roll" class="sheet-skillbtn" name="attr_Grace_roll" value="&{template:skill}{{attribute= Grace}} {{character= @{character_name}}} {{Roll= [[@{Grace}+d12!]]}}">Grace</button>
                    <input type="number" class="sheet-skill" name="attr_Grace" value="0"/>

                    <button type="roll" class="sheet-skillbtn" name="attr_Luck_roll" value="&{template:skill}{{attribute= Luck}} {{character= @{character_name}}} {{Roll= [[@{Luck}+d12!]]}}">Luck</button>
                    <input type="number" class="sheet-skill" name="attr_Luck" value="0"/>

                    <button type="roll" class="sheet-skillbtn" name="attr_Shamanism_roll" value="&{template:skill}{{attribute= Shamanism}} {{character= @{character_name}}} {{Roll= [[@{Shamanism}+d12!]]}}">Shamanism</button>
                    <input type="number" class="sheet-skill" name="attr_Shamanism" value="0"/>

                    <button type="roll" class="sheet-attribute" name="attr_Science_roll" value="&{template:skill}{{attribute= Science}} {{character= @{character_name}}} {{Roll= [[@{Science}+@{Science_mod}+d12!]]}}">Science</button>
                    <input type="number" class="sheet-skill" name="attr_Science" v value="@{Alchemy}+@{Armsmith}+@{Automata}+@{Bio-Flux}+@{Engineer}+@{Gadgetry}" disabled="true"/>
                    <button type="roll" class="sheet-skillbtn" name="attr_Alchemy_roll" value="&{template:skill}{{attribute= Alchemy}} {{character= @{character_name}}} {{Roll= [[@{Alchemy}+d12!]]}}">Alchemy</button>
                    <input type="number" class="sheet-skill" name="attr_Alchemy" value="0"/>

                    Atribute Mod
                    <input type="number" class="sheet-skill" name="attr_Science_mod" value="0"/>
                    <button type="roll" class="sheet-skillbtn" name="attr_Armsmith_roll" value="&{template:skill}{{attribute= Armsmith}} {{character= @{character_name}}} {{Roll= [[@{Armsmith}+d12!]]}}">Armsmith</button>
                    <input type="number" class="sheet-skill" name="attr_Armsmith" value="0"/>

                    <button type="roll" class="sheet-skillbtn" name="attr_Automata_roll" value="&{template:skill}{{attribute= Automata}} {{character= @{character_name}}} {{Roll= [[@{Automata}+d12!]]}}">Automata</button>
                    <input type="number" class="sheet-skill" name="attr_Automata" value="0"/>

                    <button type="roll" class="sheet-skillbtn" name="attr_Bio-Flux_roll" value="&{template:skill}{{attribute= Bio-Flux}} {{character= @{character_name}}} {{Roll= [[@{Bio-Flux}+d12!]]}}">Bio-Flux</button>
                    <input type="number" class="sheet-skill" name="attr_Bio-Flux" value="0"/>

                    <button type="roll" class="sheet-skillbtn" name="attr_Engineer_roll" value="&{template:skill}{{attribute= Engineer}} {{character= @{character_name}}} {{Roll= [[@{Engineer}+d12!]]}}">Engineer</button>
                    <input type="number" class="sheet-skill" name="attr_Engineer" value="0"/>

                    <button type="roll" class="sheet-skillbtn" name="attr_Gadgetry_roll" value="&{template:skill}{{attribute= Gadgetry}} {{character= @{character_name}}} {{Roll= [[@{Gadgetry}+d12!]]}}">Gadgetry</button>
                    <input type="number" class="sheet-skill" name="attr_Gadgetry" value="0"/>

            Lvl
            Specialty
            Accuracy
            Evade
            Strike
            Defense
            Priority
            Speed
            Augments
            DIY
            Wounds
            Hit Points

            <input type="text" class="sheet-Specialty" name="attr_Specialty_name-total" value="Total" Readonly />
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Accuracy-total" value="@{Specialty-Accuracy-misc}+@{Specialty-Accuracy-1}+@{Specialty-Accuracy-2}+@{Specialty-Accuracy-3}+@{Specialty-Accuracy-4}+@{Specialty-Accuracy-5}+@{Specialty-Accuracy-6}+@{Specialty-Accuracy-7}+@{Specialty-Accuracy-8}+@{Specialty-Accuracy-9}+@{Specialty-Accuracy-10}+@{Specialty-Accuracy-11}+@{Specialty-Accuracy-12}+@{Specialty-Accuracy-13}+@{Specialty-Accuracy-14}" disabled="true"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Evade-total" value="@{Specialty-Evade-misc}+@{Specialty-Evade-1}+@{Specialty-Evade-2}+@{Specialty-Evade-3}+@{Specialty-Evade-4}+@{Specialty-Evade-5}+@{Specialty-Evade-6}+@{Specialty-Evade-7}+@{Specialty-Evade-8}+@{Specialty-Evade-9}+@{Specialty-Evade-10}+@{Specialty-Evade-11}+@{Specialty-Evade-12}+@{Specialty-Evade-13}+@{Specialty-Evade-14}" disabled="true"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Strike-total" value="@{Specialty-Strike-misc}+@{Specialty-Strike-1}+@{Specialty-Strike-2}+@{Specialty-Strike-3}+@{Specialty-Strike-4}+@{Specialty-Strike-5}+@{Specialty-Strike-6}+@{Specialty-Strike-7}+@{Specialty-Strike-8}+@{Specialty-Strike-9}+@{Specialty-Strike-10}+@{Specialty-Strike-11}+@{Specialty-Strike-12}+@{Specialty-Strike-13}+@{Specialty-Strike-14}" disabled="true"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Defense-total" value="@{Specialty-Defense-misc}+@{Specialty-Defense-1}+@{Specialty-Defense-2}+@{Specialty-Defense-3}+@{Specialty-Defense-4}+@{Specialty-Defense-5}+@{Specialty-Defense-6}+@{Specialty-Defense-7}+@{Specialty-Defense-8}+@{Specialty-Defense-9}+@{Specialty-Defense-10}+@{Specialty-Defense-11}+@{Specialty-Defense-12}+@{Specialty-Defense-13}+@{Specialty-Defense-14}" disabled="true"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Priority-total" value="@{Specialty-Priority-misc}+@{Specialty-Priority-1}+@{Specialty-Priority-2}+@{Specialty-Priority-3}+@{Specialty-Priority-4}+@{Specialty-Priority-5}+@{Specialty-Priority-6}+@{Specialty-Priority-7}+@{Specialty-Priority-8}+@{Specialty-Priority-9}+@{Specialty-Priority-10}+@{Specialty-Priority-11}+@{Specialty-Priority-12}+@{Specialty-Priority-13}+@{Specialty-Priority-14}" disabled="true"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Speed-total" value="@{Specialty-Speed-misc}+@{Specialty-Speed-1}+@{Specialty-Speed-2}+@{Specialty-Speed-3}+@{Specialty-Speed-4}+@{Specialty-Speed-5}+@{Specialty-Speed-6}+@{Specialty-Speed-7}+@{Specialty-Speed-8}+@{Specialty-Speed-9}+@{Specialty-Speed-10}+@{Specialty-Speed-11}+@{Specialty-Speed-12}+@{Specialty-Speed-13}+@{Specialty-Speed-14}" disabled="true"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Augments-total" value="@{Specialty-Augments-misc}+@{Specialty-Augments-1}+@{Specialty-Augments-2}+@{Specialty-Augments-3}+@{Specialty-Augments-4}+@{Specialty-Augments-5}+@{Specialty-Augments-6}+@{Specialty-Augments-7}+@{Specialty-Augments-8}+@{Specialty-Augments-9}+@{Specialty-Augments-10}+@{Specialty-Augments-11}+@{Specialty-Augments-12}+@{Specialty-Augments-13}+@{Specialty-Augments-14}" disabled="true"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-DIY-total" value="@{Specialty-DIY-misc}+@{Specialty-DIY-1}+@{Specialty-DIY-2}+@{Specialty-DIY-3}+@{Specialty-DIY-4}+@{Specialty-DIY-5}+@{Specialty-DIY-6}+@{Specialty-DIY-7}+@{Specialty-DIY-8}+@{Specialty-DIY-9}+@{Specialty-DIY-10}+@{Specialty-DIY-11}+@{Specialty-DIY-12}+@{Specialty-DIY-13}+@{Specialty-DIY-14}" disabled="true"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Wounds-total" value="@{Specialty-Wounds-misc}+@{Specialty-Wounds-1}+@{Specialty-Wounds-2}+@{Specialty-Wounds-3}+@{Specialty-Wounds-4}+@{Specialty-Wounds-5}+@{Specialty-Wounds-6}+@{Specialty-Wounds-7}+@{Specialty-Wounds-8}+@{Specialty-Wounds-9}+@{Specialty-Wounds-10}+@{Specialty-Wounds-11}+@{Specialty-Wounds-12}+@{Specialty-Wounds-13}+@{Specialty-Wounds-14}" disabled="true"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Hit_Points-total" value="@{Specialty-Hit_Points-misc}+@{Specialty-Hit_Points-1}+@{Specialty-Hit_Points-2}+@{Specialty-Hit_Points-3}+@{Specialty-Hit_Points-4}+@{Specialty-Hit_Points-5}+@{Specialty-Hit_Points-6}+@{Specialty-Hit_Points-7}+@{Specialty-Hit_Points-8}+@{Specialty-Hit_Points-9}+@{Specialty-Hit_Points-10}+@{Specialty-Hit_Points-11}+@{Specialty-Hit_Points-12}+@{Specialty-Hit_Points-13}+@{Specialty-Hit_Points-14}" disabled="true"/>

            <input type="text" class="sheet-Specialty" name="attr_Specialty_name-misc" value="Misc" Readonly />
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Accuracy-misc" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Evade-misc" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Strike-misc" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Defense-misc" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Priority-misc" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Speed-misc" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Augments-misc" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-DIY-misc" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Wounds-misc" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Hit_Points-misc" value="0"/>

            1
            <input type="text" class="sheet-Specialty" name="attr_Specialty_name-1" />
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Accuracy-1" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Evade-1" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Strike-1" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Defense-1" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Priority-1" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Speed-1" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Augments-1" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-DIY-1" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Wounds-1" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Hit_Points-1" value="0"/>

            1
            <input type="text" class="sheet-Specialty" name="attr_Specialty_name-2" />
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Accuracy-2" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Evade-2" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Strike-2" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Defense-2" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Priority-2" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Speed-2" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Augments-2" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-DIY-2" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Wounds-2" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Hit_Points-2" value="0"/>

            1
            <input type="text" class="sheet-Specialty" name="attr_Specialty_name-3" />
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Accuracy-3" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Evade-3" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Strike-3" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Defense-3" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Priority-3" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Speed-3" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Augments-3" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-DIY-3" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Wounds-3" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Hit_Points-3" value="0"/>

            2
            <input type="text" class="sheet-Specialty" name="attr_Specialty_name-4" />
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Accuracy-4" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Evade-4" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Strike-4" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Defense-4" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Priority-4" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Speed-4" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Augments-4" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-DIY-4" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Wounds-4" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Hit_Points-4" value="0"/>

            3
            <input type="text" class="sheet-Specialty" name="attr_Specialty_name-5" />
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Accuracy-5" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Evade-5" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Strike-5" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Defense-5" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Priority-5" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Speed-5" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Augments-5" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-DIY-5" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Wounds-5" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Hit_Points-5" value="0"/>

            4
            <input type="text" class="sheet-Specialty" name="attr_Specialty_name-6" />
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Accuracy-6" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Evade-6" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Strike-6" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Defense-6" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Priority-6" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Speed-6" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Augments-6" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-DIY-6" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Wounds-6" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Hit_Points-6" value="0"/>

            5
            <input type="text" class="sheet-Specialty" name="attr_Specialty_name-7" />
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Accuracy-7" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Evade-7" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Strike-7" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Defense-7" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Priority-7" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Speed-7" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Augments-7" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-DIY-7" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Wounds-7" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Hit_Points-7" value="0"/>

            6
            <input type="text" class="sheet-Specialty" name="attr_Specialty_name-8" />
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Accuracy-8" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Evade-8" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Strike-8" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Defense-8" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Priority-8" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Speed-8" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Augments-8" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-DIY-8" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Wounds-8" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Hit_Points-8" value="0"/>

            7
            <input type="text" class="sheet-Specialty" name="attr_Specialty_name-9" />
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Accuracy-9" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Evade-9" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Strike-9" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Defense-9" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Priority-9" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Speed-9" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Augments-9" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-DIY-9" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Wounds-9" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Hit_Points-9" value="0"/>

            8
            <input type="text" class="sheet-Specialty" name="attr_Specialty_name-10" />
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Accuracy-10" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Evade-10" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Strike-10" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Defense-10" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Priority-10" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Speed-10" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Augments-10" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-DIY-10" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Wounds-10" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Hit_Points-10" value="0"/>

            9
            <input type="text" class="sheet-Specialty" name="attr_Specialty_name-11" />
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Accuracy-11" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Evade-11" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Strike-11" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Defense-11" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Priority-11" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Speed-11" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Augments-11" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-DIY-11" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Wounds-11" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Hit_Points-11" value="0"/>

            10
            <input type="text" class="sheet-Specialty" name="attr_Specialty_name-12" />
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Accuracy-12" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Evade-12" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Strike-12" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Defense-12" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Priority-12" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Speed-12" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Augments-12" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-DIY-12" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Wounds-12" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Hit_Points-12" value="0"/>

            11
            <input type="text" class="sheet-Specialty" name="attr_Specialty_name-13" />
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Accuracy-13" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Evade-13" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Strike-13" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Defense-13" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Priority-13" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Speed-13" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Augments-13" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-DIY-13" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Wounds-13" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Hit_Points-13" value="0"/>

            12
            <input type="text" class="sheet-Specialty" name="attr_Specialty_name-14" />
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Accuracy-14" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Evade-14" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Strike-14" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Defense-14" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Priority-14" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Speed-14" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Augments-14" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-DIY-14" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Wounds-14" value="0"/>
            <input type="number" class="sheet-Specialty" name="attr_Specialty-Hit_Points-14" value="0"/>

                    <button type="roll" class="sheet-skillbtn" name="attr_Evade_roll" style="margin-left:auto;margin-right:auto;" value="/em Evades [[1d12!+[[@{Evade}]] + [[@{Specialty-Evade-total}]] + @{armor-EvadePenalty}]], and plus @{Evade_Bonus} @{Evaded}">Evade</button>

                    <input type="number" class="sheet-Specialty" name="attr_Evade" value="0"/>

                    <button type="roll" class="sheet-skillbtn" name="attr_Defense_roll" style="margin-left:auto;margin-right:auto;"value="/em uses Defense [[1d12!+[[@{Defense}]] + [[@{Specialty-Defense-total}]] ]] and has an armor soak of @{armor-Soak}">Defense</button>

                    <input type="number" class="sheet-Specialty" name="attr_Defense" value="0"/>

Armor

                    <input type="text" class="sheet-text" name="attr_armor-Description-1" style="width:100%"/>

                    Description

                    <input type="text" class="sheet-Specialty" name="attr_armor-Size" style="width:130px"/>
                    <input type="number" class="sheet-Specialty" name="attr_armor-Soak" style="width:130px" value="0"/>

                    Size
                    Soak Class

                    Evade Penalty
                    <input type="number" class="sheet-Specialty" name="attr_armor-EvadePenalty" value="0"/>

                    Speed Penalty
                    <input type="number" class="sheet-Specialty" name="attr_armor-Speed_Penalty" value="0"/>

                    Climb/Swim Penalty
                    <input type="number" class="sheet-Specialty" name="attr_armor-Climb_Swim_Penalty" value="0"/>

                    Notes/Augments

                    <textarea wrap="soft" class="sheet-notes" name="attr_armor-notes-1" /></textarea>

                    AP

                    <input type="number" class="sheet-Specialty" name="attr_AP" value="3"/>

                    <button type="roll" class="sheet-skillbtn" name="attr_Priority_roll" style="margin-left:auto;margin-right:auto;" value="/em uses Priority [[1d12!+[[@{Priority}]] ]] ">Priority</button>

                    <input type="number" class="sheet-Specialty" name="attr_Priority" value="0"/>

                    Speed

                    <input type="number" class="sheet-Specialty" name="attr_Speed" value="20"/>

                    Swim
                    Climb
                    Fly

                    <input type="number" class="sheet-Specialty" name="attr_Swim" value="3"/>
                    <input type="number" class="sheet-Specialty" name="attr_Climb" value="3"/>
                    <input type="number" class="sheet-Specialty" name="attr_Fly" value="3"/>

Deflection

                    <input type="text" class="sheet-text" name="attr_Deflection-Item_name" style="width:100%"/>

                    Item

                    <input type="number" class="sheet-Specialty" name="attr_Evade_Bonus" style="width:100%" value="0"/>

                    Evade Bonus

                    <input type="radio" class="sheet-bigcheck" name="attr_Evaded" value="vs Ranged"/>
                    <input type="radio" class="sheet-bigcheck" name="attr_Evaded" value="vs Both" checked/>
                    <input type="radio" class="sheet-bigcheck" name="attr_Evaded" value="vs Melee"/>

                    vs Ranged
                    vs Both
                    vs Melee

                    Hit Points
                    Wounds

                    <input type="number" class="sheet-Specialty" name="attr_Hit_Points" value="0"/>
                    <input type="number" class="sheet-Specialty" name="attr_Wounds" value="0"/>

                    Max HP
                    Max Wounds

                    <input type="number" class="sheet-Specialty" name="attr_Hit_Points-max" value="0"/>
                    <input type="number" class="sheet-Specialty" name="attr_Wounds-max" value="0"/>

                    Wound Effects

                    <textarea wrap="soft" class="sheet-notes" name="attr_Wound_Effects-1" /></textarea>

                    Fatal Effects

                    <textarea wrap="soft" class="sheet-notes" name="attr_Fatal_Effects-notes-1" /></textarea>

                    Fatal Effects

                    <textarea wrap="soft" class="sheet-notes" name="attr_Status_Effects-notes-1" /></textarea>

Weapon

                    <input type="text" class="sheet-text" name="attr_weapon-name-1" style="width:100%"/>

                    Weapon Name

                    <input type="text" class="sheet-Specialty" name="attr_weapon-Size-1" style="width:130px"/>
                    <input type="text" class="sheet-Specialty" name="attr_weapon-Type-1" style="width:130px"/>
                    <input type="text" class="sheet-Specialty" name="attr_weapon-Reach-1" style="width:130px"/>

                    Size
                    Type
                    Reach

                    AP to Use
                    <input type="number" class="sheet-Specialty" name="attr_weapon-AptoUse-1" value="0"/>
                    <input type="number" class="sheet-Specialty" name="attr_weapon-APtoReady-1" value="0"/>
                    AP to Ready

                    <button type="roll" class="sheet-skillbtn" name="attr_Accuracy_roll-1" value="&{template:attack}{{weapon= @{weapon-name-1}}} {{character= @{character_name}}} {{roll= [[1d12!+[[@{weapon-Accuracy-1}]] + [[@{Specialty-Accuracy-total}]]]] }} {{damage= @{weapon-DamageClassTier1-1}/@{weapon-DamageClassTier2-1}/@{weapon-DamageClassTier3-1}/@{weapon-DamageClassTier4-1}}} {{notes= @{weapon-notes-1} }}">Accuracy</button>
                    <input type="number" class="sheet-Specialty" name="attr_weapon-Accuracy-1" value="0"/>
                    <input type="number" class="sheet-Specialty" name="attr_weapon-Strike-1" value="0"/>
                    <button type="roll" class="sheet-skillbtn" name="attr_Strike_roll-1" value="&{template:attack}{{weapon= @{weapon-name-1}}} {{character= @{character_name}}} {{roll= [[1d12!+[[@{weapon-Strike-1}]] + [[@{Specialty-Strike-total}]]]] }} {{damage= @{weapon-DamageClassTier1-1}/@{weapon-DamageClassTier2-1}/@{weapon-DamageClassTier3-1}/@{weapon-DamageClassTier4-1}}} {{notes= @{weapon-notes-1} }}">Strike</button>

                    Damage Class

                    <input type="number" class="sheet-Specialty" name="attr_weapon-DamageClassTier1-1" value="0"/>
                    <input type="number" class="sheet-Specialty" name="attr_weapon-DamageClassTier2-1" value="0"/>
                    <input type="number" class="sheet-Specialty" name="attr_weapon-DamageClassTier3-1" value="0"/>
                    <input type="number" class="sheet-Specialty" name="attr_weapon-DamageClassTier4-1" value="0"/>

                    <textarea wrap="soft" class="sheet-notes" name="attr_weapon-notes-1"  placeholder="Notes/Augments"/></textarea>

Weapon

                    <input type="text" class="sheet-text" name="attr_weapon-name-2" style="width:100%"/>

                    Weapon Name

                    <input type="text" class="sheet-Specialty" name="attr_weapon-Size-2" style="width:130px"/>
                    <input type="text" class="sheet-Specialty" name="attr_weapon-Type-2" style="width:130px"/>
                    <input type="text" class="sheet-Specialty" name="attr_weapon-Reach-2" style="width:130px"/>

                    Size
                    Type
                    Reach

                    AP to Use
                    <input type="number" class="sheet-Specialty" name="attr_weapon-AptoUse-2" value="0"/>
                    <input type="number" class="sheet-Specialty" name="attr_weapon-APtoReady-2" value="0"/>
                    AP to Ready

                    <button type="roll" class="sheet-skillbtn" name="attr_Accuracy_roll-2" value="&{template:attack}{{weapon= @{weapon-name-2}}} {{character= @{character_name}}} {{roll= [[1d12!+[[@{weapon-Accuracy-2}]] + [[@{Specialty-Accuracy-total}]]]] }} {{damage= @{weapon-DamageClassTier1-2}/@{weapon-DamageClassTier2-2}/@{weapon-DamageClassTier3-2}/@{weapon-DamageClassTier4-2}}} {{notes= @{weapon-notes-2} }}">Accuracy</button>
                    <input type="number" class="sheet-Specialty" name="attr_weapon-Accuracy-2" value="0"/>
                    <input type="number" class="sheet-Specialty" name="attr_weapon-Strike-2" value="0"/>
                    <button type="roll" class="sheet-skillbtn" name="attr_Strike_roll-2" value="&{template:attack}{{weapon= @{weapon-name-2}}} {{character= @{character_name}}} {{roll= [[1d12!+[[@{weapon-Strike-2}]] + [[@{Specialty-Strike-total}]]]] }} {{damage= @{weapon-DamageClassTier1-2}/@{weapon-DamageClassTier2-2}/@{weapon-DamageClassTier3-2}/@{weapon-DamageClassTier4-2}}} {{notes= @{weapon-notes-2} }}">Strike</button>

                    Damage Class

                    <input type="number" class="sheet-Specialty" name="attr_weapon-DamageClassTier1-2" value="0"/>
                    <input type="number" class="sheet-Specialty" name="attr_weapon-DamageClassTier2-2" value="0"/>
                    <input type="number" class="sheet-Specialty" name="attr_weapon-DamageClassTier3-2" value="0"/>
                    <input type="number" class="sheet-Specialty" name="attr_weapon-DamageClassTier4-2" value="0"/>

                    <textarea wrap="soft" class="sheet-notes" name="attr_weapon-notes-2" placeholder="Notes/Augments"/></textarea>

Gear

            <textarea wrap="soft" class="sheet-longnotes" name="attr_Gear" /></textarea>

Stories

            <textarea wrap="soft" class="sheet-longnotes" name="attr_Stories" /></textarea>

Augments

            <textarea wrap="soft" class="sheet-longnotes" name="attr_Augments" /></textarea>

                    <input type="number" class="sheet-Specialty" name="attr_Money_on_Hand" />
                    <input type="number" class="sheet-Specialty" name="attr_Money_in_Bank" />

                    Money on Hand
                    Money in Bank

Notes

            <textarea wrap="soft" class="sheet-longnotes" name="attr_Notes" /></textarea>

Racial Traits

            <textarea wrap="soft" class="sheet-longnotes" name="attr_Racial_Traits" /></textarea>

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

{{attribute}}

            {{character}} uses {{attribute}}
            {{Roll}}

</rolltemplate>

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

{{weapon}}

            {{character}} uses {{weapon}}

            Attack
            {{roll}}

            Damage
            {{damage}}

            Notes
            {{notes}}

</rolltemplate>


text:
namespace Envoy {
namespace RequestInfo {

class MockRequestInfo : public RequestInfo {
public:
  MockRequestInfo();
  ~MockRequestInfo();

  // RequestInfo::RequestInfo
  MOCK_METHOD1(setResponseFlag, void(ResponseFlag response_flag));
  MOCK_METHOD1(onUpstreamHostSelected, void(Upstream::HostDescriptionConstSharedPtr host));
  MOCK_CONST_METHOD0(startTime, SystemTime());
  MOCK_CONST_METHOD0(startTimeMonotonic, MonotonicTime());
  MOCK_CONST_METHOD0(lastDownstreamRxByteReceived, absl::optional<std::chrono::nanoseconds>());
  MOCK_METHOD0(onLastDownstreamRxByteReceived, void());
  MOCK_CONST_METHOD0(firstUpstreamTxByteSent, absl::optional<std::chrono::nanoseconds>());
  MOCK_METHOD0(onFirstUpstreamTxByteSent, void());
  MOCK_CONST_METHOD0(lastUpstreamTxByteSent, absl::optional<std::chrono::nanoseconds>());
  MOCK_METHOD0(onLastUpstreamTxByteSent, void());
  MOCK_CONST_METHOD0(firstUpstreamRxByteReceived, absl::optional<std::chrono::nanoseconds>());
  MOCK_METHOD0(onFirstUpstreamRxByteReceived, void());
  MOCK_CONST_METHOD0(lastUpstreamRxByteReceived, absl::optional<std::chrono::nanoseconds>());
  MOCK_METHOD0(onLastUpstreamRxByteReceived, void());
  MOCK_CONST_METHOD0(firstDownstreamTxByteSent, absl::optional<std::chrono::nanoseconds>());
  MOCK_METHOD0(onFirstDownstreamTxByteSent, void());
  MOCK_CONST_METHOD0(lastDownstreamTxByteSent, absl::optional<std::chrono::nanoseconds>());
  MOCK_METHOD0(onLastDownstreamTxByteSent, void());
  MOCK_METHOD0(onRequestComplete, void());
  MOCK_CONST_METHOD0(requestComplete, absl::optional<std::chrono::nanoseconds>());
  MOCK_METHOD0(resetUpstreamTimings, void());
  MOCK_CONST_METHOD0(bytesReceived, uint64_t());
  MOCK_CONST_METHOD0(protocol, absl::optional<Http::Protocol>());
  MOCK_METHOD1(protocol, void(Http::Protocol protocol));
  MOCK_CONST_METHOD0(responseCode, absl::optional<uint32_t>());
  MOCK_CONST_METHOD0(bytesSent, uint64_t());
  MOCK_CONST_METHOD1(getResponseFlag, bool(ResponseFlag));
  MOCK_CONST_METHOD0(upstreamHost, Upstream::HostDescriptionConstSharedPtr());
  MOCK_CONST_METHOD0(upstreamLocalAddress, const Network::Address::InstanceConstSharedPtr&());
  MOCK_CONST_METHOD0(healthCheck, bool());
  MOCK_METHOD1(healthCheck, void(bool is_hc));
  MOCK_CONST_METHOD0(downstreamLocalAddress, const Network::Address::InstanceConstSharedPtr&());
  MOCK_CONST_METHOD0(downstreamRemoteAddress, const Network::Address::InstanceConstSharedPtr&());
  MOCK_CONST_METHOD0(routeEntry, const Router::RouteEntry*());
  MOCK_CONST_METHOD0(dynamicMetadata, const envoy::api::v2::core::Metadata&());
  MOCK_METHOD2(setDynamicMetadata, void(const std::string&, const ProtobufWkt::Struct&));
  MOCK_METHOD3(setDynamicMetadata,
               void(const std::string&, const std::string&, const std::string&));

  std::shared_ptr<testing::NiceMock<Upstream::MockHostDescription>> host_{
      new testing::NiceMock<Upstream::MockHostDescription>()};
  SystemTime start_time_;
  MonotonicTime start_time_monotonic_;
  absl::optional<std::chrono::nanoseconds> last_downstream_rx_byte_received_;
  absl::optional<std::chrono::nanoseconds> first_upstream_tx_byte_sent_;
  absl::optional<std::chrono::nanoseconds> last_upstream_tx_byte_sent_;
  absl::optional<std::chrono::nanoseconds> first_upstream_rx_byte_received_;
  absl::optional<std::chrono::nanoseconds> last_upstream_rx_byte_received_;
  absl::optional<std::chrono::nanoseconds> first_downstream_tx_byte_sent_;
  absl::optional<std::chrono::nanoseconds> last_downstream_tx_byte_sent_;
  absl::optional<std::chrono::nanoseconds> end_time_;
  Network::Address::InstanceConstSharedPtr upstream_local_address_;
  Network::Address::InstanceConstSharedPtr downstream_local_address_;
  Network::Address::InstanceConstSharedPtr downstream_remote_address_;
  absl::optional<Http::Protocol> protocol_;
  absl::optional<uint32_t> response_code_;
  uint64_t bytes_received_{};
  uint64_t bytes_sent_{};
  envoy::api::v2::core::Metadata metadata_;
};

} // namespace RequestInfo
} // namespace Envoy

redpajama_set_name: RedPajamaGithub


text:
from msrest.serialization import Model

class ApplicationUpgradeDescription(Model):
    """Describes the parameters for an application upgrade. Please note that
    upgrade description replaces the existing application description. This
    means that if the parameters are not specified, the existing parameters on
    the applications will be overwritten with the empty parameters list. This
    would results in application using the default value of the parameters from
    the application manifest. If you do not want to change any existing
    parameter values, please get the application parameters first using the
    GetApplicationInfo query and then supply those values as Parameters in this
    ApplicationUpgradeDescription.

    :param name: The name of the target application, including the 'fabric:'
     URI scheme.
    :type name: str
    :param target_application_type_version: The target application type
     version (found in the application manifest) for the application upgrade.
    :type target_application_type_version: str
    :param parameters: List of application parameters with overridden values
     from their default values specified in the application manifest.
    :type parameters: list[~azure.servicefabric.models.ApplicationParameter]
    :param upgrade_kind: The kind of upgrade out of the following possible
     values. Possible values include: 'Invalid', 'Rolling'. Default value:
     "Rolling" .
    :type upgrade_kind: str or ~azure.servicefabric.models.UpgradeKind
    :param rolling_upgrade_mode: The mode used to monitor health during a
     rolling upgrade. Possible values include: 'Invalid', 'UnmonitoredAuto',
     'UnmonitoredManual', 'Monitored'. Default value: "UnmonitoredAuto" .
    :type rolling_upgrade_mode: str or ~azure.servicefabric.models.UpgradeMode
    :param upgrade_replica_set_check_timeout_in_seconds: The maximum amount of
     time to block processing of an upgrade domain and prevent loss of
     availability when there are unexpected issues. When this timeout expires,
     processing of the upgrade domain will proceed regardless of availability
     loss issues. The timeout is reset at the start of each upgrade domain.
     Valid values are between 0 and 42949672925 inclusive. (unsigned 32-bit
     integer).
    :type upgrade_replica_set_check_timeout_in_seconds: long
    :param force_restart: If true, then processes are forcefully restarted
     during upgrade even when the code version has not changed (the upgrade
     only changes configuration or data).
    :type force_restart: bool
    :param monitoring_policy: Describes the parameters for monitoring an
     upgrade in Monitored mode.
    :type monitoring_policy:
     ~azure.servicefabric.models.MonitoringPolicyDescription
    :param application_health_policy: Defines a health policy used to evaluate
     the health of an application or one of its children entities.
    :type application_health_policy:
     ~azure.servicefabric.models.ApplicationHealthPolicy
    """

    _validation = {
        'name': {'required': True},
        'target_application_type_version': {'required': True},
        'parameters': {'required': True},
        'upgrade_kind': {'required': True},
    }

    _attribute_map = {
        'name': {'key': 'Name', 'type': 'str'},
        'target_application_type_version': {'key': 'TargetApplicationTypeVersion', 'type': 'str'},
        'parameters': {'key': 'Parameters', 'type': '[ApplicationParameter]'},
        'upgrade_kind': {'key': 'UpgradeKind', 'type': 'str'},
        'rolling_upgrade_mode': {'key': 'RollingUpgradeMode', 'type': 'str'},
        'upgrade_replica_set_check_timeout_in_seconds': {'key': 'UpgradeReplicaSetCheckTimeoutInSeconds', 'type': 'long'},
        'force_restart': {'key': 'ForceRestart', 'type': 'bool'},
        'monitoring_policy': {'key': 'MonitoringPolicy', 'type': 'MonitoringPolicyDescription'},
        'application_health_policy': {'key': 'ApplicationHealthPolicy', 'type': 'ApplicationHealthPolicy'},
    }

    def __init__(self, name, target_application_type_version, parameters, upgrade_kind="Rolling", rolling_upgrade_mode="UnmonitoredAuto", upgrade_replica_set_check_timeout_in_seconds=None, force_restart=None, monitoring_policy=None, application_health_policy=None):
        super(ApplicationUpgradeDescription, self).__init__()
        self.name = name
        self.target_application_type_version = target_application_type_version
        self.parameters = parameters
        self.upgrade_kind = upgrade_kind
        self.rolling_upgrade_mode = rolling_upgrade_mode
        self.upgrade_replica_set_check_timeout_in_seconds = upgrade_replica_set_check_timeout_in_seconds
        self.force_restart = force_restart
        self.monitoring_policy = monitoring_policy
        self.application_health_policy = application_health_policy


text:
<?php

namespace AnyContent\Connection\FileManager;

use AnyContent\Client\File;
use AnyContent\Client\Folder;
use AnyContent\Connection\Interfaces\FileManager;
use Dflydev\ApacheMimeTypes\JsonRepository;
use Symfony\Component\Filesystem\Filesystem;
use Symfony\Component\Finder\Finder;

use Aws\S3\S3Client;

class S3FilesAccess implements FileManager
{

    /** @var S3Client */
    protected $client;

    /**
     * @var Filesystem null
     */
    protected $filesystem = null;

    protected $scheme = null;

    protected $key = null;

    protected $secret = null;

    protected $region = null;

    protected $bucketName = null;

    protected $baseFolder = null;

    protected $imagesize = false;

    protected $publicUrl = false;

    /**
     * @return S3Client
     */
    public function connect()
    {
        if (!$this->client)
        {
            // Create an Amazon S3 client object
            $this->client = S3Client::factory(array( 'key' => $this->key, 'secret' => $this->secret ));

            if ($this->region)
            {
                $this->client->setRegion($this->region);
            }

            // Register the stream wrapper from a client object
            $this->client->registerStreamWrapper();

            $this->scheme = 's3://' . $this->bucketName;

            if (file_exists($this->scheme))
            {
                $this->scheme .= '/' . $this->baseFolder;
                if (!file_exists($this->scheme))
                {
                    $this->filesystem->mkdir($this->scheme);
                }
            }
            else
            {
                throw new \Exception ('Bucket ' . $this->bucketName . ' missing.');
            }
        }

        return $this->client;
    }

    public function __construct($key, $secret, $bucketName, $baseFolder = '', $region = false)
    {

        $this->filesystem = new Filesystem();

        $this->key = $key;

        $this->secret = $secret;

        $this->region = $region;

        $this->bucketName = $bucketName;

        $this->baseFolder = $baseFolder;

    }

    public function enableImageSizeCalculation()
    {
        $this->imagesize = true;

        return $this;
    }

    public function disableImageSizeCalculation()
    {
        $this->imagesize = true;

        return $this;
    }

    /**
     * @return boolean
     */
    public function getPublicUrl()
    {
        return $this->publicUrl;
    }

    /**
     * @param boolean $publicUrl
     */
    public function setPublicUrl($publicUrl)
    {
        $this->publicUrl = rtrim($publicUrl,'/');

        return $this;
    }

    /**
     * @param string $path
     *
     * @return Folder|bool
     */
    public function getFolder($path = '')
    {
        $this->connect();

        $path = trim($path, '/');

        if (file_exists($this->scheme . '/' . $path))
        {

            $result = [ 'folders' => $this->listSubFolder($path), 'files' => $this->listFiles($path) ];

            $folder = new Folder($path, $result);

            return $folder;
        }

        return false;
    }

    /**
     * @param $id
     *
     * @return  File|bool
     */
    public function getFile($fileId)
    {
        $this->connect();

        $fileId = trim(trim($fileId, '/'));
        if ($fileId != '')
        {
            if (strpos($fileId, '/') === false)
            {
                $folder = $this->getFolder();
            }
            else
            {
                $pathinfo = pathinfo($fileId);
                $folder   = $this->getFolder($pathinfo['dirname']);
            }
            if ($folder)
            {
                return $folder->getFile($fileId);
            }
        }

        return false;
    }

    public function getBinary(File $file)
    {
        $this->connect();

        if (file_exists($this->scheme . '/' . $file->getId()))
        {
            return @file_get_contents($this->scheme . '/' . $file->getId());
        }

        return false;

    }

    public function saveFile($fileId, $binary)
    {
        $client = $this->connect();

        $fileId   = trim($fileId, '/');
        $fileName = pathinfo($fileId, PATHINFO_FILENAME);

        if ($fileName != '') // No writing of .xxx-files
        {
            $mimeTypeRepository = new JsonRepository();
            $contentType        = $mimeTypeRepository->findType(pathinfo($fileId, PATHINFO_EXTENSION));

            if (!$contentType)
            {
                $contentType = 'binary/octet-stream';
            }
            try
            {
                $client->putObject(array(
                                       'Bucket'      => $this->bucketName,
                                       'Key'         => $this->baseFolder . '/' . $fileId,
                                       'Body'        => $binary,
                                       'ACL'         => 'public-read',
                                       'ContentType' => $contentType
                                   ));

                return true;
            }
            catch (\Exception $e)
            {

            }

        }

        return false;
    }

    public function deleteFile($fileId, $deleteEmptyFolder = true)
    {
        $this->connect();

        try
        {
            if ($this->filesystem->exists($this->scheme . '/' . $fileId))
            {
                $this->filesystem->remove($this->scheme . '/' . $fileId);

                if ($deleteEmptyFolder)
                {
                    $this->deleteFolder(pathinfo($fileId, PATHINFO_DIRNAME));
                }

                return true;
            }
        }
        catch (\Exception $e)
        {

        }

        return false;

    }

    public function createFolder($path)
    {
        $this->connect();

        $path = trim($path, '/');

        $this->filesystem->mkdir($this->scheme . '/' . $path . '/');

        return true;
    }

    public function deleteFolder($path, $deleteIfNotEmpty = false)
    {
        $client = $this->connect();

        $path = trim($path, '/');

        $folder = $this->getFolder($path);

        if ($folder)
        {
            if (count($folder->getFiles()) > 0 && $deleteIfNotEmpty == false)
            {
                return false;
            }

            $path = $this->baseFolder . '/' . $path;
            $path = trim($path, '/');

            $nr = $client->deleteMatchingObjects($this->bucketName, $path);

            if ($nr > 1)
            {
                return true;
            }
        }

        return false;
    }

    protected function listSubFolder($path)
    {
        $this->connect();

        if ($path != '')
        {
            $path = $this->scheme . '/' . trim($path, '/');
        }
        else
        {
            $path = $this->scheme;
        }
        $folders = array();
        $finder  = new Finder();

        $finder->depth('==0');

        try
        {
            /* @var $file \SplFileInfo */
            foreach ($finder->in($path) as $file)
            {

                if ($file->isDir())
                {

                    $folders[] = $file->getFilename();

                }
            }

        }
        catch (\Exception $e)
        {

            return false;
        }

        return $folders;

    }

    protected function listFiles($path)
    {
        $this->connect();

        if ($path != '')
        {
            $dir = $this->scheme . '/' . trim($path, '/');
        }
        else
        {
            $dir = $this->scheme;
        }

        $files  = array();
        $finder = new Finder();

        $finder->depth('==0');

        try
        {
            /* @var $file \SplFileInfo */
            foreach ($finder->in($dir) as $file)
            {

                if (!$file->isDir())
                {
                    $item         = array();
                    $item['id']   = trim($path . '/' . $file->getFilename(), '/');
                    $item['name'] = $file->getFilename();
                    $item['urls'] = array();
                    $item['type'] = 'binary';
                    $item['size'] = $file->getSize();

                    $extension = strtolower($extension = pathinfo($file->getFilename(), PATHINFO_EXTENSION)); // To be compatible with some older PHP 5.3 versions

                    if (in_array($extension, array( 'gif', 'png', 'jpg', 'jpeg' )))
                    {
                        $item['type'] = 'image';
                        if ($this->imagesize == true)
                        {

                            $content = $file->getContents();

                            if (function_exists('imagecreatefromstring'))
                            {
                                $image = @imagecreatefromstring($content);
                                if ($image)
                                {

                                    $item['width']  = imagesx($image);
                                    $item['height'] = imagesy($image);
                                }
                            }
                        }

                    }
                    $item['timestamp_lastchange'] = $file->getMTime();

                    if ($this->publicUrl != false)
                    {
                        $item['url'] = $this->publicUrl . '/' . $item['id'];
                    }

                    $files[$file->getFilename()] = $item;
                }

            }
        }
        catch (\Exception $e)
        {
            return false;
        }

        return $files;
    }

}


text:
package br.com.catbag.gifreduxsample.utils;

import android.util.Log;

import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;

import static android.support.test.InstrumentationRegistry.getInstrumentation;

public final class FileUtils {

    private FileUtils() { }

    public static File createFakeGifFile() {
        File dst = new File(getInstrumentation().getTargetContext()
                .getExternalCacheDir() + "/test.gif");
        try {
            InputStream iStream = getInstrumentation().getContext()
                    .getResources().getAssets().open("test.gif");
            OutputStream out = new FileOutputStream(dst);
            // Transfer bytes from in to out
            byte[] buf = new byte[1024];
            int len;
            while ((len = iStream.read(buf)) > 0) {
                out.write(buf, 0, len);
            }
            iStream.close();
            out.close();
        } catch (IOException e) {
            Log.e(FileUtils.class.getSimpleName(), "", e);
        }
        return dst;
    }

}


text:
Copyright (c) 2008-2015 VersionOne, Inc. All rights reserved.

**The VersionOne Integration for Fitnesse has been deprecated as of the Summer 2015 release of VersionOne and is no longer supported by VersionOne. It is now open-sourced and supported by the development community.**


text:
package com.spotify.heroic.rpc.grpc;

import eu.toolchain.async.AsyncFuture;

import java.util.ArrayList;
import java.util.List;
import java.util.function.Function;

public class GrpcRpcContainer {
    private final List<GrpcEndpointHandle<?, ?>> endpoints = new ArrayList<>();

    @SuppressWarnings("unchecked")
    public void register(final GrpcRpcEndpointHandleBase<?, ?> handle) {
        endpoints.add(handle);
    }

    public <Q, R> void register(
        final GrpcDescriptor<Q, R> spec, Function<Q, AsyncFuture<R>> handle
    ) {
        register(new GrpcRpcEndpointHandleBase<Q, R>(spec) {
            @Override
            public AsyncFuture<R> handle(final Q request) throws Exception {
                return handle.apply(request);
            }
        });
    }

    public List<GrpcEndpointHandle<?, ?>> getEndpoints() {
        return endpoints;
    }
}


text:
#ifndef __XEN_PUBLIC_PLATFORM_H__
#define __XEN_PUBLIC_PLATFORM_H__

#include "xen.h"

#define XENPF_INTERFACE_VERSION 0x03000001

/*
 * Set clock such that it would read <secs,nsecs> after 00:00:00 UTC,
 * 1 January, 1970 if the current system time was <system_time>.
 */
#define XENPF_settime             17
struct xenpf_settime {
    /* IN variables. */
    uint32_t secs;
    uint32_t nsecs;
    uint64_t system_time;
};
typedef struct xenpf_settime xenpf_settime_t;
DEFINE_XEN_GUEST_HANDLE(xenpf_settime_t);

/*
 * Request memory range (@mfn, @mfn+@nr_mfns-1) to have type @type.
 * On x86, @type is an architecture-defined MTRR memory type.
 * On success, returns the MTRR that was used (@reg) and a handle that can
 * be passed to XENPF_DEL_MEMTYPE to accurately tear down the new setting.
 * (x86-specific).
 */
#define XENPF_add_memtype         31
struct xenpf_add_memtype {
    /* IN variables. */
    xen_pfn_t mfn;
    uint64_t nr_mfns;
    uint32_t type;
    /* OUT variables. */
    uint32_t handle;
    uint32_t reg;
};
typedef struct xenpf_add_memtype xenpf_add_memtype_t;
DEFINE_XEN_GUEST_HANDLE(xenpf_add_memtype_t);

/*
 * Tear down an existing memory-range type. If @handle is remembered then it
 * should be passed in to accurately tear down the correct setting (in case
 * of overlapping memory regions with differing types). If it is not known
 * then @handle should be set to zero. In all cases @reg must be set.
 * (x86-specific).
 */
#define XENPF_del_memtype         32
struct xenpf_del_memtype {
    /* IN variables. */
    uint32_t handle;
    uint32_t reg;
};
typedef struct xenpf_del_memtype xenpf_del_memtype_t;
DEFINE_XEN_GUEST_HANDLE(xenpf_del_memtype_t);

/* Read current type of an MTRR (x86-specific). */
#define XENPF_read_memtype        33
struct xenpf_read_memtype {
    /* IN variables. */
    uint32_t reg;
    /* OUT variables. */
    xen_pfn_t mfn;
    uint64_t nr_mfns;
    uint32_t type;
};
typedef struct xenpf_read_memtype xenpf_read_memtype_t;
DEFINE_XEN_GUEST_HANDLE(xenpf_read_memtype_t);

#define XENPF_microcode_update    35
struct xenpf_microcode_update {
    /* IN variables. */
    XEN_GUEST_HANDLE(const_void) data;/* Pointer to microcode data */
    uint32_t length;                  /* Length of microcode data. */
};
typedef struct xenpf_microcode_update xenpf_microcode_update_t;
DEFINE_XEN_GUEST_HANDLE(xenpf_microcode_update_t);

#define XENPF_platform_quirk      39
#define QUIRK_NOIRQBALANCING      1 /* Do not restrict IO-APIC RTE targets */
#define QUIRK_IOAPIC_BAD_REGSEL   2 /* IO-APIC REGSEL forgets its value    */
#define QUIRK_IOAPIC_GOOD_REGSEL  3 /* IO-APIC REGSEL behaves properly     */
struct xenpf_platform_quirk {
    /* IN variables. */
    uint32_t quirk_id;
};
typedef struct xenpf_platform_quirk xenpf_platform_quirk_t;
DEFINE_XEN_GUEST_HANDLE(xenpf_platform_quirk_t);

#define XENPF_efi_runtime_call    49
#define XEN_EFI_get_time                      1
#define XEN_EFI_set_time                      2
#define XEN_EFI_get_wakeup_time               3
#define XEN_EFI_set_wakeup_time               4
#define XEN_EFI_get_next_high_monotonic_count 5
#define XEN_EFI_get_variable                  6
#define XEN_EFI_set_variable                  7
#define XEN_EFI_get_next_variable_name        8
#define XEN_EFI_query_variable_info           9
#define XEN_EFI_query_capsule_capabilities   10
#define XEN_EFI_update_capsule               11

// !BAM
            struct xenpf_efi_time {
                uint16_t year;
                uint8_t month;
                uint8_t day;
                uint8_t hour;
                uint8_t min;
                uint8_t sec;
                uint32_t ns;
                int16_t tz;
                uint8_t daylight;
            };

            struct xenpf_efi_guid {
                uint32_t data1;
                uint16_t data2;
                uint16_t data3;
                uint8_t data4[8];
            };

struct xenpf_efi_runtime_call {
    uint32_t function;
    /*
     * This field is generally used for per sub-function flags (defined
     * below), except for the XEN_EFI_get_next_high_monotonic_count case,
     * where it holds the single returned value.
     */
    uint32_t misc;
    unsigned long status;
    union {
#define XEN_EFI_GET_TIME_SET_CLEARS_NS 0x00000001
        struct {
// !BAM
//            struct xenpf_efi_time {
//                uint16_t year;
//                uint8_t month;
//                uint8_t day;
//                uint8_t hour;
//                uint8_t min;
//                uint8_t sec;
//                uint32_t ns;
//                int16_t tz;
//                uint8_t daylight;
//            } time;
            struct xenpf_efi_time time;
            uint32_t resolution;
            uint32_t accuracy;
        } get_time;

        struct xenpf_efi_time set_time;

#define XEN_EFI_GET_WAKEUP_TIME_ENABLED 0x00000001
#define XEN_EFI_GET_WAKEUP_TIME_PENDING 0x00000002
        struct xenpf_efi_time get_wakeup_time;

#define XEN_EFI_SET_WAKEUP_TIME_ENABLE      0x00000001
#define XEN_EFI_SET_WAKEUP_TIME_ENABLE_ONLY 0x00000002
        struct xenpf_efi_time set_wakeup_time;

#define XEN_EFI_VARIABLE_NON_VOLATILE       0x00000001
#define XEN_EFI_VARIABLE_BOOTSERVICE_ACCESS 0x00000002
#define XEN_EFI_VARIABLE_RUNTIME_ACCESS     0x00000004
        struct {
            XEN_GUEST_HANDLE(void) name;  /* UCS-2/UTF-16 string */
            unsigned long size;
            XEN_GUEST_HANDLE(void) data;
// !BAM
//            struct xenpf_efi_guid {
//                uint32_t data1;
//                uint16_t data2;
//                uint16_t data3;
//                uint8_t data4[8];
//            } vendor_guid;
            struct xenpf_efi_guid vendor_guid;
        } get_variable, set_variable;

        struct {
            unsigned long size;
            XEN_GUEST_HANDLE(void) name;  /* UCS-2/UTF-16 string */
            struct xenpf_efi_guid vendor_guid;
        } get_next_variable_name;

        struct {
            uint32_t attr;
            uint64_t max_store_size;
            uint64_t remain_store_size;
            uint64_t max_size;
        } query_variable_info;

        struct {
            XEN_GUEST_HANDLE(void) capsule_header_array;
            unsigned long capsule_count;
            uint64_t max_capsule_size;
            unsigned int reset_type;
        } query_capsule_capabilities;

        struct {
            XEN_GUEST_HANDLE(void) capsule_header_array;
            unsigned long capsule_count;
            uint64_t sg_list; /* machine address */
        } update_capsule;
    } u;
};
typedef struct xenpf_efi_runtime_call xenpf_efi_runtime_call_t;
DEFINE_XEN_GUEST_HANDLE(xenpf_efi_runtime_call_t);

#define XENPF_firmware_info       50
#define XEN_FW_DISK_INFO          1 /* from int 13 AH=08/41/48 */
#define XEN_FW_DISK_MBR_SIGNATURE 2 /* from MBR offset 0x1b8 */
#define XEN_FW_VBEDDC_INFO        3 /* from int 10 AX=4f15 */
#define XEN_FW_EFI_INFO           4 /* from EFI */
#define  XEN_FW_EFI_VERSION        0
#define  XEN_FW_EFI_CONFIG_TABLE   1
#define  XEN_FW_EFI_VENDOR         2
#define  XEN_FW_EFI_MEM_INFO       3
#define  XEN_FW_EFI_RT_VERSION     4
struct xenpf_firmware_info {
    /* IN variables. */
    uint32_t type;
    uint32_t index;
    /* OUT variables. */
    union {
        struct {
            /* Int13, Fn48: Check Extensions Present. */
            uint8_t device;                   /* %dl: bios device number */
            uint8_t version;                  /* %ah: major version      */
            uint16_t interface_support;       /* %cx: support bitmap     */
            /* Int13, Fn08: Legacy Get Device Parameters. */
            uint16_t legacy_max_cylinder;     /* %cl[7:6]:%ch: max cyl # */
            uint8_t legacy_max_head;          /* %dh: max head #         */
            uint8_t legacy_sectors_per_track; /* %cl[5:0]: max sector #  */
            /* Int13, Fn41: Get Device Parameters (as filled into %ds:%esi). */
            /* NB. First uint16_t of buffer must be set to buffer size.      */
            XEN_GUEST_HANDLE(void) edd_params;
        } disk_info; /* XEN_FW_DISK_INFO */
        struct {
            uint8_t device;                   /* bios device number  */
            uint32_t mbr_signature;           /* offset 0x1b8 in mbr */
        } disk_mbr_signature; /* XEN_FW_DISK_MBR_SIGNATURE */
        struct {
            /* Int10, AX=4F15: Get EDID info. */
            uint8_t capabilities;
            uint8_t edid_transfer_time;
            /* must refer to 128-byte buffer */
            XEN_GUEST_HANDLE(uint8) edid;
        } vbeddc_info; /* XEN_FW_VBEDDC_INFO */
        union xenpf_efi_info {
            uint32_t version;
            struct {
                uint64_t addr;                /* EFI_CONFIGURATION_TABLE */
                uint32_t nent;
            } cfg;
            struct {
                uint32_t revision;
                uint32_t bufsz;               /* input, in bytes */
                XEN_GUEST_HANDLE(void) name;  /* UCS-2/UTF-16 string */
            } vendor;
            struct {
                uint64_t addr;
                uint64_t size;
                uint64_t attr;
                uint32_t type;
            } mem;
        } efi_info; /* XEN_FW_EFI_INFO */
    } u;
};
typedef struct xenpf_firmware_info xenpf_firmware_info_t;
DEFINE_XEN_GUEST_HANDLE(xenpf_firmware_info_t);

#define XENPF_enter_acpi_sleep    51
struct xenpf_enter_acpi_sleep {
    /* IN variables */
    uint16_t pm1a_cnt_val;      /* PM1a control value. */
    uint16_t pm1b_cnt_val;      /* PM1b control value. */
    uint32_t sleep_state;       /* Which state to enter (Sn). */
    uint32_t flags;             /* Must be zero. */
};
typedef struct xenpf_enter_acpi_sleep xenpf_enter_acpi_sleep_t;
DEFINE_XEN_GUEST_HANDLE(xenpf_enter_acpi_sleep_t);

#define XENPF_change_freq         52
struct xenpf_change_freq {
    /* IN variables */
    uint32_t flags; /* Must be zero. */
    uint32_t cpu;   /* Physical cpu. */
    uint64_t freq;  /* New frequency (Hz). */
};
typedef struct xenpf_change_freq xenpf_change_freq_t;
DEFINE_XEN_GUEST_HANDLE(xenpf_change_freq_t);

/*
 * Get idle times (nanoseconds since boot) for physical CPUs specified in the
 * @cpumap_bitmap with range [0..@cpumap_nr_cpus-1]. The @idletime array is
 * indexed by CPU number; only entries with the corresponding @cpumap_bitmap
 * bit set are written to. On return, @cpumap_bitmap is modified so that any
 * non-existent CPUs are cleared. Such CPUs have their @idletime array entry
 * cleared.
 */
#define XENPF_getidletime         53
struct xenpf_getidletime {
    /* IN/OUT variables */
    /* IN: CPUs to interrogate; OUT: subset of IN which are present */
    XEN_GUEST_HANDLE(uint8) cpumap_bitmap;
    /* IN variables */
    /* Size of cpumap bitmap. */
    uint32_t cpumap_nr_cpus;
    /* Must be indexable for every cpu in cpumap_bitmap. */
    XEN_GUEST_HANDLE(uint64) idletime;
    /* OUT variables */
    /* System time when the idletime snapshots were taken. */
    uint64_t now;
};
typedef struct xenpf_getidletime xenpf_getidletime_t;
DEFINE_XEN_GUEST_HANDLE(xenpf_getidletime_t);

#define XENPF_set_processor_pminfo      54

/* ability bits */
#define XEN_PROCESSOR_PM_CX	1
#define XEN_PROCESSOR_PM_PX	2
#define XEN_PROCESSOR_PM_TX	4

/* cmd type */
#define XEN_PM_CX   0
#define XEN_PM_PX   1
#define XEN_PM_TX   2
#define XEN_PM_PDC  3

/* Px sub info type */
#define XEN_PX_PCT   1
#define XEN_PX_PSS   2
#define XEN_PX_PPC   4
#define XEN_PX_PSD   8

struct xen_power_register {
    uint32_t     space_id;
    uint32_t     bit_width;
    uint32_t     bit_offset;
    uint32_t     access_size;
    uint64_t     address;
};

struct xen_processor_csd {
    uint32_t    domain;      /* domain number of one dependent group */
    uint32_t    coord_type;  /* coordination type */
    uint32_t    num;         /* number of processors in same domain */
};
typedef struct xen_processor_csd xen_processor_csd_t;
DEFINE_XEN_GUEST_HANDLE(xen_processor_csd_t);

struct xen_processor_cx {
    struct xen_power_register  reg; /* GAS for Cx trigger register */
    uint8_t     type;     /* cstate value, c0: 0, c1: 1, ... */
    uint32_t    latency;  /* worst latency (ms) to enter/exit this cstate */
    uint32_t    power;    /* average power consumption(mW) */
    uint32_t    dpcnt;    /* number of dependency entries */
    XEN_GUEST_HANDLE(xen_processor_csd_t) dp; /* NULL if no dependency */
};
typedef struct xen_processor_cx xen_processor_cx_t;
DEFINE_XEN_GUEST_HANDLE(xen_processor_cx_t);

struct xen_processor_flags {
    uint32_t bm_control:1;
    uint32_t bm_check:1;
    uint32_t has_cst:1;
    uint32_t power_setup_done:1;
    uint32_t bm_rld_set:1;
};

struct xen_processor_power {
    uint32_t count;  /* number of C state entries in array below */
    struct xen_processor_flags flags;  /* global flags of this processor */
    XEN_GUEST_HANDLE(xen_processor_cx_t) states; /* supported c states */
};

struct xen_pct_register {
    uint8_t  descriptor;
    uint16_t length;
    uint8_t  space_id;
    uint8_t  bit_width;
    uint8_t  bit_offset;
    uint8_t  reserved;
    uint64_t address;
};

struct xen_processor_px {
    uint64_t core_frequency; /* megahertz */
    uint64_t power;      /* milliWatts */
    uint64_t transition_latency; /* microseconds */
    uint64_t bus_master_latency; /* microseconds */
    uint64_t control;        /* control value */
    uint64_t status;     /* success indicator */
};
typedef struct xen_processor_px xen_processor_px_t;
DEFINE_XEN_GUEST_HANDLE(xen_processor_px_t);

struct xen_psd_package {
    uint64_t num_entries;
    uint64_t revision;
    uint64_t domain;
    uint64_t coord_type;
    uint64_t num_processors;
};

struct xen_processor_performance {
    uint32_t flags;     /* flag for Px sub info type */
    uint32_t platform_limit;  /* Platform limitation on freq usage */
    struct xen_pct_register control_register;
    struct xen_pct_register status_register;
    uint32_t state_count;     /* total available performance states */
    XEN_GUEST_HANDLE(xen_processor_px_t) states;
    struct xen_psd_package domain_info;
    uint32_t shared_type;     /* coordination type of this processor */
};
typedef struct xen_processor_performance xen_processor_performance_t;
DEFINE_XEN_GUEST_HANDLE(xen_processor_performance_t);

struct xenpf_set_processor_pminfo {
    /* IN variables */
    uint32_t id;    /* ACPI CPU ID */
    uint32_t type;  /* {XEN_PM_CX, XEN_PM_PX} */
    union {
        struct xen_processor_power          power;/* Cx: _CST/_CSD */
        struct xen_processor_performance    perf; /* Px: _PPC/_PCT/_PSS/_PSD */
        XEN_GUEST_HANDLE(uint32)            pdc;  /* _PDC */
    } u;
};
typedef struct xenpf_set_processor_pminfo xenpf_set_processor_pminfo_t;
DEFINE_XEN_GUEST_HANDLE(xenpf_set_processor_pminfo_t);

#define XENPF_get_cpuinfo 55
struct xenpf_pcpuinfo {
    /* IN */
    uint32_t xen_cpuid;
    /* OUT */
    /* The maxium cpu_id that is present */
    uint32_t max_present;
#define XEN_PCPU_FLAGS_ONLINE   1
    /* Correponding xen_cpuid is not present*/
#define XEN_PCPU_FLAGS_INVALID  2
    uint32_t flags;
    uint32_t apic_id;
    uint32_t acpi_id;
};
typedef struct xenpf_pcpuinfo xenpf_pcpuinfo_t;
DEFINE_XEN_GUEST_HANDLE(xenpf_pcpuinfo_t);

#define XENPF_get_cpu_version 48
struct xenpf_pcpu_version {
    /* IN */
    uint32_t xen_cpuid;
    /* OUT */
    /* The maxium cpu_id that is present */
    uint32_t max_present;
    char vendor_id[12];
    uint32_t family;
    uint32_t model;
    uint32_t stepping;
};
typedef struct xenpf_pcpu_version xenpf_pcpu_version_t;
DEFINE_XEN_GUEST_HANDLE(xenpf_pcpu_version_t);

#define XENPF_cpu_online    56
#define XENPF_cpu_offline   57
struct xenpf_cpu_ol
{
    uint32_t cpuid;
};
typedef struct xenpf_cpu_ol xenpf_cpu_ol_t;
DEFINE_XEN_GUEST_HANDLE(xenpf_cpu_ol_t);

#define XENPF_cpu_hotadd    58
struct xenpf_cpu_hotadd
{
	uint32_t apic_id;
	uint32_t acpi_id;
	uint32_t pxm;
};

#define XENPF_mem_hotadd    59
struct xenpf_mem_hotadd
{
    uint64_t spfn;
    uint64_t epfn;
    uint32_t pxm;
    uint32_t flags;
};

#define XENPF_core_parking  60

#define XEN_CORE_PARKING_SET 1
#define XEN_CORE_PARKING_GET 2
struct xenpf_core_parking {
    /* IN variables */
    uint32_t type;
    /* IN variables:  set cpu nums expected to be idled */
    /* OUT variables: get cpu nums actually be idled */
    uint32_t idle_nums;
};
typedef struct xenpf_core_parking xenpf_core_parking_t;
DEFINE_XEN_GUEST_HANDLE(xenpf_core_parking_t);

/*
 * ` enum neg_errnoval
 * ` HYPERVISOR_platform_op(const struct xen_platform_op*);
 */
struct xen_platform_op {
    uint32_t cmd;
    uint32_t interface_version; /* XENPF_INTERFACE_VERSION */
    union {
        struct xenpf_settime           settime;
        struct xenpf_add_memtype       add_memtype;
        struct xenpf_del_memtype       del_memtype;
        struct xenpf_read_memtype      read_memtype;
        struct xenpf_microcode_update  microcode;
        struct xenpf_platform_quirk    platform_quirk;
        struct xenpf_efi_runtime_call  efi_runtime_call;
        struct xenpf_firmware_info     firmware_info;
        struct xenpf_enter_acpi_sleep  enter_acpi_sleep;
        struct xenpf_change_freq       change_freq;
        struct xenpf_getidletime       getidletime;
        struct xenpf_set_processor_pminfo set_pminfo;
        struct xenpf_pcpuinfo          pcpu_info;
        struct xenpf_pcpu_version      pcpu_version;
        struct xenpf_cpu_ol            cpu_ol;
        struct xenpf_cpu_hotadd        cpu_add;
        struct xenpf_mem_hotadd        mem_add;
        struct xenpf_core_parking      core_parking;
        uint8_t                        pad[128];
    } u;
};
typedef struct xen_platform_op xen_platform_op_t;
DEFINE_XEN_GUEST_HANDLE(xen_platform_op_t);

#endif /* __XEN_PUBLIC_PLATFORM_H__ */

/*
 * Local variables:
 * mode: C
 * c-set-style: "BSD"
 * c-basic-offset: 4
 * tab-width: 4
 * indent-tabs-mode: nil
 * End:
 */


text:
This is a rewrite (port) of [Memcached](http://http://memcached.org/) in
Java.  This goal was to have a feature complete implementation that is within
10% of the performance of the C original.

# Current status

I started working on this a few years ago and got the slab allocator and hash
working, but life being as it is, I never finished the protocol port.  If there
is general interest in this project, I'd we willing to pick it up again and
finish it.


text:
from __future__ import unicode_literals
from jinja2 import contextfilter

from pprint import pformat
from cgi import escape as html_escape

def html_format(variable):
    data = pformat(variable, indent=4)
    data = html_escape(data)
    data = data.replace('    ', '    ')
    data = data.replace('\n', '<br />')
    return data

def dump(variable):
    return html_format(variable)

@contextfilter
def dump_all(context, var):
    return html_format(context.items())

files = {}
def dump_file(filename):
    ret = files.get(filename, False)
    if ret:
        return ret

    with open(filename, 'r') as fp:
        data = fp.read()

    files[filename] = data
    return data

urls = {}
def dump_url(url):
    ret = urls.get(url, False)
    if ret:
        return ret

    import urllib2
    response = urllib2.urlopen(url)
    html = response.read()

    urls[url] = html

    return html


text:
import { configure } from '@kadira/storybook';

function loadStories() {
  require('../stories/index');
}

configure(loadStories, module);


text:
windows_service 'ReportServer' do
  action [:start, :enable]
end

powershell_script "Configure SSRS" do
  code <<-EOH
  $rsConfig = Get-WmiObject -namespace "root\\Microsoft\\SqlServer\\ReportServer\\RS_MSSQLServer\\v12\\Admin" -class MSReportServer_ConfigurationSetting -ComputerName localhost -filter "InstanceName='#{node[:ssrs][:instance_name]}'"

  if(!$rsConfig.IsInitialized)
  {
    $rsConfig.RemoveURL("ReportServerWebService", "#{node[:ssrs][:base_url]}", 1033)
    $rsConfig.RemoveURL("ReportManager", "#{node[:ssrs][:base_url]}", 1033)

    $rsConfig.SetVirtualDirectory("ReportServerWebService", "ReportServer", 1033)
    $rsConfig.SetVirtualDirectory("ReportManager", "Reports", 1033)

    $rsConfig.ReserveURL("ReportServerWebService", "#{node[:ssrs][:base_url]}", 1033)
    $rsConfig.ReserveURL("ReportManager", "#{node[:ssrs][:base_url]}", 1033)
  }

  EOH
  action :run
end