text:
package it.smartcommunitylab.riciclo.model;

import java.util.HashMap;
import java.util.Map;

public class Gestore extends BaseObject {

	private String objectId;
	private String ragioneSociale;
	private Map<String, String> descrizione = new HashMap<String, String>();
	private String ufficio;
	private Map<String, String> indirizzo = new HashMap<String, String>();
	private Map<String, String> orarioUfficio = new HashMap<String, String>();
	private String sitoWeb;
	private String email;
	private String telefono;
	private String fax;
	private double[] geocoding;
	private String facebook;

	public String getRagioneSociale() {
		return ragioneSociale;
	}
	public void setRagioneSociale(String ragioneSociale) {
		this.ragioneSociale = ragioneSociale;
	}
	public String getUfficio() {
		return ufficio;
	}
	public void setUfficio(String ufficio) {
		this.ufficio = ufficio;
	}
	public String getSitoWeb() {
		return sitoWeb;
	}
	public void setSitoWeb(String sitoWeb) {
		this.sitoWeb = sitoWeb;
	}
	public String getEmail() {
		return email;
	}
	public void setEmail(String email) {
		this.email = email;
	}
	public String getTelefono() {
		return telefono;
	}
	public void setTelefono(String telefono) {
		this.telefono = telefono;
	}
	public String getFax() {
		return fax;
	}
	public void setFax(String fax) {
		this.fax = fax;
	}
	public String getFacebook() {
		return facebook;
	}
	public void setFacebook(String facebook) {
		this.facebook = facebook;
	}

	@Override
	public String toString() {
		return "Gestore [" + ragioneSociale + "]";
	}

	public String getObjectId() {
		return objectId;
	}
	public void setObjectId(String objectId) {
		this.objectId = objectId;
	}
	public Map<String, String> getDescrizione() {
		return descrizione;
	}
	public void setDescrizione(Map<String, String> descrizione) {
		this.descrizione = descrizione;
	}
	public Map<String, String> getIndirizzo() {
		return indirizzo;
	}
	public void setIndirizzo(Map<String, String> indirizzo) {
		this.indirizzo = indirizzo;
	}
	public Map<String, String> getOrarioUfficio() {
		return orarioUfficio;
	}
	public void setOrarioUfficio(Map<String, String> orarioUfficio) {
		this.orarioUfficio = orarioUfficio;
	}
	public double[] getGeocoding() {
		return geocoding;
	}
	public void setGeocoding(double[] geocoding) {
		this.geocoding = geocoding;
	}

}


text:
<element name="tick-tock-clock">
  <template>

    :

  </template>

</element>

redpajama_set_name: RedPajamaGithub


text:
rogue.utilities package
=======================

Submodules
----------

rogue.utilities.console module
------------------------------

.. automodule:: rogue.utilities.console
    :members:
    :undoc-members:
    :show-inheritance:

rogue.utilities.system module
-----------------------------

.. automodule:: rogue.utilities.system
    :members:
    :undoc-members:
    :show-inheritance:

Module contents
---------------

.. automodule:: rogue.utilities
    :members:
    :undoc-members:
    :show-inheritance:


text:
{% extends "bill-layout.html" %}
{% block bill_content %}
<pre class="text glossary">
{{ f.read().decode('utf-8')|safe }}
</pre>
<script>
{{ glossary_js|safe }}
</script>
{% endblock %}


text:
module Main (main) where

import Language.Haskell.HLint (hlint, suggestionSeverity, Severity (..))
import System.Exit (exitFailure, exitSuccess)

arguments :: [String]
arguments =
    [ "executable"
    , "library"
    , "test-suite"
    ]

main :: IO ()
main = do
    hints <- hlint arguments
    let errorHints = filter ((== Error) . suggestionSeverity) hints
    if null errorHints then exitSuccess else exitFailure


text:
namespace boost {
namespace compute {
namespace detail {

///
/// \brief Search kernel class
///
/// Subclass of meta_kernel which is capable of performing search_n
///
template<class TextIterator, class OutputIterator>
class search_n_kernel : public meta_kernel
{
public:
    typedef typename std::iterator_traits<TextIterator>::value_type value_type;

    search_n_kernel() : meta_kernel("search_n")
    {}

    void set_range(TextIterator t_first,
                   TextIterator t_last,
                   value_type value,
                   size_t n,
                   OutputIterator result)
    {
        m_n = n;
        m_n_arg = add_arg<uint_>("n");

        m_value = value;
        m_value_arg = add_arg<value_type>("value");

        m_count = iterator_range_size(t_first, t_last);
        m_count = m_count + 1 - m_n;

        *this <<
            "uint i = get_global_id(0);\n" <<
            "uint i1 = i;\n" <<
            "uint j;\n" <<
            "for(j = 0; j<n; j++,i++)\n" <<
            "{\n" <<
            "   if(value != " << t_first[expr<uint_>("i")] << ")\n" <<
            "       j = n + 1;\n" <<
            "}\n" <<
            "if(j == n)\n" <<
            result[expr<uint_>("i1")] << " = 1;\n" <<
            "else\n" <<
            result[expr<uint_>("i1")] << " = 0;\n";
    }

    event exec(command_queue &queue)
    {
        if(m_count == 0) {
            return event();
        }

        set_arg(m_n_arg, uint_(m_n));
        set_arg(m_value_arg, m_value);

        return exec_1d(queue, 0, m_count);
    }

private:
    size_t m_n;
    size_t m_n_arg;
    size_t m_count;
    value_type m_value;
    size_t m_value_arg;
};

} //end detail namespace

///
/// \brief Substring matching algorithm
///
/// Searches for the first occurence of n consecutive occurences of
/// value in text [t_first, t_last).
/// \return Iterator pointing to beginning of first occurence
///
/// \param t_first Iterator pointing to start of text
/// \param t_last Iterator pointing to end of text
/// \param n Number of times value repeats
/// \param value Value which repeats
/// \param queue Queue on which to execute
///
template<class TextIterator, class ValueType>
inline TextIterator search_n(TextIterator t_first,
                             TextIterator t_last,
                             size_t n,
                             ValueType value,
                             command_queue &queue = system::default_queue())
{
    vector<uint_> matching_indices(detail::iterator_range_size(t_first, t_last),
                                    queue.get_context());

    detail::search_n_kernel<TextIterator,
                            vector<uint_>::iterator> kernel;

    kernel.set_range(t_first, t_last, value, n, matching_indices.begin());
    kernel.exec(queue);

    vector<uint_>::iterator index = ::boost::compute::find(
        matching_indices.begin(), matching_indices.end(), uint_(1), queue
    );

    return t_first + detail::iterator_range_size(matching_indices.begin(), index);
}

} //end compute namespace
} //end boost namespace

#endif // BOOST_COMPUTE_ALGORITHM_DETAIL_SEARCH_N_HPP


text:
BlackBird::BlackBird( GameObjectName::Name name, GameSprite *gSprite,  CircleSprite *dSprite, b2World* pWorld, float density): GameObjectBird(name, gSprite, dSprite, pWorld, density)
{
	b1= 0;
	countdown = 60;
	counting = false;
	//b2=0;
}

void BlackBird::setWorld(b2World* world)
{
	pWorld = world;
}

void BlackBird::fireParticle(float x, float y)
{

	GameSprite *pBirdSprite = new GameSprite( SpriteBatchName::SpriteBatch_Moving,SpriteName::Sprite_Bird, ImageName::BLANK, Rect(pos.x+(x*15), pos.y+(y*15), 15, 15) );
	CircleSprite *pBirdCircle = new CircleSprite( SpriteBatchName::SpriteBatch_Debug, SpriteName::Sprite_Box_Bird, 2.0f, Color(Yellow), Rect(pos.x+(x*15), pos.y+(y*15), 15, 15));
	b1 = new ExplosionBall(GameObjectName::GameObject_Bird, pBirdSprite, pBirdCircle, pWorld,60);

	b1->pGameSprite->spriteModel->SwapImage(ImageName::Name::BLANK);
	b1->bState = NORMAL2;

	b2Vec2 tmp(x, y);
	tmp *= 75;
	b1->pBody->ApplyLinearImpulse( tmp, pBody->GetWorldCenter(), true );
}
void BlackBird::onMouseAction()
{
	counting = true;
	this->pGameSprite->spriteModel->SwapImage(ImageName::Name::Image_BlackBird2);
}

void BlackBird::Explode()
{
	fireParticle(1.0f, 0.0f);
	fireParticle(1.0f, 1.0f);
	fireParticle(0.0f, 1.0f);
	fireParticle(1.0f, -1.0f);
	fireParticle(-1.0f, -1.0f);
	fireParticle(-1.0f, 1.0f);
	fireParticle(-1.0f, 0.0f);
	fireParticle(0.0f, -1.0f);
	this->active  = false;
	GameSprite* b = new GameSprite( SpriteBatchName::SpriteBatch_Moving,SpriteName::Sprite_Bird, ImageName::Image_Bang, Rect(pos.x, pos.y, 60, 60) );
	smokeTrail.push_back(b);
	markForDelete();
	Sound::getSoundEngine()->play2D("Explosion.mp3", false, false, true);
}

void BlackBird::update2()
{
	if (counting)
	{
		countdown--;
		if (countdown < 0)
			Explode();
	}
}

void BlackBird::launch()
{
	this->pGameSprite->spriteModel->SwapImage(ImageName::Name::Image_BlackBird1);
	launchSound = Sound::getSoundEngine()->play2D("Blackflying.mp3", false, false, true);

}

void BlackBird::hit()
{
	this->pGameSprite->spriteModel->SwapImage(ImageName::Name::Image_BlackBird1);
	launchSound = Sound::getSoundEngine()->play2D("black collision a1.mp3", false, false, true);
}

BlackBird::~BlackBird()
{

}


text:
from django.conf.urls import patterns, url
from episodes import views

urlpatterns = patterns('',
    url(r'^$', views.homepage),
    url(r'^feed.xml/', views.feed),
    url(r'^newhome', views.newhome),
    url(r'^embed/(?P<id>[0-9])/$', views.embed),
)


text:
/** @module vertx-apex-js/redirect_auth_handler */
var utils = require('vertx-js/util/utils');
var AuthHandler = require('vertx-apex-js/auth_handler');
var RoutingContext = require('vertx-apex-js/routing_context');
var AuthProvider = require('vertx-auth-js/auth_provider');

