text:
#include "Log.h"
#include "Crypto.h"
#include "RouterContext.h"
#include "I2NPProtocol.h"
#include "NetDb.hpp"
#include "Transports.h"
#include "Config.h"
#include "HTTP.h"
#include "util.h"

using namespace i2p::data;

namespace i2p
{
namespace transport
{
	template<typename Keys>
	EphemeralKeysSupplier<Keys>::EphemeralKeysSupplier (int size):
		m_QueueSize (size), m_IsRunning (false), m_Thread (nullptr)
	{
	}

	template<typename Keys>
	EphemeralKeysSupplier<Keys>::~EphemeralKeysSupplier ()
	{
		Stop ();
	}

	template<typename Keys>
	void EphemeralKeysSupplier<Keys>::Start ()
	{
		m_IsRunning = true;
		m_Thread = new std::thread (std::bind (&EphemeralKeysSupplier<Keys>::Run, this));
	}

	template<typename Keys>
	void EphemeralKeysSupplier<Keys>::Stop ()
	{
		{
			std::unique_lock<std::mutex> l(m_AcquiredMutex);
			m_IsRunning = false;
			m_Acquired.notify_one ();
		}
		if (m_Thread)
		{
			m_Thread->join ();
			delete m_Thread;
			m_Thread = 0;
		}
	}

	template<typename Keys>
	void EphemeralKeysSupplier<Keys>::Run ()
	{
		i2p::util::SetThreadName("Ephemerals");

		while (m_IsRunning)
		{
			int num, total = 0;
			while ((num = m_QueueSize - (int)m_Queue.size ()) > 0 && total < 10)
			{
				CreateEphemeralKeys (num);
				total += num;
			}
			if (total >= 10)
			{
				LogPrint (eLogWarning, "Transports: ", total, " ephemeral keys generated at the time");
				std::this_thread::sleep_for (std::chrono::seconds(1)); // take a break
			}
			else
			{
				std::unique_lock<std::mutex> l(m_AcquiredMutex);
				if (!m_IsRunning) break;
				m_Acquired.wait (l); // wait for element gets acquired
			}
		}
	}

	template<typename Keys>
	void EphemeralKeysSupplier<Keys>::CreateEphemeralKeys (int num)
	{
		if (num > 0)
		{
			for (int i = 0; i < num; i++)
			{
				auto pair = std::make_shared<Keys> ();
				pair->GenerateKeys ();
				std::unique_lock<std::mutex> l(m_AcquiredMutex);
				m_Queue.push (pair);
			}
		}
	}

	template<typename Keys>
	std::shared_ptr<Keys> EphemeralKeysSupplier<Keys>::Acquire ()
	{
		{
			std::unique_lock<std::mutex> l(m_AcquiredMutex);
			if (!m_Queue.empty ())
			{
				auto pair = m_Queue.front ();
				m_Queue.pop ();
				m_Acquired.notify_one ();
				return pair;
			}
		}
		// queue is empty, create new
		auto pair = std::make_shared<Keys> ();
		pair->GenerateKeys ();
		return pair;
	}

	template<typename Keys>
	void EphemeralKeysSupplier<Keys>::Return (std::shared_ptr<Keys> pair)
	{
		if (pair)
		{
			std::unique_lock<std::mutex>l(m_AcquiredMutex);
			if ((int)m_Queue.size () < 2*m_QueueSize)
				m_Queue.push (pair);
		}
		else
			LogPrint(eLogError, "Transports: Return null DHKeys");
	}

	Transports transports;

	Transports::Transports ():
		m_IsOnline (true), m_IsRunning (false), m_IsNAT (true), m_CheckReserved(true), m_Thread (nullptr),
		m_Service (nullptr), m_Work (nullptr), m_PeerCleanupTimer (nullptr), m_PeerTestTimer (nullptr),
		m_SSU2Server (nullptr), m_NTCP2Server (nullptr),
		m_X25519KeysPairSupplier (15), // 15 pre-generated keys
		m_TotalSentBytes(0), m_TotalReceivedBytes(0), m_TotalTransitTransmittedBytes (0),
		m_InBandwidth (0), m_OutBandwidth (0), m_TransitBandwidth(0),
		m_LastInBandwidthUpdateBytes (0), m_LastOutBandwidthUpdateBytes (0),
		m_LastTransitBandwidthUpdateBytes (0), m_LastBandwidthUpdateTime (0)
	{
	}

	Transports::~Transports ()
	{
		Stop ();
		if (m_Service)
		{
			delete m_PeerCleanupTimer; m_PeerCleanupTimer = nullptr;
			delete m_PeerTestTimer; m_PeerTestTimer = nullptr;
			delete m_Work; m_Work = nullptr;
			delete m_Service; m_Service = nullptr;
		}
	}

	void Transports::Start (bool enableNTCP2, bool enableSSU2)
	{
		if (!m_Service)
		{
			m_Service = new boost::asio::io_service ();
			m_Work = new boost::asio::io_service::work (*m_Service);
			m_PeerCleanupTimer = new boost::asio::deadline_timer (*m_Service);
			m_PeerTestTimer = new boost::asio::deadline_timer (*m_Service);
		}

		bool ipv4; i2p::config::GetOption("ipv4", ipv4);
		bool ipv6; i2p::config::GetOption("ipv6", ipv6);
		i2p::config::GetOption("nat", m_IsNAT);
		m_X25519KeysPairSupplier.Start ();
		m_IsRunning = true;
		m_Thread = new std::thread (std::bind (&Transports::Run, this));
		std::string ntcp2proxy; i2p::config::GetOption("ntcp2.proxy", ntcp2proxy);
		i2p::http::URL proxyurl;
		// create NTCP2. TODO: move to acceptor
		if (enableNTCP2 || i2p::context.SupportsMesh ())
		{
			if(!ntcp2proxy.empty() && enableNTCP2)
			{
				if(proxyurl.parse(ntcp2proxy))
				{
					if(proxyurl.schema == "socks" || proxyurl.schema == "http")
					{
						m_NTCP2Server = new NTCP2Server ();
						NTCP2Server::ProxyType proxytype = NTCP2Server::eSocksProxy;

						if (proxyurl.schema == "http")
							proxytype = NTCP2Server::eHTTPProxy;

						m_NTCP2Server->UseProxy(proxytype, proxyurl.host, proxyurl.port, proxyurl.user, proxyurl.pass);
						i2p::context.SetStatus (eRouterStatusProxy);
						if (ipv6)
							i2p::context.SetStatusV6 (eRouterStatusProxy);
					}
					else
						LogPrint(eLogError, "Transports: Unsupported NTCP2 proxy URL ", ntcp2proxy);
				}
				else
					LogPrint(eLogError, "Transports: Invalid NTCP2 proxy URL ", ntcp2proxy);
			}
			else
				m_NTCP2Server = new NTCP2Server ();
		}

		// create SSU2 server
		if (enableSSU2)
		{
			m_SSU2Server = new SSU2Server ();
			std::string ssu2proxy; i2p::config::GetOption("ssu2.proxy", ssu2proxy);
			if (!ssu2proxy.empty())
			{
				if (proxyurl.parse (ssu2proxy) && proxyurl.schema == "socks")
				{
					if (m_SSU2Server->SetProxy (proxyurl.host, proxyurl.port))
					{
						i2p::context.SetStatus (eRouterStatusProxy);
						if (ipv6)
							i2p::context.SetStatusV6 (eRouterStatusProxy);
					}
					else
						LogPrint(eLogError, "Transports: Can't set SSU2 proxy ", ssu2proxy);
				}
				else
					LogPrint(eLogError, "Transports: Invalid SSU2 proxy URL ", ssu2proxy);
			}
		}

		// bind to interfaces
		if (ipv4)
		{
			std::string address; i2p::config::GetOption("address4", address);
			if (!address.empty ())
			{
				boost::system::error_code ec;
				auto addr = boost::asio::ip::address::from_string (address, ec);
				if (!ec)
				{
					if (m_NTCP2Server) m_NTCP2Server->SetLocalAddress (addr);
					if (m_SSU2Server) m_SSU2Server->SetLocalAddress (addr);
				}
			}

			if (enableSSU2)
			{
				uint16_t mtu; i2p::config::GetOption ("ssu2.mtu4", mtu);
				if (mtu)
				{
					if (mtu < (int)SSU2_MIN_PACKET_SIZE) mtu = SSU2_MIN_PACKET_SIZE;
					if (mtu > (int)SSU2_MAX_PACKET_SIZE) mtu = SSU2_MAX_PACKET_SIZE;
					i2p::context.SetMTU (mtu, true);
				}
			}
		}

		if (ipv6)
		{
			std::string address; i2p::config::GetOption("address6", address);
			if (!address.empty ())
			{
				boost::system::error_code ec;
				auto addr = boost::asio::ip::address::from_string (address, ec);
				if (!ec)
				{
					if (m_NTCP2Server) m_NTCP2Server->SetLocalAddress (addr);
					if (m_SSU2Server) m_SSU2Server->SetLocalAddress (addr);
				}
			}

			if (enableSSU2)
			{
				uint16_t mtu; i2p::config::GetOption ("ssu2.mtu6", mtu);
				if (mtu)
				{
					if (mtu < (int)SSU2_MIN_PACKET_SIZE) mtu = SSU2_MIN_PACKET_SIZE;
					if (mtu > (int)SSU2_MAX_PACKET_SIZE) mtu = SSU2_MAX_PACKET_SIZE;
					i2p::context.SetMTU (mtu, false);
				}
			}
		}

		bool ygg; i2p::config::GetOption("meshnets.yggdrasil", ygg);
		if (ygg)
		{
			std::string address; i2p::config::GetOption("meshnets.yggaddress", address);
			if (!address.empty ())
			{
				boost::system::error_code ec;
				auto addr = boost::asio::ip::address::from_string (address, ec);
				if (!ec && m_NTCP2Server && i2p::util::net::IsYggdrasilAddress (addr))
					m_NTCP2Server->SetLocalAddress (addr);
			}
		}

		// start servers
		if (m_NTCP2Server) m_NTCP2Server->Start ();
		if (m_SSU2Server) m_SSU2Server->Start ();
		if (m_SSU2Server) DetectExternalIP ();

		m_PeerCleanupTimer->expires_from_now (boost::posix_time::seconds(5*SESSION_CREATION_TIMEOUT));
		m_PeerCleanupTimer->async_wait (std::bind (&Transports::HandlePeerCleanupTimer, this, std::placeholders::_1));

		if (m_IsNAT)
		{
			m_PeerTestTimer->expires_from_now (boost::posix_time::minutes(PEER_TEST_INTERVAL));
			m_PeerTestTimer->async_wait (std::bind (&Transports::HandlePeerTestTimer, this, std::placeholders::_1));
		}
	}

	void Transports::Stop ()
	{
		if (m_PeerCleanupTimer) m_PeerCleanupTimer->cancel ();
		if (m_PeerTestTimer) m_PeerTestTimer->cancel ();
		m_Peers.clear ();

		if (m_SSU2Server)
		{
			m_SSU2Server->Stop ();
			delete m_SSU2Server;
			m_SSU2Server = nullptr;
		}

		if (m_NTCP2Server)
		{
			m_NTCP2Server->Stop ();
			delete m_NTCP2Server;
			m_NTCP2Server = nullptr;
		}

		m_X25519KeysPairSupplier.Stop ();
		m_IsRunning = false;
		if (m_Service) m_Service->stop ();
		if (m_Thread)
		{
			m_Thread->join ();
			delete m_Thread;
			m_Thread = nullptr;
		}
	}

