text:
<?php

Yii::import('application.modules.menu.models.*');

class PageBackendController extends yupe\components\controllers\BackController
{
    public function actions()
    {
        return array(
            'inline' => array(
                'class' => 'yupe\components\actions\YInLineEditAction',
                'model' => 'Page',
                'validAttributes' => array('title', 'slug', 'status', 'title_short')
            )
        );
    }
    /**
     * @var Page $model the currently loaded data model instance.
     */
    private $_model;

    /**
     * Displays a particular model.
     *
     * @param int $id - record ID
     *
     * @return void
     */
    public function actionView($id)
    {
        $this->render('view', array('model' => $this->loadModel($id)));
    }

    /**
     * Creates a new model.
     * If creation is successful, the browser will be redirected to the 'view' page.
     *
     * @return void
     *
     * @throws CDbException
     */
    public function actionCreate()
    {
        $model = new Page;

        $menuId = null;
        $menuParentId = 0;

        if (($data = Yii::app()->getRequest()->getPost('Page')) !== null) {

            $model->setAttributes($data);

            $transaction = Yii::app()->db->beginTransaction();

            try {

                if ($model->save()) {

                    // если активен модуль "Меню" - сохраним в меню
                    if (Yii::app()->hasModule('menu')) {

                        $menuId   = (int)Yii::app()->getRequest()->getPost('menu_id');
                        $parentId = (int)Yii::app()->getRequest()->getPost('parent_id');

                        $menu     = Menu::model()->active()->findByPk($menuId);
                        if ($menu) {
                            if (!$menu->addItem($model->title, serialize(array('/page/page/show', 'slug' => $model->slug)), $parentId)) {
                                throw new CDbException(
                                    Yii::t('PageModule.page','There is an error when connecting page to menu...')
                                );
                            }
                        }
                    }

                    Yii::app()->user->setFlash(
                        yupe\widgets\YFlashMessages::SUCCESS_MESSAGE,
                        Yii::t('PageModule.page', 'Page was created')
                    );

                    $transaction->commit();

                    $this->redirect(
                        (array) Yii::app()->getRequest()->getPost(
                            'submit-type', array('create')
                        )
                    );
                }
            } catch(Exception $e) {
                $transaction->rollback();
                $model->addError(false, $e->getMessage());
            }
        }

        $languages = $this->yupe->getLanguagesList();

        //если добавляем перевод
        $id   = (int)Yii::app()->getRequest()->getQuery('id');
        $lang = Yii::app()->getRequest()->getQuery('lang');

        if (!empty($id) && !empty($lang)) {
            $page = Page::model()->findByPk($id);
            if (null === $page) {
                Yii::app()->user->setFlash(
                    yupe\widgets\YFlashMessages::ERROR_MESSAGE,
                    Yii::t('PageModule.page', 'Targeting page was not found!')
                );

                $this->redirect(array('index'));
            }

            if (!array_key_exists($lang,$languages)) {
                Yii::app()->user->setFlash(
                    yupe\widgets\YFlashMessages::ERROR_MESSAGE,
                    Yii::t('PageModule.page', 'Language was not found!')
                );

                $this->redirect(array('index'));
            }

            Yii::app()->user->setFlash(
                yupe\widgets\YFlashMessages::SUCCESS_MESSAGE,
                Yii::t(
                    'PageModule.page', 'You add translation for {lang}', array(
                        '{lang}' => $languages[$lang]
                    )
                )
            );

            $model->lang        = $lang;
            $model->slug        = $page->slug;
            $model->category_id = $page->category_id;
            $model->title       = $page->title;
            $model->title_short = $page->title_short;
            $model->parent_id   = $page->parent_id;
            $model->order       = $page->order;
            $model->layout      = $page->layout;
        } else {
            $model->lang        = Yii::app()->language;
        }

        $this->render(
            'create', array(
                'model'        => $model,
                'pages'        => Page::model()->getAllPagesList(),
                'languages'    => $languages,
                'menuId'       => $menuId,
                'menuParentId' => $menuParentId
            )
        );
    }

    /**
     * Updates a particular model.
     * If update is successful, the browser will be redirected to the 'view' page.
     *
     * @param int $id - record ID
     *
     * @return void
     *
     * @throws CDbException
     */
    public function actionUpdate($id)
    {
        // Указан ID страницы, редактируем только ее
        $model = $this->loadModel($id);

        $oldTitle     = $model->title;
        $menuId       = null;
        $menuParentId = 0;

        if (($data = Yii::app()->getRequest()->getPost('Page')) !== null) {

            $model->setAttributes($data);

            if ($model->save()) {

                if (Yii::app()->hasModule('menu')) {

                    $menuId   = (int)Yii::app()->getRequest()->getPost('menu_id');
                    $parentId = (int)Yii::app()->getRequest()->getPost('parent_id');
                    $menu     = Menu::model()->active()->findByPk($menuId);
                    if ($menu) {
                        if (!$menu->changeItem($oldTitle, $model->title, serialize(array('/page/page/show', 'slug' => $model->slug)),$parentId)) {
                            throw new CDbException(
                                Yii::t('PageModule.page', 'There is an error when connecting page to menu...')
                            );
                        }
                    }
                }

                Yii::app()->user->setFlash(
                    yupe\widgets\YFlashMessages::SUCCESS_MESSAGE,
                    Yii::t('PageModule.page', 'Page was updated!')
                );

                $this->redirect(
                    (array) Yii::app()->getRequest()->getPost(
                        'submit-type', array('update', 'id' => $model->id)
                    )
                );
            }
        }

        if (Yii::app()->hasModule('menu')) {

            $menuItem = MenuItem::model()->findByAttributes(
                array(
                    "title"=>$oldTitle
                )
            );

            if ($menuItem !== null) {
                $menuId       = (int)$menuItem->menu_id;
                $menuParentId = (int)$menuItem->parent_id;
            }
        }

        // найти по slug страницы на других языках
        $langModels = Page::model()->findAll(
            'slug = :slug AND id != :id',array(
                ':slug' => $model->slug,
                ':id' => $model->id
            )
        );

        $this->render(
            'update', array(
                'langModels'   => CHtml::listData($langModels, 'lang', 'id'),
                'model'        => $model,
                'pages'        => Page::model()->getAllPagesList($model->id),
                'languages'    => $this->yupe->getLanguagesList(),
                'menuId'       =>$menuId,
                'menuParentId' =>$menuParentId
            )
        );
    }

    /**
     * Deletes a particular model.
     * If deletion is successful, the browser will be redirected to the 'index' page
     *
     * @param int $id - record ID
     *
     * @return void
     *
     * @throws CHttpException
     */
    public function actionDelete($id = null)
    {
        if (Yii::app()->getRequest()->getIsPostRequest()) {

            $model = $this->loadModel($id);

            if (Yii::app()->hasModule('menu')) {

                $menuItem = MenuItem::model()->findByAttributes(array("title" => $model->title));

                if ($menuItem !== null) {
                    $menuItem->delete();
                }
            }

            // we only allow deletion via POST request
            $model->delete();

            Yii::app()->user->setFlash(
                yupe\widgets\YFlashMessages::SUCCESS_MESSAGE,
                Yii::t('PageModule.page', 'Record was removed!')
            );

            // если это AJAX запрос ( кликнули удаление в админском grid view), мы не должны никуда редиректить
            Yii::app()->getRequest()->getParam('ajax') !== null || $this->redirect(
                (array) Yii::app()->getRequest()->getPost('returnUrl', 'index')
            );
        } else {
            throw new CHttpException(
                404,
                Yii::t('PageModule.page', 'Bad request. Please don\'t repeat similar requests anymore!')
            );
        }
    }

    /**
     * Manages all models.
     *
     * @return void
     */
    public function actionIndex()
    {
        $model = new Page('search');

        $model->unsetAttributes();

        $model->setAttributes(
            Yii::app()->getRequest()->getParam(
                'Page', array()
            )
        );

        $this->render(
            'index', array(
                'model' => $model,
                'pages' => Page::model()->getAllPagesList(),
            )
        );
    }

    /**
     * Returns the data model based on the primary key given in the GET variable.
     * If the data model is not found, an HTTP exception will be raised.
     *
     * @param int $id - record ID
     *
     * @return Page $model
     *
     * @throws CHttpException
     */
    public function loadModel($id)
    {
        if ($this->_model === null || $this->_model->id !== $id) {

            if (($this->_model = Page::model()->with('author', 'changeAuthor')->findByPk($id)) === null) {
                throw new CHttpException(
                    404,
                    Yii::t('PageModule.page', 'Page was not found')
                );
            }
        }

        return $this->_model;
    }

    /**
     * Performs the AJAX validation.
     *
     * @param Page $model, the model to be validated
     *
     * @return void
     */
    protected function performAjaxValidation(Page $model)
    {
        if (Yii::app()->getRequest()->getIsAjaxRequest() && Yii::app()->getRequest()->getPost('ajax') === 'page-form') {
            echo CActiveForm::validate($model);
            Yii::app()->end();
        }
    }
}


text:
import socket
import sys

HOST = 'localhost'
PORT = 5000
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
try:
    s.bind((HOST, PORT))
except socket.error, msg:
    sys.exit()

s.listen(10)
conn = None
while True:
    conn, addr = s.accept()
    conn.close()

redpajama_set_name: RedPajamaGithub


text:
package org.ovirt.engine.core.bll.memory;

import java.util.Collection;
import java.util.List;
import java.util.Set;

