text:
//-----------------------------------------------------------------------
// <copyright file="Deployer.cs" company="Akka.NET Project">
//     Copyright (C) 2009-2016 Lightbend Inc. <http://www.lightbend.com>
//     Copyright (C) 2013-2016 Akka.NET project <https://github.com/akkadotnet/akka.net>
// </copyright>
//-----------------------------------------------------------------------

using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using Akka.Configuration;
using Akka.Routing;
using Akka.Util;
using Akka.Util.Internal;

namespace Akka.Actor
{
    public class Deployer
    {
        private readonly Config _default;
        private readonly Settings _settings;
        private readonly AtomicReference<WildcardTree<Deploy>> _deployments = new AtomicReference<WildcardTree<Deploy>>(new WildcardTree<Deploy>());

        public Deployer(Settings settings)
        {
            _settings = settings;
            var config = settings.Config.GetConfig("akka.actor.deployment");
            _default = config.GetConfig("default");

            var rootObj = config.Root.GetObject();
            if (rootObj == null) return;
            var unwrapped = rootObj.Unwrapped.Where(d => !d.Key.Equals("default")).ToArray();
            foreach (var d in unwrapped.Select(x => ParseConfig(x.Key, config.GetConfig(x.Key))))
            {
                SetDeploy(d);
            }
        }

        public Deploy Lookup(ActorPath path)
        {
            if (path.Elements.Head() != "user" || path.Elements.Count() < 2)
                return Deploy.None;

            var elements = path.Elements.Drop(1);
            return Lookup(elements);
        }

        public Deploy Lookup(IEnumerable<string> path)
        {
            return Lookup(path.GetEnumerator());
        }

        public Deploy Lookup(IEnumerator<string> path)
        {
            return _deployments.Value.Find(path).Data;
        }

        public void SetDeploy(Deploy deploy)
        {
            Action<IList<string>, Deploy> add = (path, d) =>
            {
                bool set;
                do
                {
                    var w = _deployments.Value;
                    foreach (var t in path)
                    {
                        var curPath = t;
                        if (string.IsNullOrEmpty(curPath))
                            throw new IllegalActorNameException(string.Format("Actor name in deployment [{0}] must not be empty", d.Path));
                        if (!ActorPath.IsValidPathElement(t))
                        {
                            throw new IllegalActorNameException(
                                string.Format("Illegal actor name [{0}] in deployment [${1}]. Actor paths MUST: not start with `$`, include only ASCII letters and can only contain these special characters: ${2}.", t, d.Path, new String(ActorPath.ValidSymbols)));
                        }
                    }
                    set = _deployments.CompareAndSet(w, w.Insert(path.GetEnumerator(), d));
                } while(!set);
            };
            var elements = deploy.Path.Split('/').Drop(1).ToList();
            add(elements, deploy);
        }

        public virtual Deploy ParseConfig(string key, Config config)
        {
            var deployment = config.WithFallback(_default);
            var routerType = deployment.GetString("router");
            var router = CreateRouterConfig(routerType, deployment);
            var dispatcher = deployment.GetString("dispatcher");
            var mailbox = deployment.GetString("mailbox");
            var deploy = new Deploy(key, deployment, router, Deploy.NoScopeGiven, dispatcher, mailbox);
            return deploy;
        }

        private RouterConfig CreateRouterConfig(string routerTypeAlias, Config deployment)
        {
            if (routerTypeAlias == "from-code")
                return RouterConfig.NoRouter;

            var path = string.Format("akka.actor.router.type-mapping.{0}", routerTypeAlias);
            var routerTypeName = _settings.Config.GetString(path);
            var routerType = Type.GetType(routerTypeName);
            Debug.Assert(routerType != null, "routerType != null");
            var routerConfig = (RouterConfig)Activator.CreateInstance(routerType, deployment);

            return routerConfig;
        }
    }
}