	void Transports::Run ()
	{
		i2p::util::SetThreadName("Transports");

		while (m_IsRunning && m_Service)
		{
			try
			{
				m_Service->run ();
			}
			catch (std::exception& ex)
			{
				LogPrint (eLogError, "Transports: Runtime exception: ", ex.what ());
			}
		}
	}

	void Transports::UpdateBandwidth ()
	{
		uint64_t ts = i2p::util::GetMillisecondsSinceEpoch ();
		if (m_LastBandwidthUpdateTime > 0)
		{
			auto delta = ts - m_LastBandwidthUpdateTime;
			if (delta > 0)
			{
				m_InBandwidth = (m_TotalReceivedBytes - m_LastInBandwidthUpdateBytes)*1000/delta; // per second
				m_OutBandwidth = (m_TotalSentBytes - m_LastOutBandwidthUpdateBytes)*1000/delta; // per second
				m_TransitBandwidth = (m_TotalTransitTransmittedBytes - m_LastTransitBandwidthUpdateBytes)*1000/delta;
			}
		}
		m_LastBandwidthUpdateTime = ts;
		m_LastInBandwidthUpdateBytes = m_TotalReceivedBytes;
		m_LastOutBandwidthUpdateBytes = m_TotalSentBytes;
		m_LastTransitBandwidthUpdateBytes = m_TotalTransitTransmittedBytes;
	}

	bool Transports::IsBandwidthExceeded () const
	{
		auto limit = i2p::context.GetBandwidthLimit() * 1024; // convert to bytes
		auto bw = std::max (m_InBandwidth, m_OutBandwidth);
		return bw > limit;
	}

	bool Transports::IsTransitBandwidthExceeded () const
	{
		auto limit = i2p::context.GetTransitBandwidthLimit() * 1024; // convert to bytes
		return m_TransitBandwidth > limit;
	}

	void Transports::SendMessage (const i2p::data::IdentHash& ident, std::shared_ptr<i2p::I2NPMessage> msg)
	{
		if (m_IsOnline)
			SendMessages (ident, std::vector<std::shared_ptr<i2p::I2NPMessage> > {msg });
	}

	void Transports::SendMessages (const i2p::data::IdentHash& ident, const std::vector<std::shared_ptr<i2p::I2NPMessage> >& msgs)
	{
		m_Service->post (std::bind (&Transports::PostMessages, this, ident, msgs));
	}

	void Transports::PostMessages (i2p::data::IdentHash ident, std::vector<std::shared_ptr<i2p::I2NPMessage> > msgs)
	{
		if (ident == i2p::context.GetRouterInfo ().GetIdentHash ())
		{
			// we send it to ourself
			for (auto& it: msgs)
				m_LoopbackHandler.PutNextMessage (std::move (it));
			m_LoopbackHandler.Flush ();
			return;
		}
		if(RoutesRestricted() && !IsRestrictedPeer(ident)) return;
		auto it = m_Peers.find (ident);
		if (it == m_Peers.end ())
		{
			bool connected = false;
			try
			{
				auto r = netdb.FindRouter (ident);
				if (r && (r->IsUnreachable () || !r->IsReachableFrom (i2p::context.GetRouterInfo ()))) return; // router found but non-reachable
				{
					auto ts = i2p::util::GetSecondsSinceEpoch ();
					std::unique_lock<std::mutex> l(m_PeersMutex);
					it = m_Peers.insert (std::pair<i2p::data::IdentHash, Peer>(ident, {r, ts})).first;
				}
				connected = ConnectToPeer (ident, it->second);
			}
			catch (std::exception& ex)
			{
				LogPrint (eLogError, "Transports: PostMessages exception:", ex.what ());
			}
			if (!connected) return;
		}
		if (!it->second.sessions.empty ())
			it->second.sessions.front ()->SendI2NPMessages (msgs);
		else
		{
			if (it->second.delayedMessages.size () < MAX_NUM_DELAYED_MESSAGES)
			{
				for (auto& it1: msgs)
					it->second.delayedMessages.push_back (it1);
			}
			else
			{
				LogPrint (eLogWarning, "Transports: Delayed messages queue size to ",
					ident.ToBase64 (), " exceeds ", MAX_NUM_DELAYED_MESSAGES);
				std::unique_lock<std::mutex> l(m_PeersMutex);
				m_Peers.erase (it);
			}
		}
	}

	bool Transports::ConnectToPeer (const i2p::data::IdentHash& ident, Peer& peer)
	{
		if (!peer.router) // reconnect
			peer.router = netdb.FindRouter (ident); // try to get new one from netdb
		if (peer.router) // we have RI already
		{
			if (peer.priority.empty ())
				SetPriority (peer);
			while (peer.numAttempts < (int)peer.priority.size ())
			{
				auto tr = peer.priority[peer.numAttempts];
				peer.numAttempts++;
				switch (tr)
				{
					case i2p::data::RouterInfo::eNTCP2V4:
					case i2p::data::RouterInfo::eNTCP2V6:
					{
						if (!m_NTCP2Server) continue;
						std::shared_ptr<const RouterInfo::Address> address = (tr == i2p::data::RouterInfo::eNTCP2V6) ?
							peer.router->GetPublishedNTCP2V6Address () : peer.router->GetPublishedNTCP2V4Address ();
						if (address && m_CheckReserved && i2p::util::net::IsInReservedRange(address->host))
							address = nullptr;
						if (address)
						{
							auto s = std::make_shared<NTCP2Session> (*m_NTCP2Server, peer.router, address);
							if( m_NTCP2Server->UsingProxy())
								m_NTCP2Server->ConnectWithProxy(s);
							else
								m_NTCP2Server->Connect (s);
							return true;
						}
						break;
					}
					case i2p::data::RouterInfo::eSSU2V4:
					case i2p::data::RouterInfo::eSSU2V6:
					{
						if (!m_SSU2Server) continue;
						std::shared_ptr<const RouterInfo::Address> address = (tr == i2p::data::RouterInfo::eSSU2V6) ?
							peer.router->GetSSU2V6Address () : peer.router->GetSSU2V4Address ();
						if (address && m_CheckReserved && i2p::util::net::IsInReservedRange(address->host))
							address = nullptr;
						if (address && address->IsReachableSSU ())
						{
							if (m_SSU2Server->CreateSession (peer.router, address))
								return true;
						}
						break;
					}
					case i2p::data::RouterInfo::eNTCP2V6Mesh:
					{
						if (!m_NTCP2Server) continue;
						auto address = peer.router->GetYggdrasilAddress ();
						if (address)
						{
							auto s = std::make_shared<NTCP2Session> (*m_NTCP2Server, peer.router, address);
							m_NTCP2Server->Connect (s);
							return true;
						}
						break;
					}
					default:
						LogPrint (eLogError, "Transports: Unknown transport ", (int)tr);
				}
			}

			LogPrint (eLogInfo, "Transports: No compatible addresses available");
			i2p::data::netdb.SetUnreachable (ident, true); // we are here because all connection attempts failed
			peer.Done ();
			std::unique_lock<std::mutex> l(m_PeersMutex);
			m_Peers.erase (ident);
			return false;
		}
		else // otherwise request RI
		{
			LogPrint (eLogInfo, "Transports: RouterInfo for ", ident.ToBase64 (), " not found, requested");
			i2p::data::netdb.RequestDestination (ident, std::bind (
				&Transports::RequestComplete, this, std::placeholders::_1, ident));
		}
		return true;
	}

	void Transports::SetPriority (Peer& peer) const
	{
		static const std::vector<i2p::data::RouterInfo::SupportedTransports>
			ntcp2Priority =
		{
			i2p::data::RouterInfo::eNTCP2V6,
			i2p::data::RouterInfo::eNTCP2V4,
			i2p::data::RouterInfo::eSSU2V6,
			i2p::data::RouterInfo::eSSU2V4,
			i2p::data::RouterInfo::eNTCP2V6Mesh
		},
			ssu2Priority =
		{
			i2p::data::RouterInfo::eSSU2V6,
			i2p::data::RouterInfo::eSSU2V4,
			i2p::data::RouterInfo::eNTCP2V6,
			i2p::data::RouterInfo::eNTCP2V4,
			i2p::data::RouterInfo::eNTCP2V6Mesh
		};
		if (!peer.router) return;
		auto compatibleTransports = context.GetRouterInfo ().GetCompatibleTransports (false) &
			peer.router->GetCompatibleTransports (true);
		peer.numAttempts = 0;
		peer.priority.clear ();
		bool ssu2 = rand () & 1;
		const auto& priority = ssu2 ? ssu2Priority : ntcp2Priority;
		for (auto transport: priority)
			if (transport & compatibleTransports)
				peer.priority.push_back (transport);
	}

	void Transports::RequestComplete (std::shared_ptr<const i2p::data::RouterInfo> r, const i2p::data::IdentHash& ident)
	{
		m_Service->post (std::bind (&Transports::HandleRequestComplete, this, r, ident));
	}

	void Transports::HandleRequestComplete (std::shared_ptr<const i2p::data::RouterInfo> r, i2p::data::IdentHash ident)
	{
		auto it = m_Peers.find (ident);
		if (it != m_Peers.end ())
		{
			if (r)
			{
				LogPrint (eLogDebug, "Transports: RouterInfo for ", ident.ToBase64 (), " found, trying to connect");
				it->second.router = r;
				ConnectToPeer (ident, it->second);
			}
			else
			{
				LogPrint (eLogWarning, "Transports: RouterInfo not found, failed to send messages");
				std::unique_lock<std::mutex> l(m_PeersMutex);
				m_Peers.erase (it);
			}
		}
	}

	void Transports::DetectExternalIP ()
	{
		if (RoutesRestricted())
		{
			LogPrint(eLogInfo, "Transports: Restricted routes enabled, not detecting IP");
			i2p::context.SetStatus (eRouterStatusOK);
			return;
		}
		if (m_SSU2Server)
			PeerTest ();
		else
			LogPrint (eLogWarning, "Transports: Can't detect external IP. SSU or SSU2 is not available");
	}

	void Transports::PeerTest (bool ipv4, bool ipv6)
	{
		if (RoutesRestricted() || !m_SSU2Server || m_SSU2Server->UsesProxy ()) return;
		if (ipv4 && i2p::context.SupportsV4 ())
		{
			LogPrint (eLogInfo, "Transports: Started peer test IPv4");
			std::set<i2p::data::IdentHash> excluded;
			excluded.insert (i2p::context.GetIdentHash ()); // don't pick own router
			for (int i = 0; i < 5; i++)
			{
				auto router = i2p::data::netdb.GetRandomSSU2PeerTestRouter (true, excluded); // v4
				if (router)
				{
					if (i2p::context.GetStatus () != eRouterStatusTesting)
						i2p::context.SetStatus (eRouterStatusTesting);
					m_SSU2Server->StartPeerTest (router, true);
					excluded.insert (router->GetIdentHash ());
				}
			}
			if (excluded.size () <= 1)
				LogPrint (eLogWarning, "Transports: Can't find routers for peer test IPv4");
		}
		if (ipv6 && i2p::context.SupportsV6 ())
		{
			LogPrint (eLogInfo, "Transports: Started peer test IPv6");
			std::set<i2p::data::IdentHash> excluded;
			excluded.insert (i2p::context.GetIdentHash ()); // don't pick own router
			for (int i = 0; i < 5; i++)
			{
				auto router = i2p::data::netdb.GetRandomSSU2PeerTestRouter (false, excluded); // v6
				if (router)
				{
					if (i2p::context.GetStatusV6 () != eRouterStatusTesting)
						i2p::context.SetStatusV6 (eRouterStatusTesting);
					m_SSU2Server->StartPeerTest (router, false);
					excluded.insert (router->GetIdentHash ());
				}
			}
			if (excluded.size () <= 1)
				LogPrint (eLogWarning, "Transports: Can't find routers for peer test IPv6");
		}
	}