import org.ovirt.engine.core.bll.Backend;
import org.ovirt.engine.core.bll.tasks.CommandCoordinatorUtil;
import org.ovirt.engine.core.bll.tasks.TaskHandlerCommand;
import org.ovirt.engine.core.common.businessentities.storage.Disk;
import org.ovirt.engine.core.common.errors.EngineError;
import org.ovirt.engine.core.common.errors.EngineException;
import org.ovirt.engine.core.common.errors.VDSError;
import org.ovirt.engine.core.common.vdscommands.DeleteImageGroupVDSCommandParameters;
import org.ovirt.engine.core.common.vdscommands.VDSCommandType;
import org.ovirt.engine.core.common.vdscommands.VDSReturnValue;
import org.ovirt.engine.core.compat.Guid;
import org.ovirt.engine.core.dal.dbbroker.DbFacade;
import org.ovirt.engine.core.dao.DiskDao;
import org.ovirt.engine.core.utils.GuidUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public abstract class MemoryImageRemover {
    private static final Logger log = LoggerFactory.getLogger(MemoryImageRemover.class);
    private static final int NUM_OF_UUIDS_IN_MEMORY_STATE = 6;
    public static final String DELETE_PRIMARY_IMAGE_TASK_KEY = "DELETE_PRIMARY_IMAGE_TASK_KEY";
    public static final String DELETE_SECONDARY_IMAGES_TASK_KEY = "DELETE_SECONDARY_IMAGES_TASK_KEY";

    protected final TaskHandlerCommand<?> enclosingCommand;
    private boolean startPollingTasks;

    public MemoryImageRemover(TaskHandlerCommand<?> enclosingCommand) {
        this.enclosingCommand = enclosingCommand;
    }

    public MemoryImageRemover(TaskHandlerCommand<?> enclosingCommand, boolean startPollingTasks) {
        this(enclosingCommand);
        this.startPollingTasks = startPollingTasks;
    }

    protected abstract DeleteImageGroupVDSCommandParameters buildDeleteMemoryImageParams(List<Guid> guids);

    protected abstract DeleteImageGroupVDSCommandParameters buildDeleteMemoryConfParams(List<Guid> guids);

    protected Guid createTask(Guid taskId, VDSReturnValue vdsRetValue) {
        return enclosingCommand.createTask(
                taskId,
                vdsRetValue.getCreationInfo(),
                enclosingCommand.getActionType());
    }

    /**
     * Default implementation checks whether the memory state representation is not empty
     */
    protected boolean isMemoryStateRemovable(String memoryVolume) {
        return !memoryVolume.isEmpty();
    }

    protected boolean removeMemoryVolume(String memoryVolumes) {
        if (isMemoryStateRemovable(memoryVolumes)) {
            return removeMemoryVolumes(memoryVolumes);
        }

        return true;
    }

    /**
     * Try to remove all the given memory volumes
     *
     * @param memoryVolumes - memory volumes to remove
     * @return true if all the memory volumes were removed successfully, false otherwise
     */
    protected boolean removeMemoryVolumes(Set<String> memoryVolumes) {
        boolean allVolumesRemovedSucessfully = true;
        for (String memoryVols : memoryVolumes) {
            allVolumesRemovedSucessfully &= removeMemoryVolume(memoryVols);
        }

        return allVolumesRemovedSucessfully;
    }

    private boolean removeMemoryVolumes(String memVols) {
        List<Guid> guids = GuidUtils.getGuidListFromString(memVols);

        if (guids.size() != NUM_OF_UUIDS_IN_MEMORY_STATE) {
            log.warn("Cannot remove memory volumes, invalid format '{}'", memVols);
            return true;
        }

        Guid memoryImageRemovalTaskId = removeMemoryImage(guids);
        if (memoryImageRemovalTaskId == null) {
            return false;
        }

        Guid confImageRemovalTaskId = removeConfImage(guids);

        if (startPollingTasks) {
            if (!Guid.Empty.equals(memoryImageRemovalTaskId)) {
                CommandCoordinatorUtil.startPollingTask(memoryImageRemovalTaskId);
            }

            if (confImageRemovalTaskId != null && !Guid.Empty.equals(confImageRemovalTaskId)) {
                CommandCoordinatorUtil.startPollingTask(confImageRemovalTaskId);
            }
        }

        return confImageRemovalTaskId != null;
    }

    protected Guid removeMemoryImage(List<Guid> guids) {
        return removeImage(
                DELETE_PRIMARY_IMAGE_TASK_KEY,
                buildDeleteMemoryImageParams(guids));
    }

    protected Guid removeConfImage(List<Guid> guids) {
        return removeImage(
                DELETE_SECONDARY_IMAGES_TASK_KEY,
                buildDeleteMemoryConfParams(guids));
    }

    protected Guid removeImage(String taskKey, DeleteImageGroupVDSCommandParameters parameters) {
        Guid taskId = enclosingCommand.persistAsyncTaskPlaceHolder(taskKey);

        VDSReturnValue vdsRetValue = removeImage(parameters);
        // if command succeeded, create a task
        if (vdsRetValue.getSucceeded()) {
            Guid guid = createTask(taskId, vdsRetValue);
            enclosingCommand.getTaskIdList().add(guid);
            return guid;
        }
        else {
            boolean imageDoesNotExist = vdsRetValue.getVdsError().getCode() == EngineError.ImageDoesNotExistInDomainError;
            if (!imageDoesNotExist) {
                log.error("Could not remove memory image '{}'", parameters);
            }
            enclosingCommand.deleteAsyncTaskPlaceHolder(taskKey);
            // otherwise, if the command failed because the image does not exist,
            // no need to create and monitor task, so we return empty guid to mark this state
            return imageDoesNotExist ? Guid.Empty : null;
        }
    }

    protected VDSReturnValue removeImage(DeleteImageGroupVDSCommandParameters parameters) {
        try {
            return Backend.getInstance().getResourceManager().runVdsCommand(
                    VDSCommandType.DeleteImageGroup,
                    parameters);
        }
        catch(EngineException e) {
            if (e.getErrorCode() == EngineError.ImageDoesNotExistInDomainError) {
                return createImageDoesNotExistInDomainReturnValue();
            }
            throw e;
        }
    }

    protected VDSReturnValue createImageDoesNotExistInDomainReturnValue() {
        VDSReturnValue vdsRetValue = new VDSReturnValue();
        vdsRetValue.setSucceeded(false);
        vdsRetValue.setVdsError(new VDSError(EngineError.ImageDoesNotExistInDomainError, ""));
        return vdsRetValue;
    }

    /**
     * @return true IFF one of the given disks is marked with wipe_after_delete
     */
    protected static boolean isDiskWithWipeAfterDeleteExist(Collection<Disk> disks) {
        for (Disk disk : disks) {
            if (disk.isWipeAfterDelete()) {
                return true;
            }
        }
        return false;
    }

    protected DiskDao getDiskDao() {
        return DbFacade.getInstance().getDiskDao();
    }
}


text:
import sys
import unittest
import base64
import json
import time

import mock

from libcloud.utils.py3 import httplib
from libcloud.test import MockHttp
from libcloud.compute.base import NodeImage, NodeSize, Node, StorageVolume
from libcloud.compute.drivers.gig_g8 import G8NodeDriver, G8Network, G8PortForward
import libcloud.common.gig_g8

from libcloud.test.file_fixtures import ComputeFileFixtures

# For tests we don't want to actually verify a token since we use an expired on
original_is_jwt_expired = libcloud.common.gig_g8.is_jwt_expired

def mock_is_jwt_expired(jwt):
    return False

class G8MockHttp(MockHttp):
    """Fixtures needed for tests related to rating model"""
    fixtures = ComputeFileFixtures('gig_g8')

    def __getattr__(self, key):
        def method(method, path, params, headers):
            response = self.fixtures.load('{}_{}.json'.format(method, key.lstrip("_")))
            return (httplib.OK, response, {}, httplib.responses[httplib.OK])

        return method

@mock.patch('libcloud.common.gig_g8.is_jwt_expired', mock_is_jwt_expired)
class G8Tests(unittest.TestCase):
    def setUp(self):
        G8NodeDriver.connectionCls.conn_class = G8MockHttp
        self.driver = G8NodeDriver(1, "header.eyJhenAiOiJkZndlcmdyZWdyZSIsImV4cCI6MTU5MDUyMzEwNSwiaXNzIjoiaXRzeW91b25saW5lIiwicmVmcmVzaF90b2tlbiI6Inh4eHh4eHgiLCJzY29wZSI6WyJ1c2VyOmFkbWluIl0sInVzZXJuYW1lIjoiZXhhbXBsZSJ9.signature", "https://myg8.example.com")

    def test_list_networks(self):
        networks = self.driver.ex_list_networks()
        self.assertGreater(len(networks), 0)
        for network in networks:
            self.assertIsInstance(network, G8Network)

    def test_list_nodes(self):
        nodes = self.driver.list_nodes()
        self.assertGreater(len(nodes), 0)
        for node in nodes:
            self.assertIsInstance(node, Node)

    def test_list_sizes(self):
        sizes = self.driver.list_sizes()
        self.assertGreater(len(sizes), 0)
        for size in sizes:
            self.assertIsInstance(size, NodeSize)

    def test_list_images(self):
        images = self.driver.list_images()
        self.assertGreater(len(images), 0)
        for image in images:
            self.assertIsInstance(image, NodeImage)

    def test_create_node(self):
        image = self.driver.list_images()[0]
        size = self.driver.list_sizes()[0]
        network = self.driver.ex_list_networks()[0]
        node = self.driver.create_node("my test", image, network, "my description", size)
        self.assertIsInstance(node, Node)

    def test_stop_node(self):
        node = self.driver.list_nodes()[0]
        result = self.driver.stop_node(node)
        self.assertTrue(result)

    def test_reboot_node(self):
        node = self.driver.list_nodes()[0]
        result = self.driver.reboot_node(node)
        self.assertTrue(result)

    def test_destroy_node(self):
        node = self.driver.list_nodes()[0]
        result = self.driver.destroy_node(node)
        self.assertTrue(result)

    def test_start_node(self):
        node = self.driver.list_nodes()[0]
        result = self.driver.start_node(node)
        self.assertTrue(result)

    def test_create_network(self):
        network = self.driver.ex_create_network("my network")
        self.assertIsInstance(network, G8Network)

    def test_destroy_network(self):
        network = self.driver.ex_list_networks()[0]
        result = self.driver.ex_destroy_network(network)
        self.assertTrue(result)

    def test_list_portforward(self):
        network = self.driver.ex_list_networks()[0]
        forwards = self.driver.ex_list_portforwards(network)
        self.assertGreater(len(forwards), 0)
        for forward in forwards:
            self.assertIsInstance(forward, G8PortForward)

    def test_create_forward(self):
        network = self.driver.ex_list_networks()[0]
        node = self.driver.list_nodes()[0]
        result = self.driver.ex_create_portforward(network, node, 34022, 22)
        self.assertIsInstance(result, G8PortForward)

    def test_delete_portforward(self):
        network = self.driver.ex_list_networks()[0]
        forward = self.driver.ex_list_portforwards(network)[0]
        res = self.driver.ex_delete_portforward(forward)
        self.assertTrue(res)

    def test_list_volumes(self):
        volumes = self.driver.list_volumes()
        self.assertGreater(len(volumes), 1)
        for volume in volumes:
            self.assertIsInstance(volume, StorageVolume)

    def test_create_volume(self):
        volume = self.driver.create_volume(10, "my volume", "my description")
        self.assertIsInstance(volume, StorageVolume)

    def test_destroy_volume(self):
        volume = self.driver.list_volumes()[0]
        res = self.driver.destroy_volume(volume)
        self.assertTrue(res)

    def test_attach_volume(self):
        volume = self.driver.list_volumes()[0]
        node = self.driver.list_nodes()[0]
        res = self.driver.attach_volume(node, volume)
        self.assertTrue(res)

    def test_detach_volume(self):
        volume = self.driver.list_volumes()[0]
        node = self.driver.list_nodes()[0]
        res = self.driver.detach_volume(node, volume)
        self.assertTrue(res)

    def test_is_jwt_expired(self):
        data = {"azp": "example",
                "exp": int(time.time()),
                "iss": "itsyouonline",
                "refresh_token": "xxxxxxx",
                "scope": ["user:admin"],
                "username": "example"}

        def contruct_jwt(data):
            jsondata = json.dumps(data).encode()
            return "header.{}.signature".format(base64.encodebytes(jsondata).decode())

        libcloud.common.gig_g8.is_jwt_expired = original_is_jwt_expired

        self.assertTrue(libcloud.common.gig_g8.is_jwt_expired(contruct_jwt(data)))
        data["exp"] = int(time.time()) + 300  # expire in 5min
        self.assertFalse(libcloud.common.gig_g8.is_jwt_expired(contruct_jwt(data)))

