text:
package com.amazonaws.mturk.service.exception;

@SuppressWarnings("serial")
public class ExceedsMaxAssignmentsPerWorkerException extends ServiceException {

  public ExceedsMaxAssignmentsPerWorkerException() {
  }

  public ExceedsMaxAssignmentsPerWorkerException(String message) {
    super(message);
  }

  public ExceedsMaxAssignmentsPerWorkerException(Throwable cause) {
    super(cause);
  }

  public ExceedsMaxAssignmentsPerWorkerException(String message, Throwable cause) {
    super(message, cause);
  }

}

redpajama_set_name: RedPajamaGithub


text:
package org.sakaiproject.sitestats.api;

public interface StatsAuthz {

	/** Permissions */
	public static final String	PERMISSION_SITESTATS_VIEW		= "sitestats.view";
	public static final String	PERMISSION_SITESTATS_ADMIN_VIEW	= "sitestats.admin.view";

	// ################################################################
	// Public methods
	// ################################################################
	/**
	 * Check if current user has permission to access SiteStats tool.
	 * @param siteId The site id to check against.
	 */
	public boolean isUserAbleToViewSiteStats(String siteId);

	/**
	 * Check if current user has permission to access SiteStats Admin tool.
	 * @param siteId The site id to check against.
	 */
	public boolean isUserAbleToViewSiteStatsAdmin(String siteId);

	/** Check if current tool is an instance of the SiteStats tool. */
	public boolean isSiteStatsPage();

	/** Check if current tool is an instance of the SiteStats Admin tool. */
	public boolean isSiteStatsAdminPage();
}


text:
public class MainArray {

	public static void main(String[] args) {
		double time;

		time = System.currentTimeMillis();

		int[] array = new int[1000000];

		for (int i = 0; i < array.length; i++) {
			array[i] = i;
		}

		Utils.calcSumArray(array);

		time = (System.currentTimeMillis() - time);

		System.out.println(time);
	}

}


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<title>Uses of Class ddm.data.PartitionMap</title>
<meta name="date" content="2014-06-10">
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes

Uses of Class
ddm.data.PartitionMap

Packages that use PartitionMap

Package
Description

ddm.data

Uses of PartitionMap in ddm.data

Methods in ddm.data that return types with arguments of type PartitionMap

Modifier and Type
Method and Description

java.util.ArrayList<PartitionMap>
PartitionList.getPartitionMap()

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes


text:
/**
 * URL filter plugin to exclude URLs by domain suffixes, domain names, and/or host names.
 * See {@link org.apache.nutch.urlfilter.domain} for the counterpart (include only URLs
 * matching host or domain).
 */
package org.apache.nutch.urlfilter.domaindenylist;