text:
[![Build Status](https://travis-ci.org/shortify/shortify.svg?branch=master)](https://travis-ci.org/shortify/shortify)
[![GoDoc](https://godoc.org/github.com/shortify/shortify/app?status.svg)](https://godoc.org/github.com/shortify/shortify/app)

A simple URL shortener application written in Go.

## Getting Started

Head over to the [latest release] and download the `shortify` executable.

[latest release]: https://github.com/shortify/shortify/releases/latest

### Building From Source

```bash
git clone https://github.com/shortify/shortify.git
script/build
```

### Configuration

In order to run shortify, you'll need to create a config file named `shortify.gcfg`. This file must be placed right
beside the executable.

Here's an example of a typical config file:

```ini
[database]
provider = mysql
dataSource = tcp://localhost:3306*mydb/myuser/mypassword

[settings]
; alphanumeric without abiguous characters
alphabet = 23456789abcdefghijkmnpqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ
port = 80
```

Any of these settings can be supplied as an env var by using `$ENV_VAR_NAME` as the value. For example, if you have the
following environment variables set:

```bash
export SHORTIFY_DATASOURCE=tcp://localhost:3306*mydb/myuser/mypassword
export SHORTIFY_PORT=8080
```

Then you can use those values in the configuration like this:

```ini
[database]
provider = mysql
dataSource = $SHORTIFY_DATASOURCE

[settings]
; alphanumeric without abiguous characters
alphabet = 23456789abcdefghijkmnpqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ
port = $SHORTIFY_PORT
```

### Running the App

With the config file in place, simply run `./shortify`. If the database does not exist yet, shortify will create it for
you.

Currently, there is support for MySQL, PostgreSQL and Sqlite3. Very happy to receive PRs for others if you need them.

For examples of how to configure each of these, check out the _examples/_ directory.

## Using Shortify

Shortify is very simple. It has two endpoints:

* `GET /{token}` - will redirect to the full URL for the specified token
* `POST /redirects` - creates a new redirect (URLs are unique in this app)

Creating redirects requires a valid user account (see below). To create a redirect, you'll need to set the
auth header on the request and supply a JSON object with a `url` property. Here's an example using
`CURL`:

```bash
curl --user <username>:<password> \
  -H "Content-Type: application/json" \
  -d '{ "url": "http://pseudomuto.com/" }' \
  http://localhost:8080/redirects
```

The result (if successful) will be a JSON object similar to this one:

```json
{
  "id": 2,
  "token": "2Bk",
  "url": "http://pseudomuto.com/",
  "createdAt": "2015-04-12T22:41:36.544495662Z"
}
```

After running the command above, you can browse to `http://localhost:8080/2Bk` and you will be
redirected to `http://pseudomuto.com/`.

**NOTE**: _tokens are case-sensitive (i.e. `2Bk` != `2bk`)_

Hopefully errors don't occur, but when they do, the response will have the correct HTTP status code
and will have the following response body (code and text change depending on the error):

```json
{
  "code": 404,
  "text": "Redirect was not found"
}
```

## Managing Users

Creating a new `Redirect` record requires authentication. This app is configured to use basic
authentication (read: should be served over SSL).

Passwords are randomly generated and then hashed for storage in the database.

* List all users - `./shortify users list`
* Create a new user - `./shortify users create [username]`
* Generate a new password for a user - `./shortify users resetpw [username]`

_See `./shortify help` for options._

## Logging

Logs are very simple at this point. They include (tab seperated) the following information:

* Timestamp
* Request method
* Request URL
* The handler that handled the request
* How long it took to execute

Logs are written to `STDOUT` and no log file is kept.

redpajama_set_name: RedPajamaGithub


text:
package org.kie.simulation.jaxb;

import java.io.IOException;
import javax.xml.bind.*;
import javax.xml.transform.Result;
import javax.xml.transform.stream.StreamResult;

import org.kie.simulation.fluent.ContextFluent;

public class JavaToXSD {
    @SuppressWarnings("restriction")
    public static void main(String[] args) throws Exception {
        JAXBContext jc = JAXBContext.newInstance(ContextFluent.class);

        jc.generateSchema(new SchemaOutputResolver() {

            @Override
            public Result createOutput(String namespaceUri, String suggestedFileName) throws IOException {
                StreamResult result = new StreamResult(System.out);
                result.setSystemId(suggestedFileName);
                return result;
            }

        });
    }
}


text:
<!DOCTYPE html>

    <title>{NAME} v{VERSION} - Grid Layout Demo</title>

{NAME} v{VERSION}

Grid layout demo


text:
package tagit2.api.content.route;

import java.io.Serializable;

import kiwi.model.Constants;
import kiwi.model.annotations.KiWiFacade;
import kiwi.model.annotations.RDF;
import kiwi.model.annotations.RDFType;
import kiwi.model.content.ContentItemI;

import org.hibernate.validator.Range;

/**
 * Describes a path point, a point is used to define a route.
 *
 * @author mradules
 * @version 03-pre
 * @since 03-pre
 */
@KiWiFacade
@RDFType( {Constants.NS_ROUTEIT + "TrackPoint"})
public interface TrackPointFacade extends ContentItemI,Serializable {

    /**
     * The longitude of this point of interest. Maps to geo:long
     * of the geo ontology in the triple store.
     *
     * @return
     */
    @Range(min = -180, max = 180)
    @RDF(Constants.NS_GEO + "long")
    double getLongitude();

    void setLongitude(double longitude);

    /**
     * The latitude of this point of interest. Maps to geo:lat of
     * the geo ontology in the triple store.
     *
     * @return
     */
    @Range(min = -90, max = 90)
    @RDF(Constants.NS_GEO + "lat")
    double getLatitude();

    void setLatitude(double latitude);

    /**
     * The altitude of this point. Maps to geo:alt
     * of the geo ontology in the triple store.
     *
     * @return
     */
    @RDF(Constants.NS_GEO + "alt")
    double getAltitude();

    void setAltitude(double altitude);

    /**
     * Used to include this point in a ordinated collection.
     *
     * @return the ordinal for this point.
     */
    @RDF(Constants.NS_ROUTEIT + "oridinal")
    int getOrdinal();

    void setOrdinal(int ordinal);

    @RDF(Constants.NS_ROUTEIT + "distance")
	double getDistance();

	void setDistance(double distance);

}


text:
package uno.perwironegoro.boardgames.pawnrace.ai;

import uno.perwironegoro.boardgames.Colour;
import uno.perwironegoro.boardgames.Square;
import uno.perwironegoro.boardgames.pawnrace.BoardPR;
import uno.perwironegoro.boardgames.pawnrace.MovePR;
import uno.perwironegoro.boardgames.pawnrace.UtilsPR;

public class UtilsAI {

	/* Evaluates a given player's score based on the current position
	 * of their pawns on the board
	 */
	public static int evaluateBoard(BoardPR b, MovePR lastMove, Colour nextPlayer, Colour c, Heuristic h) {
		int acc = 0;

		for(Square pawnSquare : UtilsPR.getAllPawns(b, c)) {
			if(UtilsPR.isEndSquare(pawnSquare, b, c)) {
				acc += (int) 1E5; // Not max int because of possible overflow
				continue;
			}

			acc += evaluatePawn(pawnSquare, b, lastMove, nextPlayer, c, h);
		}
		return acc;
	}

	public static int evaluatePawn(Square pawnSquare, BoardPR b, MovePR lastMove,
			Colour nextPlayer, Colour c, Heuristic h) {
		return evaluatePawn(pawnSquare, b, lastMove, nextPlayer, c, h, false);
	}

	public static int evaluatePawn(Square pawnSquare, BoardPR b, MovePR lastMove,
			Colour nextPlayer, Colour c, Heuristic h, boolean debug) {

		int moveDir = UtilsPR.moveDirection(c);

		if(UtilsPR.isStartSquare(pawnSquare, b, c.opposite())) {
			return (int) 1E4;
		}

		//========= Score multipliers for a pawn's current advancement ==========================
		int squaresAdvanced = UtilsPR.squaresAdvanced(pawnSquare, b);
		int moveScore = squaresAdvanced;// * squaresAdvanced;

		boolean enemyOnFile = false;
		boolean enemyOnFileL = false;
		boolean enemyOnFileR = false;
		boolean isPassed = false;

		int yBound = c == Colour.WHITE? b.getHeight() - pawnSquare.getY()
				: pawnSquare.getY() - 1;

		for(int dy = 1; dy < yBound; dy++) {
			int yo = dy * moveDir;
			if(pawnSquare.getX() > 1) {
				if(b.getBoardSquareRelative(pawnSquare, -1, yo).isOccupiedBy(c.opposite())) {
					enemyOnFileL = true;
				}
			}
			if(pawnSquare.getX() < b.getWidth()) {
				if(b.getBoardSquareRelative(pawnSquare, 1, yo).isOccupiedBy(c.opposite())) {
					enemyOnFileR = true;
				}
			}

			if(b.getBoardSquareRelative(pawnSquare, 0, yo).isOccupiedBy(c.opposite())) {
				enemyOnFile = true;
			}
		}

		//Passed
		if(!enemyOnFileL && !enemyOnFile && !enemyOnFileR) {
			moveScore *= h.passed;
			isPassed = true;

			int mostEnemyAdvanced = 0;
			for(Square enemyPawnSquare : UtilsPR.getAllPawns(b, c.opposite())) {
				mostEnemyAdvanced = Math.max(mostEnemyAdvanced,
						UtilsPR.squaresAdvanced(enemyPawnSquare, b));
			}
			if(squaresAdvanced > mostEnemyAdvanced
					|| (squaresAdvanced == mostEnemyAdvanced && nextPlayer == c)) {
				moveScore += (squaresAdvanced - mostEnemyAdvanced + 1) * 1E3;
			}
		}
		//One enemy pawn adj
		else if((!enemyOnFileL && !enemyOnFile && enemyOnFileR)
				|| (enemyOnFileL && !enemyOnFile && !enemyOnFileR)) {
			moveScore *= h.pastEdge;
		}
		//On one edge
		else if((!enemyOnFileL && enemyOnFile && enemyOnFileR)
				|| (enemyOnFileL && enemyOnFile && !enemyOnFileR)) {
			moveScore *= h.onEdge;

		}
		//locked
		else if(!enemyOnFileL && enemyOnFile && !enemyOnFileR) {
			return 0; // Can't contribute to victory - all points are a result of being a hindrance
		}
		//between edges
		else if(enemyOnFileL && !enemyOnFile && enemyOnFileR) {
			moveScore *= h.betweenEdge;

		} else /*if(enemyOnFileL && enemyOnFile && enemyOnFileR)*/ {
			//don't multiply
		}

		//========= Extra score / no score for pawn based on current threats ======================
		int protectScore = 0;

		boolean isThreatened = false;
		boolean isProtected = false;

		boolean isEPThreatened = false;
		boolean isEPProtected = false;

		if(pawnSquare.getX() > 1) {
			if(lastMove != null && lastMove.isDoubleMove() && lastMove.getTo().sameCoordsAs(pawnSquare)
					&& b.getBoardSquareRelative(pawnSquare, -1, 0).isOccupiedBy(c.opposite())) {
				isEPThreatened = true; //TODO check if this works
				//Protection lasts for one move only.
				if(b.getBoardSquareRelative(pawnSquare, -1, -2*moveDir).isOccupiedBy(c)) {
					isEPProtected = true;
				}
			}

			if(b.getBoardSquareRelative(pawnSquare, -1, moveDir).isOccupiedBy(c.opposite())) {
				isThreatened = true;
			} else if(b.getBoardSquareRelative(pawnSquare, -1, moveDir).isOccupiedBy(c)) {
				protectScore += h.protectScore;
			}
			if(b.getBoardSquareRelative(pawnSquare, -1, -moveDir).isOccupiedBy(c)) {
				isProtected = true;
			}
		}

		if(pawnSquare.getX() < b.getWidth()) {
			if(lastMove != null && lastMove.isDoubleMove() && lastMove.getTo().sameCoordsAs(pawnSquare)
					&& b.getBoardSquareRelative(pawnSquare, 1, 0).isOccupiedBy(c.opposite())) {
				isEPThreatened = true;
				//Protection lasts for one move only.
				if(b.getBoardSquareRelative(pawnSquare, 1, -2*moveDir).isOccupiedBy(c)) {
					isEPProtected = true;
				}
			}

			if(b.getBoardSquareRelative(pawnSquare, 1, moveDir).isOccupiedBy(c.opposite())) {
				isThreatened = true;
			} else if(b.getBoardSquareRelative(pawnSquare, 1, moveDir).isOccupiedBy(c.opposite())) {
				protectScore += h.protectScore;
			}
			if(b.getBoardSquareRelative(pawnSquare, 1, -moveDir).isOccupiedBy(c)) {
				isProtected = true;
			}
		}

		int pawnScore = h.pawnExists;
		if(isPassed) {
			pawnScore *= h.passed;
		}

		pawnScore += moveScore + protectScore;

		if(((isThreatened && !isProtected) || (isEPThreatened && !isEPProtected))
				&& nextPlayer != c) {
			pawnScore = 0;
		}

		if(debug) {
			System.out.println("L M R: " + enemyOnFileL + " " + enemyOnFile
					+ " " + enemyOnFileR);
			System.out.println("moveScore: " + moveScore);
			System.out.println("protectScore: " + protectScore);
			System.out.println("pawnScore: " + pawnScore);
			System.out.println("isThreatened: " + isThreatened);
			System.out.println("isProtected: " + isProtected);
			System.out.println("isEPThreatened: " + isEPThreatened);
			System.out.println("isEPProtected: " + isEPProtected);
		}

		return pawnScore;
	}
}


text: Hello World!


text:
var personalForm,loanForm;
angular.element(document).ready(function(){
   		 angular.bootstrap(document,['App']);

   		 personalForm = new varienForm('personal_form');
   		 loanForm = new varienForm('loan_form');
});

var app = angular.module('App',['angular.filter']);
app.controller('LoanApplicationController',function($scope,$rootScope){

	$scope.reasonCategory = reasonCategory;
	$scope.durationOptions = durationOptions;

	$rootScope.$on('account.success',function(){
		console.log('sending.loan');

		$scope.loan.account_id = $rootScope.account.id;
		$scope.loan.status = -1;

		new Ajax.Request($('loan_form').action,{
			method: 'post',
			parameters: $scope.loan,
			onComplete: function(res){
				if( !res.responseJSON.success){
					alert( res.responseJSON.error_msg.join('\n') );
				}else{

					console.log('loan.success');
					window.location.replace( $rootScope.redirect );
				}
			},
			onFailure: function(){
				console.log('loan.fail');
			}
		});
	});

	$scope.setDurationInterest = function(){
		$scope.loan.interest = $scope.selectedDuration.interest;
		$scope.loan.duration = $scope.selectedDuration.duration_length + ' ' + $scope.selectedDuration.duration_unit;
	}

});

app.controller('PersonalDetailsController',function($scope,$rootScope){

	$scope.save = function(){
		if( loanForm.validator.validate() && personalForm.validator.validate()   ){

			if(!$rootScope.account){
				new Ajax.Request($('personal_form').action,{
					method: 'post',
					parameters: $scope.account,
					onComplete: function(res){

						if(!res.responseJSON.success){
							alert(res.responseJSON.error_msg.join('\n'));
						}else{
							$rootScope.account = res.responseJSON.data;
							$rootScope.redirect = res.responseJSON.redirect;
							$rootScope.$broadcast('account.success');
							console.log('account.success');
						}

					},
					onFailure: function(){
						console.log('account.fail');
					}
				});
			}else{
				$rootScope.$broadcast('account.success');
			}

		}
	}
});


text:
namespace Packets
{
    class CGPlayerShopDesc : public Packet
    {
    public:
        CGPlayerShopDesc( )
        {
            m_PlayerShopDescSize = 0;
            memset(m_PlayerShopDesc, 0, MAX_SHOP_DESC_SIZE);
        }
        virtual ~CGPlayerShopDesc( ){};

        //公用继承接口
        virtual BOOL            Read( SocketInputStream& iStream ) ;
        virtual BOOL            Write( SocketOutputStream& oStream )const ;
        virtual UINT            Execute( Player* pPlayer ) ;

        virtual PacketID_t        GetPacketID()const { return PACKET_CG_PLAYERSHOPDESC; }
        virtual UINT            GetPacketSize()const { return    sizeof(BYTE) +
                                                                sizeof(_PLAYERSHOP_GUID) +
                                                                sizeof(CHAR)*m_PlayerShopDescSize;}

        _PLAYERSHOP_GUID        GetShopID(VOID) const {return m_ShopID;}
        VOID                    SetShopID(_PLAYERSHOP_GUID nShopID) {m_ShopID = nShopID;}

        VOID                    SetPlayerShopDescSize( BYTE bSize ){ m_PlayerShopDescSize = bSize ; } ;
        BYTE                    GetPlayerShopDescSize( ){ return m_PlayerShopDescSize ; } ;

        VOID                    SetPlayerShopDesc( CHAR* pName ){
            strncpy( m_PlayerShopDesc, pName, MAX_SHOP_DESC_SIZE-1 ) ;
            m_PlayerShopDesc[MAX_SHOP_DESC_SIZE-1] = 0 ;
            m_PlayerShopDescSize = (BYTE)strlen(m_PlayerShopDesc); //矫正长度
        };
        CHAR*                    GetPlayerShopDesc(){ return (CHAR*)m_PlayerShopDesc; } ;

    private:
        _PLAYERSHOP_GUID        m_ShopID;            //商店ID
        BYTE                    m_PlayerShopDescSize;
        CHAR                    m_PlayerShopDesc[MAX_SHOP_DESC_SIZE];
    };

    class CGPlayerShopDescFactory : public PacketFactory
    {
    public:
        Packet*        CreatePacket() { return new CGPlayerShopDesc() ; }
        PacketID_t    GetPacketID()const { return PACKET_CG_PLAYERSHOPDESC; };
        UINT        GetPacketMaxSize()const { return    sizeof(BYTE) +
                                                        sizeof(_PLAYERSHOP_GUID) +
                                                        sizeof(CHAR)*MAX_SHOP_DESC_SIZE;};
    };

    class CGPlayerShopDescHandler
    {
    public:
        static UINT Execute( CGPlayerShopDesc* pPacket, Player* pPlayer ) ;
    };
}

using namespace Packets;

#endif


text:
import PropTypes from 'prop-types';

import assert from 'assert';

import objectToGetParams from './utils/objectToGetParams';
import createShareButton from './utils/createShareButton';

function redditLink(url, _ref) {
  var title = _ref.title;

  assert(url, 'reddit.url');

  return 'https://www.reddit.com/submit' + objectToGetParams({
    url: url,
    title: title
  });
}

var RedditShareButton = createShareButton('reddit', redditLink, function (props) {
  return {
    title: props.title
  };
}, {
  title: PropTypes.string
}, {
  windowWidth: 660,
  windowHeight: 460
});

export default RedditShareButton;


text:
using System;
using System.Reactive.Linq;
using System.Threading.Tasks;

using Naru.RX;
using Naru.TPL;
using Naru.WPF.Scheduler;

namespace Naru.WPF.ViewModel
{
    public class BusyViewModel : ViewModel, IBusyViewModel
    {
        private readonly IDispatcherSchedulerProvider _scheduler;
        private readonly BusyLatch _busyLatch = new BusyLatch();

        #region IsActive

        private readonly ObservableProperty<bool> _isActive = new ObservableProperty<bool>();

        public bool IsActive
        {
            get { return _isActive.Value; }
            private set { _isActive.RaiseAndSetIfChanged(value); }
        }

        public IObservable<bool> IsActiveChanged
        {
            get { return _isActive.ValueChanged.DistinctUntilChanged(); }
        }

        #endregion

        #region Message

        private readonly ObservableProperty<string> _message = new ObservableProperty<string>();

        public string Message
        {
            get { return _message.Value; }
            private set { _message.RaiseAndSetIfChanged(value); }
        }

        #endregion

        public BusyLatch BusyLatch
        {
            get { return _busyLatch; }
        }

        public BusyViewModel(IDispatcherSchedulerProvider scheduler)
        {
            _scheduler = scheduler;

            _isActive.ConnectINPCProperty(this, () => IsActive, scheduler).AddDisposable(Disposables);
            _message.ConnectINPCProperty(this, () => Message, scheduler).AddDisposable(Disposables);

            _busyLatch.AddDisposable(Disposables);
            _busyLatch.IsActive.Subscribe(x => IsActive = x);
        }

        public void Active(string message)
        {
            IsActive = true;
            Message = message;
        }

        public void InActive()
        {
            IsActive = false;
            Message = string.Empty;
        }

        public Task ActiveAsync(string message)
        {
            return Task.Factory.StartNew(() => Active(message), _scheduler.Dispatcher.TPL);
        }

        public Task InActiveAsync()
        {
            return Task.Factory.StartNew(() => InActive(), _scheduler.Dispatcher.TPL);
        }

        public void Dispose()
        {
            Disposables.Dispose();
        }
    }
}


text:
package org.jkiss.dbeaver.ui.editors.entity.properties;

import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jface.viewers.ISelectionProvider;
import org.eclipse.swt.events.DisposeEvent;
import org.eclipse.swt.events.DisposeListener;
import org.eclipse.swt.events.FocusEvent;
import org.eclipse.swt.events.FocusListener;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.ui.*;
import org.eclipse.ui.internal.services.INestable;
import org.eclipse.ui.part.MultiPageEditorPart;
import org.eclipse.ui.part.MultiPageEditorSite;
import org.jkiss.code.NotNull;
import org.jkiss.dbeaver.Log;
import org.jkiss.dbeaver.runtime.DBWorkbench;
import org.jkiss.dbeaver.ui.*;
import org.jkiss.dbeaver.ui.INestedEditorSite;
import org.jkiss.dbeaver.ui.controls.folders.TabbedFolderPage;
import org.jkiss.dbeaver.ui.editors.*;
import org.jkiss.dbeaver.ui.editors.entity.EntityEditorDescriptor;

/**
 * EditorWrapperSection
 */
public class TabbedFolderPageEditor extends TabbedFolderPage implements IDatabaseEditorContributorUser, ISaveablePart, IRefreshablePart, IAdaptable {

    private static final Log log = Log.getLog(TabbedFolderPageEditor.class);

    private IDatabaseEditor mainEditor;
    private EntityEditorDescriptor editorDescriptor;
    private IEditorPart editor;
    private IEditorActionBarContributor actionContributor;
    private IEditorSite nestedEditorSite;

    public TabbedFolderPageEditor(IDatabaseEditor mainEditor, EntityEditorDescriptor editorDescriptor) {
        this.mainEditor = mainEditor;
        this.editorDescriptor = editorDescriptor;
    }

    public IEditorPart getEditor() {
        return editor;
    }

    @Override
    public void createControl(Composite parent) {
        editor = editorDescriptor.createEditor();

        final IWorkbenchPartSite ownerSite = this.mainEditor.getSite();
        if (ownerSite instanceof MultiPageEditorSite) {
            final MultiPageEditorPart ownerMultiPageEditor = ((MultiPageEditorSite) ownerSite).getMultiPageEditor();
            nestedEditorSite = new TabbedFolderPageEditorSite(ownerMultiPageEditor, editor);

            // Add property change forwarding
            // We need it to tell owner editor about dirty state change
            if (ownerMultiPageEditor instanceof IPropertyChangeReflector) {
                editor.addPropertyListener(new IPropertyListener() {
                    @Override
                    public void propertyChanged(Object source, int propId) {
                        ((IPropertyChangeReflector) ownerMultiPageEditor).handlePropertyChange(propId);
                    }
                });
            }

        } else {
            nestedEditorSite = new SubEditorSite(mainEditor.getEditorSite());
        }

        try {
            IEditorInput editorInput = mainEditor.getEditorInput();
            if (editorInput instanceof IDatabaseEditorInput) {
                editorInput = editorDescriptor.getNestedEditorInput((IDatabaseEditorInput)editorInput);
            }
            editor.init(nestedEditorSite, editorInput);
        } catch (PartInitException e) {
            DBWorkbench.getPlatformUI().showError("Create SQL viewer", null, e);
        }
        editor.createPartControl(parent);

        if (editor instanceof ISingleControlEditor) {
            // Use focus to active selection provider and contributed actions
            Control editorControl = ((ISingleControlEditor) editor).getEditorControl();
            assert editorControl != null;
            editorControl.addFocusListener(new FocusListener() {
                @Override
                public void focusGained(FocusEvent e) {
                    ISelectionProvider selectionProvider = editor.getSite().getSelectionProvider();
                    mainEditor.getSite().setSelectionProvider(selectionProvider);
                    //selectionProvider.setSelection(selectionProvider.getSelection());

                    if (actionContributor != null) {
                        actionContributor.setActiveEditor(editor);
                    }
                    activateNestedSite(true);
                }

                @Override
                public void focusLost(FocusEvent e) {
                    activateNestedSite(false);
                    if (actionContributor != null) {
                        actionContributor.setActiveEditor(null);
                    }
                }
            });
        }

        parent.addDisposeListener(new DisposeListener() {
            @Override
            public void widgetDisposed(DisposeEvent e) {
                if (editor != null) {
                    editor.dispose();
                    editor = null;
                }
            }
        });
    }

    @Override
    public void dispose() {
        if (nestedEditorSite instanceof MultiPageEditorSite) {
            ((MultiPageEditorSite) nestedEditorSite).dispose();
            nestedEditorSite = null;
        }
        super.dispose();
    }

    @Override
    public void setFocus() {
        editor.setFocus();
    }

    @Override
    public void aboutToBeShown() {
        if (editor instanceof IActiveWorkbenchPart) {
            ((IActiveWorkbenchPart) editor).activatePart();
        }
    }

    @Override
    public void aboutToBeHidden() {
        if (editor instanceof IActiveWorkbenchPart) {
            ((IActiveWorkbenchPart) editor).deactivatePart();
        }
    }

    @SuppressWarnings("deprecation")
    private void activateNestedSite(boolean activate) {
        if (nestedEditorSite instanceof INestable) {
            if (activate) {
                ((INestable) nestedEditorSite).activate();
            } else {
                ((INestable) nestedEditorSite).deactivate();
            }
        }
        if (nestedEditorSite instanceof MultiPageEditorSite) {
            final IKeyBindingService keyBindingService = ((MultiPageEditorSite) nestedEditorSite).getMultiPageEditor().getEditorSite()
                .getKeyBindingService();
            if (keyBindingService instanceof INestableKeyBindingService) {
                ((INestableKeyBindingService) keyBindingService).activateKeyBindingService(activate ? nestedEditorSite : null);
            }
        }
    }

    @Override
    public void refreshPart(Object source, boolean force) {
        if (editor instanceof IRefreshablePart) {
            ((IRefreshablePart) editor).refreshPart(source, force);
        }
        // Reload sources
//        if (editor instanceof IReusableEditor) {
//            ((IReusableEditor) editor).setInput(editorDescriptor.getNestedEditorInput(mainEditor.getEditorInput()));
//        }
    }

    @Override
    public <T> T getAdapter(Class<T> adapter) {
        if (editor != null) {
            if (adapter.isAssignableFrom(editor.getClass())) {
                return adapter.cast(editor);
            } else {
                return editor.getAdapter(adapter);
            }
        }
        return null;
    }

    @Override
    public IEditorActionBarContributor getContributor(IDatabaseEditorContributorManager manager) {
        Class<? extends IEditorActionBarContributor> contributorClass = editorDescriptor.getContributorClass();
        if (contributorClass == null) {
            return null;
        }
        this.actionContributor = manager.getContributor(contributorClass);
        if (this.actionContributor == null) {
            try {
                this.actionContributor = contributorClass.newInstance();
            } catch (Exception e) {
                log.error(e);
            }
        }
        return this.actionContributor;
    }

    @Override
    public void doSave(IProgressMonitor monitor) {
        if (editor != null) {
            editor.doSave(monitor);
        }
    }

    @Override
    public void doSaveAs() {
        if (editor != null) {
            editor.doSaveAs();
        }
    }

    @Override
    public boolean isDirty() {
        return editor != null && editor.isDirty();
    }

    @Override
    public boolean isSaveAsAllowed() {
        return editor != null && editor.isSaveAsAllowed();
    }

    @Override
    public boolean isSaveOnCloseNeeded() {
        return editor != null && editor.isSaveOnCloseNeeded();
    }

    private class TabbedFolderPageEditorSite extends MultiPageEditorSite implements INestedEditorSite {

        public TabbedFolderPageEditorSite(MultiPageEditorPart multiPageEditor, IEditorPart editor) {
            super(multiPageEditor, editor);
        }

        @Override
        public String getId() {
            String id = editorDescriptor.getId();
            return id;
        }

        @NotNull
        @Override
        public IEditorPart getFolderEditor() {
            return mainEditor;
        }
    }

}


text:
require 'spec_helper'

describe Disqussion::Trends do
  Disqussion::Configuration::VALID_FORMATS.each do |format|
    context ".new(:format => '#{format}')" do
      before do
        @client = Disqussion::Client.trends
      end

      describe ".listTreads" do
        before do
          stub_get("trends/listTreads.json", :query => { }).
            to_return(:body => fixture("trends/listTreads.json"), :headers => {:content_type => "application/json; charset=utf-8"})
        end

        it "returns the list of trending threads." do
          @client.listTreads
          a_get("trends/listTreads.json", :query => { }).
            should have_been_made
        end
      end
    end
  end
end


text:
/* ========================================================================== */
/* === Include/cholmod_config.h ============================================= */
/* ========================================================================== */

/* -----------------------------------------------------------------------------
 * CHOLMOD/Include/cholmod_config.h.
 * Copyright (C) 2005-2013, Univ. of Florida.  Author: Timothy A. Davis
 * -------------------------------------------------------------------------- */

/* CHOLMOD configuration file, for inclusion in user programs.
 *
 * You do not have to edit any CHOLMOD files to compile and install CHOLMOD.
 * However, if you do not use all of CHOLMOD's modules, you need to compile
 * with the appropriate flag, or edit this file to add the appropriate #define.
 *
 * Compiler flags for CHOLMOD:
 *
 * -DNCHECK	    do not include the Check module.
 * -DNCHOLESKY	    do not include the Cholesky module.
 * -DNPARTITION	    do not include the Partition module.
 * -DNCAMD          do not include the interfaces to CAMD,
 *                  CCOLAMD, CSYMAND in Partition module.
 * -DNMATRIXOPS	    do not include the MatrixOps module.
 * -DNMODIFY	    do not include the Modify module.
 * -DNSUPERNODAL    do not include the Supernodal module.
 *
 * -DNPRINT	    do not print anything
 *
 * -D'LONGBLAS=long' or -DLONGBLAS='long long' defines the integers used by
 *		    LAPACK and the BLAS.  Use LONGBLAS=long on Solaris to use
 *		    the 64-bit Sun Performance BLAS in cholmod_l_* routines.
 *		    You may need to use -D'LONGBLAS=long long' on the SGI
 *		    (this is not tested).
 *
 * -DNSUNPERF	    for Solaris only.  If defined, do not use the Sun
 *		    Performance Library.  The default is to use SunPerf.
 *		    You must compile CHOLMOD with -xlic_lib=sunperf.
 *
 * The Core Module is always included in the CHOLMOD library.
 */

#ifndef CHOLMOD_CONFIG_H
#define CHOLMOD_CONFIG_H

/* Use the compiler flag, or uncomment the definition(s), if you want to use
 * one or more non-default installation options: */

/*
#define NCHECK
#define NCHOLESKY
#define NCAMD
#define NPARTITION

#define NMATRIXOPS
#define NMODIFY
#define NSUPERNODAL

#define NPRINT

#define LONGBLAS long
#define LONGBLAS long long
#define NSUNPERF
*/

/* The option disables the MatrixOps, Modify, and Supernodal modules.  The
    existence of this #define here, and its use in these 3 modules, does not
    affect the license itself; see CHOLMOD/Doc/License.txt for your actual
    license.
 */
#ifdef NGPL
#define NMATRIXOPS
#define NMODIFY
#define NSUPERNODAL
#endif

#endif


text:
{% extends "multiseek/base.html" %}

{% load i18n %}

{% block extrahead %}
    {{ block.super }}
    {% include "multiseek/multiseek_head.html" %}
{% endblock %}

{% block title %}
    {% trans "Multiseek" %}
{% endblock %}

{% block content %}

PLEASE INSTALL JQUERY

    {% include "multiseek/multiseek_fields.html" %}
    {% include "multiseek/multiseek_report_types.html" %}
    {% include "multiseek/multiseek_ordering.html" %}
    {% include "multiseek/multiseek_buttons.html" %}
    {% include "multiseek/multiseek_results_frame.html" %}
{% endblock %}


text:
$(function(){
    var submitButton = $('#tinkerButton');
    var inputBox = $('#tinkerInput');
    var results = $('#tinkerResults');

    var starterTemplate = {
        "fathers|5-10": [{
            "married|0-1": true,
                "name": "@MALE_FIRST_NAME @LAST_NAME",
                "sons": null,
                "daughters|0-3": [{
                "age|0-31": 0,
                    "name": "@FEMALE_FIRST_NAME"
            }]
        }]
    };

    inputBox.val(JSON.stringify(starterTemplate, undefined, 2));

    var getIt = function() {
        var input = JSON.parse(inputBox.val());
        $.ajax({
            url: '/',
            type: 'POST',
            dataType: 'json',
            contentType: "application/json; charset=utf-8",
            data: JSON.stringify({ template: input }),
            success: function (response) {
                console.log(response);
                results.val(JSON.stringify(response, undefined, 2));
            }
        });
    };

    submitButton.click(getIt);
    getIt();
});


text:
package types

import (
	"go/ast"
	"go/token"
)

// isTerminating reports if s is a terminating statement.
// If s is labeled, label is the label name; otherwise s
// is "".
func (check *Checker) isTerminating(s ast.Stmt, label string) bool {
	switch s := s.(type) {
	default:
		unreachable()

	case *ast.BadStmt, *ast.DeclStmt, *ast.EmptyStmt, *ast.SendStmt,
		*ast.IncDecStmt, *ast.AssignStmt, *ast.GoStmt, *ast.DeferStmt,
		*ast.RangeStmt:
		// no chance

	case *ast.LabeledStmt:
		return check.isTerminating(s.Stmt, s.Label.Name)

	case *ast.ExprStmt:
		// the predeclared (possibly parenthesized) panic() function is terminating
		if call, _ := unparen(s.X).(*ast.CallExpr); call != nil {
			if id, _ := call.Fun.(*ast.Ident); id != nil {
				if _, obj := check.scope.LookupParent(id.Name, token.NoPos); obj != nil {
					if b, _ := obj.(*Builtin); b != nil && b.id == _Panic {
						return true
					}
				}
			}
		}

	case *ast.ReturnStmt:
		return true

	case *ast.BranchStmt:
		if s.Tok == token.GOTO || s.Tok == token.FALLTHROUGH {
			return true
		}

	case *ast.BlockStmt:
		return check.isTerminatingList(s.List, "")

	case *ast.IfStmt:
		if s.Else != nil &&
			check.isTerminating(s.Body, "") &&
			check.isTerminating(s.Else, "") {
			return true
		}

	case *ast.SwitchStmt:
		return check.isTerminatingSwitch(s.Body, label)

	case *ast.TypeSwitchStmt:
		return check.isTerminatingSwitch(s.Body, label)

	case *ast.SelectStmt:
		for _, s := range s.Body.List {
			cc := s.(*ast.CommClause)
			if !check.isTerminatingList(cc.Body, "") || hasBreakList(cc.Body, label, true) {
				return false
			}

		}
		return true

	case *ast.ForStmt:
		if s.Cond == nil && !hasBreak(s.Body, label, true) {
			return true
		}
	}

	return false
}

func (check *Checker) isTerminatingList(list []ast.Stmt, label string) bool {
	// trailing empty statements are permitted - skip them
	for i := len(list) - 1; i >= 0; i-- {
		if _, ok := list[i].(*ast.EmptyStmt); !ok {
			return check.isTerminating(list[i], label)
		}
	}
	return false // all statements are empty
}

func (check *Checker) isTerminatingSwitch(body *ast.BlockStmt, label string) bool {
	hasDefault := false
	for _, s := range body.List {
		cc := s.(*ast.CaseClause)
		if cc.List == nil {
			hasDefault = true
		}
		if !check.isTerminatingList(cc.Body, "") || hasBreakList(cc.Body, label, true) {
			return false
		}
	}
	return hasDefault
}

// TODO(gri) For nested breakable statements, the current implementation of hasBreak
//	     will traverse the same subtree repeatedly, once for each label. Replace
//           with a single-pass label/break matching phase.

// hasBreak reports if s is or contains a break statement
// referring to the label-ed statement or implicit-ly the
// closest outer breakable statement.
func hasBreak(s ast.Stmt, label string, implicit bool) bool {
	switch s := s.(type) {
	default:
		unreachable()

	case *ast.BadStmt, *ast.DeclStmt, *ast.EmptyStmt, *ast.ExprStmt,
		*ast.SendStmt, *ast.IncDecStmt, *ast.AssignStmt, *ast.GoStmt,
		*ast.DeferStmt, *ast.ReturnStmt:
		// no chance

	case *ast.LabeledStmt:
		return hasBreak(s.Stmt, label, implicit)

	case *ast.BranchStmt:
		if s.Tok == token.BREAK {
			if s.Label == nil {
				return implicit
			}
			if s.Label.Name == label {
				return true
			}
		}

	case *ast.BlockStmt:
		return hasBreakList(s.List, label, implicit)

	case *ast.IfStmt:
		if hasBreak(s.Body, label, implicit) ||
			s.Else != nil && hasBreak(s.Else, label, implicit) {
			return true
		}

	case *ast.CaseClause:
		return hasBreakList(s.Body, label, implicit)

	case *ast.SwitchStmt:
		if label != "" && hasBreak(s.Body, label, false) {
			return true
		}

	case *ast.TypeSwitchStmt:
		if label != "" && hasBreak(s.Body, label, false) {
			return true
		}

	case *ast.CommClause:
		return hasBreakList(s.Body, label, implicit)

	case *ast.SelectStmt:
		if label != "" && hasBreak(s.Body, label, false) {
			return true
		}

	case *ast.ForStmt:
		if label != "" && hasBreak(s.Body, label, false) {
			return true
		}

	case *ast.RangeStmt:
		if label != "" && hasBreak(s.Body, label, false) {
			return true
		}
	}

	return false
}

func hasBreakList(list []ast.Stmt, label string, implicit bool) bool {
	for _, s := range list {
		if hasBreak(s, label, implicit) {
			return true
		}
	}
	return false
}


text:
<!DOCTYPE html>

    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta charset="utf-8">
    <title>progress bar like YouTube</title>

    <input id="js-start-button" type="button" value="start">


text:
namespace FluentAssemblyScanner.Tests.SpecClasses
{
    [Multitenant]
    public class Product
    {
    }
}


text:
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
module Events where

import Prelude hiding (id)
import DataSource (defineTable)

$(defineTable
    []
    "hatohol" "events" [])


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<TITLE
>Installation Procedure</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
REV="MADE"
HREF="mailto:pgsql-docs@postgresql.org"><LINK
REL="HOME"
TITLE="PostgreSQL 9.2.8 Documentation"
HREF="index.html"><LINK
REL="UP"
TITLE="  Installation from Source Code"
HREF="installation.html"><LINK
REL="PREVIOUS"
TITLE="Getting The Source"
HREF="install-getsource.html"><LINK
REL="NEXT"
TITLE="Post-Installation Setup"
HREF="install-post.html"><LINK
REL="STYLESHEET"
TYPE="text/css"
HREF="stylesheet.css"><META
HTTP-EQUIV="Content-Type"
CONTENT="text/html; charset=ISO-8859-1"><META
NAME="creation"
CONTENT="2014-03-17T19:46:29">

PostgreSQL 9.2.8 Documentation

Prev	Up	Chapter 15. Installation from Source Code	Next

15.4. Installation Procedure

Configuration

    The first step of the installation procedure is to configure the
    source tree for your system and choose the options you would like.
    This is done by running the <TT
CLASS="FILENAME"
>configure</TT
> script. For a
    default installation simply enter:

./configure

    This script will run a number of tests to determine values for various
    system dependent variables and detect any quirks of your
    operating system, and finally will create several files in the
    build tree to record what it found.  You can also run
    <TT
CLASS="FILENAME"
>configure</TT
> in a directory outside the source
    tree, if you want to keep the build directory separate.  This
    procedure is also called a
    VPATH
    build.  Here's how:

mkdir build_dir
cd build_dir
/path/to/source/tree/configure [options go here]
gmake

    The default configuration will build the server and utilities, as
    well as all client applications and interfaces that require only a
    C compiler. All files will be installed under
    <TT
CLASS="FILENAME"
>/usr/local/pgsql</TT
> by default.

    You can customize the build and installation process by supplying one
    or more of the following command line options to
    <TT
CLASS="FILENAME"
>configure</TT
>:

<TT
CLASS="OPTION"
>--prefix=<TT
CLASS="REPLACEABLE"
>PREFIX</TT
></TT
>

         Install all files under the directory <TT
CLASS="REPLACEABLE"
>PREFIX</TT
>
         instead of <TT
CLASS="FILENAME"
>/usr/local/pgsql</TT
>. The actual
         files will be installed into various subdirectories; no files
         will ever be installed directly into the
         <TT
CLASS="REPLACEABLE"
>PREFIX</TT
> directory.

         If you have special needs, you can also customize the
         individual subdirectories with the following options. However,
         if you leave these with their defaults, the installation will be
         relocatable, meaning you can move the directory after
         installation. (The <TT
CLASS="LITERAL"
>man</TT
> and <TT
CLASS="LITERAL"
>doc</TT
>
         locations are not affected by this.)

         For relocatable installs, you might want to use
         <TT
CLASS="FILENAME"
>configure</TT
>'s <TT
CLASS="LITERAL"
>--disable-rpath</TT
>
         option.  Also, you will need to tell the operating system how
         to find the shared libraries.

<TT
CLASS="OPTION"
>--exec-prefix=<TT
CLASS="REPLACEABLE"
>EXEC-PREFIX</TT
></TT
>

         You can install architecture-dependent files under a
         different prefix, <TT
CLASS="REPLACEABLE"
>EXEC-PREFIX</TT
>, than what
         <TT
CLASS="REPLACEABLE"
>PREFIX</TT
> was set to. This can be useful to
         share architecture-independent files between hosts. If you
         omit this, then <TT
CLASS="REPLACEABLE"
>EXEC-PREFIX</TT
> is set equal to
         <TT
CLASS="REPLACEABLE"
>PREFIX</TT
> and both architecture-dependent and
         independent files will be installed under the same tree,
         which is probably what you want.

<TT
CLASS="OPTION"
>--bindir=<TT
CLASS="REPLACEABLE"
>DIRECTORY</TT
></TT
>

         Specifies the directory for executable programs. The default
         is <TT
CLASS="FILENAME"
><TT
CLASS="REPLACEABLE"
>EXEC-PREFIX</TT
>/bin</TT
>, which
         normally means <TT
CLASS="FILENAME"
>/usr/local/pgsql/bin</TT
>.

<TT
CLASS="OPTION"
>--sysconfdir=<TT
CLASS="REPLACEABLE"
>DIRECTORY</TT
></TT
>

         Sets the directory for various configuration files,
         <TT
CLASS="FILENAME"
><TT
CLASS="REPLACEABLE"
>PREFIX</TT
>/etc</TT
> by default.

<TT
CLASS="OPTION"
>--libdir=<TT
CLASS="REPLACEABLE"
>DIRECTORY</TT
></TT
>

         Sets the location to install libraries and dynamically loadable
         modules. The default is
         <TT
CLASS="FILENAME"
><TT
CLASS="REPLACEABLE"
>EXEC-PREFIX</TT
>/lib</TT
>.

<TT
CLASS="OPTION"
>--includedir=<TT
CLASS="REPLACEABLE"
>DIRECTORY</TT
></TT
>

         Sets the directory for installing C and C++ header files. The
         default is <TT
CLASS="FILENAME"
><TT
CLASS="REPLACEABLE"
>PREFIX</TT
>/include</TT
>.

<TT
CLASS="OPTION"
>--datarootdir=<TT
CLASS="REPLACEABLE"
>DIRECTORY</TT
></TT
>

         Sets the root directory for various types of read-only data
         files.  This only sets the default for some of the following
         options.  The default is
         <TT
CLASS="FILENAME"
><TT
CLASS="REPLACEABLE"
>PREFIX</TT
>/share</TT
>.

<TT
CLASS="OPTION"
>--datadir=<TT
CLASS="REPLACEABLE"
>DIRECTORY</TT
></TT
>

         Sets the directory for read-only data files used by the
         installed programs. The default is
         <TT
CLASS="FILENAME"
><TT
CLASS="REPLACEABLE"
>DATAROOTDIR</TT
></TT
>. Note that this has
         nothing to do with where your database files will be placed.

<TT
CLASS="OPTION"
>--localedir=<TT
CLASS="REPLACEABLE"
>DIRECTORY</TT
></TT
>

         Sets the directory for installing locale data, in particular
         message translation catalog files.  The default is
         <TT
CLASS="FILENAME"
><TT
CLASS="REPLACEABLE"
>DATAROOTDIR</TT
>/locale</TT
>.

<TT
CLASS="OPTION"
>--mandir=<TT
CLASS="REPLACEABLE"
>DIRECTORY</TT
></TT
>

         The man pages that come with PostgreSQL will be installed under
         this directory, in their respective
         <TT
CLASS="FILENAME"
>man<TT
CLASS="REPLACEABLE"
>x</TT
></TT
> subdirectories.
         The default is <TT
CLASS="FILENAME"
><TT
CLASS="REPLACEABLE"
>DATAROOTDIR</TT
>/man</TT
>.

<TT
CLASS="OPTION"
>--docdir=<TT
CLASS="REPLACEABLE"
>DIRECTORY</TT
></TT
>

         Sets the root directory for installing documentation files,
         except "man" pages.  This only sets the default for
         the following options.  The default value for this option is
         <TT
CLASS="FILENAME"
><TT
CLASS="REPLACEABLE"
>DATAROOTDIR</TT
>/doc/postgresql</TT
>.

<TT
CLASS="OPTION"
>--htmldir=<TT
CLASS="REPLACEABLE"
>DIRECTORY</TT
></TT
>

         The HTML-formatted documentation for
         PostgreSQL will be installed under
         this directory.  The default is
         <TT
CLASS="FILENAME"
><TT
CLASS="REPLACEABLE"
>DATAROOTDIR</TT
></TT
>.

Note:        Care has been taken to make it possible to install
       PostgreSQL into shared installation locations
       (such as <TT
CLASS="FILENAME"
>/usr/local/include</TT
>) without
       interfering with the namespace of the rest of the system. First,
       the string "<TT
CLASS="LITERAL"
>/postgresql</TT
>" is
       automatically appended to <TT
CLASS="VARNAME"
>datadir</TT
>,
       <TT
CLASS="VARNAME"
>sysconfdir</TT
>, and <TT
CLASS="VARNAME"
>docdir</TT
>,
       unless the fully expanded directory name already contains the
       string "<TT
CLASS="LITERAL"
>postgres</TT
>" or
       "<TT
CLASS="LITERAL"
>pgsql</TT
>". For example, if you choose
       <TT
CLASS="FILENAME"
>/usr/local</TT
> as prefix, the documentation will
       be installed in <TT
CLASS="FILENAME"
>/usr/local/doc/postgresql</TT
>,
       but if the prefix is <TT
CLASS="FILENAME"
>/opt/postgres</TT
>, then it
       will be in <TT
CLASS="FILENAME"
>/opt/postgres/doc</TT
>. The public C
       header files of the client interfaces are installed into
       <TT
CLASS="VARNAME"
>includedir</TT
> and are namespace-clean. The
       internal header files and the server header files are installed
       into private directories under <TT
CLASS="VARNAME"
>includedir</TT
>. See
       the documentation of each interface for information about how to
       access its header files. Finally, a private subdirectory will
       also be created, if appropriate, under <TT
CLASS="VARNAME"
>libdir</TT
>
       for dynamically loadable modules.

<TT
CLASS="OPTION"
>--with-includes=<TT
CLASS="REPLACEABLE"
>DIRECTORIES</TT
></TT
>

         <TT
CLASS="REPLACEABLE"
>DIRECTORIES</TT
> is a colon-separated list of
         directories that will be added to the list the compiler
         searches for header files. If you have optional packages
         (such as GNU Readline) installed in a non-standard
         location,
         you have to use this option and probably also the corresponding
         <TT
CLASS="OPTION"
>--with-libraries</TT
> option.

         Example: <TT
CLASS="LITERAL"
>--with-includes=/opt/gnu/include:/usr/sup/include</TT
>.

<TT
CLASS="OPTION"
>--with-libraries=<TT
CLASS="REPLACEABLE"
>DIRECTORIES</TT
></TT
>

         <TT
CLASS="REPLACEABLE"
>DIRECTORIES</TT
> is a colon-separated list of
         directories to search for libraries. You will probably have
         to use this option (and the corresponding
         <TT
CLASS="OPTION"
>--with-includes</TT
> option) if you have packages
         installed in non-standard locations.

         Example: <TT
CLASS="LITERAL"
>--with-libraries=/opt/gnu/lib:/usr/sup/lib</TT
>.

<TT
CLASS="OPTION"
>--enable-nls[=<TT
CLASS="REPLACEABLE"
>LANGUAGES</TT
>]</TT
>

         Enables Native Language Support (<ACRONYM
CLASS="ACRONYM"
>NLS</ACRONYM
>),
         that is, the ability to display a program's messages in a
         language other than English.
         <TT
CLASS="REPLACEABLE"
>LANGUAGES</TT
> is an optional space-separated
         list of codes of the languages that you want supported, for
         example <TT
CLASS="LITERAL"
>--enable-nls='de fr'</TT
>.  (The intersection
         between your list and the set of actually provided
         translations will be computed automatically.)  If you do not
         specify a list, then all available translations are
         installed.

         To use this option, you will need an implementation of the
         Gettext API; see above.

<TT
CLASS="OPTION"
>--with-pgport=<TT
CLASS="REPLACEABLE"
>NUMBER</TT
></TT
>

         Set <TT
CLASS="REPLACEABLE"
>NUMBER</TT
> as the default port number for
         server and clients. The default is 5432. The port can always
         be changed later on, but if you specify it here then both
         server and clients will have the same default compiled in,
         which can be very convenient.  Usually the only good reason
         to select a non-default value is if you intend to run multiple
         PostgreSQL servers on the same machine.

<TT
CLASS="OPTION"
>--with-perl</TT
>

         Build the PL/Perl server-side language.

<TT
CLASS="OPTION"
>--with-python</TT
>

         Build the PL/Python server-side language.

<TT
CLASS="OPTION"
>--with-tcl</TT
>

         Build the PL/Tcl server-side language.

<TT
CLASS="OPTION"
>--with-tclconfig=<TT
CLASS="REPLACEABLE"
>DIRECTORY</TT
></TT
>

         Tcl installs the file <TT
CLASS="FILENAME"
>tclConfig.sh</TT
>, which
         contains configuration information needed to build modules
         interfacing to Tcl. This file is normally found automatically
         at a well-known location, but if you want to use a different
         version of Tcl you can specify the directory in which to look
         for it.

<TT
CLASS="OPTION"
>--with-gssapi</TT
>

         Build with support for GSSAPI authentication. On many
         systems, the GSSAPI (usually a part of the Kerberos installation)
         system is not installed in a location
         that is searched by default (e.g., <TT
CLASS="FILENAME"
>/usr/include</TT
>,
         <TT
CLASS="FILENAME"
>/usr/lib</TT
>), so you must use the options
         <TT
CLASS="OPTION"
>--with-includes</TT
> and <TT
CLASS="OPTION"
>--with-libraries</TT
> in
         addition to this option.  <TT
CLASS="FILENAME"
>configure</TT
> will check
         for the required header files and libraries to make sure that
         your GSSAPI installation is sufficient before proceeding.

<TT
CLASS="OPTION"
>--with-krb5</TT
>

         Build with support for Kerberos 5 authentication. On many
         systems, the Kerberos system is not installed in a location
         that is searched by default (e.g., <TT
CLASS="FILENAME"
>/usr/include</TT
>,
         <TT
CLASS="FILENAME"
>/usr/lib</TT
>), so you must use the options
         <TT
CLASS="OPTION"
>--with-includes</TT
> and <TT
CLASS="OPTION"
>--with-libraries</TT
> in
         addition to this option.  <TT
CLASS="FILENAME"
>configure</TT
> will check
         for the required header files and libraries to make sure that
         your Kerberos installation is sufficient before proceeding.

<TT
CLASS="OPTION"
>--with-krb-srvnam=<TT
CLASS="REPLACEABLE"
>NAME</TT
></TT
>

         The default name of the Kerberos service principal (also used
         by GSSAPI).
         <TT
CLASS="LITERAL"
>postgres</TT
> is the default. There's usually no
         reason to change this unless you have a Windows environment,
         in which case it must be set to upper case
         <TT
CLASS="LITERAL"
>POSTGRES</TT
>.

<TT
CLASS="OPTION"
>--with-openssl</TT
>

         Build with support for <ACRONYM
CLASS="ACRONYM"
>SSL</ACRONYM
> (encrypted)
         connections. This requires the OpenSSL
         package to be installed.  <TT
CLASS="FILENAME"
>configure</TT
> will check
         for the required header files and libraries to make sure that
         your OpenSSL installation is sufficient
         before proceeding.

<TT
CLASS="OPTION"
>--with-pam</TT
>

         Build with <ACRONYM
CLASS="ACRONYM"
>PAM</ACRONYM
>
         (Pluggable Authentication Modules) support.

<TT
CLASS="OPTION"
>--with-ldap</TT
>

         Build with <ACRONYM
CLASS="ACRONYM"
>LDAP</ACRONYM
>
         support for authentication and connection parameter lookup (see
         Section 31.17 and
         Section 19.3.8 for more information). On Unix,
         this requires the OpenLDAP package to be
         installed. On Windows, the default WinLDAP
         library is used.  <TT
CLASS="FILENAME"
>configure</TT
> will check for the required
         header files and libraries to make sure that your
         OpenLDAP installation is sufficient before
         proceeding.

<TT
CLASS="OPTION"
>--without-readline</TT
>

         Prevents use of the Readline library
         (and libedit as well).  This option disables
         command-line editing and history in
         psql, so it is not recommended.

<TT
CLASS="OPTION"
>--with-libedit-preferred</TT
>

         Favors the use of the BSD-licensed libedit library
         rather than GPL-licensed Readline.  This option
         is significant only if you have both libraries installed; the
         default in that case is to use Readline.

<TT
CLASS="OPTION"
>--with-bonjour</TT
>

         Build with Bonjour support.  This requires Bonjour support
         in your operating system.  Recommended on Mac OS X.

<TT
CLASS="OPTION"
>--with-ossp-uuid</TT
>

         Build components using the OSSP UUID
         library.  Specifically, build the

         uuid-ossp module,
         which provides functions to generate
         UUIDs.

<TT
CLASS="OPTION"
>--with-libxml</TT
>

         Build with libxml (enables SQL/XML support).  Libxml version 2.6.23 or
         later is required for this feature.

         Libxml installs a program <TT
CLASS="COMMAND"
>xml2-config</TT
> that
         can be used to detect the required compiler and linker
         options.  PostgreSQL will use it automatically if found.  To
         specify a libxml installation at an unusual location, you can
         either set the environment variable
         <TT
CLASS="ENVAR"
>XML2_CONFIG</TT
> to point to the
         <TT
CLASS="COMMAND"
>xml2-config</TT
> program belonging to the
         installation, or use the options
         <TT
CLASS="OPTION"
>--with-includes</TT
> and
         <TT
CLASS="OPTION"
>--with-libraries</TT
>.

<TT
CLASS="OPTION"
>--with-libxslt</TT
>

         Use libxslt when building the

         xml2
         module.  xml2 relies on this library
         to perform XSL transformations of XML.

<TT
CLASS="OPTION"
>--disable-integer-datetimes</TT
>

         Disable support for 64-bit integer storage for timestamps and
         intervals, and store datetime values as floating-point
         numbers instead. Floating-point datetime storage was the
         default in PostgreSQL releases
         prior to 8.4, but it is now deprecated, because it does not
         support microsecond precision for the full range of
         <TT
CLASS="TYPE"
>timestamp</TT
> values. However, integer-based
         datetime storage requires a 64-bit integer type. Therefore,
         this option can be used when no such type is available, or
         for compatibility with applications written for prior
         versions of PostgreSQL. See

         Section 8.5
         for more information.

<TT
CLASS="OPTION"
>--disable-float4-byval</TT
>

         Disable passing float4 values "by value", causing them
         to be passed "by reference" instead.  This option costs
         performance, but may be needed for compatibility with old
         user-defined functions that are written in C and use the
         "version 0" calling convention.  A better long-term
         solution is to update any such functions to use the
         "version 1" calling convention.

<TT
CLASS="OPTION"
>--disable-float8-byval</TT
>

         Disable passing float8 values "by value", causing them
         to be passed "by reference" instead.  This option costs
         performance, but may be needed for compatibility with old
         user-defined functions that are written in C and use the
         "version 0" calling convention.  A better long-term
         solution is to update any such functions to use the
         "version 1" calling convention.
         Note that this option affects not only float8, but also int8 and some
         related types such as timestamp.
         On 32-bit platforms, <TT
CLASS="OPTION"
>--disable-float8-byval</TT
> is the default
         and it is not allowed to select <TT
CLASS="OPTION"
>--enable-float8-byval</TT
>.

<TT
CLASS="OPTION"
>--with-segsize=<TT
CLASS="REPLACEABLE"
>SEGSIZE</TT
></TT
>

         Set the segment size, in gigabytes.  Large tables are
         divided into multiple operating-system files, each of size equal
         to the segment size.  This avoids problems with file size limits
         that exist on many platforms.  The default segment size, 1 gigabyte,
         is safe on all supported platforms.  If your operating system has
         "largefile" support (which most do, nowadays), you can use
         a larger segment size.  This can be helpful to reduce the number of
         file descriptors consumed when working with very large tables.
         But be careful not to select a value larger than is supported
         by your platform and the file systems you intend to use.  Other
         tools you might wish to use, such as tar, could
         also set limits on the usable file size.
         It is recommended, though not absolutely required, that this value
         be a power of 2.
         Note that changing this value requires an initdb.

<TT
CLASS="OPTION"
>--with-blocksize=<TT
CLASS="REPLACEABLE"
>BLOCKSIZE</TT
></TT
>

         Set the block size, in kilobytes.  This is the unit
         of storage and I/O within tables.  The default, 8 kilobytes,
         is suitable for most situations; but other values may be useful
         in special cases.
         The value must be a power of 2 between 1 and 32 (kilobytes).
         Note that changing this value requires an initdb.

<TT
CLASS="OPTION"
>--with-wal-segsize=<TT
CLASS="REPLACEABLE"
>SEGSIZE</TT
></TT
>

         Set the WAL segment size, in megabytes.  This is
         the size of each individual file in the WAL log.  It may be useful
         to adjust this size to control the granularity of WAL log shipping.
         The default size is 16 megabytes.
         The value must be a power of 2 between 1 and 64 (megabytes).
         Note that changing this value requires an initdb.

<TT
CLASS="OPTION"
>--with-wal-blocksize=<TT
CLASS="REPLACEABLE"
>BLOCKSIZE</TT
></TT
>

         Set the WAL block size, in kilobytes.  This is the unit
         of storage and I/O within the WAL log.  The default, 8 kilobytes,
         is suitable for most situations; but other values may be useful
         in special cases.
         The value must be a power of 2 between 1 and 64 (kilobytes).
         Note that changing this value requires an initdb.

<TT
CLASS="OPTION"
>--disable-spinlocks</TT
>

         Allow the build to succeed even if PostgreSQL
         has no CPU spinlock support for the platform.  The lack of
         spinlock support will result in poor performance; therefore,
         this option should only be used if the build aborts and
         informs you that the platform lacks spinlock support. If this
         option is required to build PostgreSQL on
         your platform, please report the problem to the
         PostgreSQL developers.

<TT
CLASS="OPTION"
>--disable-thread-safety</TT
>

         Disable the thread-safety of client libraries.  This prevents
         concurrent threads in libpq and
         ECPG programs from safely controlling
         their private connection handles.

<TT
CLASS="OPTION"
>--with-system-tzdata=<TT
CLASS="REPLACEABLE"
>DIRECTORY</TT
></TT
>

         PostgreSQL includes its own time zone database,
         which it requires for date and time operations.  This time zone
         database is in fact compatible with the "zoneinfo" time zone
         database provided by many operating systems such as FreeBSD,
         Linux, and Solaris, so it would be redundant to install it again.
         When this option is used, the system-supplied time zone database
         in <TT
CLASS="REPLACEABLE"
>DIRECTORY</TT
> is used instead of the one
         included in the PostgreSQL source distribution.
         <TT
CLASS="REPLACEABLE"
>DIRECTORY</TT
> must be specified as an
         absolute path.  <TT
CLASS="FILENAME"
>/usr/share/zoneinfo</TT
> is a
         likely directory on some operating systems.  Note that the
         installation routine will not detect mismatching or erroneous time
         zone data.  If you use this option, you are advised to run the
         regression tests to verify that the time zone data you have
         pointed to works correctly with PostgreSQL.

         This option is mainly aimed at binary package distributors
         who know their target operating system well.  The main
         advantage of using this option is that the PostgreSQL package
         won't need to be upgraded whenever any of the many local
         daylight-saving time rules change.  Another advantage is that
         PostgreSQL can be cross-compiled more straightforwardly if the
         time zone database files do not need to be built during the
         installation.

<TT
CLASS="OPTION"
>--without-zlib</TT
>

         Prevents use of the Zlib library.  This disables
         support for compressed archives in pg_dump
         and pg_restore.
         This option is only intended for those rare systems where this
         library is not available.

<TT
CLASS="OPTION"
>--enable-debug</TT
>

         Compiles all programs and libraries with debugging symbols.
         This means that you can run the programs in a debugger
         to analyze problems. This enlarges the size of the installed
         executables considerably, and on non-GCC compilers it usually
         also disables compiler optimization, causing slowdowns. However,
         having the symbols available is extremely helpful for dealing
         with any problems that might arise.  Currently, this option is
         recommended for production installations only if you use GCC.
         But you should always have it on if you are doing development work
         or running a beta version.

<TT
CLASS="OPTION"
>--enable-coverage</TT
>

         If using GCC, all programs and libraries are compiled with
         code coverage testing instrumentation.  When run, they
         generate files in the build directory with code coverage
         metrics.
         See Section 30.4
         for more information. This option is for use only with GCC
         and when doing development work.

<TT
CLASS="OPTION"
>--enable-profiling</TT
>

         If using GCC, all programs and libraries are compiled so they
         can be profiled.  On backend exit, a subdirectory will be created
         that contains the <TT
CLASS="FILENAME"
>gmon.out</TT
> file for use in profiling.
         This option is for use only with GCC and when doing development work.

<TT
CLASS="OPTION"
>--enable-cassert</TT
>

         Enables assertion checks in the server, which test for
         many "cannot happen" conditions.  This is invaluable for
         code development purposes, but the tests can slow down the
         server significantly.
         Also, having the tests turned on won't necessarily enhance the
         stability of your server!  The assertion checks are not categorized
         for severity, and so what might be a relatively harmless bug will
         still lead to server restarts if it triggers an assertion
         failure.  This option is not recommended for production use, but
         you should have it on for development work or when running a beta
         version.

<TT
CLASS="OPTION"
>--enable-depend</TT
>

         Enables automatic dependency tracking.  With this option, the
         makefiles are set up so that all affected object files will
         be rebuilt when any header file is changed.  This is useful
         if you are doing development work, but is just wasted overhead
         if you intend only to compile once and install.  At present,
         this option only works with GCC.

<TT
CLASS="OPTION"
>--enable-dtrace</TT
>

         Compiles PostgreSQL with support for the
         dynamic tracing tool DTrace.
         See Section 27.4
         for more information.

         To point to the <TT
CLASS="COMMAND"
>dtrace</TT
> program, the
         environment variable <TT
CLASS="ENVAR"
>DTRACE</TT
> can be set.  This
         will often be necessary because <TT
CLASS="COMMAND"
>dtrace</TT
> is
         typically installed under <TT
CLASS="FILENAME"
>/usr/sbin</TT
>,
         which might not be in the path.

         Extra command-line options for the <TT
CLASS="COMMAND"
>dtrace</TT
> program
         can be specified in the environment variable
         <TT
CLASS="ENVAR"
>DTRACEFLAGS</TT
>.  On Solaris,
         to include DTrace support in a 64-bit binary, you must specify
         <TT
CLASS="LITERAL"
>DTRACEFLAGS="-64"</TT
> to configure.  For example,
         using the GCC compiler:

./configure CC='gcc -m64' --enable-dtrace DTRACEFLAGS='-64' ...

         Using Sun's compiler:

./configure CC='/opt/SUNWspro/bin/cc -xtarget=native64' --enable-dtrace DTRACEFLAGS='-64' ...

     If you prefer a C compiler different from the one
     <TT
CLASS="FILENAME"
>configure</TT
> picks, you can set the
     environment variable <TT
CLASS="ENVAR"
>CC</TT
> to the program of your choice.
     By default, <TT
CLASS="FILENAME"
>configure</TT
> will pick
     <TT
CLASS="FILENAME"
>gcc</TT
> if available, else the platform's
     default (usually <TT
CLASS="FILENAME"
>cc</TT
>).  Similarly, you can override the
     default compiler flags if needed with the <TT
CLASS="ENVAR"
>CFLAGS</TT
> variable.

     You can specify environment variables on the
     <TT
CLASS="FILENAME"
>configure</TT
> command line, for example:

./configure CC=/opt/bin/gcc CFLAGS='-O2 -pipe'

     Here is a list of the significant variables that can be set in
     this manner:

<TT
CLASS="ENVAR"
>BISON</TT
>

         Bison program

<TT
CLASS="ENVAR"
>CC</TT
>

         C compiler

<TT
CLASS="ENVAR"
>CFLAGS</TT
>

         options to pass to the C compiler

<TT
CLASS="ENVAR"
>CPP</TT
>

         C preprocessor

<TT
CLASS="ENVAR"
>CPPFLAGS</TT
>

         options to pass to the C preprocessor

<TT
CLASS="ENVAR"
>DTRACE</TT
>

         location of the <TT
CLASS="COMMAND"
>dtrace</TT
> program

<TT
CLASS="ENVAR"
>DTRACEFLAGS</TT
>

         options to pass to the <TT
CLASS="COMMAND"
>dtrace</TT
> program

<TT
CLASS="ENVAR"
>FLEX</TT
>

         Flex program

<TT
CLASS="ENVAR"
>LDFLAGS</TT
>

         options to use when linking either executables or shared libraries

<TT
CLASS="ENVAR"
>LDFLAGS_EX</TT
>

         additional options for linking executables only

<TT
CLASS="ENVAR"
>LDFLAGS_SL</TT
>

         additional options for linking shared libraries only

<TT
CLASS="ENVAR"
>MSGFMT</TT
>

         <TT
CLASS="COMMAND"
>msgfmt</TT
> program for native language support

<TT
CLASS="ENVAR"
>PERL</TT
>

         Full path to the Perl interpreter.  This will be used to
         determine the dependencies for building PL/Perl.

<TT
CLASS="ENVAR"
>PYTHON</TT
>

         Full path to the Python interpreter.  This will be used to
         determine the dependencies for building PL/Python.  Also,
         whether Python 2 or 3 is specified here (or otherwise
         implicitly chosen) determines which variant of the PL/Python
         language becomes available.  See

         Section 42.1
         for more information.

<TT
CLASS="ENVAR"
>TCLSH</TT
>

         Full path to the Tcl interpreter.  This will be used to
         determine the dependencies for building PL/Tcl, and it will
         be substituted into Tcl scripts.

<TT
CLASS="ENVAR"
>XML2_CONFIG</TT
>

         <TT
CLASS="COMMAND"
>xml2-config</TT
> program used to locate the
         libxml installation.

Note:       When developing code inside the server, it is recommended to
      use the configure options <TT
CLASS="OPTION"
>--enable-cassert</TT
> (which
      turns on many run-time error checks) and <TT
CLASS="OPTION"
>--enable-debug</TT
>
      (which improves the usefulness of debugging tools).

      If using GCC, it is best to build with an optimization level of
      at least <TT
CLASS="OPTION"
>-O1</TT
>, because using no optimization
      (<TT
CLASS="OPTION"
>-O0</TT
>) disables some important compiler warnings (such
      as the use of uninitialized variables).  However, non-zero
      optimization levels can complicate debugging because stepping
      through compiled code will usually not match up one-to-one with
      source code lines.  If you get confused while trying to debug
      optimized code, recompile the specific files of interest with
      <TT
CLASS="OPTION"
>-O0</TT
>.  An easy way to do this is by passing an option
      to make: <TT
CLASS="COMMAND"
>gmake PROFILE=-O0 file.o</TT
>.

Build

    To start the build, type:

gmake

    (Remember to use <ACRONYM
CLASS="ACRONYM"
>GNU</ACRONYM
> make.) The build
    will take a few minutes depending on your
    hardware. The last line displayed should be:

All of PostgreSQL is successfully made. Ready to install.

   If you want to build everything that can be built, including the
   documentation (HTML and man pages), and the additional modules
   (<TT
CLASS="FILENAME"
>contrib</TT
>), type instead:

gmake world

   The last line displayed should be:

PostgreSQL, contrib and HTML documentation successfully made. Ready to install.

Regression Tests

    If you want to test the newly built server before you install it,
    you can run the regression tests at this point. The regression
    tests are a test suite to verify that PostgreSQL
    runs on your machine in the way the developers expected it
    to. Type:

gmake check

    (This won't work as root; do it as an unprivileged user.)

    Chapter 30 contains
    detailed information about interpreting the test results. You can
    repeat this test at any later time by issuing the same command.

Installing the Files

Note:      If you are upgrading an existing system be sure to read

     Section 17.6
     which has instructions about upgrading a
     cluster.

    To install PostgreSQL enter:

gmake install

    This will install files into the directories that were specified
    in step 1. Make sure that you have appropriate
    permissions to write into that area. Normally you need to do this
    step as root. Alternatively, you can create the target
    directories in advance and arrange for appropriate permissions to
    be granted.

    To install the documentation (HTML and man pages), enter:

gmake install-docs

    If you built the world above, type instead:

gmake install-world

    This also installs the documentation.

    You can use <TT
CLASS="LITERAL"
>gmake install-strip</TT
> instead of
    <TT
CLASS="LITERAL"
>gmake install</TT
> to strip the executable files and
    libraries as they are installed.  This will save some space.  If
    you built with debugging support, stripping will effectively
    remove the debugging support, so it should only be done if
    debugging is no longer needed.  <TT
CLASS="LITERAL"
>install-strip</TT
>
    tries to do a reasonable job saving space, but it does not have
    perfect knowledge of how to strip every unneeded byte from an
    executable file, so if you want to save all the disk space you
    possibly can, you will have to do manual work.

    The standard installation provides all the header files needed for client
    application development as well as for server-side program
    development, such as custom functions or data types written in C.
    (Prior to PostgreSQL 8.0, a separate <TT
CLASS="LITERAL"
>gmake
    install-all-headers</TT
> command was needed for the latter, but this
    step has been folded into the standard install.)

Client-only installation:      If you want to install only the client applications and
     interface libraries, then you can use these commands:

gmake -C src/bin install
gmake -C src/include install
gmake -C src/interfaces install
gmake -C doc install

    <TT
CLASS="FILENAME"
>src/bin</TT
> has a few binaries for server-only use,
    but they are small.

Uninstallation:     To undo the installation use the command <TT
CLASS="COMMAND"
>gmake
    uninstall</TT
>. However, this will not remove any created directories.

Cleaning:     After the installation you can free disk space by removing the built
    files from the source tree with the command <TT
CLASS="COMMAND"
>gmake
    clean</TT
>. This will preserve the files made by the <TT
CLASS="COMMAND"
>configure</TT
>
    program, so that you can rebuild everything with <TT
CLASS="COMMAND"
>gmake</TT
>
    later on. To reset the source tree to the state in which it was
    distributed, use <TT
CLASS="COMMAND"
>gmake distclean</TT
>. If you are going to
    build for several platforms within the same source tree you must do
    this and re-configure for each platform.  (Alternatively, use
    a separate build tree for each platform, so that the source tree
    remains unmodified.)

   If you perform a build and then discover that your <TT
CLASS="COMMAND"
>configure</TT
>
   options were wrong, or if you change anything that <TT
CLASS="COMMAND"
>configure</TT
>
   investigates (for example, software upgrades), then it's a good
   idea to do <TT
CLASS="COMMAND"
>gmake distclean</TT
> before reconfiguring and
   rebuilding.  Without this, your changes in configuration choices
   might not propagate everywhere they need to.

Prev	Home	Next

Getting The Source	Up	Post-Installation Setup


text:
rpi_stepper
===========

Raspberry Pi Stepper Motor Ruby Code

I was rotating a stepper motor with python :snake:, and well, ugh, it was python.   Switched the code over to ruby, and it works like a charm :tophat:.

Now it needs some cleaning up.


text:
<?php
defined('C5_EXECUTE') or die("Access Denied.");

class BooleanAttributeTypeController extends Concrete5_Controller_AttributeType_Boolean  {}


text:
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:color="@android:color/holo_red_light"  android:state_selected="true" />
    <item android:color="@android:color/holo_green_light"  android:state_selected="false" />
    <item android:color="@android:color/holo_green_light"  />

</selector>


text:
<web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="3.0"
	xsi:schemaLocation="http://java.sun.com/xml/ns/javaee ./xsd/web-app_3_0.xsd">

	<listener>
		<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
	</listener>

	<context-param>
		<param-name>contextConfigLocation</param-name>
		<param-value>
			classpath:/spring-context-loader.xml
		</param-value>
	</context-param>

	<servlet>
		<servlet-name>spring</servlet-name>
		<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
		<init-param>
			<param-name>contextConfigLocation</param-name>
			<param-value>
				classpath:/fhir-spring-subscription-config-dstu2.xml
			</param-value>
		</init-param>
		<load-on-startup>2</load-on-startup>
	</servlet>

	<servlet-mapping>
		<servlet-name>spring</servlet-name>
		<url-pattern>/</url-pattern>
	</servlet-mapping>

</web-app>