text:
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2010 The Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->
<!DOCTYPE MediaSettings [
<!ELEMENT MediaSettings (CamcorderProfiles,
                         EncoderOutputFileFormat+,
                         VideoEncoderCap+,
                         AudioEncoderCap+,
                         VideoDecoderCap,
                         AudioDecoderCap,
                         LgeCamcorderCap)>
<!ELEMENT CamcorderProfiles (EncoderProfile+, ImageEncoding+, ImageDecoding, Camera)>
<!ELEMENT EncoderProfile (Video, Audio)>
<!ATTLIST EncoderProfile quality (high|low) #REQUIRED>
<!ATTLIST EncoderProfile fileFormat (mp4|3gp) #REQUIRED>
<!ATTLIST EncoderProfile duration (30|60) #REQUIRED>
<!ATTLIST EncoderProfile cameraId (0|1) #REQUIRED>
<!ELEMENT Video EMPTY>
<!ATTLIST Video codec (h264|h263|m4v) #REQUIRED>
<!ATTLIST Video bitRate CDATA #REQUIRED>
<!ATTLIST Video width CDATA #REQUIRED>
<!ATTLIST Video height CDATA #REQUIRED>
<!ATTLIST Video frameRate CDATA #REQUIRED>
<!ELEMENT Audio EMPTY>
<!ATTLIST Audio codec (amrnb|amrwb|aac) #REQUIRED>
<!ATTLIST Audio bitRate CDATA #REQUIRED>
<!ATTLIST Audio sampleRate CDATA #REQUIRED>
<!ATTLIST Audio channels (1|2) #REQUIRED>
<!ELEMENT ImageEncoding EMPTY>
<!ATTLIST ImageEncoding quality (90|80|70|60|50|40) #REQUIRED>
<!ELEMENT ImageDecoding EMPTY>
<!ATTLIST ImageDecoding memCap CDATA #REQUIRED>
<!ELEMENT Camera EMPTY>
<!ELEMENT EncoderOutputFileFormat EMPTY>
<!ATTLIST EncoderOutputFileFormat name (mp4|3gp) #REQUIRED>
<!ELEMENT VideoEncoderCap EMPTY>
<!ATTLIST VideoEncoderCap name (h264|h263|m4v|wmv) #REQUIRED>
<!ATTLIST VideoEncoderCap enabled (true|false) #REQUIRED>
<!ATTLIST VideoEncoderCap minBitRate CDATA #REQUIRED>
<!ATTLIST VideoEncoderCap maxBitRate CDATA #REQUIRED>
<!ATTLIST VideoEncoderCap minFrameWidth CDATA #REQUIRED>
<!ATTLIST VideoEncoderCap maxFrameWidth CDATA #REQUIRED>
<!ATTLIST VideoEncoderCap minFrameHeight CDATA #REQUIRED>
<!ATTLIST VideoEncoderCap maxFrameHeight CDATA #REQUIRED>
<!ATTLIST VideoEncoderCap minFrameRate CDATA #REQUIRED>
<!ATTLIST VideoEncoderCap maxFrameRate CDATA #REQUIRED>
<!ELEMENT AudioEncoderCap EMPTY>
<!ATTLIST AudioEncoderCap name (amrnb|amrwb|aac|wma) #REQUIRED>
<!ATTLIST AudioEncoderCap enabled (true|false) #REQUIRED>
<!ATTLIST AudioEncoderCap minBitRate CDATA #REQUIRED>
<!ATTLIST AudioEncoderCap maxBitRate CDATA #REQUIRED>
<!ATTLIST AudioEncoderCap minSampleRate CDATA #REQUIRED>
<!ATTLIST AudioEncoderCap maxSampleRate CDATA #REQUIRED>
<!ATTLIST AudioEncoderCap minChannels (1|2) #REQUIRED>
<!ATTLIST AudioEncoderCap maxChannels (1|2) #REQUIRED>
<!ELEMENT VideoDecoderCap EMPTY>
<!ATTLIST VideoDecoderCap name (wmv) #REQUIRED>
<!ATTLIST VideoDecoderCap enabled (true|false) #REQUIRED>
<!ELEMENT AudioDecoderCap EMPTY>
<!ATTLIST AudioDecoderCap name (wma) #REQUIRED>
<!ATTLIST AudioDecoderCap enabled (true|false) #REQUIRED>
<!ELEMENT VideoEditorCap EMPTY>
<!ATTLIST VideoEditorCap maxInputFrameWidth CDATA #REQUIRED>
<!ATTLIST VideoEditorCap maxInputFrameHeight CDATA #REQUIRED>
<!ATTLIST VideoEditorCap maxOutputFrameWidth CDATA #REQUIRED>
<!ATTLIST VideoEditorCap maxOutputFrameHeight CDATA #REQUIRED>
<!ATTLIST VideoEditorCap maxPrefetchYUVFrames CDATA #REQUIRED>
<!ELEMENT ExportVideoProfile EMPTY>
<!ATTLIST ExportVideoProfile name (h264|h263|m4v) #REQUIRED>
<!ATTLIST ExportVideoProfile profile CDATA #REQUIRED>
<!ATTLIST ExportVideoProfile level CDATA #REQUIRED>
<!ELEMENT LgeCamcorderCap EMPTY>
<!ATTLIST LgeCamcorderCap minfps CDATA #REQUIRED>
<!ATTLIST LgeCamcorderCap maxfps CDATA #REQUIRED>
<!ATTLIST LgeCamcorderCap usehighprofile CDATA #REQUIRED>
<!ATTLIST LgeCamcorderCap audiozoomenable CDATA #REQUIRED>
<!ATTLIST LgeCamcorderCap audiozoomX CDATA #REQUIRED>
<!ATTLIST LgeCamcorderCap audiozoomY CDATA #REQUIRED>
<!ATTLIST LgeCamcorderCap usehwaac CDATA #REQUIRED>
]>
<!--
     This file is used to declare the multimedia profiles and capabilities
     on an android-powered device.
