text:
<?php

namespace app\models;

use \Yii;
use \yii\db\ActiveRecord;
use app\models\appdata\AppData;
use app\models\Profile;
use app\models\NotificationSubscription;
use app\models\UserTourNotification;

class User extends ActiveRecord implements \yii\web\IdentityInterface
{

    const DELETED = 1;
    const NOT_DELETED = 0;

    const STATUS_REGGED = 0; // just registered
    const STATUS_ACTIVE = 1;
    const STATUS_BANNED = 9;

    // public $name;

    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%user}}';
    }

    public function behaviors()
    {
        return [
            'timestamp' => [
                'class' => 'yii\behaviors\TimestampBehavior',
                'attributes' => [
                    \yii\db\ActiveRecord::EVENT_BEFORE_INSERT => ['created_at', 'updated_at'],
                    \yii\db\ActiveRecord::EVENT_BEFORE_UPDATE => ['updated_at'],
                    ],
                'value' => new \yii\db\Expression('NOW()'),
            ],
        ];
    }

    public function rules()
    {
        return [
            [['email', 'password_hash', 'username'], 'string'],
            ['status', 'integer'],
            ['status', 'default', 'value' => self::STATUS_ACTIVE],
            ['deleted', 'default', 'value' => self::NOT_DELETED],
        ];
    }

    public function attributeLabels()
    {
        return [
            'id' => Yii::t('app', 'ID'),
            'name' => Yii::t('app', 'Name'),
            'email' => Yii::t('app', 'Email'),
            'auth_key' => Yii::t('app', 'Auth Key'),
            'password_reset_token' => Yii::t('app', 'Password Reset Token'),
            'status' => Yii::t('app', 'Status'),
            'created_at' => Yii::t('app', 'Created At'),
            'updated_at' => Yii::t('app', 'Updated At'),
            'deleted' => Yii::t('app', 'Deleted'),
        ];
    }

    /**
     * @inheritdoc
     */
    public static function findIdentity($id)
    {
        return static::findOne(['id' => $id, 'status' => self::STATUS_ACTIVE]);
    }

    /**
     * @inheritdoc
     */
    public static function findIdentityByAccessToken($token, $type = null)
    {
        throw new NotSupportedException('"findIdentityByAccessToken" is not implemented.');
    }

    /**
     * Finds user by username
     *
     * @param string $username
     * @return static|null
     */
    public static function findByEmail($email)
    {
        return static::findOne(['email' => $email, 'status' => self::STATUS_ACTIVE]);
    }

    /**
     * Finds user by password reset token
     *
     * @param string $token password reset token
     * @return static|null
     */
    public static function findByPasswordResetToken($token)
    {
        if (!static::isPasswordResetTokenValid($token)) {
            return null;
        }

        return static::findOne([
            'password_reset_token' => $token,
            'status' => self::STATUS_ACTIVE,
        ]);
    }

    /**
     * Finds out if password reset token is valid
     *
     * @param string $token password reset token
     * @return boolean
     */
    public static function isPasswordResetTokenValid($token)
    {
        if (empty($token)) {
            return false;
        }

        $timestamp = (int) substr($token, strrpos($token, '_') + 1);
        $expire = Yii::$app->params['user.passwordResetTokenExpire'];
        return $timestamp + $expire >= time();
    }

    /**
     * @inheritdoc
     */
    public function getId()
    {
        return $this->getPrimaryKey();
    }

    /**
     * @inheritdoc
     */
    public function getAuthKey()
    {
        return $this->auth_key;
    }

    /**
     * @inheritdoc
     */
    public function validateAuthKey($authKey)
    {
        return $this->getAuthKey() === $authKey;
    }

    /**
     * Validates password
     *
     * @param string $password password to validate
     * @return boolean if password provided is valid for current user
     */
    public function validatePassword($password)
    {
        return Yii::$app->security->validatePassword($password, $this->password_hash);
    }

    /**
     * Generates password hash from password and sets it to the model
     *
     * @param string $password
     */
    public function setPassword($password)
    {
        $this->password_hash = Yii::$app->security->generatePasswordHash($password);
    }

    /**
     * Generates "remember me" authentication key
     */
    public function generateAuthKey()
    {
        $this->auth_key = Yii::$app->security->generateRandomString();
    }

    /**
     * Generates new password reset token
     */
    public function generatePasswordResetToken()
    {
        $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();
    }

    /**
     * Removes password reset token
     */
    public function removePasswordResetToken()
    {
        $this->password_reset_token = null;
    }

    public function initials()
    {
        if (!is_null($this->name)) {
            $names = explode(" ", $this->name);
            $initials = "";
            foreach ($names as $name) {
                $initials .= $name[0].".";
            }
            return $initials;
        } else {
            return Yii::t('app', 'Anonymous');
        }
    }

    public function hasDetails()
    {
        return !empty($this->name) && !empty($this->phone_number);
    }

    public function getName()
    {
        return $this->profile->name;
    }

    public function getPhone_number()
    {
        return $this->profile->phone_number;
    }

    public function getProfile()
    {
        return $this->hasOne(Profile::className(), ['user_id' => 'id']);
    }

    public function getNotificationSubscriptions()
    {
        return $this->hasMany(NotificationSubscription::className(), ['user_id' => 'id']);
    }

    public function countUnreadUserTourNotifications()
    {
        return $this->hasMany(UserTourNotification::className(), ['user_id' => 'id'])->where(['read_by_user' => UserTourNotification::UNREAD])->count();
    }

    public function getUserTourNotifications()
    {
        return $this->hasMany(UserTourNotification::className(), ['user_id' => 'id']);
    }

    public function getUnreadUserTourNotifications()
    {
        return $this->hasMany(UserTourNotification::className(), ['user_id' => 'id'])->where(['read_by_user' => UserTourNotification::UNREAD]);
    }

    public function getReadUserTourNotifications()
    {
        return $this->hasMany(UserTourNotification::className(), ['user_id' => 'id'])->where(['read_by_user' => UserTourNotification::READ]);
    }

    /**
     * @return \yii\db\ActiveQuery
     */
    public function getUserTours()
    {
        return $this->hasMany(UserTour::className(), ['user_id' => 'id']);
    }

    public function getTours()
    {
        return $this->hasMany(Tour::className(), ['id' => 'tour_id'])
            ->via('userTours');
    }

    public function selfDelete()
    {
        $this->deleted = self::DELETED;
    }

    public function selfUnDelete()
    {
        $this->deleted = self::NOT_DELETED;
    }

    public function isParticipant($tour_id)
    {
        return UserTour::findOne(['user_id' => $this->id, 'tour_id' => (int)$tour_id, 'deleted' => AppData::NOT_DELETED]);
    }
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="ChangeListManager">
    <list default="true" id="e8f8d3a9-d9f0-4b19-8857-0b3da1b56caf" name="Default" comment="">
      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/var/cache/.gitkeep" />
      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/var/logs/.gitkeep" />
      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/var/sessions/.gitkeep" />
      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/web/apple-touch-icon.png" />
      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/web/favicon.ico" />
      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.gitignore" />
      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/app/.htaccess" />
      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/.htaccess" />
      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/web/.htaccess" />
      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/AppBundle/AppBundle.php" />
      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/app/AppCache.php" />
      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/app/AppKernel.php" />
      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/AppBundle/Controller/DefaultController.php" />
      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/tests/AppBundle/Controller/DefaultControllerTest.php" />
      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/LICENSE" />
      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/README.md" />
      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/var/SymfonyRequirements.php" />
      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/web/app.php" />
      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/web/app_dev.php" />
      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/app/autoload.php" />
      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/app/Resources/views/base.html.twig" />
      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/composer.json" />
      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/composer.lock" />
      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/web/config.php" />
      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/app/config/config.yml" />
      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/app/config/config_dev.yml" />
      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/app/config/config_prod.yml" />
      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/app/config/config_test.yml" />
      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/bin/console" />
      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/app/Resources/views/default/index.html.twig" />
      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/app/config/parameters.yml.dist" />
      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/phpunit.xml.dist" />
      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/web/robots.txt" />
      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/app/config/routing.yml" />
      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/app/config/routing_dev.yml" />
      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/app/config/security.yml" />
      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/app/config/services.yml" />
      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/bin/symfony_requirements" />
    </list>
    <ignored path="my_project_name.iws" />
    <ignored path=".idea/workspace.xml" />
    <ignored path=".idea/dataSources.local.xml" />
    <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
    <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="DatabaseView">
    <option name="FLATTEN" value="false" />
    <option name="GROUP_BY_TYPE" value="true" />
    <option name="SORT_CHILDREN" value="false" />
    <option name="SHOW_TABLE_CONSTRAINTS" value="true" />
  </component>
  <component name="ExecutionTargetManager" SELECTED_TARGET="default_target" />
  <component name="FavoritesManager">
    <favorites_list name="my_project_name" />
  </component>
  <component name="FileEditorManager">
    <leaf>
      <file leaf-file-name="AuthController.php" pinned="false" current-in-tab="false">
        <entry file="file://$PROJECT_DIR$/src/TralangBundle/Controller/AuthController.php">
          <provider selected="true" editor-type-id="text-editor">
            <state vertical-scroll-proportion="12.076923">
              <caret line="27" column="61" selection-start-line="27" selection-start-column="61" selection-end-line="27" selection-end-column="61" />
              <folding>
                <element signature="e#44#101#0#PHP" expanded="true" />
                <marker date="1455823586850" expanded="true" signature="2801:2826" placeholder="SELECT MAX(i..users..." />
              </folding>
            </state>
          </provider>
        </entry>
      </file>
      <file leaf-file-name="home.html.twig" pinned="false" current-in-tab="false">
        <entry file="file://$PROJECT_DIR$/src/TralangBundle/Resources/views/MainView/home.html.twig">
          <provider selected="true" editor-type-id="text-editor">
            <state vertical-scroll-proportion="-13.730769">
              <caret line="21" column="41" selection-start-line="21" selection-start-column="41" selection-end-line="21" selection-end-column="41" />
              <folding />
            </state>
          </provider>
        </entry>
      </file>
      <file leaf-file-name="reg.html.php" pinned="false" current-in-tab="false">
        <entry file="file://$PROJECT_DIR$/src/TralangBundle/Resources/views/Auth/reg.html.php">
          <provider selected="true" editor-type-id="text-editor">
            <state vertical-scroll-proportion="-4.576923">
              <caret line="7" column="20" selection-start-line="7" selection-start-column="20" selection-end-line="7" selection-end-column="20" />
              <folding />
            </state>
          </provider>
        </entry>
      </file>
      <file leaf-file-name="base.html.twig" pinned="false" current-in-tab="false">
        <entry file="file://$PROJECT_DIR$/app/Resources/views/base.html.twig">
          <provider selected="true" editor-type-id="text-editor">
            <state vertical-scroll-proportion="-5.8846154">
              <caret line="9" column="38" selection-start-line="9" selection-start-column="38" selection-end-line="9" selection-end-column="38" />
              <folding />
            </state>
          </provider>
        </entry>
      </file>
      <file leaf-file-name="Users.php" pinned="false" current-in-tab="true">
        <entry file="file://$PROJECT_DIR$/src/TralangBundle/Entity/Users.php">
          <provider selected="true" editor-type-id="text-editor">
            <state vertical-scroll-proportion="1.821256">
              <caret line="72" column="0" selection-start-line="72" selection-start-column="0" selection-end-line="72" selection-end-column="0" />
              <folding />
            </state>
          </provider>
        </entry>
      </file>
      <file leaf-file-name="auth.html.php" pinned="false" current-in-tab="false">
        <entry file="file://$PROJECT_DIR$/src/TralangBundle/Resources/views/Auth/auth.html.php">
          <provider selected="true" editor-type-id="text-editor">
            <state vertical-scroll-proportion="-5.8846154">
              <caret line="9" column="0" selection-start-line="9" selection-start-column="0" selection-end-line="9" selection-end-column="0" />
              <folding />
            </state>
          </provider>
        </entry>
      </file>
      <file leaf-file-name="routing.php" pinned="false" current-in-tab="false">
        <entry file="file://$PROJECT_DIR$/src/TralangBundle/Resources/config/routing.php">
          <provider selected="true" editor-type-id="text-editor">
            <state vertical-scroll-proportion="-7.8461537">
              <caret line="13" column="4" selection-start-line="13" selection-start-column="4" selection-end-line="13" selection-end-column="4" />
              <folding />
            </state>
          </provider>
        </entry>
      </file>
      <file leaf-file-name="ViewController.php" pinned="false" current-in-tab="false">
        <entry file="file://$PROJECT_DIR$/src/TralangBundle/Controller/ViewController.php">
          <provider selected="true" editor-type-id="text-editor">
            <state vertical-scroll-proportion="-4.576923">
              <caret line="7" column="39" selection-start-line="7" selection-start-column="39" selection-end-line="7" selection-end-column="39" />
              <folding>
                <element signature="e#44#101#0#PHP" expanded="true" />
              </folding>
            </state>
          </provider>
        </entry>
      </file>
      <file leaf-file-name="index.html.twig" pinned="false" current-in-tab="false">
        <entry file="file://$PROJECT_DIR$/src/TralangBundle/Resources/views/Default/index.html.twig">
          <provider selected="true" editor-type-id="text-editor">
            <state vertical-scroll-proportion="-0.65384614">
              <caret line="1" column="0" selection-start-line="1" selection-start-column="0" selection-end-line="4" selection-end-column="14" />
              <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="CHANGED_PATHS">
      <list>
        <option value="$PROJECT_DIR$/src/TralangBundle/Tests/Controller/DefaultControllerTest.php" />
        <option value="$PROJECT_DIR$/app/config/config.yml" />
        <option value="$PROJECT_DIR$/app/config/parameters.yml.dist" />
        <option value="$PROJECT_DIR$/src/TralangBundle/Controller/Entity/Users.php" />
        <option value="$PROJECT_DIR$/app/config/parameters.yml" />
        <option value="$PROJECT_DIR$/src/TralangBundle/Resources/views/Default/index.html.twig" />
        <option value="$PROJECT_DIR$/src/TralangBundle/Resources/views/main_view.php.html" />
        <option value="$PROJECT_DIR$/app/config/routing_dev.yml" />
        <option value="$PROJECT_DIR$/src/TralangBundle/Controller/HelloController.php" />
        <option value="$PROJECT_DIR$/app/config/routing.yml" />
        <option value="$PROJECT_DIR$/src/TralangBundle/Resources/views/Auth/reg.html.php" />
        <option value="$PROJECT_DIR$/app/AppKernel.php" />
        <option value="$PROJECT_DIR$/src/TralangBundle/Resources/views/MainView/home.html.php" />
        <option value="$PROJECT_DIR$/src/TralangBundle/Entity/Users.php" />
        <option value="$PROJECT_DIR$/src/TralangBundle/Resources/config/routing.php" />
        <option value="$PROJECT_DIR$/src/TralangBundle/Resources/views/Auth/auth.html.php" />
        <option value="$PROJECT_DIR$/src/TralangBundle/Controller/AuthController.php" />
        <option value="$PROJECT_DIR$/src/TralangBundle/Controller/ViewController.php" />
        <option value="$PROJECT_DIR$/src/TralangBundle/Resources/views/MainView/home.html.twig" />
      </list>
    </option>
  </component>
  <component name="JsBuildToolGruntFileManager" detection-done="true" />
  <component name="JsGulpfileManager">
    <detection-done>true</detection-done>
  </component>
  <component name="NamedScopeManager">
    <order />
  </component>
  <component name="PhpServers">
    <servers />
  </component>
  <component name="PhpWorkspaceProjectConfiguration" backward_compatibility_performed="true" />
  <component name="ProjectFrameBounds">
    <option name="x" value="-8" />
    <option name="y" value="-8" />
    <option name="width" value="1320" />
    <option name="height" value="784" />
  </component>
  <component name="ProjectLevelVcsManager" settingsEditedManually="false">
    <OptionsSetting value="true" id="Add" />
    <OptionsSetting value="true" id="Remove" />
    <OptionsSetting value="true" id="Checkout" />
    <OptionsSetting value="true" id="Update" />
    <OptionsSetting value="true" id="Status" />
    <OptionsSetting value="true" id="Edit" />
    <ConfirmationsSetting value="0" id="Add" />
    <ConfirmationsSetting value="0" id="Remove" />
  </component>
  <component name="ProjectView">
    <navigator currentView="ProjectPane" proportions="" version="1">
      <flattenPackages />
      <showMembers />
      <showModules />
      <showLibraryContents />
      <hideEmptyPackages />
      <abbreviatePackageNames />
      <autoscrollToSource />
      <autoscrollFromSource />
      <sortByType />
    </navigator>
    <panes>
      <pane id="ProjectPane">
        <subPane>
          <PATH>
            <PATH_ELEMENT>
              <option name="myItemId" value="my_project_name" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
            </PATH_ELEMENT>
          </PATH>
          <PATH>
            <PATH_ELEMENT>
              <option name="myItemId" value="my_project_name" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="my_project_name" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
            </PATH_ELEMENT>
          </PATH>
          <PATH>
            <PATH_ELEMENT>
              <option name="myItemId" value="my_project_name" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="my_project_name" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="src" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
            </PATH_ELEMENT>
          </PATH>
        </subPane>
      </pane>
      <pane id="Scope" />
      <pane id="Scratches" />
    </panes>
  </component>
  <component name="PropertiesComponent">
    <property name="WebServerToolWindowFactoryState" value="false" />
    <property name="last_opened_file_path" value="$PROJECT_DIR$/../../tralang" />
    <property name="FullScreen" value="false" />
  </component>
  <component name="RecentsManager">
    <key name="MoveFile.RECENT_KEYS">
      <recent name="C:\xampp\htdocs\site\my_project_name\src\TralangBundle\Resources\views\Default" />
      <recent name="C:\xampp\htdocs\site\my_project_name\src\TralangBundle" />
    </key>
  </component>
  <component name="RunManager">
    <configuration default="true" type="JavascriptDebugType" factoryName="JavaScript Debug">
      <method />
    </configuration>
    <configuration default="true" type="PHPUnitRunConfigurationType" factoryName="PHPUnit">
      <TestRunner />
      <method />
    </configuration>
    <configuration default="true" type="PhpBehatConfigurationType" factoryName="Behat">
      <BehatRunner />
      <method />
    </configuration>
    <configuration default="true" type="PhpLocalRunConfigurationType" factoryName="PHP Console">
      <method />
    </configuration>
    <configuration default="true" type="PhpUnitRemoteRunConfigurationType" factoryName="PHPUnit on Server">
      <method />
    </configuration>
    <configuration default="true" type="js.build_tools.gulp" factoryName="Gulp.js">
      <node-options />
      <gulpfile />
      <tasks />
      <arguments />
      <pass-parent-envs>true</pass-parent-envs>
      <envs />
      <method />
    </configuration>
  </component>
  <component name="ShelveChangesManager" show_recycled="false" />
  <component name="SvnConfiguration">
    <configuration />
  </component>
  <component name="TaskManager">
    <task active="true" id="Default" summary="Default task">
      <changelist id="e8f8d3a9-d9f0-4b19-8857-0b3da1b56caf" name="Default" comment="" />
      <created>1455578352759</created>
      <option name="number" value="Default" />
      <updated>1455578352759</updated>
    </task>
    <servers />
  </component>
  <component name="ToolWindowManager">
    <frame x="-8" y="-8" width="1320" height="784" extended-state="6" />
    <editor active="true" />
    <layout>
      <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.25" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
      <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="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
      <window_info id="Application Servers" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="10" 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.3297546" sideWeight="0.5" order="3" 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="8" 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="false" content_ui="tabs" />
      <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="9" 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="2" side_tool="true" 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="Commander" active="false" anchor="right" auto_hide="false" internal_type="SLIDING" type="SLIDING" visible="false" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
      <window_info id="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="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
      <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
      <window_info id="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="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" />
    </layout>
  </component>
  <component name="Vcs.Log.UiProperties">
    <option name="RECENTLY_FILTERED_USER_GROUPS">
      <collection />
    </option>
    <option name="RECENTLY_FILTERED_BRANCH_GROUPS">
      <collection />
    </option>
  </component>
  <component name="VcsContentAnnotationSettings">
    <option name="myLimit" value="2678400000" />
  </component>
  <component name="XDebuggerManager">
    <breakpoint-manager />
    <watches-manager />
  </component>
  <component name="editorHistoryManager">
    <entry file="file://$PROJECT_DIR$/vendor/autoload.php">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0">
          <caret line="6" column="56" selection-start-line="6" selection-start-column="56" selection-end-line="6" selection-end-column="56" />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/composer.json">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="8.807693">
          <caret line="22" column="31" selection-start-line="22" selection-start-column="31" selection-end-line="22" selection-end-column="31" />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Controller/ControllerNameParser.php">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="-1.9565217">
          <caret line="48" column="42" selection-start-line="48" selection-start-column="42" selection-end-line="48" selection-end-column="42" />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/tests/AppBundle/Controller/DefaultControllerTest.php">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="-9.807693">
          <caret line="15" column="76" selection-start-line="15" selection-start-column="76" selection-end-line="15" selection-end-column="76" />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/SecurityBundle.php">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.28824475">
          <caret line="39" column="34" selection-start-line="39" selection-start-column="34" selection-end-line="39" selection-end-column="34" />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Translation/Translator.php">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.6988728">
          <caret line="121" column="17" selection-start-line="121" selection-start-column="17" selection-end-line="121" selection-end-column="17" />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Tests/DataCollector/SecurityDataCollectorTest.php">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="-0.958132">
          <caret line="36" column="61" selection-start-line="36" selection-start-column="61" selection-end-line="36" selection-end-column="61" />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Security/FirewallContext.php">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0">
          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Security/FirewallMap.php">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="-0.17713365">
          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Command/UserPasswordEncoderCommand.php">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="76.80769">
          <caret line="21" column="0" selection-start-line="21" selection-start-column="0" selection-end-line="21" selection-end-column="0" />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/Command/InitAclCommand.php">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="-1.1497585">
          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/vendor/doctrine/doctrine-bundle/Controller/ProfilerController.php">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="1.6425121">
          <caret line="73" column="45" selection-start-line="73" selection-start-column="21" selection-end-line="73" selection-end-column="45" />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/TralangBundle/TralangBundle.php">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0">
          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.68438005">
          <caret line="54" column="14" selection-start-line="54" selection-start-column="14" selection-end-line="54" selection-end-column="14" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/vendor/composer/autoload_real.php">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="-0.39613527">
          <caret line="5" column="1" selection-start-line="5" selection-start-column="1" selection-end-line="5" selection-end-column="1" />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/app/AppCache.php">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.16425121">
          <caret line="6" column="1" selection-start-line="6" selection-start-column="1" selection-end-line="6" selection-end-column="1" />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/app/config/config_dev.yml">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0">
          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/web/app.php">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0">
          <caret line="19" column="0" selection-start-line="19" selection-start-column="0" selection-end-line="19" selection-end-column="0" />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/bin/console">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.38325283">
          <caret line="16" column="45" selection-start-line="16" selection-start-column="45" selection-end-line="16" selection-end-column="45" />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/vendor/symfony/symfony/src/Symfony/Component/Routing/RouteCollection.php">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.33333334">
          <caret line="74" column="33" selection-start-line="74" selection-start-column="33" selection-end-line="74" selection-end-column="33" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/vendor/symfony/symfony/src/Symfony/Component/Routing/Route.php">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="-10.230769">
          <caret line="85" column="38" selection-start-line="85" selection-start-column="38" selection-end-line="85" selection-end-column="38" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/app/config/parameters.yml.dist">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.21020092">
          <caret line="8" column="24" selection-start-line="8" selection-start-column="24" selection-end-line="8" selection-end-column="24" />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/app/config/parameters.yml">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.21020092">
          <caret line="8" column="26" selection-start-line="8" selection-start-column="26" selection-end-line="8" selection-end-column="26" />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/web/app_dev.php">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0">
          <caret line="17" column="23" selection-start-line="17" selection-start-column="23" selection-end-line="17" selection-end-column="23" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/web/config.php">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0">
          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/vendor/autoload.php">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.1095008">
          <caret line="4" column="58" selection-start-line="4" selection-start-column="58" selection-end-line="4" selection-end-column="58" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/AppBundle/AppBundle.php">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.19162641">
          <caret line="7" column="1" selection-start-line="7" selection-start-column="1" selection-end-line="7" selection-end-column="1" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/TralangBundle/Tests/Controller/DefaultControllerTest.php">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.38325283">
          <caret line="14" column="42" selection-start-line="14" selection-start-column="42" selection-end-line="14" selection-end-column="42" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/app/config/routing_dev.yml">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0">
          <caret line="13" column="3" selection-start-line="13" selection-start-column="3" selection-end-line="13" selection-end-column="3" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/app/autoload.php">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.19162641">
          <caret line="8" column="52" selection-start-line="8" selection-start-column="52" selection-end-line="8" selection-end-column="52" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/app/config/routing.yml">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0">
          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
          <folding>
            <marker date="1455735621325" expanded="true" signature="-1:-1" placeholder="app:" />
          </folding>
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/AppBundle/Controller/DefaultController.php">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.52012885">
          <caret line="21" column="0" selection-start-line="21" selection-start-column="0" selection-end-line="21" selection-end-column="0" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/vendor/doctrine/orm/lib/Doctrine/ORM/EntityManager.php">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.7020934">
          <caret line="577" column="0" selection-start-line="577" selection-start-column="0" selection-end-line="577" selection-end-column="0" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/TralangBundle/Resources/views/Default/index.html.twig">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="-0.65384614">
          <caret line="1" column="0" selection-start-line="1" selection-start-column="0" selection-end-line="4" selection-end-column="14" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Session.php">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="1.095008">
          <caret line="52" column="20" selection-start-line="52" selection-start-column="20" selection-end-line="52" selection-end-column="20" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/vendor/doctrine/migrations/bin/doctrine-migrations">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0">
          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/app/AppKernel.php">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.41062802">
          <caret line="16" column="31" selection-start-line="16" selection-start-column="31" selection-end-line="16" selection-end-column="31" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/vendor/doctrine/migrations/bin/doctrine-migrations.php">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="-0.3558776">
          <caret line="60" column="0" selection-start-line="60" selection-start-column="0" selection-end-line="60" selection-end-column="0" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/app/config/config.yml">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="-0.62905717">
          <caret line="11" column="10" selection-start-line="11" selection-start-column="10" selection-end-line="11" selection-end-column="10" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/TralangBundle/Resources/config/services.php">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0">
          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/vendor/doctrine/orm/lib/Doctrine/ORM/EntityRepository.php">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="-8.269231">
          <caret line="191" column="20" selection-start-line="191" selection-start-column="20" selection-end-line="191" selection-end-column="20" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Controller/Controller.php">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.34621578">
          <caret line="50" column="23" selection-start-line="50" selection-start-column="23" selection-end-line="50" selection-end-column="23" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/TralangBundle/Resources/views/Auth/reg.html.php">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="-4.576923">
          <caret line="7" column="20" selection-start-line="7" selection-start-column="20" selection-end-line="7" selection-end-column="20" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/TralangBundle/Resources/views/Auth/auth.html.php">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="-5.8846154">
          <caret line="9" column="0" selection-start-line="9" selection-start-column="0" selection-end-line="9" selection-end-column="0" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/TralangBundle/Controller/AuthController.php">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="12.076923">
          <caret line="27" column="61" selection-start-line="27" selection-start-column="61" selection-end-line="27" selection-end-column="61" />
          <folding>
            <element signature="e#44#101#0#PHP" expanded="true" />
            <marker date="1455823586850" expanded="true" signature="2801:2826" placeholder="SELECT MAX(i..users..." />
          </folding>
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/TralangBundle/Controller/ViewController.php">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="-4.576923">
          <caret line="7" column="39" selection-start-line="7" selection-start-column="39" selection-end-line="7" selection-end-column="39" />
          <folding>
            <element signature="e#44#101#0#PHP" expanded="true" />
          </folding>
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/app/Resources/views/base.html.twig">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="-5.8846154">
          <caret line="9" column="38" selection-start-line="9" selection-start-column="38" selection-end-line="9" selection-end-column="38" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/app/Resources/views/default/index.html.twig">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="-0.65700483">
          <caret line="9" column="29" selection-start-line="9" selection-start-column="29" selection-end-line="9" selection-end-column="29" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/TralangBundle/Resources/views/MainView/home.html.twig">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="-13.730769">
          <caret line="21" column="41" selection-start-line="21" selection-start-column="41" selection-end-line="21" selection-end-column="41" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/TralangBundle/Resources/config/routing.php">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="-7.8461537">
          <caret line="13" column="4" selection-start-line="13" selection-start-column="4" selection-end-line="13" selection-end-column="4" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/TralangBundle/Entity/Users.php">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="1.821256">
          <caret line="72" column="0" selection-start-line="72" selection-start-column="0" selection-end-line="72" selection-end-column="0" />
          <folding />
        </state>
      </provider>
    </entry>
  </component>
