text:
<!DOCTYPE html>

	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta name="generator" content="ApiGen 2.8.0" />

	<title>Class Mandrill_Webhooks</title>

	<link rel="stylesheet" type="text/css" media="all" href="resources/style.css?3505392360" />

		Overview

Namespaces

None

PHP

Classes

Mandrill

Mandrill_Exports

Mandrill_Inbound

Mandrill_Internal

Mandrill_Ips

Mandrill_Messages

Mandrill_Rejects

Mandrill_Senders

Mandrill_Subaccounts

Mandrill_Tags

Mandrill_Templates

Mandrill_Urls

Mandrill_Users

Mandrill_Webhooks

Mandrill_Whitelists

Exceptions

Mandrill_Error

Mandrill_HttpError

Mandrill_Invalid_DeleteDefaultPool

Mandrill_Invalid_DeleteNonEmptyPool

Mandrill_Invalid_EmptyDefaultPool

Mandrill_Invalid_Key

Mandrill_Invalid_Reject

Mandrill_Invalid_Tag_Name

Mandrill_Invalid_Template

Mandrill_IP_ProvisionLimit

Mandrill_PaymentRequired

Mandrill_ServiceUnavailable

Mandrill_Unknown_Export

Mandrill_Unknown_InboundDomain

Mandrill_Unknown_InboundRoute

Mandrill_Unknown_IP

Mandrill_Unknown_Message

Mandrill_Unknown_Pool

Mandrill_Unknown_Sender

Mandrill_Unknown_Subaccount

Mandrill_Unknown_Template

Mandrill_Unknown_TrackingDomain

Mandrill_Unknown_Url

Mandrill_Unknown_Webhook

Mandrill_ValidationError

	<form id="search">
		<input type="hidden" name="cx" value="" />
		<input type="hidden" name="ie" value="UTF-8" />
		<input type="text" name="q" class="text" />
		<input type="submit" value="Search" />
	</form>

				Overview

				Namespace

Class

				Tree

Class Mandrill_Webhooks

		Located at Mandrill/Webhooks.php

Methods summary

			 public

		#
		__construct( Mandrill <var>$master</var> )

			 public
			array

		#
		getList( )

Get the list of all webhooks defined on the account

Get the list of all webhooks defined on the account

Returns

					array
the webhooks associated with the account - return[] struct the individual
webhook info - id integer a unique integer indentifier for the webhook - url
string The URL that the event data will be posted to - description string a
description of the webhook - auth_key string the key used to requests for this
webhook - events array The message events that will be posted to the hook -
events[] string the individual message event (send, hard_bounce, soft_bounce,
open, click, spam, unsub, or reject) - created_at string the date and time that
the webhook was created as a UTC string in YYYY-MM-DD HH:MM:SS format -
last_sent_at string the date and time that the webhook last successfully
received events as a UTC string in YYYY-MM-DD HH:MM:SS format - batches_sent
integer the number of event batches that have ever been sent to this webhook -
events_sent integer the total number of events that have ever been sent to this
webhook - last_error string if we've ever gotten an error trying to post to this
webhook, the last error that we've seen

			 public
			struct

		#
		add( string <var>$url</var>, string <var>$description</var> = null, array <var>$events</var> = array() )

Add a new webhook

Add a new webhook

Parameters

<var>$url</var>

string
$url the URL to POST batches of events

<var>$description</var>

string
$description an optional description of the webhook

<var>$events</var>

array
$events an optional list of events that will be posted to the webhook - events[]
string the individual event to listen for

Returns

					struct
the information saved about the new webhook - id integer a unique integer
indentifier for the webhook - url string The URL that the event data will be
posted to - description string a description of the webhook - auth_key string
the key used to requests for this webhook - events array The message events that
will be posted to the hook - events[] string the individual message event (send,
hard_bounce, soft_bounce, open, click, spam, unsub, or reject) - created_at
string the date and time that the webhook was created as a UTC string in
YYYY-MM-DD HH:MM:SS format - last_sent_at string the date and time that the
webhook last successfully received events as a UTC string in YYYY-MM-DD HH:MM:SS
format - batches_sent integer the number of event batches that have ever been
sent to this webhook - events_sent integer the total number of events that have
ever been sent to this webhook - last_error string if we've ever gotten an error
trying to post to this webhook, the last error that we've seen

			 public
			struct

		#
		info( integer <var>$id</var> )

Given the ID of an existing webhook, return the data about it

Given the ID of an existing webhook, return the data about it

Parameters

<var>$id</var>

integer
$id the unique identifier of a webhook belonging to this account

Returns

					struct