-->
<MediaSettings>
    <!-- Each camcorder profile defines a set of predefined configuration parameters -->
    <CamcorderProfiles cameraId="0">

	<EncoderProfile quality="480p" fileFormat="mp4" duration="60">
            <Video codec="h264"
                   bitRate="2000000"
                   width="640"
                   height="480"
                   frameRate="30" />
            <Audio codec="aac"
                   bitRate="156000"
                   sampleRate="48000"
                   channels="2" />
        </EncoderProfile>

        <EncoderProfile quality="qvga" fileFormat="mp4" duration="60">
            <Video codec="h264"
                   bitRate="128000"
                   width="320"
                   height="240"
                   frameRate="15" />
            <Audio codec="aac"
                   bitRate="12200"
                   sampleRate="8000"
                   channels="1" />
        </EncoderProfile>

        <EncoderProfile quality="qcif" fileFormat="3gp" duration="30">
      	    <Video codec="h264"
             bitRate="128000"
             width="176"
             height="144"
             frameRate="15" />

            <Audio codec="aac"
             bitRate="12200"
             sampleRate="8000"
             channels="1" />
        </EncoderProfile>

        <EncoderProfile quality="timelapsecif" fileFormat="mp4" duration="30">
            <Video codec="h264"
                   bitRate="350000"
                   width="352"
                   height="288"
                   frameRate="30" />
            <!-- audio setting is ignored -->
            <Audio codec="aac"
                   bitRate="96000"
                   sampleRate="48000"
                   channels="1" />
        </EncoderProfile>

        <EncoderProfile quality="timelapseqcif" fileFormat="mp4" duration="30">
            <Video codec="h264"
                   bitRate="192000"
                   width="176"
                   height="144"
                   frameRate="15" />
            <!-- audio setting is ignored -->
            <Audio codec="amrnb"
                   bitRate="12200"
                   sampleRate="8000"
                   channels="1" />
        </EncoderProfile>

        <EncoderProfile quality="timelapseqvga" fileFormat="mp4" duration="30">
            <Video codec="h264"
             bitRate="320000"
             width="320"
             height="240"
             frameRate="15" />

            <!-- audio setting is ignored -->
            <Audio codec="amrnb"
             bitRate="12200"
             sampleRate="8000"
             channels="1" />
         </EncoderProfile>

         <EncoderProfile quality="timelapse480p" fileFormat="mp4" duration="30">
            <Video codec="h264"
             bitRate="2000000"
             width="720"
             height="480"
             frameRate="30" />

            <!-- audio setting is ignored -->
            <Audio codec="aac"
             bitRate="156000"
             sampleRate="48000"
             channels="2" />
         </EncoderProfile>

        <ImageEncoding quality="95" />
        <ImageEncoding quality="80" />
        <ImageEncoding quality="70" />
        <ImageDecoding memCap="20000000" />

    </CamcorderProfiles>

    <CamcorderProfiles cameraId="1">

        <EncoderProfile quality="480p" fileFormat="mp4" duration="60">
            <Video codec="h264"
                   bitRate="2000000"
                   width="640"
                   height="480"
                   frameRate="30" />
            <Audio codec="aac"
                   bitRate="156000"
                   sampleRate="48000"
                   channels="2" />
        </EncoderProfile>
        <EncoderProfile quality="qvga" fileFormat="mp4" duration="60">
            <Video codec="h264"
                   bitRate="128000"
                   width="320"
                   height="240"
                   frameRate="15" />
            <Audio codec="aac"
                   bitRate="12200"
                   sampleRate="8000"
                   channels="1" />
        </EncoderProfile>

        <EncoderProfile quality="qcif" fileFormat="3gp" duration="30">
      	    <Video codec="h264"
             bitRate="128000"
             width="176"
             height="144"
             frameRate="15" />

            <Audio codec="aac"
             bitRate="12200"
             sampleRate="8000"
             channels="1" />
        </EncoderProfile>

        <EncoderProfile quality="timelapsecif" fileFormat="mp4" duration="30">
            <Video codec="h264"
                   bitRate="350000"
                   width="352"
                   height="288"
                   frameRate="30" />
            <!-- audio setting is ignored -->
            <Audio codec="aac"
                   bitRate="96000"
                   sampleRate="48000"
                   channels="1" />
        </EncoderProfile>

        <EncoderProfile quality="timelapseqcif" fileFormat="mp4" duration="30">
            <Video codec="h264"
                   bitRate="192000"
                   width="176"
                   height="144"
                   frameRate="15" />
            <!-- audio setting is ignored -->
            <Audio codec="amrnb"
                   bitRate="12200"
                   sampleRate="8000"
                   channels="1" />
        </EncoderProfile>

        <EncoderProfile quality="timelapseqvga" fileFormat="mp4" duration="30">
            <Video codec="h264"
             bitRate="320000"
             width="320"
             height="240"
             frameRate="15" />

            <!-- audio setting is ignored -->
            <Audio codec="amrnb"
             bitRate="12200"
             sampleRate="8000"
             channels="1" />
        </EncoderProfile>

         <EncoderProfile quality="timelapse480p" fileFormat="mp4" duration="30">
            <Video codec="h264"
                   bitRate="2000000"
                   width="640"
                   height="480"
                   frameRate="30" />
            <!-- audio setting is ignored -->
            <Audio codec="aac"
                   bitRate="96000"
                   sampleRate="48000"
                   channels="1" />
        </EncoderProfile>
        <ImageEncoding quality="95" />
        <ImageEncoding quality="80" />
        <ImageEncoding quality="70" />
        <ImageDecoding memCap="20000000" />
    </CamcorderProfiles>

	<CamcorderProfiles cameraId="2">

	<EncoderProfile quality="480p" fileFormat="mp4" duration="60">
            <Video codec="m4v"
                   bitRate="2000000"
                   width="720"
                   height="480"
                   frameRate="30" />
            <Audio codec="amrnb"
                   bitRate="12200"
                   sampleRate="8000"
                   channels="1" />
        </EncoderProfile>

        <EncoderProfile quality="qvga" fileFormat="mp4" duration="60">
            <Video codec="m4v"
                   bitRate="128000"
                   width="320"
                   height="240"
                   frameRate="15" />
            <Audio codec="amrnb"
                   bitRate="12200"
                   sampleRate="8000"
                   channels="1" />
        </EncoderProfile>

        <EncoderProfile quality="qcif" fileFormat="3gp" duration="30">
      	    <Video codec="h264"
             bitRate="128000"
             width="176"
             height="144"
             frameRate="15" />

            <Audio codec="amrnb"
             bitRate="12200"
             sampleRate="8000"
             channels="1" />
        </EncoderProfile>

        <EncoderProfile quality="timelapsecif" fileFormat="mp4" duration="30">
            <Video codec="h264"
                   bitRate="350000"
                   width="352"
                   height="288"
                   frameRate="30" />
            <!-- audio setting is ignored -->
            <Audio codec="aac"
                   bitRate="96000"
                   sampleRate="48000"
                   channels="1" />
        </EncoderProfile>

        <EncoderProfile quality="timelapseqcif" fileFormat="mp4" duration="30">
            <Video codec="h264"
                   bitRate="192000"
                   width="176"
                   height="144"
                   frameRate="15" />
            <!-- audio setting is ignored -->
            <Audio codec="amrnb"
                   bitRate="12200"
                   sampleRate="8000"
                   channels="1" />
        </EncoderProfile>

        <EncoderProfile quality="timelapseqvga" fileFormat="mp4" duration="30">
            <Video codec="h264"
             bitRate="320000"
             width="320"
             height="240"
             frameRate="15" />

            <!-- audio setting is ignored -->
            <Audio codec="amrnb"
             bitRate="12200"
             sampleRate="8000"
             channels="1" />
         </EncoderProfile>

         <EncoderProfile quality="timelapse480p" fileFormat="mp4" duration="30">
            <Video codec="h264"
             bitRate="2000000"
             width="720"
             height="480"
             frameRate="30" />

            <!-- audio setting is ignored -->
            <Audio codec="aac"
             bitRate="156000"
             sampleRate="48000"
             channels="2" />
         </EncoderProfile>

        <ImageEncoding quality="95" />
        <ImageEncoding quality="80" />
        <ImageEncoding quality="70" />
        <ImageDecoding memCap="20000000" />

    </CamcorderProfiles>

    <CamcorderProfiles cameraId="3">

	<EncoderProfile quality="480p" fileFormat="mp4" duration="60">
            <Video codec="m4v"
                   bitRate="2000000"
                   width="720"
                   height="480"
                   frameRate="30" />
            <Audio codec="amrnb"
                   bitRate="12200"
                   sampleRate="8000"
                   channels="1" />
        </EncoderProfile>

        <EncoderProfile quality="qvga" fileFormat="mp4" duration="60">
            <Video codec="m4v"
                   bitRate="128000"
                   width="320"
                   height="240"
                   frameRate="15" />
            <Audio codec="amrnb"
                   bitRate="12200"
                   sampleRate="8000"
                   channels="1" />
        </EncoderProfile>

        <EncoderProfile quality="qcif" fileFormat="3gp" duration="30">
      	    <Video codec="h264"
             bitRate="128000"
             width="176"
             height="144"
             frameRate="15" />

            <Audio codec="amrnb"
             bitRate="12200"
             sampleRate="8000"
             channels="1" />
        </EncoderProfile>

        <EncoderProfile quality="timelapsecif" fileFormat="mp4" duration="30">
            <Video codec="h264"
                   bitRate="350000"
                   width="352"
                   height="288"
                   frameRate="30" />
            <!-- audio setting is ignored -->
            <Audio codec="aac"
                   bitRate="96000"
                   sampleRate="48000"
                   channels="1" />
        </EncoderProfile>

        <EncoderProfile quality="timelapseqcif" fileFormat="mp4" duration="30">
            <Video codec="h264"
                   bitRate="192000"
                   width="176"
                   height="144"
                   frameRate="15" />
            <!-- audio setting is ignored -->
            <Audio codec="amrnb"
                   bitRate="12200"
                   sampleRate="8000"
                   channels="1" />
        </EncoderProfile>

        <EncoderProfile quality="timelapseqvga" fileFormat="mp4" duration="30">
            <Video codec="h264"
             bitRate="320000"
             width="320"
             height="240"
             frameRate="15" />

            <!-- audio setting is ignored -->
            <Audio codec="amrnb"
             bitRate="12200"
             sampleRate="8000"
             channels="1" />
         </EncoderProfile>

         <EncoderProfile quality="timelapse480p" fileFormat="mp4" duration="30">
            <Video codec="h264"
             bitRate="2000000"
             width="720"
             height="480"
             frameRate="30" />

            <!-- audio setting is ignored -->
            <Audio codec="aac"
             bitRate="156000"
             sampleRate="48000"
             channels="2" />
         </EncoderProfile>

        <ImageEncoding quality="95" />
        <ImageEncoding quality="80" />
        <ImageEncoding quality="70" />
        <ImageDecoding memCap="20000000" />

    </CamcorderProfiles>

    <CamcorderProfiles cameraId="4">

	<EncoderProfile quality="480p" fileFormat="mp4" duration="60">
            <Video codec="m4v"
                   bitRate="2000000"
                   width="720"
                   height="480"
                   frameRate="30" />
            <Audio codec="amrnb"
                   bitRate="12200"
                   sampleRate="8000"
                   channels="1" />
        </EncoderProfile>

        <EncoderProfile quality="qvga" fileFormat="mp4" duration="60">
            <Video codec="m4v"
                   bitRate="128000"
                   width="320"
                   height="240"
                   frameRate="15" />
            <Audio codec="amrnb"
                   bitRate="12200"
                   sampleRate="8000"
                   channels="1" />
        </EncoderProfile>

        <EncoderProfile quality="qcif" fileFormat="3gp" duration="30">
      	    <Video codec="h264"
             bitRate="128000"
             width="176"
             height="144"
             frameRate="15" />

            <Audio codec="amrnb"
             bitRate="12200"
             sampleRate="8000"
             channels="1" />
        </EncoderProfile>

        <EncoderProfile quality="timelapsecif" fileFormat="mp4" duration="30">
            <Video codec="h264"
                   bitRate="350000"
                   width="352"
                   height="288"
                   frameRate="30" />
            <!-- audio setting is ignored -->
            <Audio codec="aac"
                   bitRate="96000"
                   sampleRate="48000"
                   channels="1" />
        </EncoderProfile>

        <EncoderProfile quality="timelapseqcif" fileFormat="mp4" duration="30">
            <Video codec="h264"
                   bitRate="192000"
                   width="176"
                   height="144"
                   frameRate="15" />
            <!-- audio setting is ignored -->
            <Audio codec="amrnb"
                   bitRate="12200"
                   sampleRate="8000"
                   channels="1" />
        </EncoderProfile>

        <EncoderProfile quality="timelapseqvga" fileFormat="mp4" duration="30">
            <Video codec="h264"
             bitRate="320000"
             width="320"
             height="240"
             frameRate="15" />

            <!-- audio setting is ignored -->
            <Audio codec="amrnb"
             bitRate="12200"
             sampleRate="8000"
             channels="1" />
         </EncoderProfile>

         <EncoderProfile quality="timelapse480p" fileFormat="mp4" duration="30">
            <Video codec="h264"
             bitRate="2000000"
             width="720"
             height="480"
             frameRate="30" />

            <!-- audio setting is ignored -->
            <Audio codec="aac"
             bitRate="156000"
             sampleRate="48000"
             channels="2" />
         </EncoderProfile>

        <ImageEncoding quality="95" />
        <ImageEncoding quality="80" />
        <ImageEncoding quality="70" />
        <ImageDecoding memCap="20000000" />

    </CamcorderProfiles>

    <CamcorderProfiles cameraId="5">

	<EncoderProfile quality="480p" fileFormat="mp4" duration="60">
            <Video codec="m4v"
                   bitRate="2000000"
                   width="720"
                   height="480"
                   frameRate="30" />
            <Audio codec="amrnb"
                   bitRate="12200"
                   sampleRate="8000"
                   channels="1" />
        </EncoderProfile>

        <EncoderProfile quality="qvga" fileFormat="mp4" duration="60">
            <Video codec="m4v"
                   bitRate="128000"
                   width="320"
                   height="240"
                   frameRate="15" />
            <Audio codec="amrnb"
                   bitRate="12200"
                   sampleRate="8000"
                   channels="1" />
        </EncoderProfile>

        <EncoderProfile quality="qcif" fileFormat="3gp" duration="30">
      	    <Video codec="h264"
             bitRate="128000"
             width="176"
             height="144"
             frameRate="15" />

            <Audio codec="amrnb"
             bitRate="12200"
             sampleRate="8000"
             channels="1" />
        </EncoderProfile>

        <EncoderProfile quality="timelapsecif" fileFormat="mp4" duration="30">
            <Video codec="h264"
                   bitRate="350000"
                   width="352"
                   height="288"
                   frameRate="30" />
            <!-- audio setting is ignored -->
            <Audio codec="aac"
                   bitRate="96000"
                   sampleRate="48000"
                   channels="1" />
        </EncoderProfile>

        <EncoderProfile quality="timelapseqcif" fileFormat="mp4" duration="30">
            <Video codec="h264"
                   bitRate="192000"
                   width="176"
                   height="144"
                   frameRate="15" />
            <!-- audio setting is ignored -->
            <Audio codec="amrnb"
                   bitRate="12200"
                   sampleRate="8000"
                   channels="1" />
        </EncoderProfile>

        <EncoderProfile quality="timelapseqvga" fileFormat="mp4" duration="30">
            <Video codec="h264"
             bitRate="320000"
             width="320"
             height="240"
             frameRate="15" />

            <!-- audio setting is ignored -->
            <Audio codec="amrnb"
             bitRate="12200"
             sampleRate="8000"
             channels="1" />
         </EncoderProfile>

         <EncoderProfile quality="timelapse480p" fileFormat="mp4" duration="30">
            <Video codec="h264"
             bitRate="2000000"
             width="720"
             height="480"
             frameRate="30" />

            <!-- audio setting is ignored -->
            <Audio codec="aac"
             bitRate="156000"
             sampleRate="48000"
             channels="2" />
         </EncoderProfile>

        <ImageEncoding quality="95" />
        <ImageEncoding quality="80" />
        <ImageEncoding quality="70" />
        <ImageDecoding memCap="20000000" />

    </CamcorderProfiles>

    <CamcorderProfiles cameraId="6">

	<EncoderProfile quality="480p" fileFormat="mp4" duration="60">
            <Video codec="m4v"
                   bitRate="2000000"
                   width="720"
                   height="480"
                   frameRate="30" />
            <Audio codec="amrnb"
                   bitRate="12200"
                   sampleRate="8000"
                   channels="1" />
        </EncoderProfile>

        <EncoderProfile quality="qvga" fileFormat="mp4" duration="60">
            <Video codec="m4v"
                   bitRate="128000"
                   width="320"
                   height="240"
                   frameRate="15" />
            <Audio codec="amrnb"
                   bitRate="12200"
                   sampleRate="8000"
                   channels="1" />
        </EncoderProfile>

        <EncoderProfile quality="qcif" fileFormat="3gp" duration="30">
      	    <Video codec="h264"
             bitRate="128000"
             width="176"
             height="144"
             frameRate="15" />

            <Audio codec="amrnb"
             bitRate="12200"
             sampleRate="8000"
             channels="1" />
        </EncoderProfile>

        <EncoderProfile quality="timelapsecif" fileFormat="mp4" duration="30">
            <Video codec="h264"
                   bitRate="350000"
                   width="352"
                   height="288"
                   frameRate="30" />
            <!-- audio setting is ignored -->
            <Audio codec="aac"
                   bitRate="96000"
                   sampleRate="48000"
                   channels="1" />
        </EncoderProfile>

        <EncoderProfile quality="timelapseqcif" fileFormat="mp4" duration="30">
            <Video codec="h264"
                   bitRate="192000"
                   width="176"
                   height="144"
                   frameRate="15" />
            <!-- audio setting is ignored -->
            <Audio codec="amrnb"
                   bitRate="12200"
                   sampleRate="8000"
                   channels="1" />
        </EncoderProfile>

        <EncoderProfile quality="timelapseqvga" fileFormat="mp4" duration="30">
            <Video codec="h264"
             bitRate="320000"
             width="320"
             height="240"
             frameRate="15" />

            <!-- audio setting is ignored -->
            <Audio codec="amrnb"
             bitRate="12200"
             sampleRate="8000"
             channels="1" />
         </EncoderProfile>

         <EncoderProfile quality="timelapse480p" fileFormat="mp4" duration="30">
            <Video codec="h264"
             bitRate="2000000"
             width="720"
             height="480"
             frameRate="30" />

            <!-- audio setting is ignored -->
            <Audio codec="aac"
             bitRate="156000"
             sampleRate="48000"
             channels="2" />
         </EncoderProfile>

        <ImageEncoding quality="95" />
        <ImageEncoding quality="80" />
        <ImageEncoding quality="70" />
        <ImageDecoding memCap="20000000" />

    </CamcorderProfiles>

    <EncoderOutputFileFormat name="3gp" />
    <EncoderOutputFileFormat name="mp4" />

    <!--
         If a codec is not enabled, it is invisible to the applications
         In other words, the applications won't be able to use the codec
         or query the capabilities of the codec at all if it is disabled
    -->
    <VideoEncoderCap name="h264" enabled="true"
        minBitRate="64000" maxBitRate="2000000"
        minFrameWidth="176" maxFrameWidth="800"
        minFrameHeight="144" maxFrameHeight="480"
        minFrameRate="15" maxFrameRate="30" />

    <VideoEncoderCap name="h263" enabled="true"
        minBitRate="64000" maxBitRate="2000000"
        minFrameWidth="176" maxFrameWidth="800"
        minFrameHeight="144" maxFrameHeight="480"
        minFrameRate="15" maxFrameRate="30" />

    <VideoEncoderCap name="m4v" enabled="true"
        minBitRate="64000" maxBitRate="2000000"
        minFrameWidth="176" maxFrameWidth="800"
        minFrameHeight="144" maxFrameHeight="480"
        minFrameRate="15" maxFrameRate="30" />

    <AudioEncoderCap name="aac" enabled="true"
        minBitRate="8000" maxBitRate="96000"
        minSampleRate="8000" maxSampleRate="48000"
        minChannels="1" maxChannels="1" />

    <AudioEncoderCap name="amrwb" enabled="true"
        minBitRate="6600" maxBitRate="23050"
        minSampleRate="16000" maxSampleRate="16000"
        minChannels="1" maxChannels="1" />

    <AudioEncoderCap name="amrnb" enabled="true"
        minBitRate="5525" maxBitRate="12200"
        minSampleRate="8000" maxSampleRate="8000"
        minChannels="1" maxChannels="1" />

    <!--
        FIXME:
        We do not check decoder capabilities at present
        At present, we only check whether windows media is visible
        for TEST applications. For other applications, we do
        not perform any checks at all.
    -->
    <VideoDecoderCap name="wmv" enabled="true"/>
    <AudioDecoderCap name="wma" enabled="true"/>

    <!--
        The VideoEditor Capability configuration:
        - maxInputFrameWidth: maximum video width of imported video clip.
        - maxInputFrameHeight: maximum video height of imported video clip.
        - maxOutputFrameWidth: maximum video width of exported video clip.
        - maxOutputFrameHeight: maximum video height of exported video clip.
        - maxPrefetchYUVFrames: maximum prefetch YUV frames for encoder,
        used to limit the amount of memory for prefetched YUV frames.
        For this platform, it allows maximum ~1MB(~0.1MB per QVGA frame x 10
        frames) memory.
    -->

    <VideoEditorCap  maxInputFrameWidth="320"
        maxInputFrameHeight="240" maxOutputFrameWidth="320"
        maxOutputFrameHeight="240" maxPrefetchYUVFrames="10" />
    <!--
        The VideoEditor Export codec profile and level values
        correspond to the values in OMX_Video.h.
        E.g. for h264, profile value 1 means OMX_VIDEO_AVCProfileBaseline
        and  level 4096 means OMX_VIDEO_AVCLevel41.
        Please note that the values are in decimal.
        These values are for video encoder.
    -->
    <!--
      Codec = h.264, Baseline profile, level 4.1
    -->
    <ExportVideoProfile name="h264" profile= "1" level="32"/>
    <!--
      Codec = h.263, Baseline profile, level 0
    -->
    <ExportVideoProfile name="h263" profile= "1" level="1"/>
    <!--
      Codec = mpeg4, Simple profile, level 3
    -->
    <ExportVideoProfile name="m4v" profile= "1" level="16"/>
    <LgeCamcorderCap  minfps="24000" maxfps="30000"
                      usehighprofile="0"  audiozoomenable="0"
                      audiozoomX="14" audiozoomY="4"
                      usehwaac="0"/>