	std::shared_ptr<i2p::crypto::X25519Keys> Transports::GetNextX25519KeysPair ()
	{
		return m_X25519KeysPairSupplier.Acquire ();
	}

	void Transports::ReuseX25519KeysPair (std::shared_ptr<i2p::crypto::X25519Keys> pair)
	{
		m_X25519KeysPairSupplier.Return (pair);
	}

	void Transports::PeerConnected (std::shared_ptr<TransportSession> session)
	{
		m_Service->post([session, this]()
		{
			auto remoteIdentity = session->GetRemoteIdentity ();
			if (!remoteIdentity) return;
			auto ident = remoteIdentity->GetIdentHash ();
			auto it = m_Peers.find (ident);
			if (it != m_Peers.end ())
			{
				it->second.router = nullptr; // we don't need RouterInfo after successive connect
				bool sendDatabaseStore = true;
				if (it->second.delayedMessages.size () > 0)
				{
					// check if first message is our DatabaseStore (publishing)
					auto firstMsg = it->second.delayedMessages[0];
					if (firstMsg && firstMsg->GetTypeID () == eI2NPDatabaseStore &&
							i2p::data::IdentHash(firstMsg->GetPayload () + DATABASE_STORE_KEY_OFFSET) == i2p::context.GetIdentHash ())
						sendDatabaseStore = false; // we have it in the list already
				}
				if (sendDatabaseStore)
					session->SendLocalRouterInfo ();
				else
					session->SetTerminationTimeout (10); // most likely it's publishing, no follow-up messages expected, set timeout to 10 seconds
				it->second.sessions.push_back (session);
				session->SendI2NPMessages (it->second.delayedMessages);
				it->second.delayedMessages.clear ();
			}
			else // incoming connection
			{
				if(RoutesRestricted() && ! IsRestrictedPeer(ident)) {
					// not trusted
					LogPrint(eLogWarning, "Transports: Closing untrusted inbound connection from ", ident.ToBase64());
					session->Done();
					return;
				}
				session->SendI2NPMessages ({ CreateDatabaseStoreMsg () }); // send DatabaseStore
				auto ts = i2p::util::GetSecondsSinceEpoch ();
				std::unique_lock<std::mutex> l(m_PeersMutex);
				m_Peers.insert (std::make_pair (ident, Peer{ nullptr, ts }));
			}
		});
	}

	void Transports::PeerDisconnected (std::shared_ptr<TransportSession> session)
	{
		m_Service->post([session, this]()
		{
			auto remoteIdentity = session->GetRemoteIdentity ();
			if (!remoteIdentity) return;
			auto ident = remoteIdentity->GetIdentHash ();
			auto it = m_Peers.find (ident);
			if (it != m_Peers.end ())
			{
				auto before = it->second.sessions.size ();
				it->second.sessions.remove (session);
				if (it->second.sessions.empty ())
				{
					if (it->second.delayedMessages.size () > 0)
					{
						if (before > 0) // we had an active session before
							it->second.numAttempts = 0; // start over
						ConnectToPeer (ident, it->second);
					}
					else
					{
						std::unique_lock<std::mutex> l(m_PeersMutex);
						m_Peers.erase (it);
					}
				}
			}
		});
	}

	bool Transports::IsConnected (const i2p::data::IdentHash& ident) const
	{
		std::unique_lock<std::mutex> l(m_PeersMutex);
		auto it = m_Peers.find (ident);
		return it != m_Peers.end ();
	}

	void Transports::HandlePeerCleanupTimer (const boost::system::error_code& ecode)
	{
		if (ecode != boost::asio::error::operation_aborted)
		{
			auto ts = i2p::util::GetSecondsSinceEpoch ();
			for (auto it = m_Peers.begin (); it != m_Peers.end (); )
			{
				if (it->second.sessions.empty () && ts > it->second.creationTime + SESSION_CREATION_TIMEOUT)
				{
					LogPrint (eLogWarning, "Transports: Session to peer ", it->first.ToBase64 (), " has not been created in ", SESSION_CREATION_TIMEOUT, " seconds");
					auto profile = i2p::data::GetRouterProfile(it->first);
					if (profile)
					{
						profile->TunnelNonReplied();
					}
					std::unique_lock<std::mutex> l(m_PeersMutex);
					it = m_Peers.erase (it);
				}
				else
				{
					if (ts > it->second.nextRouterInfoUpdateTime)
					{
						auto session = it->second.sessions.front ();
						if (session)
							session->SendLocalRouterInfo (true);
						it->second.nextRouterInfoUpdateTime = ts + PEER_ROUTER_INFO_UPDATE_INTERVAL +
							rand () % PEER_ROUTER_INFO_UPDATE_INTERVAL_VARIANCE;
					}
					++it;
				}
			}
			UpdateBandwidth (); // TODO: use separate timer(s) for it
			bool ipv4Testing = i2p::context.GetStatus () == eRouterStatusTesting;
			bool ipv6Testing = i2p::context.GetStatusV6 () == eRouterStatusTesting;
			// if still testing, repeat peer test
			if (ipv4Testing || ipv6Testing)
				PeerTest (ipv4Testing, ipv6Testing);
			m_PeerCleanupTimer->expires_from_now (boost::posix_time::seconds(3*SESSION_CREATION_TIMEOUT));
			m_PeerCleanupTimer->async_wait (std::bind (&Transports::HandlePeerCleanupTimer, this, std::placeholders::_1));
		}
	}

	void Transports::HandlePeerTestTimer (const boost::system::error_code& ecode)
	{
		if (ecode != boost::asio::error::operation_aborted)
		{
			PeerTest ();
			m_PeerTestTimer->expires_from_now (boost::posix_time::minutes(PEER_TEST_INTERVAL));
			m_PeerTestTimer->async_wait (std::bind (&Transports::HandlePeerTestTimer, this, std::placeholders::_1));
		}
	}

	std::shared_ptr<const i2p::data::RouterInfo> Transports::GetRandomPeer () const
	{
		if (m_Peers.empty ()) return nullptr;
		i2p::data::IdentHash ident;
		{
			std::unique_lock<std::mutex> l(m_PeersMutex);
			auto it = m_Peers.begin ();
			std::advance (it, rand () % m_Peers.size ());
			if (it == m_Peers.end () || it->second.router) return nullptr; // not connected
			ident = it->first;
		}
		return i2p::data::netdb.FindRouter (ident);
	}

	void Transports::RestrictRoutesToFamilies(const std::set<std::string>& families)
	{
		std::lock_guard<std::mutex> lock(m_FamilyMutex);
		m_TrustedFamilies.clear();
		for (auto fam : families)
		{
			boost::to_lower (fam);
			auto id = i2p::data::netdb.GetFamilies ().GetFamilyID (fam);
			if (id)
				m_TrustedFamilies.push_back (id);
		}
	}

	void Transports::RestrictRoutesToRouters(std::set<i2p::data::IdentHash> routers)
	{
		std::unique_lock<std::mutex> lock(m_TrustedRoutersMutex);
		m_TrustedRouters.clear();
		for (const auto & ri : routers )
			m_TrustedRouters.push_back(ri);
	}

	bool Transports::RoutesRestricted() const {
		std::unique_lock<std::mutex> famlock(m_FamilyMutex);
		std::unique_lock<std::mutex> routerslock(m_TrustedRoutersMutex);
		return m_TrustedFamilies.size() > 0 || m_TrustedRouters.size() > 0;
	}

	/** XXX: if routes are not restricted this dies */
	std::shared_ptr<const i2p::data::RouterInfo> Transports::GetRestrictedPeer() const
	{
		{
			std::lock_guard<std::mutex> l(m_FamilyMutex);
			i2p::data::FamilyID fam = 0;
			auto sz = m_TrustedFamilies.size();
			if(sz > 1)
			{
				auto it = m_TrustedFamilies.begin ();
				std::advance(it, rand() % sz);
				fam = *it;
			}
			else if (sz == 1)
			{
				fam = m_TrustedFamilies[0];
			}
			if (fam)
				return i2p::data::netdb.GetRandomRouterInFamily(fam);
		}
		{
			std::unique_lock<std::mutex> l(m_TrustedRoutersMutex);
			auto sz = m_TrustedRouters.size();
			if (sz)
			{
				if(sz == 1)
					return i2p::data::netdb.FindRouter(m_TrustedRouters[0]);
				auto it = m_TrustedRouters.begin();
				std::advance(it, rand() % sz);
				return i2p::data::netdb.FindRouter(*it);
			}
		}
		return nullptr;
	}

	bool Transports::IsRestrictedPeer(const i2p::data::IdentHash & ih) const
	{
		{
			std::unique_lock<std::mutex> l(m_TrustedRoutersMutex);
			for (const auto & r : m_TrustedRouters )
				if ( r == ih ) return true;
		}
		{
			std::unique_lock<std::mutex> l(m_FamilyMutex);
			auto ri = i2p::data::netdb.FindRouter(ih);
			for (const auto & fam : m_TrustedFamilies)
				if(ri->IsFamily(fam)) return true;
		}
		return false;
	}

	void Transports::SetOnline (bool online)
	{
		if (m_IsOnline != online)
		{
			m_IsOnline = online;
			if (online)
				PeerTest ();
			else
				i2p::context.SetError (eRouterErrorOffline);
		}
	}

	void InitAddressFromIface ()
	{
		bool ipv6; i2p::config::GetOption("ipv6", ipv6);
		bool ipv4; i2p::config::GetOption("ipv4", ipv4);

		// ifname -> address
		std::string ifname; i2p::config::GetOption("ifname", ifname);
		if (ipv4 && i2p::config::IsDefault ("address4"))
		{
			std::string ifname4; i2p::config::GetOption("ifname4", ifname4);
			if (!ifname4.empty ())
				i2p::config::SetOption ("address4", i2p::util::net::GetInterfaceAddress(ifname4, false).to_string ()); // v4
			else if (!ifname.empty ())
				i2p::config::SetOption ("address4", i2p::util::net::GetInterfaceAddress(ifname, false).to_string ()); // v4
		}
		if (ipv6 && i2p::config::IsDefault ("address6"))
		{
			std::string ifname6; i2p::config::GetOption("ifname6", ifname6);
			if (!ifname6.empty ())
				i2p::config::SetOption ("address6", i2p::util::net::GetInterfaceAddress(ifname6, true).to_string ()); // v6
			else if (!ifname.empty ())
				i2p::config::SetOption ("address6", i2p::util::net::GetInterfaceAddress(ifname, true).to_string ()); // v6
		}
	}