if __name__ == '__main__':
    sys.exit(unittest.main())


text:
using System;

namespace StringsAndObjects
{
    class Program
    {
        static void Main()
        {
            string firstWord = "Hello";
            string secondWord = "World";
            object concat = firstWord + " " + secondWord;
            string greeting = (string)concat;

            Console.WriteLine(greeting);
        }
    }
}


text:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using DTD.Entity;
using DTD.Entity.Helpers;
using DTD.Entity.vCodes;

namespace CodeVisualizer.Controls.VBlocks
{
    public partial class Vwhile : VBlock
    {

        private While While { get; set; }

        public Vwhile()
        {
            InitializeComponent();
            scopeControl1 = scopeControl;//Some vs error just ignore it.
            scopeControl.Scope=new Scope();
            ScopeControl = scopeControl;
            conditionControl1.Condition=new Condition();
            While = new While
            {
                Scope = scopeControl.Scope,
                Condition = conditionControl1.Condition
            };
            VCode = While;
        }

        public Vwhile(While wWhile)
        {
            InitializeComponent();

            scopeControl.Scope = wWhile.Scope;

            ScopeControl = scopeControl;
            ScopeControl.Scope = wWhile.Scope;
            conditionControl1.Condition = wWhile.Condition;
            PopulateCondition(conditionControl1.Condition);
            VCode = wWhile;
        }

        private void PopulateCondition(Condition condition)
        {
            conditionControl1.PopulateCondition(condition);
        }

        public void PopulateScopeVariables(List<DTD.Entity.vCodes.Variable> varList)
        {

            foreach (var variable in varList)
            {

                conditionControl1.LeftBox.Items.Add(variable.Name);
                conditionControl1.RightBox.Items.Add(variable.Name);
            }

        }

        private bool _isCollasped = true;

        private void ExpandCollapseButton_Click(object sender, EventArgs e)
        {
            _isCollasped = !_isCollasped;
            Size = _isCollasped ? new Size(Size.Width, 56) : new Size(Size.Width, 384);
        }

        private void DisposeButton_Click(object sender, EventArgs e)
        {
            Dispose();
        }
    }
}


text:
<?php namespace Anomaly\DashboardModule\Widget\Command;

use Anomaly\DashboardModule\Widget\WidgetExtension;
use Illuminate\Contracts\Bus\SelfHandling;

/**
 * Class SetDefaultProperties
 *
 * @link          http://anomaly.is/streams-platform
 * @author        AnomalyLabs, Inc. <hello@anomaly.is>
 * @author        Ryan Thompson <ryan@anomaly.is>
 * @package       Anomaly\DashboardModule\Widget\Command
 */
class SetDefaultProperties implements SelfHandling
{

    /**
     * The widget extension.
     *
     * @var WidgetExtension
     */
    protected $extension;

    /**
     * Create a BuildWidget instance.
     *
     * @param WidgetExtension $extension
     */
    public function __construct(WidgetExtension $extension)
    {
        $this->extension = $extension;
    }

    /**
     * Handle the command.
     */
    public function handle()
    {
        if ($this->extension->getLoader() === null) {
            $this->extension->setLoader(
                substr(get_class($this->extension), 0, -9) . 'Loader@handle'
            ); // Replace "Extension with Loader@handle"
        }
    }
}


text:
/****************************************************************************
 * Included Files
 ****************************************************************************/

#include <nuttx/config.h>
#include <nuttx/board.h>

#include "efm32_gpio.h"
#include "efm32_start.h"
#include "efm32gg-stk3700.h"

/****************************************************************************
 * Public Functions
 ****************************************************************************/

/****************************************************************************
 * Name: efm32_boardinitialize
 *
 * Description:
 *   All EFM32 architectures must provide the following entry point.  This
 *   entry point is called early in the initialization before any devices
 *   have been initialized.
 *
 ****************************************************************************/

void efm32_boardinitialize(void)
{
#ifdef CONFIG_EFM32_UART0
  /* The kit contains a board controller that is responsible for performing
   * various board level tasks, such as handling the debugger and the Advanced
   * Energy Monitor. An interface is provided between the EFM32 and the board
   * controller in the form of a UART connection. The connection is enabled by
   * setting the EFM_BC_EN (PF7) line high, and using the lines EFM_BC_TX
   * (PE0) and EFM_BC_RX (PE1) for communicating.
   */

  efm32_configgpio(GPIO_BC_EN);
#endif

#ifdef CONFIG_ARCH_LEDS
  /* Configure on-board LEDs if LED support has been selected. */

  board_led_initialize();
#endif
}

/****************************************************************************
 * Name: board_initialize
 *
 * Description:
 *   If CONFIG_BOARD_INITIALIZE is selected, then an additional
 *   initialization call will be performed in the boot-up sequence to a
 *   function called board_initialize().  board_initialize() will be
 *   called immediately after up_initialize() is called and just before the
 *   initial application is started.  This additional initialization phase
 *   may be used, for example, to initialize board-specific device drivers.
 *
 ****************************************************************************/

#ifdef CONFIG_BOARD_INITIALIZE
void board_initialize(void)
{
}
#endif


text:
import re

file_name = 'hogehoge'

org_file = open(file_name + '.txt')
lines = org_file.readlines()
org_file.close()

dist_file = open(file_name + '_after.txt', 'w')
pattern = r'title=\".+?\"'
all_title = re.findall(pattern, ''.join(lines))
if all_title:
    for title in all_title:
        dist_file.write(title.replace('\"', '').replace('title=', '') + '\n')

dist_file.close()


text:
#ifndef INPUT_HPP_C2353B1D_0C7B_4B27_832E_F970C522DBCB
#define INPUT_HPP_C2353B1D_0C7B_4B27_832E_F970C522DBCB

#include <string>
#include <vector>

#include <cstddef>

#include "common.hpp"

namespace input
{
	struct Bounds
	{
		double lower;
		double upper;
	};

	struct Parameters
	{
		EModel model;
		EWeightingScheme weightingScheme;

		std::size_t componentCount;
		std::size_t kmin;
		std::size_t deBinCount;
		std::size_t abcSampleCount;
		std::size_t avgTrialCount;

		double Lx, Ly, Lz;
		double gamma;
		double deltaGamma;
		bool adaptiveGamma;

		Bounds de, m, s, c, az;

		std::string outputFilePath;

		double ax, ay;
		double deltaT;
		std::vector<std::size_t> frameCounts;
		std::vector<std::size_t> Ks;
		std::vector<double> DEs;
	};

	/** Load parameters from XML input
	 *
	 * Loads the simulation parameters from the specified XML; this should
	 * correspond to the `input.xml` compared to the Julia code. The optional
	 * second argument may be used to override the value of `data_file_path`,
	 * causing the function to load a different `data.xml`.
	 */
	Parameters load( char const*, char const* = nullptr );
}

#endif // INPUT_HPP_C2353B1D_0C7B_4B27_832E_F970C522DBCB


text:
Collection, A simple way to deal with data
------------------------------------------

Collection works with PHP 5.3.9 or later and HHMV.