text:
<?php
class ControllerExtensionModuleSohomeslider extends Controller {
	private $error = array();
	private $data = array();
	public function index() {
	if(isset($this->request->get['module_id']))
	{
		// Add js
		$this->document->addScript('view/javascript/so_home_slider/js/jquery-ui.min.js');
		$this->document->addStyle('view/javascript/so_home_slider/js/jquery-ui.min.css');
	}

	// Load language
		$this->load->language('extension/module/so_home_slider');
		$data['objlang'] = $this->language;

	// Load breadcrumbs
		$data['breadcrumbs'] = $this->_breadcrumbs();

	// Load model
		$this->load->model('catalog/category');
		$this->load->model('extension/module');
		$this->load->model('extension/module/so_home_slider');
		$this->load->model('tool/image');

		$this->document->setTitle($this->language->get('heading_title'));
	// Get data
		$model = $this->model_extension_module_so_home_slider;
		$model->checkInstall();

	// Delete Module
		if( isset($this->request->get['slide_id']) && isset($this->request->get['module_id']) && isset($this->request->get['delete']) ){
			$this->model_extension_module_so_home_slider->deleteSlide( $this->request->get['slide_id'] );
			$this->response->redirect($this->url->link('extension/module/so_home_slider', 'token=' . $this->session->data['token'].'&tab=slide&module_id='.$this->request->get['module_id'], 'SSL'));
		}elseif(!isset($this->request->get['slide_id']) && isset($this->request->get['module_id']) && isset($this->request->get['delete']) ){
			$this->model_extension_module->deleteModule( $this->request->get['module_id'] );
			$this->model_extension_module_so_home_slider->deleteAllSlide($this->request->get['module_id']);
			$this->response->redirect($this->url->link('extension/module/so_home_slider', 'token=' . $this->session->data['token'], 'SSL'));
		}
	// Get Module Id New
		$moduleid_new= $this->model_extension_module_so_home_slider->getModuleId(); // Get module id
		$module_id = '';
		$slideid_new= $this->model_extension_module_so_home_slider->getSlideId(); // Get slide id
		$slide_id = '';
		if (($this->request->server['REQUEST_METHOD'] == 'POST') && $this->validate()) {

			$tab_module = isset($this->request->post["tab_module"]) ? $this->request->post["tab_module"] : "";
			unset($this->request->post['tab_module']);
			$tab = isset($this->request->get["tab"]) ? $this->request->get["tab"] : "";

			$action = isset($this->request->post["action"]) ? $this->request->post["action"] : "";
			unset($this->request->post['action']);
			if($tab_module == 'add-slide' || $tab == 'slide' && $tab_module != 'add-module')
			{
				if (!isset($this->request->get['slide_id'])) {
					$this->request->post['slideid'] = $slideid_new[0]['Auto_increment'];
					$slide_id = $slideid_new[0]['Auto_increment'];
					$this->request->post['moduleid'] = $this->request->get['module_id'];
					$this->model_extension_module_so_home_slider->addSlide($this->request->post);
				} else {
					$slide_id = $this->request->get['slide_id'];
					$this->request->post['moduleid'] = $this->request->get['module_id'];

					$this->model_extension_module_so_home_slider->editSlide($this->request->get['slide_id'], $this->request->post);
				}

				if($action == "save_edit") {
					$this->response->redirect($this->url->link('extension/module/so_home_slider', 'module_id='.$this->request->get['module_id'].'&tab=slide&slide_id='.$slide_id.'&token=' . $this->session->data['token'], 'SSL'));
				}elseif($action == "save_new"){
					$this->response->redirect($this->url->link('extension/module/so_home_slider', 'token=' . $this->session->data['token'].'&tab=slide&module_id='.$this->request->get['module_id'], 'SSL'));
				}else{
					$this->response->redirect($this->url->link('extension/extension', 'token=' . $this->session->data['token'], 'SSL'));
				}
			}else{
				if (!isset($this->request->get['module_id'])) {
					$this->request->post['moduleid'] = $moduleid_new[0]['Auto_increment'];
					$module_id = $moduleid_new[0]['Auto_increment'];
					$this->model_extension_module->addModule('so_home_slider', $this->request->post);

				} else {
					$module_id = $this->request->get['module_id'];
					$this->request->post['moduleid'] = $this->request->get['module_id'];
					$this->model_extension_module->editModule($this->request->get['module_id'], $this->request->post);
				}
				$data = $this->request->post;

				$this->session->data['success'] = $this->language->get('text_success');
				if($action == "save_edit") {
					$this->response->redirect($this->url->link('extension/module/so_home_slider', 'module_id='.$module_id.'&token=' . $this->session->data['token'], 'SSL'));
				}elseif($action == "save_new"){
					$this->response->redirect($this->url->link('extension/module/so_home_slider', 'token=' . $this->session->data['token'], 'SSL'));
				}else{
					$this->response->redirect($this->url->link('extension/extension', 'token=' . $this->session->data['token'], 'SSL'));
				}
			}
		}

		$data['cancel'] = $this->url->link('extension/extension', 'token=' . $this->session->data['token'], 'SSL');

		$default = array(
			'name' 					=> '',
			'module_description'	=> array(),
			'disp_title_module'		=> '1',
			'status'				=> '1',
			'class_suffix'			=> '',
			'item_link_target'		=> '_blank',
			'nb_column0'			=> '1',
			'nb_column1'			=> '1',
			'nb_column2'			=> '1',
			'nb_column3'			=> '1',
			'nb_column4'			=> '1',
			'width'					=> '350',
			'height'				=> '150',
			'center'				=> '0',
			'autoplay'				=> '1',
			'autoplayTimeout'		=> '5000',
			'autoplayHoverPause'	=> '1',
			'autoplaySpeed'			=> '1000',
			'startPosition'			=> '0',
			'mouseDrag'				=> '1',
			'touchDrag'				=> '1',
			'loop'					=> '1',
			'dots'					=> '1',
			'navs'					=> '1',
			'link'					=> 'http://',
			'caption'				=> '',
			'animateIn'				=> 'bounceIn',
			'animateOut'			=> 'bounceOut',
			'thumb'					=> $this->model_tool_image->resize('no_image.png', 100, 100),
			'pre_text'				=> '',
			'post_text'				=> '',
			'use_cache'				=> '0',
			'cache_time'			=> '3600',
			'slide_status'			=> '1'
		);
		$this->load->model('localisation/language');
		$data['languages'] = $this->model_localisation_language->getLanguages();
		if (isset($this->request->get['module_id']) && ($this->request->server['REQUEST_METHOD'] != 'POST') || ($this->request->server['REQUEST_METHOD'] == 'POST' && !$this->validate() && isset($this->request->get['module_id'])) || ($this->request->server['REQUEST_METHOD'] == 'POST' && !$this->validate() && isset($this->request->get['slide_id']))) {
			$module_info = $default;
			$info_save   = $this->model_extension_module->getModule($this->request->get['module_id']);
			$module_info = array_merge($module_info,$info_save);
			$module_info['thumb']			= $this->model_tool_image->resize('no_image.png', 100, 100);

			$data['action'] 				= $this->url->link('extension/module/so_home_slider', 'token=' . $this->session->data['token'] . '&module_id=' . $this->request->get['module_id'], 'SSL');

			if(isset($this->request->get['slide_id'])){
				$data['action'] = $this->url->link('extension/module/so_home_slider', 'token=' . $this->session->data['token'] . '&tab=slide&module_id='.$this->request->get['module_id'].'&slide_id=' . $this->request->get['slide_id'], 'SSL');

			}elseif(isset($this->request->get['tab']) && $this->request->get['tab'] == "slide")
			{
				$data['action'] = $this->url->link('extension/module/so_home_slider', 'token=' . $this->session->data['token'] . '&tab=slide&module_id='.$this->request->get['module_id'], 'SSL');
			}
			$data['subheading'] 			= $this->language->get('text_edit_module') . $module_info['name'];
			$data['selectedid'] 			= $this->request->get['module_id'];
			$data['slide_description'] = array(
				'status'	=> '1'
			);

			if(isset($this->request->get['slide_id'])){
				$data['slide_description'] = $this->model_extension_module_so_home_slider->getSliderById($this->request->get['slide_id']);
				$language = count($data['slide_description']);
				$language_id = (int)$this->config->get('config_language_id');
				if($data['slide_description'][$language_id]['image'] != "")
				{
					if (is_file(DIR_IMAGE . $data['slide_description'][$language_id]['image'])) {
						$data['slide_description']['thumb'] = $this->model_tool_image->resize($data['slide_description'][$language_id]['image'], 100, 100);

					} else {
						$data['slide_description']['thumb'] = $this->model_tool_image->resize('no_image.png', 100, 100);
					}
				}
				$data['slide_description']['image'] = $data['slide_description'][$language_id]['image'];
				$data['slide_description']['url'] = $data['slide_description'][$language_id]['url'];
				$data['slide_description']['status'] = $data['slide_description'][$language_id]['status'];
			}
			if($this->request->post != null)
			{
				foreach($this->request->post['slide_description'] as $item){
						$data['slide_description'][$item['language_id']] = array(
						'title'		=> $item['slide_title'],
						'caption'   => $item['slide_caption'],
						'description'=> $item['slide_desciption']
					);
				}
				$data['slide_description']['url'] = $this->request->post['slide_link'];
				$data['slide_description']['image'] = $this->request->post['image'];
				$data['slide_description']['thumb'] = $this->model_tool_image->resize($this->request->post['image'], 100, 100);
				$data['slide_description']['status'] = $this->request->post['slide_status'];

			}

		} else {
			$module_info = $default;
			if($this->request->post != null)
			{
				$module_info = array_merge($module_info,$this->request->post);
			}

			$data['selectedid'] 	= 0;
			$data['action'] 		= $this->url->link('extension/module/so_home_slider', 'token=' . $this->session->data['token'], 'SSL');
			$data['subheading'] 	= $this->language->get('text_create_new_module');
		}

		$data['token'] = $this->session->data['token'];

		$data['error']= $this->error;
		// Save and Stay --------------------------------------------------------------
		if (isset($this->session->data['success'])) {
			$data['success'] = $this->session->data['success'];
			unset($this->session->data['success']);
		} else {
			$data['success'] = '';
		}
		$data['text_layout'] = sprintf($this->language->get('text_layout'), $this->url->link('design/layout', 'token=' . $this->session->data['token'], 'SSL'));

		// ---------------------------Load module --------------------------------------------
		$data['modules'] = array( 0=> $module_info );

		$data['moduletabs'] = $this->model_extension_module->getModulesByCode( 'so_home_slider' );
		$data['link'] = $this->url->link('extension/module/so_home_slider', 'token=' . $this->session->data['token'] . '', 'SSL');
		$data['linkremove'] = $this->url->link('extension/module/so_home_slider&token=' . $this->session->data['token']);
		//--------------------------------Load Data -------------------------------------------
		$data['item_link_targets'] = array(
					'_blank' => $this->language->get('value_blank'),
					'_self'  => $this->language->get('value_self'),
				);

		//button page
		$data['button_pages'] = array(
			'top' => $this->language->get('value_top'),
			'under' => $this->language->get('value_under'),
		);
		$data['nb_columns'] = array(
			'1'   => '1',
			'2'   => '2',
			'3'   => '3',
			'4'   => '4',
			'5'   => '5',
			'6'   => '6',
		);
		$data['nb_rows'] = array(
			'1'   => '1',
			'2'   => '2',
			'3'   => '3',
			'4'   => '4',
			'5'   => '5',
			'6'   => '6',
		);
		//Effect
		//Effect
		$data['animateIns'] = array(
			'none'=>$this->language->get('none'),
			'bounceIn'=>$this->language->get('bounceIn'),
			'bounceInDown'=>$this->language->get('bounceInDown'),
			'bounceInLeft'=>$this->language->get('bounceInLeft'),
			'bounceInRight'=>$this->language->get('bounceInRight'),
			'bounceInUp'=>$this->language->get('bounceInUp'),
			'fadeIn'=>$this->language->get('fadeIn'),
			'fadeInDown'=>$this->language->get('fadeInDown'),
			'fadeInDownBig'=>$this->language->get('fadeInDownBig'),
			'fadeInLeft'=>$this->language->get('fadeInLeft'),
			'fadeInLeftBig'=>$this->language->get('fadeInLeftBig'),
			'fadeInRight'=>$this->language->get('fadeInRight'),
			'fadeInRightBig'=>$this->language->get('fadeInRightBig'),
			'fadeInUp'=>$this->language->get('fadeInUp'),
			'fadeInUpBig'=>$this->language->get('fadeInUpBig'),
			'flipInX'=>$this->language->get('flipInX'),
			'flipInY'=>$this->language->get('flipInY'),
			'lightSpeedIn'=>$this->language->get('lightSpeedIn'),
			'rotateIn'=>$this->language->get('rotateIn'),
			'rotateInDownLeft'=>$this->language->get('rotateInDownLeft'),
			'rotateInDownRight'=>$this->language->get('rotateInDownRight'),
			'rotateInUpLeft'=>$this->language->get('rotateInUpLeft'),
			'rotateInUpRight'=>$this->language->get('rotateInUpRight'),
			'slideInUp'=>$this->language->get('slideInUp'),
			'slideInDown'=>$this->language->get('slideInDown'),
			'slideInLeft'=>$this->language->get('slideInLeft'),
			'slideInRight'=>$this->language->get('slideInRight'),
			'zoomIn'=>$this->language->get('zoomIn'),
			'zoomInDown'=>$this->language->get('zoomInDown'),
			'zoomInLeft'=>$this->language->get('zoomInLeft'),
			'zoomInRight'=>$this->language->get('zoomInRight'),
			'zoomInUp'=>$this->language->get('zoomInUp'),
			'rollIn'=>$this->language->get('rollIn'),
		);
		$data['animateOuts'] = array(
			'none'=>$this->language->get('none'),
			'bounceOut'=>$this->language->get('bounceOut'),
			'bounceOutDown'=>$this->language->get('bounceOutDown'),
			'bounceOutLeft'=>$this->language->get('bounceOutLeft'),
			'bounceOutRight'=>$this->language->get('bounceOutRight'),
			'bounceOutUp'=>$this->language->get('bounceOutUp'),
			'fadeOut'=>$this->language->get('fadeOut'),
			'fadeOutDown'=>$this->language->get('fadeOutDown'),
			'fadeOutDownBig'=>$this->language->get('fadeOutDownBig'),
			'fadeOutLeft'=>$this->language->get('fadeOutLeft'),
			'fadeOutLeftBig'=>$this->language->get('fadeOutLeftBig'),
			'fadeOutRight'=>$this->language->get('fadeOutRight'),
			'fadeOutRightBig'=>$this->language->get('fadeOutRightBig'),
			'fadeOutUp'=>$this->language->get('fadeOutUp'),
			'fadeOutUpBig'=>$this->language->get('fadeOutUpBig'),
			'flipOutX'=>$this->language->get('flipOutX'),
			'flipOutY'=>$this->language->get('flipOutY'),
			'lightSpeedOut'=>$this->language->get('lightSpeedOut'),
			'rotateOut'=>$this->language->get('rotateOut'),
			'rotateOutDownLeft'=>$this->language->get('rotateOutDownLeft'),
			'rotateOutDownRight'=>$this->language->get('rotateOutDownRight'),
			'rotateOutUpLeft'=>$this->language->get('rotateOutUpLeft'),
			'rotateOutUpRight'=>$this->language->get('rotateOutUpRight'),
			'slideOutUp'=>$this->language->get('slideOutUp'),
			'slideOutDown'=>$this->language->get('slideOutDown'),
			'slideOutLeft'=>$this->language->get('slideOutLeft'),
			'slideOutRight'=>$this->language->get('slideOutRight'),
			'zoomOut'=>$this->language->get('zoomOut'),
			'zoomOutDown'=>$this->language->get('zoomOutDown'),
			'zoomOutLeft'=>$this->language->get('zoomOutLeft'),
			'zoomOutRight'=>$this->language->get('zoomOutRight'),
			'zoomOutUp'=>$this->language->get('zoomOutUp'),
			'rollOut'=>$this->language->get('rollOut'),
		);
		// Module description
		$data['module_description'] = $module_info['module_description'];
		// List slide
		$data['slides'] = array();

		if(isset($module_info['moduleid']))
		{
			$data['slides'] = $model->getListSliderGroups($module_info['moduleid']);
		}

		for($i =0; $i < count($data['slides']); $i++)
		{
			if (is_file(DIR_IMAGE . $data['slides'][$i]['image'])) {
				$data['slides'][$i]['image'] = $this->model_tool_image->resize($data['slides'][$i]['image'], 1400, 600);
			} else {
				$data['slides'][$i]['image'] = $this->model_tool_image->resize('no_image.png', 1000, 600);
			}
		}
		//Get Data Default
		$data['header'] = $this->load->controller('common/header');
		$data['column_left'] = $this->load->controller('common/column_left');
		$data['footer'] = $this->load->controller('common/footer');
		// Remove cache
		$data['success_remove'] = $this->language->get('text_success_remove');
		$is_ajax = isset($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest';
		if($is_ajax && isset($_REQUEST['is_ajax_cache_lite']) && $_REQUEST['is_ajax_cache_lite']){
			self::remove_cache();
		}
		$this->response->setOutput($this->load->view('extension/module/so_home_slider.tpl', $data));
	}

	public function _breadcrumbs(){
		$this->data['breadcrumbs'] = array();

		$this->data['breadcrumbs'][] = array(
			'text' => $this->language->get('text_home'),
			'href' => $this->url->link('common/dashboard', 'token=' . $this->session->data['token'], 'SSL')
		);

		$this->data['breadcrumbs'][] = array(
			'text' => $this->language->get('text_module'),
			'href' => $this->url->link('extension/extension', 'token=' . $this->session->data['token'], 'SSL')
		);

		if (!isset($this->request->get['module_id'])) {
			$this->data['breadcrumbs'][] = array(
				'text' => $this->language->get('heading_title'),
				'href' => $this->url->link('extension/module/so_home_slider', 'token=' . $this->session->data['token'], 'SSL')
			);
		} else {
			$this->data['breadcrumbs'][] = array(
				'text' => $this->language->get('heading_title'),
				'href' => $this->url->link('extension/module/so_home_slider', 'token=' . $this->session->data['token'] . '&module_id=' . $this->request->get['module_id'], 'SSL')
			);
		}
		return $this->data['breadcrumbs'];
	}

    protected function validate()
    {
		if (!$this->user->hasPermission('modify', 'extension/module/so_home_slider')) {
			$this->error['warning'] = $this->language->get('error_permission');
		}

		if ((utf8_strlen($this->request->post['name']) < 3) || (utf8_strlen($this->request->post['name']) > 64)) {
			$this->error['name'] = $this->language->get('error_name');
		}

		$this->load->model('localisation/language');
		$languages = $this->model_localisation_language->getLanguages();

		foreach($languages as $language){
			if(isset($this->request->post['module_description']))
			{
				$module_description = $this->request->post['module_description'];
				if ((utf8_strlen($module_description[$language['language_id']]['head_name']) < 3) || (utf8_strlen($module_description[$language['language_id']]['head_name']) > 64)) {
					$this->error['head_name'] = $this->language->get('error_head_name');
				}
			}
			if(isset($this->request->post['slide_description']) && $this->request->post['tab_module'] == 'add-slide' || isset($this->request->post['slide_description']) && isset($this->request->get['tab']) && ($this->request->get['tab'] == "slide") && isset($this->request->post['slide_description']) && $this->request->post['tab_module'] == '')
			{
				$slide_description = $this->request->post['slide_description'];
				if ((utf8_strlen($slide_description[$language['language_id']]['slide_title']) < 1)) {
					$this->error['slide_title'] = $this->language->get('error_slide_title');
				}
			}
		}

        if (isset($this->request->post['image']) && $this->request->post['tab_module'] == 'add-slide' && (utf8_strlen($this->request->post['image']) < 1) || isset($this->request->post['image']) && isset($this->request->get['tab']) && ($this->request->get['tab'] == "slide") && (utf8_strlen($this->request->post['image']) < 1) && isset($this->request->post['image']) && $this->request->post['tab_module'] == '') {

            $this->error['image'] = $this->language->get('error_image');
		}

        if (!filter_var($this->request->post['autoplayTimeout'], FILTER_VALIDATE_INT) || $this->request->post['autoplayTimeout'] < 0) {
			$this->error['autoplayTimeout'] = $this->language->get('error_autoplayTimeout');
		}

        if (!filter_var($this->request->post['width'], FILTER_VALIDATE_INT) || $this->request->post['width'] < 0) {
			$this->error['width'] = $this->language->get('error_width');
		}

        if (!filter_var($this->request->post['height'], FILTER_VALIDATE_INT) || $this->request->post['height'] < 0) {
			$this->error['height'] = $this->language->get('error_height');
		}

        if (!filter_var($this->request->post['autoplaySpeed'], FILTER_VALIDATE_INT) || $this->request->post['autoplaySpeed'] < 0) {
			$this->error['autoplaySpeed'] = $this->language->get('error_autoplaySpeed');
		}

		if ($this->request->post['startPosition'] != '0' && !filter_var($this->request->post['startPosition'],FILTER_VALIDATE_INT) || $this->request->post['startPosition'] < 0) {
			$this->error['startPosition'] = $this->language->get('error_startPosition');
		}

        if ($this->error && !isset($this->error['warning'])) {
			$this->error['warning'] = $this->language->get('error_warning');
		}
		return !$this->error;
	}

    public function remove_cache()
    {
        $folder_cache = DIR_CACHE . 'so/';
        if (file_exists($folder_cache)) {
            self::mageDelTree($folder_cache);
        }
    }

    function mageDelTree($path)
    {
        if (is_dir($path)) {
            $entries = scandir($path);
            foreach ($entries as $entry) {
                if ($entry != '.' && $entry != '..') {
                    self::mageDelTree($path . '/' . $entry);
                }
            }
            @rmdir($path);
        } else {
            @unlink($path);
        }
    }

	public function sortposition() {
		$json = array();
		$this->load->model('extension/module/so_home_slider');
		if (isset($this->request->get['sortarray'])) {
			$result = $this->model_extension_module_so_home_slider->updatePositionSlide($this->request->get['sortarray']);
		}
	}
}


text:
namespace Google.Cloud.PubSub.V1.Snippets
{
    // [START pubsub_v1_generated_SchemaService_CreateSchema_sync_flattened]
    using Google.Cloud.PubSub.V1;