	void InitTransports ()
	{
		bool ipv6;     i2p::config::GetOption("ipv6", ipv6);
		bool ipv4;     i2p::config::GetOption("ipv4", ipv4);
		bool ygg;      i2p::config::GetOption("meshnets.yggdrasil", ygg);
		uint16_t port; i2p::config::GetOption("port", port);

		boost::asio::ip::address_v6 yggaddr;
		if (ygg)
		{
			std::string yggaddress; i2p::config::GetOption ("meshnets.yggaddress", yggaddress);
			if (!yggaddress.empty ())
			{
				yggaddr = boost::asio::ip::address_v6::from_string (yggaddress);
				if (yggaddr.is_unspecified () || !i2p::util::net::IsYggdrasilAddress (yggaddr) ||
					!i2p::util::net::IsLocalAddress (yggaddr))
				{
					LogPrint(eLogWarning, "Transports: Can't find Yggdrasil address ", yggaddress);
					ygg = false;
				}
			}
			else
			{
				yggaddr = i2p::util::net::GetYggdrasilAddress ();
				if (yggaddr.is_unspecified ())
				{
					LogPrint(eLogWarning, "Transports: Yggdrasil is not running. Disabled");
					ygg = false;
				}
			}
		}

		if (!i2p::config::IsDefault("port"))
		{
			LogPrint(eLogInfo, "Transports: Accepting incoming connections at port ", port);
			i2p::context.UpdatePort (port);
		}
		i2p::context.SetSupportsV6 (ipv6);
		i2p::context.SetSupportsV4 (ipv4);
		i2p::context.SetSupportsMesh (ygg, yggaddr);

		bool ntcp2; i2p::config::GetOption("ntcp2.enabled", ntcp2);
		if (ntcp2)
		{
			bool published; i2p::config::GetOption("ntcp2.published", published);
			if (published)
			{
				std::string ntcp2proxy; i2p::config::GetOption("ntcp2.proxy", ntcp2proxy);
				if (!ntcp2proxy.empty ()) published = false;
			}
			if (published)
			{
				uint16_t ntcp2port; i2p::config::GetOption("ntcp2.port", ntcp2port);
				if (!ntcp2port) ntcp2port = port; // use standard port
				i2p::context.PublishNTCP2Address (ntcp2port, true, ipv4, ipv6, false); // publish
				if (ipv6)
				{
					std::string ipv6Addr; i2p::config::GetOption("ntcp2.addressv6", ipv6Addr);
					auto addr = boost::asio::ip::address_v6::from_string (ipv6Addr);
					if (!addr.is_unspecified () && addr != boost::asio::ip::address_v6::any ())
						i2p::context.UpdateNTCP2V6Address (addr); // set ipv6 address if configured
				}
			}
			else
				i2p::context.PublishNTCP2Address (port, false, ipv4, ipv6, false); // unpublish
		}
		if (ygg)
		{
			i2p::context.PublishNTCP2Address (port, true, false, false, true);
			i2p::context.UpdateNTCP2V6Address (yggaddr);
			if (!ipv4 && !ipv6)
				i2p::context.SetStatus (eRouterStatusMesh);
		}
		bool ssu2; i2p::config::GetOption("ssu2.enabled", ssu2);
		if (ssu2 && i2p::config::IsDefault ("ssu2.enabled") && !ipv4 && !ipv6)
			ssu2 = false; // don't enable ssu2 for yggdrasil only router
		if (ssu2)
		{
			uint16_t ssu2port; i2p::config::GetOption("ssu2.port", ssu2port);
			if (!ssu2port && port) ssu2port = port;
			bool published; i2p::config::GetOption("ssu2.published", published);
			if (published)
				i2p::context.PublishSSU2Address (ssu2port, true, ipv4, ipv6); // publish
			else
				i2p::context.PublishSSU2Address (ssu2port, false, ipv4, ipv6); // unpublish
		}

	}
}
}

redpajama_set_name: RedPajamaGithub


text:
Home 360 Woodrow Wilson Foundation names Indian-American as president
Woodrow Wilson Foundation names Indian-American as president
a Staff Writer
The prestigious Woodrow Wilson National Fellowship Foundation announced that Rajiv Vinnakota will serve as its next president starting July 1.
Rajiv Vinnakota is the new president of the prestigious Woodrow Wilson National Fellowship Foundation, the organization announced March21. (Photo courtesy WW Foundation)
The new Indian-American president succeeds Arthur Levine, who is credited by WW Foundation for transforming the organization into a national leader in educator preparation and school improvement. The announcement about Vinnakota's appointment was made on the eve of the75th annivesary of WW Foundation.
Vinnakota, who co-founded the SEED Foundation in 1997, most recently led the Youth and Engagement division at the Aspen Institute.
A graduate and former trustee of Princeton University, Vinnakota has dedicated his career to educating, empowering, and supporting America's youth, particularly those from disadvantaged communities, said the March 21, press release from WW Foundation which is headquartered in Princeton, N.J.
He has worked as a social entrepreneur and non-profit leader, and his work has been recognized with prestigious fellowships including Echoing Green, The Ashoka Foundation and the Aspen Institute, as well as awards such as Harvard University's Innovation in American Government Award, Princeton University's Woodrow Wilson Award and Oprah Winfrey's Use Your Life award.
"We are thrilled that Raj Vinnakota will head the Foundation at this important moment in its history. Ensuring that the next generation of Americans has the best prepared, most inspiring educators possible has been the mission of the Woodrow Wilson Foundation since it was established," Thomas C. Hudnut, chairman of the WW Foundation Board of Trustees, is quoted saying in his announcement. "We now find ourselves in a moment of social and technological transformation that requires rethinking how we prepare and inspire those who will teach the next generation of Americans. Raj's leadership, passion and commitment to education and civic engagement make him the ideal leader for the Woodrow Wilson Foundation," Hudnut added,
"Leadership development and civic participation is as important today as it was when the Woodrow Wilson Foundation was founded in 1945," Vinnakota said. "Nobel Laureates, MacArthur Fellows, Pulitzer Prize winners, Presidential and national medal recipients, and thousands of others have been Woodrow Wilson Fellows. This organization has helped develop and support many of America's most outstanding educators and civic leaders. I am proud to build upon this tradition."
Current Woodrow Wilson Foundation programs include the Woodrow Wilson Teaching Fellowship, the Woodrow Wilson HistoryQuest Fellowship, the Woodrow Wilson MBA Fellowship in Education Leadership, the Nancy Weiss Malkiel Scholars Award, the Career Enhancement Fellowships, the Mellon Dissertation Support Program, the Mellon Mays GAP Program, the Course Hero-Woodrow Wilson Fellowship for Excellence in Teaching, the Charlotte W. Newcombe Doctoral Dissertation Fellowships, and the Woodrow Wilson Dissertation Fellowship in Women's Studies.
Previous articleMohinder Singh Gilzian takes charge as new President of IOC USA
Next articleIndia shoots down satellite in test, Modi hails arrival as space power
Rep. Jayapal, a leading liberal Congresswoman, endorses Sanders for president
University of Utah ecologist, Nalini Nadkarni, helped create scientist Barbie
Republican senator calls Indian-American CNN reporter 'liberal hack,' refuses to answer impeachment question
Interview: Sania Mirza taking return one week at a time
Rohit hundred trumps Smith, India win series
Why Apple's new TV show "Little America" tells the stories of...
New Jersey could soon become the nation's first state to mandate...

redpajama_set_name: RedPajamaCommonCrawl


text:
NS_BEGIN(CORE_MATH_NAMESPACE)
  namespace statistics{

    class AverageRate : public IAverage{
    public:
      typedef Time time_type;
    private:
      IAverage & _average;
      bool _initialized;
      time_type _lastSampleTime;
      value_type _lastSample;
    public:
      AverageRate(IAverage & average) :_average(average), _initialized(false){
      }
      void addSample(value_type sample){
        if (!_initialized){
          _lastSampleTime = systemTime();
          _lastSample = sample;
          _initialized = true;
          return;
        }

        value_type t_sys = systemTime();
        time_type dt = t_sys - _lastSampleTime;
        value_type delta = sample - _lastSample;
        value_type currentRate = delta / dt;

        _average.addSample(currentRate);

        _lastSample = sample;
        _lastSampleTime = t_sys;
      }

      value_type calculate(){
        return _average.calculate();
      }
    };
  }
NS_END(CORE_MATH_NAMESPACE)


text:
Q: Add view to a cell in a Table View Programmatically I have a table view with dynamic prototypes that is currently displaying 4 elements programmatically. I assign the cell names through an array (see code below), but I also want to add a small view to the right half of each cell in order to show a small graph next to each label. I can drop in a view in storyboard, but it doesn't extend itself dynamically. Basically I need to find a way to modify this code to add a view inside of each cell and assign a class I have already created to those views.
    override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
    let cell = tableView.dequeueReusableCellWithIdentifier("LineCell", forIndexPath: indexPath) as! UITableViewCell
    cell.textLabel?.text = oneLine.lineNames[indexPath.row]
    return cell
}

This is where I want the views:

Also, how can I make more space between the Carrier, Time, and Battery and the table view?

A: To add "Space" between your tableView and the status bar you can embedded  your tableviewcontroller in a uinavigationconttoller.
To add a view dynamically you can use the method addSubview on your cell and add constraints in your code with the auto layout

A: Swift 4.0
var newView = UIView(frame: CGRect(x: 210, y: 10, width: 110, height: 50))
cell.contentView.addSubview(newView)

A: You can create the view as you want and add it as subview of your cell's contentView:
var newView = UIView(frame: CGRectMake(200, 10, 100, 50))
cell.contentView.addSubview(newView)

A: var newView = UIView(frame: CGRect(x: 210, y: 10, width: 110, height: 50))
cell.contentView.addSubview(newView)

As ashish says, as far i know this will add the subview at the top of the cell. what should i do if i want to add it to the bottom of the cell.

redpajama_set_name: RedPajamaStackExchange