</MediaSettings>


text:
install_global_dependencies () {
    # Installs git, git dependencies, pip, curl, nginx
    sudo apt-get update
    sudo apt-get build-dep -y git-core
    sudo apt-get install -y git-core python-pip curl nginx

    # Installs node and npm
    sudo apt-get install -y python-software-properties python g++ make
    sudo add-apt-repository -y ppa:chris-lea/node.js
    sudo apt-get update
    sudo apt-get install -y nodejs

    return
}

install_rcore () {
    # Installs R
    sudo apt-get install -y r-base-core

    return
}

install_scipy () {
    # Installs the scipy stack
    sudo apt-get install -y python-numpy python-scipy python-matplotlib ipython ipython-notebook python-pandas python-sympy python-nose

    return
}

install_mysql_and_mysqldb () {
    # Installs MySQL and MySQLdb
    # Default root MySQL password = 'root'
    sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password password root'
    sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password_again password root'
    sudo apt-get install -y mysql-server
    sudo apt-get install -y python-mysqldb
    sudo pip install pip --upgrade

    return
}

clone_project () {
    local username="$1"
    local project="$2"

    # Clones the github repo
    git clone https://github.com/$username/$project.git

    return
}

install_project_dependencies () {
    local project_dir="$1"

    # Installs project dependencies
    cd $project_dir
    npm install
    sudo pip install -r requirements.txt

    return
}

set_env_var () {
    local project_dir="$1"

    # sets the production settings path as an env variable
    echo export PRODUCTION_SETTINGS=$project_dir/app/settings/production.cfg >> $HOME/.bash_profile
    source $HOME/.bash_profile

    return
}

setup_nginx () {
    local project_dir="$1"

    # Replaces the nginx default file
    sudo rm /etc/nginx/sites-available/default
    sudo rm /etc/nginx/sites-enabled/default
    sudo touch /etc/nginx/sites-available/insightfl

    sudo bash -c 'cat > /etc/nginx/sites-available/insightfl <<- _EOF_
    server {
      listen 80;

      root '$project_dir';
      index index.html index.htm;

      server_name "";

      location / {
        proxy_pass http://127.0.0.1:5000;
      }
    }'

    # Creates a sudo link to sites-enabled
    sudo ln -s /etc/nginx/sites-available/insightfl /etc/nginx/sites-enabled/insightfl

    # Starts nginx
    sudo service nginx start

    return
}

start_app () {
    local project_dir="$1"

    # Runs the app within a screen detached mode
    cd $project_dir
screen -d -m gunicorn app:app -w 4 -b 0.0.0.0:80

    # Restarts nginx
    #sudo service nginx restart

    # Start supervisord instead
    sudo supervisord -c simple.conf

    return
}

main () {
    local username
    local project
    local project_dir
    local status
    local mysql
    local scipy
    local rcore

    read -p $'\e[32m'"Enter your github username > "$'\e[0m' username

    if [[ ! -n "$username" ]]; then
        echo $'\e[31m'"Please enter a github username"$'\e[0m'
        main
    else
        read -p $'\e[32m'"Enter the github repository name [lenderstanding] > "$'\e[0m' project

        # Default project name is 'insightfl'
        project=${project:="lenderstanding"}
        project_dir=$HOME/$project
        status=$(curl -s -I "https://github.com/$username/$project" | head -n 1 | cut -d$' ' -f2)

        if [[ "$status" != 200 ]]; then
            echo $'\e[31m'"Status: $status"$'\e[0m'
            echo $'\e[31m'"You've entered an invalid username or Github repository"$'\e[0m'
            main
        else
            read -p $'\e[32m'"Would you like to install MySQL? [Y/n] > "$'\e[0m' mysql
            read -p $'\e[32m'"Would you like to install the SCIPY stack? [Y/n] > "$'\e[0m' scipy
            read -p $'\e[32m'"Would you like to install R? [Y/n] > "$'\e[0m' rcore

            # Default package options
            mysql=${mysql:="y"}
            scipy=${scipy:="y"}
            rcore=${rcore:="y"}

            mysql=$(echo $mysql | tr 'A-Z' 'a-z')
            scipy=$(echo $scipy | tr 'A-Z' 'a-z')
            rcore=$(echo $rcore | tr 'A-Z' 'a-z')

            install_global_dependencies

            if [[ "$mysql" == "y" ]]; then
                install_mysql_and_mysqldb
            fi

            if [[ "$scipy" == "y" ]]; then
                install_scipy
            fi

            if [[ "$rcore" == "y" ]]; then
                install_rcore
            fi

            # Clones project, installs dependencies, setups nginx, and starts app
            clone_project $username $project
            install_project_dependencies $project_dir
            set_env_var $project_dir
            # setup_nginx $project_dir
            start_app $project_dir

            cd $HOME
        fi
    fi
    return
}

# Main function
main

redpajama_set_name: RedPajamaGithub


text:
var util = require('util'),
    EventEmitter = require('events').EventEmitter,
    HTTPS = require('https'),
    querystring = require('querystring'),
    net = require('net');
/*
* Recursively merge properties of two objects
*/
function mergeJSON(obj1, obj2) {
    if (obj2) {
        Object.keys(obj2).forEach(function (p) {
            try {
                // Property in destination object set; update its value.
                if (obj2[p].constructor === Object) {
                    obj1[p] = mergeJSON(obj1[p], obj2[p]);
                } else {
                    obj1[p] = obj2[p];
                }
            } catch (e) {
                // Property in destination object not set; create it and set its value.
                obj1[p] = obj2[p];
            }
        });
    }

    return obj1;
}

function Dnspod(params, options) {
    var self = this;
    self.defParams = mergeJSON({
        'login_email': '',
        'login_password': '',
        'format': 'json',
        'lang': 'cn',
        'error_on_empty': 'yes'
    }, params);

    self.defOptions = mergeJSON({
        host: 'dnsapi.cn',
        port: 443,
        method: 'POST',
        headers: {
            'Content-Type': 'application/x-www-form-urlencoded',
            'Accept': 'text/json',
            'User-Agent': 'Node Dnspod Client/1.0.0'
        }
    }, options);
}

util.inherits(Dnspod, EventEmitter);

Dnspod.prototype.getHostIp = function () {
    var self = this,
        message = '',
        client;

    client = net.connect({
        host: 'ns1.dnspod.net',
        port: 6666
    }, function () {
        // console.log('client connected');
    }).on('data', function (data) {
        message = data.toString();
        // console.log(message);
        client.end();
    }).on('end', function () {
        // console.log('client disconnected');
        process.nextTick(function () {
            self.emit('getHostIp', null, message);
        });
    }).on('error', function (err) {
        self.emit('error', err);
    });
    return self;
};

Dnspod.prototype.request = function (url, params, eventListenerName) {
    var self = this,
        requestCallback,
        postParams,
        postData,
        postOptions,
        req;

    postParams = self.defParams;
    if (params) {
        postParams = mergeJSON(postParams, params);
    }

    postData = querystring.stringify(postParams);

    postOptions = self.defOptions;
    postOptions.path = url;
    postOptions.headers['Content-Length'] = postData.length;

    requestCallback = function (res) {
        var resData = [];
        res.on('data', function (data) {
            resData.push(data);
        }).on('end', function () {
            var jsonData,
                err;
            try {
                jsonData = JSON.parse(resData.join(''));
            } catch (ex) {
                console.log(ex);
                err = ex;
            } finally {
                process.nextTick(function () {
                    if (err) {
                        self.emit(eventListenerName, new Error('Request failed'));
                    } else {
                        self.emit(eventListenerName, null, jsonData);
                    }
                });
            }
        });
    };

    req = HTTPS.request(postOptions, requestCallback);
    req.on('error', function (err) {
        self.emit('error', err);
    });
    req.write(postData);
    req.end();
    return self;
};