var io = Packages.io;
var JsonObject = io.vertx.core.json.JsonObject;
var JRedirectAuthHandler = io.vertx.ext.apex.handler.RedirectAuthHandler;

/**
 An auth handler that's used to handle auth by redirecting user to a custom login page.

 @class
*/
var RedirectAuthHandler = function(j_val) {

  var j_redirectAuthHandler = j_val;
  var that = this;
  AuthHandler.call(this, j_val);

  /**

   @public
   @param arg0 {RoutingContext}
   */
  this.handle = function(arg0) {
    var __args = arguments;
    if (__args.length === 1 && typeof __args[0] === 'object' && __args[0]._jdel) {
      j_redirectAuthHandler["handle(io.vertx.ext.apex.RoutingContext)"](arg0._jdel);
    } else utils.invalidArgs();
  };

  /**
   Add a required role for this auth handler

   @public
   @param role {string} the role
   @return {AuthHandler} a reference to this, so the API can be used fluently
   */
  this.addRole = function(role) {
    var __args = arguments;
    if (__args.length === 1 && typeof __args[0] === 'string') {
      j_redirectAuthHandler["addRole(java.lang.String)"](role);
      return that;
    } else utils.invalidArgs();
  };

  /**
   Add a required permission for this auth handler

   @public
   @param permission {string} the permission
   @return {AuthHandler} a reference to this, so the API can be used fluently
   */
  this.addPermission = function(permission) {
    var __args = arguments;
    if (__args.length === 1 && typeof __args[0] === 'string') {
      j_redirectAuthHandler["addPermission(java.lang.String)"](permission);
      return that;
    } else utils.invalidArgs();
  };

  /**
   Add a set of required roles for this auth handler

   @public
   @param roles {Array.<string>} the set of roles
   @return {AuthHandler} a reference to this, so the API can be used fluently
   */
  this.addRoles = function(roles) {
    var __args = arguments;
    if (__args.length === 1 && typeof __args[0] === 'object' && __args[0] instanceof Array) {
      j_redirectAuthHandler["addRoles(java.util.Set)"](utils.convParamSetBasicOther(roles));
      return that;
    } else utils.invalidArgs();
  };

  /**
   Add a set of required permissions for this auth handler

   @public
   @param permissions {Array.<string>} the set of permissions
   @return {AuthHandler} a reference to this, so the API can be used fluently
   */
  this.addPermissions = function(permissions) {
    var __args = arguments;
    if (__args.length === 1 && typeof __args[0] === 'object' && __args[0] instanceof Array) {
      j_redirectAuthHandler["addPermissions(java.util.Set)"](utils.convParamSetBasicOther(permissions));
      return that;
    } else utils.invalidArgs();
  };

  // A reference to the underlying Java delegate
  // NOTE! This is an internal API and must not be used in user code.
  // If you rely on this property your code is likely to break if we change it / remove it without warning.
  this._jdel = j_redirectAuthHandler;
};

/**
 Create a handler

 @memberof module:vertx-apex-js/redirect_auth_handler
 @param authProvider {AuthProvider} the auth service to use
 @param loginRedirectURL {string} the url to redirect the user to
 @param returnURLParam {string} the name of param used to store return url information in session
 @return {AuthHandler} the handler
 */
RedirectAuthHandler.create = function() {
  var __args = arguments;
  if (__args.length === 1 && typeof __args[0] === 'object' && __args[0]._jdel) {
    return new AuthHandler(JRedirectAuthHandler["create(io.vertx.ext.auth.AuthProvider)"](__args[0]._jdel));
  }else if (__args.length === 2 && typeof __args[0] === 'object' && __args[0]._jdel && typeof __args[1] === 'string') {
    return new AuthHandler(JRedirectAuthHandler["create(io.vertx.ext.auth.AuthProvider,java.lang.String)"](__args[0]._jdel, __args[1]));
  }else if (__args.length === 3 && typeof __args[0] === 'object' && __args[0]._jdel && typeof __args[1] === 'string' && typeof __args[2] === 'string') {
    return new AuthHandler(JRedirectAuthHandler["create(io.vertx.ext.auth.AuthProvider,java.lang.String,java.lang.String)"](__args[0]._jdel, __args[1], __args[2]));
  } else utils.invalidArgs();
};

// We export the Constructor function
module.exports = RedirectAuthHandler;


text:
<!DOCTYPE html>

	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<meta name="description" content="">
	<meta name="author" content="">

	<title>Works-FanCrew</title>

	<link href="assets/bootstrap/css/bootstrap.min.css" rel="stylesheet" media="screen">

	<link href="assets/css/sass.css" rel="stylesheet" media="screen">

				<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#custom-collapse">
					Toggle navigation

				</button>

Works

About

WORKS

FanCrew

FanCrew is a app that helps you connect sports fans in your current area. It's a simple way to meet new fans and enjoy the game together. App helps you buy and split the ticket cost so the users can meet and enjoy the game hassle free. Let's just call it Tinder for Sports Fans!

				          InVision Prototype

Client

Conceptual

Project Date

February 2018

Category

Product Design, Mobile Design, Branding


text:
package com.itlaborer.apitools.ui;

import org.apache.commons.lang3.StringUtils;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Dialog;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
import org.eclipse.wb.swt.SWTResourceManager;

import com.itlaborer.apitools.res.Resource;
import com.itlaborer.apitools.utils.PubUtils;

public class EditModDialog extends Dialog {

	protected Object result;
	protected Shell shell;
	private String name;
	private String description;
	private Text nameText;
	private boolean saveFlag = false;
	private Text descriptionText;
	private Button buttonYes;

	/**
	 * Create the dialog.
	 *
	 * @param parent
	 * @param style
	 */
	public EditModDialog(Shell parent, int style) {
		super(parent, style);
	}

	/**
	 * Open the dialog.
	 *
	 * @return the result
	 */
	public Object[] open(String modname, String des) {
		this.name = modname;
		this.description = des;
		createContents();
		shell.open();
		shell.layout();
		Display display = getParent().getDisplay();
		while (!shell.isDisposed()) {
			if (!display.readAndDispatch()) {
				display.sleep();
			}
		}
		return (new Object[] { saveFlag, name, description });
	}

	/**
	 * Create contents of the dialog.
	 */
	private void createContents() {
		shell = new Shell(getParent(), getStyle());
		shell.setImage(SWTResourceManager.getImage(EditModDialog.class, Resource.IMAGE_ICON));
		shell.setText("编辑模块");
		shell.setSize(400, 200);
		PubUtils.setCenterinParent(getParent(), shell);

		buttonYes = new Button(shell, SWT.NONE);
		buttonYes.setBounds(213, 135, 80, 27);
		buttonYes.setText("保存");
		buttonYes.addSelectionListener(new SelectionAdapter() {
			@Override
			public void widgetSelected(SelectionEvent e) {
				saveFlag = true;
				name = nameText.getText();
				description = descriptionText.getText();
				shell.dispose();
			}
		});

		Button buttonNo = new Button(shell, SWT.NONE);
		buttonNo.setBounds(304, 135, 80, 27);
		buttonNo.setText("放弃");

		nameText = new Text(shell, SWT.BORDER);
		nameText.setBounds(10, 37, 374, 23);
		nameText.addModifyListener(new ModifyListener() {
			public void modifyText(ModifyEvent e) {
				if (StringUtils.isEmpty(nameText.getText())) {
					buttonYes.setEnabled(false);
				} else {
					buttonYes.setEnabled(true);
				}
			}
		});
		if (StringUtils.isNotEmpty(name)) {
			nameText.setText(name);
		} else {
			buttonYes.setEnabled(false);
		}

		Label label = new Label(shell, SWT.NONE);
		label.setFont(SWTResourceManager.getFont("微软雅黑", 9, SWT.BOLD));
		label.setBounds(10, 20, 61, 17);
		label.setText("模块名:");

		descriptionText = new Text(shell, SWT.BORDER);
		descriptionText.setBounds(10, 87, 374, 23);
		if (StringUtils.isNotEmpty(description)) {
			descriptionText.setText(description);
		}
		Label label_1 = new Label(shell, SWT.NONE);
		label_1.setFont(SWTResourceManager.getFont("微软雅黑", 9, SWT.BOLD));
		label_1.setBounds(10, 70, 61, 17);
		label_1.setText("备注:");
		buttonNo.addSelectionListener(new SelectionAdapter() {
			@Override
			public void widgetSelected(SelectionEvent e) {
				saveFlag = false;
				shell.dispose();
			}
		});
	}
}


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

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Fonts</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="index.html" title="GDK Reference Manual">
<link rel="up" href="reference.html" title="API Reference">
<link rel="prev" href="gdk-Visuals.html" title="Visuals">
<link rel="next" href="gdk-Cursors.html" title="Cursors">
<meta name="generator" content="GTK-Doc V1.15 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">

GDK Reference Manual

Top
                   |
                  Description

Fonts

Fonts — Loading and manipulating fonts

Synopsis

#include <gdk/gdk.h>

                    GdkFont;
enum                GdkFontType;
GdkFont*            gdk_font_load                       (const gchar *font_name);
GdkFont *           gdk_font_load_for_display           (GdkDisplay *display,
                                                         const gchar *font_name);
GdkFont*            gdk_fontset_load                    (const gchar *fontset_name);
GdkFont *           gdk_fontset_load_for_display        (GdkDisplay *display,
                                                         const gchar *fontset_name);
GdkFont*            gdk_font_from_description           (PangoFontDescription *font_desc);
GdkFont *           gdk_font_from_description_for_display
                                                        (GdkDisplay *display,
                                                         PangoFontDescription *font_desc);
GdkDisplay *        gdk_font_get_display                (GdkFont *font);
GdkFont*            gdk_font_ref                        (GdkFont *font);
void                gdk_font_unref                      (GdkFont *font);
gint                gdk_font_id                         (const GdkFont *font);
gboolean            gdk_font_equal                      (const GdkFont *fonta,
                                                         const GdkFont *fontb);

void                gdk_string_extents                  (GdkFont *font,
                                                         const gchar *string,
                                                         gint *lbearing,
                                                         gint *rbearing,
                                                         gint *width,
                                                         gint *ascent,
                                                         gint *descent);
