text:
'use strict';

var sinon = require('sinon');
var fs = require('fs');

module.exports = function(grunt) {

  var clock;

  grunt.initConfig({
    jshint: {
      all: ['tasks/*.js', 'test/*.js'],
      options: {
          boss: true,
          camelcase: true,
          curly: true,
          eqeqeq: true,
          eqnull: true,
          immed: true,
          latedef: true,
          newcap: true,
          noarg: true,
          node: true,
          strict: true,
          sub: true,
          undef: true,
          unused: true
      }
    },

    // Before generating any new files, remove any previously-created files.
    clean: {
      tests: ['.grunt', 'temp']
    },

    // Configuration to be run (and then tested).
    periodic: {
      newer: {
        when: 'newer',
        files: [{
          expand: true,
          src: [ './temp/*.txt' ],
        }],
        tasks: ['TestTask:newer']
      },
      build: {
        when: 'build',
        tasks: ['TestTask:build']
      },
      hourly: {
        when: 'hourly',
        tasks: ['TestTask:hourly']
      },
      daily: {
        when: 'daily',
        tasks: ['TestTask:daily']
      },
      weekly: {
        when: 'weekly',
        tasks: ['TestTask:weekly']
      },
      weeklyNotFirst: {
        when: 'weekly',
        tasks: ['TestTask:weeklyNotFirst'],
        options: {
          runFirstTime: false
        }
      },
      monthly: {
        when: 'monthly',
        tasks: ['TestTask:monthly']
      },
      yearly: {
        when: 'yearly',
        tasks: ['TestTask:yearly']
      },
      checkout: {
        when: 'checkout',
        tasks: ['TestTask:checkout']
      }
    },

    // Unit tests.
    nodeunit: {
      tests: ['test/periodic-test.js']
    }
  });

  // Actually load this plugin's task(s).
  grunt.loadTasks('tasks');

  // These plugins provide necessary tasks.
  grunt.loadNpmTasks('grunt-contrib-jshint');
  grunt.loadNpmTasks('grunt-contrib-clean');
  grunt.loadNpmTasks('grunt-contrib-nodeunit');

  // run period tasks twice to test results
  grunt.registerTask('test', [
    'jshint',
    'clean',

    'periodic',
    'periodic',

    'FakeDate:61',
    'periodic',

    'FakeDate:1441',
    'periodic',

    'FakeDate:10081',
    'periodic',

    'FakeDate:46080',
    'periodic',

    'FakeDate:552960',
    'periodic',

    'FakeDate', // Restore clock

    'ModFile',
    'periodic',

    'periodic',

    'nodeunit'
  ]);

  grunt.registerTask('default', ['test']);

  // run period tasks twice to test results
  grunt.registerTask('exp', [
    'jshint',
    'clean',

    'periodic',
    'periodic',

    'FakeDate:61',
    'periodic',

    'FakeDate', // Restore clock

    'ModFile',
    'periodic',

    'nodeunit'
  ]);

  // Test Support

  grunt.registerTask('TestTask', 'Test Task', function(target) {

    var count = 1;
    var path = './temp/' + target;

    if (grunt.file.exists(path))
    {
      count = grunt.file.read(path);
      count++;
    }

    grunt.log.writeln('Test Task count: ' + count);

    grunt.file.write(path, count);

  });

  grunt.registerTask('FakeDate', 'Fake Date', function(minutes) {

    if (clock)
    {
      clock.restore();
    }

    if (!minutes)
    {
      return;
    }

    clock = sinon.useFakeTimers(new Date().getTime() + minutes*60000 );

    grunt.log.writeln('Fake Date: ' + new Date().toISOString());

  });

  grunt.registerTask('ModFile', 'Modifiy a File', function() {

    var filename = 'afile.txt';

    var done = this.async();

    setTimeout(function(){
      grunt.file.write('./temp/' + filename, new Date().toISOString());
      grunt.log.writeln('Modified File done');
      done();
    }, 2000);

  });

};


text:
var searchData=
[
  ['updatescheduler',['UpdateScheduler',['../class_tempo_1_1_scheduling_1_1_update_scheduler.html#a071ad6f58ca3d390557dd92d453ebb02',1,'Tempo::Scheduling::UpdateScheduler']]]
];

redpajama_set_name: RedPajamaGithub


text:
function changeText(x){

    var elem = document.getElementById("inputField");
    if(x === 'C'){
        document.getElementById('inputField').value = null;

    }else if(x === '=') {
        document.getElementById('inputField').value = eval(elem.value);
    }else{
        elem.value += x;
    }

}


text:
// ---------------------------------------------------------------------------- PCH
#include "simulator/runtime/pch/stdpch.h"
// ----------------------------------------------------------------------- INCLUDES
// ----------------------------------------------------------------------- SYNOPSIS
#include "simulator/runtime/rdo_runtime.h"
#include "simulator/runtime/calc/operation/operation_type.h"
#include "simulator/runtime/calc/operation/calc_arithm.h"
// --------------------------------------------------------------------------------

OPEN_RDO_RUNTIME_NAMESPACE

// --------------------------------------------------------------------------------
// -------------------- RDOCalcDiv
// --------------------------------------------------------------------------------
RDOCalcDiv::RDOCalcDiv(const LPRDOCalc& pLeft, const LPRDOCalc& pRight)
	: parent_type(pLeft, pRight)
{}

RDOValue RDOCalcDiv::doCalc(const LPRDORuntime& pRuntime)
{
	++OperatorType::getCalcCounter<OperatorType::Type(calc_type)>();
	RDOValue right = m_pRight->calcValue(pRuntime);
	if (right == 0)
	{
		pRuntime->error().push("Деление на ноль", srcInfo());
	}
	return m_pLeft->calcValue(pRuntime) / right;
}

// --------------------------------------------------------------------------------
// -------------------- RDOCalcPlusEnumSafe
// --------------------------------------------------------------------------------
RDOCalcPlusEnumSafe::RDOCalcPlusEnumSafe(const LPRDOCalc& pLeft, const LPRDOCalc& pRight)
	: RDOCalcPlus(pLeft, pRight)
{}

RDOValue RDOCalcPlusEnumSafe::doCalc(const LPRDORuntime& pRuntime)
{
	++OperatorType::getCalcCounter<OperatorType::Type(calc_type)>();
	return m_pLeft->calcValue(pRuntime).getEnumAsInt() + m_pRight->calcValue(pRuntime).getEnumAsInt();
}

// --------------------------------------------------------------------------------
// -------------------- RDOCalcMultEnumSafe
// --------------------------------------------------------------------------------
RDOCalcMultEnumSafe::RDOCalcMultEnumSafe(const LPRDOCalc& pLeft, const LPRDOCalc& pRight)
	: RDOCalcMult(pLeft, pRight)
{}

RDOValue RDOCalcMultEnumSafe::doCalc(const LPRDORuntime& pRuntime)
{
	++OperatorType::getCalcCounter<OperatorType::Type(calc_type)>();
	return m_pLeft->calcValue(pRuntime).getEnumAsInt() * m_pRight->calcValue(pRuntime).getEnumAsInt();
}

CLOSE_RDO_RUNTIME_NAMESPACE


text:
'use strict'

var binding = process.binding('signal_wrap');

module.exports = {
	open : open,
};

function open(name, callback) {
	if (name === 'Signal') {
		return new SignalPort(callback);
	}
	console.log("[unhandled] signal_wrap open:" + name);
}

function SignalPort(callback) {
	var handle = new binding.Signal();

	handle.onsignal = function() {
		var args = Array.prototype.slice.call(arguments);
		callback('onsignal', args);
	};

	this.syncIO = function(func, args) {
		if (func === 'restart') {
			var state = args[0];
			if (state.signum >= 0) {
				handle.start(state.signum);
			}
			if (state.unref) {
				handle.unref();
			}
			return;
		}
		return handle[func].apply(handle, args);
	};
}


text:
import { ADD_MEETINGMINUTE, DELETE_MEETINGMINUTE, EDIT_MEETINGMINUTE, ARCHIVE_MEETINGMINUTE, ARCHIVE_ALL, CLEAR_ARCHIVED } from '../constants/ActionTypes'

const initialState = [
  {
    text: 'Dummy meeting minutes',
    archived: false,
    id: 0
  }
]

export default function meetingMinutes(state = initialState, action) {
  switch (action.type) {
    case ADD_MEETINGMINUTE:
      return [
        ...state,
        {
          id: state.reduce((maxId, meetingMinute) => Math.max(meetingMinute.id, maxId), -1) + 1,
          archived: false,
          text: action.text
        }
      ]

    case DELETE_MEETINGMINUTE:
      return state.filter(meetingMinute =>
        meetingMinute.id !== action.id
      )

    case EDIT_MEETINGMINUTE:
      return state.map(meetingMinute =>
        meetingMinute.id === action.id ?
          { ...meetingMinute, text: action.text } :
          meetingMinute
      )

    case ARCHIVE_MEETINGMINUTE:
      return state.map(meetingMinute =>
        meetingMinute.id === action.id ?
          { ...meetingMinute, archived: !meetingMinute.archived } :
          meetingMinute
      )

    case ARCHIVE_ALL:
      const areAllMarked = state.every(meetingMinute => meetingMinute.archived)
      return state.map(meetingMinute => ({
        ...meetingMinute,
        archived: !areAllMarked
      }))

    case CLEAR_ARCHIVED:
      return state.filter(meetingMinute => meetingMinute.archived === false)

    default:
      return state
  }
}


text:
@interface DRDetailViewController ()
@property (nonatomic, weak) IBOutlet UIImageView *imageView;
@end

@implementation DRDetailViewController

- (void)viewDidLoad
{
    [super viewDidLoad];
    [self configureView];
}

- (void)viewDidAppear:(BOOL)animated
{
    [super viewDidAppear:animated];

    [self.filter processImage:self.image completion:^(UIImage *processedImage) {
        self.image = processedImage;
    }];
}

#pragma mark -
#pragma mark Dynamic Accessor Methods
// +--------------------------------------------------------------------
// | Dynamic Accessor Methods
// +--------------------------------------------------------------------

- (void)setImage:(UIImage *)image
{
    _image = image;
    [self configureView];
}

#pragma mark -
#pragma mark Private/Convenience Methods
// +--------------------------------------------------------------------
// | Private/Convenience Methods
// +--------------------------------------------------------------------

- (void)configureView
{
    self.imageView.contentMode = UIViewContentModeScaleAspectFit;
    self.imageView.image = self.image;
}

@end


text:
package xal.extension.widgets.swing.wheelswitch.comp;

import xal.extension.widgets.swing.wheelswitch.util.ColorHelper;

import java.awt.Color;
import java.awt.GradientPaint;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.image.BufferedImage;

import javax.swing.Icon;

/**
 * A label that paints a gradient as a background. User can specify gradient
 * colors (one of them is the default label background) and direction (the
 * default is from the upper left to the upper right corner) relative to the
 * label's proportions.
 *
 * @author Miha Kadunc
 * @version $id$
 */
public class GradientLabel extends ResizableTextLabel
{
	private static final long serialVersionUID = 1L;

	private Color backgroundOther = ColorHelper.getControlShadow();
	private BufferedImage daBuffer = null;
	private double endX = 1;
	private double endY = 0;
	private boolean gradientEnabled = true;
	private double startX = 0.2f;
	private double startY = 0;

	/**
	 * Constructs an empty GradientLabel
	 */
	public GradientLabel()
	{
		super();
		setOpaque(true);
	}

	/**
	 * Constructs a GradientLabel with the specified icon.
	 *
	 * @param image
	 */
	public GradientLabel(Icon image)
	{
		super(image);
		setOpaque(true);
	}

	/**
	 * Constructor for GradientLabel.
	 *
	 * @param image
	 * @param horizontalAlignment
	 */
	public GradientLabel(Icon image, int horizontalAlignment)
	{
		super(image, horizontalAlignment);
		setOpaque(true);
	}

	/**
	 * Constructs a GradientLabel with the specified text.
	 *
	 * @param text
	 */
	public GradientLabel(String text)
	{
		super(text);
		setOpaque(true);
	}

	/**
	 * Constructor for GradientLabel.
	 *
	 * @param text
	 * @param icon
	 * @param horizontalAlignment
	 */
	public GradientLabel(String text, Icon icon, int horizontalAlignment)
	{
		super(text, icon, horizontalAlignment);
		setOpaque(true);
	}

	/**
	 * Constructor for GradientLabel.
	 *
	 * @param text
	 * @param horizontalAlignment
	 */
	public GradientLabel(String text, int horizontalAlignment)
	{
		super(text, horizontalAlignment);
		setOpaque(true);
	}