text:
How to trade cross-platform in Rocket League
It's easier than it sounds.
Gökhan Çakır
Image via Psyonix
Making Rocket League free-to-play has been on Psyonix's agenda for a while, and the developer finally pulled the trigger on Sept. 20, 2020. Alongside removing the game's price tag, Psyonix also introduced the cross-platform feature, allowing Rocket League players from different gaming devices to play with each other.
These two changes boosted the game's popularity by a nice margin, and the game's community grew even bigger over time. While it's quite straightforward to merge all of your Rocket League profiles under one login ID to play on different platforms, trading is another aspect that still gets asked around between players quite frequently. Rocket League players have been able to trade with each other for years, but the cross-play feature made it slightly more complicated.
Can you trade cross-platform on Rocket League?
The short answer to this is both yes and no. The tradability of an item is decided upon which platform it was originally crafted on. This means that if you build a Blueprint using credits on PC, you won't be able to trade that item with Xbox players, even if you log into the game with an Xbox.
Other tradable items will be tradable regardless of which platform you first received them, but you'll only be able to initiate trades with players that are logged into the same platform as you. If you'd like to trade an item to a friend on an Xbox as a PC player, you'll either need to switch to an Xbox yourself or have them log into the game through a PC.
How can you trade cross-platform on Rocket League?
Trading cross-platform on Rocket League will require you to have access to multiple gaming platforms. If you'd like to trade with a player on Nintendo Switch, you'll need to log into the game from one yourself or invite them for a trade when they're playing on your preferred platform.
When you have the "play on the same platform" box checked, you can invite them to your party in Rocket League. Once they accept, select their name or car and choose "Invite to Trade."
Both players will need to confirm the trade for it to be processed, and an additional countdown will occur, allowing any of the players to cancel the trade if something is wrong.
If you have an Epic account that you previously used to merge all of your progress on different platforms, all of your items will be usable as you switch platforms with your Epic accounts. You'll be able to equip them no matter the gaming device you're using to play Rocket League.
How to link an Epic Games account with Rocket League on different platforms
You'll need to link your progress on different platforms to a single Epic account so you can carry over your cosmetics and even trade the ones that are available cross-platform.
Open the activation page of Rocket League. – Screengrab via Epic Games
Sign in with your Epic account or create one. – Screengrab via Epic Games
Once you successfully login, you'll be forwarded to a page with "Login" buttons for each platform that Rocket League is available on. – Screengrab via Epic Games
Click on "Link Account" after selecting your preferred platform and you'll be forwarded to an external page. – Screengrab via Epic Games
Enter your login details for the account that has your Rocket League progression to complete the linking process. – Screengrab via Epic Games
You'll get a different login screen depending on the platform you chose in previous steps. – Screengrab via Epic Games
Head over to the activation page of Rocket League.
Sign in with your Epic account or create one if you haven't done so before.
Once you successfully login, you'll be forwarded to a page with login buttons for each platform that Rocket League is available on.
Choose the platforms that you played Rocket League on before and log in with your credentials with each of them.
The website will automatically create a pop-up for the platform you chose and ask you to sign into your account. You'll then be asked whether you'd like to allow Epic to access your account's necessary details to complete linking.
After linking your progress on different platforms under one Epic account, you'll be able to play on each of them without any effort.
Your account-bound cosmetics will be available on all platforms that you play on, and you'll be able to trade your non-restricted items with friends from different platforms, given that you're both playing on the same one while trading.
We recommend picking the account that you played Rocket League the most since it'll be your Epic Games account's source for all of your progression in Rocket League.


Once enabled, any file editors in that workspace will be able to make files public from that workspace. There are two ways to do this: Share "Outside workspace" - This new option lets file editors create a public link or access the already created link to this file.
To insert a hyperlink linking to another help topic within the same HTML Help (CHM) file: Select the topic into which you want to insert a new hyperlink. On the Insert tab, in the Links group, click Hyperlink.


