text:
module.exports = {
  normalizeEntityName: function() {},

  afterInstall: function() {
    this.addBowerPackagesToProject([
      {name: "bootstrap3-wysiwyg", target: "~0.3.3"},
      {name: "flag-icon-css", target: "0.6.4"}
    ]);
  }
};

redpajama_set_name: RedPajamaGithub


text:
<?php
/*
* Define class pspDashboard
* Make sure you skip down to the end of this file, as there are a few
* lines of code that are very important.
*/
!defined('ABSPATH') and exit;
if (class_exists('pspDashboard') != true) {
    class pspDashboard
    {
        /*
        * Some required plugin information
        */
        const VERSION = '1.0';

        /*
        * Store some helpers config
        */
		public $the_plugin = null;

		private $module_folder = '';
		private $module = '';

		public $ga = null;
		public $ga_params = array();

		public $boxes = array();

		static protected $_instance;

        /*
        * Required __construct() function that initalizes the AA-Team Framework
        */
        public function __construct()
        {
        	global $psp;

        	$this->the_plugin = $psp;
			$this->module_folder = $this->the_plugin->cfg['paths']['plugin_dir_url'] . 'modules/dashboard/';
			//$this->module = $this->the_plugin->cfg['modules']['dashboard'];

			if (is_admin()) {
				add_action( "admin_print_scripts", array( &$this, 'admin_load_scripts') );
			}

			// load the ajax helper
			if ( $this->the_plugin->is_admin === true ) {
				require_once( $this->the_plugin->cfg['paths']['plugin_dir_path'] . 'modules/dashboard/ajax.php' );
				new pspDashboardAjax( $this->the_plugin );
			}

			if ( $this->the_plugin->is_admin === true ) {
				// add the boxes
				$this->addBox( 'plugin_dashboard_msg', '', $this->plugin_dashboard_msg(), array(
					'size' => 'grid_4'
				) );

				$this->addBox( 'dashboard_links', '', $this->links(), array(
					'size' => 'grid_4'
				) );

				$this->addBox( 'social', 'Social Statistics', $this->social(), array(
					'size' => 'grid_4'
				) );

				$this->addBox( 'audience_overview', 'Audience Overview', $this->audience_overview(), array(
					'size' => 'grid_4'
				) );

				$this->addBox( 'support', 'Need AA-Team Support?', $this->support() );
				$this->addBox( 'changelog', 'Changelog', $this->changelog() );
			}
        }

		/**
	    * Singleton pattern
	    *
	    * @return pspDashboard Singleton instance
	    */
	    static public function getInstance()
	    {
	        if (!self::$_instance) {
	            self::$_instance = new self;
	        }

	        return self::$_instance;
	    }

		public function admin_load_scripts()
		{
			wp_enqueue_script( 'psp-DashboardBoxes', $this->module_folder . 'app.class.js', array(), '1.0', true );
		}

		public function getBoxes()
		{
			$ret_boxes = array();
			if( count($this->boxes) > 0 ){
				foreach ($this->boxes as $key => $value) {
					$ret_boxes[$key] = $value;
				}
			}

			return $ret_boxes;
		}

		private function formatAsFreamworkBox( $html_content='', $atts=array() )
		{
			return array(
				'size' 		=> isset($atts['size']) ? $atts['size'] : 'grid_4', // grid_1|grid_2|grid_3|grid_4
	            'header' 	=> isset($atts['header']) ? $atts['header'] : false, // true|false
	            'toggler' 	=> false, // true|false
	            'buttons' 	=> isset($atts['buttons']) ? $atts['buttons'] : false, // true|false
	            'style' 	=> isset($atts['style']) ? $atts['style'] : 'panel-widget', // panel|panel-widget

	            // create the box elements array
	            'elements' => array(
	                array(
	                    'type' => 'html',
	                    'html' => $html_content
	                )
	            )
			);
		}

		private function addBox( $id='', $title='', $html='', $atts=array() )
		{
			// check if this box is not already in the list
			if( isset($id) && trim($id) != "" && !isset($this->boxes[$id]) ){

				$box = array();

				$box[] = '
';
				if( isset($title) && trim($title) != "" ){
					$box[] = 	'
';
					$box[] = 		'
' . ( $title ) . '
';
					$box[] = 	'
';
				}
				$box[] = 	$html;
				$box[] = '
';

				$this->boxes[$id] = $this->formatAsFreamworkBox( implode("\n", $box), $atts );

			}
		}

		public function formatRow( $content=array() )
		{
			$html = array();

			$html[] = '
';
			if( isset($content['title']) && trim($content['title']) != "" ){
				$html[] = 	'
' . ( isset($content['title']) ? $content['title'] : 'Untitled' ) . '
';
			}
			if( isset($content['ajax_content']) && $content['ajax_content'] == true ){
				$html[] = '
';
				$html[] = 	'{' . ( isset($content['id']) ? $content['id'] : 'error_id_missing' ) . '}';
				$html[] = '
';
			}
			else{
				$html[] = '
';
				$html[] = 	( isset($content['html']) && trim($content['html']) != "" ? $content['html'] : '!!! error_content_missing' );
				$html[] = '
';
			}
			$html[] = '
';

			return implode("\n", $html);
		}

		public function plugin_dashboard_msg()
		{
			$html = array();

			$html[] = '
the_plugin->alias ) . '-panel-heading">';
			$html[] = 	'
Dashboard
';
			$html[] = 	'Dashboard Area - Here you will find useful shortcuts to different modules inside the plugin.';
			$html[] = 	''; // extra content here ...
			$html[] = '
';
			$html[] = '
the_plugin->alias ) . '-panel-body ' . ( $this->the_plugin->alias ) . '-no-padding" >
						the_plugin->alias ) . '-tab"> Documentation
						the_plugin->alias ) . '-tab">the_plugin->alias ) . '-icon-heart"> More AA-Team Products

';

			return implode("\n", $html);
		}

		public function support()
		{
			$html = array();
			$html[] = '
';
			$html[] = 'module_folder ) . 'assets/support_banner.jpg">';
			$html[] = '
';

			return implode("\n", $html);
		}
		public function social()
		{
			$html = array();
			$html[] = '
';
			$html[] = $this->formatRow( array(
				'id' 			=> 'social_impact',
				'title' 		=> '',
				'html'			=> '',
				'ajax_content' 	=> true
			) );
			$html[] = '
';

			return implode("\n", $html);
		}

		public function audience_overview()
		{
			$html = array();
			$html[] = '
';
			$html[] = '

';
			$html[] = '
';

			return  implode("\n", $html);
		}

		public function links()
		{
			$html = array();
			$html[] = '
';
			$html[] = '
';

			// get all active modules
			foreach ($this->the_plugin->cfg['modules'] as $key => $value) {

				if( !in_array( $key, array_keys($this->the_plugin->cfg['activate_modules'])) ) continue;

				$module = $key;
				if ( //!in_array($module, $this->the_plugin->cfg['core-modules']) &&
				!$this->the_plugin->capabilities_user_has_module($module) ) {
					continue 1;
				}

				$in_dashboard = isset($value[$key]['in_dashboard']) ? $value[$key]['in_dashboard'] : array();
				//var_dump('
',$value[$key]['in_dashboard'], $key,'
');
				if( count($in_dashboard) > 0 ){

					$html[] = '

								'. ( $value[$key]['menu']['icon'] ) .'
								' . ( $value[$key]['menu']['title'] ) . '

';
				}
			}

			$html[] = '
';
			$html[] = '
';

			return implode("\n", $html);
		}

		public function changelog()
		{
			$html = array();

			$html[] = '
';
			$html[] = 	'
';
			$changelog_file = 	file_get_contents( $this->the_plugin->cfg['paths']['plugin_dir_path'] . '/changelog.txt' );

			$re = "/(##.*\\n)/";
			preg_match_all($re, $changelog_file, $matches);
			if( isset($matches[0]) && count($matches) > 0 ){
				foreach ($matches[0] as $str) {
					//$str = trim($str);
					$changelog_file = str_replace( $str, "
" . ( $str ) . "
", $changelog_file );
				}
			}

			$html[] = nl2br($changelog_file);
			$html[] = 	'
';
			$html[] = '
';

			return implode("\n", $html);
		}

    }
}

// Initialize the pspDashboard class
$pspDashboard = new pspDashboard();
//$pspDashboard = pspDashboard::getInstance();


text:
using System;
using System.ComponentModel;
using System.Drawing;
using FluentAssertions;
using FluentAssertions.Execution;
using FluentAssertions.Primitives;

namespace FontAwesome.Sharp.Tests.WindowsForms;

internal static class TestExtensions
{
    public static BitmapAssertions Should(this Bitmap bitmap)
    {
        return new BitmapAssertions(bitmap);
    }

    //public static ColorAssertions Should(this Color color)
    //{
    //    return new ColorAssertions(color);
    //}

    /*
    internal class ColorAssertions : ObjectAssertions //ReferenceTypeAssertions<Color, ColorAssertions>
    {
        public ColorAssertions(Color color) : base(color)
        {
        }

        protected override string Identifier => nameof(Color);
    }*/

    internal class BitmapAssertions : ReferenceTypeAssertions<Bitmap, BitmapAssertions>
    {
        public BitmapAssertions(Bitmap bitmap) : base(bitmap)
        {
        }

        protected override string Identifier => nameof(Bitmap);

        public void NotBeEmpty()
        {
            for (var y = 0; y < Subject.Height; y++)
            for (var x = 0; x < Subject.Width; x++)
            {
                var color = Subject.GetPixel(x, y);
                var isEmpty = color.IsEmpty || color.ToArgb() == 0;
                if (!isEmpty)
                    return;
            }

            Execute.Assertion.FailWith("Expected {context} not to be empty, but was.");
        }
    }

    public static void ShouldBeToolboxItem<T>() where T : class, IComponent, new()
    {
        typeof(T).ShouldBeToolboxItem();
        // Make custom controls automatically visible in Visual Studio Toolbox, cf.
        // - https://github.com/awesome-inc/FontAwesome.Sharp/issues/62
        // - https://github.com/awesome-inc/FontAwesome.Sharp/issues/91
        // - https://github.com/NuGet/Home/issues/6440#issuecomment-434827530
        // - https://github.com/NuGet/Home/wiki/Converting-Extension-SDKs-into-NuGet-Packages
        // - https://docs.microsoft.com/en-us/dotnet/api/system.componentmodel.toolboxitemattribute?view=net-6.0
        typeof(T).Should()
            .BeDecoratedWith<ToolboxItemAttribute>().Which.IsDefaultAttribute().Should().BeTrue();
        typeof(T).Should()
            .BeDecoratedWith<DesignTimeVisibleAttribute>().Which.Visible.Should().BeTrue();
        typeof(T).Should()
            .BeDecoratedWith<DescriptionAttribute>().Which.Description.Should().MatchRegex("A windows forms (.+) supporting font awesome icons");

    }

    public static void ShouldBeToolboxItem(this Type type)
    {
        // Make custom controls automatically visible in Visual Studio Toolbox, cf.
        // - https://github.com/awesome-inc/FontAwesome.Sharp/issues/62
        // - https://github.com/awesome-inc/FontAwesome.Sharp/issues/91
        // - https://github.com/NuGet/Home/issues/6440#issuecomment-434827530
        // - https://github.com/NuGet/Home/wiki/Converting-Extension-SDKs-into-NuGet-Packages
        // - https://docs.microsoft.com/en-us/dotnet/api/system.componentmodel.toolboxitemattribute?view=net-6.0
        type.Should().BeAssignableTo<IComponent>();
        type.Should()
            .BeDecoratedWith<ToolboxItemAttribute>().Which.IsDefaultAttribute().Should().BeTrue();
        type.Should()
            .BeDecoratedWith<DesignTimeVisibleAttribute>().Which.Visible.Should().BeTrue();
        type.Should()
            .BeDecoratedWith<DescriptionAttribute>().Which.Description.Should().MatchRegex("A windows forms (?<component>.+) supporting (?<font>.+) icons");
    }
}


