text:
package main;

import java.awt.event.KeyEvent;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.ForkJoinPool;

import javax.imageio.ImageIO;
import javax.script.ScriptException;
import javax.swing.*;

import gui.Main_GUI_Panel;
import gui.Mama_Tile;
import tools.*;
import file.Img;
import file.Input;
import gui.Image_Tile;
import gui_system.*;

public class IMP { // main function

	// elements
	static List<Img> loaded_images;
	public static Img opened_image;
	public static BufferedImage preview_image;
	public static Menu menu;
	public static Preferences preferences;

	// functionality
	public static List<Tool> tools;
	public static List<Gadget> gadgets;
	public static List<Tool> routines;
	public static List<Menulizable> commands;
	public static Tool active_tool;
	public static Tool previous_tool;
	public static boolean routine_in_process;
	public static ForkJoinPool thread_pool;

	// Events
	public static Image_Informant image_informant;
	public static Global_Keys_Informant global_keys_informant;
	public static Tool_Broadcaster action_informant;

	// GUI
	public static JFrame main_window;
	public static Main_GUI_Panel main_panel;
	public static Mama_Tile mama;
	public static Image_Tile active_image_tile;
	public static Tile tool_sidepanel;
	public static Tile gadget_sidepanel;

	public static void main(String[] args) {
		thread_pool = new ForkJoinPool();
		// initiate event agents
		image_informant = new Image_Informant();
		global_keys_informant = new Global_Keys_Informant();
		action_informant = new Tool_Broadcaster();

		// initiate important structures
		loaded_images = new ArrayList<Img>();

		// initiate funcionality
		initialize_tools();
		initialize_routines();
		initialize_commands();
		preferences = new Preferences();

		// initiate user interface
		menu = new Menu();
		main_panel = new Main_GUI_Panel();
		main_window = new JFrame();
		main_window.add(main_panel);
		main_window.addWindowListener(new WindowClosingAdapter());
		main_window.setSize(1200, 600);
		main_window.setLocation(100, 100);
		main_window.setVisible(true);

		tools.get(0).activate();
		gadgets.get(0).activate();

		// update miscellaneous
		menu.refresh_menu();
	}

	static void initialize_tools() {
		tools = new ArrayList<>();
		tools.add(new Tool_Brush());
		tools.add(new Tool_Polygon_Selection());
		tools.add(new Tool_Selection());
		tools.add(new Tool_Selection_better());
		tools.add(new Tool_3D());
		tools.add(new Tool_2D());
		active_tool = tools.get(0);

		gadgets = new ArrayList<>();
		gadgets.add(new Gadget_Layers());
		gadgets.add(new Gadget_Information());
	}

	static void initialize_routines() {
		routines = new ArrayList<>();
		routines.add(new Routine_New_Image());
		routines.add(new Routine_Export_File());
		routines.add(new Routine_Pythagoras_Tree());
		routines.add(new Routine_Mandelbrot());
		routines.add(new Routine_Pattern_Caro());
		routines.add(new Routine_Pattern_Triangle());
		routines.add(new Routine_Brightness());
		routines.add(new Routine_Contrast());
		routines.add(new Routine_About_The_Program());
		routines.add(new Routine_Open_Image());
		routines.add(new Routine_Blur());
		routines.add(new Routine_Filter());
		routines.add(new Routine_Resize());
		routines.add(new Routine_Segment());
		routines.add(new Routine_EdgeDetection());
		routines.add(new Routine_EdgeDetection2());
	}

	static void initialize_commands() {
		commands = new ArrayList<Menulizable>();
		commands.add(new Command_close_file());
		commands.add(new Command_exit());
		commands.add(new Command("toggle menubar", "toggle_menubar", "View"));
		commands.add(new Command("toggle sidepanel", "toggle_sidepanel", "View"));
		for (Tool r : routines) {
			commands.add(r);
		}
		for (Tool t : tools) {
			commands.add(t);
		}
	}

	public static void apply_action(String action) {
		if (action.equals("new_file")) {
			// sidepanel.upperPanel.load_routine(IMP.routines.get(0));
		}
		else if (action.equals("toggle_menubar")) {
			mama.toggleComponent(mama.MENUBAR);
		}
		else if (action.equals("toggle_sidepanel")) {
			mama.toggleComponent(mama.SIDEPANEL);
		}
		else if (action.equals("open_file")) {
			// Create a file chooser
			JFileChooser fc = new JFileChooser();

			int returnVal = fc.showOpenDialog(main_window);
			if (returnVal == JFileChooser.APPROVE_OPTION) {
				File file = fc.getSelectedFile();
				Input.scan_document(file);
			}
			else {
			}
		}
		else if (action.equals("save_file")) {

			// Create a file chooser
			JFileChooser fc = new JFileChooser();

			int returnVal = fc.showSaveDialog(main_window);
			if (returnVal == JFileChooser.APPROVE_OPTION) {
				File file = fc.getSelectedFile();
				try {
					// save the image
					ImageIO.write(IMP.opened_image.getImage(), "png", file);
				} catch (IOException e) {
				}
			}
			else {
			}
		}

		else if (action.equals("export_as_bmp")) {
			File file = new File(IMP.opened_image.path + "-"
					+ IMP.opened_image.filename + ".bmp");
			try {
				ImageIO.write(IMP.opened_image.getImage(), "bmp", file);
			} catch (IOException e) {
				e.printStackTrace();
			}
		}

		else if (action.equals("export_as_gif")) {
			File file = new File(IMP.opened_image.path + "-"
					+ IMP.opened_image.filename + ".gif");
			try {
				ImageIO.write(IMP.opened_image.getImage(), "gif", file);
			} catch (IOException e) {
				e.printStackTrace();
			}
		}

		else if (action.equals("export_as_jpeg")) {
			File file = new File(IMP.opened_image.path + "-"
					+ IMP.opened_image.filename + ".jpg");
			try {
				ImageIO.write(IMP.opened_image.getImage(), "jpeg", file);
			} catch (IOException e) {
				e.printStackTrace();
			}
		}

		else if (action.equals("export_as_png")) {
			File file = new File(IMP.opened_image.path + "-"
					+ IMP.opened_image.filename + ".png");
			try {
				ImageIO.write(IMP.opened_image.getImage(), "png", file);
			} catch (IOException e) {
				e.printStackTrace();
			}
		}

		else if (action.equals("close_file")) {
			file.Img.fileMade = false;
			IMP.opened_image = null;
			// IMP.main_image_panel.load_image(null);
			IMP.image_informant.inform_about_new_image(null);
			IMP.menu.refresh_menu();
		}
		if (action.equals("show_sidepanel")) {
			if (tool_sidepanel.visible) {
				tool_sidepanel.hide();
			}
			else {
				tool_sidepanel.visible = true;
			}
		}
		else if (action.equals("exit")) {
			System.out.println("exiting");
			main_window.dispose();
		}
	}

	public static Menulizable get_command_by_key(char key) {
		Menulizable result = null;
		for (Menulizable c : commands) {
			if (c.get_key_shortcut() == key) {
				result = c;
				break;
			}
		}
		return result;
	}

	public static void key_pressed(KeyEvent e) {
		if (e.isControlDown()) {
			Menulizable c = get_command_by_key(Character.toLowerCase((char) e.getKeyCode()));
			if (c != null && c.safe_to_activate()) {
				c.activate();
			}
		}
	}

}


text:
/*
* Created by MassivePixelCreation
*
* Version 1.0
*
* This is a jQuery file for styles-switcher.
*
*/

jQuery(document).ready(function($) {
	$('#mpc-styles-switcher').animate({
   	  left: '-240'
  	}, 1000, 'easeOutExpo', function(){

  	});

  	$('.ss-dropdown').customStyle();

  	$('#ss-bookmark').click(function() {
		var container = $(this).parent().parent().find('#mpc-styles-switcher');
		//alert(container.position().left);
		if(container.position().left < 0){
			container.animate({
   	  			left: '0'
  			}, 1000, 'easeOutExpo', function(){

  			});
		} else {
			container.animate({
   	  			left: '-240'
  			}, 1000, 'easeOutExpo', function(){

  			});
		}
  	});

  	$('.ss-color').click(function() {
  		$(this).parent().find('div').trigger('click');
  	});

  	/*  Color Picker */
	$('.ss-colorSelector').each(function() {
		var Othis = this; //cache a copy of the this variable for use inside nested function
		var initialColor = $(Othis).next('input').attr('value');

		$(this).ColorPicker({
			color: initialColor,
			onShow: function (colpkr) {
				$(colpkr).fadeIn(500);
				return false;
			},
			onHide: function (colpkr) {
				$(colpkr).fadeOut(500);
				return false;
			},
			onChange: function (hsb, hex, rgb) {
				$(Othis).children('div').css('backgroundColor', '#' + hex);
				$(Othis).next('input').attr('value','#' + hex);
				$(Othis).next('input').trigger('change');
			}
		});
	});

	/* Choose Image */
	$('.ss-image input:checked').each(function() {
		$(this).parent().find('img').css('background-color', '#717171');
	});

	$('.ss-image img').click(function() {
		$('.ss-image img').each(function() {
			$(this).css('background-color', '#FFFFFF');
			$(this).parent().find('input').removeAttr("checked");
		});

		if($(this).css('background-color') == "rgb(255, 255, 255)"){
			$(this).css('background-color', '#717171');
		} else {
			$(this).css('background-color', '#FFFFFF');
		}

		$(this).parent().find('input').attr("checked", "checked");
		$(this).parent().find('input').trigger('change');
	});

	/*-----------------------------------------------------------------------------------*/
	/*	On Settings Change, Change CSS...
	/*-----------------------------------------------------------------------------------*/

	// dropdown
	$('#ss_fb_dropdown').change(function() {
		var preview = $(this).val();

		if(preview == "main") {
			window.location = "http://www.mpcreation.pl/flipbook/html/";
		} else if (preview == "brochure") {
			window.location = "http://www.mpcreation.pl/flipbook/html/" + preview + "/#3";
		} else {
			window.location = "http://www.mpcreation.pl/flipbook/html/" + preview + "/";
		}
	});

	$('#ss_fb_menu').change(function() {
		var menu = $(this).val(),
		i = 0,
		last = $('div.flipbook-container div.fb-nav li').length-1;

		if(menu == "stacked") {
			$('div.flipbook-container div.fb-nav').removeClass('spread').addClass('stacked');
			i = 0;
			$('div.flipbook-container div.fb-nav ul li').each(function(){
				$(this).removeClass('round');
				if(i == 0){
					$(this).addClass('left');
				} else if ( i == last ) {
					$(this).addClass('right');
				} else {
					$(this).addClass('center');
				}
				i++;
			});
		} else if (menu == "spread") {
			$('div.flipbook-container div.fb-nav').removeClass('stacked').addClass('spread');
			i = 0;
			$('div.flipbook-container div.fb-nav ul li').each(function(){
				$(this).removeClass('left, right, center');
				$(this).addClass('round');
				i++;
			});
		}

		var navWidth = 0,
			i = 0,
			fbNav = $('div.flipbook-container div.fb-nav');

		fbNav.find('ul li').each(function() {
			var $this = $(this);

			if($this.hasClass('left')) {
				navWidth += 97;
			} else if ($this.hasClass('center')) {
				navWidth += 89;
			} else if ($this.hasClass('right')) {
				navWidth += 95;
			} else if ($this.hasClass('round')) {
				if(i == 0) {
					navWidth += 86;
					$this.css('margin-left', '0px');
				 } else {
					navWidth += 96;
				}
			}
			i++;
		});

		fbNav.width(navWidth);
	});

	// background-color
	$('#inc_bg_color').change(function() {
		var color = $(this).val();

		$('body').css('background-color', color);
	});

	// body text color
	$('#inc_body_color').change(function() {
		var color = $(this).val();

		$("body, .nav_menu li a, .message_button:hover a.lern_more, li.widget li a, .tabs ul li a, .tagcloud a, .twitter_widget .twtr-widget p, .twitter_widget #twtr-widget-2 .twtr-bd p, #twtr-widget-2 .twtr-tweet .twtr-tweet-text em a, .twitter_message #twtr-widget-1 .twtr-doc p a, input:hover#searchsubmit, .accordion_title a, a.btn, a.read_more, a.more-link, h1.post_title a:hover, span.related_caption, #main_content .filter li a,  #commentform input:focus, #comment_form input:focus, #commentform textarea:focus, #comment_form textarea:focus, h5.author_name a:hover, .cancel-comment-reply small a, .comments_form_who p a:hover, h4.portfolio_title a:hover, .coment_author span a:hover, .message_button:hover span.message_arrow").css('color', color);
	});

	// hover text color
	$('#inc_second_color').change(function() {
		var color = $(this).val();

		$("a:hover, a.lern_more, a.btn:hover, a:hover.read_more, a:hover.more-link, a:hover.comment-reply-link, #main_content .filter li:hover a, #main_content .filter li.active a, li.widget a:hover, .tagcloud a:hover, input#searchsubmit, .page_title, .author_name, .tabs ul li.active a, .post_title a, .post_meta a:hover, #pagination a:hover, p.coment_author, #commentform input:hover.send, #comment_form button:hover.send, #comment_form input:hover.reset, #commentform input:hover.reset, .dropmenu a:hover, .dropmenu .sub-menu a:hover, .dropmenu .current-menu-item a:hover, .dropmenu .current-menu-item > a, .dropmenu .sub-menu li.current-menu-item > a, .portfolio_title a, .tabs ul li a:hover, h5.author_name a, h1.post_title a, .comments_form_who p a, div.toggle-header h3.toggle-title a:hover, .cancel-comment-reply small a:hover, h4.portfolio_title a, .widget_title, .coment_author span, span.related_caption, span.message_arrow").css('cssText', 'color: ' +color+' !important');

		$("span.message_arrow").css('background-color', color);
	});

	// background patterns
	$('#ss_background_pattern input').change(function() {
		var pattern = $(this).val();
		$('body').css('background-image', "url(http://www.mpcreation.pl/flipbook/html/"+pattern+")");

		if(pattern == "patterns/p22.png") {
			$('body').css('background-size', '100% 100%');
			$('body').css('background-repeat', 'no-repeat');
		} else {
			$('body').css('background-repeat', 'repeat');
			$('body').css('background-size', 'auto');
		}
	});

	// heading text color
	$('#inc_heading_color').change(function() {
		var color = $(this).val();
		$("#inc_content h1, #inc_content h2, #inc_content h3, #inc_content h4, #inc_content h5, #inc_content h6").css('color', color);
	});

	// welcome message color
	$('#inc_message_color').change(function() {
		var color = $(this).val();
		$(".message_text h2").css('color', color);
	});

	// twitter message color
	$('#inc_twitter_message_color').change(function() {
		var color = $(this).val();
		$(".twtr-tweet-text p").css('cssText', 'color: ' +color+' !important');
	});

});