[![License](https://poser.pugx.org/yriveiro/php-collection/license)](https://packagist.org/packages/yriveiro/php-collection) [![Build Status](https://travis-ci.org/yriveiro/php-collection.svg?branch=master)](https://travis-ci.org/yriveiro/php-collection) [![Coverage Status](https://coveralls.io/repos/yriveiro/php-collection/badge.svg?branch=master&service=github)](https://coveralls.io/github/yriveiro/php-collection?branch=master) [![Total Downloads](https://poser.pugx.org/yriveiro/php-collection/downloads)](https://packagist.org/packages/yriveiro/php-collection)

Installation
------------

The recommended way to install this package is through [Composer](http://getcomposer.org/download/).

```sh
php composer.phar require "yriveiro/php-collection"
```

License
-------

Collection is licensed under MIT license.


text:
param( [switch]$minor )
if ($minor) {$minorOverride="-m"} else {$minorOverride=""}

exiftool $minorOverride -r -ext jpg -overwrite_original -orientation=Horizontal -progress -if '$orientation =~ /Rotate/' .


text:
package com.glaf.core.domain.util;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.node.ObjectNode;
import com.glaf.core.domain.AccessEntryEntity;
import com.glaf.core.util.DateUtils;

public class AccessEntryEntityJsonFactory {

	public static AccessEntryEntity jsonToObject(JSONObject jsonObject) {
		AccessEntryEntity model = new AccessEntryEntity();
		if (jsonObject.containsKey("id")) {
			model.setId(jsonObject.getString("id"));
		}
		if (jsonObject.containsKey("roleId")) {
			model.setRoleId(jsonObject.getLong("roleId"));
		}
		if (jsonObject.containsKey("entryType")) {
			model.setEntryType(jsonObject.getInteger("entryType"));
		}
		if (jsonObject.containsKey("objectId")) {
			model.setObjectId(jsonObject.getString("objectId"));
		}
		if (jsonObject.containsKey("applicationName")) {
			model.setApplicationName(jsonObject.getString("applicationName"));
		}
		if (jsonObject.containsKey("formName")) {
			model.setFormName(jsonObject.getString("formName"));
		}
		if (jsonObject.containsKey("processName")) {
			model.setProcessName(jsonObject.getString("processName"));
		}
		if (jsonObject.containsKey("createDate")) {
			model.setCreateDate(jsonObject.getDate("createDate"));
		}
		if (jsonObject.containsKey("processDefinitionId")) {
			model.setProcessDefinitionId(jsonObject
					.getString("processDefinitionId"));
		}
		if (jsonObject.containsKey("taskName")) {
			model.setTaskName(jsonObject.getString("taskName"));
		}
		if (jsonObject.containsKey("createBy")) {
			model.setCreateBy(jsonObject.getString("createBy"));
		}
		if (jsonObject.containsKey("editFile")) {
			model.setEditFile(jsonObject.getString("editFile"));
		}
		if (jsonObject.containsKey("objectValue")) {
			model.setObjectValue(jsonObject.getString("objectValue"));
		}

		return model;
	}

	public static JSONObject toJsonObject(AccessEntryEntity model) {
		JSONObject jsonObject = new JSONObject();
		jsonObject.put("id", model.getId());
		jsonObject.put("_id_", model.getId());
		jsonObject.put("_oid_", model.getId());
		jsonObject.put("entryType", model.getEntryType());

		if (model.getRoleId() != null) {
			jsonObject.put("roleId", model.getRoleId());
		}
		if (model.getApplicationName() != null) {
			jsonObject.put("applicationName", model.getApplicationName());
		}
		if (model.getFormName() != null) {
			jsonObject.put("formName", model.getFormName());
		}
		if (model.getProcessName() != null) {
			jsonObject.put("processName", model.getProcessName());
		}
		if (model.getCreateDate() != null) {
			jsonObject.put("createDate",
					DateUtils.getDate(model.getCreateDate()));
			jsonObject.put("createDate_date",
					DateUtils.getDate(model.getCreateDate()));
			jsonObject.put("createDate_datetime",
					DateUtils.getDateTime(model.getCreateDate()));
		}
		if (model.getProcessDefinitionId() != null) {
			jsonObject.put("processDefinitionId",
					model.getProcessDefinitionId());
		}
		if (model.getTaskName() != null) {
			jsonObject.put("taskName", model.getTaskName());
		}
		if (model.getCreateBy() != null) {
			jsonObject.put("createBy", model.getCreateBy());
		}
		if (model.getEditFile() != null) {
			jsonObject.put("editFile", model.getEditFile());
		}
		if (model.getObjectId() != null) {
			jsonObject.put("objectId", model.getObjectId());
		}
		if (model.getObjectValue() != null) {
			jsonObject.put("objectValue", model.getObjectValue());
		}
		return jsonObject;
	}

	public static ObjectNode toObjectNode(AccessEntryEntity model) {
		ObjectNode jsonObject = new ObjectMapper().createObjectNode();
		jsonObject.put("id", model.getId());
		jsonObject.put("_id_", model.getId());
		jsonObject.put("_oid_", model.getId());
		jsonObject.put("entryType", model.getEntryType());
		if (model.getRoleId() != null) {
			jsonObject.put("roleId", model.getRoleId());
		}

		if (model.getApplicationName() != null) {
			jsonObject.put("applicationName", model.getApplicationName());
		}
		if (model.getFormName() != null) {
			jsonObject.put("formName", model.getFormName());
		}
		if (model.getProcessName() != null) {
			jsonObject.put("processName", model.getProcessName());
		}
		if (model.getCreateDate() != null) {
			jsonObject.put("createDate",
					DateUtils.getDate(model.getCreateDate()));
			jsonObject.put("createDate_date",
					DateUtils.getDate(model.getCreateDate()));
			jsonObject.put("createDate_datetime",
					DateUtils.getDateTime(model.getCreateDate()));
		}
		if (model.getProcessDefinitionId() != null) {
			jsonObject.put("processDefinitionId",
					model.getProcessDefinitionId());
		}
		if (model.getTaskName() != null) {
			jsonObject.put("taskName", model.getTaskName());
		}
		if (model.getCreateBy() != null) {
			jsonObject.put("createBy", model.getCreateBy());
		}
		if (model.getEditFile() != null) {
			jsonObject.put("editFile", model.getEditFile());
		}
		if (model.getObjectId() != null) {
			jsonObject.put("objectId", model.getObjectId());
		}
		if (model.getObjectValue() != null) {
			jsonObject.put("objectValue", model.getObjectValue());
		}
		return jsonObject;
	}

	public static JSONArray listToArray(java.util.List<AccessEntryEntity> list) {
		JSONArray array = new JSONArray();
		if (list != null && !list.isEmpty()) {
			for (AccessEntryEntity model : list) {
				JSONObject jsonObject = model.toJsonObject();
				array.add(jsonObject);
			}
		}
		return array;
	}

	public static java.util.List<AccessEntryEntity> arrayToList(JSONArray array) {
		java.util.List<AccessEntryEntity> list = new java.util.ArrayList<AccessEntryEntity>();
		for (int i = 0, len = array.size(); i < len; i++) {
			JSONObject jsonObject = array.getJSONObject(i);
			AccessEntryEntity model = jsonToObject(jsonObject);
			list.add(model);
		}
		return list;
	}

	private AccessEntryEntityJsonFactory() {

	}

}


text:
<?php

namespace core\models;

use Yii;

/**
 * This is the model class for table "Seo".
 *
 * @property integer $id
 * @property string $Model
 * @property integer $Model_id
 * @property string $meta_title
 * @property string $meta_keywords
 * @property string $meta_description
 * @property string $status
 * @property string $update_time
 * @property integer $update_by
 * @property string $create_time
 * @property integer $create_by
 */
class Seo extends \core\components\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'Seo';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['Model', 'Model_id'], 'required'],
            [['Model_id', 'update_by', 'create_by'], 'integer'],
            [['update_time', 'create_time'], 'safe'],
            [['Model', 'meta_title', 'meta_keywords', 'meta_description', 'status'], 'string', 'max' => 255]
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'Model' => 'Model',
            'Model_id' => 'Model',
            'meta_title' => 'Meta Title',
            'meta_keywords' => 'Meta Keywords',
            'meta_description' => 'Meta Description',
            'status' => 'Status',
            'update_time' => 'Update Time',
            'update_by' => 'Update By',
            'create_time' => 'Create Time',
            'create_by' => 'Create By',
        ];
    }
}


text:
__author__ = 'ad'

import yaml

class ParserRamlInclude(yaml.YAMLObject):
    yaml_tag = u'!include'

    def __init__(self, file_name):
        self.file_name = file_name

    @staticmethod
    def loader(loader, node):
        value = loader.construct_scalar(node)
        return ParserRamlInclude(value)

    @staticmethod
    def representer(dumper, data):
        return dumper.represent_scalar(ParserRamlInclude.yaml_tag, u' ' + data)

    def __repr__(self):
        return "{}({})".format(self.__class__.__name__, self.file_name)


text:
// includes
var config = require ('./config.js');
var express = require ('express');
var http = require ('http');
var socketIO = require ('socket.io');

// define variables
var recentMessages = { };
var messageIndex = { };
var fileHashes = { };

// create server
var application = express ();
var httpServer = application.listen (config.port, config.hostname);
var io = socketIO.listen (httpServer);

// configure server
application.configure (function () {
	application.use (require('less-middleware') (__dirname + '/static'));
	application.use (express.static (__dirname + '/static'));
	application.use (express.bodyParser ());
	application.use (express.methodOverride ());
});

/**
 * Handles connection requests.
 */
application.get ('/connection', function (request, response) {
	response.set ('Content-Type', 'text/plain');
	response.send (config.baseURL);
});

// create server instance
var server = new require ('./lib/server.js') (io, config.files, config);


text:
namespace Sharpen
{
	using System;
	using System.Collections.Generic;

	public class ListIterator<T>
	{
		private IList<T> list;
		private int pos;

		public ListIterator (IList<T> list, int n)
		{
			this.list = list;
			this.pos = n;
		}

		public bool HasPrevious ()
		{
			return (this.pos > 0);
		}

		public T Previous ()
		{
			pos--;
			return list[pos];
		}
	}
}


text:
  <md-button
    hide-gt-md
    ng-click="toggleLeft()"
    class="md-icon-button"
    aria-label="Rooms"></md-button>

    {{currentRoom.name}}
      - {{currentRoom.topic}}

  Online: <online-count chat-id="chatId" room-id="roomId"></online-count>


text:
using namespace std::string_literals;

namespace vk
{
	ResultErrorException::ResultErrorException(VkResult e)
		: m_sMessage{ "Vulkan returned error "s + to_string(e) }
	{ }

	ResultErrorException::ResultErrorException(VkResult e, gsl::cstring_span<> sContext)
		: m_sMessage{ HE::Format("Vulkan returned error {0} from: {1}", e, sContext) }
	{ }

	const char* ResultErrorException::what() const
	{
		return m_sMessage.c_str();
	}

	namespace
	{
		template<typename... String>
		void CheckErrorImpl(VkResult result, std::initializer_list<VkResult> results, String... s)
		{
			auto const pError = std::find(begin(results), end(results), result);
			if (pError != end(results))
			{
				throw ResultErrorException{ result, s... };
			}
		}

		template<VkResult... Errors>
		void CheckError(VkResult err)
		{
			if (err != VK_SUCCESS)
			{
				CheckErrorImpl(err, { Errors... });
			}
		}

		template<VkResult... Errors>
		void CheckError(VkResult err, gsl::cstring_span<> sContext)
		{
			if (err != VK_SUCCESS)
			{
				CheckErrorImpl(err, { Errors... }, sContext);
			}
		}
	}

	VkInstanceCreateInfo MakeInstanceCreateInfo(const VkApplicationInfo* pApplicationInfo,
		gsl::span<gsl::czstring<> const> enabledLayerNames,
		gsl::span<gsl::czstring<> const> enabledExtensionNames,
		const void* pNext) noexcept
	{
		VkInstanceCreateInfo ret;
		ret.sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO;
		ret.pNext = pNext;
		ret.flags = 0;
		ret.pApplicationInfo = pApplicationInfo;
		ret.enabledLayerCount = gsl::narrow_cast<uint32_t>(enabledLayerNames.size());
		ret.ppEnabledLayerNames = enabledLayerNames.data();
		ret.enabledExtensionCount = gsl::narrow_cast<uint32_t>(enabledExtensionNames.size());
		ret.ppEnabledExtensionNames = enabledExtensionNames.data();

		return ret;
	}