</project>

redpajama_set_name: RedPajamaGithub


text:
/**
 * \file
 */
#ifndef WRAPPER_GUMBO_H
#define WRAPPER_GUMBO_H

#ifdef __cplusplus
extern "C" {
#endif

#include "Gaea/base.h"
#include "Gaea/list.h"
#include "Gaea/hlist.h"
#include "Gaea/rbtree.h"
#include "gumbo.h"

typedef enum {
    /** tag */
    STAT_TAG,
    /** text */
    STAT_TEXT,
    /** link */
    STAT_LINK,
    /** script */
    STAT_SCRIPT,
    /** image */
    STAT_IMG,
    /** link invalid char */
    STAT_NONLINK_INVALID,
    /** non-link chinese symbol */
    STAT_NONLINK_CHSYM,
    /** non-link chinese char */
    STAT_NONLINK_CHCHAR,
    /** non-link digit */
    STAT_NONLINK_DIGIT,
    /** non-link ascii symbol */
    STAT_NONLINK_ENSYM,
    /** non-link ascii char */
    STAT_NONLINK_ENCHAR,
    /** link invalid char */
    STAT_LINK_INVALID,
    /** link chinese symbol */
    STAT_LINK_CHSYM,
    /** link chinese char */
    STAT_LINK_CHCHAR,
    /** link digit */
    STAT_LINK_DIGIT,
    /** link ascii symbol */
    STAT_LINK_ENSYM,
    /** link ascii char */
    STAT_LINK_ENCHAR,
    STAT_LAST
} stat_index_e;

typedef struct wrapper_node_s {
    mym_hlist_key_t ikey;
    struct list_head lst;
    struct list_head tlst;
    /** origin GumboNode */
    GumboNode *origin;
    /** parent of this wrapper node */
    struct wrapper_node_s *parent;
    /** children of this wrapper node */
    struct list_head children;
    /** children's number */
    uint32_t children_length;
    /** stat refer number */
    uint32_t stat_refer;
    /** node statistical information */
    uint32_t stat[STAT_LAST];
    /** sequence number */
    uint32_t seq;
    /** level depth */
    uint32_t depth;
    /** non-link char */
    uint32_t non_link_char;
    /** link char */
    uint32_t link_char;
    /** text/link ratio */
    float ratio;
    /** text density */
    float density;
    /** is block element */
    bool is_block;
} wrapper_node_t;

/** get node tag if it is an element node */
static inline GumboTag
GetWrapperNodeTag(wrapper_node_t *node)
{
    return node->origin->type == GUMBO_NODE_ELEMENT ? node->origin->v.element.tag : GUMBO_TAG_LAST;
}

/** get node type */
static inline GumboNodeType
GetWrapperNodeType(wrapper_node_t *node)
{
    return node->origin->type;
}

#ifdef __cplusplus
}
#endif