redpajama_set_name: RedPajamaGithub


text:
package org.develnext.jphp.debug.impl.command;

import org.develnext.jphp.debug.impl.Debugger;
import org.develnext.jphp.debug.impl.command.support.CommandArguments;
import org.w3c.dom.Document;
import org.w3c.dom.Element;

public class UnimplementedCommand extends AbstractCommand {
    protected final String name;

    public UnimplementedCommand(String name) {
        this.name = name;
    }

    @Override
    public String getName() {
        return name;
    }

    @Override
    public void run(Debugger context, CommandArguments args, Document result) {
        Element response = createResponse(args, result);

        Element error = result.createElement("error");
        error.setAttribute("code", "4"); // unimplemented

        response.appendChild(error);
    }
}


text:
#pragma once
#include <aws/securityhub/SecurityHub_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/securityhub/model/AwsEcsClusterConfigurationDetails.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/securityhub/model/AwsEcsClusterClusterSettingsDetails.h>
#include <aws/securityhub/model/AwsEcsClusterDefaultCapacityProviderStrategyDetails.h>
#include <utility>

namespace Aws
{
namespace Utils
{
namespace Json
{
  class JsonValue;
  class JsonView;
} // namespace Json
} // namespace Utils
namespace SecurityHub
{
namespace Model
{

  /**
   *
provides details about an ECS cluster.

See Also:
   AWS
   * API Reference

   */
  class AWS_SECURITYHUB_API AwsEcsClusterDetails
  {
  public:
    AwsEcsClusterDetails();
    AwsEcsClusterDetails(Aws::Utils::Json::JsonView jsonValue);
    AwsEcsClusterDetails& operator=(Aws::Utils::Json::JsonView jsonValue);
    Aws::Utils::Json::JsonValue Jsonize() const;

    /**
     *
The short name of one or more capacity providers to associate with the
     * cluster.

     */
    inline const Aws::Vector<Aws::String>& GetCapacityProviders() const{ return m_capacityProviders; }

    /**
     *
The short name of one or more capacity providers to associate with the
     * cluster.

     */
    inline bool CapacityProvidersHasBeenSet() const { return m_capacityProvidersHasBeenSet; }

    /**
     *
The short name of one or more capacity providers to associate with the
     * cluster.

     */
    inline void SetCapacityProviders(const Aws::Vector<Aws::String>& value) { m_capacityProvidersHasBeenSet = true; m_capacityProviders = value; }

    /**
     *
The short name of one or more capacity providers to associate with the
     * cluster.

     */
    inline void SetCapacityProviders(Aws::Vector<Aws::String>&& value) { m_capacityProvidersHasBeenSet = true; m_capacityProviders = std::move(value); }

    /**
     *
The short name of one or more capacity providers to associate with the
     * cluster.

     */
    inline AwsEcsClusterDetails& WithCapacityProviders(const Aws::Vector<Aws::String>& value) { SetCapacityProviders(value); return *this;}

    /**
     *
The short name of one or more capacity providers to associate with the
     * cluster.

     */
    inline AwsEcsClusterDetails& WithCapacityProviders(Aws::Vector<Aws::String>&& value) { SetCapacityProviders(std::move(value)); return *this;}

    /**
     *
The short name of one or more capacity providers to associate with the
     * cluster.

     */
    inline AwsEcsClusterDetails& AddCapacityProviders(const Aws::String& value) { m_capacityProvidersHasBeenSet = true; m_capacityProviders.push_back(value); return *this; }

    /**
     *
The short name of one or more capacity providers to associate with the
     * cluster.

     */
    inline AwsEcsClusterDetails& AddCapacityProviders(Aws::String&& value) { m_capacityProvidersHasBeenSet = true; m_capacityProviders.push_back(std::move(value)); return *this; }

    /**
     *
The short name of one or more capacity providers to associate with the
     * cluster.

     */
    inline AwsEcsClusterDetails& AddCapacityProviders(const char* value) { m_capacityProvidersHasBeenSet = true; m_capacityProviders.push_back(value); return *this; }

    /**
     *
The setting to use to create the cluster. Specifically used to configure
     * whether to enable CloudWatch Container Insights for the cluster.

     */
    inline const Aws::Vector<AwsEcsClusterClusterSettingsDetails>& GetClusterSettings() const{ return m_clusterSettings; }

    /**
     *
The setting to use to create the cluster. Specifically used to configure
     * whether to enable CloudWatch Container Insights for the cluster.

     */
    inline bool ClusterSettingsHasBeenSet() const { return m_clusterSettingsHasBeenSet; }

    /**
     *
The setting to use to create the cluster. Specifically used to configure
     * whether to enable CloudWatch Container Insights for the cluster.

     */
    inline void SetClusterSettings(const Aws::Vector<AwsEcsClusterClusterSettingsDetails>& value) { m_clusterSettingsHasBeenSet = true; m_clusterSettings = value; }

    /**
     *
The setting to use to create the cluster. Specifically used to configure
     * whether to enable CloudWatch Container Insights for the cluster.

     */
    inline void SetClusterSettings(Aws::Vector<AwsEcsClusterClusterSettingsDetails>&& value) { m_clusterSettingsHasBeenSet = true; m_clusterSettings = std::move(value); }

    /**
     *
The setting to use to create the cluster. Specifically used to configure
     * whether to enable CloudWatch Container Insights for the cluster.

     */
    inline AwsEcsClusterDetails& WithClusterSettings(const Aws::Vector<AwsEcsClusterClusterSettingsDetails>& value) { SetClusterSettings(value); return *this;}

    /**
     *
The setting to use to create the cluster. Specifically used to configure
     * whether to enable CloudWatch Container Insights for the cluster.

     */
    inline AwsEcsClusterDetails& WithClusterSettings(Aws::Vector<AwsEcsClusterClusterSettingsDetails>&& value) { SetClusterSettings(std::move(value)); return *this;}

    /**
     *
The setting to use to create the cluster. Specifically used to configure
     * whether to enable CloudWatch Container Insights for the cluster.

     */
    inline AwsEcsClusterDetails& AddClusterSettings(const AwsEcsClusterClusterSettingsDetails& value) { m_clusterSettingsHasBeenSet = true; m_clusterSettings.push_back(value); return *this; }

    /**
     *
The setting to use to create the cluster. Specifically used to configure
     * whether to enable CloudWatch Container Insights for the cluster.

     */
    inline AwsEcsClusterDetails& AddClusterSettings(AwsEcsClusterClusterSettingsDetails&& value) { m_clusterSettingsHasBeenSet = true; m_clusterSettings.push_back(std::move(value)); return *this; }

    /**
     *
The run command configuration for the cluster.

     */
    inline const AwsEcsClusterConfigurationDetails& GetConfiguration() const{ return m_configuration; }

    /**
     *
The run command configuration for the cluster.

     */
    inline bool ConfigurationHasBeenSet() const { return m_configurationHasBeenSet; }

    /**
     *
The run command configuration for the cluster.

     */
    inline void SetConfiguration(const AwsEcsClusterConfigurationDetails& value) { m_configurationHasBeenSet = true; m_configuration = value; }

    /**
     *
The run command configuration for the cluster.

     */
    inline void SetConfiguration(AwsEcsClusterConfigurationDetails&& value) { m_configurationHasBeenSet = true; m_configuration = std::move(value); }

    /**
     *
The run command configuration for the cluster.

     */
    inline AwsEcsClusterDetails& WithConfiguration(const AwsEcsClusterConfigurationDetails& value) { SetConfiguration(value); return *this;}

    /**
     *
The run command configuration for the cluster.

     */
    inline AwsEcsClusterDetails& WithConfiguration(AwsEcsClusterConfigurationDetails&& value) { SetConfiguration(std::move(value)); return *this;}

    /**
     *
The default capacity provider strategy for the cluster. The default capacity
     * provider strategy is used when services or tasks are run without a specified
     * launch type or capacity provider strategy.

     */
    inline const Aws::Vector<AwsEcsClusterDefaultCapacityProviderStrategyDetails>& GetDefaultCapacityProviderStrategy() const{ return m_defaultCapacityProviderStrategy; }

    /**
     *
The default capacity provider strategy for the cluster. The default capacity
     * provider strategy is used when services or tasks are run without a specified
     * launch type or capacity provider strategy.

     */
    inline bool DefaultCapacityProviderStrategyHasBeenSet() const { return m_defaultCapacityProviderStrategyHasBeenSet; }

