text:
<?php
/**
 * Recent Reviews Widget
 *
 * Displays recent reviews widget
 *
 * @author        YIThemes
 * @extends    WP_Widget
 */

if ( ! defined( 'ABSPATH' ) ) {
    exit;
} // Exit if accessed directly

class YIT_Widget_Recent_Reviews extends WP_Widget {

    /**
     * constructor
     *
     * @access public
     * @return void
     */
    function YIT_Widget_Recent_Reviews() {

        /* Widget variable settings. */
        $this->woo_widget_idbase = 'yit_recent_reviews';

        /* Widget settings. */
        $widget_ops = array( 'classname' => 'yit_recent_reviews', 'description' => __( 'Display a list of recent reviews.', 'yit' ) );

        /* Create the widget. */
        WP_Widget::__construct( 'yit-recent_reviews', 'YIT Recent Reviews', $widget_ops );
    }

    function widget( $args, $instance ) {

        extract( $args );

        wp_enqueue_script( 'owl-carousel' );

        $title = apply_filters( 'yit_recent_reviews_widget_title', empty( $instance['title'] ) ? __( 'Recent reviews', 'yit' ) : $instance['title'] );

        echo $before_widget;

        if ( $title ) {
            echo $before_title . $title . $after_title;
        }

        $id = ( isset( $instance['product'] ) && ($instance['product'] != '' || $instance['product'] != 'all' ) ) ? (int) $instance['product'] : 0;

        $attribute = array(
            'number' => $instance['number'],
            'type'   => 'comment',
            'status' => 'approve',
            'orderby' => 'date',
            'order' => 'DESC',
        );
        if ( $id != 0 ) {
            $attribute['post_id'] = $id;
        }
        else {
            $attribute['post_type'] = 'product';
        }

        $reviews = get_comments( $attribute );

        ?>

            <ul class="slides-reviews-widget" data-slidespeed="<?php echo esc_attr( $instance['slidespeed'] ) ?>" data-autoplay="<?php echo esc_attr( $instance['autoplay'] ) ?>" data-navigation="<?php echo esc_attr( $instance['navigation'] ) ?>">
                <?php foreach ( $reviews as $review ) : ?>

<?php yit_excerpt_text( strip_tags( $review->comment_content ), $instance['excerpt_length'], '...' ) ?>

                            <?php if ( $instance['show_avatar'] == 'yes' ) : ?>

                                <?php echo get_avatar( $review->comment_author_email, $size = '58' ); ?>

                            <?php endif ?>

<?php echo $review->comment_author; ?>

                                    <a href="<?php echo get_permalink( $review->ID ) ?>"><?php _e( 'on ', 'yit' ); echo $review->post_title; ?>

                                <?php if ( $instance['show_rating'] == 'yes' ) :
                                    $rating = esc_attr( get_comment_meta( $review->comment_ID, 'rating', true ) ); ?>

<span style="width:<?php echo ( $rating / 5 ) * 100 ?>%">

                                <?php endif; ?>

                <?php endforeach; ?>

        <?php

        echo $after_widget;

    }

    function form( $instance ) {

        $defaults = array(
            'title'          => __( 'Recent Reviews', 'yit' ),
            'product'        => '',
            'number'         => 5,
            'show_avatar'    => 'yes',
            'show_rating'    => 'yes',
            'excerpt_length' => 12,
            'navigation'     => 'yes',
            'autoplay'       => 'yes',
            'slidespeed'     => 500
        );

        $instance = wp_parse_args( ( array ) $instance, $defaults );

        //$products = get_posts( array( 'post_type' => 'product', 'numberposts' => - 1 ) );

        ?>

            <label for="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>"><?php _e( 'Title', 'yit' ); ?>
            <input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'title' ) ); ?>" type="text" value="<?php echo esc_attr( $instance['title'] ); ?>" />

            <label for="<?php echo $this->get_field_id( 'product' ); ?>"><?php _e( 'Insert Product ID', 'yit' ); ?>
            <input class="widefat" id="<?php echo $this->get_field_id( 'product' ) ?>" name="<?php echo $this->get_field_name( 'product' ) ?>" value="<?php echo $instance['product']?>"/>

            <label for="<?php echo esc_attr( $this->get_field_id( 'number' ) ); ?>"><?php _e( 'Number of reviews to show', 'yit' ); ?>
            <input id="<?php echo esc_attr( $this->get_field_id( 'number' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'number' ) ); ?>" type="text" value="<?php echo esc_attr( $instance['number'] ); ?>" size="3" />

<label for="<?php echo esc_attr( $this->get_field_id( 'show_avatar' ) ); ?>"><?php _e( 'Show avatar', 'yit' ); ?>
            <select id="<?php echo esc_attr( $this->get_field_id( 'show_avatar' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'show_avatar' ) ); ?>">
                <option value="yes"<?php selected( $instance['show_avatar'], 'yes' ) ?>><?php _e( 'Yes', 'yit' ) ?></option>
                <option value="no"<?php selected( $instance['show_avatar'], 'no' ) ?>><?php _e( 'No', 'yit' ) ?></option>
            </select>

<label for="<?php echo esc_attr( $this->get_field_id( 'show_rating' ) ); ?>"><?php _e( 'Show rating', 'yit' ); ?>
            <select id="<?php echo esc_attr( $this->get_field_id( 'show_rating' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'show_rating' ) ); ?>">
                <option value="yes"<?php selected( $instance['show_rating'], 'yes' ) ?>><?php _e( 'Yes', 'yit' ) ?></option>
                <option value="no"<?php selected( $instance['show_rating'], 'no' ) ?>><?php _e( 'No', 'yit' ) ?></option>
            </select>

            <label for="<?php echo esc_attr( $this->get_field_id( 'excerpt_length' ) ); ?>"><?php _e( 'Comments text length:', 'yit' ); ?>
            <input id="<?php echo esc_attr( $this->get_field_id( 'excerpt_length' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'excerpt_length' ) ); ?>" type="text" value="<?php echo esc_attr( $instance['excerpt_length'] ); ?>" size="3" />

            <label for="<?php echo esc_attr( $this->get_field_id( 'navigation' ) ); ?>"><?php _e( 'Navigation', 'yit' ); ?>
            <select id="<?php echo esc_attr( $this->get_field_id( 'navigation' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'navigation' ) ); ?>">
                <option value="true"<?php selected( $instance['navigation'], true ) ?>><?php _e( 'Yes', 'yit' ) ?></option>
                <option value="false"<?php selected( $instance['navigation'], false ) ?>><?php _e( 'No', 'yit' ) ?></option>
            </select>

            <label for="<?php echo esc_attr( $this->get_field_id( 'autoplay' ) ); ?>"><?php _e( 'Autoplay', 'yit' ); ?>
            <select id="<?php echo esc_attr( $this->get_field_id( 'autoplay' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'autoplay' ) ); ?>">
                <option value="true"<?php selected( $instance['autoplay'], true ) ?>><?php _e( 'Yes', 'yit' ) ?></option>
                <option value="false"<?php selected( $instance['autoplay'], false ) ?>><?php _e( 'No', 'yit' ) ?></option>
            </select>

            <label for="<?php echo esc_attr( $this->get_field_id( 'slidespeed' ) ); ?>"><?php _e('Speed Animation', 'yit' ) ?>
            <input type="text" id="<?php echo esc_attr( $this->get_field_id( 'slidespeed' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'slidespeed' ) ); ?>" value="<?php echo esc_attr( $instance['slidespeed'] ); ?>" size="4" />

    <?php

    }

    function update( $new_instance, $old_instance ) {

        $instance = $old_instance;

        $instance['title']          = strip_tags( $new_instance['title'] );
        $instance['product']        = $new_instance['product'];
        $instance['number']         = absint( $new_instance['number'] );
        $instance['show_avatar']    = $new_instance['show_avatar'];
        $instance['show_rating']    = $new_instance['show_rating'];
        $instance['excerpt_length'] = absint( $new_instance['excerpt_length'] );
        $instance['navigation']     = $new_instance['navigation'];
        $instance['autoplay']       = $new_instance['autoplay'];
        $instance['slidespeed']     = absint( $new_instance['slidespeed'] );

        return $instance;
    }
}


text:
package com.huawei.esdk.fusionmanager.local.impl.autogen.vm;

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

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

 * <complexType name="QueryVMBackupExtPolicyResp">
 *   <complexContent>
 *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *       <sequence>
 *         <element name="backupPolicy" type="{http://ext.response.model.vmbackup.soap.business.vm.north.galaxmanager.com/xsd}BackupPolicy" minOccurs="0"/>
 *         <element name="backupSpaceType" type="{http://www.w3.org/2001/XMLSchema}int" minOccurs="0"/>
 *         <element name="backupType" type="{http://www.w3.org/2001/XMLSchema}int" minOccurs="0"/>
 *         <element name="faultString" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
 *         <element name="status" type="{http://www.w3.org/2001/XMLSchema}int" minOccurs="0"/>
 *         <element name="vmBackupPolicyName" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
 *       </sequence>
 *     </restriction>
 *   </complexContent>
 * </complexType>
 *

 *
 *
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "QueryVMBackupExtPolicyResp", namespace = "http://response.model.vmbackup.soap.business.vm.north.galaxmanager.com/xsd", propOrder = {
    "backupPolicy",
    "backupSpaceType",
    "backupType",
    "faultString",
    "status",
    "vmBackupPolicyName"
})
public class QueryVMBackupExtPolicyResp {

    protected BackupPolicy backupPolicy;
    protected Integer backupSpaceType;
    protected Integer backupType;
    protected String faultString;
    protected Integer status;
    protected String vmBackupPolicyName;

    /**
     * Gets the value of the backupPolicy property.
     *
     * @return
     *     possible object is
     *     {@link BackupPolicy }
     *
     */
    public BackupPolicy getBackupPolicy() {
        return backupPolicy;
    }

    /**
     * Sets the value of the backupPolicy property.
     *
     * @param value
     *     allowed object is
     *     {@link BackupPolicy }
     *
     */
    public void setBackupPolicy(BackupPolicy value) {
        this.backupPolicy = value;
    }

    /**
     * Gets the value of the backupSpaceType property.
     *
     * @return
     *     possible object is
     *     {@link Integer }
     *
     */
    public Integer getBackupSpaceType() {
        return backupSpaceType;
    }

    /**
     * Sets the value of the backupSpaceType property.
     *
     * @param value
     *     allowed object is
     *     {@link Integer }
     *
     */
    public void setBackupSpaceType(Integer value) {
        this.backupSpaceType = value;
    }

    /**
     * Gets the value of the backupType property.
     *
     * @return
     *     possible object is
     *     {@link Integer }
     *
     */
    public Integer getBackupType() {
        return backupType;
    }

    /**
     * Sets the value of the backupType property.
     *
     * @param value
     *     allowed object is
     *     {@link Integer }
     *
     */
    public void setBackupType(Integer value) {
        this.backupType = value;
    }

    /**
     * Gets the value of the faultString property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    public String getFaultString() {
        return faultString;
    }

    /**
     * Sets the value of the faultString property.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *
     */
    public void setFaultString(String value) {
        this.faultString = value;
    }

    /**
     * Gets the value of the status property.
     *
     * @return
     *     possible object is
     *     {@link Integer }
     *
     */
    public Integer getStatus() {
        return status;
    }

    /**
     * Sets the value of the status property.
     *
     * @param value
     *     allowed object is
     *     {@link Integer }
     *
     */
    public void setStatus(Integer value) {
        this.status = value;
    }