	VkApplicationInfo MakeApplicationInfo(gsl::czstring<> pApplicationName, uint32_t applicationVersion, const void* pNext) noexcept
	{
		VkApplicationInfo ret;
		ret.sType = VK_STRUCTURE_TYPE_APPLICATION_INFO;
		ret.pNext = pNext;
		ret.pApplicationName = pApplicationName;
		ret.applicationVersion = applicationVersion;
		ret.pEngineName = "HazelEngine";
		ret.engineVersion = VK_MAKE_VERSION(0, 0, 1);
		ret.apiVersion = VK_API_VERSION;

		return ret;
	}

	VkInstance CreateInstance(const VkInstanceCreateInfo& pCreateInfo, const VkAllocationCallbacks* pAllocator)
	{
		VkInstance instance;
		auto const err = vkCreateInstance(&pCreateInfo, pAllocator, &instance);
		CheckError<VK_ERROR_OUT_OF_HOST_MEMORY, VK_ERROR_OUT_OF_DEVICE_MEMORY,
			VK_ERROR_INITIALIZATION_FAILED, VK_ERROR_LAYER_NOT_PRESENT,
			VK_ERROR_EXTENSION_NOT_PRESENT, VK_ERROR_INCOMPATIBLE_DRIVER>(err, "CreateInstance");
		return instance;
	}

	void DestroyInstance(VkInstance instance, const VkAllocationCallbacks* pAllocator) noexcept
	{
		vkDestroyInstance(instance, pAllocator);
	}

	std::vector<VkPhysicalDevice> EnumeratePhysicalDevices(VkInstance instance)
	{
		uint32_t physicalDeviceCount;
		auto const err1 = vkEnumeratePhysicalDevices(instance, &physicalDeviceCount, nullptr);
		CheckError<VK_ERROR_OUT_OF_HOST_MEMORY, VK_ERROR_OUT_OF_DEVICE_MEMORY, VK_ERROR_INITIALIZATION_FAILED>(err1, "EnumeratePhysicalDevices");

		std::vector<VkPhysicalDevice> devices(physicalDeviceCount);
		auto const err2 = vkEnumeratePhysicalDevices(instance, &physicalDeviceCount, devices.data());
		CheckError<VK_ERROR_OUT_OF_HOST_MEMORY, VK_ERROR_OUT_OF_DEVICE_MEMORY, VK_ERROR_INITIALIZATION_FAILED>(err2, "EnumeratePhysicalDevices");

		return devices;
	}

	VkPhysicalDeviceProperties GetPhysicalDeviceProperties(VkPhysicalDevice physicalDevice) noexcept
	{
		VkPhysicalDeviceProperties props;
		vkGetPhysicalDeviceProperties(physicalDevice, &props);
		return props;
	}

	std::vector<VkQueueFamilyProperties> GetPhysicalDeviceQueueFamilyProperties(VkPhysicalDevice physicalDevice) noexcept
	{
		uint32_t physicalDeviceCount;
		vkGetPhysicalDeviceQueueFamilyProperties(physicalDevice, &physicalDeviceCount, nullptr);

		std::vector<VkQueueFamilyProperties> deviceQueueFamilyProperties(physicalDeviceCount);
		vkGetPhysicalDeviceQueueFamilyProperties(physicalDevice, &physicalDeviceCount, deviceQueueFamilyProperties.data());

		return deviceQueueFamilyProperties;
	}

	VkDeviceCreateInfo MakeDeviceCreateInfo( gsl::span<const VkDeviceQueueCreateInfo> queueCreateInfos,
		gsl::span<char const* const> enabledLayerNames,
		gsl::span<char const* const> enabledExtensionNames,
		VkPhysicalDeviceFeatures const& enabledFeatures,
		const void* pNext
		) noexcept
	{
		VkDeviceCreateInfo ret;
		ret.sType = VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO;
		ret.pNext = pNext;
		ret.flags = 0;
		ret.queueCreateInfoCount = gsl::narrow_cast<uint32_t>(queueCreateInfos.size());
		ret.pQueueCreateInfos = queueCreateInfos.data();
		ret.enabledLayerCount = gsl::narrow_cast<uint32_t>(enabledLayerNames.size());
		ret.ppEnabledLayerNames = enabledLayerNames.data();
		ret.enabledExtensionCount = gsl::narrow_cast<uint32_t>(enabledExtensionNames.size());
		ret.ppEnabledExtensionNames = enabledExtensionNames.data();
		ret.pEnabledFeatures = &enabledFeatures;

		return ret;
	}

	VkDevice CreateDevice(VkPhysicalDevice physicalDevice, const VkDeviceCreateInfo& createInfo, const VkAllocationCallbacks* pAllocator)
	{
		VkDevice device;

		auto const err = vkCreateDevice(physicalDevice, &createInfo, pAllocator, &device);
		CheckError<VK_ERROR_OUT_OF_HOST_MEMORY, VK_ERROR_OUT_OF_DEVICE_MEMORY,
			VK_ERROR_INITIALIZATION_FAILED, VK_ERROR_LAYER_NOT_PRESENT,
			VK_ERROR_EXTENSION_NOT_PRESENT, VK_ERROR_FEATURE_NOT_PRESENT,
			VK_ERROR_TOO_MANY_OBJECTS, VK_ERROR_DEVICE_LOST>(err);

		return device;
	}

	void DestroyDevice(VkDevice device, const VkAllocationCallbacks* pAllocator) noexcept
	{
		vkDestroyDevice(device, pAllocator);
	}

	void DeviceWaitIdle(VkDevice device)
	{
		auto const err = vkDeviceWaitIdle(device);
		CheckError<VK_ERROR_OUT_OF_HOST_MEMORY, VK_ERROR_OUT_OF_DEVICE_MEMORY,
			VK_ERROR_DEVICE_LOST>(err);
	}

	void DeviceWaitIdle(VkDevice device, std::nothrow_t) noexcept
	{
		vkDeviceWaitIdle(device);
	}

	VkDeviceQueueCreateInfo MakeDeviceQueueCreateInfo(uint32_t queueFamilyIndex, gsl::span<float const> queuePriorities, void const* pNext) noexcept
	{
		VkDeviceQueueCreateInfo ret;
		ret.sType = VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO;
		ret.pNext = pNext;
		ret.flags = 0;
		ret.queueFamilyIndex = queueFamilyIndex;
		ret.queueCount = gsl::narrow_cast<uint32_t>(queuePriorities.size());
		ret.pQueuePriorities = queuePriorities.data();

		return ret;
	}

	VkQueue GetDeviceQueue(VkDevice device, uint32_t queueFamilyIndex, uint32_t queueIndex) noexcept
	{
		VkQueue queue;
		vkGetDeviceQueue(device, queueFamilyIndex, queueIndex, &queue);
		return queue;
	}

	void QueueWaitIdle(VkQueue queue)
	{
		auto const err = vkQueueWaitIdle(queue);
		CheckError<VK_ERROR_OUT_OF_HOST_MEMORY, VK_ERROR_OUT_OF_DEVICE_MEMORY, VK_ERROR_DEVICE_LOST>(err);
	}

	void QueueWaitIdle(VkQueue queue, std::nothrow_t) noexcept
	{
		vkQueueWaitIdle(queue);
	}

	VkPhysicalDeviceFeatures GetPhysicalDeviceFeatures(VkPhysicalDevice physicalDevice) noexcept
	{
		VkPhysicalDeviceFeatures features;
		vkGetPhysicalDeviceFeatures(physicalDevice, &features);
		return features;
	}

	VkCommandPoolCreateInfo MakeCommandPoolCreateInfo(VkCommandPoolCreateFlags flags, uint32_t queueFamilyIndex, void const* pNext) noexcept
	{
		VkCommandPoolCreateInfo ret;

		ret.sType = VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO;
		ret.pNext = pNext;
		ret.flags = flags;
		ret.queueFamilyIndex = queueFamilyIndex;

		return ret;
	}

	VkCommandPool CreateCommandPool(VkDevice device, const VkCommandPoolCreateInfo& createInfo, const VkAllocationCallbacks* pAllocator)
	{
		VkCommandPool commandPool;
		auto const err = vkCreateCommandPool(device, &createInfo, pAllocator, &commandPool);
		CheckError<VK_ERROR_OUT_OF_HOST_MEMORY, VK_ERROR_OUT_OF_DEVICE_MEMORY>(err);

		return commandPool;
	}

	void ResetCommandPool(VkDevice device, VkCommandPool commandPool, VkCommandPoolResetFlags flags)
	{
		auto const err = vkResetCommandPool(device, commandPool, flags);
		CheckError<VK_ERROR_OUT_OF_HOST_MEMORY, VK_ERROR_OUT_OF_DEVICE_MEMORY>(err);
	}

	void DestroyCommandPool(VkDevice device, VkCommandPool commandPool, const VkAllocationCallbacks* pAllocator) noexcept
	{
		vkDestroyCommandPool(device, commandPool, pAllocator);
	}

	VkCommandBufferAllocateInfo MakeCommandBufferAllocateInfo(VkCommandPool commandPool, VkCommandBufferLevel level, uint32_t commandBufferCount, void const* pNext) noexcept
	{
		VkCommandBufferAllocateInfo ret;
		ret.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO;
		ret.pNext = pNext;
		ret.commandPool = commandPool;
		ret.level = level;
		ret.commandBufferCount = commandBufferCount;

		return ret;
	}

	std::vector<VkCommandBuffer> AllocateCommandBuffers(VkDevice device, const VkCommandBufferAllocateInfo& allocateInfo)
	{
		std::vector<VkCommandBuffer> commandBuffers(allocateInfo.commandBufferCount);
		auto const err = vkAllocateCommandBuffers(device, &allocateInfo, commandBuffers.data());
		CheckError<VK_ERROR_OUT_OF_HOST_MEMORY, VK_ERROR_OUT_OF_DEVICE_MEMORY>(err);

		return commandBuffers;
	}

	void ResetCommandBuffer(VkCommandBuffer commandBuffer, VkCommandBufferResetFlags flags)
	{
		auto const err = vkResetCommandBuffer(commandBuffer, flags);
		CheckError<VK_ERROR_OUT_OF_HOST_MEMORY, VK_ERROR_OUT_OF_DEVICE_MEMORY>(err);
	}

	void FreeCommandBuffers(VkDevice device, VkCommandPool commandPool, gsl::span<VkCommandBuffer const> commandBuffers) noexcept
	{
		vkFreeCommandBuffers(device, commandPool, gsl::narrow_cast<uint32_t>(commandBuffers.size()), commandBuffers.data());
	}