#endif


text:
package example.xml;

import java.util.Collections;

public class FlashMemory implements Contacts {

  public Iterable<Contact> findByName(String name) {
    return Collections.emptyList();
  }
}


text:
```bash
git clone --separate-git-dir=$HOME/.dotcfg https://github.com/jimrybarski/dotfiles.git $HOME/dotcfg-tmp
rsync --recursive --verbose --exclude '.git' --exclude 'README.md' $HOME/dotcfg-tmp/ $HOME/
rm -r $HOME/dotcfg-tmp/
alias config='/usr/bin/git --git-dir=$HOME/.dotcfg/ --work-tree=$HOME'
source $HOME/.bashrc
```


text:
const mongoOp = require('../model/mongo')
const logger = require('winston')

function deleteListItemByName (familyId, listKey, listItemName, callback) {
  mongoOp.ListItems.deleteMany({'listKey': listKey, 'listItemName': listItemName, 'familyId': familyId}, function (err, removeResult) {
    if (err) {
      callback('Error removing ' + listItemName + ' 😦')
      return
    }
    logger.log('debug', '----removed ' + listItemName + ' ' + removeResult.result.n)
    if (removeResult.result.n === 0) {
      callback(listItemName + " doesn't exist in #" + listKey + ' 😦.')
    } else {
      callback(null)
    }
  })
}

