text:
#ifndef itkXorImageFilter_h
#define itkXorImageFilter_h

#include "itkBinaryGeneratorImageFilter.h"
#include "itkBitwiseOpsFunctors.h"
#include "itkNumericTraits.h"

namespace itk
{
/**
 * \class XorImageFilter
 * \brief Computes the XOR bitwise operator pixel-wise between two images.
 *
 * This class is templated over the types of the two
 * input images and the type of the output image.
 * Numeric conversions (castings) are done by the C++ defaults.
 *
 * Since the bitwise XOR operation is only defined in C++ for integer
 * types, the images passed to this filter must comply with the requirement
 * of using integer pixel type.
 *
 * The total operation over one pixel will be
 *
   \code
    output_pixel = static_cast<OutputPixelType>( input1_pixel ^ input2_pixel )
   \endcode
 *
 * Where "^" is the boolean XOR operator in C++.
 *
 * \ingroup IntensityImageFilters
 * \ingroup MultiThreaded
 * \ingroup ITKImageIntensity
 *
 * \sphinx
 * \sphinxexample{Filtering/ImageIntensity/BinaryXORTwoImages,Binary XOR Two Images}
 * \endsphinx
 */
template <typename TInputImage1, typename TInputImage2 = TInputImage1, typename TOutputImage = TInputImage1>
class ITK_TEMPLATE_EXPORT XorImageFilter : public BinaryGeneratorImageFilter<TInputImage1, TInputImage2, TOutputImage>
{
public:
  ITK_DISALLOW_COPY_AND_MOVE(XorImageFilter);

  /** Standard class type aliases. */
  using Self = XorImageFilter;
  using Superclass = BinaryGeneratorImageFilter<TInputImage1, TInputImage2, TOutputImage>;

  using Pointer = SmartPointer<Self>;
  using ConstPointer = SmartPointer<const Self>;
  using FunctorType =
    Functor::XOR<typename TInputImage1::PixelType, typename TInputImage2::PixelType, typename TOutputImage::PixelType>;

  /** Method for creation through the object factory. */
  itkNewMacro(Self);

  /** Runtime information support. */
  itkTypeMacro(XorImageFilter, BinaryGeneratorImageFilter);

#ifdef ITK_USE_CONCEPT_CHECKING
  // Begin concept checking
  itkConceptMacro(Input1Input2OutputBitwiseOperatorsCheck,
                  (Concept::BitwiseOperators<typename TInputImage1::PixelType,
                                             typename TInputImage2::PixelType,
                                             typename TOutputImage::PixelType>));
  // End concept checking
#endif

protected:
  XorImageFilter()
  {
#if !defined(ITK_WRAPPING_PARSER)
    Superclass::SetFunctor(FunctorType());
#endif
  }

  ~XorImageFilter() override = default;
};
} // end namespace itk

#endif


text:
module Scenery
  class Flexslider::Translation < Globalize::ActiveRecord::Translation
    extend Enumerize
    validates :title, length: { maximum: 255 }
    validates :locale, presence: true, uniqueness: { scope: :scenery_flexslider_id }

    enumerize :locale, in: I18n.available_locales
  end
end

redpajama_set_name: RedPajamaGithub


text:
<?php

namespace Google\AdsApi\Dfp\v201705;

/**
 * This file was generated from WSDL. DO NOT EDIT.
 */
class SyncProposalsWithMarketplace extends \Google\AdsApi\Dfp\v201705\ProposalAction
{

    public function __construct()
    {

    }

}


text:
using System;
using System.Collections;
using Approve.EntityBase;
using System.Data;

namespace Approve.EntityCenter
{

    [Serializable]

    public class EnPubPic : EEnterpriseBase
    {
        public EnPubPic()
            : base()
        {
            m_EntityType = EntityTypeEnum.EnPubPic;
        }

        public EnPubPic(IDictionary iDictionary)
            : base(iDictionary)
        {
            m_EntityType = EntityTypeEnum.EnPubPic;
        }

        public EnPubPic(DataRow dr)
            : base(dr)
        {
            m_EntityType = EntityTypeEnum.EnPubPic;
        }

        public EnPubPic(DataRow dr, IDictionary rel)
            : base(dr, rel)
        {
            m_EntityType = EntityTypeEnum.EnPubPic;
        }
    }
}


text:
<?php namespace AdamDBurton\GMad;

class AddonWriter
{
    private $filename;
    private $buffer;

    public function __construct($filename)
    {
        $this->filename = $filename;
        $this->buffer = fopen($filename, 'w');
    }