void                gdk_text_extents                    (GdkFont *font,
                                                         const gchar *text,
                                                         gint text_length,
                                                         gint *lbearing,
                                                         gint *rbearing,
                                                         gint *width,
                                                         gint *ascent,
                                                         gint *descent);
void                gdk_text_extents_wc                 (GdkFont *font,
                                                         const GdkWChar *text,
                                                         gint text_length,
                                                         gint *lbearing,
                                                         gint *rbearing,
                                                         gint *width,
                                                         gint *ascent,
                                                         gint *descent);
gint                gdk_string_width                    (GdkFont *font,
                                                         const gchar *string);
gint                gdk_text_width                      (GdkFont *font,
                                                         const gchar *text,
                                                         gint text_length);
gint                gdk_text_width_wc                   (GdkFont *font,
                                                         const GdkWChar *text,
                                                         gint text_length);
gint                gdk_char_width                      (GdkFont *font,
                                                         gchar character);
gint                gdk_char_width_wc                   (GdkFont *font,
                                                         GdkWChar character);
gint                gdk_string_measure                  (GdkFont *font,
                                                         const gchar *string);
gint                gdk_text_measure                    (GdkFont *font,
                                                         const gchar *text,
                                                         gint text_length);
gint                gdk_char_measure                    (GdkFont *font,
                                                         gchar character);
gint                gdk_string_height                   (GdkFont *font,
                                                         const gchar *string);
gint                gdk_text_height                     (GdkFont *font,
                                                         const gchar *text,
                                                         gint text_length);
gint                gdk_char_height                     (GdkFont *font,
                                                         gchar character);

typedef             GdkWChar;
gchar *             gdk_wcstombs                        (const GdkWChar *src);
gint                gdk_mbstowcs                        (GdkWChar *dest,
                                                         const gchar *src,
                                                         gint dest_max);

Description

The GdkFont data type represents a font for drawing on
the screen. These functions provide support for
loading fonts, and also for determining the dimensions
of characters and strings when drawn with a particular
font.

Fonts in X are specified by a
X Logical Font Description.
The following description is considerably simplified.
For definitive information about XLFD's see the
X reference documentation. A X Logical Font Description (XLFD)
consists of a sequence of fields separated (and surrounded by) '-'
characters. For example, Adobe Helvetica Bold 12 pt, has the
full description:

1

"-adobe-helvetica-bold-r-normal--12-120-75-75-p-70-iso8859-1"

The fields in the XLFD are:

<colgroup>
<col>
<col>
</colgroup>

Foundry
the company or organization where the font originated.

Family
the font family (a group of related font designs).

Weight
A name for the font's typographic weight
For example, 'bold' or 'medium').

Slant
The slant of the font. Common values are 'R' for Roman,
'I' for italoc, and 'O' for oblique.

Set Width
A name for the width of the font. For example,
'normal' or 'condensed'.

Add Style
Additional information to distinguish a font from
other fonts of the same family.

Pixel Size
The body size of the font in pixels.

Point Size
The body size of the font in 10ths of a point.
(A point is 1/72.27 inch)

Resolution X
The horizontal resolution that the font was designed for.

Resolution Y
The vertical resolution that the font was designed for .

Spacing
The type of spacing for the font - can be 'p' for proportional,
'm' for monospaced or 'c' for charcell.

Average Width
The average width of a glyph in the font. For monospaced
and charcell fonts, all glyphs in the font have this width

Charset Registry
The registration authority that owns the encoding for
the font. Together with the Charset Encoding field, this
defines the character set for the font.

Charset Encoding
An identifier for the particular character set encoding.

When specifying a font via a X logical Font Description,
'*' can be used as a wildcard to match any portion of
the XLFD. For instance, the above example could
also be specified as

1

"-*-helvetica-bold-r-normal--*-120-*-*-*-*-iso8859-1"

It is generally a good idea to use wildcards for any
portion of the XLFD that your program does not care
about specifically, since that will improve the
chances of finding a matching font.

A fontset is a list of fonts
that is used for drawing international text that may
contain characters from a number of different character
sets. It is represented by a list of XLFD's.

The font for a given character set is determined by going
through the list of XLFD's in order. For each one, if
the registry and and encoding fields match the desired
character set, then that font is used, otherwise if
the XLFD contains wild-cards for the registry and encoding
fields, the registry and encoding for the desired character
set are substituted in and a lookup is done. If a match is found
that font is used. Otherwise, processing continues
on to the next font in the list.

The functions for determining the metrics of a string
come in several varieties that can take a number
of forms of string input:

<col align="left" valign="top">

8-bit string

    When using functions like gdk_string_width() that
    take a gchar *, if the font is of type
    GDK_FONT_FONT and is an 8-bit font, then each
    gchar indexes the glyphs in the font directly.

16-bit string

    For functions taking a gchar *, if the
    font is of type GDK_FONT_FONT, and is a 16-bit
    font, then the gchar * argument is
    interpreted as a guint16 * cast to
    a gchar * and each guint16
    indexes the glyphs in the font directly.

Multibyte string

    For functions taking a gchar *, if the
    font is of type GDK_FONT_FONTSET, then the input
    string is interpreted as a multibyte
    encoded according to the current locale. (A multibyte
    string is one in which each character may consist
    of one or more bytes, with different lengths for different
    characters in the string). They can be converted to and
    from wide character strings (see below) using
    gdk_wcstombs() and gdk_mbstowcs().) The string will
    be rendered using one or more different fonts from
    the fontset.

Wide character string

    For a number of the text-measuring functions, GDK
    provides a variant (such as gdk_text_width_wc()) which
    takes a GdkWChar * instead of a
    gchar *. The input is then taken to
    be a wide character string in the encoding of the
    current locale. (A wide character string is a string
    in which each character consists of several bytes,
    and the width of each character in the string is
    constant.)

GDK provides functions to determine a number of different
measurements (metrics) for a given string. (Need diagram
here).

<col align="left" valign="top">

ascent

    The vertical distance from the origin of the drawing
    opereration to the top of the drawn character.

descent

    The vertical distance from the origin of the drawing
    opereration to the bottom of the drawn character.

left bearing

    The horizontal distance from the origin of the drawing
    operation to the left-most part of the drawn character.

right bearing

    The horizontal distance from the origin of the drawing
    operation to the right-most part of the drawn character.

width bearing

    The horizontal distance from the origin of the drawing
    operation to the correct origin for drawing another
    string to follow the current one. Depending on the
    font, this could be greater than or less than the
    right bearing.

Details

GdkFont

typedef struct {
  GdkFontType type;
  gint ascent;
  gint descent;
} GdkFont;

Warning

GdkFont is deprecated and should not be used in newly-written code.

The GdkFont structure represents a font or fontset. It
contains the following public fields. A new GdkFont
structure is returned by gdk_font_load() or gdk_fontset_load(),
and is reference counted with gdk_font_ref() and gdk_font_unref()

<col align="left" valign="top">

GdkFontType type;

a value of type GdkFontType which indicates
  whether this font is a single font or a fontset.

gint ascent;

the maximum distance that the font, when drawn,
  ascends above the baseline.

gint descent;

the maximum distance that the font, when drawn,
descends below the baseline.

enum GdkFontType

typedef enum
{
  GDK_FONT_FONT,
  GDK_FONT_FONTSET
} GdkFontType;

Warning

GdkFontType is deprecated and should not be used in newly-written code.

Indicates the type of a font. The possible values
are currently:

<col align="left" valign="top">

GDK_FONT_FONT

the font is a single font.

GDK_FONT_FONTSET

the font is a fontset.

gdk_font_load ()

GdkFont*            gdk_font_load                       (const gchar *font_name);

Warning

gdk_font_load is deprecated and should not be used in newly-written code.

Loads a font.

The font may be newly loaded or looked up the font in a cache.
You should make no assumptions about the initial reference count.

<col align="left" valign="top">

font_name :

a XLFD describing the font to load.

Returns :

 a GdkFont, or NULL if the font could not be loaded.

gdk_font_load_for_display ()

GdkFont *           gdk_font_load_for_display           (GdkDisplay *display,
                                                         const gchar *font_name);

Warning

gdk_font_load_for_display is deprecated and should not be used in newly-written code.

Loads a font for use on display.

The font may be newly loaded or looked up the font in a cache.
You should make no assumptions about the initial reference count.

<col align="left" valign="top">

display :

a GdkDisplay

font_name :

a XLFD describing the font to load.

Returns :

a GdkFont, or NULL if the font could not be loaded.

Since 2.2

gdk_fontset_load ()

GdkFont*            gdk_fontset_load                    (const gchar *fontset_name);

Warning

gdk_fontset_load is deprecated and should not be used in newly-written code.

Loads a fontset.

The fontset may be newly loaded or looked up in a cache.
You should make no assumptions about the initial reference count.

<col align="left" valign="top">

fontset_name :

a comma-separated list of XLFDs describing
    the component fonts of the fontset to load.

Returns :

 a GdkFont, or NULL if the fontset could not be loaded.

gdk_fontset_load_for_display ()

GdkFont *           gdk_fontset_load_for_display        (GdkDisplay *display,
                                                         const gchar *fontset_name);

Warning

gdk_fontset_load_for_display is deprecated and should not be used in newly-written code.

Loads a fontset for use on display.

The fontset may be newly loaded or looked up in a cache.
You should make no assumptions about the initial reference count.

<col align="left" valign="top">

display :

a GdkDisplay

fontset_name :

a comma-separated list of XLFDs describing
  the component fonts of the fontset to load.

Returns :

a GdkFont, or NULL if the fontset could not be loaded.

Since 2.2

gdk_font_from_description ()

GdkFont*            gdk_font_from_description           (PangoFontDescription *font_desc);

Warning

gdk_font_from_description is deprecated and should not be used in newly-written code.

Load a GdkFont based on a Pango font description. This font will
only be an approximation of the Pango font, and
internationalization will not be handled correctly. This function
should only be used for legacy code that cannot be easily converted
to use Pango. Using Pango directly will produce better results.

<col align="left" valign="top">

font_desc :

a PangoFontDescription.

Returns :

 the newly loaded font, or NULL if the font
cannot be loaded.

gdk_font_from_description_for_display ()