    /**
     * Gets the value of the vmBackupPolicyName property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    public String getVmBackupPolicyName() {
        return vmBackupPolicyName;
    }

    /**
     * Sets the value of the vmBackupPolicyName property.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *
     */
    public void setVmBackupPolicyName(String value) {
        this.vmBackupPolicyName = value;
    }

}

redpajama_set_name: RedPajamaGithub


text:
"""Formatter for the Keychain password database file."""

from plaso.formatters import interface

class KeychainApplicationRecordFormatter(interface.ConditionalEventFormatter):
  """Formatter for keychain application record event."""

  DATA_TYPE = 'mac:keychain:application'

  FORMAT_STRING_PIECES = [
      u'Name: {entry_name}',
      u'Account: {account_name}']

  FORMAT_STRING_SHORT_PIECES = [u'{entry_name}']

  SOURCE_LONG = 'Keychain Application password'
  SOURCE_SHORT = 'LOG'

class KeychainInternetRecordFormatter(interface.ConditionalEventFormatter):
  """Formatter for keychain internet record event."""

  DATA_TYPE = 'mac:keychain:internet'

  FORMAT_STRING_PIECES = [
      u'Name: {entry_name}',
      u'Account: {account_name}',
      u'Where: {where}',
      u'Protocol: {protocol}',
      u'({type_protocol})']

  FORMAT_STRING_SHORT_PIECES = [u'{entry_name}']

  SOURCE_LONG = 'Keychain Internet password'
  SOURCE_SHORT = 'LOG'


text:
import { Attribute } from './attribute';

export interface AdminAttribute extends Attribute {
    username: string;
    password: string;
    firstName: string;
    lastName: string;
    phone: string;
}


text:
def organizations_followed_retrieve_doc_template_values(url_root):
    """
    Show documentation about organizationsFollowedRetrieve
    """
    required_query_parameter_list = [
        {
            'name':         'voter_device_id',
            'value':        'string',  # boolean, integer, long, string
            'description':  'An 88 character unique identifier linked to a voter record on the server',
        },
        {
            'name':         'api_key',
            'value':        'string (from post, cookie, or get (in that order))',  # boolean, integer, long, string
            'description':  'The unique key provided to any organization using the WeVoteServer APIs',
        },
    ]
    optional_query_parameter_list = [
        {
            'name':         'auto_followed_from_twitter_suggestion',
            'value':        'boolean',  # boolean, integer, long, string
            'description':  'True default retrieve auto followed endorsers.'
                            'If False, retrieve all endorsers followed by voter'
                            '(includes twitter auto followed endorsers)',
        },
    ]

    potential_status_codes_list = [
        {
            'code':         'VALID_VOTER_DEVICE_ID_MISSING',
            'description':  'Cannot proceed. A valid voter_device_id parameter was not included.',
        },
        {
            'code':         'VALID_VOTER_ID_MISSING',
            'description':  'Cannot proceed. A valid voter_id was not found.',
        },
        # {
        #     'code':         '',
        #     'description':  '',
        # },
    ]

    try_now_link_variables_dict = {
        'auto_followed_from_twitter_suggestion': 'False',
    }

    # Changes made here should also be made in organizations_retrieve
    api_response = '{\n' \
                   '  "status": string,\n' \
                   '  "success": boolean,\n' \
                   '  "voter_device_id": string (88 characters long),\n' \
                   '  "organization_list": list\n' \
                   '   [\n' \
                   '     "organization_id": integer (the id of the organization found),\n' \
                   '     "organization_we_vote_id": string (the organization ' \
                   'identifier that moves server-to-server),\n' \
                   '     "organization_name": string (value from Google),\n' \
                   '     "organization_website": string (website address),\n' \
                   '     "organization_twitter_handle": string (twitter address),\n' \
                   '     "twitter_followers_count": integer,\n' \
                   '     "twitter_description": string,\n' \
                   '     "organization_email": string,\n' \
                   '     "organization_facebook": string,\n' \
                   '     "organization_photo_url_large": string,\n' \
                   '     "organization_photo_url_medium": string,\n' \
                   '     "organization_photo_url_tiny": string,\n' \
                   '   ],\n' \
                   '}'

    template_values = {
        'api_name': 'organizationsFollowedRetrieve',
        'api_slug': 'organizationsFollowedRetrieve',
        'api_introduction':
            "A list of all endorsers followed by this voter includes automatically followed from twitter. "
            "(Or show the endorsers this voter is following automatically from twitter only "
            "if auto_followed_from_twitter_suggestion is True.)",
        'try_now_link': 'apis_v1:organizationsFollowedRetrieveView',
        'try_now_link_variables_dict': try_now_link_variables_dict,
        'url_root': url_root,
        'get_or_post': 'GET',
        'required_query_parameter_list': required_query_parameter_list,
        'optional_query_parameter_list': optional_query_parameter_list,
        'api_response': api_response,
        'api_response_notes':
            "",
        'potential_status_codes_list': potential_status_codes_list,
    }
    return template_values


text:
namespace MvcTurbine.Samples.CustomBlades.Blades {
    using System.Threading;

    public class BladeDependency : IBladeDependency {
        public void DoWork() {
            Thread.Sleep (5000);
        }
    }
}


text:
import logging
import os
import unittest

from telemetry.core.platform import linux_based_platform_backend
from telemetry.core import util

util.AddDirToPythonPath(util.GetTelemetryDir(), 'third_party', 'mock')
import mock  # pylint: disable=import-error

class TestBackend(linux_based_platform_backend.LinuxBasedPlatformBackend):

  # pylint: disable=W0223

  def __init__(self):
    super(TestBackend, self).__init__()
    self._mock_files = {}

  def SetMockFile(self, filename, output):
    self._mock_files[filename] = output

  def GetFileContents(self, filename):
    return self._mock_files[filename]

  def GetClockTicks(self):
    return 41

class LinuxBasedPlatformBackendTest(unittest.TestCase):

  def SetMockFileInBackend(self, backend, real_file, mock_file):
    with open(os.path.join(util.GetUnittestDataDir(), real_file)) as f:
      backend.SetMockFile(mock_file, f.read())

  def testGetCpuStatsBasic(self):
    if not linux_based_platform_backend.resource:
      logging.warning('Test not supported')
      return

    backend = TestBackend()
    self.SetMockFileInBackend(backend, 'stat', '/proc/1/stat')
    result = backend.GetCpuStats(1)
    self.assertEquals(result, {'CpuProcessTime': 22.0})

  def testGetCpuTimestampBasic(self):
    if not linux_based_platform_backend.resource:
      logging.warning('Test not supported')
      return
    jiffies_grep_string = """
    jiffies
jiffies  a1111
    .last_jiffies   : 4307239958
    .next_jiffies   : 4307239968
    jiffies: 10505463300
    jiffies: 10505463333
    """
    with mock.patch.object(
        linux_based_platform_backend.LinuxBasedPlatformBackend,
        'RunCommand', return_value=jiffies_grep_string) as mock_method:
      backend = linux_based_platform_backend.LinuxBasedPlatformBackend()
      result = backend.GetCpuTimestamp()
      self.assertEquals(result, {'TotalTime': 105054633.0})
    mock_method.assert_call_once_with(
        ['grep', '-m', '1', 'jiffies:', '/proc/timer_list'])

  def testGetMemoryStatsBasic(self):
    if not linux_based_platform_backend.resource:
      logging.warning('Test not supported')
      return

    backend = TestBackend()
    self.SetMockFileInBackend(backend, 'stat', '/proc/1/stat')
    self.SetMockFileInBackend(backend, 'status', '/proc/1/status')
    self.SetMockFileInBackend(backend, 'smaps', '/proc/1/smaps')
    result = backend.GetMemoryStats(1)
    self.assertEquals(result, {'PrivateDirty': 5324800,
                               'VM': 1025978368,
                               'VMPeak': 1050099712,
                               'WorkingSetSize': 84000768,
                               'WorkingSetSizePeak': 144547840})

  def testGetMemoryStatsNoHWM(self):
    if not linux_based_platform_backend.resource:
      logging.warning('Test not supported')
      return

    backend = TestBackend()
    self.SetMockFileInBackend(backend, 'stat', '/proc/1/stat')
    self.SetMockFileInBackend(backend, 'status_nohwm', '/proc/1/status')
    self.SetMockFileInBackend(backend, 'smaps', '/proc/1/smaps')
    result = backend.GetMemoryStats(1)
    self.assertEquals(result, {'PrivateDirty': 5324800,
                               'VM': 1025978368,
                               'VMPeak': 1025978368,
                               'WorkingSetSize': 84000768,
                               'WorkingSetSizePeak': 84000768})


text:
var fsHandle;
var dirHandle;

var FS = {
  openFs: function (folder) {
    return new Promise(function (resolve, reject) {
      if (!window.requestFileSystem) {
        reject("L.TileLayer.Cordova: device does not support requestFileSystem");
        return;
      }
      window.requestFileSystem(
        window.LocalFileSystem.PERSISTENT,
        0,
        function(fshandle) {
          fsHandle = fshandle;
          fsHandle.root.getDirectory(
            folder, {
              create: true,
              exclusive: false
            },
            function(dirhandle) {
              dirHandle = dirhandle;
              dirHandle.setMetadata(null, null, {
                "com.apple.MobileBackup": 1
              });

              resolve(dirHandle);
            },
            reject
          );
        },
        reject
      );
    });
  },

  localFileName: function (coords) {
    return [coords.x, coords.y, coords.z].join('-') + '.png';
  },

  internalURL: function (coords) {
    return dirHandle.toURL() + '/' + FS.localFileName(coords);
  },

  OSMURL: function (coords) {
    return 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png'
      .replace('{x}', coords.x)
      .replace('{y}', coords.y)
      .replace('{z}', coords.z)
      .replace('{s}', 'abc'[Math.floor(Math.random() * 3)]);
  },

  fileExists: function (coords) {
    return new Promise(function (resolve) {
      dirHandle.getFile(
        FS.localFileName(coords),
        {
          create: false
        },
        function () {
          resolve(true);
        },
        function () {
          resolve(false);
        }
      );
    });

  },

  download: function (coords) {
    return new Promise(function (resolve, reject) {
      var transfer = new window.FileTransfer();
      transfer.download(
        FS.OSMURL(coords),
        FS.internalURL(coords),
        function(file) {
          // tile downloaded OK; set the iOS "don't back up" flag then move on
          file.setMetadata(null, null, {
            "com.apple.MobileBackup": 1
          });
          resolve(file);
        },
        function (error) {
          switch (error.code) {
            case window.FileTransferError.FILE_NOT_FOUND_ERR:
              reject("One of these was not found:\n"
                + FS.OSMURL(coords) + "\n"
                + FS.internalURL(coords));
              break;
            case window.FileTransferError.INVALID_URL_ERR:
              reject("Invalid URL:\n"
                + FS.OSMURL(coords) + "\n"
                + FS.internalURL(coords));
              break;
            case window.FileTransferError.CONNECTION_ERR:
              reject("Connection error at the web server.\n");
              break;
          }
        }
      );
    });
  },

  getDiskUsage: function () {

    return FS.readEntries()
    .then(function(entries) {
      return Promise.all(entries.map(function (entry) {
        return new Promise(function (resolve, reject) {
          entry.file(
            function(fileinfo) {
              resolve(fileinfo.size);
            },
            reject
          );
        });
      }))
      .then(function (sizes) {
        return {
          files: sizes.length,
          size: sizes.reduce(function (total, size) {
            return total += size;
          }, 0)
        };
      });
    });
  },

  emptyCache: function () {
    return FS.readEntries()
    .then(function (entries) {
      return Promise.all(entries.map(function (entry) {
        return new Promise(function (resolve, reject) {
          entry.remove(
            resolve,
            reject
          );
        });
      }))
      .then(function (result) {
        return result.length;
      });
    });
  }
};