(function () {
    var mapper = {
        infoVersion: 'Info.Version',
        userDetail: 'User.Detail',
        userModify: 'User.Modify',
        userpasswdModify: 'Userpasswd.Modify',
        useremailModify: 'Useremail.Modify',
        telephoneverifyCode: 'Telephoneverify.Code',
        userLog: 'User.Log',
        domainCreate: 'Domain.Create',
        domainList: 'Domain.List',
        domainRemove: 'Domain.Remove',
        domainStatus: 'Domain.Status',
        domainInfo: 'Domain.Info',
        domainLog: 'Domain.Log',
        domainSearchenginepush: 'Domain.Searchenginepush',
        domainUrlincn: 'Domain.Urlincn',
        domainshareCreate: 'Domainshare.Create',
        domainshareList: 'Domainshare.List',
        domainshareModify: 'Domainshare.Modify',
        domainshareRemove: 'Domainshare.Remove',
        domainTransfer: 'Domain.Transfer',
        domainLock: 'Domain.Lock',
        domainLockstatus: 'Domain.Lockstatus',
        domainUnlock: 'Domain.Unlock',
        domainaliasList: 'Domainalias.List',
        domainaliasCreate: 'Domainalias.Create',
        domainaliasRemove: 'Domainalias.Remove',
        domaingroupList: 'Domaingroup.List',
        domaingroupCreate: 'Domaingroup.Create',
        domaingroupModify: 'Domaingroup.Modify',
        domaingroupRemove: 'Domaingroup.Remove',
        domainChangegroup: 'Domain.Changegroup',
        domainIsmark: 'Domain.Ismark',
        domainRemark: 'Domain.Remark',
        domainPurview: 'Domain.Purview',
        domainAcquire: 'Domain.Acquire',
        domainAcquiresend: 'Domain.Acquiresend',
        domainAcquirevalidate: 'Domain.Acquirevalidate',
        recordType: 'Record.Type',
        recordLine: 'Record.Line',
        recordCreate: 'Record.Create',
        recordList: 'Record.List',
        recordModify: 'Record.Modify',
        recordRemove: 'Record.Remove',
        recordDdns: 'Record.Ddns',
        recordRemark: 'Record.Remark',
        recordInfo: 'Record.Info',
        recordStatus: 'Record.Status',
        monitorListsubdomain: 'Monitor.Listsubdomain',
        monitorListsubvalue: 'Monitor.Listsubvalue',
        monitorList: 'Monitor.List',
        monitorCreate: 'Monitor.Create',
        monitorModify: 'Monitor.Modify',
        monitorRemove: 'Monitor.Remove',
        monitorInfo: 'Monitor.Info',
        monitorSetstatus: 'Monitor.Setstatus',
        monitorGethistory: 'Monitor.Gethistory',
        monitorUserdesc: 'Monitor.Userdesc',
        monitorGetdowns: 'Monitor.Getdowns'
    };

    Object.keys(mapper).forEach(function (key) {
        Dnspod.prototype[key] = (function (key, value) {
            return function (params) {
                return this.request('/' + value, params, key);
            };
        }(key, mapper[key]));
    });

}());

module.exports = Dnspod;


text:
@implementation FLEXWindowShortcuts

#pragma mark - Overrides

+ (instancetype)forObject:(UIView *)view {
    return [self forObject:view additionalRows:@[
        [FLEXActionShortcut title:@"Animation Speed" subtitle:^NSString *(UIWindow *window) {
            return [NSString stringWithFormat:@"Current speed: %.2f", window.layer.speed];
        } selectionHandler:^(UIViewController *host, UIWindow *window) {
            [FLEXAlert makeAlert:^(FLEXAlert *make) {
                make.title(@"Change Animation Speed");
                make.message([NSString stringWithFormat:@"Current speed: %.2f", window.layer.speed]);
                make.configuredTextField(^(UITextField * _Nonnull textField) {
                    textField.placeholder = @"Default: 1.0";
                    textField.keyboardType = UIKeyboardTypeDecimalPad;
                });

                make.button(@"OK").handler(^(NSArray<NSString *> *strings) {
                    CGFloat speedValue = strings.firstObject.floatValue;
                    window.layer.speed = speedValue;

                    // Refresh the host view controller to update the shortcut subtitle, reflecting current speed
                    // TODO: this shouldn't be necessary
                    [(FLEXObjectExplorerViewController *)host reloadData];
                });
                make.button(@"Cancel").cancelStyle();
            } showFrom:host];
        } accessoryType:^UITableViewCellAccessoryType(id  _Nonnull object) {
            return UITableViewCellAccessoryDisclosureIndicator;
        }]
    ]];
}

@end


text:
<?php
session_start ();
?>
<!doctype html>

		<meta charset="UTF-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<title>Employee home page</title>
		<link href="css/bootstrap.min.css" rel="stylesheet">
		<link href="css/bootstrap-table.min.css" rel="stylesheet">
		<link rel="stylesheet" id="layout-css" href="css/layout.min.css"
		type="text/css" media="all">
		<link href="css/style.css" rel="stylesheet" type="text/css">

Welcome <?= $_SESSION['username'] ?> !

				<?php include 'inc/emp_menu.php'; ?>

                Today tasks are:

								Project ID
                                Project Name
								Task ID
								Task Name


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
Mycologia 22(3): 142 (1930)

#### Original name
Sphacelotheca kellermanii G.P. Clinton & Zundel

### Remarks
null


text:
clear;

%settings
TapirConf;
Fc = 20000;

fileIdx = [12:19]
src = [fileIdx * 5 - 26]

pwd = './result/'
filenamePrefix = 'Paris';
srcRepeat = 2;
resultRepeat = 10;

%generation

txLpf = lpfbtw208;
txLpfDelay = txLpf.order / 2;
txHpf = bpfchev19k21k250;
txHpfDelay = txHpf.order / 2;

figure(11);

for loopIdx = 1:length(src)

    msg = repmat(src(loopIdx), 1, srcRepeat);
    msg = [msg, 3]; %ETX Code

    binData = dec2bin(msg, 8)' - 48;
    genAudioData = generateAudioData(binData);
    extendedAudioData = zeros(size(genAudioData,1) + cPreLength + cPostLength, size(genAudioData,2));

    for i=1:size(extendedAudioData, 2)

        upconvAudioData = freqUpConversion(genAudioData(:,i), Fc, Fs);
        % Add Cyclic prefix&postfix
        extendedAudioData(1:length(extendedAudioData),i) = [upconvAudioData(end - cPreLength + 1 : end); upconvAudioData; upconvAudioData(1:cPostLength)];
    end
    extendedAudioData = [extendedAudioData; zeros(guardInterval, size(extendedAudioData,2))];
    audioData = reshape(extendedAudioData, [], 1);

    %Prepend Preamble
    preambleData = generateSinPreamble(preambleBitLength, preambleBandwidth, Fs);
    preambleData = [preambleData; preambleData; zeros(txLpfDelay,1)];
    preambleData = filter(txLpf, preambleData);
    preambleData = preambleData(txLpfDelay+1:end);

    upconvPreamble = freqUpConversion(preambleData, Fc, Fs);

    audioData = [upconvPreamble; zeros(preambleInterval,1); audioData];

    %lpf
    audioData = [audioData; zeros(txLpfDelay*2,1)];
    audioData = filter(txLpf, audioData);
    audioData = audioData(txLpfDelay+1:end);

    %hpf
    audioData = [audioData; zeros(txHpfDelay*2,1)];
    audioData = filter(txHpf, audioData);  % Filtering
    audioData = [zeros(floor(Fs/5),1);audioData;zeros(floor(Fs/5),1)];
%

    audioData = repmat(audioData, resultRepeat, 1);
    figure(11);
    subplot(length(src),2,loopIdx * 2 - 1); plot(real(audioData));
    subplot(length(src),2,loopIdx * 2); pwelch(audioData, hamming(1024),[],[],Fs,'centered');

    %write
    filename = [filenamePrefix, '_', int2str(fileIdx(loopIdx)), '_', int2str(src(loopIdx))];
    filename = [pwd, filename, '.wav'];
    audiowrite(filename, audioData, Fs, 'BitsPerSample', 16);

end


text:
import Ember from 'ember';
import config from './config/environment';

const Router = Ember.Router.extend({
  location: config.locationType
});

Router.map(function() {
  this.route('families',function(){
    this.route('family_new',{path:'/new'});
    this.route('family',{path:'/:family_id'});
    this.route('familyMember',{path:'/:family_id/family-members/:family_member_id'});
    this.route('registration',{path:'/:family_id/registration/:production_id/:family_member_ids'});
  });
  this.route('productions', function() {
    this.route('production_new',{path:'/new'});
    this.route('production',{path:'/:production_id'});
  });
});

export default Router;


text:
/*******************************************************************************
* rc_polynomial.c
*
* We represent polynomials as a vector of coefficients with the highest power
* term on the left at vector index 0. The following polynomial manipulation
* functions are designed to behave like their counterparts in the Numerical
* Renaissance codebase.
*******************************************************************************/
#include "rc_algebra_common.h"

/*******************************************************************************
* int rc_print_poly(rc_vector_t v)
*
* Like rc_print_vector, but assumes the contents represent a polynomial and
* prints the coefficients with trailing powers of x for easier reading. This
* relies on your terminal supporting unicode UTF-8.
*******************************************************************************/
int rc_print_poly(rc_vector_t v){
	int i;
	static char *super[] = {"\xe2\x81\xb0", "\xc2\xb9", "\xc2\xb2",
    "\xc2\xb3", "\xe2\x81\xb4", "\xe2\x81\xb5", "\xe2\x81\xb6",
    "\xe2\x81\xb7", "\xe2\x81\xb8", "\xe2\x81\xb9"};
	if(unlikely(!v.initialized)){
		fprintf(stderr,"ERROR in rc_print_poly, vector not initialized yet\n");
		return -1;
	}
	if(unlikely(v.len>10)){
		fprintf(stderr,"ERROR in rc_print_poly, vector length must be <=10\n");
		return -1;
	}
	for(i=0;i<(v.len-2);i++){
		printf("%7.4fx%s + ",v.d[i],super[v.len-i-1]);
	}
	// penultimate coefficient with no power
	if(v.len>=2) printf("%7.4fx  + ",v.d[v.len-2]);
	// last coefficient with no x
	printf("%7.4f\n", v.d[v.len-1]);
	return 0;
}

/*******************************************************************************
* int rc_poly_conv(rc_vector_t a, rc_vector_t b, rc_vector_t* c)
*
* Convolutes the polynomials a&b and places the result in vector c. This finds
* the coefficients of the polynomials resulting from multiply a*b. The original
* contents of c are freed and new memory is allocated if necessary.
* returns 0 on success or -1 on failure.
*******************************************************************************/
int rc_poly_conv(rc_vector_t a, rc_vector_t b, rc_vector_t* c){
	int i,j;
	// sanity checks
	if(unlikely(!a.initialized || !b.initialized)){
		fprintf(stderr,"ERROR in rc_poly_conv, vector uninitialized\n");
		return -1;
	}
	if(unlikely(rc_vector_zeros(c,a.len+b.len-1))){
		fprintf(stderr,"ERROR in rc_poly_conv, failed to alloc vector\n");
		return -1;
	}
	for(i=0;i<a.len;i++){
		for(j=0;j<b.len;j++){
			c->d[i+j] += a.d[i]*b.d[j];
		}
	}
	return 0;
}

