text:
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="AndroidDesignerProfile">
    <option name="fullProfile">
      <profile>
        <option name="device" value="2.7in QVGA" />
        <option name="deviceConfiguration" value="Portrait" />
        <option name="targetHashString" value="android-14" />
        <option name="theme" value="AppTheme" />
      </profile>
    </option>
    <option name="selection" value="[Full]" />
  </component>
  <component name="AndroidLayoutPreviewToolWindow">
    <option name="state">
      <GlobalState>
        <option name="device" value="2.7in QVGA" />
        <option name="dockMode" value="" />
        <option name="nightMode" value="notnight" />
        <option name="targetHashString" value="android-14" />
        <option name="theme" value="AppTheme" />
      </GlobalState>
    </option>
  </component>
  <component name="ChangeListManager">
    <list default="true" id="e0010dad-d30f-4c31-8ef6-57ba1d32270d" name="Default" comment="">
      <change type="DELETED" beforePath="$PROJECT_DIR$/bin/classes/edu/csh/coursebrowser/AboutActivity$DummySectionFragment.class" afterPath="" />
      <change type="DELETED" beforePath="$PROJECT_DIR$/bin/classes/edu/csh/coursebrowser/AboutActivity.class" afterPath="" />
      <change type="DELETED" beforePath="$PROJECT_DIR$/bin/classes/edu/csh/coursebrowser/AlertError.class" afterPath="" />
      <change type="DELETED" beforePath="$PROJECT_DIR$/bin/classes/edu/csh/coursebrowser/BuildConfig.class" afterPath="" />
      <change type="DELETED" beforePath="$PROJECT_DIR$/bin/classes/edu/csh/coursebrowser/Course.class" afterPath="" />
      <change type="DELETED" beforePath="$PROJECT_DIR$/bin/classes/edu/csh/coursebrowser/CourseActivity.class" afterPath="" />
      <change type="DELETED" beforePath="$PROJECT_DIR$/bin/classes/edu/csh/coursebrowser/Department.class" afterPath="" />
      <change type="DELETED" beforePath="$PROJECT_DIR$/bin/classes/edu/csh/coursebrowser/DepartmentActivity.class" afterPath="" />
      <change type="DELETED" beforePath="$PROJECT_DIR$/bin/classes/edu/csh/coursebrowser/Manifest.class" afterPath="" />
      <change type="DELETED" beforePath="$PROJECT_DIR$/bin/classes/edu/csh/coursebrowser/R.class" afterPath="" />
      <change type="DELETED" beforePath="$PROJECT_DIR$/bin/classes/edu/csh/coursebrowser/School.class" afterPath="" />
      <change type="DELETED" beforePath="$PROJECT_DIR$/bin/classes/edu/csh/coursebrowser/SchoolActivity.class" afterPath="" />
      <change type="DELETED" beforePath="$PROJECT_DIR$/bin/classes/edu/csh/coursebrowser/Section.class" afterPath="" />
      <change type="DELETED" beforePath="$PROJECT_DIR$/bin/classes/edu/csh/coursebrowser/SectionInfoActivity$DummySectionFragment.class" afterPath="" />
      <change type="DELETED" beforePath="$PROJECT_DIR$/bin/classes/edu/csh/coursebrowser/SectionInfoActivity.class" afterPath="" />
      <change type="DELETED" beforePath="$PROJECT_DIR$/bin/classes/edu/csh/coursebrowser/SectionsActivity.class" afterPath="" />
      <change type="DELETED" beforePath="$PROJECT_DIR$/bin/classes/edu/csh/coursebrowser/SettingsActivity.class" afterPath="" />
      <change type="DELETED" beforePath="$PROJECT_DIR$/bin/classes/edu/csh/coursebrowser/Time.class" afterPath="" />
      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/CourseBrowser.apk" afterPath="$PROJECT_DIR$/CourseBrowser.apk" />
      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/AndroidManifest.xml" afterPath="$PROJECT_DIR$/AndroidManifest.xml" />
      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/proguard_logs/dump.txt" afterPath="$PROJECT_DIR$/proguard_logs/dump.txt" />
      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/proguard_logs/mapping.txt" afterPath="$PROJECT_DIR$/proguard_logs/mapping.txt" />
      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/proguard_logs/usage.txt" afterPath="$PROJECT_DIR$/proguard_logs/usage.txt" />
      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
    </list>
    <ignored path="CourseBrowser.iws" />
    <ignored path=".idea/workspace.xml" />
    <file path="/Dummy.txt" changelist="e0010dad-d30f-4c31-8ef6-57ba1d32270d" time="1357503277795" ignored="false" />
    <file path="/a.java" changelist="e0010dad-d30f-4c31-8ef6-57ba1d32270d" time="1357316009278" ignored="false" />
    <file path="/sample.java" changelist="e0010dad-d30f-4c31-8ef6-57ba1d32270d" time="1357311370885" ignored="false" />
    <file path="/activity_course_browser.xml" changelist="e0010dad-d30f-4c31-8ef6-57ba1d32270d" time="1357312956827" ignored="false" />
    <file path="/AboutActivity.java" changelist="e0010dad-d30f-4c31-8ef6-57ba1d32270d" time="1357315429578" ignored="false" />
    <file path="/README" changelist="e0010dad-d30f-4c31-8ef6-57ba1d32270d" time="1357314246171" ignored="false" />
    <file path="/SchoolActivity.java" changelist="e0010dad-d30f-4c31-8ef6-57ba1d32270d" time="1357432608092" ignored="false" />
    <file path="/AndroidManifest.xml" changelist="e0010dad-d30f-4c31-8ef6-57ba1d32270d" time="1357504730270" ignored="false" />
    <file path="/SettingsActivity.java" changelist="e0010dad-d30f-4c31-8ef6-57ba1d32270d" time="1357432676887" ignored="false" />
    <file path="/Time.java" changelist="e0010dad-d30f-4c31-8ef6-57ba1d32270d" time="1357490579499" ignored="false" />
    <file path="/ScheduleMaker.java" changelist="e0010dad-d30f-4c31-8ef6-57ba1d32270d" time="1357500229803" ignored="false" />
    <file path="/SharedSchedule.java" changelist="e0010dad-d30f-4c31-8ef6-57ba1d32270d" time="1357503471976" ignored="false" />
    <file path="/Section.java" changelist="e0010dad-d30f-4c31-8ef6-57ba1d32270d" time="1357501032268" ignored="false" />
    <file path="/Course.java" changelist="e0010dad-d30f-4c31-8ef6-57ba1d32270d" time="1357503458608" ignored="false" />
    <option name="TRACKING_ENABLED" value="true" />
    <option name="SHOW_DIALOG" value="false" />
    <option name="HIGHLIGHT_CONFLICTS" value="true" />
    <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
    <option name="LAST_RESOLUTION" value="IGNORE" />
  </component>
  <component name="ChangesViewManager" flattened_view="true" show_ignored="false" />
  <component name="CreatePatchCommitExecutor">
    <option name="PATCH_PATH" value="" />
  </component>
  <component name="DaemonCodeAnalyzer">
    <disable_hints />
  </component>
  <component name="DebuggerManager">
    <breakpoint_any default_suspend_policy="SuspendAll" default_condition_enabled="true">
      <breakpoint>
        <option name="NOTIFY_CAUGHT" value="true" />
        <option name="NOTIFY_UNCAUGHT" value="true" />
        <option name="ENABLED" value="false" />
        <option name="LOG_ENABLED" value="false" />
        <option name="LOG_EXPRESSION_ENABLED" value="false" />
        <option name="SUSPEND_POLICY" value="SuspendAll" />
        <option name="SUSPEND" value="true" />
        <option name="COUNT_FILTER_ENABLED" value="false" />
        <option name="COUNT_FILTER" value="0" />
        <option name="CONDITION_ENABLED" value="true" />
        <option name="CLASS_FILTERS_ENABLED" value="false" />
        <option name="INSTANCE_FILTERS_ENABLED" value="false" />
        <option name="CONDITION" value="" />
        <option name="LOG_MESSAGE" value="" />
      </breakpoint>
      <breakpoint>
        <option name="NOTIFY_CAUGHT" value="true" />
        <option name="NOTIFY_UNCAUGHT" value="true" />
        <option name="ENABLED" value="false" />
        <option name="LOG_ENABLED" value="false" />
        <option name="LOG_EXPRESSION_ENABLED" value="false" />
        <option name="SUSPEND_POLICY" value="SuspendAll" />
        <option name="SUSPEND" value="true" />
        <option name="COUNT_FILTER_ENABLED" value="false" />
        <option name="COUNT_FILTER" value="0" />
        <option name="CONDITION_ENABLED" value="true" />
        <option name="CLASS_FILTERS_ENABLED" value="false" />
        <option name="INSTANCE_FILTERS_ENABLED" value="false" />
        <option name="CONDITION" value="" />
        <option name="LOG_MESSAGE" value="" />
      </breakpoint>
    </breakpoint_any>
    <ui_properties default_suspend_policy="SuspendAll" default_condition_enabled="true" />
    <breakpoint_rules />
    <ui_properties />
  </component>
  <component name="ExecutionTargetManager" SELECTED_TARGET="default_target" />
  <component name="FavoritesManager">
    <favorites_list name="CourseBrowser" />
  </component>
  <component name="FileEditorManager">
    <leaf>
      <file leaf-file-name="School.java" pinned="false" current="false" current-in-tab="false">
        <entry file="file://$PROJECT_DIR$/src/shared/School.java">
          <provider selected="true" editor-type-id="text-editor">
            <state line="23" column="13" selection-start="1536" selection-end="1536" vertical-scroll-proportion="0.0">
              <folding />
            </state>
          </provider>
        </entry>
      </file>
      <file leaf-file-name="SharedSchedule.java" pinned="false" current="false" current-in-tab="false">
        <entry file="file://$PROJECT_DIR$/src/schedulemaker/SharedSchedule.java">
          <provider selected="true" editor-type-id="text-editor">
            <state line="20" column="59" selection-start="432" selection-end="432" vertical-scroll-proportion="0.0">
              <folding>
                <element signature="imports" expanded="true" />
              </folding>
            </state>
          </provider>
        </entry>
      </file>
      <file leaf-file-name="AndroidManifest.xml" pinned="false" current="true" current-in-tab="true">
        <entry file="file://$PROJECT_DIR$/AndroidManifest.xml">
          <provider selected="true" editor-type-id="text-editor">
            <state line="12" column="32" selection-start="1425" selection-end="1425" vertical-scroll-proportion="0.2435724">
              <folding />
            </state>
          </provider>
        </entry>
      </file>
      <file leaf-file-name="Course.java" pinned="false" current="false" current-in-tab="false">
        <entry file="file://$PROJECT_DIR$/src/shared/Course.java">
          <provider selected="true" editor-type-id="text-editor">
            <state line="31" column="56" selection-start="1852" selection-end="1852" vertical-scroll-proportion="0.0">
              <folding />
            </state>
          </provider>
        </entry>
      </file>
    </leaf>
  </component>
  <component name="FindManager">
    <FindUsagesManager>
      <setting name="OPEN_NEW_TAB" value="false" />
    </FindUsagesManager>
  </component>
  <component name="GenerateSignedApkSettings">
    <option name="KEY_STORE_PATH" value="~/" />
    <option name="KEY_ALIAS" value="CourseBrowser-Keystore" />
    <option name="REMEMBER_PASSWORDS" value="true" />
  </component>
  <component name="Git.Settings">
    <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
  </component>
  <component name="GitLogSettings">
    <option name="myDateState">
      <MyDateState />
    </option>
  </component>
  <component name="IdeDocumentHistory">
    <option name="changedFiles">
      <list>
        <option value="$PROJECT_DIR$/src/edu/csh/coursebrowser/School.java" />
        <option value="$PROJECT_DIR$/res/menu/activity_course_browser.xml" />
        <option value="$PROJECT_DIR$/README" />
        <option value="$PROJECT_DIR$/src/edu/csh/coursebrowser/AboutActivity.java" />
        <option value="$PROJECT_DIR$/src/edu/csh/coursebrowser/SettingsActivity.java" />
        <option value="$PROJECT_DIR$/src/edu/csh/coursebrowser/SchoolActivity.java" />
        <option value="$PROJECT_DIR$/src/edu/csh/coursebrowser/Time.java" />
        <option value="$PROJECT_DIR$/src/schedulemaker/ScheduleMaker.java" />
        <option value="$PROJECT_DIR$/src/shared/Section.java" />
        <option value="$PROJECT_DIR$/src/shared/Course.java" />
        <option value="$PROJECT_DIR$/src/schedulemaker/SharedSchedule.java" />
        <option value="$PROJECT_DIR$/AndroidManifest.xml" />
      </list>
    </option>
  </component>
  <component name="ProjectFrameBounds">
    <option name="x" value="4" />
    <option name="y" value="22" />
    <option name="width" value="1436" />
    <option name="height" value="878" />
  </component>
  <component name="ProjectLevelVcsManager" settingsEditedManually="false">
    <OptionsSetting value="true" id="Add" />
    <OptionsSetting value="true" id="Remove" />
    <OptionsSetting value="true" id="Checkout" />
    <OptionsSetting value="true" id="Update" />
    <OptionsSetting value="true" id="Status" />
    <OptionsSetting value="true" id="Edit" />
    <ConfirmationsSetting value="0" id="Add" />
    <ConfirmationsSetting value="0" id="Remove" />
  </component>
  <component name="ProjectReloadState">
    <option name="STATE" value="0" />
  </component>
  <component name="ProjectView">
    <navigator currentView="ProjectPane" proportions="" version="1" splitterProportion="0.5">
      <flattenPackages />
      <showMembers />
      <showModules />
      <showLibraryContents />
      <hideEmptyPackages />
      <abbreviatePackageNames />
      <autoscrollToSource />
      <autoscrollFromSource />
      <sortByType />
    </navigator>
    <panes>
      <pane id="Scope" />
      <pane id="ProjectPane">
        <subPane>
          <PATH>
            <PATH_ELEMENT>
              <option name="myItemId" value="CourseBrowser" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
            </PATH_ELEMENT>
          </PATH>
          <PATH>
            <PATH_ELEMENT>
              <option name="myItemId" value="CourseBrowser" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="CourseBrowser" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
            </PATH_ELEMENT>
          </PATH>
          <PATH>
            <PATH_ELEMENT>
              <option name="myItemId" value="CourseBrowser" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="CourseBrowser" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="src" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="shared" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
            </PATH_ELEMENT>
          </PATH>
          <PATH>
            <PATH_ELEMENT>
              <option name="myItemId" value="CourseBrowser" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="CourseBrowser" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="src" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="schedulemaker" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
            </PATH_ELEMENT>
          </PATH>
          <PATH>
            <PATH_ELEMENT>
              <option name="myItemId" value="CourseBrowser" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="CourseBrowser" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="src" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="coursebrowser" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
            </PATH_ELEMENT>
          </PATH>
        </subPane>
      </pane>
      <pane id="PackagesPane" />
    </panes>
  </component>
  <component name="PropertiesComponent">
    <property name="GoToFile.includeJavaFiles" value="false" />
    <property name="AndroidIncludeSystemProguardFile" value="true" />
    <property name="options.splitter.main.proportions" value="0.3" />
    <property name="AndroidProguardConfigPath" value="$PROJECT_DIR$/proguard-project.txt" />
    <property name="ExportedApkPath" value="$PROJECT_DIR$/CourseBrowser.apk" />
    <property name="options.lastSelected" value="preferences.sourceCode.General" />
    <property name="MemberChooser.sorted" value="false" />
    <property name="recentsLimit" value="5" />
    <property name="ExportedModule" value="CourseBrowser" />
    <property name="AndroidLayoutSelectedEditor" value="text-editor" />
    <property name="MemberChooser.copyJavadoc" value="false" />
    <property name="GoToClass.toSaveIncludeLibraries" value="false" />
    <property name="AndroidRunProguardForReleaseBuild" value="true" />
    <property name="FullScreen" value="false" />
    <property name="MemberChooser.showClasses" value="true" />
    <property name="GoToClass.includeLibraries" value="false" />
    <property name="options.splitter.details.proportions" value="0.2" />
    <property name="options.searchVisible" value="true" />
  </component>
  <component name="RunManager" selected="Android Application.CourseBrowser">
    <configuration default="true" type="#org.jetbrains.idea.devkit.run.PluginConfigurationType" factoryName="Plugin">
      <module name="" />
      <option name="VM_PARAMETERS" value="-Xmx512m -Xms256m -XX:MaxPermSize=250m" />
      <option name="PROGRAM_PARAMETERS" />
      <method />
    </configuration>
    <configuration default="true" type="AndroidTestRunConfigurationType" factoryName="Android Tests">
      <module name="" />
      <option name="TESTING_TYPE" value="0" />
      <option name="INSTRUMENTATION_RUNNER_CLASS" value="" />
      <option name="METHOD_NAME" value="" />
      <option name="CLASS_NAME" value="" />
      <option name="PACKAGE_NAME" value="" />
      <option name="TARGET_SELECTION_MODE" value="EMULATOR" />
      <option name="PREFERRED_AVD" value="" />
      <option name="COMMAND_LINE" value="" />
      <option name="WIPE_USER_DATA" value="false" />
      <option name="DISABLE_BOOT_ANIMATION" value="false" />
      <option name="NETWORK_SPEED" value="full" />
      <option name="NETWORK_LATENCY" value="none" />
      <option name="CLEAR_LOGCAT" value="false" />
      <method />
    </configuration>
    <configuration default="true" type="Remote" factoryName="Remote">
      <option name="USE_SOCKET_TRANSPORT" value="true" />
      <option name="SERVER_MODE" value="false" />
      <option name="SHMEM_ADDRESS" value="javadebug" />
      <option name="HOST" value="localhost" />
      <option name="PORT" value="5005" />
      <method />
    </configuration>
    <configuration default="true" type="Applet" factoryName="Applet">
      <module name="" />
      <option name="MAIN_CLASS_NAME" />
      <option name="HTML_FILE_NAME" />
      <option name="HTML_USED" value="false" />
      <option name="WIDTH" value="400" />
      <option name="HEIGHT" value="300" />
      <option name="POLICY_FILE" value="$APPLICATION_HOME_DIR$/bin/appletviewer.policy" />
      <option name="VM_PARAMETERS" />
      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
      <option name="ALTERNATIVE_JRE_PATH" />
      <method />
    </configuration>
    <configuration default="true" type="TestNG" factoryName="TestNG">
      <module name="" />
      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
      <option name="ALTERNATIVE_JRE_PATH" />
      <option name="SUITE_NAME" />
      <option name="PACKAGE_NAME" />
      <option name="MAIN_CLASS_NAME" />
      <option name="METHOD_NAME" />
      <option name="GROUP_NAME" />
      <option name="TEST_OBJECT" value="CLASS" />
      <option name="VM_PARAMETERS" value="-ea" />
      <option name="PARAMETERS" />
      <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
      <option name="OUTPUT_DIRECTORY" />
      <option name="ANNOTATION_TYPE" />
      <option name="ENV_VARIABLES" />
      <option name="PASS_PARENT_ENVS" value="true" />
      <option name="TEST_SEARCH_SCOPE">
        <value defaultName="moduleWithDependencies" />
      </option>
      <option name="USE_DEFAULT_REPORTERS" value="false" />
      <option name="PROPERTIES_FILE" />
      <envs />
      <properties />
      <listeners />
      <method />
    </configuration>
    <configuration default="true" type="Application" factoryName="Application">
      <option name="MAIN_CLASS_NAME" />
      <option name="VM_PARAMETERS" />
      <option name="PROGRAM_PARAMETERS" />
      <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
      <option name="ALTERNATIVE_JRE_PATH" />
      <option name="ENABLE_SWING_INSPECTOR" value="false" />
      <option name="ENV_VARIABLES" />
      <option name="PASS_PARENT_ENVS" value="true" />
      <module name="" />
      <envs />
      <method />
    </configuration>
    <configuration default="true" type="JUnit" factoryName="JUnit">
      <module name="" />
      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
      <option name="ALTERNATIVE_JRE_PATH" />
      <option name="PACKAGE_NAME" />
      <option name="MAIN_CLASS_NAME" />
      <option name="METHOD_NAME" />
      <option name="TEST_OBJECT" value="class" />
      <option name="VM_PARAMETERS" value="-ea" />
      <option name="PARAMETERS" />
      <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
      <option name="ENV_VARIABLES" />
      <option name="PASS_PARENT_ENVS" value="true" />
      <option name="TEST_SEARCH_SCOPE">
        <value defaultName="moduleWithDependencies" />
      </option>
      <envs />
      <patterns />
      <method />
    </configuration>
    <configuration default="true" type="AndroidRunConfigurationType" factoryName="Android Application">
      <module name="" />
      <option name="ACTIVITY_CLASS" value="" />
      <option name="MODE" value="default_activity" />
      <option name="DEPLOY" value="true" />
      <option name="TARGET_SELECTION_MODE" value="EMULATOR" />
      <option name="PREFERRED_AVD" value="" />
      <option name="COMMAND_LINE" value="" />
      <option name="WIPE_USER_DATA" value="false" />
      <option name="DISABLE_BOOT_ANIMATION" value="false" />
      <option name="NETWORK_SPEED" value="full" />
      <option name="NETWORK_LATENCY" value="none" />
      <option name="CLEAR_LOGCAT" value="false" />
      <method />
    </configuration>
    <configuration default="false" name="CourseBrowser" type="AndroidRunConfigurationType" factoryName="Android Application">
      <module name="CourseBrowser" />
      <option name="ACTIVITY_CLASS" value="" />
      <option name="MODE" value="default_activity" />
      <option name="DEPLOY" value="true" />
      <option name="TARGET_SELECTION_MODE" value="EMULATOR" />
      <option name="PREFERRED_AVD" value="" />
      <option name="COMMAND_LINE" value="" />
      <option name="WIPE_USER_DATA" value="false" />
      <option name="DISABLE_BOOT_ANIMATION" value="false" />
      <option name="NETWORK_SPEED" value="full" />
      <option name="NETWORK_LATENCY" value="none" />
      <option name="CLEAR_LOGCAT" value="false" />
      <RunnerSettings RunnerId="AndroidDebugRunner" />
      <ConfigurationWrapper RunnerId="AndroidDebugRunner" />
      <method />
    </configuration>
    <list size="1">
      <item index="0" class="java.lang.String" itemvalue="Android Application.CourseBrowser" />
    </list>
    <configuration name="<template>" type="WebApp" default="true" selected="false">
      <Host>localhost</Host>
      <Port>5050</Port>
    </configuration>
  </component>
  <component name="ShelveChangesManager" show_recycled="false" />
  <component name="SvnConfiguration" maxAnnotateRevisions="500" myUseAcceleration="nothing" myAutoUpdateAfterCommit="false" cleanupOnStartRun="false">
    <option name="USER" value="" />
    <option name="PASSWORD" value="" />
    <option name="mySSHConnectionTimeout" value="30000" />
    <option name="mySSHReadTimeout" value="30000" />
    <option name="LAST_MERGED_REVISION" />
    <option name="MERGE_DRY_RUN" value="false" />
    <option name="MERGE_DIFF_USE_ANCESTRY" value="true" />
    <option name="UPDATE_LOCK_ON_DEMAND" value="false" />
    <option name="IGNORE_SPACES_IN_MERGE" value="false" />
    <option name="DETECT_NESTED_COPIES" value="true" />
    <option name="CHECK_NESTED_FOR_QUICK_MERGE" value="false" />
    <option name="IGNORE_SPACES_IN_ANNOTATE" value="true" />
    <option name="SHOW_MERGE_SOURCES_IN_ANNOTATE" value="true" />
    <option name="FORCE_UPDATE" value="false" />
    <option name="IGNORE_EXTERNALS" value="false" />
    <configuration useDefault="false">$USER_HOME$/.subversion</configuration>
    <myIsUseDefaultProxy>false</myIsUseDefaultProxy>
  </component>
  <component name="TaskManager">
    <task active="true" id="Default" summary="Default task">
      <changelist id="e0010dad-d30f-4c31-8ef6-57ba1d32270d" name="Default" comment="" />
      <created>1357310598816</created>
      <updated>1357310598816</updated>
    </task>
    <servers />
  </component>
  <component name="ToolWindowManager">
    <frame x="4" y="22" width="1436" height="878" extended-state="6" />
    <editor active="true" />
    <layout>
      <window_info id="Changes" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
      <window_info id="JetGradle" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
      <window_info id="Palette" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
      <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
      <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
      <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
      <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
      <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
      <window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32820514" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
      <window_info id="Android" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32893157" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
      <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
      <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="true" content_ui="tabs" />
      <window_info id="Maven Projects" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
      <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="SLIDING" type="SLIDING" visible="false" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
      <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.24964029" sideWeight="0.6717949" order="0" side_tool="false" content_ui="combo" />
      <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.3283582" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
      <window_info id="Palette	" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32998565" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
      <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
      <window_info id="Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32998565" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
      <window_info id="Preview" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32998565" sideWeight="0.6708229" order="3" side_tool="false" content_ui="tabs" />
      <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
      <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.329602" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
      <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
      <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
    </layout>
  </component>
  <component name="VcsContentAnnotationSettings">
    <option name="myLimit" value="2678400000" />
  </component>
  <component name="VcsManagerConfiguration">
    <option name="OFFER_MOVE_TO_ANOTHER_CHANGELIST_ON_PARTIAL_COMMIT" value="true" />
    <option name="CHECK_CODE_SMELLS_BEFORE_PROJECT_COMMIT" value="true" />
    <option name="CHECK_NEW_TODO" value="true" />
    <option name="myTodoPanelSettings">
      <value>
        <are-packages-shown value="false" />
        <are-modules-shown value="false" />
        <flatten-packages value="false" />
        <is-autoscroll-to-source value="false" />
      </value>
    </option>
    <option name="PERFORM_UPDATE_IN_BACKGROUND" value="true" />
    <option name="PERFORM_COMMIT_IN_BACKGROUND" value="true" />
    <option name="PERFORM_EDIT_IN_BACKGROUND" value="true" />
    <option name="PERFORM_CHECKOUT_IN_BACKGROUND" value="true" />
    <option name="PERFORM_ADD_REMOVE_IN_BACKGROUND" value="true" />
    <option name="PERFORM_ROLLBACK_IN_BACKGROUND" value="false" />
    <option name="CHECK_LOCALLY_CHANGED_CONFLICTS_IN_BACKGROUND" value="false" />
    <option name="CHANGED_ON_SERVER_INTERVAL" value="60" />
    <option name="SHOW_ONLY_CHANGED_IN_SELECTION_DIFF" value="true" />
    <option name="CHECK_COMMIT_MESSAGE_SPELLING" value="true" />
    <option name="DEFAULT_PATCH_EXTENSION" value="patch" />
    <option name="SHORT_DIFF_HORISONTALLY" value="true" />
    <option name="SHORT_DIFF_EXTRA_LINES" value="2" />
    <option name="SOFT_WRAPS_IN_SHORT_DIFF" value="true" />
    <option name="INCLUDE_TEXT_INTO_PATCH" value="false" />
    <option name="INCLUDE_TEXT_INTO_SHELF" value="false" />
    <option name="SHOW_FILE_HISTORY_DETAILS" value="true" />
    <option name="SHOW_VCS_ERROR_NOTIFICATIONS" value="true" />
    <option name="SHOW_DIRTY_RECURSIVELY" value="false" />
    <option name="LIMIT_HISTORY" value="true" />
    <option name="MAXIMUM_HISTORY_ROWS" value="1000" />
    <option name="FORCE_NON_EMPTY_COMMENT" value="false" />
    <option name="CLEAR_INITIAL_COMMIT_MESSAGE" value="false" />
    <option name="LAST_COMMIT_MESSAGE" />
    <option name="MAKE_NEW_CHANGELIST_ACTIVE" value="false" />
    <option name="OPTIMIZE_IMPORTS_BEFORE_PROJECT_COMMIT" value="false" />
    <option name="CHECK_FILES_UP_TO_DATE_BEFORE_COMMIT" value="false" />
    <option name="REFORMAT_BEFORE_PROJECT_COMMIT" value="false" />
    <option name="REFORMAT_BEFORE_FILE_COMMIT" value="false" />
    <option name="FILE_HISTORY_DIALOG_COMMENTS_SPLITTER_PROPORTION" value="0.8" />
    <option name="FILE_HISTORY_DIALOG_SPLITTER_PROPORTION" value="0.5" />
    <option name="ACTIVE_VCS_NAME" />
    <option name="UPDATE_GROUP_BY_PACKAGES" value="false" />
    <option name="UPDATE_GROUP_BY_CHANGELIST" value="false" />
    <option name="SHOW_FILE_HISTORY_AS_TREE" value="false" />
    <option name="FILE_HISTORY_SPLITTER_PROPORTION" value="0.6" />
  </component>
  <component name="XDebuggerManager">
    <breakpoint-manager />
  </component>
  <component name="antWorkspaceConfiguration">
    <option name="IS_AUTOSCROLL_TO_SOURCE" value="false" />
    <option name="FILTER_TARGETS" value="false" />
  </component>
  <component name="editorHistoryManager">
    <entry file="file://$PROJECT_DIR$/res/layout/activity_course_browser.xml">
      <provider editor-type-id="android-designer">
        <state />
      </provider>
      <provider selected="true" editor-type-id="text-editor">
        <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0" />
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/res/menu/activity_course_browser.xml">
      <provider selected="true" editor-type-id="text-editor">
        <state line="20" column="42" selection-start="1620" selection-end="1620" vertical-scroll-proportion="0.63559324" />
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/res/layout/activity_about.xml">
      <provider editor-type-id="android-designer">
        <state />
      </provider>
      <provider selected="true" editor-type-id="text-editor">
        <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0" />
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/README">
      <provider selected="true" editor-type-id="text-editor">
        <state line="6" column="0" selection-start="200" selection-end="280" vertical-scroll-proportion="0.0" />
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/edu/csh/coursebrowser/SectionInfoActivity.java">
      <provider selected="true" editor-type-id="text-editor">
        <state line="42" column="0" selection-start="2194" selection-end="2194" vertical-scroll-proportion="0.030120483">
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/edu/csh/coursebrowser/SettingsActivity.java">
      <provider selected="true" editor-type-id="text-editor">
        <state line="95" column="63" selection-start="4888" selection-end="4888" vertical-scroll-proportion="0.030120483">
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/shared/AlertError.java">
      <provider selected="true" editor-type-id="text-editor">
        <state line="27" column="5" selection-start="1681" selection-end="1681" vertical-scroll-proportion="0.0">
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/shared/Department.java">
      <provider selected="true" editor-type-id="text-editor">
        <state line="23" column="13" selection-start="1540" selection-end="1540" vertical-scroll-proportion="0.0">
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/edu/csh/coursebrowser/AboutActivity.java">
      <provider selected="true" editor-type-id="text-editor">
        <state line="37" column="45" selection-start="0" selection-end="9321" vertical-scroll-proportion="0.0">
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/edu/csh/coursebrowser/SchoolActivity.java">
      <provider selected="true" editor-type-id="text-editor">
        <state line="201" column="6" selection-start="9139" selection-end="9139" vertical-scroll-proportion="0.0">
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/shared/Time.java">
      <provider selected="true" editor-type-id="text-editor">
        <state line="24" column="38" selection-start="1749" selection-end="1749" vertical-scroll-proportion="0.46966732">
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/shared/School.java">
      <provider selected="true" editor-type-id="text-editor">
        <state line="23" column="13" selection-start="1536" selection-end="1536" vertical-scroll-proportion="0.0">
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/shared/Section.java">
      <provider selected="true" editor-type-id="text-editor">
        <state line="56" column="30" selection-start="3049" selection-end="3049" vertical-scroll-proportion="0.5890411">
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/shared/Course.java">
      <provider selected="true" editor-type-id="text-editor">
        <state line="31" column="56" selection-start="1852" selection-end="1852" vertical-scroll-proportion="0.0">
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/schedulemaker/SharedSchedule.java">
      <provider selected="true" editor-type-id="text-editor">
        <state line="20" column="59" selection-start="432" selection-end="432" vertical-scroll-proportion="0.0">
          <folding>
            <element signature="imports" expanded="true" />
          </folding>
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/AndroidManifest.xml">
      <provider selected="true" editor-type-id="text-editor">
        <state line="12" column="32" selection-start="1425" selection-end="1425" vertical-scroll-proportion="0.2435724">
          <folding />
        </state>
      </provider>
    </entry>
  </component>
  <component name="masterDetails">
    <states>
      <state key="Copyright.UI">
        <settings>
          <last-edited>MIT</last-edited>
          <splitter-proportions>
            <option name="proportions">
              <list>
                <option value="0.2" />
              </list>
            </option>
          </splitter-proportions>
        </settings>
      </state>
      <state key="ProjectJDKs.UI">
        <settings>
          <last-edited>1.6</last-edited>
          <splitter-proportions>
            <option name="proportions">
              <list>
                <option value="0.2" />
              </list>
            </option>
          </splitter-proportions>
        </settings>
      </state>
    </states>
  </component>