text:
#ifndef SkSurface_Gpu_DEFINED
#define SkSurface_Gpu_DEFINED

#include "SkSurface_Base.h"

#if SK_SUPPORT_GPU

class SkGpuDevice;

class SkSurface_Gpu : public SkSurface_Base {
public:
    SK_DECLARE_INST_COUNT(SkSurface_Gpu)

    SkSurface_Gpu(GrRenderTarget*, const SkSurfaceProps*, bool doClear);
    virtual ~SkSurface_Gpu();

    virtual SkCanvas* onNewCanvas() SK_OVERRIDE;
    virtual SkSurface* onNewSurface(const SkImageInfo&) SK_OVERRIDE;
    virtual SkImage* onNewImageSnapshot() SK_OVERRIDE;
    virtual void onDraw(SkCanvas*, SkScalar x, SkScalar y,
                        const SkPaint*) SK_OVERRIDE;
    virtual void onCopyOnWrite(ContentChangeMode) SK_OVERRIDE;
    virtual void onDiscard() SK_OVERRIDE;

    SkGpuDevice* getDevice() { return fDevice; }

private:
    SkGpuDevice* fDevice;

    typedef SkSurface_Base INHERITED;
};

#endif // SK_SUPPORT_GPU

#endif // SkSurface_Gpu_DEFINED


text:
require File.expand_path("../../path.rb", __FILE__)
include Spec::Path

$LOAD_PATH.unshift(*Dir[Spec::Path.base_system_gems.join("gems/{artifice,rack,tilt,sinatra}-*/lib")].map(&:to_s))

require "artifice"
require "sinatra/base"

Artifice.deactivate

class Endpoint500 < Sinatra::Base
  before do
    halt 500
  end
end

Artifice.activate_with(Endpoint500)


text:
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

using System.ComponentModel;
using Azure.Core;

namespace Azure.Messaging.ServiceBus
{
    /// <summary>
    /// The set of options that can be specified when creating a <see cref="ServiceBusSessionReceiver"/>
    /// to configure its behavior.
    /// </summary>
    public class ServiceBusSessionReceiverOptions
    {
        /// <summary>
        /// Gets or sets the number of messages that will be eagerly requested from Queues or Subscriptions and queued locally without regard to
        /// whether the receiver is actively receiving, intended to help maximize throughput by allowing the receiver to receive
        /// from a local cache rather than waiting on a service request.
        /// </summary>
        public int PrefetchCount
        {
            get
            {
                return _prefetchCount;
            }
            set
            {
                Argument.AssertAtLeast(value, 0, nameof(PrefetchCount));
                _prefetchCount = value;
            }
        }
        private int _prefetchCount = 0;

        /// <summary>
        /// Gets or sets the <see cref="ReceiveMode"/> used to specify how messages are received. Defaults to PeekLock mode.
        /// </summary>
        public ReceiveMode ReceiveMode { get; set; } = ReceiveMode.PeekLock;

        /// <summary>
        /// Gets or sets an optional session ID to scope the <see cref="ServiceBusSessionReceiver"/> to. If left blank,
        /// the next available session returned from the service will be used.
        /// </summary>
        internal string SessionId { get; set; }

        /// <summary>
        /// Determines whether the specified <see cref="System.Object" /> is equal to this instance.
        /// </summary>
        ///
        /// <param name="obj">The <see cref="System.Object" /> to compare with this instance.</param>
        ///
        /// <returns><c>true</c> if the specified <see cref="System.Object" /> is equal to this instance; otherwise, <c>false</c>.</returns>
        [EditorBrowsable(EditorBrowsableState.Never)]
        public override bool Equals(object obj) => base.Equals(obj);

        /// <summary>
        /// Returns a hash code for this instance.
        /// </summary>
        ///
        /// <returns>A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.</returns>
        ///
        [EditorBrowsable(EditorBrowsableState.Never)]
        public override int GetHashCode() => base.GetHashCode();

        /// <summary>
        /// Converts the instance to string representation.
        /// </summary>
        ///
        /// <returns>A <see cref="System.String" /> that represents this instance.</returns>
        ///
        [EditorBrowsable(EditorBrowsableState.Never)]
        public override string ToString() => base.ToString();

        internal ServiceBusReceiverOptions ToReceiverOptions() =>
            new ServiceBusReceiverOptions()
            {
                ReceiveMode = ReceiveMode,
                PrefetchCount = PrefetchCount
            };
    }
}


text:
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;

public class Common {

	// BasicBot 1.1 Patch Start ////////////////////////////////////////////////
	// appendTextToFile 등 메소드를 static 으로 수정