    /**
     *
The default capacity provider strategy for the cluster. The default capacity
     * provider strategy is used when services or tasks are run without a specified
     * launch type or capacity provider strategy.

     */
    inline void SetDefaultCapacityProviderStrategy(const Aws::Vector<AwsEcsClusterDefaultCapacityProviderStrategyDetails>& value) { m_defaultCapacityProviderStrategyHasBeenSet = true; m_defaultCapacityProviderStrategy = value; }

    /**
     *
The default capacity provider strategy for the cluster. The default capacity
     * provider strategy is used when services or tasks are run without a specified
     * launch type or capacity provider strategy.

     */
    inline void SetDefaultCapacityProviderStrategy(Aws::Vector<AwsEcsClusterDefaultCapacityProviderStrategyDetails>&& value) { m_defaultCapacityProviderStrategyHasBeenSet = true; m_defaultCapacityProviderStrategy = std::move(value); }

    /**
     *
The default capacity provider strategy for the cluster. The default capacity
     * provider strategy is used when services or tasks are run without a specified
     * launch type or capacity provider strategy.

     */
    inline AwsEcsClusterDetails& WithDefaultCapacityProviderStrategy(const Aws::Vector<AwsEcsClusterDefaultCapacityProviderStrategyDetails>& value) { SetDefaultCapacityProviderStrategy(value); return *this;}

    /**
     *
The default capacity provider strategy for the cluster. The default capacity
     * provider strategy is used when services or tasks are run without a specified
     * launch type or capacity provider strategy.

     */
    inline AwsEcsClusterDetails& WithDefaultCapacityProviderStrategy(Aws::Vector<AwsEcsClusterDefaultCapacityProviderStrategyDetails>&& value) { SetDefaultCapacityProviderStrategy(std::move(value)); return *this;}

    /**
     *
The default capacity provider strategy for the cluster. The default capacity
     * provider strategy is used when services or tasks are run without a specified
     * launch type or capacity provider strategy.

     */
    inline AwsEcsClusterDetails& AddDefaultCapacityProviderStrategy(const AwsEcsClusterDefaultCapacityProviderStrategyDetails& value) { m_defaultCapacityProviderStrategyHasBeenSet = true; m_defaultCapacityProviderStrategy.push_back(value); return *this; }

    /**
     *
The default capacity provider strategy for the cluster. The default capacity
     * provider strategy is used when services or tasks are run without a specified
     * launch type or capacity provider strategy.

     */
    inline AwsEcsClusterDetails& AddDefaultCapacityProviderStrategy(AwsEcsClusterDefaultCapacityProviderStrategyDetails&& value) { m_defaultCapacityProviderStrategyHasBeenSet = true; m_defaultCapacityProviderStrategy.push_back(std::move(value)); return *this; }

  private:

    Aws::Vector<Aws::String> m_capacityProviders;
    bool m_capacityProvidersHasBeenSet;

    Aws::Vector<AwsEcsClusterClusterSettingsDetails> m_clusterSettings;
    bool m_clusterSettingsHasBeenSet;

    AwsEcsClusterConfigurationDetails m_configuration;
    bool m_configurationHasBeenSet;

    Aws::Vector<AwsEcsClusterDefaultCapacityProviderStrategyDetails> m_defaultCapacityProviderStrategy;
    bool m_defaultCapacityProviderStrategyHasBeenSet;
  };

} // namespace Model
} // namespace SecurityHub
} // namespace Aws


text:
Datatrans Payment XML API PHP Client
====================================