    public sealed partial class GeneratedSchemaServiceClientSnippets
    {
        /// <summary>Snippet for CreateSchema</summary>
        /// <remarks>
        /// This snippet has been automatically generated for illustrative purposes only.
        /// It may require modifications to work in your environment.
        /// </remarks>
        public void CreateSchema()
        {
            // Create client
            SchemaServiceClient schemaServiceClient = SchemaServiceClient.Create();
            // Initialize request argument(s)
            string parent = "projects/[PROJECT]";
            Schema schema = new Schema();
            string schemaId = "";
            // Make the request
            Schema response = schemaServiceClient.CreateSchema(parent, schema, schemaId);
        }
    }
    // [END pubsub_v1_generated_SchemaService_CreateSchema_sync_flattened]
}


text:
namespace EnergyTrading.Mdm.Data
{
    using EnergyTrading;

    /// <summary>
    /// Supports a validity range.
    /// </summary>
    public interface IRanged
    {
        /// <summary>
        /// Get or set the validity range.
        /// </summary>
        DateRange Validity { get; set; }
    }
}


text:
{% load staticfiles %}

    	a collaborative knowledge base characterizing the state of current thought in Cognitive Science.


text:
module QuantumComputer.TeleportEx
( psi
, psi0
, psi1
, psi2
, teleportGates
, teleportCircuit
) where

import QuantumComputer.ConstantStates
import QuantumComputer.Gates
import QuantumComputer.QStates

-- teleportation
psi  = qstate0
psi0 = psi `combineStates` bell00
psi1 = hgate 0 psi0
psi2 = cnot 0 1 psi1

-- same as above but all at once (right is done first) (id applied last)
teleportGates r0 r1 = foldl1 (.) [ zgateM 2 0, xgateM 2 1, meas 1 r1, meas 0 r0, hgate 0, cnot 1 0]

teleportCircuit r0 r1 state0 = teleportGates r0 r1 $ state0 `combineStates` bell00


text:
(function() {
  var app, blog, credentials, express, fs, helper, media, path, request, util, xml2js;

  require('should');

  helper = (require('../modules/helper'))();

  xml2js = require('xml2js');

  util = require('util');

  path = require('path');

  fs = require('fs');

  express = require('express');

  request = require('supertest');

  app = express();

  blog = (require(__dirname + '/init')).blog;

  media = (require(__dirname + '/init')).media;

  (require(path.join(__dirname, '../config')))(app);

  (require(path.join(__dirname, '../routes')))(app, blog.settings);

  credentials = util.format('%s:%s', blog.settings.username, blog.settings.password);

  describe('Atom', function() {
    request = request(app);
    describe('list posts', function() {
      var expected, id,
        _this = this;
      id = '';
      expected = 'test post';
      before(function(done) {
        var promise,
          _this = this;
        promise = blog.createPost({
          title: expected,
          author: 'Mehfuz Hossain',
          body: 'Empty body',
          publish: false
        });
        return promise.then(function(result) {
          id = result._id;
          return done();
        });
      });
      it('should return drafts when authorized', function(done) {
        var get;
        get = request.get('/api/atom/feeds');
        get.set('authorization', util.format('Basic %s', new Buffer(credentials).toString('base64')));
        return get.expect(200).end(function(err, res) {
          var parser;
          if (err !== null) {
            throw err;
          }
          parser = new xml2js.Parser();
          return parser.parseString(res.text, function(err, result) {
            var entry, match, _i, _len, _ref;
            match = false;
            _ref = result.feed.entry;
            for (_i = 0, _len = _ref.length; _i < _len; _i++) {
              entry = _ref[_i];
              if (entry.title[0] === expected) {
                match = true;
              }
            }
            match.should.be["true"];
            return done();
          });
        });
      });
      it('should return only the published when not authorized', function(done) {
        var get;
        get = request.get('/api/atom/feeds');
        return get.expect(200).end(function(err, res) {
          var parser;
          if (err !== null) {
            throw err;
          }
          parser = new xml2js.Parser();
          return parser.parseString(res.text, function(err, result) {
            var entry, match, _i, _len, _ref;
            match = false;
            if (typeof result.feed.entry !== 'undefined') {
              _ref = result.feed.entry;
              for (_i = 0, _len = _ref.length; _i < _len; _i++) {
                entry = _ref[_i];
                entry.title[0].should.not.equal(expected);
              }
            }
            return done();
          });
        });
      });
      return after(function(done) {
        return blog.deletePost(id, function() {
          return done();
        });
      });
    });
    describe('POST /api/atom/feeds', function() {
      var id,
        _this = this;
      id = '';
      it('should return 401 for unauthorized request', function(done) {
        var post;
        post = request.post('/api/atom/feeds');
        return post.expect(401).end(function(err, res) {
          if (err !== null) {
            throw err;
          }
          return done();
        });
      });
      it('should return www authentication header for unauthorized request', function(done) {
        var post;
        post = request.post('/api/atom/feeds');
        return post.expect(401).end(function(err, res) {
          var wwwAuthHeader;
          if (err !== null) {
            throw err;
          }
          wwwAuthHeader = res.headers['WWW-Authenticate'.toLowerCase()];
          wwwAuthHeader.should.be.ok;
          wwwAuthHeader.indexOf('Basic').should.equal(0);
          return done();
        });
      });
      it('should return expceted resultset and statuscode', function(done) {
        var post;
        post = request.post('/api/atom/feeds');
        post.set('Content-Type', 'application/atom+xml');
        post.set('authorization', util.format('Basic %s', new Buffer(credentials).toString('base64')));
        return fs.readFile(__dirname + '/post.xml', 'utf8', function(err, result) {
          post.write(result);
          return post.expect(201).end(function(err, res) {
            var parser;
            if (err !== null) {
              throw err;
            }
            parser = new xml2js.Parser();
            parser.parseString(res.text, function(err, result) {
              var lastIndex;
              result.entry.title[0].should.be.ok;
              result.entry.content[0].should.be.ok;
              result.entry.id[0].should.be.ok;
              lastIndex = result.entry.id[0].lastIndexOf('/') + 1;
              return id = result.entry.id[0].substr(lastIndex);
            });
            return done();
          });
        });
      });
      return afterEach(function(done) {
        return blog.deletePost(id, function() {
          return done();
        });
      });
    });
    describe('PUT /api/atom/entries/:id', function() {
      var expected, id,
        _this = this;
      id = '';
      expected = 'test post';
      before(function(done) {
        var promise,
          _this = this;
        promise = blog.createPost({
          title: expected,
          author: 'Mehfuz Hossain',
          body: 'Empty body'
        });
        return promise.then(function(result) {
          id = result._id;
          return done();
        });
      });
      it('should return 401 for unauthorized request', function(done) {
        var req;
        req = request.put(util.format('/api/atom/entries/%s', id));
        return req.expect(401).end(function(err, res) {
          if (err !== null) {
            throw err;
          }
          return done();
        });
      });
      it('should update post with correct status code when authorized', function(done) {
        var req;
        req = request.put(util.format('/api/atom/entries/%s', id));
        req.set('Content-Type', 'application/atom+xml');
        req.set('authorization', util.format('Basic %s', new Buffer(credentials).toString('base64')));
        return fs.readFile(__dirname + '/post.xml', 'utf8', function(err, result) {
          req.write(result);
          return req.expect(200).end(function(err, res) {
            var parser;
            if (err !== null) {
              throw err;
            }
            parser = new xml2js.Parser();
            parser.parseString(res.text, function(err, result) {
              result.entry.title[0].should.be.ok;
              result.entry.content[0].should.not.equal(0);
              return result.entry.id[0].should.be.ok;
            });
            return done();
          });
        });
      });
      return after(function(done) {
        return blog.deletePost(id, function() {
          return done();
        });
      });
    });
    describe('DELETE /api/atom/entries/:id', function() {
      var expected, id;
      expected = 'test post';
      id = '';
      before(function(done) {
        var promise,
          _this = this;
        promise = blog.createPost({
          title: expected,
          author: 'Mehfuz Hossain',
          body: 'Empty body'
        });
        return promise.then(function(result) {
          id = result._id;
          return done();
        });
      });
      it('should return 401 for unauthorized request', function(done) {
        var req;
        req = request.del(util.format('/api/atom/entries/%s', id));
        return req.expect(401).end(function(err, res) {
          if (err !== null) {
            throw err;
          }
          return done();
        });
      });
      return it('should return expected for authorized request', function(done) {
        var req;
        req = request.del(util.format('/api/atom/entries/%s', id));
        req = req.set('authorization', util.format('Basic %s', new Buffer(credentials).toString('base64')));
        return req.expect(200).end(function(err, res) {
          if (err !== null) {
            throw err;
          }
          return done();
        });
      });
    });
    return describe('POST /api/atom/images', function() {
      it('should return 201 for successful upload', function(done) {
        var req;
        req = request.post('/api/atom/images');
        req.set('slug', 'logo.png');
        req.set('content-type', 'image/png');
        req.set('authorization', util.format('Basic %s', new Buffer(credentials).toString('base64')));
        return fs.readFile(__dirname + '/../public/logo.png', function(err, result) {
          if (err !== null) {
            throw err;
          }
          req.write(result);
          return req.expect(201).end(function(err, result) {
            var parser;
            parser = new xml2js.Parser();
            return parser.parseString(result.text, function(err, result) {
              var imageUrl, slug;
              slug = 'logo.png';
              result.entry.title[0].should.equal(slug);
              result.entry.content[0].$.type.should.equal('image/png');
              imageUrl = util.format('http://%s/images/%s', req.host, helper.linkify(slug));
              result.entry.content[0].$.src.should.equal(imageUrl);
              result.entry.summary[0].should.equal(slug);
              return done();
            });
          });
        });
      });
      return after(function(done) {
        var url;
        url = helper.linkify('logo.png');
        return media.remove(url, function() {
          return done();
        });
      });
    });
  });

}).call(this);


text:
DROP FUNCTION IF EXISTS check_form_exists(TEXT, TEXT);

CREATE FUNCTION check_form_exists(form_id TEXT, domain_name TEXT DEFAULT NULL, form_exists OUT BOOLEAN) AS $$
    CLUSTER '{{ PL_PROXY_CLUSTER_NAME }}';
    RUN ON hash_string(form_id, 'siphash24');
$$ LANGUAGE plproxy;


text:
class DLLIMPEXP CEOSAICombatUnitType
{
	public:
		CEOSAICombatUnitType();

