text:
\section{Introduction}
\label{sec:intro}

The main difficulties encountered in sound texture synthesis become apparent when trying to properly define them. While examples of textures easily come to mind (e.g. environmental noises such as wind or rain, crowd hubbub, engine sounds, birds singing, etc.), pinpointing their common factors proves much harder: randomness seems to be one, along with a "background" aspect caused by an important number of indistinguishable small audio events happening at once. But this is not all there is to it, since we would still tend to call a sound including small occasional events happening in the foreground a texture. Hence, the definition offered by Saint-Arnaud \cite{saint1995classification}, summed up by Schwartz \cite{schwarz2011}, of "a superposition of small audio atoms overlapping randomly while following a higher level organization" is incomplete because it only encompasses completely stationary textures. It can even be argued that in reality no such texture can be observed: a synthesis algorithm strictly following this definition would thus be incomplete and of little use.

This means that a sound texture synthesis algorithm needs to be able to synthesize small indiscernible and random events but also singular, recognizable events, both harmonic (e.g. birds chirping) or not (e.g. crowd clapping). This extremely broad range of sounds is precisely what makes texture synthesis difficult and why common synthesis algorithms (for instance sinusoidal models) prove ill-suited for it, making it require dedicated ones.

Before presenting an overview of existing sound texture synthesis algorithm, we will first detail what we exactly expect from them.

In the case of textures, "re-synthesis" is a term as fitting as "synthesis": starting from an existing texture, the goal is usually to create a sound that is different from the original while still being identifiable as the same kind of texture, as if it had been recorded only moments later. Although this is the prime goal of the algorithm, this obviously does not exclude the possibility of manipulating the synthesized texture. For instance, it could be desirable to allow the algorithm to synthesize texture lasting any arbitrary length of time, or to be able to have the synthesis evolve throughout time, altering its properties or turning into another texture.

To achieve such a result, a broad variety of methods have been developed: for the needs of this article, we will split them into 3 different categories.

The first of those is \textit{physics-based synthesis}. In this one the goal is to first emulate the phenomenon at the source of the texture (say, the impact of a drop of rain on a flat surface) via a physically informed modelization of it. From there, one can simulate any number of events, dimensioning and randomizing it so as to fit the target texture, thus recreating a convincing physical simulation of the texture (see for instance \cite{o2002synthesizing}). While this method has the potential of being extremely controllable and allowing the manipulation of synthesis parameters that make physical sense, it also has the obvious flaw of not being flexible at all. Each algorithm will correspond to one and only one kind of texture: indeed, a physical model of the rain will prove poorly suited to synthesize a flock of birds twittering.

Then comes \textit{granular synthesis}. The original texture is first chopped into milliseconds-long audio particles, then reordered and concatenated to reconstruct a new texture (see for instance \cite{schwarz2007corpus}). While being quite versatile in the range of texture it is capable of re-synthesizing, this method is also heavily dependent on the choice of atom size and requires more complex reordering methods when one tries to synthesize a broader array of textures. In particular, reconstructing any foreground event lasting more than an atom will prove quite hard.

The last of those sound texture synthesis methods, to which our algorithm belongs, is \textit{parametric synthesis}. Here the general goal is to establish a set of parameters to describe textures with. If those parameters are well chosen, any two textures which parameters have the same values should sound like the same kind of texture without needing to be identical. Hence, one would only need to modify any sound until its parameters reach the values of a target texture's to re-synthesize it. While in theory this method is able to synthesize any and all kind of texture, in practice the quality and flexibility of the synthesis entirely depend on the choice of parameters. Indeed they need to describe the texture so that they hold enough information to re-synthesize a similar one, while not holding too much else the only way of creating a texture having the same parameter values will be by creating an exact copy. In addition to this, the parameters must be adapted to the widest possible range of textures.

This paradigm is notably used by McDermott and Simoncelli in \cite{mcdermott2011}, where a set of statistics extracted from the critical and modulation bands was used as parameters. This algorithm gave convincing results for a broad range of textures, but ran into trouble when trying to synthesize textures containing singular events. Inspired by the work of Gatys et al. \cite{gatys2015texture} who used the cross-correlations between the feature maps of a trained 2D convolutional neural network (CNN) as parameters to synthesize visual textures, several attempts to convert this approach to audio were made. In \cite{ulyanov2016}, Ulyaninov and Lebedev use the same principle applied to spectrograms, with the frequency dimension acting as color depth and using a 1D CNN, to synthesize textures with moderate success. In \cite{antognini2018synthesizing}, Antognini et al. add to this approach several constraints aimed at recreating rhythm with a better fidelity and increasing the diversity of results. While giving convincing results, this method also requires fine tuning in order to balance those constraints. Since changing target texture implies tuning those synthesis parameters, this makes the algorithm lose in flexibility. In addition to this, both this method and Ulyaninov and Lebedev's eventually output a spectrogram: it is then necessary to recover its phase and invert it to retrieve an audible time signal, using methods such as the Griffin and Lim algorithm \cite{griffin1984signal}. This phase recovery step is an added burden to the synthesis as it tends to downgrade the quality of the audio signal, even more so when working with complex sounds such as textures.

In this work, we present a new parametric texture synthesis based on the method of Gatys et al.\cite{gatys2015texture} which avoids the troubles of requiring any fine tuning or of going through spectrogram inversion while still working with a wide array of textures, including those presenting strong singular events. We then present a few examples to demonstrate its possibilities and proceed to discuss those results.

\section{Method}
\label{sec:method}

Following the principle of parametric synthesis, we first need to choose a set of parameters to represent a sound texture with.

\subsection{Parametrization}
\label{ssec:param}

\subsubsection{Pre-processing}
\label{sssec:preproc}

As our method is adapted from the work of Gatys et al. \cite{gatys2015texture} on 2D images, we require a 2D representation of our sound signal.

To this effect we work with log-\penalty0\hskip0pt\relax{}spectrograms. The log-\penalty0\hskip0pt\relax{}spectrogram $S$ is computed using the spectrogram $X$, taken as the magnitude of the short-term Fourier Transform (STFT) of the sound signal:

\begin{equation}
	S = \frac{\log (1 + C \times X)}{\log (1+C)}
\end{equation}

With $C$ a factor controlling compression: the larger $C$ is, the more details we will get at low amplitudes. This choice of normalization is made to ensure that the spectrogram is both compressed by the log function and comprised between 0 and 1.

For the rest of this article, any time-frequency matrix will have frequency as first axis, and time as second. For instance, $S(f,t)$ denotes the value of $S$ at the $f$-th frequency bin and $t$-th time sample.

\subsubsection{Network choice}
\label{sssec:net}