/*******************************************************************************
* int rc_poly_power(rc_vector_t a, int n, rc_vector_t* b)
*
* Raises a polynomial a to itself n times where n is greater than or equal to 0.
* Places the result in vector b, any existing memory allocated for b is freed
* and its contents are lost. Returns 0 on success and -1 on failure.
*******************************************************************************/
int rc_poly_power(rc_vector_t a, int n, rc_vector_t* b){
	int i;
	rc_vector_t tmp = rc_empty_vector();
	// sanity checks
	if(unlikely(!a.initialized)){
		fprintf(stderr,"ERROR in rc_poly_power, vector uninitialized\n");
		return -1;
	}
	if(unlikely(n<0)){
		fprintf(stderr,"ERROR in rc_poly_power, negative exponents not allowed\n");
		return -1;
	}
	// shortcut for power 0
	if(n==0){
		if(unlikely(rc_alloc_vector(b,1))){
			fprintf(stderr,"ERROR in rc_poly_power, failed to alloc vector\n");
			return -1;
		}
		b->d[0] = 1.0f;
		return 0;
	}
	// for power 1 and above we start with duplicate
	if(unlikely(rc_duplicate_vector(a,b))){
		fprintf(stderr,"ERROR in rc_poly_power, failed to duplicate vector\n");
		return -1;
	}
	// for power 1 that's all, just return
	if(n==1) return 0;
	// for higher powers we need to keep multiplying
	for(i=2;i<=n;i++){
		if(unlikely(rc_poly_conv(a,*b,&tmp))){
			fprintf(stderr,"ERROR in rc_poly_power, failed to poly_conv\n");
			rc_free_vector(&tmp);
			rc_free_vector(b);
			return -1;
		}
		rc_free_vector(b);
		*b = tmp;
		tmp = rc_empty_vector();
	}
	return 0;
}

/*******************************************************************************
* int rc_poly_add(rc_vector_t a, rc_vector_t b, rc_vector_t* c)
*
* Add two polynomials a&b with right justification and place the result in c.
* Any existing memory allocated for c is freed and its contents are lost.
* Returns 0 on success and -1 on failure.
*******************************************************************************/
int rc_poly_add(rc_vector_t a, rc_vector_t b, rc_vector_t* c){
	int i, diff;
	rc_vector_t longest;
	// sanity checks
	if(unlikely(!a.initialized || !b.initialized)){
		fprintf(stderr,"ERROR in rc_poly_add, vector uninitialized\n");
		return -1;
	}
	// fill in out vector with longest input vector
	// if b is longer, replace reference a with contents of b
	if(a.len>b.len)	longest=a;
	else{
		longest=b;
		b=a;
	}
	if(unlikely(rc_duplicate_vector(longest,c))){
		fprintf(stderr,"ERROR in rc_poly_add, failed to duplicate vector\n");
		return -1;
	}
	// now the 'b' variable contains the shorter vector
	// itterate from the left
	diff = c->len-b.len;
	for(i=diff;i<c->len;i++) c->d[i]+=b.d[i-diff];
	return 0;
}

/*******************************************************************************
* int rc_poly_add_inplace(rc_vector_t* a, rc_vector_t b)
*
* Adds polynomials b&a with right justification. The result is placed in vector
* a and a's original contents are lost. More memory is allocated for a if
* necessary. Returns 0 on success or -1 on failure.
*******************************************************************************/
int rc_poly_add_inplace(rc_vector_t* a, rc_vector_t b){
	rc_vector_t tmp = rc_empty_vector();
	// sanity checks
	if(unlikely(!a->initialized || !b.initialized)){
		fprintf(stderr,"ERROR in rc_poly_add_in_place, vector uninitialized\n");
		return -1;
	}
	if(unlikely(rc_poly_add(*a,b,&tmp))){
		fprintf(stderr,"ERROR in rc_poly_add_in_place, add failed\n");
		return -1;
	}
	rc_free_vector(a);
	*a=tmp;
	return 0;
}

/*******************************************************************************
* int rc_poly_subtract(rc_vector_t a, rc_vector_t b, rc_vector_t* c)
*
* Subtracts two polynomials a-b with right justification and place the result in
* c. Any existing memory allocated for c is freed and its contents are lost.
* Returns 0 on success and -1 on failure.
*******************************************************************************/
int rc_poly_subtract(rc_vector_t a, rc_vector_t b, rc_vector_t* c){
	int i, diff;
	rc_vector_t longest;
	// sanity checks
	if(unlikely(!a.initialized || !b.initialized)){
		fprintf(stderr,"ERROR in rc_poly_subtract, vector uninitialized\n");
		return -1;
	}
	// fill in out vector with longest input vector
	// if b is longer, replace reference a with contents of b
	if(a.len>b.len)	longest=a;
	else{
		longest=b;
		b=a;
	}
	if(unlikely(rc_duplicate_vector(longest,c))){
		fprintf(stderr,"ERROR in rc_poly_subtract, failed to duplicate vector\n");
		return -1;
	}
	// now the 'b' variable contains the shorter vector
	// itterate from the left
	diff = c->len-b.len;
	for(i=diff;i<c->len;i++) c->d[i]-=b.d[i-diff];
	return 0;
}

/*******************************************************************************
* int rc_poly_subtract_inplace(rc_vector_t* a, rc_vector_t b)
*
* Subtracts b from a with right justification. a stays in place and new memory
* is allocated only if b is longer than a.
*******************************************************************************/
int rc_poly_subtract_inplace(rc_vector_t* a, rc_vector_t b){
	rc_vector_t tmp = rc_empty_vector();
	// sanity checks
	if(unlikely(!a->initialized || !b.initialized)){
		fprintf(stderr,"ERROR in rc_poly_subtract_in_place, vector uninitialized\n");
		return -1;
	}
	if(unlikely(rc_poly_subtract(*a,b,&tmp))){
		fprintf(stderr,"ERROR in rc_poly_subtract_in_place, subtract failed\n");
		return -1;
	}
	rc_free_vector(a);
	*a=tmp;
	return 0;
}

/*******************************************************************************
* int rc_poly_differentiate(rc_vector_t a, int d, rc_vector_t* b)
*
* Calculates the dth derivative of the polynomial a and places the result in
* vector b. Returns 0 on success or -1 on failure.
*******************************************************************************/
int rc_poly_differentiate(rc_vector_t a, int d, rc_vector_t* b){
	rc_vector_t tmp = rc_empty_vector();
	rc_vector_t tmp_r = rc_empty_vector();
	int i, new_order;
	// sanity checks
	if(unlikely(!a.initialized)){
		fprintf(stderr,"ERROR in rc_poly_differentiate, vector uninitialized\n");
		return -1;
	}
	if(unlikely(d<0)){
		fprintf(stderr,"ERROR in rc_poly_differentiate, d must be >=0\n");
		return -1;
	}
	// derivatives larger than the order of a polynomial are always zero
	if(d>=a.len) return rc_vector_zeros(b,1);
	// 0th derivative is the original polynomial
	if(d==0) return rc_duplicate_vector(a,b);
	// do one derivative
	new_order = a.len-1;
	if(unlikely(rc_alloc_vector(&tmp,new_order))){
		fprintf(stderr,"ERROR in rc_poly_differentiate, failed to alloc vector\n");
		return -1;
	}
	for(i=0; i<new_order; i++)	tmp.d[i]=a.d[i]*(new_order-i);
	// if 1st derivative was requested, all finished
	if(d==1){
		rc_free_vector(b);
		*b=tmp;
		return 0;
	}
	// for higher derivatives, call recursively
	if(unlikely(rc_poly_differentiate(tmp,d-1,&tmp_r))){
		fprintf(stderr,"ERROR in rc_poly_differentiate, failed to differentiate recursively\n");
		rc_free_vector(&tmp);
		return -1;
	}
	// free up memory except the answer tmp_r which goes into b
	rc_free_vector(&tmp);
	rc_free_vector(b);
	*b=tmp_r;
	return 0;
}

/*******************************************************************************
* int rc_poly_divide(rc_vector_t n, rc_vector_t d, rc_vector_t* div, rc_vector_t* rem)
*
* Divides denominator d into numerator n. The remainder is placed into vector
* rem and the divisor is placed into vector div. Returns 0 on success or -1
* on failure.
*******************************************************************************/
int rc_poly_divide(rc_vector_t n, rc_vector_t d, rc_vector_t* div, rc_vector_t* rem){
	int i, j, diff;
	rc_vector_t tmp = rc_empty_vector();
	// sanity checks
	if(unlikely(!n.initialized || !d.initialized)){
		fprintf(stderr,"ERROR in rc_poly_divide, vector uninitialized\n");
		return -1;
	}
	// difference in length, to be used later
	diff=n.len-d.len;
	// make sure den isn't bigger than num
	if(unlikely(diff<0)){
		fprintf(stderr,"ERROR in rc_poly_divide, order of num must be >= to den\n");
		return -1;
	}
	// allocate memory for divisor and copy numerator into remainder
	if(unlikely(rc_vector_zeros(div,diff+1))){
		fprintf(stderr,"ERROR in rc_poly_divide, failed to alloc vector\n");
		return -1;
	}
	if(unlikely(rc_duplicate_vector(n,&tmp))){
		fprintf(stderr,"ERROR in rc_poly_divide, failed to duplicate vector\n");
		rc_free_vector(div);
		return -1;
	}
	// calculate each entry in divisor, if num and den are same length
	// this will happen only once with i=0
	for(i=0;i<=diff;i++){
		div->d[i]=tmp.d[i]/d.d[0];
		// now subtract that multiple of denominator from remainder
		for(j=0;j<d.len;j++){
			tmp.d[j+i]-=div->d[i]*d.d[j];
		}
	}
	// fill in remainder from tmp
	if(unlikely(rc_alloc_vector(rem,d.len-1))){
		fprintf(stderr,"ERROR in rc_poly_divide, failed alloc rem vector\n");
		rc_free_vector(&tmp);
		return -1;
	}
	for(i=0;i<d.len-1;i++) rem->d[i]=tmp.d[i+diff+1];
	rc_free_vector(&tmp);
	return 0;
}

/*******************************************************************************
* int rc_poly_butter(int N, float wc, rc_vector_t* b)
*
* Calculates vector of coefficients for continuous-time Butterworth polynomial
* of order N and cutoff wc (rad/s) and places them in vector b.
* Returns 0 on success or -1 on failure.
*******************************************************************************/
int rc_poly_butter(int N, float wc, rc_vector_t* b){
	int i;
	int ret=0;
	rc_vector_t P2	= rc_empty_vector();
	rc_vector_t P3	= rc_empty_vector();
	rc_vector_t tmp	= rc_empty_vector();
	// sanity checks
	if(unlikely(N<1)){
		fprintf(stderr,"ERROR in rc_poly_butter, order must be >1\n");
		return -1;
	}
	// Initialize polynomial as order 0 with coefficient 1.
	if(unlikely(rc_vector_ones(b,1))){
		fprintf(stderr,"ERROR in rc_poly_butter, failed to alloc vector\n");
		return -1;
	}
	// P2 will be of the form (s + 1) and is only used when desired order is odd.
	if(unlikely(rc_alloc_vector(&P2,2))){
		fprintf(stderr,"ERROR in rc_poly_butter, failed to alloc vector\n");
		rc_free_vector(b);
		return -1;
	}
	// P3 will be a 2nd order poly coresponding to imaginary poll pairs.
	if(unlikely(rc_alloc_vector(&P3,3))){
		fprintf(stderr,"ERROR in rc_poly_butter, failed to alloc vector\n");
		rc_free_vector(b);
		rc_free_vector(&P2);
		return -1;
	}
	// for even orders
	if(N%2 == 0){
		P3.d[0] = 1.0f/(wc*wc);		// Initialize leading coefficient based on crossover
		P3.d[2] = 1.0f;				// zeroth order coefficient is always 1
		for(i=1;i<=N/2;i++){
			// formula for first order poly coefficient based on desired order filter
			P3.d[1] = -2.0f*cos((2.0f*i + N - 1.0f)*M_PI/(2.0f*N))/wc;
			// duplicate b (which starts off as 1) to tmp
			rc_duplicate_vector(*b,&tmp);
			// perform convolution between tmp and P3. Send to b and loop through i to
			// desired order filter/2.  This opperation is equivalent to polynomial
			// multiplication of the form b = 1*(s^2 + s + 1)*(s^2 + s + 1)*(etc)
			if(unlikely(rc_poly_conv(tmp,P3,b))){
				fprintf(stderr,"ERROR in rc_poly_butter, failed to polyconv\n");
				ret = -1;
				goto POLY_END;
			}
		}
	}
	// for odd orders the opperation is similar to above except for a real poll at -1.
	// This is why P2, as in (s + 1), is convolved first, then subsequent P3s.
	if(N%2 == 1){
		P2.d[0] = 1.0f/wc;
		P2.d[1] = 1.0f;
		rc_duplicate_vector(*b,&tmp);
		if(unlikely(rc_poly_conv(tmp,P2,b))){
			fprintf(stderr,"ERROR in rc_poly_butter, failed to polyconv\n");
			ret = -1;
			goto POLY_END;
		}
		P3.d[0] = 1.0f/(wc*wc);
		P3.d[2] = 1.0f;
		for(i=1;i<=(N-1)/2;i++){
			P3.d[1] = -2.0f*cos((2.0f*i + N - 1.0f)*M_PI/(2.0f*N))/wc;
			rc_duplicate_vector(*b,&tmp);
			if(unlikely(rc_poly_conv(tmp,P3,b))){
				fprintf(stderr,"ERROR in rc_poly_butter, failed to polyconv\n");
				ret = -1;
				goto POLY_END;
			}
		}
	}
POLY_END:
	// free up memory
	rc_free_vector(&tmp);
	rc_free_vector(&P2);
	rc_free_vector(&P3);
	return ret;
}


