text:
#include "../_ft_internal.h"

// TODO: Conceptual: Consider implementing readv() and writev() versions for more complicated frame formats (eh, on linux it is implemented as memcpy)
// TODO: SO_KEEPALIVE
// TODO: SO_LINGER (in a non-blocking mode?, valid for SEQPACKET?)
// TODO: SO_PRIORITY
// TODO: SO_RCVBUF
// TODO: SO_SNDBUF (??)
// TODO: SO_RCVLOWAT (consider using)
// TODO: SO_RCVTIMEO & SO_SNDTIMEO

const char * ft_dgram_class = "ft_dgram";

static void _ft_dgram_on_read(struct ev_loop * loop, struct ev_io * watcher, int revents);
static void _ft_dgram_on_write(struct ev_loop * loop, struct ev_io * watcher, int revents);
static void _ft_dgram_write_real(struct ft_dgram * this);

enum _ft_dgram_read_event
{
	READ_WANT_READ = 1,
};

enum _ft_dgram_write_event
{
	WRITE_WANT_WRITE = 1,
};

static void _ft_dgram_read_set_event(struct ft_dgram * this, enum _ft_dgram_read_event event);
static void _ft_dgram_read_unset_event(struct ft_dgram * this, enum _ft_dgram_read_event event);
static void _ft_dgram_write_set_event(struct ft_dgram * this, enum _ft_dgram_write_event event);
static void _ft_dgram_write_unset_event(struct ft_dgram * this, enum _ft_dgram_write_event event);

static void _ft_dgram_on_write_event(struct ft_dgram * this);

///

#define TRACE_FMT "fd:%d B:%c C:%c S:%c Rtl:%d Re:%c Rw:%c Wo:%c Wr:%c We:%c Ww:%c E:(%d)"
#define TRACE_ARGS \
	this->read_watcher.fd, \
	(this->flags.bind) ? 'Y' : '.', \
	(this->flags.connect) ? 'Y' : '.', \
	(this->flags.shutdown) ? 'Y' : '.', \
	this->read_pause_level, \
	(this->read_events & READ_WANT_READ) ? 'R' : '.', \
	(ev_is_active(&this->read_watcher)) ? 'Y' : '.', \
	(this->flags.write_open) ? 'Y' : '.', \
	(this->flags.write_ready) ? 'Y' : '.', \
	(this->write_events & WRITE_WANT_WRITE) ? 'W' : '.', \
	(ev_is_active(&this->write_watcher)) ? 'Y' : '.', \
	this->error.sys_errno

///

bool ft_dgram_init(struct ft_dgram * this, const struct ft_dgram_delegate * delegate, struct ft_context * context, int family, int socktype, int protocol)
{
	bool ok;
	int i, rc;

	assert(this != NULL);
	assert(delegate != NULL);
	assert(socktype == SOCK_DGRAM);

	FT_TRACE(FT_TRACE_ID_DGRAM, "BEGIN");

	ok = ft_socket_init_(
		&this->base.socket, ft_dgram_class, context,
		family, socktype, protocol,
		NULL, 0
	);
	if (!ok) return false;

	int fd = socket(family, socktype, protocol);
	if (fd < 0)
	{
		FT_ERROR_ERRNO(errno, "socket(%d, %d, %d)", family, socktype, protocol);
		return false;
	}

	FT_TRACE(FT_TRACE_ID_DGRAM, "SOCKET fd:%d", fd);

	// Set OS buffer size, it is important to maintain a capability to send larger frame in a single datagram
	i = FRAME_SIZE;
	rc = setsockopt(fd, SOL_SOCKET, SO_SNDBUF, &i, sizeof(i));
	if (rc == -1) FT_WARN_ERRNO(errno, "setsockopt(%d, SOL_SOCKET, SO_SNDBUF, %d)", fd, i);

	i = FRAME_SIZE;
	rc = setsockopt(fd, SOL_SOCKET, SO_RCVBUF, &i, sizeof(i));
	if (rc == -1) FT_WARN_ERRNO(errno, "setsockopt(%d, SOL_SOCKET, SO_RCVBUF, %d)", fd, i);

	ok = ft_fd_nonblock(fd, true);
	if (!ok) FT_WARN_ERRNO(errno, "Failed when setting established socket to non-blocking mode");

	this->delegate = delegate;
	this->read_frame = NULL;
	this->write_frames = NULL;
	this->write_frame_last = &this->write_frames;
	this->stats.read_events = 0;
	this->stats.write_events = 0;
	this->stats.write_direct = 0;
	this->stats.read_bytes = 0;
	this->stats.write_bytes = 0;
	this->flags.write_open = true;
	this->flags.write_open = true;
	this->flags.shutdown = false;
	this->flags.bind = false;
	this->flags.connect = false;
	this->read_pause_level = 0;

	if (this->base.socket.ai_family == AF_UNIX)
	{
		this->flags.unix_unlink = true;
	}

	this->error.sys_errno = 0;

	assert(this->base.socket.context->ev_loop != NULL);
	this->created_at = ev_now(this->base.socket.context->ev_loop);
	this->shutdown_at = NAN;

	ev_io_init(&this->read_watcher, _ft_dgram_on_read, fd, EV_READ);
	ev_set_priority(&this->read_watcher, -1); // Read has always lower priority than writing
	this->read_watcher.data = this;
	this->read_events = 0;

	ev_io_init(&this->write_watcher, _ft_dgram_on_write, fd, EV_WRITE);
	ev_set_priority(&this->write_watcher, 1);
	this->write_watcher.data = this;
	this->write_events = 0;
	this->flags.write_ready = false;

	ok = ft_dgram_cntl(this, FT_DGRAM_WRITE_START);
	if (!ok) FT_WARN_P("Failed to set events properly");

	FT_TRACE(FT_TRACE_ID_DGRAM, "END " TRACE_FMT, TRACE_ARGS);

	return true;
}

void ft_dgram_fini(struct ft_dgram * this)
{
	size_t cap;

	assert(this != NULL);
	assert(this->base.socket.clazz == ft_dgram_class);

	assert(this->read_watcher.fd >= 0);
	assert(this->write_watcher.fd == this->read_watcher.fd);

	ft_dgram_cntl(this, FT_DGRAM_READ_STOP | FT_DGRAM_WRITE_STOP);

	int rc = close(this->read_watcher.fd);
	if (rc != 0) FT_WARN_ERRNO_P(errno, "close()");

	if ((this->base.socket.ai_family == AF_UNIX) && (this->base.socket.addrlen > 0) && (this->flags.unix_unlink == true))
	{
		struct sockaddr_un * un = (struct sockaddr_un *)&this->base.socket.addr;

		rc = unlink(un->sun_path);
		if (rc != 0) FT_WARN_ERRNO(errno, "Unlinking unix socket '%s'", un->sun_path);
	}

	if(this->delegate->fini != NULL) this->delegate->fini(this);

	this->read_watcher.fd = -1;
	this->write_watcher.fd = -1;

	if (this->flags.shutdown == false)
	{
		this->flags.shutdown = true;
		this->shutdown_at = ev_now(this->base.socket.context->ev_loop);
	}

	this->flags.write_open = false;
	this->flags.write_ready = false;

	if (this->read_frame != NULL)
	{
		cap = ft_frame_pos(this->read_frame);
		ft_frame_return(this->read_frame);
		this->read_frame = NULL;

		if (cap > 0) FT_WARN("Lost %zu bytes in read buffer of the socket", cap);
	}
}

void ft_dgram_flush(struct ft_dgram * this)
{
	assert(this != NULL);

	if (this->write_frames == 0) return;

	ft_fd_nonblock(this->read_watcher.fd, false);
	bool write_ready_store = this->flags.write_ready;

	while (this->write_frames != NULL)
	{
		this->flags.write_ready = true;
		_ft_dgram_write_real(this);
	}

	ft_fd_nonblock(this->read_watcher.fd, true);

	// TODO: This could be a bit more optimal - set to yes, start ev_write watcher
	this->flags.write_ready = write_ready_store;
}

///

bool ft_dgram_bind(struct ft_dgram * this, const struct sockaddr * addr, socklen_t addrlen)
{
	bool ok;
	int rc;

	assert(this != NULL);
	assert(this->base.socket.clazz == ft_dgram_class);
	assert(addr != NULL);
	assert(this->read_watcher.fd >= 0);

	FT_TRACE(FT_TRACE_ID_DGRAM, "BEGIN " TRACE_FMT, TRACE_ARGS);

	if (this->flags.bind == true) FT_WARN("Datagram socket is bound already");

	if ((this->base.socket.ai_family == AF_UNIX) && (addrlen > 0))
	{
		// Remove stalled unix socket
		struct sockaddr_un * un = (struct sockaddr_un *)addr;

		struct stat statbuf;
		rc = stat(un->sun_path, &statbuf);
		if ((rc == 0) && (S_ISSOCK(statbuf.st_mode)))
		{
			rc = unlink(un->sun_path);
			if (rc != 0) FT_WARN_ERRNO(errno, "unlink(%s)", un->sun_path);
			else FT_WARN("Stalled unix datagram socket '%s', deleting", un->sun_path);
		}
	}

	rc = bind(this->read_watcher.fd, addr, addrlen);
	if (rc != 0)
	{
		if (errno != EINPROGRESS)
		{
			FT_ERROR_ERRNO(errno, "bind of datagram socket");
			FT_TRACE(FT_TRACE_ID_DGRAM, "END bind err " TRACE_FMT, TRACE_ARGS);
			return false;
		}
	}

	this->base.socket.addrlen = addrlen;
	memcpy(&this->base.socket.addr, addr, addrlen);

	this->flags.bind = true;

	ok = ft_dgram_cntl(this, FT_DGRAM_READ_START);
	if (!ok) FT_WARN_P("Failed to set events properly");

	FT_TRACE(FT_TRACE_ID_DGRAM, "END " TRACE_FMT, TRACE_ARGS);

	return true;
}

bool ft_dgram_connect(struct ft_dgram * this, const struct sockaddr * addr, socklen_t addrlen)
{
	bool ok;
	int rc;

	assert(this != NULL);
	assert(this->base.socket.clazz == ft_dgram_class);
	assert(addr != NULL);
	assert(this->read_watcher.fd >= 0);

	FT_TRACE(FT_TRACE_ID_DGRAM, "BEGIN " TRACE_FMT, TRACE_ARGS);

	if (this->flags.connect == true) FT_WARN("Datagram socket is connected already");

	rc = connect(this->read_watcher.fd, addr, addrlen);
	if (rc != 0)
	{
		if (errno != EINPROGRESS)
		{
			FT_ERROR_ERRNO(errno, "connect()");
			FT_TRACE(FT_TRACE_ID_DGRAM, "END connect err" TRACE_FMT, TRACE_ARGS);
			return false;
		}
	}

	this->flags.connect = true;

	ok = ft_dgram_cntl(this, FT_DGRAM_WRITE_START);
	if (!ok) FT_WARN_P("Failed to set events properly");

	FT_TRACE(FT_TRACE_ID_DGRAM, "END " TRACE_FMT, TRACE_ARGS);

	return true;
}

///