	//	void Serialize( CEOSAISerial* pSerial );
	//	void Deserialize( CEOSAISerial* pSerial );
		//void AppendDataToXMLString( CStringANSI8& strData );
	//	void ReadXMLData( CBCXMLItem* pXMLItem );

		float GetDefenseMult( long iTerrain ){ return m_DefensiveValueMultiplier.m_fTerrainValue[ iTerrain ]; }
		//float GetDefenseMultiplier( bool bInFort, bool bEntrenched, long iUnderlyingTerrain );

		//bool      HasAColor();
		//CGLColor  GetColor();

		long    m_iCombatUnitType;
		CString m_strExternalName;

		bool    m_bCanBlockAndBeBlocked;
		long    m_iDrawOrder;
		float   m_fFortificationDefenseMultiplier;

		long    m_iLandedOrDockedCombatType;
		CString m_strLandedOrDockedCombatType_Old; // used for backward compatibility

		//float   m_fLandedOrDockedMultiplier;
		float   m_fEntrenchedDefenseMultiplierBonus;

		//CString m_strColor;

		CEOSAITerrainBasedValue  m_DefensiveValueMultiplier;
};


text:
@interface SBInstructions : NVRenderable {
 @private
    REQUIRES(NVTransformable, _transform);
    REQUIRES(SBInstructionsController, _controller);
}

@end


text:
import numpy as np
import matplotlib.pyplot as plt
import reconstruct
import pdb

def padArrays(imglist):
    """
    Pad arrays with a border of 100s, which the reconstructor
    function interprets as NaNs
    """
    outimg = []
    for i in imglist:
        sh = np.shape(i)
        temp = np.zeros((sh[0]+2,sh[1]+2),order='F')+100.
        temp[1:-1,1:-1] = i
        outimg.append(temp)

    return outimg

def southwell(gx,gy,criteria,h,maxiter=10000):
    """
    Take 2D x and y gradient arrays and perform Southwell reconstruction.
    If RMS difference in slope from one iteration to the next falls below
    criteria, then algorithm stops
    gx and gy should be in units of slope (rise/run)
    h is in units of step size (e.g. lenslet width)
    """
    #Handle missing data
    ind = np.logical_or(np.isnan(gx),np.isnan(gy))
    gx[ind] = 100.
    gy[ind] = 100.
    #Create phase object
    phase = np.zeros(np.shape(gx),order='F')
    phase[ind] = 100.
    #Pad arrays
    phase,gx,gy = padArrays([phase,gx,gy])
    #Send through reconstructor
    reconstruct.reconstruct(gx,gy,1e-10,1.,phase,maxiter)
    #Strip off border
    phase = phase[1:-1,1:-1]
    #Handle missing data
    phase[ind] = np.nan
    #Return inverse due to reconstructor sign convention
    return -phase

def example():
    """
    Example of how the reconstructor works
    """
    #Create test image
    xg,yg = np.meshgrid(np.linspace(-1,1,100),np.linspace(-1,1,100))
    img = np.polynomial.legendre.legval2d(xg,yg,[[0,1,0],[0,.5,0],[1,0,0]])
    #Take gradients
    gx,gy = np.gradient(img)
    #Create a boundary region
    rad = np.sqrt(xg**2+yg**2)
    img[rad>1] = np.nan
    gx[rad>1] = np.nan
    gy[rad>1] = np.nan
    #Reconstruct wavefront
    recon = southwell(gx,gy,1e-12,1.)

    #Plot results
    fig = plt.figure()
    fig.add_subplot(1,3,1)
    plt.imshow(img)
    plt.title('Original')
    plt.colorbar()
    fig.add_subplot(1,3,2)
    plt.imshow(recon)
    plt.title('Reconstructed')
    plt.colorbar()
    fig.add_subplot(1,3,3)
    plt.imshow(img-recon)
    plt.title('Residual')
    plt.colorbar()
    return recon


text:
title: "The Fall of Byron Montrose: Poet, Gentleman, Lover"
playwright: Ben Macpherson
season: StuFF
season_sort: 530
period: Spring
venue: New Theatre
date_start: 2018-06-17

crew_incomplete: false

cast:
- role: Byron Montrose
  name: Ben Macpherson

crew:
- role: Director
  name: Ben Macpherson
- role: Venue Technician
  name: Nathan
- role: Technical Operator
  name: Florence Bell

assets:
- type: poster
  image: Fv8d7dc

prod_shots: J8Qxj3
---

Blackadder meets Milton Jones. Pun filled comedy story telling with breaks for bad poetry. The sellout Edinburgh Fringe show returns to Nottingham New Theatre after touring the UK. Byron Montrose is disinherited, exiled and just can't quit the opium. Hear his adventures as he drifts around Europe in search of love, lust and laudanum. "Full of cheek and charm" Sabotage reviews "like a Spike Milligan book ... delightfully different."  Notts comedy review.  It's silly witty and just a little bit naughty.


text:
{% extends "admin/default-form.html" %}

{% block title %}Base Template{% endblock %}
{% block description %}

The following menu items are registered

    {% for item in main_menu_items() %}

{{ '%s' % (item.url, item.display_name) }}

    {% endfor %}

    The menu items can be looped over using function main_menu_items().
    Every item is an object with two attributes: url and display_name.

{% endblock %}

{% block get_endpoint %}{{ url_for('.template_json') }}{% endblock%}
{% block set_endpoint %}{{ url_for('.template_json') }}{% endblock%}


text:
<?php
$this->breadcrumbs = array(
    'Rights' => Rights::getBaseUrl(),
    Rights::t('core', 'Assignments'),
);
?>

 Administración: Asignaciones

         Asignaciones
         Perfiles
         Tareas
         Operaciones

Listado de Asignaciones de Usuario

        <?php echo Rights::t('core', 'Here you can view which permissions has been assigned to each user.'); ?>

    <?php
    $this->widget('bootstrap.widgets.TbGridView', array(
        'dataProvider' => $dataProvider,
        'itemsCssClass' => 'table table-bordered table-striped dataTable no-footer',
        'pager' => array(
            'class' => 'bootstrap.widgets.TbPager',
            'nextPageLabel' => '>>',
            'prevPageLabel' => '<<'
        ),
        'template' => "{items}\n{pager}",
        'emptyText' => Rights::t('core', 'No users found.'),
        'htmlOptions' => array('class' => 'grid-view assignment-table'),
        'columns' => array(
            array(
                'name' => 'name',
                'header' => Rights::t('core', 'Name'),
                'type' => 'raw',
                'htmlOptions' => array('class' => 'name-column'),
                'value' => '$data->getAssignmentNameLink()',
            ),
            array(
                'name' => 'assignments',
                'header' => Rights::t('core', 'Perfiles'),
                'type' => 'raw',
                'htmlOptions' => array('class' => 'role-column'),
                'value' => '$data->getAssignmentsText(CAuthItem::TYPE_ROLE)',
            ),
            array(
                'name' => 'assignments',
                'header' => Rights::t('core', 'Tasks'),
                'type' => 'raw',
                'htmlOptions' => array('class' => 'task-column'),
                'value' => '$data->getAssignmentsText(CAuthItem::TYPE_TASK)',
            ),
            array(
                'name' => 'assignments',
                'header' => Rights::t('core', 'Operations'),
                'type' => 'raw',
                'htmlOptions' => array('class' => 'operation-column'),
                'value' => '$data->getAssignmentsText(CAuthItem::TYPE_OPERATION)',
            ),
        )
    ));
    ?>


text:
<include file="./Common:header" />
    <import type="css" file="Home.css.project_center" />
    <import type="css" file="Home.css.pd_auto_response" />
    <import type="css" file="Home.css.custom_menu" />

<include file="./Common:top_navbar" />

        <include file="./Common:project_sidebar_wrap" />

{$GLOBAL_INFO.app_info.app_name}

                                    <volist name="menu" id="main_menu">

                                            {$main_menu.name}