the information about the webhook - id integer a unique integer indentifier for
the webhook - url string The URL that the event data will be posted to -
description string a description of the webhook - auth_key string the key used
to requests for this webhook - events array The message events that will be
posted to the hook - events[] string the individual message event (send,
hard_bounce, soft_bounce, open, click, spam, unsub, or reject) - created_at
string the date and time that the webhook was created as a UTC string in
YYYY-MM-DD HH:MM:SS format - last_sent_at string the date and time that the
webhook last successfully received events as a UTC string in YYYY-MM-DD HH:MM:SS
format - batches_sent integer the number of event batches that have ever been
sent to this webhook - events_sent integer the total number of events that have
ever been sent to this webhook - last_error string if we've ever gotten an error
trying to post to this webhook, the last error that we've seen

			 public
			struct

		#
		update( integer <var>$id</var>, string <var>$url</var>, string <var>$description</var> = null, array <var>$events</var> = array() )

Update an existing webhook

Update an existing webhook

Parameters

<var>$id</var>

integer
$id the unique identifier of a webhook belonging to this account

<var>$url</var>

string
$url the URL to POST batches of events

<var>$description</var>

string
$description an optional description of the webhook

<var>$events</var>

array
$events an optional list of events that will be posted to the webhook - events[]
string the individual event to listen for

Returns

					struct
the information for the updated webhook - id integer a unique integer
indentifier for the webhook - url string The URL that the event data will be
posted to - description string a description of the webhook - auth_key string
the key used to requests for this webhook - events array The message events that
will be posted to the hook - events[] string the individual message event (send,
hard_bounce, soft_bounce, open, click, spam, unsub, or reject) - created_at
string the date and time that the webhook was created as a UTC string in
YYYY-MM-DD HH:MM:SS format - last_sent_at string the date and time that the
webhook last successfully received events as a UTC string in YYYY-MM-DD HH:MM:SS
format - batches_sent integer the number of event batches that have ever been
sent to this webhook - events_sent integer the total number of events that have
ever been sent to this webhook - last_error string if we've ever gotten an error
trying to post to this webhook, the last error that we've seen

			 public
			struct

		#
		delete( integer <var>$id</var> )

Delete an existing webhook

Delete an existing webhook

Parameters

<var>$id</var>

integer
$id the unique identifier of a webhook belonging to this account

Returns

					struct
the information for the deleted webhook - id integer a unique integer
indentifier for the webhook - url string The URL that the event data will be
posted to - description string a description of the webhook - auth_key string
the key used to requests for this webhook - events array The message events that
will be posted to the hook - events[] string the individual message event (send,
hard_bounce, soft_bounce, open, click, spam, unsub, or reject) - created_at
string the date and time that the webhook was created as a UTC string in
YYYY-MM-DD HH:MM:SS format - last_sent_at string the date and time that the
webhook last successfully received events as a UTC string in YYYY-MM-DD HH:MM:SS
format - batches_sent integer the number of event batches that have ever been
sent to this webhook - events_sent integer the total number of events that have
ever been sent to this webhook - last_error string if we've ever gotten an error
trying to post to this webhook, the last error that we've seen

		 API documentation generated by ApiGen 2.8.0


text:
'use strict';

describe('INTEGRATION RootController', () =>
  it('should return 200 and links', () =>
    request(sails.hooks.http.app)
      .get('/')
      .expect(200)
      .then((res) =>
        expect(res.body.links).to.deep.equal({
          centres: 'http://' + res.req._headers.host + '/centres',
          health: 'http://' + res.req._headers.host + '/health',
          heartbeat: 'http://' + res.req._headers.host + '/heartbeat',
          bedevent: 'http://' + res.req._headers.host + '/bedevent',
          cid_entry: 'http://' + res.req._headers.host + '/cid_entry',
          irc_entry: 'http://' + res.req._headers.host + '/irc_entry',
          depmu_entry: 'http://' + res.req._headers.host + '/depmu_entry',
          self: 'http://' + res.req._headers.host + '/'
        })
      )
  )
);

redpajama_set_name: RedPajamaGithub


text:
namespace ExampleApp
{
    namespace MyPinCreationDetails
    {
        namespace View
        {
            class MyPinCreationDetailsViewModel : public IMyPinCreationDetailsViewModel, private Eegeo::NonCopyable
            {
                Eegeo::Helpers::CallbackCollection0 m_openedCallbacks;
                Eegeo::Helpers::CallbackCollection0 m_closedCallbacks;
                MyPinCreationDetailsOpenableControl m_openable;

            public:
                MyPinCreationDetailsViewModel(Eegeo::Helpers::TIdentity identity);

                ~MyPinCreationDetailsViewModel();

                bool IsOpen() const;

                void Open();

                void Close();

                OpenableControl::View::IOpenableControlViewModel& GetOpenableControl();

                void InsertOpenedCallback(Eegeo::Helpers::ICallback0& openedCallback);

                void RemoveOpenedCallback(Eegeo::Helpers::ICallback0& openedCallback);

                void InsertClosedCallback(Eegeo::Helpers::ICallback0& closedCallback);

                void RemoveClosedCallback(Eegeo::Helpers::ICallback0& closedCallback);
            };
        }
    }
}


text:
package com.aviary.android.feather.graphics;

