The "Washington College to Wall Street" program helps students interested in business get internships and network with alumni.
How many colleges have waterfront property where you can kayak on a nice day?
The Chesapeake Semester lets students earn 16 credits while traveling around the Chesapeake Bay for intensive study, field work, and outdoor adventure.
The Rose O'Neill Literary House is the hub of Washington College's strong writing program. Of particular note is the Sophie Kerr prize, an annual award of $60,000 for the graduating senior demonstrating the best potential for literary achievement. This is the largest undergraduate writing award in the country!
You can meet Gus the Goose, Washington College's new mascot!


The human organism consists of 73-77 billion cells, in all of which an average of 7000 chemical reactions take place every second. Such complexity of metabolism processes demands a high level of order and organization. Researchers of electromagnetic biocommunication deal with the examination of inner communication routes and sign transmittance processes. Bioinformatics may be approached by the exact correspondence of reachable inner signs, thus, such a device had to be developed that can be set up accurately to the biological window (sign transmittant channel) of a given subsystem of the body. In order to get in resonance with the body's decompensated parts (that we call illness), we need a special eletrotechnology. Much work has been done on scientists' side developing this technology in the past decade.
Almost a hundred, very similar types of systems have come to life. The SCIO system stands out from the all other systems, since it contains Man and Universe, space and time, the soul and the energy system, the physical body, ancient philosophy and healing of today as a basic informatical thesaurus.
Illnesses, as well as nicotine addiction, evolve in the cell, as a result of molecular changes. Mutations can be identified here first. The process is similar to when we keep the steering wheel of the ship due at sea, but streams drive us away – sometimes we need lighthouses or a map and a compass to find our way back to the right direction. The system is such a method, a compass for the body. The relationship between the more billion cells is measurable now, computer data show our inner functions, the proper ones and the differences. The system receives complex signs from the body, recognizes, identifies mutations, and returns the healthy signs, conditioned by the makings, to the body. The method is unique, as it uses the person's own, inner (endogenetic) signs, and also watches changes, affecting inner processes only to an optimal degree, not generating any side effects.
The system, quite exclusively, can be applied even in time of pregnancy. Treatment of patients with peacemaker, epilepsy or schizophrenia is not excluded, either. Cures are always targeted, thanks to the fixed biofeedback system, over- or undertreatment is not possible.
Do the treatments have any harmful side effects?
- the time/length and frequency of the treatment.
2. May one take medicines along with the cure?
Yes, naturally, you should not stop taking pills at once! In this phase, you need to consult your doctor more frequently in order to control, check the effects, and decrease drug dosage, or even stop taking medicine, if possible. There are no counter effects kereszthatás, as the device acts on the biophysical level, while medicine on the biochemical. The device is non-invasive, that is, they only offer the right bioinformation facilitating the body's making up for its informatical arrears.
3. Is any medical check-up necessary before the use of the device?
- no, anyone can use it.
4. Do I have to bring a half-smoked cigarette?
- no, the device does not need it, but it is possible to make it serve as an additional input for the device, if you wish.
5. Do I have to smoke a cigarette before?
- there is no need to tell that to a smoker, because while coming to the treatment, he will smoke his last cigarette. The requirement is only to do this 2 hours before the treatment.
6. Is the method the same as the one with copper plate and the head electrodes?
- the basic principle, as biophysical method, is the same.
1. The nicotine and toxic substances from earlier chemical reactions clearing off along with the cure leave the body, with the help of secretories, through the kidneys. For this reason, please drink a glass of fluid every half hours. By this, you help your body's detoxication. This fluid can be mineral water without gas, real fruit tea, self-made fruit juice, detox herbal tea, etc., according to your taste – the emphasis is on continuity. In the first 24 hours, fluid input must be raised to 3-4 liter, and on the third day, 2,5 - 3 liter must be taken.
2. If you feel the urge to smoke a cigarette, drink immediately! Solve the psychical problem that triggers this longing. Work off the stress, concern by speaking to someone.
3. When waking up, drink first, then make the breathing exercise. We can calm down or stimulate, energetize ourselves just by regulating the time of inhalation and exhalation. Relaxation: inhale for c. 5 seconds, do not keep a break, but immediately exhale slowly for c. 10-15 seconds. Stimulation: breathe in slowly counting to 15, keep the air inside for 10 counts, then exhale for 5 counts.
8 hours later: Blood's nicotine and carbon monoxide levels are cut by half. 24 hours later: The body is purified of carbon monoxide, lungs are clean. 2 days later: Nicotine is purged from the body, perception of tastes, smells is improving. 3 days later: Easier breathing, bronchi relaxed. 2-12 weeks later: Significant improvement of circulation. 1 year later: You will be able to save so much money that you will just have to go on holiday!!!
Excessive self-confidence or curiosity. Inadequate fluid intake. Influences by the work place and the environment. Stressful situations. Fear of putting on weight. The time of the treatment is 20-25 minutes, but we kindly ask our clients to give it more than 30 minutes so that we can provide all necessary information and discuss possible questions.
Call us with confidence, we will cure you of the habit of smoking.
Price of the device: 12.000 Euro + VAT (27 %).
The price includes the entire software collection (1 pendrive) necessary for the operation of the device, the electrode collection for the hands and the legs, and the cable link to the computer (RS232).
When signing the contract, 26,6% of the purchase price down payment is required, then the device is delivered within 8 work days.
When the full purchase price is covered, you may take over the device, which then constitutes your possession.
We call your attention to the fact that the system remains in possession of the company until the complete payment of the price.
Please note that, along with the purchase, we make a personal contract in which the customer, with regard to special local prices, puts down his unrepealable commitment not to market the device within 2 years' time beyond the boundaries of the country.
We market and deliver devices in all countries of the world.


text:
L4: Grunt(956 until level 5)
Cj2i3
A 250 year old male gamer
Joined on March 4th 2013, last online on 27 April 2017.
A Badge Within A Badge Earned 20 badges.
It's a Start Bank a Total of 2,000 VG$.
Spreading the Disease Score a total of 50 games in your collection.
Right Tool for the Right Tool Score a total of 25 games in your collection.
50 in One Add a total of 50 games to your collection.
The Nuts & Bolts Add a total of 25 games to your collection.
One Piece at a Time Add your first game to your collection.
Site Veteran Has been a VGChartz member for over 5 years.
Height: 20'1
Eye colour: Other
Hair colour: Other
Kingdom Hearts, Star Wars Battlefront, Grand Theft Auto III, The Witcher 2, Halo 3, Gears of War, Alan Wake, Trials Evolution, Portal 2, Half-Life 2, Team Fortress 2, Left 4 Dead 2, Uncharted 2, inFamous 2, God of War III, Heavy Rain, Journey, Metal Gear Solid 4, Killzone 3, LittleBigPlanet 2.
Hobbies? I am amazing at everything.
Cj2i3 doesn't have any friends yet.
51 total number of games
PS3 favourite console (21 games)
Shooter favourite genre (17 games)
100% of games completed

redpajama_set_name: RedPajamaCommonCrawl


Huang Sun-Quan, Ph.D. of Building and Planning of National Taiwan University, is a visiting professor and director of Institute of Network Society, China Academy of Art. He has taught in many institutes of Arts and Architecture in Taiwan and HongKong Universities. Huang is known for his long-term activist-academic interventions across multidisciplinary fields. He was the founder and editor-in-chief of POTS Weekly (1994~2014) which is the most influential alternative cultural magazine in Taiwan. He was the director of the "Anti-Green Bulldozer Movement" in 1997 and made the documentary Green Bulldozer: The Rise of Your New Homeland anticipated in biennales and film festival over 20 cities of Asia. In 2004, he created one of the most influential blog platform in Taiwan (twblog.net) and Taiwan Independent Media Center (tw.indymedia.org) as one of 120 cities of a network of Global Independent Media Center (indymedia.org). In recent years, he began his curatorial and artistic practices. After Monkey-Wrenching Art Center (2008~2014) he had created, he engages the first artists' co-op (CACO) in Taiwan. His curation projects and artworks participated in the Bi-City Biennale of Urbanism and Architecture of Shenzhen (2007, 2013, 2017), Taipei Biennale, Cube Project Space, Kaohsiung Museum of Fine Arts, Kaohsiung Labor Museum, Centre Academy of Art Museum, Red Brick Art Museum, etc. He is a famous writer and editor, the author of Green Bulldozer, Unless We Look for Beauty, Architecture and Utopia, the translator of DIY-Party and Protest in 90's Britain, the editor of L'art dans L'anthropocene, Annals of Greater Taipei, Dreams along the Path-Secrets of Literates, The Hidden Urban Soul and others, and is ongoing an "Aletheia: An Open Source Publications Series" through gitbook which had 3 books published include Let's Co-op. Since 2013 he has facilitated multitude.asia research project and made 3 full-length documentary films about India, Malaysia, HongKong, and Taiwan's activist groups. He is an artivist across urbanism, media, arts and social initiatives.