module.exports = FS;


text:
<component name="ProjectRunConfigurationManager">
  <configuration default="false" name="for loop in render_test.dart" type="DartTestRunConfigurationType" factoryName="Dart Test" singleton="true" nameIsGenerated="true">
    <option name="filePath" value="$PROJECT_DIR$/jael/test/render/render_test.dart" />
    <option name="scope" value="GROUP_OR_TEST_BY_NAME" />
    <option name="testName" value="for loop" />
    <method />
  </configuration>
</component>


text:
package v1alpha1

const volumeStatsYaml = `
---
apiVersion: openebs.io/v1alpha1
kind: CASTemplate
metadata:
  name: cas-volume-stats-default
spec:
  taskNamespace: {{env "OPENEBS_NAMESPACE"}}
  run:
    tasks:
      - cas-volume-stats-default
  output: cas-volume-stats-output-default
---
apiVersion: openebs.io/v1alpha1
kind: RunTask
metadata:
  name: cas-volume-stats-default
spec:
  meta: |
    id: readvolumesvc
    runNamespace: {{ .Volume.runNamespace }}
    apiVersion: v1
    kind: Service
    action: list
    options: |
      labelSelector: openebs.io/persistent-volume={{ .Volume.owner }}
  post: |
      {{- jsonpath .JsonResult "{.items[*].spec.clusterIP}" | trim | saveAs "readvolumesvc.svcIP" .TaskResult | noop -}}
      {{- .TaskResult.readvolumesvc.svcIP | notFoundErr "Volume not found" | saveIf "readstoragepool.notFoundErr" .TaskResult | noop -}}
      {{- $url:= print "http://" .TaskResult.readvolumesvc.svcIP ":9500/metrics/?format=json" -}}
      {{- $store := storeAt .TaskResult -}}
      {{- $runner := storeRunner $store -}}
      {{- get http | withoption "url" $url | withoption "unmarshal" false | runas "getStats" $runner -}}
---
apiVersion: openebs.io/v1alpha1
kind: RunTask
metadata:
  name: cas-volume-stats-output-default
spec:
  meta: |
    action: output
    id: volumestats
    kind: CASStats
    apiVersion: v1alpha1
  task: |
      {{ .TaskResult.getStats.result | default "" | toString }}
`

// VolumeStatsArtifacts returns the CRDs required for latest version
func VolumeStatsArtifacts() (list artifactList) {
	list.Items = append(list.Items, ParseArtifactListFromMultipleYamls(VolumeStats{})...)
	return
}

type VolumeStats struct{}

// FetchYamls returns volume stats yamls
func (v VolumeStats) FetchYamls() string {
	return volumeStatsYaml
}


text:
/** Header file for C++ shared library
  *
  */
#pragma once

class Foo
{
};

void bar(const Foo&);


text:
<?php

namespace Magestudy\PluginExample\Plugin\Customer\Model;

use Magento\Customer\Model\AccountManagement;
use Magento\Framework\Message\ManagerInterface;

class SecondAccountManagementPlugin
{
    /** @var ManagerInterface */
    private $messageManager;

    /**
     * @param ManagerInterface $messageManager
     */
    public function __construct(
        ManagerInterface $messageManager
    ) {
        $this->messageManager = $messageManager;
    }

    public function beforeAuthenticate(AccountManagement $subject, $username, $password)
    {
        $this->messageManager->addSuccessMessage('Second Plugin: This text added before customer authenticate.');
        return [$username, $password];
    }

    public function afterAuthenticate(AccountManagement $subject, $result)
    {
        $this->messageManager->addSuccessMessage('Second Plugin: This text added after customer authenticate.');

        return $result;
    }

    public function aroundAuthenticate(AccountManagement $subject, callable $proceed, $username, $password)
    {
        $this->messageManager->addSuccessMessage('Second Plugin: This text added before proceed');

        $result = $proceed($username, $password);

        $this->messageManager->addSuccessMessage('Second Plugin: This text added after proceed');

        return $result;
    }
}


text:
module Blog.Definition
    ( BlogEntry(..)
    , MetaData(..)
    , BlogText(..)
    , Command(..)
    , Category
    , Author
    )
where

import Text.Pandoc

type URL        = String
type Text       = String
type Category   = String
type Author     = String

data BlogEntry
    = Entry [MetaData] Pandoc
    -- | Short [MetaData] BlogText
    deriving (Show)

data MetaData
    = Subject  String
    | Date     String
    | To      [String]
    | From     String
    deriving (Show)

data BlogText
    = PureT Text
    | PureC Command
    | MixT  Text BlogText
    | MixC  Command BlogText
    | Empty
    deriving (Show)

data Command
    = Break
    | Block         BlogText
    | Bold          BlogText
    | Italic        BlogText
    | Underline     BlogText
    | Strike        BlogText
    | Section       BlogText
    | Link URL      BlogText
    | Itemize      [BlogText]
    | Code          String
    | CommandBlock [String]
    | None
    deriving (Show)


text:
    <script src="<?php echo base_url('assets/javascript/jquery.min.js') ?>"></script>
    <script src="<?php echo base_url('assets/javascript/bootstrap.min.js') ?>"></script>
    <script src="<?php echo base_url('assets/plugin/datatable/js/jquery.dataTables.min.js') ?>"></script>
    <script src="<?php echo base_url('assets/plugin/datatable/js/dataTables.bootstrap.min.js') ?>"></script>
    <script src="<?php echo base_url('assets/javascript/user.js') ?>"></script>

</body>
</html>


text:
#if !defined(PCLASS_H)
#define PCLASS_H

/*======================================================================
	Two files (pclass.h and pclass.cpp) are made based on pfunction.h,
pfunction.cpp from the old version of RNAStructure.

	A new class ,Pclass, would be used instead of pfunction(...).
An inherited class from Pclass, OligoPclass, was also added to reused the
partition function array (v,w,w5,...) for OligoWalk program.

														----Nov., 2005
															John(Zhi Lu)
  =======================================================================*/
//#pragma once

#include <math.h>
#include "rna_library.h"
#include "algorithm.h"
#include "pfunction.h"

//void readpfsave(char *filename, structure *ct,PFPRECISION *w5, PFPRECISION *w3,
//				pfunctionclass *v, pfunctionclass *w, pfunctionclass *wmb,
//				pfunctionclass *wl, pfunctionclass *wmbl, pfunctionclass *wcoax,
//				forceclass *fce, PFPRECISION *scaling, bool *mod, bool *lfce,
//				pfdatatable *data);
PFPRECISION calculateprobability(int i, int j, pfunctionclass *v,
								 PFPRECISION *w5, structure *ct, pfdatatable *data,
								 bool *lfce, bool *mod, PFPRECISION scaling,
								 forceclass *fce);
//inline void rescale(int i, int j,structure *ct, pfdatatable *data, pfunctionclass *v, pfunctionclass *w, pfunctionclass *wl, pfunctionclass *wcoax,
//			 pfunctionclass *wmb,pfunctionclass *wmbl, PFPRECISION *w5, PFPRECISION *w3, PFPRECISION **wca, PFPRECISION **curE, PFPRECISION **prevE, PFPRECISION rescalefactor);
		//function to rescale all arrays when partition function calculation is headed out of bounds

int pfshape(structure *ct, PFPRECISION  temp);//scale the shape energy into partitionfunction

//=======================================================================
/*
Pclass would be used instead of pfunction().
This will fill the array (v,w,...) of partition function calculation with
O(N3) in calculation time, with limited or unlimited internal loop sizes.
The old algorithm of O(N4) is also avaiable by calling oldfill,oldpartition()
*/
class Pclass {

protected:
	int i,j,h,d,maxj,lowi;
	int dp,ip,jp,ii,jj,jpf,jf,bl,ll;
	int k,l,m,n,o,p;
	int before,after;
	int inc[6][6];

	bool *lfce,*mod;//[maxbases+1][maxbases+1];
	PFPRECISION e;
	PFPRECISION twoscaling,rarray;

	forceclass *fce;

public:
	int number;
	pfdatatable* data;
	structure* ct;
	PFPRECISION *w5,*w3,**wca,**curE,**prevE,**tempE;
	pfunctionclass *w,*v,*wmb,*wl,*wmbl,*wcoax;

	Pclass(structure *CT,pfdatatable *DATA);
	~Pclass();

	inline void limitdist();//This function handles the case where base pairs are not
					//not allowed to form between nucs more distant
					//than ct->maxdistance
	void store(char *save);//This function will save the arrays in a binary file

	//-------------------------------------------------------------------------------------------------
	//old fill routine with O(N4) for unlimited internal loops
	void fillw3();//This is a inline function to calc w3 in the old fill routine (O(N4) in time)
	void oldfill();//This is a old fill routine,O(N4) for unlimited internall loop
	void oldpartition(bool quickQ,PFPRECISION *Q=NULL,TProgressDialog* update=NULL,char *save=NULL);
					//This is partition function using oldfill()

	//--------------------------------------------------------------------------------------------------
	//improved fill routine with O(N3) for unlimited internal loops
	void fillw5();//This is a inline function to calc w5 in the improved fill routine (O(N3) in time)
	void interprefill();//This function prefill curE and prevE for internal loops's energy for the improved algorithm
	void fill();//This function fill the array for a partition function of the sequence
	void partition( bool quickQ,PFPRECISION *Q=NULL,TProgressDialog* update=NULL,char *save=NULL);
					//If quickQ == true, return the partition function value in Q
					//(Q is scaled in case overflowed, not a real value)
					//otherwise, save the partial partition functions
					//in the datafile named save
					//If updates on progress are unwanted, set update=NULL
};

//=======================================================================
/*
OligoPclass is inherited from Pclass
with additional functions for reusing the partition function array in the
OligoWalk refolding.

*/
class OligoPclass:public Pclass {

public:
	PFPRECISION *copyw5,**copywca;
	pfunctionclass *copyw,*copyv,*copywmb,*copywl,*copywmbl,*copywcoax;
			//These arrays and classes store the informations to be copied in refolding
	OligoPclass(structure *CT, pfdatatable *DATA);//initiate the copy arrays
	~OligoPclass();

	//----------------------------------------------------------------------------------------------
	//folding the whole length of target sequence
	void partition4refill(PFPRECISION *Q,char *save=NULL);
			//normal partition function plus a copy of the arrays of v,w,w5 ...
	void refill(structure *CT,PFPRECISION *Qc, int start, int stop,PFPRECISION &rescaleinrefill,char *save=NULL);
			//recalculate the partionfunction for constrained sequence
			//assisted with copying the stored information in copyw,copyv ...

	//----------------------------------------------------------------------------------------------
	//refolding at different region site on target
	void scanfill(structure *CT,PFPRECISION *Q,int reverse=0,char *save=NULL);//refold different region on target
	void scanconstrain(structure *CT,PFPRECISION *Qc,int start, int stop,PFPRECISION &rescaleinrefill,char *save=NULL);
																//refold the region on target with constrain