static void _ft_dgram_shutdown_real(struct ft_dgram * this, bool uplink_eos)
{
	FT_TRACE(FT_TRACE_ID_DGRAM, "BEGIN " TRACE_FMT, TRACE_ARGS);

	// Stop futher reads on the socket
	ft_dgram_cntl(this, FT_DGRAM_READ_STOP | FT_DGRAM_READ_STOP);

	this->shutdown_at = ev_now(this->base.socket.context->ev_loop);
	this->flags.shutdown = true;
	this->flags.write_open = false;

	int rc = shutdown(this->write_watcher.fd, SHUT_RDWR);
	if (rc != 0)
	{
		if (errno == ENOTCONN) { /* NO-OP ... this can happen when connection is closed quickly after connecting */ }
		else
			FT_WARN_ERRNO_P(errno, "shutdown()");
	}

	// Uplink (to delegate) end-of-stream
	if (uplink_eos)
	{
		struct ft_frame * frame = NULL;
		if ((this->read_frame != NULL) && (ft_frame_pos(this->read_frame) == 0))
		{
			// Recycle this->read_frame if there are no data read
			frame = this->read_frame;
			this->read_frame = NULL;

			ft_frame_format_empty(frame);
			ft_frame_set_type(frame, FT_FRAME_TYPE_END_OF_STREAM);
		}

		if (frame == NULL)
		{
			frame = ft_pool_borrow(&this->base.socket.context->frame_pool, FT_FRAME_TYPE_END_OF_STREAM);
		}

		if (frame == NULL)
		{
			this->flags.read_paused_noframes = true;
			ft_dgram_cntl(this, FT_DGRAM_READ_PAUSE);
			//TODO: call this->delegate->error() to indicate out-of-frames situation
			FT_WARN("Failed to submit end-of-stream frame, paused");
			FT_TRACE(FT_TRACE_ID_DGRAM, "END " TRACE_FMT " out of frames", TRACE_ARGS);
			return;
		}

		assert(this->delegate != NULL);
		assert(this->delegate->read != NULL);
		bool upstreamed = this->delegate->read(this, frame);
		if (!upstreamed) ft_frame_return(frame);
	}

	FT_TRACE(FT_TRACE_ID_DGRAM, "END " TRACE_FMT, TRACE_ARGS);
}

static void _ft_dgram_error(struct ft_dgram * this, int sys_errno, const char * when)
{
	assert(sys_errno != 0);

	FT_TRACE(FT_TRACE_ID_DGRAM, "BEGIN " TRACE_FMT " %s", TRACE_ARGS, when);
	FT_ERROR_ERRNO(sys_errno, "System error on datagram socket when %s", when);

	this->error.sys_errno = sys_errno;

	if (this->delegate->error != NULL)
		this->delegate->error(this);

	_ft_dgram_shutdown_real(this, false);

	FT_TRACE(FT_TRACE_ID_DGRAM, "END " TRACE_FMT " %s", TRACE_ARGS, when);
}

///

void _ft_dgram_read_set_event(struct ft_dgram * this, enum _ft_dgram_read_event event)
{
	assert(this != NULL);
	assert(this->base.socket.clazz == ft_dgram_class);

	this->read_events |= event;
	if ((this->read_events != 0) && (this->read_pause_level == 0) && (this->flags.shutdown == false))
		ev_io_start(this->base.socket.context->ev_loop, &this->read_watcher);
}

void _ft_dgram_read_unset_event(struct ft_dgram * this, enum _ft_dgram_read_event event)
{
	assert(this != NULL);
	assert(this->base.socket.clazz == ft_dgram_class);

	this->read_events &= ~event;
	if ((this->read_events == 0) || (this->flags.shutdown == true) || (this->read_pause_level > 0))
		ev_io_stop(this->base.socket.context->ev_loop, &this->read_watcher);
}

bool _ft_dgram_cntl_read_start(struct ft_dgram * this)
{
	assert(this != NULL);
	assert(this->base.socket.clazz == ft_dgram_class);

	assert(this->read_watcher.fd >= 0);

	_ft_dgram_read_set_event(this, READ_WANT_READ);
	return true;
}

bool _ft_dgram_cntl_read_stop(struct ft_dgram * this)
{
	assert(this != NULL);
	assert(this->base.socket.clazz == ft_dgram_class);

	assert(this->read_watcher.fd >= 0);

	_ft_dgram_read_unset_event(this, READ_WANT_READ);
	return true;
}

bool _ft_dgram_cntl_read_pause(struct ft_dgram * this, bool on)
{
	assert(this != NULL);
	assert(this->base.socket.clazz == ft_dgram_class);

	if (on)
	{
		this->read_pause_level += 1;
		if (this->read_pause_level == 1)
			_ft_dgram_read_unset_event(this, 0);
	}
	else
	{
		assert(this->read_pause_level > 0);
		this->read_pause_level -= 1;
		if (this->read_pause_level == 0)
			_ft_dgram_read_set_event(this, 0);
	}

	return true;
}

void _ft_dgram_on_read_event(struct ft_dgram * this)
{
	ssize_t rc;

	assert(this != NULL);
	assert(this->base.socket.clazz == ft_dgram_class);

	FT_TRACE(FT_TRACE_ID_DGRAM, "BEGIN " TRACE_FMT, TRACE_ARGS);

	this->stats.read_events += 1;

	for (unsigned int read_loops = 0; read_loops<ft_config.sock_est_max_read_loops; read_loops += 1)
	{
		if (this->read_frame == NULL)
		{
			if (this->delegate->get_read_frame != NULL)
			{
				this->read_frame = this->delegate->get_read_frame(this);
			}
			else
			{
				this->read_frame = ft_pool_borrow(&this->base.socket.context->frame_pool, FT_FRAME_TYPE_RAW_DATA);
				if (this->read_frame != NULL) ft_frame_format_simple(this->read_frame);
			}

			if (this->read_frame == NULL)
			{
				this->flags.read_paused_noframes = true;
				ft_dgram_cntl(this, FT_DGRAM_READ_PAUSE);
				//TODO: call this->delegate->error() to indicate out-of-frames situation
				FT_WARN("Out of frames when reading, throttling");
				FT_TRACE(FT_TRACE_ID_DGRAM, "END " TRACE_FMT " out of frames", TRACE_ARGS);
				return;
			}

			// Wipe a memory for an incoming frame address
			memset(&this->read_frame->addr, 0, sizeof(this->read_frame->addr));
		}

		struct ft_vec * frame_dvec = ft_frame_get_vec(this->read_frame);
		assert(frame_dvec != NULL);

		//TODO: Transform frame_dvec into iovec array (aka support multiple frame_vec)
		struct iovec iov[1] = {
			{
				.iov_base = frame_dvec->frame->data + frame_dvec->offset + frame_dvec->position,
				.iov_len = frame_dvec->limit - frame_dvec->position,
			}
		};
		assert(iov[0].iov_len > 0);

		struct msghdr msghdr = {
			.msg_name = &this->read_frame->addr,
			.msg_namelen = sizeof(this->read_frame->addr),
			.msg_iov = iov,
			.msg_iovlen = 1,
			.msg_control = NULL,
			.msg_controllen = 0,
			.msg_flags = 0
		};

		rc = recvmsg(this->read_watcher.fd, &msghdr, 0);
		if (rc <= 0) // Handle error situation
		{
			if (rc < 0)
			{
				if (errno == EAGAIN)
				{
					_ft_dgram_read_set_event(this, READ_WANT_READ);
					FT_TRACE(FT_TRACE_ID_DGRAM, "END " TRACE_FMT " EAGAIN", TRACE_ARGS);
					return;
				}

				_ft_dgram_error(this, errno, "reading");
			}
			else
			{
				FT_WARN_P("Recv on DGRAM returned 0 - why?");

				this->error.sys_errno = 0;
				_ft_dgram_shutdown_real(this, true);
			}

			FT_TRACE(FT_TRACE_ID_DGRAM, "END recvmsg:%zd " TRACE_FMT, rc, TRACE_ARGS);
			return;
		}

		assert(rc > 0);
		FT_TRACE(FT_TRACE_ID_DGRAM, "READ " TRACE_FMT " rc:%zd", TRACE_ARGS, rc);
		this->read_frame->addrlen = msghdr.msg_namelen;
		this->stats.read_bytes += rc;
		ft_vec_advance(frame_dvec, rc);

		// Current dvec is filled, move to next one
		bool ok = ft_frame_next_vec(this->read_frame);
		if (!ok)
		{
			// All dvecs in the frame are filled with data

			// Detach read frame (because there is an optimisation in shutdown to re-use read frame if empty and delegate can call shutdown)
			struct ft_frame * frame = this->read_frame;
			this->read_frame = NULL;
			bool upstreamed = this->delegate->read(this, frame);
			if (!upstreamed)
			{
				assert(this->read_frame == NULL);
				this->read_frame = frame;
			}

			if ((this->read_events & READ_WANT_READ) == 0)
			{
				// If watcher is stopped, break reading
				FT_TRACE(FT_TRACE_ID_DGRAM, "END " TRACE_FMT " read stopped", TRACE_ARGS);
				return;
			}
		}
	}

	// Maximum read loops within event loop iteration is exceeded
	_ft_dgram_read_set_event(this, READ_WANT_READ);
	FT_TRACE(FT_TRACE_ID_DGRAM, "END " TRACE_FMT " max read loops", TRACE_ARGS);
}

///

void _ft_dgram_write_set_event(struct ft_dgram * this, enum _ft_dgram_write_event event)
{
	assert(this != NULL);
	assert(this->base.socket.clazz == ft_dgram_class);

	this->write_events |= event;
	if (this->write_events != 0) ev_io_start(this->base.socket.context->ev_loop, &this->write_watcher);
}

void _ft_dgram_write_unset_event(struct ft_dgram * this, enum _ft_dgram_write_event event)
{
	assert(this != NULL);
	assert(this->base.socket.clazz == ft_dgram_class);

	this->write_events &= ~event;
	if (this->write_events == 0) ev_io_stop(this->base.socket.context->ev_loop, &this->write_watcher);
}

bool _ft_dgram_cntl_write_start(struct ft_dgram * this)
{
	assert(this != NULL);
	assert(this->base.socket.clazz == ft_dgram_class);

	assert(this->write_watcher.fd >= 0);

	_ft_dgram_write_set_event(this, WRITE_WANT_WRITE);
	return true;
}

bool _ft_dgram_cntl_write_stop(struct ft_dgram * this)
{
	assert(this != NULL);
	assert(this->base.socket.clazz == ft_dgram_class);

	assert(this->write_watcher.fd >= 0);

	_ft_dgram_write_unset_event(this, WRITE_WANT_WRITE);
	return true;
}

static void _ft_dgram_return_write_frame(struct ft_dgram * this)
{
	struct ft_frame * frame = this->write_frames;

	this->write_frames = frame->next;
	if (this->write_frames == NULL)
	{
		// There are no more frames to write
		this->write_frame_last = &this->write_frames;
	}

	ft_frame_return(frame);
}

