text:
<?php

class Ess_M2ePro_Model_Cron_Task_Ebay_Order_CreateFailed extends Ess_M2ePro_Model_Cron_Task_Abstract
{
    const NICK = 'ebay/order/create_failed';

    const MAX_TRIES_TO_CREATE_ORDER = 3;

    //########################################

    /**
     * @return Ess_M2ePro_Model_Synchronization_Log
     */
    protected function getSynchronizationLog()
    {
        $synchronizationLog = parent::getSynchronizationLog();

        $synchronizationLog->setComponentMode(Ess_M2ePro_Helper_Component_Ebay::NICK);
        $synchronizationLog->setSynchronizationTask(Ess_M2ePro_Model_Synchronization_Log::TASK_ORDERS);

        return $synchronizationLog;
    }

    //########################################

    protected function performActions()
    {
        $permittedAccounts = $this->getPermittedAccounts();
        if (empty($permittedAccounts)) {
            return;
        }

        foreach ($permittedAccounts as $account) {
            /** @var $account Ess_M2ePro_Model_Account **/

            try {
                $this->getOperationHistory()->addText('Starting account "'.$account->getTitle().'"');
                // ---------------------------------------

                $ebayOrders = $this->getEbayOrders($account);

                if (!empty($ebayOrders)) {
                    $this->createMagentoOrders($ebayOrders);
                }
            } catch (\Exception $exception) {
                $message = Mage::helper('M2ePro')->__(
                    'The "Create Failed Orders" Action for eBay Account "%account%" was completed with error.',
                    $account->getTitle()
                );

                $this->processTaskAccountException($message, __FILE__, __LINE__);
                $this->processTaskException($exception);
            }

            // ---------------------------------------
            $this->getLockItemManager()->activate();
            // ---------------------------------------
        }
    }

    //########################################

    protected function getPermittedAccounts()
    {
        /** @var $accountsCollection Mage_Core_Model_Resource_Db_Collection_Abstract */
        $accountsCollection = Mage::helper('M2ePro/Component_Ebay')->getCollection('Account');
        return $accountsCollection->getItems();
    }

    // ---------------------------------------

    protected function createMagentoOrders($ebayOrders)
    {
        $iteration = 1;

        foreach ($ebayOrders as $order) {
            /** @var $order Ess_M2ePro_Model_Order */

            if ($this->isOrderChangedInParallelProcess($order)) {
                continue;
            }

            if ($order->canCreateMagentoOrder()) {
                try {
                    $order->addNoticeLog(
                        'Magento order creation rules are met. M2E Pro will attempt to create Magento order.'
                    );
                    $order->createMagentoOrder();
                } catch (Exception $exception) {
                    continue;
                }
            } else {
                $order->addData(
                    array(
                    'magento_order_creation_failure' => Ess_M2ePro_Model_Order::MAGENTO_ORDER_CREATION_FAILED_NO,
                    'magento_order_creation_fails_count' => 0,
                    'magento_order_creation_latest_attempt_date' => NULL
                    )
                );
                $order->save();

                continue;
            }

            if ($order->getReserve()->isNotProcessed() && $order->isReservable()) {
                $order->getReserve()->place();
            }

            if ($order->getChildObject()->canCreatePaymentTransaction()) {
                $order->getChildObject()->createPaymentTransactions();
            }

            if ($order->getChildObject()->canCreateInvoice()) {
                $order->createInvoice();
            }

            if ($order->getChildObject()->canCreateShipment()) {
                $order->createShipment();
            }

            if ($order->getChildObject()->canCreateTracks()) {
                $order->getChildObject()->createTracks();
            }

            if ($order->getStatusUpdateRequired()) {
                $order->updateMagentoOrderStatus();
            }

            if ($iteration % 5 == 0) {
                $this->getLockItemManager()->activate();
            }

            $iteration++;
        }
    }

    /**
     * This is going to protect from Magento Orders duplicates.
     * (Is assuming that there may be a parallel process that has already created Magento Order)
     *
     * But this protection is not covering a cases when two parallel cron processes are isolated by mysql transactions
     */
    protected function isOrderChangedInParallelProcess(Ess_M2ePro_Model_Order $order)
    {
        /** @var Ess_M2ePro_Model_Order $dbOrder */
        $dbOrder = Mage::getModel('M2ePro/Order')->load($order->getId());

        if ($dbOrder->getMagentoOrderId() != $order->getMagentoOrderId()) {
            return true;
        }

        return false;
    }

    // ---------------------------------------

    protected function getEbayOrders(Ess_M2ePro_Model_Account $account)
    {
        $backToDate = new \DateTime('now', new \DateTimeZone('UTC'));
        $backToDate->modify('-15 minutes');

        $collection = Mage::helper('M2ePro/Component_Ebay')->getCollection('Order');
        $collection->addFieldToFilter('account_id', $account->getId());
        $collection->addFieldToFilter('magento_order_id', array('null' => true));
        $collection->addFieldToFilter(
            'magento_order_creation_failure', Ess_M2ePro_Model_Order::MAGENTO_ORDER_CREATION_FAILED_YES
        );
        $collection->addFieldToFilter(
            'magento_order_creation_fails_count', array('lt' => self::MAX_TRIES_TO_CREATE_ORDER)
        );
        $collection->addFieldToFilter(
            'magento_order_creation_latest_attempt_date', array('lt' => $backToDate->format('Y-m-d H:i:s'))
        );
        $collection->getSelect()->order('magento_order_creation_latest_attempt_date ASC');
        $collection->setPageSize(25);

        return $collection->getItems();
    }

    //########################################
}


text:
require 'spec_helper'
module Alf
  module Engine
    describe InferHeading, 'heading' do

      let(:ih){ InferHeading.new([]) }

      subject{ ih.send(:heading, tuple) }

      context 'on a single tuple' do
        let(:tuple){ {id: 1, name: "Jones"} }

        it{ should eq(Heading.new(id: Fixnum, name: String)) }
      end

      context 'on a tuple with tuple-valued attribute' do
        let(:tuple){ {id: 1, hobby: Tuple(name: "Programming")} }

        it{ should eq(Heading.new(id: Fixnum, hobby: Tuple[name: String])) }
      end

      context 'on a tuple with relation-valued attribute' do
        let(:tuple){ {id: 1, hobby: Relation(name: "Programming")} }

        it{ should eq(Heading.new(id: Fixnum, hobby: Relation[name: String])) }
      end

    end
  end # module Engine
end # module Alf

redpajama_set_name: RedPajamaGithub


text:
import { ComponentInstance, Data } from './component';
export interface VfaState {
    refs?: string[];
    rawBindings?: Data;
    slots?: string[];
}
declare function set<K extends keyof VfaState>(vm: ComponentInstance, key: K, value: VfaState[K]): void;
declare function get<K extends keyof VfaState>(vm: ComponentInstance, key: K): VfaState[K] | undefined;
declare const _default: {
    set: typeof set;
    get: typeof get;
};
export default _default;


text:
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="ChangeListManager">
    <list default="true" id="dd556eae-cf7b-4d98-88e5-ef7117b0d822" name="Default" comment="">
      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/../.idea/jsLibraryMappings.xml" />
      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.idea/dictionaries/chris.xml" />
      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/../bin/newiso/boot/extra.gz" afterPath="$PROJECT_DIR$/../bin/newiso/boot/extra.gz" />
      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/../bin/newiso/cde/copy2fs.lst" afterPath="$PROJECT_DIR$/../bin/newiso/cde/copy2fs.lst" />
      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/../bin/newiso/cde/onboot.lst" afterPath="$PROJECT_DIR$/../bin/newiso/cde/onboot.lst" />
      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/../src/include/cde/copy2fs.lst" afterPath="$PROJECT_DIR$/../src/include/cde/copy2fs.lst" />
      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/../src/include/cde/onboot.lst" afterPath="$PROJECT_DIR$/../src/include/cde/onboot.lst" />
      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/../tinyRemaster.iso" afterPath="$PROJECT_DIR$/../tinyRemaster.iso" />
      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/../unsquash.sh" afterPath="$PROJECT_DIR$/../unsquash.sh" />
    </list>
    <ignored path="scripts.iws" />
    <ignored path=".idea/workspace.xml" />
    <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="FileEditorManager">
    <leaf>
      <file leaf-file-name="addPkg.rb" pinned="false" current="true" current-in-tab="true">
        <entry file="file://$PROJECT_DIR$/addPkg.rb">
          <provider selected="true" editor-type-id="text-editor">
            <state line="37" column="34" selection-start="1033" selection-end="1033" vertical-scroll-proportion="0.62025315">
              <folding />
            </state>
          </provider>
        </entry>
      </file>
      <file leaf-file-name="addPkg.py" pinned="false" current="false" current-in-tab="false">
        <entry file="file://$PROJECT_DIR$/addPkg.py">
          <provider selected="true" editor-type-id="text-editor">
            <state line="42" column="16" selection-start="942" selection-end="942" vertical-scroll-proportion="0.0">
              <folding />
            </state>
          </provider>
        </entry>
      </file>
    </leaf>
  </component>
  <component name="Git.Settings">
    <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$/.." />
  </component>
  <component name="IdeDocumentHistory">
    <option name="changedFiles">
      <list>
        <option value="$PROJECT_DIR$/addPkg.rb" />
      </list>
    </option>
  </component>
  <component name="ProjectFrameBounds">
    <option name="x" value="-1" />
    <option name="y" value="113" />
    <option name="width" value="1602" />
    <option name="height" value="874" />
  </component>
  <component name="ProjectLevelVcsManager" settingsEditedManually="true">
    <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="scripts" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
            </PATH_ELEMENT>
          </PATH>
          <PATH>
            <PATH_ELEMENT>
              <option name="myItemId" value="scripts" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="scripts" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
            </PATH_ELEMENT>
          </PATH>
        </subPane>
      </pane>
    </panes>
  </component>
  <component name="PropertiesComponent">
    <property name="options.splitter.main.proportions" value="0.3" />
    <property name="WebServerToolWindowFactoryState" value="false" />
    <property name="recentsLimit" value="5" />
    <property name="options.lastSelected" value="project.propVCSSupport.Mappings" />
    <property name="options.searchVisible" value="true" />
    <property name="options.splitter.details.proportions" value="0.2" />
  </component>
  <component name="RunManager" selected="Ruby.addPkg">
    <configuration default="false" name="addPkg" type="RubyRunConfigurationType" factoryName="Ruby" temporary="true">
      <module name="scripts" />
      <RUBY_RUN_CONFIG NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
      <RUBY_RUN_CONFIG NAME="WORK DIR" VALUE="$PROJECT_DIR$" />
      <RUBY_RUN_CONFIG NAME="SHOULD_USE_SDK" VALUE="false" />
      <RUBY_RUN_CONFIG NAME="ALTERN_SDK_NAME" VALUE="" />
      <RUBY_RUN_CONFIG NAME="myPassParentEnvs" VALUE="true" />
      <envs />
      <EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
      <EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
        <COVERAGE_PATTERN ENABLED="true">
          <PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
        </COVERAGE_PATTERN>
      </EXTENSION>
      <RUBY_RUN_CONFIG NAME="SCRIPT_PATH" VALUE="$PROJECT_DIR$/addPkg.rb" />
      <RUBY_RUN_CONFIG NAME="SCRIPT_ARGS" VALUE="" />
      <RunnerSettings RunnerId="RubyRunner" />
      <ConfigurationWrapper RunnerId="RubyRunner" />
      <method />
    </configuration>
    <configuration default="true" type="RubyRunConfigurationType" factoryName="Ruby">
      <module name="" />
      <RUBY_RUN_CONFIG NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
      <RUBY_RUN_CONFIG NAME="WORK DIR" VALUE="" />
      <RUBY_RUN_CONFIG NAME="SHOULD_USE_SDK" VALUE="false" />
      <RUBY_RUN_CONFIG NAME="ALTERN_SDK_NAME" VALUE="" />
      <RUBY_RUN_CONFIG NAME="myPassParentEnvs" VALUE="true" />
      <envs />
      <EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
      <EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
        <COVERAGE_PATTERN ENABLED="true">
          <PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
        </COVERAGE_PATTERN>
      </EXTENSION>
      <RUBY_RUN_CONFIG NAME="SCRIPT_PATH" VALUE="" />
      <RUBY_RUN_CONFIG NAME="SCRIPT_ARGS" VALUE="" />
      <method />
    </configuration>
    <list size="1">
      <item index="0" class="java.lang.String" itemvalue="Ruby.addPkg" />
    </list>
    <recent_temporary>
      <list size="1">
        <item index="0" class="java.lang.String" itemvalue="Ruby.addPkg" />
      </list>
    </recent_temporary>
  </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" />
    <myIsUseDefaultProxy>false</myIsUseDefaultProxy>
  </component>
  <component name="TaskManager">
    <task active="true" id="Default" summary="Default task">
      <created>1353269979856</created>
      <updated>1353269979856</updated>
    </task>
    <servers />
  </component>
  <component name="ToolWindowManager">
    <frame x="-1" y="113" width="1602" height="874" 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="-1" 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="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="-1" 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="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.24967742" sideWeight="0.67112297" order="0" side_tool="false" content_ui="combo" />
      <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="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="true" 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="-1" side_tool="true" content_ui="tabs" />
      <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.328877" sideWeight="0.5" order="2" side_tool="false" 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="-1" 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="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="false" weight="0.33" sideWeight="0.5" order="1" 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="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
      <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" />
      <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" />
    </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="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="editorHistoryManager">
    <entry file="file://$PROJECT_DIR$/addPkg.py">
      <provider selected="true" editor-type-id="text-editor">
        <state line="42" column="16" selection-start="942" selection-end="942" vertical-scroll-proportion="0.0">
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/addPkg.rb">
      <provider selected="true" editor-type-id="text-editor">
        <state line="37" column="34" selection-start="1033" selection-end="1033" vertical-scroll-proportion="0.62025315">
          <folding />
        </state>
      </provider>
    </entry>
  </component>