text:
{-# LANGUAGE BangPatterns, CPP, MagicHash, Rank2Types, UnboxedTuples #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
#if __GLASGOW_HASKELL__ >= 702
{-# LANGUAGE Trustworthy #-}
#endif
#if __GLASGOW_HASKELL__ >= 708
{-# LANGUAGE TypeFamilies #-}
#endif

-- |
-- Module      : Data.Text
-- Copyright   : (c) 2009, 2010, 2011, 2012 Bryan O'Sullivan,
--               (c) 2009 Duncan Coutts,
--               (c) 2008, 2009 Tom Harper
--
-- License     : BSD-style
-- Maintainer  : bos@serpentine.com
-- Stability   : experimental
-- Portability : GHC
--
-- A time and space-efficient implementation of Unicode text.
-- Suitable for performance critical use, both in terms of large data
-- quantities and high speed.
--
-- /Note/: Read below the synopsis for important notes on the use of
-- this module.
--
-- This module is intended to be imported @qualified@, to avoid name
-- clashes with "Prelude" functions, e.g.
--
-- > import qualified Data.Text as T
--
-- To use an extended and very rich family of functions for working
-- with Unicode text (including normalization, regular expressions,
-- non-standard encodings, text breaking, and locales), see
-- <http://hackage.haskell.org/package/text-icu the text-icu package >.

module Data.Text
    (
    -- * Strict vs lazy types
    -- $strict

    -- * Acceptable data
    -- $replacement

    -- * Fusion
    -- $fusion

    -- * Types
      Text

    -- * Creation and elimination
    , pack
    , unpack
    , singleton
    , empty

    -- * Basic interface
    , cons
    , snoc
    , append
    , uncons
    , head
    , last
    , tail
    , init
    , null
    , length
    , compareLength

    -- * Transformations
    , map
    , intercalate
    , intersperse
    , transpose
    , reverse
    , replace

    -- ** Case conversion
    -- $case
    , toCaseFold
    , toLower
    , toUpper
    , toTitle

    -- ** Justification
    , justifyLeft
    , justifyRight
    , center

    -- * Folds
    , foldl
    , foldl'
    , foldl1
    , foldl1'
    , foldr
    , foldr1

    -- ** Special folds
    , concat
    , concatMap
    , any
    , all
    , maximum
    , minimum

    -- * Construction

    -- ** Scans
    , scanl
    , scanl1
    , scanr
    , scanr1

    -- ** Accumulating maps
    , mapAccumL
    , mapAccumR

    -- ** Generation and unfolding
    , replicate
    , unfoldr
    , unfoldrN

    -- * Substrings

    -- ** Breaking strings
    , take
    , takeEnd
    , drop
    , dropEnd
    , takeWhile
    , dropWhile
    , dropWhileEnd
    , dropAround
    , strip
    , stripStart
    , stripEnd
    , splitAt
    , breakOn
    , breakOnEnd
    , break
    , span
    , group
    , groupBy
    , inits
    , tails

    -- ** Breaking into many substrings
    -- $split
    , splitOn
    , split
    , chunksOf

    -- ** Breaking into lines and words
    , lines
    --, lines'
    , words
    , unlines
    , unwords

    -- * Predicates
    , isPrefixOf
    , isSuffixOf
    , isInfixOf

    -- ** View patterns
    , stripPrefix
    , stripSuffix
    , commonPrefixes

    -- * Searching
    , filter
    , breakOnAll
    , find
    , partition

    -- , findSubstring

    -- * Indexing
    -- $index
    , index
    , findIndex
    , count

    -- * Zipping
    , zip
    , zipWith

    -- -* Ordered text
    -- , sort

    -- * Low level operations
    , copy
    , unpackCString#
    ) where

import Prelude (Char, Bool(..), Int, Maybe(..), String,
                Eq(..), Ord(..), Ordering(..), (++),
                Read(..),
                (&&), (||), (+), (-), (.), ($), ($!), (>>),
                not, return, otherwise, quot)
#if defined(HAVE_DEEPSEQ)
import Control.DeepSeq (NFData(rnf))
#endif
#if defined(ASSERTS)
import Control.Exception (assert)
#endif
import Data.Char (isSpace)
import Data.Data (Data(gfoldl, toConstr, gunfold, dataTypeOf), constrIndex,
                  Constr, mkConstr, DataType, mkDataType, Fixity(Prefix))
import Control.Monad (foldM)
import Control.Monad.ST (ST)
import qualified Data.Text.Array as A
import qualified Data.List as L
import Data.Binary (Binary(get, put))
import Data.Monoid (Monoid(..))
import Data.String (IsString(..))
import qualified Data.Text.Internal.Fusion as S
import qualified Data.Text.Internal.Fusion.Common as S
import Data.Text.Encoding (decodeUtf8, encodeUtf8)
import Data.Text.Internal.Fusion (stream, reverseStream, unstream)
import Data.Text.Internal.Private (span_)
import Data.Text.Internal (Text(..), empty, firstf, mul, safe, text)
import Data.Text.Show (singleton, unpack, unpackCString#)
import qualified Prelude as P
import Data.Text.Unsafe (Iter(..), iter, iter_, lengthWord16, reverseIter,
                         reverseIter_, unsafeHead, unsafeTail)
import Data.Text.Internal.Unsafe.Char (unsafeChr)
import qualified Data.Text.Internal.Functions as F
import qualified Data.Text.Internal.Encoding.Utf16 as U16
import Data.Text.Internal.Search (indices)
#if defined(__HADDOCK__)
import Data.ByteString (ByteString)
import qualified Data.Text.Lazy as L
import Data.Int (Int64)
#endif
#if __GLASGOW_HASKELL__ >= 708
import qualified GHC.Exts as Exts
#endif
import Text.Printf (PrintfArg, formatArg, formatString)

-- $strict
--
-- This package provides both strict and lazy 'Text' types.  The
-- strict type is provided by the "Data.Text" module, while the lazy
-- type is provided by the "Data.Text.Lazy" module. Internally, the
-- lazy @Text@ type consists of a list of strict chunks.
--
-- The strict 'Text' type requires that an entire string fit into
-- memory at once.  The lazy 'Data.Text.Lazy.Text' type is capable of
-- streaming strings that are larger than memory using a small memory
-- footprint.  In many cases, the overhead of chunked streaming makes
-- the lazy 'Data.Text.Lazy.Text' type slower than its strict
-- counterpart, but this is not always the case.  Sometimes, the time
-- complexity of a function in one module may be different from the
-- other, due to their differing internal structures.
--
-- Each module provides an almost identical API, with the main
-- difference being that the strict module uses 'Int' values for
-- lengths and counts, while the lazy module uses 'Data.Int.Int64'
-- lengths.

-- $replacement
--
-- A 'Text' value is a sequence of Unicode scalar values, as defined
-- in
-- <http://www.unicode.org/versions/Unicode5.2.0/ch03.pdf#page=35 §3.9, definition D76 of the Unicode 5.2 standard >.
-- As such, a 'Text' cannot contain values in the range U+D800 to
-- U+DFFF inclusive. Haskell implementations admit all Unicode code
-- points
-- (<http://www.unicode.org/versions/Unicode5.2.0/ch03.pdf#page=13 §3.4, definition D10 >)
-- as 'Char' values, including code points from this invalid range.
-- This means that there are some 'Char' values that are not valid
-- Unicode scalar values, and the functions in this module must handle
-- those cases.
--
-- Within this module, many functions construct a 'Text' from one or
-- more 'Char' values. Those functions will substitute 'Char' values
-- that are not valid Unicode scalar values with the replacement
-- character \"�\" (U+FFFD).  Functions that perform this
-- inspection and replacement are documented with the phrase
-- \"Performs replacement on invalid scalar values\".
--
-- (One reason for this policy of replacement is that internally, a
-- 'Text' value is represented as packed UTF-16 data. Values in the
-- range U+D800 through U+DFFF are used by UTF-16 to denote surrogate
-- code points, and so cannot be represented. The functions replace
-- invalid scalar values, instead of dropping them, as a security
-- measure. For details, see
-- <http://unicode.org/reports/tr36/#Deletion_of_Noncharacters Unicode Technical Report 36, §3.5 >.)

-- $fusion
--
-- Most of the functions in this module are subject to /fusion/,
-- meaning that a pipeline of such functions will usually allocate at
-- most one 'Text' value.
--
-- As an example, consider the following pipeline:
--
-- > import Data.Text as T
-- > import Data.Text.Encoding as E
-- > import Data.ByteString (ByteString)
-- >
-- > countChars :: ByteString -> Int
-- > countChars = T.length . T.toUpper . E.decodeUtf8
--
-- From the type signatures involved, this looks like it should
-- allocate one 'Data.ByteString.ByteString' value, and two 'Text'
-- values. However, when a module is compiled with optimisation
-- enabled under GHC, the two intermediate 'Text' values will be
-- optimised away, and the function will be compiled down to a single
-- loop over the source 'Data.ByteString.ByteString'.
--
-- Functions that can be fused by the compiler are documented with the
-- phrase \"Subject to fusion\".

instance Eq Text where
    Text arrA offA lenA == Text arrB offB lenB
        | lenA == lenB = A.equal arrA offA arrB offB lenA
        | otherwise    = False
    {-# INLINE (==) #-}

instance Ord Text where
    compare = compareText

instance Read Text where
    readsPrec p str = [(pack x,y) | (x,y) <- readsPrec p str]

instance Monoid Text where
    mempty  = empty
    mappend = append
    mconcat = concat

instance IsString Text where
    fromString = pack

#if __GLASGOW_HASKELL__ >= 708
instance Exts.IsList Text where
    type Item Text = Char
    fromList       = pack
    toList         = unpack
#endif

#if defined(HAVE_DEEPSEQ)
instance NFData Text where rnf !_ = ()
#endif

instance Binary Text where
    put t = put (encodeUtf8 t)
    get   = P.fmap decodeUtf8 get

-- | This instance preserves data abstraction at the cost of inefficiency.
-- We omit reflection services for the sake of data abstraction.
--
-- This instance was created by copying the updated behavior of
-- @"Data.Set".@'Data.Set.Set' and @"Data.Map".@'Data.Map.Map'. If you
-- feel a mistake has been made, please feel free to submit
-- improvements.
--
-- The original discussion is archived here:
-- <http://groups.google.com/group/haskell-cafe/browse_thread/thread/b5bbb1b28a7e525d/0639d46852575b93 could we get a Data instance for Data.Text.Text? >
--
-- The followup discussion that changed the behavior of 'Data.Set.Set'
-- and 'Data.Map.Map' is archived here:
-- <http://markmail.org/message/trovdc6zkphyi3cr#query:+page:1+mid:a46der3iacwjcf6n+state:results Proposal: Allow gunfold for Data.Map, ... >

instance Data Text where
  gfoldl f z txt = z pack `f` (unpack txt)
  toConstr _ = packConstr
  gunfold k z c = case constrIndex c of
    1 -> k (z pack)
    _ -> P.error "gunfold"
  dataTypeOf _ = textDataType

instance PrintfArg Text where
  formatArg txt = formatString $ unpack txt

packConstr :: Constr
packConstr = mkConstr textDataType "pack" [] Prefix

textDataType :: DataType
textDataType = mkDataType "Data.Text.Text" [packConstr]

-- | /O(n)/ Compare two 'Text' values lexicographically.
compareText :: Text -> Text -> Ordering
compareText ta@(Text _arrA _offA lenA) tb@(Text _arrB _offB lenB)
    | lenA == 0 && lenB == 0 = EQ
    | otherwise              = go 0 0
  where
    go !i !j
        | i >= lenA || j >= lenB = compare lenA lenB
        | a < b                  = LT
        | a > b                  = GT
        | otherwise              = go (i+di) (j+dj)
      where Iter a di = iter ta i
            Iter b dj = iter tb j

-- -----------------------------------------------------------------------------
-- * Conversion to/from 'Text'

-- | /O(n)/ Convert a 'String' into a 'Text'.  Subject to
-- fusion.  Performs replacement on invalid scalar values.
pack :: String -> Text
pack = unstream . S.map safe . S.streamList
{-# INLINE [1] pack #-}

-- -----------------------------------------------------------------------------
-- * Basic functions

-- | /O(n)/ Adds a character to the front of a 'Text'.  This function
-- is more costly than its 'List' counterpart because it requires
-- copying a new array.  Subject to fusion.  Performs replacement on
-- invalid scalar values.
cons :: Char -> Text -> Text
cons c t = unstream (S.cons (safe c) (stream t))
{-# INLINE cons #-}

infixr 5 `cons`

-- | /O(n)/ Adds a character to the end of a 'Text'.  This copies the
-- entire array in the process, unless fused.  Subject to fusion.
-- Performs replacement on invalid scalar values.
snoc :: Text -> Char -> Text
snoc t c = unstream (S.snoc (stream t) (safe c))
{-# INLINE snoc #-}

-- | /O(n)/ Appends one 'Text' to the other by copying both of them
-- into a new 'Text'.  Subject to fusion.
append :: Text -> Text -> Text
append a@(Text arr1 off1 len1) b@(Text arr2 off2 len2)
    | len1 == 0 = b
    | len2 == 0 = a
    | len > 0   = Text (A.run x) 0 len
    | otherwise = overflowError "append"
    where
      len = len1+len2
      x :: ST s (A.MArray s)
      x = do
        arr <- A.new len
        A.copyI arr 0 arr1 off1 len1
        A.copyI arr len1 arr2 off2 len
        return arr
{-# NOINLINE append #-}

{-# RULES
"TEXT append -> fused" [~1] forall t1 t2.
    append t1 t2 = unstream (S.append (stream t1) (stream t2))
"TEXT append -> unfused" [1] forall t1 t2.
    unstream (S.append (stream t1) (stream t2)) = append t1 t2
 #-}

-- | /O(1)/ Returns the first character of a 'Text', which must be
-- non-empty.  Subject to fusion.
head :: Text -> Char
head t = S.head (stream t)
{-# INLINE head #-}

-- | /O(1)/ Returns the first character and rest of a 'Text', or
-- 'Nothing' if empty. Subject to fusion.
uncons :: Text -> Maybe (Char, Text)
uncons t@(Text arr off len)
    | len <= 0  = Nothing
    | otherwise = Just (c, text arr (off+d) (len-d))
    where Iter c d = iter t 0
{-# INLINE [1] uncons #-}

-- | Lifted from Control.Arrow and specialized.
second :: (b -> c) -> (a,b) -> (a,c)
second f (a, b) = (a, f b)

-- | /O(1)/ Returns the last character of a 'Text', which must be
-- non-empty.  Subject to fusion.
last :: Text -> Char
last (Text arr off len)
    | len <= 0                 = emptyError "last"
    | n < 0xDC00 || n > 0xDFFF = unsafeChr n
    | otherwise                = U16.chr2 n0 n
    where n  = A.unsafeIndex arr (off+len-1)
          n0 = A.unsafeIndex arr (off+len-2)
{-# INLINE [1] last #-}

{-# RULES
"TEXT last -> fused" [~1] forall t.
    last t = S.last (stream t)
"TEXT last -> unfused" [1] forall t.
    S.last (stream t) = last t
  #-}

-- | /O(1)/ Returns all characters after the head of a 'Text', which
-- must be non-empty.  Subject to fusion.
tail :: Text -> Text
tail t@(Text arr off len)
    | len <= 0  = emptyError "tail"
    | otherwise = text arr (off+d) (len-d)
    where d = iter_ t 0
{-# INLINE [1] tail #-}

{-# RULES
"TEXT tail -> fused" [~1] forall t.
    tail t = unstream (S.tail (stream t))
"TEXT tail -> unfused" [1] forall t.
    unstream (S.tail (stream t)) = tail t
 #-}

-- | /O(1)/ Returns all but the last character of a 'Text', which must
-- be non-empty.  Subject to fusion.
init :: Text -> Text
init (Text arr off len) | len <= 0                   = emptyError "init"
                        | n >= 0xDC00 && n <= 0xDFFF = text arr off (len-2)
                        | otherwise                  = text arr off (len-1)
    where
      n = A.unsafeIndex arr (off+len-1)
{-# INLINE [1] init #-}

{-# RULES
"TEXT init -> fused" [~1] forall t.
    init t = unstream (S.init (stream t))
"TEXT init -> unfused" [1] forall t.
    unstream (S.init (stream t)) = init t
 #-}

-- | /O(1)/ Tests whether a 'Text' is empty or not.  Subject to
-- fusion.
null :: Text -> Bool
null (Text _arr _off len) =
#if defined(ASSERTS)
    assert (len >= 0) $
#endif
    len <= 0
{-# INLINE [1] null #-}

{-# RULES
"TEXT null -> fused" [~1] forall t.
    null t = S.null (stream t)
"TEXT null -> unfused" [1] forall t.
    S.null (stream t) = null t
 #-}

-- | /O(1)/ Tests whether a 'Text' contains exactly one character.
-- Subject to fusion.
isSingleton :: Text -> Bool
isSingleton = S.isSingleton . stream
{-# INLINE isSingleton #-}

-- | /O(n)/ Returns the number of characters in a 'Text'.
-- Subject to fusion.
length :: Text -> Int
length t = S.length (stream t)
{-# INLINE length #-}

-- | /O(n)/ Compare the count of characters in a 'Text' to a number.
-- Subject to fusion.
--
-- This function gives the same answer as comparing against the result
-- of 'length', but can short circuit if the count of characters is
-- greater than the number, and hence be more efficient.
compareLength :: Text -> Int -> Ordering
compareLength t n = S.compareLengthI (stream t) n
{-# INLINE [1] compareLength #-}

{-# RULES
"TEXT compareN/length -> compareLength" [~1] forall t n.
    compare (length t) n = compareLength t n
  #-}

{-# RULES
"TEXT ==N/length -> compareLength/==EQ" [~1] forall t n.
    (==) (length t) n = compareLength t n == EQ
  #-}

{-# RULES
"TEXT /=N/length -> compareLength//=EQ" [~1] forall t n.
    (/=) (length t) n = compareLength t n /= EQ
  #-}

{-# RULES
"TEXT <N/length -> compareLength/==LT" [~1] forall t n.
    (<) (length t) n = compareLength t n == LT
  #-}

{-# RULES
"TEXT <=N/length -> compareLength//=GT" [~1] forall t n.
    (<=) (length t) n = compareLength t n /= GT
  #-}

{-# RULES
"TEXT >N/length -> compareLength/==GT" [~1] forall t n.
    (>) (length t) n = compareLength t n == GT
  #-}

{-# RULES
"TEXT >=N/length -> compareLength//=LT" [~1] forall t n.
    (>=) (length t) n = compareLength t n /= LT
  #-}

-- -----------------------------------------------------------------------------
-- * Transformations
-- | /O(n)/ 'map' @f@ @t@ is the 'Text' obtained by applying @f@ to
-- each element of @t@.
--
-- Example:
--
-- > map (\c -> if c == '.' then '!' else c) $ pack "I am not angry. Not at all." ==> "I am not angry! Not at all!"
--
-- Subject to fusion.  Performs replacement on invalid scalar values.
map :: (Char -> Char) -> Text -> Text
map f t = unstream (S.map (safe . f) (stream t))
{-# INLINE [1] map #-}

-- | /O(n)/ The 'intercalate' function takes a 'Text' and a list of
-- 'Text's and concatenates the list after interspersing the first
-- argument between each element of the list.
--
-- Example:
--
-- > let ni = pack "NI!"
-- > let sentence = fmap pack ["We", "seek", "the", "Holy", "Grail"]
-- > intercalate ni sentence  ==> ""WeNI!seekNI!theNI!HolyNI!Grail""
intercalate :: Text -> [Text] -> Text
intercalate t = concat . (F.intersperse t)
{-# INLINE intercalate #-}

-- | /O(n)/ The 'intersperse' function takes a character and places it
-- between the characters of a 'Text'.
--
-- Example:
--
-- > intersperse '.' $ pack "SHIELD" ==> "S.H.I.E.L.D"
--
-- Subject to fusion.  Performs replacement on invalid scalar values.
intersperse     :: Char -> Text -> Text
intersperse c t = unstream (S.intersperse (safe c) (stream t))
{-# INLINE intersperse #-}

-- | /O(n)/ Reverse the characters of a string.
--
-- Example:
--
-- > reverse $ pack "desrever" ==> "reversed"
--
-- Subject to fusion.
reverse :: Text -> Text
reverse t = S.reverse (stream t)
{-# INLINE reverse #-}

-- | /O(m+n)/ Replace every non-overlapping occurrence of @needle@ in
-- @haystack@ with @replacement@.
--
-- This function behaves as though it was defined as follows:
--
-- @
-- replace needle replacement haystack =
--   'intercalate' replacement ('splitOn' needle haystack)
-- @
--
-- As this suggests, each occurrence is replaced exactly once.  So if
-- @needle@ occurs in @replacement@, that occurrence will /not/ itself
-- be replaced recursively:
--
-- > replace "oo" "foo" "oo" == "foo"
--
-- In cases where several instances of @needle@ overlap, only the
-- first one will be replaced:
--
-- > replace "ofo" "bar" "ofofo" == "barfo"
--
-- In (unlikely) bad cases, this function's time complexity degrades
-- towards /O(n*m)/.
replace :: Text
        -- ^ @needle@ to search for.  If this string is empty, an
        -- error will occur.
        -> Text
        -- ^ @replacement@ to replace @needle@ with.
        -> Text
        -- ^ @haystack@ in which to search.
        -> Text
replace needle@(Text _      _      neeLen)
               (Text repArr repOff repLen)
      haystack@(Text hayArr hayOff hayLen)
  | neeLen == 0 = emptyError "replace"
  | L.null ixs  = haystack
  | len > 0     = Text (A.run x) 0 len
  | otherwise   = empty
  where
    ixs = indices needle haystack
    len = hayLen - (neeLen - repLen) `mul` L.length ixs
    x :: ST s (A.MArray s)
    x = do
      marr <- A.new len
      let loop (i:is) o d = do
            let d0 = d + i - o
                d1 = d0 + repLen
            A.copyI marr d  hayArr (hayOff+o) d0
            A.copyI marr d0 repArr repOff d1
            loop is (i + neeLen) d1
          loop []     o d = A.copyI marr d hayArr (hayOff+o) len
      loop ixs 0 0
      return marr

-- ----------------------------------------------------------------------------
-- ** Case conversions (folds)

-- $case
--
-- When case converting 'Text' values, do not use combinators like
-- @map toUpper@ to case convert each character of a string
-- individually, as this gives incorrect results according to the
-- rules of some writing systems.  The whole-string case conversion
-- functions from this module, such as @toUpper@, obey the correct
-- case conversion rules.  As a result, these functions may map one
-- input character to two or three output characters. For examples,
-- see the documentation of each function.
--
-- /Note/: In some languages, case conversion is a locale- and
-- context-dependent operation. The case conversion functions in this
-- module are /not/ locale sensitive. Programs that require locale
-- sensitivity should use appropriate versions of the
-- <http://hackage.haskell.org/package/text-icu-0.6.3.7/docs/Data-Text-ICU.html#g:4 case mapping functions from the text-icu package >.

-- | /O(n)/ Convert a string to folded case.  Subject to fusion.
--
-- This function is mainly useful for performing caseless (also known
-- as case insensitive) string comparisons.
--
-- A string @x@ is a caseless match for a string @y@ if and only if:
--
-- @toCaseFold x == toCaseFold y@
--
-- The result string may be longer than the input string, and may
-- differ from applying 'toLower' to the input string.  For instance,
-- the Armenian small ligature \"ﬓ\" (men now, U+FB13) is case
-- folded to the sequence \"մ\" (men, U+0574) followed by
-- \"ն\" (now, U+0576), while the Greek \"µ\" (micro sign,
-- U+00B5) is case folded to \"μ\" (small letter mu, U+03BC)
-- instead of itself.
toCaseFold :: Text -> Text
toCaseFold t = unstream (S.toCaseFold (stream t))
{-# INLINE toCaseFold #-}

-- | /O(n)/ Convert a string to lower case, using simple case
-- conversion.  Subject to fusion.
--
-- The result string may be longer than the input string.  For
-- instance, \"İ\" (Latin capital letter I with dot above,
-- U+0130) maps to the sequence \"i\" (Latin small letter i, U+0069)
-- followed by \" ̇\" (combining dot above, U+0307).
toLower :: Text -> Text
toLower t = unstream (S.toLower (stream t))
{-# INLINE toLower #-}

-- | /O(n)/ Convert a string to upper case, using simple case
-- conversion.  Subject to fusion.
--
-- The result string may be longer than the input string.  For
-- instance, the German \"ß\" (eszett, U+00DF) maps to the
-- two-letter sequence \"SS\".
toUpper :: Text -> Text
toUpper t = unstream (S.toUpper (stream t))
{-# INLINE toUpper #-}

-- | /O(n)/ Convert a string to title case, using simple case
-- conversion. Subject to fusion.
--
-- The first letter of the input is converted to title case, as is
-- every subsequent letter that immediately follows a non-letter.
-- Every letter that immediately follows another letter is converted
-- to lower case.
--
-- The result string may be longer than the input string. For example,
-- the Latin small ligature ﬂ (U+FB02) is converted to the
-- sequence Latin capital letter F (U+0046) followed by Latin small
-- letter l (U+006C).
--
-- /Note/: this function does not take language or culture specific
-- rules into account. For instance, in English, different style
-- guides disagree on whether the book name \"The Hill of the Red
-- Fox\" is correctly title cased—but this function will
-- capitalize /every/ word.
toTitle :: Text -> Text
toTitle t = unstream (S.toTitle (stream t))
{-# INLINE toTitle #-}

-- | /O(n)/ Left-justify a string to the given length, using the
-- specified fill character on the right. Subject to fusion.
-- Performs replacement on invalid scalar values.
--
-- Examples:
--
-- > justifyLeft 7 'x' "foo"    == "fooxxxx"
-- > justifyLeft 3 'x' "foobar" == "foobar"
justifyLeft :: Int -> Char -> Text -> Text
justifyLeft k c t
    | len >= k  = t
    | otherwise = t `append` replicateChar (k-len) c
  where len = length t
{-# INLINE [1] justifyLeft #-}

{-# RULES
"TEXT justifyLeft -> fused" [~1] forall k c t.
    justifyLeft k c t = unstream (S.justifyLeftI k c (stream t))
"TEXT justifyLeft -> unfused" [1] forall k c t.
    unstream (S.justifyLeftI k c (stream t)) = justifyLeft k c t
  #-}

-- | /O(n)/ Right-justify a string to the given length, using the
-- specified fill character on the left.  Performs replacement on
-- invalid scalar values.
--
-- Examples:
--
-- > justifyRight 7 'x' "bar"    == "xxxxbar"
-- > justifyRight 3 'x' "foobar" == "foobar"
justifyRight :: Int -> Char -> Text -> Text
justifyRight k c t
    | len >= k  = t
    | otherwise = replicateChar (k-len) c `append` t
  where len = length t
{-# INLINE justifyRight #-}

-- | /O(n)/ Center a string to the given length, using the specified
-- fill character on either side.  Performs replacement on invalid
-- scalar values.
--
-- Examples:
--
-- > center 8 'x' "HS" = "xxxHSxxx"
center :: Int -> Char -> Text -> Text
center k c t
    | len >= k  = t
    | otherwise = replicateChar l c `append` t `append` replicateChar r c
  where len = length t
        d   = k - len
        r   = d `quot` 2
        l   = d - r
{-# INLINE center #-}

-- | /O(n)/ The 'transpose' function transposes the rows and columns
-- of its 'Text' argument.  Note that this function uses 'pack',
-- 'unpack', and the list version of transpose, and is thus not very
-- efficient.
--
-- Examples:
--
-- > transpose [pack "green", pack "orange"] ==> ["go","rr","ea","en","ng","e"]
-- > transpose [pack "blue", pack "red"] ==> ["br","le","ud","e"]
transpose :: [Text] -> [Text]
transpose ts = P.map pack (L.transpose (P.map unpack ts))

-- -----------------------------------------------------------------------------
-- * Reducing 'Text's (folds)

-- | /O(n)/ 'foldl', applied to a binary operator, a starting value
-- (typically the left-identity of the operator), and a 'Text',
-- reduces the 'Text' using the binary operator, from left to right.
-- Subject to fusion.
foldl :: (a -> Char -> a) -> a -> Text -> a
foldl f z t = S.foldl f z (stream t)
{-# INLINE foldl #-}

-- | /O(n)/ A strict version of 'foldl'.  Subject to fusion.
foldl' :: (a -> Char -> a) -> a -> Text -> a
foldl' f z t = S.foldl' f z (stream t)
{-# INLINE foldl' #-}

-- | /O(n)/ A variant of 'foldl' that has no starting value argument,
-- and thus must be applied to a non-empty 'Text'.  Subject to fusion.
foldl1 :: (Char -> Char -> Char) -> Text -> Char
foldl1 f t = S.foldl1 f (stream t)
{-# INLINE foldl1 #-}

-- | /O(n)/ A strict version of 'foldl1'.  Subject to fusion.
foldl1' :: (Char -> Char -> Char) -> Text -> Char
foldl1' f t = S.foldl1' f (stream t)
{-# INLINE foldl1' #-}

-- | /O(n)/ 'foldr', applied to a binary operator, a starting value
-- (typically the right-identity of the operator), and a 'Text',
-- reduces the 'Text' using the binary operator, from right to left.
-- Subject to fusion.
foldr :: (Char -> a -> a) -> a -> Text -> a
foldr f z t = S.foldr f z (stream t)
{-# INLINE foldr #-}

-- | /O(n)/ A variant of 'foldr' that has no starting value argument,
-- and thus must be applied to a non-empty 'Text'.  Subject to
-- fusion.
foldr1 :: (Char -> Char -> Char) -> Text -> Char
foldr1 f t = S.foldr1 f (stream t)
{-# INLINE foldr1 #-}

-- -----------------------------------------------------------------------------
-- ** Special folds

-- | /O(n)/ Concatenate a list of 'Text's.
concat :: [Text] -> Text
concat ts = case ts' of
              [] -> empty
              [t] -> t
              _ -> Text (A.run go) 0 len
  where
    ts' = L.filter (not . null) ts
    len = sumP "concat" $ L.map lengthWord16 ts'
    go :: ST s (A.MArray s)
    go = do
      arr <- A.new len
      let step i (Text a o l) =
            let !j = i + l in A.copyI arr i a o j >> return j
      foldM step 0 ts' >> return arr

-- | /O(n)/ Map a function over a 'Text' that results in a 'Text', and
-- concatenate the results.
concatMap :: (Char -> Text) -> Text -> Text
concatMap f = concat . foldr ((:) . f) []
{-# INLINE concatMap #-}

-- | /O(n)/ 'any' @p@ @t@ determines whether any character in the
-- 'Text' @t@ satisifes the predicate @p@. Subject to fusion.
any :: (Char -> Bool) -> Text -> Bool
any p t = S.any p (stream t)
{-# INLINE any #-}

-- | /O(n)/ 'all' @p@ @t@ determines whether all characters in the
-- 'Text' @t@ satisify the predicate @p@. Subject to fusion.
all :: (Char -> Bool) -> Text -> Bool
all p t = S.all p (stream t)
{-# INLINE all #-}

-- | /O(n)/ 'maximum' returns the maximum value from a 'Text', which
-- must be non-empty. Subject to fusion.
maximum :: Text -> Char
maximum t = S.maximum (stream t)
{-# INLINE maximum #-}

-- | /O(n)/ 'minimum' returns the minimum value from a 'Text', which
-- must be non-empty. Subject to fusion.
minimum :: Text -> Char
minimum t = S.minimum (stream t)
{-# INLINE minimum #-}

-- -----------------------------------------------------------------------------
-- * Building 'Text's

-- | /O(n)/ 'scanl' is similar to 'foldl', but returns a list of
-- successive reduced values from the left. Subject to fusion.
-- Performs replacement on invalid scalar values.
--
-- > scanl f z [x1, x2, ...] == [z, z `f` x1, (z `f` x1) `f` x2, ...]
--
-- Note that
--
-- > last (scanl f z xs) == foldl f z xs.
scanl :: (Char -> Char -> Char) -> Char -> Text -> Text
scanl f z t = unstream (S.scanl g z (stream t))
    where g a b = safe (f a b)
{-# INLINE scanl #-}

-- | /O(n)/ 'scanl1' is a variant of 'scanl' that has no starting
-- value argument.  Subject to fusion.  Performs replacement on
-- invalid scalar values.
--
-- > scanl1 f [x1, x2, ...] == [x1, x1 `f` x2, ...]
scanl1 :: (Char -> Char -> Char) -> Text -> Text
scanl1 f t | null t    = empty
           | otherwise = scanl f (unsafeHead t) (unsafeTail t)
{-# INLINE scanl1 #-}

-- | /O(n)/ 'scanr' is the right-to-left dual of 'scanl'.  Performs
-- replacement on invalid scalar values.
--
-- > scanr f v == reverse . scanl (flip f) v . reverse
scanr :: (Char -> Char -> Char) -> Char -> Text -> Text
scanr f z = S.reverse . S.reverseScanr g z . reverseStream
    where g a b = safe (f a b)
{-# INLINE scanr #-}

-- | /O(n)/ 'scanr1' is a variant of 'scanr' that has no starting
-- value argument.  Subject to fusion.  Performs replacement on
-- invalid scalar values.
scanr1 :: (Char -> Char -> Char) -> Text -> Text
scanr1 f t | null t    = empty
           | otherwise = scanr f (last t) (init t)
{-# INLINE scanr1 #-}

-- | /O(n)/ Like a combination of 'map' and 'foldl''. Applies a
-- function to each element of a 'Text', passing an accumulating
-- parameter from left to right, and returns a final 'Text'.  Performs
-- replacement on invalid scalar values.
mapAccumL :: (a -> Char -> (a,Char)) -> a -> Text -> (a, Text)
mapAccumL f z0 = S.mapAccumL g z0 . stream
    where g a b = second safe (f a b)
{-# INLINE mapAccumL #-}

-- | The 'mapAccumR' function behaves like a combination of 'map' and
-- a strict 'foldr'; it applies a function to each element of a
-- 'Text', passing an accumulating parameter from right to left, and
-- returning a final value of this accumulator together with the new
-- 'Text'.
-- Performs replacement on invalid scalar values.
mapAccumR :: (a -> Char -> (a,Char)) -> a -> Text -> (a, Text)
mapAccumR f z0 = second reverse . S.mapAccumL g z0 . reverseStream
    where g a b = second safe (f a b)
{-# INLINE mapAccumR #-}

-- -----------------------------------------------------------------------------
-- ** Generating and unfolding 'Text's

-- | /O(n*m)/ 'replicate' @n@ @t@ is a 'Text' consisting of the input
-- @t@ repeated @n@ times.
replicate :: Int -> Text -> Text
replicate n t@(Text a o l)
    | n <= 0 || l <= 0       = empty
    | n == 1                 = t
    | isSingleton t          = replicateChar n (unsafeHead t)
    | otherwise              = Text (A.run x) 0 len
  where
    len = l `mul` n
    x :: ST s (A.MArray s)
    x = do
      arr <- A.new len
      let loop !d !i | i >= n    = return arr
                     | otherwise = let m = d + l
                                   in A.copyI arr d a o m >> loop m (i+1)
      loop 0 0
{-# INLINE [1] replicate #-}

{-# RULES
"TEXT replicate/singleton -> replicateChar" [~1] forall n c.
    replicate n (singleton c) = replicateChar n c
  #-}

-- | /O(n)/ 'replicateChar' @n@ @c@ is a 'Text' of length @n@ with @c@ the
-- value of every element. Subject to fusion.
replicateChar :: Int -> Char -> Text
replicateChar n c = unstream (S.replicateCharI n (safe c))
{-# INLINE replicateChar #-}

-- | /O(n)/, where @n@ is the length of the result. The 'unfoldr'
-- function is analogous to the List 'L.unfoldr'. 'unfoldr' builds a
-- 'Text' from a seed value. The function takes the element and
-- returns 'Nothing' if it is done producing the 'Text', otherwise
-- 'Just' @(a,b)@.  In this case, @a@ is the next 'Char' in the
-- string, and @b@ is the seed value for further production. Subject
-- to fusion.  Performs replacement on invalid scalar values.
unfoldr     :: (a -> Maybe (Char,a)) -> a -> Text
unfoldr f s = unstream (S.unfoldr (firstf safe . f) s)
{-# INLINE unfoldr #-}

-- | /O(n)/ Like 'unfoldr', 'unfoldrN' builds a 'Text' from a seed
-- value. However, the length of the result should be limited by the
-- first argument to 'unfoldrN'. This function is more efficient than
-- 'unfoldr' when the maximum length of the result is known and
-- correct, otherwise its performance is similar to 'unfoldr'. Subject
-- to fusion.  Performs replacement on invalid scalar values.
unfoldrN     :: Int -> (a -> Maybe (Char,a)) -> a -> Text
unfoldrN n f s = unstream (S.unfoldrN n (firstf safe . f) s)
{-# INLINE unfoldrN #-}

-- -----------------------------------------------------------------------------
-- * Substrings

-- | /O(n)/ 'take' @n@, applied to a 'Text', returns the prefix of the
-- 'Text' of length @n@, or the 'Text' itself if @n@ is greater than
-- the length of the Text. Subject to fusion.
take :: Int -> Text -> Text
take n t@(Text arr off len)
    | n <= 0    = empty
    | n >= len  = t
    | otherwise = text arr off (iterN n t)
{-# INLINE [1] take #-}

iterN :: Int -> Text -> Int
iterN n t@(Text _arr _off len) = loop 0 0
  where loop !i !cnt
            | i >= len || cnt >= n = i
            | otherwise            = loop (i+d) (cnt+1)
          where d = iter_ t i

{-# RULES
"TEXT take -> fused" [~1] forall n t.
    take n t = unstream (S.take n (stream t))
"TEXT take -> unfused" [1] forall n t.
    unstream (S.take n (stream t)) = take n t
  #-}

-- | /O(n)/ 'takeEnd' @n@ @t@ returns the suffix remaining after
-- taking @n@ characters from the end of @t@.
--
-- Examples:
--
-- > takeEnd 3 "foobar" == "bar"
takeEnd :: Int -> Text -> Text
takeEnd n t@(Text arr off len)
    | n <= 0    = empty
    | n >= len  = t
    | otherwise = text arr (off+i) (len-i)
  where i = iterNEnd n t

iterNEnd :: Int -> Text -> Int
iterNEnd n t@(Text _arr _off len) = loop (len-1) n
  where loop i !m
          | i <= 0    = 0
          | m <= 1    = i
          | otherwise = loop (i+d) (m-1)
          where d = reverseIter_ t i

-- | /O(n)/ 'drop' @n@, applied to a 'Text', returns the suffix of the
-- 'Text' after the first @n@ characters, or the empty 'Text' if @n@
-- is greater than the length of the 'Text'. Subject to fusion.
drop :: Int -> Text -> Text
drop n t@(Text arr off len)
    | n <= 0    = t
    | n >= len  = empty
    | otherwise = text arr (off+i) (len-i)
  where i = iterN n t
{-# INLINE [1] drop #-}

{-# RULES
"TEXT drop -> fused" [~1] forall n t.
    drop n t = unstream (S.drop n (stream t))
"TEXT drop -> unfused" [1] forall n t.
    unstream (S.drop n (stream t)) = drop n t
  #-}

-- | /O(n)/ 'dropEnd' @n@ @t@ returns the prefix remaining after
-- dropping @n@ characters from the end of @t@.
--
-- Examples:
--
-- > dropEnd 3 "foobar" == "foo"
dropEnd :: Int -> Text -> Text
dropEnd n t@(Text arr off len)
    | n <= 0    = t
    | n >= len  = empty
    | otherwise = text arr off (iterNEnd n t)

-- | /O(n)/ 'takeWhile', applied to a predicate @p@ and a 'Text',
-- returns the longest prefix (possibly empty) of elements that
-- satisfy @p@.  Subject to fusion.
takeWhile :: (Char -> Bool) -> Text -> Text
takeWhile p t@(Text arr off len) = loop 0
  where loop !i | i >= len    = t
                | p c         = loop (i+d)
                | otherwise   = text arr off i
            where Iter c d    = iter t i
{-# INLINE [1] takeWhile #-}

{-# RULES
"TEXT takeWhile -> fused" [~1] forall p t.
    takeWhile p t = unstream (S.takeWhile p (stream t))
"TEXT takeWhile -> unfused" [1] forall p t.
    unstream (S.takeWhile p (stream t)) = takeWhile p t
  #-}

-- | /O(n)/ 'dropWhile' @p@ @t@ returns the suffix remaining after
-- 'takeWhile' @p@ @t@. Subject to fusion.
dropWhile :: (Char -> Bool) -> Text -> Text
dropWhile p t@(Text arr off len) = loop 0 0
  where loop !i !l | l >= len  = empty
                   | p c       = loop (i+d) (l+d)
                   | otherwise = Text arr (off+i) (len-l)
            where Iter c d     = iter t i
{-# INLINE [1] dropWhile #-}

{-# RULES
"TEXT dropWhile -> fused" [~1] forall p t.
    dropWhile p t = unstream (S.dropWhile p (stream t))
"TEXT dropWhile -> unfused" [1] forall p t.
    unstream (S.dropWhile p (stream t)) = dropWhile p t
  #-}

-- | /O(n)/ 'dropWhileEnd' @p@ @t@ returns the prefix remaining after
-- dropping characters that fail the predicate @p@ from the end of
-- @t@.  Subject to fusion.
-- Examples:
--
-- > dropWhileEnd (=='.') "foo..." == "foo"
dropWhileEnd :: (Char -> Bool) -> Text -> Text
dropWhileEnd p t@(Text arr off len) = loop (len-1) len
  where loop !i !l | l <= 0    = empty
                   | p c       = loop (i+d) (l+d)
                   | otherwise = Text arr off l
            where (c,d)        = reverseIter t i
{-# INLINE [1] dropWhileEnd #-}

{-# RULES
"TEXT dropWhileEnd -> fused" [~1] forall p t.
    dropWhileEnd p t = S.reverse (S.dropWhile p (S.reverseStream t))
"TEXT dropWhileEnd -> unfused" [1] forall p t.
    S.reverse (S.dropWhile p (S.reverseStream t)) = dropWhileEnd p t
  #-}

-- | /O(n)/ 'dropAround' @p@ @t@ returns the substring remaining after
-- dropping characters that fail the predicate @p@ from both the
-- beginning and end of @t@.  Subject to fusion.
dropAround :: (Char -> Bool) -> Text -> Text
dropAround p = dropWhile p . dropWhileEnd p
{-# INLINE [1] dropAround #-}

-- | /O(n)/ Remove leading white space from a string.  Equivalent to:
--
-- > dropWhile isSpace
stripStart :: Text -> Text
stripStart = dropWhile isSpace
{-# INLINE [1] stripStart #-}

-- | /O(n)/ Remove trailing white space from a string.  Equivalent to:
--
-- > dropWhileEnd isSpace
stripEnd :: Text -> Text
stripEnd = dropWhileEnd isSpace
{-# INLINE [1] stripEnd #-}

-- | /O(n)/ Remove leading and trailing white space from a string.
-- Equivalent to:
--
-- > dropAround isSpace
strip :: Text -> Text
strip = dropAround isSpace
{-# INLINE [1] strip #-}

-- | /O(n)/ 'splitAt' @n t@ returns a pair whose first element is a
-- prefix of @t@ of length @n@, and whose second is the remainder of
-- the string. It is equivalent to @('take' n t, 'drop' n t)@.
splitAt :: Int -> Text -> (Text, Text)
splitAt n t@(Text arr off len)
    | n <= 0    = (empty, t)
    | n >= len  = (t, empty)
    | otherwise = let k = iterN n t
                  in (text arr off k, text arr (off+k) (len-k))

-- | /O(n)/ 'span', applied to a predicate @p@ and text @t@, returns
-- a pair whose first element is the longest prefix (possibly empty)
-- of @t@ of elements that satisfy @p@, and whose second is the
-- remainder of the list.
span :: (Char -> Bool) -> Text -> (Text, Text)
span p t = case span_ p t of
             (# hd,tl #) -> (hd,tl)
{-# INLINE span #-}

-- | /O(n)/ 'break' is like 'span', but the prefix returned is
-- over elements that fail the predicate @p@.
break :: (Char -> Bool) -> Text -> (Text, Text)
break p = span (not . p)
{-# INLINE break #-}

-- | /O(n)/ Group characters in a string according to a predicate.
groupBy :: (Char -> Char -> Bool) -> Text -> [Text]
groupBy p = loop
  where
    loop t@(Text arr off len)
        | null t    = []
        | otherwise = text arr off n : loop (text arr (off+n) (len-n))
        where Iter c d = iter t 0
              n     = d + findAIndexOrEnd (not . p c) (Text arr (off+d) (len-d))

-- | Returns the /array/ index (in units of 'Word16') at which a
-- character may be found.  This is /not/ the same as the logical
-- index returned by e.g. 'findIndex'.
findAIndexOrEnd :: (Char -> Bool) -> Text -> Int
findAIndexOrEnd q t@(Text _arr _off len) = go 0
    where go !i | i >= len || q c       = i
                | otherwise             = go (i+d)
                where Iter c d          = iter t i

-- | /O(n)/ Group characters in a string by equality.
group :: Text -> [Text]
group = groupBy (==)

-- | /O(n)/ Return all initial segments of the given 'Text', shortest
-- first.
inits :: Text -> [Text]
inits t@(Text arr off len) = loop 0
    where loop i | i >= len = [t]
                 | otherwise = Text arr off i : loop (i + iter_ t i)

-- | /O(n)/ Return all final segments of the given 'Text', longest
-- first.
tails :: Text -> [Text]
tails t | null t    = [empty]
        | otherwise = t : tails (unsafeTail t)

-- $split
--
-- Splitting functions in this library do not perform character-wise
-- copies to create substrings; they just construct new 'Text's that
-- are slices of the original.

-- | /O(m+n)/ Break a 'Text' into pieces separated by the first 'Text'
-- argument (which cannot be empty), consuming the delimiter. An empty
-- delimiter is invalid, and will cause an error to be raised.
--
-- Examples:
--
-- > splitOn "\r\n" "a\r\nb\r\nd\r\ne" == ["a","b","d","e"]
-- > splitOn "aaa"  "aaaXaaaXaaaXaaa"  == ["","X","X","X",""]
-- > splitOn "x"    "x"                == ["",""]
--
-- and
--
-- > intercalate s . splitOn s         == id
-- > splitOn (singleton c)             == split (==c)
--
-- (Note: the string @s@ to split on above cannot be empty.)
--
-- In (unlikely) bad cases, this function's time complexity degrades
-- towards /O(n*m)/.
splitOn :: Text
        -- ^ String to split on. If this string is empty, an error
        -- will occur.
        -> Text
        -- ^ Input text.
        -> [Text]
splitOn pat@(Text _ _ l) src@(Text arr off len)
    | l <= 0          = emptyError "splitOn"
    | isSingleton pat = split (== unsafeHead pat) src
    | otherwise       = go 0 (indices pat src)
  where
    go !s (x:xs) =  text arr (s+off) (x-s) : go (x+l) xs
    go  s _      = [text arr (s+off) (len-s)]
{-# INLINE [1] splitOn #-}

{-# RULES
"TEXT splitOn/singleton -> split/==" [~1] forall c t.
    splitOn (singleton c) t = split (==c) t
  #-}

-- | /O(n)/ Splits a 'Text' into components delimited by separators,
-- where the predicate returns True for a separator element.  The
-- resulting components do not contain the separators.  Two adjacent
-- separators result in an empty component in the output.  eg.
--
-- > split (=='a') "aabbaca" == ["","","bb","c",""]
-- > split (=='a') ""        == [""]
split :: (Char -> Bool) -> Text -> [Text]
split _ t@(Text _off _arr 0) = [t]
split p t = loop t
    where loop s | null s'   = [l]
                 | otherwise = l : loop (unsafeTail s')
              where (# l, s' #) = span_ (not . p) s
{-# INLINE split #-}

-- | /O(n)/ Splits a 'Text' into components of length @k@.  The last
-- element may be shorter than the other chunks, depending on the
-- length of the input. Examples:
--
-- > chunksOf 3 "foobarbaz"   == ["foo","bar","baz"]
-- > chunksOf 4 "haskell.org" == ["hask","ell.","org"]
chunksOf :: Int -> Text -> [Text]
chunksOf k = go
  where
    go t = case splitAt k t of
             (a,b) | null a    -> []
                   | otherwise -> a : go b
{-# INLINE chunksOf #-}

-- ----------------------------------------------------------------------------
-- * Searching

-------------------------------------------------------------------------------
-- ** Searching with a predicate

-- | /O(n)/ The 'find' function takes a predicate and a 'Text', and
-- returns the first element matching the predicate, or 'Nothing' if
-- there is no such element.
find :: (Char -> Bool) -> Text -> Maybe Char
find p t = S.findBy p (stream t)
{-# INLINE find #-}

-- | /O(n)/ The 'partition' function takes a predicate and a 'Text',
-- and returns the pair of 'Text's with elements which do and do not
-- satisfy the predicate, respectively; i.e.
--
-- > partition p t == (filter p t, filter (not . p) t)
partition :: (Char -> Bool) -> Text -> (Text, Text)
partition p t = (filter p t, filter (not . p) t)
{-# INLINE partition #-}

-- | /O(n)/ 'filter', applied to a predicate and a 'Text',
-- returns a 'Text' containing those characters that satisfy the
-- predicate.
filter :: (Char -> Bool) -> Text -> Text
filter p t = unstream (S.filter p (stream t))
{-# INLINE filter #-}

-- | /O(n+m)/ Find the first instance of @needle@ (which must be
-- non-'null') in @haystack@.  The first element of the returned tuple
-- is the prefix of @haystack@ before @needle@ is matched.  The second
-- is the remainder of @haystack@, starting with the match.
--
-- Examples:
--
-- > breakOn "::" "a::b::c" ==> ("a", "::b::c")
-- > breakOn "/" "foobar"   ==> ("foobar", "")
--
-- Laws:
--
-- > append prefix match == haystack
-- >   where (prefix, match) = breakOn needle haystack
--
-- If you need to break a string by a substring repeatedly (e.g. you
-- want to break on every instance of a substring), use 'breakOnAll'
-- instead, as it has lower startup overhead.
--
-- In (unlikely) bad cases, this function's time complexity degrades
-- towards /O(n*m)/.
breakOn :: Text -> Text -> (Text, Text)
breakOn pat src@(Text arr off len)
    | null pat  = emptyError "breakOn"
    | otherwise = case indices pat src of
                    []    -> (src, empty)
                    (x:_) -> (text arr off x, text arr (off+x) (len-x))
{-# INLINE breakOn #-}

-- | /O(n+m)/ Similar to 'breakOn', but searches from the end of the
-- string.
--
-- The first element of the returned tuple is the prefix of @haystack@
-- up to and including the last match of @needle@.  The second is the
-- remainder of @haystack@, following the match.
--
-- > breakOnEnd "::" "a::b::c" ==> ("a::b::", "c")
breakOnEnd :: Text -> Text -> (Text, Text)
breakOnEnd pat src = (reverse b, reverse a)
    where (a,b) = breakOn (reverse pat) (reverse src)
{-# INLINE breakOnEnd #-}

-- | /O(n+m)/ Find all non-overlapping instances of @needle@ in
-- @haystack@.  Each element of the returned list consists of a pair:
--
-- * The entire string prior to the /k/th match (i.e. the prefix)
--
-- * The /k/th match, followed by the remainder of the string
--
-- Examples:
--
-- > breakOnAll "::" ""
-- > ==> []
-- > breakOnAll "/" "a/b/c/"
-- > ==> [("a", "/b/c/"), ("a/b", "/c/"), ("a/b/c", "/")]
--
-- In (unlikely) bad cases, this function's time complexity degrades
-- towards /O(n*m)/.
--
-- The @needle@ parameter may not be empty.
breakOnAll :: Text              -- ^ @needle@ to search for
           -> Text              -- ^ @haystack@ in which to search
           -> [(Text, Text)]
breakOnAll pat src@(Text arr off slen)
    | null pat  = emptyError "breakOnAll"
    | otherwise = L.map step (indices pat src)
  where
    step       x = (chunk 0 x, chunk x (slen-x))
    chunk !n !l  = text arr (n+off) l
{-# INLINE breakOnAll #-}

-------------------------------------------------------------------------------
-- ** Indexing 'Text's

-- $index
--
-- If you think of a 'Text' value as an array of 'Char' values (which
-- it is not), you run the risk of writing inefficient code.
--
-- An idiom that is common in some languages is to find the numeric
-- offset of a character or substring, then use that number to split
-- or trim the searched string.  With a 'Text' value, this approach
-- would require two /O(n)/ operations: one to perform the search, and
-- one to operate from wherever the search ended.
--
-- For example, suppose you have a string that you want to split on
-- the substring @\"::\"@, such as @\"foo::bar::quux\"@. Instead of
-- searching for the index of @\"::\"@ and taking the substrings
-- before and after that index, you would instead use @breakOnAll \"::\"@.

-- | /O(n)/ 'Text' index (subscript) operator, starting from 0.
index :: Text -> Int -> Char
index t n = S.index (stream t) n
{-# INLINE index #-}

-- | /O(n)/ The 'findIndex' function takes a predicate and a 'Text'
-- and returns the index of the first element in the 'Text' satisfying
-- the predicate. Subject to fusion.
findIndex :: (Char -> Bool) -> Text -> Maybe Int
findIndex p t = S.findIndex p (stream t)
{-# INLINE findIndex #-}

-- | /O(n+m)/ The 'count' function returns the number of times the
-- query string appears in the given 'Text'. An empty query string is
-- invalid, and will cause an error to be raised.
--
-- In (unlikely) bad cases, this function's time complexity degrades
-- towards /O(n*m)/.
count :: Text -> Text -> Int
count pat src
    | null pat        = emptyError "count"
    | isSingleton pat = countChar (unsafeHead pat) src
    | otherwise       = L.length (indices pat src)
{-# INLINE [1] count #-}

{-# RULES
"TEXT count/singleton -> countChar" [~1] forall c t.
    count (singleton c) t = countChar c t
  #-}

-- | /O(n)/ The 'countChar' function returns the number of times the
-- query element appears in the given 'Text'. Subject to fusion.
countChar :: Char -> Text -> Int
countChar c t = S.countChar c (stream t)
{-# INLINE countChar #-}

-------------------------------------------------------------------------------
-- * Zipping

-- | /O(n)/ 'zip' takes two 'Text's and returns a list of
-- corresponding pairs of bytes. If one input 'Text' is short,
-- excess elements of the longer 'Text' are discarded. This is
-- equivalent to a pair of 'unpack' operations.
zip :: Text -> Text -> [(Char,Char)]
zip a b = S.unstreamList $ S.zipWith (,) (stream a) (stream b)
{-# INLINE zip #-}

-- | /O(n)/ 'zipWith' generalises 'zip' by zipping with the function
-- given as the first argument, instead of a tupling function.
-- Performs replacement on invalid scalar values.
zipWith :: (Char -> Char -> Char) -> Text -> Text -> Text
zipWith f t1 t2 = unstream (S.zipWith g (stream t1) (stream t2))
    where g a b = safe (f a b)
{-# INLINE zipWith #-}

-- | /O(n)/ Breaks a 'Text' up into a list of words, delimited by 'Char's
-- representing white space.
words :: Text -> [Text]
words t@(Text arr off len) = loop 0 0
  where
    loop !start !n
        | n >= len = if start == n
                     then []
                     else [Text arr (start+off) (n-start)]
        | isSpace c =
            if start == n
            then loop (start+1) (start+1)
            else Text arr (start+off) (n-start) : loop (n+d) (n+d)
        | otherwise = loop start (n+d)
        where Iter c d = iter t n
{-# INLINE words #-}

-- | /O(n)/ Breaks a 'Text' up into a list of 'Text's at
-- newline 'Char's. The resulting strings do not contain newlines.
lines :: Text -> [Text]
lines ps | null ps   = []
         | otherwise = h : if null t
                           then []
                           else lines (unsafeTail t)
    where (# h,t #) = span_ (/= '\n') ps
{-# INLINE lines #-}

{-
-- | /O(n)/ Portably breaks a 'Text' up into a list of 'Text's at line
-- boundaries.
--
-- A line boundary is considered to be either a line feed, a carriage
-- return immediately followed by a line feed, or a carriage return.
-- This accounts for both Unix and Windows line ending conventions,
-- and for the old convention used on Mac OS 9 and earlier.
lines' :: Text -> [Text]
lines' ps | null ps   = []
          | otherwise = h : case uncons t of
                              Nothing -> []
                              Just (c,t')
                                  | c == '\n' -> lines t'
                                  | c == '\r' -> case uncons t' of
                                                   Just ('\n',t'') -> lines t''
                                                   _               -> lines t'
    where (h,t)    = span notEOL ps
          notEOL c = c /= '\n' && c /= '\r'
{-# INLINE lines' #-}
-}

-- | /O(n)/ Joins lines, after appending a terminating newline to
-- each.
unlines :: [Text] -> Text
unlines = concat . L.map (`snoc` '\n')
{-# INLINE unlines #-}

-- | /O(n)/ Joins words using single space characters.
unwords :: [Text] -> Text
unwords = intercalate (singleton ' ')
{-# INLINE unwords #-}

-- | /O(n)/ The 'isPrefixOf' function takes two 'Text's and returns
-- 'True' iff the first is a prefix of the second.  Subject to fusion.
isPrefixOf :: Text -> Text -> Bool
isPrefixOf a@(Text _ _ alen) b@(Text _ _ blen) =
    alen <= blen && S.isPrefixOf (stream a) (stream b)
{-# INLINE [1] isPrefixOf #-}

{-# RULES
"TEXT isPrefixOf -> fused" [~1] forall s t.
    isPrefixOf s t = S.isPrefixOf (stream s) (stream t)
  #-}

-- | /O(n)/ The 'isSuffixOf' function takes two 'Text's and returns
-- 'True' iff the first is a suffix of the second.
isSuffixOf :: Text -> Text -> Bool
isSuffixOf a@(Text _aarr _aoff alen) b@(Text barr boff blen) =
    d >= 0 && a == b'
  where d              = blen - alen
        b' | d == 0    = b
           | otherwise = Text barr (boff+d) alen
{-# INLINE isSuffixOf #-}

-- | /O(n+m)/ The 'isInfixOf' function takes two 'Text's and returns
-- 'True' iff the first is contained, wholly and intact, anywhere
-- within the second.
--
-- In (unlikely) bad cases, this function's time complexity degrades
-- towards /O(n*m)/.
isInfixOf :: Text -> Text -> Bool
isInfixOf needle haystack
    | null needle        = True
    | isSingleton needle = S.elem (unsafeHead needle) . S.stream $ haystack
    | otherwise          = not . L.null . indices needle $ haystack
{-# INLINE [1] isInfixOf #-}

{-# RULES
"TEXT isInfixOf/singleton -> S.elem/S.stream" [~1] forall n h.
    isInfixOf (singleton n) h = S.elem n (S.stream h)
  #-}

-------------------------------------------------------------------------------
-- * View patterns

-- | /O(n)/ Return the suffix of the second string if its prefix
-- matches the entire first string.
--
-- Examples:
--
-- > stripPrefix "foo" "foobar" == Just "bar"
-- > stripPrefix ""    "baz"    == Just "baz"
-- > stripPrefix "foo" "quux"   == Nothing
--
-- This is particularly useful with the @ViewPatterns@ extension to
-- GHC, as follows:
--
-- > {-# LANGUAGE ViewPatterns #-}
-- > import Data.Text as T
-- >
-- > fnordLength :: Text -> Int
-- > fnordLength (stripPrefix "fnord" -> Just suf) = T.length suf
-- > fnordLength _                                 = -1
stripPrefix :: Text -> Text -> Maybe Text
stripPrefix p@(Text _arr _off plen) t@(Text arr off len)
    | p `isPrefixOf` t = Just $! text arr (off+plen) (len-plen)
    | otherwise        = Nothing

-- | /O(n)/ Find the longest non-empty common prefix of two strings
-- and return it, along with the suffixes of each string at which they
-- no longer match.
--
-- If the strings do not have a common prefix or either one is empty,
-- this function returns 'Nothing'.
--
-- Examples:
--
-- > commonPrefixes "foobar" "fooquux" == Just ("foo","bar","quux")
-- > commonPrefixes "veeble" "fetzer"  == Nothing
-- > commonPrefixes "" "baz"           == Nothing
commonPrefixes :: Text -> Text -> Maybe (Text,Text,Text)
commonPrefixes t0@(Text arr0 off0 len0) t1@(Text arr1 off1 len1) = go 0 0
  where
    go !i !j | i < len0 && j < len1 && a == b = go (i+d0) (j+d1)
             | i > 0     = Just (Text arr0 off0 i,
                                 text arr0 (off0+i) (len0-i),
                                 text arr1 (off1+j) (len1-j))
             | otherwise = Nothing
      where Iter a d0 = iter t0 i
            Iter b d1 = iter t1 j

-- | /O(n)/ Return the prefix of the second string if its suffix
-- matches the entire first string.
--
-- Examples:
--
-- > stripSuffix "bar" "foobar" == Just "foo"
-- > stripSuffix ""    "baz"    == Just "baz"
-- > stripSuffix "foo" "quux"   == Nothing
--
-- This is particularly useful with the @ViewPatterns@ extension to
-- GHC, as follows:
--
-- > {-# LANGUAGE ViewPatterns #-}
-- > import Data.Text as T
-- >
-- > quuxLength :: Text -> Int
-- > quuxLength (stripSuffix "quux" -> Just pre) = T.length pre
-- > quuxLength _                                = -1
stripSuffix :: Text -> Text -> Maybe Text
stripSuffix p@(Text _arr _off plen) t@(Text arr off len)
    | p `isSuffixOf` t = Just $! text arr off (len-plen)
    | otherwise        = Nothing

-- | Add a list of non-negative numbers.  Errors out on overflow.
sumP :: String -> [Int] -> Int
sumP fun = go 0
  where go !a (x:xs)
            | ax >= 0   = go ax xs
            | otherwise = overflowError fun
          where ax = a + x
        go a  _         = a

emptyError :: String -> a
emptyError fun = P.error $ "Data.Text." ++ fun ++ ": empty input"

overflowError :: String -> a
overflowError fun = P.error $ "Data.Text." ++ fun ++ ": size overflow"

-- | /O(n)/ Make a distinct copy of the given string, sharing no
-- storage with the original string.
--
-- As an example, suppose you read a large string, of which you need
-- only a small portion.  If you do not use 'copy', the entire original
-- array will be kept alive in memory by the smaller string. Making a
-- copy \"breaks the link\" to the original array, allowing it to be
-- garbage collected if there are no other live references to it.
copy :: Text -> Text
copy (Text arr off len) = Text (A.run go) 0 len
  where
    go :: ST s (A.MArray s)
    go = do
      marr <- A.new len
      A.copyI marr 0 arr off len
      return marr

redpajama_set_name: RedPajamaGithub


A third generation Durham native, Tessa earned her Bachelor of Science degree in Dental Hygiene from the UNC School of Dentistry. She joined Dr. Blaylock's practice in 2001, and has over 24 years of experience in patient care. Tessa takes her patients' oral health very seriously, but that doesn't prevent laughter from emanating from the room when she is treating a patient. She loves getting to know her patients and catching up with them during their appointments. Outside of the office, Tessa enjoys spending time with her young adult children, grilling out with family and friends, and golfing with her mom.
Robin is a Durham native and graduated from the UNC Dental Assisting Program in 1983. She has over 32 years of experience in general and orthodontic dental practices. Robin began working with Dr. Blaylock and his team in 2014 and is proud of the quality of care his patients receive. She is married to Rod and has a married daughter, Caitlin. Robin is very active in the Women's and Outdoor Ministries at her church, and is an avid Wolfpack fan. When you visit our office, Robin's smile will be there to greet you, and she will be happy to help you with your scheduling, financial, and insurance needs.
Debbie grew up in Durham and has worked as a dental assistant in general dentistry for over 40 years. She earned her Dental Assisting Certification from the UNC Dental Assisting Program. Debbie has worked as Dr. Blaylock's chairside dental assistant since 1993, and patients often comment that she always seems to be on the same wavelength as Dr. Blaylock and knows what he is going to do next. When not working, she loves spending time with her family, especially Will, her grandson. Debbie is active in dance, having attended the NC School of the Arts, School of Dance in Winston Salem. She continues to teach classes at a local dance studio. Debbie is proud to be a part of Dr. Blaylock's team and is always willing to help make your dental visit an efficient and pleasant experience.
Originally from Michigan, Theresa graduated from Kalamazoo Community College and the UNC School of Dentistry with degrees in Dental Hygiene. She worked as the clinical coordinator with the Duke University geriatric dental clinic, and later as a dental hygienist with Dr. Blaylock. Theresa moved with her husband, Marcel, and family to Arizona, Virginia and California, earning a dental hygiene license in each state. Fortunately for Dr. Blaylock and his patients, she moved back to North Carolina and has been working in his office since 2007. Theresa enjoys reading, gardening and traveling with her husband and two teenagers.


Many central banks have come to rely on dynamic stochastic general equilibrium, or DSGE, models to inform their economic outlook and to help formulate their policy strategies. But while their use is familiar to policymakers and academics, these models are typically not well known outside these circles. This article introduces the basic structure, logic, and application of the DSGE framework to a broader public by providing an example of its use in monetary policy analysis. The authors present and estimate a simple New Keynesian DSGE model, highlighting the core features that this basic specification shares with more elaborate versions. They then apply the estimated model to study the sources of the sudden increase in inflation that occurred in the first half of 2004. One important lesson derived from this exercise is that the management of expectations can be a more effective tool for stabilizing inflation than actual movements in the policy rate. This result is consistent with the increasing focus on the pronouncements of central bankers regarding their future actions.


Empower is a dynamic professional learning experience for teacher leaders. Designed to build teachers' expertise in rigorous content and pedagogy, Empower aims to ensure that every Tulsa Public Schools student experiences and masters challenging learning every day.
The program, developed in partnership with Leading Educators, creates opportunities for teams of content-alike teachers to build knowledge and skills that support college and career readiness through ongoing reflection, learning and practice.
How can EMPOWER help me become a better teacher?
Empower is designed to foster progress across the district and is powered by the people who know their school community best: teacher and school leaders. The program positions and prepares educators to develop their peers around a set of ambitious school-level goals for students and teachers. In addition to weekly school-based learning, teacher and school leaders participate in district workshops and coaching throughout the year.


Use this 123Inkjets coupon code to save 15% off on ink and toner supplies. This new 123Inkjets coupon code is valid from now and through September 29, 2018.
Valid from now through February 21, 2017, 123inkjets offers 17% off on both ink and toner due to President's Day. In order to active this promotion you need to active the 123inkjets coupon code.
123inkjets has a new coupon code that works through January 31, 2017 and this coupon takes 15% off compatible ink and 10% other inks and toners.
Use this 123inkjets coupon when your order total is $55 or more and save up to 15% off. This 123inkjets coupon is valid through March 31, 2016.
Use this 123inkjets coupon code at checkout to receive 15% discount on compatible ink and 10% off on all other products. Also get free shipping on $55+. Valid through July 7, 2015.
Exclusive to RetailMeNot.com, this coupon code takes 16% off on all compatibles and 12% off on all other products. Excludes hardware & oem items and valid through June 30, 2015.
Redeem this special 123inkjets promo code to take 10% off site-wide and 15% off compatible ink. This 123inkjets coupon is valid through June 4, 2015.
123inkjets is a consumer based provider of ink cartridges and printer toner located in Southern California. Since 1999, 123inkjets has been supplying their customers with ink cartridges and toner for nearly all brands of inkjet and laser printers available on the market today. Quality control of the products offered is maintained through the fact that 123inkjets is in control of their own inventory purchases, which ensures quality over purchases, as well as offering value to their customers. 123inkjets offers numerous other printing related products and hardware as well as environmentally friendly inkjet and toner options.
While offering customers ink cartridges for inkjet printers, and toner for laser jet printers, 123inkjets also carries other printing related products to fulfill their customers printing needs. Products ranging from paper products, with choices from copy paper, photo paper, to roll paper suitable for large format printing; Printers, cables, as well as materials for 3D printing, boasting user friendly filaments for a variety of 3D printing needs with choices of filament materials in varying finishes. Value to their customers is always in mind. Environmentally friendly options are available too. Re-manufactured ink cartridges and toner, along with ink refill kits pass along additional savings.
The 123inkjets website will usually have a coupon code that is typically for a specific product that the customer can use at checkout, but by signing up for their newsletter, you can save even more and receive additional coupon codes. You will receive new coupon codes monthly which can be used for extra added savings, free shipping as well as other offers. 123inkjets also offers a 100% satisfaction guarantee with their two year product guarantee.


text:
Miranda Gil
Pop R&B
Share Miranda Gil's EPK!
Miranda Gil is an 18-year-old Mexican/American singer and songwriter based in the Music Capital of the World, Austin, TX. Miranda discovered her gift of song at the tender age of nine through imitation of her idols Whitney Houston, Etta James and Donna Summer in their soulful ballads. Around the same time, the Tejano singer Selena was gaining worldwide attention as a crossover Mexican/American artist breaking into mainstream music. Unfortunately, Selena's life and fruitful career was cut short but the path she had begun to pave for Latinos in America opened up an avenue for other artists to follow. Seeing this, Miranda decided to follow her dreams and fine-tune her God-given talent of song. She began to work with regional vocal trainers including West Coast R&B/Blues veteran, LZ Love. LZ took Miranda under her wing and became her mentor, enriching Miranda with a sound much older and richer than ever before. This was a major turning point in Miranda's life; with her new unearthing of such a powerful and soulful voice she began recording her own music and created her debut EP, Take It or Leave It produced by The Action Figures and co-written by Brandon "Gutta" Williams. Along with her newly released EP, Miranda embarked on a live tour across Central Texas. During this time, Miranda was introduced to local legend and musical engineering prodigy, Shawn Dell. Their creative personas and hardworking attitudes were an instant match, they shared the same vision of mainstream success through music the world over could relate to. Together they have released several local hit records and are working on Miranda's debut album, My Turn, set to release in 2013. For Miranda Gil, this is only the beginning of an eminent career in the music industry. Join her in her voyage from hidden gem to worldwide sensation as she brings joy to the world through each and every one of her songs.


Rising along a spectacular stretch of white sandy beach and framed by tropical palm trees, this spectacular hotel boasts 400 elegant junior suites with hydro-massage bathtubs and all of Riu's distinctive amenities, such as a mini-bar and liquor dispenser. Enjoy the exquisite selection of la carte restaurants and bars, along with continental breakfast room service, 24-hour All Inclusive (snacks and beverages) and the exchange privileges programme with all sister properties within the Riu Resort complex.
The brand-new Riu Palace Riviera Maya: creating unforgettable memories of Mexican paradise.


text:
Week-in-review: February 18 – 22
Lawmakers returned to Springfield last week, gathering on Feb. 20 for a joint session of the General Assembly to listen as Illinois' new Governor outlined his spending plan for the coming year.
The Governor's proposed budget represents a starting point for further negotiations; however, there are concerns about references to more spending, more tax increases and budgeting gimmicks that tried and failed in the past. Although lawmakers will have time to analyze the fiscal details, many have already expressed their concerns about proposals to address the pension system, the Governor's calls for a graduated income tax and other revenues from such actions as legalizing medical marijuana and extending Illinois' pension payments.
"While I can recognize the efforts of the new administration to hit the ground running, I have serious concerns about the how the governor's proposed budget will impact Southern Illinois. Broad and unrealistic proposals, such as a shortsighted minimum wage increase, a costly progressive income tax system or Band-Aid fixes for Illinois' ballooning pension crisis, will have lasting detrimental consequences on the region," said Senator Fowler. "In his inaugural address earlier this year, Governor Pritzker vowed to do more for Southern Illinois, and I was encouraged to hear him reiterate that commitment in his address. Hopefully he will put action behind his words and from here we can move forward in a bipartisan manner that will help Southern Illinois and tackle the very real issues facing our state."
As the legislative budget process gets under way, lawmakers should instead work together in a bipartisan way to make the tough decisions necessary to pass a balanced budget with structural reforms that will boost the economy and create jobs.
Fiscal Year 2020 runs from July 1, 2019, through June 30, 2020.
In other news, less than a week after Democrat legislative leaders forced through a minimum wage hike, Gov. Pritzker signed Senate Bill 1 into law on Feb. 19. The controversial legislation was advanced by the Senate and House on party-line votes, despite economic concerns from employers and public groups.
The plan would raise the minimum wage to $15 per hour over six years, and to $13 per hour during the same period for those employees younger than 18.
Opponents of the plan noted the vast differences in the cost of living across Illinois. They also raised concerns that the incremental increase could have far-reaching implications for employers across the board, including an increase in annual costs for state agencies, local school districts, human service providers and hospitals.
During the hustle-and-bustle of budget address week, members of the Graduate and Professional Student Council from SIU-C made the trip up to Springfield. Senator Fowler welcomed them on the Senate floor for a visit on Feb. 20.
Senator Fowler will be hosting another mobile office event for area constituents, this time in Vienna. From 12-2 p.m. on March 4, residents are encouraged to come out to the Vienna City Hall and speak with Senator Fowler and District staff. This is a great opportunity to ask questions, voice concerns and let the Senator know what's happening in the community. Questions about the event can be directed to Senator Fowler's District office at 618-294-8951.
Greater protections from ethylene oxide
A package of legislation unveiled Feb. 19 will address the public health crisis caused by Sterigenics and their release of ethylene oxide into surrounding communities.
The Illinois Environmental Protection Agency issued a seal order Feb. 15 against Sterigenics, which forced them to cease operations. The legislation will also ensure the proper policies and protections are in place to safeguard Willowbrook and all Illinois communities from the impact of this public health hazard.
Senate Bill 1852 requires:
A facility to notify all affected property owners and local governments within 2,500 feet when an ethylene oxide leak has occurred.
Senate Bill 1853 provides that:
The IEPA shall reevaluate the current CAAPP (Clean Air Act Permit Program) permit of any facility emitting ethylene oxide, and conduct a 90-day public hearing process on such permits.
No permit shall be renewed if the facility is in violation of any federal or state standards or current studies pertaining to ethylene oxide.
A facility emitting ethylene oxide at levels higher than federal or state standards must cease operations until the level of emissions are reduced below the federal and state standards.
No facility shall have fugitive emissions of ethylene oxide above zero.
Each facility is subject to regular and frequent inspections and testing to ensure that no fugitive emissions of ethylene oxide exist. Inspections shall be unannounced and conducted by a third party chosen by the municipality in which the facility operates.
Each facility is subject to fence line ambient air testing, at random, once within every 90-120 days for a duration of 24-hour samples of no less than six consecutive days. Testing is done by a third party chosen by the municipality.
Protecting Mahomet Aquifer
Also during the week, a legislative package was introduced to protect the Mahomet Aquifer, the primary water source for Central Illinois.
The package of bills is supported by a bicameral and bipartisan group of Senators and Representatives who are working to pass them into law, based on recommendations from the final report of Mahomet Aquifer Task Force.
Senate Bill 2073 creates a permanent body, the Mahomet Aquifer Council, to serve as a watchdog and to provide oversight for the Mahomet Aquifer.
Senate Bill 2071 would provide $1 million in funding for equipment for the University of Illinois' Prairie Research Institute (PRI) so that the organization can continue to research and study the aquifer.
Senate Bill 2072 would provide $2.3 million in funding for ongoing PRI operations.
Senate Bill 2070 would appropriate $4 million for the utilization of helicopter-based time-domain electromagnetics technology for the purpose of mapping and studying of an area of the aquifer known as Zone 2. This zone is where a recent leak of natural gas occurred.
Senate Bill 2074 would allow State Treasurer to accept restitution payment from Peoples Gas, if a court finds the company liable for a recent leak of natural gas into the aquifer.
PrevPreviousFowler reacts to Governor's Budget Address
NextWeek-in-review: February 25 – March 1Next


I was a preschool teacher for 3 years and have my 12 Early Childhood Education Units. I have been doing daycare in my home for 14 years, I am licenced and CPR and First Aid Certified. I have a fun, safe environment at the end of a quiet cul de sac. I am a member of the Food Program so I provide all snacks and meals. I can provide references.


text:
THIS IS AN ARCHIVED TOPIC WHICH IS NOT REGULARLY UPDATED
A deceptively explosive middle-order batsman who likes a boundary, Zadran has been a regular part of the Afghanistan side that has won so many fans over the past decade.
Role: Left-hand bat, right-arm offbreak
Zadran told ESPNcricinfo last year that his all-time favourite cricketer is Suresh Raina, and given the Afghanistan batsman's belligerent playing style, you can see why.
Despite his slighter frame in comparison to the 32-year-old World Cup winner, the left-hander more than packs a punch with his unrelenting style and has earned him a regular spot in the Afghanistan middle-order.
Like many of his colleagues, age-group cricket prepared Zadran for the big time, but his transition was far less smooth than he may have expected.
Having made his ODI debut against Ireland in 2012 and his T20I debut against India later that year, he initially failed to convert his starts into significant contributions, only passing the 20-run mark on seven occasions during his first 20 games for his country.
Nevertheless, the selectors noticed the talent and included Zadran in the 2015 World Cup squad, but after returning a modest 123 runs from 6 matches at an average of 24.60 in the tournament and poor subsequent showings against Zimbabwe, he was eventually dropped from the national side.
Zadran returned to the first-class cricket drawing board, and his second coming in February 2016 was far more the player the world recognises today.
Najibullah's comeback game saw him strike his maiden T20I fifty with a 35-ball 60* against Hong Kong, a knock that eventually helped his side into the main draw for the Asia Cup, before he smashed a career-best 89* against Scotland in Edinburgh in a rain-affected ODI.
Now a mainstay with the national side, he has earnt himself a BPL contract with the Chittagong Vikings, but he will need to build on the three fifties he scored in all formats last year when the World Cup comes around.
AFGHANISTAN PLAYER PROFILES
Asghar Afghan
Aftab Alam
Hamid Hassan
Rashid Khan
Gulbadin Naib
Rahmat Shah
Hashmatullah Shahidi
Samiullah Shinwari
Dawlat Zadran
Noor Ali Zadran


text:
US Labor Department's OSHA cites Remington Arms Co. for 35 serious safety and health violations at Ilion, NY, plant
Region 2 News Release: 11-1617-NEW/BOS 2011-381
Contact: Ted Fitzgerald
Email: fitzgerald.edmund@dol.gov
US Labor Department's OSHA cites Remington Arms Co. for
35 serious safety and health violations at Ilion, NY, plant
Firearms manufacturer faces $170,000 in fines
SYRACUSE, N.Y. – The U.S. Department of Labor's Occupational Safety and Health Administration has cited Remington Arms Co. Inc. for 35 alleged serious violations of workplace safety and health standards at its Ilion, N.Y., manufacturing plant. The firearms manufacturer faces a total of $170,000 in proposed penalties for a variety of mechanical, electrical and chemical hazards identified during inspections by OSHA's Syracuse Area Office.
"Left uncorrected, these conditions expose the plant's workers to electrocution, falls, burns, lacerations, amputation, crushing and "struck-by" injuries, as well as exposure to hazardous substances and being caught in operating or unintentionally energized machinery," said Christopher Adams, OSHA's area director for central New York. "For the safety and health of these workers, this employer must ensure that these hazards are corrected and take effective steps to prevent their recurrence."
Specifically, OSHA found violations involving a lack of personal protective equipment; accumulations of toxic substances lead and cadmium on surfaces in the plant; food and beverages stored and consumed at cadmium-contaminated work stations; failing to provide workers with training and information on lead and cadmium; and not determining cadmium exposure levels. The inspection also identified numerous electrical hazards and instances of unguarded moving machine parts; improper storage and transfer of flammable liquids; a lack of procedures to lock out machines' power sources to prevent their unintended startup during maintenance; unguarded openings and defective ladders; defective powered industrial trucks and untrained drivers; inadequate fire extinguisher training and availability; unlabeled permit-required confined spaces; no continuous, effective extermination program for vermin; unlabeled containers of hazardous chemicals; and several exit deficiencies including a locked exit door, obstructed exit routes, umarked exits, and non-functioning emergency and exit lighting. A serious violation occurs when there is substantial probability that death or serious physical harm could result from a hazard about which the employer knew or should have known.
"An effective illness and injury prevention program in which employers and employees work together to identify and eliminate hazards is one way of preventing initial and recurring workplace hazards such as these," said Robert Kulick, OSHA's regional director in New York.
The citations can be viewed at http://www.osha.gov/ooc/citations/RemingtonArms_314352477_1104_11.pdf*
and http://www.osha.gov/ooc/citations/RemingtonArms_314352329_1104_11.pdf*.
Remington Arms Co. Inc. has 15 business days from receipt of its citations and proposed penalties to comply, meet with OSHA's area director or contest the findings before the independent Occupational Safety and Health Review Commission. To ask questions, obtain compliance assistance, file a complaint, or report workplace hospitalizations, fatalities or situations posing imminent danger to workers, the public should call OSHA's toll-free hotline at 800-321-OSHA (6742) or the agency's Syracuse office at 315-451-0808.
U.S. Department of Labor news materials are accessible at http://www.dol.gov. The information above is available in large print, Braille, audio tape or disc from the COAST office upon request by calling 202-693-7828 or TTY 202-693-7755.
* Accessibility Assistance: Contact OSHA's Office of Communications at 202-693-1999 for assistance accessing PDF materials.


Choosing the right corporate photography studio makes a huge impact on your business. When people walk by your storefront, or visit your website, they want to see professional, unique portraiture.
Headshots aren't the only type of photos that get customers' attention. Displaying quality pictures of corporate events or outings helps tell your brand story, too. So, from an elegant affair to a casual office picnic and anything in between, we've got you covered.
Interested in setting up photo booths at your next business party? How about photos with Santa? We can make it happen. And we can set up on-site printing so guests can leave with photos in hand.
We know it can be difficult to gather everyone together for a group picture, so let us come to you. We can shoot on location throughout Charleston, Summerville, Mount Pleasant, and surrounding areas.
Tumbleston has more than thirty years of business-photography experience throughout the Lowcountry. We've partnered with hundreds of local business, including Charleston Place, Daniel Island Club, Ashley Hall, and many others.
Contact our West Ashley or Moncks Corner studio today to learn more and get a quote.


Danger Don't Touch My Phone Wallpaper, Download this Images for free in high resolution. Danger Don't Touch My Phone Wallpaper was posted in December 4, 2018 at 1:39 am and This Danger Don't Touch My Phone Wallpaper Images has viewed by 533 users. If you wanna have it as yours, please click full size and you will go to page download in full size, so you just choose the size above the images that you want in "Download", Click it and download the Danger Don't Touch My Phone Wallpaper Images.


text:
Texas Sports Nation // Texans
Texans vs. Ravens: John McClain's keys to the game
John McClain Sep. 18, 2020
If the Texans can give David Johnson a steady diet of carries Sunday, it could go a long way toward beating the Ravens.
Photo: Brett Coomer/Staff photographer
John McClain on what to watch for in Sunday's Texans-Ravens game at NRG Stadium.
Three keys for Texans
1. Run the ball consistently and try to control the clock to keep Lamar Jackson on the bench. Get David Johnson the ball as much as possible.
2. Provide Deshaun Watson with better protection. Give him more time to throw from the pocket, and don't force him to always be on the move.
3. Get consistent pressure on quarterback Lamar Jackson, especially up the middle, and don't give him time to throw comfortably from the pocket.
Three keys for Ravens
1. Don't allow turnovers to become a problem. Don't throw an interception or lose a fumble that would shorten the field for the Texans' offense.
2. Score touchdowns in the red zone. They don't want to settle for too many field goals by Justin Tucker, one of the best kickers in history.
3. Get early pressure on Deshaun Watson, make him uncomfortable in the pocket and disrupt his timing with his receivers. Force him to run around.
More Texans Coverage from TXSN
Greg Rajan
Texans set to interview Bills assistant Leslie Frazier this...
Texans CEO Cal McNair says Jack Easterby staying and he has...
Answering your questions on the Texans' Watson-Easterby drama
John McClain's 2020 NFL divisional round playoff predictions
By Aaron Wilson, Staff writer
Texans coaching candidate Brandon Staley a master of disguises
Texans' Weaver under consideration for Meyer's Jaguars staff
Texans request interview with Rams DC Brandon Staley
Tony Dungy says Jim Caldwell has what it takes to lead Texans
Texas Sports Nation: TV & Podcasts
Podcast: Andre Johnson blasts Texans. What's the fallout?
Follow John on:
mcclain_on_nfl
John McClain, a Waco native who graduated from Baylor in 1975, is in his 45th year at the Houston Chronicle and his 44th covering the National Football League, including the Oilers and Texans. He worked for the Waco Tribune Herald from 1973-76, when he accepted a job with the Chronicle. to cover the original Houston Aeros of the World Hockey Association.
McClain has a plaque in the Pro Football Hall of Fame in Canton, Ohio as the 2006 winner of the Dick McCann Memorial Award presented annually by the Pro Football Writers of America to a writer for his long and distinguished coverage of the NFL. He is past president of the Pro Football Writers of America. In 2019, he was voted into the Texas Sports Hall of Fame's second class of media inductees.
He's a member of the Pro Football Hall of Fame Selection Committee, the Pro Football Hall of Fame Seniors Committee and the Texas Sports Hall of Fame Selection Committee.
In 2015, he was named as a Gridiron Legend in Texas, becoming the third member of the media behind Dave Campbell and Mickey Herskowitz. In 2019, he was voted into the Texas Sports Hall of Fame's second class of media honorees.
McClain can be heard six times a week on the Texans' flagship station Sports Radio 610 in Houston. He also does weekly sports talk shows in Nashville, Knoxville, Waco, Austin and San Antonio.
McClain also has appeared in eight movies: The Rookie, The Longest Yard, Spring Breakers, Secretariat, Invincible, Cook County, The Game Plan and Make It Rain.
McClain: Cal McNair's message on Jack Easterby is simple. Deal with it
Texans CEO Cal McNair says Jack Easterby staying and he has texted with Deshaun Watson
McClain's Mailbag: Deshaun, Andre, Easterby and no lack of Texans drama
Texans interview Colts DC Matt Eberflus
An open letter to Deshaun Watson: Is the pain that real?