text:
package com.asakusafw.compiler.batch;

import java.io.IOException;
import java.util.Collection;
import java.util.Set;

import com.asakusafw.vocabulary.batch.WorkDescription;

/**
 * An abstract interface of processing {@link Workflow}.
 */
public interface WorkflowProcessor extends BatchCompilingEnvironment.Initializable {

    /**
     * Returns the target {@link WorkDescriptionProcessor}s for this.
     * @return the target {@link WorkDescriptionProcessor}s
     */
    Collection<Class<? extends WorkDescriptionProcessor<?>>> getDescriptionProcessors();

    /**
     * Processes the target {@link Workflow}.
     * @param workflow the target {@link Workflow}
     * @throws IOException if failed to process the target workflow
     */
    void process(Workflow workflow) throws IOException;

    /**
     * A repository for {@link WorkflowProcessor}s.
     */
    interface Repository extends BatchCompilingEnvironment.Initializable {

        /**
         * Returns the available workflow processors for the target descriptions.
         * @param descriptions the target descriptions
         * @return the available {@link WorkflowProcessor}s
         * @throws IllegalArgumentException if the parameter is {@code null}
         */
        Set<WorkflowProcessor> findWorkflowProcessors(Set<? extends WorkDescription> descriptions);

        /**
         * Returns the work description processor for the target object.
         * @param workDescription the target {@link WorkDescription}
         * @return the corresponded {@link WorkDescriptionProcessor}, or {@code null}
         *     if there is no suitable processors
         * @throws IllegalArgumentException if the parameter is {@code null}
         */
        WorkDescriptionProcessor<?> findDescriptionProcessor(WorkDescription workDescription);
    }
}


text:
import { module, test } from 'qunit';
import { setupRenderingTest } from 'ember-qunit';
import { click, fillIn, find, focus, render, triggerEvent } from '@ember/test-helpers';
import hbs from 'htmlbars-inline-precompile';

module('Integration | Component | ember x editable', function(hooks) {
  setupRenderingTest(hooks);

  test('mouseEnter/mouseLeave', async function(assert) {
    this.set('mouseInsideComponent', false);
    await render(hbs`{{x-editable-text mouseInsideComponent=mouseInsideComponent validator=validator value=value}}`);
    await triggerEvent(find('.x-base'), 'mouseenter');
    assert.equal(this.get('mouseInsideComponent'), true);
    await triggerEvent(find('.x-base'), 'mouseleave');
    assert.equal(this.get('mouseInsideComponent'), false);
  });

  test('Empty value', async function(assert) {
    this.set('value', 'Empty');
    await render(hbs`{{x-editable-text validator=validator value=value}}`);
    await focus(find('.x-base div input'));
    assert.equal(this.get('value'), '');
  });

  test('No validator passed', async function(assert) {
    this.set('value', 'foo');
    await render(hbs`{{x-editable-text value=value}}`);
    await fillIn(find('.x-base div input'), '');
    await click('.editable-submit');
    assert.equal(this.get('value'), 'Empty');
  });
});


text:
// -----------------------------------------------------------------------
// <copyright file="KinectCircleButton.cs" company="Microsoft">
//     Copyright (c) Microsoft Corporation.  All rights reserved.
// </copyright>
// -----------------------------------------------------------------------

namespace Microsoft.Kinect.Toolkit.Controls
{
    using System;
    using System.Diagnostics.CodeAnalysis;
    using System.Windows;
    using System.Windows.Controls;
    using System.Windows.Media;

    /// <summary>
    /// Location of the label in relation to the button
    /// </summary>
    public enum KinectCircleButtonLabelPosition
    {
        None = 0,

        Bottom,

        Right,
    }

    /// <summary>
    /// Button that responds to Kinect events
    /// </summary>
    [TemplatePart(Name = "PART_DefaultContentPresenter", Type = typeof(ContentPresenter))]
    public class KinectCircleButton : KinectButtonBase
    {
        /// <summary>
        /// Horizontal alignment of the Label content
        /// </summary>
        public static readonly DependencyProperty HorizontalLabelAlignmentProperty = DependencyProperty.Register(
            "HorizontalLabelAlignment",
            typeof(HorizontalAlignment),
            typeof(KinectCircleButton),
            new PropertyMetadata(HorizontalAlignment.Left));

        /// <summary>
        /// Vertical alignment of the Label content
        /// </summary>
        public static readonly DependencyProperty VerticalLabelAlignmentProperty = DependencyProperty.Register(
            "VerticalLabelAlignment",
            typeof(VerticalAlignment),
            typeof(KinectCircleButton),
            new PropertyMetadata(VerticalAlignment.Bottom));

        /// <summary>
        /// The Label content
        /// </summary>
        public static readonly DependencyProperty LabelProperty = DependencyProperty.Register(
            "Label", typeof(object), typeof(KinectCircleButton), new PropertyMetadata(null));

        /// <summary>
        /// Background of the Label content
        /// </summary>
        public static readonly DependencyProperty LabelBackgroundProperty = DependencyProperty.Register(
            "LabelBackground", typeof(Brush), typeof(KinectCircleButton), new PropertyMetadata(null));

        /// <summary>
        /// ContentTemplate for the Label content
        /// </summary>
        public static readonly DependencyProperty LabelTemplateProperty = DependencyProperty.Register(
            "LabelTemplate", typeof(DataTemplate), typeof(KinectCircleButton), new PropertyMetadata(null));

        /// <summary>
        /// DataTemplateSelector for the Label content
        /// </summary>
        public static readonly DependencyProperty LabelTemplateSelectorProperty = DependencyProperty.Register(
            "LabelTemplateSelector",
            typeof(DataTemplateSelector),
            typeof(KinectCircleButton),
            new PropertyMetadata(null));

        /// <summary>
        /// Position of the label
        /// </summary>
        public static readonly DependencyProperty LabelPositionProperty =
            DependencyProperty.Register("LabelPosition", typeof(KinectCircleButtonLabelPosition), typeof(KinectCircleButton), new PropertyMetadata(KinectCircleButtonLabelPosition.Bottom));

        /// <summary>
        /// Foreground brush to use for content (e.g.: arrow glyph inside button)
        /// </summary>
        /// <remarks>
        /// This property is provided as a convenience for content to be able to bind
        /// to it. The expectation is that KinectCircleButton style authors will set
        /// this property in response to control property changes or other triggers.
        /// Color scheme configuration should be done by specifying Foreground and
        /// ContentPressedForeground brushes rather than by explicitly specifying a
        /// ContentForeground brush.
        /// </remarks>
        public static readonly DependencyProperty ContentForegroundProperty = DependencyProperty.Register(
            "ContentForeground", typeof(Brush), typeof(KinectCircleButton), new PropertyMetadata(null));

        /// <summary>
        /// Foreground brush to use for content (e.g.: arrow glyph inside button) when
        /// button is in the pressed state
        /// </summary>
        public static readonly DependencyProperty ContentPressedForegroundProperty = DependencyProperty.Register(
            "ContentPressedForeground", typeof(Brush), typeof(KinectCircleButton), new PropertyMetadata(null));

        /// <summary>
        /// Initializes static members of the <see cref="KinectCircleButton"/> class.
        /// </summary>
        [SuppressMessage("Microsoft.Performance", "CA1810:InitializeReferenceTypeStaticFieldsInline",
            Justification = "We need to OverrideMetadata in the static constructor")]
        static KinectCircleButton()
        {
            DefaultStyleKeyProperty.OverrideMetadata(
                typeof(KinectCircleButton),
                new FrameworkPropertyMetadata(typeof(KinectCircleButton)));
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="KinectCircleButton"/> class.
        /// </summary>
        public KinectCircleButton()
        {
            this.LayoutUpdated += this.OnLayoutUpdated;
        }

        /// <summary>
        /// Horizontal alignment of the label content
        /// </summary>
        public HorizontalAlignment HorizontalLabelAlignment
        {
            get
            {
                return (HorizontalAlignment)this.GetValue(HorizontalLabelAlignmentProperty);
            }

            set
            {
                this.SetValue(HorizontalLabelAlignmentProperty, value);
            }
        }

        /// <summary>
        /// Vertical alignment of the label content
        /// </summary>
        public VerticalAlignment VerticalLabelAlignment
        {
            get
            {
                return (VerticalAlignment)this.GetValue(VerticalLabelAlignmentProperty);
            }

            set
            {
                this.SetValue(VerticalLabelAlignmentProperty, value);
            }
        }

        /// <summary>
        /// The Label content
        /// </summary>
        public object Label
        {
            get
            {
                return this.GetValue(LabelProperty);
            }

            set
            {
                this.SetValue(LabelProperty, value);
            }
        }

        /// <summary>
        /// Background of the label content
        /// </summary>
        public Brush LabelBackground
        {
            get
            {
                return (Brush)this.GetValue(LabelBackgroundProperty);
            }

            set
            {
                this.SetValue(LabelBackgroundProperty, value);
            }
        }

        /// <summary>
        /// ContentTemplate for the Label content
        /// </summary>
        public DataTemplate LabelTemplate
        {
            get
            {
                return (DataTemplate)this.GetValue(LabelTemplateProperty);
            }

            set
            {
                this.SetValue(LabelTemplateProperty, value);
            }
        }

        /// <summary>
        /// DataTemplateSelector for the Label content
        /// </summary>
        public DataTemplateSelector LabelTemplateSelector
        {
            get
            {
                return (DataTemplateSelector)this.GetValue(LabelTemplateSelectorProperty);
            }

            set
            {
                this.SetValue(LabelTemplateSelectorProperty, value);
            }
        }

        /// <summary>
        /// Foreground brush to use for content (e.g.: arrow glyph inside button)
        /// </summary>
        /// <remarks>
        /// This property is provided as a convenience for content to be able to bind
        /// to it. The expectation is that KinectCircleButton style authors will set
        /// this property in response to control property changes or other triggers.
        /// Color scheme configuration should be done by specifying Foreground and
        /// ContentPressedForeground brushes rather than by explicitly specifying a
        /// ContentForeground brush.
        /// </remarks>
        public Brush ContentForeground
        {
            get { return (Brush)this.GetValue(ContentForegroundProperty); }
            set { this.SetValue(ContentForegroundProperty, value); }
        }

        /// <summary>
        /// Foreground brush to use for content (e.g.: arrow glyph inside button) when
        /// button is in the pressed state
        /// </summary>
        public Brush ContentPressedForeground
        {
            get { return (Brush)this.GetValue(ContentPressedForegroundProperty); }
            set { this.SetValue(ContentPressedForegroundProperty, value); }
        }

        /// <summary>
        /// The position of the label in the button
        /// </summary>
        public KinectCircleButtonLabelPosition LabelPosition
        {
            get { return (KinectCircleButtonLabelPosition)this.GetValue(LabelPositionProperty); }
            set { this.SetValue(LabelPositionProperty, value); }
        }

        /// <summary>
        /// Called when the layout updates.  Updates the point that
        /// we guide the hand pointer to when we are being pressed.
        /// </summary>
        /// <param name="sender">Sender of the event</param>
        /// <param name="args">Arguments of the event</param>
        private void OnLayoutUpdated(object sender, EventArgs args)
        {
            var contentPresenter = this.Template.FindName("PART_DefaultContentPresenter", this) as ContentPresenter;
            if (contentPresenter == null)
            {
                return;
            }

            var contentCenterPoint = new Point(contentPresenter.ActualWidth / 2.0, contentPresenter.ActualHeight / 2.0);
            var pressTargetPoint = contentPresenter.TranslatePoint(contentCenterPoint, this);
            pressTargetPoint = new Point(pressTargetPoint.X / this.ActualWidth, pressTargetPoint.Y / this.ActualHeight);
            KinectRegion.SetPressTargetPoint(this, pressTargetPoint);
        }
    }
}


text:
package com.linkedin.metadata.dao;

import com.linkedin.common.urn.DataProcessUrn;
import com.linkedin.metadata.snapshot.DataProcessSnapshot;

public class DataProcessActionRequestBuilder extends BaseActionRequestBuilder<DataProcessSnapshot, DataProcessUrn> {
    private static final String BASE_URI_TEMPLATE = "dataProcesses";