</project>


text:
    © 1999 - {{ site.time | date: '%Y' }}
    International Insurance Group, Inc. DBA Mexico & RV Insurance Services

    Visit
    Mexico Insurance Online
    to sign up and sell our products on your website.


text:
let mix = require('laravel-mix');

/*
 |--------------------------------------------------------------------------
 | Mix Asset Management
 |--------------------------------------------------------------------------
 |
 | Mix provides a clean, fluent API for defining some Webpack build steps
 | for your Laravel application. By default, we are compiling the Sass
 | file for the application as well as bundling up all the JS files.
 |
 */

mix.styles([
    'resources/assets/css/bootstrap.min.css',
    'resources/assets/css/bootstrap-theme.min.css',
    'resources/assets/css/font-awesome.css',
    'resources/assets/css/bootstrap-social.css',
    'resources/assets/css/styles.css',
    'resources/assets/css/buttons.css'
    //'resources/assets/css/forms.css'
], 'public/css/all.css').version();

mix.scripts([
    'resources/assets/js/jquery.min.js',
    'resources/assets/js/bootstrap.min.js',
    'resources/assets/js/custom.js'
    //'resources/assets/js/forms.js',
    //'resources/assets/js/tables.js'
], 'public/js/all.js').version();

mix.copyDirectory('resources/assets/images', 'public/images');
mix.copyDirectory('resources/assets/fonts', 'public/fonts');


text:
package hadoop_common

import proto "github.com/golang/protobuf/proto"
import json "encoding/json"
import math "math"

// Reference proto, json, and math imports to suppress error if they are not otherwise used.
var _ = proto.Marshal
var _ = &json.SyntaxError{}
var _ = math.Inf

// *
//  Get groups for user request.
type GetGroupsForUserRequestProto struct {
	User             *string `protobuf:"bytes,1,req,name=user" json:"user,omitempty"`
	XXX_unrecognized []byte  `json:"-"`
}

func (m *GetGroupsForUserRequestProto) Reset()         { *m = GetGroupsForUserRequestProto{} }
func (m *GetGroupsForUserRequestProto) String() string { return proto.CompactTextString(m) }
func (*GetGroupsForUserRequestProto) ProtoMessage()    {}

func (m *GetGroupsForUserRequestProto) GetUser() string {
	if m != nil && m.User != nil {
		return *m.User
	}
	return ""
}

// *
// Response for get groups.
type GetGroupsForUserResponseProto struct {
	Groups           []string `protobuf:"bytes,1,rep,name=groups" json:"groups,omitempty"`
	XXX_unrecognized []byte   `json:"-"`
}

func (m *GetGroupsForUserResponseProto) Reset()         { *m = GetGroupsForUserResponseProto{} }
func (m *GetGroupsForUserResponseProto) String() string { return proto.CompactTextString(m) }
func (*GetGroupsForUserResponseProto) ProtoMessage()    {}

func (m *GetGroupsForUserResponseProto) GetGroups() []string {
	if m != nil {
		return m.Groups
	}
	return nil
}

func init() {
}


text:
$LOAD_PATH.unshift File.expand_path(File.dirname(__FILE__), "lib")
require "gorillas"

window = Gorillas::GameWindow.new
window.show


text:
namespace BoletoNet
{
    public enum TipoComplementoLancamento
    {
        SemInformacaoComplementoLancamento = 0,
        IdentificacaoOrigemLancamento = 1
    }
}


text:
package com.camunda.demo.springboot;

public class ProcessConstants {

  public static final String PROCESS_KEY_order = "order";

  public static final String VAR_NAME_orderId = "orderId";
  public static final String VAR_NAME_amount = "amount";
  public static final String VAR_NAME_shipmentId = "shipmentId";
  public static final String VARIABLE_paymentTransactionId = "paymentTransactionId";

  public static final String MSG_NAME_GoodsShipped = "Message_GoodsShipped";

}


text:
title: "A Vampire Needs Your Help..."
excerpt: "For the past few weeks, I've been working non-stop to make sure that Dracula, the open source project, is well organized and with fewer issues as possible. We even crossed the number of 90 themes, which is totally insane!"
createdAt: "2020-01-23"
updatedAt: "2021-01-30"
author:
 name: Zeno Rocha
 avatar: "https://github.com/zenorocha.png?size=48"
color: "pink"
---

For the past few weeks, I've been working non-stop to make sure that Dracula, the open source project, is well organized and with fewer issues as possible. We even crossed the number of **90 themes**, which is totally insane!

I realized that people are only interested in themes because they want to be more productive. For a long time, I avoided talking about productivity tips here since that's not Dracula's primary focus. But I decided to create something new...

Now I'm going to shift my attention to Dracula PRO, but before I start making all these assumptions about what people need, I want to ask - **what's important to you?**