    public function write($folder, $files, $title, $description)
    {
        $folder = rtrim($folder, '/') . '/';

        $int8 = 'c'; // signed char (8)
        $int32 = 'i'; // signed integer (32)
        $uint32 = 'I'; // unsigned integer (32)
        $uint64 = 'Q'; // unsigned long long (64)

        $this->writeString(Addon::ident, false); // Ident (4)
        $this->writeInt(Addon::version, $int8); // Version (1)
        $this->writeInt(0, $uint64); // SteamID (64) [unused]
        $this->writeInt(time(), $uint64); // TimeStamp (64)
        $this->writeInt(0, $int8); // Required content, ignored

        $this->writeString($title); // Addon Name (n)
        $this->writeString($description); // Addon Description (n)

        $this->writeString('Author Name'); // Addon Author (n) [unused]
        $this->writeInt(1, $int32); // Addon Version (32) [unused]

        // File list

        $fileNumber = 0;

        foreach($files as $file)
        {
            $file = ltrim($file, '/');

            $crc = crc32($folder . $file);
            $size = filesize($folder . $file);

            $fileNumber++;

            $this->writeInt($fileNumber, $uint32); // File number (32)
            $this->writeString(strtolower($file)); // File name (lowercase) (n)
            $this->writeInt($size, $uint64); // File size (64)
            $this->writeInt($crc, $uint32); // File crc (32)
        }

        $this->writeInt(0, $uint32);

        foreach($files as $file)
        {
            $file = ltrim($file, '/');

            $contents = file_get_contents($folder . $file);

            $this->writeString($contents, false);
        }

        $this->writeInt(crc32($this->filename), $uint32);

        fclose($this->buffer);

        return true;
    }

    private function writeString($string, $null = true)
    {
        fwrite($this->buffer, $string);

        if($null)
        {
            fwrite($this->buffer, "\0"); // Null terminated string
        }

        return true;
    }

    public function writeInt($int, $mod)
    {
        fputs($this->buffer, pack($mod, $int));

        return true;
    }
}


text:
import { connect } from 'react-redux';
import { selectBoardSize } from '../action';
import SizeSelector from '../component/SizeSelector';

const mapStateToProps = () => ({});

const mapDispatchToProps = {
  onSizeSelect: selectBoardSize
}

const VisibleSizeSelector = connect(
  mapStateToProps,
  mapDispatchToProps
)(SizeSelector)

export default VisibleSizeSelector


text:
local ScoreLabel = class("ScoreLabel",function (  )
	return display.newNode()
end)

function ScoreLabel:ctor( )
	-- body
	self:initData()
	self:setupNodes()
end

function ScoreLabel:initData()
	self.score = 0

end

function ScoreLabel:setupNodes()
	display.newSprite(display.newSpriteFrame("score.png"),-110,0)
		:addTo(self)

	display.newSprite(display.newSpriteFrame("split.png"), 0, 0)
		:addTo(self)

	self.number = GUIUtil.number("left", "normal", self.score, 30, 0, 1.1)
		:addTo(self)
end

function ScoreLabel:AddScore(score)
	self.number:AddNumber(score)
	DataManager.Score = DataManager.Score + score
end

return ScoreLabel


text:
layout: page
title: Andrew Levy's 48th Birthday
date: 2016-05-24
author: Carl Little
tags: weekly links, java
status: published
summary: Ut eget dui ultrices nisi.
banner: images/banner/people.jpg
booking:
  startDate: 06/04/2019
  endDate: 06/09/2019
  ctyhocn: AUSRKHX
  groupCode: AL4B
published: true
---
Aenean sit amet tellus non purus sagittis ullamcorper convallis sit amet sem. Quisque sed lectus erat. Curabitur suscipit sodales ex at convallis. Pellentesque vitae posuere purus. Etiam in sapien interdum, bibendum sapien ac, ullamcorper nisl. Aliquam fringilla orci lorem, in ullamcorper lorem malesuada sit amet. Fusce id nunc id est facilisis eleifend vel molestie justo.
Curabitur erat nibh, ullamcorper euismod dui quis, porta scelerisque diam. Praesent sed nulla eget massa viverra vehicula quis eu massa. Nam eleifend, elit et viverra euismod, urna velit congue arcu, at porta tellus ex a est. Sed vitae consequat nulla. Fusce ut finibus velit, quis efficitur dolor. Vestibulum quis tincidunt diam. Nullam ut quam lectus. Donec et diam neque.

* Phasellus vitae arcu non diam maximus pellentesque eu nec dui
* Aliquam pellentesque justo eget sem vestibulum, ac viverra felis egestas.