static void _ft_dgram_write_real(struct ft_dgram * this)
{
	ssize_t rc;

	assert(this != NULL);
	assert(this->base.socket.clazz == ft_dgram_class);

	assert(this->flags.write_ready == true);

	FT_TRACE(FT_TRACE_ID_DGRAM, "BEGIN " TRACE_FMT " Wf:%p", TRACE_ARGS, this->write_frames);

	unsigned int write_loop = 0;
	while (this->write_frames != NULL)
	{
		FT_TRACE(FT_TRACE_ID_DGRAM, "FRAME " TRACE_FMT " ft:%llx", TRACE_ARGS, (unsigned long long)this->write_frames->type);

		if (write_loop > ft_config.sock_est_max_read_loops)
		{
			// Maximum write loops per event loop iteration reached
			this->flags.write_ready = false;
			_ft_dgram_write_set_event(this, WRITE_WANT_WRITE);
			FT_TRACE(FT_TRACE_ID_DGRAM, "END " TRACE_FMT " max loops", TRACE_ARGS);
			return;
		}
		write_loop += 1;

		if (this->write_frames->type == FT_FRAME_TYPE_END_OF_STREAM)
		{
			struct ft_frame * frame = this->write_frames;

			this->write_frames = frame->next;
			ft_frame_return(frame);

			if (this->write_frames != NULL) FT_ERROR("There are data frames in the write queue after end-of-stream.");

			_ft_dgram_shutdown_real(this, true);

			FT_TRACE(FT_TRACE_ID_DGRAM, "END " TRACE_FMT " shutdown", TRACE_ARGS);
			return;
		}

		struct ft_vec * frame_dvec = ft_frame_get_vec(this->write_frames);
		assert(frame_dvec != NULL);

		//TODO: Transform frame_dvec into iovec array (aka support multiple frame_vec) - but this has to be configurable
		struct iovec iov[1] = {
			{
				.iov_base = frame_dvec->frame->data + frame_dvec->offset + frame_dvec->position,
				.iov_len = frame_dvec->limit - frame_dvec->position,
			}
		};
		assert(iov[0].iov_len > 0);

		struct msghdr msghdr = {
			.msg_iov = iov,
			.msg_iovlen = 1,
			.msg_control = NULL,
			.msg_controllen = 0,
			.msg_flags = 0
		};

		// If requested, prepare a message control block from a last vector in the frame
		if (this->write_frames->flags.msg_control == true)
		{
			struct ft_vec * vec = ft_frame_get_vec_at(this->write_frames, -1);
			if (vec == NULL)
			{
				FT_WARN("Frame has msg_control flag set but no vector with msg_control");
			}
			else
			{
				// Remove the last vector
				this->write_frames->vec_limit -= 1;

				msghdr.msg_control = ft_vec_ptr(vec);
				msghdr.msg_controllen = vec->limit;
			}
		}

		// If socket is connected, then a frame address will be ignored
		if (this->flags.connect)
		{
			msghdr.msg_name = NULL;
			msghdr.msg_namelen = 0;
		}
		else
		{
			msghdr.msg_name = &this->write_frames->addr;
			msghdr.msg_namelen = this->write_frames->addrlen;
		}

		FT_TRACE(FT_TRACE_ID_DGRAM, "sendmsg PRE size:%zd nl:%d " TRACE_FMT, iov[0].iov_len, msghdr.msg_namelen, TRACE_ARGS);

		rc = sendmsg(this->write_watcher.fd, &msghdr, 0);
		if (rc < 0) // Handle error situation
		{
			this->flags.write_ready = false;

			int lerrno = errno;
			if ((lerrno == EAGAIN) || (lerrno == ENOBUFS) || (lerrno == ENOMEM))
			{
				// OS buffer is full, wait for next write event
				_ft_dgram_write_set_event(this, WRITE_WANT_WRITE);
				FT_TRACE(FT_TRACE_ID_DGRAM, "END " TRACE_FMT " EAGAIN", TRACE_ARGS);
				return;
			}

			// If socket is not connected, don't close that when the system error is observed
			if (this->flags.connect)
			{
				_ft_dgram_error(this, lerrno, "writing");
			}
			else
			{
				FT_WARN_ERRNO(lerrno, "System error on datagram socket when writing, the frame is lost");
				_ft_dgram_return_write_frame(this);
			}

			FT_TRACE(FT_TRACE_ID_DGRAM, "END " TRACE_FMT " write errno:%d", TRACE_ARGS, lerrno);
			return;
		}
		else if (rc == 0)
		{
			//TODO: Test if this is a best possible reaction
			FT_WARN("Zero write occured, will retry soon");
			this->flags.write_ready = false;
			_ft_dgram_write_set_event(this, WRITE_WANT_WRITE);

			FT_TRACE(FT_TRACE_ID_DGRAM, "END " TRACE_FMT " zero-write", TRACE_ARGS);
			return;
		}

		assert(rc > 0);
		FT_TRACE(FT_TRACE_ID_DGRAM, "sendmsg POST rc:%zd " TRACE_FMT, rc, TRACE_ARGS);
		this->stats.write_bytes += rc;
		ft_vec_advance(frame_dvec, rc);
		if (frame_dvec->position < frame_dvec->limit)
		{
			// Not all data has been written, wait for next write event
			this->flags.write_ready = false;
			_ft_dgram_write_set_event(this, WRITE_WANT_WRITE);
			FT_TRACE(FT_TRACE_ID_DGRAM, "END " TRACE_FMT " partial", TRACE_ARGS);
			return;
		}
		assert(frame_dvec->position == frame_dvec->limit);

		// Current dvec is filled, move to next one
		bool ok = ft_frame_next_vec(this->write_frames);
		if (!ok)
		{
			// All dvecs in the frame have been written
			_ft_dgram_return_write_frame(this);
		}
	}

	FT_TRACE(FT_TRACE_ID_DGRAM, "END " TRACE_FMT, TRACE_ARGS);
	return;
}

void _ft_dgram_on_write_event(struct ft_dgram * this)
{
	assert(this != NULL);
	assert(this->base.socket.clazz == ft_dgram_class);

	FT_TRACE(FT_TRACE_ID_DGRAM, "BEGIN " TRACE_FMT, TRACE_ARGS);

	this->stats.write_events += 1;
	this->flags.write_ready = true;

	if (this->write_frames != NULL)
	{
		this->write_events &= ~WRITE_WANT_WRITE; // Just pretend that we are stopping a watcher
		_ft_dgram_write_real(this);
		if (this->write_events == 0) // Now do it for real if needed
			_ft_dgram_write_unset_event(this, WRITE_WANT_WRITE);
	}
	else
	{
		_ft_dgram_write_unset_event(this, WRITE_WANT_WRITE);
	}

	FT_TRACE(FT_TRACE_ID_DGRAM, "END " TRACE_FMT, TRACE_ARGS);
}

bool ft_dgram_write(struct ft_dgram * this, struct ft_frame * frame)
{
	assert(this != NULL);
	assert(this->base.socket.clazz == ft_dgram_class);

	FT_TRACE(FT_TRACE_ID_DGRAM, "BEGIN " TRACE_FMT, TRACE_ARGS);

	if (this->flags.write_open == false)
	{
		if (frame->type == FT_FRAME_TYPE_END_OF_STREAM)
		{
			ft_frame_return(frame);
			return true;
		}
		FT_WARN("Datagram socket is not open for writing (f:%p ft: %08llx)", frame, (unsigned long long) frame->type);
		return false;
	}

	if (frame->type == FT_FRAME_TYPE_END_OF_STREAM)
		this->flags.write_open = false;

	//Add frame to the write queue
	*this->write_frame_last = frame;
	frame->next = NULL;
	this->write_frame_last = &frame->next;

	if (this->flags.write_ready == false)
	{
		_ft_dgram_write_set_event(this, WRITE_WANT_WRITE);
		FT_TRACE(FT_TRACE_ID_DGRAM, "END " TRACE_FMT " queue", TRACE_ARGS);
		return true;
	}

	this->stats.write_direct += 1;

	_ft_dgram_write_real(this);

	FT_TRACE(FT_TRACE_ID_DGRAM, "END " TRACE_FMT " direct", TRACE_ARGS);
	return true;
}

bool _ft_dgram_cntl_shutdown(struct ft_dgram * this)
{
	assert(this != NULL);
	assert(this->base.socket.clazz == ft_dgram_class);

	FT_TRACE(FT_TRACE_ID_DGRAM, "BEGIN " TRACE_FMT, TRACE_ARGS);

	if (this->flags.shutdown == true) return true;
	if (this->flags.write_open == false) return true;

	struct ft_frame * frame = ft_pool_borrow(&this->base.socket.context->frame_pool, FT_FRAME_TYPE_END_OF_STREAM);
	if (frame == NULL)
	{
		FT_WARN("Out of frames when preparing end of stream (write)");
		return false;
	}

	bool ret = ft_dgram_write(this, frame);
	FT_TRACE(FT_TRACE_ID_DGRAM, "END " TRACE_FMT, TRACE_ARGS);

	return ret;
}

///

static void _ft_dgram_on_read(struct ev_loop * loop, struct ev_io * watcher, int revents)
{
	struct ft_dgram * this = watcher->data;

	assert(this != NULL);
	assert(this->base.socket.clazz == ft_dgram_class);

	FT_TRACE(FT_TRACE_ID_DGRAM, "BEGIN " TRACE_FMT " e:%x ei:%u", TRACE_ARGS, revents, ev_iteration(loop));

	if ((revents & EV_ERROR) != 0)
	{
		_ft_dgram_error(this, ECONNRESET, "reading (libev)");
		goto end;
	}

	if ((revents & EV_READ) == 0) goto end;

	if (this->read_pause_level > 0)
	{
		ev_io_stop(this->base.socket.context->ev_loop, &this->read_watcher);
		goto end;
	}

	if (this->read_events & READ_WANT_READ)
		_ft_dgram_on_read_event(this);

end:
	FT_TRACE(FT_TRACE_ID_DGRAM, "END " TRACE_FMT " e:%x ei:%u", TRACE_ARGS, revents, ev_iteration(loop));
}

static void _ft_dgram_on_write(struct ev_loop * loop, struct ev_io * watcher, int revents)
{
	struct ft_dgram * this = watcher->data;

	assert(this != NULL);
	assert(this->base.socket.clazz == ft_dgram_class);

	FT_TRACE(FT_TRACE_ID_DGRAM, "BEGIN " TRACE_FMT " e:%x ei:%u", TRACE_ARGS, revents, ev_iteration(loop));

	if ((revents & EV_ERROR) != 0)
	{
		_ft_dgram_error(this, ECONNRESET, "writing (libev)");
		goto end;
	}

	if ((revents & EV_WRITE) == 0) goto end;

	if (this->write_events & WRITE_WANT_WRITE)
		_ft_dgram_on_write_event(this);

end:
	FT_TRACE(FT_TRACE_ID_DGRAM, "END " TRACE_FMT " e:%x ei:%u", TRACE_ARGS, revents, ev_iteration(loop));
}

void ft_dgram_diagnose(struct ft_dgram * this)
{
	assert(this != NULL);
	assert(this->base.socket.clazz == ft_dgram_class);

	fprintf(stderr, TRACE_FMT "\n", TRACE_ARGS);
}

redpajama_set_name: RedPajamaGithub