[Help me build this new thing](https://draculatheme.typeform.com/to/VjaC6t) by answering some questions about your dev setup.

P.S.: I know forms are boring, I hate them too, but I spent a lot of time trying to make this one suck less. Can't wait to hear what you have to say.

See ya!


text:
extern BOOL						b_norgb;
extern BOOL						b_nosun;


text:
<!DOCTYPE html>

  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>AdminLTE 2 | Registration Page</title>

  <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">

  <link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.min.css">

  <link rel="stylesheet" href="bower_components/font-awesome/css/font-awesome.min.css">

  <link rel="stylesheet" href="bower_components/Ionicons/css/ionicons.min.css">

  <link rel="stylesheet" href="dist/css/AdminLTE.min.css">

  <link rel="stylesheet" href="plugins/iCheck/square/blue.css">

  <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700,300italic,400italic,600italic">

    Admin

Register a new membership

    <form action="index.html" method="post">

        <input type="text" class="form-control" placeholder="Full name">

        <input type="email" class="form-control" placeholder="Email">

        <input type="password" class="form-control" placeholder="Password">

        <input type="password" class="form-control" placeholder="Retype password">

              <input type="checkbox"> I agree to the terms

          <button type="submit" class="btn btn-primary btn-block btn-flat">Register</button>

    </form>

    I already have a membership


text:
const assert = require('assert');
const environment = require('../../fixtures/cli/environment');
const adminHelper = require('../../common/admin-helper')();
const namespace = 'express-gateway:apps:info';
const idGen = require('uuid62');

describe('eg apps info', () => {
  let program, env, user, app;

  before(() => adminHelper.start());

  after(() => adminHelper.stop());

  before(() => {
    return adminHelper.admin.users.create({
      username: idGen.v4(),
      firstname: 'La',
      lastname: 'Deeda'
    })
      .then(createdUser => {
        user = createdUser;

        return adminHelper.admin.apps.create(user.id, {
          name: 'appy',
          redirectUri: 'http://localhost:3000/cb'
        });
      })
      .then(createdApp => {
        app = createdApp;
        return app;
      });
  });

  beforeEach(() => {
    ({ program, env } = environment.bootstrap());
    env.prepareHijack();
  });

  afterEach(() => env.resetHijack());

  [{
    testCase: 'returns app info',
    listCommand: () => app.id
  }, {
    testCase: 'returns app info by name',
    listCommand: () => app.name
  }].forEach(({ testCase, listCommand }) => {
    it(testCase, done => {
      env.hijack(namespace, generator => {
        let output = null;

        generator.once('run', () => {
          generator.stdout = message => {
            output = message;
          };
          generator.log.error = message => {
            done(new Error(message));
          };
        });

        generator.once('end', () => {
          const app = JSON.parse(output);
          assert.strictEqual(app.id, app.id);
          assert.strictEqual(app.name, 'appy');
          assert.strictEqual(app.redirectUri, 'http://localhost:3000/cb');
          assert.strictEqual(app.isActive, true);
          assert.strictEqual(app.userId, user.id);

          done();
        });
      });

      env.argv = program.parse(`apps info ${listCommand()}`);
    });
  });
});


text:
package org.flywaydb.core.internal.dbsupport.vertica;

import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Types;

import org.flywaydb.core.internal.dbsupport.DbSupport;
import org.flywaydb.core.internal.dbsupport.JdbcTemplate;
import org.flywaydb.core.internal.dbsupport.Schema;
import org.flywaydb.core.internal.dbsupport.SqlStatementBuilder;
import org.flywaydb.core.internal.util.StringUtils;
import org.flywaydb.core.internal.util.jdbc.RowMapper;

/**
 * Vertica-specific support.
 */
public class VerticaDbSupport extends DbSupport {
    /**
     * Creates a new instance.
     *
     * @param connection The connection to use.
     */
    public VerticaDbSupport(Connection connection) {
        super(new JdbcTemplate(connection, Types.NULL));
    }

    public String getDbName() {
        return "vertica";
    }

    public String getCurrentUserFunction() {
        return "current_user";
    }

    @Override
    protected String doGetCurrentSchema() throws SQLException {
        return jdbcTemplate.queryForString("SELECT current_schema()");
    }

    @Override
    protected void doSetCurrentSchema(Schema schema) throws SQLException {
        if (schema == null) {
            jdbcTemplate.execute("SET search_path = v_catalog");
            return;
        }

        String searchPath = doGetSearchPath();
        if (StringUtils.hasText(searchPath)) {
            jdbcTemplate.execute("SET search_path = " + schema + "," + searchPath);
        } else {
            jdbcTemplate.execute("SET search_path = " + schema);
        }
    }

    String doGetSearchPath() throws SQLException {
        String searchPath = jdbcTemplate.query("SHOW search_path", new RowMapper<String>() {
            @Override
            public String mapRow(ResultSet rs) throws SQLException {
                // All "show" commands in Vertica return two columns: "name" and "setting",
                // but we just want the value in the second column:
                //
                //     name     |                      setting
                // -------------+---------------------------------------------------
                // search_path | "$user", public, v_catalog, v_monitor, v_internal
                return rs.getString("setting");
            }

        }).get(0);
        return searchPath;
    }

    public boolean supportsDdlTransactions() {
        return false;
    }

    public String getBooleanTrue() {
        return "TRUE";
    }

    public String getBooleanFalse() {
        return "FALSE";
    }

    public SqlStatementBuilder createSqlStatementBuilder() {
        return new VerticaStatementBuilder();
    }

    @Override
    public String doQuote(String identifier) {
        return "\"" + StringUtils.replaceAll(identifier, "\"", "\"\"") + "\"";
    }

    @Override
    public Schema getSchema(String name) {
        return new VerticaSchema(jdbcTemplate, this, name);
    }

    @Override
    public boolean catalogIsSchema() {
        return false;
    }

}


text:
explain plan for select * from (
-- multiple partitions: all have order by clause, partition by on a single (different) column
-- subquery with filter

SELECT *
FROM
	(
	SELECT
		count(*) OVER (PARTITION BY c_date ORDER BY c_time) + sum(c_integer) OVER (PARTITION BY c_bigint ORDER BY c_time) AS total,
    		count(*) OVER (PARTITION BY c_integer ORDER BY c_time) AS count1,
    		sum(c_integer) OVER (PARTITION BY c_date ORDER BY c_time) AS count2
 	FROM j1_v
	) sub
WHERE total <> count1 + count2
) t limit 0;


text:
<?php
namespace Admin\Controller;
use Think\Controller;
class SessionShowController extends Controller{
	public function _initialize(){
		// $scheck = A('SessionCheck');
		// $scheck->index();
		header("content-type:text/html; charset=utf-8;");
	}
	//预留
	public function index(){

	}
	public function show(){
		echo "<pre>";
		var_dump($_SESSION);
	}
}
?>


text:
import os
from urlparse import urlparse

import logging
logger = logging.getLogger()

class IdomaarDataSource:

    def __init__(self, location):
        self.location = location
        parsed_url = urlparse(location)
        if parsed_url.scheme:
            self.url = location
            self.file_name = None
        else:
            self.url = None
            self.file_name = '/vagrant/input/' + location
        self.format = self.guess_format(location)
        logger.info("Guessed file format is " + self.format)

    def guess_format(self, location):
        if location.endswith('.gz') or location.endswith('.gzip'): return 'gzip'
        else: return 'plain'

    def check_environment(self):
        pass

    def is_s3(self):
        return self.location.startswith('s3://')

    def check(self):
        self.check_file_exists()

    def check_file_exists(self):
        if not self.file_name:
            logger.debug("No file specified, nothing to check.")
            return
        target_file = self.file_name
        if os.path.exists(target_file):
            logger.debug("File {0} exists".format(target_file))
            return
        logger.info("File {0} not found, trying to convert to Unix path.".format(target_file))
        new_target_file = target_file.replace('\\', "/")
        if os.path.exists(new_target_file):
            logger.info("File {0} exists".format(new_target_file))
        else:
            raise Exception("File " + target_file + " not found. Please place your input files into the  datastreammanger/input folder and reference them " + \
                            " via the relative path.")

    def __str__(self):
        return "file_name: {0}, url: {1}, format {2}".format(self.file_name, self.url, self.format)

    def __repr__(self):
        return self.__str__()


text:
package org.apache.axis.components.net;

/**
 * Interface implemented by classes seeking to configure the properties
 * of the multi threaded connection pool used in the CommonsHTTPSender
 * transport implementation.
 *
 * @author Eric Friedman
 */
public interface CommonsHTTPClientProperties {
    /**
     * Used to set the maximum number of connections that the pool can open
     * for all hosts.  Since connections imply sockets and sockets imply
     * file descriptors, the setting you use must not exceed any limits
     * your system imposes on the number of open file descriptors a
     * single process may have.
     *
     * @return an integer > 1
     */
    public int getMaximumTotalConnections();

    /**
     * Used to set the maximum number of connections that will be pooled
     * for a given host.  This setting is also constrained by
     * the one returned from getMaximumTotalConnections.
     *
     * @return an integer > 1
     */
    public int getMaximumConnectionsPerHost();

    /**
     * Used to set the amount of time, in milliseconds, spent waiting
     * for an available connection from the pool.  An exception is raised
     * if the timeout is triggered.
     *
     * @return an integer > 1 OR 0 for infinite timeout
     */
    public int getConnectionPoolTimeout();

    /**
     * Used to set the default amount of time, in milliseconds, spent waiting
     * for a connection. This can be overridden by the MessageContext
     *
     * @return an integer >= 0
     */
    public int getDefaultConnectionTimeout();

    /**
     * Used to set the default amount of time, in milliseconds, spent waiting
     * for a reponse. This can be overridden by the MessageContext
     *
     * @return an integer >= 0
     */
    public int getDefaultSoTimeout();

}


text:
'Imports ADAM6060_AGILENT87106
'Imports System.Threading

'Public Class AntennaSwitch

'    Private _mainForm As Main
'    ' Private aSetupController As Main
'    Public ASwitch As Switch
'    Private _aSwitchController As ADAM6060_AGILENT87106.MainController
'    Private _rtnStatus As String = ""
'    Private _tcpThread As New ThreadStart(AddressOf keepTCPsessionAlive)
'    Public AliveThread As New Thread(_tcpThread)
'    Private _ipAddress As String
'    Public PositionConnected As Integer = 0

'    Public Sub New(ByVal mainForm As Main, ByVal ipAddress As String, ByVal keepAlive As Boolean)
'        'Me.aSetupController = setupController
'        Me._mainForm = mainForm
'        'copy the ip address lolcally
'        Me._ipAddress = ipAddress
'        'initialize the object locally
'        Me.initSwitchObject()
'        'create an object to access the dll
'        Me._aSwitchController = New ADAM6060_AGILENT87106.MainController()
'        'initialize the TCP connection
'        Me._rtnStatus = Me._aSwitchController.initSwitchInterface(Me.aSwitch)
'        If Me._rtnStatus <> "" Then
'            MsgBox("error: " & Me._rtnStatus)
'        End If
'        'read the status to see which channel is selected
'        Me.findStatusAndDisplay()
'        'launch thread to keep TCp session to ADAM module alive
'        If keepAlive = True Then
'            Me.AliveThread.Start()
'        End If
'        'update the IP address in the Control Menu Item
'        'Me.mainForm.ADAMIPAddressToolStripMenuItem1.Text = Me.aSwitch.getIpAddress

'    End Sub

'    Public Sub InitSwitchObject()
'        Me.aSwitch = New Switch

'        'define ip address
'        Me.aSwitch.getIpAddress = Me._ipAddress '"169.254.209.56"
'        'define port number
'        Me.aSwitch.getPort = 502
'        'define the number of channels
'        Me.aSwitch.getNumChannels = 6
'        'define each channel
'        For ii As Integer = 0 To Me.aSwitch.getNumChannels - 1
'            Me.aSwitch.getChannel(ii) = New Switch.switchChannel

'            Select Case ii
'                Case 0
'                    With Me.aSwitch.getChannel(ii)
'                        .getAlias = "Position 0"
'                        .getChanNum = ii
'                        .getState = False

'                    End With

'                Case 1
'                    With Me.aSwitch.getChannel(ii)
'                        .getAlias = "Position 1"
'                        .getChanNum = ii
'                        .getState = False
'                    End With

'                Case 2
'                    With Me.aSwitch.getChannel(ii)
'                        .getAlias = "Position 2"
'                        .getChanNum = ii
'                        .getState = False

'                    End With

'                Case 3
'                    With Me.aSwitch.getChannel(ii)
'                        .getAlias = "Position 3"
'                        .getChanNum = ii
'                        .getState = False
'                    End With

'                Case 4
'                    With Me.aSwitch.getChannel(ii)
'                        .getAlias = "Position 4"
'                        .getChanNum = ii
'                        .getState = False

'                    End With

'                Case 5
'                    With Me.aSwitch.getChannel(ii)
'                        .getAlias = "Position 5"
'                        .getChanNum = ii
'                        .getState = False

'                    End With
'            End Select

'        Next

'    End Sub

'    Public Function FindStatusAndDisplay(Optional ByVal rtnValue As Boolean = False, Optional ByVal idx As Integer = 99)

'        If Idx = 99 Then

'            For ii As Integer = 0 To Me.aSwitch.getNumChannels - 1
'                If Me.aSwitch.getChannel(ii).getStatus = True Then Me.positionConnected = ii
'                If rtnValue = True Then
'                    If Me.aSwitch.getChannel(ii).getStatus = True Then Return ii
'                Else
'                    With Me._mainForm
'                        Select Case ii
'                            Case 0
'                                .antLED1.Value = Me.aSwitch.getChannel(ii).getStatus
'                            Case 1
'                                .antLED2.Value = Me.aSwitch.getChannel(ii).getStatus
'                            Case 2
'                                .antLED3.Value = Me.aSwitch.getChannel(ii).getStatus
'                            Case 3
'                                .antLED4.Value = Me.aSwitch.getChannel(ii).getStatus
'                            Case 4
'                                .antLED5.Value = Me.aSwitch.getChannel(ii).getStatus
'                            Case 5
'                                .antLED6.Value = Me.aSwitch.getChannel(ii).getStatus
'                        End Select
'                    End With
'                End If
'            Next

'        Else

'            If rtnValue = True Then
'                If Me.aSwitch.getChannel(Idx).getStatus = True Then Return Idx
'            Else
'                Return 99
'            End If

'        End If

'    End Function

'    Public Function SwitchChannel(ByVal aIndex As Integer, Optional ByVal rtnValue As Boolean = False)
'        'call the dll method to change the switch position
'        Me._rtnStatus = Me._aSwitchController.switchChannel(Me.aSwitch.getChannel(aIndex))
'        If Me._rtnStatus <> "" Then
'            Threading.Thread.Sleep(500)
'            'it might have been awhile since we've last spoken with the conbtroller, so try again
'            Me._rtnStatus = Me._aSwitchController.switchChannel(Me.aSwitch.getChannel(aIndex))
'            If Me._rtnStatus <> "" Then
'                Threading.Thread.Sleep(500)
'                'and try once more...
'                Me._rtnStatus = Me._aSwitchController.switchChannel(Me.aSwitch.getChannel(aIndex))
'                If Me._rtnStatus <> "" Then
'                    MsgBox("Error! " & Me._rtnStatus & Me._ipAddress & aIndex)
'                End If
'            End If
'        End If

'        'read and update the channel status'
'        Dim tmp As Integer = Me.findStatusAndDisplay(rtnValue, aIndex)
'        If rtnValue = True Then Return tmp

'    End Function

'    Public Sub KeepTcPsessionAlive()
'        Dim sleep As Integer = 60000 ' every minute

'        Do
'            Me.findStatusAndDisplay()
'            Threading.Thread.Sleep(sleep)
'        Loop

'    End Sub

'    Public Sub Close()
'        Me._aSwitchController.closeConnection()

'    End Sub

'End Class


text:
<?php

    class BodyParagraphs extends Paragraphs {
        private $_paragraph_list;
        private $_paragraphs;

        function __construct($slide_xml, $paragraphs_list) {
            parent::__construct($slide_xml, $paragraphs_list);
        }

        #override
        function formatParagraphs($paragraphs) {
            return $this->formataslist($paragraphs);
        }
    }

?>


text:
from django.conf.urls import patterns, include, url
from django.views.generic import ListView, DetailView
from models import Foros

urlpatterns = patterns('comunicacion.foros.views',
    #url(r'^$', 'index', name='index'),
    url(r'^$', ListView.as_view(model=Foros,
                                queryset=Foros.objects.all(),
                                paginate_by='4',
    	                        template_name="comunicacion/foros/foro_list.html"),
    	                        name='foro-list'),
    #url(r'^$', 'lista_foro', name='lista-foro'),
    url(r'^(?P<pk>\d+)/$', DetailView.as_view(model=Foros,
    	                                        template_name='comunicacion/foros/foro_detail.html'),
                                                name='foro-detail'),
    url(r'^crear/$', 'crear_foro', name='crear-foro'),
    url(r'^editar/(?P<id>\d+)/$', 'editar_foro', name='editar-foro'),
    url(r'^borrar/(?P<id>\d+)/$', 'borrar_foro', name='borrar-foro'),
    url(r'^ver/(?P<foro_id>\d+)/$', 'ver_foro', name='ver-foro'),
    url(r'^ver_comentario/(?P<aporte_id>\d+)/$', 'comentario_foro', name='cometario-foro'),
    url(r'^perfil/$', 'perfil', name='ver-perfil'),
    url(r'^privado/nota/$', 'notas_personales', name='notas-personales'),
    url(r'^privado/agenda/$', 'agenda_personales', name='agenda-personales'),
    url(r'^privado/documento/$', 'documento', name='documentos'),
    url(r'^privado/documento_tag/(?P<tags>\w+)/$', 'busqueda_tag', name='busqueda-tag'),
    url(r'^privado/multimedia_fotos/$', 'multimedia_fotos', name='multimedia_fotos'),
    url(r'^privado/multimedia_fotos_tag/(?P<tags>\w+)/$', 'multimedia_fotos_tag', name='multimedia_fotos_tag'),
    url(r'^privado/multimedia_videos/$', 'multimedia_videos', name='multimedia_videos'),
    url(r'^privado/multimedia_videos_tag/(?P<tags>\w+)/$', 'multimedia_videos_tag', name='multimedia_videos_tag'),
    url(r'^privado/multimedia_videos_sel/(?P<video>\w+)/$', 'multimedia_videos_sel', name='multimedia_videos_sel'),
    url(r'^privado/multimedia_audios/$', 'multimedia_audios', name='multimedia_audios'),
    url(r'^privado/multimedia_audios_tag/(?P<tags>\w+)/$', 'multimedia_audios_tag', name='multimedia_audios_tag'),
    url(r'^aporte/editar/(?P<aporte_id>\d+)/$', 'editar_aporte', name='editar-aporte'),
    url(r'^aporte/borrar/(?P<id>\d+)/$', 'borrar_aporte', name='borrar-aporte'),
    url(r'^comentario/editar/(?P<comen_id>\d+)/$', 'editar_comentario', name='editar-comentario'),
    url(r'^comentario/borrar/(?P<id>\d+)/$', 'borrar_comentario', name='borrar-comentarios'),
)


text:
package com.sun.tools.ws.ant;

import com.sun.tools.ws.ToolVersion;
import java.io.File;
import java.io.IOException;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.StringWriter;

import org.apache.tools.ant.AntClassLoader;
import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.Project;
import org.apache.tools.ant.taskdefs.Execute;
import org.apache.tools.ant.taskdefs.LogOutputStream;
import org.apache.tools.ant.taskdefs.LogStreamHandler;
import org.apache.tools.ant.taskdefs.MatchingTask;
import org.apache.tools.ant.types.Commandline;
import org.apache.tools.ant.types.CommandlineJava;
import org.apache.tools.ant.types.Path;

/**
 *  Base class for WS Tools Ant Task implementations.
 *
 * @author lukas
 */
abstract class WsTask2 extends MatchingTask {
    private Path modulepath = null;
    public void setModulepath(Path mp) {
        this.modulepath = mp;
    }
    public Path getModulepath() {
        return this.modulepath;
    }

    private Path upgrademodulepath = null;
    public void setUpgrademodulepath(Path ump) {
        this.upgrademodulepath = ump;
    }
    public Path getUpgrademodulepath() {
        return this.upgrademodulepath;
    }

    private String addmodules = null;
    public void setAddmodules(String ams) {
        this.addmodules = ams;
    }
    public String getAddmodules() {
        return this.addmodules;
    }

    private String limitmodules = null;
    public void setLimitmodules(String lms) {
        this.limitmodules = lms;
    }
    public String getLimitmodules() {
        return this.limitmodules;
    }

    private String addreads = null;
    public void setAddreads(String ars) {
        this.addreads = ars;
    }
    public String getAddreads() {
        return this.addreads;
    }

    private String addexports = null;
    public void setAddexports(String aes) {
        this.addexports = aes;
    }
    public String getAddexports() {
        return this.addexports;
    }

    private String patchmodule = null;
    public void setPatchmodule(String pms) {
        this.patchmodule = pms;
    }
    public String getPatchmodule() {
        return this.patchmodule;
    }

    private String addopens = null;
    public void setAddopens(String aos) {
        this.addopens = aos;
    }
    public String getAddopens() {
        return this.addopens;
    }

    private final CommandlineJava cmd = new CommandlineJava();

    CommandlineJava getCommandline() {
        return cmd;
    }

    /* *********************** -d option ************************ */
    private File destDir = null;

    /**
     * Gets the base directory to output generated class.
     *
     * @return destination directory for generated class(es).
     */
    public File getDestdir() {
        return this.destDir;
    }

    /**
     * Sets the base directory to output generated class.
     *
     * @param base destination directory for generated class(es).
     */
    public void setDestdir(File base) {
        this.destDir = base;
    }

    /* ****************** -disableXmlSecurity option ********************* */
    private boolean disableXmlSecurity;

    /**
     * Gets the "disableXmlSecurity" flag.
     *
     * @return true if extension mode is on, false otherwise.
     */
    public boolean getDisableXmlSecurity() {
        return disableXmlSecurity;
    }

    /**
     * Sets the "disableXmlSecurity" flag.
     *
     * @param disableXmlSecurity true to disable XML security features when parsing XML documents, false otherwise.
     */
    public void setDisableXmlSecurity(boolean disableXmlSecurity) {
        this.disableXmlSecurity = disableXmlSecurity;
    }

    /* ****************** -extensions option ********************* */
    private boolean extension;

    /**
     * Gets the "extension" flag.
     *
     * @return true if extension mode is on, false otherwise.
     */
    public boolean getExtension() {
        return extension;
    }

    /**
     * Sets the "extension" flag.
     *
     * @param extension true to set extension mode on, false otherwise.
     */
    public void setExtension(boolean extension) {
        this.extension = extension;
    }

    /* *********************** -keep option ************************ */
    private boolean keep = false;

    /**
     * Gets the "keep" flag.
     *
     * @return Whether to keep generated sources.
     */
    public boolean getKeep() {
        return keep;
    }

    /**
     * Sets the "keep" flag.
     *
     * @param keep keep generated sources.
     */
    public void setKeep(boolean keep) {
        this.keep = keep;
    }

    /* *********************** -fork option ************************ */
    private boolean fork = false;

    /**
     * Gets the "fork" flag.
     *
     * @return true if execution should be done in forked JVM, false otherwise.
     */
    public boolean getFork() {
        return fork;
    }

    /**
     * Sets the "fork" flag.
     *
     * @param fork true to run execution in a forked JVM.
     */
    public void setFork(boolean fork) {
        this.fork = fork;
    }

    /* *********************** -s option ************************ */
    private File sourcedestdir;

    /**
     * Gets the directory to place generated source java files.
     *
     * @return destination directory for generated source(s).
     */
    public File getSourcedestdir() {
        return sourcedestdir;
    }

    /**
     * Sets the directory to place generated source java files.
     *
     * @param sourceBase destination directory for generated source(s).
     */
    public void setSourcedestdir(File sourceBase) {
        keep = true;
        this.sourcedestdir = sourceBase;
    }

    /* *********************** -encoding option ************************ */
    private String encoding;

    /**
     * Sets the encoding for generated source java files.
     *
     * @param encoding encoding to use in generated sources.
     */
    public void setEncoding(String encoding) {
        this.encoding = encoding;
    }

    /**
     * Gets the encoding for generated source java files.
     *
     * @return encoding to use in generated sources.
     */
    public String getEncoding() {
        return encoding;
    }

    /* *********************** -verbose option ************************ */
    private boolean verbose = false;

    /**
     * Gets the "verbose" flag.
     *
     * @return true if messages about what the compiler is doing should be
     * printed out.
     */
    public boolean getVerbose() {
        return verbose;
    }

    /**
     * Sets the "verbose" flag.
     *
     * @param verbose whether to output messages about what the compiler is
     * doing.
     */
    public void setVerbose(boolean verbose) {
        this.verbose = verbose;
    }

    /* *********************** -g option ************************ */
    private boolean debug = false;

    /**
     * Gets the debug flag.
     *
     * @return  true if all debugging info should be generated.
     */
    public boolean getDebug() {
        return debug;
    }

    /**
     * Sets the debug flag.
     *
     * @param debug generate all debugging info.
     */
    public void setDebug(boolean debug) {
        this.debug = debug;
    }

    /* *********************** -J option ************************ */
    /**
     * Additional command line arguments for Javac. The equivalent of the -J
     * option.
     */
    private final Commandline javacCmdLine = new Commandline();

    /**
     * Adds Javac argument.
     *
     * @return Javac argument created.
     * @since 2.2.9
     */
    public Commandline.Argument createJavacarg() {
        return javacCmdLine.createArgument();
    }

    public Commandline getJavacargs() {
        return javacCmdLine;
    }

    /* *********************** -Xnocompile option ************************ */
    /**
     * do not compile generated classes *
     */
    private boolean xnocompile = false;

    public boolean isXnocompile() {
        return xnocompile;
    }

    public void setXnocompile(boolean xnocompile) {
        this.xnocompile = xnocompile;
    }

    /* ******************* failonerror option  ********************** */
    /**
     * False to continue the build even if the compilation fails.
     */
    private boolean failonerror = true;

    /**
     * Mostly for our SQE teams and not to be advertised.
     *
     * @param value a boolean value
     */
    public void setFailonerror(boolean value) {
        failonerror = value;
    }

    /**
     *
     * @return true if the task should fail on error.
     */
    public boolean isFailonerror() {
        return failonerror;
    }

    /* ********************* include ant runtime ********************* */
    /**
     * not sure if these methods are needed
     */
    private boolean includeAntRuntime = false;

    /**
     * Include ant's own classpath in this task's classpath?
     *
     * @param include a boolean value.
     */
    public void setIncludeantruntime(boolean include) {
        includeAntRuntime = include;
    }

    /**
     * Gets whether or not the ant classpath is to be included in the task's
     * classpath.
     *
     * @return true if Ant classpath should be included in the task's classpath.
     */
    public boolean getIncludeantruntime() {
        return includeAntRuntime;
    }

    /* ********************* include java runtime ********************* */
    /**
     * not sure if these methods are needed
     */
    private boolean includeJavaRuntime = false;

    /**
     * Sets whether or not to include the java runtime libraries to this task's
     * classpath.
     *
     * @param include a boolean value.
     */
    public void setIncludejavaruntime(boolean include) {
        includeJavaRuntime = include;
    }

    /**
     * Gets whether or not the java runtime should be included in this task's
     * classpath.
     *
     * @return true if java runtime classpath should be included in the task's
     * classpath.
     */
    public boolean getIncludejavaruntime() {
        return includeJavaRuntime;
    }

    /**
     * Adds a JVM argument.
     *
     * @return JVM argument created
     */
    public Commandline.Argument createJvmarg() {
        return cmd.createVmArgument();
    }

    /**
     * Let the task do it's work.
     *
     * @param tool string to use in logged messages
     * @param toolClass class name to invoke
     * @throws BuildException if invocation fails
     */
    protected final void execute(String tool, String toolClass) throws BuildException {
        setupCommand();
        LogOutputStream logstr = null;
        boolean ok = false;
        try {
            if (getVerbose()) {
                log(ToolVersion.VERSION.BUILD_VERSION);
                log("command line: " + tool + " "
                        + (getFork() ? getCommandline().getJavaCommand() : getCommandline()).toString());
            }
            if (getFork()) {
                setupForkCommand(toolClass);
                int status = run(getCommandline().getCommandline());
                ok = (status == 0);
            } else {
                if (getCommandline().getVmCommand().size() > 1) {
                    log("JVM args ignored when same JVM is used.", Project.MSG_WARN);
                }
                logstr = new LogOutputStream(this, Project.MSG_WARN);

                ClassLoader old = Thread.currentThread().getContextClassLoader();
                Thread.currentThread().setContextClassLoader(this.getClass().getClassLoader());
                try {
                    ok = runInVm(getCommandline().getJavaCommand().getArguments(), logstr);
                } finally {
                    Thread.currentThread().setContextClassLoader(old);
                }
            }
            if (!ok) {
                if (!getVerbose()) {
                    log("Command invoked: " + tool + getCommandline().toString());
                }
                throw new BuildException(tool + " failed", getLocation());
            }
        } catch (Exception ex) {
            if (isFailonerror()) {
                if (ex instanceof BuildException) {
                    throw (BuildException) ex;
                } else {
                    throw new BuildException("Error starting " + tool + ": " + ex.getMessage(), ex,
                            getLocation());
                }
            } else {
                StringWriter sw = new StringWriter();
                ex.printStackTrace(new PrintWriter(sw));
                getProject().log(sw.toString(), Project.MSG_WARN);
                // continue
            }
        } finally {
            try {
                if (logstr != null) {
                    logstr.close();
                }
            } catch (IOException e) {
                throw new BuildException(e);
            }
        }
    }

    /**
     * Set up command line to invoke.
     *
     * @return ready to run command line
     */
    protected CommandlineJava setupCommand() {
        // d option
        if (null != getDestdir() && !getDestdir().getName().equals("")) {
            getCommandline().createArgument().setValue("-d");
            getCommandline().createArgument().setFile(getDestdir());
        }
        // disableXmlSecurity flag
        if (getDisableXmlSecurity()) {
            getCommandline().createArgument().setValue("-disableXmlSecurity");
        }
        // extension flag
        if (getExtension()) {
            getCommandline().createArgument().setValue("-extension");
        }
        // keep option
        if (getKeep()) {
            getCommandline().createArgument().setValue("-keep");
        }
        // s option
        if (null != getSourcedestdir() && !getSourcedestdir().getName().equals("")) {
            getCommandline().createArgument().setValue("-s");
            getCommandline().createArgument().setFile(getSourcedestdir());
        }
        // encoding option
        if (getEncoding() != null) {
            getCommandline().createArgument().setValue("-encoding");
            getCommandline().createArgument().setValue(getEncoding());
        }
        // g option
        if (getDebug()) {
            getCommandline().createArgument().setValue("-g");
        }
        // verbose option
        if (getVerbose()) {
            getCommandline().createArgument().setValue("-verbose");
        }
        return getCommandline();
    }

    /**
     * Used to call the tool directly using API.
     *
     * @param arguments arguments to be passed to the tool
     * @param out output for the tool
     * @return true if tool succeed
     */
    protected abstract boolean runInVm(String[] arguments, OutputStream out);

    public void setupForkCommand(String className) {
        ClassLoader loader = this.getClass().getClassLoader();
        while (loader != null && !(loader instanceof AntClassLoader)) {
            loader = loader.getParent();
        }

        String antcp = loader != null
                //taskedef cp
                ? ((AntClassLoader) loader).getClasspath()
                //system classloader, ie. env CLASSPATH=...
                : System.getProperty("java.class.path");
        // try to find tools.jar and add it to the cp
        // so the behaviour on all JDKs is the same
        // (avoid creating MaskingClassLoader on non-Mac JDKs)
        File jreHome = new File(System.getProperty("java.home"));
        File toolsJar = new File(jreHome.getParent(), "lib/tools.jar");
        if (toolsJar.exists()) {
            antcp += File.pathSeparatorChar + toolsJar.getAbsolutePath();
        }

        Path cp = getCommandline().createClasspath(getProject());

        if (System.getProperty("jdk.module.path") != null) {
            log("Changing original module path to classpath.", Project.MSG_WARN);
            antcp += File.pathSeparatorChar + System.getProperty("jdk.module.path");
        }

        cp.append(new Path(getProject(), antcp));

        Path mvn = getProject().getReference("maven.plugin.classpath");
        if (mvn != null) {
            // fork in ant called from maven,
            // likely through maven-antrun-plugin:run
            cp.append(mvn);
        }

        if (getModulepath() != null && getModulepath().size() > 0) {
            getCommandline().createModulepath(getProject()).add(getModulepath());
        }

        if (getUpgrademodulepath() != null && getUpgrademodulepath().size() > 0) {
            getCommandline().createUpgrademodulepath(getProject()).add(getUpgrademodulepath());
        }
        if (getAddmodules() != null && getAddmodules().length() > 0) {
            getCommandline().createVmArgument().setLine("--add-modules " + getAddmodules());
        }
        if (getAddreads() != null && getAddreads().length() > 0) {
            getCommandline().createVmArgument().setLine("--add-reads " + getAddreads());
        }
        if (getAddexports() != null && getAddexports().length() > 0) {
            getCommandline().createVmArgument().setLine("--add-exports " + getAddexports());
        }
        if (getAddopens() != null && getAddopens().length() > 0) {
            getCommandline().createVmArgument().setLine("--add-opens " + getAddopens());
        }
        if (getPatchmodule() != null && getPatchmodule().length() > 0) {
            getCommandline().createVmArgument().setLine("--patch-module " + getPatchmodule());
        }
        if (getLimitmodules() != null && getLimitmodules().length() > 0) {
            getCommandline().createVmArgument().setLine("--limit-modules " + getLimitmodules());
        }

        getCommandline().setClassname(className);
    }

    /**
     * Executes the given class name with the given arguments in a separate VM.
     *
     * @param command arguments.
     * @return return value from the executed process.
     */
    private int run(String[] command) throws BuildException {
        Execute exe;
        LogStreamHandler logstr = new LogStreamHandler(this, Project.MSG_INFO, Project.MSG_WARN);
        exe = new Execute(logstr);
        exe.setAntRun(getProject());
        exe.setCommandline(command);
        try {
            int rc = exe.execute();
            if (exe.killedProcess()) {
                log("Timeout: killed the sub-process", Project.MSG_WARN);
            }
            return rc;
        } catch (IOException e) {
            throw new BuildException(e, getLocation());
        }
    }

}


text:
	<meta charset="UTF-8">
	<title>chat</title>
	<link rel="stylesheet" type="text/css" href="http://apps.bdimg.com/libs/bootstrap/3.3.4/css/bootstrap.css">

		      <input id="msg" type="text" class="form-control" placeholder="Typing in ... ">

		        <button id="send" class="btn btn-default" type="button">发射</button>


text:
// Package download handles the downloading of packages.
package download

import (
	"archive/tar"
	"compress/gzip"
	"context"
	"crypto/sha256"
	"encoding/hex"
	"errors"
	"fmt"
	"io"
	"net/url"
	"os"
	"path"
	"path/filepath"
	"strings"

	"cloud.google.com/go/storage"
	humanize "github.com/dustin/go-humanize"
	"github.com/google/googet/v2/client"
	"github.com/google/googet/v2/goolib"
	"github.com/google/googet/v2/oswrap"
	"github.com/google/logger"
)

const (
	httpOK = 200
)

// Package downloads a package from the given url,
// the provided SHA256 checksum will be checked during download.
func Package(ctx context.Context, pkgURL, dst, chksum, proxyServer string) error {
	if err := oswrap.RemoveAll(dst); err != nil {
		return err
	}

	isGCSURL, bucket, object := goolib.SplitGCSUrl(pkgURL)
	if isGCSURL {
		return packageGCS(ctx, bucket, object, dst, chksum, "")
	}

	return packageHTTP(ctx, pkgURL, dst, chksum, proxyServer)
}

// Downloads a package from an HTTP(s) server
func packageHTTP(ctx context.Context, pkgURL, dst, chksum string, proxyServer string) error {
	resp, err := client.Get(ctx, pkgURL, proxyServer)
	if err != nil {
		return err
	}
	defer resp.Body.Close()
	if resp.StatusCode != httpOK {
		return fmt.Errorf("Invalid return code from server, got: %d, want: %d", resp.StatusCode, httpOK)
	}

	logger.Infof("Downloading %q", pkgURL)
	return download(resp.Body, dst, chksum)
}

// Downloads a package from Google Cloud Storage
func packageGCS(ctx context.Context, bucket, object string, dst, chksum string, proxyServer string) error {
	if proxyServer != "" {
		return fmt.Errorf("Proxy server not supported with GCS URLs")
	}

	client, err := storage.NewClient(ctx)
	if err != nil {
		return err
	}
	defer client.Close()

	r, err := client.Bucket(bucket).Object(object).NewReader(ctx)
	if err != nil {
		return err
	}
	defer r.Close()

	logger.Infof("Downloading gs://%s/%s", bucket, object)
	return download(r, dst, chksum)
}

// FromRepo downloads a package from a repo.
func FromRepo(ctx context.Context, rs goolib.RepoSpec, repo, dir string, proxyServer string) (string, error) {
	repoURL, err := url.Parse(repo)
	if err != nil {
		return "", err
	}
	// We strip training slashes to make sure path.Dir() removes the final component (the repo name).
	// Otherwise '/myrepo' would correctly resolve to '/', but '/myrepo/' would incorrectly resolve to '/myrepo'
	pkgURL := &url.URL{
		Scheme:  repoURL.Scheme,
		Host:    repoURL.Host,
		User:    repoURL.User,
		RawPath: path.Join(path.Dir(strings.TrimSuffix(repoURL.EscapedPath(), "/")), rs.Source),
	}
	pkgURL.Path, err = url.PathUnescape(pkgURL.RawPath)
	if err != nil {
		return "", err
	}

	pn := goolib.PackageInfo{Name: rs.PackageSpec.Name, Arch: rs.PackageSpec.Arch, Ver: rs.PackageSpec.Version}.PkgName()
	dst := filepath.Join(dir, filepath.Base(pn))
	return dst, Package(ctx, pkgURL.String(), dst, rs.Checksum, proxyServer)
}

// Latest downloads the latest available version of a package.
func Latest(ctx context.Context, name, dir string, rm client.RepoMap, archs []string, proxyServer string) (string, error) {
	ver, repo, arch, err := client.FindRepoLatest(goolib.PackageInfo{Name: name, Arch: "", Ver: ""}, rm, archs)
	if err != nil {
		return "", err
	}
	rs, err := client.FindRepoSpec(goolib.PackageInfo{Name: name, Arch: arch, Ver: ver}, rm[repo])
	if err != nil {
		return "", err
	}
	return FromRepo(ctx, rs, repo, dir, proxyServer)
}

func download(r io.Reader, dst, chksum string) (err error) {
	f, err := oswrap.Create(dst)
	if err != nil {
		return err
	}
	defer func() {
		if cErr := f.Close(); cErr != nil && err == nil {
			err = cErr
		}
	}()

	hash := sha256.New()
	tw := io.MultiWriter(f, hash)

	b, err := io.Copy(tw, r)
	if err != nil {
		return err
	}

	if hex.EncodeToString(hash.Sum(nil)) != chksum {
		fmt.Println(hex.EncodeToString(hash.Sum(nil)), chksum)
		return errors.New("checksum of downloaded file does not match expected checksum")
	}

	logger.Infof("Successfully downloaded %s", humanize.IBytes(uint64(b)))
	return nil
}

// ExtractPkg takes a path to a package and extracts it to a directory based on the
// package name, it returns the path to the extraced directory.
func ExtractPkg(src string) (dst string, err error) {
	dst = strings.TrimSuffix(src, filepath.Ext(src))
	if src == "" || dst == "" {
		return "", fmt.Errorf("package extraction paths are invalid: src %s, dst %s", src, dst)
	}
	if err := oswrap.Mkdir(dst, 0755); err != nil && !os.IsExist(err) {
		return "", err
	}
	logger.Infof("Extracting %q to %q", src, dst)

	f, err := oswrap.Open(src)
	if err != nil {
		return "", fmt.Errorf("error reading zip package: %v", err)
	}
	defer f.Close()

	gr, err := gzip.NewReader(f)
	if err != nil {
		if !os.IsExist(err) {
			return "", err
		}
	}
	tr := tar.NewReader(gr)

	for {
		header, err := tr.Next()
		if err == io.EOF {
			break
		}
		if err != nil {
			return "", fmt.Errorf("error opening file: %v", err)
		}

		name := filepath.Clean(header.Name)
		if name[0:3] == ".."+string(os.PathSeparator) {
			return "", fmt.Errorf("error unpacking package, file contains path traversal: %q", name)
		}

		path := filepath.Join(dst, name)
		if header.FileInfo().IsDir() {
			if err := oswrap.MkdirAll(path, 0755); err != nil {
				return "", err
			}
			continue
		}
		if err := oswrap.MkdirAll(filepath.Dir(path), 0755); err != nil {
			return "", err
		}
		f, err := oswrap.OpenFile(path, os.O_RDWR|os.O_CREATE|os.O_TRUNC, os.FileMode(header.Mode))
		if err != nil {
			return "", err
		}
		if _, err := io.Copy(f, tr); err != nil {
			f.Close()
			return "", err
		}
		if err := f.Close(); err != nil {
			return "", err
		}
	}
	return dst, nil
}


text:
package com.ciq.qless.java.lua;

import java.io.IOException;
import java.io.InputStream;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.List;
import java.util.Scanner;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import redis.clients.jedis.Jedis;
import redis.clients.jedis.JedisPool;

public class LuaScript {
	private final JedisPool _pool;
	private String _sha1Key = "";

	private static final Logger _logger = LoggerFactory
			.getLogger(LuaScript.class);

	public LuaScript(JedisPool pool) {
		this._pool = pool;
	}

	public Object callScript(String scriptName, List<String> keys,
			List<String> args) throws LuaScriptException {
		String scriptContent = getScript(scriptName);
		this._sha1Key = getScriptHash(scriptContent);

		try {
			Object o = callScriptByHash(_sha1Key, keys, args);
			return o;
		} catch (Exception e) {
			_logger.info("An attempt to call script (" + scriptName
					+ ") resulted in an exception - " + e.getMessage()
					+ ".  Reloading the script will be attempted.");
			this._sha1Key = reloadScript(scriptName);
			try {
				return callScriptByHash(_sha1Key, keys, args);
			} catch (Exception ex) {
				// Log
				_logger.error("A call to script (" + scriptName
						+ ") resulted in an exception - " + e.getMessage());
				throw new LuaScriptException(ex);
			}
		}
	}

	private String reloadScript(String scriptName) throws LuaScriptException {
		Jedis jedis = this._pool.getResource();
		try {
			return jedis.scriptLoad(getScript(scriptName));
		} catch (Exception ex) {
			_logger.error("Unable to load script (" + scriptName
					+ ") from Redis.  Exception - " + ex.getMessage());
			this._pool.returnBrokenResource(jedis);
			throw new LuaScriptException(ex);
		} finally {
			this._pool.returnResource(jedis);
		}
	}

	private Object callScriptByHash(String sha, List<String> keys,
			List<String> args) throws Exception {
		Jedis jedis = this._pool.getResource();
		try {
			return jedis.evalsha(sha, keys, args);
		} catch (Exception ex) {
			_logger.error("A call to script with SHA (" + sha
					+ ") resulted in an exception - " + ex.getMessage());
			this._pool.returnBrokenResource(jedis);
			throw new LuaScriptException(ex);
		} finally {
			this._pool.returnResource(jedis);
		}
	}

	public String getScript(String scriptName) {
		InputStream stream = null;
		try {
			stream = ClassLoader.getSystemResourceAsStream(scriptName);

			@SuppressWarnings("resource")
			Scanner s = new Scanner(stream).useDelimiter("\\A");

			return s.hasNext() ? s.next() : "";
		} catch (Exception e) {
			_logger.error("Failed to open the " + scriptName
					+ " for processing");
		} finally {
			if (stream != null)
				try {
					stream.close();
				} catch (IOException e) {
					_logger.error("Failed to close the script file Input Stream for file "
							+ scriptName);
				}
		}

		return "";
		// throw new Exception("Script file is missing: " + scriptName);
	}

	// Push all this somewhere else?
	public String getScriptHash(String script) {
		MessageDigest md = null;
		try {
			md = MessageDigest.getInstance("SHA-1");
		} catch (NoSuchAlgorithmException e) {
			// Log it
			_logger.error("Unable to calculate script hash for (" + script
					+ ") resulted in an exception - " + e.getMessage());
		}
		return byteArrayToHexString(md.digest(script.getBytes()));
	}

	public static String byteArrayToHexString(byte[] b) {
		String result = "";
		for (int i = 0; i < b.length; i++) {
			result += Integer.toString((b[i] & 0xff) + 0x100, 16).substring(1);
		}
		return result;
	}
}


text:
package io.github.mikolasan.petprojectnavigator;

import android.content.Context;
import android.content.Intent;
import android.database.Cursor;
import android.os.Bundle;
import androidx.fragment.app.Fragment;
import android.widget.ListView;

/**
 * Created by neupo on 4/2/2017.
 */

class Tools {
    static int getNumber(Cursor cursor, String column) {
        int id = cursor.getColumnIndex(column);
        if (id < 0) {
            return 0;
        }
        return cursor.getInt(id);
    }

    static String getString(Cursor cursor, String column) {
        int id = cursor.getColumnIndex(column);
        if (id < 0) {
            return "";
        }
        return cursor.getString(id);
    }

    static Intent parseTaskItem(Intent intent, Cursor c) {
        intent.putExtra("task_id", getNumber(c, PetDatabase.COLUMN_ID));
        intent.putExtra("title", getString(c, PetDatabase.COLUMN_NAME));
        intent.putExtra("time", getNumber(c, PetDatabase.COLUMN_TIME));
        intent.putExtra("tech_id", getNumber(c, PetDatabase.COLUMN_TECH_ID));
        intent.putExtra("statement", getString(c, PetDatabase.COLUMN_STATEMENT));
        intent.putExtra("links", getString(c, PetDatabase.COLUMN_LINKS));
        intent.putExtra("type_id", getNumber(c, PetDatabase.COLUMN_TYPE_ID));
        return intent;
    }

    static Intent createTaskIntent(Context context, ListView view, int selectedItem) {
        Intent intent = new Intent(context, TaskActivity.class);
        Cursor c = (Cursor) view.getItemAtPosition(selectedItem);
        parseTaskItem(intent, c);
        return intent;
    }

    static Bundle checkLoaderArgs(Bundle args) {
        if (args == null) {
            args = new Bundle();
            args.putBoolean("all_projects", true);
        }
        return args;
    }

    static void initLoader(Fragment fragment, PetDataLoader loader, Bundle args) {
        fragment.getLoaderManager().initLoader(PetDataLoader.tasksActivityId,
                checkLoaderArgs(args),
                loader);
    }

    static void restartLoader(Fragment fragment, PetDataLoader loader, Bundle args) {
        fragment.getLoaderManager().restartLoader(PetDataLoader.tasksActivityId,
                checkLoaderArgs(args),
                loader);
    }

    static void applyQuery(Fragment fragment, PetDataLoader loader, int criterion, String query) {
        Bundle args = new Bundle();
        args.putString("query", query);
        if (criterion != 0) args.putInt("criterion", criterion);
        restartLoader(fragment, loader, args);
    }

    static String getOrSelection(String column, int n) {
        String selection = column + " = ?";
        if (n > 1) {
            selection = "(" + selection;
            int i = 1;
            while (i++ < n) {
                selection += " or " + column + " = ?";
            }
            selection += ")";
        }
        return selection;
    }
}


text:
package com.crossbowffs.quotelock.xposed;

import com.crossbowffs.quotelock.BuildConfig;
import com.crossbowffs.quotelock.utils.Xlog;
import com.crossbowffs.quotelock.utils.XposedUtils;
import de.robv.android.xposed.IXposedHookLoadPackage;
import de.robv.android.xposed.XC_MethodReplacement;
import de.robv.android.xposed.XposedHelpers;
import de.robv.android.xposed.callbacks.XC_LoadPackage;

public class XposedUtilsHook implements IXposedHookLoadPackage {
    private static final String TAG = XposedUtilsHook.class.getSimpleName();
    private static final String QUOTELOCK_PACKAGE = BuildConfig.APPLICATION_ID;
    private static final int MODULE_VERSION = BuildConfig.MODULE_VERSION;

    private static void hookXposedUtils(XC_LoadPackage.LoadPackageParam lpparam) {
        String className = XposedUtils.class.getName();

        Xlog.i(TAG, "Hooking Xposed module status checker");

        // This is the version as fetched when the *module* is loaded
        // If the app is updated, this value will be changed within the
        // app, but will not be changed here. Thus, we can use this to
        // check whether the app and module versions are out of sync.
        XposedHelpers.findAndHookMethod(className, lpparam.classLoader, "getModuleVersion",
            XC_MethodReplacement.returnConstant(MODULE_VERSION));
    }

    @Override
    public void handleLoadPackage(XC_LoadPackage.LoadPackageParam lpparam) throws Throwable {
        if (QUOTELOCK_PACKAGE.equals(lpparam.packageName)) {
            try {
                hookXposedUtils(lpparam);
            } catch (Throwable e) {
                Xlog.e(TAG, "Failed to hook Xposed module status checker", e);
                throw e;
            }
        }
    }
}


text:
package com.cardpay.pccredit.main;

import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.HashMap;
import java.util.List;

import javax.servlet.http.HttpServletRequest;

import net.sf.json.JSONArray;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.cardpay.pccredit.customer.service.CustomerInforService;
import com.cardpay.pccredit.customer.service.CustomerMarketingService;
import com.cardpay.pccredit.customer.service.MaintenanceService;
import com.cardpay.pccredit.divisional.service.DivisionalService;
import com.cardpay.pccredit.afterloan.service.AfterloanCheckService;
import com.cardpay.pccredit.intopieces.constant.Constant;
import com.cardpay.pccredit.intopieces.dao.CustomerApplicationIntopieceWaitDao;
import com.cardpay.pccredit.intopieces.dao.IntoPiecesDao;
import com.cardpay.pccredit.intopieces.filter.CustomerApplicationProcessFilter;
import com.cardpay.pccredit.intopieces.model.QzApplnApprovalMeeting;
import com.cardpay.pccredit.intopieces.service.CustomerApplicationInfoService;
import com.cardpay.pccredit.manager.dao.StatisticsManagerDao;
import com.cardpay.pccredit.manager.service.AccountManagerParameterService;
import com.cardpay.pccredit.manager.service.InformationMaintenanceService;
import com.cardpay.pccredit.manager.service.ManagerAssessmentScoreService;
import com.cardpay.pccredit.manager.service.ManagerSalaryService;
import com.cardpay.pccredit.manager.service.StatisticsScheduleService;
import com.cardpay.pccredit.manager.web.AccountManagerParameterForm;
import com.cardpay.pccredit.report.model.HomeTips;
import com.cardpay.pccredit.report.model.NameValueRecord;
import com.cardpay.pccredit.report.service.StatisticalCommonService;
import com.cardpay.pccredit.riskControl.dao.NplsInfomationDao;
import com.cardpay.pccredit.riskControl.service.CustomerOverdueService;
import com.cardpay.pccredit.riskControl.service.RiskCustomerCollectionService;
import com.cardpay.pccredit.system.model.Dict;
import com.cardpay.pccredit.system.service.SystemUserService;
import com.wicresoft.jrad.base.auth.IUser;
import com.wicresoft.jrad.base.enviroment.GlobalSetting;
import com.wicresoft.jrad.base.web.JRadModelAndView;
import com.wicresoft.jrad.base.web.menu.UIMenuMgr;
import com.wicresoft.jrad.base.web.security.LoginManager;
import com.wicresoft.jrad.modules.privilege.model.Organization;
import com.wicresoft.jrad.modules.privilege.model.User;
import com.wicresoft.jrad.modules.privilege.service.OrganizationService;
import com.wicresoft.util.spring.Beans;
import com.wicresoft.util.spring.mvc.mv.AbstractModelAndView;
import com.wicresoft.util.web.RequestHelper;

/**
 * 系统首页
 *
 * @author Vincent
 * @created on Dec 27, 2013
 *
 * @version $Id: MainController.java 1639 2014-10-09 05:15:35Z vincent $
 */
@Controller
public class MainController {
	@Autowired
	private IntoPiecesDao intoPiecesDao;
	@Autowired
	private GlobalSetting globalSetting;

	@Autowired
	private UIMenuMgr menuMgr;

	@Autowired
	private LoginManager loginManager;

	@Autowired
	private SystemUserService systemUserService;

	@Autowired
	private OrganizationService organizationService;

	@Autowired
	private AccountManagerParameterService accountManagerParameterService;

	@Autowired
	private ManagerAssessmentScoreService managerAssessmentScoreService;

	@Autowired
	private CustomerMarketingService customerMarketingService;

	@Autowired
	private DivisionalService divisionalService;

	@Autowired
	private CustomerApplicationInfoService customerApplicationInfoService;

	@Autowired
	private MaintenanceService maintenanceService;

	@Autowired
	private RiskCustomerCollectionService riskCustomerCollectionService;

	@Autowired
	private CustomerInforService customerInforService;

	@Autowired
	private ManagerSalaryService managerSalaryService;

	@Autowired
	private StatisticsScheduleService statisticsScheduleService;

	@Autowired
	private StatisticsManagerDao statisticsManagerDao;

	@Autowired
	private CustomerOverdueService customerOverdueService;

	@Autowired
	private NplsInfomationDao nplsInfomationDao;

	@Autowired
	private InformationMaintenanceService informationMaintenanceService;

	@Autowired
	private MainService mainService;

	@Autowired
	private AfterloanCheckService afterLoanCheckService;

	@Autowired
	private StatisticalCommonService statisticalCommonService;

	@Autowired
	private CustomerApplicationIntopieceWaitDao customerApplicationIntopieceWaitDao;

	@ResponseBody
	@RequestMapping(value = "/main.page", method = { RequestMethod.GET })
	public AbstractModelAndView mainPage(HttpServletRequest request) {
		JRadModelAndView mv = new JRadModelAndView("/main", request);

		if (globalSetting.isSuperAdminMode(request)) {
			mv.addObject("menuList", menuMgr.getAllUiMenus());
		}
		else {
			// 存储菜单
			IUser user = loginManager.getLoggedInUser(request);
			request.getSession().setAttribute("menuList", menuMgr.getUiMenusByUser(user.getId()));
		}

		return mv;
	}

	@RequestMapping(value = "/home.page", method = { RequestMethod.GET })
	public AbstractModelAndView indexPage(HttpServletRequest request) {

		//JRadModelAndView mv = new JRadModelAndView("home/home", request);
		User user = (User) Beans.get(LoginManager.class).getLoggedInUser(request);
		String userId = user.getId();
		String rolename = user.getRoles().get(0).getName();

		//calendar.add(Calendar.DATE, 3);
		//int day1 = calendar.get(Calendar.DAY_OF_MONTH);
		//calendar.add(Calendar.DATE, 1);
		//int day2 = calendar.get(Calendar.DAY_OF_MONTH);
		//Date date = calendar.getTime();
		//Date day1 = DateHelper.normalizeDate(DateHelper.shiftDay(date, 3), "yyyy-MM-dd");
		//Date day2 = DateHelper.normalizeDate(DateHelper.shiftDay(date, 4), "yyyy-MM-dd");
		Organization organization = organizationService.findOrgByUserId(userId);
		AccountManagerParameterForm accountManagerParameter = accountManagerParameterService.findAccountManagerParameterByUserId(userId);
		//查询贷后检查任务数
		int loanCount = afterLoanCheckService.findAferLoanCheckCountByUserId(userId);
		//查询所检查提醒任务
		//获取贷后点击通知时限和截止时限
		List<Dict> dict = customerInforService.findDict("afterloan");
		String remindTime="";
		String endTime="";
		for(int i=0;i<dict.size();i++){
			Dict dictd = dict.get(i);
			if("reminddate".equals(dictd.getTypeCode())){
				remindTime=dictd.getTypeName();
			}else if("enddate".equals(dictd.getTypeCode())){
				endTime=dictd.getTypeName();
			}
		}
		//int remindCount = afterLoanCheckService.findAferLoanCheckRemindCount(enddate,userId);
		//客户经理层级
		String level = "";
		if(accountManagerParameter != null ){
		 level = accountManagerParameter.getLevelInformation();
		}
		/*String pageurl ="";
		if(level.equals("MANA005") || level.equals("MANA003") ){

			//pageurl = "home/managerhome";
			pageurl = "home/home";
		}
		else{

			pageurl = "home/home";

		}*/
		String pageurl = "home/home";
		JRadModelAndView mv = new JRadModelAndView(pageurl, request);
		/*统计客户已授信额度
		Double doubleApply=managerAssessmentScoreService.getManagerApplyQuota(userId);

		HashMap<String,Integer> homeData = mainService.getHomeData(userId,0);
		HashMap<String,Object> rightHomeData = getRightHomeData(userId);*/
		mv.addObject("accountManagerParameter",accountManagerParameter);
		mv.addObject("rolename",rolename);
		String organizationname = organization.getName();
		mv.addObject("organizationname",organizationname);
		/*mv.addObject("doubleApply",doubleApply);
		mv.addObject("day1",day1);
		mv.addObject("day2",day2);
		mv.addObject("loanCount",loanCount);
		mv.addObject("remindCount",remindCount);
		mv.addObject("remindCountTeam",remindCountTeam);
		mv.addObject("roleName",roleName);*/

		/*center
		mv.addObject("marketing",homeData.get("marketing"));
		mv.addObject("divisional",homeData.get("divisional"));
		mv.addObject("applicationReject",homeData.get("applicationReject"));
		mv.addObject("applicationInfo",homeData.get("applicationInfo"));
		mv.addObject("maintenance",homeData.get("maintenance"));
		mv.addObject("officerChannels",homeData.get("officerChannels"));
		mv.addObject("collection",homeData.get("collection"));
		mv.addObject("riskNumber",homeData.get("riskNumber"));
		mv.addObject("abilityNumber",homeData.get("abilityNumber"));
		mv.addObject("productNumber",homeData.get("productNumber"));*/

		/*right
		mv.addObject("not",rightHomeData.get("not"));
		mv.addObject("already",rightHomeData.get("already"));
		mv.addObject("wait",rightHomeData.get("wait"));*/

		/*进件状况
		mv.addObject("UserApplicationInfo",rightHomeData.get("UserApplicationInfo"));
		mv.addObject("UserApplicationSuccess",rightHomeData.get("UserApplicationSuccess"));
		mv.addObject("UserApplicationNopass",rightHomeData.get("UserApplicationNopass"));
		mv.addObject("UserApplicationRefuse",rightHomeData.get("UserApplicationRefuse"));*/

		/*奖励激励状况
		mv.addObject("reward",rightHomeData.get("reward"));
		mv.addObject("riskGuarantee",rightHomeData.get("riskGuarantee"));*/

		/*客户经营状况(余额)
		mv.addObject("credit",rightHomeData.get("credit"));*/

		/*客户经营状况(数量
		mv.addObject("customer",rightHomeData.get("customer"));
		mv.addObject("riskCustomer",rightHomeData.get("riskCustomer"));
		mv.addObject("verificationCustomer",rightHomeData.get("verificationCustomer"));*/

		/*
		if(level.equals("MANA005") || level.equals("MANA003") ){
			// 当前进件状况
			mv.addObject("applicationStatusJson",statisticalCommonService.getApplicationStatusJson());
			// 当前贷款状况
			mv.addObject("creditStatusJson",statisticalCommonService.getCreditStatusJson());

			// 当前卡片状况
			List<NameValueRecord> cardList = statisticalCommonService.statisticalCardStatus();
			mv.addObject("cardStatusCategoriesJson",statisticalCommonService.getCardStatusCategoriesJson(cardList));
			mv.addObject("cardStatusValuesJson",statisticalCommonService.getCardStatusValuesJson(cardList));
		}*/

		//新版首页
		List<String> userIds = null;
		CustomerApplicationProcessFilter filter = new CustomerApplicationProcessFilter();
		if(rolename.equals(Constant.COMMON_USER)){
			userIds = new ArrayList<String>();
			userIds.add(userId);
		}
		else if(rolename.equals(Constant.COMMON_USER_BRANCH) || rolename.equals(Constant.BRANCH_USER)){
			filter.setFilterOrgId("1");//支行权限
			//查询机构下的客户经理
			List<Dict> org_ls = intoPiecesDao.findBelongOrgs(user.getOrganization().getId());
			for(Dict obj : org_ls){
				List<Dict> users = intoPiecesDao.findOrgBelogCusMgr(obj.getTypeCode());
				if(users != null && users.size()>0 && userIds == null){
					userIds = new ArrayList<String>();
				}
				for(Dict obj2 : users){
					userIds.add(obj2.getTypeCode());
				}
			}
		}
		else if(rolename.equals(Constant.TEAM_LEADER)){
			filter.setFilterTeamLeader("1");//团队长
			//查找团队下的客户经理
			List<Dict> users = intoPiecesDao.findTeamBelongCusMgr(user.getId());
			if(users != null && users.size()>0){
				userIds = new ArrayList<String>();
			}
			for(Dict obj : users){
				userIds.add(obj.getTypeCode());
			}
		}

		filter.setUserIds(userIds);

		//用信预警提示,按客户经理维度
		List<HomeTips> tips1 = statisticalCommonService.getUsedCreditByUserId(filter);
		mv.addObject("tips1",tips1);
		//贷后提醒
		List<HomeTips> tips2 = afterLoanCheckService.findAferLoanCheckRemindCountTeam(endTime,remindTime,filter);
		mv.addObject("tips2",tips2);
		//21日还息提醒
		Calendar calendar = Calendar.getInstance();
		calendar.set(Calendar.DAY_OF_MONTH, 21);
		List<HomeTips> tips3 = afterLoanCheckService.getPsNormIntAmtListForHome(filter,calendar.getTime());
		mv.addObject("tips3",tips3);
		//即将到期客户(借据)
		List<HomeTips> tips4 = statisticalCommonService.getExpiryClientNum(filter);
		mv.addObject("tips4",tips4);
		//已到期客户()
		List<HomeTips> tips5 = statisticalCommonService.getAlreadyExpiryClientNum(filter);
		mv.addObject("tips5",tips5);

		//查询该客户是否有排审
		//如果是审贷会成员
		List<QzApplnApprovalMeeting> meeting_pre_ls = customerApplicationIntopieceWaitDao.findMeetingByUserIdPre(userId);
		List<QzApplnApprovalMeeting> meeting_today_ls = customerApplicationIntopieceWaitDao.findMeetingByUserIdToday(userId);
		List<QzApplnApprovalMeeting> meeting_tomorrow_ls = customerApplicationIntopieceWaitDao.findMeetingByUserIdTomorrow(userId);
		mv.addObject("meeting_pre_ls",meeting_pre_ls);
		mv.addObject("meeting_today_ls",meeting_today_ls);
		mv.addObject("meeting_tomorrow_ls",meeting_tomorrow_ls);

		//如果是客户经理
		List<QzApplnApprovalMeeting> meeting_pre_manager_ls = customerApplicationIntopieceWaitDao.findMeetingByManagerIdPre(userId);
		List<QzApplnApprovalMeeting> meeting_today_manager_ls = customerApplicationIntopieceWaitDao.findMeetingByManagerIdToday(userId);
		List<QzApplnApprovalMeeting> meeting_tomorrow_manager_ls = customerApplicationIntopieceWaitDao.findMeetingByManagerIdTomorrow(userId);
		mv.addObject("meeting_pre_manager_ls",meeting_pre_manager_ls);
		mv.addObject("meeting_today_manager_ls",meeting_today_manager_ls);
		mv.addObject("meeting_tomorrow_manager_ls",meeting_tomorrow_manager_ls);

		return mv;
	}

	/*首页右边信息*/
	private HashMap<String,Object> getRightHomeData(String userId){
		HashMap<String,Object> rightHomeData = new HashMap<String,Object>();
		/*用户bar*/
		/*未*/
		int not_size = customerApplicationInfoService.findCustomerApplicationInfoCount(userId, Constant.SAVE_INTOPICES, Constant.NOPASS_INTOPICES);
		/*已*/
		int already_size = customerApplicationInfoService.findCustomerApplicationInfoCount(userId,Constant.SUCCESS_INTOPICES,Constant.APPROVED_INTOPICES);
		/*待*/
		int wait_size = customerApplicationInfoService.findCustomerApplicationInfoCount(userId,Constant.APPROVE_INTOPICES,null);
		rightHomeData.put("not", not_size);
		rightHomeData.put("already", already_size);
		rightHomeData.put("wait", wait_size);
		/*进件状况*/
		/*进件数量*/
		int application_info_size = customerApplicationInfoService.findCustomerApplicationInfoCount(userId, null, null);
		/*审批通过*/
		int application_success_size = customerApplicationInfoService.findCustomerApplicationInfoCount(userId, Constant.SUCCESS_INTOPICES, null);
		/*补充调查*/
		int application_nopass_size = customerApplicationInfoService.findCustomerApplicationInfoCount(userId, Constant.NOPASS_INTOPICES, null);
		/*拒绝*/
		int application_refuse_size = customerApplicationInfoService.findCustomerApplicationInfoCount(userId, Constant.REFUSE_INTOPICES, null);
		rightHomeData.put("UserApplicationInfo", application_info_size);
		rightHomeData.put("UserApplicationSuccess", application_success_size);
		rightHomeData.put("UserApplicationNopass", application_nopass_size);
		rightHomeData.put("UserApplicationRefuse", application_refuse_size);
		/*奖励激励状况*/
		Calendar c = Calendar.getInstance();
		int year = c.get(Calendar.YEAR);
		int month = c.get(Calendar.MONTH);
		if(month == 0){
			year = year - 1;
			month = 12;
		}
		/*奖励激励****************************************************************************/
		String reward_size = managerSalaryService.getRewardIncentiveInformation(year, month, userId);
		/*风险保证*/
		String riskGuarantee_size = managerSalaryService.getReturnPrepareAmountById(c.get(Calendar.YEAR), c.get(Calendar.MONTH), userId);
		rightHomeData.put("reward", reward_size);
		rightHomeData.put("riskGuarantee", riskGuarantee_size);
		/*客户经营状况(数量)*/
		/*授信*/
		int credit_size = statisticsScheduleService.findCustomerApplyQuota(userId);
		rightHomeData.put("credit", credit_size);
		/*客户经营状况(余额)*/
		/*有效客户*/
		int customer_size = customerInforService.findCustomerInforCountByUserId(userId);
		rightHomeData.put("customer", customer_size);
		/*逾期客户*/
		int risk_customer_size = customerOverdueService.findCustomerOverdueCountById(userId);
		rightHomeData.put("riskCustomer", risk_customer_size);
		/*核销客户*/
		int verification_customer_size = nplsInfomationDao.findNplsInformationCountById(userId);
		rightHomeData.put("verificationCustomer", verification_customer_size);
		return rightHomeData;
	}
	@RequestMapping(value = "/homeData.json", method = { RequestMethod.GET })
	public void getHomeDataToWeb(HttpServletRequest request,PrintWriter printWriter){
		IUser user =Beans.get(LoginManager.class).getLoggedInUser(request);
		String userId = user.getId();
		int day = RequestHelper.getIntValue(request, "day");
		HashMap<String,Integer> homeData = mainService.getHomeData(userId,day);
		JSONArray json = JSONArray.fromObject(homeData);
		printWriter.write(json.toString());
		printWriter.flush();
		printWriter.close();
	}
}