text:
'Wembley Matters': "The monstrous block that has vandalised the Welsh Harp"
From 'Wembley Matters'
"In 2013 there was a cross party campaign opposing the redevelopment of the West Hendon Estate in Barnet which borders on the Welsh Harp. The biggest scandal of course is the treatment of social housing tenants on the existing estate. Despite an amazing campaign they have effectively been socially cleansed to make way for a luxury development.
"There is another scandal which has changed the local landscape for ever. A luxury multi-storey block now dominates that end of the Welsh Harp and while its residents enjoy a wonderful natural landscape from their flats, those on the other side of the reservoir are greeted by a huge tower block on the edge of a nature reserve and Site of Special Scientific Interest.
"There was cross-party opposition to the development from Brent Council LINK but Barnet went ahead, supported by Eric Pickles who was the Communities and Local Government Secretary at the time.
"Three years on, the extent of Barnet Council's social and environmental vandalism is clear as the development steams ahead."
The Guardian: "Bohemians, Bauhaus and bionauts: the utopian dreams that became architectural nightmares." (To be fair, Brent Cross was never utopian, more out-of-date, top-down planning by arrogant Barnet and untalented Hammerson.)
"The theme of the inaugural London Design Biennale is Utopia to mark the 500th anniversary of Thomas More's classic. Director Christopher Turner remembers the architects on a mission to make the world a better place"
"Nowhere [is] blind faith in technology celebrated more than in World Fairs, which ever since the 1851 Crystal Palace exhibition, have been seen as a catalyst for international cooperation and peace. Countries and large corporations spent enormous sums promoting their values and aspirations through architecture, design and technology at these international pageants.
"Against the background of the depression, the 1939 World of Tomorrow fair in New York reflected this technological optimism. Exhibits for Chrysler and General Motors by the industrial designers Raymond Loewy and Norman Bel Geddes presented panoramic visions of the city of the future and its avant-garde transport systems.
"The GM pavilion was a roller coaster ride over a kinetic vision of the atomic US of the 1960s – a monumental landscape punctuated by glass domes, revolving airports and, in tune with its sponsor, seven-lane superhighways. On exiting, visitors were given a badge that read: 'I Have Seen the Future'.
"In 1964, with Futurama II, GM updated the exhibition to show underwater cities, as well as urban conglomerations in a deforested Amazon, in Antarctica and on the moon. Utopia was the new frontier, even if it was still just around the corner."
Clitterhouse Farm Project: "Community Mobilisation Project Meetings"
"Thanks to the Community Organisers Mobilisation Grant, Clitterhouse Farm Project is hosting a series of events this spring to explore:
the role of our heritage in our vision of the future
whether 'neighbourhood planning' is right for Cricklewood, particularly in the context of the Brent Cross Cricklewood regeneration. Neighbourhood planning is a new way for communities to decide the future of the places where they live and work. Find out more here.
Meetings will be held regularly at Whitefield School (Map: HERE) from now on until the end of June. Here are some dates for your diary:
The second Tuesday of every month,
6:30 – 8:30pm, at the IT5 room
(neighbourhood planning).
The second Thursday of every month,
(heritage & local memories).
The fourth Thursday of every month,
Enter via the the school's main reception. Parking is very limited for the afternoon sessions. Please use public transport if possible. Please contact Luisa Vallejo – luisa@clitterhouse.com or 077 7366 0938 – for further information.
[Reposted] Hammerson and Standard Life: Thirteen years on from the still-current masterplan, five years on from the outline planning consent: The Brent Cross Cricklewood Fairy Tale
Hammerson Contributing to Londons Future
[Reposted] Tue 22 Mar: Cricklewood Community Forum
2016-03-22 Cricklewood Forum Meeting With Brent Cross Developers
Hammerson's Living Bridge (sic)
Hammerson's current but inaccurate image of the Brent Cross road layout, descended from the corrupt Barnet 2010 planning consent:
The 2014 consent added the living bridge (centre, across the North Circular Road).
Brent Cross Living Bridge (1)
Darren Johnson (16-Sept-2015)
Do you intend to take ownership of the 'Living Bridge'?
The Mayor (16-Sept-2015)
No, as it does not link directly to or from the Transport for London Road Network. However, the developer will need to secure an oversailing licence to ensure its construction, operation and maintenance is acceptable for TfL as the bridge will extend over the A406.
Will it feature a segregated cycle path, as part of a long-distance cycle route?
The Living Bridge will be the end of the cycle route. The strategic and segregated cycle route will be provided through the Brent Cross area via the adjacent Tempelhof Bridge.
You stated in your response to 2014/1379 referring to the northern side of the Living Bridge 'from there onwards, cyclists could use the proposed two-way shared 3.5m wide cycle and pedestrian route along the northern side of the diverted river Brent.' However, the planning application shows a flight of steps at this point. How will cyclists with mobility issues use this section?
The Living Bridge is an access route to the Brent Cross Shopping Centre, with an entrance directly from the bridge to the shopping centre. Cyclists wishing to access the centre will be able to cycle across the bridge park their bikes and walk into the shopping centre on the same level without needing to use steps of a lift.
Brent Cross contract (2)
Darren Johnson (25-Mar-2015)
Who will have ownership and responsibility for the maintenance and repair of the Living Bridge which is being built as part of the Brent Cross development?
The Mayor (25-Mar-2015)
The final ownership of the Living Bridge remains under discussion. As with any other third party structure over the TfL road network, there will be effective measures in place to ensure that the bridge will be properly maintained to protect road users' safety and the standards required by TfL on its road network.
Brent Cross - 'living bridge' and cyclists
What routes at the northern end of the proposed 'living bridge' do you suggest that cyclists can use to get to and from the Brent Cross shopping centre?
The indicative plans show that the Living Bridge proposed by the developers will be accessible to cyclists at the southern end along the bridge approach ramp leading up from the Market Square. Cycling will then be permitted on the Living Bridge as far as its northern side where 40 cycle parking racks are proposed. From there onwards, cyclists could use the proposed two-way shared 3.5m wide cycle and pedestrian route along the northern side of the diverted river Brent. This east-west route would connect to the Brent Park Road (extending under the M1 motorway) to the west and under the A41 flyover in the east to link with Prince Charles Drive and with TfL's proposed cycle superhighway route 11 along Hendon Way. The general parameters for the development have been fixed as part of the outline planning permission recently granted by Barnet Council. TfL and the GLA are actively working with both the Council and the developer to maximise opportunities for walking and cycling in the detailed design, with a particular focus on links between Brent Cross and the wider area.
You stated in your response to 2014/1379 that TfL and the GLA had been actively working to maximise opportunities for safe walking and cycling in the detailed design. Please now explain how these opportunities have been incorporated into the detailed design. If the detailed design is not yet complete, by what means will the public be informed when it is complete and how will that relate to the time scale of planning applications?
The detailed design is not yet complete but TfL has been working with the developers to maximise opportunities for walking and cycling. TfL wrote to the developer on 18th June 2015 to confirm what is required from the developers in terms of their highway design outputs and process before both parties can enter into a formal agreement under section 278 of the Highway Act for the developer to delivery those highway works. This includes support for public consultation on design and governance. The timescale for delivery of highway works is linked to the outline planning permission by conditions. For example, the developers must have all necessary consents in place (including the section 278 agreement) before they can commence their development.
Brent Cross North Circular Road
Navin Shah (22-Feb-2016)
What stages have each of the road junction and bridge designs reached and how will the public be consulted?
The Mayor (22-Feb-2016)
The majority of road junctions and bridge designs along Brent Cross North Circular Road have now received planning permission following the required statutory planning consultation process. In parallel to finalising the planning process, TfL will continue to provide robust assurance to ensure the detailed designs are sufficient to meet its requirements. Further statutory consultation with the public may be required as part of this process. Final designs will be delivered by the developer in accordance with planning related Section 278 Agreements. These will need to be agreed between the developer, TfL and other relevant parties.
Brent Cross (2)
Navin Shah (16-Sept-2015)
Have you been content to consider the Brent Cross scheme under its still-current supplement to the London Plan, which predicts over 29,000 extra vehicle movements per working day in the area? Will you still be undertaking Stage II planning determination of the scheme against those criteria?
The most recent Brent Cross application was made under section 73 of the Town and Country Planning Act. This is in effect a minor material amendment to the 2010 permission. In my response to Barnet Council in January 2014 I advised that I support the regeneration benefits of the scheme and recommended they work with TfL to mitigate the transport aspects and ensured that TfL are a signatory to the section 106 agreement so that they can fulfil their strategic transport role. As a section 73 application there is no formal stage 2 determination, and I do not have any strategic planning remit at this stage. That said, TfL continue to work closely with Barnet Council to determine the subsequent reserved matters and ensure that any transport obligations are fulfilled as required.
Following Barnet's corrupt 2010 planning consent: "PLANS FOR JOINT VENTURE'S DEVELOPMENT AT BRENT CROSS SOUTH APPROVED BY BARNET COUNCIL" (don't you just love the capitals.)
Barnet Council last night (17 March) approved a Joint Venture to take forward the future development of Brent Cross South, the 180-acre area south of the Brent Cross shopping centre. The new development will sit alongside Hammerson and Standard Life Investments' redevelopment of Brent Cross shopping centre, connected via a new pedestrian bridge across the North Circular.
This important milestone signifies that the preparation, design and eventual construction planned for this part of London can now go ahead, with the first works expected to start in early 2018. In addition, the Chancellor's Budget on Wednesday 16 March confirmed that the Government will release a £97m grant to contribute towards the cost of an additional Thameslink station to support the new town centre in the Brent Cross South scheme, which will also be part-funded through a business rates contribution from the Greater London Authority.
The joint venture partnership for Brent Cross South, which stretches from the North Circular (A406) to Cricklewood Lane, between Hendon Way (A41) and the Edgware Road (A5), consists of Argent Related and the London Borough of Barnet. Argent Related, formed in 2015, leverages two respected firms' multi-decade leadership in urban development and placemaking. Argent is the UK developer best known in London for its work on the redevelopment of King's Cross; Related Companies is an American-based, diversified real estate company with a portfolio of 55,000 rental homes that is currently undertaking Hudson Yards, the largest private development in US history. Barnet Council was advised on the procurement process, the final selection of a partner and contract negotiations by Re and Capita Real Estate.
Councillor Richard Cornelius, Leader of Barnet Council, said:
"The redevelopment of Brent Cross is of huge significance for the future of the borough and we have always wanted to play an active role in shaping it. By joining forces with our development partners we are making sure we get the best deal for the taxpayer as well as creating a thriving London neighbourhood which will become a model for the 21st century and beyond.
The fast rail link into Kings Cross [sic] will play a vital part in the development of the area, and Wednesday's Budget announcement is confirmation that we have now secured the investment we need to support the transformation of the area."
"The Brent Cross South masterplan, given consent in October 2010 [sic] and revised in 2014, includes 6,700 homes and workspace for over 25,000 new jobs; a new high street, with local shops and restaurants; improved transport connections with the new station serving the development and better walking and cycle routes; and new parks, squares and community facilities.
"Kenneth P. Wong, Joint CEO of Argent Related and COO and Director of International Development of Related Companies, said:
"We are extremely pleased to move the Brent Cross South development forward. We share Barnet's vision for a dynamic town centre which will serve as a magnet for residents, workers and businesses."
"David Partridge, Joint CEO of Argent Related and Managing Partner of Argent, said:
"Brent Cross South is an opportunity for us to breathe new life into an important part of London, by delivering new public spaces, amenities, homes and offices for existing and new communities."
"Hammerson and Standard Life Investments, added:
"We welcome the news that Argent Related has been confirmed as Barnet Council's development partner for Brent Cross South. It is a positive step towards creating a vibrant new town centre for North London. Together, we continue to make good progress on the Shopping Centre project and have secured planning approvals for the first phases of the masterplan. This includes the critical transport infrastructure that will enable the entire regeneration project to be delivered."
About Argent Related
"Formed in 2015, Argent Related brings together an extraordinary blend of complementary skills, global access to capital, and unrivalled technical and delivery experience. The company leverages a shared expertise in significant urban placemaking as well as Argent's track record in creating exemplar new pieces of UK cities, and Related Companies' extensive experience in build-to-rent developments and strong management capabilities.
"The Argent Related partnership is currently working in a joint venture with Barnet Council on London's 180-acre Brent Cross South site, with the London Borough of Haringey around Tottenham Hale and is progressing other opportunities in Manchester and London. Argent Related's overarching goal is to develop for the long term - astutely, sensitively, and with a sense of social purpose - delivering the homes and workspace that our UK cities badly need. For more information, please visit www.argentrelated.com."
About Re/CRE
"Re is a joint venture between London Borough of Barnet and Capita plc. It provides development and regulatory services to residents in Barnet and the south east. The company was formed in October 2013.
"Capita Real Estate is part of one of the UK's leading multidisciplinary consultancies providing real estate, design, project delivery, infrastructure, and business transformation services. With 4,200 staff in over 40 UK offices, we work across a variety of sectors including central and local government, commercial property, defence, education, healthcare, utilities, housing, and transport.
"It is a division of Capita plc, the UK's leading provider of integrated professional support service solutions. Find out more about Capita Real Estate at www.thinkcapitarealestate.uk."
About Hammerson and Standard Life (Brent Cross North Partners)
"Hammerson and Standard Life Investments will be delivering the transformation of Brent Cross Shopping Centre into a leading retail, dining and leisure destination. The new centre will have a wider range of shops alongside a fantastic new evening entertainment offer to provide the area with a thriving night time economy with a new cinema, fantastic dining options and a network of covered streets and spaces.
"Hammerson and Standard Life Investments are also leading the transformation of the Northern part of the Brent Cross Cricklewood masterplan, to delivering the essential highways and transport infrastructure improvements to enable the whole masterplan to come forward."
NorthwestTWO Residents Association: "What do you love about Cricklewood?"
"A company called SOUNDINGS, appointed by ARGENT, will be at the World Market in Cricklewood Lane again tomorrow [Saturday] doing market research on what residents love about Cricklewood. SOUNDINGS have already met with representatives from all the Cricklewood groups and now would like to know what residents love about Cricklewood."
[This web site's comment: Ask them about the basis of the Argent plan, Barnet's corrupt 2010 planning consent. Ask them why they don't start again, from scratch.]
Hurrah! It's the "Brent Cross Spring Festival: 24 Mar - 2 Apr" [sic]
"Visit London's Spring Festival experience at Brent Cross!
"What better way to celebrate Spring than with a day out to the Brent Cross Festival. [Indeed, what better way.]
"The Spring Festival opens 24 March and runs through to 2 May. [We've added a month in the text, then.]
"Timings:
12-10pm Weekends and School Holidays
5pm-10pm Thursday and Friday during term times
closed Monday, Tuesday & Wednesday)
"Entrance costs £3 and tokens are available to purchase for rides. Parking is FREE.
"Download the Brent Cross PLUS app now to get one FREE entry to The Spring Festival!
"Once you've downloaded the app, make sure you're registered as a PLUS member by tapping on the 'Sign in / Register' button. On your next visit, simply show your PLUS app to our team and tap 'Redeem'!"
Councillor Pauline Coakley Webb: Request for Barnet's Brent Cross Cricklewood records
"Councillor Pauline Coakley Webb has requested that a Member's Item be considered on the following matter:
"Following the recent City Hall Regeneration Committee hearing on the Brent Cross Cricklewood consultation, I request that the Assets, Regeneration and Growth Committee is provided with a full briefing on the consultation undertaken to date with all stakeholders including residents, community groups and local businesses."
2016-03-17 6a. Members Item Cllr Pauline Coakley Webb - Brent Cross Cricklewood Consultation
Thu 17 Mar: West Hendon and Brent Cross at Barnet's Assets, Regeneration and Growth Committee. Plus CoStar: "Barnet/Argent Related set to sign giant Brent Cross Joint Venture"
"Barnet council is set to formally sign off the creation of a joint venture with Argent Related to bring forward one of the largest regeneration schemes in the UK – the Brent Cross Cricklewood development – as well as launching a compulsory purchase order for land for a new Thameslink station into the area. The formal agreement – expected to sign off next Wednesday – comes as the Secretary of State has confirmed that a public inquiry into the compulsory purchase of the wider land needed for the giant scheme will begin in May.
"The Brent Cross Cricklewood project aims to double the size of the shopping centre and link to a new town centre for Barnet and North London across the North Circular Road.
"It proposes approximately 7,500 new homes over the next 20 years and is a key part of the wider revitalisation of the A5 corridor, linking Brent Cross Cricklewood with developments at West Hendon, Colindale and Edgware and improvements to Cricklewood Town Centre, to create a series of suburbs.
"The first phase of the Brent Cross Cricklewood project, which will be undertaken in large par by Brent Cross shopping centre owners Hammerson and Standard Life, includes the redevelopment of the shopping centre, creation of major new infrastructure, improved links to the existing tube station, and delivery of around 2,461 new homes over the next 8-10 years.
"This will create an estimated 3,000 construction jobs, and 4,000 permanent jobs.
"The council is now set to agree a programme that would see development of the new Thameslink Station brought forward to improve the regeneration scheme in "both place-making as well as viability terms".
"At present the scheme does not benefit from the delivery of the station until the later phases.
"In March 2015 Argent Related was selected as the preferred development partner for the development not undertaken by the shopping centre owners – what is known as the Southside Regeneration (for the history of this agreement see below). Argent Related and the council have been jointly progressing the Business Plan alongside the project agreement.
"Next Wednesday Barnet's Asset, Regeneration and Growth Committee will convene to approve a new Joint Venture entity (JVLP). The committee is being asked to formally re-confirm Argent Related as development partner and approve the Business Plan and legal documentation so that the JVLP can be created to deliver the south side regeneration.
"The joint venture entity is an English Limited Partnership and will be held on a 50:50 basis by the Council and Argent Related.
"The council will participate as an equal 50:50 limited partner in the limited partnership and will participate in surpluses from the project.
"Argent Related provides the funding with the council having the option to contribute funding if it wishes.
"The Assets, Regeneration and Growth Committee are also being asked to recommend the making of a compulsory purchase order ('CPO3') and other related steps to full council for approval in order to acquire the land and interests need'dto enable part of the station phase of the comprehensive regeneration of Brent Cross Cricklewood to go ahead on land to the south of the North Circular. This would bring forward the development of the Thameslink tube station in the timetable of development.
"The Secretary of State has also now confirmed that an inquiry will be required into the first two compulsory purchase orders for the site.
"The inquiry is scheduled to take place from 17 May – 17 June 2016.
"The Council and its Development Partners are responding to objections and undertaking necessary works to support the CPO Inquiry. The Council and its advisors are also continuing to actively progress private treaty negotiations with those business and residents affected by the CPO. In this regard, the Council is leading on the acquisition of land within the south side compulsory purchase areas, as previously approved by Capital Resources Committee in January 2014 and Assets, Regeneration Committee in September 2014.
"Heads of Terms have now been agreed with eight residential owners in the CPO areas, and the council completed its first residential acquisition on 18 January 2016. It is anticipated that the Council will complete further acquisitions shortly.
"Similarly, the Council has reached agreement with commercial owners within the south side area.
"Capita worked alongside Barnet council from January 2014 onwards on the best route for finding a development partner for the southern section of the wider Cricklewood masterplan after the council's long-term development partners Hammerson and Standard Life Investments agreed they would take forward only the first phase of the project – the redevelopment of Brent Cross shopping centre on the north of the site.
"The parties agreed that a new partner would need to come forward for the rest of the opportunity which may wish to revisit the detail, content and phasing of the current 2010 consent for an Allies & Morrison designed masterplan.
"The southern section of the consented masterplan (Brent Cross South) is equivalent in gross floor area to Mayfair at around 15m sqft.
"Barnet council's Assets, Regeneration and Growth committee set a deadline for choosing a preferred partner in early February 2015 allowing for the partner to be unveiled at the MIPIM property conference in March of that year.
"Long-term development partners Hammerson UK and Standard Life have also agreed to invest in the infrastructure required to support the wider regeneration proposals.
"Work on the phased rebuilding of the shopping centre is set to begin this year. Outline planning permission for the redevelopment of the whole site was granted in 2010, and updated last year.
"The area to the south of the North Circular has capacity for 7500 new homes and the whole regeneration area has the potential to support up to 20,000 jobs in 450,000 sq m of commercial space. The first stage of development is likely to see some 2,000 new homes built and 17,500 sq m of new retail space created to the south of the new pedestrian bridge, forming the heart of the new town centre.
"Capita Real Estate and Wragge Lawrence Graham advise Barnet council."
2016-03-17 Agenda Frontsheet 17032016 1900 Assets Regeneration and Growth Committee
2016-03-17 Appendix 3 Brent Cross Cricklewood Full Regeneration Business Case Exempt
2016 03 17 Work Programme
Link to committee web page
[Reposted from Dec. 2009] NAVIN SHAH: CALL IN THIS FLAWED AND SHAMBOLIC APPLICATION
The Rt Hon John Denham MP
Brent Cross Cricklewood Outline Application, C17559/08
Local Authority: The London Borough of Barnet
I wrote to you in July with my concerns in regard to the consideration of this major strategic application in the London Borough of Barnet. Although the application was seriously flawed and will have a significant impact on proximate areas, the application was passed by Barnet's Planning and Environment Committee on November 19th 2009.
By means of this submission I am reiterating my request to you to call in this planning application for the following reasons:
1.0 Background:
The outline application for this comprehensive mixed-use redevelopment of the Brent Cross Cricklewood regeneration area was first submitted on 25th March 2008, however the planned regeneration of the area has a much longer history. In 2000 The Secretary of State defined Brent Cross as a regional shopping centre in an out-of-centre location and should therefore be developed after local town centres which are favoured first. Following this, the aim became a new town centre, as defined in Barnet's UDP as a 'New High Street' and the London Plan 2004. However, the outline application and permission for Stage 1 developments that has now been passed amounts to little more than an expansion of out-of-town retail provision, while the rest of the development is postponed to later stages and therefore not guaranteed. I am of the belief there is a significant danger 'Brent Cross Cricklewood' will proceed to provide an expansion of out-of-town shopping, contrary to the former Secretary of State's wishes, and little else.
2.0 Flawed Consultation:
Throughout the process there has been a total lack of meaningful consultation with Brent's residents west of the site. While I acknowledge that there have been some extensions granted for statutory consultation period very little, if any, of the details of the project have been conveyed by the Applicant and the Local Planning Authority (Barnet Council) to Brent residents through the consultation process. Brent Council's Planners have had made formal representations to Barnet Council on this matter.
3.0 Waste Handling Facility:
Brent residents have received poor information as to the likely detrimental impact of the development of the proposed Waste Handling Facility. There are genuine and serious concerns about the waste handling facility which is perceived as a proposal for an incineration unit. While the Applicant claims this is not an incinerator, it is most regrettable that even fundamental and critical information such as emission levels and the actual process for waste management proposed by the Applicant are not clearly conveyed to the local residents and traders. Neither the Applicants, the London Borough of Barnet nor the North London Waste Authority have, in my opinion, reasonably addressed confusion over the type of plant technology and as a result its environmental and traffic impact on eastern Brent is not fully known.
4.0 Traffic and Transport:
This is one of the most serious issues which has received universal condemnation. Both Brent and Camden Councils raised serious concerns on the key components and residents are quite rightly worried about detrimental impact from traffic generated from this scheme.
My own comments on this issue are noted in the attached objection letter to Barnet Council.
The London Borough of Brent in its various communications to Barnet also objected to this aspect of the application because an overall assessment of the impact on Brent's transport system was not forthcoming, neither was there a mitigation strategy from the applicant. In additions to the specific issues covering transport and traffic, ring-fenced Section 106 contributions to the tune of £5 million also need to be addressed by Barnet Council and the applicant.
Like Brent, the London Borough of Camden too has put in strong objections. Camden highlights the flawed transport proposals, which are heavily reliant on private car use and the resultant 'avoidable and unnecessary increase on Camden's roads. There's also severe criticism of 'undue attention given to increasing the capacity of road junctions'. The Council very justifiably commented that there is a great potential to improve public transport, walking and cycling and like Brent Council it has asked for fundamental review of a proposed transport strategy that does little to improve public and sustainable transport.
5.0 Retail and Regeneration:
I am of the belief the Brent Cross Cricklewood application as it stands presents the threat of out-of-town facility expansion to North West London's town and district centre. As a Councillor, resident and a member of Harrow Council's Local Development Framework Panel I am extremely concerned about the serious concerns this development would have on the ailing outdated Harrow's town centre among other Local District Centres.
I further note that Camden Council has expressed their concerns in that its areas like Kilburn Town Centre (which forms the border between Camden and Brent) would be vulnerable to the significant increase of retail provision at Brent Cross Cricklewood.
6.0 Affordable Housing:
The London Plan in its current form (2004) and the UDPs quite rightly seek and demand a high level, up to 50%, of affordable housing. In addition the Mayor of London is struggling to meet his stated target of 50,000 affordable housing by 2012. The 15% affordable housing target does not meet these justified planning policies. I support Camden Council's objection in that 15% is woefully short and that the development must aim to increased provision of at least 30% of the total proposed housing with an emphasis on the delivery of large family units of 3 and 4 bedrooms.
Furthermore, there is great concern that the majority of affordable housing will be pushed back into the later stages of the development. Only 795 residential units are planned for Stage 1, while the 2000 decision saw the 2000 residential units as "nebulous". The Mayor of London has stated (in a public response to my question 3474/2009, Mayor's Question Time, November 18th 2009) that "all remaining phases will have a 15% minimum level of affordable housing with the opportunity to go above this should viability allow." I am of the belief this level is woefully inadequate and undermines the pretence and marketing that Brent Cross will provide a viable town centre.
7.0 Conclusion:
The application is flawed and does not conform to major planning policies. Whilst its understandable that the application of such sub-regional significance requires greater length of time for negotiations, amendments and deliberations it has been clear that Barnet Council's oversight has been a complete shambles.
For the above reasons, I am of the belief that the outline application, flawed and unambitious as it is, wastes the opportunity of a successful, green, long-lasting alternative to the car-orientated Brent Cross plans of the 1960s by merely ameliorating this outdated vision.
I request the Right Honorable Minister 'calls in' the above planning application.
Navin Shah AM
Assembly Member for Brent and Harrow
Camden New Journal: "CS11 bike route plans: Is it cyclists vs Tom Conti and the car drivers?"
Scoot to the web site
"Transport for London's controversial plans to re-draw the road map in Swiss Cottage to include a new cycle lane is facing criticism – but this week the man behind the project insisted the changes will help everyone.
"A petition against the scheme had last night (Wednesday) reached 1,200 signatures and a public meeting to hear arguments against the project has been set up by opponents for Monday night.
"But TfL's road chief Nigel Hardy told the New Journal the project was not about pitting bike users against car drivers – and if it goes ahead, the new lanes will make roads better for all."
Fri 18 Mar: Planey McPlaneface comes to Cricklewood
No, it's not Hammerson's plan for cycle lanes at Brent Cross
"Anger against Swiss Cottage 'cycling superhighway' grows as petition takes off"
Link to the Ham & High
"More than 1000 people have signed a petition in just five days opposing what they say is a 'catastrophically ill-planned' cycling superhighway, which they say will cause traffic gridlock in Swiss Cottage and the surrounding area.
"Transport for London (TfL) is consulting on the plans which will create dedicated cycling lanes between Swiss Cottage and Portland Place in the West End.
"But critics say the scheme is a 'vanity project' to enable Mayor Boris Johnson to leave London a 'cycling legacy', and claim there are not enough cyclists using the roads to warrant the upheaval they believe it will cause.
"The petition was started last weekend by Childs Hill resident, David Howard, who claims the scheme will wreak havoc for drivers and public transport users in Finchley Road, Swiss Cottage, Avenue Road, Regents Park, St John's Wood and Baker Street."
Brent & Kilburn Times: "Vanessa Feltz: 'Scatter my cremated ashes over Brent Cross Shopping Centre'." (Fine. How soon?)
"The radio and television broadcaster, known for her gags [sic], returned to the UK's first American-style mall in Prince Charles Drive to cut the ribbon on a replica animal installation.
" 'Here is my true spiritual home,' she said, a visitor since the centre opened in 1976 when she was just 14-years-old. 'It was so glamorous, it was so dazzling, of course I came here, you couldn't drag me out of the place.'
"She added: 'It played a huge part in my life. For loads of us it was the first place we could go on our own without grown-ups. You could go on the bus and your parents wouldn't worry about you'."
Estates Gazette: "It's time to get serious about suburban densification"
"Quod, with Shelter, have just produced a report into London's land stock available for residential building. While the report is a good overview, it fails to grasp the potential of suburban densification.
"If the number of homes in these low density suburbs could be incrementally increased by 10% (still well below the current average London density), it would deliver around 75,000 homes."
When Brownfield Isn't Enough, Quod/Shelter, pp29
"An increase of 10% is hardly ambitious and suggests simply building more houses in back gardens or, as the report suggests, subdividing existing houses leading to no net gain in floorspace.
"Other proposals suggested such as new towns are proposed without regard to the gigantic infrastructure cost they would require. Regional and suburban rail routes are already at capacity, and would require new lines – costing many billions – to create satellite towns. And for all the Ebeneezer Howard inspired hope of autarkic [autonomous?] new towns, the truth is they will be largely dormitory suburbs for existing employment centres in London, making this infrastructure necessary.
"Back of envelope calculations here, but surely it would be more efficient to redevelop suburban houses near London stations.
"... It might be hard to stomach politically, but for those examining the potential for land use suburban densification should be considered as something more than subdivision and houses in gardens. If people want houses with large gardens, they should be prepared to move to outside of London dormitory towns with their longer commuters rather than forcing ten times the number to either do this, or live in increasingly cramped conditions in house shares that are fast becoming room-shares."
1976: London's Criminal Underworld Part-Funds Brent Cross Shopping Centre in Money-Laundering Scam (but it's water under the bridge now)
Link to Hammerson web site
"Hammerson and Standard Life Investments UK Shopping Centre Trust, joint owners of Brent Cross Shopping Centre, are today marking the centre reaching its 40th birthday, a significant milestone for Europe's first enclosed shopping centre. [Apart from Elephant & Castle. And Birmingham's Bull Ring Centre. And ...]
"The launch of Brent Cross on 2nd March 1976, which had been 19 years in the making, revolutionised the face of London retail, which had previously been dominated by the West End. The first American style shopping mall in the UK, Brent Cross quickly became the blueprint for shopping centres across Europe.
"All three of the centre's department stores, Fenwick, John Lewis and Marks & Spencer have remained in the centre, alongside a number of other original brands, including Boots, W H Smith, Mothercare, Miss Selfridge and Russell & Bromley, all of which also still continue to trade very successfully 40 years on."
The Great Corrupt-Brent-Cross-Planning-Consent Caper Continues: Barnet Press: "Concerns over public consultation on £4 billion Brent Cross plans"
"The London Assembly should hold 'a proper review' into the £4 billion Brent Cross and Cricklewood development where proper public consultation over the regeneration plans has not taken place.
"That was among claims made at The London Assembly's Regeneration Committee meeting on Tuesday (March 1), where it was said that the firm carrying out part of the consultation asked 'leading questions' which made most people agree that the regeneration was positive.
"Pat Turnball, Chair of London Tenant's Federation [and representing 'Just Space'], told the meeting that residents on the nearby Whitefield Estate answered questions without even knowing a bridge would come at the cost of demolishing their homes.
"... Cath Shaw, of Barnet Council's Enterprise and Regeneration team, said she would be prepared to follow up specific details about concerns over the consultation." [Yeh, right.]
'Wembley Matters': "The monstrous block that has v...
The Guardian: "Bohemians, Bauhaus and bionauts: th...
Clitterhouse Farm Project: "Community Mobilisation...
[Reposted] Hammerson and Standard Life: Thirteen y...
[Reposted] Tue 22 Mar: Cricklewood Community Forum...
Following Barnet's corrupt 2010 planning consent: ...
NorthwestTWO Residents Association: "What do you l...
Hurrah! It's the "Brent Cross Spring Festival: 24 ...
Councillor Pauline Coakley Webb: Request for Barne...
Thu 17 Mar: West Hendon and Brent Cross at Barnet'...
[Reposted from Dec. 2009] NAVIN SHAH: CALL IN THIS...
Camden New Journal: "CS11 bike route plans: Is it ...
Fri 18 Mar: Planey McPlaneface comes to Cricklewoo...
No, it's not Hammerson's plan for cycle lanes at B...
Brent & Kilburn Times: "Vanessa Feltz: 'Scatter my...
Estates Gazette: "It's time to get serious about s...
1976: London's Criminal Underworld Part-Funds Bren...
The Great Corrupt-Brent-Cross-Planning-Consent Cap...