</project>


text:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>ee.ellytr.practice</groupId>
    <artifactId>Practice</artifactId>
    <version>1.0-SNAPSHOT</version>
    <description>A minigame involving a mob arena and currency.</description>

    <properties>
        <plugin.name>Practice</plugin.name>
        <plugin.mainClass>ee.ellytr.practice.Practice</plugin.mainClass>
        <plugin.prefix>Practice</plugin.prefix>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <repositories>
        <repository>
            <id>overcast-repo</id>
            <url>https://repo.oc.tc/content/groups/public/</url>
        </repository>
    </repositories>

    <dependencies>
        <dependency>
            <groupId>tc.oc</groupId>
            <artifactId>sportbukkit-api</artifactId>
            <version>1.8-R0.1-SNAPSHOT</version>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.2</version>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>2.5</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <version>2.2</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                        <configuration>
                            <artifactSet>
                                <includes>
                                </includes>
                            </artifactSet>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

        </plugins>
        <resources>
            <resource>
                <filtering>true</filtering>
                <directory>src/main/resources</directory>
            </resource>
        </resources>
    </build>

</project>

redpajama_set_name: RedPajamaGithub


text:
layout: post
title:  "So how many do you have weeks left?"
date:   2016-05-29 04:10:00 -0700
categories: general
published: true
comments: true
---
go and check [Life in weeks][liw]