    public DataProcessActionRequestBuilder() {
        super(DataProcessSnapshot.class, DataProcessUrn.class, BASE_URI_TEMPLATE);
    }
}


text:
namespace YAF.Core.Services
{
  using System;
  using System.Collections.Generic;

  using YAF.Types;

  /// <summary>
  /// The message cleaned class (internal)
  /// </summary>
  [Serializable]
  public class MessageCleaned
  {
    #region Constructors and Destructors

    /// <summary>
    ///   Initializes a new instance of the <see cref = "MessageCleaned" /> class.
    /// </summary>
    public MessageCleaned()
    {
    }

    /// <summary>
    /// Initializes a new instance of the <see cref="MessageCleaned"/> class.
    /// </summary>
    /// <param name="messageTruncated">
    /// The message truncated.
    /// </param>
    /// <param name="messageKeywords">
    /// The message keywords.
    /// </param>
    public MessageCleaned([NotNull] string messageTruncated, [NotNull] List<string> messageKeywords)
    {
      this.MessageTruncated = messageTruncated;
      this.MessageKeywords = messageKeywords;
    }

    #endregion

    #region Properties

    /// <summary>
    ///   Gets or sets MessageKeywords.
    /// </summary>
    public List<string> MessageKeywords { get; set; }

    /// <summary>
    ///   Gets or sets MessageTruncated.
    /// </summary>
    public string MessageTruncated { get; set; }

    #endregion
  }
}


text:
Purchase Complete!

      Your payment has been completed

      Thank you for your purchase, you can now view your purchase history to print your receipt. If any additional information or documents
      are needed for your purchase, they will be emailed to you shortly.

      You will be automatically re-directed to your purchase history in 10 seconds...

 Go to my purchase history

Checkout

          Item Name

          Item/Person

            Person

            Fee

            Qty

            <button class="btn btn-danger btn-sm" data-ng-click="removeItem({{item.shopping_item_id}})"> </button>
              {{item.item_name}}

{{item.person_name}}

 0">${{item.total_fee}}  0">*

{{item.quantity}}

            <button class="btn btn-danger btn-xs" data-ng-click="removeItem({{item.shopping_item_id}})"> </button>
            {{item.item_name}}

                   {{item.person_name}}

 0">${{item.total_fee}}  0">*

{{link.linked_item_name}}

{{link.linked_person_name}}

 0">${{link.linked_total_fee}}  0">*

{{link.linked_quantity}}

{{link.linked_item_name}}
{{link.linked_person_name}}

 0">${{link.linked_total_fee}}  0">*

* {{promo}}

      <input type="text" class="form-control" data-ng-model="promoCode.code" name="promo-code" id="promo-code" placeholder="">

      <button class="btn btn-success btn-sm" data-ng-click="checkPromo()"> Apply Promo Code</button>

Total: ${{(cart.totalFee).toFixed(2)}}

  <div class="panel panel-default" data-ng-show="cart.totalFee <= 0 && cart.data.length > 0">

      Free Registration

 0">

            Please address the following issues:

{{error}}

        Disclaimer:

          You are about to purchase one or more items at no additional cost. Please note that payments for this purchase may be due at a future date, or these items may have been listed
          at no cost in error and may require payment once the corrections have been made.

        Terms:

          <input type="checkbox" id="freeDisclaimer" data-ng-model="freeForm.freeDisclaimer"> I agree to the above statements and would like to continue purchasing these items

          <button type="button" class="btn btn-disabled">You must agree to the 'Free Registration' Disclaimer</button>

          <button type="button" class="btn btn-success" data-ng-click="registerFreeCart()" data-ng-if="!registeringFreeCart"> Register Now</button>
          <button type="button" class="btn btn-disabled" data-ng-if="registeringFreeCart">Processing Registration...</button>

 0">

      Payment

      <form class="form-horizontal" role="form">
        <fieldset>

 0">

                Please address the following issues:

{{error}}

            <input style="display:none">
            <input type="password" style="display:none">

            <legend>Payment Information</legend>

            Name on Card

              <input type="text" class="form-control" data-ng-model="cardForm.customerName" name="card-holder-name" id="card-holder-name" placeholder="Card Holder's Name">

            Card Number

              <input type="{{(cardForm.showCCNumber)? 'text' : 'password'}}" class="form-control" data-ng-model="cardForm.cardNumber" name="card-number" id="card-number" placeholder="Debit/Credit Card Number">
              <checkbox class="text-primary" data-ng-model="cardForm.showCCNumber" /> Show Number

            Expiration Date

                  <select class="form-control col-sm-2" data-ng-model="cardForm.expMonth" name="expiry-month" id="expiry-month">
                    <option>Month</option>
                    <option value="01">Jan (01)</option>
                    <option value="02">Feb (02)</option>
                    <option value="03">Mar (03)</option>
                    <option value="04">Apr (04)</option>
                    <option value="05">May (05)</option>
                    <option value="06">June (06)</option>
                    <option value="07">July (07)</option>
                    <option value="08">Aug (08)</option>
                    <option value="09">Sep (09)</option>
                    <option value="10">Oct (10)</option>
                    <option value="11">Nov (11)</option>
                    <option value="12">Dec (12)</option>
                  </select>

                  <select class="form-control" data-ng-model="cardForm.expYear" name="expiry-year">
                    <option value="2016">2016</option>
                    <option value="2017">2017</option>
                    <option value="2018">2018</option>
                    <option value="2019">2019</option>
                    <option value="2020">2020</option>
                    <option value="2021">2021</option>
                    <option value="2022">2022</option>
                    <option value="2023">2023</option>
                    <option value="2024">2024</option>
                    <option value="2025">2025</option>
                    <option value="2026">2026</option>
                    <option value="2027">2027</option>
                    <option value="2028">2028</option>
                    <option value="2029">2029</option>
                  </select>

            Card CVV

              <input type="{{(cardForm.showCVVNumber)? 'text' : 'password'}}" class="form-control" data-ng-model="cardForm.cardCvv" name="cvv" id="cvv" placeholder="Security Code">
              <checkbox class="text-primary" data-ng-model="cardForm.showCVVNumber" /> Show Number

            Amount to charge

              ${{(cart.totalFee).toFixed(2)}}

 0">

                The following issues occured when trying to authorize payment:

{{error.error.text}}

            Terms:

              <input type="checkbox" id="waiverRefund" data-ng-model="cardForm.agreement"> I have read and agree to the Refund Policy.

                  Refund Policy

Program Refund Policy:

                1. A full refund is granted on any program/class cancelled by the Lockport Township Park
                District (LTPD) due to insufficient program registration.

                2. A $10 administration fee will be charged to all refund requests (unless program is cancelled
                by LTPD).

                3. Refund/transfer requests may be made up to five business days prior to the start of class.
                Refund requests received less than 5 business days from the start of the class/program will
                only be honored for certified medical reasons or moving from the Park District.

                4. Refunds on Prairie Bluff Holiday Brunches will only be granted if the request is received at
                least 10 business days prior to the event or if the registrants spot can be filled by a patron
                on the waitlist. If this occurs the registrant will receive a full refund minus the $10
                administration fee.

                5. All refund requests, including online registration, must be made in person in writing at the
                DPCC, 1811 Lawrence Ave., or Challenge Fitness, 2021 Lawrence Ave. in Lockport
                6. Credit balances of $10 or less will be kept on account.

Trip Refund Policy:

                1. Day trip payments are non-refundable unless the spot can be filled. Please notify the
                travel supervisor as soon as possible if someone will be taking your place. A $10
                administrative fee will be charged

                2. Extended tour deposits/payments are refundable up to 60 days prior to departure,
                unless stated otherwise. Less than 60 days prior to departure, deposits/payments are
                non-refundable unless the spot can be filled or the optional trip insurance was
                purchased. Please notify the travel supervisor as soon as possible prior to departure if
                someone is taking your place. A $10 administration fee will be charged.

                3. Trip insurance is optional but highly recommended. A separate check is required to
                purchase insurance. In some cases, a minimum of 10 participants is required for
                insurance to be purchased.

                4. If the minimum registration is not met, LTPD has the right to cancel a tour. If a tour is
                cancelled you will be notified no later than 7am on the date of departure. A full refund
                will be given.

                  <button type="button" class="btn btn-primary" id="closeRefundPopButton" data-dismiss="modal"> Close</button>

              <button type="button" class="btn btn-disabled">You must agree to the refund policy</button>

              <button type="button" class="btn btn-success" data-ng-click="payCart()" data-ng-if="!payingCart"> Pay Now</button>
              <button type="button" class="btn btn-disabled" data-ng-if="payingCart">Processing Payment...</button>