Aliquam sit amet erat eu mi pulvinar accumsan. Mauris dignissim urna ut nunc convallis dictum. Etiam enim tellus, fringilla pretium est vel, vehicula molestie est. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Pellentesque non eros sem. Morbi scelerisque auctor finibus. Donec hendrerit arcu quis mi rhoncus mollis. Aenean sed rutrum ipsum. Fusce lacinia, mi cursus venenatis facilisis, massa ante hendrerit eros, eu porttitor mi magna a risus.
Etiam sagittis leo vel nisi semper, quis tristique velit volutpat. Cras ac consequat lectus. Nunc in sem ut mi sollicitudin lacinia. Nam varius turpis eget lorem tincidunt condimentum sit amet nec neque. In hac habitasse platea dictumst. Mauris maximus rutrum orci ac cursus. Pellentesque in mattis leo, et mollis libero. Nam ornare eros lacus, ac varius orci vulputate ut. Fusce volutpat, nibh quis mattis luctus, ante massa posuere magna, non tempor sapien velit eu urna. Aliquam sed suscipit orci. Sed et faucibus mauris. Cras justo enim, consequat vel placerat vel, laoreet a mi.


text:
package PalmWrapper;

import java.io.IOException;
import java.util.ArrayList;
import java.util.StringTokenizer;

import com.palm.novacom.INovacomDevice;
import com.palm.novacom.NovacomException;

import PalmWrapper.NovacomWrapper;

import PalmWrapper.Detectors.FileDetector;
import PalmWrapper.Detectors.FolderDetector;
import PalmWrapper.Detectors.FoldersFilter;
import PalmWrapper.Detectors.PalmDetectException;
import PalmWrapper.FsItem.FsItemType;
//import Utils.Utilities;

public class FolderReader
{
    public ArrayList<String> GetSubFolderNames(INovacomDevice device,
            String path) throws NovacomException, IOException,
            PalmDetectException, ParserException
    {
        FoldersFilter filter = new FoldersFilter();

        ArrayList<FsItem> allItems = GetFolderItems(device, path);
        ArrayList<String> result = filter.GetFolders(allItems);

        return result;
    }

    public ArrayList<String> GetSubFileNames(INovacomDevice device, String path)
            throws NovacomException, IOException, PalmDetectException,
            ParserException
    {
        FoldersFilter filter = new FoldersFilter();

        ArrayList<FsItem> allItems = GetFolderItems(device, path);
        ArrayList<String> result = filter.GetFiles(allItems);

        return result;
    }

    public ArrayList<FsItem> GetFolderItems(INovacomDevice device, String path)
            throws NovacomException, IOException, PalmDetectException,
            ParserException
    {
        String dRawItems = GetDecoratedFolderItemsRaw(device, path);
        StringTokenizer dSplitter = new StringTokenizer(dRawItems, "\n");

        String pRawItems = GetPureFolderItemsRaw(device, path);
        StringTokenizer pSplitter = new StringTokenizer(pRawItems, "\n");

        // Fails on the same data - ???
        // if (dSplitter.countTokens() != pSplitter.countTokens())
        // {
        // throw new ParserException("Error getting folder entries.");
        // }

        ArrayList<FsItem> result = new ArrayList<FsItem>(0);
        while (dSplitter.hasMoreTokens() && pSplitter.hasMoreTokens())
        {
            String decoratedName = dSplitter.nextToken();
            String pureName = pSplitter.nextToken();

            FsItem item = ParseFsItem(decoratedName, pureName);
            if (null != item)
            {
                result.add(item);
            }
        }

        return result;
    }

    private FsItem ParseFsItem(String decoratedName, String pureName)
            throws PalmDetectException
    {
        try
        {
            FolderDetector dirDetect = new FolderDetector();
            if (dirDetect.Detect(decoratedName, pureName))
            {
                FsItem result = new FsItem(decoratedName, FsItemType.directory);
                return result;
            }

            FileDetector fDetect = new FileDetector();
            FsItem result = fDetect.Parse(decoratedName, pureName); // null if
            return result; // not valid FsItem
        }
        catch (PalmDetectException e)
        {
            return null;
        }
    }

    private String GetDecoratedFolderItemsRaw(INovacomDevice device, String path)
            throws PalmDetectException, NovacomException, IOException
    {
        NovacomWrapper deviceWrapper = new NovacomWrapper();

        //TODO : add support for the filenames fith spaces.
        //path = Utilities.WrapWithQuotes(path);

        String[] args = { "-1", "-A", "-F", path };
        String result = deviceWrapper.GetCommandAnswer(device, "/bin/ls", args);
        return result;
    }

    private String GetPureFolderItemsRaw(INovacomDevice device, String path)
            throws PalmDetectException, NovacomException, IOException
    {
        NovacomWrapper deviceWrapper = new NovacomWrapper();

        //TODO : add support for the filenames fith spaces.
        //path = Utilities.WrapWithQuotes(path);

        String[] args = { "-1", "-A", path };
        String result = deviceWrapper.GetCommandAnswer(device, "/bin/ls", args);
        return result;
    }
}