A PHP client library for the [Datatrans Payment XML API](https://www.datatrans.ch/showcase/).

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

You can install this library through [Composer](https://getcomposer.org/).

````bash
$ composer require orca-services/datatrans-xml-api-client
````

Documentation
-------------

Check out the [documentation](docs/Home.md) on how to use this library.

Change log
----------

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

TODO
----

- Authorisation API
- Unit tests
- Travis CI integration
- Scrutinizer CI integration
- Logging integration
- Better request & response abstraction
- Status API request type switch (STA/STX) support
- General API version switch support
- "errorEmail" support for Settlement Request
- Consider using [HTTPlug](http://httplug.io/)
- Adapt some more PHP packages best practices

Similar Projects
----------------

Datatrans Authorisation by Ibrows
https://github.com/ibrows/datatrans

Datatrans Symfony2 bundle by Valiton
https://github.com/valiton/DatatransBundle


text:
package org.zuinnote.hadoop.office.format.common.converter.datatypes;

import java.io.Serializable;

/**
 *
 *
 */
public class GenericFloatDataType extends GenericNumericDataType implements Serializable {

	/**
	 *
	 */
	private static final long serialVersionUID = -2622303571110011876L;

}


text:
package com.olddriver.ui.widget;

import android.content.Context;
import android.util.AttributeSet;
import android.widget.ScrollView;

/**
 * An extension to {@link ScrollView} which exposes a scroll listener.
 */
public class ObservableScrollView extends ScrollView {

    private OnScrollListener listener;

    public ObservableScrollView(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    public void setListener(OnScrollListener listener) {
        this.listener = listener;
    }

    @Override
    protected void onScrollChanged(int currentScrollX,
                                   int currentScrollY,
                                   int oldScrollX,
                                   int oldScrollY) {
        super.onScrollChanged(currentScrollX, currentScrollY, oldScrollX, oldScrollY);
        if (listener != null) {
            listener.onScrolled(currentScrollY);
        }
    }

    public interface OnScrollListener {
        void onScrolled(int scrollY);
    }
}


text:
package org.apache.bcel.verifier.structurals;

import java.io.PrintWriter;
import java.io.StringWriter;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
import java.util.Vector;

import org.apache.bcel.Const;
import org.apache.bcel.Repository;
import org.apache.bcel.classfile.JavaClass;
import org.apache.bcel.classfile.Method;
import org.apache.bcel.generic.ConstantPoolGen;
import org.apache.bcel.generic.InstructionHandle;
import org.apache.bcel.generic.JsrInstruction;
import org.apache.bcel.generic.MethodGen;
import org.apache.bcel.generic.ObjectType;
import org.apache.bcel.generic.RET;
import org.apache.bcel.generic.ReferenceType;
import org.apache.bcel.generic.ReturnInstruction;
import org.apache.bcel.generic.ReturnaddressType;
import org.apache.bcel.generic.Type;
import org.apache.bcel.verifier.PassVerifier;
import org.apache.bcel.verifier.VerificationResult;
import org.apache.bcel.verifier.Verifier;
import org.apache.bcel.verifier.exc.AssertionViolatedException;
import org.apache.bcel.verifier.exc.StructuralCodeConstraintException;
import org.apache.bcel.verifier.exc.VerifierConstraintViolatedException;

import org.checkerframework.checker.index.qual.NonNegative;
import org.checkerframework.dataflow.qual.Pure;

/**
 * This PassVerifier verifies a method of class file according to pass 3,
 * so-called structural verification as described in The Java Virtual Machine
 * Specification, 2nd edition.
 * More detailed information is to be found at the do_verify() method's
 * documentation.
 *
 * @see #do_verify()
 */

public final class Pass3bVerifier extends PassVerifier{
    /* TODO:    Throughout pass 3b, upper halves of LONG and DOUBLE
                        are represented by Type.UNKNOWN. This should be changed
                        in favour of LONG_Upper and DOUBLE_Upper as in pass 2. */

    /**
     * An InstructionContextQueue is a utility class that holds
     * (InstructionContext, ArrayList) pairs in a Queue data structure.
     * This is used to hold information about InstructionContext objects
     * externally --- i.e. that information is not saved inside the
     * InstructionContext object itself. This is useful to save the
     * execution path of the symbolic execution of the
     * Pass3bVerifier - this is not information
     * that belongs into the InstructionContext object itself.
     * Only at "execute()"ing
     * time, an InstructionContext object will get the current information
     * we have about its symbolic execution predecessors.
     */
    private static final class InstructionContextQueue {
        // The following two fields together represent the queue.
        /** The first elements from pairs in the queue. */
        private final List<InstructionContext> ics = new Vector<>();
        /** The second elements from pairs in the queue. */
        private final List<ArrayList<InstructionContext>> ecs = new Vector<>();

        /**
         * Adds an (InstructionContext, ExecutionChain) pair to this queue.
         *
         * @param ic the InstructionContext
         * @param executionChain the ExecutionChain
         */
        public void add(final InstructionContext ic, final ArrayList<InstructionContext> executionChain) {
            ics.add(ic);
            ecs.add(executionChain);
        }

        /**
         * Tests if InstructionContext queue is empty.
         *
         * @return true if the InstructionContext queue is empty.
         */
        public boolean isEmpty() {
            return ics.isEmpty();
        }

        /**
         * Removes a specific (InstructionContext, ExecutionChain) pair from their respective queues.
         *
         * @param i the index of the items to be removed
         */
        public void remove(final int i) {
            ics.remove(i);
            ecs.remove(i);
        }

        /**
         * Gets a specific InstructionContext from the queue.
         *
         * @param i the index of the item to be fetched
         * @return the indicated InstructionContext
         */
        public InstructionContext getIC(final int i) {
            return ics.get(i);
        }

        /**
         * Gets a specific ExecutionChain from the queue.
         *
         * @param i the index of the item to be fetched
         * @return the indicated ExecutionChain
         */
        public ArrayList<InstructionContext> getEC(final int i) {
            return ecs.get(i);
        }

        /**
         * Gets the size of the InstructionContext queue.
         *
         * @return the size of the InstructionQueue
         */
        @Pure
        public @NonNegative int size() {
            return ics.size();
        }
    } // end Inner Class InstructionContextQueue

    /** In DEBUG mode, the verification algorithm is not randomized. */
    private static final boolean DEBUG = true;

    /** The Verifier that created this. */
    private final Verifier myOwner;

    /** The method number to verify. */
    private final int methodNo;

    /**
     * This class should only be instantiated by a Verifier.
     *
     * @see org.apache.bcel.verifier.Verifier
     */
    public Pass3bVerifier(final Verifier owner, final int method_no) {
        myOwner = owner;
        this.methodNo = method_no;
    }

    /**
     * Whenever the outgoing frame
     * situation of an InstructionContext changes, all its successors are
     * put [back] into the queue [as if they were unvisited].
     * The proof of termination is about the existence of a
     * fix point of frame merging.
     */
    private void circulationPump(final MethodGen m,final ControlFlowGraph cfg, final InstructionContext start,
            final Frame vanillaFrame, final InstConstraintVisitor icv, final ExecutionVisitor ev) {
        final Random random = new Random();
        final InstructionContextQueue icq = new InstructionContextQueue();

        start.execute(vanillaFrame, new ArrayList<InstructionContext>(), icv, ev);
        // new ArrayList() <=>    no Instruction was executed before
        //                                    => Top-Level routine (no jsr call before)
        icq.add(start, new ArrayList<InstructionContext>());

        // LOOP!
        while (!icq.isEmpty()) {
            InstructionContext u;
            ArrayList<InstructionContext> ec;
            if (!DEBUG) {
                final int r = random.nextInt(icq.size());
                u = icq.getIC(r);
                ec = icq.getEC(r);
                icq.remove(r);
            }
            else{
                u  = icq.getIC(0);
                ec = icq.getEC(0);
                icq.remove(0);
            }

            @SuppressWarnings("unchecked") // ec is of type ArrayList<InstructionContext>
            final
            ArrayList<InstructionContext> oldchain = (ArrayList<InstructionContext>) (ec.clone());
            @SuppressWarnings("unchecked") // ec is of type ArrayList<InstructionContext>
            final
            ArrayList<InstructionContext> newchain = (ArrayList<InstructionContext>) (ec.clone());
            newchain.add(u);

            if ((u.getInstruction().getInstruction()) instanceof RET) {
//System.err.println(u);
                // We can only follow _one_ successor, the one after the
                // JSR that was recently executed.
                final RET ret = (RET) (u.getInstruction().getInstruction());
                final ReturnaddressType t = (ReturnaddressType) u.getOutFrame(oldchain).getLocals().get(ret.getIndex());
                final InstructionContext theSuccessor = cfg.contextOf(t.getTarget());

                // Sanity check
                InstructionContext lastJSR = null;
                int skip_jsr = 0;
                for (int ss=oldchain.size()-1; ss >= 0; ss--) {
                    if (skip_jsr < 0) {
                        throw new AssertionViolatedException("More RET than JSR in execution chain?!");
                    }
//System.err.println("+"+oldchain.get(ss));
                    if ((oldchain.get(ss)).getInstruction().getInstruction() instanceof JsrInstruction) {
                        if (skip_jsr == 0) {
                            lastJSR = oldchain.get(ss);
                            break;
                        }
                        skip_jsr--;
                    }
                    if ((oldchain.get(ss)).getInstruction().getInstruction() instanceof RET) {
                        skip_jsr++;
                    }
                }
                if (lastJSR == null) {
                    throw new AssertionViolatedException("RET without a JSR before in ExecutionChain?! EC: '"+oldchain+"'.");
                }
                final JsrInstruction jsr = (JsrInstruction) (lastJSR.getInstruction().getInstruction());
                if ( theSuccessor != (cfg.contextOf(jsr.physicalSuccessor())) ) {
                    throw new AssertionViolatedException("RET '"+u.getInstruction()+"' info inconsistent: jump back to '"+
                        theSuccessor+"' or '"+cfg.contextOf(jsr.physicalSuccessor())+"'?");
                }

                if (theSuccessor.execute(u.getOutFrame(oldchain), newchain, icv, ev)) {
                    @SuppressWarnings("unchecked") // newchain is already of type ArrayList<InstructionContext>
                    final
                    ArrayList<InstructionContext> newchainClone = (ArrayList<InstructionContext>) newchain.clone();
                    icq.add(theSuccessor, newchainClone);
                }
            }
            else{// "not a ret"

                // Normal successors. Add them to the queue of successors.
                final InstructionContext[] succs = u.getSuccessors();
                for (final InstructionContext v : succs) {
                    if (v.execute(u.getOutFrame(oldchain), newchain, icv, ev)) {
                        @SuppressWarnings("unchecked") // newchain is already of type ArrayList<InstructionContext>
                        final
                        ArrayList<InstructionContext> newchainClone = (ArrayList<InstructionContext>) newchain.clone();
                        icq.add(v, newchainClone);
                    }
                }
            }// end "not a ret"

            // Exception Handlers. Add them to the queue of successors.
            // [subroutines are never protected; mandated by JustIce]
            final ExceptionHandler[] exc_hds = u.getExceptionHandlers();
            for (final ExceptionHandler exc_hd : exc_hds) {
                final InstructionContext v = cfg.contextOf(exc_hd.getHandlerStart());
                // TODO: the "oldchain" and "newchain" is used to determine the subroutine
                // we're in (by searching for the last JSR) by the InstructionContext
                // implementation. Therefore, we should not use this chain mechanism
                // when dealing with exception handlers.
                // Example: a JSR with an exception handler as its successor does not
                // mean we're in a subroutine if we go to the exception handler.
                // We should address this problem later; by now we simply "cut" the chain
                // by using an empty chain for the exception handlers.
                //if (v.execute(new Frame(u.getOutFrame(oldchain).getLocals(),
                // new OperandStack (u.getOutFrame().getStack().maxStack(),
                // (exc_hds[s].getExceptionType()==null? Type.THROWABLE : exc_hds[s].getExceptionType())) ), newchain), icv, ev) {
                    //icq.add(v, (ArrayList) newchain.clone());
                if (v.execute(new Frame(u.getOutFrame(oldchain).getLocals(),
                        new OperandStack (u.getOutFrame(oldchain).getStack().maxStack(),
                        exc_hd.getExceptionType()==null? Type.THROWABLE : exc_hd.getExceptionType())),
                        new ArrayList<InstructionContext>(), icv, ev)) {
                    icq.add(v, new ArrayList<InstructionContext>());
                }
            }

        }// while (!icq.isEmpty()) END

        InstructionHandle ih = start.getInstruction();
        do{
            if ((ih.getInstruction() instanceof ReturnInstruction) && (!(cfg.isDead(ih)))) {
                final InstructionContext ic = cfg.contextOf(ih);
                // TODO: This is buggy, we check only the top-level return instructions this way.
                // Maybe some maniac returns from a method when in a subroutine?
                final Frame f = ic.getOutFrame(new ArrayList<InstructionContext>());
                final LocalVariables lvs = f.getLocals();
                for (int i=0; i<lvs.maxLocals(); i++) {
                    if (lvs.get(i) instanceof UninitializedObjectType) {
                        this.addMessage("Warning: ReturnInstruction '"+ic+
                            "' may leave method with an uninitialized object in the local variables array '"+lvs+"'.");
                    }
                }
                final OperandStack os = f.getStack();
                for (int i=0; i<os.size(); i++) {
                    if (os.peek(i) instanceof UninitializedObjectType) {
                        this.addMessage("Warning: ReturnInstruction '"+ic+
                            "' may leave method with an uninitialized object on the operand stack '"+os+"'.");
                    }
                }
                //see JVM $4.8.2
                Type returnedType = null;
                final OperandStack inStack = ic.getInFrame().getStack();
                if (inStack.size() >= 1) {
                    returnedType = inStack.peek();
                } else {
                    returnedType = Type.VOID;
                }

                if (returnedType != null) {
                    if (returnedType instanceof ReferenceType) {
                        try {
                            if (!((ReferenceType) returnedType).isCastableTo(m.getReturnType())) {
                                invalidReturnTypeError(returnedType, m);
                            }
                        } catch (final ClassNotFoundException e) {
                            // Don't know what do do now, so raise RuntimeException
                            throw new IllegalArgumentException(e);
                        }
                    } else if (!returnedType.equals(m.getReturnType().normalizeForStackOrLocal())) {
                        invalidReturnTypeError(returnedType, m);
                    }
                }
            }
        } while ((ih = ih.getNext()) != null);

     }

    /**
     * Throws an exception indicating the returned type is not compatible with the return type of the given method.
     *
     * @param returnedType the type of the returned expression
     * @param m the method we are processing
     * @throws StructuralCodeConstraintException always
     * @since 6.0
     */
    public void invalidReturnTypeError(final Type returnedType, final MethodGen m) {
        throw new StructuralCodeConstraintException(
            "Returned type "+returnedType+" does not match Method's return type "+m.getReturnType());
    }

    /**
     * Pass 3b implements the data flow analysis as described in the Java Virtual
     * Machine Specification, Second Edition.
     * Later versions will use LocalVariablesInfo objects to verify if the
     * verifier-inferred types and the class file's debug information (LocalVariables
     * attributes) match [TODO].
     *
     * @see org.apache.bcel.verifier.statics.LocalVariablesInfo
     * @see org.apache.bcel.verifier.statics.Pass2Verifier#getLocalVariablesInfo(int)
     */
    @Override
    public VerificationResult do_verify() {
        if (! myOwner.doPass3a(methodNo).equals(VerificationResult.VR_OK)) {
            return VerificationResult.VR_NOTYET;
        }

        // Pass 3a ran before, so it's safe to assume the JavaClass object is
        // in the BCEL repository.
        JavaClass jc;
        try {
            jc = Repository.lookupClass(myOwner.getClassName());
        } catch (final ClassNotFoundException e) {
            // FIXME: maybe not the best way to handle this
            throw new AssertionViolatedException("Missing class: " + e, e);
        }

        final ConstantPoolGen constantPoolGen = new ConstantPoolGen(jc.getConstantPool());
        // Init Visitors
        final InstConstraintVisitor icv = new InstConstraintVisitor();
        icv.setConstantPoolGen(constantPoolGen);

        final ExecutionVisitor ev = new ExecutionVisitor();
        ev.setConstantPoolGen(constantPoolGen);

        final Method[] methods = jc.getMethods(); // Method no "methodNo" exists, we ran Pass3a before on it!

        try{

            final MethodGen mg = new MethodGen(methods[methodNo], myOwner.getClassName(), constantPoolGen);

            icv.setMethodGen(mg);

            ////////////// DFA BEGINS HERE ////////////////
            if (! (mg.isAbstract() || mg.isNative()) ) { // IF mg HAS CODE (See pass 2)

                final ControlFlowGraph cfg = new ControlFlowGraph(mg);

                // Build the initial frame situation for this method.
                final Frame f = new Frame(mg.getMaxLocals(),mg.getMaxStack());
                if ( !mg.isStatic() ) {
                    if (mg.getName().equals(Const.CONSTRUCTOR_NAME)) {
                        Frame.setThis(new UninitializedObjectType(ObjectType.getInstance(jc.getClassName())));
                        f.getLocals().set(0, Frame.getThis());
                    }
                    else{
                        Frame.setThis(null);
                        f.getLocals().set(0, ObjectType.getInstance(jc.getClassName()));
                    }
                }
                final Type[] argtypes = mg.getArgumentTypes();
                int twoslotoffset = 0;
                for (int j=0; j<argtypes.length; j++) {
                    if (argtypes[j] == Type.SHORT || argtypes[j] == Type.BYTE ||
                        argtypes[j] == Type.CHAR || argtypes[j] == Type.BOOLEAN) {
                        argtypes[j] = Type.INT;
                    }
                    f.getLocals().set(twoslotoffset + j + (mg.isStatic()?0:1), argtypes[j]);
                    if (argtypes[j].getSize() == 2) {
                        twoslotoffset++;
                        f.getLocals().set(twoslotoffset + j + (mg.isStatic()?0:1), Type.UNKNOWN);
                    }
                }
                circulationPump(mg,cfg, cfg.contextOf(mg.getInstructionList().getStart()), f, icv, ev);
            }
        }
        catch (final VerifierConstraintViolatedException ce) {
            ce.extendMessage("Constraint violated in method '"+methods[methodNo]+"':\n","");
            return new VerificationResult(VerificationResult.VERIFIED_REJECTED, ce.getMessage());
        }
        catch (final RuntimeException re) {
            // These are internal errors

            final StringWriter sw = new StringWriter();
            final PrintWriter pw = new PrintWriter(sw);
            re.printStackTrace(pw);

            throw new AssertionViolatedException("Some RuntimeException occured while verify()ing class '"+jc.getClassName()+
                "', method '"+methods[methodNo]+"'. Original RuntimeException's stack trace:\n---\n"+sw+"---\n", re);
        }
        return VerificationResult.VR_OK;
    }

    /** Returns the method number as supplied when instantiating. */
    @Pure
    public int getMethodNo() {
        return methodNo;
    }
}


text:
# sails-hook-gengojs

A Sails hook for gengo.js, the best i18n library for Node.js

[![Join the chat at https://gitter.im/gengojs/sails-hook-gengojs](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/gengojs/sails-hook-gengojs?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

[![Build Status](https://travis-ci.org/gengojs/sails-hook-gengojs.svg?branch=master)](https://travis-ci.org/gengojs/sails-hook-gengojs)
[![npm](https://img.shields.io/npm/dm/sails-hook-gengojs.svg)](https://npmjs.com/package/sails-hook-gengojs)
[![npm](https://img.shields.io/npm/v/sails-hook-gengojs.svg)](https://npmjs.com/package/sails-hook-gengojs)

## Introduction

This hook is the official [gengo.js](https://www.github.com/gengojs/gengojs) for Sails.
gengo.js is an i18n library designed to be the best for Node and will officially support
Sails. This hook will override the default i18n library that is built into Sails.

## Usage

1. Install the hook with `npm i --save sails-hook-gengojs`
2. Copy and paste the options below into the `i18n.js` file under `config/`.
3. Finally, override the default i18n hook in `.sailsrc`:

```json
{
  "generators": {
    "modules": {}
  },
  "hooks": {
    "i18n": false
  }
}
```

Once that is done, [check out the example](https://www.github.com/gengojs/gengojs/tree/master/examples) for usage.
Expect a sails example to be created soon in that same folder so be watching!

## i18n.js

```javascript
/**
 * Internationalization / Localization Settings
 * (sails.config.i18n)
 *
 * If your app will touch people from all over the world, i18n (or internationalization)
 * may be an important part of your international strategy.
 *
 *
 * For more informationom i18n in Sails, check out:
 * http://sailsjs.org/#!/documentation/concepts/Internationalization
 */
module.exports.i18n = {
  /****************************************************************************
   *                                                                          *
   * Override the namespaces used for debugging.                              *
   * See https://github.com/gengojs/core for documentation.                   *
   ****************************************************************************/
  // debug : {
  //  enabled: true,
  //  namespaces:[ 'core', 'parser', 'router', 'api', 'header', 'localize', 'backend' ]
  //},

  /****************************************************************************
   *                                                                          *
   * Override any default plugins for gengojs.                                *
   * See https://github.com/gengojs/core for documentation.                   *
   ****************************************************************************/
  // plugins : {},

  /****************************************************************************
   *                                                                          *
   * API Options                                                              *
   * See https://github.com/gengojs/plugin-api for documentation.             *
   ***************************************************************************/
  // api: {
  //     /**
  //      * 'global' refers to the api use for i18n your phrases.
  //      * ( e.g. __("Hello") )
  //      */
  //   "global":"__",
  //   /**
  //    * 'localize' refers to the api use for i18n your date, time, and number.
  //    * ( e.g. __l("ja").date().now() )
  //    */
  //   "localize":"__l"
  // },

  /****************************************************************************
   *                                                                          *
   * Backend Options                                                          *
   * See https://github.com/gengojs/plugin-backend for documentation.         *
   ***************************************************************************/
  // backend: {
  //  /**
  //   * 'directory' refers to the path to your dictionary respect to the
  //   * root of your sails app.
  //   */
  //   "directory": "/config/locales",
  //  /**
  //   * 'extension' refers to the file extension of your dictionary.
  //   */
  //   "extension": "json",
  //  /**
  //   * 'prefix' refers to the prefix in your file's name.
  //   */
  //   "prefix": "",
  //  /**
  //   * 'cache' refers to caching and enables gengo to store the dictionary
  //   * without changes until the server has been restarted.
  //   */
  //   "cache": true
  // },

  /****************************************************************************
   *                                                                          *
   * Header Options                                                           *
   * See https://github.com/gengojs/plugin-header for documentation.          *
   ***************************************************************************/
  // header: {
  //   /**
  //    * 'detect' refers to the detection type. Note that it is best to use one type of detection.
  //    *  Note: Any PRs will be accepted that may help gengojs-accept detect multiple types.
  //    */
  //     "detect": {
  //       /**
  //        * 'query' enables query parsing for any key that refers to the locale.
  //        * ( e.g. http://example.com/hello?locale=ja )
  //        */
  //         "query": false,
  //         /**
  //          * 'subdomain' enables subdomain parsing for the locale.
  //          * ( e.g. http://ja.example.com )
  //          */
  //         "subdomain": false,
  //         /**
  //          * 'url' enables url parsing for the locale.
  //          * ( e.g. http://www.example.com/ja )
  //          */
  //         "url": false,
  //         /**
  //          * 'cookie' enables cookie parsing for the locale.
  //          */
  //         "cookie": false,
  //         /**
  //          * 'header' enables header parsing for the locale.
  //          * ( e.g. Accept-Language )
  //          */
  //         "header": true
  //   },
  //   /**
  //    * 'keys' refers to the key used in cookie and query parsing.
  //    */
  //     "keys": {
  //         "cookie": "locale",
  //         "query": "locale"
  //   },
  //   /**
  //    * 'supported' refers to the locales supported in your app.
  //    */
  //     "supported": ["en-US"],
  //     /**
  //      * 'default' refers to the default locale of your app.
  //      */
  //     "default": "en-US"
  // },

  /****************************************************************************
   *                                                                          *
   * Parser Options                                                           *
   * See https://github.com/gengojs/plugin-parser for documentation.          *
   ***************************************************************************/
  // parser : {
  //   /**
  //    * 'type' refers to the type of parser used.
  //    * ( e.g. 'default' = template/interpolation and sprintf, 'format' = message format, '*' = all/auto )
  //    */
  //   "type": "default",
  //   /**
  //    * 'markdown' refers to options for markdown-it.
  //    * See https://github.com/markdown-it/markdown-it for documentation.
  //    */
  //   "markdown": {
  //   /**
  //    * 'enabled' refers to enabling markdown-it.
  //    */
  //     "enabled": false,
  //     "html": false,
  //     "xhtmlOut": false,
  //     "breaks": false,
  //     "langPrefix": "language-",
  //     "linkify": false,
  //     "typographer": false,
  //     "quotes": """''"
  //   },
  //   /**
  //    * 'template' refers to interpolation.
  //    * ( e.g. __('{{greet}}', 'hello') -> 'hello'
  //    */
  //   "template": {
  //   /**
  //    * 'enabled' refers to enabling interpolation.
  //    */
  //     "enabled": true,
  //   /**
  //    * 'open' refers to opening expression.
  //    */
  //     "open": "{{",
  //   /**
  //    * 'open' refers to opening expression.
  //    */
  //     "close": "}}"
  //   },
  //   /**
  //    * 'sprintf' refers to sprintf
  //    */
  //   "sprintf": {
  //   /**
  //    * 'enabled' refers to enabling sprintf.
  //    */
  //     "enabled": true
  //   },
  //   /**
  //    * 'keywords' refers to the keywords used in your dictionary.
  //    */
  //   "keywords": {
  //   /**
  //    * 'default' refers to the default phrase in your dictionary (in your native language).
  //    */
  //     "default": "default",
  //   /**
  //    * 'translated' refers to the translated phrase in your dictionary (in another language).
  //    */
  //     "translated": "translated",
  //   /**
  //    * 'global' refers to the globally used dictionary when router is enabled (router independent).
  //    */
  //     "global": "global"
  //   }
  // },

  /****************************************************************************
   *                                                                          *
   * Router Options                                                           *
   * See https://github.com/gengojs/plugin-router for documentation.          *
   ***************************************************************************/
  // router: {
  //  /**
  //   * 'enabled' refers to enabling the special data structure in your dictionary.
  //   * ( e.g. URL path = '/greet/', Dictionary = { 'index': {'greet': { /* ... */ } } } )
  //   */
  //   "enabled": false
  // }
};
```


text:
<?php

namespace MarkdownPublisher\WordPress;

use Nerdery\WordPress\Proxy as NerderyProxy;

class Proxy extends NerderyProxy
{
    /**
     * Returns the user ID if the user exists or null if the user doesn't exist.
     *
     * @see http://codex.wordpress.org/Function_Reference/username_exists
     * @param string $username a string representing the username to check for existence.
     * @return int|null
     */
    public function userNameExists($username)
    {
        return username_exists($username);
    }

    /**
     * Retrieve the ID of a category from its name.
     *
     * @see http://codex.wordpress.org/Function_Reference/get_cat_ID
     * @param string $categoryName Default is 'General' and can be any category name.
     * @return int 0 if failure and ID of category on success.
     */
    public function getCategoryIDByName($categoryName)
    {
        return get_cat_ID($categoryName);
    }

    /**
     * Create an array of posts based on a set of parameters
     *
     * @see http://codex.wordpress.org/Template_Tags/get_posts
     * @param array $args Search parameters for finding posts.
     * @return \WP_Post[] Array of WP Post objects, or empty array if none found.
     */
    public function getPosts($args)
    {
        return get_posts($args);
    }

    /**
     *
     *
     * @see http://codex.wordpress.org/Function_Reference/get_category_by_slug
     * @param $categorySlug
     * @return int|null
     */
    public function getCategoryIDBySlug($categorySlug)
    {
        $category = get_category_by_slug($categorySlug);

        if ($category) {
            return $category->term_id;
        }

        return null;
    }

    /**
     * This function updates posts (and pages) in the database.
     * To work as expected, it is necessary to pass the ID of the post to be updated.
     *
     * @see http://codex.wordpress.org/Function_Reference/wp_update_post
     * @param \WP_Post $post
     * @return int The post ID on success.
     * @throws \Exception on failure
     */
    public function updatePost($post)
    {
        $result = wp_update_post($post, true);

        if ($result instanceof WP_Error) {
            throw new \Exception("WordPress Fatal Error on Update Post: " . $result->get_error_message());
        }

        return $result;
    }

    /**
     * This function inserts posts (and pages) in the database.
     * It sanitizes variables, does some checks, fills in missing variables like date/time, etc.
     *
     * @see http://codex.wordpress.org/Function_Reference/wp_insert_post
     * @param \WP_Post $post
     * @return int The post ID on success.
     * @throws \Exception on failure
     */
    public function insertPost($post)
    {
        $result = wp_insert_post($post, true);

        if ($result instanceof \WP_Error) {
            throw new \Exception("WordPress Fatal Error on Insert Post: " . $result->get_error_message());
        }

        return $result;
    }
}


text:
from office365.sharepoint.listitems.listitem import ListItem

class UserInfoItem(ListItem):
    pass


text:
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet" type="text/css">
    <link href="main.css" rel="stylesheet" type="text/css">

Worldwide Christian Computer Club

We Are A humungous group of coders who code software for churches and everyone, but ultimately for Christ. We can datamine the bible, scrape the bible, and make computers do godly things. If you have a project for us, please contact one of our members below. Or pray to Jesus with good intentions. Prayer can get you unbelievable things!

Members List

Benevolant Dictator For Life:

<img src="https://upload.wikimedia.org/wikipedia/commons/thumb/3/3e/Saint_Mary_of_the_Immaculate_Conception_Church_(Rushville,_Indiana)_-_stained_glass,_transept,_Sacred_Heart_of_Jesus_rose_window_-_detail.jpg/600px-Saint_Mary_of_the_Immaculate_Conception_Church_(Rushville,_Indiana)_-_stained_glass,_transept,_Sacred_Heart_of_Jesus_rose_window_-_detail.jpg" class="center-block img-circle img-responsive" alt="Credit To: https://commons.wikimedia.org/wiki/File:Saint_Mary_of_the_Immaculate_Conception_Church_(Rushville,_Indiana)_-_stained_glass,_transept,_Sacred_Heart_of_Jesus_rose_window_-_detail.jpg">

Jesus Christ

Lord And Saviour For Those Who Believe That He Is Lord And Also Believe
              In Their Hearts That God raised Him From The Dead.

Publicly Known Coders:


text:
'use strict';

const models = require('./index');

/**
 * QuickBooks server dataset.
 *
 * @extends models['Dataset']
 */
class QuickBooksObjectDataset extends models['Dataset'] {
  /**
   * Create a QuickBooksObjectDataset.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of QuickBooksObjectDataset
   *
   * @returns {object} metadata of QuickBooksObjectDataset
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'QuickBooksObject',
      type: {
        name: 'Composite',
        className: 'QuickBooksObjectDataset',
        modelProperties: {
          description: {
            required: false,
            serializedName: 'description',
            type: {
              name: 'String'
            }
          },
          structure: {
            required: false,
            serializedName: 'structure',
            type: {
              name: 'Object'
            }
          },
          linkedServiceName: {
            required: true,
            serializedName: 'linkedServiceName',
            defaultValue: {},
            type: {
              name: 'Composite',
              className: 'LinkedServiceReference'
            }
          },
          parameters: {
            required: false,
            serializedName: 'parameters',
            type: {
              name: 'Dictionary',
              value: {
                  required: false,
                  serializedName: 'ParameterSpecificationElementType',
                  type: {
                    name: 'Composite',
                    className: 'ParameterSpecification'
                  }
              }
            }
          },
          type: {
            required: true,
            serializedName: 'type',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = QuickBooksObjectDataset;


text:
module Zahlen
  class CreatePlan
    def self.call(plan)
      Zahlen::ConektaGateway::CreatePlan.call(plan)
    end
  end
end


text:
layout: page
permalink: /paperfaces/
category: paperfaces
title: "PaperFaces iPad Project"
excerpt: "Gallery of hundreds of PaperFaces portrait painted digitally with Paper by FiftyThree on an iPad. Find time lapse videos, in-process screenshots, and more."
last_modified_at: 2016-10-27T11:16:12-04:00
image:
  cover: /assets/images/fiftythree-color-20.jpg
  thumb: /assets/images/paperfaces-project-250x250.jpg
  teaser: &image /assets/images/paperfaces-asja-k-teaser.jpg
  path: *image
tags: [Paper by 53, portrait, drawing, painting, iPad, illustration, 365 project]
ads: false
work: "Illustration"
order: 2
---

PaperFaces was an [illustration project]({{ site.url }}/articles/paperfaces-iPad-portrait-project/) by designer Michael Rose --- hey that's me! For two years I drew the faces of strangers everyday using an iPad, a stylus, and **Paper by FiftyThree**. I occasionally post new portraits here, but certainly not as frequently as I used to.

If you scroll down far enough you can see how my technique evolved from faceless gestures into realistic portraits[^procreate].

{% include popular-tags.html %}

{% for post in site.categories.paperfaces %}

{% endfor %}

[^procreate]: If you like these be sure to check out what I'm [painting with another iPad app]({{ site.url }}/procreate-paintings/), **Procreate**.


text:
<readable><title>2362377137_9528692825</title><content>
A busy city street with neon lights , lots of people and traffic .
A crowd scene in a downtown area .
A group of people on the sidewalk of a city street .
An opposite side street-shot of Applebee 's and Dave and Buster 's restaurants .
People are gathered on a city street with police vehicles arriving .
</content></readable>


text:
<?php

namespace PhpTransformers\Mustache\Test;

use PhpTransformers\Mustache\MustacheTransformer as Transformer;

class MustacheTransformerTest extends \PHPUnit_Framework_TestCase
{
	private $name = 'Mustache';

    /**
     * @dataProvider renderFileProvider
     */
    public function testRenderFile($inputFile, $expectedFile, array $locals = array())
    {
    	$transformer = new Transformer();
    	$result = $transformer->renderFile($inputFile, $locals);
    	$expected = file_get_contents($expectedFile);
    	$this->assertEquals($result, $expected);
    }

    public function renderFileProvider() {
    	$tests[] = array(
    		__DIR__ . '/Fixtures/input.txt',
    		__DIR__ . '/Fixtures/expected.txt',
    		array(
    			'name' => 'Linus',
    		),
    	);
    	return $tests;
    }

    /**
     * @dataProvider renderFileProvider
     */
    public function testRender($inputFile, $expectedFile, array $locals = array())
    {
    	$transformer = new Transformer();
    	$input = file_get_contents($inputFile);
    	$result = $transformer->render($input, $locals);
    	$expected = file_get_contents($expectedFile);
    	$this->assertEquals($result, $expected);
    }

    public function testGetName()
    {
        $engine = new Transformer();
        $this->assertEquals(strtolower($this->name), $engine->getName());
    }
}


text:
package org.kie.remote.services.ws.sei.process;

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

import org.kie.remote.services.ws.sei.StringObjectEntryList;

/**
 * Only used for initial WSDL generation
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "ManageProcessInstanceRequest", propOrder = {
    "operation",
    "deploymentId",
    "processDefinitionId",
    "parameters",
    "getVariables"
})
public class ManageProcessInstanceRequest {

    @XmlElement
    private ProcessInstanceOperationType operation;

    @XmlElement(required=true)
    @XmlSchemaType(name="string")
    private String deploymentId;

    @XmlElement(required=true)
    @XmlSchemaType(name="string")
    private String processDefinitionId;

    @XmlElement
    private StringObjectEntryList parameters;

    @XmlElement
    private Boolean getVariables;
}


text:
package org.springframework.cloud.dataflow.server.single;

import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.stream.IntStream;

import org.springframework.util.ReflectionUtils;

/**
 * Utils for tests.
 *
 * @author Janne Valkealahti
 * @author Soby Chacko
 */
public class TestUtils {

	@SuppressWarnings("unchecked")
	public static <T> T readField(String name, Object target) throws Exception {
		Field field = null;
		Class<?> clazz = target.getClass();
		do {
			try {
				field = clazz.getDeclaredField(name);
			}
			catch (Exception ex) {
			}

			clazz = clazz.getSuperclass();
		}
		while (field == null && !clazz.equals(Object.class));

		if (field == null)
			throw new IllegalArgumentException(
					"Cannot find field '" + name + "' in the class hierarchy of " + target.getClass());
		field.setAccessible(true);
		return (T) field.get(target);
	}

	@SuppressWarnings("unchecked")
	public static <T> T callMethod(String name, Object target) throws Exception {
		Class<?> clazz = target.getClass();
		Method method = ReflectionUtils.findMethod(clazz, name);

		if (method == null)
			throw new IllegalArgumentException(
					"Cannot find method '" + method + "' in the class hierarchy of " + target.getClass());
		method.setAccessible(true);
		return (T) ReflectionUtils.invokeMethod(method, target);
	}

	public static void setField(String name, Object target, Object value) throws Exception {
		Field field = null;
		Class<?> clazz = target.getClass();
		do {
			try {
				field = clazz.getDeclaredField(name);
			}
			catch (Exception ex) {
			}

			clazz = clazz.getSuperclass();
		}
		while (field == null && !clazz.equals(Object.class));

		if (field == null)
			throw new IllegalArgumentException(
					"Cannot find field '" + name + "' in the class hierarchy of " + target.getClass());
		field.setAccessible(true);
		field.set(target, value);
	}

	@SuppressWarnings("unchecked")
	public static <T> T callMethod(String name, Object target, Object[] args, Class<?>[] argsTypes) throws Exception {
		Class<?> clazz = target.getClass();
		Method method = ReflectionUtils.findMethod(clazz, name, argsTypes);

		if (method == null)
			throw new IllegalArgumentException(
					"Cannot find method '" + method + "' in the class hierarchy of " + target.getClass());
		method.setAccessible(true);
		return (T) ReflectionUtils.invokeMethod(method, target, args);
	}

	public static Map<String, String> toImmutableMap(
			String... entries) {
		if(entries.length % 2 == 1)
			throw new IllegalArgumentException("Entries should contain even number of values");
		return Collections.unmodifiableMap(IntStream.range(0, entries.length / 2).map(i -> i * 2)
				.collect(HashMap::new,
						(m, i) -> m.put(entries[i], entries[i + 1]),
						Map::putAll));
	}

}


text:
using System;

class FormattingNumbers
{
	static void Main()
	{
		Console.Write("Input a: ");
		int a = int.Parse(Console.ReadLine());

		Console.Write("Input b: ");
		float b = float.Parse(Console.ReadLine());

		Console.Write("Input c: ");
		float c = float.Parse(Console.ReadLine());

		Console.WriteLine("|{0, -10:X}|{1}|{2, 10:F2}|{3, -10:F3}|", a, Convert.ToString(a, 2).PadLeft(10, '0'), b, c);
	}
}


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
                      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

    <meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
    <title>Introduction - Zend Framework Manual</title>

                    Zend_Mail

Zend_Mail

                        Programmer's Reference Guide

Sending via SMTP

Introduction

Getting started

            Zend_Mail provides generalized functionality to compose and send
            both text and <acronym class="acronym">MIME</acronym>-compliant multipart e-mail messages. Mail can be
            sent with Zend_Mail via the default
            Zend_Mail_Transport_Sendmail transport or via
            Zend_Mail_Transport_Smtp.

Example #1 Simple E-Mail with Zend_Mail

                A simple e-mail consists of some recipients, a subject, a body and a sender. To send
                such a mail using Zend_Mail_Transport_Sendmail, do the
                following:

$mail = new Zend_Mail();

$mail->setBodyText('This is the text of the mail.');

$mail->setFrom('somebody@example.com', 'Some Sender');

$mail->addTo('somebody_else@example.com', 'Some Recipient');

$mail->setSubject('TestSubject');

$mail->send();

Note: Minimum definitions

                In order to send an e-mail with Zend_Mail you have to specify
                at least one recipient, a sender (e.g., with  setFrom()),
                and a message body (text and/or <acronym class="acronym">HTML</acronym>).

            For most mail attributes there are "get" methods to read the information stored in the
            mail object. for further details, please refer to the <acronym class="acronym">API</acronym>
            documentation. A special one is  getRecipients(). It returns an
            array with all recipient e-mail addresses that were added prior to the method call.

            For security reasons, Zend_Mail filters all header fields to
            prevent header injection with newline (\n) characters.
            Double quotation is changed to single quotation and angle brackets to square brackets in
            the name of sender and recipients. If the marks are in email address, the marks will be
            removed.

            You also can use most methods of the Zend_Mail object with a
            convenient fluent interface.

$mail = new Zend_Mail();

$mail->setBodyText('This is the text of the mail.')

    ->setFrom('somebody@example.com', 'Some Sender')

    ->addTo('somebody_else@example.com', 'Some Recipient')

    ->setSubject('TestSubject')

    ->send();

Configuring the default sendmail transport

            The default transport for a Zend_Mail instance is
            Zend_Mail_Transport_Sendmail. It is essentially a wrapper to the
            <acronym class="acronym">PHP</acronym> »  mail() function. If you
            wish to pass additional parameters to the »  mail() function, simply
            create a new transport instance and pass your parameters to the constructor. The new
            transport instance can then act as the default Zend_Mail
            transport, or it can be passed to the  send() method of
            Zend_Mail.

Example #2
                Passing additional parameters to the Zend_Mail_Transport_Sendmail transport

                This example shows how to change the Return-Path of the »  mail() function.

$tr = new Zend_Mail_Transport_Sendmail('-freturn_to_me@example.com');

Zend_Mail::setDefaultTransport($tr);

$mail = new Zend_Mail();

$mail->setBodyText('This is the text of the mail.');

$mail->setFrom('somebody@example.com', 'Some Sender');

$mail->addTo('somebody_else@example.com', 'Some Recipient');

$mail->setSubject('TestSubject');

$mail->send();

Note: Safe mode restrictions

                The optional additional parameters will be cause the »  mail() function to
                fail if <acronym class="acronym">PHP</acronym> is running in safe mode.

Warning

Sendmail Transport and Windows

                As the <acronym class="acronym">PHP</acronym> manual states the  mail()
                function has different behaviour on Windows and on *nix based systems. Using the
                Sendmail Transport on Windows will not work in combination with
                 addBcc(). The  mail() function will
                sent to the BCC recipient such that all the other recipients can see him as
                recipient!

                Therefore if you want to use BCC on a windows server, use the SMTP
                transport for sending!

                    Zend_Mail

Zend_Mail

                        Programmer's Reference Guide

Sending via SMTP

Programmer's Reference Guide

Programmer's Reference Guide

Zend Framework Reference

Zend_Mail

Introduction

Sending via SMTP

Sending Multiple Mails per SMTP Connection

Using Different Transports

HTML E-Mail

Attachments

Adding Recipients

Controlling the MIME Boundary

Additional Headers

Character Sets

Encoding

SMTP Authentication

Securing SMTP Transport

Reading Mail Messages


text:
/**
 * Forge SDK
 * The Forge Platform contains an expanding collection of web service components that can be used with Autodesk cloud-based products or your own technologies. Take advantage of Autodesk's expertise in design and engineering.
 *
 * Contact: forge.help@autodesk.com
 *
 * NOTE: This class is auto generated by the swagger code generator program.
 * https://github.com/swagger-api/swagger-codegen.git
 * Do not edit the class manually.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

module.export = (function () {
  'use strict';

  var expect = require('expect.js'),
    ForgeSdk = require('../../src'),
    PostBucketsPayloadAllow = require('../../src/model/PostBucketsPayloadAllow');

  describe('PostBucketsPayload', function () {
    it('should create an instance of PostBucketsPayload', function () {
      var instance = new ForgeSdk.PostBucketsPayload();
      expect(instance).to.be.a(ForgeSdk.PostBucketsPayload);
    });
  });

}());


text:
package com.adaptris.core.jms.activemq;

import static com.adaptris.interlok.junit.scaffolding.BaseCase.execute;
import static com.adaptris.interlok.junit.scaffolding.jms.JmsProducerCase.assertMessages;
import static com.adaptris.core.jms.activemq.EmbeddedActiveMq.createMessage;

import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TestName;
import com.adaptris.core.StandaloneConsumer;
import com.adaptris.core.StandaloneProducer;
import com.adaptris.core.jms.PasConsumer;
import com.adaptris.core.jms.PasProducer;
import com.adaptris.core.stubs.MockMessageListener;

public class FailoverPasProducerTest {

  @Rule
  public TestName testName = new TestName();

  private static EmbeddedActiveMq activeMqBroker;

  @BeforeClass
  public static void setUpAll() throws Exception {
    activeMqBroker = new EmbeddedActiveMq();
    activeMqBroker.start();
  }

  @AfterClass
  public static void tearDownAll() throws Exception {
    if(activeMqBroker != null)
      activeMqBroker.destroy();
  }

  @Test
  public void testProduceAndConsume() throws Exception {
    StandaloneConsumer standaloneConsumer =
        new StandaloneConsumer(activeMqBroker.getFailoverJmsConnection(false),
            new PasConsumer().withTopic(testName.getMethodName()));
    MockMessageListener jms = new MockMessageListener();
    standaloneConsumer.registerAdaptrisMessageListener(jms);
    StandaloneProducer standaloneProducer =
        new StandaloneProducer(activeMqBroker.getFailoverJmsConnection(false),
            new PasProducer().withTopic(testName.getMethodName()));
    execute(standaloneConsumer, standaloneProducer, createMessage(null), jms);
    assertMessages(jms, 1);
  }

}


text:
"""This example gets the current network."""

# Import appropriate modules from the client library.
from googleads import ad_manager

def main(client):
  # Initialize appropriate service.
  network_service = client.GetService('NetworkService', version='v201811')

  current_network = network_service.getCurrentNetwork()

  print ("Current network has network code '%s' and display name '%s'." %
         (current_network['networkCode'], current_network['displayName']))

if __name__ == '__main__':
  # Initialize client object.
  ad_manager_client = ad_manager.AdManagerClient.LoadFromStorage()
  main(ad_manager_client)


text:
<component name="libraryTable">
  <library name="ap-validation" type="repository">
    <properties maven-id="org.jetbrains.intellij.deps:ap-validation:0.0.20">
      <exclude>
        <dependency maven-id="org.jetbrains.kotlin:kotlin-stdlib" />
        <dependency maven-id="org.jetbrains.kotlin:kotlin-stdlib-jdk8" />
        <dependency maven-id="org.jetbrains.kotlin:kotlin-stdlib-jdk7" />
        <dependency maven-id="org.jetbrains.kotlin:kotlin-stdlib-common" />
        <dependency maven-id="org.jetbrains:annotations" />
      </exclude>
    </properties>
    <CLASSES>
      <root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/intellij/deps/ap-validation/0.0.20/ap-validation-0.0.20.jar!/" />
      <root url="jar://$MAVEN_REPOSITORY$/com/jetbrains/fus/reporting/model/53/model-53.jar!/" />
    </CLASSES>
    <JAVADOC />
    <SOURCES>
      <root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/intellij/deps/ap-validation/0.0.20/ap-validation-0.0.20-sources.jar!/" />
      <root url="jar://$MAVEN_REPOSITORY$/com/jetbrains/fus/reporting/model/53/model-53-sources.jar!/" />
    </SOURCES>
  </library>
</component>


text:
angular.module('krishi_IoT.controllers', [])

.controller('StatusCtrl', function($scope) {})

.controller('DevicesCtrl', function($scope, $rootScope,Devices) {
  $scope.devices = Devices.all();
  $scope.remove = function(device) {
    Devices.remove(device);
  };
  $scope.$on('msg', function(response) {
      // incoming data from subscribe2Topic
	  console.log("in DevicesCtrl: "+$rootScope.data.payloadString);
  });
})

.controller('DeviceDetailCtrl', function($scope, $stateParams, $rootScope, $ionicLoading, Devices, sessionService) {
	$scope.device = Devices.get($stateParams.deviceId);

	$scope.motorImageStatus = "img/motor.jpg";
	$scope.outlet_status = {};
	//outletControl
	$scope.outletControl = function() {
		$ionicLoading.show();
		if ($scope.outlet_status.value === "ON") {
			console.log('Turning ON motor:' + $scope.outlet_status.value);
			//CONNECTED - SEND CTRL PACKET
			var ctrlMsg = '{"outlet_status":"ON"}';
			var message = new Paho.MQTT.Message(ctrlMsg);
			message.destinationName = "krishiIoT/krishi_IoT/control/"+sessionService.get("packet").deviceId;
			$rootScope.client.send(message);
			$ionicLoading.hide();
			console.log("Published to topic: "+message.destinationName+" message:"+ctrlMsg);
			$scope.motorImageStatus = "img/motor.jpg";
			$scope.outlet_status.value = 'ON';
		} else {
			//CONNECTED - SEND CTRL PACKET
			var ctrlMsg = '{"outlet_status":"OFF"}';
			var message = new Paho.MQTT.Message(ctrlMsg);
			message.destinationName = "krishiIoT/krishi_IoT/control/"+sessionService.get("packet").deviceId;
			$rootScope.client.send(message);
			$ionicLoading.hide();
			console.log("Published to topic: "+message.destinationName+" message:"+ctrlMsg);
			$scope.outlet_status.value = 'OFF';
			console.log('Turning OFF motor:' + $scope.outlet_status.value);
			$scope.motorImageStatus = "img/motorOff.jpg";
			$scope.outlet_status.value = 'OFF';
		}
	}
	$scope.getImage = function() {
		console.log('Getting the image:');
		var getimg = '{"ctrlCommand":"getImage"}';
		var message = new Paho.MQTT.Message(getimg);
		message.destinationName = "krishiIoT/krishi_IoT/control/"+sessionService.get("packet").deviceId;
		$rootScope.client.send(message);
		$ionicLoading.hide();
	}

	$scope.weatherWidget = false;
	$scope.switchWidget = false;
	$scope.earthWidget = false;
	$scope.eyeWidget = false;
	$scope.birdWidget = false;

	// incoming data from subscribe2Topic
	console.log("in DeviceDetailCtrl:sessionService:: "+sessionService.get("packet") +" name:: "+$scope.device.name);
	if($scope.device.name === "Weather" && sessionService.get("packet") != null) {
			$scope.weatherWidget = true;
			$scope.temp = sessionService.get("packet").sensor.temp;
			$scope.humidity = sessionService.get("packet").sensor.humidity;
			$scope.rain = sessionService.get("packet").sensor.rain;
			$scope.rainPresence = sessionService.get("packet").sensor.rainPresence;
	} else if($scope.device.name === "Switch" && sessionService.get("packet") != null) {
			$scope.switchWidget = true;
			$scope.outlet_status.value = sessionService.get("packet").sensor.outlet_status;
	} else if($scope.device.name === "Earth" && sessionService.get("packet") != null) {
			$scope.earthWidget = true;
			$scope.moisture = sessionService.get("packet").sensor.moisture;
			$scope.moistureText = sessionService.get("packet").sensor.moistureText;
	} else if($scope.device.name === "Eye" && sessionService.get("packet") != null) {
			$scope.eyeWidget = true;
			$scope.farmImage = sessionService.get("packet").sensor.imgURL;
			$scope.farmImageText = sessionService.get("packet").sensor.imgText;
	} else if($scope.device.name === "Bird" && sessionService.get("packet") != null) {
			$scope.birdWidget = true;
			$scope.farmVideo = sessionService.get("packet").sensor.videoURI;
			//$scope.farmVideo = 'https://www.youtube.com/embed/v3YcZtlVrls';
	}

	$scope.$on('msg', function(response) {
		var received = JSON.parse($rootScope.data.payloadString);

		$scope.$apply(function() {
			if (received.deviceType ==="Weather") {
				console.log("Weather device message received: "+received.deviceType+" temp: "+received.sensor.temp+" hum: "+received.sensor.humidity);
				//alert("You are in weather device");
				//Now create widgets here.
				$scope.temp = received.sensor.temp;
				$scope.humidity = received.sensor.humidity;
				$scope.rain = received.sensor.rain;
				$scope.rainPresence = received.sensor.rainPresence;
			} else if(received.deviceType ==="Switch") {
				console.log("Switch device message received: "+received.deviceType+"outlet_status: "+received.sensor.outlet_status);
				//alert("You are in switch device");
				//Now create widgets here.
				if (received.sensor.outlet_status ==="ON") {
					$scope.outlet_status = received.sensor.outlet_status;
					$scope.outlet_status = { value: 'ON' };
				} else if (received.sensor.outlet_status ==="OFF"){
					$scope.outlet_status = received.sensor.outlet_status;
					$scope.outlet_status = { value: 'OFF' };
				}
			} else if(received.deviceType ==="Earth") {
				console.log("Earth device message received: "+received.deviceType+" Soil moisture:"+received.sensor.moisture);$scope.moisture = received.sensor.moisture;
				$scope.moistureText = $scope.moistureText;
			} else if(received.deviceType ==="Eye") {
				console.log("Eye device message received: "+received.deviceType+" Image location:"+received.sensor.imgURL);
				$scope.farmImage = received.sensor.imgURL;
				$scope.farmImageText = received.sensor.imgText;
			} else if(received.deviceType ==="Bird") {
				console.log("Bird device message received: "+received.deviceType+" Bird video:"+received.sensor.videoURI);
				$scope.farmVideo = received.sensor.videoURI;
			}
		});
	});
})

.controller('SettingsCtrl', function($scope, $rootScope, $ionicLoading,$cordovaToast, sessionService) {
	var regMsg;
	var subscribe2Topic = "krishiIoT/krishi_IoT/telemetry/#";
	var publish2Topic = "krishiIoT/krishi_IoT/register";

	//$scope.myForm.$invalid = false;
	$scope.settings = {};
	$scope.settings.broker = "169.46.147.14";
	$scope.settings.port = "9001";
	$scope.settings.clientID = "krishi_IoT_app"+Math.floor( Math.random() * 1000 );

	$scope.IsJsonString = function(str) {
		try {
			JSON.parse(str);
		} catch (e) {
			return false;
		}
		return true;
	}

	$scope.onConnect = function onConnect() {
		$ionicLoading.hide();
		// Once a connection has been made, make a subscription and send a message.
		//$cordovaToast.showLongBottom("Connected!");
		//$scope.myForm.invalid = true;
		console.log("onConnect:: SUCCESS");
		//automatically subscribe to incoming messages targeted to itself.
		$rootScope.client.subscribe(subscribe2Topic);
		console.log("Subscribed to topic: "+subscribe2Topic);

		//ONCE CONNECTED - SEND ONE REG PACKET
		regMsg = '{"appID":"'+$scope.settings.clientID+'"}';
		var message = new Paho.MQTT.Message(regMsg);
		message.destinationName = publish2Topic;
		$rootScope.client.send(message);
		console.log("Published to topic: "+publish2Topic+" message:"+regMsg);
	}

	$scope.onFail = function onFail(message) {
		//$scope.myForm.invalid = false;
		$ionicLoading.hide()
		alert("Connection failed: " + message.errorMessage + "\nRetry!");
	}

	$scope.connect2Broker = function() {
		$ionicLoading.show();
		console.log("broker: "+JSON.stringify($scope.settings));

		// Create a client instance
		$rootScope.client = new Paho.MQTT.Client($scope.settings.broker, Number($scope.settings.port), $scope.settings.clientID);

		// called when a message arrives
		$rootScope.client.onMessageArrived = function(message) {
			if($scope.IsJsonString(message.payloadString) == true) {
				$rootScope.data = message;
				$rootScope.$broadcast( 'msg', $rootScope.data.payloadString);
				sessionService.set("packet", $rootScope.data.payloadString);
			} else {
				console.log("Invalid JSON received! Check your input");
			}
		}
		$rootScope.client.onConnectionLost = function(responseObject){
			if (responseObject.errorCode !== 0) {
				alert("Connection is lost!"+responseObject.errorMessage);
			}
		}

		var willMsg = new Paho.MQTT.Message("{'die':'No power'}");
		willMsg.destinationName = publish2Topic;
		// connect the client
		if((typeof($scope.settings.username) === null) | (typeof($scope.settings.username)=== "undefined")) {
			$rootScope.client.connect({
				timeout: 10,
				useSSL: false,
				//cleanSession: false,
				//userName: $scope.settings.username,
				//password: $scope.settings.pwd,
				willMessage: willMsg,
				onSuccess: $scope.onConnect,
				onFailure: $scope.onFail
			});
		} else { //userName & PWD provided
			$rootScope.client.connect({
				timeout: 10,
				useSSL: false,
				//cleanSession: false,
				userName: $scope.settings.username,
				password: $scope.settings.pwd,
				willMessage: willMsg,
				onSuccess: $scope.onConnect,
				onFailure: $scope.onFail
			});
		}

	}
})

.controller('AboutCtrl', function($scope) {
})

.controller('regLangCtrl', function($scope) {
	$scope.names = ["English", "Hindi", "Tamil", "Telugu"];
	$scope.updateLanguage = function(selectedItem) {
		alert("selected: "+selectedItem);
		$scope.googleTranslateElementInit();
	}
	$scope.googleTranslateElementInit = function() {
		new google.translate.TranslateElement({pageLanguage: 'en'}, 'google_translate_element');
	}

})

.controller('PopupCtrl', function($scope, $ionicPopup) {
	// Triggered on a button click, or some other target
	 $scope.login = function() {
	   $scope.data = {}

	   // An elaborate, custom popup
	   var myPopup = $ionicPopup.show({
		 template: '<input type="text" ng-model="ph_no" placeholder="Phone number">
\
					<input type="password" ng-model="ph_password" placeholder="Password">',
		 title: 'Login here',
		 subTitle: 'Enter valid mobile number',
		 scope: $scope,
		 buttons: [{ text: 'Cancel' },{
			 text: 'Login',
			 type: 'button-balanced',
			 onTap: function(e) {
			   if (!$scope.ph_no) {
				 //don't allow to close unless entered ph_no
				 e.preventDefault();
			   } else {
				 return $scope.ph_no;
			   }
			 }
		   },]
	   });
	  };
});


text:
@interface BackgroundOneController : BackgroundController {

	NSMutableArray *charlayer1;
	NSMutableArray *charlayer2;
	NSMutableArray *charlayer3;
	NSMutableArray *charlayer4;

}

-(void) addToBackdrop:(CGRect) rect Color:(Color *) clr;

-(void) updateLayer:(NSMutableArray *)layer index:(int)ind;

@end


text:
package org.apache.hadoop.tools.posum.data.monitor;

import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.tools.posum.common.util.GeneralLooper;
import org.apache.hadoop.tools.posum.common.util.conf.PosumConfiguration;
import org.apache.hadoop.tools.posum.common.util.communication.RestClient;
import org.apache.hadoop.tools.posum.data.master.DataMasterContext;

public class PosumMonitor extends GeneralLooper<PosumMonitor> {

  private final DataMasterContext context;

  public PosumMonitor(DataMasterContext context) {
    super(PosumMonitor.class);
    this.context = context;
  }

  @Override
  protected void serviceInit(Configuration conf) throws Exception {
    super.serviceInit(conf);
    setSleepInterval(conf.getLong(PosumConfiguration.POSUM_MONITOR_HEARTBEAT_MS,
      PosumConfiguration.POSUM_MONITOR_HEARTBEAT_MS_DEFAULT));

  }

  @Override
  protected void doAction() {
    RestClient.TrackingUI.checkUpdated(context.getCommService().getSystemAddresses());
    context.getPosumInfoCollector().collect();
  }

}


text:
package com.michaelfotiadis.crossyscore.ui.components.mascotpicker.recycler;

import android.content.Context;
import android.support.v4.app.ActivityCompat;

import com.michaelfotiadis.crossyscore.common.models.mascot.Mascot;
import com.michaelfotiadis.crossyscore.ui.core.common.recyclerview.viewbinder.BaseRecyclerViewBinder;
import com.michaelfotiadis.crossyscore.ui.core.intent.dispatch.IntentDispatcher;
import com.michaelfotiadis.crossyscore.utils.ImageUtils;

/**
 *
 */
public class MascotPickerRecyclerBinder extends BaseRecyclerViewBinder<MascotPickerRecyclerViewHolder, Mascot> {

    private final ImageUtils mImageUtils;

    protected MascotPickerRecyclerBinder(final Context context, final IntentDispatcher intentDispatcher) {
        super(context, intentDispatcher);
        mImageUtils = new ImageUtils(context);
    }

    @Override
    public void bind(final MascotPickerRecyclerViewHolder holder, final Mascot item) {
        if (item != null) {

            mImageUtils.loadImageToViewReflectively(
                    holder.image, item.getName(), ImageUtils.IMAGE_TYPE.LIST);
            holder.title.setText(item.getName());
            holder.subTitle.setText(item.getRelease());
        }
    }

    @Override
    public void reset(final MascotPickerRecyclerViewHolder holder) {
        holder.image.setImageDrawable(ActivityCompat.getDrawable(
                getContext(), ImageUtils.DEFAULT_IMAGE_PLACEHOLDER));
        holder.title.setText("");
        holder.subTitle.setText("");
    }

}


text:
require 'rest_client'
require 'action_controller'

module HasFace
  class Validator < ActiveModel::EachValidator

    def initialize(options)
      @allow_nil, @allow_blank = options.delete(:allow_nil), options.delete(:allow_blank)
      super
    end

    def validate_each(record, attr_name, value)

      # Skip validation if globally turned off
      return if HasFace.enable_validation == false

      image       = record.send(attr_name)
      @image_path = image.respond_to?(:path) ? image.path : nil
      @image_url  = "#{ActionController::Base.asset_host}#{image.url if image.respond_to?(:url)}"

      # Skip validation if our image is nil/blank and allow nil/blank is on
      return if (@allow_nil && image.nil?) || (@allow_blank && image.blank?)

      # Add an error if the image path is blank
      return record.errors.add(attr_name, :no_face) if @image_path.blank?

      # Get the response and parse to JSON
      raw_response = RestClient.post(HasFace.detect_url, params)
      response     = JSON.parse(raw_response)

      # Error handling for failed responses
      return handle_api_error(response) unless response['status'] == 'success'

      # Add errors if no tags are present
      tags = response.try(:[], 'photos').try(:first).try(:[], 'tags')
      record.errors.add(attr_name, :no_face) if tags.blank?

    rescue Errno::ECONNREFUSED, Errno::ETIMEDOUT, RestClient::Exception => error
      return handle_request_error(error)
    end

    protected

    def params
      if HasFace.transfer_method == :url
        { :api_key => HasFace.api_key, :api_secret => HasFace.api_secret, :urls => @image_url }
      else
        { :api_key => HasFace.api_key, :api_secret => HasFace.api_secret, :image => File.new(@image_path, 'r') }
      end
    end

    def handle_api_error(response)
      error_message = %{face.com API Error: "#{response['error_message']}" Code: #{response['error_code']}}

      if HasFace.skip_validation_on_error
        Rails.logger.warn error_message if Rails.logger.present?
        true
      else
        raise FaceAPIError.new error_message
      end
    end

    def handle_request_error(error)
      error_message = %{has_face HTTP Request Error: "#{error.message}"}

      if HasFace.skip_validation_on_error
        Rails.logger.warn error_message if Rails.logger.present?
        true
      else
        raise HTTPRequestError.new error_message
      end
    end

  end
end

# Compatibility with ActiveModel validates method which matches option keys to their validator class
ActiveModel::Validations::HasFaceValidator = HasFace::Validator


text:
<?php declare(strict_types=1);

namespace ApiClients\Client\Github\Resource\Sync\Contents;

use ApiClients\Client\Github\Resource\Contents\EmptyLinks as BaseEmptyLinks;

class EmptyLinks extends BaseEmptyLinks
{
}


text:
package com.github.theborakompanioni.gn.article;

import com.github.theborakompanioni.gn.util.RestResource;
import model.Article;
import model.Permissions;
import org.apache.shiro.SecurityUtils;

import static org.springframework.hateoas.mvc.ControllerLinkBuilder.linkTo;
import static org.springframework.hateoas.mvc.ControllerLinkBuilder.methodOn;

/**
 * Created by void on 20.09.15.
 */
public class ArticleResource extends RestResource<Article> {
    private Article article;

    public ArticleResource(Article article) {
        this.article = article;

        this.add(linkTo(methodOn(ArticleRestCtrl.class).getOne(article.getId())).withSelfRel());
        this.add(linkTo(methodOn(ArticleCtrl.class).view(article.getId())).withRel("view"));

        this.add(linkTo(methodOn(ArticleRestCtrl.class).heart(article.getId())).withRel("heart"));

        if (SecurityUtils.getSubject().isPermitted(Permissions.ARTICLE_DELETE.getName())) {
            this.add(linkTo(methodOn(ArticleRestCtrl.class).deleteOne(article.getId())).withRel("remove"));
        }

        if (SecurityUtils.getSubject().isPermitted(Permissions.ARTICLE_VERIFY.getName()) && !article.isVerified()) {
            this.add(linkTo(methodOn(ArticleRestCtrl.class).verify(article.getId())).withRel("verify"));
        }
    }

    public Article getResource() {
        return article;
    }
}


text:
package com.sun.media.sound;

import java.io.IOException;

import javax.sound.midi.MidiChannel;
import javax.sound.midi.VoiceStatus;

/**
 * This interface is used for audio streams from ModelOscillator.
 *
 * @author Karl Helgason
 */
public interface ModelOscillatorStream {

    void setPitch(float pitch); // Pitch is in cents!

    void noteOn(MidiChannel channel, VoiceStatus voice, int noteNumber,
                int velocity);

    void noteOff(int velocity);

    int read(float[][] buffer, int offset, int len) throws IOException;

    void close() throws IOException;
}