	private void clearBuffer()
	{
		synchronized (this) {
			daBuffer = null;
		}
	}

	/**
	 * Returns the backgroundStart, this is the color that is used for the
	 * start of label's gradient. The end color is that of the label's
	 * background.
	 *
	 * @return Color
	 */
	public Color getBackgroundStart()
	{
		return backgroundOther;
	}

	/**
	 * Returns whether the gradient background is enabled.
	 *
	 * @return boolean
	 */
	public boolean isGradientEnabled()
	{
		return gradientEnabled;
	}

	/**
	 * @see javax.swing.JComponent#paintComponent(java.awt.Graphics)
	 */
    @Override
	protected void paintComponent(Graphics g)
	{
		boolean oldOpaque = isOpaque();

		if (oldOpaque && (isGradientEnabled())) {
			int w = getWidth();
			int h = getHeight();

			synchronized (this) {
				if ((daBuffer == null) || (daBuffer.getWidth() != w)
				    || (daBuffer.getHeight() != h)) {
					daBuffer = new BufferedImage(w, h,
						    BufferedImage.TYPE_3BYTE_BGR);

					Graphics2D g2d = daBuffer.createGraphics();
					g2d.setPaint(new GradientPaint((int)(startX * w),(int)(startY * h),
					        getBackgroundStart(), (int)(endX * w), (int)(endY * h),
					        getBackground()));
					g2d.fillRect(0, 0, w, h);
				}

				g.drawImage(daBuffer, 0, 0, this);
			}
		}

		if (isGradientEnabled()) {
			setOpaque(false);
		}

		super.paintComponent(g);
		super.setOpaque(oldOpaque);
	}

	/**
	 * Sets the background color. This color is used for the gradient's end
	 * point.
	 *
	 * @param c The color to be set
	 *
	 * @see java.awt.Component#setBackground(Color)
	 * @see #setBackgroundStart(Color)
	 */
    @Override
	public void setBackground(Color c)
	{
		if (!c.equals(getBackground())) {
			clearBuffer();
			super.setBackground(c);
		}
	}

	/**
	 * Sets the backgroundStart color.
	 *
	 * @param newBackgroundStart The backgroundStart to set
	 *
	 * @see #getBackgroundStart()
	 */
	public void setBackgroundStart(Color newBackgroundStart)
	{
		if (newBackgroundStart != null
		    && !newBackgroundStart.equals(backgroundOther)) {
			Color oldBackgroundStart = backgroundOther;
			backgroundOther = newBackgroundStart;
			clearBuffer();
			repaint();
			firePropertyChange("backgroundStart", oldBackgroundStart,
			    newBackgroundStart);
		}
	}

	/**
	 * Sets the gradientEnabled property.
	 *
	 * @param gradientEnabled The gradientEnabled to set
	 *
	 * @see #isGradientEnabled()
	 */
	public void setGradientEnabled(boolean gradientEnabled)
	{
		this.gradientEnabled = gradientEnabled;
		clearBuffer();
	}

	/**
	 * Sets the start and end point of the label's gradient, relative to the
	 * label's size. Value 0 is the left/top edge of the label. 1 is the
	 * right/bottom edge of the label.
	 *
	 * @param startX the x coordinate of the start of the gradient
	 * @param startY the y coordinate of the start of the gradient
	 * @param endX the x coordinate of the end of the gradient
	 * @param endY the y coordinate of the end of the gradient
	 */
	public void setGradientPoints(double startX, double startY, double endX,
	    double endY)
	{
		this.startX = startX;
		this.startY = startY;
		this.endX = endX;
		this.endY = endY;
		clearBuffer();
	}
}

/* __oOo__ */


text:
require "test_helper"

# Assure that showcase pages display for public users.
class ShowcaseControllerTest < ActionDispatch::IntegrationTest
  setup do
    @regular = users(:regular)
  end

  test "should get showcase for logged out user" do
    get showcase_url
    assert_response :success
  end

  test "should get showcase for regular user" do
    login(@regular)
    get showcase_url
    assert_response :success
  end

  test "should not get non-existent showcase page" do
    get showcase_show_url("nogo")
    assert_redirected_to showcase_url
  end

  test "should get where-to-start for logged out user" do
    get showcase_show_url("where-to-start")
    assert_response :success
  end

  test "should get search-nsrr for logged out user" do
    get showcase_show_url("search-nsrr")
    assert_response :success
  end
end


text:
"""The tests for the Season sensor platform."""
from datetime import datetime

import pytest

from homeassistant.components.season.sensor import (
    STATE_AUTUMN,
    STATE_SPRING,
    STATE_SUMMER,
    STATE_WINTER,
    TYPE_ASTRONOMICAL,
    TYPE_METEOROLOGICAL,
)
from homeassistant.const import STATE_UNKNOWN
from homeassistant.setup import async_setup_component

from tests.async_mock import patch

HEMISPHERE_NORTHERN = {
    "homeassistant": {"latitude": "48.864716", "longitude": "2.349014"},
    "sensor": {"platform": "season", "type": "astronomical"},
}

HEMISPHERE_SOUTHERN = {
    "homeassistant": {"latitude": "-33.918861", "longitude": "18.423300"},
    "sensor": {"platform": "season", "type": "astronomical"},
}

HEMISPHERE_EQUATOR = {
    "homeassistant": {"latitude": "0", "longitude": "-51.065100"},
    "sensor": {"platform": "season", "type": "astronomical"},
}

HEMISPHERE_EMPTY = {
    "homeassistant": {},
    "sensor": {"platform": "season", "type": "meteorological"},
}

NORTHERN_PARAMETERS = [
    (TYPE_ASTRONOMICAL, datetime(2017, 9, 3, 0, 0), STATE_SUMMER),
    (TYPE_METEOROLOGICAL, datetime(2017, 8, 13, 0, 0), STATE_SUMMER),
    (TYPE_ASTRONOMICAL, datetime(2017, 9, 23, 0, 0), STATE_AUTUMN),
    (TYPE_METEOROLOGICAL, datetime(2017, 9, 3, 0, 0), STATE_AUTUMN),
    (TYPE_ASTRONOMICAL, datetime(2017, 12, 25, 0, 0), STATE_WINTER),
    (TYPE_METEOROLOGICAL, datetime(2017, 12, 3, 0, 0), STATE_WINTER),
    (TYPE_ASTRONOMICAL, datetime(2017, 4, 1, 0, 0), STATE_SPRING),
    (TYPE_METEOROLOGICAL, datetime(2017, 3, 3, 0, 0), STATE_SPRING),
]

SOUTHERN_PARAMETERS = [
    (TYPE_ASTRONOMICAL, datetime(2017, 12, 25, 0, 0), STATE_SUMMER),
    (TYPE_METEOROLOGICAL, datetime(2017, 12, 3, 0, 0), STATE_SUMMER),
    (TYPE_ASTRONOMICAL, datetime(2017, 4, 1, 0, 0), STATE_AUTUMN),
    (TYPE_METEOROLOGICAL, datetime(2017, 3, 3, 0, 0), STATE_AUTUMN),
    (TYPE_ASTRONOMICAL, datetime(2017, 9, 3, 0, 0), STATE_WINTER),
    (TYPE_METEOROLOGICAL, datetime(2017, 8, 13, 0, 0), STATE_WINTER),
    (TYPE_ASTRONOMICAL, datetime(2017, 9, 23, 0, 0), STATE_SPRING),
    (TYPE_METEOROLOGICAL, datetime(2017, 9, 3, 0, 0), STATE_SPRING),
]

def idfn(val):
    """Provide IDs for pytest parametrize."""
    if isinstance(val, (datetime)):
        return val.strftime("%Y%m%d")

@pytest.mark.parametrize("type,day,expected", NORTHERN_PARAMETERS, ids=idfn)
async def test_season_northern_hemisphere(hass, type, day, expected):
    """Test that season should be summer."""
    hass.config.latitude = HEMISPHERE_NORTHERN["homeassistant"]["latitude"]

    config = {
        **HEMISPHERE_NORTHERN,
        "sensor": {"platform": "season", "type": type},
    }

    with patch("homeassistant.components.season.sensor.utcnow", return_value=day):
        assert await async_setup_component(hass, "sensor", config)
        await hass.async_block_till_done()

    state = hass.states.get("sensor.season")
    assert state
    assert state.state == expected

@pytest.mark.parametrize("type,day,expected", SOUTHERN_PARAMETERS, ids=idfn)
async def test_season_southern_hemisphere(hass, type, day, expected):
    """Test that season should be summer."""
    hass.config.latitude = HEMISPHERE_SOUTHERN["homeassistant"]["latitude"]

    config = {
        **HEMISPHERE_SOUTHERN,
        "sensor": {"platform": "season", "type": type},
    }

    with patch("homeassistant.components.season.sensor.utcnow", return_value=day):
        assert await async_setup_component(hass, "sensor", config)
        await hass.async_block_till_done()

    state = hass.states.get("sensor.season")
    assert state
    assert state.state == expected

async def test_season_equator(hass):
    """Test that season should be unknown for equator."""
    hass.config.latitude = HEMISPHERE_EQUATOR["homeassistant"]["latitude"]
    day = datetime(2017, 9, 3, 0, 0)

    with patch("homeassistant.components.season.sensor.utcnow", return_value=day):
        assert await async_setup_component(hass, "sensor", HEMISPHERE_EQUATOR)
        await hass.async_block_till_done()

    state = hass.states.get("sensor.season")
    assert state
    assert state.state == STATE_UNKNOWN

async def test_setup_hemisphere_empty(hass):
    """Test platform setup of missing latlong."""
    hass.config.latitude = None
    assert await async_setup_component(hass, "sensor", HEMISPHERE_EMPTY)
    await hass.async_block_till_done()
    assert hass.config.as_dict()["latitude"] is None


text:
This contains the file which enable incemental load
https://marcominerva.wordpress.com/2013/05/22/implementing-the-isupportincrementalloading-interface-in-a-window-store-app/


text:
@interface XMASFallingSnowView : UIView

@property (nonatomic, retain) NSMutableArray *flakesArray;
@property (nonatomic, retain) NSString *flakeFileName;
@property (nonatomic, assign) NSInteger flakesCount;
@property (nonatomic, assign) float flakeWidth;
@property (nonatomic, assign) float flakeHeight;
@property (nonatomic, assign) float flakeMinimumSize;
@property (nonatomic, assign) float animationDurationMin;
@property (nonatomic, assign) float animationDurationMax;

- (void)beginSnowAnimation;

@end


text:
package javax.swing;

public class BorderFactory {
  public static Border createEmptyBorder(int top, int left, int bottom, int right);
}


text:
/* class responsible for creating and importing and managing itineraries from user input and device status*/
//RENAME: naar filter

Ext.define('ReisRadar.controller.FilterController', {

	extend: 'Ext.app.Controller',

	requires: ['Ext.MessageBox','Ext.TitleBar','Ext.SegmentedButton','Ext.Label','Ext.slider.Slider','Ext.tab.Bar','Ext.LoadMask','Ext.data.proxy.LocalStorage','Ext.Map'],

	config: {

		views:[
			'ReisRadar.view.FilterView',
		],

		refs: {
			main: 'main',//refers to xtype main
			radiusLabel: '#radiusLabel',
			intervalLabel: '#intervalLabel',
			radiusSlider: '#radiusSlider',
			intervalSlider: '#intervalSlider'
		},

		control: {

			filterview:
			{
				show: 'onShow'
			},

			'button[action=RouteAction]':
			{
				tap: 'onGoTap'
			},

			slider: { // refers to xtype slider
				change: 'onSliderChange',
				drag: 'onSliderChange'
			}
		}
	},

	onShow: function()
	{
		if(this.active_radius == undefined)
		{
			this.active_radius = 150;
		}

		if(this.active_interval = undefined)
		{
			this.active_interval = 10;
		}
	},

	//determine how to proceed
	onGoTap: function()
	{
		var radius = this.getRadiusSlider().getValue();
		var interval = this.getIntervalSlider().getValue();

		ReisRadar.app.activeRadius = radius;
		ReisRadar.app.activeInterval = interval;

		this.applyFilter();
	},

	onSliderChange: function(field, newValue)
	{
		if(field.config.itemId == 'radiusSlider')
		{
			this.active_radius = field.getValue();
			var label = this.getRadiusLabel();
			label.setHtml(this.active_radius + 'm.');
		}

		if(field.config.itemId == 'intervalSlider')
		{
			this.active_interval = field.getValue();
			var label = this.getIntervalLabel();
			if(this.active_interval > 1){
				label.setHtml(this.active_interval + ' dagen');
			}
			else
			{
				label.setHtml(this.active_interval + ' dag');
			}

		}
	},

	applyFilter: function()
	{
			var cmp = this.getMain();
			this.getMain().setActiveItem(0);
	}
});