                                                    <volist name="main_menu.sub_button" id="children_menu">

{$children_menu.name}

                                                    </volist>

+

                                    </volist>

                                        +

工作日志

                                        删除菜单

                                        已添加子菜单,仅可设置菜单名称

                                            菜单名称

											<input type="text" class="frm_input js_menu_name" onkeyup="this.value=this.value.replace(/[, ]/g,'')">

字数超过上限

请输入菜单名称

字数不超过4个汉字或8个字母

                                            菜单内容

                                        <select class="select_menu_active form-control">
                                            <option value="media_id">发送多媒体信息</option>
                                            <option value="view">跳转链接</option>
                                            <option value="click">发送文本信息</option>
                                            <option value="scancode_push">调用扫一扫工具</option>
                                        </select>

                                             图片

                                             语音

                                             视频

                                             图文

从素材库选择

上传

从素材库选择

本地上传

从素材库选择

本地上传

从素材库选择

新建图文

                                    <form action="">

订阅者点击该子菜单会跳到以下链接

                                            页面地址

                                                    <input type="text" class="frm_input mes" id="urlText" name="urlText">

                                                    来自 -《》

                                    </form>

                                        <textarea class="textarea" name="response_content"></textarea>

                                    <button type="button" class="btn btn-default btn-success open">   保存   </button>

                <button type="button" class="btn btn-default btn-success update">   保存   </button>
                <button type="button" class="btn btn-default btn-danger delete">  删除  </button>

                <button type="button" class="close" data-dismiss="modal">×Close</button>

提示

最多创建五个子菜单

                <button type="button" class="btn btn-primary" data-dismiss="modal">关闭</button>

<include file="./Common:project_hidden_nav" />

                                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>

                                    选择图片

                                    加载更多…

                                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button> <button data-type="ensure" class="btn btn-primary disabled determine">确定</button>

                                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>

                                    选择语音

                                加载更多…

                                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button> <button data-type="ensure" class="btn btn-primary determine disabled">确定</button>

                                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>

                                    选择视频

                                加载更多…

                                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button> <button data-type="ensure" class="btn btn-primary determine disabled">确定</button>

                                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>

                                    选择图文

                                加载更多…

                                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button> <button data-type="ensure" class="btn btn-primary disabled determine">确定</button>

                                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>

                                    添加视频

                                        标题<input type="text" class="form-control" name="title" id="title" />

                                        视频描述<input type="text" class="form-control" name="introduction" id="introduction" />

                                        视频文件<input type="file"  name="file" id="video_file" />

                                            视频不能超过20M,超过20M的视频可至 腾讯视频上传后添加,也可通过添加视频详情页链接以及公众号文章链接插入视频,视频时长不少于1秒,不多于10小时,支持大部分主流视频格式

                                        <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button> <button class="btn btn-primary" id="add_video">保存</button>

从素材库选择

上传

<include file="./Common:footer" />

<input class="hidden" type="file" id="file"/>

    <include file="./Common:bottom_js" />
    <import type='js' file="Home.js.project_center" />
    <import type="js" file="Home.js.pd_custom_menu" />
    <import type="js" file="Home.js.pd_auto_response" />


text:
'use strict';

import mongoose from 'mongoose';

const supportSchema = new mongoose.Schema({
  toId: {
    type: mongoose.Schema.Types.ObjectId,
    required: true,
    index: true,
  },
  fromId: {
    type: mongoose.Schema.Types.ObjectId,
    required: true,
    index: true,
  },
});

export default mongoose.model('Support', supportSchema);


text:
import Joi from 'joi';

export default {
  // POST /api/users
  createUser: {
    body: {
      username: Joi.string().required(),
      password: Joi.string().required()
    }
  },

  // UPDATE /api/users/:userId
  updateUser: {
    body: {
      username: Joi.string().required(),
      mobileNumber: Joi.string().regex(/^[1-9][0-9]{9}$/).required()
    },
    params: {
      userId: Joi.string().hex().required()
    }
  },

  // POST /api/auth/login
  login: {
    body: {
      username: Joi.string().required(),
      password: Joi.string().required()
    }
  }
};


text:
(function () {
  'use strict';

  angular
    .module('reports')
    .run(menuConfig);

  menuConfig.$inject = ['Menus'];

  function menuConfig(menuService) {
    // Set top bar menu items
    menuService.addMenuItem('topbar', {
      title: 'Reports',
      state: 'reports',
      type: 'dropdown',
      roles: ['*']
    });

    // Add the dropdown list item
    menuService.addSubMenuItem('topbar', 'reports', {
      title: 'List Reports',
      state: 'reports.list'
    });

    // Add the dropdown create item
    menuService.addSubMenuItem('topbar', 'reports', {
      title: 'Create Report',
      state: 'reports.create',
      roles: ['user']
    });
  }
}());


text:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent">
    <android.support.v7.widget.RecyclerView
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:id="@+id/recyclerView_wechat"
        >
    </android.support.v7.widget.RecyclerView>
</LinearLayout>


text:
{{--

The MIT License (MIT)

SMARTGoalz - SMART Goals made easier

http://smartgoalz.github.io

Copyright (c) 2015 Prashant Shah <pshah.smartgoalz@gmail.com>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

--}}

@extends('layouts.master')

@section('head')

@stop

@section('breadcrumb-title', 'Timetables')

@section('page-title', 'Manage Timetable')

@section('content')

        {{ HTML::linkAction('ActivitiesController@getCreate', 'Add Activity', array(),
                array('class' => 'btn btn-primary')) }}

        {{ HTML::linkAction('TimetablesController@getIndex', 'Back', array(),
                array('class' => 'btn btn-info')) }}

All Activities

Sunday

Monday

Tuesday

Wednesday

Thursday

Friday

Saturday

All Activities

                @if ($activities->count() < 1)

No activities found. Please add one to get started.

                @else

				#
				Activity
				Actions

                        @define $c = 1
                        @foreach ($activities as $activity)

				{{ $c }}
				{{ $activity->title }}

                                        {{ HTML::linkAction('TimetablesController@getSchedule', 'Schedule', array($activity->id)) }}

                                        {{ HTML::linkAction('ActivitiesController@getEdit', 'Edit', array($activity->id)) }}

                                        {{ HTML::decode(HTML::linkAction(
                                                'ActivitiesController@deleteDestroy',
                                                '',
                                                array($activity->id),
                                                array(
                                                        'class' => '',
                                                        'data-method' => 'DELETE',
                                                        'data-confirm' => 'Are you sure you want to delete the activity ?'
                                                ))) }}

                        @define $c = $c + 1
                        @endforeach

                @endif

        @define $weekdays = array('SUNDAY','MONDAY','TUESDAY','WEDNESDAY','THURSDAY','FRIDAY','SATURDAY');
        @foreach ($weekdays as $weekday)

Timetable for {{ ucfirst(strtolower($weekday)) }}

                @if (!isset($timetable[$weekday]))

No schedule found. Please add one to get started.

                @else

				#
				Activity
                                From time
                                To time

                        @define $c = 1
                        @foreach ($timetable[$weekday] as $activity)

				{{ $c }}
				{{ $activity['title'] }}
                                {{ date_format(date_create_from_format('H:i:s', $activity['from_time']), 'H:i A') }}
                                {{ date_format(date_create_from_format('H:i:s', $activity['to_time']), 'H:i A') }}

                        @define $c = $c + 1
                        @endforeach

                @endif

        @endforeach

@stop


text:
package io.perfmark.agent;

import org.objectweb.asm.AnnotationVisitor;
import org.objectweb.asm.Attribute;
import org.objectweb.asm.Label;
import org.objectweb.asm.MethodVisitor;
import org.objectweb.asm.Opcodes;
import org.objectweb.asm.TypePath;

/**
 * This class records the "header" portion of the method visitor.
 */
class MethodVisitorRecorder extends MethodVisitor {

  private final int VISIT_PARAMETER = 1;
  private final int VISIT_ANNOTATION_DEFAULT = 2;

  private final int ANNOTATION_VISIT = 3;
  private final int ANNOTATION_VISIT_ENUM = 4;
  private final int ANNOTATION_VISIT_ANNOTATION = 5;
  private final int ANNOTATION_VISIT_ARRAY = 6;
  private final int ANNOTATION_VISIT_END = 7;

  private final int VISIT_ANNOTATION = 8;
  private final int VISIT_ANNOTABLE_PARAMETER_COUNT = 9;
  private final int VISIT_PARAMETER_ANNOTATION = 10;
  private final int VISIT_TYPE_ANNOTATION = 11;
  private final int VISIT_ATTRIBUTE = 12;

  private final AnnotationVisitorRecorder annotationVisitorRecorder = new AnnotationVisitorRecorder(null);

  private int opsWidx;
  private int intsWidx;
  private int stringsWidx;
  private int objectsWidx;
  private int booleansWidx;

  private int[] ops = new int[0];
  private String[] strings = new String[0];
  private int[] ints = new int[0];
  private Object[] objects = new Object[0];
  private boolean[] booleans = new boolean[0];

  int firstLine = -1;
  int lastLine = -1;

  MethodVisitorRecorder(MethodVisitor delegate) {
    // Have to pin to a specific version, since the method invocations may be different in a later release
    super(Opcodes.ASM9, delegate);
  }

  /*
   * Docs for Method Visitor Say:
   *
   * A visitor to visit a Java method. The methods of this class must be called in the following order:
   * ( visitParameter )*
   * [ visitAnnotationDefault ]
   * ( visitAnnotation | visitAnnotableParameterCount | visitParameterAnnotation visitTypeAnnotation | visitAttribute )*
   * [ visitCode (
   *     visitFrame | visitXInsn | visitLabel | visitInsnAnnotation | visitTryCatchBlock
   *         | visitTryCatchAnnotation | visitLocalVariable | visitLocalVariableAnnotation | visitLineNumber )*
   *     visitMaxs ]
   * visitEnd.
   *
   *
   * In addition, the visitXInsn and visitLabel methods must be called in the sequential order of the bytecode
   * instructions of the visited code, visitInsnAnnotation must be called after the annotated instruction,
   *  visitTryCatchBlock must be called before the labels passed as arguments have been visited,
   * visitTryCatchBlockAnnotation must be called after the corresponding try catch block has been visited, and the
   * visitLocalVariable, visitLocalVariableAnnotation and visitLineNumber methods must be called after the labels passed
   * as arguments have been visited.
   */

  @Override
  public final void visitParameter(String name, int access) {
    addOp(VISIT_PARAMETER);
    addString(name);
    addInt(access);
    super.visitParameter(name, access);
  }

  @Override
  public final AnnotationVisitor visitAnnotationDefault() {
    addOp(VISIT_ANNOTATION_DEFAULT);
    if (mv == null) {
      return annotationVisitorRecorder;
    }
    return new AnnotationVisitorRecorder(super.visitAnnotationDefault());
  }