It's understood some infrastructure was damaged by the fire at the fabric filter plant.
FILE: Eskom's Kusile Power Station. Picture: Facebook.
JOHANNESBURG - Eskom says its investigating the cause of the fire which broke out at its Kusile Power Station in Mpumalanga.
The power utility says the extent of the damage will still be assessed.


Sounds like a great event especially the Fine Wine Upgrade, I know you love your bubbles.
I would have loved to try the RWT, big fan of Penfolds and the Trapiche tres14 sounds good.
Sounds like a good event. It is difficult to get good German whine in the UK. In my experience of visiting German wineries they do tend to keep really amazing wine at good prices for their own market. A pity as they do produce some fab stuff.


text:
entertainment / Editors' Picks
Love and fear coalesce in 'The Haunting of Hill House'
By: Rito P. Asilo - Entertainment Editor
Philippine Daily Inquirer / 12:29 AM October 06, 2018
Michiel Huisman (left) and Timothy Hutton
There are a good number of scenes in "The Haunting of Hill House" that will drive viewers out of their wits. But, there's more to Netflix's anticipated horror franchise than creepy fun and games.
Like the acclaimed 1959 gothic horror novel by Shirley Jackson that inspired it, director Mike Flanagan's 10-episode horror series, which will be streamed starting Oct. 12, banks largely on its protagonists' real-life woes more than the supernatural horror that befalls "the crazy Crains," following the inexplicable death of family matriarch Liv (Carla Gugino).
The psychological drama examines how the lives of five siblings—Steven (Michiel Huisman), Shirley (Elizabeth Reaser), Theodora (Kate Siegel) and twins Luke (Oliver Jackson-Cohen) and Nell Crain (Victoria Pedretti)—are invariably shaped by the aforesaid tragic event while living at Hill House, the haunted mansion infamous for the malevolent creatures that allegedly live within its squeaky, moldy walls.
Liv and her doting husband Hugh (Timothy Hutton and, in his younger years, Henry Thomas) didn't intend to stay in their newly acquired property for long—after all, its gothic architectural beauty presented an opportunity for the Crains to earn a lot of money after the major makeover they had in mind.
Violet McGraw (left) and Henry Thomas in "The Haunting of Hill House"
But, the couple's income-generating situation took a creepy turn when the Crains began to get hounded by creatures that go bump in the night, not to mention the strange occurrences that defied the rules of science and logic.
Even decades later, the siblings' lives remain far from perfect, weighed down further by their fear of mental illness: Novelist Steven is a one-hit-wonder; Shirley is a funeral house owner with control issues; Theo is a sexually active lesbian psychologist who can't commit to the emotionally accessible women she lures to her bed.
For his part, fragile Luke is a recovering drug addict; and Nell is a sleep-paralysis sufferer who's having difficulty coming to terms with the sudden death of the only man she's ever loved. And the fact that none of them is close to their father Hugh is a recipe for domestic disaster.
Carla Gugino mesmerizes as triple-dealing thief in noirish 'Jett'
'Haunting of Hill House' star names child after character
'GoT' stars, ex-kid actor team up for motorcycle company saga
Their fears and troubles come to a head when Steven, Shirley, Theo, Luke and their secretive dad are forcibly reunited by Nell's shocking suicide—an unexpected tragedy that compels the surviving Crains to finally confront the sins and demons of their past, both real and imagined.
Luke feels particularly guilt-stricken because, the last time he crossed paths with Nell, he convinced his ever-supportive twin sister to buy heroin for him—as he was on his way to rehab!
Feeling just as vulnerable is Hugh, who's still tormented by his little-known "act of abandonment," motivated by a fatherly instinct to protect his young children from imminent danger.
The show wisely utilizes its multiple-episode concept to examine as much the Crains' trials and tribulations as their deep-seated fears, cleverly allotting sections that focus on the siblings' shifting and contradictory but clarificatory perspectives.
For instance, the third episode explains Theo's fear of intimacy, while Episodes 4 and 5 take turns figuring out why the twins, Luke and Nell, can't seem to get their act together.
Luke's 10-year struggle to kick his drug habit suffers a setback as he recounts his days with his "imaginary friend" Abigail and the very tall stranger who used to hang around Hill House's ominous, shadow-bathed halls.
Nell isn't just hounded by the thought of having lost her mother at age 6; she is also petrified by the frequent visits of the Bent-Neck Lady, who haunts her dreams!
While Luke and Nell aren't the only ones having a hard time identifying what's real or imaginary, it's nevertheless difficult for the family to find clarity from guilt, discontent and inadequacy.
Even Shirley, who seems to be the Crains' most stable and reliable sibling, has been keeping a well-guarded secret for six years!
Twenty years after a shared tragedy, the Crains still don't have answers to contentious issues: What lurks behind the red door, and why is it the only room in the mansion that's off limits to its occupants? If Hugh blames Hill House for all their troubles, why does he refuse to give it up?
"The Haunting" eventually unravels its secrets and, for the most part, they're worth viewers' patience.
Is the series as scary as its preshow buzz?
While some sequences are slower than others, like the meandering sixth episode that sees the Crains washing their dirty linen at Nell's wake, there are scenes that are genuinely mortifying—like Luke's run-in with a scary creature in Episode 4, the disturbing explanation behind the constant wall-scratching in Episode 7, or the relentless knocking in Episode 8 that scares the bejesus out of Shirley and Theo.
Like their mom and dad, the Crain siblings love as much as they hate each other. Whether the explanations are supernatural or medical, "The Haunting of Hill House" knows why its scare tactics are effective, as the series explains in its final episode: Fear is the relinquishing of logic. Ironically, so is love.
No nudes from Matt Shively
TAGS: Carla Gugino, Henry Thomas, Michiel Huisman, Oliver Jackson-Cohen, The Haunting of Hill House, Timothy Hutton, Violet McGraw