text:
package com.jacky.permanent;

import android.app.AlarmManager;
import android.app.PendingIntent;
import android.app.Service;
import android.content.Intent;
import android.os.IBinder;
import android.widget.Toast;

public class MyService extends Service
{
	AlarmManager mAlarmManager = null;
	PendingIntent mPendingIntent = null;

	@Override
	public void onCreate()
	{
		//start the service through alarm repeatly
	    Intent intent = new Intent(getApplicationContext(), MyService.class);
		mAlarmManager = (AlarmManager)getSystemService(ALARM_SERVICE);
		mPendingIntent = PendingIntent.getService(this, 0, intent, Intent.FLAG_ACTIVITY_NEW_TASK);
		long now = System.currentTimeMillis();
		mAlarmManager.setInexactRepeating(AlarmManager.RTC, now, 300, mPendingIntent);

		super.onCreate();
	}

	@Override
	public int onStartCommand(Intent intent, int flags, int startId)
	{
		Toast.makeText(getApplicationContext(), "Callback Successed!", Toast.LENGTH_SHORT).show();
		return START_STICKY;
	}

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

	@Override
	public void onDestroy()
	{

		super.onDestroy();
	}
}


text:
#pragma once

#include <modules/base/basemoduledefine.h>  // for IVW_MODULE_BASE_API

#include <inviwo/core/interaction/pickingmapper.h>   // for PickingMapper
#include <inviwo/core/ports/meshport.h>              // for MeshOutport
#include <inviwo/core/processors/processor.h>        // for Processor
#include <inviwo/core/processors/processorinfo.h>    // for ProcessorInfo
#include <inviwo/core/properties/boolproperty.h>     // for BoolProperty
#include <inviwo/core/properties/cameraproperty.h>   // for CameraProperty
#include <inviwo/core/properties/optionproperty.h>   // for OptionProperty
#include <inviwo/core/properties/ordinalproperty.h>  // for FloatProperty, FloatVec3Property
#include <inviwo/core/util/staticstring.h>           // for operator+
#include <modules/base/properties/basisproperty.h>   // for BasisProperty

#include <functional>   // for __base, function
#include <memory>       // for shared_ptr
#include <string>       // for operator==, string
#include <string_view>  // for operator==
#include <vector>       // for operator!=, vector, operator==

namespace inviwo {

class Mesh;
class PickingEvent;

/** \docpage{org.inviwo.MeshCreator, Mesh Creator}
 * ![](org.inviwo.MeshCreator.png?classIdentifier=org.inviwo.MeshCreator)
 *
 * Generate various meshes
 *   * __Sphere__,
 *   * __ColorSphere__,
 *   * __CubeBasicMesh__,
 *   * __CubeSimpleMesh__,
 *   * __LineCube__,
 *   * __LineCubeAdjacency__,
 *   * __Plane__,
 *   * __Disk__,
 *   * __Cone__,
 *   * __Cylinder__,
 *   * __Arrow__,
 *   * __CoordAxes__,
 *   * __Torus
 *
 *
 * ### Outports
 *   * __outport__ The generated mesh
 *
 * ### Properties
 *   * __Mesh Type__ The type of mesh to generate.
 *   * __Color__ Color parameter.
 *   * __Stop Position__ Start position of several mesh types
 *   * __Start Position__ Start position of several mesh types
 *   * __Normal__ Normal direction for planes, etc.
 *   * __Size scaling__ Scale parameter for various mesh types.
 *   * __Mesh resolution__ Mesh resulution parameter for some meshes.
 */
class IVW_MODULE_BASE_API MeshCreator : public Processor {
public:
    MeshCreator();
    ~MeshCreator();

    virtual const ProcessorInfo getProcessorInfo() const override;
    static const ProcessorInfo processorInfo_;

    std::shared_ptr<Mesh> createMesh();

protected:
    virtual void process() override;

private:
    enum class MeshType {
        Sphere,
        ColorSphere,
        CubeBasicMesh,
        CubeSimpleMesh,
        LineCube,
        LineCubeAdjacency,
        Plane,
        Disk,
        Cone,
        Cylinder,
        Arrow,
        CoordAxes,
        Torus,
        SphereOpt
    };

    void handlePicking(PickingEvent*);

    MeshOutport outport_;

    FloatVec3Property position1_;
    FloatVec3Property position2_;
    BasisProperty basis_;
    FloatVec3Property normal_;
    FloatVec4Property color_;
    FloatProperty torusRadius1_;
    FloatProperty torusRadius2_;

    FloatProperty meshScale_;  // Scale size of mesh
    IntVec2Property meshRes_;  // mesh resolution
    OptionProperty<MeshType> meshType_;
    BoolProperty enablePicking_;
    PickingMapper picking_;
    CameraProperty camera_;
    std::function<void(PickingEvent*)> pickingUpdate_;
};

}  // namespace inviwo


text:
module Zuora
  class ProductRatePlan < ZObject

    def charges
      @charges ||= ProductRatePlanCharge.where(:productRatePlanId => id)
    end

  end
end


text:
package org.culturegraph.mf.fluently;

import java.util.function.Predicate;

import org.culturegraph.mf.framework.Receiver;

/**
 * @author Christoph Böhme
 */
public class FlowDispatcherStart<R extends Receiver, S extends Receiver, P> {

	final R flowStart;
	final DispatcherStrategy<S, P> dispatcherStrategy;

	FlowDispatcherStart(final R flowStart,
			final DispatcherStrategy<S, P> dispatcherStrategy) {
		this.flowStart = flowStart;
		this.dispatcherStrategy = dispatcherStrategy;
	}

	public <N extends Receiver> FlowDispatcher<R, S, N, P> to(
			final Module<S, N> module) {
		return to(x -> true, module);
	}

	public <N extends Receiver> FlowDispatcher<R, S, N, P> to(
			final Predicate<P> condition, final Module<S, N> module) {
		final FlowDispatcher<R, S, N, P> flowDispatcher = new FlowDispatcher<>(this);
		return flowDispatcher.to(condition, module);
	}

	public TerminatedFlowDispatcher<R, S, P> to(
			final TerminatingModule<S> flowElement) {
		return to(x -> true, flowElement);
	}

	public TerminatedFlowDispatcher<R, S, P> to(final Predicate<P> condition,
			final TerminatingModule<S> flowElement) {
		final TerminatedFlowDispatcher<R, S, P> flowDispatcher =
				new TerminatedFlowDispatcher<>(this);
		return flowDispatcher.to(condition, flowElement);
	}

}


text:
//
//  GTLQPXExpressTimeOfDayRange.h
//

// ----------------------------------------------------------------------------
// NOTE: This file is generated from Google APIs Discovery Service.
// Service:
//   QPX Express API (qpxExpress/v1)
// Description:
//   Lets you find the least expensive flights between an origin and a
//   destination.
// Documentation:
//   http://developers.google.com/qpx-express
// Classes:
//   GTLQPXExpressTimeOfDayRange (0 custom class methods, 3 custom properties)

#if GTL_BUILT_AS_FRAMEWORK
  #import "GTL/GTLObject.h"
#else
  #import "GTLObject.h"
#endif

// ----------------------------------------------------------------------------
//
//   GTLQPXExpressTimeOfDayRange
//

// Two times in a single day defining a time range.

@interface GTLQPXExpressTimeOfDayRange : GTLObject

// The earliest time of day in HH:MM format.
@property (nonatomic, copy) NSString *earliestTime;

// Identifies this as a time of day range object, representing two times in a
// single day defining a time range. Value: the fixed string
// qpxexpress#timeOfDayRange.
@property (nonatomic, copy) NSString *kind;

// The latest time of day in HH:MM format.
@property (nonatomic, copy) NSString *latestTime;

@end


text:
package java.awt;

import java.awt.geom.AffineTransform;
import java.awt.image.BufferedImage;
import java.awt.image.ColorModel;
import java.awt.image.VolatileImage;
import java.awt.image.WritableRaster;

import sun.awt.image.SunVolatileImage;

/**
 * The GraphicsConfiguration class describes the
 * characteristics of a graphics destination such as a printer or monitor.
 * There can be many GraphicsConfiguration objects associated
 * with a single graphics device, representing different drawing modes or
 * capabilities.  The corresponding native structure will vary from platform
 * to platform.  For example, on X11 windowing systems,
 * each visual is a different GraphicsConfiguration.
 * On Microsoft Windows, GraphicsConfigurations represent
 * PixelFormats available in the current resolution and color depth.
 *

 * In a virtual device multi-screen environment in which the desktop
 * area could span multiple physical screen devices, the bounds of the
 * GraphicsConfiguration objects are relative to the
 * virtual coordinate system.  When setting the location of a
 * component, use {@link #getBounds() getBounds} to get the bounds of
 * the desired GraphicsConfiguration and offset the location
 * with the coordinates of the GraphicsConfiguration,
 * as the following code sample illustrates:
 *

 *
 *

 *      Frame f = new Frame(gc);  // where gc is a GraphicsConfiguration
 *      Rectangle bounds = gc.getBounds();
 *      f.setLocation(10 + bounds.x, 10 + bounds.y);

 *
 *

 * To determine if your environment is a virtual device
 * environment, call getBounds on all of the
 * GraphicsConfiguration objects in your system.  If
 * any of the origins of the returned bounds is not (0, 0),
 * your environment is a virtual device environment.
 *
 *

 * You can also use getBounds to determine the bounds
 * of the virtual device.  To do this, first call getBounds on all
 * of the GraphicsConfiguration objects in your
 * system.  Then calculate the union of all of the bounds returned
 * from the calls to getBounds.  The union is the
 * bounds of the virtual device.  The following code sample
 * calculates the bounds of the virtual device.
 *
 *

 *      Rectangle virtualBounds = new Rectangle();
 *      GraphicsEnvironment ge = GraphicsEnvironment.
 *              getLocalGraphicsEnvironment();
 *      GraphicsDevice[] gs =
 *              ge.getScreenDevices();
 *      for (int j = 0; j < gs.length; j++) {
 *          GraphicsDevice gd = gs[j];
 *          GraphicsConfiguration[] gc =
 *              gd.getConfigurations();
 *          for (int i=0; i < gc.length; i++) {
 *              virtualBounds =
 *                  virtualBounds.union(gc[i].getBounds());
 *          }
 *      }

 *
 * @see Window
 * @see Frame
 * @see GraphicsEnvironment
 * @see GraphicsDevice
 */
/*
 * REMIND:  What to do about capabilities?
 * The
 * capabilities of the device can be determined by enumerating the possible
 * capabilities and checking if the GraphicsConfiguration
 * implements the interface for that capability.
 *
 */

public abstract class GraphicsConfiguration {

    private static BufferCapabilities defaultBufferCaps;
    private static ImageCapabilities defaultImageCaps;

    /**
     * This is an abstract class that cannot be instantiated directly.
     * Instances must be obtained from a suitable factory or query method.
     *
     * @see GraphicsDevice#getConfigurations
     * @see GraphicsDevice#getDefaultConfiguration
     * @see GraphicsDevice#getBestConfiguration
     * @see Graphics2D#getDeviceConfiguration
     */
    protected GraphicsConfiguration() {
    }

    /**
     * Returns the {@link GraphicsDevice} associated with this
     * GraphicsConfiguration.
     * @return a GraphicsDevice object that is
     * associated with this GraphicsConfiguration.
     */
    public abstract GraphicsDevice getDevice();

    /**
     * Returns a {@link BufferedImage} with a data layout and color model
     * compatible with this GraphicsConfiguration.  This
     * method has nothing to do with memory-mapping
     * a device.  The returned BufferedImage has
     * a layout and color model that is closest to this native device
     * configuration and can therefore be optimally blitted to this
     * device.
     * @param width the width of the returned BufferedImage
     * @param height the height of the returned BufferedImage
     * @return a BufferedImage whose data layout and color
     * model is compatible with this GraphicsConfiguration.
     */
    public abstract BufferedImage createCompatibleImage(int width, int height);