Seeing as Gatys et al. used a network trained for image recognition, our first intuition was to use an equivalent network for working on our spectrograms. As such we initially trained a simple deep 2D CNN on recordings taken from \href{https://freesound.org/}{freesound.org} for scene recognition in order to use it for synthesis. But in \cite{ustyuzhaninov2016texture}, Ustyuzhaninov et al. show that visual textures of the same quality as those obtained by Gatys et al. can be synthesized using a single-layer untrained CNN with various filter size instead of a trained CNN. This proves to still hold for sound textures: the network we use for the synthesized textures presented in this article is a single-layer untrained 2D CNN using filters of different size and ReLU activation. Its architecture is detailed in section \ref{ssec:netarch}. For generalization's sake, the rest of the method is nonetheless presented with a network that has $K$ layers (with $K$ being potentially more than 1), but is still valid when using a single-layer network.

It is worth noting that unlike the methods presented in \cite{ulyanov2016, antognini2018synthesizing}, we use the log-\penalty0\hskip0pt\relax{}spectrograms as 2D images with time and frequency replacing the two space dimensions and not as a 1D signal with frequency as depth, hence the need for 2D convolutions.

\subsubsection{Parameters computation}
\label{sssec:paramcomp}

Let us denote $F^{k}_{i, (x,y)}$ the value of the $i$-th feature map of the $k$-th layer at the position $(x,y)$. In \cite{gatys2015texture}, Gatys et al. use the Gram matrices of each layer of the network as parameters. The $(i,j)$ element of the gram matrix $G^k$ of $k$-th Gram marix is defined as the cross-correlation between the $i$-th and $j$-th feature maps of the layer:

\begin{equation}
	G^k (i,j) = \sum_{(x,y)} F^{k}_{i}(x,y) \times F^{k}_{j}(x,y)
\end{equation}

The parameter set is chosen as the list of gram matrices from $G^1$ to $G^K$. Although this proves a fine choice for visual textures, such parameters cannot be directly used in the case of sound textures. Indeed, those Gram matrices average all spatial information when performing a sum over all positions $(x,y)$, thus implying that the parametrization should be invariant in both direction. This does no translate well to sound, seeing as sound textures behave differently regarding time and regarding frequency: while we wish for a pseudo-stationarity over the time dimension, there is no reason for there to be any invariance to pitch-shifting. As such, we instead use the 3-dimensional tensors $H^k$ defined as:

\begin{equation}
	H^k (i,j, x) = \sum_{y} F^{k}_{i}(x,y) \times F^{k}_{j}(x,y)
\end{equation}

Defined this way, the tensors $H^k$ with $k\in[1,K]$ that we will use as parameters do indeed average all information from the time dimension, but keep the information regarding the frequency dimension intact, achieving our goal. The parameter extraction process is represented in figure \ref{fig:gram}.

\begin{figure*}[ht]
\center
\includegraphics[width=5.5in]{gram.eps}
\caption{\label{fig:gram}{\it Computation of the 3-dimensional parameter tensors from the temporal cross-correlations of the feature maps of a CNN, .}}
\end{figure*}

\subsection{Texture loss}
\label{ssec:loss}

As mentioned in section \ref{sec:intro}, the main goal of parametric synthesis is to create a sound which has the same parameters values as a those of a target sound. Seeing as we now have a parameter set, we only need to define a quantitative error function which will then be minimized throughout the synthesis process. To that effect, we use a simple distance function between the two sets similarly to Ustyuzhaninov et al. \cite{ustyuzhaninov2016texture}:

\begin{equation}
	\mathcal{L} = \sum_k \frac{\Vert \tilde{H}^k - H^k \Vert_2}{\Vert \tilde{H}^k \Vert_2}
\end{equation}

With $\Vert . \Vert_2$ denoting the L2 norm, and the tilde denoting the target texture parameters.

\subsection{Optimization}
\label{ssec:opt}

The last step of the synthesis process is to create a sound signal which minimizes the texture loss. Since the chain of operations leading to the computation of the texture loss is differentiable (despite passing through the complex domain due to the STFT: see \cite{caracalla2017gradient} for further insight), we may use any optimization algorithm requiring the gradient of the error function to iteratively modify a sound until it reaches a satisfying minimum of the loss function.

We observed that performing the optimization on the log-\penalty0\hskip0pt\relax{}spectrogram is iteration-wise faster than performing the optimization directly on the sound signal (both of them being initialized using white noises). The texture loss appears to be easier to minimize when working in the time-frequency domain than when working directly in the time domain. To take advantage of that fact, we first perform a quick synthesis of a log-\penalty0\hskip0pt\relax{}spectrogram and invert it using a random phase matrix (which would correspond to performing one step of the Griffin-Lim algorithm): while this inversion raises the value of the texture loss, it still makes for a good initialization of the optimization in the time domain. This allows us to skip a major part of the optimization process on the sound signal. Once performed this optimization results in a sound signal which minimizes the texture loss, meaning its parameters values are close to those of the target texture. The whole synthesis process is illustrated in figure \ref{fig:synthesis}.

\begin{figure*}[ht]
\center
\includegraphics[width=5.5in]{synthesis.eps}
\caption{\label{fig:synthesis}{\it Organization of the texture synthesis algorithm: a quick optimization on a log-\penalty0\hskip0pt\relax{}spectrogram is performed in the frequency-time domain and its result is inverted. It then serves as initialization for the main optimization performed on a sound signal.}}
\end{figure*}

\subsection{Extension}
\label{ssec:ext}

Once the basis for the texture synthesis has been set it becomes possible to develop on it, for instance by creating an indefinitely long sound texture. In order to do so, we use a principle resembling the "exquisite cadaver" game where one has to continue the drawing of another while only being seeing the border of the other's drawing. In our case we first synthesize an initial sound texture from a given target and copy the end of it onto the start of a white noise signal: we then perform another synthesis using this signal as initialization and the same target, while preventing the optimization to be performed on the section that was copied from the previous synthesis. This results in a continuous texture seamlessly extending on the copied part, thus being able to perfectly follow where the previous synthesis left off. We only need to concatenate the newly generated texture to the previous one to create a longer sound texture. This process can obviously be repeated any number of times so as to obtain a texture of any desired length. One iteration of this process is shown on figure \ref{fig:exquisite}, while an example of such a synthesis is available for listening at \href{http://recherche.ircam.fr/anasyn/caracalla/dafx19/extended_synthesis/}{recherche.ircam.fr/\penalty0\hskip0pt\relax{}anasyn/caracalla/\penalty0\hskip0pt\relax{}dafx19/extended\_synthesis/}.

\begin{figure*}[ht]
\center
\includegraphics[width=5.5in]{exquisite.eps}
\caption{\label{fig:exquisite}{\it Extension of a first synthesis by copying its end onto the start of a white noise signal. This signal is then used as initialization of another synthesis, while preventing the common part from being modified. The tiles are then concatenated to form a longer texture. Sound signals are represented by their log-\penalty0\hskip0pt\relax{}spectrogram for explanation's sake.}}
\end{figure*}

\section{Results}
\label{sec:results}

\subsection{Synthesis parameters}
\label{ssec:synthpar}

The results presented in this section have been obtained using time signals sampled at $22050$ Hz, and a STFT with a window length of $512$ and hop size of $256$. The compression factor $C$ is set to $1000$. The sound signals all have a length of $262,400$ samples so that their log-\penalty0\hskip0pt\relax{}spectrograms are $1024$ frames long.

\subsection{Network architecture}
\label{ssec:netarch}

As mentioned in section \ref{sssec:net}, Ustyuzhaninov et al. \cite{ustyuzhaninov2016texture} show that using a single-layered untrained CNN yields equivalent results to using a trained CNN when synthesizing visual textures, and works best when the random CNN uses filters of several sizes. Taking inspiration from this, and after comparing results with a CNN trained for scene recognition we chose to use an untrained network made of a single multi-size convolutionnal layer. This layer is made of 128 square filters of each of the sizes [3, 5, 7, 11, 15, 19, 23, 27] with a stride of (1, 1) and zero-padding so that the differently-sized convolutions can then be stacked, followed by a ReLU activation layer.

\subsection{Optimization parameters}
\label{ssec:optpar}

The optimization algorithm chosen in this article is the L-BFGS algorithm. Starting from a white noise image, we perform 1000 iteration of it in the time-frequency domain to create the initialization of the time domain optimization. Said optimization is performed over 10000 iterations. Using a GeForce GTX 1080 Ti GPU, the whole process takes around an hour.

\subsection{Experimental results}
\label{ssec:respres}

The log-\penalty0\hskip0pt\relax{}spectrograms of both target and synthesized textures are shown in figure \ref{fig:results} for three sounds : a wildlife scene with crickets chirping in the background and a bird singing in the foreground (recognizable to its inverted "v"-shaped patterns), birds singing both in the background and in the foreground (with one strongly standing out the mid-frequency range), and the hubbub of a crowd chatting. The audio signals of all three are available for listening at \href{http://recherche.ircam.fr/anasyn/caracalla/dafx19/synthesis/}{recherche.ircam.fr/\penalty0\hskip0pt\relax{}anasyn/caracalla/\penalty0\hskip0pt\relax{}dafx19/synthesis/}, along with other textures such as wind, bees and fire sounds.

\begin{figure*}[ht]
\center
\includegraphics[width=6.5in]{results.eps}
\caption{\label{fig:results}{\it Log-\penalty0\hskip0pt\relax{}spectrograms of both originals textures (on the left) and synthesized textures (on the right) using the method presented in this article.}}
\end{figure*}

\section{Discussion}
\label{sec:discussion}

\subsection{Results analysis}
\label{ssec:resana}

The strength of this texture synthesis algorithm lies in the fact that it manages to both synthesize background and foreground events convincingly. The crowd chatter, which includes no singular events, is as well recreated as the bird singing loudly in front of a flock.

Another advantage to it is the absence of any parameter tuning: unlike the method presented by Antognini et al. \cite{antognini2018synthesizing} where three losses need to be balanced through the optimization process and potentially from one texture to another, the texture loss used here is straightforward and requires no tuning. This way the algorithm can effectively be used without needing to take into account which texture is being synthesized.

In addition to this, because the final optimization is performed on the time signal our algorithm does not end with a spectrogram inversion (the harm it can bring is easily noticeable when trying to invert spectrograms of existing textures).

\subsection{Untrained vs. trained network}
\label{ssec:untrain}

As mentioned in section \ref{sssec:net}, both trained and untrained network have been used in visual texture synthesis with success. The main argument in \cite{gatys2015texture} is that the CNN trained for image recognition has learned filters adapted to common shapes encountered in images. This, coupled with the depth of the network, is what supposedly allows the network to recreate a large array of shapes when trying to reproduce the cross-correlations between the activations of its filters once the network has been fed an image (in this case, a visual texture). This argumentation is challenged by Ustyuzhaninov et al. in \cite{ustyuzhaninov2016texture}, who demonstrate that a single-layered untrained CNN can performed as well as a trained network given enough filters. This would tend to imply that given enough random filters, the space of shapes recreated when synchronizing some of those filters is wide enough to compensate for the lack of training.

This translates seamlessly to sound textures: while we first worked with networks trained for sound recognition, experiments with untrained network showed that they performed just as well. This being said, it could be interesting to explore the difference between the use of the two further: for instance, trained CNN might require less filters than untrained ones, thus making our parameter tensors lighter and the computations faster. The depth of the trained CNN might also help it capture correlations across distant events in the spectrogram. This would indeed be useful, seeing as the synthesized birds texture from figure \ref{fig:synthesis} shows that while the algorithm manages to reproduce the local pattern of bird cries well, it fails to reproduce the larger of pattern of groups of cries separated by gaps of a few seconds. This is also quite audible when listening to the attempt at (non-texture) singing voice synthesis: since the human voice is rich in harmonics, it spans over a large portion of the frequency spectrum. Because our algorithm does not enforce long-distance correlations, the upper harmonics are not synchronized with the lower ones, thus creating another high-pitched voice speaking on its own. In the fire synthesis, this is also clearly noticeable when looking at impacts: since those short and sharp events span over most frequencies, the algorithm has trouble generating them and mostly manages to recreate impacts that only span over part of the frequency axis, resulting in less convincing synthesized textures. This could potentially be solved even when using untrained network by choosing bigger filters, which would then "see" larger chunks of the log-\penalty0\hskip0pt\relax{}spectrogram at once.

\subsection{Border effect}
\label{ssec:bordereff}

Our texture synthesis presents one intriguing property: at the start and end of the sound, the synthesized texture is identical to the original one (for instance, this is slightly visible at the start of the log-\penalty0\hskip0pt\relax{}spectrogram of the birds texture from figure \ref{fig:synthesis}). In all of our synthesis, the leftmost and rightmost frames present exactly the same patterns in both original and synthesized textures. Although this effect is interesting, it dissipates quickly and only affects the time dimension: this means that even if we were to not get rid of this artifact, slightly cropping the start and end of the synthesized texture does completely discard it.

Gatys et al. \cite{gatys2015texture} noticed a similar effect in his visual texture synthesis where a distinctive part of the image was always reproduced around the same spot, and suggested that this effect originated from the zero-padding used in the convolution layers. To test this theory we experimented synthesizing textures using only "valid" convolutions (i.e. without any padding): the results still presented the same border artifacts, which would indicate that they do not originate from the zero-padding. We do not have any alternative explanation to present at the moment.

It is worth noticing that this effect lasts around the length of the biggest filter used (in our case, 27 frames): for now, this means that we need to choose a filter size large enough to ensure the good reproduction of correlations between events, while small enough so that the border effect doesn't spoil too much of the interior of the synthesized texture.

\subsection{Computation time}
\label{ssec:comput}

As mentioned in section \ref{sssec:paramcomp}, computation time is for now far behind real-time since it takes around an hour to synthesize 12 seconds of audio with one GPU. While tedious for now, this process could potentially be alleviated by removing as much redundant information from the target parameters as possible (as of now, we have around $\mathtt{\sim}100$M parameters in the parameter tensors $H_k$).

Using the same network as described in section \ref{ssec:netarch}, we tried removing all cross-correlations between filters of different size from the parameter tensor: this dropped the number of parameters to $\mathtt{\sim}16$M without altering the quality of synthesized textures. Another lead would be to use a trained CNN instead of an untrained one, seeing as trained filters should prove efficient at describing patterns without needing to be as numerous as in an untrained CNN. We believe it should also be possible to drop the number of parameters even lower, for instance by using principal component analysis to select which cross-correlations need to be imposed over the synthesized signal as Gatys et al. \cite{gatys2015texture} did.

Another potential lightening of the algorithm could come from changing signal representation: so far we have used log-\penalty0\hskip0pt\relax{}spectrograms, but using another time-frequency representation could be greatly beneficial. For instance, using mel bands instead of the raw frequency bins of the spectrogram would reduce the number of parameters while staying perceptually sensible.

\section{Conclusions}

We introduced a new parametric texture synthesis based on the work of Gatys et al. \cite{gatys2015texture} in visual textures: using the temporal cross-correlations between the feature maps of a CNN as parameters, we iteratively modify a sound signal until the values of its parameters reach those of a target texture. While the input of the CNN is the log-\penalty0\hskip0pt\relax{}spectrogram of the sound, the optimization process is made directly in the time domain so as to avoid any phase recovery step in the synthesis.

The algorithm yields convincing results on a wide array of texture, even if they include singular events in the foreground. It can be straightforwardly applied without requiring the fine tuning of synthesis parameters from one texture to another. Its major flaws for now lie in its long computation time and its trouble re-synthesizing correlations of events far apart in the log-\penalty0\hskip0pt\relax{}spectrogram. A number of possible ways to address the first issue have been presented, for instance by subsampling the parameters tensor and altering the time-frequency representation. As for the second, the influence of the CNN architecture, and most notably the shape of its filters, are currently being investigated.

\nocite{*}
\bibliographystyle{IEEEbib}

redpajama_set_name: RedPajamaArXiv


text:
// Copyright (C) 2011 The Libphonenumber Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

#include "phonenumbers/asyoutypeformatter.h"

#include <cctype>
#include <list>
#include <string>

#include <google/protobuf/message_lite.h>

#include "phonenumbers/base/logging.h"
#include "phonenumbers/base/memory/scoped_ptr.h"
#include "phonenumbers/phonemetadata.pb.h"
#include "phonenumbers/phonenumberutil.h"
#include "phonenumbers/regexp_cache.h"
#include "phonenumbers/regexp_factory.h"
#include "phonenumbers/stringutil.h"
#include "phonenumbers/unicodestring.h"

namespace i18n {
namespace phonenumbers {

using google::protobuf::RepeatedPtrField;

namespace {

const char kPlusSign = '+';

// A pattern that is used to match character classes in regular expressions.
// An example of a character class is [1-4].
const char kCharacterClassPattern[] = "\\[([^\\[\\]])*\\]";

// This is the minimum length of national number accrued that is required to
// trigger the formatter. The first element of the leading_digits_pattern of
// each number_format contains a regular expression that matches up to this
// number of digits.
const size_t kMinLeadingDigitsLength = 3;

// The digits that have not been entered yet will be represented by a \u2008,
// the punctuation space.
const char kDigitPlaceholder[] = "\xE2\x80\x88"; /* " " */

// Character used when appropriate to separate a prefix, such as a long NDD or a
// country calling code, from the national number.
const char kSeparatorBeforeNationalNumber = ' ';

// A set of characters that, if found in a national prefix formatting rules, are
// an indicator to us that we should separate the national prefix from the
// number when formatting.
const char kNationalPrefixSeparatorsPattern[] = "[- ]";

// Replaces any standalone digit in the pattern (not any inside a {} grouping)
// with \d. This function replaces the standalone digit regex used in the Java
// version which is currently not supported by RE2 because it uses a special
// construct (?=).
void ReplacePatternDigits(string* pattern) {
  DCHECK(pattern);
  string new_pattern;
  // This is needed since sometimes there is more than one digit in between the
  // curly braces.
  bool is_in_braces = false;

  for (string::const_iterator it = pattern->begin(); it != pattern->end();
       ++it) {
    const char current_char = *it;

    if (isdigit(current_char)) {
      if (is_in_braces) {
        new_pattern += current_char;
      } else {
        new_pattern += "\\d";
      }
    } else {
      new_pattern += current_char;
      if (current_char == '{') {
        is_in_braces = true;
      } else if (current_char == '}') {
        is_in_braces = false;
      }
    }
  }
  pattern->assign(new_pattern);
}

// Matches all the groups contained in 'input' against 'pattern'.
void MatchAllGroups(const string& pattern,
                    const string& input,
                    const AbstractRegExpFactory& regexp_factory,
                    RegExpCache* cache,
                    string* group) {
  DCHECK(cache);
  DCHECK(group);
  string new_pattern(pattern);

  // Transforms pattern "(...)(...)(...)" to "(.........)".
  strrmm(&new_pattern, "()");
  new_pattern = StrCat("(", new_pattern, ")");

  const scoped_ptr<RegExpInput> consume_input(
      regexp_factory.CreateInput(input));
  bool status =
      cache->GetRegExp(new_pattern).Consume(consume_input.get(), group);
  DCHECK(status);
}

PhoneMetadata CreateEmptyMetadata() {
  PhoneMetadata metadata;
  metadata.set_international_prefix("NA");
  return metadata;
}

}  // namespace

AsYouTypeFormatter::AsYouTypeFormatter(const string& region_code)
    : regexp_factory_(new RegExpFactory()),
      regexp_cache_(*regexp_factory_.get(), 64),
      current_output_(),
      formatting_template_(),
      current_formatting_pattern_(),
      accrued_input_(),
      accrued_input_without_formatting_(),
      able_to_format_(true),
      input_has_formatting_(false),
      is_complete_number_(false),
      is_expecting_country_code_(false),
      phone_util_(*PhoneNumberUtil::GetInstance()),
      default_country_(region_code),
      empty_metadata_(CreateEmptyMetadata()),
      default_metadata_(GetMetadataForRegion(region_code)),
      current_metadata_(default_metadata_),
      last_match_position_(0),
      original_position_(0),
      position_to_remember_(0),
      prefix_before_national_number_(),
      should_add_space_after_national_prefix_(false),
      national_prefix_extracted_(),
      national_number_(),
      possible_formats_() {
}

// The metadata needed by this class is the same for all regions sharing the
// same country calling code. Therefore, we return the metadata for "main"
// region for this country calling code.
const PhoneMetadata* AsYouTypeFormatter::GetMetadataForRegion(
    const string& region_code) const {
  int country_calling_code = phone_util_.GetCountryCodeForRegion(region_code);
  string main_country;
  phone_util_.GetRegionCodeForCountryCode(country_calling_code, &main_country);
  const PhoneMetadata* const metadata =
      phone_util_.GetMetadataForRegion(main_country);
  if (metadata) {
    return metadata;
  }
  // Set to a default instance of the metadata. This allows us to function with
  // an incorrect region code, even if formatting only works for numbers
  // specified with "+".
  return &empty_metadata_;
}

bool AsYouTypeFormatter::MaybeCreateNewTemplate() {
  // When there are multiple available formats, the formatter uses the first
  // format where a formatting template could be created.
  for (list<const NumberFormat*>::const_iterator it = possible_formats_.begin();
       it != possible_formats_.end(); ++it) {
    DCHECK(*it);
    const NumberFormat& number_format = **it;
    const string& pattern = number_format.pattern();
    if (current_formatting_pattern_ == pattern) {
      return false;
    }
    if (CreateFormattingTemplate(number_format)) {
      current_formatting_pattern_ = pattern;
      SetShouldAddSpaceAfterNationalPrefix(number_format);
      // With a new formatting template, the matched position using the old
      // template needs to be reset.
      last_match_position_ = 0;
      return true;
    }
  }
  able_to_format_ = false;
  return false;
}

void AsYouTypeFormatter::GetAvailableFormats(
    const string& leading_three_digits) {
  const RepeatedPtrField<NumberFormat>& format_list =
      (is_complete_number_ &&
       current_metadata_->intl_number_format().size() > 0)
          ? current_metadata_->intl_number_format()
          : current_metadata_->number_format();
  bool national_prefix_used_by_country =
      current_metadata_->has_national_prefix();
  for (RepeatedPtrField<NumberFormat>::const_iterator it = format_list.begin();
       it != format_list.end(); ++it) {
    if (!national_prefix_used_by_country || is_complete_number_ ||
        it->national_prefix_optional_when_formatting() ||
        phone_util_.FormattingRuleHasFirstGroupOnly(
            it->national_prefix_formatting_rule())) {
      if (phone_util_.IsFormatEligibleForAsYouTypeFormatter(it->format())) {
        possible_formats_.push_back(&*it);
      }
    }
  }
  NarrowDownPossibleFormats(leading_three_digits);
}

void AsYouTypeFormatter::NarrowDownPossibleFormats(
    const string& leading_digits) {
  const int index_of_leading_digits_pattern =
      leading_digits.length() - kMinLeadingDigitsLength;

  for (list<const NumberFormat*>::iterator it = possible_formats_.begin();
       it != possible_formats_.end(); ) {
    DCHECK(*it);
    const NumberFormat& format = **it;

    if (format.leading_digits_pattern_size() >
        index_of_leading_digits_pattern) {
      const scoped_ptr<RegExpInput> input(
          regexp_factory_->CreateInput(leading_digits));
      if (!regexp_cache_.GetRegExp(format.leading_digits_pattern().Get(
              index_of_leading_digits_pattern)).Consume(input.get())) {
        it = possible_formats_.erase(it);
        continue;
      }
    }  // else the particular format has no more specific leadingDigitsPattern,
       // and it should be retained.
    ++it;
  }
}

void AsYouTypeFormatter::SetShouldAddSpaceAfterNationalPrefix(
    const NumberFormat& format) {
  static const scoped_ptr<const RegExp> national_prefix_separators_pattern(
      regexp_factory_->CreateRegExp(kNationalPrefixSeparatorsPattern));
  should_add_space_after_national_prefix_ =
      national_prefix_separators_pattern->PartialMatch(
          format.national_prefix_formatting_rule());
}

bool AsYouTypeFormatter::CreateFormattingTemplate(const NumberFormat& format) {
  string number_pattern = format.pattern();

  // The formatter doesn't format numbers when numberPattern contains "|", e.g.
  // (20|3)\d{4}. In those cases we quickly return.
  if (number_pattern.find('|') != string::npos) {
    return false;
  }
  // Replace anything in the form of [..] with \d.
  static const scoped_ptr<const RegExp> character_class_pattern(
      regexp_factory_->CreateRegExp(kCharacterClassPattern));
  character_class_pattern->GlobalReplace(&number_pattern, "\\\\d");

  // Replace any standalone digit (not the one in d{}) with \d.
  ReplacePatternDigits(&number_pattern);

  string number_format = format.format();
  formatting_template_.remove();
  UnicodeString temp_template;
  GetFormattingTemplate(number_pattern, number_format, &temp_template);

  if (temp_template.length() > 0) {
    formatting_template_.append(temp_template);
    return true;
  }
  return false;
}

void AsYouTypeFormatter::GetFormattingTemplate(
    const string& number_pattern,
    const string& number_format,
    UnicodeString* formatting_template) {
  DCHECK(formatting_template);

  // Creates a phone number consisting only of the digit 9 that matches the
  // number_pattern by applying the pattern to the longest_phone_number string.
  static const char longest_phone_number[] = "999999999999999";
  string a_phone_number;

  MatchAllGroups(number_pattern, longest_phone_number, *regexp_factory_,
                 &regexp_cache_, &a_phone_number);
  // No formatting template can be created if the number of digits entered so
  // far is longer than the maximum the current formatting rule can accommodate.
  if (a_phone_number.length() < national_number_.length()) {
    formatting_template->remove();
    return;
  }
  // Formats the number according to number_format.
  regexp_cache_.GetRegExp(number_pattern).GlobalReplace(
      &a_phone_number, number_format);
  // Replaces each digit with character kDigitPlaceholder.
  GlobalReplaceSubstring("9", kDigitPlaceholder, &a_phone_number);
  formatting_template->setTo(a_phone_number.c_str(), a_phone_number.size());
}

void AsYouTypeFormatter::Clear() {
  current_output_.clear();
  accrued_input_.remove();
  accrued_input_without_formatting_.remove();
  formatting_template_.remove();
  last_match_position_ = 0;
  current_formatting_pattern_.clear();
  prefix_before_national_number_.clear();
  national_prefix_extracted_.clear();
  national_number_.clear();
  able_to_format_ = true;
  input_has_formatting_ = false;
  position_to_remember_ = 0;
  original_position_ = 0;
  is_complete_number_ = false;
  is_expecting_country_code_ = false;
  possible_formats_.clear();
  should_add_space_after_national_prefix_ = false;

  if (current_metadata_ != default_metadata_) {
    current_metadata_ = GetMetadataForRegion(default_country_);
  }
}

const string& AsYouTypeFormatter::InputDigit(char32 next_char, string* result) {
  DCHECK(result);

  InputDigitWithOptionToRememberPosition(next_char, false, &current_output_);
  result->assign(current_output_);
  return *result;
}

const string& AsYouTypeFormatter::InputDigitAndRememberPosition(
    char32 next_char,
    string* result) {
  DCHECK(result);

  InputDigitWithOptionToRememberPosition(next_char, true, &current_output_);
  result->assign(current_output_);
  return *result;
}

void AsYouTypeFormatter::InputDigitWithOptionToRememberPosition(
    char32 next_char,
    bool remember_position,
    string* phone_number) {
  DCHECK(phone_number);

  accrued_input_.append(next_char);
  if (remember_position) {
    original_position_ = accrued_input_.length();
  }
  // We do formatting on-the-fly only when each character entered is either a
  // plus sign (accepted at the start of the number only).
  string next_char_string;
  UnicodeString(next_char).toUTF8String(next_char_string);

  char normalized_next_char = '\0';
  if (!(phone_util_.ContainsOnlyValidDigits(next_char_string) ||
      (accrued_input_.length() == 1 && next_char == kPlusSign))) {
    able_to_format_ = false;
    input_has_formatting_ = true;
  } else {
    normalized_next_char =
        NormalizeAndAccrueDigitsAndPlusSign(next_char, remember_position);
  }
  if (!able_to_format_) {
    // When we are unable to format because of reasons other than that
    // formatting chars have been entered, it can be due to really long IDDs or
    // NDDs. If that is the case, we might be able to do formatting again after
    // extracting them.
    if (input_has_formatting_) {
      phone_number->clear();
      accrued_input_.toUTF8String(*phone_number);
    } else if (AttemptToExtractIdd()) {
      if (AttemptToExtractCountryCode()) {
        AttemptToChoosePatternWithPrefixExtracted(phone_number);
        return;
      }
    } else if (AbleToExtractLongerNdd()) {
      // Add an additional space to separate long NDD and national significant
      // number for readability. We don't set
      // should_add_space_after_national_prefix_ to true, since we don't want
      // this to change later when we choose formatting templates.
      prefix_before_national_number_.push_back(kSeparatorBeforeNationalNumber);
      AttemptToChoosePatternWithPrefixExtracted(phone_number);
      return;
    }
    phone_number->clear();
    accrued_input_.toUTF8String(*phone_number);
    return;
  }

  // We start to attempt to format only when at least kMinLeadingDigitsLength
  // digits (the plus sign is counted as a digit as well for this purpose) have
  // been entered.
  switch (accrued_input_without_formatting_.length()) {
    case 0:
    case 1:
    case 2:
      phone_number->clear();
      accrued_input_.toUTF8String(*phone_number);
      return;
    case 3:
      if (AttemptToExtractIdd()) {
        is_expecting_country_code_ = true;
      } else {
        // No IDD or plus sign is found, might be entering in national format.
        RemoveNationalPrefixFromNationalNumber(&national_prefix_extracted_);
        AttemptToChooseFormattingPattern(phone_number);
        return;
      }
    default:
      if (is_expecting_country_code_) {
        if (AttemptToExtractCountryCode()) {
          is_expecting_country_code_ = false;
        }
        phone_number->assign(prefix_before_national_number_);
        phone_number->append(national_number_);
        return;
      }
      if (possible_formats_.size() > 0) {
        // The formatting pattern is already chosen.
        string temp_national_number;
        InputDigitHelper(normalized_next_char, &temp_national_number);
        // See if accrued digits can be formatted properly already. If not, use
        // the results from InputDigitHelper, which does formatting based on the
        // formatting pattern chosen.
        string formatted_number;
        AttemptToFormatAccruedDigits(&formatted_number);
        if (formatted_number.length() > 0) {
          phone_number->assign(formatted_number);
          return;
        }
        NarrowDownPossibleFormats(national_number_);
        if (MaybeCreateNewTemplate()) {
          InputAccruedNationalNumber(phone_number);
          return;
        }
        if (able_to_format_) {
          AppendNationalNumber(temp_national_number, phone_number);
        } else {
          phone_number->clear();
          accrued_input_.toUTF8String(*phone_number);
        }
        return;
      } else {
        AttemptToChooseFormattingPattern(phone_number);
      }
  }
}

void AsYouTypeFormatter::AttemptToChoosePatternWithPrefixExtracted(
    string* formatted_number) {
  able_to_format_ = true;
  is_expecting_country_code_ = false;
  possible_formats_.clear();
  AttemptToChooseFormattingPattern(formatted_number);
}

bool AsYouTypeFormatter::AbleToExtractLongerNdd() {
  if (national_prefix_extracted_.length() > 0) {
    // Put the extracted NDD back to the national number before attempting to
    // extract a new NDD.
    national_number_.insert(0, national_prefix_extracted_);
    // Remove the previously extracted NDD from prefixBeforeNationalNumber. We
    // cannot simply set it to empty string because people sometimes incorrectly
    // enter national prefix after the country code, e.g. +44 (0)20-1234-5678.
    int index_of_previous_ndd =
        prefix_before_national_number_.find_last_of(national_prefix_extracted_);
    prefix_before_national_number_.resize(index_of_previous_ndd);
  }
  string new_national_prefix;
  RemoveNationalPrefixFromNationalNumber(&new_national_prefix);
  return national_prefix_extracted_ != new_national_prefix;
}

void AsYouTypeFormatter::AttemptToFormatAccruedDigits(
    string* formatted_result) {
  DCHECK(formatted_result);

  for (list<const NumberFormat*>::const_iterator it = possible_formats_.begin();
       it != possible_formats_.end(); ++it) {
    DCHECK(*it);
    const NumberFormat& number_format = **it;
    const string& pattern = number_format.pattern();

    if (regexp_cache_.GetRegExp(pattern).FullMatch(national_number_)) {
      SetShouldAddSpaceAfterNationalPrefix(number_format);

      string formatted_number(national_number_);
      bool status = regexp_cache_.GetRegExp(pattern).GlobalReplace(
          &formatted_number, number_format.format());
      DCHECK(status);

      AppendNationalNumber(formatted_number, formatted_result);
      return;
    }
  }
}

int AsYouTypeFormatter::GetRememberedPosition() const {
  UnicodeString current_output(current_output_.c_str());
  if (!able_to_format_) {
    return ConvertUnicodeStringPosition(current_output, original_position_);
  }
  int accrued_input_index = 0;
  int current_output_index = 0;

  while (accrued_input_index < position_to_remember_ &&
         current_output_index < current_output.length()) {
    if (accrued_input_without_formatting_[accrued_input_index] ==
        current_output[current_output_index]) {
      ++accrued_input_index;
    }
    ++current_output_index;
  }
  return ConvertUnicodeStringPosition(current_output, current_output_index);
}

void AsYouTypeFormatter::AppendNationalNumber(const string& national_number,
                                              string* phone_number) const {
  int prefix_before_national_number_length =
      prefix_before_national_number_.size();
  if (should_add_space_after_national_prefix_ &&
      prefix_before_national_number_length > 0 &&
      prefix_before_national_number_.at(
          prefix_before_national_number_length - 1) !=
      kSeparatorBeforeNationalNumber) {
    // We want to add a space after the national prefix if the national prefix
    // formatting rule indicates that this would normally be done, with the
    // exception of the case where we already appended a space because the NDD
    // was surprisingly long.
    phone_number->assign(prefix_before_national_number_);
    phone_number->push_back(kSeparatorBeforeNationalNumber);
    StrAppend(phone_number, national_number);
  } else {
    phone_number->assign(
        StrCat(prefix_before_national_number_, national_number));
  }
}

void AsYouTypeFormatter::AttemptToChooseFormattingPattern(
    string* formatted_number) {
  DCHECK(formatted_number);

  if (national_number_.length() >= kMinLeadingDigitsLength) {
    const string leading_digits =
        national_number_.substr(0, kMinLeadingDigitsLength);

    GetAvailableFormats(leading_digits);
    formatted_number->clear();
    AttemptToFormatAccruedDigits(formatted_number);
    // See if the accrued digits can be formatted properly already.
    if (formatted_number->length() > 0) {
      return;
    }
    if (MaybeCreateNewTemplate()) {
      InputAccruedNationalNumber(formatted_number);
    } else {
      formatted_number->clear();
      accrued_input_.toUTF8String(*formatted_number);
    }
    return;
  } else {
    AppendNationalNumber(national_number_, formatted_number);
  }
}

void AsYouTypeFormatter::InputAccruedNationalNumber(string* number) {
  DCHECK(number);
  int length_of_national_number = national_number_.length();

  if (length_of_national_number > 0) {
    string temp_national_number;

    for (int i = 0; i < length_of_national_number; ++i) {
      temp_national_number.clear();
      InputDigitHelper(national_number_[i], &temp_national_number);
    }
    if (able_to_format_) {
      AppendNationalNumber(temp_national_number, number);
    } else {
      number->clear();
      accrued_input_.toUTF8String(*number);
    }
    return;
  } else {
    number->assign(prefix_before_national_number_);
  }
}

bool AsYouTypeFormatter::IsNanpaNumberWithNationalPrefix() const {
  // For NANPA numbers beginning with 1[2-9], treat the 1 as the national
  // prefix. The reason is that national significant numbers in NANPA always
  // start with [2-9] after the national prefix.  Numbers beginning with 1[01]
  // can only be short/emergency numbers, which don't need the national
  // prefix.
  return (current_metadata_->country_code() == 1) &&
         (national_number_[0] == '1') && (national_number_[1] != '0') &&
         (national_number_[1] != '1');
}

void AsYouTypeFormatter::RemoveNationalPrefixFromNationalNumber(
    string* national_prefix) {
  int start_of_national_number = 0;

  if (IsNanpaNumberWithNationalPrefix()) {
    start_of_national_number = 1;
    prefix_before_national_number_.append("1");
    prefix_before_national_number_.push_back(kSeparatorBeforeNationalNumber);
    is_complete_number_ = true;
  } else if (current_metadata_->has_national_prefix_for_parsing()) {
    const scoped_ptr<RegExpInput> consumed_input(
        regexp_factory_->CreateInput(national_number_));
    const RegExp& pattern = regexp_cache_.GetRegExp(
        current_metadata_->national_prefix_for_parsing());

    // Since some national prefix patterns are entirely optional, check that a
    // national prefix could actually be extracted.
    if (pattern.Consume(consumed_input.get())) {
      start_of_national_number =
          national_number_.length() - consumed_input->ToString().length();
      if (start_of_national_number > 0) {
        // When the national prefix is detected, we use international formatting
        // rules instead of national ones, because national formatting rules
        // could countain local formatting rules for numbers entered without
        // area code.
        is_complete_number_ = true;
        prefix_before_national_number_.append(
            national_number_.substr(0, start_of_national_number));
      }
    }
  }
  national_prefix->assign(national_number_, 0, start_of_national_number);
  national_number_.erase(0, start_of_national_number);
}

bool AsYouTypeFormatter::AttemptToExtractIdd() {
  string accrued_input_without_formatting_stdstring;
  accrued_input_without_formatting_
      .toUTF8String(accrued_input_without_formatting_stdstring);
  const scoped_ptr<RegExpInput> consumed_input(
      regexp_factory_->CreateInput(accrued_input_without_formatting_stdstring));
  const RegExp& international_prefix = regexp_cache_.GetRegExp(
      StrCat("\\", string(&kPlusSign, 1), "|",
             current_metadata_->international_prefix()));

  if (international_prefix.Consume(consumed_input.get())) {
    is_complete_number_ = true;
    const int start_of_country_code =
        accrued_input_without_formatting_.length() -
        consumed_input->ToString().length();

    national_number_.clear();
    accrued_input_without_formatting_.tempSubString(start_of_country_code)
        .toUTF8String(national_number_);

    string before_country_code;
    accrued_input_without_formatting_.tempSubString(0, start_of_country_code)
        .toUTF8String(before_country_code);
    prefix_before_national_number_.clear();
    prefix_before_national_number_.append(before_country_code);

    if (accrued_input_without_formatting_[0] != kPlusSign) {
      prefix_before_national_number_.push_back(kSeparatorBeforeNationalNumber);
    }
    return true;
  }
  return false;
}

bool AsYouTypeFormatter::AttemptToExtractCountryCode() {
  if (national_number_.length() == 0) {
    return false;
  }
  string number_without_country_code(national_number_);
  int country_code =
    phone_util_.ExtractCountryCode(&number_without_country_code);
  if (country_code == 0) {
    return false;
  }
  national_number_.assign(number_without_country_code);
  string new_region_code;
  phone_util_.GetRegionCodeForCountryCode(country_code, &new_region_code);
  if (PhoneNumberUtil::kRegionCodeForNonGeoEntity == new_region_code) {
    current_metadata_ =
        phone_util_.GetMetadataForNonGeographicalRegion(country_code);
  } else if (new_region_code != default_country_) {
    current_metadata_ = GetMetadataForRegion(new_region_code);
  }
  StrAppend(&prefix_before_national_number_, country_code);
  prefix_before_national_number_.push_back(kSeparatorBeforeNationalNumber);

  return true;
}

char AsYouTypeFormatter::NormalizeAndAccrueDigitsAndPlusSign(
    char32 next_char,
    bool remember_position) {
  char normalized_char = next_char;

  if (next_char == kPlusSign) {
    accrued_input_without_formatting_.append(next_char);
  } else {
    string number;
    UnicodeString(next_char).toUTF8String(number);
    phone_util_.NormalizeDigitsOnly(&number);
    accrued_input_without_formatting_.append(next_char);
    national_number_.append(number);
    normalized_char = number[0];
  }
  if (remember_position) {
    position_to_remember_ = accrued_input_without_formatting_.length();
  }
  return normalized_char;
}

void AsYouTypeFormatter::InputDigitHelper(char next_char, string* number) {
  DCHECK(number);
  number->clear();
  const char32 placeholder_codepoint = UnicodeString(kDigitPlaceholder)[0];
  int placeholder_pos = formatting_template_
      .tempSubString(last_match_position_).indexOf(placeholder_codepoint);
  if (placeholder_pos != -1) {
    UnicodeString temp_template = formatting_template_;
    placeholder_pos = temp_template.indexOf(placeholder_codepoint);
    temp_template.setCharAt(placeholder_pos, UnicodeString(next_char)[0]);
    last_match_position_ = placeholder_pos;
    formatting_template_.replace(0, temp_template.length(), temp_template);
    formatting_template_.tempSubString(0, last_match_position_ + 1)
        .toUTF8String(*number);
  } else {
    if (possible_formats_.size() == 1) {
      // More digits are entered than we could handle, and there are no other
      // valid patterns to try.
      able_to_format_ = false;
    }  // else, we just reset the formatting pattern.
    current_formatting_pattern_.clear();
    accrued_input_.toUTF8String(*number);
  }
}

// Returns the number of bytes contained in the given UnicodeString up to the
// specified position.
// static
int AsYouTypeFormatter::ConvertUnicodeStringPosition(const UnicodeString& s,
                                                     int pos) {
  if (pos > s.length()) {
    return -1;
  }
  string substring;
  s.tempSubString(0, pos).toUTF8String(substring);
  return substring.length();
}

}  // namespace phonenumbers
}  // namespace i18n

redpajama_set_name: RedPajamaGithub


text:
Trump has no ability to think strategically
Photo by nikko macaspac on Unsplash
Any skilled politician could have anticipated and avoided the problems Trump falls into
Another day, another change of positions in the Trump administration. With the government facing an imminent shutdown due to the Republican Congress's inability to pass a budget, Trump decided on Monday to paint a bright red line — just what he taunted Obama for foolishly doing. But in Trump's case, the bright line was whether he would allow the government to keep operating if he didn't get his big, beautiful wall.
In a televised meeting with the Democratic leaders Nancy Pelosi (CA) of the House and Chuck Schumer (NY) of the Senate, he said he would take full responsibility for shutting down the government. He said he would be proud to stand on principle for his wall.
Of course we're forgetting the fact that Trump promised Mexico would pay for it, and that the big beautiful wall he promised has turned into a fence of steel slats, prompting ridicule in the right. Despite all this, Trump was willing to hold the government hostage until he got us to pay for his wall. And right before Christmas too. Chuck Schumer called his behavior a "temper tantrum."
The White House dispatched Stephen Miller to send the message loudly and clearly that Trump would sign no continuing resolution (CR) to keep the government open unless $5 billion in funding was included for his wall. Trump's hardcore supporters may have cheered, but Pelosi, for her part, schooled Trump on politics during their live broadcast negotiating session. She knew, of course, that she held the winning hand, since polls say voters do not believe the wall is a priority by a 69–28 margin. In other words, nobody supports this position except for Trump's hardest of hardcore MAGAers.
The Republicans in Congress are not stupid, many of them have far more political experience than Trump. As a result, they could see how Trump had painted them into a corner. History has shown that the party who gets blamed for a shutdown is seriously damaged politically. Think of when President Clinton embarrassed Republican Speaker Newt Gingrich in the 1990s. With the GOP still controlling all the levers of government, and Trump's assuming responsibility in the television appearance, there was nowhere for Republicans to hide. Of course any halfway competent politician could have (and did) see this trap, but Trump walked enthusiastically into it.
Next, when he heard from his Congressional allies how he had screwed over his own party, Trump started backing away from that hard position, first in a tweet, then through a press announcement by Press Secretary Sarah Huckabee-Sanders. At the time, I tweeted "I wonder how the MAGA true believers will justify this retreat…"
As I predicted, there was outrage among Trump's hardcore supporters. Ann Coulter wrote that Trump was "gutless," and that his is "a joke presidency that scammed the American people." I hate to agree with Ann Coulter. Nevertheless, not that my insight was so great. Any halfway competent politician could imagine the reaction of Trump's supporters to this retreat. But Trump didn't see it coming.
So now, with Trump's promise to sign a CR to keep the government open, the Senate went ahead and passed a "clean" CR, essentially continuing government operations at their current level, at least until the Democrats took over the House and so Republicans might find a way to make them share the blame. Imagine their surprise, then, when Trump again tweeted that he would not sign a CR without full wall funding. Exasperated Republicans now face the likelihood that the government will shut down tomorrow, and that their party will get, deservedly, all the blame. They will have decisively demonstrated that they are incapable of governing.
What could Trump have done to avoid this fiasco? Not laid down the gauntlet as he did. In so doing, he painted himself and his party into a corner. Had he been able to look a little beyond what was right in front of him, he would have seen the risk such a move created for himself and his party. But apparently, Trump is completely incapable of even basic strategic thinking.
Seniors are no sleeping giant politically
Young people need to be considered too
The US-Canada-Mexico Trade Deal and Your Small Business
Lili Török in Small Business, Big World
"No matter how good you are you will have rejection", with Rory Ogden
Drew Gurley in Authority Magazine
America Needs the Mueller Report
Eric Medlin
Collective Theoretical Analysis of Clinton Rhetoric
Enough with the Marijuana Malarkey
Natalie Papillion in The Equity Organization
Political Party Revolution
Jesse Beasley in The Polis
McConnell's Received Record Big Pharma Donations During Drug Negotiations
Is There a Double Standard for Alexandria Ocasio-Cortez?

redpajama_set_name: RedPajamaCommonCrawl


We are able to cater to any and all dietary requirements. Below is our sample menu.
This is a sample menu and subject to change, based on availability of the best produce. Lobster season runs from June 15th to February 15th.


Ever wondered why the Disney Villains did what they did?
And in this video, the Disney Villains sing what they thought was for the good of our Disney Princesses (and dogs).
Screenshot from the video by AVByte.
Check out Maleficent, Ursula, Cruella, and the Evil Queen in this magnificent and ultimate Disney Villains Musical from AVByte. I totally want to be Cruella. LOL.
Are you excited for Angelina Jolie's portrayal of MALEFICENT!? I AM!


text:
Monisha Harrell
The LGBTQ+ "Panic" Defense: How to Ban it in Your State
Monisha Harrell (she/her), a Seattle native, is Board Chair for Equal Rights Washington and chairs the National LGBTQ Task Force Action Fund. Monisha has served as a fellow for Lifelong AIDS Alliance, co-chair of the Capitol Hill LGBTQ Public Safety Task Force, an appointee to the City of Seattle's 2017 search committee for the new Director of Police Accountability, and co-chair for the De-Escalate Washington campaign committee (I-940) requiring de-escalation training for all law enforcement officers in Washington State in 2018. The Stranger named Monisha one of "The Smartest People in Seattle Politics" in 2013, and she was most recently honored as the Greater Seattle Business Association's Community Leader of the Year for 2018. As Chair of Equal Rights Washington, Monisha has helped lead work to ban conversion therapy for minors in Washington State, pass an updated Uniform Parentage Act to support LGBTQ families, and ban trans panic and gay panic as legal defenses for violence against the LGBTQ community. Harrell was recently appointed (July 2020) by Governor Jay Inslee to serve on a task force to provide recommendations for legislation on independent investigations involving police use of force, and recently completed work (June 2020) as a member of Washington State Attorney General Bob Ferguson's Hate Crime Advisory Working Group. In 2019, Monisha participated in a leadership exchange program with the American Council of Young Political Leaders (ACYPL) supporting LGBTQ community advancement in both Thailand and Malaysia. Monisha owns and operates a small marketing firm, Rule Seven, focused on community-driven outreach and engagement. She has an undergraduate degree from Columbia University, and an MBA from the University of Washington Foster School of Business. In 2017, Monisha was named The University of Washington Consulting and Business Development Center's Alumni of the Year.


text:
In the fight against COVID-19, how much freedom are you willing to give up?
By Becky Beaupre Gillespie
Law scholar's survey examines balance between civil liberty and public health
Democrats and Republicans are equally open to many government measures that could slow the spread of the novel coronavirus but may also undermine civil liberties, according to a national survey co-authored by a leading University of Chicago Law School scholar.
Conducted in mid-March as state governments were ramping up efforts to confront the pandemic, the poll revealed a "remarkable" level of tolerance for restrictions on liberty, said Prof. Adam Chilton, whose work has included empirical research on constitutional rights.
Along with Kevin Cope and Mila Versteeg of the University of Virginia and Charles Crabtree of Dartmouth University, Chilton surveyed a nationally representative sample of 3,000 U.S. residents—asking them about policy proposals that governments could enact to help control to the spread of the virus.
Those proposals included travel restrictions, bans on the spread of misinformation, the quarantining of sick individuals in government facilities, the conscripting of health care workers, and the forced production and seizing of certain items, such as ventilators and personal protective equipment.
The findings reveal the extraordinary nature of the fight against COVID-19, and they raise important questions about what comes next: How far are we willing to go to stay safe? How do we prevent abuse once the immediate threat has receded?
Chilton addressed those questions, discussing what we can learn from history and what we should think about going forward.
Are you concerned about the constitutionality any of the government actions enacted so far: stay-at-home or shelter-in-place orders, fines for congregating outdoors, business shutdowns, attempts to ban the sales of firearms, travel restrictions, etc.?
I think most of what we've seen in the U.S. has been constitutionally permissible. Although the Constitution restricts the power of the federal government, states have a pretty expansive power to regulate us to promote health and safety. This is typically referred to as the police power, and it is what gives states the authority to zone neighborhoods, shut down businesses for violations of health codes, or fire marshals to restrict how many people can be in a bar and restaurant. To date, most of the steps that have been taken by cities and state—stay-at-home orders, rules against congregating, etc.—seem pretty clearly within that power.
Have you seen any constitutionally questionable proposals?
A few. The Trump administration warned TV stations that they could lose their operating licenses if they aired ads containing misleading information about Trump's response to the coronavirus. If a license were rescinded, this may be a violation of the First Amendment, a threat to political speech. Another instance involved states that initially didn't include gun stores on their list of essential businesses but included various other businesses, like liquor stores. Gun stores pushed back—they essentially said, "We're protected by the Second Amendment, and yet liquor stores are allowed to stay open and there's nothing in the Constitution protecting them"—and most states responded by walking back their orders.
There was another example recently when Trump tweeted that he was considering locking down New York, New Jersey and Connecticut. About five hours later he said he wasn't going to do it. The idea that the federal government would not only restrict travel between states but try to lock people in place within a state—that that would be constitutionally questionable.
What type of precedent exists for these types of measures?
Supreme Court precedent on quarantine orders dates from roughly the start of the 20th century, when there were two cases—Louisiana v. Texas (1900) and Compagnie Francaise de Navigation a Vapeur v. Louisiana Board of Health (1902)—that acknowledged the states' rights to prevent travel within their borders for legitimate quarantine reasons. In the 1902 case, the city of New Orleans had an outbreak of yellow fever, and they imposed a quarantine, not letting new people into the city. When a ship arrived in New Orleans from Europe, passengers were not allowed to disembark—which is similar to what we're now seeing in Rhode Island, Texas, Alaska, Hawaii and other places where governors are trying to restrict citizens traveling to their states from coronavirus hotspots.
You asked what Americans thought about eight policy proposals that conceivably could be enacted to slow the virus's spread. In broad strokes, what did you find?
Each proposal had majority support. In many cases, it was quite a large majority supporting measures that would restrict movement or speech or private activity in various ways. I assumed that respondents would be supportive of some proposals, especially restrictions on travel. But I was definitely surprised to see such big majorities, and I was surprised to see support for proposals that restricted speech.
Did Democrats and Republicans differ in their responses?
This is perhaps the most shocking finding. Although our survey had a large partisan gap in terms of President Trump's handling of the crisis—34% of Democrats were supportive of the handling compared with 88 % of Republicans—when we asked about the specific policies, a majority of both Democrats and Republicans supported every policy. In many of the cases, the gap between the groups was very small.
Of these eight policy proposals you surveyed, which had the highest levels of support and which had the lowest?
Banning non-citizens from entering the country had the highest level of support from both Democrats and Republicans, at roughly 85% overall. Taking over private businesses and seizing property had the lowest level of support among both Democrats and Republicans, at roughly 55% overall. Most of the policies had support around 75%, including detentions in government facilities, conscripting people to work, suspending religious services and movement outside of homes.
What's next with this research?
We're looking at other countries. We've already run the same basic survey in Japan and Israel. We're also hoping to run surveys in Taiwan, China, South Korea, and possibly other countries. We're trying to see to what extent the United States' response is unique. My instinct is that it is not. I expect that there will be some differences across countries for a variety of reasons, but that we'll generally find that, during a crisis, people are willing to let their government take dramatic actions if they believe it will help keep them safe.
—Adapted from an article published on the University of Chicago Law School website.
Red and blue America agree that now is the time to violate the Constitution
Why quarantines are so difficult to implement: Lessons from the 1800s
Why time outdoors is crucial to your health, even during the…
Freedom , Adam Chilton , University of Chicago Law School


About $6.5 million will be dedicated to projects that help farmers and ranchers conserve water in the Ogallala aquifer region and improve water quality, USDA Secretary Tom Vilsack said Thursday.
The funding will targeted to seven priority areas to support their primary water source and strengthen rural economies, USDA said. It helps conservationists and farmers and ranchers plan water conservation and quality projects.
"This work not only expands the viability of the Ogallala Aquifer but also helps producers across the Great Plains strengthen their agricultural operations," Vilsack said in a USDA statement.
The Gruhlkey brothers – Brittan, Braden and Cameron – worked with NRCS through the Ogallala Aquifer Initiative to adopt better equipment and techniques to manage their water use. 2013 USDA photo.
Underlying the Great Plains in eight states, the Ogallala supports nearly one-fifth of the wheat, corn, cotton and cattle produced in the United States. The reservoir was created more than a million years ago through geologic action and covers about 174,000 square miles; mainly in Nebraska, Kansas, Oklahoma, and Texas. The aquifer also covers part of South Dakota, Wyoming, Colorado, and New Mexico.
It has long been the main water supply for the High Plains' population and according to USDA is being depleted at an unsustainable rate.
Through the Ogallala Aquifer Initiative, USDA's Natural Resources Conservation Service is directing funding in fiscal 2015 to support the Ogallala.
This year's work is planned in seven priority areas in five states and will continue for up to four years. USDA estimates it will conserve billions of gallons of water per year.
The investment builds on $66 million that NRCS has invested through OAI since 2011, which helped farmers and ranchers conserve water on more than 325,000 acres.
Vilsack said much of the funding invested by USDA has been matched or supplemented by individual producers.
• Northern High Plains ground water basin in Colorado: NRCS will help farmers install new technologies on irrigated operations to more efficiently use water. These technologies include weather stations, sensors and telemetry for soil moisture and nutrients and advanced irrigation systems. Water and conservation districts are also developing incentive programs for producers. This conservation work will conserve 2.1 billion gallons of water over four years, USDA said.
• Priority areas in Kansas: NRCS will work with producers to reconvert irrigated cropland to dryland farming in high priority areas. USDA estimates the conservation work will conserve 1.8 billion gallons of water over four years.
• Priority areas in eastern New Mexico: NRCS will work with producers to convert irrigated cropland to dryland cropping systems and restore grasslands. NRCS will work with producers to reduce pumping on 1,190 acres each year over four years. This conservation work will conserve 1.56 billion gallons of water over four years, USDA said.
"Water is a precious resource, and the Ogallala Aquifer Initiative helps our farmers and ranchers use it wisely," NRCS Chief Jason Weller. "This is especially important in a place like the Ogallala, where drought conditions have prevailed in recent years. We know we can't change the weather, but we can help producers be ready for it."
See more details on the Natural Resources Conservation Service's Ogallala Aquifer Initiative FY 2015 investments.


One of the ways that many people will tell you to get more eyes on your Instagram post is by using hashtags, but that's not the only place to use them! You can add hashtags and locations to your Instagram Stories,which helps new people find your Stories.
If you haven't already seen it yet, you can follow chosen hashtags which will then pop up new posts in your timeline and will also show any Stories if they have the hashtag on there. It's a really great way to find new people in a specific genre, and it's a good way to get found as well.
You can use the hashtag sticker in Instagram Stories to get your posts seen, but if you wanted to use a few different hashtags, then the easiest way is to write them as text. One thing to make sure you will be found for those hashtags is to check they appear as underlined hashtags before you post. After you've typed the hashtag symbol and started to write your hashtag, suggestions will pop up above the keyboard, so check those out to see whether they would fit better with your content.
You can also use the location sticker to tag your Story to a location, which then appears on the location page. If people are looking at the location, then they'll be interested in your Stories if you're showing off the venue. If possible, try to place the location sticker in a location where your viewers can tap it without going on to the next post. It's also interesting to see where else your Story can end up appearing – if you tag a specific restaurant, then the post can end up not just on the restaurants location page, but also on the page for the neighbourhood, city or even county that the restaurant is in, bringing even more views to your stories.


text:
News Wednesday, JANUARY 13th, 1999
Radio Prague January 13th, 1999
Those were the headlines and now the news in more detail
NATO -admission
The Czech Republic, Poland and Hungary will officially become members of the North Atlantic Treaty Organization sometime in March of this year, according to NATO Secretary General Javier Solana. No firm date has yet been set but according to an unnamed NATO official the final technical issues are now being resolved and admission could take place in the first weeks of March. A ceremony to mark the entry of the three frontrunners is to be held in Washington at a summit of NATO heads of state and government on April 24th and 25th. On Tuesday, the Czech Republic's ambassador to NATO Karel Kovanda and his Polish and Hungarian counterparts took part in an informal weekly dinner of NATO ambassadors in Brussels. Kovanda welcomed the invitation as a "sign of acceptance". According to an unnamed NATO source, more decisions are made at these dinners than at the official Council of NATO sessions following them.
Budget - debate
The Czech government's budget proposal for 1999 has gone into its second reading in the Lower House of Parliament. Several parties intend to propose amendments and it will not be clear until the last minute who, other than the 74 deputies for the governing Social Democrats, will support the budget proposal. It envisages a 31 billion crown deficit. The communist party recently created a stir by promising support in exchange for significantly lower defense expenditures. The ODS has described this as blackmail and said that it would not allow the communists to threaten the country's membership in NATO even if it had to compromise on the budget. So far only the Freedom Union has clearly stated it would vote against the proposal. Observers say they expect a vote towards the end of the week.
O'Brien slams government
Visiting British deputy home secretary Mike O'Brien has severely criticized conditions in which Czech Romanies are living. After visiting a Roma housing estate in the Moravian city of Brno O'Brien said it was poverty rather than persecution which was forcing many Roma to leave the country and seek asylum elsewhere. He said he had found families living in squalor and called on the Czech government to do everything in its power to rectify the situation. The British deputy home secretary is here on a three day fact finding mission in connection with the exodus of Czech Romanies to Britain last year.
Wall evokes fresh controversy
Meanwhile, the mayor of Usti nad Labem, the city where local authorities planned to build a wall to separate a Roma housing estate from its Czech neighbours, has called the governments intention to prevent this " ridiculous meddling". Mayor Miroslav Harcinik said the government had no right to interfere with decisions which were made at local level and claimed the construction of the wall was not in violation of any existing legislation. The locals support this view and many of those living in the vicinity say that if the government prevents the construction of this wall it should also give them a good price for their houses since they would no longer wish to live there and without the wall they would not find buyers.
Salim - defection
The Iraqi consul to Prague is believed to be seeking political asylum in Great Britain. Dzabir Salim has not been seen in Prague for over a month, causing intense speculation. A spokesman for the Iraqi National Congress, a London based opposition organization, told the ctk that although he could not officially confirm the news he had good reason to believe that Dzabir Salim was now in London seeking asylum. The spokesman mr. Zaab Setna said the Prague consul was not an important figure in Saddam Hussein's camp and his defection would not seriously threaten the regime. British authorities have refused to comment on the matter in any way. According to Iraqi opposition sources Dabir Salim was to have spearheaded Iraq's campaign against Prague-based Radio Free Europe broadcasts to Iraq.
OICC-overhaul
The head of the Office for Investigation of Communist Crimes Irenej Kratochvil said at a press briefing in Prague Tuesday that the interior ministry inspection team had found certain irregularities in the work of the office and that a number of employees would be dismissed in the near future. He would not expand on this, although he said that he was preparing a major overhaul of the OICC. The Cabinet ordered an inspection following a series of information leaks.
A Drop In House party organized in protest of the newly introduced law on drugs is to take place at the Roxy Club in Prague this Friday. DJs from across the country will take part in the 10 hour music marathon and the proceeds are to go to Drop In prevention centres. The drugs problem concerns predominantly teenagers which was why we chose house music, the organizers told the ctk newsagency. The new legislation, which has made possession of drugs a criminal offense, has caused considerable controversy. Ivan Douda, an employee of one of Prague's Drop In centres says it is an all out war - but not against dealers. This war is being waged against teenagers who need help or those who are merely experimenting, he told the ctk.
Finally, a look at the weather:
No significant change there. We can expect more grey skies and snow showers in the next 48 hours. Day temps between minus 3 and 1 degs C. Nighttime lows 4 to 8 degs below zero.


text:
package liquibase.statementexecute;

import liquibase.database.Database;
import liquibase.database.core.*;
import liquibase.datatype.DataTypeFactory;
import liquibase.dbtest.AbstractIntegrationTest;
import liquibase.statement.ColumnConstraint;
import liquibase.statement.NotNullConstraint;
import liquibase.statement.SqlStatement;
import liquibase.statement.core.CreateTableStatement;
import liquibase.statement.core.RenameColumnStatement;
import org.junit.Test;

import java.util.ArrayList;
import java.util.List;

public class RenameColumnExecuteTest extends AbstractExecuteTest {

    protected static final String TABLE_NAME = "table_name";
    protected static final String COLUMN_NAME = "column_name";

    @Override
    protected List<? extends SqlStatement> setupStatements(Database database) {
        ArrayList<CreateTableStatement> statements = new ArrayList<CreateTableStatement>();
        CreateTableStatement table = new CreateTableStatement(null, null, TABLE_NAME);
        if (database instanceof MySQLDatabase) {
            table.addPrimaryKeyColumn("id", DataTypeFactory.getInstance().fromDescription("int", database), null, "pk_", null);
        } else {
            table.addColumn("id", DataTypeFactory.getInstance().fromDescription("int", database), null, new ColumnConstraint[]{  new NotNullConstraint() });
        }
        table.addColumn(COLUMN_NAME, DataTypeFactory.getInstance().fromDescription("int", database));
        statements.add(table);

//        if (database.supportsSchemas()) {
//            table = new CreateTableStatement(AbstractIntegrationTest.ALT_CATALOG, AbstractIntegrationTest.ALT_SCHEMA, TABLE_NAME);
//            table
//                    .addColumn("id", DataTypeFactory.getInstance().fromDescription("int", database), null, new ColumnConstraint[]{  new NotNullConstraint() });
//            statements.add(table);
//        }
        return statements;
    }

    @SuppressWarnings("unchecked")
    @Test
    public void noSchema() throws Exception {
        this.statementUnderTest = new RenameColumnStatement(null, null, TABLE_NAME, COLUMN_NAME, "new_name", "int");

        assertCorrect("rename column table_name.column_name to new_name", DerbyDatabase.class, InformixDatabase.class);
        assertCorrect("alter table table_name alter column column_name rename to new_name", H2Database.class, HsqlDatabase.class);
        assertCorrect("alter table table_name alter column column_name to new_name", FirebirdDatabase.class, Firebird3Database.class);
        assertCorrect("alter table table_name change column_name new_name int", MySQLDatabase.class, MariaDBDatabase.class);
        assertCorrect("exec sp_rename '[table_name].[column_name]', 'new_name'", MSSQLDatabase.class);
        assertCorrect("exec sp_rename 'table_name.column_name', 'new_name'", SybaseDatabase.class);
        assertCorrect("alter table [table_name] rename column_name to new_name",SybaseASADatabase.class);
        assertCorrectOnRest("alter table [table_name] rename column [column_name] to [new_name]");
    }
}


text:
University Of Virginia Faculty Of Law
Prominent examples of legislatures are the Houses of Parliament in London, the Congress in Washington D.C., the Bundestag in Berlin, the Duma in Moscow, the Parlamento Italiano in Rome and the Assemblée nationale in Paris. By the principle of representative government people vote for politicians to carry out their needs. Although nations like Israel, Greece, Sweden and China are unicameral, most nations are bicameral, that means they have two individually appointed legislative homes. Some countries permit their highest judicial authority to overrule legislation they determine to be unconstitutional.
The specific system that a rustic is ruled by is usually decided by its historical past, connections with other countries, or its adherence to international requirements. The sources that jurisdictions adopt as authoritatively binding are the defining features of any legal system. Yet classification is a matter of type somewhat than substance since related guidelines often prevail.
The rule of law is emerging as some of the pressing issues of this century. We respectfully acknowledge the University of Arizona is on the land and territories of Indigenous peoples. Today, Arizona is home to 22 federally recognized tribes, with Tucson being residence to the O'odham and the Yaqui. Committed to diversity and inclusion, the University strives to build sustainable relationships with sovereign Native Nations and Indigenous communities by way of training choices, partnerships, and neighborhood service.
The White House and the Justice Department recognized AUWCL for students' efforts to stop evictions in D.C. WCL answered a name to action from Attorney Gen. Merrick Garland to address the housing and eviction crisis. In the 5 months since, more than 40 students have volunteered 3,000 hours of authorized help to cease two dozen scheduled evictions in the greater DC area. Anti-money laundering Guidance, information, occasions and publications that will help you detect and prevent money laundering. Consultation responses We develop coverage in response to proposals for modifications in the law, which come from a variety of sources, together with authorities departments and non-governmental organisations.
Learn about the area of law that regulates the construction of presidency and its relations with people and foreign nations. Our incoming class of 1Ls — 33% of whom are persons of shade — is essentially the most diverse in Notre Dame Law School's history. The class additionally has the very best median LSAT score in the Law School's history. Gain authorized skills by working by way of full-scale, complex scenarios designed by faculty experts. Compete in highly aggressive moot courtroom competitions and argue difficult legal instances in front of judges.
In basic, authorized techniques could be cut up between civil law and common law techniques. The term "civil law", referring to the civilian legal system originating in continental Europe, should not be confused with "civil law" within the sense of the common law matters distinct from legal law and public law. The Law School's approach to legal education has all the time been anchored in its unwavering commitment to pro bono service.
Our award-winning dedication to the group provides our college students alternatives that focus on impactful service and skilled talent development. Civil law jurisdictions deal with contracts in one other way in a variety of respects, with a extra interventionist position for the state in each the formation and enforcement of contracts. In France, an odd contract is said to type simply on the basis Law of a "meeting of the minds" or a "concurrence of wills". Their 'abstraction precept' signifies that the non-public obligation of contract forms individually from the title of property being conferred. When contracts are invalidated for some cause (e.g. a car purchaser is so drunk that he lacks legal capability to contract) the contractual obligation to pay could be invalidated separately from the proprietary title of the car.
BU Law presents a full-time JD degree, five LLM & master's levels, and sixteen twin degrees. With the help of a worldwide network of practically 25,000 alumni and a strong Career Development & Public Service Office, our graduates achieve exceptional profession success. BU Law is located within the coronary heart of Boston and housed within the ultra-modern Sumner M. Redstone Building and Law Tower. Whether you are taking classes full time or half time, on-campus or partially on-line, you'll begin studying the work of a lawyer by doing it. You'll be ready to make a direct contribution in law, enterprise, authorities, neighborhood service, or whatever field you pursue.
Social safety law refers again to the rights folks need to social insurance, similar to jobseekers' allowances or housing benefits. Labour law is the research of a tripartite industrial relationship between employee, employer and trade union. Individual employment law refers to workplace rights, such as job security, well being and safety or a minimum wage.
In addition a lawyer may become a legal researcher who provides on-demand authorized research via a library, a industrial service or freelance work. Many folks skilled in law put their skills to make use of outdoors the legal area totally. A judiciary is theoretically sure by the constitution, simply as all other authorities bodies are. In most countries judges might solely interpret the constitution and all different laws.
Cardozo College Of Law
Royal Museums Greenwich Shop
A rundown of the many Xfinity internet español services


text:
Antidepressant drugs found to cause birth complications
Tags: expectant mothers, pregnant women, antidepressant drugs
https://www.naturalnews.com/001892.html
A new warning is being issued about pregnant women taking antidepressant drugs. It turns out that taking such drugs during late pregnancy puts the health of their babies at risk and leads to birth complications that may require prolonged hospitalization, breathing support, and tube feeding. This warning applies to all SSRI drugs, or what's called Selective Serotonin Reuptake Inhibitors, which include drugs like Prozac and other popular antidepressants. The warning comes from Health Canada, and is a latest in a series of warnings being publicized about the dangers of taking prescription drugs.
Of course, informed readers already know that prescription drugs pose significant health hazards to human beings, but when they are taken by pregnant women, they pose an even greater hazard because they effect the health of two human beings. The health of an unborn baby is significantly impaired by the consumption of both prescription drugs and over-the-counter drugs, not to mention alcohol, smoking, and the consumption of processed foods containing high-fructose corn syrup, white flour, or refined sugar.
The untold part of all of this is the rather shocking realization that doctors are actually prescribing antidepressant drugs to pregnant women. That's because there is no FDA warning about antidepressants and pregnant women in the United States. It's not surprising, since the FDA is typically very slow to issue warnings about prescription drugs, even as Canada, the UK, and other countries are quick to publicize such warnings in order to protect the health of the public.
Interestingly, one of the common defenses about this link between antidepressant drugs and birth complications is that there is also a risk to the fetus if a pregnant woman remains depressed. Some people are saying that it's worth giving depressed expectant mothers antidepressant drugs because it's a greater health danger for the pregnant mother to remain depressed. This is absurd, since antidepressant drugs don't actually improve the mental health of anyone in the first place. Even the clinical trials involving antidepressants have been distorted and selectively chosen to shed good light on SSRIs, but as we are now learning, these drugs actually promote violent behavior and can cause people to commit suicide.
(One of the little-known facts about antidepressant drugs is that those students who committed the Columbine school massacre several years ago were taking SSRI antidepressant drugs, and it may have been one of the factors that caused them to pick up automatic weapons and murder their classmates.)
Are these the kinds of drugs we want to be giving pregnant women? Wouldn't it make a lot more sense to help educate women about why they might be feeling down in the first place, due to their dietary imbalances and their nutritional deficiencies, and then help them alleviate those at the core? Wouldn't it make more sense to use natural methods that actually support and enhance the health of unborn children as well as the health of their mothers?
Frankly, what pregnant women need in terms of battling depression is the same thing that every adult needs, and that is natural sunshine touching their skin on a regular basis. That's because most adults suffer from chronic vitamin D deficiency, and they either need sunlight or regular cod liver oil supplements in order to get adequate amounts of vitamin D. Pregnant women also need to avoid all environmental toxins in their food, drinks, and lifestyle habits. That means, of course, no alcohol whatsoever, no cigarette smoking, and absolutely no consumption of over-the-counter drugs, which are extremely toxic and by last count, responsible for at least 40,000 deaths each year just from painkillers alone.
Remember, these over-the-counter drugs are not necessarily safe or even mild, even though they can be purchased without a prescription. They are powerful, biochemically active chemical substances that kill human beings, that compromise the function and health of the human liver, and that pass through the bloodstream into the body of an unborn child. So, when a mother is taking over-the-counter painkillers, she's effectively dosing her child with those same toxic drugs.
At the same time, mothers need to avoid all toxic food additives and metabolic disruptors such as MSG, sodium nitrite, and food additives like artificial colors. She also needs to avoid hydrogenated oils and refined carbohydrates such as high-fructose corn syrup, white flour, white sugar, sucrose, and other similar substances.
In other words, a pregnant woman should have the highest level of responsibility to control her intake of dietary and lifestyle substances, and yet, in the United States today, I regularly see pregnant women smoking, drinking, and doing things that should potentially be considered criminal, such as drinking alcohol and taking ibuprofen at the same time -- which of course creates a highly toxic chemical cocktail that damages the liver of both the mother and the unborn child. It's one thing for a woman to compromise her own individual health in any way she chooses, and I'm all for freedom of choice and allowing people to eat what they want, but it's entirely different when a mother is destroying the health of her child. In the case of pregnancy, I think women need to be held to a higher standard, and in this country we need a program of education and support to help pregnant women get better nutrition and a better understanding of what is required to raise a healthy child.
Specifically, I think society should pay for nutritional supplements for pregnant women, meaning that those supplements would be available free of charge to any woman of childbearing age. Yes, it would be expensive, but it would be far cheaper than giving birth to another generation of health-compromised babies who are prone to learning disabilities, diabetes, and birth defects (among other disorders). Prevention is dirt cheap compared to the cost of treating disease, and prevention starts with the mother.
Expectant mothers at FETCH.news