(thanks to [NathanielWroblewski][NW])

![scr]({{ site_url }}/photo/life-in-weeks-demo.png)

[liw]: {{ site_url }}/life-in-weeks/
[NW]: https://github.com/NathanielWroblewski/life-in-weeks


text:
package com.macro.mall.model;

import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Date;

public class UmsResource implements Serializable {
    private Long id;

    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    @ApiModelProperty(value = "资源名称")
    private String name;

    @ApiModelProperty(value = "资源URL")
    private String url;

    @ApiModelProperty(value = "描述")
    private String description;

    @ApiModelProperty(value = "资源分类ID")
    private Long categoryId;

    private static final long serialVersionUID = 1L;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public Long getCategoryId() {
        return categoryId;
    }

    public void setCategoryId(Long categoryId) {
        this.categoryId = categoryId;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", createTime=").append(createTime);
        sb.append(", name=").append(name);
        sb.append(", url=").append(url);
        sb.append(", description=").append(description);
        sb.append(", categoryId=").append(categoryId);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}


text:
'use strict';

/**
* Remove the first character(s) of a string.
*
* @module @stdlib/string/remove-first
*
* @example
* var removeFirst = require( '@stdlib/string/remove-first' );
*
* var out = removeFirst( 'last man standing' );
* // returns 'ast man standing'
*
* out = removeFirst( 'Hidden Treasures' );
* // returns 'idden Treasures';
*
* out = removeFirst( '🐮🐷🐸🐵', 2 );
* // returns '🐸🐵
*/

// MODULES //

var main = require( './main.js' );

// EXPORTS //

module.exports = main;


text:
try:
    from setuptools import setup
except ImportError:
    from distutils.core import setup

import subprocess

pandoc = subprocess.Popen(["pandoc", "-t", "rst", "README.md"],
    stdout=subprocess.PIPE, stderr=subprocess.PIPE)
long_description, _ = pandoc.communicate()

setup(
    name="cronex",
    version="0.1.3.1",
    description=("This module provides an easy to use interface for cron-like"
                 " task scheduling."),
    author="Eric Pruitt",
    author_email="eric.pruitt@gmail.com",
    url="https://github.com/ericpruitt/cronex",
    license="MIT",
    keywords=["cron", "scheduler", "triggers", "time", "quartz"],
    packages=["cronex"],
    long_description=long_description.decode("utf-8"),
    classifiers=[
        "License :: OSI Approved :: MIT License",
        "Operating System :: POSIX",
        "Programming Language :: Python :: 2",
        "Programming Language :: Python :: 2.4",
        "Programming Language :: Python :: 2.5",
        "Programming Language :: Python :: 2.6",
        "Programming Language :: Python :: 2.7",
        "Programming Language :: Python :: 3",
    ],
)