	/// 로그 유틸
	public static void appendTextToFile(final String logFile, final String msg)
	{
		try {
			BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(new File(logFile), true))  ;
			bos.write(msg.getBytes());
			bos.flush();
			bos.close();
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

	/// 로그 유틸
	public static void overwriteToFile(final String logFile, final String msg)
	{
		try {
			BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(new File(logFile)))  ;
			bos.write(msg.getBytes());
			bos.flush();
			bos.close();
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

	/// 파일 유틸 - 텍스트 파일을 읽어들인다
	public static String readFile(final String filename)
	{
		BufferedInputStream bis;
		StringBuilder sb = null;
		try {
			bis = new BufferedInputStream(new FileInputStream(new File(filename)));
	        sb = new StringBuilder();

	        while (bis.available() > 0) {
	            sb.append((char) bis.read());
	        }
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		}

		return sb.toString();
	}

	// BasicBot 1.1 Patch End //////////////////////////////////////////////////

}


text:
layout: page
title: Chrome Tech Dinner
date: 2016-05-24
author: George Mcknight
tags: weekly links, java
status: published
summary: Phasellus at urna eget lectus malesuada vulputate a.
banner: images/banner/leisure-01.jpg
booking:
  startDate: 05/19/2017
  endDate: 05/20/2017
  ctyhocn: POUKGHX
  groupCode: CTD
published: true
---
Morbi risus lacus, pharetra a purus non, gravida scelerisque orci. Proin maximus dolor vel facilisis consequat. Nunc ac ante nec lacus venenatis venenatis. Praesent consectetur elit sit amet mi congue, quis maximus neque sagittis. Morbi augue ligula, volutpat eu arcu vel, faucibus cursus nibh. Phasellus molestie maximus pretium. Ut vulputate non tellus ut hendrerit. Duis vitae facilisis mauris, a sodales est. Quisque rutrum mattis odio, eu molestie quam vehicula at. Quisque iaculis aliquam nisi ac rutrum. Proin quis purus at lectus gravida suscipit. Integer in volutpat eros, sed sollicitudin nunc.

* Aenean ullamcorper nisi ac risus laoreet aliquet
* Duis maximus mauris in ornare vehicula.

Pellentesque justo nunc, elementum vitae blandit in, accumsan eu ante. Nam facilisis leo ac orci bibendum rhoncus. Duis eu felis id purus venenatis iaculis. Curabitur ipsum diam, tincidunt nec lacus at, porta luctus velit. Pellentesque scelerisque lacus nec aliquet porttitor. Nam vitae eros sapien. In at condimentum neque, faucibus imperdiet urna. Etiam iaculis non sem vel ornare. Fusce vitae sollicitudin lorem, ut iaculis tellus. Ut et dignissim felis. Mauris imperdiet lorem dui, non bibendum nunc molestie eu. Nunc eu iaculis lacus. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Vivamus tristique rhoncus justo. Fusce purus massa, euismod nec eleifend in, interdum sit amet diam.


text:
.class synthetic Lcom/sec/android/app/camera/glwidget/TwGLShootAndShareSettingMenu$1;
.super Ljava/lang/Object;
.source "TwGLShootAndShareSettingMenu.java"

# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/sec/android/app/camera/glwidget/TwGLShootAndShareSettingMenu;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x1008
    name = null
.end annotation


text:
package com.graduate.system.user.model;

import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;

import javax.persistence.*;

/**
 * Created by konglinghai on 2017/3/19.
 * 用户角色表
 */
@Table(name = "user_to_role")
@Entity
public class UserAndRole {
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Long id;
    @Column(name = "uid")
    private Long uid;//用户id
    @OneToOne(cascade = { CascadeType.MERGE,CascadeType.PERSIST, CascadeType.REMOVE } )
    @JoinColumn(name="uid",referencedColumnName = "id",insertable = false,updatable = false)
    @NotFound(action= NotFoundAction.IGNORE)
    private User user;

    @Column(name = "role_id")
    private Long roleId;//角色id
    @ManyToOne(cascade = CascadeType.PERSIST  )
    @JoinColumn(name="role_id",referencedColumnName = "id",insertable = false,updatable = false)
    @NotFound(action=NotFoundAction.IGNORE)
    private Role role;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getUid() {
        return uid;
    }

    public void setUid(Long uid) {
        this.uid = uid;
    }

    public Long getRoleId() {
        return roleId;
    }

    public void setRoleId(Long roleId) {
        this.roleId = roleId;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public Role getRole() {
        return role;
    }

    public void setRole(Role role) {
        this.role = role;
    }

    public UserAndRole() {
    }

    @Override
    public String toString() {
        return "UserAndRole{" +
                "id=" + id +
                ", uid=" + uid +
                ", user=" + user +
                ", roleId=" + roleId +
                ", role=" + role +
                '}';
    }
}


text:
# Introduction

Apache OpenWhisk™ is an open source, distributed Serverless computing project.

Specifically, it is able to execute application logic (*Actions*) in response to events (*Triggers*) from external sources (*Feeds*) governed by simple conditional logic (*Rules*) around the event data.

It provides a programming model for registering and managing *Actions*, *Triggers* and *Rules* supported by a REST-based Command Line Interface (CLI) along with tooling to support packaging and catalog services.

The project includes a catalog of built-in system and utility *Actions* and *Feeds*, along with a robust set of samples that demonstrate how to integrate OpenWhisk with various external service providers (e.g., GitHub, Slack, etc.) along with several platform and run-time Software
Development Kits (SDKs).

The code for the Actions, along with any support services implementing *Feeds*, are packaged according to this specification to be compatible with the OpenWhisk catalog and its tooling. It also serves as a means for architects and developers to model OpenWhisk package Actions as part
of full, event-driven services and applications providing the necessary information for artifact and data type validation along with package management operations.

## Compatibility

This specification is intended to be compatible with the following specifications:

- *OpenWhisk API which is defined as an OpenAPI document:*
    - <https://github.com/apache/openwhisk/blob/master/core/controller/src/main/resources/apiv1swagger.json>

- *OpenAPI Specification when defining REST APIs and parameters:*
    - <https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md>

---

Index


text:
package jp.co.ixui.spring.boilerplate.core.global;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.stereotype.Component;
import org.springframework.web.servlet.HandlerExceptionResolver;
import org.springframework.web.servlet.ModelAndView;

/**
 * 例外処理全般を行うクラス
 */
@Component
public class GlobalExceptionResolver implements HandlerExceptionResolver {

	public static Log log = LogFactory.getLog(GlobalExceptionResolver.class);

	@Override
	public ModelAndView resolveException(HttpServletRequest req,
										  HttpServletResponse res,
										  Object handler,
										  Exception ex) {

        log.error("例外を検知しました", ex);

        ModelAndView mav = new ModelAndView();

        switch(ex.getClass().getName() ){
        case "jp.co.ixui.spring.boilerplate.core.security.exception.AccessDeniedException":
            mav.setViewName("error");
            mav.addObject("errorMessage", "対象機能へのアクセスが拒否されました");
        	break;

        case "jp.co.ixui.spring.boilerplate.core.security.exception.NotAuthlizedException":
            mav.setViewName("error");
            mav.addObject("errorMessage", "ログインできませんでした");
        	break;

        default:
            mav.setViewName("error");
            mav.addObject("errorMessage", "システムエラーが発生しました。" + " 詳細をご確認ください:【" + ex + "】");
        	break;

        }

        return mav;
	}

}


text:
<?php
/*----------------------------------------------------------------------------
| /resourses/views/cruds/objeto/customs/viewname_footer.php
| Verifica si existe el archivo y en ese caso lo carga
| como un include
|
*/
$filename=$p->pathViews()."/cruds/$modelName/customs/$viewName"."_footer.php";
if (file_exists($filename)){include_once($filename);}

/*----------------------------------------------------------------------------
| /resourses/views/cruds/objeto/customs/viewname_footer_javascripts.php
| Verifica si existe el archivo y en ese caso lo carga
| como un include
|
*/
$filename_footer_javascripts=str_replace('.php','_javascripts.php',$filename);
if (file_exists($filename)){include_once($filename);}

?>


text:
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.storage.blob.implementation.models;

import com.azure.core.annotation.Fluent;
import com.azure.core.annotation.HeaderCollection;
import com.azure.core.util.DateTimeRfc1123;
import com.azure.storage.blob.models.LeaseDurationType;
import com.azure.storage.blob.models.LeaseStateType;
import com.azure.storage.blob.models.LeaseStatusType;
import com.azure.storage.blob.models.PublicAccessType;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
import java.time.OffsetDateTime;
import java.util.Map;

/**
 * Defines headers for GetProperties operation.
 */
@JacksonXmlRootElement(localName = "Container-GetProperties-Headers")
@Fluent
public final class ContainerGetPropertiesHeaders {
    /*
     * The metadata property.
     */
    @HeaderCollection("x-ms-meta-")
    private Map<String, String> metadata;

    /*
     * The ETag contains a value that you can use to perform operations
     * conditionally. If the request version is 2011-08-18 or newer, the ETag
     * value will be in quotes.
     */
    @JsonProperty(value = "ETag")
    private String eTag;

    /*
     * Returns the date and time the container was last modified. Any operation
     * that modifies the blob, including an update of the blob's metadata or
     * properties, changes the last-modified time of the blob.
     */
    @JsonProperty(value = "Last-Modified")
    private DateTimeRfc1123 lastModified;

    /*
     * When a blob is leased, specifies whether the lease is of infinite or
     * fixed duration. Possible values include: 'infinite', 'fixed'
     */
    @JsonProperty(value = "x-ms-lease-duration")
    private LeaseDurationType leaseDuration;

    /*
     * Lease state of the blob. Possible values include: 'available', 'leased',
     * 'expired', 'breaking', 'broken'
     */
    @JsonProperty(value = "x-ms-lease-state")
    private LeaseStateType leaseState;

    /*
     * The current lease status of the blob. Possible values include: 'locked',
     * 'unlocked'
     */
    @JsonProperty(value = "x-ms-lease-status")
    private LeaseStatusType leaseStatus;

    /*
     * If a client request id header is sent in the request, this header will
     * be present in the response with the same value.
     */
    @JsonProperty(value = "x-ms-client-request-id")
    private String clientRequestId;

    /*
     * This header uniquely identifies the request that was made and can be
     * used for troubleshooting the request.
     */
    @JsonProperty(value = "x-ms-request-id")
    private String requestId;

    /*
     * Indicates the version of the Blob service used to execute the request.
     * This header is returned for requests made against version 2009-09-19 and
     * above.
     */
    @JsonProperty(value = "x-ms-version")
    private String version;

    /*
     * UTC date/time value generated by the service that indicates the time at
     * which the response was initiated
     */
    @JsonProperty(value = "Date")
    private DateTimeRfc1123 dateProperty;

    /*
     * Indicated whether data in the container may be accessed publicly and the
     * level of access. Possible values include: 'container', 'blob'
     */
    @JsonProperty(value = "x-ms-blob-public-access")
    private PublicAccessType blobPublicAccess;

    /*
     * Indicates whether the container has an immutability policy set on it.
     */
    @JsonProperty(value = "x-ms-has-immutability-policy")
    private Boolean hasImmutabilityPolicy;

    /*
     * Indicates whether the container has a legal hold.
     */
    @JsonProperty(value = "x-ms-has-legal-hold")
    private Boolean hasLegalHold;

    /*
     * The default encryption scope for the container.
     */
    @JsonProperty(value = "x-ms-default-encryption-scope")
    private String defaultEncryptionScope;

    /*
     * Indicates whether the container's default encryption scope can be
     * overriden.
     */
    @JsonProperty(value = "x-ms-deny-encryption-scope-override")
    private Boolean denyEncryptionScopeOverride;

    /*
     * The errorCode property.
     */
    @JsonProperty(value = "x-ms-error-code")
    private String errorCode;

    /**
     * Get the metadata property: The metadata property.
     *
     * @return the metadata value.
     */
    public Map<String, String> getMetadata() {
        return this.metadata;
    }

    /**
     * Set the metadata property: The metadata property.
     *
     * @param metadata the metadata value to set.
     * @return the ContainerGetPropertiesHeaders object itself.
     */
    public ContainerGetPropertiesHeaders setMetadata(Map<String, String> metadata) {
        this.metadata = metadata;
        return this;
    }

    /**
     * Get the eTag property: The ETag contains a value that you can use to
     * perform operations conditionally. If the request version is 2011-08-18
     * or newer, the ETag value will be in quotes.
     *
     * @return the eTag value.
     */
    public String getETag() {
        return this.eTag;
    }

    /**
     * Set the eTag property: The ETag contains a value that you can use to
     * perform operations conditionally. If the request version is 2011-08-18
     * or newer, the ETag value will be in quotes.
     *
     * @param eTag the eTag value to set.
     * @return the ContainerGetPropertiesHeaders object itself.
     */
    public ContainerGetPropertiesHeaders setETag(String eTag) {
        this.eTag = eTag;
        return this;
    }

    /**
     * Get the lastModified property: Returns the date and time the container
     * was last modified. Any operation that modifies the blob, including an
     * update of the blob's metadata or properties, changes the last-modified
     * time of the blob.
     *
     * @return the lastModified value.
     */
    public OffsetDateTime getLastModified() {
        if (this.lastModified == null) {
            return null;
        }
        return this.lastModified.getDateTime();
    }

    /**
     * Set the lastModified property: Returns the date and time the container
     * was last modified. Any operation that modifies the blob, including an
     * update of the blob's metadata or properties, changes the last-modified
     * time of the blob.
     *
     * @param lastModified the lastModified value to set.
     * @return the ContainerGetPropertiesHeaders object itself.
     */
    public ContainerGetPropertiesHeaders setLastModified(OffsetDateTime lastModified) {
        if (lastModified == null) {
            this.lastModified = null;
        } else {
            this.lastModified = new DateTimeRfc1123(lastModified);
        }
        return this;
    }

    /**
     * Get the leaseDuration property: When a blob is leased, specifies whether
     * the lease is of infinite or fixed duration. Possible values include:
     * 'infinite', 'fixed'.
     *
     * @return the leaseDuration value.
     */
    public LeaseDurationType getLeaseDuration() {
        return this.leaseDuration;
    }

    /**
     * Set the leaseDuration property: When a blob is leased, specifies whether
     * the lease is of infinite or fixed duration. Possible values include:
     * 'infinite', 'fixed'.
     *
     * @param leaseDuration the leaseDuration value to set.
     * @return the ContainerGetPropertiesHeaders object itself.
     */
    public ContainerGetPropertiesHeaders setLeaseDuration(LeaseDurationType leaseDuration) {
        this.leaseDuration = leaseDuration;
        return this;
    }

    /**
     * Get the leaseState property: Lease state of the blob. Possible values
     * include: 'available', 'leased', 'expired', 'breaking', 'broken'.
     *
     * @return the leaseState value.
     */
    public LeaseStateType getLeaseState() {
        return this.leaseState;
    }

    /**
     * Set the leaseState property: Lease state of the blob. Possible values
     * include: 'available', 'leased', 'expired', 'breaking', 'broken'.
     *
     * @param leaseState the leaseState value to set.
     * @return the ContainerGetPropertiesHeaders object itself.
     */
    public ContainerGetPropertiesHeaders setLeaseState(LeaseStateType leaseState) {
        this.leaseState = leaseState;
        return this;
    }

    /**
     * Get the leaseStatus property: The current lease status of the blob.
     * Possible values include: 'locked', 'unlocked'.
     *
     * @return the leaseStatus value.
     */
    public LeaseStatusType getLeaseStatus() {
        return this.leaseStatus;
    }

    /**
     * Set the leaseStatus property: The current lease status of the blob.
     * Possible values include: 'locked', 'unlocked'.
     *
     * @param leaseStatus the leaseStatus value to set.
     * @return the ContainerGetPropertiesHeaders object itself.
     */
    public ContainerGetPropertiesHeaders setLeaseStatus(LeaseStatusType leaseStatus) {
        this.leaseStatus = leaseStatus;
        return this;
    }

    /**
     * Get the clientRequestId property: If a client request id header is sent
     * in the request, this header will be present in the response with the
     * same value.
     *
     * @return the clientRequestId value.
     */
    public String getClientRequestId() {
        return this.clientRequestId;
    }

    /**
     * Set the clientRequestId property: If a client request id header is sent
     * in the request, this header will be present in the response with the
     * same value.
     *
     * @param clientRequestId the clientRequestId value to set.
     * @return the ContainerGetPropertiesHeaders object itself.
     */
    public ContainerGetPropertiesHeaders setClientRequestId(String clientRequestId) {
        this.clientRequestId = clientRequestId;
        return this;
    }

    /**
     * Get the requestId property: This header uniquely identifies the request
     * that was made and can be used for troubleshooting the request.
     *
     * @return the requestId value.
     */
    public String getRequestId() {
        return this.requestId;
    }

    /**
     * Set the requestId property: This header uniquely identifies the request
     * that was made and can be used for troubleshooting the request.
     *
     * @param requestId the requestId value to set.
     * @return the ContainerGetPropertiesHeaders object itself.
     */
    public ContainerGetPropertiesHeaders setRequestId(String requestId) {
        this.requestId = requestId;
        return this;
    }

    /**
     * Get the version property: Indicates the version of the Blob service used
     * to execute the request. This header is returned for requests made
     * against version 2009-09-19 and above.
     *
     * @return the version value.
     */
    public String getVersion() {
        return this.version;
    }

    /**
     * Set the version property: Indicates the version of the Blob service used
     * to execute the request. This header is returned for requests made
     * against version 2009-09-19 and above.
     *
     * @param version the version value to set.
     * @return the ContainerGetPropertiesHeaders object itself.
     */
    public ContainerGetPropertiesHeaders setVersion(String version) {
        this.version = version;
        return this;
    }

    /**
     * Get the dateProperty property: UTC date/time value generated by the
     * service that indicates the time at which the response was initiated.
     *
     * @return the dateProperty value.
     */
    public OffsetDateTime getDateProperty() {
        if (this.dateProperty == null) {
            return null;
        }
        return this.dateProperty.getDateTime();
    }

    /**
     * Set the dateProperty property: UTC date/time value generated by the
     * service that indicates the time at which the response was initiated.
     *
     * @param dateProperty the dateProperty value to set.
     * @return the ContainerGetPropertiesHeaders object itself.
     */
    public ContainerGetPropertiesHeaders setDateProperty(OffsetDateTime dateProperty) {
        if (dateProperty == null) {
            this.dateProperty = null;
        } else {
            this.dateProperty = new DateTimeRfc1123(dateProperty);
        }
        return this;
    }

    /**
     * Get the blobPublicAccess property: Indicated whether data in the
     * container may be accessed publicly and the level of access. Possible
     * values include: 'container', 'blob'.
     *
     * @return the blobPublicAccess value.
     */
    public PublicAccessType getBlobPublicAccess() {
        return this.blobPublicAccess;
    }

    /**
     * Set the blobPublicAccess property: Indicated whether data in the
     * container may be accessed publicly and the level of access. Possible
     * values include: 'container', 'blob'.
     *
     * @param blobPublicAccess the blobPublicAccess value to set.
     * @return the ContainerGetPropertiesHeaders object itself.
     */
    public ContainerGetPropertiesHeaders setBlobPublicAccess(PublicAccessType blobPublicAccess) {
        this.blobPublicAccess = blobPublicAccess;
        return this;
    }

    /**
     * Get the hasImmutabilityPolicy property: Indicates whether the container
     * has an immutability policy set on it.
     *
     * @return the hasImmutabilityPolicy value.
     */
    public Boolean isHasImmutabilityPolicy() {
        return this.hasImmutabilityPolicy;
    }

    /**
     * Set the hasImmutabilityPolicy property: Indicates whether the container
     * has an immutability policy set on it.
     *
     * @param hasImmutabilityPolicy the hasImmutabilityPolicy value to set.
     * @return the ContainerGetPropertiesHeaders object itself.
     */
    public ContainerGetPropertiesHeaders setHasImmutabilityPolicy(Boolean hasImmutabilityPolicy) {
        this.hasImmutabilityPolicy = hasImmutabilityPolicy;
        return this;
    }

    /**
     * Get the hasLegalHold property: Indicates whether the container has a
     * legal hold.
     *
     * @return the hasLegalHold value.
     */
    public Boolean isHasLegalHold() {
        return this.hasLegalHold;
    }

    /**
     * Set the hasLegalHold property: Indicates whether the container has a
     * legal hold.
     *
     * @param hasLegalHold the hasLegalHold value to set.
     * @return the ContainerGetPropertiesHeaders object itself.
     */
    public ContainerGetPropertiesHeaders setHasLegalHold(Boolean hasLegalHold) {
        this.hasLegalHold = hasLegalHold;
        return this;
    }

    /**
     * Get the defaultEncryptionScope property: The default encryption scope
     * for the container.
     *
     * @return the defaultEncryptionScope value.
     */
    public String getDefaultEncryptionScope() {
        return this.defaultEncryptionScope;
    }

    /**
     * Set the defaultEncryptionScope property: The default encryption scope
     * for the container.
     *
     * @param defaultEncryptionScope the defaultEncryptionScope value to set.
     * @return the ContainerGetPropertiesHeaders object itself.
     */
    public ContainerGetPropertiesHeaders setDefaultEncryptionScope(String defaultEncryptionScope) {
        this.defaultEncryptionScope = defaultEncryptionScope;
        return this;
    }

    /**
     * Get the denyEncryptionScopeOverride property: Indicates whether the
     * container's default encryption scope can be overriden.
     *
     * @return the denyEncryptionScopeOverride value.
     */
    public Boolean isDenyEncryptionScopeOverride() {
        return this.denyEncryptionScopeOverride;
    }

    /**
     * Set the denyEncryptionScopeOverride property: Indicates whether the
     * container's default encryption scope can be overriden.
     *
     * @param denyEncryptionScopeOverride the denyEncryptionScopeOverride value
     * to set.
     * @return the ContainerGetPropertiesHeaders object itself.
     */
    public ContainerGetPropertiesHeaders setDenyEncryptionScopeOverride(Boolean denyEncryptionScopeOverride) {
        this.denyEncryptionScopeOverride = denyEncryptionScopeOverride;
        return this;
    }

    /**
     * Get the errorCode property: The errorCode property.
     *
     * @return the errorCode value.
     */
    public String getErrorCode() {
        return this.errorCode;
    }

    /**
     * Set the errorCode property: The errorCode property.
     *
     * @param errorCode the errorCode value to set.
     * @return the ContainerGetPropertiesHeaders object itself.
     */
    public ContainerGetPropertiesHeaders setErrorCode(String errorCode) {
        this.errorCode = errorCode;
        return this;
    }
}


text:
require 'spec_helper'

def verify_decode(client, key)
  method = "#{key}=".to_s
  client.send(method, "a{ae}b")
  expected = "aæb"
  client.send(key).should == expected
end

describe Client do
  fixtures(:events, :clients)

  describe "find with event" do

    before(:each) do
      @event = events(:pennsic_39)
    end
    it "Returns nil if the client does not exist" do
      result = Client.find_with_event(100, @account)
      result.should be_nil
    end
    it "Returns the client if it exists and belongs to the event" do
      client = clients(:anne)
      result = Client.find_with_event(client.id, @event)
      result.should eq(client)
    end
    it "Returns nil if the client exists but belongs to a different event" do
      result = Client.find_with_event(clients(:william).id, @event)
      result.should be_nil
    end
  end

  describe "get_counts" do
    # Add a simple scope for testing
    class Client
      scope :women, lambda { |event_id| where(:gender => 'Female', :event_id => event_id)}
    end

    before(:each) do
      @event = Event.new(:title => 'Test')
      @event.save!
    end

    def get_counts(scope)
      Client.get_counts(scope, @event)
    end

    def create_clients(sca_names, legal_names = nil, options = {})
      legal_names ||= sca_names.map {|n| "Name for #{n}"}
      sca_names.each_with_index do |sname, index|
        client = Client.new(:society_name => sname, :legal_name => legal_names[index],
           :address_1 => 'ignored', :address_2 => 'ignored', :kingdom => 'test',
           :event_id => @event.id)
        options.each_pair do |prop, values|
          client.send("#{prop}=", values[index])
        end
        client.save!
      end
    end

    it "returns an empty hash when there are no client" do
      get_counts(:every).should be_empty
    end

    it "returns counts on initial society_names" do
      sca_names = ["Abd", "Alaric", "Cecelia", "Robert"]
      create_clients(sca_names)
      get_counts(:every).should eq({'A' => 2, 'C' => 1, 'R' => 1})
    end

    it "uses legal names if society names are missing" do
      sca_names = ["Abd", "Alaric", nil, "Robert"]
      legal_names = ["John Smith", "Robert", "Jane", "William"]
      create_clients(sca_names, legal_names)
      get_counts(:every).should eq({'A' => 2, 'J' => 1, 'R' => 1})
    end

    it "uses scope" do
      sca_names = ["One", "Two", "Three", "Four"]
      genders = ["Female", "Male", "Male", "Female"]
      create_clients(sca_names, nil, :gender => genders)
      get_counts(:women).should eq({'O' => 1, 'F' => 1})
    end

  end

  describe "validation" do
    before(:each) do
      @event = events(:pennsic_39)
      @client = Client.new(
          :legal_name => 'John Smith',
          :address_1 => '100 Main St',
          :kingdom => 'East')
    end

    it "defaults are valid" do
      if (!@client.valid?)
        fail("Unexpected errors: #{@client.errors}")
      end
      @client.should be_valid
    end

    [:legal_name, :address_1, :kingdom].each do |item|
      it "requires #{item}" do
        @client.send("#{item}=", "")
        @client.should_not be_valid
        @client.should have(1).error_on(item)
      end
    end
  end

  describe "display name" do
    it "Returns SCA name if it exists" do
      result = clients(:anne)
      result.display_name.should eq(result.society_name)
    end

    it "Returns the legal name if SCA name does not exist" do
      result = clients(:no_name)
      result.display_name.should eq("<#{result.legal_name}>")
    end
  end

  describe "short_gender" do
    {"Female" => "F", "Male" => "M", "---" => "U" }.each do |gender, expected|
      it "should map #{gender} to #{expected}" do
        Client.new(:gender => gender).short_gender.should eq(expected)
      end
    end
  end

  [:society_name, :legal_name, :branch_name].each do |m|
    it "handles daud_encoding for #{m}" do
      verify_decode(Client.new, m)
    end
  end

end


text:
package org.apache.olingo.client.core.uri;

import static org.junit.Assert.assertEquals;

import java.io.UnsupportedEncodingException;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Collections;
import java.util.TimeZone;

import org.apache.olingo.commons.api.edm.EdmEnumType;
import org.apache.olingo.commons.api.edm.FullQualifiedName;
import org.apache.olingo.commons.api.edm.geo.Geospatial;
import org.apache.olingo.commons.api.edm.geo.Point;
import org.apache.olingo.commons.api.edm.provider.CsdlEnumType;
import org.apache.olingo.commons.core.Encoder;
import org.apache.olingo.commons.core.edm.EdmEnumTypeImpl;
import org.junit.Test;

public class URIEscapeTest {

  @Test
  public void _null() {
    assertEquals("null", URIUtils.escape( null));
  }

  @Test
  public void _boolean() {
    assertEquals("true", URIUtils.escape( Boolean.TRUE));
  }

  @Test
  public void _enum() throws UnsupportedEncodingException {
    final EdmEnumType pattern =
        new EdmEnumTypeImpl(null, new FullQualifiedName("Sales", "Pattern"), new CsdlEnumType());

    assertEquals("Sales.Pattern'Yellow'", URIUtils.escape( pattern.toUriLiteral("Yellow")));
  }

  @Test
  public void datetimeoffset() throws UnsupportedEncodingException {
    final Calendar calendar = Calendar.getInstance(TimeZone.getTimeZone("GMT+1"));
    calendar.clear();
    calendar.set(2014, 6, 11, 12, 30, 04);

    assertEquals(Encoder.encode("2014-07-11T12:30:04+01:00"),
        URIUtils.escape( calendar));
  }

  @Test
  public void geospatial() throws UnsupportedEncodingException {
    final Point point = new Point(Geospatial.Dimension.GEOGRAPHY, null);
    point.setX(142.1);
    point.setY(64.1);

    assertEquals(Encoder.encode("geography'SRID=4326;Point(142.1 64.1)'"),
        URIUtils.escape( point));
  }

  @Test
  public void collection() {
    assertEquals("[\"red\",\"green\"]",
        URIUtils.escape( Arrays.asList(new String[] { "red", "green" })));
  }

  @Test
  public void complex() {
    assertEquals("{\"Name\":\"Value\"}",
        URIUtils.escape( Collections.singletonMap("Name", "Value")));
  }
}


text:
Script for converting Charlesproxy output to a Postman json file.
For Python 2, use *charles\_to\_postman_27.py*; otherwise, use *charles\_to\_postman.py*

1) In Charlesproxy, choose File | Export Session...
2) Select the "JSON Session File" format
3) Use the resulting file as the input parameter for *charles\_to\_postman.py*