    /**
     * Returns a BufferedImage that supports the specified
     * transparency and has a data layout and color model
     * compatible with this GraphicsConfiguration.  This
     * method has nothing to do with memory-mapping
     * a device. The returned BufferedImage has a layout and
     * color model that can be optimally blitted to a device
     * with this GraphicsConfiguration.
     * @param width the width of the returned BufferedImage
     * @param height the height of the returned BufferedImage
     * @param transparency the specified transparency mode
     * @return a BufferedImage whose data layout and color
     * model is compatible with this GraphicsConfiguration
     * and also supports the specified transparency.
     * @throws IllegalArgumentException if the transparency is not a valid value
     * @see Transparency#OPAQUE
     * @see Transparency#BITMASK
     * @see Transparency#TRANSLUCENT
     */
    public BufferedImage createCompatibleImage(int width, int height,
                                               int transparency)
    {
        if (getColorModel().getTransparency() == transparency) {
            return createCompatibleImage(width, height);
        }

        ColorModel cm = getColorModel(transparency);
        if (cm == null) {
            throw new IllegalArgumentException("Unknown transparency: " +
                                               transparency);
        }
        WritableRaster wr = cm.createCompatibleWritableRaster(width, height);
        return new BufferedImage(cm, wr, cm.isAlphaPremultiplied(), null);
    }

    /**
     * Returns a {@link VolatileImage} with a data layout and color model
     * compatible with this GraphicsConfiguration.
     * The returned VolatileImage
     * may have data that is stored optimally for the underlying graphics
     * device and may therefore benefit from platform-specific rendering
     * acceleration.
     * @param width the width of the returned VolatileImage
     * @param height the height of the returned VolatileImage
     * @return a VolatileImage whose data layout and color
     * model is compatible with this GraphicsConfiguration.
     * @see Component#createVolatileImage(int, int)
     * @since 1.4
     */
    public VolatileImage createCompatibleVolatileImage(int width, int height) {
        VolatileImage vi = null;
        try {
            vi = createCompatibleVolatileImage(width, height,
                                               null, Transparency.OPAQUE);
        } catch (AWTException e) {
            // shouldn't happen: we're passing in null caps
            assert false;
        }
        return vi;
    }

    /**
     * Returns a {@link VolatileImage} with a data layout and color model
     * compatible with this GraphicsConfiguration.
     * The returned VolatileImage
     * may have data that is stored optimally for the underlying graphics
     * device and may therefore benefit from platform-specific rendering
     * acceleration.
     * @param width the width of the returned VolatileImage
     * @param height the height of the returned VolatileImage
     * @param transparency the specified transparency mode
     * @return a VolatileImage whose data layout and color
     * model is compatible with this GraphicsConfiguration.
     * @throws IllegalArgumentException if the transparency is not a valid value
     * @see Transparency#OPAQUE
     * @see Transparency#BITMASK
     * @see Transparency#TRANSLUCENT
     * @see Component#createVolatileImage(int, int)
     * @since 1.5
     */
    public VolatileImage createCompatibleVolatileImage(int width, int height,
                                                       int transparency)
    {
        VolatileImage vi = null;
        try {
            vi = createCompatibleVolatileImage(width, height, null, transparency);
        } catch (AWTException e) {
            // shouldn't happen: we're passing in null caps
            assert false;
        }
        return vi;
    }

    /**
     * Returns a {@link VolatileImage} with a data layout and color model
     * compatible with this GraphicsConfiguration, using
     * the specified image capabilities.
     * If the caps parameter is null, it is effectively ignored
     * and this method will create a VolatileImage without regard to
     * ImageCapabilities constraints.
     *
     * The returned VolatileImage has
     * a layout and color model that is closest to this native device
     * configuration and can therefore be optimally blitted to this
     * device.
     * @return a VolatileImage whose data layout and color
     * model is compatible with this GraphicsConfiguration.
     * @param width the width of the returned VolatileImage
     * @param height the height of the returned VolatileImage
     * @param caps the image capabilities
     * @exception AWTException if the supplied image capabilities could not
     * be met by this graphics configuration
     * @since 1.4
     */
    public VolatileImage createCompatibleVolatileImage(int width, int height,
        ImageCapabilities caps) throws AWTException
    {
        return createCompatibleVolatileImage(width, height, caps,
                                             Transparency.OPAQUE);
    }

    /**
     * Returns a {@link VolatileImage} with a data layout and color model
     * compatible with this GraphicsConfiguration, using
     * the specified image capabilities and transparency value.
     * If the caps parameter is null, it is effectively ignored
     * and this method will create a VolatileImage without regard to
     * ImageCapabilities constraints.
     *
     * The returned VolatileImage has
     * a layout and color model that is closest to this native device
     * configuration and can therefore be optimally blitted to this
     * device.
     * @param width the width of the returned VolatileImage
     * @param height the height of the returned VolatileImage
     * @param caps the image capabilities
     * @param transparency the specified transparency mode
     * @return a VolatileImage whose data layout and color
     * model is compatible with this GraphicsConfiguration.
     * @see Transparency#OPAQUE
     * @see Transparency#BITMASK
     * @see Transparency#TRANSLUCENT
     * @throws IllegalArgumentException if the transparency is not a valid value
     * @exception AWTException if the supplied image capabilities could not
     * be met by this graphics configuration
     * @see Component#createVolatileImage(int, int)
     * @since 1.5
     */
    public VolatileImage createCompatibleVolatileImage(int width, int height,
        ImageCapabilities caps, int transparency) throws AWTException
    {
        VolatileImage vi =
            new SunVolatileImage(this, width, height, transparency, caps);
        if (caps != null && caps.isAccelerated() &&
            !vi.getCapabilities().isAccelerated())
        {
            throw new AWTException("Supplied image capabilities could not " +
                                   "be met by this graphics configuration.");
        }
        return vi;
    }

    /**
     * Returns the {@link ColorModel} associated with this
     * GraphicsConfiguration.
     * @return a ColorModel object that is associated with
     * this GraphicsConfiguration.
     */
    public abstract ColorModel getColorModel();

    /**
     * Returns the ColorModel associated with this
     * GraphicsConfiguration that supports the specified
     * transparency.
     * @param transparency the specified transparency mode
     * @return a ColorModel object that is associated with
     * this GraphicsConfiguration and supports the
     * specified transparency or null if the transparency is not a valid
     * value.
     * @see Transparency#OPAQUE
     * @see Transparency#BITMASK
     * @see Transparency#TRANSLUCENT
     */
    public abstract ColorModel getColorModel(int transparency);

    /**
     * Returns the default {@link AffineTransform} for this
     * GraphicsConfiguration. This
     * AffineTransform is typically the Identity transform
     * for most normal screens.  The default AffineTransform
     * maps coordinates onto the device such that 72 user space
     * coordinate units measure approximately 1 inch in device
     * space.  The normalizing transform can be used to make
     * this mapping more exact.  Coordinates in the coordinate space
     * defined by the default AffineTransform for screen and
     * printer devices have the origin in the upper left-hand corner of
     * the target region of the device, with X coordinates
     * increasing to the right and Y coordinates increasing downwards.
     * For image buffers not associated with a device, such as those not
     * created by createCompatibleImage,
     * this AffineTransform is the Identity transform.
     * @return the default AffineTransform for this
     * GraphicsConfiguration.
     */
    public abstract AffineTransform getDefaultTransform();

    /**
     *
     * Returns a AffineTransform that can be concatenated
     * with the default AffineTransform
     * of a GraphicsConfiguration so that 72 units in user
     * space equals 1 inch in device space.
     *

     * For a particular {@link Graphics2D}, g, one
     * can reset the transformation to create
     * such a mapping by using the following pseudocode:
     *

     *      GraphicsConfiguration gc = g.getDeviceConfiguration();
     *
     *      g.setTransform(gc.getDefaultTransform());
     *      g.transform(gc.getNormalizingTransform());
     *

     * Note that sometimes this AffineTransform is identity,
     * such as for printers or metafile output, and that this
     * AffineTransform is only as accurate as the information
     * supplied by the underlying system.  For image buffers not
     * associated with a device, such as those not created by
     * createCompatibleImage, this
     * AffineTransform is the Identity transform
     * since there is no valid distance measurement.
     * @return an AffineTransform to concatenate to the
     * default AffineTransform so that 72 units in user
     * space is mapped to 1 inch in device space.
     */
    public abstract AffineTransform getNormalizingTransform();

    /**
     * Returns the bounds of the GraphicsConfiguration
     * in the device coordinates. In a multi-screen environment
     * with a virtual device, the bounds can have negative X
     * or Y origins.
     * @return the bounds of the area covered by this
     * GraphicsConfiguration.
     * @since 1.3
     */
    public abstract Rectangle getBounds();

    private static class DefaultBufferCapabilities extends BufferCapabilities {
        public DefaultBufferCapabilities(ImageCapabilities imageCaps) {
            super(imageCaps, imageCaps, null);
        }
    }

    /**
     * Returns the buffering capabilities of this
     * GraphicsConfiguration.
     * @return the buffering capabilities of this graphics
     * configuration object
     * @since 1.4
     */
    public BufferCapabilities getBufferCapabilities() {
        if (defaultBufferCaps == null) {
            defaultBufferCaps = new DefaultBufferCapabilities(
                getImageCapabilities());
        }
        return defaultBufferCaps;
    }

    /**
     * Returns the image capabilities of this
     * GraphicsConfiguration.
     * @return the image capabilities of this graphics
     * configuration object
     * @since 1.4
     */
    public ImageCapabilities getImageCapabilities() {
        if (defaultImageCaps == null) {
            defaultImageCaps = new ImageCapabilities(false);
        }
        return defaultImageCaps;
    }
    }


text:
Easy to use Utility library for Android.

[![Download](https://api.bintray.com/packages/chipset95/maven/me.kartikarora.potato.library/images/download.svg) ](https://bintray.com/chipset95/maven/me.kartikarora.potato.library/_latestVersion)
[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-Potato%20Library-blue.svg?style=flat)](http://android-arsenal.com/details/1/2205)

## Usage

### Gradle

To the module's `build.gradle` file, add

```groovy
dependencies {
    compile 'me.kartikarora.potato:potato:0.2.1'
}
```

Call the library using `Potato.potate(context)` and you will get following methods to use:

* Utils() - Utility methods to check Internet connection, methods on Bluetooth connection, methods for WiFi, get Battery level etc.
* Notifications() - Create a notification with or without sound
* Preferences() - Store and Retrieve data to/from `SharedPreferences` easily
* Intents() - Create Intents for email, call, sms and browser with ease

### Permissions

The following permissions need to be added to AndroidManifest.xml file of your project

#### For checking internet connection

```xml
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
```

#### For placing a call
```xml
<uses-permission android:name="android.permission.CALL_PHONE" />
```

#### For sending SMS
```xml
<uses-permission android:name="android.permission.SEND_SMS" />
```

#### For bluetooth tools

```xml
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
```

#### For WiFi tools

```xml
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
```

#### For Mobile network tools

```xml
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
```

#### For GPS tool
```xml
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
```

#### For reading external storage
```xml
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
```
Please make sure to request appropriate [runtime permisions](http://developer.android.com/training/permissions/requesting.html) on Android Marshmallow (SDK 23) and above

## Further Development

Plan to add Android Wear support.

## Contribution

Feel free to fork the repo, add new methods, send in pull requests and add new issues. There's no license right now.

Thanks to
- [Saketh Kaparthi](https://github.com/sakethkaparthi) for adding Wifi tools, GPS tool and Bluetooth tools.
- [Anuraag Baishya](https://github.com/anuraag-baishya) for adding Mobile Data tools.
- [Jyotman Singh](https://github.com/jyotman94) for improving `Preferences` and `Bluetooth` methods.


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
Grevillea 2(no. 13): 6 (1873)

#### Original name
Cyphella fasciculata Berk. & M.A. Curtis

### Remarks
null


text:
# Makefile.in generated by automake 1.14.1 from Makefile.am.
# Makefile.  Generated from Makefile.in by configure.

# Copyright (C) 1994-2013 Free Software Foundation, Inc.

# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
am__make_running_with_option = \
  case $${target_option-} in \
      ?) ;; \
      *) echo "am__make_running_with_option: internal error: invalid" \
              "target option '$${target_option-}' specified" >&2; \
         exit 1;; \
  esac; \
  has_opt=no; \
  sane_makeflags=$$MAKEFLAGS; \
  if $(am__is_gnu_make); then \
    sane_makeflags=$$MFLAGS; \
  else \
    case $$MAKEFLAGS in \
      *\\[\ \	]*) \
        bs=\\; \
        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
    esac; \
  fi; \
  skip_next=no; \
  strip_trailopt () \
  { \
    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
  }; \
  for flg in $$sane_makeflags; do \
    test $$skip_next = yes && { skip_next=no; continue; }; \
    case $$flg in \
      *=*|--*) continue;; \
        -*I) strip_trailopt 'I'; skip_next=yes;; \
      -*I?*) strip_trailopt 'I';; \
        -*O) strip_trailopt 'O'; skip_next=yes;; \
      -*O?*) strip_trailopt 'O';; \
        -*l) strip_trailopt 'l'; skip_next=yes;; \
      -*l?*) strip_trailopt 'l';; \
      -[dEDm]) skip_next=yes;; \
      -[JT]) skip_next=yes;; \
    esac; \
    case $$flg in \
      *$$target_option*) has_opt=yes; break;; \
    esac; \
  done; \
  test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/bitcoin