  @Override
  public final AnnotationVisitor visitAnnotation(String descriptor, boolean visible) {
    addOp(VISIT_ANNOTATION);
    addString(descriptor);
    addBoolean(visible);
    if (mv == null) {
      return annotationVisitorRecorder;
    }
    return new AnnotationVisitorRecorder(super.visitAnnotation(descriptor, visible));
  }

  @Override
  public final void visitAnnotableParameterCount(int parameterCount, boolean visible) {
    addOp(VISIT_ANNOTABLE_PARAMETER_COUNT);
    addInt(parameterCount);
    addBoolean(visible);
    super.visitAnnotableParameterCount(parameterCount, visible);
  }

  @Override
  public final AnnotationVisitor visitParameterAnnotation(int parameter, String descriptor, boolean visible) {
    addOp(VISIT_PARAMETER_ANNOTATION);
    addInt(parameter);
    addString(descriptor);
    addBoolean(visible);
    if (mv == null) {
      return annotationVisitorRecorder;
    }
    return new AnnotationVisitorRecorder(super.visitParameterAnnotation(parameter, descriptor, visible));
  }

  @Override
  public final AnnotationVisitor visitTypeAnnotation(
      int typeRef, TypePath typePath, String descriptor, boolean visible) {
    addOp(VISIT_TYPE_ANNOTATION);
    addInt(typeRef);
    addObject(typePath);
    addString(descriptor);
    addBoolean(visible);
    if (mv == null) {
      return annotationVisitorRecorder;
    }
    return new AnnotationVisitorRecorder(super.visitTypeAnnotation(typeRef, typePath, descriptor, visible));
  }

  @Override
  public final void visitAttribute(Attribute attribute) {
    addOp(VISIT_ATTRIBUTE);
    addObject(attribute);
    super.visitAttribute(attribute);
  }

  @Override
  public final void visitLineNumber(int line, Label start) {
    if (firstLine == -1) {
      firstLine = line;
    }
    lastLine = line;
    super.visitLineNumber(line, start);
  }

  final void replay() {
    if (mv != null) {
      replay(mv);
    }
  }

  final void replay(MethodVisitor delegate) {
    if (delegate == null) {
      return;
    }
    int stringsRidx = 0;
    int intsRidx = 0;
    int objectsRidx = 0;
    int booleansRidx = 0;
    int annoWidx = 0;
    AnnotationVisitor[] visitorStack = new AnnotationVisitor[0];
    for (int opsRidx = 0; opsRidx < opsWidx; opsRidx++) {
      int op = ops[opsRidx];
      switch (op) {
        case VISIT_PARAMETER: {
          String name = getString(stringsRidx++);
          int access = getInt(intsRidx++);
          delegate.visitParameter(name, access);
          break;
        }
        case VISIT_ANNOTATION_DEFAULT: {
          AnnotationVisitor visitor = delegate.visitAnnotationDefault();
          visitorStack = addAnnotationVisitor(visitorStack, annoWidx++, visitor);
          break;
        }
        case ANNOTATION_VISIT: {
          AnnotationVisitor currentVisitor = visitorStack[annoWidx - 1];
          String name = getString(stringsRidx++);
          Object value = getObject(objectsRidx++);
          if (currentVisitor != null) {
            currentVisitor.visit(name, value);
          }
          break;
        }
        case ANNOTATION_VISIT_ENUM: {
          AnnotationVisitor currentVisitor = visitorStack[annoWidx - 1];
          String name = getString(stringsRidx++);
          String descriptor = getString(stringsRidx++);
          String value = getString(stringsRidx++);
          if (currentVisitor != null) {
            currentVisitor.visitEnum(name, descriptor, value);
          }
          break;
        }
        case ANNOTATION_VISIT_ANNOTATION: {
          AnnotationVisitor currentVisitor = visitorStack[annoWidx - 1];
          String name = getString(stringsRidx++);
          String descriptor = getString(stringsRidx++);
          AnnotationVisitor newVisitor = null;
          if (currentVisitor != null) {
            newVisitor = currentVisitor.visitAnnotation(name, descriptor);
          }
          visitorStack = addAnnotationVisitor(visitorStack, annoWidx++, newVisitor);
          break;
        }
        case ANNOTATION_VISIT_ARRAY: {
          AnnotationVisitor currentVisitor = visitorStack[annoWidx - 1];
          String name = getString(stringsRidx++);
          AnnotationVisitor newVisitor = null;
          if (currentVisitor != null) {
            newVisitor = currentVisitor.visitArray(name);
          }
          visitorStack = addAnnotationVisitor(visitorStack, annoWidx++, newVisitor);
          break;
        }
        case ANNOTATION_VISIT_END: {
          AnnotationVisitor currentVisitor = visitorStack[annoWidx - 1];
          visitorStack[--annoWidx] = null;
          if (currentVisitor != null) {
            currentVisitor.visitEnd();
          }
          break;
        }
        case VISIT_ANNOTATION: {
          String descriptor = getString(stringsRidx++);
          boolean visible = getBoolean(booleansRidx++);
          AnnotationVisitor newVisitor = delegate.visitAnnotation(descriptor, visible);
          visitorStack = addAnnotationVisitor(visitorStack, annoWidx++, newVisitor);
          break;
        }
        case VISIT_ANNOTABLE_PARAMETER_COUNT: {
          int parameterCount = getInt(intsRidx++);
          boolean visible = getBoolean(booleansRidx++);
          delegate.visitAnnotableParameterCount(parameterCount, visible);
          break;
        }
        case VISIT_PARAMETER_ANNOTATION: {
          int parameter = getInt(intsRidx++);
          String descriptor = getString(stringsRidx++);
          boolean visible = getBoolean(booleansRidx++);
          AnnotationVisitor newVisitor = delegate.visitParameterAnnotation(parameter, descriptor, visible);
          visitorStack = addAnnotationVisitor(visitorStack, annoWidx++, newVisitor);
          break;
        }
        case VISIT_TYPE_ANNOTATION: {
          // (int typeRef, TypePath typePath, String descriptor, boolean visible)
          int typeRef = getInt(intsRidx++);
          TypePath typePath = (TypePath) getObject(objectsRidx++);
          String descriptor = getString(stringsRidx++);
          boolean visible = getBoolean(booleansRidx++);
          AnnotationVisitor newVisitor = delegate.visitTypeAnnotation(typeRef, typePath, descriptor, visible);
          visitorStack = addAnnotationVisitor(visitorStack, annoWidx++, newVisitor);
          break;
        }
        case VISIT_ATTRIBUTE: {
          Attribute attribute = (Attribute) getObject(objectsRidx++);
          delegate.visitAttribute(attribute);
          break;
        }
        default:
          throw new AssertionError("Bad op " + op);
      }
    }
  }

  private void addOp(int op) {
    ops = addInt(ops, opsWidx++, op);
  }

  private void addInt(int value) {
    ints = addInt(ints, intsWidx++, value);
  }

  private static int[] addInt(int[] dest, int pos, int value) {
    if (dest.length == pos){
      int[] newDest = new int[1 + dest.length * 2];
      System.arraycopy(dest, 0, newDest, 0, dest.length);
      dest = newDest;
    }
    dest[pos] = value;
    return dest;
  }

  private void addString(String value) {
    strings = addString(strings, stringsWidx++, value);
  }

  private static String[] addString(String[] dest, int pos, String value) {
    if (dest.length == pos){
      String[] newDest = new String[1 + dest.length * 2];
      System.arraycopy(dest, 0, newDest, 0, dest.length);
      dest = newDest;
    }
    dest[pos] = value;
    return dest;
  }

  private void addObject(Object value) {
    objects = addObject(objects, objectsWidx++, value);
  }

  private static Object[] addObject(Object[] dest, int pos, Object value) {
    if (dest.length == pos){
      Object[] newDest = new Object[1 + dest.length * 2];
      System.arraycopy(dest, 0, newDest, 0, dest.length);
      dest = newDest;
    }
    dest[pos] = value;
    return dest;
  }

  private void addBoolean(boolean value) {
    booleans = addBoolean(booleans, booleansWidx++, value);
  }

  private static boolean[] addBoolean(boolean[] dest, int pos, boolean value) {
    if (dest.length == pos){
      boolean[] newDest = new boolean[1 + dest.length * 2];
      System.arraycopy(dest, 0, newDest, 0, dest.length);
      dest = newDest;
    }
    dest[pos] = value;
    return dest;
  }

  private static AnnotationVisitor[] addAnnotationVisitor(AnnotationVisitor[] dest, int pos, AnnotationVisitor value) {
    if (dest.length == pos){
      AnnotationVisitor[] newDest = new AnnotationVisitor[1 + dest.length * 2];
      System.arraycopy(dest, 0, newDest, 0, dest.length);
      dest = newDest;
    }
    dest[pos] = value;
    return dest;
  }

  private int getInt(int ridx) {
    assert ridx < intsWidx;
    return ints[ridx];
  }

  private String getString(int ridx) {
    assert ridx < stringsWidx;
    return strings[ridx];
  }

  private Object getObject(int ridx) {
    assert ridx < objectsWidx;
    return objects[ridx];
  }

  private boolean getBoolean(int ridx) {
    assert ridx < booleansWidx;
    return booleans[ridx];
  }

  private final class AnnotationVisitorRecorder extends AnnotationVisitor {

    AnnotationVisitorRecorder(AnnotationVisitor delegate) {
      super(MethodVisitorRecorder.this.api, delegate);
    }

    /*
     * Docs for AnnotationVisitor say
     *
     * A visitor to visit a Java annotation. The methods of this class must be called in the following order:
     * ( visit | visitEnum | visitAnnotation | visitArray )* visitEnd.
     */

    @Override
    public void visit(String name, Object value) {
      addOp(ANNOTATION_VISIT);
      addString(name);
      addObject(value);
      super.visit(name, value);
    }

    @Override
    public void visitEnum(String name, String descriptor, String value) {
      addOp(ANNOTATION_VISIT_ENUM);
      addString(name);
      addString(descriptor);
      addString(value);
      super.visitEnum(name, descriptor, value);
    }

    @Override
    public AnnotationVisitor visitAnnotation(String name, String descriptor) {
      addOp(ANNOTATION_VISIT_ANNOTATION);
      addString(name);
      addString(descriptor);
      if (av == null) {
        return this;
      }
      return new AnnotationVisitorRecorder(super.visitAnnotation(name, descriptor));
    }

    @Override
    public AnnotationVisitor visitArray(String name) {
      addOp(ANNOTATION_VISIT_ARRAY);
      addString(name);
      if (av == null) {
        return this;
      }
      return new AnnotationVisitorRecorder(super.visitArray(name));
    }