```
 usage: charles_to_postman.py [-h] -i INPUT -o OUTPUT -n NAME

 Charlesproxy to Postman converter

 optional arguments:
   -h, --help            show this help message and exit

 required arguments:
   -i INPUT, --input INPUT
                         Input file in the *.chlsj format
   -o OUTPUT, --output OUTPUT
                         Output file
   -n NAME, --name NAME  Name of the target Postman collection```


text:
#ifndef CPPSORT_COMPARATORS_PROJECTION_COMPARE_H_
#define CPPSORT_COMPARATORS_PROJECTION_COMPARE_H_

////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <tuple>
#include <utility>
#include <cpp-sort/utility/as_function.h>
#include <cpp-sort/utility/branchless_traits.h>
#include <cpp-sort/utility/functional.h>
#include "../detail/config.h"
#include "../detail/raw_checkers.h"
#include "../detail/type_traits.h"

namespace cppsort
{
    template<typename Compare, typename Projection>
    class projection_compare:
        public detail::raw_check_is_transparent<Compare, Projection>
    {
        private:

            std::tuple<Compare, Projection> data;

        public:

            projection_compare() = default;

            projection_compare(Compare compare, Projection projection):
                data(std::move(compare), std::move(projection))
            {}

            template<typename T1, typename T2>
            constexpr auto operator()(T1&& x, T2&& y) &
                noexcept(noexcept(utility::as_function(std::get<0>(data))(
                    utility::as_function(std::get<1>(data))(std::forward<T1>(x)),
                    utility::as_function(std::get<1>(data))(std::forward<T2>(y))
                )))
                -> decltype(utility::as_function(std::get<0>(data))(
                    utility::as_function(std::get<1>(data))(std::forward<T1>(x)),
                    utility::as_function(std::get<1>(data))(std::forward<T2>(y))
                ))
            {
                auto&& comp = utility::as_function(std::get<0>(data));
                auto&& proj = utility::as_function(std::get<1>(data));
                return comp(proj(std::forward<T1>(x)), proj(std::forward<T2>(y)));
            }

            template<typename T1, typename T2>
            constexpr auto operator()(T1&& x, T2&& y) const&
                noexcept(noexcept(utility::as_function(std::get<0>(data))(
                    utility::as_function(std::get<1>(data))(std::forward<T1>(x)),
                    utility::as_function(std::get<1>(data))(std::forward<T2>(y))
                )))
                -> decltype(utility::as_function(std::get<0>(data))(
                    utility::as_function(std::get<1>(data))(std::forward<T1>(x)),
                    utility::as_function(std::get<1>(data))(std::forward<T2>(y))
                ))
            {
                auto&& comp = utility::as_function(std::get<0>(data));
                auto&& proj = utility::as_function(std::get<1>(data));
                return comp(proj(std::forward<T1>(x)), proj(std::forward<T2>(y)));
            }

            template<typename T1, typename T2>
            constexpr auto operator()(T1&& x, T2&& y) &&
                noexcept(noexcept(utility::as_function(std::get<0>(data))(
                    utility::as_function(std::get<1>(data))(std::forward<T1>(x)),
                    utility::as_function(std::get<1>(data))(std::forward<T2>(y))
                )))
                -> decltype(utility::as_function(std::get<0>(data))(
                    utility::as_function(std::get<1>(data))(std::forward<T1>(x)),
                    utility::as_function(std::get<1>(data))(std::forward<T2>(y))
                ))
            {
                auto&& comp = utility::as_function(std::get<0>(data));
                auto&& proj = utility::as_function(std::get<1>(data));
                return comp(proj(std::forward<T1>(x)), proj(std::forward<T2>(y)));
            }

            template<typename T1, typename T2>
            constexpr auto operator()(T1&& x, T2&& y) const&&
                noexcept(noexcept(utility::as_function(std::get<0>(data))(
                    utility::as_function(std::get<1>(data))(std::forward<T1>(x)),
                    utility::as_function(std::get<1>(data))(std::forward<T2>(y))
                )))
                -> decltype(utility::as_function(std::get<0>(data))(
                    utility::as_function(std::get<1>(data))(std::forward<T1>(x)),
                    utility::as_function(std::get<1>(data))(std::forward<T2>(y))
                ))
            {
                auto&& comp = utility::as_function(std::get<0>(data));
                auto&& proj = utility::as_function(std::get<1>(data));
                return comp(proj(std::forward<T1>(x)), proj(std::forward<T2>(y)));
            }

            ////////////////////////////////////////////////////////////
            // Accessors

            constexpr auto comparison() const
                -> Compare
            {
                return std::get<0>(data);
            }

            constexpr auto projection() const
                -> Projection
            {
                return std::get<1>(data);
            }
    };