GdkFont *           gdk_font_from_description_for_display
                                                        (GdkDisplay *display,
                                                         PangoFontDescription *font_desc);

Warning

gdk_font_from_description_for_display is deprecated and should not be used in newly-written code.

Loads a GdkFont based on a Pango font description for use on display.
This font will only be an approximation of the Pango font, and
internationalization will not be handled correctly. This function
should only be used for legacy code that cannot be easily converted
to use Pango. Using Pango directly will produce better results.

<col align="left" valign="top">

display :

a GdkDisplay

font_desc :

a PangoFontDescription.

Returns :

 the newly loaded font, or NULL if the font
cannot be loaded.

Since 2.2

gdk_font_get_display ()

GdkDisplay *        gdk_font_get_display                (GdkFont *font);

Warning

gdk_font_get_display is deprecated and should not be used in newly-written code.

Returns the GdkDisplay for font.

<col align="left" valign="top">

font :

the GdkFont.

Returns :

 the corresponding GdkDisplay.

Since 2.2

gdk_font_ref ()

GdkFont*            gdk_font_ref                        (GdkFont *font);

Warning

gdk_font_ref is deprecated and should not be used in newly-written code.

Increases the reference count of a font by one.

<col align="left" valign="top">

font :

a GdkFont

Returns :

 font

gdk_font_unref ()

void                gdk_font_unref                      (GdkFont *font);

Warning

gdk_font_unref is deprecated and should not be used in newly-written code.

Decreases the reference count of a font by one.
If the result is zero, destroys the font.

<col align="left" valign="top">

font :

a GdkFont

gdk_font_id ()

gint                gdk_font_id                         (const GdkFont *font);

Warning

gdk_font_id is deprecated and should not be used in newly-written code.

Returns the X Font ID for the given font.

<col align="left" valign="top">

font :

a GdkFont.

Returns :

 the numeric X Font ID

gdk_font_equal ()

gboolean            gdk_font_equal                      (const GdkFont *fonta,
                                                         const GdkFont *fontb);

Warning

gdk_font_equal is deprecated and should not be used in newly-written code.

Compares two fonts for equality. Single fonts compare equal
if they have the same X font ID. This operation does
not currently work correctly for fontsets.

<col align="left" valign="top">

fonta :

a GdkFont.

fontb :

another GdkFont.

Returns :

 TRUE if the fonts are equal.

gdk_string_extents ()

void                gdk_string_extents                  (GdkFont *font,
                                                         const gchar *string,
                                                         gint *lbearing,
                                                         gint *rbearing,
                                                         gint *width,
                                                         gint *ascent,
                                                         gint *descent);

Warning

gdk_string_extents is deprecated and should not be used in newly-written code.

Gets the metrics of a nul-terminated string.

<col align="left" valign="top">

font :

a GdkFont.

string :

the nul-terminated string to measure.

lbearing :

the left bearing of the string.

rbearing :

the right bearing of the string.

width :

the width of the string.

ascent :

the ascent of the string.

descent :

the descent of the string.

gdk_text_extents ()

void                gdk_text_extents                    (GdkFont *font,
                                                         const gchar *text,
                                                         gint text_length,
                                                         gint *lbearing,
                                                         gint *rbearing,
                                                         gint *width,
                                                         gint *ascent,
                                                         gint *descent);

Warning

gdk_text_extents is deprecated and should not be used in newly-written code.

Gets the metrics of a string.

<col align="left" valign="top">

font :

a GdkFont

text :

the text to measure

text_length :

the length of the text in bytes. (If the
   font is a 16-bit font, this is twice the length
   of the text in characters.)

lbearing :

the left bearing of the string.

rbearing :

the right bearing of the string.

width :

the width of the string.

ascent :

the ascent of the string.

descent :

the descent of the string.

gdk_text_extents_wc ()

void                gdk_text_extents_wc                 (GdkFont *font,
                                                         const GdkWChar *text,
                                                         gint text_length,
                                                         gint *lbearing,
                                                         gint *rbearing,
                                                         gint *width,
                                                         gint *ascent,
                                                         gint *descent);

Warning

gdk_text_extents_wc is deprecated and should not be used in newly-written code.

Gets the metrics of a string of wide characters.

<col align="left" valign="top">

font :

a GdkFont

text :

the text to measure.

text_length :

the length of the text in character.

lbearing :

the left bearing of the string.

rbearing :

the right bearing of the string.

width :

the width of the string.

ascent :

the ascent of the string.

descent :

the descent of the string.

gdk_string_width ()

gint                gdk_string_width                    (GdkFont *font,
                                                         const gchar *string);

Warning

gdk_string_width is deprecated and should not be used in newly-written code.

Determines the width of a nul-terminated string.
(The distance from the origin of the string to the
point where the next string in a sequence of strings
should be drawn)

<col align="left" valign="top">

font :

a GdkFont

string :

the nul-terminated string to measure

Returns :

 the width of the string in pixels.

gdk_text_width ()

gint                gdk_text_width                      (GdkFont *font,
                                                         const gchar *text,
                                                         gint text_length);

Warning

gdk_text_width is deprecated and should not be used in newly-written code.

Determines the width of a given string.

<col align="left" valign="top">

font :

a GdkFont

text :

the text to measure.

text_length :

the length of the text in bytes.

Returns :

 the width of the string in pixels.

gdk_text_width_wc ()

gint                gdk_text_width_wc                   (GdkFont *font,
                                                         const GdkWChar *text,
                                                         gint text_length);

Warning

gdk_text_width_wc is deprecated and should not be used in newly-written code.

Determines the width of a given wide-character string.

<col align="left" valign="top">

font :

a GdkFont

text :

the text to measure.

text_length :

the length of the text in characters.

Returns :

 the width of the string in pixels.

gdk_char_width ()

gint                gdk_char_width                      (GdkFont *font,
                                                         gchar character);

Warning

gdk_char_width has been deprecated since version 2.2 and should not be used in newly-written code. Use gdk_text_extents() instead.

Determines the width of a given character.

<col align="left" valign="top">

font :

a GdkFont

character :

the character to measure.

Returns :

 the width of the character in pixels.

gdk_char_width_wc ()

gint                gdk_char_width_wc                   (GdkFont *font,
                                                         GdkWChar character);

Warning

gdk_char_width_wc is deprecated and should not be used in newly-written code.

Determines the width of a given wide character. (Encoded
in the wide-character encoding of the current locale).

<col align="left" valign="top">

font :

a GdkFont

character :

the character to measure.

Returns :

 the width of the character in pixels.

gdk_string_measure ()

gint                gdk_string_measure                  (GdkFont *font,
                                                         const gchar *string);

Warning

gdk_string_measure is deprecated and should not be used in newly-written code.

Determines the distance from the origin to the rightmost
portion of a nul-terminated string when drawn. This is not the
correct value for determining the origin of the next
portion when drawing text in multiple pieces.
See gdk_string_width().

<col align="left" valign="top">

font :

a GdkFont

string :

the nul-terminated string to measure.

Returns :

 the right bearing of the string in pixels.

gdk_text_measure ()

gint                gdk_text_measure                    (GdkFont *font,
                                                         const gchar *text,
                                                         gint text_length);

Warning

gdk_text_measure is deprecated and should not be used in newly-written code.

Determines the distance from the origin to the rightmost
portion of a string when drawn. This is not the
correct value for determining the origin of the next
portion when drawing text in multiple pieces.
See gdk_text_width().

<col align="left" valign="top">

font :

a GdkFont

text :

the text to measure.

text_length :

the length of the text in bytes.

Returns :

 the right bearing of the string in pixels.

gdk_char_measure ()

gint                gdk_char_measure                    (GdkFont *font,
                                                         gchar character);

Warning

gdk_char_measure is deprecated and should not be used in newly-written code.

Determines the distance from the origin to the rightmost
portion of a character when drawn. This is not the
correct value for determining the origin of the next
portion when drawing text in multiple pieces.

<col align="left" valign="top">

font :

a GdkFont

character :

the character to measure.

Returns :

 the right bearing of the character in pixels.

gdk_string_height ()

gint                gdk_string_height                   (GdkFont *font,
                                                         const gchar *string);

Warning

gdk_string_height is deprecated and should not be used in newly-written code.

Determines the total height of a given nul-terminated
string. This value is not generally useful, because you
cannot determine how this total height will be drawn in
relation to the baseline. See gdk_string_extents().

<col align="left" valign="top">

font :

a GdkFont

string :

the nul-terminated string to measure.

Returns :

 the height of the string in pixels.

gdk_text_height ()

gint                gdk_text_height                     (GdkFont *font,
                                                         const gchar *text,
                                                         gint text_length);

Warning

gdk_text_height is deprecated and should not be used in newly-written code.

Determines the total height of a given string.
This value is not generally useful, because you cannot
determine how this total height will be drawn in
relation to the baseline. See gdk_text_extents().

<col align="left" valign="top">

font :

a GdkFont

text :

the text to measure.

text_length :

the length of the text in bytes.

Returns :

 the height of the string in pixels.

gdk_char_height ()

gint                gdk_char_height                     (GdkFont *font,
                                                         gchar character);

Warning

gdk_char_height has been deprecated since version 2.2 and should not be used in newly-written code. Use gdk_text_extents() instead.

Determines the total height of a given character.
This value is not generally useful, because you cannot
determine how this total height will be drawn in
relation to the baseline. See gdk_text_extents().

<col align="left" valign="top">

font :

a GdkFont

character :

the character to measure.

Returns :

 the height of the character in pixels.

GdkWChar

typedef guint32			    GdkWChar;

Specifies a wide character type, used to represent character codes.
This is needed since some native languages have character sets which have
more than 256 characters (Japanese and Chinese, for example).

Wide character values between 0 and 127 are always identical in meaning to
the ASCII character codes. The wide character value 0 is often used to
terminate strings of wide characters in a similar way to normal strings
using the char type.

An alternative to wide characters is multi-byte characters, which extend
normal char strings to cope with larger character sets. As the name suggests,
multi-byte characters use a different number of bytes to store different
character codes. For example codes 0-127 (i.e. the ASCII codes) often
use just one byte of memory, while other codes may use 2, 3 or even 4 bytes.
Multi-byte characters have the advantage that they can often be used in an
application with little change, since strings are still represented as arrays
of char values. However multi-byte strings are much easier to manipulate since
the character are all of the same size.