    @Override
    public void visitEnd() {
      addOp(ANNOTATION_VISIT_END);
      super.visitEnd();
    }
  }
}


text:
package org.apache.drill.exec.compile;

import java.io.IOException;
import java.util.Collection;
import java.util.Collections;
import java.util.Map;

import javax.tools.DiagnosticListener;
import javax.tools.JavaCompiler;
import javax.tools.JavaCompiler.CompilationTask;
import javax.tools.JavaFileManager;
import javax.tools.JavaFileObject;
import javax.tools.ToolProvider;

import org.apache.drill.exec.compile.ClassTransformer.ClassNames;
import org.codehaus.commons.compiler.CompileException;

import org.apache.drill.shaded.guava.com.google.common.base.Charsets;
import org.apache.drill.shaded.guava.com.google.common.collect.Lists;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

class JDKClassCompiler extends AbstractClassCompiler {
  private static final Logger logger = LoggerFactory.getLogger(JDKClassCompiler.class);

  private final Collection<String> compilerOptions;
  private final DiagnosticListener<JavaFileObject> listener;
  private final JavaCompiler compiler;
  private final ClassLoader classLoader;

  private JDKClassCompiler(JavaCompiler compiler, ClassLoader classLoader, boolean debug) {
    super(debug);
    this.compiler = compiler;
    this.listener = new DrillDiagnosticListener();
    this.classLoader = classLoader;
    this.compilerOptions = Lists.newArrayList(this.debug ? "-g:source,lines,vars" : "-g:none");
  }

  public static JDKClassCompiler newInstance(ClassLoader classLoader, boolean debug) {
    JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
    if (compiler == null) {
      throw new RuntimeException("JDK Java compiler not available - probably you're running Drill with a JRE and not a JDK");
    }
    return new JDKClassCompiler(compiler, classLoader, debug);
  }

  @Override
  protected byte[][] getByteCode(final ClassNames className, final String sourceCode)
      throws CompileException, IOException, ClassNotFoundException {
    return doCompile(className, sourceCode).getByteCode();
  }

  @Override
  public Map<String, byte[]> compile(final ClassNames className, final String sourceCode)
      throws CompileException, IOException, ClassNotFoundException {
    return doCompile(className, sourceCode).getClassByteCodes();
  }

  private DrillJavaFileObject doCompile(final ClassNames className, final String sourceCode)
      throws CompileException, IOException, ClassNotFoundException {
    // JavaFileManager should be closed after its usage to release all resources opened by this file manager
    try (JavaFileManager fileManager = new DrillJavaFileManager(compiler.getStandardFileManager(listener, null, Charsets.UTF_8), classLoader)) {
      // Create one Java source file in memory, which will be compiled later.
      DrillJavaFileObject compilationUnit = new DrillJavaFileObject(className.dot, sourceCode);

      CompilationTask task = compiler.getTask(null, fileManager, listener, compilerOptions, null, Collections.singleton(compilationUnit));

      // Run the compiler.
      if (!task.call()) {
        throw new CompileException("Compilation failed", null);
      } else if (!compilationUnit.isCompiled()) {
        throw new ClassNotFoundException(className + ": Class file not created by compilation.");
      }
      // all good
      return compilationUnit;
    } catch (RuntimeException rte) {
      // Unwrap the compilation exception and throw it.
      Throwable cause = rte.getCause();
      if (cause != null) {
        cause = cause.getCause();
        if (cause instanceof CompileException) {
          throw (CompileException) cause;
        }
        if (cause instanceof IOException) {
          throw (IOException) cause;
        }
      }
      throw rte;
    }
  }

  @Override
  protected Logger getLogger() {
    return logger;
  }
}


text:
' Copyright (c) Microsoft.  All Rights Reserved.  Licensed under the Apache License, Version 2.0.  See License.txt in the project root for license information.

Imports Microsoft.CodeAnalysis.CodeFixes
Imports Microsoft.CodeAnalysis.Diagnostics
Imports Microsoft.CodeAnalysis.Editor.VisualBasic.UnitTests.Diagnostics
Imports Microsoft.CodeAnalysis.VisualBasic.RemoveUnusedParametersAndValues

Namespace Microsoft.CodeAnalysis.Editor.VisualBasic.UnitTests.RemoveUnusedParametersAndValues
    Public Class RemoveUnusedParametersTests
        Inherits AbstractVisualBasicDiagnosticProviderBasedUserDiagnosticTest
        Friend Overrides Function CreateDiagnosticProviderAndFixer(workspace As Workspace) As (DiagnosticAnalyzer, CodeFixProvider)
            Return (New VisualBasicRemoveUnusedParametersAndValuesDiagnosticAnalyzer(), New VisualBasicRemoveUnusedValuesCodeFixProvider())
        End Function

        ' Ensure that we explicitly test missing UnusedParameterDiagnosticId, which has no corresponding code fix (non-fixable diagnostic).
        Private Overloads Function TestDiagnosticMissingAsync(initialMarkup As String) As Task
            Return TestDiagnosticMissingAsync(initialMarkup, New TestParameters(retainNonFixableDiagnostics:=True))
        End Function

        Private Shared Function Diagnostic(id As String) As DiagnosticDescription
            Return TestHelpers.Diagnostic(id)
        End Function