function listItemsTextForList (unconfirmedList, callback) {
  mongoOp.Lists.findOne({'listKey': unconfirmedList.listKey, 'familyId': unconfirmedList.familyId}, function (err, list) {
    if (err || list == null) {
      callback(err || true, "Sorry, couldn't find #" + unconfirmedList.listKey + '.\nType "get lists" to see available lists.')
    } else {
      mongoOp.ListItems.find({'listKey': list.listKey, 'familyId': list.familyId}, function (err, listItems) {
        if (err) {
          callback(err)
        } else {
          var concatText = ''
          listItems.forEach(function (listItem) {
            concatText = concatText.concat('\n• ' + listItem.listItemName)
          })
          callback(null, concatText)
        }
      })
    }
  })
}

module.exports = {
  deleteListItemByName,
  listItemsTextForList
}


text:
package edu.duke.cabig.c3pr.webservice.iso21090;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;

/**
 *
Java class for HIST_TEL.Phone complex type.
 *
 *
The following schema fragment specifies the expected content contained within this class.
 *
 *

 * <complexType name="HIST_TEL.Phone">
 *   <complexContent>
 *     <extension base="{uri:iso.org:21090}LIST_TEL.Phone">
 *     </extension>
 *   </complexContent>
 * </complexType>
 *

 *
 *
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "HIST_TEL.Phone")
public class HISTTELPhone
    extends LISTTELPhone
{

}


text:
package com.mesosphere.sdk.offer.evaluate;

import com.mesosphere.sdk.offer.CommonIdUtils;
import com.mesosphere.sdk.offer.LaunchOfferRecommendation;
import com.mesosphere.sdk.offer.MesosResourcePool;
import com.mesosphere.sdk.offer.StoreTaskInfoRecommendation;
import com.mesosphere.sdk.offer.taskdata.EnvConstants;
import com.mesosphere.sdk.offer.taskdata.TaskLabelWriter;

import org.apache.mesos.Protos;

import java.util.Arrays;

/**
 * This class sets pod metadata on a {@link org.apache.mesos.Protos.TaskInfo}, ensuring
 * that this metadata is available in the task's environment and creating a {@link LaunchOfferRecommendation}.
 */