    ////////////////////////////////////////////////////////////
    // Helper for projection_compare construction

    namespace detail
    {
        template<typename Compare, typename Projection>
        struct proj_comp_impl
        {
            using type = projection_compare<Compare, Projection>;

            template<typename C, typename P>
            static constexpr auto construct(C&& comp, P&& proj)
                -> type
            {
                return type(std::forward<C>(comp), std::forward<P>(proj));
            }
        };

        template<typename Compare>
        struct proj_comp_impl<Compare, utility::identity>
        {
            using type = Compare;

            static constexpr auto construct(const Compare& comp, const utility::identity&)
                -> type
            {
                return comp;
            }

            static constexpr auto construct(Compare&& comp, const utility::identity&)
                -> type
            {
                return comp;
            }
        };

#if CPPSORT_STD_IDENTITY_AVAILABLE
        template<typename Compare>
        struct proj_comp_impl<Compare, std::identity>
        {
            using type = Compare;

            static constexpr auto construct(const Compare& comp, const std::identity&)
                -> type
            {
                return comp;
            }

            static constexpr auto construct(Compare&& comp, const std::identity&)
                -> type
            {
                return comp;
            }
        };
#endif
    }

    ////////////////////////////////////////////////////////////
    // make_projection_compare

    template<typename Compare, typename Projection>
    constexpr auto make_projection_compare(Compare&& compare, Projection&& projection)
        -> typename detail::proj_comp_impl<std::decay_t<Compare>, std::decay_t<Projection>>::type
    {
        return detail::proj_comp_impl<std::decay_t<Compare>, std::decay_t<Projection>>::construct(
            std::forward<Compare>(compare), std::forward<Projection>(projection)
        );
    }

    namespace utility
    {
        template<typename Compare, typename Projection, typename T>
        struct is_probably_branchless_comparison<projection_compare<Compare, Projection>, T>:
            cppsort::detail::conjunction<
                is_probably_branchless_projection<Projection, T>,
                is_probably_branchless_comparison<
                    Compare,
                    cppsort::detail::invoke_result_t<Projection, T>
                >
            >
        {};
    }
}

#endif // CPPSORT_COMPARATORS_PROJECTION_COMPARE_H_


text:
package com.diozero.api;

import org.tinylog.Logger;

import com.diozero.internal.spi.InternalServoDeviceInterface;
import com.diozero.internal.spi.ServoDeviceFactoryInterface;
import com.diozero.sbc.DeviceFactoryHelper;

/**
 * Provide Servo device control.
 */
public class ServoDevice extends GpioDevice {
	public static final int DEFAULT_FREQUENCY = 50;

	public static Builder newBuilder(int pwmOrGpio) {
		return new Builder(pwmOrGpio);
	}

	public static Builder newBuilder(PinInfo pinInfo) {
		return new Builder(pinInfo);
	}

	public static class Builder {
		private int pwmOrGpio;
		private PinInfo pinInfo;
		private int frequency = DEFAULT_FREQUENCY;
		private ServoTrim trim = ServoTrim.DEFAULT;
		private Integer initialPulseWidthUs;
		private boolean inverted = false;
		private ServoDeviceFactoryInterface deviceFactory;

		public Builder(int pwmOrGpio) {
			this.pwmOrGpio = pwmOrGpio;
		}

		public Builder(PinInfo pinInfo) {
			this.pinInfo = pinInfo;
		}

		public Builder setFrequency(int frequency) {
			this.frequency = frequency;
			return this;
		}

		public Builder setTrim(ServoTrim trim) {
			this.trim = trim;
			return this;
		}

		public Builder setInitialPulseWidthUs(int initialPulseWidthUs) {
			this.initialPulseWidthUs = Integer.valueOf(initialPulseWidthUs);
			return this;
		}

		public Builder setInverted(boolean inverted) {
			this.inverted = inverted;
			return this;
		}

		public Builder setDeviceFactory(ServoDeviceFactoryInterface deviceFactory) {
			this.deviceFactory = deviceFactory;
			return this;
		}

		public ServoDevice build() {
			// Default to the native device factory if not set
			if (deviceFactory == null) {
				deviceFactory = DeviceFactoryHelper.getNativeDeviceFactory();
			}

			if (pinInfo == null) {
				pinInfo = deviceFactory.getBoardPinInfo().getByPwmOrGpioNumberOrThrow(pwmOrGpio);
			}

			if (initialPulseWidthUs == null) {
				initialPulseWidthUs = Integer.valueOf(trim.getMidPulseWidthUs());
			}

			return new ServoDevice(deviceFactory, pinInfo, frequency, trim, initialPulseWidthUs.intValue(), inverted);
		}
	}

	private InternalServoDeviceInterface delegate;
	private ServoTrim trim;

	/**
	 * @param deviceFactory       Device factory to use to provision this device.
	 * @param pinInfo             GPIO to which the output device is connected.
	 * @param frequency           Servo frequency (Hz).
	 * @param trim                Servo min / mid / max pulse widths and angle
	 *                            mapping
	 * @param initialPulseWidthUs Initial servo pulse width in microseconds
	 * @param inverted            If the output is inverted, i.e. min is output as
	 *                            max and vice versa
	 * @throws RuntimeIOException If an I/O error occurred.
	 */
	public ServoDevice(ServoDeviceFactoryInterface deviceFactory, PinInfo pinInfo, int frequency, ServoTrim trim,
			int initialPulseWidthUs, boolean inverted) throws RuntimeIOException {
		super(pinInfo);

		this.delegate = deviceFactory.provisionServoDevice(pinInfo, frequency, trim.getMinPulseWidthUs(),
				trim.getMaxPulseWidthUs(), initialPulseWidthUs);
		this.trim = trim;
	}

	@Override
	public void close() {
		Logger.trace("close()");
		Logger.trace("Setting value to 0");
		try {
			delegate.setPulseWidthUs(0);
		} catch (RuntimeIOException e) {
			// Ignore
		}
		delegate.close();
		Logger.trace("device closed");
	}

	// Exposed operations

	/**
	 * Get the current servo pulse width in microseconds.
	 *
	 * @return Current output pulse width value.
	 * @throws RuntimeIOException If an I/O error occurred.
	 */
	public int getPulseWidthUs() throws RuntimeIOException {
		return delegate.getPulseWidthUs();
	}

	/**
	 * Set the servo pulse width value in microseconds.
	 *
	 * @param pulseWidthUs New pulse width value in microseconds.
	 * @throws RuntimeIOException If an I/O error occurred.
	 */
	public void setPulseWidthUs(int pulseWidthUs) throws RuntimeIOException {
		if (pulseWidthUs < trim.getMinPulseWidthUs() || pulseWidthUs > trim.getMaxPulseWidthUs()) {
			throw new IllegalArgumentException("Invalid pulse width value (" + pulseWidthUs + " us), range "
					+ trim.getMinPulseWidthUs() + ".." + trim.getMaxPulseWidthUs());
		}
		delegate.setPulseWidthUs(pulseWidthUs);
	}

	public int getServoFrequency() {
		return delegate.getServoFrequency();
	}

	public void setServoFrequency(int frequency) throws RuntimeIOException {
		delegate.setServoFrequency(frequency);
	}