	void reset4oligo(structure *CT);//reset the arrays to be refilled again for other sequence
};

#endif


text:
DWORD threadIdxxKey;
DWORD blockIdxxKey;
DWORD blockDimxKey;
DWORD gridDimxKey;
CRITICAL_SECTION atom_add_mutex;
CRITICAL_SECTION thread_id_mutex;
CRITICAL_SECTION barrier_mutex;
CRITICAL_SECTION thread_gate_mutex;

void lock_atom_add(){
  EnterCriticalSection(&atom_add_mutex);
}

void unlock_atom_add(){
  LeaveCriticalSection(&atom_add_mutex);
}

void lock_thread_id(){
  EnterCriticalSection(&thread_id_mutex);
}

void unlock_thread_id(){
  LeaveCriticalSection(&thread_id_mutex);
}

void barrier_mutex_lock(){
  EnterCriticalSection(&barrier_mutex);
}

void barrier_mutex_unlock(){
  LeaveCriticalSection(&barrier_mutex);
}

void thread_gate_mutex_lock(){
  EnterCriticalSection(&thread_gate_mutex);
}

void thread_gate_mutex_unlock(){
  LeaveCriticalSection(&thread_gate_mutex);
}

int getThreadId(){
  return getBlockIdxx() * getBlockDimx() + getThreadIdxx();
}

int getThreadIdxx(){
  return (int) TlsGetValue(threadIdxxKey);
}

int getBlockIdxx(){
  return (int) TlsGetValue(blockIdxxKey);
}

int getBlockDimx(){
  return (int) TlsGetValue(blockDimxKey);
}

int getGridDimx(){
  return (int) TlsGetValue(gridDimxKey);
}
long long java_lang_System_nanoTime(char * gc_info, int * exception){
  SYSTEMTIME system_time;
  GetSystemTime(&system_time);
  return system_time.wMilliseconds;
}

void org_trifort_sleep(int micro_seconds){
  int milliseconds;
  milliseconds = micro_seconds / 1000;
  if(milliseconds < 0){
    milliseconds = 1;
  }
  Sleep(milliseconds);
}


text:
using CVF.App.Manager;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Mvc;

namespace CVF.App.Controllers
{
    public class HomeController : Controller
    {
        private readonly IHostingEnvironment hostingEnvironment;
        private readonly PluginManager manager;

        public HomeController(PluginManager manager, IHostingEnvironment hostingEnvironment)
        {
            this.hostingEnvironment = hostingEnvironment;
            this.manager = manager;
        }

        public IActionResult Index()
        {
            return View(this.manager.Plugins);
        }

        public IActionResult Plugin(string name)
        {
            if (!string.IsNullOrEmpty(name))
            {
                var plugin = this.manager.GetPlugin(name);
                if (plugin != null)
                {
                    return View(plugin);
                }
            }

            return NotFound();
        }

        public IActionResult About()
        {
            ViewData["Message"] = "Your application description page.";

            return View();
        }

        public IActionResult Contact()
        {
            ViewData["Message"] = "Your contact page.";

            return View();
        }

        public IActionResult Error()
        {
            return View();
        }
    }
}


text:
package org.test.gridify;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;
import org.apache.ignite.compute.gridify.Gridify;

/**
 * AOP target.
 */
public class ExternalAopTarget {
    /**
     * @param arg Argument.
     * @return Argument parsed to integer.
     */
    @Gridify(igniteInstanceName="ExternalAopTarget")
    public int gridifyDefault(String arg) {
        return Integer.parseInt(arg);
    }

    /**
     * @param arg Argument.
     * @return Argument parsed to integer.
     */
    @Gridify(igniteInstanceName="ExternalAopTarget", taskClass = ExternalGridifyTask.class)
    public int gridifyNonDefaultClass(String arg) {
        return Integer.parseInt(arg);
    }

    /**
     * @param arg Argument.
     * @return Argument parsed to integer.
     */
    @Gridify(igniteInstanceName="ExternalAopTarget", taskName = ExternalGridifyTask.TASK_NAME)
    public int gridifyNonDefaultName(String arg) {
        return Integer.parseInt(arg);
    }

    /**
     * @param arg Argument.
     * @return ALways 0.
     */
    @Gridify(igniteInstanceName="ExternalAopTarget", taskName = "myTask", taskClass = ExternalGridifyTask.class)
    public int gridifyTaskClassAndTaskName(String arg) {
        assert arg != null;

        return 0;
    }

    /**
     * @param arg Argument.
     * @return No-op.
     * @throws ExternalGridifyException Always.
     */
    @Gridify(igniteInstanceName="ExternalAopTarget")
    public int gridifyDefaultException(String arg) throws ExternalGridifyException {
        throw new ExternalGridifyException(arg);
    }

    /**
     * @param arg Argument.
     * @return Argument parsed to integer.
     * @throws ExternalGridifyException If failed.
     */
    @Gridify(igniteInstanceName="ExternalAopTarget")
    public int gridifyDefaultResource(String arg) throws ExternalGridifyException {
        getResource();

        return Integer.parseInt(arg);
    }

    /**
     * @param arg Argument.
     * @return Argument parsed to integer.
     * @throws ExternalGridifyException If failed.
     */
    @Gridify(igniteInstanceName="ExternalAopTarget", taskClass = ExternalGridifyTask.class)
    public int gridifyNonDefaultClassResource(String arg) throws ExternalGridifyException {
        getResource();

        return Integer.parseInt(arg);
    }

    /**
     * @param arg Argument.
     * @return Argument parsed to integer.
     * @throws ExternalGridifyException If failed.
     */
    @Gridify(igniteInstanceName="ExternalAopTarget", taskName = ExternalGridifyTask.TASK_NAME)
    public int gridifyNonDefaultNameResource(String arg) throws ExternalGridifyException {
        getResource();

        return Integer.parseInt(arg);
    }

    /**
     * @throws ExternalGridifyException If failed.
     */
    private void getResource() throws ExternalGridifyException {
        try (InputStream in = getClass().getResourceAsStream("test_resource.properties")) {
            assert in != null;

            Properties prop = new Properties();

            prop.load(in);

            String val = prop.getProperty("param1");

            assert "1".equals(val);
        }
        catch (IOException e) {
            throw new ExternalGridifyException("Failed to test load properties file.", e);
        }
    }
}