text:
var EmartMO = EmartMO || {};
EmartMO.util = EmartMO.util || {};
EmartMO.Event = EmartMO.Event || {};
EmartMO.view = EmartMO.view || {};
EmartMO.util = {
    getUrlVars: function() {
        var vars = [],
            hash;
        var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
        for (var i = 0; i < hashes.length; i++) {
            hash = hashes[i].split('=');
            vars.push(hash[0]);
            vars[hash[0]] = hash[1];
        }
        return vars;
    },
    getUrlVar: function(name) {
        return EmartMO.util.getUrlVars()[name];
    },
	wait: function (e) {
        var t = $.Deferred();
        setTimeout(t.resolve, e);
        return t.promise();
    }
};

EmartMO.Event.emitter = {
    subscribers: {},
    on: function (e, t, n) {
        this.subscribers[e] = this.subscribers[e] || [];
        this.subscribers[e].push({
            callback: t,
            context: n
        });
    },
    off: function (e, t, n) {
        var r, i = this.subscribers[e],
            s;
        if (i) {
            r = i.length - 1;
            while (r >= 0) {
                s = i[r];
                if (s.callback === t && (!n || s.context === n)) {
                    i.splice(r, 1);
                    break;
                }
                r--;
            }
        }
    },
    emit: function (e) {
        var t = this.subscribers[e],
            n = 0,
            r = Array.prototype.slice.call(arguments, 1),
            i;
        if (t) {
            while (n < t.length) {
                i = t[n];
                i.callback.apply(i.context || this, r);
                n++;
            }
        }
    }
};