pkgincludedir = $(includedir)/bitcoin
pkglibdir = $(libdir)/bitcoin
pkglibexecdir = $(libexecdir)/bitcoin
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = x86_64-unknown-linux-gnu
host_triplet = x86_64-unknown-linux-gnu
subdir = .
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
	$(top_srcdir)/configure $(am__configure_deps) \
	$(top_srcdir)/share/setup.nsi.in \
	$(top_srcdir)/share/qt/Info.plist.in \
	$(top_srcdir)/qa/pull-tester/run-bitcoind-for-test.sh.in \
	$(top_srcdir)/qa/pull-tester/build-tests.sh.in COPYING INSTALL \
	src/build-aux/compile src/build-aux/config.guess \
	src/build-aux/config.sub src/build-aux/depcomp \
	src/build-aux/install-sh src/build-aux/missing \
	$(top_srcdir)/src/build-aux/compile \
	$(top_srcdir)/src/build-aux/config.guess \
	$(top_srcdir)/src/build-aux/config.sub \
	$(top_srcdir)/src/build-aux/install-sh \
	$(top_srcdir)/src/build-aux/missing
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/src/m4/ax_boost_base.m4 \
	$(top_srcdir)/src/m4/ax_boost_chrono.m4 \
	$(top_srcdir)/src/m4/ax_boost_filesystem.m4 \
	$(top_srcdir)/src/m4/ax_boost_program_options.m4 \
	$(top_srcdir)/src/m4/ax_boost_system.m4 \
	$(top_srcdir)/src/m4/ax_boost_thread.m4 \
	$(top_srcdir)/src/m4/ax_boost_unit_test_framework.m4 \
	$(top_srcdir)/src/m4/ax_check_compile_flag.m4 \
	$(top_srcdir)/src/m4/ax_check_link_flag.m4 \
	$(top_srcdir)/src/m4/ax_check_preproc_flag.m4 \
	$(top_srcdir)/src/m4/ax_pthread.m4 \
	$(top_srcdir)/src/m4/bitcoin_find_bdb48.m4 \
	$(top_srcdir)/src/m4/bitcoin_qt.m4 \
	$(top_srcdir)/src/m4/bitcoin_subdir_to_include.m4 \
	$(top_srcdir)/pkg.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
 configure.lineno config.status.lineno
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/src/bitcoin-config.h
CONFIG_CLEAN_FILES = share/setup.nsi share/qt/Info.plist \
	qa/pull-tester/run-bitcoind-for-test.sh \
	qa/pull-tester/build-tests.sh
CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_$(V))
am__v_P_ = $(am__v_P_$(AM_DEFAULT_VERBOSITY))
am__v_P_0 = false
am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_$(V))
am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
am__v_GEN_0 = @echo "  GEN     " $@;
am__v_GEN_1 =
AM_V_at = $(am__v_at_$(V))
am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
am__v_at_0 = @
am__v_at_1 =
SOURCES =
DIST_SOURCES =
RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
	ctags-recursive dvi-recursive html-recursive info-recursive \
	install-data-recursive install-dvi-recursive \
	install-exec-recursive install-html-recursive \
	install-info-recursive install-pdf-recursive \
	install-ps-recursive install-recursive installcheck-recursive \
	installdirs-recursive pdf-recursive ps-recursive \
	tags-recursive uninstall-recursive
am__can_run_installinfo = \
  case $$AM_UPDATE_INFO_DIR in \
    n|no|NO) false;; \
    *) (install-info --version) >/dev/null 2>&1;; \
  esac
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive	\
  distclean-recursive maintainer-clean-recursive
am__recursive_targets = \
  $(RECURSIVE_TARGETS) \
  $(RECURSIVE_CLEAN_TARGETS) \
  $(am__extra_recursive_targets)
AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
	cscope distdir dist dist-all distcheck
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
# Read a list of newline-separated strings from the standard input,
# and print each of them once, without duplicates.  Input order is
# *not* preserved.
am__uniquify_input = $(AWK) '\
  BEGIN { nonempty = 0; } \
  { items[$$0] = 1; nonempty = 1; } \
  END { if (nonempty) { for (i in items) print i; }; } \
'
# Make sure the list of sources is unique.  This is necessary because,
# e.g., the same source file might be shared among _SOURCES variables
# for different programs/libraries.
am__define_uniq_tagged_files = \
  list='$(am__tagged_files)'; \
  unique=`for i in $$list; do \
    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
  done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
CSCOPE = cscope
DIST_SUBDIRS = $(SUBDIRS)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
am__remove_distdir = \
  if test -d "$(distdir)"; then \
    find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
      && rm -rf "$(distdir)" \
      || { sleep 5 && rm -rf "$(distdir)"; }; \
  else :; fi
am__post_remove_distdir = $(am__remove_distdir)
am__relativize = \
  dir0=`pwd`; \
  sed_first='s,^\([^/]*\)/.*$$,\1,'; \
  sed_rest='s,^[^/]*/*,,'; \
  sed_last='s,^.*/\([^/]*\)$$,\1,'; \
  sed_butlast='s,/*[^/]*$$,,'; \
  while test -n "$$dir1"; do \
    first=`echo "$$dir1" | sed -e "$$sed_first"`; \
    if test "$$first" != "."; then \
      if test "$$first" = ".."; then \
        dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
        dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
      else \
        first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
        if test "$$first2" = "$$first"; then \
          dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
        else \
          dir2="../$$dir2"; \
        fi; \
        dir0="$$dir0"/"$$first"; \
      fi; \
    fi; \
    dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
  done; \
  reldir="$$dir2"
DIST_ARCHIVES = $(distdir).tar.gz
DIST_TARGETS = dist-gzip
distuninstallcheck_listfiles = find . -type f -print
am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
  | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
distcleancheck_listfiles = find . -type f -print
ACLOCAL = ${SHELL} /root/xbhcoin/src/build-aux/missing aclocal-1.14
AMTAR = $${TAR-tar}
AM_DEFAULT_VERBOSITY = 0
AR = /usr/bin/ar
AUTOCONF = ${SHELL} /root/xbhcoin/src/build-aux/missing autoconf
AUTOHEADER = ${SHELL} /root/xbhcoin/src/build-aux/missing autoheader
AUTOMAKE = ${SHELL} /root/xbhcoin/src/build-aux/missing automake-1.14
AWK = gawk
BDB_CPPFLAGS =
BDB_LIBS = -ldb_cxx
BOOST_CHRONO_LIB = -lboost_chrono
BOOST_CPPFLAGS = -pthread -I/usr/include
BOOST_FILESYSTEM_LIB = -lboost_filesystem
BOOST_LDFLAGS = -L/usr/lib/x86_64-linux-gnu
BOOST_LIBS = -L/usr/lib/x86_64-linux-gnu -lboost_system -lboost_filesystem -lboost_program_options -lboost_thread -lboost_chrono
BOOST_PROGRAM_OPTIONS_LIB = -lboost_program_options
BOOST_SYSTEM_LIB = -lboost_system
BOOST_THREAD_LIB = -lboost_thread
BOOST_UNIT_TEST_FRAMEWORK_LIB = -lboost_unit_test_framework
BREW =
BUILD_QT =
BUILD_TEST = test
BUILD_TEST_QT =
CC = gcc
CCACHE =
CCDEPMODE = depmode=gcc3
CFLAGS = -g -O2
CLIENT_VERSION_BUILD = 0
CLIENT_VERSION_IS_RELEASE = true
CLIENT_VERSION_MAJOR = 0
CLIENT_VERSION_MINOR = 9
CLIENT_VERSION_REVISION = 0
COMPARISON_TOOL_REORG_TESTS = 0
COPYRIGHT_YEAR = 2014
CPP = gcc -E
CPPFLAGS =  -DBOOST_SPIRIT_THREADSAFE -DHAVE_BUILD_INFO -D__STDC_FORMAT_MACROS  -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2
CRYPTO_CFLAGS =
CRYPTO_LIBS = -lcrypto
CXX = g++
CXXCPP = g++ -E
CXXDEPMODE = depmode=gcc3
CXXFLAGS = --param ggc-min-expand=1 --param ggc-min-heapsize=32768  -Wstack-protector -fstack-protector-all -fPIE
CYGPATH_W = echo
DEFS = -DHAVE_CONFIG_H
DEPDIR = .deps
ECHO_C =
ECHO_N = -n
ECHO_T =
EGREP = /bin/grep -E
EXEEXT =
GCOV = /usr/bin/gcov
GENHTML =
GIT =
GREP = /bin/grep
HEXDUMP = /usr/bin/hexdump
INCLUDES =  -pthread
INSTALL = /usr/bin/install -c
INSTALL_DATA = ${INSTALL} -m 644
INSTALL_PROGRAM = ${INSTALL}
INSTALL_SCRIPT = ${INSTALL}
INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
JAVA =
JAVA_COMPARISON_TOOL =
LCOV =
LDFLAGS =   -Wl,-z,relro -Wl,-z,now -pie
LEVELDB_CPPFLAGS =
LEVELDB_TARGET_FLAGS =
LIBLEVELDB =
LIBMEMENV =
LIBOBJS =
LIBS = -lminiupnpc -lminiupnpc -lminiupnpc -lminiupnpc  -lssl -lcrypto   -lcrypto
LRELEASE =
LTLIBOBJS =
LUPDATE =
MAINT =
MAKEINFO = ${SHELL} /root/xbhcoin/src/build-aux/missing makeinfo
MAKENSIS =
MKDIR_P = /bin/mkdir -p
MOC =
MOC_DEFS = -DHAVE_CONFIG_H -I$(top_srcdir)/src
OBJC = gcc
OBJCDEPMODE = depmode=gcc3
OBJCFLAGS =
OBJCXX = g++
OBJCXXDEPMODE = depmode=gcc3
OBJCXXFLAGS = --param ggc-min-expand=1 --param ggc-min-heapsize=32768  -Wstack-protector -fstack-protector-all -fPIE
OBJEXT = o
PACKAGE = bitcoin
PACKAGE_BUGREPORT = info@bitcoin.org
PACKAGE_NAME = Bitcoin Core
PACKAGE_STRING = Bitcoin Core 0.9.0
PACKAGE_TARNAME = bitcoin
PACKAGE_URL =
PACKAGE_VERSION = 0.9.0
PATH_SEPARATOR = :
PKG_CONFIG = /usr/bin/pkg-config
PKG_CONFIG_LIBDIR =
PKG_CONFIG_PATH =
PORT =
PROTOBUF_CFLAGS =
PROTOBUF_LIBS =
PROTOC =
PTHREAD_CC = gcc
PTHREAD_CFLAGS = -pthread
PTHREAD_LIBS =
QR_CFLAGS =
QR_LIBS =
QT_CFLAGS =
QT_DBUS_CFLAGS =
QT_DBUS_INCLUDES =
QT_DBUS_LIBS =
QT_INCLUDES =
QT_LDFLAGS =
QT_LIBS =
QT_SELECT = qt
QT_TEST_CFLAGS =
QT_TEST_INCLUDES =
QT_TEST_LIBS =
RANLIB = /usr/bin/ranlib
RCC =
SED = /bin/sed
SET_MAKE =
SHELL = /bin/bash
SSL_CFLAGS =
SSL_LIBS = -lssl -lcrypto
STRIP = /usr/bin/strip
TESTDEFS =  -DBOOST_TEST_DYN_LINK
UIC =
USE_IPV6 =
USE_QRCODE =
USE_UPNP =
VERSION = 0.9.0
WINDOWS_BITS =
WINDRES =
XGETTEXT =
abs_builddir = /root/xbhcoin
abs_srcdir = /root/xbhcoin
abs_top_builddir = /root/xbhcoin
abs_top_srcdir = /root/xbhcoin
ac_ct_CC = gcc
ac_ct_CXX = g++
ac_ct_OBJC = gcc
ac_ct_OBJCXX = g++
am__include = include
am__leading_dot = .
am__quote =
am__tar = $${TAR-tar} chof - "$$tardir"
am__untar = $${TAR-tar} xf -
ax_pthread_config =
bindir = ${exec_prefix}/bin
build = x86_64-unknown-linux-gnu
build_alias =
build_cpu = x86_64
build_os = linux-gnu
build_vendor = unknown
builddir = .
datadir = ${datarootdir}
datarootdir = ${prefix}/share
docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
dvidir = ${docdir}
exec_prefix = ${prefix}
host = x86_64-unknown-linux-gnu
host_alias =
host_cpu = x86_64
host_os = linux-gnu
host_vendor = unknown
htmldir = ${docdir}
includedir = ${prefix}/include
infodir = ${datarootdir}/info
install_sh = ${SHELL} /root/xbhcoin/src/build-aux/install-sh
libdir = ${exec_prefix}/lib
libexecdir = ${exec_prefix}/libexec
localedir = ${datarootdir}/locale
localstatedir = ${prefix}/var
mandir = ${datarootdir}/man
mkdir_p = $(MKDIR_P)
oldincludedir = /usr/include
pdfdir = ${docdir}
prefix = /usr/local
program_transform_name = s,x,x,
psdir = ${docdir}
sbindir = ${exec_prefix}/sbin
sharedstatedir = ${prefix}/com
srcdir = .
sysconfdir = ${prefix}/etc
target_alias =
top_build_prefix =
top_builddir = .
top_srcdir = .
ACLOCAL_AMFLAGS = -I src/m4
SUBDIRS = src
GZIP_ENV = "-9n"
BITCOIND_BIN = $(top_builddir)/src/bitcoind$(EXEEXT)
BITCOIN_QT_BIN = $(top_builddir)/src/qt/bitcoin-qt$(EXEEXT)
BITCOIN_CLI_BIN = $(top_builddir)/src/bitcoin-cli$(EXEEXT)
BITCOIN_WIN_INSTALLER = $(PACKAGE)-$(PACKAGE_VERSION)-win$(WINDOWS_BITS)-setup$(EXEEXT)
OSX_APP = Bitcoin-Qt.app
OSX_DMG = Bitcoin-Qt.dmg
OSX_DEPLOY_SCRIPT = $(top_srcdir)/contrib/macdeploy/macdeployqtplus
OSX_FANCY_PLIST = $(top_srcdir)/contrib/macdeploy/fancy.plist
OSX_INSTALLER_ICONS = $(top_srcdir)/src/qt/res/icons/bitcoin.icns
OSX_PLIST = $(top_srcdir)/share/qt/Info.plist #not installed
DIST_DOCS = $(wildcard doc/*.md) $(wildcard doc/release-notes/*.md)
WINDOWS_PACKAGING = $(top_srcdir)/share/pixmaps/bitcoin.ico \
  $(top_srcdir)/share/pixmaps/nsis-header.bmp \
  $(top_srcdir)/share/pixmaps/nsis-wizard.bmp \
  $(top_srcdir)/doc/README_windows.txt

OSX_PACKAGING = $(OSX_DEPLOY_SCRIPT) $(OSX_FANCY_PLIST) $(OSX_INSTALLER_ICONS) \
  $(top_srcdir)/contrib/macdeploy/background.png

COVERAGE_INFO = baseline_filtered_combined.info baseline.info block_test.info \
  leveldb_baseline.info test_bitcoin_filtered.info total_coverage.info \
  baseline_filtered.info block_test_filtered.info \
  leveldb_baseline_filtered.info test_bitcoin_coverage.info test_bitcoin.info

OSX_APP_BUILT = $(OSX_APP)/Contents/PkgInfo $(OSX_APP)/Contents/Resources/empty.lproj \
  $(OSX_APP)/Contents/Resources/bitcoin.icns $(OSX_APP)/Contents/Info.plist \
  $(OSX_APP)/Contents/MacOS/Bitcoin-Qt

EXTRA_DIST = $(top_srcdir)/share/genbuild.sh qa/pull-tester/pull-tester.sh $(DIST_DOCS) $(WINDOWS_PACKAGING) $(OSX_PACKAGING)
CLEANFILES = $(OSX_DMG) $(OSX_APP) $(BITCOIN_WIN_INSTALLER)
all: all-recursive

.SUFFIXES:
am--refresh: Makefile
	@:
$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
	@for dep in $?; do \
	  case '$(am__configure_deps)' in \
	    *$$dep*) \
	      echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \
	      $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \
		&& exit 0; \
	      exit 1;; \
	  esac; \
	done; \
	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --foreign Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	@case '$?' in \
	  *config.status*) \
	    echo ' $(SHELL) ./config.status'; \
	    $(SHELL) ./config.status;; \
	  *) \
	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
	    cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
	esac;

$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
	$(SHELL) ./config.status --recheck

$(top_srcdir)/configure:  $(am__configure_deps)
	$(am__cd) $(srcdir) && $(AUTOCONF)
$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
	$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
$(am__aclocal_m4_deps):
share/setup.nsi: $(top_builddir)/config.status $(top_srcdir)/share/setup.nsi.in
	cd $(top_builddir) && $(SHELL) ./config.status $@
share/qt/Info.plist: $(top_builddir)/config.status $(top_srcdir)/share/qt/Info.plist.in
	cd $(top_builddir) && $(SHELL) ./config.status $@
qa/pull-tester/run-bitcoind-for-test.sh: $(top_builddir)/config.status $(top_srcdir)/qa/pull-tester/run-bitcoind-for-test.sh.in
	cd $(top_builddir) && $(SHELL) ./config.status $@
qa/pull-tester/build-tests.sh: $(top_builddir)/config.status $(top_srcdir)/qa/pull-tester/build-tests.sh.in
	cd $(top_builddir) && $(SHELL) ./config.status $@

# This directory's subdirectories are mostly independent; you can cd
# into them and run 'make' without going through this Makefile.
# To change the values of 'make' variables: instead of editing Makefiles,
# (1) if the variable is set in 'config.status', edit 'config.status'
#     (which will cause the Makefiles to be regenerated when you run 'make');
# (2) otherwise, pass the desired values on the 'make' command line.
$(am__recursive_targets):
	@fail=; \
	if $(am__make_keepgoing); then \
	  failcom='fail=yes'; \
	else \
	  failcom='exit 1'; \
	fi; \
	dot_seen=no; \
	target=`echo $@ | sed s/-recursive//`; \
	case "$@" in \
	  distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
	  *) list='$(SUBDIRS)' ;; \
	esac; \
	for subdir in $$list; do \
	  echo "Making $$target in $$subdir"; \
	  if test "$$subdir" = "."; then \
	    dot_seen=yes; \
	    local_target="$$target-am"; \
	  else \
	    local_target="$$target"; \
	  fi; \
	  ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
	  || eval $$failcom; \
	done; \
	if test "$$dot_seen" = "no"; then \
	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
	fi; test -z "$$fail"