public class LaunchEvaluationStage implements OfferEvaluationStage {

  private final String serviceName;

  private final String taskSpecName;

  private final boolean shouldLaunch;

  /**
   * Creates a new evaluation stage for launching a task.
   *
   * @param serviceName  The name of the service that's being launched into
   * @param taskSpecName The name of the task (as from the TaskSpec)
   * @param shouldLaunch Whether a Launch recommendation should actually be emitted. If false, then the StateStore
   *                     will be updated with the resulting TaskInfo, but no launch will actually occur. This is used
   *                     for updating local information about tasks
   */
  public LaunchEvaluationStage(String serviceName, String taskSpecName, boolean shouldLaunch) {
    this.serviceName = serviceName;
    this.taskSpecName = taskSpecName;
    this.shouldLaunch = shouldLaunch;
  }

  @Override
  public EvaluationOutcome evaluate(MesosResourcePool mesosResourcePool,
                                    PodInfoBuilder podInfoBuilder)
  {
    Protos.ExecutorInfo.Builder executorBuilder = podInfoBuilder.getExecutorBuilder().get();
    Protos.Offer offer = mesosResourcePool.getOffer();
    Protos.TaskInfo.Builder taskBuilder = podInfoBuilder.getTaskBuilder(taskSpecName);

    if (shouldLaunch) {
      taskBuilder.setTaskId(CommonIdUtils.toTaskId(serviceName, taskBuilder.getName()));
    } else {
      // This task is just being stored in ZK, not launched with Mesos (yet).
      taskBuilder.getTaskIdBuilder().setValue("");
    }
    taskBuilder.setSlaveId(offer.getSlaveId());

    // Store metadata in the TaskInfo for later access by placement constraints:
    TaskLabelWriter writer = new TaskLabelWriter(taskBuilder);
    writer.setOfferAttributes(offer)
        .setType(podInfoBuilder.getType())
        .setIndex(podInfoBuilder.getIndex())
        .setHostname(offer);
    if (offer.hasDomain() && offer.getDomain().hasFaultDomain()) {
      writer.setRegion(offer.getDomain().getFaultDomain().getRegion())
          .setZone(offer.getDomain().getFaultDomain().getZone());
    }

    taskBuilder.setLabels(writer.toProto());
    updateFaultDomainEnv(taskBuilder, offer);

    if (shouldLaunch) {
      return EvaluationOutcome.pass(
          this,
          // Launch (in Mesos) + Update (in our StateStore)
          Arrays.asList(
              new LaunchOfferRecommendation(offer, taskBuilder.build(), executorBuilder.build()),
              new StoreTaskInfoRecommendation(offer, taskBuilder.build(), executorBuilder.build())),
          String.format("Added launch operation for %s", taskSpecName))
          .build();
    } else {
      return EvaluationOutcome.pass(
          this,
          // Only update in StateStore. No launch in Mesos.
          Arrays.asList(new StoreTaskInfoRecommendation(
              offer, taskBuilder.build(), executorBuilder.build())),
          String.format("Added metadata update for %s", taskSpecName))
          .build();
    }
  }

  private static void updateFaultDomainEnv(Protos.TaskInfo.Builder builder, Protos.Offer offer) {
    if (!offer.hasDomain() || !offer.getDomain().hasFaultDomain() || !builder.hasCommand()) {
      return;
    }

    Protos.Environment.Variable regionVar = Protos.Environment.Variable.newBuilder()
        .setName(EnvConstants.REGION_TASKENV)
        .setValue(offer.getDomain().getFaultDomain().getRegion().getName())
        .build();

    Protos.Environment.Variable zoneVar = Protos.Environment.Variable.newBuilder()
        .setName(EnvConstants.ZONE_TASKENV)
        .setValue(offer.getDomain().getFaultDomain().getZone().getName())
        .build();

    builder.getCommandBuilder()
        .getEnvironmentBuilder()
        .addVariables(regionVar)
        .addVariables(zoneVar);
  }
}


text:
package org.sistemafinanciero.entity;

// Generated 02-may-2014 11:48:28 by Hibernate Tools 4.0.0

import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;

import org.sistemafinanciero.entity.type.TipoPendienteCaja;

@Entity
@Table(name = "PENDIENTE_BOVEDA", schema = "C##BDSISTEMAFINANCIERO")
@XmlRootElement(name = "pendientecaja")
@XmlAccessorType(XmlAccessType.NONE)
// @NamedQueries({ @NamedQuery(name = PendienteCaja.findByIdCaja, query =
// "SELECT p FROM PendienteCaja p INNER JOIN p.historialCaja hc INNER JOIN hc.caja c WHERE c.idCaja = :idCaja ORDER BY p.fecha, p.hora")
// })
public class PendienteBoveda implements java.io.Serializable {

    /**
	 *
	 */
    private static final long serialVersionUID = 1L;

    // public final static String findByIdCaja = "PendienteCaja.findByIdCaja";

    private BigInteger idPendienteBoveda;
    private TipoPendienteCaja tipoPendiente;
    private Moneda moneda;
    private BigDecimal monto;
    private Date fecha;
    private Date hora;
    private String observacion;
    private String trabajadorCrea;