	/**
	 * Get the device on / off status.
	 *
	 * @return Returns true if the device currently has a value > 0.
	 * @throws RuntimeIOException If an I/O error occurred.
	 */
	public boolean isOn() throws RuntimeIOException {
		return delegate.getPulseWidthUs() > 0;
	}

	/**
	 * Get the current servo angle where 90 degrees is the middle position
	 *
	 * @return Servo angle (90 degrees is middle)
	 */
	public float getAngle() {
		return Math.round(trim.convertPulseWidthUsToAngle(getPulseWidthUs()));
	}

	/**
	 * Turn the servo to the specified angle where 90 is the middle position
	 *
	 * @param angle Servo angle (90 degrees is middle)
	 */
	public void setAngle(float angle) {
		setPulseWidthUs(trim.convertAngleToPulseWidthUs(Math.round(angle)));
	}

	/**
	 * Set the servo relative value where -1 is the minimum angle and 1 is the
	 * maximum angle.
	 *
	 * @param value relative value -1..1 that maps to min..max
	 */
	public void setValue(float value) {
		setPulseWidthUs(trim.convertValueToPulseWidthUs(value));
	}

	public void min() {
		setPulseWidthUs(trim.getMinPulseWidthUs());
	}

	public void mid() {
		setPulseWidthUs(trim.getMidPulseWidthUs());
	}

	public void max() {
		setPulseWidthUs(trim.getMaxPulseWidthUs());
	}
}


text:
<!DOCTYPE html>

  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <meta name="description" content="Bulma v0.5.0 is an open source CSS framework based on Flexbox and built with Sass. It's 100% responsive, fully modular, and available for free.">

  <title>Tags | Bulma v0.5.0: a modern CSS framework based on Flexbox</title>

  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css">
  <link rel="stylesheet" href="http://bulma.io/versions/0.5.0/css/bulma-docs.css">

  <link rel="canonical" href="http://bulma.io/versions/0.5.0/documentation/elements/tag/">
  <link rel="alternate" type="application/rss+xml" title="Bulma v0.5.0: a modern CSS framework based on Flexbox" href="http://bulma.io/versions/0.5.0/feed.xml">

  <meta property="og:url" content="http://bulma.io/versions/0.5.0">
  <meta property="og:type" content="website">
  <meta property="og:title" content="Bulma v0.5.0: a modern CSS framework based on Flexbox">
  <meta property="og:image" content="http://bulma.io/versions/0.5.0/images/bulma-banner.png">
  <meta property="og:image:type" content="image/png">
  <meta property="og:image:width" content="1200">
  <meta property="og:image:height" content="630">
  <meta property="og:description" content="Bulma v0.5.0 is an open source CSS framework based on Flexbox and built with Sass. It's 100% responsive, fully modular, and available for free.">

  <meta name="twitter:card" content="summary_large_image">
  <meta name="twitter:site" content="@jgthms">
  <meta name="twitter:creator" content="@jgthms">
  <meta name="twitter:title" content="Bulma v0.5.0: a modern CSS framework based on Flexbox">
  <meta name="twitter:image" content="http://bulma.io/versions/0.5.0/images/bulma-banner.png">
  <meta name="twitter:description" content="Bulma v0.5.0 is an open source CSS framework based on Flexbox and built with Sass. It's 100% responsive, fully modular, and available for free.">

  <link rel="apple-touch-icon" sizes="180x180" href="http://bulma.io/versions/0.5.0/favicons/apple-touch-icon.png?v=201701041855">
  <link rel="icon" type="image/png" href="http://bulma.io/versions/0.5.0/favicons/favicon-32x32.png?v=201701041855" sizes="32x32">
  <link rel="icon" type="image/png" href="http://bulma.io/versions/0.5.0/favicons/favicon-16x16.png?v=201701041855" sizes="16x16">
  <link rel="manifest" href="http://bulma.io/versions/0.5.0/favicons/manifest.json?v=201701041855">
  <link rel="mask-icon" href="http://bulma.io/versions/0.5.0/favicons/safari-pinned-tab.svg?v=201701041855" color="#00d1b2">
  <link rel="shortcut icon" href="http://bulma.io/versions/0.5.0/favicons/favicon.ico?v=201701041855">
  <meta name="msapplication-config" content="http://bulma.io/versions/0.5.0/favicons/browserconfig.xml?v=201701041855">
  <meta name="theme-color" content="#00d1b2">

      You are viewing the deprecated 0.5.0 version of the website.
      Click here to view the latest version

        Home

          Docs

            Overview

            Modifiers

            Grid

            Form

            Elements

              Components

            Layout

                0.5.0

                  View all versions

          Blog

                  24 Jul 2017

Access previous Bulma versions

                  10 Mar 2017

New field element (for better controls)

                  11 Apr 2016

Metro UI CSS grid with Bulma tiles

            More posts

                    Stay up to date!

                      Subscribe

          More

                    Extensions

                    Side projects to enhance Bulma

        Github

        Twitter

              Tweet

              Download

            Documentation

            Everything you need to create a website with Bulma

            Overview

            Modifiers

            Grid

            Form

            Elements

              Components

            Layout

        Box

        Button

        Content

        Delete

        Icon

        Image

        Notification

        Progress

        Table

        Tag

        Title

Tags

      Small tag labels to insert anywhere

      Colors

        Yes

      Sizes

        Yes

      Variables

        Yes

        By default, a tag is a 1.5rem high label.

          Tag label

<span class="tag">
  Tag label
</span>

  Colors

    #

        Like with buttons, there are 9 different colors available.

            Black

            Dark

            Light

            White

            Primary

            Info

            Success

            Warning

          Danger

<span class="tag is-black">Black</span>
<span class="tag is-dark">Dark</span>
<span class="tag is-light">Light</span>
<span class="tag is-white">White</span>
<span class="tag is-primary">Primary</span>
<span class="tag is-info">Info</span>
<span class="tag is-success">Success</span>
<span class="tag is-warning">Warning</span>
<span class="tag is-danger">Danger</span>

  Sizes

    #

        And 2 additional sizes.

            Medium

            Large

<span class="tag is-primary is-medium">Medium</span>
<span class="tag is-info is-large">Large</span>

  Modifiers

    #

        You can add the is-rounded modifier to make a rounded tag.

Rounded

<span class="tag is-rounded">Rounded</span>

        You can add the is-delete modifier to turn the tag into a delete button.

<a class="tag is-delete"></a>

  Combinations

    #

        You can append a delete button.

            Bar
            <button class="delete is-small"></button>

            Hello
            <button class="delete is-small"></button>

            World
            <button class="delete"></button>

<span class="tag is-success">
  Bar
  <button class="delete is-small"></button>
</span>
<span class="tag is-warning is-medium">
  Hello
  <button class="delete is-small"></button>
</span>
<span class="tag is-danger is-large">
  World
  <button class="delete"></button>
</span>

  List of tags

    #

      New!
      0.5.0

            You can now create a list of tags with the .tags container.

  One
  Two
  Three

<div class="tags">
  <span class="tag">One</span>
  <span class="tag">Two</span>
  <span class="tag">Three</span>
</div>

            If the list is very long, it will automatically wrap on multiple lines, while keeping all tags evenly spaced.

  One
  Two
  Three
  Four
  Five
  Six
  Seven
  Eight
  Nine
  Ten
  Eleven
  Twelve
  Thirteen
  Fourteen
  Fifteen
  Sixteen
  Seventeen
  Eighteen
  Nineteen
  Twenty

<div class="tags">
  <span class="tag">One</span>
  <span class="tag">Two</span>
  <span class="tag">Three</span>
  <span class="tag">Four</span>
  <span class="tag">Five</span>
  <span class="tag">Six</span>
  <span class="tag">Seven</span>
  <span class="tag">Eight</span>
  <span class="tag">Nine</span>
  <span class="tag">Ten</span>
  <span class="tag">Eleven</span>
  <span class="tag">Twelve</span>
  <span class="tag">Thirteen</span>
  <span class="tag">Fourteen</span>
  <span class="tag">Fifteen</span>
  <span class="tag">Sixteen</span>
  <span class="tag">Seventeen</span>
  <span class="tag">Eighteen</span>
  <span class="tag">Nineteen</span>
  <span class="tag">Twenty</span>
</div>

            You can attach tags together with the .has-addons modifier.

  Package
  Bulma

<div class="tags has-addons">
  <span class="tag">Package</span>
  <span class="tag is-primary">Bulma</span>
</div>

            You can attach a text tag with a delete tag together.

  Alex Smith

<div class="tags has-addons">
  <span class="tag is-danger">Alex Smith</span>
  <a class="tag is-delete"></a>
</div>

            If you want to attach .tags containers together, simply use the .field element with the .is-grouped and .is-grouped-multiline modifiers.

      npm
      0.5.0

      build
      passing

      chat
      on gitter

<div class="field is-grouped is-grouped-multiline">
  <div class="control">
    <div class="tags has-addons">
      <span class="tag is-dark">npm</span>
      <span class="tag is-info">0.5.0</span>
    </div>
  </div>

  <div class="control">
    <div class="tags has-addons">
      <span class="tag is-dark">build</span>
      <span class="tag is-success">passing</span>
    </div>
  </div>

  <div class="control">
    <div class="tags has-addons">
      <span class="tag is-dark">chat</span>
      <span class="tag is-primary">on gitter</span>
    </div>
  </div>
</div>

            This can be useful for a long list of blog tags.

      Technology

      CSS

      Flexbox

      Web Design

      Open Source

      Community

      Documentation

<div class="field is-grouped is-grouped-multiline">
  <div class="control">
    <div class="tags has-addons">
      <span class="tag is-info">Technology</span>
      <a class="tag is-delete"></a>
    </div>
  </div>

  <div class="control">
    <div class="tags has-addons">
      <span class="tag is-info">CSS</span>
      <a class="tag is-delete"></a>
    </div>
  </div>

  <div class="control">
    <div class="tags has-addons">
      <span class="tag is-info">Flexbox</span>
      <a class="tag is-delete"></a>
    </div>
  </div>

  <div class="control">
    <div class="tags has-addons">
      <span class="tag is-info">Web Design</span>
      <a class="tag is-delete"></a>
    </div>
  </div>

  <div class="control">
    <div class="tags has-addons">
      <span class="tag is-info">Open Source</span>
      <a class="tag is-delete"></a>
    </div>
  </div>

  <div class="control">
    <div class="tags has-addons">
      <span class="tag is-info">Community</span>
      <a class="tag is-delete"></a>
    </div>
  </div>

  <div class="control">
    <div class="tags has-addons">
      <span class="tag is-info">Documentation</span>
      <a class="tag is-delete"></a>
    </div>
  </div>
</div>

  Variables

    #

    You can use these variables to customize this element. Simply set one or multiple of these variables before importing Bulma. Learn how.

      Name
      Default value

      Name
      Default value

          $tag-background-color

          background

          $tag-color

          text

      This page is open source.
      Noticed a typo?
      Or something unclear?

        Improve this page on GitHub

Bulma Partners

Check out their products!

Bulma Newsletter

Get notified when v1 is ready!

          <form action="https://bbxdesign.us3.list-manage.com/subscribe/post?u=b43b93fe633f0560b2a72a69c&id=52585e8803" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate>

                  <input type="email" value="" name="EMAIL" class="input is-flat required email" id="mce-EMAIL" placeholder="email address" required>

                  <input type="submit" value="Subscribe" name="subscribe" id="mc-embedded-subscribe" class="button is-white is-outlined">

                <input type="text" name="b_b43b93fe633f0560b2a72a69c_52585e8803" tabindex="-1" value="">

          </form>

          Bulma by Jeremy Thomas.

            @jgthms

            Support and share the love!

            Tweet

            <form class="paypal-form" action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
              <input type="hidden" name="cmd" value="_s-xclick">
              <input type="hidden" name="hosted_button_id" value="8WMKYSRFN6A78">
              <input type="image" src="http://bulma.io/versions/0.5.0/images/paypal-donate.png" border="0" name="submit" alt="PayPal – The safer, easier way to pay online." height="30">

            </form>

            More helpful tools:

        Source code licensed MIT.

        Website content licensed CC BY-NC-SA 4.0.