text:
With an inherent understanding of children and a good natured sense of humor, Julius Pierpont Patches (J.P. to his "Pals") helped raise a generation of Northwest children. This is his story…
Let's start the show!
The Clown Who Built Seattle
Seattle has become one of the most important cultural and economic centers of the world.The Seattle baby-boomers and Generation Xers have led the way in business, high-tech, music and the arts. Our area is known for as producing open-minded and creative people.
What shared experience sparked our imaginations? Was it a lack of oxygen at the top of the Space Needle? Was it a bad batch of clams from Ivars? No, I think we all know whose fault it is!
It's J.P., the guy we spent two hours with every day! Two hours a day over 10-15 years adds up to thousands of hours... If you're still reading this should frighten you.
To a child growing up near Puget Sound in the 60s and 70s, appearing on the J.P. Patches show was one of the requirements of a full life (right up there with visiting Disneyland). If you weren't on the show, the next best thing was meeting J.P. in person (and thanks to the generous and indefatigable J.P., there were plenty of opportunities ). It's something that every Patches Pal remembers as a highlight of their childhood.
The Emmy winning J.P. Patches show outlasted other children's programs on the air and in the memories of his viewers. It aired for 23 years on KIRO TV and at one time had an viewership of over 100,000. When it left the air in 1981, it was the longest running, locally produced children's program in the country.
While the kids loved the cluttered set, the wild cast of supporting characters and the slapstick antics of J.P., many of the jokes were only caught by the parents. The show was known for it's energetic and occasionally sophisticated humor.
You bet I was a Patches Pal. In fact, Nancy even went on the show with her Brownie group. They were each given loaves of Sunbeam bread. Years later I finally saw him in person at my high school doing a fundraiser. He was standing outside with some blonde. I was crushed. Ann Wilson
Next: THE MAN BEHIND THE NOSE

redpajama_set_name: RedPajamaCommonCrawl


text:
Tag Archives: monkeys
Yercaud Hill station and Meeting Friends
February 3, 2014 India 2014, TravellingAsia, cave, driving, family, food, friends, hill station, home cooking, India, monkey, monkeys, nature, resort, Salem, street food, Tamil Nadu, temple, travel, travelling, YercaudEleanor Gordon
We got up and were served breakfast by Sellappan's mam. As it was a Sunday it was the time for non-vegetarian food, and Sellappan's mam had already been out to the market to get fresh meat and fish. Breakfast was mutton in gravy and idly, of course it was delicious.
As Mohan is going away on a business trip this week, he came to Salem so that Kowshalya could stay with his parents. Kowshalya gave me a yellow flower to put in my hair. We went to his family home and were of course given something to eat (pomegranate) and I spoke with Mohan's mam. She has a treadle sewing machine and likes to make things, just like someone else I know! Mohan's father is a chartered accountant, like Mohan, and the family business is conducted upstairs in the office, so clients can enter from the office side, but dad can come back to his house with no commute necessary!
Mohan drove Kowshalya, Sellappan and I to Yercaud, a hill station outside if Salem. There is a road all the way to the top of the 5000ft hill, and the route shows the view down to the ground through a few trees. All the way along the road there were monkeys sitting on the concrete, and a lot of them seemed to be eating tomatoes. When we got further up the hill we discovered a family car stopping at each monkey to give them tomatoes. We paused too further up and Sellappan gave a monkey an orange, and it quickly ran away with it into the trees.
We stopped and climbed a small metal watchtower for a better view, and about twenty huge yellow dragonflies zipped around us in the sun. The ground was starting to look very far away! The strange thing about the topography is that mostly the land is totally flat, and then steep hills spring out from nowhere.
As we climbed, the road started to bend around in hairpins, and signs told us how many we had passed through, counting hairpin bend 1/20, 2/20… All the while the ground below us started to get lost in the haze.
We suddenly came to the top and after only passing a few cars and buses on the way up, it was surprising to see how many people were already there. There was a small town at the top of the hill, with a lake with pedalos and lots of people selling food and souvenirs. There are old plantation buildings, few schools and plenty of houses, restaurants and hotels too.
We drove to the very highest point where there was a small temple cut into the rock like a small cave. We had to bend double to get inside, and were joined be another family. Once we came back out everyone had food in their mind, so we went back down to the town for snacks, including mango slices sprinkled with chilli powder and salt, pineapple slices, and egg bajis. There was also 'American Style' corn on the cob, which was scorched over a hand cranked burner. I took mine without chilli, just for a change! We ate this feast sitting in the car overlooking the lake, just like a British winter picnic!
At another spot we stopped and Sellappan had our names written on a grain of rice as a souvenir. There was also a proper old fashioned candy floss cart, which I never would have expected to find there! Naturally some of that also had to be bought. We began our descent, and paused at some picturesque spots for snaps. We saw coffee, oranges and pepper growing, as well as the ubiquitous monkeys. It was very strange to see them all just chilling out by the roadside!
When we got back down we stopped at Mohan's again and there were people making flower garlands in the driveway, and Kowshalya fixed one of these to my ponytail too. Lots of buds and flowers were being strung together to make them. I had seen a lot of women wearing these flowers, but didn't know about the strong, sweet smell that comes from the flowers every time they move. They were also very cool on the back of my neck.
The next stop was home for lunch – though it was already 5pm and we had been munching the whole time! We came home to one of Sellappan's favourites – fish fry. The fish was a kind of river carp, and had been sliced perpendicular to the spine, covered in spices and deep-fried to a deep orange-red. It was very tasty, but I had a bit of trouble with the bones. The same fish had also been prepared in a green-brown gravy with a smooth flavour. Of course, we had it with idly while the TV played Tamil movies.
As I had had a problem with my flip flops and contracted "shoebite" (a brilliant word for when new shoes rub or blister your feet) we stopped again at Sellappan's friend's shoe shop for some new ones. The shop was packed as it was Sunday evening, and so there wasn't much time for chatting. I did discover that one of Sellappan's friends is visiting my area sometime next year though!
My Tamil is certainly not good, but I have learned a very important word – enough! Everywhere we go there is always some kind of food, and this is always true when visiting others! On our way to visit one of Sellappan's tutees we actually crossed paths with them ("small town" of 850,000 people) and upon arriving at their house we had honeycomb sweets, as well as nuts and fruits and tea. Sellappan tested his students both in French and English while we were visiting!
Naturally when we got home it was time for food, so after another meal with Tamil movies, Sellappan packed up his bag to go back to Bangalore. I'm staying here in Salem with his family until he comes back on Friday for more trips!
Lalbagh Gardens, Window Shopping and Work
January 30, 2014 India 2014, Travellinganimals, Asia, Bangalore, campus, chicken, exotic animals, food, friends, India, Karnataka, Lalbagh, Lalbagh gardens, monkeys, office, parrots, plants, Punjabi Times, travel, travelling, trees, workEleanor Gordon
This morning we woke up just before dawn. Sellappan called up Mohan and Kowshalya to make sure they were up too, and we arranged to meet at their place. In the early morning Bangalore is always enveloped in thick fog, which starts to burn off as the sun rises. By the time we got to the gardens there was only a slight haze left, and the temperature had already risen to about 23C
Morning Haze
We arrived as the early morning sporty types were getting started. There were a few people playing badminton despite the breeze. There were also lots of middle aged men waving and swinging their arms about energetically and doing stretches. At the entrance to the park there is a large "hill" which is just exposed granite. There were plenty of people stretching and lying down sunbathing (hazebathing?) and climbing around on the rock.
We walked went to the flower show first, which was made up of sort of floral topiary. The flowers had been formed into shapes between 4 and 7 feet high. One section was composed of giant colourful fruit shapes with plastic facial features and limbs sticking out. There were also representations of vegetables and flowers.
As we carried on through the park we went past a rose garden which was all fenced off – apparently people can't help but steal roses as there was a sign to say no plucking was allowed. We walked up towards the lake and passed a huge clump of what looked like bamboo. A screeching noise and lots of crashing foliage revealed the presence of a monkey. Actually lots of monkeys. They were chasing around in the high branches while a man at the base of the clump was occupied with training one of them. He was talking to the monkey and giving it food, but I'm not sure what it was doing in return. He beckoned us closer, saying "No danger, he is my friend!" Surprisingly we declined his offer…
No plucking!
When we got to the top of the hill where the lake was, there were lots of white cranes, something that looked like a heron, and the odd white pelican skimming over the water and floating about. No ducks though! There were lots of chipmunk-like creatures running about too. Sellappan called them squirrels, and to me they seemed like a cross between chipmunks and what I would call squirrels. They were light brown with dark stripes on their backs, and tails at least as long as their bodies which they stuck up in the air like dodgem car aerials when they took off running along the ground and immediately dropped if they paused.
We followed the path around to an enormous tree which was about two hundred years old. It was a white silk cotton tree, and apparently it can be used for making pillows and mattresses among other things. It had enormous sail-like roots which started from about ten feet up the trunk, and spread to the ground. The canopy of the tree was huge and was full of green parrots. The dodgem rodents were having a great time running all over the tree trunk and diving down between the roots.
Silk Cotton Tree
Just as we were on the way out, we came across a movie set with people dressed in period costumes. Then from nowhere a huge line of army cadets marched into view, with notebooks in hand. The stars joined in with the marching line, much to everyone's amusement!
Spot the odd one out...
Breakfast was next on the list, but Mohan was due at his office by 9am so Sellappan and I had idly and vada (a potato doughnut) with sambar (a thin orange-coloured warm spicy dip) and a cold green coconut-based dip which I have forgotten the name of. This is a very standard breakfast and is delicious!
We went back to the flat for a cheeky nap to offset the early start and then Sellapan dropped me off at a mall while he went to work for a few hours. I looked around the mall for a while before going to Costa for lunch, just to see what it was like. I had a spicy veg roll thing, which wasn't particularly nice!
Next I went to Sellappan's office (on invitation of course) and spent some time looking around the campus, which was very green. The campus has a cafeteria, gym, badminton and basketball courts and a learning centre. I met lots of Sellappan's colleagues too, who were all very friendly. Overall it seems like a very pleasant and relaxed place.
After Sellappan had had a quick game of badminton we went to Punjabi Times with Momo, Camilla (who is from Romania) and her son Aryan. This was a themed restaurant which was very nicely decorated with sumptuous cushions and soft furnishings. The walls were painted and inset with pieces of colourful ceramic and glass, and the lighting was dim. The food was excellent too, we started with a deep green soup of coriander and mint, which was very cooling. We followed it up with a mix of chicken dishes, including tandoori style chicken, with roti and garlic naan. For the first time in a week I ate with a knife and fork which was actually very strange!
I was asleep within about five minutes of getting into bed.


Make better inventory decisions with NETSTOCK's intuitive, cloud-based, inventory management software.
With NETSTOCK's intuitive, cloud based, inventory management software.
NETSTOCK helped us to reduce inventory by 20% in the first 12 months whilst improving in-stock performance – a fantastic result.
Watch a demo now, and select those features that are important to you.
The only way to keep on top of inventory performance is with KPIs, to track how you're improving over time, and exception lists to highlight items that need attention today.
NETSTOCK is the global developer of the NETSTOCK inventory management application, which connects with NetSuite. NETSTOCK is an affordable, secure, intuitive, cloud-based application that enables SMEs to minimize stock outs, reduce excess inventory, and place orders quicker.
The NETSTOCK app connects to your NetSuite data to produce quality forecasts, reduce the time spent on manual tasks, and solve for the optimal investment required to achieve target fill rates. Implementation is brief and inexpensive, delivering an impressive return on investment rapidly. Learn more about this acclaimed inventory management application currently employed by more than 1,100 companies globally by visiting www.netstock.co.