    public PendienteBoveda() {

    }

    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "PENDIENTEBOVEDA_SEQ")
    @SequenceGenerator(name = "PENDIENTEBOVEDA_SEQ", initialValue = 1, allocationSize = 1, sequenceName = "PENDIENTEBOVEDA_SEQ")
    @XmlElement(name = "id")
    @Id
    @Column(name = "ID_PENDIENTE_BOVEDA", unique = true, nullable = false, precision = 22, scale = 0)
    public BigInteger getIdPendienteBoveda() {
        return this.idPendienteBoveda;
    }

    public void setIdPendienteBoveda(BigInteger idPendienteBoveda) {
        this.idPendienteBoveda = idPendienteBoveda;
    }

    @XmlElement
    @Enumerated(value = EnumType.STRING)
    @Column(name = "TIPO_PENDIENTE", nullable = false, length = 40, columnDefinition = "nvarchar2")
    public TipoPendienteCaja getTipoPendiente() {
        return this.tipoPendiente;
    }

    public void setTipoPendiente(TipoPendienteCaja tipoPendiente) {
        this.tipoPendiente = tipoPendiente;
    }

    @XmlElement
    @Column(name = "MONTO", nullable = false, precision = 18)
    public BigDecimal getMonto() {
        return this.monto;
    }

    public void setMonto(BigDecimal monto) {
        this.monto = monto;
    }

    @XmlElement
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "ID_MONEDA", nullable = false)
    public Moneda getMoneda() {
        return this.moneda;
    }

    public void setMoneda(Moneda moneda) {
        this.moneda = moneda;
    }

    @XmlElement
    @Temporal(TemporalType.DATE)
    @Column(name = "FECHA", nullable = false, length = 7)
    public Date getFecha() {
        return this.fecha;
    }

    public void setFecha(Date fecha) {
        this.fecha = fecha;
    }

    @XmlElement
    @Column(name = "HORA", nullable = false)
    public Date getHora() {
        return this.hora;
    }

    public void setHora(Date hora) {
        this.hora = hora;
    }

    @XmlElement
    @Column(name = "TRABAJADOR_CREA", nullable = false, columnDefinition = "nvarchar2")
    public String getTrabajadorCrea() {
        return this.trabajadorCrea;
    }

    public void setTrabajadorCrea(String trabajadorCrea) {
        this.trabajadorCrea = trabajadorCrea;
    }

    @XmlElement
    @Column(name = "OBSERVACION", length = 40, columnDefinition = "nvarchar2")
    public String getObservacion() {
        return this.observacion;
    }

    public void setObservacion(String observacion) {
        this.observacion = observacion;
    }

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

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

}


text:
namespace rlz_lib {

namespace {

// See http://developer.apple.com/library/mac/#technotes/tn1103/_index.html

// The caller is responsible for freeing |matching_services|.
bool FindEthernetInterfaces(io_iterator_t* matching_services) {
  base::mac::ScopedCFTypeRef<CFMutableDictionaryRef> matching_dict(
      IOServiceMatching(kIOEthernetInterfaceClass));
  if (!matching_dict)
    return false;

  base::mac::ScopedCFTypeRef<CFMutableDictionaryRef> primary_interface(
      CFDictionaryCreateMutable(kCFAllocatorDefault, 0,
                                &kCFTypeDictionaryKeyCallBacks,
                                &kCFTypeDictionaryValueCallBacks));
  if (!primary_interface)
    return false;

  CFDictionarySetValue(
      primary_interface, CFSTR(kIOPrimaryInterface), kCFBooleanTrue);
  CFDictionarySetValue(
      matching_dict, CFSTR(kIOPropertyMatchKey), primary_interface);

  kern_return_t kern_result = IOServiceGetMatchingServices(
      kIOMasterPortDefault, matching_dict.release(), matching_services);

  return kern_result == KERN_SUCCESS;
}

bool GetMACAddressFromIterator(io_iterator_t primary_interface_iterator,
                               uint8_t* buffer, size_t buffer_size) {
  if (buffer_size < kIOEthernetAddressSize)
    return false;

  bool success = false;

  bzero(buffer, buffer_size);
  base::mac::ScopedIOObject<io_object_t> primary_interface;
  while (primary_interface.reset(IOIteratorNext(primary_interface_iterator)),
         primary_interface) {
    io_object_t primary_interface_parent;
    kern_return_t kern_result = IORegistryEntryGetParentEntry(
        primary_interface, kIOServicePlane, &primary_interface_parent);
    base::mac::ScopedIOObject<io_object_t> primary_interface_parent_deleter(
        primary_interface_parent);
    success = kern_result == KERN_SUCCESS;

    if (!success)
      continue;

    base::mac::ScopedCFTypeRef<CFTypeRef> mac_data(
        IORegistryEntryCreateCFProperty(primary_interface_parent,
                                        CFSTR(kIOMACAddress),
                                        kCFAllocatorDefault,
                                        0));
    CFDataRef mac_data_data = base::mac::CFCast<CFDataRef>(mac_data);
    if (mac_data_data) {
      CFDataGetBytes(
          mac_data_data, CFRangeMake(0, kIOEthernetAddressSize), buffer);
    }
  }

  return success;
}

bool GetMacAddress(unsigned char* buffer, size_t size) {
  io_iterator_t primary_interface_iterator;
  if (!FindEthernetInterfaces(&primary_interface_iterator))
    return false;
  bool result = GetMACAddressFromIterator(
      primary_interface_iterator, buffer, size);
  IOObjectRelease(primary_interface_iterator);
  return result;
}

CFStringRef CopySerialNumber() {
  base::mac::ScopedIOObject<io_service_t> expert_device(
      IOServiceGetMatchingService(kIOMasterPortDefault,
          IOServiceMatching("IOPlatformExpertDevice")));
  if (!expert_device)
    return NULL;

  base::mac::ScopedCFTypeRef<CFTypeRef> serial_number(
      IORegistryEntryCreateCFProperty(expert_device,
                                      CFSTR(kIOPlatformSerialNumberKey),
                                      kCFAllocatorDefault,
                                      0));
  CFStringRef serial_number_cfstring =
      base::mac::CFCast<CFStringRef>(serial_number);
  if (!serial_number_cfstring)
    return NULL;

  ignore_result(serial_number.release());
  return serial_number_cfstring;
}

}  // namespace

bool GetRawMachineId(string16* data, int* more_data) {
  uint8_t mac_address[kIOEthernetAddressSize];

  data->clear();
  if (GetMacAddress(mac_address, sizeof(mac_address))) {
    *data += ASCIIToUTF16(base::StringPrintf("mac:%02x%02x%02x%02x%02x%02x",
        mac_address[0], mac_address[1], mac_address[2],
        mac_address[3], mac_address[4], mac_address[5]));
  }

  // A MAC address is enough to uniquely identify a machine, but it's only 6
  // bytes, 3 of which are manufacturer-determined. To make brute-forcing the
  // SHA1 of this harder, also append the system's serial number.
  CFStringRef serial = CopySerialNumber();
  if (serial) {
    if (!data->empty())
      *data += UTF8ToUTF16(" ");
    *data += UTF8ToUTF16("serial:") + base::SysCFStringRefToUTF16(serial);
    CFRelease(serial);
  }

  // On windows, this is set to the volume id. Since it's not scrambled before
  // being sent, just set it to 1.
  *more_data = 1;
  return true;
}

}  // namespace rlz_lib


text:
layout: post
title : "Popup Fenster im Outlook 2003 Stil"
date : 16.01.2007 21:16:46
tags: [.net]
---
{% include JB/setup %}

Jeder Outlook 2003 Nutzer kennt das kleine Info Popup, das beim erscheinen einer neuen Nachricht eingeblendet wird.