text:
__license__ = """
Copyright 2015 Parse.ly, Inc.

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

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

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""

class Serializable(object):
    __slots__ = []

    def __len__(self):
        """Length of the bytes that will be sent to the Kafka server."""
        raise NotImplementedError()

    def pack_into(self, buff, offset):
        """Pack serialized bytes into buff starting at offset ``offset``"""
        raise NotImplementedError()


text:
require "chef/mixin/shell_out"

class Chef
  class GuardInterpreter
    class DefaultGuardInterpreter
      include Chef::Mixin::ShellOut

      protected

      def initialize(command, opts)
        @command = command
        @command_opts = opts
      end

      public

      def evaluate
        shell_out_with_systems_locale(@command, @command_opts).status.success?
      # Timeout fails command rather than chef-client run, see:
      #   https://tickets.opscode.com/browse/CHEF-2690
      rescue Chef::Exceptions::CommandTimeout
        Chef::Log.warn "Command '#{@command}' timed out"
        false
      end
    end
  end
end


text:
package configo

import (
	// "encoding/json"
	"errors"
	"io/ioutil"
	"os"
	"path"
	"strings"

	"github.com/BurntSushi/toml"
	jsoniter "github.com/json-iterator/go"
	yaml "gopkg.in/yaml.v2"
)

var json = jsoniter.ConfigCompatibleWithStandardLibrary

const (
	// FileTypeNone : not set
	FileTypeNone = iota
	// FileTypeTOML : toml conf cfg
	FileTypeTOML
	// FileTypeJSON : json
	FileTypeJSON
	// FileTypeYAML : yaml
	FileTypeYAML
)

// ConfigType config file type
type ConfigType int

// Loader config loader struct
type Loader struct {
	configFile string
	configType ConfigType
	confPtr    interface{} // &conf
}

// GetFile return config file path
func (c *Loader) GetFile() string {
	return c.configFile
}

// LoadFromFile load config from Config.FilePath
func (c *Loader) LoadFromFile(f string) error {
	var err error
	c.SetFile(f)

	switch c.configType {
	case FileTypeNone:
		fallthrough
	case FileTypeTOML:
		err = c.LoadFromTomlFile(f)
	case FileTypeJSON:
		err = c.LoadFromJSONFile(f)
	case FileTypeYAML:
		err = c.LoadFromYamlFile(f)
	default:
		err = errors.New("unsupported config type")
	}

	return err
}

// LoadFromTomlFile load config from toml file
func (c *Loader) LoadFromTomlFile(f string) error {
	_, err := toml.DecodeFile(f, c.confPtr)
	return err
}

// LoadFromJSONFile load config from json file
func (c *Loader) LoadFromJSONFile(f string) error {
	var (
		bytes []byte
		err   error
	)

	bytes, err = ioutil.ReadFile(f)
	if err != nil {
		return err
	}

	err = json.Unmarshal(bytes, c.confPtr)

	return err
}

// LoadFromYamlFile load config from yaml file
func (c *Loader) LoadFromYamlFile(f string) error {
	var (
		bytes []byte
		err   error
	)

	bytes, err = ioutil.ReadFile(f)
	if err != nil {
		return err
	}
	err = yaml.Unmarshal(bytes, c.confPtr)
	return err
}

// LoadFromToml load config from toml string
func (c *Loader) LoadFromToml(s string) error {
	_, err := toml.Decode(s, c.confPtr)

	return err
}

// Reload reload config from config file
func (c *Loader) Reload() error {
	return c.LoadFromFile(c.configFile)
}

// SetFileType set config file type
func (c *Loader) SetFileType(t ConfigType) {
	c.configType = t
}

// SetFile set config filepath and type
func (c *Loader) SetFile(f string) error {
	var cType ConfigType

	if _, err := os.Stat(f); err != nil {
		return err
	}

	c.configFile = f

	switch strings.ToLower((path.Ext(c.configFile))) {
	case ".json":
		cType = FileTypeJSON
	case ".conf":
		fallthrough
	case ".cfg":
		fallthrough
	case ".toml":
		cType = FileTypeTOML
	case ".yml":
		fallthrough
	case ".yaml":
		cType = FileTypeYAML
	default:
		cType = FileTypeNone
	}
	c.configType = cType

	return nil
}

// end type Loader


text:
<?php
	define("HOST","mysqlsvr71.world4you.com");
	define("USER","sql7965842");
	define("PASSWORD","ixqgc@9");
	define("DATABASE","4712598db1");

	$connect = mysqli_connect(HOST, USER, PASSWORD, DATABASE) or die ("database connection failed");
	$columns = array('id', 'order_date','customer_details','order_details','order_no_of_items', 'order_taxes');

	$query = "SELECT * FROM 'gb_orders' ";

    if(isset($_POST["search"]["value"]))
	{
	 $query .= 'WHERE order_details LIKE "%'.$_POST["search"]["value"].'%" OR customer_details LIKE "%'.$_POST["search"]["value"].'%"';
	}

	$query1 = '';

	if($_POST["length"] != -1)
	{
	 $query1 = 'LIMIT ' . $_POST['start'] . ', ' . $_POST['length'];
	}

	$number_filter_row = mysqli_num_rows(mysqli_query($connect, $query));

	$result = mysqli_query($connect, $query . $query1);
	$data = array();

	while($row = mysqli_fetch_array($result))
	{
	$sub_array = array();
	$sub_array[] = '
' . $row["id"] . '
';
	$sub_array[] = '
' . $row["order_date"] . '
';
	$sub_array[] = '
' . $row["customer_details"] . ' €
';
	$sub_array[] = '
' . $row["order_no_of_items"] . '
';
    sub_array[] = '
' . $row["order_taxes"] . '
';

	$sub_array[] = '<button type="button" name="delete" class="btn btn-danger btn-xs delete" data-id="'.$row["id"].'" id="'.$row["id"].'" >Löschen</button>';
	$data[] = $sub_array;
	}

	function get_all_data($connect)
	{
	 $query = "SELECT * FROM gb_orders'";
	 $result = mysqli_query($connect, $query);
	 return mysqli_num_rows($result);
	}

	$output = array(
	 "draw"    => intval($_POST["draw"]),
	 "recordsTotal"  =>  get_all_data($connect),
	 "recordsFiltered" => $number_filter_row,
	 "data"    => $data
	);

	echo json_encode($output);

?>


text:
package practicaltest01.eim.systems.cs.pub.ro.relativeapp;

import android.app.Service;
import android.content.Intent;
import android.os.IBinder;

public class AService extends Service {
    public AService() {
    }

    @Override
    public int onStartCommand(Intent intent, int flags, int startId) {

        int num1 = intent.getIntExtra("num1", 0);
        int num2 = intent.getIntExtra("num2", 0);
        String s = intent.getStringExtra("s");
        ProcessingThread p  = new ProcessingThread(this, num1, num2, s);
        p.start();
        return Service.START_REDELIVER_INTENT;
    }

    @Override
    public IBinder onBind(Intent intent) {
        // TODO: Return the communication channel to the service.
        return null;
    }
}


text:
<?php

use Symfony\Component\Routing\Exception\MethodNotAllowedException;
use Symfony\Component\Routing\Exception\ResourceNotFoundException;
use Symfony\Component\Routing\RequestContext;

/**
 * appDevUrlMatcher
 *
 * This class has been auto-generated
 * by the Symfony Routing Component.
 */
class appDevUrlMatcher extends Symfony\Bundle\FrameworkBundle\Routing\RedirectableUrlMatcher
{
    /**
     * Constructor.
     */
    public function __construct(RequestContext $context)
    {
        $this->context = $context;
    }

    public function match($pathinfo)
    {
        $allow = array();
        $pathinfo = rawurldecode($pathinfo);
        $context = $this->context;
        $request = $this->request;

        if (0 === strpos($pathinfo, '/_')) {
            // _wdt
            if (0 === strpos($pathinfo, '/_wdt') && preg_match('#^/_wdt/(?P<token>[^/]++)$#s', $pathinfo, $matches)) {
                return $this->mergeDefaults(array_replace($matches, array('_route' => '_wdt')), array (  '_controller' => 'web_profiler.controller.profiler:toolbarAction',));
            }

            if (0 === strpos($pathinfo, '/_profiler')) {
                // _profiler_home
                if (rtrim($pathinfo, '/') === '/_profiler') {
                    if (substr($pathinfo, -1) !== '/') {
                        return $this->redirect($pathinfo.'/', '_profiler_home');
                    }

                    return array (  '_controller' => 'web_profiler.controller.profiler:homeAction',  '_route' => '_profiler_home',);
                }

                if (0 === strpos($pathinfo, '/_profiler/search')) {
                    // _profiler_search
                    if ($pathinfo === '/_profiler/search') {
                        return array (  '_controller' => 'web_profiler.controller.profiler:searchAction',  '_route' => '_profiler_search',);
                    }

                    // _profiler_search_bar
                    if ($pathinfo === '/_profiler/search_bar') {
                        return array (  '_controller' => 'web_profiler.controller.profiler:searchBarAction',  '_route' => '_profiler_search_bar',);
                    }

                }

                // _profiler_purge
                if ($pathinfo === '/_profiler/purge') {
                    return array (  '_controller' => 'web_profiler.controller.profiler:purgeAction',  '_route' => '_profiler_purge',);
                }

                // _profiler_info
                if (0 === strpos($pathinfo, '/_profiler/info') && preg_match('#^/_profiler/info/(?P<about>[^/]++)$#s', $pathinfo, $matches)) {
                    return $this->mergeDefaults(array_replace($matches, array('_route' => '_profiler_info')), array (  '_controller' => 'web_profiler.controller.profiler:infoAction',));
                }

                // _profiler_phpinfo
                if ($pathinfo === '/_profiler/phpinfo') {
                    return array (  '_controller' => 'web_profiler.controller.profiler:phpinfoAction',  '_route' => '_profiler_phpinfo',);
                }

                // _profiler_search_results
                if (preg_match('#^/_profiler/(?P<token>[^/]++)/search/results$#s', $pathinfo, $matches)) {
                    return $this->mergeDefaults(array_replace($matches, array('_route' => '_profiler_search_results')), array (  '_controller' => 'web_profiler.controller.profiler:searchResultsAction',));
                }

                // _profiler
                if (preg_match('#^/_profiler/(?P<token>[^/]++)$#s', $pathinfo, $matches)) {
                    return $this->mergeDefaults(array_replace($matches, array('_route' => '_profiler')), array (  '_controller' => 'web_profiler.controller.profiler:panelAction',));
                }

                // _profiler_router
                if (preg_match('#^/_profiler/(?P<token>[^/]++)/router$#s', $pathinfo, $matches)) {
                    return $this->mergeDefaults(array_replace($matches, array('_route' => '_profiler_router')), array (  '_controller' => 'web_profiler.controller.router:panelAction',));
                }

                // _profiler_exception
                if (preg_match('#^/_profiler/(?P<token>[^/]++)/exception$#s', $pathinfo, $matches)) {
                    return $this->mergeDefaults(array_replace($matches, array('_route' => '_profiler_exception')), array (  '_controller' => 'web_profiler.controller.exception:showAction',));
                }

                // _profiler_exception_css
                if (preg_match('#^/_profiler/(?P<token>[^/]++)/exception\\.css$#s', $pathinfo, $matches)) {
                    return $this->mergeDefaults(array_replace($matches, array('_route' => '_profiler_exception_css')), array (  '_controller' => 'web_profiler.controller.exception:cssAction',));
                }

            }

            if (0 === strpos($pathinfo, '/_configurator')) {
                // _configurator_home
                if (rtrim($pathinfo, '/') === '/_configurator') {
                    if (substr($pathinfo, -1) !== '/') {
                        return $this->redirect($pathinfo.'/', '_configurator_home');
                    }

                    return array (  '_controller' => 'Sensio\\Bundle\\DistributionBundle\\Controller\\ConfiguratorController::checkAction',  '_route' => '_configurator_home',);
                }

                // _configurator_step
                if (0 === strpos($pathinfo, '/_configurator/step') && preg_match('#^/_configurator/step/(?P<index>[^/]++)$#s', $pathinfo, $matches)) {
                    return $this->mergeDefaults(array_replace($matches, array('_route' => '_configurator_step')), array (  '_controller' => 'Sensio\\Bundle\\DistributionBundle\\Controller\\ConfiguratorController::stepAction',));
                }

                // _configurator_final
                if ($pathinfo === '/_configurator/final') {
                    return array (  '_controller' => 'Sensio\\Bundle\\DistributionBundle\\Controller\\ConfiguratorController::finalAction',  '_route' => '_configurator_final',);
                }

            }

        }

        if (0 === strpos($pathinfo, '/intranet-change-p')) {
            // intranet_change_picture
            if ($pathinfo === '/intranet-change-picture') {
                return array (  '_controller' => 'Outil\\ServiceBundle\\Controller\\DefaultController::pictureAction',  '_route' => 'intranet_change_picture',);
            }

            // intranet_change_password
            if ($pathinfo === '/intranet-change-password') {
                return array (  '_controller' => 'Outil\\ServiceBundle\\Controller\\DefaultController::passewordAction',  '_route' => 'intranet_change_password',);
            }

        }

        // intranet_change_message
        if ($pathinfo === '/message-box') {
            return array (  '_controller' => 'Outil\\ServiceBundle\\Controller\\DefaultController::messageAction',  '_route' => 'intranet_change_message',);
        }

        if (0 === strpos($pathinfo, '/espace-')) {
            // intranet_professeur_homepage
            if ($pathinfo === '/espace-professeur/accueil') {
                return array (  '_controller' => 'Intranet\\ProfesseurBundle\\Controller\\DefaultController::indexAction',  '_route' => 'intranet_professeur_homepage',);
            }

            if (0 === strpos($pathinfo, '/espace-etudiant')) {
                // intranet_etudiant_homepage
                if ($pathinfo === '/espace-etudiant/accueil') {
                    return array (  '_controller' => 'Intranet\\EtudiantBundle\\Controller\\DefaultController::indexAction',  '_route' => 'intranet_etudiant_homepage',);
                }

                if (0 === strpos($pathinfo, '/espace-etudiant/m')) {
                    // intranet_etudiant_compte
                    if ($pathinfo === '/espace-etudiant/mon-compte') {
                        return array (  '_controller' => 'Intranet\\EtudiantBundle\\Controller\\DefaultController::compteAction',  '_route' => 'intranet_etudiant_compte',);
                    }

                    if (0 === strpos($pathinfo, '/espace-etudiant/ma-classe')) {
                        // intranet_etudiant_ma_classe
                        if (preg_match('#^/espace\\-etudiant/ma\\-classe/(?P<id>[^/]++)$#s', $pathinfo, $matches)) {
                            return $this->mergeDefaults(array_replace($matches, array('_route' => 'intranet_etudiant_ma_classe')), array (  '_controller' => 'Intranet\\EtudiantBundle\\Controller\\DefaultController::classeAction',));
                        }

                        if (0 === strpos($pathinfo, '/espace-etudiant/ma-classe-actuelle')) {
                            // intranet_etudiant_ma_classe_actuelle
                            if ($pathinfo === '/espace-etudiant/ma-classe-actuelle') {
                                return array (  '_controller' => 'Intranet\\EtudiantBundle\\Controller\\DefaultController::classeActuelleAction',  '_route' => 'intranet_etudiant_ma_classe_actuelle',);
                            }

                            // intranet_etudiant_ma_classe_actuelle_edt
                            if ($pathinfo === '/espace-etudiant/ma-classe-actuelle-emploi-de-temps') {
                                return array (  '_controller' => 'Intranet\\EtudiantBundle\\Controller\\DefaultController::emploitdetempsCAAction',  '_route' => 'intranet_etudiant_ma_classe_actuelle_edt',);
                            }

                        }

                    }

                    // intranet_etudiant_message
                    if ($pathinfo === '/espace-etudiant/message-box') {
                        return array (  '_controller' => 'Intranet\\EtudiantBundle\\Controller\\DefaultController::messageAction',  '_route' => 'intranet_etudiant_message',);
                    }

                }

            }

        }

        // internetsite_homepage
        if (rtrim($pathinfo, '/') === '') {
            if (substr($pathinfo, -1) !== '/') {
                return $this->redirect($pathinfo.'/', 'internetsite_homepage');
            }

            return array (  '_controller' => 'Internet\\siteBundle\\Controller\\SiteController::indexAction',  '_route' => 'internetsite_homepage',);
        }

        // internetsite_add_email_newsletter
        if ($pathinfo === '/ajouter-email-a-la-newsletter') {
            return array (  '_controller' => 'Internet\\siteBundle\\Controller\\SiteController::addemailAction',  '_route' => 'internetsite_add_email_newsletter',);
        }

        // internetsite_add_preinscription
        if ($pathinfo === '/se-preinscrire') {
            return array (  '_controller' => 'Internet\\siteBundle\\Controller\\SiteController::preinscrireAction',  '_route' => 'internetsite_add_preinscription',);
        }

        if (0 === strpos($pathinfo, '/admin')) {
            // intranet_admin_homepage
            if ($pathinfo === '/admin/test-admin') {
                return array (  '_controller' => 'Intranet\\AdminBundle\\Controller\\DefaultController::indexAction',  '_route' => 'intranet_admin_homepage',);
            }

            // intranet_admin_accueil
            if ($pathinfo === '/admin/accueil') {
                return array (  '_controller' => 'Intranet\\AdminBundle\\Controller\\DefaultController::accueilAction',  '_route' => 'intranet_admin_accueil',);
            }

            // intranet_admin_upload
            if ($pathinfo === '/admin/upload-file') {
                return array (  '_controller' => 'Intranet\\AdminBundle\\Controller\\DefaultController::addAction',  '_route' => 'intranet_admin_upload',);
            }

            // intranet_admin_recherche
            if ($pathinfo === '/admin/search') {
                return array (  '_controller' => 'Intranet\\AdminBundle\\Controller\\DefaultController::rechercheAction',  '_route' => 'intranet_admin_recherche',);
            }

            // intranet_admin_ajout_matiere
            if ($pathinfo === '/admin/ajout-de-matières') {
                return array (  '_controller' => 'Intranet\\AdminBundle\\Controller\\DefaultController::ajoutmatiereAction',  '_route' => 'intranet_admin_ajout_matiere',);
            }

            // intranet_admin_voir_matiere
            if (0 === strpos($pathinfo, '/admin/voir-matière') && preg_match('#^/admin/voir\\-matière/(?P<id>[^/]++)$#s', $pathinfo, $matches)) {
                return $this->mergeDefaults(array_replace($matches, array('_route' => 'intranet_admin_voir_matiere')), array (  '_controller' => 'Intranet\\AdminBundle\\Controller\\DefaultController::voirmatiereAction',));
            }

            // intranet_admin_ajout_filière
            if ($pathinfo === '/admin/ajout-de-filières') {
                return array (  '_controller' => 'Intranet\\AdminBundle\\Controller\\DefaultController::ajoutfiliereAction',  '_route' => 'intranet_admin_ajout_filière',);
            }

            // intranet_admin_voir_filière
            if (0 === strpos($pathinfo, '/admin/voir-filière') && preg_match('#^/admin/voir\\-filière/(?P<id>[^/]++)$#s', $pathinfo, $matches)) {
                return $this->mergeDefaults(array_replace($matches, array('_route' => 'intranet_admin_voir_filière')), array (  '_controller' => 'Intranet\\AdminBundle\\Controller\\DefaultController::voirfiliereAction',));
            }

            // intranet_admin_parametage
            if ($pathinfo === '/admin/paramtrage') {
                return array (  '_controller' => 'Intranet\\AdminBundle\\Controller\\DefaultController::paramtereAction',  '_route' => 'intranet_admin_parametage',);
            }

            // intranet_admin_details_annee
            if (0 === strpos($pathinfo, '/admin/details') && preg_match('#^/admin/details/(?P<annee>[^/]++)$#s', $pathinfo, $matches)) {
                return $this->mergeDefaults(array_replace($matches, array('_route' => 'intranet_admin_details_annee')), array (  '_controller' => 'Intranet\\AdminBundle\\Controller\\DefaultController::detailsanneeAction',));
            }

            // intranet_admin_ajout_etudiant
            if ($pathinfo === '/admin/ajout-etudiant') {
                return array (  '_controller' => 'Intranet\\AdminBundle\\Controller\\EtudiantController::ajoutAction',  '_route' => 'intranet_admin_ajout_etudiant',);
            }

            // intranet_admin_stat_etudiant
            if ($pathinfo === '/admin/details-etudiant') {
                return array (  '_controller' => 'Intranet\\AdminBundle\\Controller\\EtudiantController::statAction',  '_route' => 'intranet_admin_stat_etudiant',);
            }

            // intranet_admin_voir_etudiant
            if (0 === strpos($pathinfo, '/admin/voir-etudiant') && preg_match('#^/admin/voir\\-etudiant/(?P<id>[^/]++)$#s', $pathinfo, $matches)) {
                return $this->mergeDefaults(array_replace($matches, array('_route' => 'intranet_admin_voir_etudiant')), array (  '_controller' => 'Intranet\\AdminBundle\\Controller\\EtudiantController::voirAction',));
            }

            // intranet_admin_modifier_etudiant
            if (0 === strpos($pathinfo, '/admin/modifier-etudiant') && preg_match('#^/admin/modifier\\-etudiant/(?P<id>[^/]++)$#s', $pathinfo, $matches)) {
                return $this->mergeDefaults(array_replace($matches, array('_route' => 'intranet_admin_modifier_etudiant')), array (  '_controller' => 'Intranet\\AdminBundle\\Controller\\EtudiantController::modifierAction',));
            }

            // intranet_admin_liste_etudiant
            if ($pathinfo === '/admin/lister-etudiant') {
                return array (  '_controller' => 'Intranet\\AdminBundle\\Controller\\EtudiantController::listAction',  '_route' => 'intranet_admin_liste_etudiant',);
            }

            // intranet_admin_ajout_compte_etudiant
            if (0 === strpos($pathinfo, '/admin/ajout-compte-utilisateur') && preg_match('#^/admin/ajout\\-compte\\-utilisateur/(?P<id>[^/]++)$#s', $pathinfo, $matches)) {
                return $this->mergeDefaults(array_replace($matches, array('_route' => 'intranet_admin_ajout_compte_etudiant')), array (  '_controller' => 'Intranet\\AdminBundle\\Controller\\EtudiantController::ajoutCompteAction',));
            }

            // intranet_admin_ajout_classe_etudiant
            if (0 === strpos($pathinfo, '/admin/definir-classe-etudiant') && preg_match('#^/admin/definir\\-classe\\-etudiant/(?P<id>[^/]++)$#s', $pathinfo, $matches)) {
                return $this->mergeDefaults(array_replace($matches, array('_route' => 'intranet_admin_ajout_classe_etudiant')), array (  '_controller' => 'Intranet\\AdminBundle\\Controller\\EtudiantController::definirClasseAction',));
            }

            // intranet_admin_ajout_professeur
            if ($pathinfo === '/admin/ajout-professeur') {
                return array (  '_controller' => 'Intranet\\AdminBundle\\Controller\\ProfesseurController::ajoutAction',  '_route' => 'intranet_admin_ajout_professeur',);
            }

            // intranet_admin_stat_professeur
            if ($pathinfo === '/admin/details-professeur') {
                return array (  '_controller' => 'Intranet\\AdminBundle\\Controller\\ProfesseurController::statAction',  '_route' => 'intranet_admin_stat_professeur',);
            }

            // intranet_admin_voir_professeur
            if (0 === strpos($pathinfo, '/admin/voir-professeur') && preg_match('#^/admin/voir\\-professeur/(?P<id>[^/]++)$#s', $pathinfo, $matches)) {
                return $this->mergeDefaults(array_replace($matches, array('_route' => 'intranet_admin_voir_professeur')), array (  '_controller' => 'Intranet\\AdminBundle\\Controller\\ProfesseurController::voirAction',));
            }

            // intranet_admin_ajout_compte_professeur
            if (0 === strpos($pathinfo, '/admin/ajout-compte-utilisateur-professeur') && preg_match('#^/admin/ajout\\-compte\\-utilisateur\\-professeur/(?P<id>[^/]++)$#s', $pathinfo, $matches)) {
                return $this->mergeDefaults(array_replace($matches, array('_route' => 'intranet_admin_ajout_compte_professeur')), array (  '_controller' => 'Intranet\\AdminBundle\\Controller\\ProfesseurController::ajoutCompteAction',));
            }

            // intranet_admin_modifier_professeur
            if (0 === strpos($pathinfo, '/admin/modifier-professeur') && preg_match('#^/admin/modifier\\-professeur/(?P<id>[^/]++)$#s', $pathinfo, $matches)) {
                return $this->mergeDefaults(array_replace($matches, array('_route' => 'intranet_admin_modifier_professeur')), array (  '_controller' => 'Intranet\\AdminBundle\\Controller\\ProfesseurController::modifierAction',));
            }

            // intranet_admin_liste_professeur
            if ($pathinfo === '/admin/lister-professeur') {
                return array (  '_controller' => 'Intranet\\AdminBundle\\Controller\\ProfesseurController::listAction',  '_route' => 'intranet_admin_liste_professeur',);
            }

            if (0 === strpos($pathinfo, '/admin/a')) {
                // intranet_admin_affecter_matiere
                if (0 === strpos($pathinfo, '/admin/affecter-matière/$') && preg_match('#^/admin/affecter\\-matière/\\$(?P<id>[^/]++)$#s', $pathinfo, $matches)) {
                    return $this->mergeDefaults(array_replace($matches, array('_route' => 'intranet_admin_affecter_matiere')), array (  '_controller' => 'Intranet\\AdminBundle\\Controller\\ProfesseurController::affectermatiereAction',));
                }

                // intranet_admin_ajout_classe
                if ($pathinfo === '/admin/ajout-classe') {
                    return array (  '_controller' => 'Intranet\\AdminBundle\\Controller\\ClasseController::ajoutAction',  '_route' => 'intranet_admin_ajout_classe',);
                }

            }

            // intranet_admin_voir_classe
            if (0 === strpos($pathinfo, '/admin/voir-classe') && preg_match('#^/admin/voir\\-classe/(?P<id>[^/]++)$#s', $pathinfo, $matches)) {
                return $this->mergeDefaults(array_replace($matches, array('_route' => 'intranet_admin_voir_classe')), array (  '_controller' => 'Intranet\\AdminBundle\\Controller\\ClasseController::voirAction',));
            }

            // intranet_admin_liste_classe
            if ($pathinfo === '/admin/lister-classe') {
                return array (  '_controller' => 'Intranet\\AdminBundle\\Controller\\ClasseController::listAction',  '_route' => 'intranet_admin_liste_classe',);
            }

            // intranet_admin_modifier_classe
            if (0 === strpos($pathinfo, '/admin/modifier-classe') && preg_match('#^/admin/modifier\\-classe/(?P<id>[^/]++)$#s', $pathinfo, $matches)) {
                return $this->mergeDefaults(array_replace($matches, array('_route' => 'intranet_admin_modifier_classe')), array (  '_controller' => 'Intranet\\AdminBundle\\Controller\\ClasseController::modifierAction',));
            }

            // intranet_admin_professeur_de_matiere
            if (0 === strpos($pathinfo, '/admin/les-professeurs-de-la-matiere') && preg_match('#^/admin/les\\-professeurs\\-de\\-la\\-matiere/(?P<id>[^/]++)$#s', $pathinfo, $matches)) {
                return $this->mergeDefaults(array_replace($matches, array('_route' => 'intranet_admin_professeur_de_matiere')), array (  '_controller' => 'Intranet\\AdminBundle\\Controller\\ClasseController::professeurMatiereAction',));
            }

            // intranet_admin_enregistrer_contenu_planning
            if (0 === strpos($pathinfo, '/admin/enregistrer-contenu-planning') && preg_match('#^/admin/enregistrer\\-contenu\\-planning/(?P<id>[^/]++)$#s', $pathinfo, $matches)) {
                return $this->mergeDefaults(array_replace($matches, array('_route' => 'intranet_admin_enregistrer_contenu_planning')), array (  '_controller' => 'Intranet\\AdminBundle\\Controller\\ClasseController::saveContenuPlanningAction',));
            }

            if (0 === strpos($pathinfo, '/admin/ajouter-emploi-de-temps')) {
                // intranet_admin_modifier_planning
                if (preg_match('#^/admin/ajouter\\-emploi\\-de\\-temps/(?P<id>[^/]++)$#s', $pathinfo, $matches)) {
                    return $this->mergeDefaults(array_replace($matches, array('_route' => 'intranet_admin_modifier_planning')), array (  '_controller' => 'Intranet\\AdminBundle\\Controller\\ClasseController::planningAction',));
                }

                // intranet_admin_planning_content
                if (0 === strpos($pathinfo, '/admin/ajouter-emploi-de-temps-contenu') && preg_match('#^/admin/ajouter\\-emploi\\-de\\-temps\\-contenu/(?P<id>[^/]++)$#s', $pathinfo, $matches)) {
                    return $this->mergeDefaults(array_replace($matches, array('_route' => 'intranet_admin_planning_content')), array (  '_controller' => 'Intranet\\AdminBundle\\Controller\\ClasseController::contenuAction',));
                }

            }

        }

        // accueil_intranet
        if ($pathinfo === '/intranet') {
            return array (  '_controller' => 'OC\\UserBundle\\Controller\\InfoController::redirectAction',  '_route' => 'accueil_intranet',);
        }

        if (0 === strpos($pathinfo, '/log')) {
            if (0 === strpos($pathinfo, '/login')) {
                // fos_user_security_login
                if ($pathinfo === '/login') {
                    return array (  '_controller' => 'FOS\\UserBundle\\Controller\\SecurityController::loginAction',  '_route' => 'fos_user_security_login',);
                }

                // fos_user_security_check
                if ($pathinfo === '/login_check') {
                    if ($this->context->getMethod() != 'POST') {
                        $allow[] = 'POST';
                        goto not_fos_user_security_check;
                    }

                    return array (  '_controller' => 'FOS\\UserBundle\\Controller\\SecurityController::checkAction',  '_route' => 'fos_user_security_check',);
                }
                not_fos_user_security_check:

            }

            // fos_user_security_logout
            if ($pathinfo === '/logout') {
                return array (  '_controller' => 'FOS\\UserBundle\\Controller\\SecurityController::logoutAction',  '_route' => 'fos_user_security_logout',);
            }

        }

        if (0 === strpos($pathinfo, '/profile')) {
            // fos_user_profile_show
            if (rtrim($pathinfo, '/') === '/profile') {
                if (!in_array($this->context->getMethod(), array('GET', 'HEAD'))) {
                    $allow = array_merge($allow, array('GET', 'HEAD'));
                    goto not_fos_user_profile_show;
                }

                if (substr($pathinfo, -1) !== '/') {
                    return $this->redirect($pathinfo.'/', 'fos_user_profile_show');
                }

                return array (  '_controller' => 'FOS\\UserBundle\\Controller\\ProfileController::showAction',  '_route' => 'fos_user_profile_show',);
            }
            not_fos_user_profile_show:

            // fos_user_profile_edit
            if ($pathinfo === '/profile/edit') {
                return array (  '_controller' => 'FOS\\UserBundle\\Controller\\ProfileController::editAction',  '_route' => 'fos_user_profile_edit',);
            }

        }

        if (0 === strpos($pathinfo, '/re')) {
            if (0 === strpos($pathinfo, '/register')) {
                // fos_user_registration_register
                if (rtrim($pathinfo, '/') === '/register') {
                    if (substr($pathinfo, -1) !== '/') {
                        return $this->redirect($pathinfo.'/', 'fos_user_registration_register');
                    }

                    return array (  '_controller' => 'FOS\\UserBundle\\Controller\\RegistrationController::registerAction',  '_route' => 'fos_user_registration_register',);
                }

                if (0 === strpos($pathinfo, '/register/c')) {
                    // fos_user_registration_check_email
                    if ($pathinfo === '/register/check-email') {
                        if (!in_array($this->context->getMethod(), array('GET', 'HEAD'))) {
                            $allow = array_merge($allow, array('GET', 'HEAD'));
                            goto not_fos_user_registration_check_email;
                        }

                        return array (  '_controller' => 'FOS\\UserBundle\\Controller\\RegistrationController::checkEmailAction',  '_route' => 'fos_user_registration_check_email',);
                    }
                    not_fos_user_registration_check_email:

                    if (0 === strpos($pathinfo, '/register/confirm')) {
                        // fos_user_registration_confirm
                        if (preg_match('#^/register/confirm/(?P<token>[^/]++)$#s', $pathinfo, $matches)) {
                            if (!in_array($this->context->getMethod(), array('GET', 'HEAD'))) {
                                $allow = array_merge($allow, array('GET', 'HEAD'));
                                goto not_fos_user_registration_confirm;
                            }

                            return $this->mergeDefaults(array_replace($matches, array('_route' => 'fos_user_registration_confirm')), array (  '_controller' => 'FOS\\UserBundle\\Controller\\RegistrationController::confirmAction',));
                        }
                        not_fos_user_registration_confirm:

                        // fos_user_registration_confirmed
                        if ($pathinfo === '/register/confirmed') {
                            if (!in_array($this->context->getMethod(), array('GET', 'HEAD'))) {
                                $allow = array_merge($allow, array('GET', 'HEAD'));
                                goto not_fos_user_registration_confirmed;
                            }

                            return array (  '_controller' => 'FOS\\UserBundle\\Controller\\RegistrationController::confirmedAction',  '_route' => 'fos_user_registration_confirmed',);
                        }
                        not_fos_user_registration_confirmed:

                    }

                }

            }

            if (0 === strpos($pathinfo, '/resetting')) {
                // fos_user_resetting_request
                if ($pathinfo === '/resetting/request') {
                    if (!in_array($this->context->getMethod(), array('GET', 'HEAD'))) {
                        $allow = array_merge($allow, array('GET', 'HEAD'));
                        goto not_fos_user_resetting_request;
                    }

                    return array (  '_controller' => 'FOS\\UserBundle\\Controller\\ResettingController::requestAction',  '_route' => 'fos_user_resetting_request',);
                }
                not_fos_user_resetting_request:

                // fos_user_resetting_send_email
                if ($pathinfo === '/resetting/send-email') {
                    if ($this->context->getMethod() != 'POST') {
                        $allow[] = 'POST';
                        goto not_fos_user_resetting_send_email;
                    }

                    return array (  '_controller' => 'FOS\\UserBundle\\Controller\\ResettingController::sendEmailAction',  '_route' => 'fos_user_resetting_send_email',);
                }
                not_fos_user_resetting_send_email:

                // fos_user_resetting_check_email
                if ($pathinfo === '/resetting/check-email') {
                    if (!in_array($this->context->getMethod(), array('GET', 'HEAD'))) {
                        $allow = array_merge($allow, array('GET', 'HEAD'));
                        goto not_fos_user_resetting_check_email;
                    }

                    return array (  '_controller' => 'FOS\\UserBundle\\Controller\\ResettingController::checkEmailAction',  '_route' => 'fos_user_resetting_check_email',);
                }
                not_fos_user_resetting_check_email:

                // fos_user_resetting_reset
                if (0 === strpos($pathinfo, '/resetting/reset') && preg_match('#^/resetting/reset/(?P<token>[^/]++)$#s', $pathinfo, $matches)) {
                    if (!in_array($this->context->getMethod(), array('GET', 'POST', 'HEAD'))) {
                        $allow = array_merge($allow, array('GET', 'POST', 'HEAD'));
                        goto not_fos_user_resetting_reset;
                    }

                    return $this->mergeDefaults(array_replace($matches, array('_route' => 'fos_user_resetting_reset')), array (  '_controller' => 'FOS\\UserBundle\\Controller\\ResettingController::resetAction',));
                }
                not_fos_user_resetting_reset:

            }

        }

        // fos_user_change_password
        if ($pathinfo === '/profile/change-password') {
            if (!in_array($this->context->getMethod(), array('GET', 'POST', 'HEAD'))) {
                $allow = array_merge($allow, array('GET', 'POST', 'HEAD'));
                goto not_fos_user_change_password;
            }

            return array (  '_controller' => 'FOS\\UserBundle\\Controller\\ChangePasswordController::changePasswordAction',  '_route' => 'fos_user_change_password',);
        }
        not_fos_user_change_password:

        // _welcome
        if (rtrim($pathinfo, '/') === '') {
            if (substr($pathinfo, -1) !== '/') {
                return $this->redirect($pathinfo.'/', '_welcome');
            }

            return array (  '_controller' => 'Acme\\DemoBundle\\Controller\\WelcomeController::indexAction',  '_route' => '_welcome',);
        }

        if (0 === strpos($pathinfo, '/demo')) {
            if (0 === strpos($pathinfo, '/demo/secured')) {
                if (0 === strpos($pathinfo, '/demo/secured/log')) {
                    if (0 === strpos($pathinfo, '/demo/secured/login')) {
                        // _demo_login
                        if ($pathinfo === '/demo/secured/login') {
                            return array (  '_controller' => 'Acme\\DemoBundle\\Controller\\SecuredController::loginAction',  '_route' => '_demo_login',);
                        }

                        // _demo_security_check
                        if ($pathinfo === '/demo/secured/login_check') {
                            return array (  '_controller' => 'Acme\\DemoBundle\\Controller\\SecuredController::securityCheckAction',  '_route' => '_demo_security_check',);
                        }

                    }

                    // _demo_logout
                    if ($pathinfo === '/demo/secured/logout') {
                        return array (  '_controller' => 'Acme\\DemoBundle\\Controller\\SecuredController::logoutAction',  '_route' => '_demo_logout',);
                    }

                }

                if (0 === strpos($pathinfo, '/demo/secured/hello')) {
                    // acme_demo_secured_hello
                    if ($pathinfo === '/demo/secured/hello') {
                        return array (  'name' => 'World',  '_controller' => 'Acme\\DemoBundle\\Controller\\SecuredController::helloAction',  '_route' => 'acme_demo_secured_hello',);
                    }

                    // _demo_secured_hello
                    if (preg_match('#^/demo/secured/hello/(?P<name>[^/]++)$#s', $pathinfo, $matches)) {
                        return $this->mergeDefaults(array_replace($matches, array('_route' => '_demo_secured_hello')), array (  '_controller' => 'Acme\\DemoBundle\\Controller\\SecuredController::helloAction',));
                    }

                    // _demo_secured_hello_admin
                    if (0 === strpos($pathinfo, '/demo/secured/hello/admin') && preg_match('#^/demo/secured/hello/admin/(?P<name>[^/]++)$#s', $pathinfo, $matches)) {
                        return $this->mergeDefaults(array_replace($matches, array('_route' => '_demo_secured_hello_admin')), array (  '_controller' => 'Acme\\DemoBundle\\Controller\\SecuredController::helloadminAction',));
                    }

                }

            }

            // _demo
            if (rtrim($pathinfo, '/') === '/demo') {
                if (substr($pathinfo, -1) !== '/') {
                    return $this->redirect($pathinfo.'/', '_demo');
                }

                return array (  '_controller' => 'Acme\\DemoBundle\\Controller\\DemoController::indexAction',  '_route' => '_demo',);
            }

            // _demo_hello
            if (0 === strpos($pathinfo, '/demo/hello') && preg_match('#^/demo/hello/(?P<name>[^/]++)$#s', $pathinfo, $matches)) {
                return $this->mergeDefaults(array_replace($matches, array('_route' => '_demo_hello')), array (  '_controller' => 'Acme\\DemoBundle\\Controller\\DemoController::helloAction',));
            }

            // _demo_contact
            if ($pathinfo === '/demo/contact') {
                return array (  '_controller' => 'Acme\\DemoBundle\\Controller\\DemoController::contactAction',  '_route' => '_demo_contact',);
            }

        }

        throw 0 < count($allow) ? new MethodNotAllowedException(array_unique($allow)) : new ResourceNotFoundException();
    }
}


text:
from shelf.search.metadata import Metadata
from elasticsearch_dsl.query import Q
from elasticsearch_dsl import Search
from elasticsearch.helpers import scan, bulk
from shelf.search.type import Type as SearchType
from shelf.metadata.keys import Keys as MetadataKeys

class UpdateManager(object):
    def __init__(self, logger, connection):
        self.logger = logger
        self.connection = connection
        self.index = connection.es_index

    def remove_unlisted_documents(self, ex_key_list):
        """
            Removes any documents with keys not enumerated in the ex_key_list.

            Args:
                ex_key_list(list): List of keys that should remain in the Elasticsearch collection.

            Returns:
                int: Number of documents deleted from Elasticsearch.
        """
        # Using an invert operator here to create a bool query with a "must not occurence type" with an ids query.
        # https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-bool-query.html
        query = ~Q("ids", type=Metadata._doc_type.name, values=ex_key_list)
        query = Search(using=self.connection).index(self.index).query(query).to_dict()

        return self._bulk_delete(query)

    def remove_unlisted_documents_wildcard(self, key, value_list):
        """
            Removes all documents that do not match the query built.

            Args:
                key(string): key of metadata property to use to query.
                value_list(list[string]): list of values to match against

            Returns:
                int: number of records that were deleted

            Example:
                remove_unlisted_documents_wildcard("artifactPath", ["/test/artifact/*"])
                In this example all documents that don't match artifactPath=/test/artifact/*
                are pruned.
        """
        query = None

        for value in value_list:
            nested_query = Q(SearchType.MATCH, property_list__name=key)
            nested_query &= Q(SearchType.WILDCARD, property_list__value=value)
            q = Q("nested", path="property_list", query=nested_query)

            if not query:
                query = q
            else:
                query |= q

        # Inverting the query so any matches are spared from pruning
        query = ~Q(query)
        query = Search(using=self.connection).index(self.index).query(query).to_dict()

        return self._bulk_delete(query)

    def remove_unlisted_documents_per_bucket(self, ex_key_list, bucket_name):
        """
            Removes any documents with keys not enumerated in the ex_key_list associated with the supplied bucket.

            Args:
                ex_key_list(list): List of keys that should remain in the Elasticsearch collection.
                bucket_name(string): Used to filter document so only old documents in this bucket are pruned.

            Returns:
                int: Number of documents deleted from Elasticsearch.
        """
        # Formats bucket name for artifactPath wildcard search
        bucket_url = "/{0}/*".format(bucket_name)
        query = ~Q("ids", type=Metadata._doc_type.name, values=ex_key_list)

        # Query for docs in particular bucket which requires us to match artifactPath.
        nested_query = Q(SearchType.MATCH, property_list__name=MetadataKeys.PATH)
        nested_query &= Q(SearchType.WILDCARD, property_list__value=bucket_url)
        query &= Q("nested", path="property_list", query=nested_query)
        query = Search(using=self.connection).index(self.index).query(query).to_dict()

        return self._bulk_delete(query)

    def _bulk_delete(self, query):
        """
            Deletes all results returned by provided query.

            Args:
                query(dict): dictionary representing Elasticsearch query.

            Returns:
                int: number of documents deleted from Elasticsearch.
        """
        self.logger.info("Executing the following query for removing old documents from {0}. {1}".format(
            self.index, query
        ))

        # Doing a bulk operation here via the elasticsearch library.
        # With elasticsearch_dsl there is no way to do a bulk delete.
        # scan is a simple way to iterate through all results and delete each one
        # http://elasticsearch-py.readthedocs.org/en/master/helpers.html#scan
        # In summation we do a query for all ids not in the ex_key_list and iterate through and delete all results.
        # Based on my research this was the easiest way to perform this operation.
        operations = (
            {
                "_op_type": "delete",
                "_id": hit["_id"],
                "_index": hit["_index"],
                "_type": hit["_type"],
            } for hit in scan(
                self.connection,
                query=query,
                index=self.index,
                doc_type=Metadata._doc_type.name,
                _source=0,
            )
        )

        stats = bulk(self.connection, operations, refresh=True)
        return stats[0]

    def bulk_update(self, data):
        """
            This provides bulk updating functionality. It has the ability to update multiple documents.

            Args:
                data(dict): This contains metadata and the associated document key. Example below:

            Example of data format:
            {
                "key_of_doc": {
                    "artifactPath": {
                        "name": "artifactPath",
                        "value": "/wibble/wobble",
                        "immutable": False
                    },
                    ....
                },
                ....
            }
        """
        for key, val in data.iteritems():
            self.update(key, val)

    def update(self, key, metadata):
        """
            Updates the metadata in the ElasticSearch collection denoted by the supplied unique key.

            Args:
                key(string): Unique key that is associated with the metadata document to update.
                metadata(dict): Updated metadata to store in ElasticSearch.
        """
        self.logger.info("Attempting update of metadata: {0} in ES".format(key))
        meta_doc = self._get_metadata(key)
        meta_doc.update_all(metadata)
        meta_doc.save(using=self.connection)
        self.logger.info("Updated metadata document {0} in ES".format(key))

    def _get_metadata(self, key):
        """
            Attempts to get existing metadata and creates one if it does not exist.

            Args:
                key(string): Unique key that represents the unique id of the metadata document.

            Returns:
                shelf.search.metadata.Metadata
        """
        meta_doc = Metadata.get(id=key, index=self.index, using=self.connection, ignore=404)

        if not meta_doc:
            meta_doc = Metadata()
            meta_doc.meta.id = key
            meta_doc.meta.index = self.index

        return meta_doc


text:
package com.bugull.mongo.entity;

import com.bugull.mongo.annotations.EmbedList;
import java.util.List;

/**
 *
 * @author Frank Wen(xbwen@hotmail.com)
 */
public class MyVO {

    private String name;
    private Double value;
    @EmbedList
    private List<MyVO> children;

    public String getName() {
        return name;
    }

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

    public Double getValue() {
        return value;
    }

    public void setValue(Double value) {
        this.value = value;
    }

    public List<MyVO> getChildren() {
        return children;
    }

    public void setChildren(List<MyVO> children) {
        this.children = children;
    }

}


text:
"""Manage the appropriate client and store classes."""

from getpass import getpass
import logging
import Queue

from .client import NetworkRailClient
from .store import DummyFrameStore

FRAMES = Queue.Queue()
logger = logging.getLogger(__name__)

def create(args):
    """Create the producer and consumer from arguments."""
    producer = NetworkRailClient(
        frame_count=getattr(args, 'frames', None),
        frame_queue=FRAMES,
        password=args.password,
        topics=getattr(args, 'topics', []),
        username=args.username,
    )
    consumer = DummyFrameStore(FRAMES)
    return producer, consumer

def process(producer, consumer):
    """Run the threaded processes."""
    logger.info('Starting process...')
    producer.start()
    consumer.start()
    while producer.is_alive() or not FRAMES.empty():
        pass
    consumer.stop()
    logger.info('Process complete.')

def run_demo(username):
    """Default settings for testing."""
    process(
        producer=NetworkRailClient(
            username,
            frame_count=10,
            frame_queue=FRAMES,
            password=getpass('Enter password: '),
            topics='TRAIN_MVT_ALL_TOC',
        ),
        consumer=DummyFrameStore(FRAMES),
    )


text:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
    android:id="@+id/multiplayer_fragment"
    android:layout_height="match_parent"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:background="@color/PrimaryBackground"
    tools:context=".activities.MultiplayerActivity$PlaceholderFragment">

    <ImageButton
        android:id="@+id/app_logo"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentTop="true"
        android:layout_centerHorizontal="true"
        android:background="@drawable/app_logo"/>

    <Button
        android:id="@+id/recreate_multiplayer_button"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/try_again"
        android:background="@drawable/tile_button_background"
        android:onClick="onClick"
        android:layout_centerInParent="true"
        android:layout_below="@+id/multiplayer_message"
        android:visibility="invisible"/>

    <ProgressBar
        style="?android:attr/progressBarStyleLarge"
        android:id="@+id/creating_multiplayer_progressbar"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_below="@+id/multiplayer_message"
        android:layout_centerHorizontal="true" />

    <TextView
        android:id="@+id/multiplayer_message"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:textSize="50sp"
        android:gravity="center"
        android:text="@string/creating_multiplayer_game"
        android:layout_centerVertical="true"
        android:layout_alignParentLeft="true"
        android:layout_alignParentStart="true"
        android:layout_marginBottom="@dimen/activity_vertical_margin"/>

</RelativeLayout>


text:
.test {
  width: 200px;
}
.test:hover {
  font-size: 20px;
  transition-delay: 0s;
  transition-duration: 0.5s;
  transition-property: font-size;
  transition-timing-function: tedious;
}
.test:not(:hover) {
  font-size: 20px;
  transition-delay: 0s;
  transition-duration: 0.5s;
  transition-property: font-size;
  transition-timing-function: tedious;
}
.test {
  width: 200px;
}
.test:hover {
  font-size: 20px;
  transition-delay: 0s;
  transition-duration: 0.5s;
  transition-property: font-size;
  transition-timing-function: tedious;
}
.test:not(:hover) {
  font-size: 20px;
  transition-delay: 0s;
  transition-duration: 0.5s;
  transition-property: font-size;
  transition-timing-function: tedious;
}


text:
AndroidOpenGLESGameScreen::AndroidOpenGLESGameScreen() : OpenGLESGameScreen()
{
    // Empty
}

void AndroidOpenGLESGameScreen::onSurfaceCreated(int screenWidth, int screenHeight)
{
    onSurfaceChanged(screenWidth, screenHeight);
}

void AndroidOpenGLESGameScreen::onSurfaceChanged(int screenWidth, int screenHeight)
{
    m_iScreenWidth = screenWidth;
    m_iScreenHeight = screenHeight;

    initGraphics(screenWidth, screenHeight);
}

void AndroidOpenGLESGameScreen::touchToWorld(TouchEvent &touchEvent)
{
    m_touchPoint->set((touchEvent.getX() / (float) m_iScreenWidth) * GAME_WIDTH, (1 - touchEvent.getY() / (float) m_iScreenHeight) * GAME_HEIGHT);
}

bool AndroidOpenGLESGameScreen::handleOnBackPressed()
{
    if(m_gameState == RUNNING)
    {
        onPause();

        return true;
    }

    return false;
}