ID: $(am__tagged_files)
	$(am__define_uniq_tagged_files); mkid -fID $$unique
tags: tags-recursive
TAGS: tags

tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
	set x; \
	here=`pwd`; \
	if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
	  include_option=--etags-include; \
	  empty_fix=.; \
	else \
	  include_option=--include; \
	  empty_fix=; \
	fi; \
	list='$(SUBDIRS)'; for subdir in $$list; do \
	  if test "$$subdir" = .; then :; else \
	    test ! -f $$subdir/TAGS || \
	      set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
	  fi; \
	done; \
	$(am__define_uniq_tagged_files); \
	shift; \
	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
	  test -n "$$unique" || unique=$$empty_fix; \
	  if test $$# -gt 0; then \
	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
	      "$$@" $$unique; \
	  else \
	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
	      $$unique; \
	  fi; \
	fi
ctags: ctags-recursive

CTAGS: ctags
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
	$(am__define_uniq_tagged_files); \
	test -z "$(CTAGS_ARGS)$$unique" \
	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
	     $$unique

GTAGS:
	here=`$(am__cd) $(top_builddir) && pwd` \
	  && $(am__cd) $(top_srcdir) \
	  && gtags -i $(GTAGS_ARGS) "$$here"
cscope: cscope.files
	test ! -s cscope.files \
	  || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS)
clean-cscope:
	-rm -f cscope.files
cscope.files: clean-cscope cscopelist
cscopelist: cscopelist-recursive

cscopelist-am: $(am__tagged_files)
	list='$(am__tagged_files)'; \
	case "$(srcdir)" in \
	  [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
	  *) sdir=$(subdir)/$(srcdir) ;; \
	esac; \
	for i in $$list; do \
	  if test -f "$$i"; then \
	    echo "$(subdir)/$$i"; \
	  else \
	    echo "$$sdir/$$i"; \
	  fi; \
	done >> $(top_builddir)/cscope.files

distclean-tags:
	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
	-rm -f cscope.out cscope.in.out cscope.po.out cscope.files