Bei [http://www.codeproject.com](http://www.codeproject.com) gibt es ein .NET Control, das dessen Funktionaliät nachbildet.

[http://www.codeproject.com/vb/net/PopupNotifier.asp](http://www.codeproject.com/vb/net/PopupNotifier.asp "http://www.codeproject.com/vb/net/PopupNotifier.asp")


text:
var chatRef: Firebase = new Firebase('https://<YOUR-FIREBASE>.firebaseio.com');
var auth: FirebaseSimpleLogin = new FirebaseSimpleLogin(chatRef, function(error, user) {
    if (error) {
        // an error occurred while attempting login
        switch(error.code) {
            case 'INVALID_EMAIL':
            case 'INVALID_PASSWORD':
            default:
        }
    } else if (user) {
        // user authenticated with Firebase
        console.log('User ID: ' + user.id + ', Provider: ' + user.provider);
    } else {
        // user is logged out
    }
});

var email = 'my@email.com';
var password = 'secret';
var oldPassword = 'secret';
var newPassword = 'secret';

auth.login('password', {
    email: '<email@domain.com>',
    password: '<password>',
    rememberMe: true
});

auth.login('facebook', {
    rememberMe: true,
    scope: 'email,user_likes'
});

auth.login('github', {
    rememberMe: true,
    scope: 'user,gist'
});

auth.login('google', {
    rememberMe: true,
    scope: 'https://www.googleapis.com/auth/plus.login'
});

auth.login('persona', {
    rememberMe: true
});

auth.login('twitter', {
    rememberMe: true
});

auth.login('anonymous');

auth.createUser(email, password, function(error, user) {
    if (!error) {
        console.log('User Id: ' + user.id + ', Email: ' + user.email);
    }
});

auth.createUser(email, password);

auth.changePassword(email, oldPassword, newPassword, function(error, success) {
    if (!error) {
        console.log('Password changed successfully');
    }
});

auth.changePassword(email, oldPassword, newPassword);

auth.sendPasswordResetEmail(email, function(error, success) {
    if (!error) {
        console.log('Password reset email sent successfully');
    }
});

auth.sendPasswordResetEmail(email);

auth.removeUser(email, password, function(error, success) {
    if (!error) {
        console.log('User deleted successfully');
    }
});

auth.removeUser(email, password);


text:
#define _USE_MATH_DEFINES
#include <cmath>
#include <util/Logger.h>
#include <util/geometry.hpp>
#include <util/ProgramOptions.h>
#include "OpenGl.h"
#include "RotateView.h"

util::ProgramOption optionRotateInitialX(
		util::_module           = "gui",
		util::_long_name        = "rotateInitialX",
		util::_description_text = "The initial rotation as axis/angle representation (x,y,z,w).",
		util::_default_value    = 0.0);

util::ProgramOption optionRotateInitialY(
		util::_module           = "gui",
		util::_long_name        = "rotateInitialY",
		util::_description_text = "The initial rotation as axis/angle representation (x,y,z,w).",
		util::_default_value    = 1.0);

util::ProgramOption optionRotateInitialZ(
		util::_module           = "gui",
		util::_long_name        = "rotateInitialZ",
		util::_description_text = "The initial rotation as axis/angle representation (x,y,z,w).",
		util::_default_value    = 0.0);

util::ProgramOption optionRotateInitialW(
		util::_module           = "gui",
		util::_long_name        = "rotateInitialW",
		util::_description_text = "The initial rotation as axis/angle representation (x,y,z,w).",
		util::_default_value    = 0.0);

namespace sg_gui {

static logger::LogChannel rotateviewlog("rotateviewlog", "[RotateView] ");

RotateView::RotateView() :
	_x(optionRotateInitialX),
	_y(optionRotateInitialY),
	_z(optionRotateInitialZ),
	_w(optionRotateInitialW),
	_prevX(0.0),
	_prevY(1.0),
	_prevZ(0.0),
	_prevW(0.0),
	_buttonDown(0, 0),
	_dragging(false),
	_highlight(false),
	_showFrame(true) {}

bool
RotateView::filterDown(DrawBase& /*signal*/) {

	updateContentSize();

	util::point<float,3> min    = _contentSize.min();
	util::point<float,3> max    = _contentSize.max();
	util::point<float,3> center = _contentSize.center();

	glMatrixMode(GL_MODELVIEW);

	glPushMatrix();

	// put a light
	float lightX = -100;
	float lightY = -100;
	float lightZ = -100;
	GLfloat lightpos[] = {lightX, lightY, lightZ, 0.0};
	glEnable(GL_LIGHT1);
	glLightfv(GL_LIGHT1, GL_POSITION, lightpos);
	GLfloat ambient[] = {0.5, 0.5, 0.5, 1.0};
	glLightfv(GL_LIGHT1, GL_AMBIENT, ambient);
	GLfloat specular[] = {1.0, 1.0, 1.0, 1.0};
	glLightfv(GL_LIGHT1, GL_SPECULAR, specular);
	GLfloat diffuse[] = {0.5, 0.5, 0.5, 1.0};
	glLightfv(GL_LIGHT1, GL_DIFFUSE, diffuse);

	// perform the rotation
	glTranslated(center.x(),  center.y(), center.z());
	glRotated(_w/M_PI*180.0, _x, _y, _z);
	glTranslated(-center.x(), -center.y(), -center.z());

	if (_showFrame) {

		glColor4f((_highlight ? 0.88 : 0.1), 0.2, 0.05, 0.5);

		// draw box around content
		glLineWidth(1.0);
		glEnable(GL_LINE_SMOOTH);

		glBegin(GL_LINES);
		glVertex3f(min.x(), min.y(), min.z());
		glVertex3f(min.x(), min.y(), max.z());

		glVertex3f(min.x(), min.y(), max.z());
		glVertex3f(min.x(), max.y(), max.z());

		glVertex3f(min.x(), max.y(), max.z());
		glVertex3f(min.x(), max.y(), min.z());

		glVertex3f(min.x(), max.y(), min.z());
		glVertex3f(min.x(), min.y(), min.z());

		glVertex3f(max.x(), min.y(), min.z());
		glVertex3f(max.x(), min.y(), max.z());

		glVertex3f(max.x(), min.y(), max.z());
		glVertex3f(max.x(), max.y(), max.z());

		glVertex3f(max.x(), max.y(), max.z());
		glVertex3f(max.x(), max.y(), min.z());

		glVertex3f(max.x(), max.y(), min.z());
		glVertex3f(max.x(), min.y(), min.z());

		glVertex3f(min.x(), min.y(), min.z());
		glVertex3f(max.x(), min.y(), min.z());

		glVertex3f(min.x(), min.y(), max.z());
		glVertex3f(max.x(), min.y(), max.z());

		glVertex3f(min.x(), max.y(), max.z());
		glVertex3f(max.x(), max.y(), max.z());

		glVertex3f(min.x(), max.y(), min.z());
		glVertex3f(max.x(), max.y(), min.z());
		glEnd();
	}

	glEnable(GL_LIGHTING);
	glEnable(GL_COLOR_MATERIAL);

	return true;
}

void
RotateView::unfilterDown(DrawBase& /*signal*/) {

	glDisable(GL_LIGHT1);
	glPopMatrix();
}

bool
RotateView::filterDown(QuerySize& signal) {

	LOG_ALL(rotateviewlog) << "got size query..." << std::endl;

	updateContentSize();

	LOG_ALL(rotateviewlog) << "content size is " << _contentSize << std::endl;

	// bounding box of all possible rotations around center
	float maxDiameter = util::length(_contentSize.max() - _contentSize.min());
	util::point<float,3> center = _contentSize.center();

	util::box<float,3> size(
			center - util::point<float,3>(maxDiameter/2, maxDiameter/2, maxDiameter/2),
			center + util::point<float,3>(maxDiameter/2, maxDiameter/2, maxDiameter/2));

	LOG_ALL(rotateviewlog) << "max rotated content size is " << size << std::endl;

	signal.setSize(size);

	return false;
}

void
RotateView::unfilterDown(QuerySize&) {}

bool
RotateView::filterDown(PointerSignal& signal) {

	signal.ray = unrotate(signal.ray);

	return true;
}

void
RotateView::unfilterDown(PointerSignal& signal) {

	signal.ray = rotate(signal.ray);
}

void
RotateView::onSignal(MouseDown& signal) {

	util::point<float,2> position = signal.ray.position().project<2>();

	LOG_ALL(rotateviewlog) << "mouse button " << signal.button << " down, position is " << position << std::endl;

	if (signal.button == buttons::Left && intersectsContent(unrotate(signal.ray))) {

		LOG_ALL(rotateviewlog) << "it's the left mouse button -- start dragging mode" << std::endl;

		_dragging = true;
		_buttonDown = position;

		_prevX = _x;
		_prevY = _y;
		_prevZ = _z;
		_prevW = _w;
	}
}

void
RotateView::onSignal(MouseMove& signal) {

	LOG_ALL(rotateviewlog) << "the mouse is moved" << std::endl;

	if (!signal.modifiers & buttons::LeftDown) {

		bool wasHighlighted = _highlight;

		_highlight = intersectsContent(unrotate(signal.ray));

		if (wasHighlighted != _highlight)
			send<ContentChanged>();
	}

	if (!_dragging)
		return;

	LOG_ALL(rotateviewlog) << "I am in dragging mode" << std::endl;

	// mouse is dragged
	if (signal.modifiers & buttons::LeftDown) {

		LOG_ALL(rotateviewlog) << "left button is still pressed" << std::endl;

		util::point<float,2> moved = signal.ray.position().project<2>() - _buttonDown;

		// scale movement with inverse size of content
		moved.x() /= _contentSize.width();
		moved.y() /= _contentSize.height();

		// change the current rotation according to mouse movement
		updateRotationFrom2D(moved);

		send<ContentChanged>();

	} else {

		LOG_ALL(rotateviewlog) << "left button released -- stop dragging" << std::endl;

		_dragging = false;
	}
}

void
RotateView::onSignal(KeyDown& signal) {

	if (signal.key == keys::R) {

		_x = 0;
		_y = 1;
		_z = 0;
		_w = 0;

		send<ContentChanged>();
	}

	if (signal.key == keys::T) {

		if (signal.modifiers & keys::ShiftDown) {

			LOG_USER(rotateviewlog) << "enter rotation values as \"<x> <y> <z> <w>\": " << std::flush;

			char input[256];
			std::cin.getline(input, 256);
			std::stringstream ss(input);

			float x, y, z, w;
			ss >> x;
			ss >> y;
			ss >> z;
			ss >> w;

			if (x == 0 && y == 0 && z == 0) {

				LOG_USER(rotateviewlog) << "rotation axis can not be null" << std::endl;
				return;
			}

			_x = x;
			_y = y;
			_z = z;
			_w = w;

			send<ContentChanged>();

		} else
			LOG_USER(rotateviewlog) << "rotation transformation: " << _x << " " << _y << " " << _z << " " << _w << std::endl;
	}

	if (signal.key == keys::B) {

		_showFrame = !_showFrame;
		send<ContentChanged>();
	}
}

void
RotateView::onInnerSignal(ContentChanged&) {

	_contentSize = util::box<float,3>();
	updateContentSize();
}

void
RotateView::updateContentSize() {

	LOG_ALL(rotateviewlog) << "updating content size..." << std::endl;

	if (!_contentSize.isZero())
		return;

	QuerySize query;
	sendInner(query);
	_contentSize = query.getSize();
}

void
RotateView::updateRotationFrom2D(const util::point<float,2>& moved) {

	LOG_ALL(rotateviewlog) << "current rotation: " << _w << ", (" << _x << ", " << _y << ", " << _z << ")" << std::endl;

	LOG_ALL(rotateviewlog) << "moved by: " << moved << std::endl;

	// previous rotation to quaternion
	float qx, qy, qz, qw;

	qx = _prevX*sin(_prevW/2.0);
	qy = _prevY*sin(_prevW/2.0);
	qz = _prevZ*sin(_prevW/2.0);
	qw =        cos(_prevW/2.0);

	// difference rotation as angle-axis
	float dx, dy, dz, dw;

	// ensure numerical stability
	float dnorm = sqrt(moved.y()*moved.y() + moved.x()*moved.x());
	if (dnorm <= 0.0001)
		return;

	dx =  moved.y()/dnorm;
	dy = -moved.x()/dnorm;
	dz = 0.0;
	dw = dnorm*M_PI;

	LOG_ALL(rotateviewlog) << "add rotation: " << dw << ", (" << dx << ", " << dy << ", " << dz << ")" << std::endl;

	// difference rotation to quaternion
	float qdx, qdy, qdz, qdw;

	qdx = dx*sin(dw/2.0);
	qdy = dy*sin(dw/2.0);
	qdz = dz*sin(dw/2.0);
	qdw =    cos(dw/2.0);

	// composition of both quaternions
	float cx, cy, cz, cw;

	cw = (qdw*qw - qdx*qx - qdy*qy - qdz*qz);
	cx = (qdw*qx + qdx*qw + qdy*qz - qdz*qy);
	cy = (qdw*qy - qdx*qz + qdy*qw + qdz*qx);
	cz = (qdw*qz + qdx*qy - qdy*qx + qdz*qw);

	LOG_ALL(rotateviewlog) << "result quaternion: " << cw << ", (" << cx << ", " << cy << ", " << cz << ")" << std::endl;

	// back to axis-angle rotation
	_w = 2*acos(cw);
	_x = cx/sin(_w/2.0);
	_y = cy/sin(_w/2.0);
	_z = cz/sin(_w/2.0);

	// normalize rotation vector
	float norm = sqrt(_x*_x + _y*_y + _z*_z);
	_x = _x/norm;
	_y = _y/norm;
	_z = _z/norm;

	LOG_ALL(rotateviewlog) << "new rotation: " << _w << ", (" << _x << ", " << _y << ", " << _z << ")" << std::endl;
}

util::ray<float,3>
RotateView::rotate(const util::ray<float,3>& ray) {

	util::ray<float,3> rotated;

	// inversely rotate ray position around content center
	rotated.position() = util::rotate3d(
			util::ray<float,3>(
					_contentSize.center(),
					util::point<float,3>(_x, _y, _z)),
			_w,
			ray.position());

	// inversely rotate ray direction around (0,0,0)
	rotated.direction() = util::rotate3d(
			util::ray<float,3>(
					util::point<float,3>( 0,  0,  0),
					util::point<float,3>(_x, _y, _z)),
			_w,
			ray.direction());

	return rotated;
}

util::ray<float,3>
RotateView::unrotate(const util::ray<float,3>& ray) {

	util::ray<float,3> unrotated;

	// rotate ray position around content center
	unrotated.position() = util::rotate3d(
			util::ray<float,3>(
					_contentSize.center(),
					util::point<float,3>(_x, _y, _z)),
			-_w,
			ray.position());

	// rotate ray direction around (0,0,0)
	unrotated.direction() = util::rotate3d(
			util::ray<float,3>(
					util::point<float,3>( 0,  0,  0),
					util::point<float,3>(_x, _y, _z)),
			-_w,
			ray.direction());

	return unrotated;
}

bool
RotateView::intersectsContent(const util::ray<float,3>& ray) {

	float _;
	return intersect(_contentSize, ray, _);
}

} // namespace sg_gui


text:
if (!(process.env.WEBPACK_ENV === 'production')) {
  module.exports = require('./config/webpack.dev.js');
} else {
  module.exports = require('./config/webpack.prod.js');
}


text:
<?php

use Symfony\Component\HttpKernel\Kernel;
use Symfony\Component\Config\Loader\LoaderInterface;

class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = array(
            new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
            new Symfony\Bundle\SecurityBundle\SecurityBundle(),
            new Symfony\Bundle\TwigBundle\TwigBundle(),
            new Symfony\Bundle\MonologBundle\MonologBundle(),
            new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
            new Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle(),
            new Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle(),

            new Rithis\LaunchpadBundle\RithisLaunchpadBundle(),
        );

        if (in_array($this->getEnvironment(), array('dev', 'test'))) {
            $bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle();
            $bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle();
        }

        return $bundles;
    }

    public function registerContainerConfiguration(LoaderInterface $loader)
    {
        $loader->load(__DIR__ . '/config/config_' . $this->getEnvironment() . '.yml');
    }
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<sampleQueries>
	<query>
		<name>Query 1</name>
		<description>Coronavirus and drugs</description>
		<term>"ascorbic acid" OR favipiravir OR chloroquine OR leflunomide OR Remdesivir OR methylprednisolone OR Tocilizumab OR Sarilumab</term>
	</query>
	<query>
		<name>Query 2</name>
		<description>Coronavirus search terms</description>
		<term>"SARS-CoV-2" OR "covid-19" OR coronavirus OR "MERS-CoV"</term>
	</query>
	<query>
		<name>Query 3</name>
		<description>Pneumonia, corticosteroid, and Covid-19</description>
		<term>pneumonia AND methylprednisolone</term>
	</query>
	<query>
		<name>Query 4</name>
		<description>Genes and protein-protein interactions</description>
		<term>coronavirus OR "covid-19" OR "SARS-CoV-2" OR virus</term>
		<gene>ACE2</gene>
		<gene>TMPRSS2</gene>
		<gene>SERPING1</gene>
		<gene>CHMP2B</gene>
		<gene>YWHAE</gene>
	</query>
</sampleQueries>


text:
__author__ = 'mlaptev'

def unpack_dataset(input_file_name, output_file_name):
    current_symbol = ""
    amount = ""
    is_ready_for_output = False
    with open(input_file_name) as input_file:
        with open(output_file_name, "w+") as output_file:
            input_string = input_file.read()
            for symbol in input_string:
                if symbol.isalpha():
                    if is_ready_for_output:
                        for _ in range(int(amount)):
                            output_file.write(current_symbol)
                    current_symbol = symbol
                    amount = ""
                if symbol.isdigit():
                    is_ready_for_output = True
                    amount += symbol
            for _ in range(int(amount)):
                output_file.write(current_symbol)

if __name__ == "__main__":
    unpack_dataset("dataset_3363_2.txt", "reply_3363_2.txt")


text:
ACCEPTED

#### According to
The Catalogue of Life, 3rd January 2011

#### Published in
Agaric. mod. Tax. (Koenigstein), Edn 4 495 (1986)

#### Original name
Janauaria Singer

### Remarks
null