EmartMO.view.global = function() {
    this.init();
};
EmartMO.view.global.prototype = {
    htSize: jindo.$Document().clientSize(),
    oReveal: null,
    oScrollNav: null,
    oScrollNavHeight: null,
    nDelay: jindo.m.getDeviceInfo().android ? 0 : 0,
    oScroll: null,
	oLoading : null,
	oScrollPopup: null,
	dDatapicker : null,
	dRangepicker1 : null,
	dRangepicker2 : null,
	sDevice : jindo.m.getDeviceInfo().ipad || jindo.m.getDeviceInfo().galaxyTab || jindo.m.getDeviceInfo().galaxyTab2 ? 650 : 45,
	nGap : 100,
    htOtherFlick: {
        header: function(){
			if ($(".jmc-header").length > 0 ) {
				return jindo.$Element(jindo.$$.getSingle(".jmc-header")).height()
			} else {
				return false
			}
		},
        footer: function(){
			if ($(".jmc-footer").length > 0 ) {
				return jindo.$Element(jindo.$$.getSingle(".jmc-footer")).height()
			} else {
				return false
			}
		}
    },
    init: function() {
        console.log('■ import Global');
        this._assignElements();
        this._attachEventHandlers();
        this._setJindoReveal();
		this._initLoading();
		this._setSearchMenu();
		this._setFooterLinkMenu();
		this._setTextInput();
		this._setDialog();
		this._setDatepicker();
		this._setRangepicker1();
		this._setRangepicker2();
		//this._setMainGnb();
        this.ready();
    },
    _assignElements: function() {
        this.welDoc = $(document.body);
        this.welHeader = $('.reveal-header');
    },
    _attachEventHandlers: function() {
        this.welDoc.on('click', 'a[href="#"]', $.proxy(this._onClickEventPrevent, this));
		// disable
        this.welDoc.on('click', '._revealToggle', $.proxy(this._toggleReveal, this));
		this.welDoc.on('click', '.nav-mask', $.proxy(this._toggleReveal, this));
        this.welDoc.on('click', '.reveal_dim', $.proxy(this._toggleReveal, this));

		this.welDoc.on('click', '.rs-nav .menu li', $.proxy(this._onClickNavMenu, this));

		this.welDoc.on('click', '._imgGallery', $.proxy(this._onClickGallery, this));
		this.welDoc.on('click', '#_btnSearch', $.proxy(this._onClickSearchMenu, this));
		this.welDoc.on('click', '#_btnLink', $.proxy(this._onClickFooterLinkMenu, this));
		this.welDoc.on('click', '._popupClose', $.proxy(this.offPopupScroll, this));
		//this.welDoc.on('click', '._gnb li', $.proxy(this._onClickGnb, this));
		this.welDoc.on('click', '._gnb li', $.proxy(this._onClickGnb, this));

		this.welDoc.on('click', '#accordion_panel dt', $.proxy(this._onClickAccordion, this));

		this.welDoc.on('click', '#_accordion li .btn-toggle', $.proxy(this._onClickAccordionList, this));
		//inputPosition
		this.welDoc.on('focus', '#inputPosition input', $.proxy(this._onFocusInputPosition, this));
		this.welDoc.on('blur', '#inputPosition input', $.proxy(this._onBlurInputPosition, this));
		//품질불량 이미지 삭제
		//this.welDoc.on('click', '._imgList li .del-img', $.proxy(this._onClickClaimDelIgm, this));

		//폰트 사이즈 변경
		this.welDoc.on('click', '._changeFont ._fontsizeplus', $.proxy(this._onClickFontPlus, this));
		this.welDoc.on('click', '._changeFont ._fontsizeminus', $.proxy(this._onClickFontMinus, this));

		//말줄임표
		this.welDoc.on('click', $.proxy(this._onClickRemoveEllipsis, this));
		this.welDoc.on('click', '.func-ellipsis .pro-status', $.proxy(this._onClickEllipsis, this));

    },
	_initLoading : function(){
		this.oLoading = new jindo.m.Loading(null, {
			bActivateOnload : true,
			nWidth : 31,
			nHeight : 31,
			sDefaultForeground : "transparent",
			sDefaultBackground : "transparent",
			sLoadingText : "",
			bUseFoggy : true,
			sFoggyColor : "#000",
			nFoggyOpacity : 0.75
		});
	},
    _toggleReveal: function(event) {
		if ( !$(event.currentTarget).hasClass('disable') && jindo.$Document().clientSize().height >= 400) {
			console.log('%c Alert : 사이드 메뉴 설정 완료', "color: #00f;");
			this.oReveal.toggle();
		}
    },
    _setJindoReveal: function() {
		if(!$('.rs-body').length){ return false; }
		console.log('%c Alert : 메인 가상 스크롤 완료', "color: #00f;");
		console.log(this.sDevice);
        var oThis = this;
		jindo.$Element(jindo.$$.getSingle(".rs-contents")).height(oThis.htSize.height);
		setTimeout(function() {
			if(!$('.jmc_scrolldisable').length){
				oThis.oScroll = new jindo.m.Scroll("contents", {
					bUseHScroll: false,
					bUseVScroll: true,
					bUseBounce : false,
					nHeight: oThis.htSize.height - oThis.htOtherFlick.header() - oThis.htOtherFlick.footer()
				});
				//console.log(oThis.htSize.height)
				//console.log(oThis.htOtherFlick.header)
				//console.log(oThis.htOtherFlick.footer)
			}

			oThis.oReveal = new jindo.m.SlideReveal({
					"sClassPrefix": "rs-",
					"nDuration": 300,
					"nMargin": oThis.sDevice,
					"sDirection": "left"
				})
			.attach({
				"beforeShow": function() {
					jindo.$Element(jindo.$$.getSingle(".rs-nav")).show();
					if (!oThis.oScrollNav) {
						oThis.oScrollNavHeight = parseInt(jindo.$Element(jindo.$$.getSingle(".nav_title")).height());
						oThis.oScrollNav = new jindo.m.Scroll("celeblist_scroll", {
							bUseHScroll: false,
							bUseVScroll: true,
							bUseBounce : false,
							nHeight: oThis.htSize.height - oThis.oScrollNavHeight
						});
						oThis._onScrollMenu();
					}

				},
				"show": function() {
					var nBottom = oThis.htSize.height - oThis.oScrollNavHeight -$('.menu-tree').last().height();
					$('.menu-tree-wrap').css('padding-bottom', nBottom);

					// 화면에 보여지고 난 이후 wraper 영역 (overflow:hidden) 처리를 위한 높이값 재정의 필요.
					if (oThis.oScrollNav) {
						oThis.oScrollNav.height(oThis.htSize.height - oThis.oScrollNavHeight);
					}
					if( !$('.nav-mask').length ){
						$('.rs-body').append('

');
					}
					console.log('%c Alert : 페이지 활성화 스크롤', "color: #00f;");

					//전역함수
					//nativeBackBtnCloseAllMenu();//개발 적용하면 안됨
					//var nIdx = getPageDepth();//개발 적용하면 안됨
					var nIdx = 3; //테스트용
					oThis.goNavScroll(nIdx);

				},
				"beforeHide": function() {
					var mask = $('.nav-mask');
					if( mask.length ){
						mask.remove();
					}
				},
				"hide": function(oCustomEvent) {
					//touchAllMenu();//개발 적용하면 안됨
				},
				"rotate": function() {
					//if (oThis.oScroll) {
					//	oThis.oScroll.height(jindo.$Document().clientSize().height - oThis.htOtherFlick.header() - oThis.htOtherFlick.footer());
					//	$('.rs-contents').height(jindo.$Document().clientSize().height);
					//}
				}
			});
		}, this.nDelay);

		// 아이폰 rotate 이벤트 발생 안함 : resize이벤트로 대체 : 대체후 refresh() 이벤트 필요함
		$(window).on('resize', function(){

			//메뉴 나왔을경우 회전시 닫힘
			oThis.oReveal.hide();

			if (oEmartMO.oScroll) {
				oEmartMO.oScroll.height(jindo.$Document().clientSize().height - oEmartMO.htOtherFlick.header() - oEmartMO.htOtherFlick.footer());
				$('.rs-contents').height(jindo.$Document().clientSize().height);
			}
			if (oEmartMO.oScrollPopup) {
				oEmartMO.oScrollPopup.height(jindo.$Document().clientSize().height - $('._PopupGlobal ._popupHeader').outerHeight(true) - $('._PopupGlobal ._popupFooter').outerHeight(true));
			}
		})
    },

	_setSearchMenu : function(){
		if(!$('#_searchMenu').length){ return false; }
		this.oSearchMenu = new jindo.m.LayerManager("_searchMenu").link("_searchMenu", "_btnSearch")
			.attach("beforeShow", function(we) {
				console.log(we.sType );
			})
			.attach("show", function(we) {
				console.log(we.sType );
			})
			.attach("beforeHide", function(we) {
				console.log(we.sType );
			})
			.attach("hide", function(we) {
				console.log(we.sType );
			})
			.attach("ignore", function(we) {
				console.log(we.sType );
			});
	},
	_setFooterLinkMenu : function(){
		if(!$('#_linkMenu').length){ return false; }
		this.oLinkMenu = new jindo.m.LayerManager("_linkMenu").link("_linkMenu", "_btnLink")
			.attach("beforeShow", function(we) {
				console.log(we.sType );
				$('#_btnLink').addClass('on')
			})
			.attach("show", function(we) {
				//console.log(we.sType );
			})
			.attach("beforeHide", function(we) {
				$('#_btnLink').removeClass('on');
				console.log(we.sType );
			})
			.attach("hide", function(we) {
				//console.log(we.sType );
			})
			.attach("ignore", function(we) {
				console.log(we.sType );
			});
	},
	_setTextInput : function(){
		if(!$('#form_base').length){ return false; }
		console.log('%c Alert : 텍스트 인풋 셋팅 완료', "color: #00f;");
		this.oTextInput = new jindo.m.TextInput("form_base");
	},
	_setTextInputPopup : function(){
		if(!$('#form_popup').length){ return false; }
		console.log('%c Alert : 텍스트 인풋 팝업 셋팅 완료', "color: #00f;");
		this.oTextInputPopup = new jindo.m.TextInput("form_popup");
	},
	_setDialog : function(){
		this.oDialog = new jindo.m.Dialog({
			sClassPrefix : "alert-",
			sPosition : "center",
			bUseEffect : false,
			bAutoClose : false,
			bAutoReposition : true,
			nFoggyOpacity : 0.75,
			sFoggyColor : "#000"
		});
	},

	_setDatepicker : function(){
		if(!$('#datepicker').length){ return false }
		console.log('%c Alert : 날자 선택창 셋팅완료', "color: #00f;");
		this.oDate = new Date();
		this.oDatepicker = new jindo.m.Datepicker(null,{bUseEffect : true});

		var oInput = this.oDatepicker;
		var sInputName = 'datepicker';
		var sBtnName = 'datepicker_btn';

		oInput.addDatePickerSet(sInputName,{
		    elButton : jindo.$(sBtnName),
			sPosition: "bottomLeft"
		});
		var oThis = this;
		oInput.attach({
			"beforeShowCalendar" : function(){
				//console.log("달력 beforeShowCalendar 이벤트");
				var oClientSize = jindo.$Document(document).clientSize();
				var oElementOffset = jindo.$Element(sInputName).offset();
				var nCalandarHeight = 310;
				//console.log(oClientSize.height);
				//console.log(oElementOffset.top);
				if (oClientSize.height - oElementOffset.top < nCalandarHeight+30 && jindo.$Document().clientSize().height >= 400){
					oThis.oDatepicker.setPosition(sInputName,'topLeft');
					var nTop = nCalandarHeight - oElementOffset.top;
					var nScrollPos = oThis.oScroll._nTop;
					var nSetPos = nScrollPos + nTop;
					//console.log(nTop);
					//console.log(nScrollPos);
					//console.log("nSetPos : " + nSetPos);
					oThis.oScroll.scrollTo(0,nSetPos, 500 )
				} else {
					oThis.oDatepicker.setPosition(sInputName,'bottomLeft')
				}
			},
			"selectDate" : function(we){
				console.log(we.oSelectDate);
				console.log("["+we.oSelectDate.nYear+"-"+we.oSelectDate.nMonth+"-"+we.oSelectDate.nDate+"]날짜 선택 selectDate 이벤트 발생.");
				oThis.dDatapicker = we.oSelectDate;
			}
		});
	},
	_setDatepicker2 : function(){
		if(!$('#datepicker').length){ return false }
		console.log('%c Alert : 날자 선택창 셋팅완료', "color: #00f;");
		this.oDate = new Date();
		this.oDatepicker2 = new jindo.m.Datepicker(null,{bUseEffect : true});

		var oInput = this.oDatepicker2;
		var sInputName = 'datepicker2';
		var sBtnName = 'datepicker_btn2';

		oInput.addDatePickerSet(sInputName,{
			elButton : jindo.$(sBtnName),
			sPosition: "bottomLeft"
		});
		var oThis = this;
		oInput.attach({
			"beforeShowCalendar" : function(){
				//console.log("달력 beforeShowCalendar 이벤트");
				var oClientSize = jindo.$Document(document).clientSize();
				var oElementOffset = jindo.$Element(sInputName).offset();
				var nCalandarHeight = 310;
				//console.log(oClientSize.height);
				//console.log(oElementOffset.top);
				if (oClientSize.height - oElementOffset.top < nCalandarHeight+30 && jindo.$Document().clientSize().height >= 400){
					oThis.oDatepicker2.setPosition(sInputName,'topLeft');
					var nTop = nCalandarHeight - oElementOffset.top;
					var nScrollPos = oThis.oScroll._nTop;
					var nSetPos = nScrollPos + nTop;
					//console.log(nTop);
					//console.log(nScrollPos);
					//console.log("nSetPos : " + nSetPos);
					oThis.oScroll.scrollTo(0,nSetPos, 500 )
				} else {
					oThis.oDatepicker2.setPosition(sInputName,'bottomLeft')
				}
			},
			"selectDate" : function(we){
				console.log(we.oSelectDate);
				console.log("["+we.oSelectDate.nYear+"-"+we.oSelectDate.nMonth+"-"+we.oSelectDate.nDate+"]날짜 선택 selectDate 이벤트 발생.");
				oThis.dDatapicker = we.oSelectDate;
			}
		});
	},

	_setRangepicker1 : function(){
		if(!$('#rangepicker1').length){ return false }
		console.log('%c Alert : 범위 날짜 앞 셋팅완료', "color: #00f;");
		this.oDate = new Date();
		this.oRangepicker1 = new jindo.m.Datepicker(null,{bUseEffect : true});

		var oInput = this.oRangepicker1;
		var sInputName = 'rangepicker1';
		var sBtnName = 'rangepicker_btn1';

		oInput.addDatePickerSet(sInputName,{
		    elButton : jindo.$(sBtnName),
			sPosition: "bottomLeft"
		});
		var oThis = this;
		oInput.attach({
			"beforeShowCalendar" : function(){
				var oClientSize = jindo.$Document(document).clientSize();
				var oElementOffset = jindo.$Element(sInputName).offset();
				if (oClientSize.height -oElementOffset.top < 350  ){
					oThis.oRangepicker1.setPosition(sInputName,'topLeft')
				} else {
					oThis.oRangepicker1.setPosition(sInputName,'bottomLeft')
				}
			},
			"selectDate" : function(we){
				console.log(we.oSelectDate);
				console.log("["+we.oSelectDate.nYear+"-"+we.oSelectDate.nMonth+"-"+we.oSelectDate.nDate+"]날짜 선택 selectDate 이벤트 발생.");
				oThis.dRangepicker1 = we.oSelectDate;
			}
		});
	},

	_setRangepicker2 : function(){
		if(!$('#rangepicker2').length){ return false }
		console.log('%c Alert : 범위 날짜 뒤 셋팅완료', "color: #00f;");
		this.oDate = new Date();
		this.oRangepicker2 = new jindo.m.Datepicker(null,{bUseEffect : true});

		var oInput = this.oRangepicker2;
		var sInputName = 'rangepicker2';
		var sBtnName = 'rangepicker_btn2';

		oInput.addDatePickerSet(sInputName,{
		    elButton : jindo.$(sBtnName),
			sPosition: "bottomLeft"
		});
		var oThis = this;
		oInput.attach({
			"beforeShowCalendar" : function(){
				var oClientSize = jindo.$Document(document).clientSize();
				var oElementOffset = jindo.$Element(sInputName).offset();
				if (oClientSize.height -oElementOffset.top < 350  ){
					oThis.oRangepicker2.setPosition(sInputName,'topLeft')
				} else {
					oThis.oRangepicker2.setPosition(sInputName,'bottomLeft')
				}
			},
			"selectDate" : function(we){
				console.log(we.oSelectDate);
				console.log("["+we.oSelectDate.nYear+"-"+we.oSelectDate.nMonth+"-"+we.oSelectDate.nDate+"]날짜 선택 selectDate 이벤트 발생.");
				oThis.dRangepicker2 = we.oSelectDate;
			}
		});
	},

	_setMainGnb : function(){
		if(!$('._gnb').length){ return false; }
		console.log('%c Alert : 메인 페이지 플립 셋팅 완료', "color: #00f;");
		$("._gnb li").flip();
	},

	_onClickAccordion : function(event){
		var target = $(event.currentTarget);
		this.welDoc.find('#accordion_panel dd').removeClass('show');
		target.next('dd').toggleClass('show');
	},
	_onClickEventPrevent: function(event) {
        event.preventDefault();
    },

	_onClickGallery : function() {
       	$.fancybox.open([
	        {
	            href : 'http://fancyapps.com/fancybox/demo/1_b.jpg',
	            title : '1st title'
	        },
	        {
	            href : 'http://fancyapps.com/fancybox/demo/2_b.jpg',
	            title : '#'
	        },
	        {
	            href : '',
	            title : ''
	        }
	    ], {
	        padding : 0
	    });
    	return false;
    },
	_onClickSearchMenu : function(){
		oEmartMO.oSearchMenu.toggle()
	},

	_onClickFooterLinkMenu : function(){
		this.oLinkMenu.toggle()
	},
	// 전체메뉴 클릭시 이벤트
	_onClickNavMenu : function(event){
		var target = $(event.currentTarget);
		var nIdx = target.index();
		target.addClass('on').siblings().removeClass('on');
		//console.log(this.aMenuOffset[nIdx])
		if ( !target.is('.exit')){
			this.oScrollNav.scrollTo(0,this.aMenuOffset[nIdx], 500);
		}
	},
	goNavScroll : function(nIdx){
		this.oScrollNav.scrollTo(0,this.aMenuOffset[nIdx], 500);
	},
	// 전체메뉴 스크롤시 이벤트
	_onScrollMenu : function(){
		var oThis = this;
		// 각 메뉴 position.top 값을 배열에 설정
		this.aMenuOffset = [];
		this.welDoc.find('.r-tree .menu-tree').each(function(){
			oThis.aMenuOffset.push ( $(this).position().top );
		});
		console.log(oThis.aMenuOffset);

		// 스크롤이 끝난경우 네비게이터 이동
		this.oScrollNav.attach({
			"afterScroll": function(we) {
				var nTop = we.nTop * -1;
				var nSize = oThis.welDoc.find('.r-tree .menu-tree').length +1 ;
				for (i=0; i < nSize; i ++ ){
					if (nTop >= oThis.aMenuOffset[i]){
						//console.log('패스')
					} else {
						//console.log('당첨번호 : ' + i)
						oThis.welDoc.find('.l-depth-mark .menu li').removeClass('on').eq(i-1).addClass('on');
						return false;
					}
				}

			}
		})
	},
	showLoading : function(){
		if (jindo.m.getDeviceInfo().android && jindo.m.getDeviceInfo().version.substring(0,1) == "5" ){
			//앱 로딩바 호출 : 롤리팝 떄문에 네이티브 호출
			window.MobileOffice.showLoadingBar();
			//callNativeLoading();
		} else {
			this.oLoading.show();
		}
	},
	hideLoading : function(){
		if (jindo.m.getDeviceInfo().android && jindo.m.getDeviceInfo().version.substring(0,1) == "5" ){
			//앱 로딩바 비호출 : 롤리팝 떄문에 네이티브 호출
			window.MobileOffice.hideLoadingBar();
			//callNativeLoadingClose();
		} else {
			this.oLoading.hide();
		}

	},
	setPopupScroll : function() {
		if(!$('#_popupScroll').length){
			console.log('%c Alert : setPopupScroll 실패', "color: #f00;");
			return false;
		} else {
			console.log('%c Alert : setPopupScroll 성공', "color: #00f;")
		}
		this.oScrollPopup = new jindo.m.Scroll("_popupScroll", {
			bUseHScroll: false,
			bUseVScroll: true,
			bUseBounce : false,
			bUseTimingFunction : false,
			bAutoResize : true,
			nHeight: this.htSize.height - $('._PopupGlobal ._popupHeader').outerHeight(true) - $('._PopupGlobal ._popupFooter').outerHeight(true) //- $('._PopupGlobal ._popupSearchArea').outerHeight(true)
		});
		//console.log(this.oScrollPopup);
	},

	/* 전체 팝업 페이지 닫기 & 스크롤 제거 */
	offPopupScroll : function() {
		//console.log(this.oScrollPopup)
		oEmartMO.oScrollPopup.detachAll();
		//this.oScrollPopup.destroy();

		//nativeClosePopup();//개발 적용하면 안됨
		if(oEmartMO.oSearchMenu){ oEmartMO.oSearchMenu.hide(); }
		$('._layerFullPopup').remove();

		console.log('%c Alert : setPopupScroll 제거', "color: #00f;")
	},
	/* 최상단으로 스크롤 이동 */
	oScrollToTop : function(){
		console.log(this.oScroll);
		oEmartMO.oScroll.scrollTo(0, 0)
	},
	/* 최하단으로 스크롤 이동 */
	oScrollToBottom : function(){
		oEmartMO.oScroll.scrollTo(0, oEmartMO.oScroll.nScrollH)
	},
	/* 최하단으로 스크롤 이동 */
	oScrollToBottomPopup : function(){
		oEmartMO.oScrollPopup.scrollTo(0, oEmartMO.oScroll.nScrollH)
	},
	/* 메인 스크롤 하단 키패드 On */
	/* oEmartMO.OnScrollKeypad() */
	OnScrollKeypad : function(){
		console.log('%c Alert : Number 키패드 올라옴', "color: #00f;");
		$('.jmc-content > div').css({'padding-bottom' : '200px'});
		this.oScroll.refresh();
		//this.oScrollToBottom();
	},
	/* 메인 스크롤 하단 키패드 Off */
	/* oEmartMO.OffScrollKeypad() */
	OffScrollKeypad : function(){
		console.log('%c Alert : Number 키패드 내려감', "color: #00f;");
		$('.jmc-content > div').css({'padding-bottom' : '1rem'});
		this.oScroll.refresh();
	},

	/* 메인 스크롤 하단 키패드 On */
	/* oEmartMO.OnScrollKeypad() */
	OnScrollKeypadPopup : function(){
		console.log('%c Alert : 팝업에서 Number 키패드 올라옴', "color: #00f;");
		$('#_popupScroll > div').css({'padding-bottom' : '200px'});
		this.oScrollPopup.refresh();
		//this.oScrollToBottom();
	},
	/* 메인 스크롤 하단 키패드 Off */
	/* oEmartMO.OffScrollKeypad() */
	OffScrollKeypadPopup : function(){
		console.log('%c Alert : 팝업에서 Number 키패드 내려감', "color: #00f;");
		$('#_popupScroll > div').css({'padding-bottom' : '1rem'});
		this.oScrollPopup.refresh();
	},
	setBarcodePostion : function(data){
		//var num = "8801114101834";
		var num = data;
		var txt ="strong:contains(" + num +")";
		//색상 변경
		$('.list-prod li').removeClass('focus');
		$( txt).parents('li').addClass('focus');
		//스크롤 이동
		var nTop = $( txt).parents('li').position().top;
		//console.log(nTop);
		oEmartMO.oScroll.scrollTo(0, nTop)
	},
	// 스크롤 위치를 인풋에 맞게 이동
	_onFocusInputPosition : function(event) {
		var target = $(event.currentTarget);
		var oElementOffset = target.offset();
		var nPos = 280;

		this.OnScrollKeypad();
		if (oElementOffset.top > nPos) {
			var nScrollPos = this.oScroll._nTop;
			var nSetPos = this.oScroll._nTop - oElementOffset.top + nPos;

			console.log('nScrollPos : ' + this.oScroll._nTop);
			console.log('oElementOffset : ' + oElementOffset.top);
			console.log('nSetPos : ' + (this.oScroll._nTop - oElementOffset.top + nPos));

			this.oScroll.scrollTo(0, nSetPos, 500)
		}

	},
	_onBlurInputPosition : function(event){
		 this.OffScrollKeypad();
	},

	/* gnb 처리 */
	_onClickGnb : function(event) {
		// 토글 GNB
		var target = $(event.currentTarget);
		if ( target.hasClass('on') ) {
			target.removeClass('on');
			var sSubName= "#sub" + Number(target.index('._gnb li') + 1);
			$(sSubName).hide();
		} else {
			$('._gnb li').removeClass('on');
			target.addClass('on');
			var sSubName= "#sub" + Number(target.index('._gnb li') + 1);

			//console.log(sSubName);
			$('.link-wrap').hide();
			$(sSubName).show();

		}
		// 스크롤 위치 처리
		this.oScroll.refresh();
		if ( this.oScroll.nMaxScrollTop < 0 && target.index('._gnb li') > 1 ){
			this.oScroll.scrollTo(0, this.oScroll.nScrollH, 500)
		}
	},
	// 가공발주 등록
	_onClickAccordionList : function(event){
		var target = $(event.currentTarget);
		if (target.parent().is('.on')){
			target.parent().removeClass('on');
		} else {
			target.parent().addClass('on').siblings().removeClass('on');
		}
		oEmartMO.oScroll.refresh();
	},

	// 품질불량 이미지 삭제
	_onClickClaimDelIgm : function(event){
		var target = $(event.currentTarget);
		target.parent().remove();
	},

	//폰트 사이즈 변경
	_onClickFontPlus : function(event){
		var target = $(event.currentTarget);
		var sElementId = $('.board-wrap').attr('id');
		console.log(sElementId);
		if ( sElementId == "f-14" ||   sElementId == undefined){
			$('.board-wrap').attr('id','f-16');
		} else if ( sElementId == "f-16" ){
			$('.board-wrap').attr('id','f-18');
		} else if ( sElementId == "f-18"  ){
			return false;
		}
		console.log('this.oScoll');
		oEmartMO.oScroll.refresh()

	},
	_onClickFontMinus : function(event){
		var target = $(event.currentTarget);
		var sElementId = $('.board-wrap').attr('id');
		//console.log(sElementId)
		if ( sElementId == "f-18" ){
			$('.board-wrap').attr('id','f-16');
		} else if ( sElementId == "f-16" ){
			$('.board-wrap').attr('id','f-14');
		} else if ( sElementId == ""  ){
			return false;
		}
		console.log('this.oScoll');
		oEmartMO.oScroll.refresh()
	},
	_onClickEllipsis:function(event){
		var target = $(event.currentTarget);
		setTimeout(function(){
			target.next().addClass('on');
			//console.log('_onClickEllipsis')
		},200)

	},
	_onClickRemoveEllipsis:function(event){
		$('.ellipsis-txt').removeClass('on');
		//console.log('_onClickRemoveEllipsis')
	},
    ready: function() {
		$(function(){

		})
	}
};

var oEmartMO = new EmartMO.view.global();


text:
namespace vkpp::sample
{

enum class SystemCursorType
{
    eArrow          = SDL_SYSTEM_CURSOR_ARROW,
    eIBeam          = SDL_SYSTEM_CURSOR_IBEAM,
    eWait           = SDL_SYSTEM_CURSOR_WAIT,
    eCrossHair      = SDL_SYSTEM_CURSOR_CROSSHAIR,
    eWaitArrow      = SDL_SYSTEM_CURSOR_WAITARROW,
    eSizeNWSE       = SDL_SYSTEM_CURSOR_SIZENWSE,
    eSizeNESW       = SDL_SYSTEM_CURSOR_SIZENESW,
    eSizeWE         = SDL_SYSTEM_CURSOR_SIZEWE,
    eSizeNS         = SDL_SYSTEM_CURSOR_SIZENS,
    eSizeALL        = SDL_SYSTEM_CURSOR_SIZEALL,
    eNo             = SDL_SYSTEM_CURSOR_NO,
    eHand           = SDL_SYSTEM_CURSOR_HAND
};

class CWindow : public CNonCopyable
{
protected:
    using WindowHandle = SDL_Window*;
    using WindowSurface = SDL_Surface*;
    using CursorType = SDL_Cursor;
    using CursorTypePtr = CursorType*;

    WindowHandle    mWindow;
    CursorTypePtr   mpCursor;

    Uint32          mWinID;

#ifdef SDL_VIDEO_DRIVER_WINDOWS
    HWND            mNativeHandle;
#endif  // SDL_VIDEO_DRIVER_WINDOWS

#ifdef SDL_VIDEO_DRIVER_UIKIT
    UIWindow*       mNativeHandle;
#endif  // SDL_VIDEO_DRIVER_UIKIT

#ifdef SDL_VIDEO_DRIVER_ANDROID
    ANativeWindow* mNativeHandle;
#endif  // SDL_VIDEO_DRIVER_ANDROID

    void ResetCursor(CursorTypePtr apCursor)
    {
        if (mpCursor != nullptr)
            SDL_FreeCursor(mpCursor);

        mpCursor = apCursor;
    }

    void ResetWindow(WindowHandle apWin)
    {
        if (mWindow != nullptr)
            SDL_DestroyWindow(mWindow);

        mWindow = apWin;
    }

public:
    enum WindowFlags
    {
        eFullScreen         = SDL_WINDOW_FULLSCREEN,                    // Fullscreen window
        eFullScreenDesktop  = SDL_WINDOW_FULLSCREEN_DESKTOP,            // Fullscreen window at the current desktop resolution
        eOpenGL             = SDL_WINDOW_OPENGL,                        // Window usable with OpenGL context
        eShown              = SDL_WINDOW_SHOWN,                         // Window is visible
        eHiden              = SDL_WINDOWEVENT_HIDDEN,                   // Window is not visible
        eBorderLess         = SDL_WINDOW_BORDERLESS,                    // No window decoration
        eResizable          = SDL_WINDOW_RESIZABLE,                     // Window can be resized
        eMinimized          = SDL_WINDOW_MINIMIZED,                     // Window is minimized
        eMaximized          = SDL_WINDOW_MAXIMIZED,                     // Window is maximized
        eInputGrabbed       = SDL_WINDOW_INPUT_GRABBED,                 // Window has grabbed input focus
        eInputFocus         = SDL_WINDOW_INPUT_FOCUS,                   // Window has input focus
        eMouseFocus         = SDL_WINDOW_MOUSE_FOCUS,                   // Window has mouse focus
        eForeign            = SDL_WINDOW_FOREIGN,                       // Window not created by SDL
        eAllowHighDPI       = SDL_WINDOW_ALLOW_HIGHDPI,                 // Window should be created in high-DPI mode if supported
        eMouseCapture       = SDL_WINDOW_MOUSE_CAPTURE                  // Window has mouse captured
    };

    enum WindowPos
    {
        eCentered       = SDL_WINDOWPOS_CENTERED,
        eUndefined      = SDL_WINDOWPOS_UNDEFINED
    };

    // Create a window with the specified position, dimensions and flags
    CWindow(const std::string& aTitle, int aPosX, int aPosY, int aWidth, int aHeight, Uint32 aFlags) : mWindow(nullptr), mpCursor(nullptr), mWinID(0), mNativeHandle(nullptr)
    {
        Create(aTitle, aPosX, aPosY, aWidth, aHeight, aFlags);
        mpCursor = SDL_GetCursor();
    }

    virtual ~CWindow(void)
    {
        ResetCursor(nullptr);
        ResetWindow(nullptr);
    }

    auto GetNativeHandle(void) const
    {
        return mNativeHandle;
    }

    Uint32 GetID(void) const
    {
        return mWinID;
    }

    Uint32 GetFlags(void) const
    {
        assert(mWindow != nullptr);

        return SDL_GetWindowFlags(mWindow);
    }

    // Get the SDL surface associated with the window.
    WindowSurface GetSurface(void) const
    {
        return SDL_GetWindowSurface(mWindow);
    }

    // Set the active cursor
    void SetCursor(SystemCursorType aCursorType)
    {
        auto lpCursor = SDL_CreateSystemCursor(static_cast<SDL_SystemCursor>(aCursorType));
        if (lpCursor != nullptr)
        {
            SDL_SetCursor(lpCursor);
            ResetCursor(lpCursor);
        }
    }

    // Get the active cursor
    CursorTypePtr GetCursor(void) const
    {
        return mpCursor;
    }

    // Set the title of the window in UTF-8 format.
    void SetTitle(const std::string& aTitle) const
    {
        SDL_SetWindowTitle(mWindow, aTitle.c_str());
    }

    // Return the title of the window in UTF-8 format or "" if there is no title.
    std::string GetTitle(void) const
    {
        return SDL_GetWindowTitle(mWindow);
    }

    // Set the size of a window's client area.
    void SetSize(int aWidth, int aHeight) const
    {
        SDL_SetWindowSize(mWindow, aWidth, aHeight);
    }

    // Get the size of a window's client area
    void GetSize(int& aWidth, int& aHeight) const
    {
        SDL_GetWindowSize(mWindow, &aWidth, &aHeight);
    }

    // Set the minimum size of a window's client area.
    void SetMinimumSize(int aMinWidth, int aMinHeight) const
    {
        SDL_SetWindowMinimumSize(mWindow, aMinWidth, aMinHeight);
    }

    // Get the minimum size of a window's client area.
    void GetMinimumSize(int& aWidth, int& aHeight) const
    {
        SDL_GetWindowMinimumSize(mWindow, &aWidth, &aHeight);
    }

    // Set the maximum size of a window's client area.
    void SetMaximumSize(int aMaxWidth, int aMaxHeight) const
    {
        SDL_SetWindowMaximumSize(mWindow, aMaxWidth, aMaxHeight);
    }

    // Get the maximum size of a window's client area.
    void GetMaximumSize(int& aWidth, int& aHeight) const
    {
        SDL_GetWindowMaximumSize(mWindow, &aWidth, &aHeight);
    }

    // Set the position of a window.
    void SetPosition(int aPosX, int aPosY) const
    {
        SDL_SetWindowPosition(mWindow, aPosX, aPosY);
    }

    // Get the position of a window.
    void GetPosition(int& aPosX, int& aPosY) const
    {
        SDL_GetWindowPosition(mWindow, &aPosX, &aPosY);
    }

    // Set a window's input grab mode.
    // When input is grabbed, the mouse is confined to the window.
    // If the caller enables a grab while another window is currently grabbed, the other window loses its grab
    // in favor of the caller's window.
    void SetGrabMode(bool aIsGrabbed) const
    {
        SDL_SetWindowGrab(mWindow, aIsGrabbed ? SDL_TRUE : SDL_FALSE);
    }

    // Return true if input is in grabbed mode, othersize false.
    bool IsGrabbed(void) const
    {
        return SDL_TRUE == SDL_GetWindowGrab(mWindow);
    }

    bool SetFullscreen(void) const
    {
        return 0 == SDL_SetWindowFullscreen(mWindow, SDL_WINDOW_FULLSCREEN);
    }

    bool SetWindowedMode(void) const
    {
        return 0 == SDL_SetWindowFullscreen(mWindow, 0);
    }

    // Set the brightness (gamma multiplier) for the display that owns the window
    bool SetBrightness(float aBrightness) const
    {
        return 0 == SDL_SetWindowBrightness(mWindow, aBrightness);
    }

    // Add or remove the border form the window.
    void SetBordered(bool aIsBordered) const
    {
        SDL_SetWindowBordered(mWindow, aIsBordered ? SDL_TRUE : SDL_FALSE);
    }

    // Restore the size and position of a minimized or maximized window.
    void Restore(void) const
    {
        SDL_RestoreWindow(mWindow);
    }

    // Raise a window above other windows and set the input focus.
    void Raise(void) const
    {
        SDL_RaiseWindow(mWindow);
    }

    // Minimize a window to an iconic representation.
    void Minimize(void) const
    {
        SDL_MinimizeWindow(mWindow);
    }

    // Maximize a window as large as possible.
    void Maximize(void) const
    {
        SDL_MaximizeWindow(mWindow);
    }

    void Show(void) const
    {
        SDL_ShowWindow(mWindow);
    }

    void Hide(void) const
    {
        SDL_HideWindow(mWindow);
    }

    void Close(void)
    {
        SDL_DestroyWindow(mWindow);
        mWindow = nullptr;
    }

    void Create(const std::string& aTitle, int aPosX, int aPosY, int aWidth, int aHeight, Uint32 aFlags)
    {
        if (mWindow != nullptr)
            Close();

        mWindow = SDL_CreateWindow(aTitle.c_str(), aPosX, aPosY, aWidth, aHeight, aFlags);

        if (nullptr == mWindow)
            throw CWindowCreationException();

        mWinID = SDL_GetWindowID(mWindow);

        SDL_SysWMinfo lInfo;
        SDL_VERSION(&lInfo.version);

        if (SDL_TRUE == SDL_GetWindowWMInfo(mWindow, &lInfo))
        {
#ifdef SDL_VIDEO_DRIVER_WINDOWS
            mNativeHandle = lInfo.info.win.window;
#endif  // SDL_VIDEO_DRIVER_WINDOWS

#ifdef SDL_VIDEO_DRIVER_UIKIT
            mNativeHandle = lInfo.info.uikit.window;
#endif  // SDL_VIDEO_DRIVER_UIKIT

#ifdef SDL_VIDEO_DRIVER_ANDROID
            mNativeHandle = lInfo.info.android.window;
#endif  // SDL_VIDEO_DRIVER_ANDROID
        }
    }

    // Prevent the screen from being blanked by a screen saver.
    static void DisableScreenSaver(void)
    {
        SDL_DisableScreenSaver();
    }

    // Allow the screen to be blanked by a screen saver.
    static void EnableScreenSaver(void)
    {
        SDL_EnableScreenSaver();
    }

    // Return whether the screensaver is currently enabled.
    // The screensaver is disabled by default.
    static bool IsScreenSaverEnabled(void)
    {
        return SDL_TRUE == SDL_IsScreenSaverEnabled();
    }
};

}                   // End of namespace vkpp::sample.

#endif              // __VKPP_SAMPLE_WINDOW_WINDOW_H__


text:
import _ from 'lodash';
import {flow, split, compact, partition} from 'lodash/fp';

export function globToRegexp(glob, flags) {
  const regexp = glob
    .split(/\*+/)
    .map(_.escapeRegExp)
    .join('.*?');

  return new RegExp(`^${regexp}$`, flags);
}

export function makeFilterFunction(filterStr = '') {
  let [excludeFilters, includeFilters] = flow(
    split(/\s+/),
    compact,
    partition(filter => filter[0] === '!')
  )(filterStr);

  if (!includeFilters.length) {
    includeFilters.push('*');
  }

  includeFilters = includeFilters
    .map(filter => globToRegexp(filter, 'i'))
    .map(filterRegexp => str => filterRegexp.test(str));

  excludeFilters = excludeFilters
    .map(filter => globToRegexp(filter.slice(1), 'i'))
    .map(filterRegexp => str => filterRegexp.test(str));

  return str => excludeFilters.every(filter => !filter(str)) && includeFilters.some(filter => filter(str));
}


text:
MainWindow::MainWindow() : QMainWindow()
{
	UI = std::make_shared<Ui::MainWindow>();
	UI->setupUi(this);
    UI->plainTextEdit->setFocus();

    connect(UI->plainTextEdit, &QPlainTextEdit::textChanged, [this]() {
		if (_currentGraphicText != nullptr)
			_currentGraphicText->setText(UI->plainTextEdit->toPlainText().toStdString());
	});

    connect(UI->reloadCanvasButton, &QPushButton::clicked, [this]() {
        if (_currentGraphicText != nullptr)
            _currentGraphicText->getScene()->update();
    });

    connect(UI->reloadGrammarButton, &QPushButton::clicked, [this]() {
        if (_currentGraphicText != nullptr) {
            _currentGraphicText->reloadTextStyle();

            UI->graphicsView->setScene(_currentGraphicText->getScene());
        }
    });

    connect(UI->clearButton, &QPushButton::clicked, [this]() {
        UI->plainTextEdit->setPlainText("");
        _currentGraphicText->clear();
    });

    connect(UI->openFileButton, &QPushButton::clicked, [this]() {
        QFileDialog dialog(this);
        dialog.setFileMode(QFileDialog::AnyFile);
        dialog.setWindowTitle(tr("Open file"));
        QString fileName = dialog.getOpenFileName();

        if (!fileName.isEmpty()) {
            QFile file(fileName);
            if (!file.open(QFile::ReadOnly | QFile::Text))
                return;

            QFileInfo fileInfo(file);
            _currentGraphicText->setTextType(fileInfo.suffix().toStdString());

            QTextStream in(&file);
            UI->plainTextEdit->setPlainText(in.readAll());
            file.close();
        }
    });

    connect(UI->saveFileButton, &QPushButton::clicked, [this]() {
        QFileDialog dialog(this);
        dialog.setFileMode(QFileDialog::AnyFile);
        dialog.setWindowTitle(tr("Save file as"));
        QString fileName = dialog.getSaveFileName();

        if (!fileName.isEmpty()) {
            QFile file(fileName);
            if (!file.open(QFile::WriteOnly | QFile::Text))
                return;

            QTextStream out(&file);
            out << UI->plainTextEdit->toPlainText();

            file.close();
        }

    });

	GraphicTextPtr graphicText = std::make_shared<GraphicText>("lua");
	setGraphicText(graphicText);

	qDebug() << "NEW" << this;
}

//////////////////////////////////////////////////////////////////////////////////////////////////
MainWindow::~MainWindow()
{
	qDebug() << "DELETE" << this;
}

//////////////////////////////////////////////////////////////////////////////////////////////////
void MainWindow::setGraphicText(const GraphicTextPtr& graphicText)
{
	_currentGraphicText = graphicText;
    connect(_currentGraphicText.get(), SIGNAL(onElementLeftButtonClicked(Drawable&)), this, SLOT(onElementLeftButtonClicked(Drawable&)));

    QGraphicsScene* scene = graphicText->getScene();
	UI->graphicsView->setScene(scene);
}

//////////////////////////////////////////////////////////////////////////////////////////////////
void MainWindow::setupTextEditField()
{

}

//////////////////////////////////////////////////////////////////////////////////////////////////
void MainWindow::onElementLeftButtonClicked(Drawable& drawable)
{
    size_t left, right;
    drawable.findTextBoundaries(left, right);

    QTextCursor textCursor = UI->plainTextEdit->textCursor();
    textCursor.setPosition(left);
    textCursor.setPosition(right, QTextCursor::KeepAnchor);

    UI->plainTextEdit->setTextCursor(textCursor);
    UI->plainTextEdit->setFocus();
}


text:
package hr.vsite.mentor.unit;

import java.nio.file.Path;
import java.util.List;
import java.util.UUID;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.google.gwt.core.shared.GwtIncompatible;

import hr.vsite.mentor.MentorConfiguration;
import hr.vsite.mentor.user.User;

@JsonTypeInfo(use=JsonTypeInfo.Id.CLASS, include=JsonTypeInfo.As.PROPERTY, property="@class")
public abstract class Unit {

	public static enum Type {
		Text,
		Video,
		Audio,
		Image,
		//Quiz,
		//Series,
		YouTube
	}

	@GwtIncompatible
	public static Path getDataFolder() {
		return MentorConfiguration.get().getSubDataPath("unit");
	}

	@JsonProperty
	public UUID getId() { return id; }
	public void setId(UUID id) { this.id = id; }
	@JsonProperty
	public Type getType() { return type; }
	public void setType(Type type) { this.type = type; }
	@JsonProperty
	public String getTitle() { return title; }
	public void setTitle(String title) { this.title = title; }
	@JsonProperty
	public User getAuthor() { return author; }
	public void setAuthor(User author) { this.author = author; }
	@JsonProperty
	public List<String> getKeywords() { return keywords; }
	public void setKeywords(List<String> keywords) { this.keywords = keywords; }
	@JsonProperty
	public Object getAttributes() { return attributes; }
	public void setAttributes(Object attributes) { this.attributes = attributes; }
	@JsonProperty
	public Unit getNextUnit() { return nextUnit; }
	public void setNextUnit(Unit nextUnit) { this.nextUnit = nextUnit; }

	/** Override if derived unit can provide thumbnail */
	@GwtIncompatible
	public Path getThumbnailPath() { return null; }
	@GwtIncompatible
	public String getThumbnailContentType() { return null; }

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((id == null) ? 0 : id.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Unit other = (Unit) obj;
		if (id == null) {
			if (other.id != null)
				return false;
		} else if (!id.equals(other.id))
			return false;
		return true;
	}

	@Override
	public String toString() {
		return "Unit [id=" + id + ", type=" + type + ", title=" + title + "]";
	}

	private UUID id;
	private Type type;
	private String title;
	private User author;
	private List<String> keywords;
	private Object attributes;
	private Unit nextUnit;

}


text:
ACCEPTED

#### According to
International Plant Names Index

#### Published in
null

#### Original name
Crassula manaia A.P.Druce & Sykes

### Remarks
null


text:
package org.bouncycastle.asn1;

class DLFactory
{
    static final DLSequence EMPTY_SEQUENCE = new DLSequence();
    static final DLSet EMPTY_SET = new DLSet();

    static DLSequence createSequence(ASN1EncodableVector v)
    {
        if (v.size() < 1)
        {
            return EMPTY_SEQUENCE;
        }

        return new DLSequence(v);
    }

    static DLSet createSet(ASN1EncodableVector v)
    {
        if (v.size() < 1)
        {
            return EMPTY_SET;
        }

        return new DLSet(v);
    }
}


text:
<?xml version='1.0'?>
<module>
<name>CronTasks</name>
<label>CronTasks</label>
<parent></parent>
<type>extension</type>
<version>1.2</version>
<dependencies>
<vtiger_version>5.3.1</vtiger_version>
<vtiger_max_version>6.*</vtiger_max_version>
</dependencies>
</module>


text:
import { Component } from '@angular/core';
import { NavController, NavParams } from 'ionic-angular';

import { Observable } from 'rxjs/Observable';

import { Photo } from '../../models/photo.interface';

import { SystemProvider } from '../../providers/system/system';

import { PhotoDetailPage } from '../../pages/photo-detail/photo-detail';

/**
 * Generated class for the PhotosPage page.
 *
 * See https://ionicframework.com/docs/components/#navigation for more info on
 * Ionic pages and navigation.
 */

@Component({
	selector: 'page-photos',
	templateUrl: 'photos.html',
})
export class PhotosPage {

	items: Observable<Array<Photo>>;

	constructor(
		public system: SystemProvider,
		public navCtrl: NavController,
		public navParams: NavParams
	) {
		this.getItems();
	}

	ionViewDidLoad() {
		console.log('ionViewDidLoad PhotosPage');
	}

	getItems() {
		this.items = this.system.getPhotos();
	}

	navigateToDetail(id: number) {
		this.navCtrl.push(PhotoDetailPage, { id: id });
	}

}


text:
#ifndef QTESTLITESTATICINFO_H
#define QTESTLITESTATICINFO_H

#include <QtCore/QTextStream>
#include <QtCore/QDataStream>
#include <QtCore/QMetaType>
#include <QtCore/QVariant>

#if defined(_XLIB_H_) // crude hack, but...
#error "cannot include <X11/Xlib.h> before this file"
#endif
#define XRegisterIMInstantiateCallback qt_XRegisterIMInstantiateCallback
#define XUnregisterIMInstantiateCallback qt_XUnregisterIMInstantiateCallback
#define XSetIMValues qt_XSetIMValues
#include <X11/Xlib.h>
#undef XRegisterIMInstantiateCallback
#undef XUnregisterIMInstantiateCallback
#undef XSetIMValues

#include <X11/Xutil.h>
#include <X11/Xos.h>
#ifdef index
#  undef index
#endif
#ifdef rindex
#  undef rindex
#endif
#ifdef Q_OS_VXWORS
#  ifdef open
#    undef open
#  endif
#  ifdef getpid
#    undef getpid
#  endif
#endif // Q_OS_VXWORKS
#include <X11/Xatom.h>

//#define QT_NO_SHAPE
#ifdef QT_NO_SHAPE
#  define XShapeCombineRegion(a,b,c,d,e,f,g)
#  define XShapeCombineMask(a,b,c,d,e,f,g)
#else
#  include <X11/extensions/shape.h>
#endif // QT_NO_SHAPE

#if !defined (QT_NO_TABLET)
#  include <X11/extensions/XInput.h>
#if defined (Q_OS_IRIX)
#  include <X11/extensions/SGIMisc.h>
#  include <wacom.h>
#endif
#endif // QT_NO_TABLET

// #define QT_NO_XINERAMA
#ifndef QT_NO_XINERAMA
// XFree86 does not C++ify Xinerama (at least up to XFree86 4.0.3).
extern "C" {
#  include <X11/extensions/Xinerama.h>
}
#endif // QT_NO_XINERAMA

// #define QT_NO_XRANDR
#ifndef QT_NO_XRANDR
#  include <X11/extensions/Xrandr.h>
#endif // QT_NO_XRANDR

// #define QT_NO_XRENDER
#ifndef QT_NO_XRENDER
#  include <X11/extensions/Xrender.h>
#endif // QT_NO_XRENDER

#ifndef QT_NO_XSYNC
extern "C" {
#  include "X11/extensions/sync.h"
}
#endif

#ifndef QT_NO_XFIXES
#include <X11/extensions/Xfixes.h>
#endif // QT_NO_XFIXES

// #define QT_NO_XKB
#ifndef QT_NO_XKB
#  include <X11/XKBlib.h>
#endif // QT_NO_XKB

#if !defined(XlibSpecificationRelease)
#  define X11R4
typedef char *XPointer;
#else
#  undef X11R4
#endif

#ifndef QT_NO_XFIXES
#include <X11/extensions/Xfixes.h>
typedef Bool (*PtrXFixesQueryExtension)(Display *, int *, int *);
typedef Status (*PtrXFixesQueryVersion)(Display *, int *, int *);
typedef void (*PtrXFixesSetCursorName)(Display *dpy, Cursor cursor, const char *name);
typedef void (*PtrXFixesSelectSelectionInput)(Display *dpy, Window win, Atom selection, unsigned long eventMask);
#endif // QT_NO_XFIXES

#ifndef QT_NO_XCURSOR
#include <X11/Xcursor/Xcursor.h>
typedef Cursor (*PtrXcursorLibraryLoadCursor)(Display *, const char *);
#endif // QT_NO_XCURSOR

#ifndef QT_NO_XINERAMA
typedef Bool (*PtrXineramaQueryExtension)(Display *dpy, int *event_base, int *error_base);
typedef Bool (*PtrXineramaIsActive)(Display *dpy);
typedef XineramaScreenInfo *(*PtrXineramaQueryScreens)(Display *dpy, int *number);
#endif // QT_NO_XINERAMA

#ifndef QT_NO_XRANDR
typedef void (*PtrXRRSelectInput)(Display *, Window, int);
typedef int (*PtrXRRUpdateConfiguration)(XEvent *);
typedef int (*PtrXRRRootToScreen)(Display *, Window);
typedef Bool (*PtrXRRQueryExtension)(Display *, int *, int *);
#endif // QT_NO_XRANDR

#ifndef QT_NO_XINPUT
typedef int (*PtrXCloseDevice)(Display *, XDevice *);
typedef XDeviceInfo* (*PtrXListInputDevices)(Display *, int *);
typedef XDevice* (*PtrXOpenDevice)(Display *, XID);
typedef void (*PtrXFreeDeviceList)(XDeviceInfo *);
typedef int (*PtrXSelectExtensionEvent)(Display *, Window, XEventClass *, int);
#endif // QT_NO_XINPUT

/*
 * Solaris patch 108652-47 and higher fixes crases in
 * XRegisterIMInstantiateCallback, but the function doesn't seem to
 * work.
 *
 * Instead, we disabled R6 input, and open the input method
 * immediately at application start.
 */

//######### XFree86 has wrong declarations for XRegisterIMInstantiateCallback
//######### and XUnregisterIMInstantiateCallback in at least version 3.3.2.
//######### Many old X11R6 header files lack XSetIMValues.
//######### Therefore, we have to declare these functions ourselves.

extern "C" Bool XRegisterIMInstantiateCallback(
    Display*,
    struct _XrmHashBucketRec*,
    char*,
    char*,
    XIMProc, //XFree86 has XIDProc, which has to be wrong
    XPointer
);

extern "C" Bool XUnregisterIMInstantiateCallback(
    Display*,
    struct _XrmHashBucketRec*,
    char*,
    char*,
    XIMProc, //XFree86 has XIDProc, which has to be wrong
    XPointer
);

#ifndef X11R4
#  include <X11/Xlocale.h>
#endif // X11R4

#ifndef QT_NO_MITSHM
#  include <X11/extensions/XShm.h>
#endif // QT_NO_MITSHM

// rename a couple of X defines to get rid of name clashes
// resolve the conflict between X11's FocusIn and QEvent::FocusIn
enum {
    XFocusOut = FocusOut,
    XFocusIn = FocusIn,
    XKeyPress = KeyPress,
    XKeyRelease = KeyRelease,
    XNone = None,
    XRevertToParent = RevertToParent,
    XGrayScale = GrayScale,
    XCursorShape = CursorShape
};
#undef FocusOut
#undef FocusIn
#undef KeyPress
#undef KeyRelease
#undef None
#undef RevertToParent
#undef GrayScale
#undef CursorShape

#ifdef FontChange
#undef FontChange
#endif

class QXlibStatic
{
public:
    enum X11Atom {
        // window-manager <-> client protocols
        WM_PROTOCOLS,
        WM_DELETE_WINDOW,
        WM_TAKE_FOCUS,
        _NET_WM_PING,
        _NET_WM_CONTEXT_HELP,
        _NET_WM_SYNC_REQUEST,
        _NET_WM_SYNC_REQUEST_COUNTER,

        // ICCCM window state
        WM_STATE,
        WM_CHANGE_STATE,

        // Session management
        WM_CLIENT_LEADER,
        WM_WINDOW_ROLE,
        SM_CLIENT_ID,

        // Clipboard
        CLIPBOARD,
        INCR,
        TARGETS,
        MULTIPLE,
        TIMESTAMP,
        SAVE_TARGETS,
        CLIP_TEMPORARY,
        _QT_SELECTION,
        _QT_CLIPBOARD_SENTINEL,
        _QT_SELECTION_SENTINEL,
        CLIPBOARD_MANAGER,

        RESOURCE_MANAGER,

        _XSETROOT_ID,

        _QT_SCROLL_DONE,
        _QT_INPUT_ENCODING,

        _MOTIF_WM_HINTS,

        DTWM_IS_RUNNING,
        ENLIGHTENMENT_DESKTOP,
        _DT_SAVE_MODE,
        _SGI_DESKS_MANAGER,

        // EWMH (aka NETWM)
        _NET_SUPPORTED,
        _NET_VIRTUAL_ROOTS,
        _NET_WORKAREA,

        _NET_MOVERESIZE_WINDOW,
        _NET_WM_MOVERESIZE,

        _NET_WM_NAME,
        _NET_WM_ICON_NAME,
        _NET_WM_ICON,

        _NET_WM_PID,

        _NET_WM_WINDOW_OPACITY,

        _NET_WM_STATE,
        _NET_WM_STATE_ABOVE,
        _NET_WM_STATE_BELOW,
        _NET_WM_STATE_FULLSCREEN,
        _NET_WM_STATE_MAXIMIZED_HORZ,
        _NET_WM_STATE_MAXIMIZED_VERT,
        _NET_WM_STATE_MODAL,
        _NET_WM_STATE_STAYS_ON_TOP,
        _NET_WM_STATE_DEMANDS_ATTENTION,

        _NET_WM_USER_TIME,
        _NET_WM_USER_TIME_WINDOW,
        _NET_WM_FULL_PLACEMENT,

        _NET_WM_WINDOW_TYPE,
        _NET_WM_WINDOW_TYPE_DESKTOP,
        _NET_WM_WINDOW_TYPE_DOCK,
        _NET_WM_WINDOW_TYPE_TOOLBAR,
        _NET_WM_WINDOW_TYPE_MENU,
        _NET_WM_WINDOW_TYPE_UTILITY,
        _NET_WM_WINDOW_TYPE_SPLASH,
        _NET_WM_WINDOW_TYPE_DIALOG,
        _NET_WM_WINDOW_TYPE_DROPDOWN_MENU,
        _NET_WM_WINDOW_TYPE_POPUP_MENU,
        _NET_WM_WINDOW_TYPE_TOOLTIP,
        _NET_WM_WINDOW_TYPE_NOTIFICATION,
        _NET_WM_WINDOW_TYPE_COMBO,
        _NET_WM_WINDOW_TYPE_DND,
        _NET_WM_WINDOW_TYPE_NORMAL,
        _KDE_NET_WM_WINDOW_TYPE_OVERRIDE,

        _KDE_NET_WM_FRAME_STRUT,

        _NET_STARTUP_INFO,
        _NET_STARTUP_INFO_BEGIN,

        _NET_SUPPORTING_WM_CHECK,

        _NET_WM_CM_S0,

        _NET_SYSTEM_TRAY_VISUAL,

        _NET_ACTIVE_WINDOW,

        // Property formats
        COMPOUND_TEXT,
        TEXT,
        UTF8_STRING,

        // Xdnd
        XdndEnter,
        XdndPosition,
        XdndStatus,
        XdndLeave,
        XdndDrop,
        XdndFinished,
        XdndTypelist,
        XdndActionList,

        XdndSelection,

        XdndAware,
        XdndProxy,

        XdndActionCopy,
        XdndActionLink,
        XdndActionMove,
        XdndActionPrivate,

        // Motif DND
        _MOTIF_DRAG_AND_DROP_MESSAGE,
        _MOTIF_DRAG_INITIATOR_INFO,
        _MOTIF_DRAG_RECEIVER_INFO,
        _MOTIF_DRAG_WINDOW,
        _MOTIF_DRAG_TARGETS,

        XmTRANSFER_SUCCESS,
        XmTRANSFER_FAILURE,

        // Xkb
        _XKB_RULES_NAMES,

        // XEMBED
        _XEMBED,
        _XEMBED_INFO,

        XWacomStylus,
        XWacomCursor,
        XWacomEraser,

        XTabletStylus,
        XTabletEraser,

        NPredefinedAtoms,

        _QT_SETTINGS_TIMESTAMP = NPredefinedAtoms,
        NAtoms
    };

    static Atom atom(X11Atom atom);
    static bool isSupportedByWM(Atom atom);

    static bool useXFixes();
    static int xFixesEventBase();

    #ifndef QT_NO_XFIXES
    static PtrXFixesSelectSelectionInput xFixesSelectSelectionInput();
    #endif //QT_NO_XFIXES

    static QImage qimageFromXImage(XImage *xi);

};

#endif // QTESTLITESTATICINFO_H