text:
* Migrate to Go modules, work with Go 1.17
* Add Jenkins pipeline
* Update dependencies
* Add docker-compose for running a RabbitMQ in dev
* Add environment variables
* Clean Makefile
* Improve README

## [0.4.8] - 2019-02-22
* Port is parameterized

## [0.4.7] - 2018-10-29
* Internal: Update go version 1.10 and 1.11
* Internal: Update godep version
* Internal: Update Makefile and dependencies
* Internal: Update go version for docker image

## [0.4.6] - 2018-10-25
* Systems: Use network host mode

## [0.4.5] - 2018-01-30
* Internal: Added godep for dependency management
            - Updated Makefile
            - Excluded vendor directory from git
            - Updated .travis
            - Updated dependencies

## [0.4.4] - 2017-12-15
* Internal: Removed go version 1.6 and 1.7. Added 1.8.x, 1.9.x and master versions

## [0.4.3] - 2016-10-24

* Use manual prefix "docker/" for docker_log_tag.It's necessary for docker v1.12
* Update go version to 1.6.3
* Travis configuration uses 1.6 1.7 and tip
* golint is not supported in go version 1.5
* Remove update_deps doesnt work correctly :-(

## [0.4.2] - 2016-04-20

* Update deprecated docker compose configuration syslog-tag

## [0.4.2] - 2016-04-19

* Internal: Unify Makefile and travis.yml

## [0.4.2] - 2016-01-11

* Publish queries with the timeout value as amqp message ttl so messages are expired after timeout

## [0.4.1] - 2015-12-30

* Bugfix: ignore messages that can not be deserialized.

## [0.4.0] - 2015-12-02

* return 408 error code when timeout happens

## [0.4.0] - 2015-08-11

* Support a query string argument to especify a request timeout in milliseconds (e.g. curl http://localhost/foo?timeout=1500)

## [0.3.0] - 2015-06-17

* Support multiple methods
* simplified code
* API changes

## [0.2.0] - 2015-02-24

* Bugfix. Memory leak in the map that stores pending responses.
* Improved logging to show query id, topic and criteria.

## [0.1.1] - 2015-02-23

* Nothing. Just released to test deployment

## [0.1.0] - 2015-02-23

* Initial release


text:
Casciano Tabbed To Lead Wildcats
Charlotte, NC -Johnson & Wales Charlotte has hired James Casciano as the third men's basketball Head Coach in program history. He comes to Johnson & Wales after spending the previous two years as men's basketball Head Coach at the University of Maine-Presque Isle in Presque Isle, ME.
In his over 30 year collegiate coaching career, Casciano has the rare distinction of having coached at every level of both two and four-year colleges. He's led the programs at two-year schools Valley Forge Military and Union County College (NJ), NAIA program Castleton State, Division III King's College (PA) and NJIT, who transitioned from Division II to Division I during his tenure. His most recent post at Maine-Presque Isle saw the Owls maintain dual affiliations with Division III and the USCAA.
Casciano, known as a great rebuilder of programs, has over 275 career wins as a head coach. He has been named conference coach of the year on two separate occasions. His teams have advanced to postseason play at four of his previous head coaching stints.
In addition to his head coaching duties, Casciano will also assume an administrative role within the Athletic Department. He is no stranger to this role, as he served as an Assistant Athletic Director at both Maine-Presque Isle and NJIT. JWU Athletic Director Stephen Byrd says, "Coach Casciano brings a vast amount of knowledge and experience, and will be a tremendous asset to the men's basketball program and our institution in general."
Casciano began his coaching career as a volunteer assistant to Rollie Massimino at Villanova. He also served as an assistant coach at Delaware, Washington & Lee, Old Dominion, and Radford. Casciano played collegiately at Drexel, where he graduated with a bachelor's degree in business administration in 1977.
When he is not in the gym coaching basketball, Casciano is writing about it. He has been published six times to date, and has penned articles about his basketball philosophies that have been printed in Winning Hoops, Coaching Basketball, The Basketball Clinic, and The Basketball Bulletin.
He is married to wife, Daphne, and the two will make their move to the Charlotte area in July.


The typical Deloitte Business Analyst salary is $72,500. Business Analyst salaries at Deloitte can range from $69,051 - $79,199. This estimate is based upon 55 Deloitte Business Analyst salary report(s) provided by employees or estimated based upon statistical methods. When factoring in bonuses and additional compensation, a Business Analyst at Deloitte can expect to make an average total pay of $72,500 . See all Business Analyst salaries to learn how this stacks up in the market.


text:
"""
    Defines all the global objects that are proxies to the current
    active context.
"""

from functools import partial
from .local import LocalStack, LocalProxy
from .utils import ConfigDict

def _lookup_req_object(name):
    top = _request_ctx_stack.top
    if top is None:
        raise RuntimeError('working outside of request context')
    return getattr(top, name)

# context locals
_request_ctx_stack = LocalStack()
request = LocalProxy(partial(_lookup_req_object, 'request'))
current_app = LocalProxy(partial(_lookup_req_object, 'app'))
g = LocalProxy(partial(_lookup_req_object, 'g'))
config = ConfigDict()


text:
Kwanyin
Kwanyin is a lamp in a frame, which balances any imbalance, and illuminates the space, capturing a rather surprising eclipse.
MOTU WL
Motu is an ambient wall lamp with an exciting approach. The strict vertical Form is divided by a small counterweight that bends into space. The user can experience and change the reflection of the light by sliding the vertical support up or down.
BLANK S1
Blank is an object of total order, bound up with a well-defined conception of form and perspective. The Form is an absolute dividing line between inside and outside. The form is a rigid container consisting of two blanks – the inside and the outside. The inside and the outside blanks are supported with three rods to each blank working as actors giving the objects formal and humble practical function.
MATHEUI XX
MATHIEU is a chair based on strict basic forms and elements. However, the formal design is blended by the backrest which flows into the back of the legs making the chair distinctively sculptural and conveys an unassuming elegant receptiveness
HENRY XVII
HENRY XVII is an upholstered chair with an extraverted character and experimentation creating a very typical but simple armchair appropriate for different situations. The unassuming fine pleasant casualness contrast with simple and balanced proportions. Henry XVII is a versatile piece where the human is present, private or public, alone or with others. The user has the opportunity to continuously interact with the Armchair. Henry XVII has a very simple and straight forward internal frame made of wood. The use of webbing on both sides assures natural ease.
SF is a self-assembly modular shelf. Its framework consists of a horizontal plinth and vertical frames and offers harmony, unity, and simplicity. The panels slot into the framework gives the shelf both formal and functional solidness. The shelf is fully adaptable allowing the freedom to choose and personalize it particular to your needs. SF is assembled without any tools.
The SF shelf is designed where structure and material resolution are taken as given and allows to play and to play seriously
Bookshelf RD
The shelf is trying to achieve a simple degree of abstractness. Inspired by a polyform which than subtly replaced into a lighter structure. The rigorous form of the solid is canceled and reorganized to a pattern of its faces leading to a new substance of the object.
Sidetable RD
The side table includes the elements of both tetrahedron and hexahedron and varies between both forms depending on the position of the observer. The reflections in the polished surfaces of the base and the underside influence the perception of the observer while approaching the table. The hexahedron seems to fluently turn into the tetrahedron and vice versa.
COATRACK RD
The coat rack is a radically reduced dodecahedron. It is constructed of powder-coated aluminum. An imaginary line connecting the five suspension points depicts a pentagon, the characteristic face of the dodecahedron.
FLOORLAMP RD
S_02
S_02 – this project takes recognizable objects to open up a new relationship between the object and the observer and so create new parallels. It consists of a mirror and a bench and fits perfectly in any dressing room. The S_02 series is manufactured from solid oak and impresses with an aesthetically interesting form.
COPYRIGHT PHILLIPPBeisheim / 2020
South African Philipp Beisheim holds a MA Degree in Design from the Birmingham Institute of Art and Design and is a trained carpenter. He lives and works in Frankfurt am Main. He set up his studio in 2011 after working for several Designers. He is also the director of keinStil. GmbH, an interdisciplinary design practice. The office is active in several fields ranging from exhibition design, architectural collaborations, and product design. His aim as a designer is not to try to solve problems. It's much more about creating new situations, that simplify a discussion by bringing in a new context. His work intuitively pinpoints the most essential, visceral quality to an object. His work is characterized by a significant thing called feeling, as such, quite apart from the environment in which it is called forth.
studio philippbeisheim
Kranengasse 2
e: info@philippbeisheim.com
t: +49(0)6927274727
m: +49(0)1718315854


text:
Q: Как настроить сайдбар в Wordpress? Добрый день. Подключила 2 сайдбара в Wordpress. Соответственно нужно чтобы они были слева и справа. Вопрос в том чтобы динамически менялся размер центральной части в зависимости от того выбран один, либо оба сайдбара. Вот тут проблема, что то сильно туплю. Помогите советом или полезной ссылочкой.

A:
Помогите советом или полезной ссылочкой.

В зависимости от того как и где подключается.
http://codex.wordpress.org/%D0%98%D0%B5%D1%80%D0%B0%D1%80%D1%85%D0%B8%D1%8F_%D1%88%D0%B0%D0%B1%D0%BB%D0%BE%D0%BD%D0%BE%D0%B2
https://codex.wordpress.org/Function_Reference/wp_is_mobile
http://htmlbook.ru/css/media

A: Спасибо, вы меня немного не правильно поняли. Если я в админке выберу один сайдбар, нужно чтобы центральная часть занимала 75%. Если 2, то 50%. И вопрос был в том как сделать чтобы автоматически использовались необходимый набор правил. Мне подошел такой вариант https://kolakube.com/wordpress-layout-options/

A: Боюсь что вам придется не много поработать в шаблоне он у вас не резиновый похоже
Как вариант найти в css класс
.sideba-left и присвоить display:none;(в зависимости от темы)
Это должно убрать все левую полосу
Можно посмотреть тут
http://senka.ru/2009/12/14/dorabotka-shablona-dlia-wp-nalilnikom/

redpajama_set_name: RedPajamaStackExchange


ConsumerSearch Features product reviews from a variety of quality sources.
EnerGuide The Canadian government's guide to energy-efficient appliances, heating and cooling, and more.
FurnaceCompare.com Ratings and reviews on thousands of air conditioners, boilers, furnaces and heat pumps.


text:
Controversy surrounds appointment of UC Regent
The Daily Californian, 4/22/11.
By Jordan Bach-Lombardo
Daily Cal Senior Staff Writer
David Crane rides BART and runs to catch the bus.
He is a registered Democrat.
He worked almost 25 years at a multibillion dollar investment firm.
And since former Gov. Arnold Schwarzenegger appointed him to the UC Board of Regents in late December, Crane has become one of the most controversial appointees to the board in recent memory, with petitions circulating against his approval due to perceptions of his stance on collective bargaining in the public sector.
The University of California faces significant obstacles in the coming years and Crane knows it. But as debate rages on in Sacramento and across the state, it remains to be seen whether his opinions will become commonplace in the discourse that will shape the UC's future for the next 12 years.
Crane identifies one major source for the university's funding woes – the state.
"When the state Legislature 30 years ago was providing 30 percent of UC's funding and 10 years ago 21 percent of UC's funding, and now they're down to 11 percent of UC's funding, even though state revenues have risen sharply in those 30 years, then at whom should the finger be pointed?" he asked. "(The UC) is becoming a public university in name only, because the public is going away as a funding source."
The university faces at least a $500 million reduction in state funding for the next fiscal year. The cut is but the latest in a trend that has seen state funding for the UC plummet by over 50 percent in the last two decades – a trend that Crane, who worked closely on state budget issues as Schwarzenegger's adviser, says has no prospect of reversing soon.
But to address the drop in funds, UC leaders must truly understand the problem before them, he said.
"Sometimes I feel like people are acting as if these problems don't exist, as if people can magically say, 'We can have it all, and you can raise wages for people working there and lower tuition for people and don't worry about the state giving you more money,'" he said. "I think people aren't paying attention to the math."
To navigate this funding gap, Crane considers finding alternative revenue streams – rather than focusing on organizational efficiencies – paramount if the university is to maintain its excellence, access and affordability.
"You should always be as efficient as possible, but in a world where the state is reducing its funding so dramatically, almost no amount of money will make up for the amount the state has withdrawn," he said.
He said that he would explore the UC's five medical centers – which generated $5.9 billion in the 2009-10 fiscal year, according to UC documents – as one source of that revenue.
The main goal in finding new revenue is to preserve the university for the group Crane considers its main constituents: students and their families.
"I have to look at (proposals) in the context of what would it mean on holding the line on student undergraduate tuition," he said. "What I'm focused on is … maintaining access and (the UC) remaining the finest public university system in the world. That access I care the most about is for undergraduates."
In his time in the public sector – he served as Schwarzenegger's adviser from 2004 to 2010 – Crane gained a reputation for zealously advocating for his points of view.
"David Crane is very brash, confrontational and very aggressive in pursuing his point of view, and in a place that revolves around compromise and relationships, he didn't conform," said Democratic strategist Steve Maviglio.
Crane does not deny this characterization, but said that his method could be just what the board needs.
"The establishment always thinks that way of people who raise controversial issues or propose paths different than those prescribed by conventional wisdom," he said in an email. "In my experience, all boards need people who play different roles, including someone unafraid to point out when an emperor isn't wearing clothes."
When Schwarzenegger appointed Crane in the waning hours of his governance, some in the blogosphere termed it "the Terminator's parting shot."
Already faced with opposition due to his perceived close relationship with the Republican former governor, Crane's confirmation, contingent on state Senate approval, became a point of even greater controversy after he wrote an op-ed about collective bargaining rights in the public sector.
"Collective bargaining is a good thing when it's needed to equalize power, but when public employees already have that equality because of civil service protections, collective bargaining in the public sector serves to reduce benefits for citizens and to raise costs for taxpayers," reads the piece, printed Feb. 27 in the San Francisco Chronicle.
Many, including state Sen. Leland Yee, D-San Francisco/San Mateo, interpreted this as a declaration of war on collective bargaining rights in the public sector.
"I think it's pretty clear that based on the writings of David Crane that he felt that our UC employees are not to be organized and represented by unions, and I think that's not a position I can support," Yee said.
Crane's op-ed does not explicitly state that he wants to strip UC employees of collective bargaining rights.
The piece, published barely two weeks after Wisconsin Gov. Scott Walker stated his plan to eliminate state employees' collective bargaining rights, struck a similar chord with unions and faculty groups statewide.
American Federation of State, County and Municipal Employees Local 3299, University Professional and Technical Employees and the Berkeley Faculty Association have organized rallies or written petitions in opposition to his confirmation. The association's petition has garnered 1,475 signatures to date, according to Christine Rosen, co-chair of the association and associate professor at UC Berkeley's Haas School of Business.
Crane rebuts this interpretation of his writing, saying he simply presented the history of an issue that becomes a political hot potato the moment it is raised.
"It's Kafkaesque in a way … It's there in black and white, but someone is saying something completely different, and I can't control that," he said. "What's a substantive argument with someone who wants to maintain the Master Plan, who wants to maintain access, affordability and excellence?"
The Chronicle supported Crane in an editorial titled "State Sen. Leland Yee's attack on the truth," which chastised Yee's actions as the misquotations of an "opportunistic politician." The editorial went further and endorsed Crane for confirmation to the board.
But that is no done deal. According to Yee, many of his colleagues in Sacramento – among them state Sen. Ted Lieu, D-Torrance, who has also spoken up against the confirmation – will not vote for Crane.
Maviglio said despite the opposition, there is no way to know whether the confirmation will be voted down.
"It's almost like picking the pope," he said. "You never know what's going on in the back."
Link to full article: http://www.dailycal.org/article/112908/controversy_surrounds_appointment_of_uc_regent


Star Wars Force Arena on iOS and Android allows users to open overt 80 different characters from the Star Wars world and use them into online battles against other online players.
The game (Star Wars Force Arena) allows you to play against other online players in one-to-one or two-on two online battles. Players can also fight against the computer in single player practice match to train their team.Users can also invite their friends and play online battles.
In game players have a specific time to destroy their enemy's base, players must defend their own generator from the enemy. Every shield generator is guarded by turrets, and if the time runs out before either generator can be destroyed, the player who destroyed the most turrets will win the match.
Users can control their leader character, like Luke Skywalker or Darth Vader by tapping on the battlefield to move and attack on enemies. Users can set other units to the battlefield by spending energy to play cards from their decks. This requires energy to play and the energy gets recharged automatically after some time.
The good thing about the game is as users win a match, the user will receive a pack containing more cards for their decks. Users can also get duplicate cards from which they can use to upgrade the base cards, powering their teams.There are four different decks in the game, two decks to represent the Rebel Alliance and two decks for representing the Galactic Empire.
"In Star Wars™: Force Arena you will lead a powerful team of iconic Star Wars™ characters, including new favorites from Rogue One™: A Star Wars™ Story, into real-time, adrenaline-fueled battles against other players from around the globe!
Players must form a powerful squad from a roster of over 80 upgradable characters and units to emerge victorious in the quest for galactic dominance.


Amid many Alternative Risk Premia (ARP) launches, some are asking if ARP is likely to replace hedge funds. We expect ARP can expand the liquid alternatives market, without taking assets away from hedge funds. ARP strategies are generally based on transparent and well understood risk premiums that can be accessed through liquid markets. These risk premiums seem very powerful and persistent over multiple decades, but some of them have shown weaker returns over the past decade. Sharpe ratios from many standalone risk premiums, such as trend-following, currency carry trades, and value investing in equities, appear to have waned. Whether this is cyclical or structural remains to be seen, but ARP strategies do not generally appear to be using the very latest models, techniques, and data sources.
And ARP strategies may become progressively less likely to replicate hedge fund returns, as hedge funds are increasingly seeking to differentiate their strategies from generic risk premiums (and of course from their own ARP products). For instance, every equity market neutral manager I have interviewed stresses how their returns and factors are lowly correlated, or uncorrelated, to generic factors such as value, growth, momentum and quality that some ARP strategies are based on. Similarly, many CTAs demonstrate how their strategies use alternative data, some non-trend strategies, trade different time frames, and trade more and/or different markets.


The power of social media can be staggering, but so can the downward drag of all the dross and spam.
As millions flock to use twitter and similar services, sifting out the rubbish can become a chore (even with clever applications automating it). It's a bit like discovering an excellent pub where the beer is superb and the conversation even better. At first, a select group frequents the pub, but over months more and more people discover it and eventually it becomes crowded and noisy. Perhaps some of the regulars retreat to a private room to recreate the atmosphere that originally attracted them or maybe even find another pub they can visit in comfort. The pub is now just like any other and eventually it is abandoned and closes as people move on to the next up-and-coming hostelry.
In marketing terms, this happens all the time as businesses look for new ways of promoting and selling their products and services. Underneath, a lot of what they are doing should be the same: researching products and markets, updating business plans, developing campaigns to advertise and sell products.
What does change is peripheral activity: advertising, promotion and public relations. As one method loses its attraction, another is invented or rediscovered. I call it peripheral because it is often the delivery mechanism or format that changes most, although in no way are these unimportant. These activities can range from the traditional, such as print advertising, to the revolutionary and can often be be mixed and matched to suit specific marketing objectives.
One of the most exciting aspects of marketing is finding new ways of communicating that make you stand out from your competitors. Inevitably, others will catch up and copy you, your target audiences lose interest as new campaigns grow familiar until the hunt begins for the next new method.
Change is constant at this periphery, but the main marketing vision has to remain consistent to achieve the objectives of the business plan. Balancing the consistency of the core business vision with the changing nature of peripheral activity is a challenge, but getting it right is crucial. It means that you can choose from a huge choice of marketing tools, watching the new grow old and at the same time keeping an eye on the horizon for tomorrow's new tools and opportunities.
What's important is not to be distracted by peripheral vision from seeing what's ahead.


text:
Overwatch League™ Grand Finals Sells Out Barclays Center
June 1, 2018 at 8:00 AM EDT
Fans purchased more than 20,000 tickets to the esports championship in Brooklyn, New York
The largest esports event ever slated at Barclays Center sold out within two weeks of its public on-sale date
IRVINE, Calif.--(BUSINESS WIRE)--Jun. 1, 2018-- Tickets to the first-ever Overwatch League Grand Finals have sold out. The competition to determine the champions of the world's first major global, city-based esports league will be held over July 27–28 at Barclays Center in Brooklyn, New York. More than 20,000 tickets were snapped up following the public on-sale date on Friday, May 18, marking the largest esports event ever slated at Barclays Center.
This press release features multimedia. View the full release here: https://www.businesswire.com/news/home/20180601005217/en/
The first-ever Overwatch League Grand Finals will be held at Barclays Center in Brooklyn, New York. (Photo: Business Wire)
"We knew the Overwatch League had amazing, enthusiastic fans, but this is something else," said Overwatch League commissioner Nate Nanzer. "We're incredibly excited to play to a packed house at one of the world's premier sports and entertainment arenas. With the help of our broadcast team, our partners, and Barclays Center, we're going to put on a first-class show for everyone in attendance, and for the millions more who will be watching online."
"We are thrilled with the momentum behind the Overwatch League Grand Finals," said Keith Sheldon, EVP of Programming, BSE Global. "Our goal at Barclays Center is to be the destination for major esports events. That vision is taking shape as a result of a great partnership with the talented team behind the Overwatch League."
The Grand Finals is the culmination of the Overwatch League's inaugural season, which kicked off with the first regular-season matchup on January 10. Play has continued over four thrilling stages since then, each capped by a Stage Finals. The Stage 4 Finals are scheduled for June 17, and will be followed by the Overwatch League Playoffs, from July 11–21, at Blizzard Arena Los Angeles, in Burbank, California. Tickets to all remaining regular-season matches and playoffs are now available from AXS.com. During the playoffs, six teams will battle to punch their ticket to Brooklyn and Barclays Center. The two teams that reach the Grand Finals will compete for a share of the USD $1.4 million prize pool, the Overwatch League trophy, and to capture history as the league's inaugural champions.
The Overwatch League Grand Finals will be streamed live from Barclays Center on Twitch, OverwatchLeague.com and the Overwatch League app, and on MLG.com.
About the Overwatch League™
The Overwatch League™ is the first major global professional esports league with city-based teams across Asia, Europe, and North America. Overwatch® was created by globally acclaimed publisher Blizzard Entertainment (a division of Activision Blizzard—Nasdaq: ATVI), whose iconic franchises have helped lay the foundations and push the boundaries of professional esports over the last 15 years. The latest addition to Blizzard's stable of twenty-one #1 games,[1] Overwatch was built from the ground up for online competition, with memorable characters and fast-paced action designed for the most engaging gameplay and spectator experiences. To learn more about the Overwatch League, visit www.overwatchleague.com.
About BSE Global
BSE Global, formerly Brooklyn Sports & Entertainment, develops and operates state-of-the-art venues and manages premier sports franchises, delivering dynamic content and experiences for audiences. BSE oversees programming, marketing, sales, and operations for Barclays Center; NYCB LIVE, home of the Nassau Veterans Memorial Coliseum; LIU Brooklyn Paramount Theatre; and Webster Hall. BSE manages and controls the Brooklyn Nets and its NBA G League team, the Long Island Nets, as well as the business operations of the NHL's New York Islanders.
Barclays Center, which opened on September 28, 2012, offers 17,732 seats for basketball, 15,795 for hockey, and up to 19,000 seats for concerts, and has 101 luxury suites, four bars/lounges, four clubs, and Parm Italian Restaurant & 40/40 CLUB by Tanduay Rum.
NYCB LIVE reopened on April 5, 2017, after undergoing an extensive renovation. The venue offers 14,500 seats for basketball, MMA and boxing; 13,900 for hockey; up to 15,000 for concerts; and 4,500 seats for its theater configuration.
With a focus on emerging businesses, BSE identifies and creates alliances, strategic partnerships and other business opportunities to ensure the success of its assets.
© 2018 Blizzard Entertainment, Inc. OVERWATCH, OVERWATCH LEAGUE, BLIZZARD and BLIZZARD ENTERTAINMENT are trademarks of Blizzard Entertainment, Inc., in the United States and/or other countries.
[1] Sales and/or downloads, based on internal company records and reports from key distribution partners.
Cautionary Note Regarding Forward-looking Statements: Information in this press release that involves Blizzard Entertainment's expectations, plans, intentions or strategies regarding the future, including statements about the dates, events and features of the Overwatch League, including details about the Stage 4 Finals, Playoffs, and Grand Finals of the inaugural season, are forward-looking statements that are not facts and involve a number of risks and uncertainties. Factors that could cause Blizzard Entertainment's actual future results to differ materially from those expressed in the forward-looking statements set forth in this release include unanticipated product delays and other factors identified in the risk factors sections of Activision Blizzard's most recent annual report on Form 10-K and any subsequent quarterly reports on Form 10-Q. The forward-looking statements in this release are based upon information available to Blizzard Entertainment and Activision Blizzard as of the date of this release, and neither Blizzard Entertainment nor Activision Blizzard assumes any obligation to update any such forward-looking statements. Forward-looking statements believed to be true when made may ultimately prove to be incorrect. These statements are not guarantees of the future performance of Blizzard Entertainment or Activision Blizzard and are subject to risks, uncertainties and other factors, some of which are beyond its control and may cause actual results to differ materially from current expectations.
Source: Activision Blizzard, Inc.
Mark Van Lommel
MVanLommel@overwatchleague.com
BSE Global
Mandy Gutmann
Vice President, Communications
mgutmann@brooklynse.com
Stuart Bryan
Senior Manager, Communications
sbryan@brooklynse.com
Gina Antoniello
gantoniello@brooklynse.com


1930s German Bisque Figurine Scared Child carrying a Pumpkin excellent 3 1/4"
There were a number of different cold-painted bisque items produced in the early 1930s by the Germans with a Halloween theme. These figurines have become quite popular with Halloween collectors over the last ~5 years. I used to see them with some frequency, but that day has passed. I'll have two such figurines in my annual auction held in May. One has perfect paint - like it was purchased and immediately stored away. If you've purchased my reference book from me directly, please ensure that I have your contact information, so that notifications about the auction can be sent in April. The auction is only open to those who have purchased a copy of the third edition of Vintage Halloween Collectibles from me directly.
01/24 Update: This great item sold for $70.
I don't believe this item is from any vintage porcelain tea set - German or Japanese. It looks amateurish, especially the teeth. I think this is the result of someone with a modicum of talent copying the features from an authentic cup, perhaps for their own amusement. It doesn't have collectible value in terms of vintage Halloween.
02/22 Update: I'm glad no one seemed to be fooled by this fake. It sold for $58.00.
RARE Vintage Halloween Composition Devil Head Lantern W/ Orig Insert Formalite ?
I've received a number of inquiries as to my opinion of this item. I know the seller to be an ethical and affable person who has long been a collector of vintage Halloween memorabilia. I have much regard for him. That said, I don't feel this lantern has much age to it. From what I understand, the Formalite process applied to items made from original F.N. Burt molds simply means a gesso-like coating over the typically used pulp, like shown in the second photo. I question why the bottom of the one up for auction is flat. If original molds were used, why wouldn't the bottom be indented, like the one shown in the third photo? (Notice, too, that the lantern shown in the third photo is marked.) The lantern up for auction seems to be made from composition, not pulp. I suspect it was probably made off-shore sometime in the last 15 years.
My thanks to a long-time blog follower for supplying the second and third photos.
This large form-factor, elegant invitation was scooped up for a relative bargain. Produced during the 1920s, there is a matching tally card.
I purchased a wonderful lot of these small late-1920s diecuts about 18 months ago. I long felt they were probably made by Whitney until I saw an identical image of one of the diecuts on a Hallmark tally card. So, it seems likely this was made by Hallmark. Each of the set of small diecuts has the central image outlined in orange, like this one. That may be a defining characteristic enabling one to attribute any future found such diecuts to Hallmark. I'll be posting the diecuts now in the collection on the site's new Acquisitions page at some point. If you haven't yet perused the Acquisitions page, be my guest.
A long-time collecting friend of mine scooped up this exceedingly rare Beistle treasure for the laughably low price of $136.16. (The clueless seller had listed it in the Halloween Modern category causing people like me, who seldom troll those dispiriting listings, to miss this treasure. I'll be adding a daily perusal of this category from now on.) The lantern this uninspired Beistle creation - a puzzle for simpletons - depicts, was produced in 1930-1931, so the enveloped set was surely one of the last items they produced with the diamond mark. So, at this point, I know now that Beistle used the stunning art of the lantern, which was made in two sizes, only on one other item - this puzzle.
Although these items do not fall within the category of a vintage Halloween collectible, I thought I'd comment on this sale nonetheless. I began seeking to buy complete Antikamnia Chemical Company calendar sets over twenty years ago, well before interest in them began to soar. The firm, long defunct, sent calendars to doctors gratis as an advertising gimmick. The first calendar was 1897. From that year through 1900 each complete calendar consisted of 6 hand-tinted cards showing two months each. These mischievous skeletons were drawn by Louis Crusius. Although he died at a young age in 1898, Antikamnia had purchased enough drawings to publish and distribute these calendars through 1901. (The last year's calendar consists of only 4 hand-tinted cards showing three months each.) I now own near-mint or better examples of each calendar page, numbering 28 in total. They look awesome framed together. I'm glad to see they are finally getting the exposure in popular culture that I feel they deserve.
I feel $1200 is an enormous sum to pay for this trio of favor baskets. Beistle produced four designs of this size from 1927 through 1931. The best design, the witch wearing a dress decorated with skulls, is not amongst this trio. Even at $300 each, the envelope isn't worth the remaining $300. It might be if it was something to look at, but being a plain glassine envelope limits its appeal and brings the "wow" factor down to nothing.
This seller has listed this very common pulp nut cup at the laughably high price of $975! Shipping is only $10.80. How rose-colored are their glasses? It must be great to be so optimistic!
01/10 Update: Some sense in making its way into the seller's head as the BIN price has now dropped to $800 OBO. Fair market value is $35.
This is an interesting item. The art was almost certainly derived from Dennison's Gobolink cut-out, which they released in 1925. Although Dennison provided some financial assistance in capitalizing the C.A. Reed Corporation during the 1920s, this item is the first tangible result of the arm's length relationship between the two firms I've seen. There are subtle differences, most notably the extra buttons to better hold in this version's slightly more-swelled belly!
Here is another relative bargain, although not as pronounced as the item directly below. This has to be one of Dennison's most inspired designs. The artist packed a lot of detail in such a small item, meant to be used as a place card. This first appeared in 1928. As I point out on page 257, "Notice the cat's face in the flame and the candle's expression. Although not particularly scarce, this iconic, diminutive Dennison masterpiece consistently sells at or above the cited value. It was sold with stock number H565." These have routinely changed hands in a range of $135-200 during the last 18 months, so the prevailing bidder did well.
Wow, people were asleep at the switch here, including me. This is one of those increasingly rare, true bargains for a great piece of truly vintage Halloween memorabilia. This is one of four favor basket designs Beistle produced from 1927-1931. (I think it is the least interesting of the four designs. The best is the witch wearing a skull-festooned dress.) You can see them all on page 225.
This exceedingly rare double vase certainly went for a lot of money, mainly due to my bidding. I was the underbidder, actually content not to have had to pay my top bid of $3215.15. I placed the bid, thinking there may be a very few collectors more crazed than I who would pay such money. I was right. Although I would liked to have it as part of the collection, in the final analysis, the price was too high, so I was not unhappy to have been outbid. Congrats to whomever the prevailing bidder was.


text:
Eye of Macau
Welcoming a new icon for the Taipa district, KPF's design proposal for the "Eye of Macau" boldly greets the Pearl River Delta.
Facing both the historic city center of Macau and the newly-created Cotai district, the design study engages both neighborhoods, as well as connects the neighboring Macau-Taipa Bridge to the north and the mountains to the south. The design fuses multiple uses into a sinuous loop – "The Eye" – a solution that brings three large-scale hotels, an aquarium, and gaming entertainment halls together in a singular, fluid gesture.
Internally, two seemingly twisted hotels wrap two straight cores to meet either side of the lateral support for the structure, a horizontal bridge completing the loop. The crest, 230 meters in the air, is topped with a "super hall" overlooking the city with unobstructed views to both sides of the islands from Cotai to Macau. A piazza in the sky, the building's highest point is programmed for public events, availing views previously only accessible from the tops of the mountains. The additional torque of the tower is achieved via one grand hotel suite per floor that marches one bay at each level on each tower. At the podium, the loop cloaks the aquarium, exhibition, gaming and entertainment halls continuing the formal twist from the Eye above.
The gesture simultaneously relates the building to its context while providing an unmistakable form on the Macau skyline. Positioned at water's edge, on a calm day, the Eye's reflection forms a figure 8, a Chinese symbol of good fortune.
Hotéis, Uso Misto
134,709 m2 / 1.45 million ft2
MGM Cotai
Macau China
NEXT Tokyo


Hai! Im Apple303. I decided to join this site because I like pivot and... I was very bored. and if you did not notice your Sites' Abbreviation would be J.A.P.S. But that does not really matter. Anyway. Woobles and good bye.
Hello, great to see a new member.
Can I upload them directly to the site? I dont like going through a middle man. If I cant upload directly to the site It may take a while before i upload.. Anything.
Nah, I don't have any share service up here, I can't.
Well then This poses a problem as I tend to despise image hosting sites. they are quite annoying to use.
Ill just post the few vids I upload to youtube.
I don't see why you think they are annoying.
Whatever, I have an account on this site ill upload it form tghere.
I did not notice the JAPS, that was great of you to point that out.


BuilderEdge has created the long-awaited cloud-based construction power tool that provides no-hassle total quality management.
A single tailored end to end cloud-based solution created especially for the construction industry, including management tools, scheduling, finance and quality control.
No need for data collection, manual synchronizing, or multiple platforms. Just plug & play.


text:
The Audi A4 is beautifully made and comes with a high level of technology and standard kit. If you value edgy design or a thrilling drive, though, there are better options.
High-quality interior
Quiet and comfy to drive
Alternatives are more fun to drive
Restrained design inside and out
Hesitant automatic gearbox
Audi A4: what would you like to read next?
What's it like inside?
How practical is it?
Are you currently at work? If so, go and have a little peek out of the window at the car park – you'll almost certainly see an Audi A4 parked out there. Together with the BMW 3 Series and Mercedes C-Class, this German trio is a dominant force among executive saloons.
But it's fair to say that the latest A4, despite this facelift, is more restrained inside and out than its alternatives in terms of design. There are new LED lights and bumpers front and back, a flatter single-frame grille and bigger air intakes, but the A4 is still less in-your-face than the BMW or Mercedes.
Inside the A4 remains simple, intuitive to use and stylish. It's not quite as sporty as the Jaguar XE's wraparound design but the Audi's numerous aluminium and soft-plastic trims look classy and feel absolutely bulletproof. No other car this size is quite as well built as the Audi A4. What is different to the pre-facelift version is the infotainment. Every model gets a bright, high-definition 10-inch widescreen atop its dashboard, DAB radio, Bluetooth, built-in sat-nav and Apple CarPlay and Android Auto as standard.
You won't have any trouble getting comfortable in the Audi A4's front seats. There's loads of head- and legroom and plenty of seat adjustment as standard. Space in the back is very nearly as generous as up front. There's enough room for a six-foot-tall passenger to stretch out behind an equally lanky driver and more headroom than in the C-Class and XE. And the A4's 480-litre boot is exactly the same size as in the C-Class and 3 Series and it's easily big enough to carry a set of golf clubs or a large baby buggy.
It's business as usual among the German trio: if you want a fun drive, buy a 3 Series. Love a stylish design? It's the C-Class. But for great tech and quality, you'll need this Audi A4.
There will eventually be seven engine choices (three petrol, four diesel) for the A4, all turbocharged and most of which with a mild hybrid system to improve fuel economy. If you do the majority of your driving in town or don't like the idea of diesel, then the 150hp 2.0-litre 35 TFSI is the best bet. It easily has enough power and low-down pull to haul the A4 along and is exceptionally smooth and quiet.
If you're buying an A4 as a company car or often travel long distances on the motorway then you're probably better off buying a diesel. In which case the 163hp, 2.0-litre 35 TDI is the better choice. It feels eager to surge forward when accelerating, yet will return around 50mpg if driven carefully.
The Audi A4 is an easy and comfortable car to drive in town, doesn't wander about in its lane on the motorway and there's very little wind and road noise heard inside at higher speeds. Where the A4 isn't quite a good as its alternatives is when pushing hard on country roads. Sure, the A4 grips hard and has precision to its steering, but a BMW 3 Series and Jaguar XE are more communicative and ultimately more fun on the right road.
So, aside from it being fairly restrained to behold and not huge fun to thrash through bends the Audi A4 has a lot going for it. If you're sold on its great tech, quality and space, then check out our deals pages for the best prices.
You'll love climbing into the Audi A4 each morning – the quality of its interior is fantastic. Its infotainment system is great too, although BMW's iDrive continues to be even easier to use.
Read full interior review
The Audi A4 is spacious inside for four adults and offers a decent boot too.
Saloons aren't the most practical cars at the best of times, but the Audi A4 puts in a decent showing. Still, if you want more space, there's always the Audi A4 Avant estate.
Boot (seats up)
Boot (seats down)
Passenger space
You won't have any trouble getting comfortable in the Audi A4's front seats – even if you're very tall. There's loads of head- and legroom and plenty of seat adjustment as standard, including four-way lumbar adjustment to save your lower back on long journeys.
Electric seat adjustment costs extra depending on which model you pick, but it does come with a handy memory feature so you won't have to fiddle around with the seat's settings each time you lend your car to someone else.
Space in the back is very nearly as generous as up front. There's enough room for a six-foot-tall passenger to stretch out behind an equally lanky driver and more headroom than in the C-Class and XE – even in models fitted with the optional panoramic glass roof.
Your passengers will have plenty of space to tuck their feet under the front seats too, and the Audi A4's wide cabin means there's more shoulder room for three adults to sit side-by-side than in the C-Class, 3 Series or XE. Okay, the central seat's not quite as comfortable as the outer two but it's still reasonably soft and there's only a slight lump in the floor to get in the way of your middle passenger's feet.
The wide rear door openings make it pretty easy to lift in a child seat and the Isofix anchor points come with clearly marked plastic caps – just be careful not to lose them. The Audi A4's relatively low roof means you'll have to duck down slightly to strap in a child but it's no more difficult than in the 3 Series, C-Class or XE.
All the Audi A4's door bins are big enough to hold a 1.5-litre bottle and there's space for an equally large bottle in the glovebox.
You get a pair of large cupholders in the centre console up by the dashboard and a roomy storage bin under the flip-up front armrest that's perfect for hiding small valuables safely out of sight.
Boot space
The Audi A4's 480-litre boot is exactly the same size as in the C-Class and 3 Series and it's easily big enough to carry a set of golf clubs or a large baby buggy. It's slightly easier to load items in the Audi than the Mercedes or BMW thanks to its wider opening and lower boot lip, however.
You get a few handy fold-out shopping hooks to hold your groceries securely in place but you'll have to pay extra for the Storage Pack if you want some handy netted cubbies and a 12V socket.
Unfortunately, the Audi A4 doesn't come with underfloor storage, but you do get three-way (40:20:40) split rear seats as standard so you can carry up to three passengers and some very long luggage at once.
Need to carry even more luggage? Flip all three back seats down and you'll have access to a roomy 965-litre load bay – that's exactly the same size as the Mercedes and a little more than the BMW. The seats don't fold completely flat so it's a little tricky to push heavy boxes right up behind the front seats but there's just enough space to lift in a bike with both its wheels attached.
Great engines, quiet and comfy to drive
Audi gives you lots of engine choice and the A4's quiet and comfy drive is impressive. If you want driving thrills, though, you're better off with a BMW 3 Series.
It's easy to get carried away with such an amazing amount of choice, but even the A4's lesser engines are punchy, saving you money when buying and running it.
Performance and Economy
There will eventually be seven engine choices (three petrol, four diesel) for the A4, all turbocharged and most of which come with a mild hybrid system to improve fuel economy. This starts with the 136hp 30 TDI diesel, and ends with the 245hp 45 TFSI petrol, although there's also the sportier 347hp S4 diesel and 444hp RS4, which we've reviewed separately.
Ultimately, a couple of engines standard out. If you do most of your driving in town or don't like the idea of diesel, then the 150hp 2.0-litre 35 TFSI is the best bet. It easily has enough power and low down pull to haul the A4 along and is exceptionally smooth and quiet. The more powerful 40 and 45 TFSI engines are quicker and pull harder, but cost more to buy and fuel.
If you're buying an A4 as a company car or often travel long distances on the motorway then you're probably better off buying a diesel. In which case, the 163hp, 2.0-litre 35 TDI is the better choice. It feels eager to surge forward when accelerating, yet will return around 50mpg if driven carefully and has low CO2 emissions – which is ideal for company car buyers. Again, the 40 TDI and 45 TDI are quicker still, but not by enough to make their higher price and fuel bills seem worth it.
Audi's seven-speed automatic gearbox is available with every engine – it's slick once you're up and running, but does hesitate a bit in town. A six-speed manual will be available with lesser engines later on.
The Audi A4 is an easy and comfortable car to drive in town. It's best to keep its alloy wheels as small as possible and avoid the sportier suspension of S Line trim for the best comfort, but even then you don't crash into potholes or thud into ruts. Visibility is good for the driver, although front and rear parking sensors are standard in any case and the A4's steering is light enough to make tight manoeuvres a piece of cake.
It's all good news on the motorway too. The A4 doesn't wander about in its lane and there's very little wind and road noise inside. The petrol models are especially quiet.
For even more relaxation you can add Audi's Driver Assistance Tour Pack which brings a system that'll accelerate, brake and steer to keep you in your lane as long as you keep your hands on the steering wheel.
Where the A4 isn't quite a good as its alternatives is when pushing hard on country roads. Sure, the A4 grips hard and has precision to its steering, but a BMW 3 Series and Jaguar XE are more communicative and ultimately fun on the right road. S Line A4s have lower, stiffer sports suspension and adaptive suspension is available across the range as an option to improve body control, but even then the A4 doesn't quite put as big a smile on your face.
Read about prices & specifications
2019 Audi A4: Price, specs and release date
New Audi S3 spotted
Living with – an Audi Q3
New Audi Q7 revealed
2019 Audi SQ8 unveiled


What Can I Do If My Clients Aren't Paying Their Bills On Time?
What Can I Do If My Clients Aren't Paying Their Bill?
It is not entirely uncommon for clients to feel like they do not have to pay independent contractors in a timely manner, or at all in some cases. Unfortunately, there is no governmental agency dedicated towards helping small business owners and independent contractors collect the payments that clients owe them. If clients aren't paying their bill, it is completely up to the contractor or business owner to do whatever needs to be done to get payment.
Even more unfortunate is that some clients are totally aware that collecting payment can be especially difficult for independent contractors, and they will use that knowledge to their advantage. Some clients will try every excuse, scheme, lie, or manipulation to get out of paying you for a completed project.
There are a few keys to getting paid as an independent contractor. Hopefully, the client is just late on the payment and has no intention of stiffing you on the bill. Take the following steps and you will know what kind of client you are dealing with.
Notice Letter – Often, businesses will send a letter reminding a client of a payment that is past due. Most independent contractors typically wait until the 60 or 90 day mark to send a notice letter. In some cases, the client may have just forgotten that they did not send payment, or in other cases, they themselves are having financial trouble and were simply waiting until the last minute. In either of these cases, a notice letter will usually prompt them to send payment shortly.
Get Personal – if the notice letter does not seem to have helped, it may be time to up your game. Start calling the client. If the client is a big business, it is likely you will have to talk to people in the accounts payable department at first, but do not hesitate to call people in management or higher. If phone calls do not seem to be working either, make an appointment with someone at the company, someone high up the totem pole.
Small Claims Lawsuit – Nobody wants it to have to come to this point, but if a client refuses to pay you what they owe, then filing a lawsuit against them may be the best option. If the amount you are owed is less than $10,000, you can take your complaint to the small claims court.
Superior Claims Lawsuit – In cases where a client owes you more than $10,000, your lawsuit will be filed in the municipal court.
Arbitration – Prior to filing a lawsuit, double check to see if there is an arbitration clause in your contract agreement with the client. If there is an arbitration clause, sometimes called a dispute resolution clause, then you may be required to file your complaint in arbitration instead of in court. This means that an arbitrator will oversee your case instead of a judge.