Applications typically use wide characters to represent character codes
internally, and multi-byte strings when saving the characters to a file.
The gdk_wcstombs() and gdk_mbstowcs() functions can be used to convert from
one representation to the other.

See the 'Extended Characters' section of the GNU C Library Reference Manual
for more detailed information on wide and multi-byte characters.

gdk_wcstombs ()

gchar *             gdk_wcstombs                        (const GdkWChar *src);

Warning

gdk_wcstombs is deprecated and should not be used in newly-written code.

Converts a wide character string to a multi-byte string.
(The function name comes from an acronym of 'Wide Character String TO
Multi-Byte String').

<col align="left" valign="top">

src :

a wide character string.

Returns :

 the multi-byte string corresponding to src, or NULL if the
conversion failed. The returned string should be freed with g_free() when no
longer needed.

gdk_mbstowcs ()

gint                gdk_mbstowcs                        (GdkWChar *dest,
                                                         const gchar *src,
                                                         gint dest_max);

Warning

gdk_mbstowcs is deprecated and should not be used in newly-written code.

Converts a multi-byte string to a wide character string.
(The function name comes from an acronym of 'Multi-Byte String TO Wide
Character String').

<col align="left" valign="top">

dest :

the space to place the converted wide character string into.

src :

the multi-byte string to convert, which must be nul-terminated.

dest_max :

the maximum number of wide characters to place in dest.

Returns :

 the number of wide characters written into dest, or -1 if
  the conversion failed.

          Generated by GTK-Doc V1.15


text:
<?php

namespace Omnipay\Amex\Message;

class AuthorizeRequest extends AbstractRequest
{
    protected function getCommand()
    {
        return 'pay';
    }

    public function getData()
    {
        $this->validate('amount', 'card');
        return parent::getData();
    }
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="TypeScriptCompiler">
    <option name="typeScriptCompilerParams" value="--jsx react --noEmit" />
  </component>
</project>


text:
"""Implementation of Cluster Resolvers for GCE Instance Groups."""

from __future__ import absolute_import
from __future__ import division
from __future__ import print_function

from tensorflow.python.distribute.cluster_resolver.cluster_resolver import ClusterResolver
from tensorflow.python.training.server_lib import ClusterSpec

_GOOGLE_API_CLIENT_INSTALLED = True
try:
  from googleapiclient import discovery  # pylint: disable=g-import-not-at-top
  from oauth2client.client import GoogleCredentials  # pylint: disable=g-import-not-at-top
except ImportError:
  _GOOGLE_API_CLIENT_INSTALLED = False

def _format_master_url(master, rpc_layer=None):
  return '%s://%s' % (rpc_layer, master) if rpc_layer else master

class GceClusterResolver(ClusterResolver):
  """Cluster Resolver for Google Compute Engine.

  This is an implementation of cluster resolvers for the Google Compute Engine
  instance group platform. By specifying a project, zone, and instance group,
  this will retrieve the IP address of all the instances within the instance
  group and return a Cluster Resolver object suitable for use for distributed
  TensorFlow.
  """

  def __init__(self,
               project,
               zone,
               instance_group,
               port,
               task_type='worker',
               task_id=0,
               rpc_layer='grpc',
               credentials='default',
               service=None):
    """Creates a new GceClusterResolver object.

    This takes in a few parameters and creates a GceClusterResolver project. It
    will then use these parameters to query the GCE API for the IP addresses of
    each instance in the instance group.

    Args:
      project: Name of the GCE project.
      zone: Zone of the GCE instance group.
      instance_group: Name of the GCE instance group.
      port: Port of the listening TensorFlow server (default: 8470)
      task_type: Name of the TensorFlow job this GCE instance group of VM
        instances belong to.
      task_id: The task index for this particular VM, within the GCE
        instance group. In particular, every single instance should be assigned
        a unique ordinal index within an instance group manually so that they
        can be distinguished from each other.
      rpc_layer: The RPC layer TensorFlow should use to communicate across
        instances.
      credentials: GCE Credentials. If nothing is specified, this defaults to
        GoogleCredentials.get_application_default().
      service: The GCE API object returned by the googleapiclient.discovery
        function. (Default: discovery.build('compute', 'v1')). If you specify a
        custom service object, then the credentials parameter will be ignored.

    Raises:
      ImportError: If the googleapiclient is not installed.
    """
    self._project = project
    self._zone = zone
    self._instance_group = instance_group
    self._task_type = task_type
    self._task_id = task_id
    self._rpc_layer = rpc_layer
    self._port = port
    self._credentials = credentials

    if credentials == 'default':
      if _GOOGLE_API_CLIENT_INSTALLED:
        self._credentials = GoogleCredentials.get_application_default()

    if service is None:
      if not _GOOGLE_API_CLIENT_INSTALLED:
        raise ImportError('googleapiclient must be installed before using the '
                          'GCE cluster resolver')
      self._service = discovery.build(
          'compute', 'v1',
          credentials=self._credentials)
    else:
      self._service = service

  def cluster_spec(self):
    """Returns a ClusterSpec object based on the latest instance group info.

    This returns a ClusterSpec object for use based on information from the
    specified instance group. We will retrieve the information from the GCE APIs
    every time this method is called.

    Returns:
      A ClusterSpec containing host information retrieved from GCE.
    """
    request_body = {'instanceState': 'RUNNING'}
    request = self._service.instanceGroups().listInstances(
        project=self._project,
        zone=self._zone,
        instanceGroups=self._instance_group,
        body=request_body,
        orderBy='name')

    worker_list = []

    while request is not None:
      response = request.execute()

      items = response['items']
      for instance in items:
        instance_name = instance['instance'].split('/')[-1]

        instance_request = self._service.instances().get(
            project=self._project,
            zone=self._zone,
            instance=instance_name)

        if instance_request is not None:
          instance_details = instance_request.execute()
          ip_address = instance_details['networkInterfaces'][0]['networkIP']
          instance_url = '%s:%s' % (ip_address, self._port)
          worker_list.append(instance_url)

      request = self._service.instanceGroups().listInstances_next(
          previous_request=request,
          previous_response=response)

    worker_list.sort()
    return ClusterSpec({self._task_type: worker_list})

  def master(self, task_type=None, task_id=None, rpc_layer=None):
    task_type = task_type if task_type is not None else self._task_type
    task_id = task_id if task_id is not None else self._task_id

    if task_type is not None and task_id is not None:
      master = self.cluster_spec().task_address(task_type, task_id)
      if rpc_layer or self._rpc_layer:
        return '%s://%s' % (rpc_layer or self._rpc_layer, master)
      else:
        return master

    return ''

  @property
  def task_type(self):
    return self._task_type

  @property
  def task_id(self):
    return self._task_id

  @task_type.setter
  def task_type(self, task_type):
    raise RuntimeError(
        'You cannot reset the task_type of the GceClusterResolver after it has '
        'been created.')

  @task_id.setter
  def task_id(self, task_id):
    self._task_id = task_id

  @property
  def environment(self):
    """Returns the current environment which TensorFlow is running in.

    For users in the GCE environment, the environment property is always an
    empty string, and Google users will not use this ClusterResolver for running
    on internal systems.
    """
    return ''

  @property
  def rpc_layer(self):
    return self._rpc_layer

  @rpc_layer.setter
  def rpc_layer(self, rpc_layer):
    self._rpc_layer = rpc_layer


text:
"""Tests for spelling.able_ible check."""

from proselint.checks.spelling import able_ible as chk

from .check import Check

class TestCheck(Check):
    """The test class for spelling.able_ible."""

    __test__ = True

    @property
    def this_check(self):
        """Boilerplate."""
        return chk

    def test_smoke(self):
        """Basic smoke test for spelling.able_ible."""
        assert self.passes("""Smoke phrase with nothing flagged.""")
        assert not self.passes("""It was a sensable decision.""")


text:
[![Version](https://img.shields.io/cocoapods/v/AXStretchableHeaderTabViewController.svg?style=flat)](http://cocoadocs.org/docsets/AXStretchableHeaderTabViewController)
[![License](https://img.shields.io/cocoapods/l/AXStretchableHeaderTabViewController.svg?style=flat)](http://cocoadocs.org/docsets/AXStretchableHeaderTabViewController)
[![Platform](https://img.shields.io/cocoapods/p/AXStretchableHeaderTabViewController.svg?style=flat)](http://cocoadocs.org/docsets/AXStretchableHeaderTabViewController)

A fork of AXStretchableTabViewController which aims to provide support for 3+ tabs, a tab bar offset, tab bar icons, and a tab bar selection indicator in addition to minor improvments here and there.

## Usage

To run the example project; clone the repo, and run `pod install` from the Example directory first.

## Screenshots

### Stretchable Header

![Stretchable Header](https://raw.githubusercontent.com/akiroom/AXStretchableHeaderTabViewController/master/Screenshots/screenshot-stretchable.gif)

### Swipable tabs

![Swipable tabs](https://raw.githubusercontent.com/akiroom/AXStretchableHeaderTabViewController/master/Screenshots/screenshot-swipable.gif)

## Installation

FMStretchableHeaderTabViewController is available through [CocoaPods](http://cocoapods.org). To install
it, simply add the following line to your Podfile:

    pod "FMStretchableHeaderTabViewController"

## Author

Forked by: Faridh Mendoza

Original by: Hiroki Akiyama, aki-hiroki@nifty.com

## License

MIT license. See the LICENSE file for more info.


text:
import EventsEditorRoute from 'routes/EventsEditor'

describe('(Route) EventsEditor', () => {
  let _route

  beforeEach(() => {
    _route = EventsEditorRoute({})
  })

  it('Should return a route configuration object', () => {
    expect(typeof _route).to.equal('object')
  })

  it('Configuration should contain path `events`', () => {
    expect(_route.path).to.equal('events-editor')
  })
})


text:
using System;
using System.Collections.Generic;

namespace BlogEngine.Core.Data.Models
{
    /// <summary>
    /// Blog post detail
    /// </summary>
    public class PostDetail
    {
        /// <summary>
        /// If checked in the UI
        /// </summary>
        public bool IsChecked { get; set; }
        /// <summary>
        /// Post ID
        /// </summary>
        public Guid Id { get; set; }
        /// <summary>
        /// Post title
        /// </summary>
        public string Title { get; set; }
        /// <summary>
        /// Post author
        /// </summary>
        public string Author { get; set; }
        /// <summary>
        /// Description
        /// </summary>
        public string Description { get; set; }
        /// <summary>
        /// Post content
        /// </summary>
        public string Content { get; set; }
        /// <summary>
        ///     Gets or sets the date portion of published date
        /// </summary>
        public string DateCreated { get; set; }
        /// <summary>
        /// Slub
        /// </summary>
        public string Slug { get; set; }
        /// <summary>
        /// Relative link
        /// </summary>
        public string RelativeLink { get; set; }
        /// <summary>
        /// Comma separated list of post categories
        /// </summary>
        public List<CategoryItem> Categories { get; set; }
        /// <summary>
        /// Comma separated list of post tags
        /// </summary>
        public List<TagItem> Tags { get; set; }
        /// <summary>
        /// Comment counts for the post
        /// </summary>
        public string[] Comments { get; set; }
        /// <summary>
        /// Post comments enabled
        /// </summary>
        public bool HasCommentsEnabled { get; set; }
        /// <summary>
        /// Gets or sets post status
        /// </summary>
        public bool IsPublished { get; set; }
        /// <summary>
        /// If post marked for deletion
        /// </summary>
        public bool IsDeleted { get; set; }
        /// <summary>
        /// If the current user can delete this page.
        /// </summary>
        public bool CanUserDelete { get; set; }
        /// <summary>
        /// If the current user can edit this page.
        /// </summary>
        public bool CanUserEdit { get; set; }
    }
}


text:
using namespace llvm;

INITIALIZE_PASS_BEGIN(MachineBranchProbabilityInfo, "machine-branch-prob",
                      "Machine Branch Probability Analysis", false, true)
INITIALIZE_PASS_END(MachineBranchProbabilityInfo, "machine-branch-prob",
                    "Machine Branch Probability Analysis", false, true)

cl::opt<unsigned>
    StaticLikelyProb("static-likely-prob",
                     cl::desc("branch probability threshold in percentage"
                              "to be considered very likely"),
                     cl::init(80), cl::Hidden);

cl::opt<unsigned> ProfileLikelyProb(
    "profile-likely-prob",
    cl::desc("branch probability threshold in percentage to be considered"
             " very likely when profile is available"),
    cl::init(51), cl::Hidden);

char MachineBranchProbabilityInfo::ID = 0;

MachineBranchProbabilityInfo::MachineBranchProbabilityInfo()
    : ImmutablePass(ID) {
  PassRegistry &Registry = *PassRegistry::getPassRegistry();
  initializeMachineBranchProbabilityInfoPass(Registry);
}

void MachineBranchProbabilityInfo::anchor() {}

BranchProbability MachineBranchProbabilityInfo::getEdgeProbability(
    const MachineBasicBlock *Src,
    MachineBasicBlock::const_succ_iterator Dst) const {
  return Src->getSuccProbability(Dst);
}

BranchProbability MachineBranchProbabilityInfo::getEdgeProbability(
    const MachineBasicBlock *Src, const MachineBasicBlock *Dst) const {
  // This is a linear search. Try to use the const_succ_iterator version when
  // possible.
  return getEdgeProbability(Src, find(Src->successors(), Dst));
}

bool MachineBranchProbabilityInfo::isEdgeHot(
    const MachineBasicBlock *Src, const MachineBasicBlock *Dst) const {
  BranchProbability HotProb(StaticLikelyProb, 100);
  return getEdgeProbability(Src, Dst) > HotProb;
}

MachineBasicBlock *
MachineBranchProbabilityInfo::getHotSucc(MachineBasicBlock *MBB) const {
  auto MaxProb = BranchProbability::getZero();
  MachineBasicBlock *MaxSucc = nullptr;
  for (MachineBasicBlock::const_succ_iterator I = MBB->succ_begin(),
       E = MBB->succ_end(); I != E; ++I) {
    auto Prob = getEdgeProbability(MBB, I);
    if (Prob > MaxProb) {
      MaxProb = Prob;
      MaxSucc = *I;
    }
  }

  BranchProbability HotProb(StaticLikelyProb, 100);
  if (getEdgeProbability(MBB, MaxSucc) >= HotProb)
    return MaxSucc;

  return nullptr;
}

raw_ostream &MachineBranchProbabilityInfo::printEdgeProbability(
    raw_ostream &OS, const MachineBasicBlock *Src,
    const MachineBasicBlock *Dst) const {

  const BranchProbability Prob = getEdgeProbability(Src, Dst);
  OS << "edge " << printMBBReference(*Src) << " -> " << printMBBReference(*Dst)
     << " probability is " << Prob
     << (isEdgeHot(Src, Dst) ? " [HOT edge]\n" : "\n");

  return OS;
}


text:
/*****************************************************************************
 * SkeletonRendererCustomMaterialsInspector created by Lost Polygon
 * Full irrevocable rights and permissions granted to Esoteric Software
*****************************************************************************/

using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using UnityEditor;
using UnityEngine;
using Spine.Unity.Modules;

namespace Spine.Unity.Editor {

	// This script is not intended for use with code. See the readme.txt file in SkeletonRendererCustomMaterials folder to learn more.
	[CustomEditor(typeof(SkeletonRendererCustomMaterials))]
	public class SkeletonRendererCustomMaterialsInspector : UnityEditor.Editor {
		List<SkeletonRendererCustomMaterials.AtlasMaterialOverride> componentCustomMaterialOverrides, _customMaterialOverridesPrev;
		List<SkeletonRendererCustomMaterials.SlotMaterialOverride> componentCustomSlotMaterials, _customSlotMaterialsPrev;
		SkeletonRendererCustomMaterials component;

		const BindingFlags PrivateInstance = BindingFlags.Instance | BindingFlags.NonPublic;
		MethodInfo RemoveCustomMaterialOverrides, RemoveCustomSlotMaterials, SetCustomMaterialOverrides, SetCustomSlotMaterials;

		#region SkeletonRenderer context menu
		[MenuItem("CONTEXT/SkeletonRenderer/Add Basic Serialized Custom Materials")]
		static void AddSkeletonRendererCustomMaterials (MenuCommand menuCommand) {
			var skeletonRenderer = (SkeletonRenderer)menuCommand.context;
			var newComponent = skeletonRenderer.gameObject.AddComponent<SkeletonRendererCustomMaterials>();
			Undo.RegisterCreatedObjectUndo(newComponent, "Add Basic Serialized Custom Materials");
		}

		[MenuItem("CONTEXT/SkeletonRenderer/Add Basic Serialized Custom Materials", true)]
		static bool AddSkeletonRendererCustomMaterials_Validate (MenuCommand menuCommand) {
			var skeletonRenderer = (SkeletonRenderer)menuCommand.context;
			return (skeletonRenderer.GetComponent<SkeletonRendererCustomMaterials>() == null);
		}
		#endregion

		void OnEnable () {
			Type cm = typeof(SkeletonRendererCustomMaterials);
			RemoveCustomMaterialOverrides = cm.GetMethod("RemoveCustomMaterialOverrides", PrivateInstance);
			RemoveCustomSlotMaterials = cm.GetMethod("RemoveCustomSlotMaterials", PrivateInstance);
			SetCustomMaterialOverrides = cm.GetMethod("SetCustomMaterialOverrides", PrivateInstance);
			SetCustomSlotMaterials = cm.GetMethod("SetCustomSlotMaterials", PrivateInstance);
		}

		public override void OnInspectorGUI () {
			component = (SkeletonRendererCustomMaterials)target;
			var skeletonRenderer = component.skeletonRenderer;

			// Draw the default inspector
			DrawDefaultInspector();

			if (serializedObject.isEditingMultipleObjects)
				return;

			if (componentCustomMaterialOverrides == null) {
				Type cm = typeof(SkeletonRendererCustomMaterials);
				componentCustomMaterialOverrides = cm.GetField("customMaterialOverrides", PrivateInstance).GetValue(component) as List<SkeletonRendererCustomMaterials.AtlasMaterialOverride>;
				componentCustomSlotMaterials = cm.GetField("customSlotMaterials", PrivateInstance).GetValue(component) as List<SkeletonRendererCustomMaterials.SlotMaterialOverride>;
				if (componentCustomMaterialOverrides == null) {
					Debug.Log("Reflection failed.");
					return;
				}
			}

			// Fill with current values at start
			if (_customMaterialOverridesPrev == null || _customSlotMaterialsPrev == null) {
				_customMaterialOverridesPrev = CopyList(componentCustomMaterialOverrides);
				_customSlotMaterialsPrev = CopyList(componentCustomSlotMaterials);
			}

			// Compare new values with saved. If change is detected:
			// store new values, restore old values, remove overrides, restore new values, restore overrides.

			// 1. Store new values
			var customMaterialOverridesNew = CopyList(componentCustomMaterialOverrides);
			var customSlotMaterialsNew = CopyList(componentCustomSlotMaterials);

			// Detect changes
			if (!_customMaterialOverridesPrev.SequenceEqual(customMaterialOverridesNew) ||
				!_customSlotMaterialsPrev.SequenceEqual(customSlotMaterialsNew)) {
				// 2. Restore old values
				componentCustomMaterialOverrides.Clear();
				componentCustomSlotMaterials.Clear();
				componentCustomMaterialOverrides.AddRange(_customMaterialOverridesPrev);
				componentCustomSlotMaterials.AddRange(_customSlotMaterialsPrev);

				// 3. Remove overrides
				RemoveCustomMaterials();

				// 4. Restore new values
				componentCustomMaterialOverrides.Clear();
				componentCustomSlotMaterials.Clear();
				componentCustomMaterialOverrides.AddRange(customMaterialOverridesNew);
				componentCustomSlotMaterials.AddRange(customSlotMaterialsNew);

				// 5. Restore overrides
				SetCustomMaterials();

				if (skeletonRenderer != null)
					skeletonRenderer.LateUpdate();
			}

			_customMaterialOverridesPrev = CopyList(componentCustomMaterialOverrides);
			_customSlotMaterialsPrev = CopyList(componentCustomSlotMaterials);

			if (GUILayout.Button(new GUIContent("Clear and Reapply Changes", "Removes all non-serialized overrides in the SkeletonRenderer and reapplies the overrides on this component."))) {
				if (skeletonRenderer != null) {
					skeletonRenderer.CustomMaterialOverride.Clear();
					skeletonRenderer.CustomSlotMaterials.Clear();
					RemoveCustomMaterials();
					SetCustomMaterials();
					skeletonRenderer.LateUpdate();
				}
			}
		}

		void RemoveCustomMaterials () {
			RemoveCustomMaterialOverrides.Invoke(component, null);
			RemoveCustomSlotMaterials.Invoke(component, null);
		}

		void SetCustomMaterials () {
			SetCustomMaterialOverrides.Invoke(component, null);
			SetCustomSlotMaterials.Invoke(component, null);
		}

		static List<T> CopyList<T> (List<T> list) {
			return list.GetRange(0, list.Count);
		}
	}
}


text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <title>Capture asteroid, cartoon by S3.14STEROID team</title>

    <link type="text/css" href="https://getbootstrap.com/dist/css/bootstrap.min.css" rel="stylesheet"/>

        Previous

        Next


text:
/****************************************************************************
 Module
   d:\pwm.c

 Revision
   1.0.1

 Description
   This program sets three different pwm duty cycles for the lucky 13 droid.

 Notes

 History
 When           Who     What/Why
 -------------- ---     --------
 02/20/99 08:55 jec      built from template
****************************************************************************/
/*----------------------------- INCLUDE FILES -----------------------------*/
/* include header files for this state machine as well as any machines at the
   next lower level in the hierarchy that are sub-machines to this machine
*/
#include "pwm.h"

/*----------------------------- MODULE DEFINES ----------------------------*/
// define constants for the states and event for this machine
// event constants should start with 1 so that you can use 0 as 'No Events'
#define PWM_PORT H11PORTA
#define PWM_RIGHT  BIT_6
#define PWM_LEFT   BIT_5
#define PWM_TURRET BIT_4

//NUMBER OF CHANNELS
#define PMW_CHANNELS 3
#define PMW_INTITIAL_PERIOD 4000
/*------------------------------GLOBAL VARIABLES ---------------------------*/
static

/*----------------------------MODULE FUNCTIONS ---------------------------*/
/* prototypes for private functions for this machine, things like event
   checkers, entry & exit functions.they should be functions relevant to the
   behavior of this state machine
*/
static void PWM_Isr(void);

/*---------------------------- MODULE VARIABLES ---------------------------*/
// everybody needs a state variable, you may need others as well
static unsigned char CurrentState;
static unsigned char OnTapeLastTime;
static unsigned char LeqRLastTime;
static unsigned char LgtRLastTime;
static unsigned char RgtLLastTime;
static unsigned char TimerExpLastTime;

/*------------------------------ MODULE CODE ------------------------------*/
/****************************************************************************
 Function
    DrivingMachine

 Parameters
   None

 Returns
   None

 Description
   Implements the Driving To Tape state machine
 Notes
   uses nested switch/case to implement the machine.
 Author
   J. Edward Carryer, 2/20/99, 09:01AM
****************************************************************************/
void DrivingMachine( void )
{
   unsigned char CurrentEvent;
   unsigned char NextState;

   switch ( CurrentState )
   {
       case DRV_FORWARD :       // If current state is state one
                           //Execute During function for state one
         CurrentEvent = CheckEventsForward();   //Check for events
         if ( CurrentEvent != 0 )        //If an event is active
         {
            switch ( CurrentEvent)
            {
               case LT_GT_RT : //If event is event one
                  // Execute action function for state one : event one
                  TMR_StartTimer(TURN_TIMER);
                  NextState = TURN_LEFT;//Decide what the next state will be
                  break;
               case RT_GT_LT : //If event is event one
                  // Execute action function for state one : event one
                  TMR_StartTimer(TURN_TIMER);
                  NextState = TURN_RIGHT;//Decide what the next state will be
                  break;
               case HIT_TAPE : //If event is event one
                  // Execute action function for state one : event one
                  NextState = DRV_STOP;//Decide what the next state will be
                  break;
            }
            //   If next state is different from current state
            if ( NextState != CurrentState)
            {
               //   Execute exit function for current state
               CallEntryFunction(NextState);
               CurrentState = NextState; //Modify state variable
             }
         }
         return;

       case TURN_LEFT :       // If current state is state one
                           //Execute During function for state one
         CurrentEvent = CheckEventsTurning();   //Check for events
         if ( CurrentEvent != 0 )        //If an event is active
         {
            switch ( CurrentEvent)
            {
               case TIMER_EXP : //If event is event one
                  // Execute action function for state one : event one
                  NextState = SPIN_LEFT;//Decide what the next state will be
                  break;
               case LT_EQ_RT : //If event is event one
                  // Execute action function for state one : event one
                  NextState = DRV_FORWARD;//Decide what the next state will be
                  break;
               case HIT_TAPE : //If event is event one
                  // Execute action function for state one : event one
                  NextState = DRV_STOP;//Decide what the next state will be
                  break;
            }
            //   If next state is different from current state
            if ( NextState != CurrentState)
            {
               //   Execute exit function for current state
               CallEntryFunction(NextState);
               CurrentState = NextState; //Modify state variable
             }
         }
         return;

       case SPIN_LEFT :       // If current state is state one
                           //Execute During function for state one
         CurrentEvent = CheckEventsSpinning();   //Check for events
         if ( CurrentEvent != 0 )        //If an event is active
         {
            switch ( CurrentEvent)
            {
               case LT_EQ_RT : //If event is event one
                  // Execute action function for state one : event one
                  NextState = DRV_FORWARD;//Decide what the next state will be
                  break;
               case HIT_TAPE : //If event is event one
                  // Execute action function for state one : event one
                  NextState = DRV_STOP;//Decide what the next state will be
                  break;
            }
            //   If next state is different from current state
            if ( NextState != CurrentState)
            {
               //   Execute exit function for current state
               CallEntryFunction(NextState);
               CurrentState = NextState; //Modify state variable
             }
         }
         return;

       case TURN_RIGHT :       // If current state is state one
                           //Execute During function for state one
         CurrentEvent = CheckEventsTurning();   //Check for events
         if ( CurrentEvent != 0 )        //If an event is active
         {
            switch ( CurrentEvent)
            {
               case LT_EQ_RT : //If event is event one
                  // Execute action function for state one : event one
                  NextState = DRV_FORWARD;//Decide what the next state will be
                  break;
               case TIMER_EXP : //If event is event one
                  // Execute action function for state one : event one
                  NextState = SPIN_RIGHT;//Decide what the next state will be
                  break;
               case HIT_TAPE : //If event is event one
                  // Execute action function for state one : event one
                  NextState = DRV_STOP;//Decide what the next state will be
                  break;
            }
            //   If next state is different from current state
            if ( NextState != CurrentState)
            {
               //   Execute exit function for current state
               CallEntryFunction(NextState);
               CurrentState = NextState; //Modify state variable
             }
         }
         return;

       case SPIN_RIGHT :       // If current state is state one
                           //Execute During function for state one
         CurrentEvent = CheckEventsSpinning();   //Check for events
         if ( CurrentEvent != 0 )        //If an event is active
         {
            switch ( CurrentEvent)
            {
               case LT_EQ_RT : //If event is event one
                  // Execute action function for state one : event one
                  NextState = DRV_FORWARD;//Decide what the next state will be
                  break;
               case HIT_TAPE : //If event is event one
                  // Execute action function for state one : event one
                  NextState = DRV_STOP;//Decide what the next state will be
                  break;
            }
            //   If next state is different from current state
            if ( NextState != CurrentState)
            {
               //   Execute exit function for current state
               CallEntryFunction(NextState);
               CurrentState = NextState; //Modify state variable
             }
         }
         return;
   }
}
/****************************************************************************
 Function
     StartDrivingMachine

 Parameters
     None

 Returns
     None

 Description
     Does any required initialization for this state machine
 Notes

 Author
     J. Edward Carryer, 2/18/99, 10:38AM
****************************************************************************/
void StartDrivingMachine ( void )
{
   CurrentState = DRV_FORWARD;
// call the (optional) entry fucntion for the ENTRY_STATE
   CallEntryFunction(CurrentState);
// any other initialization necessary to re-start the state machine
   OnTapeLastTime = FALSE;
   LeqRLastTime = FALSE;
   LgtRLastTime = FALSE;
   RgtLLastTime = FALSE;
   TimerExpLastTime = FALSE;
}

/****************************************************************************
 Function
     IsTapeHit

 Parameters
     None

 Returns
     unsigned char

 Description
     tests to see if Tape has been hit by looking at the current state.
     if we are in the DRV_STOP state, then we hit tape
 Notes

 Author
     J. Edward Carryer, 2/20/99, 10:08AM
****************************************************************************/
unsigned char IsTapeHit( void )
{
   if ( CurrentState == DRV_STOP)
      return TRUE;
   else
      return FALSE;
}

/*------------------------------ Private Code ------------------------------*/
static void CallEntryFunction( unsigned char NewState )
{
   switch ( NewState)
   {
      case DRV_FORWARD :
         MotorDrive(FORWARD, MEDIUM);
         break;
      case TURN_LEFT :
         MotorDrive(TURN_RATE_L, MEDIUM);
         break;
      case TURN_RIGHT :
         MotorDrive(TURN_RATE_R, MEDIUM);
         break;
      case SPIN_LEFT :
         MotorDrive(SPIN_CCW, MEDIUM);
         break;
      case SPIN_RIGHT :
         MotorDrive(SPIN_CW, MEDIUM);
         break;
      case DRV_STOP :
         MotorDrive(FORWARD, STOP);
         break;
   }
   return;
}

static unsigned char CheckEventsSpinning(void)
{
   unsigned char ThisEvent;
   unsigned char ReturnVal;

// if input was in another state last time & in an active state this time
   if (((ThisEvent = ANY_TAPE_ON) == TRUE) &&
       (OnTapeLastTime == FALSE))       // Check for Tape Hit
   {
      ReturnVal = HIT_TAPE;
      OnTapeLastTime = TRUE;
   }
   else                               // this gives Tape priority over sensor
   {
      OnTapeLastTime = ThisEvent;
      if (((ThisEvent = LeftEqualRight()) == TRUE) &&
          (LeqRLastTime == FALSE))//Check for beacon centered
      {
         ReturnVal = LT_EQ_RT;
         LeqRLastTime = TRUE;
      }
      else
      {
         LeqRLastTime = ThisEvent;
         ReturnVal = NO_EVENT;
      }
   }
   return ReturnVal;
}

static unsigned char CheckEventsTurning(void)
{
   unsigned char ThisEvent;
   unsigned char ReturnVal;

// if input was in another state last time & in an active state this time
   if (((ThisEvent = ANY_TAPE_ON) == TRUE) &&
       (OnTapeLastTime == FALSE))        // Check for Tape Hit
   {
      ReturnVal = HIT_TAPE;
      OnTapeLastTime = TRUE;
   }
   else                               // this gives Tape priority over sensor
   {
      OnTapeLastTime = ThisEvent;
      if (((ThisEvent = LeftEqualRight()) == TRUE) &&
          (LeqRLastTime == FALSE))//Check for beacon centered
      {
         ReturnVal = LT_EQ_RT;
         LeqRLastTime = TRUE;
      }
      else                              // this give equal prioity over timer
      {
         LeqRLastTime = ThisEvent;
         if (((ThisEvent = TMR_IsTimerExpired(TURN_TIMER)) == TRUE) &&
             (TimerExpLastTime == FALSE)) //Check for timeout
         {
            ReturnVal = TIMER_EXP;
            TimerExpLastTime = TRUE;
         }
         else
         {
            TimerExpLastTime = ThisEvent;
            ReturnVal = NO_EVENT;
         }
      }
   }
   return ReturnVal;
}

static unsigned char CheckEventsForward(void)
{
   unsigned char ThisEvent;
   unsigned char ReturnVal;
   int SensorDiff;

// if input was in another state last time & in an active state this time
   if (((ThisEvent = ANY_TAPE_ON) == TRUE) &&
       (OnTapeLastTime == FALSE))     // Check for Tape Hit
   {
      ReturnVal = HIT_TAPE;
      OnTapeLastTime = TRUE;
   }
   else                               // this gives Tape priority over sensor
   {
      OnTapeLastTime = ThisEvent;
      if ((SensorDiff = GetSensorDiff()) > TURN_THRESH)  // we're gonna turn
      {
         if (((ThisEvent = (SensorDiff > 0)) == TRUE) &&  // Left gt Right ??
             (LgtRLastTime == FALSE))//Check for events
         {
            ReturnVal = LT_GT_RT;
            LgtRLastTime = TRUE;
            RgtLLastTime = FALSE;
         }
         else                           // must be Right gt Left
         {
            ReturnVal = RT_GT_LT;
            RgtLLastTime = TRUE;
            LgtRLastTime = FALSE;
         }
      }
      else                              // more or less equal, no turn
      {
            RgtLLastTime = FALSE;
            LgtRLastTime = FALSE;
            ReturnVal = NO_EVENT;
      }
   }
   return ReturnVal;
}


text:
cask "radio-silence" do
  version "3.1"
  sha256 "22db11cfd8ee7b15484a28c53c0be8253d7a558d29c30837413a3ad04f492c9f"

  url "https://radiosilenceapp.com/downloads/Radio_Silence_#{version}.pkg"
  name "Radio Silence"
  desc "Network monitor and firewall"
  homepage "https://radiosilenceapp.com/"

  livecheck do
    url "https://radiosilenceapp.com/update"
    regex(%r{href=.*?/Radio_Silence_(\d+(?:\.\d+)*)\.pkg}i)
  end

  pkg "Radio_Silence_#{version}.pkg"

  # We intentionally unload the kext twice as a workaround
  # See https://github.com/Homebrew/homebrew-cask/pull/1802#issuecomment-34171151

  uninstall early_script: {
    executable:   "/sbin/kextunload",
    args:         ["-b", "com.radiosilenceapp.nke.filter"],
    must_succeed: false,
  },
            quit:         "com.radiosilenceapp.client",
            kext:         "com.radiosilenceapp.nke.filter",
            pkgutil:      "com.radiosilenceapp.*",
            launchctl:    [
              "com.radiosilenceapp.trial",
              "com.radiosilenceapp.agent",
              "com.radiosilenceapp.nke",
            ]

  zap trash: "~/Library/Application Support/Radio Silence"
end


text:
<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

use App\Http\Requests;
use App\Page;
use App\Package;
use App\Feature;

class FrontendController extends Controller
{
	public function index()
	{
		$packages = Package::active()->get();

		$features = Feature::active()->get();

		return view('frontend.welcome')->with(compact('packages', 'features'));
	}

	public function pricing()
	{
		$packages = Package::active()->get();

		$features = Feature::active()->get();

		return view('frontend.pricing')->with(compact('packages', 'features'));
	}

	public function components()
	{
		return view('frontend.components');
	}

	public function contactUsSubmit(Request $request)
	{
		$name = $request->input('name');
		$email = $request->input('email');
		$subject = $request->input('subject');
		$form_message = $request->input('message');

		$to_email = \Config::get('app.contact_email');

		\Mail::send('emails.contact',
			[
				'name' => $name,
				'email' => $email,
				'subject' => $subject,
				'form_message' => $form_message
			],
			function ($message) use ($to_email) {
				$message->to($to_email, getSetting('SITE_TITLE') . ' Support')->subject('Contact Form Message');
			}
		);

		return redirect('/login')->with(['success' => 'Thanks for contacting us!']);
	}

	public function blog()
	{
		$posts_per_page = getSetting('POSTS_PER_PAGE');

		$posts = Page::published()->post()->paginate($posts_per_page);

		return view('frontend.blog')->with(compact('posts'));
	}

	public function post($slug = '')
	{
		$post = Page::whereSlug($slug)->published()->post()->get()->first();
		if ($post) {
			return view('frontend.post')->with(compact('post'));
		}

		abort(404);
	}

	public function staticPages($slug = '')
	{
		$page = Page::whereSlug($slug)->published()->page()->get()->first();

		if ($page) {
			return view('frontend.page')->with(compact('page'));
		}

		abort(404);
	}
}


text:
Angular module with
* angular service audioService.recorder and audioService.player
* angular directive util-audio-recorder and util-audio-player

## Usage
Install the required packages
```
bower install util.audio
```
Audio playing and recording via audioService.player and recorder where player.url, recorder.file and recorder.url are the audio content, recording content file and local file url respectively. See [test/index.coffee](https://github.com/twhtanghk/util.audio/blob/master/test/index.coffee).

util-audio-player directive with play button and util-audio-recorder directive with mic button to start recording if press and hold, to stop recording if release the button. See [test/index.html](https://github.com/twhtanghk/util.audio/blob/master/test/index.html).

## Demo
Click [here](https://rawgit.com/twhtanghk/util.audio/master/test/index.html) for demo


text:
var request = require('request'),
    xml2js = require('xml2js-expat');

var Temboo = {

    _req: function (username, password, domain, method, url, body, cb) {
        console.log(url);
        var auth = 'Basic ' + new Buffer(username + ':' + password).toString('base64');
        request({
            method: method,
            url: url,
            body: body,
            headers: {
                "Host": domain + ".temboolive.com",
                "Accept": "application/json",
                "x-temboo-domain": "/" + domain + "/master",
                "Content-Type": "application/json",
                'Authorization': auth
            }
        }, function (err, r, body) {
            if (err) { return cb(err); }
            var res = JSON.parse(body);
            cb(err, res);
        });

    },

    list: function (username, password, domain, cb) {
        this._req(username, password, domain, "GET", "https://" + domain + ".temboolive.com/arcturus-web/api-1.0/choreos", undefined, cb);
    },

    run: function (username, password, domain, choreo, body, cb) {
        this._req(username, password, domain, "POST", "https://" + domain + ".temboolive.com/arcturus-web/api-1.0/choreos" + choreo + "?source_id=PHPSDK_1.70", body, cb);
    },

    details: function (username, password, domain, choreo, cb) {
        this._req(username, password, domain, "GET", "https://" + domain + ".temboolive.com/arcturus-web/api-1.0/choreos" + choreo, undefined, cb);
    },

    status: function (username, password, domain, id, cb) {
        var that = this;
        this._req(username, password, domain, "GET", "https://" + domain + ".temboolive.com/arcturus-web/api-1.0/choreo-executions/" + id, undefined, function (err, res) {

            if (!!res.execution && res.execution.status !== "RUNNING") {
                that._req(username, password, domain, "GET", "https://" + domain + ".temboolive.com/arcturus-web/api-1.0/choreo-executions/" + id + "?view=outputs", undefined, cb);
            } else {
                cb(err, res);
            }
        });
    }

};

exports.worker = function (task, config) {

    var input = JSON.parse(task.config.input);

    var inputs = [], k;
    for (k in input.inputs) {
        if (input.inputs.hasOwnProperty(k)) {
            inputs.push({
                name: k,
                value: input.inputs[k]
            });
        }
    }

    Temboo.run(config.username, config.password, config.domain, input.choreo, JSON.stringify({inputs: inputs}), function (err, res) {

        if (err) {
            console.log(err);
            return;
        }

        console.log(JSON.stringify(res, null, 3));

        var parser = new xml2js.Parser();
        parser.addListener('end', function (result) {
            //console.log( JSON.stringify(result, null, 3) );

            task.respondCompleted(result, function (err) {
                if (err) { console.error(err); return; }
                console.log("temboo: respondComplete");
            });

        });
        parser.parseString(res.output.Response);
    });

};


text:
package rover.domain;

import javax.xml.bind.annotation.XmlRootElement;

@XmlRootElement
public class Instructions {

    private String plat;
    private String pos1;
    private String inst1;
    private String pos2;
    private String inst2;

    public String getPlat() {
        return plat;
    }
    public void setPlat(String plat) {
        this.plat = plat;
    }
    public String getPos1() {
        return pos1;
    }
    public void setPos1(String pos1) {
        this.pos1 = pos1;
    }
    public String getInst1() {
        return inst1;
    }
    public void setInst1(String inst1) {
        this.inst1 = inst1;
    }
    public String getPos2() {
        return pos2;
    }
    public void setPos2(String pos2) {
        this.pos2 = pos2;
    }
    public String getInst2() {
        return inst2;
    }
    public void setInst2(String inst2) {
        this.inst2 = inst2;
    }

}