text:
import React, { Component, PropTypes } from 'react'
import { IMAGE_SIZES } from '../constants/SongConstants'
import { formatSongTitle } from '../utils/FormatUtils'
import { getImageUrl } from '../utils/SongUtils'
import {Link} from '../components'
import SongHeart from '../components/SongHeart'
import TogglePlayButtonContainer from '../containers/TogglePlayButtonContainer'

const propTypes = {
  authed: PropTypes.object.isRequired,
  dispatch: PropTypes.func.isRequired,
  isActive: PropTypes.bool.isRequired,
  playSong: PropTypes.func.isRequired,
  song: PropTypes.object.isRequired,
  user: PropTypes.object.isRequired
}

class SongCard extends Component {
  renderTogglePlayButton () {
    const { isActive, playSong } = this.props

    if (isActive) {
      return <TogglePlayButtonContainer />
    }

    return (

    )
  }

  render () {
    const { authed, dispatch, isActive, song, user } = this.props
    const isLiked = Boolean(song.id in authed.likes && authed.likes[song.id] === 1)
    const image = getImageUrl(song.artwork_url, IMAGE_SIZES.LARGE)

    return (
      <div className={`card song-card ${(isActive ? ' active' : '')}`}>
        <div className='song-card-image' style={{ backgroundImage: `url(${image})` }}>
          {this.renderTogglePlayButton()}

            <Link
              className='song-card-title'
              dispatch={dispatch}
              route={{ path: ['songs', song.id] }}
              title={song.title}
            >
              {formatSongTitle(song.title)}
            </Link>
            <Link
              className='song-card-user-username'
              dispatch={dispatch}
              route={{ path: ['users', user.id] }}
              title={user.username}
            >
              {user.username}
            </Link>
            <SongHeart
              authed={authed}
              className='song-card-heart'
              dispatch={dispatch}
              isLiked={isLiked}
              songId={song.id}
            />

    )
  }
}

SongCard.propTypes = propTypes

export default SongCard


text:
/**
 * @desc search directive to filter the movies list
 * @example <div search-profiles></div>
 */
angular
  .module('myApp.search')
  .directive('searchProfiles', searchProfiles);

function searchProfiles() {
  return {
    templateUrl:  'app/components/search/search.html',
    controller:   'SearchController',
    controllerAs: 'vm',
    restrict:    'EA',
    replace: true,
    scope: {
      searchProfiles: '='
    },
    bindToController: true
  };

}