text:
module.exports = {
  description: "",
  ns: "react-material-ui",
  type: "ReactNode",
  dependencies: {
    npm: {
      "material-ui/svg-icons/hardware/keyboard-arrow-right": require('material-ui/svg-icons/hardware/keyboard-arrow-right')
    }
  },
  name: "HardwareKeyboardArrowRight",
  ports: {
    input: {},
    output: {
      component: {
        title: "HardwareKeyboardArrowRight",
        type: "Component"
      }
    }
  }
}


text:
package org.netlight.messaging;

import org.netlight.util.TimeProperty;

import java.util.Iterator;
import java.util.List;

/**
 * @author ahmad
 */
public interface MessageQueue {

    Message STOP_MESSAGE = new Message();

    boolean add(Message message);

    boolean addAll(List<Message> messages);

    Message poll();

    Message poll(TimeProperty timeout);

    Message take();

    Iterator<Message> iterator();

    List<Message> removeAll();

    void tryStop();

}


text:
#region MIT
//
#endregion
using System;
using System.Linq.Expressions;

namespace socket4net
{
    /// <summary>
    ///
    /// </summary>
    /// <typeparam name="T"></typeparam>
    public static class Add<T>
    {
        private static bool _compiled;
        private static Func<T, T, T> _function;
        public static Func<T, T, T> Function
        {
            get
            {
                if (_compiled) return _function;
                _function = Compile();
                _compiled = true;
                return _function;
            }
        }

        private static Func<T, T, T> Compile()
        {
            var px = Expression.Parameter(typeof(T), "x");
            var py = Expression.Parameter(typeof(T), "y");
            var addExp = Expression.Add(px, py);

            return Expression.Lambda<Func<T, T, T>>(addExp, new[] { px, py }).Compile();
        }
    }
}


text:
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <color name="colorPrimary">#393A3E</color>
    <color name="colorPrimaryDark">#74BB2A</color>
    <color name="colorAccent">#FF4081</color>
    <color name="enable">#19AD17</color>
    <color name="disable">#0e6e0d</color>
</resources>


text:
/* Generated code */
import ReservePhoneNumberResource from './ReservePhoneNumberResource';

interface ReservePhoneNumbersRecordsResource {

	records?: ReservePhoneNumberResource[];
}

export default ReservePhoneNumbersRecordsResource;


text:
package org.onosproject.vtnrsc.routerinterface;

import org.onosproject.event.AbstractEvent;
import org.onosproject.vtnrsc.RouterInterface;

/**
 * Describes network Router Interface event.
 */
public class RouterInterfaceEvent
        extends AbstractEvent<RouterInterfaceEvent.Type, RouterInterface> {

    /**
     * Type of Router Interface events.
     */
    public enum Type {
        /**
         * Signifies that router interface has been added.
         */
        ROUTER_INTERFACE_PUT,
        /**
         * Signifies that router interface has been removed.
         */
        ROUTER_INTERFACE_DELETE
    }

    /**
     * Creates an event of a given type and for the specified Router Interface.
     *
     * @param type Router Interface event type
     * @param routerInterface Router Interface subject
     */
    public RouterInterfaceEvent(Type type, RouterInterface routerInterface) {
        super(type, routerInterface);
    }

    /**
     * Creates an event of a given type and for the specified Router Interface.
     *
     * @param type Router Interface event type.
     * @param routerInterface Router Interface subject
     * @param time occurrence time
     */
    public RouterInterfaceEvent(Type type, RouterInterface routerInterface,
                                long time) {
        super(type, routerInterface, time);
    }
}


text:
package hash

import "crypto/md5"

// Hashing with MD5
func HashMD5(input string) string {
	return HashWith(md5.New(), input)
}


text:
/* Cstraw - a wrapper header file for making C++ functions associated with retrieving
 * data from .hic files available to C libraries.  The underlying functions come
 * from the Straw library by the Aiden Lab at the Broad Institute (see
 * kent/src/hg/lib/straw/).
*/
#ifndef CSTRAW_H
#define CSTRAW_H

char* Cstraw (char *norm, char *fname, int binsize, char *chr1loc, char *chr2loc, char *unit, int **xActual, int **yActual, double **counts, int *numRecords);
/* Wrapper function to retrieve a data chunk from a .hic file, for use by C libraries.
 * norm is one of NONE/VC/VC_SQRT/KR.
 * binsize is one of the supported bin sizes as determined by CstrawHeader.
 * chr1loc and chr2loc are the two positions to retrieve interaction data for, specified as chr:start-end.
 * unit is one of BP/FRAG.
 * Values are returned in newly allocated arrays in xActual, yActual, and counts, with the number of
 * returned records in numRecords.
 * The function returns NULL unless an error was encountered, in which case the return value points
 * to a character string explaining the error. */

char* CstrawHeader (char *filename, char **genome, char ***chromNames, int *nChroms, char ***bpResolutions, int *nBpRes, char ***fragResolutions, int *nFragRes);
/* Wrapper function to retrieve header fields from a .hic file, for use by C libraries.
 * This retrieves the assembly name, list of chromosome names, list of available binsize resolutions,
 * and list of available fragment resolutions in the specific .hic file.
 * The function returns NULL unless an error was encountered, in which case the return value points
 * to a character string explaining the error. */
#endif


text:
package com.ubiqlog.sensors;

import java.util.Date;
import com.ubiqlog.annotation.SMSAnnotation;
import com.ubiqlog.common.Setting;
import com.ubiqlog.core.DataAcquisitor;
import com.ubiqlog.utils.IOManager;
import com.ubiqlog.utils.JsonEncodeDecode;

import android.app.Service;
import android.content.Context;
import android.content.Intent;
import android.database.ContentObserver;
import android.database.Cursor;
import android.net.Uri;
import android.os.Handler;
import android.os.IBinder;
import android.util.Log;

public class SMSSensor extends Service implements SensorConnector {

	private static String lastId = "";

	@Override
	public IBinder onBind(Intent intent) {
		return null;
	}

	@Override
	public void onCreate() {
		Log.d("SMS-Logging", "--- onCreate");
	}

	@Override
	public void onDestroy() {
		Log.d("SMS-Logging", "--- onDestroy");
	}

	@Override
	public void onStart(Intent intent, int startId) {
		Log.d("SMS-Logging", "--- onStart");
		readSensor();
	}
	@Override
	public int onStartCommand(Intent intent, int flags, int startId) {
		Log.d("SMS-Logging", "--- onStartCommand");
		readSensor();
		return START_STICKY;
	}

	Cursor smsCur;

	public void readSensor() {

		Handler handler = new Handler();
		smsCur = getContentResolver().query(Uri.parse("content://sms"), null,
				null, null, null); //
		smsCur.registerContentObserver(new SMSContentObserver(handler, this));
	}

	class SMSContentObserver extends ContentObserver {
		int id = smsCur.getColumnIndex("_id");
		int address = smsCur.getColumnIndex("address"); // phone number
		int person = smsCur.getColumnIndex("person");
		int date = smsCur.getColumnIndex("date"); // date
		int protocol = smsCur.getColumnIndex("protocol");
		int status = smsCur.getColumnIndex("status");
		int type = smsCur.getColumnIndex("type");
		int body = smsCur.getColumnIndex("body"); // msg's content
		int reply_path_present = smsCur.getColumnIndex("reply_path_present");
		int subject = smsCur.getColumnIndex("subject");
		int service_center = smsCur.getColumnIndex("service_center");
		private Context _ctx = null;

		public SMSContentObserver(Handler handler, Context ctx) {
			super(handler);
			_ctx = ctx;
		}

		@Override
		public void onChange(boolean arg0) {
			try {
				smsCur.requery();

				// it can happen that smsCur is empty! not null!
				if (smsCur.moveToFirst()) {
					SMSAnnotation smsannot = new SMSAnnotation(getApplicationContext());
					String jsonString = "";
					if (Setting.GROUP_TEST){
						// It is group test and SMS content will be removed + number getremoved
						String tmpsmsAdd = smsCur.getString(address);
						if (smsCur.getString(address).length() >8){
							tmpsmsAdd = tmpsmsAdd.substring(0, tmpsmsAdd.length()-5);
							tmpsmsAdd = tmpsmsAdd + "#####";
						}
						jsonString = JsonEncodeDecode.EncodeSms(
								"SMS",
								tmpsmsAdd,
								smsCur.getInt(type),
								new Date(smsCur.getLong(date)),
								"ANONYMIZED",
								Setting.Instance(_ctx).SMS_ANNOTATION,
								Setting.Instance(_ctx).SMS_ANNOTATION ? smsannot.annotate(smsCur.getString(address)) : "");

					}else {
						 jsonString = JsonEncodeDecode.EncodeSms(
								"SMS",
								smsCur.getString(address),
								smsCur.getInt(type),
								new Date(smsCur.getLong(date)),
								smsCur.getString(body),
								Setting.Instance(_ctx).SMS_ANNOTATION,
								Setting.Instance(_ctx).SMS_ANNOTATION ? smsannot.annotate(smsCur.getString(address)) : "");

					}

					// we log just the sent and received messages! type: 1 and 2
					// it can happen that this will be called more than once for
					// the same message -> that is why we compare the id with
					// the last logged id.
					if ((smsCur.getInt(type) == 1 || smsCur.getInt(type) == 2)
							&& !smsCur.getString(id).equals(lastId)) {
						lastId = smsCur.getString(id);
						Log.e("-----------SMS-------------",jsonString);
						DataAcquisitor.dataBuff.add(jsonString);
					}
				}

			} catch (Exception e) {
				IOManager errlogger = new IOManager();
				errlogger.logError("[SMSSensor] error:" + e.getMessage()
						+ " Stack:" + Log.getStackTraceString(e));
				e.printStackTrace();
			}

			super.onChange(arg0);
		}

		@Override
		public boolean deliverSelfNotifications() {
			return true;
		}

	}

}


text:
var repository = require('./js/repository.js');

var supportedTeams = [
  {
    'name': 'G2007',
    'url': 'http://skeid.no/portal/theme/team/main.do?teamId=10489',
  },
  {
    'name': 'G2009',
    'url': 'http://skeid.no/portal/theme/team/main.do?teamId=16047',
  }
];

repository.connect(function() {
  repository.replaceTeams(supportedTeams, function(error, teams) {
    console.log("Re-wrote configuration for " + teams.length + " teams");
    repository.deleteSubscribers(function(error, numDeleted) {
      console.log("Deleted " + numDeleted + " subscribers");
      repository.close();
    });
  });
});


text:
package it.angelic.soulissclient.model.db;

import android.database.Cursor;
import android.util.Log;

public class SoulissGraphData {

    public float average;
    public float max;
    public float min;

    String key;

    public SoulissGraphData() {
        super();
    }