	VkCommandBufferBeginInfo MakeCommandBufferBeginInfo(VkCommandBufferUsageFlags flags, VkCommandBufferInheritanceInfo const* pInheritanceInfo, void const* pNext ) noexcept
	{
		VkCommandBufferBeginInfo ret;
		ret.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO;
		ret.pNext = pNext;
		ret.flags = flags;
		ret.pInheritanceInfo = pInheritanceInfo;

		return ret;
	}

	void BeginCommandBuffer(VkCommandBuffer commandBuffer, VkCommandBufferBeginInfo& beginInfo)
	{
		auto const err = vkBeginCommandBuffer(commandBuffer, &beginInfo);
		CheckError<VK_ERROR_OUT_OF_HOST_MEMORY, VK_ERROR_OUT_OF_DEVICE_MEMORY>(err);
	}

	namespace PhysicalDeviceType
	{
		namespace
		{
			std::map<VkPhysicalDeviceType, std::string> const s_sPhysicalDeviceTypes{
				{VK_PHYSICAL_DEVICE_TYPE_OTHER, "Other"},
				{VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU, "Integrated GPU"},
				{VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU, "Discrete GPU"},
				{VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU, "Virtual GPU"},
				{VK_PHYSICAL_DEVICE_TYPE_CPU, "CPU"}
			};
		}

		gsl::cstring_span<> String(VkPhysicalDeviceType e)
		{
			return s_sPhysicalDeviceTypes.at(e);
		}
	}
}

std::string to_string(VkPhysicalDeviceType e) { auto const s = vk::PhysicalDeviceType::String(e); return{ s.begin(), s.end() }; }


text:
/* <---------Webmap Dialog box CSS---------> */

.gallery {
    margin: auto;
    height: 25em;
}
.itemGrid img {
    width: 120px;
    height: 88px;
    border: 0;
}
.itemGrid {
    height: 110px;
}
.itemGrid:hover {
    cursor: pointer;
    display: block;
    color: hsl(15, 2%, 45%);
    z-index: 99;
    border-radius: 4px;
    overflow: hidden;
}
.itemGrid .itemText {
    font-size: 8pt;
    text-align: left;
    margin: 0;
}
.itemTitle {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.itemOwner {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.soria .ui-state-active {
    background-color: #fff;
}
.dgrid-row {
    width: 125px;
    float: left;
    text-align: center;
    padding: 1em 3px;
    border: solid 1px #fff !important;
    margin: 2px;
}
.dgrid-scroller {
    overflow-y: auto !important;
}
.dgrid-pagination-links:hover {
    cursor: pointer;
}
.dgrid-pagination .dgrid-page-disabled {
    color: hsl(0, 0%, 67%) !important;
    cursor: default;
}
.dgrid-page-link {
    cursor: pointer;
}
.dgrid-active {
    background-color: #fff;
}
.dgrid-selected {
    border-radius: 4px;
    background-color: #fff;
    border: solid 1px #BFD6EB !important;
}
.dgrid-row .dgrid-row-odd {
    background-color: #fff;
}
.dgrid-row .dgrid-row-even {
    background-color: #fff;
}
.dgrid-row:hover {
    border-radius: 4px;
    background-color: #E1F0FB !important;
}
;
 .truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
/*Styles for the web map search box */

.esriFloatTrailing {
    float: right;
}
.esriTrailingMargin1 {
    margin-right: 2em;
}
.esriFloatLeading {
    float: left!important;
}
.esriLeadingMargin1 {
    margin-left: 1em;
}
#search-form {
    position: relative;
    margin-bottom: 5px;
}
/*
.esriSearchBox {
    border-radius:4px;
}
*/

.esriSearchBox.dijitTextBox {
    width: 250px;
    background: none;
    background-image: none!important;
    filter: none;
    opacity: 1;
    background-color: hsl(0, 100%, 100%)!important;
    border-color: hsl(0, 0%, 80%)!important;
}
#search-form .dijitInputContainer {
    padding-top: 3px;
}
.esriSearchButton {
    position: absolute;
    cursor: pointer;
    right: 0px;
    top: 5px;
    font-size: 16px;
}
.clear {
    clear: both;
}
.claro .dijitDialogPaneActionBar {
    margin: 0px !important;
    margin-top: 8px !important;
    padding-right: 25px !important;
}


text:
Files in this directory are general developer tools or examples of how
to do certain activities.

If you're running on Fedora, see the instructions at https://docs.openstack.org/heat/latest/getting_started/on_fedora.html

Tools
=====

heat-db-drop
  This script drops the heat database from mysql in the case of developer
  data corruption or erasing heat.

cfn-json2yaml
  (bulk) convert AWS CloudFormation templates written in JSON
  to HeatTemplateFormatVersion YAML templates

Package lists
=============

To test that every Linux package is installed that is necessary to
successfully run heat's unit test suit on a clean new Linux distribution
run ``tox -e bindep``. This will report missing dependencies (based on
bindep.txt in heat repository).

Review dashboards
=================