import android.content.Context;
import android.content.res.Resources.Theme;
import android.content.res.TypedArray;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.ColorFilter;
import android.graphics.Paint;
import android.graphics.Paint.Style;
import android.graphics.Path;
import android.graphics.PixelFormat;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;

import com.aviary.android.feather.R;

/**
 * Drawable used to draw the gallery top indicator
 *
 * @author alessandro
 */
public class GalleryBottomIndicatorDrawable extends Drawable {

	int mShadowColor, mFillColor, mStrokeColor1, mStrokeColor2;
	float mIndicatorSize;
	int mStrokeWidth;
	int mShadowDy;

	final Rect destRect = new Rect();
	final Paint paint;

	public GalleryBottomIndicatorDrawable ( Context context ) {
		Theme theme = context.getTheme();
		TypedArray array = theme.obtainStyledAttributes( null, R.styleable.AviaryGalleryTopIndicator, R.attr.aviaryOptionPanelTopIndicatorStyle, 0 );

		mShadowColor = array.getColor( R.styleable.AviaryGalleryTopIndicator_android_shadowColor, 0 );
		mShadowDy = (int) array.getFloat( R.styleable.AviaryGalleryTopIndicator_android_shadowDy, 0f );
		mFillColor = array.getColor( R.styleable.AviaryGalleryTopIndicator_aviary_color1, Color.WHITE );
		mStrokeColor1 = array.getColor( R.styleable.AviaryGalleryTopIndicator_aviary_strokeColor, Color.WHITE );
		mStrokeColor2 = array.getColor( R.styleable.AviaryGalleryTopIndicator_aviary_strokeColor2, Color.WHITE );
		mIndicatorSize = array.getFloat( R.styleable.AviaryGalleryTopIndicator_aviary_indicatorSize, 1f );
		mStrokeWidth = array.getDimensionPixelSize( R.styleable.AviaryGalleryTopIndicator_aviary_strokeWidth, 2 );

		array.recycle();

		paint = new Paint( Paint.ANTI_ALIAS_FLAG );
	}

	@Override
	public void draw( Canvas canvas ) {
		copyBounds( destRect );

		int halfHeight = destRect.height() / 2;
		int halfWidth = destRect.width() / 2;
		int triangleSize = (int) ( halfHeight * mIndicatorSize );

		int top = destRect.top + mStrokeWidth / 2;
		int left = destRect.left - mStrokeWidth;
		int right = destRect.right + mStrokeWidth;

		Path path = new Path();
		path.moveTo( left, top );
		path.lineTo( right, top );
		path.lineTo( right, top + halfHeight );

		path.lineTo( left + halfWidth + triangleSize, top + halfHeight );
		path.lineTo( left + halfWidth, top + halfHeight + triangleSize );
		path.lineTo( left + halfWidth - triangleSize, top + halfHeight );

		path.lineTo( left, top + halfHeight );
		path.lineTo( left, top );

		paint.setStyle( Style.FILL );

		if ( mShadowDy > 0 ) {
			path.offset( 0, mShadowDy );
			paint.setColor( mShadowColor );
			canvas.drawPath( path, paint );
			path.offset( 0, -mShadowDy );
		}

		paint.setColor( mFillColor );
		canvas.drawPath( path, paint );

		paint.setStyle( Style.STROKE );
		paint.setColor( mStrokeColor1 );
		paint.setStrokeWidth( mStrokeWidth );
		canvas.drawPath( path, paint );

		paint.setStyle( Style.STROKE );
		paint.setColor( mStrokeColor2 );
		canvas.drawLine( left + mStrokeWidth, top + mStrokeWidth, right - mStrokeWidth, top + mStrokeWidth, paint );

	}

	@Override
	public int getOpacity() {
		return PixelFormat.TRANSLUCENT;
	}

	@Override
	public void setAlpha( int alpha ) {}

	@Override
	public void setColorFilter( ColorFilter cf ) {}

}


text:
import smtplib
from email.MIMEMultipart import MIMEMultipart
from email.MIMEBase import MIMEBase
from email.MIMEText import MIMEText
from email import Encoders
import os

def send(to, subject, text, attach, user, pwd):

  msg = MIMEMultipart()

  msg['From']    = user
  msg['To']      = to
  msg['Subject'] = subject

  msg.attach(MIMEText(text))

  if attach is not None:
    part = MIMEBase('application', 'octet-stream')
    part.set_payload(open(attach, 'rb').read())
    Encoders.encode_base64(part)
    part.add_header('Content-Disposition',
      'attachment; filename="%s"' % os.path.basename(attach))
    msg.attach(part)

  mailServer = smtplib.SMTP("smtp.gmail.com", 587)
  #mailServer.set_debuglevel(1)
  mailServer.ehlo()
  mailServer.starttls()
  mailServer.ehlo()
  mailServer.login(user, pwd)
  mailServer.sendmail(user, to, msg.as_string())
  mailServer.close()