    public SoulissGraphData(Cursor cursor) {
        //MONTH index zero based
        key = cursor.getString(0);
        //average = cursor.getFloat(1);
        //max = cursor.getFloat(3);
        //min = cursor.getFloat(2);
        int decimalPlaces = 1;

        min = cursor.getFloat(2);
        max = cursor.getFloat(3);
        average = cursor.getFloat(1);

        Log.d("GRAPHDATA", "key=" + key + " AVG=" + average + " MAX=" + max + " MIN=" + min);
    }

}


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<link rel="stylesheet" href="style.css" type="text/css">
<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type">
<link rel="Start" href="index.html">
<link rel="previous" href="Blist.Assoc.html">
<link rel="next" href="Blist.Traverse.html">
<link rel="Up" href="Blist.html">
<link title="Index of types" rel=Appendix href="index_types.html">
<link title="Index of exceptions" rel=Appendix href="index_exceptions.html">
<link title="Index of values" rel=Appendix href="index_values.html">
<link title="Index of modules" rel=Appendix href="index_modules.html">
<link title="Index of module types" rel=Appendix href="index_module_types.html">
<link title="Barray" rel="Chapter" href="Barray.html">
<link title="Barray_slice" rel="Chapter" href="Barray_slice.html">
<link title="Barraylabels" rel="Chapter" href="Barraylabels.html">
<link title="Bbool" rel="Chapter" href="Bbool.html">
<link title="Bchar" rel="Chapter" href="Bchar.html">
<link title="Bfloat" rel="Chapter" href="Bfloat.html">
<link title="Bformat" rel="Chapter" href="Bformat.html">
<link title="Bfun" rel="Chapter" href="Bfun.html">
<link title="Bhash" rel="Chapter" href="Bhash.html">
<link title="Bhashtbl" rel="Chapter" href="Bhashtbl.html">
<link title="Bheap" rel="Chapter" href="Bheap.html">
<link title="Bint" rel="Chapter" href="Bint.html">
<link title="Bint64" rel="Chapter" href="Bint64.html">
<link title="Blist" rel="Chapter" href="Blist.html">
<link title="Blistlabels" rel="Chapter" href="Blistlabels.html">
<link title="Bmap" rel="Chapter" href="Bmap.html">
<link title="Bopt" rel="Chapter" href="Bopt.html">
<link title="Bord" rel="Chapter" href="Bord.html">
<link title="Bpair" rel="Chapter" href="Bpair.html">
<link title="Bparse" rel="Chapter" href="Bparse.html">
<link title="Brandom" rel="Chapter" href="Brandom.html">
<link title="Bref" rel="Chapter" href="Bref.html">
<link title="Bresult" rel="Chapter" href="Bresult.html">
<link title="Bset" rel="Chapter" href="Bset.html">
<link title="Bstring" rel="Chapter" href="Bstring.html">
<link title="Bvector" rel="Chapter" href="Bvector.html">
<link title="Sequence" rel="Chapter" href="Sequence.html"><title>Blist.Ref</title>

Previous
 Up
 Next

Module Blist.Ref

module Ref: sig .. end

type 'a t = 'a list Pervasives.ref

val push : 'a t -> 'a -> unit

val pop : 'a t -> 'a option

val pop_exn : 'a t -> 'a

Unsafe version of Blist.Ref.pop.

Raises Failure if the list is empty

val create : unit -> 'a t

Create a new list reference

val clear : 'a t -> unit

Remove all elements

val lift : ('a list -> 'b) -> 'a t -> 'b

Apply a list function to the content

val push_list : 'a t -> 'a list -> unit

Add elements of the list at the beginning of the list ref. Elements
      at the end of the list will be at the beginning of the list ref


text:
const fse = require('fs-extra');
const path = require('path');

const colors = require('colors');
const frontmatter = require('frontmatter');
const marked = require('marked');
const hbs = require('handlebars');
const _ = require('lodash');

marked.setOptions({
	gfm: true,
	breaks: false,
	tables: true
});

var DocumentView = {};   // view for hbs templates
var templates = {};      // hbs template files
var childBlocks = [];    // contains block children; processed last

function addChildBlocks(blocks) {

	var attachChild = function(parent, child) {
		if ( !_.has(parent, 'children') ) parent.children = [];
		parent.children.push(child);
	}

	// look for the parent block in every category
	blocks.forEach(function(block) {
		_.forOwn(DocumentView, function(category) {

			category.blocks.forEach(function(categoryBlock) {
				if ( block.parent == categoryBlock.name ) {
					attachChild(categoryBlock, block);
				}
			});

		});
	});
};

function addBlock(block) {
	var catKey = _.camelCase(block.category);

	if ( catKey == "" ) return;

	// create the category if it doesn't already exist
	if ( !DocumentView[catKey] ) {
		DocumentView[catKey]  = {
			title: block.category,
			name: catKey,
			blocks: []
		}
	}

	DocumentView[catKey].blocks.push(block);
}

// returns a new component description string
// with `html_example` code blocks replaced
// inline with rendered/escaped output
function renderHtmlExamples(blockDescription) {
	return new String(
		blockDescription.replace(/```html_example\n(.|\n)*?\n```/g, function(match) {
			var example = _.trim(match.replace(/```html_example/, '').replace(/```/, '')),
				template = hbs.compile(templates.example);

			return template({
				html: example
			});
		})
	);
}

function parseDocComment(comment, file) {
	var cleanComment = _.trim(comment.replace(/\/\*doc/, '').replace(/\*\//, ''));
		C = frontmatter(cleanComment),
		block = {};

	if ( !C.data ) {
		console.error('ERROR: no data found in frontmatter. Make sure all comments have a description in addition to frontmatter.'.red)
		console.log("\t@ ".red, file);
		return;
	}

	block["name"] = C.data.name;
	block["title"] = C.data.title;
	block["category"] = C.data.category;
	block["parent"] = C.data.parent;
	block["description"] = marked( renderHtmlExamples(C.content) );

	if ( !block.category && block.parent ) {
		childBlocks.push(block); // this block belongs to another block
	} else if ( block.category ) {
		addBlock(block); // this is a category-level block
	}
}

function handleFile(file) {
	var content = fse.readFileSync(file, "utf8"),
		comments = content.match(/\/\*doc\n(.|\n)*?\n\*\//g);

	if ( comments ) {
		comments.forEach(c => parseDocComment(c, file));
	}
}

function parseFiles( src, dest ) {
	var files = [],
		template = hbs.compile(templates.layout);

	fse.walk( src )
		.on('data', function(file) {
			if ( fse.statSync(file.path).isFile() ) {
				files.push(file.path)
			}
		})
		.on('end', function() {

			files.forEach(handleFile);
			addChildBlocks(childBlocks);

			var doc = new Buffer(template({
				categoryObj: DocumentView
			}));

			fse.writeFile(dest + 'doc.html', doc, function(err) {
				if(err) {
					return console.log(err);
				}
				console.log('\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~'.rainbow);
				console.log("BUILD IS SUCCESS OK GOOD JOB NICE".cyan);
				console.log('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n'.rainbow);
			});
		})
}

function compile(configPath) {

	//
	// Pass the path to your `config.json` file to compile documentation
	//
	var config = fse.readFileSync( configPath, "utf8" );

	if ( config ) {
		var C = JSON.parse(config);

		// if the destination dir doesn't exist, create it
		fse.ensureDirSync(C.destination);

		// load hbs templates into global `templates` obj
		templates.layout = fse.readFileSync(C.templates.layout, "utf8");
		templates.example = fse.readFileSync(C.templates.example, "utf8");

		// read all files & populate DocumentView
		parseFiles( C.source, C.destination );

		// if a static assets dir has been specified,
		// copy that dir to the build destination
		if ( C.assets ) {
			C.assets.forEach(function(assetDir) {
				try {
					fse.copySync( assetDir, C.destination );
				} catch (err) {
					console.error('\nCould not copy static assets dir to ' + C.destination + "\n" + err.message + "\n")
				}
			})
		}
	}
}

//Run from command line.
if (process.argv[2]) {
	compile(process.argv[2]);
}

module.exports = {
	compile: compile
}


text:
var UsersController = require('./UsersController');
var StorageController = require('./StorageController');
var FileTransferController = require('./FileTransferController');

module.exports = {
    users: UsersController,
    storage: StorageController,
    fileTransfer: FileTransferController,
};


text: #include "introspection.hpp"


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.

using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.CodeAnalysis.Completion;
using Microsoft.CodeAnalysis.Editor.Shared.Extensions;
using Microsoft.CodeAnalysis.Text;
using Microsoft.VisualStudio.Imaging.Interop;
using Microsoft.VisualStudio.Language.Intellisense;
using Roslyn.Utilities;

namespace Microsoft.CodeAnalysis.Editor.Implementation.IntelliSense.Completion.Presentation
{
    internal sealed class CustomCommitCompletion : Completion3, ICustomCommit
    {
        private static readonly string s_glyphCompletionWarning = "GlyphCompletionWarning";
        private readonly CompletionPresenterSession _completionPresenterSession;
        internal readonly CompletionItem CompletionItem;
        private readonly ImageMoniker _imageMoniker;

        public CustomCommitCompletion(
            CompletionPresenterSession completionPresenterSession,
            CompletionItem completionItem)
        {
            // PERF: Note that the base class contains a constructor taking the displayText string
            // but we're intentionally NOT using that here because it allocates a private CompletionState
            // object. By overriding the public property getters (DisplayText, InsertionText, etc.) the
            // extra allocation is avoided.
            _completionPresenterSession = completionPresenterSession;
            this.CompletionItem = completionItem;
            _imageMoniker = ImageMonikers.GetImageMoniker(CompletionItem.Tags);
        }

        public void Commit()
        {
            // If a commit happens through the UI then let the session know.  It will, in turn,
            // let the underlying controller know, and the controller can commit the completion
            // item.
            _completionPresenterSession.OnCompletionItemCommitted(CompletionItem);
        }

        public override string DisplayText { get; set; }

        public override string InsertionText => DisplayText;

        public override string Description
        {
            get
            {
                // If the completion item has an async description, then we don't want to force it
                // to be computed here.  That will cause blocking on the UI thread.  Note: the only
                // caller of this is the VS tooltip code which uses the presence of the Description
                // to then decide to show the tooltip.  But once they decide to show the tooltip,
                // they defer to us to get the contents for it asynchronously.  As such, we just want
                // to give them something non-empty so they know to go get the async description.
                return "...";
            }
        }

        public async Task<CompletionDescription> GetDescriptionAsync(CancellationToken cancellationToken)
        {
            var document = await GetDocumentAsync(cancellationToken).ConfigureAwait(false);
            var service = CompletionService.GetService(document);
            return await service.GetDescriptionAsync(document, this.CompletionItem, cancellationToken).ConfigureAwait(false);
        }

        private Task<Document> GetDocumentAsync(CancellationToken cancellationToken)
        {
            return _completionPresenterSession.SubjectBuffer.CurrentSnapshot.AsText().GetDocumentWithFrozenPartialSemanticsAsync(cancellationToken);
        }

        public string GetDescription_TestingOnly()
        {
            return GetDescriptionAsync(CancellationToken.None).WaitAndGetResult(CancellationToken.None).Text;
        }

        public override ImageMoniker IconMoniker => _imageMoniker;

        public override string IconAutomationText
        {
            get
            {
                return _imageMoniker.ToString();
            }
        }

        public override IEnumerable<CompletionIcon> AttributeIcons
        {
            get
            {
                if (this.CompletionItem.Tags.Contains(CompletionTags.Warning))
                {
                    return new[] { new CompletionIcon2(Glyph.CompletionWarning.GetImageMoniker(), s_glyphCompletionWarning, s_glyphCompletionWarning) };
                }

                return null;
            }

            set
            {
                throw new NotImplementedException();
            }
        }
    }
}