distdir: $(DISTFILES)
	$(am__remove_distdir)
	test -d "$(distdir)" || mkdir "$(distdir)"
	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
	list='$(DISTFILES)'; \
	  dist_files=`for file in $$list; do echo $$file; done | \
	  sed -e "s|^$$srcdirstrip/||;t" \
	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
	case $$dist_files in \
	  */*) $(MKDIR_P) `echo "$$dist_files" | \
			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
			   sort -u` ;; \
	esac; \
	for file in $$dist_files; do \
	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
	  if test -d $$d/$$file; then \
	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
	    if test -d "$(distdir)/$$file"; then \
	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
	    fi; \
	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
	    fi; \
	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
	  else \
	    test -f "$(distdir)/$$file" \
	    || cp -p $$d/$$file "$(distdir)/$$file" \
	    || exit 1; \
	  fi; \
	done
	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
	  if test "$$subdir" = .; then :; else \
	    $(am__make_dryrun) \
	      || test -d "$(distdir)/$$subdir" \
	      || $(MKDIR_P) "$(distdir)/$$subdir" \
	      || exit 1; \
	    dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
	    $(am__relativize); \
	    new_distdir=$$reldir; \
	    dir1=$$subdir; dir2="$(top_distdir)"; \
	    $(am__relativize); \
	    new_top_distdir=$$reldir; \
	    echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
	    echo "     am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
	    ($(am__cd) $$subdir && \
	      $(MAKE) $(AM_MAKEFLAGS) \
	        top_distdir="$$new_top_distdir" \
	        distdir="$$new_distdir" \
		am__remove_distdir=: \
		am__skip_length_check=: \
		am__skip_mode_fix=: \
	        distdir) \
	      || exit 1; \
	  fi; \
	done
	$(MAKE) $(AM_MAKEFLAGS) \
	  top_distdir="$(top_distdir)" distdir="$(distdir)" \
	  dist-hook
	-test -n "$(am__skip_mode_fix)" \
	|| find "$(distdir)" -type d ! -perm -755 \
		-exec chmod u+rwx,go+rx {} \; -o \
	  ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
	  ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
	  ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
	|| chmod -R a+r "$(distdir)"
dist-gzip: distdir
	tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
	$(am__post_remove_distdir)

dist-bzip2: distdir
	tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
	$(am__post_remove_distdir)

dist-lzip: distdir
	tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
	$(am__post_remove_distdir)

dist-xz: distdir
	tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
	$(am__post_remove_distdir)

dist-tarZ: distdir
	@echo WARNING: "Support for shar distribution archives is" \
	               "deprecated." >&2
	@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
	tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
	$(am__post_remove_distdir)

dist-shar: distdir
	@echo WARNING: "Support for distribution archives compressed with" \
		       "legacy program 'compress' is deprecated." >&2
	@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
	shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
	$(am__post_remove_distdir)

dist-zip: distdir
	-rm -f $(distdir).zip
	zip -rq $(distdir).zip $(distdir)
	$(am__post_remove_distdir)

dist dist-all:
	$(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:'
	$(am__post_remove_distdir)

# This target untars the dist file and tries a VPATH configuration.  Then
# it guarantees that the distribution is self-contained by making another
# tarfile.
distcheck: dist
	case '$(DIST_ARCHIVES)' in \
	*.tar.gz*) \
	  GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
	*.tar.bz2*) \
	  bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
	*.tar.lz*) \
	  lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
	*.tar.xz*) \
	  xz -dc $(distdir).tar.xz | $(am__untar) ;;\
	*.tar.Z*) \
	  uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
	*.shar.gz*) \
	  GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
	*.zip*) \
	  unzip $(distdir).zip ;;\
	esac
	chmod -R a-w $(distdir)
	chmod u+w $(distdir)
	mkdir $(distdir)/_build $(distdir)/_inst
	chmod a-w $(distdir)
	test -d $(distdir)/_build || exit 0; \
	dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
	  && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
	  && $(MAKE) $(AM_MAKEFLAGS) distcheck-hook \
	  && am__cwd=`pwd` \
	  && $(am__cd) $(distdir)/_build \
	  && ../configure \
	    $(AM_DISTCHECK_CONFIGURE_FLAGS) \
	    $(DISTCHECK_CONFIGURE_FLAGS) \
	    --srcdir=.. --prefix="$$dc_install_base" \
	  && $(MAKE) $(AM_MAKEFLAGS) \
	  && $(MAKE) $(AM_MAKEFLAGS) dvi \
	  && $(MAKE) $(AM_MAKEFLAGS) check \
	  && $(MAKE) $(AM_MAKEFLAGS) install \
	  && $(MAKE) $(AM_MAKEFLAGS) installcheck \
	  && $(MAKE) $(AM_MAKEFLAGS) uninstall \
	  && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
	        distuninstallcheck \
	  && chmod -R a-w "$$dc_install_base" \
	  && ({ \
	       (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
	            distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
	      } || { rm -rf "$$dc_destdir"; exit 1; }) \
	  && rm -rf "$$dc_destdir" \
	  && $(MAKE) $(AM_MAKEFLAGS) dist \
	  && rm -rf $(DIST_ARCHIVES) \
	  && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
	  && cd "$$am__cwd" \
	  || exit 1
	$(am__post_remove_distdir)
	@(echo "$(distdir) archives ready for distribution: "; \
	  list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
	  sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
distuninstallcheck:
	@test -n '$(distuninstallcheck_dir)' || { \
	  echo 'ERROR: trying to run $@ with an empty' \
	       '$$(distuninstallcheck_dir)' >&2; \
	  exit 1; \
	}; \
	$(am__cd) '$(distuninstallcheck_dir)' || { \
	  echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \
	  exit 1; \
	}; \
	test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \
	   || { echo "ERROR: files left after uninstall:" ; \
	        if test -n "$(DESTDIR)"; then \
	          echo "  (check DESTDIR support)"; \
	        fi ; \
	        $(distuninstallcheck_listfiles) ; \
	        exit 1; } >&2
check-local:
check-am: all-am
	$(MAKE) $(AM_MAKEFLAGS) check-local
check: check-recursive
all-am: Makefile
installdirs: installdirs-recursive
installdirs-am:
install: install-recursive
install-exec: install-exec-recursive
install-data: install-data-recursive
uninstall: uninstall-recursive

install-am: all-am
	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am

installcheck: installcheck-recursive
install-strip:
	if test -z '$(STRIP)'; then \
	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
	      install; \
	else \
	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
	fi
mostlyclean-generic:

clean-generic:
	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)

distclean-generic:
	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)

maintainer-clean-generic:
	@echo "This command is intended for maintainers to use"
	@echo "it deletes files that may require special tools to rebuild."
clean: clean-recursive

clean-am: clean-generic clean-local mostlyclean-am

distclean: distclean-recursive
	-rm -f $(am__CONFIG_DISTCLEAN_FILES)
	-rm -f Makefile
distclean-am: clean-am distclean-generic distclean-tags

dvi: dvi-recursive

dvi-am:

html: html-recursive

html-am:

info: info-recursive

info-am:

install-data-am:

install-dvi: install-dvi-recursive

install-dvi-am:

install-exec-am:

install-html: install-html-recursive

install-html-am:

install-info: install-info-recursive

install-info-am:

install-man:

install-pdf: install-pdf-recursive

install-pdf-am:

install-ps: install-ps-recursive

install-ps-am:

installcheck-am:

maintainer-clean: maintainer-clean-recursive
	-rm -f $(am__CONFIG_DISTCLEAN_FILES)
	-rm -rf $(top_srcdir)/autom4te.cache
	-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic

mostlyclean: mostlyclean-recursive

mostlyclean-am: mostlyclean-generic

pdf: pdf-recursive

pdf-am:

ps: ps-recursive

ps-am:

uninstall-am:

.MAKE: $(am__recursive_targets) check-am install-am install-strip

.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \
	am--refresh check check-am check-local clean clean-cscope \
	clean-generic clean-local cscope cscopelist-am ctags ctags-am \
	dist dist-all dist-bzip2 dist-gzip dist-hook dist-lzip \
	dist-shar dist-tarZ dist-xz dist-zip distcheck distclean \
	distclean-generic distclean-tags distcleancheck distdir \
	distuninstallcheck dvi dvi-am html html-am info info-am \
	install install-am install-data install-data-am install-dvi \
	install-dvi-am install-exec install-exec-am install-html \
	install-html-am install-info install-info-am install-man \
	install-pdf install-pdf-am install-ps install-ps-am \
	install-strip installcheck installcheck-am installdirs \
	installdirs-am maintainer-clean maintainer-clean-generic \
	mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags \
	tags-am uninstall uninstall-am

.PHONY: deploy

dist-hook:
	-$(MAKE) -C $(top_distdir)/src/leveldb clean
	-$(GIT) archive --format=tar HEAD -- src/version.cpp | $(AMTAR) -C $(top_distdir) -xf -

distcheck-hook:
	$(MKDIR_P) $(top_distdir)/_build/src/leveldb
	cp -rf $(top_srcdir)/src/leveldb/* $(top_distdir)/_build/src/leveldb/
	-$(MAKE) -C $(top_distdir)/_build/src/leveldb clean

distcleancheck:
	@:

$(BITCOIN_WIN_INSTALLER): $(BITCOIND_BIN) $(BITCOIN_QT_BIN) $(BITCOIN_CLI_BIN)
	$(MKDIR_P) $(top_builddir)/release
	$(INSTALL_STRIP_PROGRAM) $(BITCOIND_BIN) $(top_builddir)/release
	$(INSTALL_STRIP_PROGRAM) $(BITCOIN_QT_BIN) $(top_builddir)/release
	$(INSTALL_STRIP_PROGRAM) $(BITCOIN_CLI_BIN) $(top_builddir)/release
	@test -f $(MAKENSIS) && $(MAKENSIS) $(top_builddir)/share/setup.nsi || \
	  echo error: could not build $@

$(BITCOIND_BIN) $(BITCOIN_QT_BIN) $(BITCOIN_CLI_BIN):
	make -C $(dir $@) $(notdir $@)

$(OSX_APP)/Contents/PkgInfo:
	$(MKDIR_P) $(@D)
	@echo "APPL????" > $@

$(OSX_APP)/Contents/Resources/empty.lproj:
	$(MKDIR_P) $(@D)
	@touch $@

$(OSX_APP)/Contents/Info.plist: $(OSX_PLIST)
	$(MKDIR_P) $(@D)
	$(INSTALL) $< $@

$(OSX_APP)/Contents/Resources/bitcoin.icns: $(OSX_INSTALLER_ICONS)
	$(MKDIR_P) $(@D)
	$(INSTALL) $< $@

$(OSX_APP)/Contents/MacOS/Bitcoin-Qt: $(BITCOIN_QT_BIN)
	$(MKDIR_P) $(@D)
	$(INSTALL_STRIP_PROGRAM)  $< $@

$(OSX_DMG): $(OSX_APP_BUILT) $(OSX_PACKAGING)
	$(OSX_DEPLOY_SCRIPT) $(OSX_APP) -add-qt-tr da,de,es,hu,ru,uk,zh_CN,zh_TW -dmg -fancy $(OSX_FANCY_PLIST) -verbose 2

#appbundle: $(OSX_APP_BUILT)
#deploy: $(OSX_DMG)
#deploy: $(BITCOIN_WIN_INSTALLER)

#baseline.info:
#	$(LCOV) -c -i -d $(abs_builddir)/src -o $@

#baseline_filtered.info: baseline.info
#	$(LCOV) -r $< "/usr/include/*" -o $@

#leveldb_baseline.info: baseline_filtered.info
#	$(LCOV) -c -i -d $(abs_builddir)/src/leveldb -b $(abs_builddir)/src/leveldb -o $@

#leveldb_baseline_filtered.info: leveldb_baseline.info
#	$(LCOV) -r $< "/usr/include/*" -o $@

#baseline_filtered_combined.info: leveldb_baseline_filtered.info baseline_filtered.info
#	$(LCOV) -a leveldb_baseline_filtered.info -a baseline_filtered.info -o $@

#test_bitcoin.info: baseline_filtered_combined.info
#	$(MAKE) -C src/ check
#	$(LCOV) -c -d $(abs_builddir)/src -t test_bitcoin -o $@
#	$(LCOV) -z -d $(abs_builddir)/src
#	$(LCOV) -z -d $(abs_builddir)/src/leveldb

#test_bitcoin_filtered.info: test_bitcoin.info
#	$(LCOV) -r $< "/usr/include/*" -o $@

#block_test.info: test_bitcoin_filtered.info
#	$(MKDIR_P) qa/tmp
#	-@TIMEOUT=15 qa/pull-tester/run-bitcoind-for-test.sh $(JAVA) -jar $(JAVA_COMPARISON_TOOL) qa/tmp/compTool 0
#	$(LCOV) -c -d $(abs_builddir)/src --t BitcoinJBlockTest -o $@
#	$(LCOV) -z -d $(abs_builddir)/src
#	$(LCOV) -z -d $(abs_builddir)/src/leveldb

#block_test_filtered.info: block_test.info
#	$(LCOV) -r $< "/usr/include/*" -o $@

#test_bitcoin_coverage.info: baseline_filtered_combined.info test_bitcoin_filtered.info
#	$(LCOV) -a baseline_filtered.info -a leveldb_baseline_filtered.info -a test_bitcoin_filtered.info -o $@

#total_coverage.info:  baseline_filtered_combined.info test_bitcoin_filtered.info block_test_filtered.info
#	$(LCOV) -a baseline_filtered.info -a leveldb_baseline_filtered.info -a test_bitcoin_filtered.info -a block_test_filtered.info -o $@ | $(GREP) "\%" | $(AWK) '{ print substr($$3,2,50) "/" $$5 }' > coverage_percent.txt

#test_bitcoin.coverage/.dirstamp:  test_bitcoin_coverage.info
#	$(GENHTML) -s $< -o $(@D)
#	@touch $@

#total.coverage/.dirstamp: total_coverage.info
#	$(GENHTML) -s $< -o $(@D)
#	@touch $@

#cov: test_bitcoin.coverage/.dirstamp total.coverage/.dirstamp

#check-local:
#	$(MKDIR_P) qa/tmp
#	@qa/pull-tester/run-bitcoind-for-test.sh $(JAVA) -jar $(JAVA_COMPARISON_TOOL) qa/tmp/compTool $(COMPARISON_TOOL_REORG_TESTS)

.INTERMEDIATE: $(COVERAGE_INFO)

clean-local:
	rm -rf test_bitcoin.coverage/ total.coverage/

# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:


text:
package cn.evilcoder.fantasyblog4j.domain;

/**
 * User: evilcoder
 * Date: 2016/4/9
 * Time: 12:57
 */
public class PostTag extends BaseDomain{
  private long uid;
  private long pid;
  private String name;
  private int num;

  public long getUid() {
    return uid;
  }

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

  public long getPid() {
    return pid;
  }

  public void setPid(long pid) {
    this.pid = pid;
  }

  public String getName() {
    return name;
  }

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

  public int getNum() {
    return num;
  }

  public void setNum(int num) {
    this.num = num;
  }
}


text:
$(function() {

	var canvas = $('canvas.editor')[0];

	var editor = new Polygen.Editor(canvas);

	var $loadImageButton = $('#loadImage');

	$loadImageButton.click(function(event) {
		event.preventDefault();

		var url = $('#imageUrl').val();

		editor.loadImage(url).then(() => {
			editor.generatePoints(4);
		});
	});

	$loadImageButton.click();
});


text:
import pymysql
from sauron.metrics import Metric, MetricException

class SphinxMetric(Metric):
    def __init__(self, name, host='127.0.0.1', port=9306, **kwargs):
        Metric.__init__(self, name, **kwargs)
        self.reconfig(name, host, port)

    def reconfig(self, name, host='127.0.0.1', port=9306, **kwargs):
        Metric.reconfig(self, name, **kwargs)
        self.host   = host
        self.port   = port
        self.conn   = None
        self.cur    = None

    def __del__(self):
        try:
            self.cur.close()
            self.conn.close()
        except AttributeError:
            pass

    def values(self):
        try:
            self.conn = pymysql.connect(host=self.host, port=self.port)
            self.cur = self.conn.cursor()
            self.cur.execute('show status')
            r = dict(self.cur.fetchall())
            return {
                'results' : {
                    'uptime'   : (r['uptime'], 'Seconds'),
                    'queries'  : (r['queries'], 'Count'),
                    'avg_wall' : (r['avg_query_wall'], 'Seconds'),
                    'avg_cpu'  : (r['avg_query_cpu'], 'Percent'),
                    'avg_read' : (r['avg_query_readkb'], 'Kilobytes')
                }
            }
        except pymysql.err.MySQLError:
            raise MetricException('Error connecting to sphinx searchd')
        except KeyError:
            raise MetricException('Could not find all keys in searchd status')


text:
template
=================================================

Templating – The V in MVC

:requires: `mako <http://www.makotemplates.org/>`__