text:
angular-stripe [![Build Status](https://travis-ci.org/bendrucker/angular-stripe.svg?branch=master)](https://travis-ci.org/bendrucker/angular-stripe)
==============

Angular provider for easy interaction with [Stripe.js](https://stripe.com/docs/stripe.js). angular-stripe wraps Stripe.js's async operations in `$q` promises, making response handling easier and eliminating `$scope.$apply` calls and other repetitive boilerplate in your application. Check out [angular-credit-cards](https://github.com/bendrucker/angular-credit-cards) for validating your credit card forms. angular-stripe is powered by [stripe-as-promised](https://github.com/bendrucker/stripe-as-promised).

## Setup
```bash
# use npm
$ npm install --save angular-stripe
# or bower
$ bower install --save angular-stripe
```

For Angular 1.2 support, you'll need to load [angular-q-constructor](https://github.com/bendrucker/angular-q-constructor) first.

angular-stripe expects Stripe.js to be available as `window.Stripe` when it loads.

```js
// node module exports the string 'angular-stripe' for convenience
angular.module('myApp', [
  require('angular-stripe')
]);
// otherwise, include the code first then the module name
angular.module('myApp', [
  'angular-stripe'
]);
```

## API

### `stripeProvider`

angular-stripe exposes `stripeProvider` for configuring Stripe.js.

##### `stripeProvider.setPublishableKey(key)` -> `undefined`

Sets your Stripe [publishable key](https://stripe.com/docs/stripe.js#setting-publishable-key).

```js
angular
  .module('myApp', [
    'angular-stripe'
  ])
  .config(function (stripeProvider) {
    stripeProvider.setPublishableKey('my_key');
  });
```

<hr>

### `stripe`

Inject `stripe` into your services or controllers to access the API methods. `createToken` returns a `$q` promise. If Stripe responds with an error, the promise will be rejected.

---

##### `stripe.setPublishableKey(key)` -> `undefined`

Same as [`stripeProvider.setPublishableKey`](#stripeprovidersetpublishablekeykey---undefined)

---

### `stripe.card`

##### `stripe.card.createToken(card [, params])` -> `promise`

Tokenizes a card using [`Stripe.card.createToken`](https://stripe.com/docs/stripe.js#card-createToken). You can optionally pass a `key` property under `params` to use a different publishable key than the default to create that token. This is especially useful for applications using [Stripe Connect](https://stripe.com/connect).

The following utility methods are also exposed:

* [`validateCardNumber`](https://stripe.com/docs/stripe.js#card-validateCardNumber)
* [`validateExpiry`](https://stripe.com/docs/stripe.js#card-validateExpiry)
* [`validateCVC`](https://stripe.com/docs/stripe.js#card-validateCVC)
* [`cardType`](https://stripe.com/docs/stripe.js#card-cardType)

---

#### `stripe.bankAccount`

##### `stripe.bankAccount.createToken(bankAccount [, params])` -> `promise`

Tokenizes a card using [`Stripe.bankAccount.createToken`](https://stripe.com/docs/stripe.js#bank-account-createToken).

The following utility methods are also exposed:

* [`validateRoutingNumber`](https://stripe.com/docs/stripe.js#bank-account-validateRoutingNumber)
* [`validateAccountNumber`](https://stripe.com/docs/stripe.js#bank-account-validateAccountNumber)

---

#### `stripe.bitcoinReceiver`

##### `stripe.bitcoinReceiver.createReceiver` -> `promise`

Creates a bitcoin receiver using [`Stripe.bitcoinReceiver.createReceiver`](https://stripe.com/docs/stripe.js#bitcoinreceiver-createreceiver).

##### `stripe.bitcoinReceiver.pollReceiver` -> `promise`

Polls a bitcoin receiver using [`Stripe.bitcoinReceiver.pollReceiver`](https://stripe.com/docs/stripe.js#bitcoinreceiver-pollreceiver). Note that you'll need to implement [additional logic if you need to cancel receivers](https://github.com/bendrucker/stripe-as-promised#bitcoin).

The following utility methods are also exposed:

* [`cancelReceiverPoll`](https://stripe.com/docs/stripe.js#bitcoinreceiver-cancelreceiverpoll)

---

## Examples

#### Charging a card

```js
app.controller('PaymentController', function ($scope, $http, stripe) {
  $scope.charge = function () {
    return stripe.card.createToken($scope.payment.card)
      .then(function (token) {
        console.log('token created for card ending in ', token.card.last4);
        var payment = angular.copy($scope.payment);
        payment.card = void 0;
        payment.token = token.id;
        return $http.post('https://yourserver.com/payments', payment);
      })
      .then(function (payment) {
        console.log('successfully submitted payment for $', payment.amount);
      })
      .catch(function (err) {
        if (err.type && /^Stripe/.test(err.type)) {
          console.log('Stripe error: ', err.message);
        }
        else {
          console.log('Other error occurred, possibly with your API', err.message);
        }
      });
  };
});
```


text:
package iso20022

// Choice of format for the repair reason.
type RepairReason14Choice struct {

	// Specifies the reason why the instruction/request has a repair or rejection status.
	Code *RepairReason4Code `xml:"Cd"`

	// Specifies the reason why the instruction/request has a repair or rejection status.
	Proprietary *GenericIdentification47 `xml:"Prtry"`
}

func (r *RepairReason14Choice) SetCode(value string) {
	r.Code = (*RepairReason4Code)(&value)
}

func (r *RepairReason14Choice) AddProprietary() *GenericIdentification47 {
	r.Proprietary = new(GenericIdentification47)
	return r.Proprietary
}


text:
#if !defined( __DIRTRAVERSER_H__ )
#define __DIRTRAVERSER_H__

#include <QList>
#include <QRegExp>
#include <QFileInfo>

class AbstractFileCopyFilter
{
public:
    virtual ~AbstractFileCopyFilter() {}

    virtual bool onFile( const QFileInfo &fileInfo, const QString& dest ) = 0;
};

class AppDirCopyFilter : public AbstractFileCopyFilter
{
    bool onFile( const QFileInfo &fileInfo, const QString& dest );
};

class IccProjectCopyFilter : public AbstractFileCopyFilter
{
public:
    IccProjectCopyFilter( NutComponentModel* model );
    bool onFile( const QFileInfo& fileInfo, const QString& dest );
private:
    NutComponentModel* m_model;
};

class DirTraverser
{
public:
    DirTraverser();
    virtual ~DirTraverser();
    void insertFilter( AbstractFileCopyFilter* filter );
    void copyDir( const QString& src, const QString& dest );

private:
    QList<AbstractFileCopyFilter*> filters;
};

#endif // __DIRTRAVERSER_H__


text:
#include <mach/platform.h>

#ifndef _SUN7I_I2C_H_
#define _SUN7I_I2C_H_

#define TWI_MODULE_NUM                  (5)

/* TWI Register Offset */
#define TWI_ADDR_REG    	        (0x00) 	/*  31:8bit reserved,7-1bit for slave addr,0 bit for GCE */
#define TWI_XADDR_REG   	        (0x04) 	/*  31:8bit reserved,7-0bit for second addr in 10bit addr */
#define TWI_DATA_REG    	        (0x08) 	/*  31:8bit reserved, 7-0bit send or receive data byte */
#define TWI_CTL_REG     	        (0x0C) 	/*  INT_EN,BUS_EN,M_STA,INT_FLAG,A_ACK */
#define TWI_STAT_REG    	        (0x10) 	/*  28 interrupt types + 0xF8 normal type = 29  */
#define TWI_CLK_REG     	        (0x14) 	/*  31:7bit reserved,6-3bit,CLK_M,2-0bit CLK_N */
#define TWI_SRST_REG    	        (0x18) 	/*  31:1bit reserved;0bit,write 1 to clear 0. */
#define TWI_EFR_REG     	        (0x1C) 	/*  31:2bit reserved,1:0 bit data byte follow read comand */
#define TWI_LCR_REG     	        (0x20) 	/*  31:6bits reserved  5:0bit for sda&scl control*/
#define TWI_DVFS_REG                    (0x24)  /*  31:3bits reserved  2:0bit for dvfs control */

/* TWI address register */
#define TWI_GCE_EN      	        (0x1 <<0) /* general call address enable for slave mode */
#define TWI_ADDR_MASK   	        (0x7f<<1) /* 7:1bits */
/* 31:8bits reserved */

/* TWI extend address register */
#define TWI_XADDR_MASK                  (0xff) /* 7:0bits for extend slave address */
/* 31:8bits reserved */

/* TWI Data register default is 0x0000_0000 */
#define TWI_DATA_MASK                   (0xff) /* 7:0bits for send or received */

/* TWI Control Register Bit Fields & Masks, default value: 0x0000_0000*/
/* 1:0 bits reserved */
#define TWI_CTL_ACK		        (0x1<<2) /* set 1 to send A_ACK,then low level on SDA */
#define TWI_CTL_INTFLG	                (0x1<<3) /* INT_FLAG,interrupt status flag: set '1' when interrupt coming */
#define TWI_CTL_STP		        (0x1<<4) /* M_STP,Automatic clear 0 */
#define TWI_CTL_STA		        (0x1<<5) /* M_STA,atutomatic clear 0 */
#define TWI_CTL_BUSEN	                (0x1<<6) /* BUS_EN, master mode should be set 1.*/
#define TWI_CTL_INTEN	                (0x1<<7) /* INT_EN */
/* 31:8 bit reserved */

/* TWI Clock Register Bit Fields & Masks,default value:0x0000_0000 */
/*
Fin is APB CLOCK INPUT;
Fsample = F0 = Fin/2^CLK_N;
          F1 = F0/(CLK_M+1);

Foscl = F1/10 = Fin/(2^CLK_N * (CLK_M+1)*10);
Foscl is clock SCL;standard mode:100KHz or fast mode:400KHz
*/
#define TWI_CLK_DIV_M		        (0xF<<3) /* 6:3bit  */
#define TWI_CLK_DIV_N		        (0x7<<0) /* 2:0bit */

/* TWI Soft Reset Register Bit Fields & Masks  */
#define TWI_SRST_SRST		        (0x1<<0) /* write 1 to clear 0, when complete soft reset clear 0 */

/* TWI Enhance Feature Register Bit Fields & Masks  */
/* default -- 0x0 */
#define TWI_EFR_MASK                    (0x3<<0)/* 00:no,01: 1byte, 10:2 bytes, 11: 3bytes */
#define TWI_EFR_WARC_0                  (0x0<<0)
#define TWI_EFR_WARC_1                  (0x1<<0)
#define TWI_EFR_WARC_2                  (0x2<<0)
#define TWI_EFR_WARC_3                  (0x3<<0)

/* twi line control register -default value: 0x0000_003a */
#define TWI_LCR_SDA_EN                  (0x01<<0) 	/* SDA line state control enable ,1:enable;0:disable */
#define TWI_LCR_SDA_CTL                 (0x01<<1) 	/* SDA line state control bit, 1:high level;0:low level */
#define TWI_LCR_SCL_EN                  (0x01<<2) 	/* SCL line state control enable ,1:enable;0:disable */
#define TWI_LCR_SCL_CTL                 (0x01<<3) 	/* SCL line state control bit, 1:high level;0:low level */
#define TWI_LCR_SDA_STATE_MASK          (0x01<<4)   /* current state of SDA,readonly bit */
#define TWI_LCR_SCL_STATE_MASK          (0x01<<5)   /* current state of SCL,readonly bit */
/* 31:6bits reserved */
#define TWI_LCR_IDLE_STATUS             (0x3a)

/* TWI Status Register Bit Fields & Masks  */
#define TWI_STAT_MASK                   (0xff)
/* 7:0 bits use only,default is 0xF8 */
#define TWI_STAT_BUS_ERR                (0x00) 	/* BUS ERROR */
/* Master mode use only */
#define TWI_STAT_TX_STA	                (0x08) 	/* START condition transmitted */
#define TWI_STAT_TX_RESTA               (0x10) 	/* Repeated START condition transmitted */
#define TWI_STAT_TX_AW_ACK              (0x18) 	/* Address+Write bit transmitted, ACK received */
#define TWI_STAT_TX_AW_NAK              (0x20) 	/* Address+Write bit transmitted, ACK not received */
#define TWI_STAT_TXD_ACK                (0x28) 	/* data byte transmitted in master mode,ack received */
#define TWI_STAT_TXD_NAK                (0x30) 	/* data byte transmitted in master mode ,ack not received */
#define TWI_STAT_ARBLOST                (0x38) 	/* arbitration lost in address or data byte */
#define TWI_STAT_TX_AR_ACK              (0x40) 	/* Address+Read bit transmitted, ACK received */
#define TWI_STAT_TX_AR_NAK              (0x48) 	/* Address+Read bit transmitted, ACK not received */
#define TWI_STAT_RXD_ACK                (0x50) 	/* data byte received in master mode ,ack transmitted */
#define TWI_STAT_RXD_NAK                (0x58) 	/* date byte received in master mode,not ack transmitted */
/* Slave mode use only */
#define TWI_STAT_RXWS_ACK               (0x60) 	/* Slave address+Write bit received, ACK transmitted */
#define TWI_STAT_ARBLOST_RXWS_ACK       (0x68)
#define TWI_STAT_RXGCAS_ACK             (0x70) 	/* General Call address received, ACK transmitted */
#define TWI_STAT_ARBLOST_RXGCAS_ACK     (0x78)
#define TWI_STAT_RXDS_ACK               (0x80)
#define TWI_STAT_RXDS_NAK               (0x88)
#define TWI_STAT_RXDGCAS_ACK            (0x90)
#define TWI_STAT_RXDGCAS_NAK            (0x98)
#define TWI_STAT_RXSTPS_RXRESTAS        (0xA0)
#define TWI_STAT_RXRS_ACK               (0xA8)

#define TWI_STAT_ARBLOST_SLAR_ACK       (0xB0)

/* 10bit Address, second part of address */
#define TWI_STAT_TX_SAW_ACK             (0xD0) 	/* Second Address byte+Write bit transmitted,ACK received */
#define TWI_STAT_TX_SAW_NAK             (0xD8) 	/* Second Address byte+Write bit transmitted,ACK not received */

#define TWI_STAT_IDLE	                (0xF8) 	/* No relevant status infomation,INT_FLAG = 0 */

/* status or interrupt source */
/*------------------------------------------------------------------------------
* Code   Status
* 00h    Bus error
* 08h    START condition transmitted
* 10h    Repeated START condition transmitted
* 18h    Address + Write bit transmitted, ACK received
* 20h    Address + Write bit transmitted, ACK not received
* 28h    Data byte transmitted in master mode, ACK received
* 30h    Data byte transmitted in master mode, ACK not received
* 38h    Arbitration lost in address or data byte
* 40h    Address + Read bit transmitted, ACK received
* 48h    Address + Read bit transmitted, ACK not received
* 50h    Data byte received in master mode, ACK transmitted
* 58h    Data byte received in master mode, not ACK transmitted
* 60h    Slave address + Write bit received, ACK transmitted
* 68h    Arbitration lost in address as master, slave address + Write bit received, ACK transmitted
* 70h    General Call address received, ACK transmitted
* 78h    Arbitration lost in address as master, General Call address received, ACK transmitted
* 80h    Data byte received after slave address received, ACK transmitted
* 88h    Data byte received after slave address received, not ACK transmitted
* 90h    Data byte received after General Call received, ACK transmitted
* 98h    Data byte received after General Call received, not ACK transmitted
* A0h    STOP or repeated START condition received in slave mode
* A8h    Slave address + Read bit received, ACK transmitted
* B0h    Arbitration lost in address as master, slave address + Read bit received, ACK transmitted
* B8h    Data byte transmitted in slave mode, ACK received
* C0h    Data byte transmitted in slave mode, ACK not received
* C8h    Last byte transmitted in slave mode, ACK received
* D0h    Second Address byte + Write bit transmitted, ACK received
* D8h    Second Address byte + Write bit transmitted, ACK not received
* F8h    No relevant status information or no interrupt
*-----------------------------------------------------------------------------*/

/* TWI mode select */
#define TWI_MASTER_MODE                 (1)
#define TWI_SLAVE_MODE                  (0)	/* seldom use */

#define SUN7I_TWI_ADDR_SIZE		0x3FF

#define TWI0_BASE_ADDR_START  (SW_PA_TWI0_IO_BASE )
#define TWI0_BASE_ADDR_END    (TWI0_BASE_ADDR_START + SUN7I_TWI_ADDR_SIZE)

#define TWI1_BASE_ADDR_START  (SW_PA_TWI1_IO_BASE )
#define TWI1_BASE_ADDR_END    (TWI1_BASE_ADDR_START + SUN7I_TWI_ADDR_SIZE)

#define TWI2_BASE_ADDR_START  (SW_PA_TWI2_IO_BASE )
#define TWI2_BASE_ADDR_END    (TWI2_BASE_ADDR_START + SUN7I_TWI_ADDR_SIZE)

#define TWI3_BASE_ADDR_START  (SW_PA_TWI3_IO_BASE )
#define TWI3_BASE_ADDR_END    (TWI3_BASE_ADDR_START + SUN7I_TWI_ADDR_SIZE)

#define TWI4_BASE_ADDR_START  (SW_PA_TWI4_IO_BASE )
#define TWI4_BASE_ADDR_END    (TWI4_BASE_ADDR_START + SUN7I_TWI_ADDR_SIZE)

#define TWI0_TRANSFER_SPEED     (200000)
#define TWI1_TRANSFER_SPEED     (200000)
#define TWI2_TRANSFER_SPEED     (400000)
#define TWI3_TRANSFER_SPEED     (200000)
#define TWI4_TRANSFER_SPEED     (200000)

#define SUN7I_IRQ_TWI0	34

struct sun7i_i2c_platform_data {
	int 		 bus_num;
	unsigned int frequency;
};

#endif


text:
'use strict';

module.exports = {
	db: process.env.MONGOHQ_URL || process.env.MONGOLAB_URI || 'mongodb://localhost/journeh',
	queue: {
			server: process.env.RABBITMQ_URL || 'amqp://localhost:5672',
			jobTypes: {
				instagramFeed: 'dev.instagram.feed',
				s3Assets: 'dev.s3assets'
			}
	},
	raven: process.env.RAVEN_DSN,
	assets: {
		cdn: {
			root: process.env.CDN || '//cdn.journeh.com',
			css: [
				'/public/dist/application.min.css',
				'/public/dist/sass.min.css'
			],
			js: '/public/dist/application.min.js',
			lib: {
				css: [
					'/public/lib/bootstrap/dist/css/bootstrap.min.css',
					'/public/lib/bootstrap/dist/css/bootstrap-theme.min.css',

					'/public/lib/medium-editor/dist/css/medium-editor.min.css',
					'/public/lib/medium-editor/dist/css/themes/bootstrap.min.css',

					'/public/lib/leaflet/dist/leaflet.css',
					'/public/lib/mhng-richsummary/styles.css'
				],
				js: [
					'/public/lib/angular/angular.min.js',
					'/public/lib/angular-resource/angular-resource.js',
					'/public/lib/angular-animate/angular-animate.js',
					'/public/lib/angular-sanitize/angular-sanitize.js',
					'/public/lib/angular-ui-router/release/angular-ui-router.min.js',
					'/public/lib/angular-ui-utils/ui-utils.min.js',
					'/public/lib/angular-bootstrap/ui-bootstrap-tpls.min.js',

					'/public/lib/angular-paginate-anything/dist/paginate-anything.min.js',
					'/public/lib/lodash/dist/lodash.min.js',
					'/public/lib/angular-lodash/angular-lodash.js',
					'/public/lib/medium-editor/dist/js/medium-editor.min.js',
					'/public/lib/angular-medium-editor/dist/angular-medium-editor.min.js',

					'/public/lib/leaflet/dist/leaflet.js',
					'/public/lib/angular-leaflet-directive/dist/angular-leaflet-directive.min.js',

					'/public/lib/angular-utils-disqus/dirDisqus.js',
					'/public/lib/mhng-richsummary/dirRichSummary.js'
				]
			}
		},
		lib: {
			css: [],
			js: [
				'//cdnjs.cloudflare.com/ajax/libs/classlist/2014.01.31/classList.min.js'
			]
		},
		css: null,
		js: null
	},
	instagram: {
		clientID: process.env.INSTAGRAM_ID || 'APP_ID',
		clientSecret: process.env.INSTAGRAM_SECRET || 'APP_SECRET',
		callbackURL: 'http://journeh.com/auth/instagram/callback'
	},
	facebook: {
		clientID: process.env.FACEBOOK_ID || 'APP_ID',
		clientSecret: process.env.FACEBOOK_SECRET || 'APP_SECRET',
		callbackURL: 'http://journeh.com/auth/facebook/callback'
	},
	mailer: {
		from: process.env.MAILER_FROM || 'MAILER_FROM',
		options: {
			service: process.env.MAILER_SERVICE_PROVIDER || 'MAILER_SERVICE_PROVIDER',
			auth: {
				user: process.env.MAILER_EMAIL_ID || 'MAILER_EMAIL_ID',
				pass: process.env.MAILER_PASSWORD || 'MAILER_PASSWORD'
			}
		}
	}
};