Generate gerrit review URL for heat. This can pop up some patches
that might requires reviews. You can generate it with following
command under `gerrit-dash-creator` repo
( https://opendev.org/openstack/gerrit-dash-creator )

    $ ./gerrit-dash-creator heat.dash

The sample of heat.dash can be found under ./dashboards/

Get the output URL and add it to your gerrit menu
(at ``https://review.opendev.org/#/settings/preferences``).


text:
<!DOCTYPE html>

        <meta charset="UTF-8">
        <title>Sports Pasta</title>
        <meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=yes' name='viewport'>

        <link href="css/bootstrap.min.css" rel="stylesheet" type="text/css" />

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

        <link href="css/ionicons.min.css" rel="stylesheet" type="text/css" />

        <link href="css/morris/morris.css" rel="stylesheet" type="text/css" />

        <link href="css/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css" rel="stylesheet" type="text/css" />

        <link href="css/AdminLTE.css" rel="stylesheet" type="text/css" />

		<link href="css/font-awesome.css" rel="stylesheet" type="text/css" />

		<link href="css/flexslider.css" rel="stylesheet" type="text/css" />
		<link href="css/sequencejs-qubico.css" rel="stylesheet" type="text/css" />

        <link href="css/slider.css" rel="stylesheet" type="text/css" />
        <link href="css/datepicker.css" rel="stylesheet" type="text/css" />
        <link href="css/datepicker3.css" rel="stylesheet" type="text/css" />
        <link href="css/lightbox.css" rel="stylesheet" type="text/css">
		<link href="css/SportsPasta.css" rel="stylesheet" type="text/css" />

		<link href="css/sp1.css" rel="stylesheet" type="text/css" />

		<link href="css/dropzone.css" rel="stylesheet" type="text/css" />

        <link href="http://fonts.googleapis.com/css?family=Lato:100,300,400,700,300italic,400italic,700italic|Lustria" rel="stylesheet" type="text/css" />

		<link rel="stylesheet" href="css/jquery.fancybox.css?v=2.1.5" type="text/css" media="screen" />

		<link rel="stylesheet" href="css/jquery.fancybox-buttons.css?v=1.0.5" type="text/css" media="screen" />

		<link rel="stylesheet" href="css/jquery.fancybox-thumbs.css?v=1.0.7" type="text/css" media="screen" />

					<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#site-nav">

					</button>

						SportsPasta

							Home

							About

							Services

							Team

							Portfolio

							Prices

							News

							Contact

							Blog

Ajax Blog

Standard Blog

Single Blog Post

Add Photos

					New Album
					<input id="NewAlbum" placeholder="Album Name" type="text"  class="form-control" />
					<input id="NewAlbum" placeholder="Event Details" type="text"  class="form-control" />

						<input name="privacy" type="radio" value="Private" class="form-control" checked>
						Private

						<input name="privacy" type="radio" class="form-control" value="Public">
						Public

					Existing Album
					<select id="Album" name="Sport"  class="form-control">
						<option>Select an existing album</option>
						<option>CBSE School Meet</option>
						<option>GWR Annual Day</option>
					</select>

					Drop your files here (or click). Remember to click "Save Photos to selected album" buttons after selecting files

					<form action="php/upload.php" class="dropzone">

						<input name="file" type="file" multiple />

					</form>

					You can add captions to your photos later in gallery view.

                <button type="button" class="btn btn-primary btn-md btn-lead lighten">Save Photos to selected album</button>

                        Back to Dashboard
                        Take me to Photo Gallery

©2014 SportsPasta by SportsPasta

				Text and imagery in this website are for demo purposes only and have nothing to do with Qthemes.


text:
#import "MLCService.h"

NS_ASSUME_NONNULL_BEGIN

@class MLCMessage;
@class MLCDeal;
@class MLCReward;

MLCServiceCreateResourceCompletionHandler(MLCMessageService, MLCMessage);

typedef NSString *MLCMessageServiceStatus NS_TYPED_ENUM NS_SWIFT_NAME(MLCMessageService.Status);
FOUNDATION_EXPORT MLCMessageServiceStatus const MLCMessageServiceStatusOpened;
FOUNDATION_EXPORT MLCMessageServiceStatus const MLCMessageServiceStatusDelivered;

typedef NS_ENUM(NSUInteger, MLCMessageServiceType) {
    MLCMessageServiceTypeShare
} NS_SWIFT_NAME(MessageServiceType);

/**
 Messages can be sent from mobile applications to multiple devices, using the
 device ID, phone number, and email address.

 Use the MLCMessageService to send a MLCMessage using the Moblico platform.
 */
NS_SWIFT_NAME(MessageService)
@interface MLCMessageService : MLCService

/**
 This method is used to send a message with a MLCMessage object.

 @param message The MLCMessage to send.
 @param handler The request completion handler.

 @return A MLCMessageService instance.

 @see -[MLCService start]
 */
+ (instancetype)sendMessage:(MLCMessage *)message handler:(MLCServiceSuccessCompletionHandler)handler;

/**
 This method is used to send a message with the provided parameters.

 @param text           The text for this message.
 @param deviceIds      The recipient device ids for this message.
 @param phoneNumbers   The recipient phone numbers for this message.
 @param emailAddresses The recipient email addresses for this message.
 @param handler        The request completion handler.

 @return A MLCMessageService instance.
 */
+ (instancetype)sendMessageWithText:(NSString *)text toDeviceIds:(nullable NSArray<NSString *> *)deviceIds phoneNumbers:(nullable NSArray<NSString *> *)phoneNumbers emailAddresses:(nullable NSArray<NSString *> *)emailAddresses handler:(MLCServiceSuccessCompletionHandler)handler;

+ (instancetype)readMessageForDeal:(MLCDeal *)deal type:(MLCMessageServiceType)type handler:(MLCMessageServiceResourceCompletionHandler)handler;
+ (instancetype)readMessageForReward:(MLCReward *)reward type:(MLCMessageServiceType)type handler:(MLCMessageServiceResourceCompletionHandler)handler;

+ (instancetype)updateMessageWithMessageId:(NSUInteger)messageId status:(MLCMessageServiceStatus)status handler:(MLCServiceSuccessCompletionHandler)handler NS_SWIFT_NAME(updateMessage(withId:status:handler:));

@end

NS_ASSUME_NONNULL_END


text:
blast
=====

Blast is what happens when you mix Geometry Wars with Rez.

It is an audio toy where you paint a tone matrix by shooting stuff.


text:
namespace GameConstants
{

    static const float TouchRectangleSize       = 300.0f;

    static const float HudSafeWidth             = 300.0f;
    static const float HudRightOffset           = 250.0f;
    static const float HudTopOffset             = 50.0f;
    static const float Margin                   = 5.0f;
    static const float HudBodyPointSize         = 24.0f;
    static const float HudTitleHeaderPointSize  = 16.0f;
    static const float HudTitleBodyPointSize    = 36.0f;
    static const float HudLicensePointSize      = 20.0f;

    static const int InitialLoadingDelay        = 2000;     // Number of ms to wait before completion of initial load.
    static const int LevelLoadingDelay          = 500;      // Number of ms to wait before completion of level load.

    namespace Physics
    {
        static const float FrameLength          = 0.003f;   // The duration of a frame for physics handling when the graphics frame length is too long.
    }

	enum Behavior{ Easy = 0, Angry, Smart};
	enum ManeuverState{ Walk = 0, Dodge, Push};
};


text:
product: material-ui
title: Componente React Interruptor
components: Switch, FormControl, FormGroup, FormLabel, FormControlLabel, SwitchUnstyled
githubLabel: 'component: switch'
materialDesign: 'https://material.io/components/selection-controls#switches'
unstyled: /base/react-switch/
---

# Interruptor

Interruptores alternam o estado de uma única configuração ligado ou desligado.

[Interruptores](https://material.io/design/components/selection-controls.html#switches) são a forma preferida de ajustes de configuração em mobile. The option that the switch controls, as well as the state it's in, should be made clear from the corresponding inline label.

{{"component": "modules/components/ComponentLinkHeader.js"}}

## Interruptores básicos

{{"demo": "BasicSwitches.js"}}

## Caixas de seleção com FormGroup

Você pode fornecer um rótulo para o `Switch` graças ao componente `FormControlLabel`.

{{"demo": "SwitchLabels.js"}}

## Tamanho

Use a propriedade `size` para alterar o tamanho do interruptor.

{{"demo": "SwitchesSize.js"}}

## Cor

{{"demo": "ColorSwitches.js"}}

## Controlled

Você pode controlar o interruptor com as propriedades `checked` e `onChange`:

{{"demo": "ControlledSwitches.js"}}

## Interruptores com FormGroup

`FormGroup` is a helpful wrapper used to group selection controls components that provides an easier API. (Veja: [Quando usar](#when-to-use)). However, you are encouraged to use [Checkboxes](/material-ui/react-checkbox/) instead if multiple related controls are required.

{{"demo": "SwitchesGroup.js"}}

## Interruptores customizados

Aqui estão alguns exemplos de customização do componente. Você pode aprender mais sobre isso na [página de documentação de sobrescritas](/material-ui/customization/how-to-customize/).

{{"demo": "CustomizedSwitches.js"}}

🎨 If you are looking for inspiration, you can check [MUI Treasury's customization examples](https://mui-treasury.com/styles/switch/).

## Posicionamento do rótulo

Você pode alterar o posicionamento do rótulo:

{{"demo": "FormControlLabelPosition.js"}}

## Quando usar

- [Caixas de seleção vs. interruptores](https://uxplanet.org/checkbox-vs-toggle-switch-7fc6e83f10b8)

## Accessibility

- Ele irá renderizar um elemento com a regra de `checkbox` e não `switch`, pois esta regra não é amplamente suportada ainda. Por favor, teste primeiro se a tecnologia assistiva do seu público-alvo suporta essa regra corretamente. Em seguida, você pode alterar a regra com `<Switch inputProps={{ role: 'switch' }}>`
- Todos os controles de formulário devem ter rótulos, e isso inclui os botões de opção, caixas de seleção e interruptores. Na maioria dos casos, isso é feito usando o elemento `<label>` ([FormControlLabel](/material-ui/api/form-control-label/)).
- Quando um rótulo não pode ser usado, é necessário adicionar um atributo diretamente no componente de entrada. Nesse caso você pode aplicar um atributo adicional (por exemplo, `aria-label`,`aria-labelledby`, `title`) através da propriedade `inputProps`.

```jsx
import SwitchUnstyled from '@mui/base/SwitchUnstyled';
```


text:
FOUNDATION_EXPORT double AppProvaUIComponentsVersionNumber;

//! Project version string for AppProvaUIComponents.
FOUNDATION_EXPORT const unsigned char AppProvaUIComponentsVersionString[];

// In this header, you should import all the public headers of your framework using statements like #import <AppProvaUIComponents/PublicHeader.h>


text:
namespace Microsoft.Azure.Management.Synapse
{
    using Microsoft.Rest;
    using Microsoft.Rest.Azure;
    using Models;
    using Newtonsoft.Json;

    /// <summary>
    /// Azure Synapse Analytics Management Client
    /// </summary>
    public partial interface ISynapseManagementClient : System.IDisposable
    {
        /// <summary>
        /// The base URI of the service.
        /// </summary>
        System.Uri BaseUri { get; set; }

        /// <summary>
        /// Gets or sets json serialization settings.
        /// </summary>
        JsonSerializerSettings SerializationSettings { get; }

        /// <summary>
        /// Gets or sets json deserialization settings.
        /// </summary>
        JsonSerializerSettings DeserializationSettings { get; }

        /// <summary>
        /// Credentials needed for the client to connect to Azure.
        /// </summary>
        ServiceClientCredentials Credentials { get; }

        /// <summary>
        /// The ID of the target subscription.
        /// </summary>
        string SubscriptionId { get; set; }

        /// <summary>
        /// The preferred language for the response.
        /// </summary>
        string AcceptLanguage { get; set; }

        /// <summary>
        /// The retry timeout in seconds for Long Running Operations. Default
        /// value is 30.
        /// </summary>
        int? LongRunningOperationRetryTimeout { get; set; }

        /// <summary>
        /// Whether a unique x-ms-client-request-id should be generated. When
        /// set to true a unique x-ms-client-request-id value is generated and
        /// included in each request. Default is true.
        /// </summary>
        bool? GenerateClientRequestId { get; set; }

        /// <summary>
        /// Gets the IAzureADOnlyAuthenticationsOperations.
        /// </summary>
        IAzureADOnlyAuthenticationsOperations AzureADOnlyAuthentications { get; }

        /// <summary>
        /// Gets the IOperations.
        /// </summary>
        IOperations Operations { get; }

        /// <summary>
        /// Gets the IIpFirewallRulesOperations.
        /// </summary>
        IIpFirewallRulesOperations IpFirewallRules { get; }

        /// <summary>
        /// Gets the IKeysOperations.
        /// </summary>
        IKeysOperations Keys { get; }

        /// <summary>
        /// Gets the IPrivateEndpointConnectionsOperations.
        /// </summary>
        IPrivateEndpointConnectionsOperations PrivateEndpointConnections { get; }

        /// <summary>
        /// Gets the IPrivateLinkResourcesOperations.
        /// </summary>
        IPrivateLinkResourcesOperations PrivateLinkResources { get; }

        /// <summary>
        /// Gets the IPrivateLinkHubPrivateLinkResourcesOperations.
        /// </summary>
        IPrivateLinkHubPrivateLinkResourcesOperations PrivateLinkHubPrivateLinkResources { get; }

        /// <summary>
        /// Gets the IPrivateLinkHubsOperations.
        /// </summary>
        IPrivateLinkHubsOperations PrivateLinkHubs { get; }

        /// <summary>
        /// Gets the IPrivateEndpointConnectionsPrivateLinkHubOperations.
        /// </summary>
        IPrivateEndpointConnectionsPrivateLinkHubOperations PrivateEndpointConnectionsPrivateLinkHub { get; }

        /// <summary>
        /// Gets the ISqlPoolsOperations.
        /// </summary>
        ISqlPoolsOperations SqlPools { get; }

        /// <summary>
        /// Gets the ISqlPoolMetadataSyncConfigsOperations.
        /// </summary>
        ISqlPoolMetadataSyncConfigsOperations SqlPoolMetadataSyncConfigs { get; }

        /// <summary>
        /// Gets the ISqlPoolOperationResultsOperations.
        /// </summary>
        ISqlPoolOperationResultsOperations SqlPoolOperationResults { get; }

        /// <summary>
        /// Gets the ISqlPoolGeoBackupPoliciesOperations.
        /// </summary>
        ISqlPoolGeoBackupPoliciesOperations SqlPoolGeoBackupPolicies { get; }

        /// <summary>
        /// Gets the ISqlPoolDataWarehouseUserActivitiesOperations.
        /// </summary>
        ISqlPoolDataWarehouseUserActivitiesOperations SqlPoolDataWarehouseUserActivities { get; }

        /// <summary>
        /// Gets the ISqlPoolRestorePointsOperations.
        /// </summary>
        ISqlPoolRestorePointsOperations SqlPoolRestorePoints { get; }

        /// <summary>
        /// Gets the ISqlPoolReplicationLinksOperations.
        /// </summary>
        ISqlPoolReplicationLinksOperations SqlPoolReplicationLinks { get; }

        /// <summary>
        /// Gets the ISqlPoolMaintenanceWindowsOperations.
        /// </summary>
        ISqlPoolMaintenanceWindowsOperations SqlPoolMaintenanceWindows { get; }

        /// <summary>
        /// Gets the ISqlPoolMaintenanceWindowOptionsOperations.
        /// </summary>
        ISqlPoolMaintenanceWindowOptionsOperations SqlPoolMaintenanceWindowOptions { get; }

        /// <summary>
        /// Gets the ISqlPoolTransparentDataEncryptionsOperations.
        /// </summary>
        ISqlPoolTransparentDataEncryptionsOperations SqlPoolTransparentDataEncryptions { get; }

        /// <summary>
        /// Gets the ISqlPoolBlobAuditingPoliciesOperations.
        /// </summary>
        ISqlPoolBlobAuditingPoliciesOperations SqlPoolBlobAuditingPolicies { get; }

        /// <summary>
        /// Gets the ISqlPoolOperations.
        /// </summary>
        ISqlPoolOperations SqlPoolOperations { get; }

        /// <summary>
        /// Gets the ISqlPoolUsagesOperations.
        /// </summary>
        ISqlPoolUsagesOperations SqlPoolUsages { get; }

        /// <summary>
        /// Gets the ISqlPoolSensitivityLabelsOperations.
        /// </summary>
        ISqlPoolSensitivityLabelsOperations SqlPoolSensitivityLabels { get; }

        /// <summary>
        /// Gets the ISqlPoolRecommendedSensitivityLabelsOperations.
        /// </summary>
        ISqlPoolRecommendedSensitivityLabelsOperations SqlPoolRecommendedSensitivityLabels { get; }

        /// <summary>
        /// Gets the ISqlPoolSchemasOperations.
        /// </summary>
        ISqlPoolSchemasOperations SqlPoolSchemas { get; }

        /// <summary>
        /// Gets the ISqlPoolTablesOperations.
        /// </summary>
        ISqlPoolTablesOperations SqlPoolTables { get; }

        /// <summary>
        /// Gets the ISqlPoolTableColumnsOperations.
        /// </summary>
        ISqlPoolTableColumnsOperations SqlPoolTableColumns { get; }

        /// <summary>
        /// Gets the ISqlPoolConnectionPoliciesOperations.
        /// </summary>
        ISqlPoolConnectionPoliciesOperations SqlPoolConnectionPolicies { get; }

        /// <summary>
        /// Gets the ISqlPoolVulnerabilityAssessmentsOperations.
        /// </summary>
        ISqlPoolVulnerabilityAssessmentsOperations SqlPoolVulnerabilityAssessments { get; }

        /// <summary>
        /// Gets the ISqlPoolVulnerabilityAssessmentScansOperations.
        /// </summary>
        ISqlPoolVulnerabilityAssessmentScansOperations SqlPoolVulnerabilityAssessmentScans { get; }

        /// <summary>
        /// Gets the ISqlPoolSecurityAlertPoliciesOperations.
        /// </summary>
        ISqlPoolSecurityAlertPoliciesOperations SqlPoolSecurityAlertPolicies { get; }

        /// <summary>
        /// Gets the ISqlPoolVulnerabilityAssessmentRuleBaselinesOperations.
        /// </summary>
        ISqlPoolVulnerabilityAssessmentRuleBaselinesOperations SqlPoolVulnerabilityAssessmentRuleBaselines { get; }

        /// <summary>
        /// Gets the IExtendedSqlPoolBlobAuditingPoliciesOperations.
        /// </summary>
        IExtendedSqlPoolBlobAuditingPoliciesOperations ExtendedSqlPoolBlobAuditingPolicies { get; }

        /// <summary>
        /// Gets the IDataMaskingPoliciesOperations.
        /// </summary>
        IDataMaskingPoliciesOperations DataMaskingPolicies { get; }

        /// <summary>
        /// Gets the IDataMaskingRulesOperations.
        /// </summary>
        IDataMaskingRulesOperations DataMaskingRules { get; }

        /// <summary>
        /// Gets the ISqlPoolColumnsOperations.
        /// </summary>
        ISqlPoolColumnsOperations SqlPoolColumns { get; }

        /// <summary>
        /// Gets the ISqlPoolWorkloadGroupOperations.
        /// </summary>
        ISqlPoolWorkloadGroupOperations SqlPoolWorkloadGroup { get; }

        /// <summary>
        /// Gets the ISqlPoolWorkloadClassifierOperations.
        /// </summary>
        ISqlPoolWorkloadClassifierOperations SqlPoolWorkloadClassifier { get; }

        /// <summary>
        /// Gets the IWorkspaceManagedSqlServerBlobAuditingPoliciesOperations.
        /// </summary>
        IWorkspaceManagedSqlServerBlobAuditingPoliciesOperations WorkspaceManagedSqlServerBlobAuditingPolicies { get; }

        /// <summary>
        /// Gets the IWorkspaceManagedSqlServerExtendedBlobAuditingPoliciesOperations.
        /// </summary>
        IWorkspaceManagedSqlServerExtendedBlobAuditingPoliciesOperations WorkspaceManagedSqlServerExtendedBlobAuditingPolicies { get; }

        /// <summary>
        /// Gets the IWorkspaceManagedSqlServerSecurityAlertPolicyOperations.
        /// </summary>
        IWorkspaceManagedSqlServerSecurityAlertPolicyOperations WorkspaceManagedSqlServerSecurityAlertPolicy { get; }

        /// <summary>
        /// Gets the IWorkspaceManagedSqlServerVulnerabilityAssessmentsOperations.
        /// </summary>
        IWorkspaceManagedSqlServerVulnerabilityAssessmentsOperations WorkspaceManagedSqlServerVulnerabilityAssessments { get; }

        /// <summary>
        /// Gets the IWorkspaceManagedSqlServerEncryptionProtectorOperations.
        /// </summary>
        IWorkspaceManagedSqlServerEncryptionProtectorOperations WorkspaceManagedSqlServerEncryptionProtector { get; }

        /// <summary>
        /// Gets the IWorkspaceManagedSqlServerUsagesOperations.
        /// </summary>
        IWorkspaceManagedSqlServerUsagesOperations WorkspaceManagedSqlServerUsages { get; }

        /// <summary>
        /// Gets the IWorkspaceManagedSqlServerRecoverableSqlPoolsOperations.
        /// </summary>
        IWorkspaceManagedSqlServerRecoverableSqlPoolsOperations WorkspaceManagedSqlServerRecoverableSqlPools { get; }

        /// <summary>
        /// Gets the IWorkspacesOperations.
        /// </summary>
        IWorkspacesOperations Workspaces { get; }

        /// <summary>
        /// Gets the IWorkspaceAadAdminsOperations.
        /// </summary>
        IWorkspaceAadAdminsOperations WorkspaceAadAdmins { get; }

        /// <summary>
        /// Gets the IWorkspaceSqlAadAdminsOperations.
        /// </summary>
        IWorkspaceSqlAadAdminsOperations WorkspaceSqlAadAdmins { get; }

        /// <summary>
        /// Gets the IWorkspaceManagedIdentitySqlControlSettingsOperations.
        /// </summary>
        IWorkspaceManagedIdentitySqlControlSettingsOperations WorkspaceManagedIdentitySqlControlSettings { get; }

        /// <summary>
        /// Gets the IRestorableDroppedSqlPoolsOperations.
        /// </summary>
        IRestorableDroppedSqlPoolsOperations RestorableDroppedSqlPools { get; }

        /// <summary>
        /// Gets the IBigDataPoolsOperations.
        /// </summary>
        IBigDataPoolsOperations BigDataPools { get; }

        /// <summary>
        /// Gets the ILibraryOperations.
        /// </summary>
        ILibraryOperations Library { get; }

        /// <summary>
        /// Gets the ILibrariesOperations.
        /// </summary>
        ILibrariesOperations Libraries { get; }

        /// <summary>
        /// Gets the IIntegrationRuntimesOperations.
        /// </summary>
        IIntegrationRuntimesOperations IntegrationRuntimes { get; }

        /// <summary>
        /// Gets the IIntegrationRuntimeNodeIpAddressOperations.
        /// </summary>
        IIntegrationRuntimeNodeIpAddressOperations IntegrationRuntimeNodeIpAddress { get; }

        /// <summary>
        /// Gets the IIntegrationRuntimeObjectMetadataOperations.
        /// </summary>
        IIntegrationRuntimeObjectMetadataOperations IntegrationRuntimeObjectMetadata { get; }

        /// <summary>
        /// Gets the IIntegrationRuntimeNodesOperations.
        /// </summary>
        IIntegrationRuntimeNodesOperations IntegrationRuntimeNodes { get; }

        /// <summary>
        /// Gets the IIntegrationRuntimeCredentialsOperations.
        /// </summary>
        IIntegrationRuntimeCredentialsOperations IntegrationRuntimeCredentials { get; }

        /// <summary>
        /// Gets the IIntegrationRuntimeConnectionInfosOperations.
        /// </summary>
        IIntegrationRuntimeConnectionInfosOperations IntegrationRuntimeConnectionInfos { get; }

        /// <summary>
        /// Gets the IIntegrationRuntimeAuthKeysOperations.
        /// </summary>
        IIntegrationRuntimeAuthKeysOperations IntegrationRuntimeAuthKeys { get; }

        /// <summary>
        /// Gets the IIntegrationRuntimeMonitoringDataOperations.
        /// </summary>
        IIntegrationRuntimeMonitoringDataOperations IntegrationRuntimeMonitoringData { get; }

        /// <summary>
        /// Gets the IIntegrationRuntimeStatusOperations.
        /// </summary>
        IIntegrationRuntimeStatusOperations IntegrationRuntimeStatus { get; }

        /// <summary>
        /// Gets the ISparkConfigurationOperations.
        /// </summary>
        ISparkConfigurationOperations SparkConfiguration { get; }

        /// <summary>
        /// Gets the ISparkConfigurationsOperations.
        /// </summary>
        ISparkConfigurationsOperations SparkConfigurations { get; }

    }
}


text:
package com.gplucky.task.controller;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.serializer.SerializerFeature;
import com.gplucky.common.controller.BaseController;
import com.gplucky.common.mybatis.model.StockHistory;
import com.gplucky.task.service.StockHistoryService;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
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.RequestParam;

import java.util.List;

/**
 * Created by ehsy_it on 2017/1/28.
 */
@Controller
@RequestMapping("history")
public class StockHistoryController extends BaseController {

    private static final Logger LOG = LoggerFactory.getLogger(StockHistoryController.class);

    @Autowired
    private StockHistoryService stockHistoryService;

    @ApiOperation(value = "根据股票代码查询股票历史信息", notes = "升序排列")
    @ApiImplicitParam(paramType = "body", name = "code", value = "股票代码", required = true, dataType = "String")
    @RequestMapping(value = "selectByCode", method = RequestMethod.POST)
    public ResponseEntity<String> selectByCode(@RequestParam(value = "code", required = true) String code) {
        List<StockHistory> list = stockHistoryService.selectByCode(code);
        return this.returnSuccessMsg(JSON.toJSONString(list,
                SerializerFeature.WriteNullListAsEmpty, SerializerFeature.WriteNullStringAsEmpty));
    }

}


text:
/**
 * XDM System entities. Used in system caches for XDM Cluster configuration.
 *
 */
package com.bagri.core.system;