        <Fact, Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnusedParameters)>
        Public Async Function Parameter_Used() As Task
            Await TestDiagnosticMissingAsync(
$"Class C
    Sub M([|p|] As Integer)
        Dim x = p
    End Sub
End Class")
        End Function

        <Fact, Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnusedParameters)>
        Public Async Function Parameter_Unused() As Task
            Await TestDiagnosticsAsync(
$"Class C
    Sub M([|p|] As Integer)
    End Sub
End Class", parameters:=Nothing,
            Diagnostic(IDEDiagnosticIds.UnusedParameterDiagnosticId))
        End Function

        <Fact, Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnusedParameters)>
        Public Async Function Parameter_WrittenOnly() As Task
            Await TestDiagnosticsAsync(
$"Class C
    Sub M([|p|] As Integer)
        p = 1
    End Sub
End Class", parameters:=Nothing,
            Diagnostic(IDEDiagnosticIds.UnusedParameterDiagnosticId))
        End Function

        <Fact, Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnusedParameters)>
        Public Async Function Parameter_WrittenThenRead() As Task
            Await TestDiagnosticsAsync(
$"Class C
    Function M([|p|] As Integer) As Integer
        p = 1
        Return p
    End Function
End Class", parameters:=Nothing,
            Diagnostic(IDEDiagnosticIds.UnusedParameterDiagnosticId))
        End Function

        <Fact, Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnusedParameters)>
        Public Async Function ParameterOfMethodThatHandlesEvent() As Task
            Await TestDiagnosticMissingAsync(
$"Public Class C
    Public Event E(p As Integer)
    Dim WithEvents field As New C

    Public Sub M([|p|] As Integer) Handles field.E
    End Sub
End Class")
        End Function

        <Fact, Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnusedParameters)>
        Public Async Function Parameter_ConditionalDirective() As Task
            Await TestDiagnosticMissingAsync(
$"Public Class C
    Public Sub M([|p|] As Integer)
#If DEBUG Then
        System.Console.WriteLine(p)
#End If
    End Sub
End Class")
        End Function

        <WorkItem(32851, "https://github.com/dotnet/roslyn/issues/32851")>
        <Fact, Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnusedParameters)>
        Public Async Function Parameter_Unused_SpecialNames() As Task
            Await TestDiagnosticMissingAsync(
$"Class C
    [|Sub M(_0 As Integer, _1 As Char, _3 As C)|]
    End Sub
End Class")
        End Function

        <WorkItem(36816, "https://github.com/dotnet/roslyn/issues/36816")>
        <Fact, Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnusedParameters)>
        Public Async Function PartialMethodParameter_NoDiagnostic() As Task
            Await TestDiagnosticMissingAsync(
$"Class C
    [|Partial Private Sub M(str As String)|]
    End Sub
End Class

Partial Class C
    Private Sub M(str As String)
        Dim x = str.ToString()
    End Sub
End Class")
        End Function
    End Class
End Namespace


text:
namespace blink {

const CSSValue* CSSPropertyAPIColumnGap::parseSingleValue(
    CSSParserTokenRange& range,
    const CSSParserContext* context) {
  if (range.peek().id() == CSSValueNormal)
    return CSSPropertyParserHelpers::consumeIdent(range);
  return CSSPropertyParserHelpers::consumeLength(range, context->mode(),
                                                 ValueRangeNonNegative);
}

}  // namespace blink


text:
import { Platform } from "react-native";

export default (variables) => {
  const subtitleTheme = {
    fontSize: variables.subTitleFontSize,
    fontFamily: variables.titleFontfamily,
    color: variables.subtitleColor,
    textAlign: "center",
    paddingLeft: (Platform.OS === "ios" ? 4 : 0) * variables.sizeScaling,
    marginLeft: Platform.OS === "ios" ? undefined : (-3 * variables.sizeScaling)
  };

  return subtitleTheme;
};


text:
import { module, test } from 'qunit';
import { setupApplicationTest } from 'ember-qunit';
import { visit } from '@ember/test-helpers';

module('setup test', async function(hooks) {
    setupApplicationTest(hooks);

    test('it works', async function(assert) {
        assert.expect(1);
        await visit('/');
        assert.ok(true, 'We got here');
    });
});


text:
/*
 *  Generate initialization data for built-in strings and objects.
 *
 *  Supports two different initialization approaches:
 *
 *    1. Bit-packed format for unpacking strings and objects during
 *       heap or thread init into RAM-based structures.  This is the
 *       default behavior.
 *
 *    2. Embedding strings and/or objects into a read-only data section
 *       at compile time.  This is useful for low memory targets to reduce
 *       memory usage.  Objects in data section will be immutable.
 *
 *  Both of these have practical complications like endianness differences,
 *  pointer compression variants, object property table layout variants,
 *  and so on.  Multiple #if defined()'d initializer sections are emitted
 *  to cover all supported alternatives.
 *
 *  Based on genbuiltins.py.
 */

'use strict';

const { loadMetadata, augmentMetadata } = require('./metadata/load');
const { prettyPrintMetadata } = require('./metadata/pretty');
const { GenerateC } = require('../util/generate_c');
const {
    generateRamStringInitDataBitpacked,
    getRamobjNativeFuncMaps,
    generateRamObjectInitDataBitpacked,
    emitRamStringHeader,
    emitRamStringInitData,
    emitRamObjectNativeFuncArray,
    emitRamObjectInitData,
    emitRamObjectNativeFuncDeclarations,
    emitRamObjectNativeFuncArrayDeclaration,
    emitRamObjectHeader,
    emitRamObjectInitDataDeclaration
} = require('./ram_initdata');
const {
    emitStringsSource,
    emitObjectsSource,
    emitStridxDefinesHeader,
    emitStringsHeader,
    emitNativeFunctionDeclarationsHeader,
    emitObjectsHeader
} = require('./rom_initdata');
const {
    emit32BitPtrCheck,
    emitInitializerTypesAndMacrosSource,
    emitRefcountInitMacro
} = require('./initdata/object_initializers');
const { ROMPTR_FIRST } = require('./rom_initdata');
const { assert } = require('../util/assert');
const { jsonDeepClone } = require('../util/clone');

function emitBuiltinsSource(args) {
    var gcSrc = args.gcSrc;
    var romMeta = args.romMeta;
    var ramStrInitData = args.ramStrInitData;
    var ramNativeFuncs = args.ramNativeFuncs;
    var ramObjDataLe = args.ramObjDataLe;
    var ramObjDataBe = args.ramObjDataBe;
    var ramObjDataMe = args.ramObjDataMe;
    var biStrMap;

    gcSrc.emitLine('#include "duk_internal.h"');
    gcSrc.emitLine('');
    emit32BitPtrCheck(gcSrc);
    emitRefcountInitMacro(gcSrc);

    gcSrc.emitLine('#if defined(DUK_USE_ROM_STRINGS)');
    ({ biStrMap } = emitStringsSource(gcSrc, romMeta));
    emitInitializerTypesAndMacrosSource(gcSrc);
    emitObjectsSource(gcSrc, romMeta, biStrMap);
    gcSrc.emitLine('#else  /* DUK_USE_ROM_STRINGS */');
    emitRamStringInitData(gcSrc, ramStrInitData);
    gcSrc.emitLine('#endif  /* DUK_USE_ROM_STRINGS */');
    gcSrc.emitLine('');

    gcSrc.emitLine('#if defined(DUK_USE_ROM_OBJECTS)');
    gcSrc.emitLine('#if !defined(DUK_USE_ROM_STRINGS)');
    gcSrc.emitLine('#error DUK_USE_ROM_OBJECTS requires DUK_USE_ROM_STRINGS');
    gcSrc.emitLine('#endif');
    gcSrc.emitLine('#if defined(DUK_USE_HSTRING_ARRIDX)');
    gcSrc.emitLine('#error DUK_USE_HSTRING_ARRIDX is currently incompatible with ROM built-ins');
    gcSrc.emitLine('#endif');
    gcSrc.emitLine('#else  /* DUK_USE_ROM_OBJECTS */');
    emitRamObjectNativeFuncArray(gcSrc, ramNativeFuncs);
    gcSrc.emitLine('#if defined(DUK_USE_DOUBLE_LE)');
    emitRamObjectInitData(gcSrc, ramObjDataLe);
    gcSrc.emitLine('#elif defined(DUK_USE_DOUBLE_BE)')
    emitRamObjectInitData(gcSrc, ramObjDataBe);
    gcSrc.emitLine('#elif defined(DUK_USE_DOUBLE_ME)')
    emitRamObjectInitData(gcSrc, ramObjDataMe);
    gcSrc.emitLine('#else')
    gcSrc.emitLine('#error invalid endianness defines')
    gcSrc.emitLine('#endif')
    gcSrc.emitLine('#endif  /* DUK_USE_ROM_OBJECTS */');
}

function emitBuiltinsHeader(args) {
    var gcHdr = args.gcHdr;
    var romMeta = args.romMeta;
    var ramMeta = args.ramMeta;
    var ramStrInitData = args.ramStrInitData;
    var ramStrMaxLen = args.ramStrMaxLen;
    var ramNativeFuncs = args.ramNativeFuncs;
    var ramObjDataLe = args.ramObjDataLe;
    var ramObjDataBe = args.ramObjDataBe;
    var ramObjDataMe = args.ramObjDataMe;

    gcHdr.emitLine('#if !defined(DUK_BUILTINS_H_INCLUDED)');
    gcHdr.emitLine('#define DUK_BUILTINS_H_INCLUDED');
    gcHdr.emitLine('');

    gcHdr.emitLine('#if defined(DUK_USE_ROM_STRINGS)');
    emitStridxDefinesHeader(gcHdr, romMeta);
    emitStringsHeader(gcHdr, romMeta);
    gcHdr.emitLine('#else  /* DUK_USE_ROM_STRINGS */');
    emitStridxDefinesHeader(gcHdr, ramMeta);
    emitRamStringHeader(gcHdr, ramStrInitData, ramStrMaxLen);
    gcHdr.emitLine('#endif  /* DUK_USE_ROM_STRINGS */');
    gcHdr.emitLine('');

    gcHdr.emitLine('#if defined(DUK_USE_ROM_OBJECTS)');
    // Currently DUK_USE_ROM_PTRCOMP_FIRST must match our fixed
    // define, and the two must be updated in sync.  Catch any
    // mismatch to avoid difficult to diagnose errors.
    gcHdr.emitLine('#if !defined(DUK_USE_ROM_PTRCOMP_FIRST)');
    gcHdr.emitLine('#error missing DUK_USE_ROM_PTRCOMP_FIRST define');
    gcHdr.emitLine('#endif');
    gcHdr.emitLine('#if (DUK_USE_ROM_PTRCOMP_FIRST != ' + ROMPTR_FIRST + 'L)');
    gcHdr.emitLine('#error DUK_USE_ROM_PTRCOMP_FIRST must match ROMPTR_FIRST in duktool.js (' + ROMPTR_FIRST + '), update manually and re-dist');
    gcHdr.emitLine('#endif');
    emitNativeFunctionDeclarationsHeader(gcHdr, romMeta);
    emitObjectsHeader(gcHdr, romMeta);
    gcHdr.emitLine('#else  /* DUK_USE_ROM_OBJECTS */');
    emitRamObjectNativeFuncDeclarations(gcHdr, ramNativeFuncs);
    emitRamObjectNativeFuncArrayDeclaration(gcHdr, ramNativeFuncs);
    emitRamObjectHeader(gcHdr, ramMeta);
    gcHdr.emitLine('#if defined(DUK_USE_DOUBLE_LE)');
    emitRamObjectInitDataDeclaration(gcHdr, ramObjDataLe);
    gcHdr.emitLine('#elif defined(DUK_USE_DOUBLE_BE)');
    emitRamObjectInitDataDeclaration(gcHdr, ramObjDataBe);
    gcHdr.emitLine('#elif defined(DUK_USE_DOUBLE_ME)');
    emitRamObjectInitDataDeclaration(gcHdr, ramObjDataMe);
    gcHdr.emitLine('#else')
    gcHdr.emitLine('#error invalid endianness defines')
    gcHdr.emitLine('#endif')
    gcHdr.emitLine('#endif  /* DUK_USE_ROM_OBJECTS */');
    gcHdr.emitLine('');
    gcHdr.emitLine('#endif  /* DUK_BUILTINS_H_INCLUDED */');
}

function createBuiltinsMetadata(meta) {
    return {};
}

function generateBuiltins(args) {
    var usedStridxEtcMeta = args.usedStridxEtcMeta;
    var dukVersion = args.dukVersion;
    var activeOpts = args.activeOpts;
    var romAutoLightfunc = args.romAutoLightfunc;
    var userBuiltinFiles = args.userBuiltinFiles;
    var objectsMetadataFile = args.objectsMetadataFile;
    var stringsMetadataFile = args.stringsMetadataFile;

    // Read in metadata files, normalizing and merging as necessary.

    var ramMeta = loadMetadata({
        stringsMetadataFilename: stringsMetadataFile,
        objectsMetadataFilename: objectsMetadataFile,
        userBuiltinFiles,
        usedStridxEtcMeta,
        activeOpts,
        romBuild: false,
        dukVersion
    });
    var ramMetaUnaugmented = jsonDeepClone(ramMeta);
    var prettyRamMeta = prettyPrintMetadata(ramMetaUnaugmented);
    augmentMetadata(ramMeta);

    var romMeta = loadMetadata({
        stringsMetadataFilename: stringsMetadataFile,
        objectsMetadataFilename: objectsMetadataFile,
        userBuiltinFiles,
        usedStridxEtcMeta,
        activeOpts,
        romBuild: true,
        romAutoLightfunc,
        dukVersion
    });
    var romMetaUnaugmented = jsonDeepClone(romMeta);
    var prettyRomMeta = prettyPrintMetadata(romMetaUnaugmented);
    augmentMetadata(romMeta);

    let ramStrData, ramStrMaxLen;
    let nativeFuncs, natfuncNameToNatidx;
    let ramObjDataLe, ramObjDataBe, ramObjDataMe;
    ({ data: ramStrData, maxLen: ramStrMaxLen } = generateRamStringInitDataBitpacked(ramMeta));
    ({ nativeFuncs, natfuncNameToNatidx } = getRamobjNativeFuncMaps(ramMeta));
    ({ data: ramObjDataLe } = generateRamObjectInitDataBitpacked(ramMeta, nativeFuncs, natfuncNameToNatidx, 'little'));
    ({ data: ramObjDataBe } = generateRamObjectInitDataBitpacked(ramMeta, nativeFuncs, natfuncNameToNatidx, 'big'));
    ({ data: ramObjDataMe } = generateRamObjectInitDataBitpacked(ramMeta, nativeFuncs, natfuncNameToNatidx, 'mixed'));
    assert(ramObjDataLe.length === ramObjDataBe.length);
    assert(ramObjDataLe.length === ramObjDataMe.length);

    // Create source and header files.

    var gcSrc = new GenerateC();
    emitBuiltinsSource({
        gcSrc,
        romMeta,
        ramStrInitData: ramStrData,
        ramNativeFuncs: nativeFuncs,
        ramObjDataLe,
        ramObjDataBe,
        ramObjDataMe
    }); // duk_builtins.c

    var gcHdr = new GenerateC();
    emitBuiltinsHeader({
        gcHdr,
        romMeta,
        ramMeta,
        ramStrInitData: ramStrData,
        ramStrMaxLen: ramStrMaxLen,
        ramNativeFuncs: nativeFuncs,
        ramObjDataLe,
        ramObjDataBe,
        ramObjDataMe
    }); // duk_builtins.h

    var builtinsMetadata = createBuiltinsMetadata(ramMeta);

    return {
        preparedRomMetadata: romMeta,
        unaugmentedRomMetadata: romMetaUnaugmented,
        prettyRomMetadata: prettyRomMeta,
        preparedRamMetadata: ramMeta,
        unaugmentedRamMetadata: ramMetaUnaugmented,
        prettyRamMetadata: prettyRamMeta,
        sourceString: gcSrc.getString(),
        headerString: gcHdr.getString(),
        builtinsMetadata
    };
}
exports.generateBuiltins = generateBuiltins;


text:
var EventEmitter = require('events').EventEmitter;
var util = require('util');

var instance = null;
var started = false;

var SMS = function(){
	//** 一个porcess仅包含一个实例
	if(instance instanceof SMS) return instance;
	EventEmitter.call(this);
	instance = this;
};
util.inherits(SMS, EventEmitter);

SMS.prototype.send = function(mobile,content,done){
	this.sgip.send(mobile,content,done);
};

SMS.prototype.start = function(){
	//** 一个process仅执行一次
	if(started) return;
	started = true;
	this.sgip.start();
};

SMS.prototype.stop = function(){
	this.sgip.stop();
	started = false;
	instance = null;
};

exports = module.exports = SMS;


text: Start your web work using a series of powerful gulp build tools.