.. versionadded:: 1.1.0

Configuration parameters
-------------------------------------------------

.. describe:: smisk.mvc.template.autoreload

  Automatically reload templates which has been modified.

  If this is set to None when the application start accepting requests,
  the application will set the value according to its own autoreload value.

  :default: ``False``
  :type: bool

.. describe:: smisk.mvc.template.cache_limit

  Limit cache size.
  0 means no cache. -1 means no limit.
  Any positive value results in a LRU-approach.

  :default: :samp:`-1`
  :type: int

.. describe:: smisk.mvc.template.cache_type

  Type of cache. "memory" or "string".

  :default: :samp:`"memory"`
  :type: string

.. describe:: smisk.mvc.template.format_exceptions

  Let the templating engine render information about template formatting exceptions.

  Things like missing or misspelled variables etc.

  :default: :samp:`True`
  :type: bool

.. describe:: smisk.mvc.template.input_encoding

  :default: :samp:`"utf-8"`
  :type: string

.. describe:: smisk.mvc.template.default_filters

  :default: :samp:`["unicode"]`
  :type: list

.. describe:: smisk.mvc.template.errors

  Map http error to a template path.
  Template URI mapped by status codes.

  i.e.::

    'smisk.mvc.template.errors': {
      500: 'errors/server_error',
      404: 'errors/not_found'
    }

  :default: :samp:`{}`
  :type: dict

Classes
-------------------------------------------------

.. autoclass:: smisk.mvc.template.Templates
  :members:
  :undoc-members:

Modules
-------------------------------------------------

.. toctree::

  smisk.mvc.template.filters


text:
title: http_server
type: input
status: stable
categories: ["Network"]
---

<!--
     THIS FILE IS AUTOGENERATED!

     To make changes please edit the contents of:
     lib/input/http_server.go
-->

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

Receive messages POSTed over HTTP(S). HTTP 2.0 is supported when using TLS, which is enabled when key and cert files are specified.

<Tabs defaultValue="common" values={[
  { label: 'Common', value: 'common', },
  { label: 'Advanced', value: 'advanced', },
]}>

<TabItem value="common">

```yml
# Common config fields, showing default values
input:
  label: ""
  http_server:
    address: ""
    path: /post
    ws_path: /post/ws
    allowed_verbs:
      - POST
    timeout: 5s
    rate_limit: ""
```

</TabItem>
<TabItem value="advanced">

```yml
# All config fields, showing default values
input:
  label: ""
  http_server:
    address: ""
    path: /post
    ws_path: /post/ws
    ws_welcome_message: ""
    ws_rate_limit_message: ""
    allowed_verbs:
      - POST
    timeout: 5s
    rate_limit: ""
    cert_file: ""
    key_file: ""
    cors:
      enabled: false
      allowed_origins: []
    sync_response:
      status: "200"
      headers:
        Content-Type: application/octet-stream
      metadata_headers:
        include_prefixes: []
        include_patterns: []
```

</TabItem>
</Tabs>

If the `address` config field is left blank the [service-wide HTTP server](/docs/components/http/about) will be used.

The field `rate_limit` allows you to specify an optional [`rate_limit` resource](/docs/components/rate_limits/about), which will be applied to each HTTP request made and each websocket payload received.

When the rate limit is breached HTTP requests will have a 429 response returned with a Retry-After header. Websocket payloads will be dropped and an optional response payload will be sent as per `ws_rate_limit_message`.

### Responses

It's possible to return a response for each message received using [synchronous responses](/docs/guides/sync_responses). When doing so you can customise headers with the `sync_response` field `headers`, which can also use [function interpolation](/docs/configuration/interpolation#bloblang-queries) in the value based on the response message contents.

### Endpoints

The following fields specify endpoints that are registered for sending messages, and support path parameters of the form `/{foo}`, which are added to ingested messages as metadata:

#### `path` (defaults to `/post`)

This endpoint expects POST requests where the entire request body is consumed as a single message.

If the request contains a multipart `content-type` header as per [rfc1341](https://www.w3.org/Protocols/rfc1341/7_2_Multipart.html) then the multiple parts are consumed as a batch of messages, where each body part is a message of the batch.

#### `ws_path` (defaults to `/post/ws`)

Creates a websocket connection, where payloads received on the socket are passed through the pipeline as a batch of one message.

You may specify an optional `ws_welcome_message`, which is a static payload to be sent to all clients once a websocket connection is first established.

It's also possible to specify a `ws_rate_limit_message`, which is a static payload to be sent to clients that have triggered the servers rate limit.

### Metadata

This input adds the following metadata fields to each message:

``` text
- http_server_user_agent
- http_server_request_path
- http_server_verb
- All headers (only first values are taken)
- All query parameters
- All path parameters
- All cookies
```

You can access these metadata fields using [function interpolation](/docs/configuration/interpolation#metadata).

## Fields

### `address`

An alternative address to host from. If left empty the service wide address is used.

Type: `string`
Default: `""`

### `path`

The endpoint path to listen for POST requests.

Type: `string`
Default: `"/post"`

### `ws_path`

The endpoint path to create websocket connections from.

Type: `string`
Default: `"/post/ws"`

### `ws_welcome_message`

An optional message to deliver to fresh websocket connections.

Type: `string`
Default: `""`

### `ws_rate_limit_message`

An optional message to delivery to websocket connections that are rate limited.

Type: `string`
Default: `""`

### `allowed_verbs`

An array of verbs that are allowed for the `path` endpoint.

Type: `array`
Default: `["POST"]`
Requires version 3.33.0 or newer

### `timeout`

Timeout for requests. If a consumed messages takes longer than this to be delivered the connection is closed, but the message may still be delivered.

Type: `string`
Default: `"5s"`

### `rate_limit`

An optional [rate limit](/docs/components/rate_limits/about) to throttle requests by.

Type: `string`
Default: `""`

### `cert_file`

Enable TLS by specifying a certificate and key file. Only valid with a custom `address`.

Type: `string`
Default: `""`

### `key_file`

Enable TLS by specifying a certificate and key file. Only valid with a custom `address`.

Type: `string`
Default: `""`

### `cors`

Adds Cross-Origin Resource Sharing headers. Only valid with a custom `address`.

Type: `object`
Requires version 3.63.0 or newer

### `cors.enabled`

Whether to allow CORS requests.

Type: `bool`
Default: `false`

### `cors.allowed_origins`

An explicit list of origins that are allowed for CORS requests.

Type: `array`
Default: `[]`

### `sync_response`

Customise messages returned via [synchronous responses](/docs/guides/sync_responses).

Type: `object`

### `sync_response.status`

Specify the status code to return with synchronous responses. This is a string value, which allows you to customize it based on resulting payloads and their metadata.
This field supports [interpolation functions](/docs/configuration/interpolation#bloblang-queries).

Type: `string`
Default: `"200"`

```yml
# Examples

status: "200"

status: ${! json("status") }

status: ${! meta("status") }
```

### `sync_response.headers`

Specify headers to return with synchronous responses.
This field supports [interpolation functions](/docs/configuration/interpolation#bloblang-queries).

Type: `object`
Default: `{"Content-Type":"application/octet-stream"}`

### `sync_response.metadata_headers`

Specify criteria for which metadata values are added to the response as headers.

Type: `object`

### `sync_response.metadata_headers.include_prefixes`

Provide a list of explicit metadata key prefixes to match against.

Type: `array`
Default: `[]`

```yml
# Examples

include_prefixes:
  - foo_
  - bar_

include_prefixes:
  - kafka_

include_prefixes:
  - content-
```

### `sync_response.metadata_headers.include_patterns`

Provide a list of explicit metadata key regular expression (re2) patterns to match against.

Type: `array`
Default: `[]`

```yml
# Examples

include_patterns:
  - .*

include_patterns:
  - _timestamp_unix$
```


text:
<?php

class CustomerQuery extends Doctrine_Query
{
  public static function create($conn = null, $class = null)
  {
    $q = new CustomerQuery($conn);
    $q->from("Customer c, c.Commons i WITH i.type= 'Invoice'")
      ->orderBy('c.name asc')
      ->groupBy('id');

    return $q;
  }

  public function getClone()
  {
    $other = clone($this);
    return $other;
  }

  public function search($search = null)
  {
    if($search)
    {
      if(isset($search['query']))
      {
        $this->textSearch($search['query']);
      }
      if(isset($search['from']))
      {
        $this->fromDate($search['from']);
      }
      if(isset($search['to']))
      {
        $this->toDate($search['to']);
      }
    }
    return $this;
  }

  public function textSearch($text)
  {
    $text = trim($text);
    if($text)
    {
      $this
        ->addWhere("(c.name LIKE '%$text%'".
                   "OR c.identification LIKE '%$text%' ".
                   "OR c.contact_person LIKE '%$text%')");

    }
    return $this;
  }

  public function orderBy($order)
  {
    if(strlen(strstr($order, 'due_amount')) > 0)
    {
      $this->addSelect("c.id, SUM(i.gross_amount-i.paid_amount) AS due_amount");
    }
    if(strlen(strstr($order, 'gross_amount')) >0)
    {
      $this->addSelect("c.id, SUM(if(i.gross_amount is null,0,i.gross_amount)) as gross_amount");
    }

    return parent::orderBy($order);
  }

  public function total($field)
  {
    $other = clone($this);

    switch($field)
    {
      case 'due_amount':
        $sum = 'SUM(if(i.gross_amount is null,0,i.gross_amount) '.
          '- if(i.paid_amount is null,0,i.paid_amount)) as total';
        break;
      default:
        $sum = sprintf('SUM(if(i.%s is null,0,i.%s)) as total',$field,$field);
        break;
    }
    $other->select($sum)->orderBy('total')
      ->addSelect("'t' AS true_column")
      ->addWhere("i.draft = ?",0)
      ->groupBy('true_column');

    return $other->fetchOne() ? $other->fetchOne()->getTotal() : 0;
  }

  /**
   * Limits the results to those customers whose invoices are issued in a date greater or equal than that
   * one passed as parameter.
   * @param mixed date value
   * @return InvoiceQuery the same instance
   * @author Carlos Escribano <carlos@markhaus.com>
   */
  public function fromDate($date = null)
  {
    if (!($date = $this->filterDate($date)))
    {
      return $this;
    }
    else
    {
      return $this->andWhere('i.customer_id = id')
        ->andWhere('i.issue_date >= ?', sfDate::getInstance($date)->to_database());
    }
  }

  /**
   * Limits the results to those customer whose invoices are issued in a date smaller or equal than that
   * one passed as parameter.
   * @param mixed date value
   * @return InvoiceFinder the same instance
   * @author Carlos Escribano <carlos@markhaus.com>
   */
  public function toDate($date = null)
  {
    if (!($date = $this->filterDate($date)))
    {
      return $this;
    }
    else
    {
      return $this->andWhere('i.customer_id = id')
        ->andWhere('i.issue_date < ?', sfDate::getInstance($date)->addDay(1)->to_database());
    }
  }

  /**
   * Internal method to deduce a correct or null date value.
   * @param mixed date; if it is an array it must have the 'year', 'month' and 'day' keys.
   * @return mixed date string or whatever passed from outside if not "strictly invalid".
   * @author Carlos Escribano <carlos@markhaus.com>
   */
  protected function filterDate($date)
  {
    switch (true)
    {
      case (!$date || !strlen(trim(implode('', (array) $date)))):
      case (is_array($date) && (!isset($date['year']) || !isset($date['month']) || !isset($date['day']))):
        // $date is null or is an array with empty or zero string elements
        // or one of its components is not set (year, month, day)
        return null;
      case (is_array($date)):
        // is an array and is not bad formed
        return $date['year'].'-'.$date['month'].'-'.$date['day'];
      default:
        // is not an array
        return $date;
    }
  }

}