Unlock iPhone Canada Sasktel. Official Apple, use any sim.
Unlock any iPhone handset locked to Canada Sasktel. Unlock codes are currently taking between 1 day and (up to) 5 days to complete. We will keep you updated via email as to your iPhone unlock order status and the delivery time.
Official IMEI unlock for Apple iPhones locked to Canada Sasktel. Unlock your mobile to work on any network. Your IMEI will be whitelisted and marked as sim-free in Apple's IMEI database.
To unlock your Sasktel iPhone, first check that it is locked. Insert a different SIM card, and if your phone is locked you will get a 'SIM Network Unlock message' or similar.
Unlock iPhone Canada Sasktel . We will keep you updated via email as to your iPhone unlock order status and the delivery time.


text:
Q: Access Use Unbound Combobox To Find and Add Record I have an item lookup form that displays the information of a single record. There is an unbound combo box on the record that the user uses to type in the item number and go straight to that record via DoCmd.SearchForRecord. That part works fine.
What I would also like to do is have that unboundcombobox be able to add new items to the table. I have the NotInList right now set to this:
If MsgBox("Create new inventory item " & NewData & "?", _
    vbQuestion + vbYesNo) = vbNo Then
    Me.PartNumberList.Undo
    Response = acDataErrContinue
    Exit Sub
Else
    CurrentDb.Execute "INSERT INTO Inventory ( PartNumber ) VALUES ('" & NewData & "');"
    Response = acDataErrAdded
End If

The table receives the new data, but now I need to requery the form before the form can find the data. If I add Me.Requery immediately after that code, the form thinks I'm trying to enter the same item into the form, it still hasn't found it in the table, and it asks again if I want to add that item. If I try to requery the combobox first, it tells me I must save the data first. Adding If Me.Dirty then Me.Dirty = False right in front of the Requery doesn't fix this.
So after some searching I found that I should try moving to the first record in the combobox before a requery. This works except now I get an notice "The value you entered isn't valid for this field." I press OK and then everything is requeried and I can now manually navigate to my new part number. But I can't figure out exactly what is throwing this notice. On Error Resume Next doesn't bypass this notice. When I step through the code, the notice seems to happen after NotInList, and then it skips all other events. I won't fire my BeforeUpdate or AfterUpdate.
Maybe I'm just going about my item lookup all wrong. Maybe I should have the user add items with a different form. It would just be convenient to keep it all to one single form. Oh maybe it's worth mentioning, this form is opening as a Dialog, in the Add mode. But the errors stay the same even if I open the form by itself with Data Entry off.

A: Instead of requerying the form after you successfully add the row to the table, maybe programatically set the forms' record source instead? So, make sure the form has no recordsource in design view and save the form. Open the dialog form where needed, and make sure the ComboBox has a RecordSource. The user enters a value not in the list, you use the NotInList event to add it to the DB, store the value the user entered into a variable, requery only your ComboBox, set the combobox to the variable so that the new entry is selected, and then your code would use:
Me.RecordSource = "SELECT * FROM Inventory WHERE PartNumber= " & Me!YourComboboxValue

OR
Me.RecordSource = "SELECT * FROM Inventory WHERE PartNumber= '" & Me!YourComboboxValue & "'"

If "PartNumber" it is a string value.
This should be WAY faster than DoCmd.SearchForRecord. When you open the form intitally, you're pulling rows into the form that will never be needed.
After you requery the combobox, the new value will be in the list but not selected. That may be ok for your situation. If you store the part number in a variable first, you can do something like this:
Dim sPartNumber as String
sPartNumber = NewData
<ADD YOUR DATA TO THE TABLE>
Me!ComboBox.Requery
Me.RecordSource = "SELECT * FROM Inventory WHERE PartNumber = '" & sPartNumber & "'"
Me!Combobox = sPartNumber (Optional)

Code may not be perfect as doing it from memory. :-)
Let me know, and good luck!