        </fieldset>
      </form>


text:
from django.contrib.staticfiles import finders

from assetfiles import filters

def find(output_path):
    """
    Search for filters that would output the given file.

    If one is found, search for one the filter's possible input paths for
    the given output path. If there's a match return a tuple of the found
    absolute path and the found filter. Otherwise return tuple of (None, None).

    Args:
        output_path: An absolute path to search for.
    Returns
        A tuple containing the absolute path to the input file and the filter
        instance that would filter it.

    >>> find('/path/to/filtered.file')
    ('/path/to/filterable.file', <SomeFilter instance>)
    >>> find('/path/to/unfiltered.file')
    (None, None)
    """
    filter = filters.find_by_output_path(output_path)
    if filter:
        for input_path in filter.derive_input_paths(output_path):
            full_input_path = finders.find(input_path)
            if full_input_path:
                return full_input_path, filter
    return None, None


text:
external help file: Microsoft.Azure.Commands.MachineLearning.dll-Help.xml
online version:
schema: 2.0.0
---

# Get-AzureRmMlWebService

## SYNOPSIS
Retrieves the summary information for one or more web services.

## SYNTAX

```
Get-AzureRmMlWebService [-ResourceGroupName <String>] [-Name <String>]
```

## DESCRIPTION
Retrieves web service defintion information.
Depending on the paramenters passed, the cmdlet returns the defintion for a specific web service, a collection of defintions for the web services for a specified resource group within the current subscription, or a collection of defintions for the web services within the current subscription.

## EXAMPLES

### --------------------------  Example 1: Get details of specific web service  --------------------------
@{paragraph=PS C:\\\>}

```
Get-AzureRmMlWebService -ResourceGroupName "myresourcegroup" -Name "mywebservicename"
```

### --------------------------  Example 2: Get all web service resources in current subscription  --------------------------
@{paragraph=PS C:\\\>}

```
Get-AzureRmMlWebService
```

### --------------------------  Example 3: Get all web services in the current subscription and given resource group  --------------------------
@{paragraph=PS C:\\\>}

```
Get-AzureRmMlWebService -ResourceGroupName "myresourcegroup"
```

## PARAMETERS

### -Name
The name of the web service for which the details are retrieved.

```yaml
Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -ResourceGroupName
The resource group from which the details for the web service are retrieved.

```yaml
Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

## INPUTS

## OUTPUTS

### None

## NOTES
Keywords: azure, azurerm, arm, resource, management, manager, machine, machine learning, azureml

## RELATED LINKS


text:
import Ember from 'ember';
import getNumbers from 'dummy/lib/get-numbers';

const {
  Route
  } = Ember;

export default Route.extend({

  model() {
    return {
      numbers: getNumbers(0, 20),
      first: 0,
      last: 20
    };
  },

  actions: {
    willTransition() {
      this.set('controller.model.numbers', null);
      this.controller.set('model', null);
      this.set('currentModel', null);
    }
  }

});


text:
import { Injectable } from '@angular/core';
import { Observable, Subject, BehaviorSubject } from 'rxjs';
import { catchError } from 'rxjs/operators';

import { LabelMeta, Label } from '@app-interfaces/label';

import { HttpService } from '@app-services/http/http.service';

@Injectable({
  providedIn: 'root'
})
export class LabelService extends HttpService {
  changeLabel$: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(false);
  changeDatabaseLabel$: Subject<Label> = new Subject<Label>();
  deleteDatabaseLabel$: Subject<Label> = new Subject<Label>();

  getLabels(projectId: number): Observable<LabelMeta> {
    return this.http.get<LabelMeta>(this.apiURL + '/labels?project_id=' + projectId, this.httpOptions)
    .pipe(
      catchError(this.handleError)
    )
  }

  getLabel(label_id: number): Observable<Label> {
    return this.http.get<Label>(this.apiURL + '/labels/' + label_id + '?db_count=True', this.httpOptions)
    .pipe(
      catchError(this.handleError)
    )
  }

  addLabelSourceDb(db_id: number, label: Label): Observable<Label> {
    return this.http.post<Label>(this.apiURL + '/source-dbs/' + db_id + '/labels',
    JSON.stringify(label), this.httpOptions)
    .pipe(
      catchError(this.handleError)
    )
  }

  updateLabel(label: Label):  Observable<{}> {
    const updateLabel: Label = {
      name: label.name
    }
    return this.http.put<Label>(this.apiURL + '/labels/' + label.id,
    JSON.stringify(updateLabel), this.httpOptions)
    .pipe(
      catchError(this.handleError)
    )
  }

  deleteLabel(label_id: number):  Observable<{}> {
    return this.http.delete(this.apiURL + '/labels/' + label_id, this.httpOptions);
  }

  deleteLabelSourceDb(db_id: number, label_id: number):  Observable<{}> {
    return this.http.delete(this.apiURL + '/source-dbs/' + db_id + '/labels/' + label_id, this.httpOptions);
  }
}


text:
package com.axellience.vuegwtexamples.client.examples.extendjavacomponent;

import com.axellience.vuegwt.core.annotations.component.Component;
import com.axellience.vuegwt.core.annotations.component.Computed;
import com.axellience.vuegwt.core.annotations.component.Data;
import com.axellience.vuegwt.core.client.component.hooks.HasCreated;
import jsinterop.annotations.JsMethod;

/**
 * @author Adrien Baron
 */
@Component
public class ChildComponent extends ParentComponent implements HasCreated {

  @Data
  int childValue;

  @Override
  public void created() {
    this.childValue = 10;
  }

  @JsMethod
  public int childMultiplyBy10(int value) {
    return value * 10;
  }

  @JsMethod
  public int childMultiplyBy4(int value) {
    return this.parentMultiplyBy2(this.parentMultiplyBy2(value));
  }

  @Computed
  public String getChildComputed() {
    return "Child Computed | " + this.childValue;
  }
}


text:
require File.dirname(__FILE__) + '/../abstract_unit'

class SessionManagementTest < Test::Unit::TestCase
  class SessionOffController < ActionController::Base
    session :off

    def show
      render_text "done"
    end

    def tell
      render_text "done"
    end
  end

  class TestController < ActionController::Base
    session :off, :only => :show
    session :session_secure => true, :except => :show
    session :off, :only => :conditional,
            :if => Proc.new { |r| r.parameters[:ws] }

    def show
      render_text "done"
    end

    def tell
      render_text "done"
    end

    def conditional
      render_text ">>>#{params[:ws]}<<<"
    end
  end

  class SpecializedController < SessionOffController
    session :disabled => false, :only => :something

    def something
      render_text "done"
    end

    def another
      render_text "done"
    end
  end

  def setup
    @request, @response = ActionController::TestRequest.new,
      ActionController::TestResponse.new
  end

  def test_session_off_globally
    @controller = SessionOffController.new
    get :show
    assert_equal false, @request.session_options
    get :tell
    assert_equal false, @request.session_options
  end

  def test_session_off_conditionally
    @controller = TestController.new
    get :show
    assert_equal false, @request.session_options
    get :tell
    assert_instance_of Hash, @request.session_options
    assert @request.session_options[:session_secure]
  end

  def test_controller_specialization_overrides_settings
    @controller = SpecializedController.new
    get :something
    assert_instance_of Hash, @request.session_options
    get :another
    assert_equal false, @request.session_options
  end

  def test_session_off_with_if
    @controller = TestController.new
    get :conditional
    assert_instance_of Hash, @request.session_options
    get :conditional, :ws => "ws"
    assert_equal false, @request.session_options
  end

  def test_session_store_setting
    ActionController::Base.session_store = :drb_store
    assert_equal CGI::Session::DRbStore, ActionController::Base.session_store

    if Object.const_defined?(:ActiveRecord)
      ActionController::Base.session_store = :active_record_store
      assert_equal CGI::Session::ActiveRecordStore, ActionController::Base.session_store
    end
  end
end


text:
<?php
namespace ZFX\Rest\Controller;

use Zend\Mvc\Controller\AbstractRestfulController;
use Zend\EventManager\EventManagerInterface;
use Zend\Mvc\MvcEvent;
use Zend\Stdlib\RequestInterface as Request;
use Zend\Json\Json;

abstract class HATEOASRestfulController extends AbstractRestfulController
{
	protected static $JSON_CONTENT_TYPE = array('application/json','text/json');

	// Tells the consumer what HTTP methods are available for collection and resource
	public function options()
	{
		if ($this->params('id', false)) {
			$options = $this->getResourceOptions();
		} else {
			$options = $this->getCollectionOptions();
		}
		$response = $this->getResponse();
		$response->getHeaders()->addHeaderLine('Content-Type', 'application/hal+json');
		$response->getHeaders()->addHeaderLine('Allow', implode(',', $options));
		return $response;
	}

	public function checkOptions(MvcEvent $e)
	{
		if ($this->params('id', false)) {
			$options = $this->getResourceOptions();
		} else {
			$options = $this->getCollectionOptions();
		}
		if(!is_null($options)) {
			$method = $e->getRequest()->getMethod();
			if (in_array($method, $options) || $method == 'OPTIONS') {
				return; // HTTP method is allowed!
			}
		}
		$response = $this->getResponse();
		$response->getHeaders()->addHeaderLine('Content-Type', 'application/hal+json');
		$response->setStatusCode(405); // Method Not Allowed

		return $response;
	}

	public function setEventManager(EventManagerInterface $events)
	{
		parent::setEventManager($events);

		// Register a listener at high priority
		$events->attach('dispatch', array($this, 'checkOptions'), 10);
	}

	//Supporting POST with id set
	public function onDispatch(MvcEvent $e)
	{
		$routeMatch = $e->getRouteMatch();
		if (!$routeMatch || $routeMatch->getParam('action', false)) {
			return parent::onDispatch($e);
		}
		$request = $e->getRequest();
		// RESTful methods
		$method = strtolower($request->getMethod());
		switch ($method) {
			case 'post':
				$id = $this->getIdentifier($routeMatch, $request);
				if ($id !== false) {
					$action = 'invoke';
					$return = $this->processPostWithIdData($id, $request);
					break;
				}
			default:
				$return = parent::onDispatch($e);
				break;
		}
		$e->setResult($return);
		return $return;
	}

	/**
	 * POST with ID
	 *
	 * @param  mixed $id
	 * @param  mixed $data
	 * @return mixed
	 */
	public function invoke($id, $data)
	{
		$this->response->setStatusCode(405);

		return array(
				'content' => 'Method Not Allowed'
		);
	}

	/**
	 * Process post data and call create
	 *
	 * @param Request $request
	 * @return mixed
	 */
	protected function processPostWithIdData($id, Request $request)
	{
		if ($this->requestHasContentType($request, self::CONTENT_TYPE_JSON)) {
			$data = Json::decode($request->getContent(), $this->jsonDecodeType);
		} else {
			$data = $request->getPost()->toArray();
		}

		return $this->invoke($id, $data);
	}

	protected function getCollectionOptions() { return null; }

	protected function getResourceOptions() { return null; }
}


text:
FontsPage::FontsPage(QWidget *parent) : TabPage(parent), m_ui(new Ui::FontsPage){
  m_ui->setupUi(this);

  connect(m_ui->changeGeneralFontButton, &QToolButton::clicked, [this](){onFontChangeRequested(m_ui->generalFontLabel);});
  connect(m_ui->changeFixedWidthFontButton, &QToolButton::clicked, [this](){onFontChangeRequested(m_ui->fixedFontLabel);});
  readSettings();

  //icons
  m_ui->createFontsConfButton->setIcon(QIcon::fromTheme("document-new"));
  m_ui->removeFontsConfButton->setIcon(QIcon::fromTheme("edit-delete"));
}

FontsPage::~FontsPage(){
  delete m_ui;
}

void FontsPage::writeSettings(){
  QSettings settings(lthemeengine::configFile(), QSettings::IniFormat);
  settings.beginGroup("Fonts");
  settings.setValue("general", m_ui->generalFontLabel->font());
  settings.setValue("fixed", m_ui->fixedFontLabel->font());
  settings.endGroup();
}

void FontsPage::onFontChangeRequested(QWidget *widget){
  bool ok = false;
  QFont font = QFontDialog::getFont (&ok, widget->font(), this);
  if(ok){
    widget->setFont(font);
    qobject_cast<QLabel*>(widget)->setText(font.family () + " " + QString::number(font.pointSize ()));
    }
}

void FontsPage::readSettings(){
  QSettings settings(lthemeengine::configFile(), QSettings::IniFormat);
  settings.beginGroup("Fonts");
  loadFont(&settings, m_ui->generalFontLabel, "general");
  loadFont(&settings, m_ui->fixedFontLabel, "fixed");
  settings.endGroup();
}

void FontsPage::loadFont(QSettings *settings, QLabel *label, const QString &key){
  QFont font = settings->value(key, QApplication::font()).value<QFont>();
  label->setText(font.family () + " " + QString::number(font.pointSize ()));
  label->setFont(font);
}

void FontsPage::on_createFontsConfButton_clicked(){
  FontConfigDialog d(this);
  d.exec();
}

void FontsPage::on_removeFontsConfButton_clicked(){
  QString path = QDir::homePath() + "/.config/fontconfig/fonts.conf";
  if(QFile::exists(path)){
  if(QMessageBox::question(this, tr("Remove Font Configuration"), tr("Are you sure you want to delete <i>%1</i>?").arg(path), QMessageBox::Yes | QMessageBox::No) == QMessageBox::No){
    return;
    }
  QFile::remove(path + ".back");
  QFile::copy(path, path + ".back");
  QFile::remove(path);
  }
}